cocoda-sdk 3.3.0 → 3.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cocoda-sdk.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* cocoda-sdk v3.3.
|
|
2
|
+
* cocoda-sdk v3.3.2
|
|
3
3
|
* Copyright (c) 2021 Verbundzentrale des GBV (VZG)
|
|
4
4
|
* @license MIT
|
|
5
5
|
*
|
|
6
6
|
* For dependency license information, please see ./dist/cocoda-sdk.js.LICENSES.txt.
|
|
7
7
|
*/
|
|
8
|
-
var CDK=(()=>{var em=Object.create;var
|
|
9
|
-
`),function(u){if(s=u.indexOf(":"),i=nn.trim(u.substr(0,s)).toLowerCase(),n=nn.trim(u.substr(s+1)),i){if(t[i]&&Em.indexOf(i)>=0)return;i==="set-cookie"?t[i]=(t[i]?t[i]:[]).concat([n]):t[i]=t[i]?t[i]+", "+n:n}}),t}});var da=g((FE,pa)=>{"use strict";var ha=Be();pa.exports=ha.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a"),i;function n(s){var a=s;return e&&(t.setAttribute("href",a),a=t.href),t.setAttribute("href",a),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return i=n(window.location.href),function(a){var u=ha.isString(a)?n(a):a;return u.protocol===i.protocol&&u.host===i.host}}():function(){return function(){return!0}}()});var _t=g((BE,ma)=>{"use strict";function sn(r){this.message=r}sn.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};sn.prototype.__CANCEL__=!0;ma.exports=sn});var on=g((kE,ga)=>{"use strict";var Zt=Be(),Im=ra(),Tm=ia(),Pm=Qi(),Mm=fa(),Rm=la(),Lm=da(),an=tn(),jm=rn(),Nm=_t();ga.exports=function(e){return new Promise(function(i,n){var s=e.data,a=e.headers,u=e.responseType,o;function c(){e.cancelToken&&e.cancelToken.unsubscribe(o),e.signal&&e.signal.removeEventListener("abort",o)}Zt.isFormData(s)&&delete a["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var b=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.Authorization="Basic "+btoa(b+":"+w)}var q=Mm(e.baseURL,e.url);p.open(e.method.toUpperCase(),Pm(q,e.params,e.paramsSerializer),!0),p.timeout=e.timeout;function y(){if(!!p){var H="getAllResponseHeaders"in p?Rm(p.getAllResponseHeaders()):null,K=!u||u==="text"||u==="json"?p.responseText:p.response,Q={data:K,status:p.status,statusText:p.statusText,headers:H,config:e,request:p};Im(function(Z){i(Z),c()},function(Z){n(Z),c()},Q),p=null}}if("onloadend"in p?p.onloadend=y:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(y)},p.onabort=function(){!p||(n(an("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){n(an("Network Error",e,null,p)),p=null},p.ontimeout=function(){var K=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",Q=e.transitional||jm;e.timeoutErrorMessage&&(K=e.timeoutErrorMessage),n(an(K,e,Q.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},Zt.isStandardBrowserEnv()){var P=(e.withCredentials||Lm(q))&&e.xsrfCookieName?Tm.read(e.xsrfCookieName):void 0;P&&(a[e.xsrfHeaderName]=P)}"setRequestHeader"in p&&Zt.forEach(a,function(K,Q){typeof s=="undefined"&&Q.toLowerCase()==="content-type"?delete a[Q]:p.setRequestHeader(Q,K)}),Zt.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),u&&u!=="json"&&(p.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&p.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(o=function(H){!p||(n(!H||H&&H.type?new Nm("canceled"):H),p.abort(),p=null)},e.cancelToken&&e.cancelToken.subscribe(o),e.signal&&(e.signal.aborted?o():e.signal.addEventListener("abort",o))),s||(s=null),p.send(s)})}});var ei=g(($E,_a)=>{"use strict";var Me=Be(),va=Ys(),Um=en(),Dm=rn(),Fm={"Content-Type":"application/x-www-form-urlencoded"};function ya(r,e){!Me.isUndefined(r)&&Me.isUndefined(r["Content-Type"])&&(r["Content-Type"]=e)}function Bm(){var r;return typeof XMLHttpRequest!="undefined"?r=on():typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]"&&(r=on()),r}function km(r,e,t){if(Me.isString(r))try{return(e||JSON.parse)(r),Me.trim(r)}catch(i){if(i.name!=="SyntaxError")throw i}return(t||JSON.stringify)(r)}var Qt={transitional:Dm,adapter:Bm(),transformRequest:[function(e,t){return va(t,"Accept"),va(t,"Content-Type"),Me.isFormData(e)||Me.isArrayBuffer(e)||Me.isBuffer(e)||Me.isStream(e)||Me.isFile(e)||Me.isBlob(e)?e:Me.isArrayBufferView(e)?e.buffer:Me.isURLSearchParams(e)?(ya(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):Me.isObject(e)||t&&t["Content-Type"]==="application/json"?(ya(t,"application/json"),km(e)):e}],transformResponse:[function(e){var t=this.transitional||Qt.transitional,i=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,s=!i&&this.responseType==="json";if(s||n&&Me.isString(e)&&e.length)try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?Um(a,this,"E_JSON_PARSE"):a}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Me.forEach(["delete","get","head"],function(e){Qt.headers[e]={}});Me.forEach(["post","put","patch"],function(e){Qt.headers[e]=Me.merge(Fm)});_a.exports=Qt});var ba=g((zE,wa)=>{"use strict";var $m=Be(),zm=ei();wa.exports=function(e,t,i){var n=this||zm;return $m.forEach(i,function(a){e=a.call(n,e,t)}),e}});var un=g((WE,xa)=>{"use strict";xa.exports=function(e){return!!(e&&e.__CANCEL__)}});var Oa=g((HE,Aa)=>{"use strict";var Sa=Be(),fn=ba(),Wm=un(),Hm=ei(),Gm=_t();function cn(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new Gm("canceled")}Aa.exports=function(e){cn(e),e.headers=e.headers||{},e.data=fn.call(e,e.data,e.headers,e.transformRequest),e.headers=Sa.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Sa.forEach(["delete","get","head","post","put","patch","common"],function(n){delete e.headers[n]});var t=e.adapter||Hm.adapter;return t(e).then(function(n){return cn(e),n.data=fn.call(e,n.data,n.headers,e.transformResponse),n},function(n){return Wm(n)||(cn(e),n&&n.response&&(n.response.data=fn.call(e,n.response.data,n.response.headers,e.transformResponse))),Promise.reject(n)})}});var ln=g((GE,qa)=>{"use strict";var We=Be();qa.exports=function(e,t){t=t||{};var i={};function n(p,b){return We.isPlainObject(p)&&We.isPlainObject(b)?We.merge(p,b):We.isPlainObject(b)?We.merge({},b):We.isArray(b)?b.slice():b}function s(p){if(We.isUndefined(t[p])){if(!We.isUndefined(e[p]))return n(void 0,e[p])}else return n(e[p],t[p])}function a(p){if(!We.isUndefined(t[p]))return n(void 0,t[p])}function u(p){if(We.isUndefined(t[p])){if(!We.isUndefined(e[p]))return n(void 0,e[p])}else return n(void 0,t[p])}function o(p){if(p in t)return n(e[p],t[p]);if(p in e)return n(void 0,e[p])}var c={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:o};return We.forEach(Object.keys(e).concat(Object.keys(t)),function(b){var w=c[b]||s,q=w(b);We.isUndefined(q)&&w!==o||(i[b]=q)}),i}});var hn=g((KE,Ca)=>{Ca.exports={version:"0.26.1"}});var Ta=g((JE,Ia)=>{"use strict";var Km=hn().version,pn={};["object","boolean","number","function","string","symbol"].forEach(function(r,e){pn[r]=function(i){return typeof i===r||"a"+(e<1?"n ":" ")+r}});var Ea={};pn.transitional=function(e,t,i){function n(s,a){return"[Axios v"+Km+"] Transitional option '"+s+"'"+a+(i?". "+i:"")}return function(s,a,u){if(e===!1)throw new Error(n(a," has been removed"+(t?" in "+t:"")));return t&&!Ea[a]&&(Ea[a]=!0,console.warn(n(a," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(s,a,u):!0}};function Jm(r,e,t){if(typeof r!="object")throw new TypeError("options must be an object");for(var i=Object.keys(r),n=i.length;n-- >0;){var s=i[n],a=e[s];if(a){var u=r[s],o=u===void 0||a(u,s,r);if(o!==!0)throw new TypeError("option "+s+" must be "+o);continue}if(t!==!0)throw Error("Unknown option "+s)}}Ia.exports={assertOptions:Jm,validators:pn}});var Na=g((VE,ja)=>{"use strict";var Ra=Be(),Vm=Qi(),Pa=Js(),Ma=Oa(),ri=ln(),La=Ta(),Gr=La.validators;function wt(r){this.defaults=r,this.interceptors={request:new Pa,response:new Pa}}wt.prototype.request=function(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=ri(this.defaults,t),t.method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var i=t.transitional;i!==void 0&&La.assertOptions(i,{silentJSONParsing:Gr.transitional(Gr.boolean),forcedJSONParsing:Gr.transitional(Gr.boolean),clarifyTimeoutError:Gr.transitional(Gr.boolean)},!1);var n=[],s=!0;this.interceptors.request.forEach(function(q){typeof q.runWhen=="function"&&q.runWhen(t)===!1||(s=s&&q.synchronous,n.unshift(q.fulfilled,q.rejected))});var a=[];this.interceptors.response.forEach(function(q){a.push(q.fulfilled,q.rejected)});var u;if(!s){var o=[Ma,void 0];for(Array.prototype.unshift.apply(o,n),o=o.concat(a),u=Promise.resolve(t);o.length;)u=u.then(o.shift(),o.shift());return u}for(var c=t;n.length;){var p=n.shift(),b=n.shift();try{c=p(c)}catch(w){b(w);break}}try{u=Ma(c)}catch(w){return Promise.reject(w)}for(;a.length;)u=u.then(a.shift(),a.shift());return u};wt.prototype.getUri=function(e){return e=ri(this.defaults,e),Vm(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};Ra.forEach(["delete","get","head","options"],function(e){wt.prototype[e]=function(t,i){return this.request(ri(i||{},{method:e,url:t,data:(i||{}).data}))}});Ra.forEach(["post","put","patch"],function(e){wt.prototype[e]=function(t,i,n){return this.request(ri(n||{},{method:e,url:t,data:i}))}});ja.exports=wt});var Da=g((YE,Ua)=>{"use strict";var Ym=_t();function Kr(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(n){e=n});var t=this;this.promise.then(function(i){if(!!t._listeners){var n,s=t._listeners.length;for(n=0;n<s;n++)t._listeners[n](i);t._listeners=null}}),this.promise.then=function(i){var n,s=new Promise(function(a){t.subscribe(a),n=a}).then(i);return s.cancel=function(){t.unsubscribe(n)},s},r(function(n){t.reason||(t.reason=new Ym(n),e(t.reason))})}Kr.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};Kr.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]};Kr.prototype.unsubscribe=function(e){if(!!this._listeners){var t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}};Kr.source=function(){var e,t=new Kr(function(n){e=n});return{token:t,cancel:e}};Ua.exports=Kr});var Ba=g((XE,Fa)=>{"use strict";Fa.exports=function(e){return function(i){return e.apply(null,i)}}});var $a=g((ZE,ka)=>{"use strict";var Xm=Be();ka.exports=function(e){return Xm.isObject(e)&&e.isAxiosError===!0}});var Ha=g((QE,dn)=>{"use strict";var za=Be(),Zm=Ji(),ti=Na(),Qm=ln(),eg=ei();function Wa(r){var e=new ti(r),t=Zm(ti.prototype.request,e);return za.extend(t,ti.prototype,e),za.extend(t,e),t.create=function(n){return Wa(Qm(r,n))},t}var er=Wa(eg);er.Axios=ti;er.Cancel=_t();er.CancelToken=Da();er.isCancel=un();er.VERSION=hn().version;er.all=function(e){return Promise.all(e)};er.spread=Ba();er.isAxiosError=$a();dn.exports=er;dn.exports.default=er});var ii=g((eI,Ga)=>{Ga.exports=Ha()});var ke=g((rI,Ka)=>{var rg=Array.isArray;Ka.exports=rg});var mn=g((tI,Ja)=>{var tg=typeof global=="object"&&global&&global.Object===Object&&global;Ja.exports=tg});var Ve=g((iI,Va)=>{var ig=mn(),ng=typeof self=="object"&&self&&self.Object===Object&&self,sg=ig||ng||Function("return this")();Va.exports=sg});var Mr=g((nI,Ya)=>{var ag=Ve(),og=ag.Symbol;Ya.exports=og});var eo=g((sI,Qa)=>{var Xa=Mr(),Za=Object.prototype,ug=Za.hasOwnProperty,fg=Za.toString,bt=Xa?Xa.toStringTag:void 0;function cg(r){var e=ug.call(r,bt),t=r[bt];try{r[bt]=void 0;var i=!0}catch(s){}var n=fg.call(r);return i&&(e?r[bt]=t:delete r[bt]),n}Qa.exports=cg});var to=g((aI,ro)=>{var lg=Object.prototype,hg=lg.toString;function pg(r){return hg.call(r)}ro.exports=pg});var dr=g((oI,so)=>{var io=Mr(),dg=eo(),mg=to(),gg="[object Null]",vg="[object Undefined]",no=io?io.toStringTag:void 0;function yg(r){return r==null?r===void 0?vg:gg:no&&no in Object(r)?dg(r):mg(r)}so.exports=yg});var Ye=g((uI,ao)=>{function _g(r){return r!=null&&typeof r=="object"}ao.exports=_g});var ni=g((fI,oo)=>{var wg=dr(),bg=Ye(),xg="[object Symbol]";function Sg(r){return typeof r=="symbol"||bg(r)&&wg(r)==xg}oo.exports=Sg});var fo=g((cI,uo)=>{var Ag=ke(),Og=ni(),qg=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Cg=/^\w*$/;function Eg(r,e){if(Ag(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||Og(r)?!0:Cg.test(r)||!qg.test(r)||e!=null&&r in Object(e)}uo.exports=Eg});var Xe=g((lI,co)=>{function Ig(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}co.exports=Ig});var si=g((hI,lo)=>{var Tg=dr(),Pg=Xe(),Mg="[object AsyncFunction]",Rg="[object Function]",Lg="[object GeneratorFunction]",jg="[object Proxy]";function Ng(r){if(!Pg(r))return!1;var e=Tg(r);return e==Rg||e==Lg||e==Mg||e==jg}lo.exports=Ng});var po=g((pI,ho)=>{var Ug=Ve(),Dg=Ug["__core-js_shared__"];ho.exports=Dg});var vo=g((dI,go)=>{var gn=po(),mo=function(){var r=/[^.]+$/.exec(gn&&gn.keys&&gn.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function Fg(r){return!!mo&&mo in r}go.exports=Fg});var vn=g((mI,yo)=>{var Bg=Function.prototype,kg=Bg.toString;function $g(r){if(r!=null){try{return kg.call(r)}catch(e){}try{return r+""}catch(e){}}return""}yo.exports=$g});var wo=g((gI,_o)=>{var zg=si(),Wg=vo(),Hg=Xe(),Gg=vn(),Kg=/[\\^$.*+?()[\]{}|]/g,Jg=/^\[object .+?Constructor\]$/,Vg=Function.prototype,Yg=Object.prototype,Xg=Vg.toString,Zg=Yg.hasOwnProperty,Qg=RegExp("^"+Xg.call(Zg).replace(Kg,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ev(r){if(!Hg(r)||Wg(r))return!1;var e=zg(r)?Qg:Jg;return e.test(Gg(r))}_o.exports=ev});var xo=g((vI,bo)=>{function rv(r,e){return r==null?void 0:r[e]}bo.exports=rv});var mr=g((yI,So)=>{var tv=wo(),iv=xo();function nv(r,e){var t=iv(r,e);return tv(t)?t:void 0}So.exports=nv});var xt=g((_I,Ao)=>{var sv=mr(),av=sv(Object,"create");Ao.exports=av});var Co=g((wI,qo)=>{var Oo=xt();function ov(){this.__data__=Oo?Oo(null):{},this.size=0}qo.exports=ov});var Io=g((bI,Eo)=>{function uv(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}Eo.exports=uv});var Po=g((xI,To)=>{var fv=xt(),cv="__lodash_hash_undefined__",lv=Object.prototype,hv=lv.hasOwnProperty;function pv(r){var e=this.__data__;if(fv){var t=e[r];return t===cv?void 0:t}return hv.call(e,r)?e[r]:void 0}To.exports=pv});var Ro=g((SI,Mo)=>{var dv=xt(),mv=Object.prototype,gv=mv.hasOwnProperty;function vv(r){var e=this.__data__;return dv?e[r]!==void 0:gv.call(e,r)}Mo.exports=vv});var jo=g((AI,Lo)=>{var yv=xt(),_v="__lodash_hash_undefined__";function wv(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=yv&&e===void 0?_v:e,this}Lo.exports=wv});var Uo=g((OI,No)=>{var bv=Co(),xv=Io(),Sv=Po(),Av=Ro(),Ov=jo();function Jr(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var i=r[e];this.set(i[0],i[1])}}Jr.prototype.clear=bv;Jr.prototype.delete=xv;Jr.prototype.get=Sv;Jr.prototype.has=Av;Jr.prototype.set=Ov;No.exports=Jr});var Fo=g((qI,Do)=>{function qv(){this.__data__=[],this.size=0}Do.exports=qv});var Vr=g((CI,Bo)=>{function Cv(r,e){return r===e||r!==r&&e!==e}Bo.exports=Cv});var St=g((EI,ko)=>{var Ev=Vr();function Iv(r,e){for(var t=r.length;t--;)if(Ev(r[t][0],e))return t;return-1}ko.exports=Iv});var zo=g((II,$o)=>{var Tv=St(),Pv=Array.prototype,Mv=Pv.splice;function Rv(r){var e=this.__data__,t=Tv(e,r);if(t<0)return!1;var i=e.length-1;return t==i?e.pop():Mv.call(e,t,1),--this.size,!0}$o.exports=Rv});var Ho=g((TI,Wo)=>{var Lv=St();function jv(r){var e=this.__data__,t=Lv(e,r);return t<0?void 0:e[t][1]}Wo.exports=jv});var Ko=g((PI,Go)=>{var Nv=St();function Uv(r){return Nv(this.__data__,r)>-1}Go.exports=Uv});var Vo=g((MI,Jo)=>{var Dv=St();function Fv(r,e){var t=this.__data__,i=Dv(t,r);return i<0?(++this.size,t.push([r,e])):t[i][1]=e,this}Jo.exports=Fv});var At=g((RI,Yo)=>{var Bv=Fo(),kv=zo(),$v=Ho(),zv=Ko(),Wv=Vo();function Yr(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var i=r[e];this.set(i[0],i[1])}}Yr.prototype.clear=Bv;Yr.prototype.delete=kv;Yr.prototype.get=$v;Yr.prototype.has=zv;Yr.prototype.set=Wv;Yo.exports=Yr});var ai=g((LI,Xo)=>{var Hv=mr(),Gv=Ve(),Kv=Hv(Gv,"Map");Xo.exports=Kv});var eu=g((jI,Qo)=>{var Zo=Uo(),Jv=At(),Vv=ai();function Yv(){this.size=0,this.__data__={hash:new Zo,map:new(Vv||Jv),string:new Zo}}Qo.exports=Yv});var tu=g((NI,ru)=>{function Xv(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}ru.exports=Xv});var Ot=g((UI,iu)=>{var Zv=tu();function Qv(r,e){var t=r.__data__;return Zv(e)?t[typeof e=="string"?"string":"hash"]:t.map}iu.exports=Qv});var su=g((DI,nu)=>{var ey=Ot();function ry(r){var e=ey(this,r).delete(r);return this.size-=e?1:0,e}nu.exports=ry});var ou=g((FI,au)=>{var ty=Ot();function iy(r){return ty(this,r).get(r)}au.exports=iy});var fu=g((BI,uu)=>{var ny=Ot();function sy(r){return ny(this,r).has(r)}uu.exports=sy});var lu=g((kI,cu)=>{var ay=Ot();function oy(r,e){var t=ay(this,r),i=t.size;return t.set(r,e),this.size+=t.size==i?0:1,this}cu.exports=oy});var oi=g(($I,hu)=>{var uy=eu(),fy=su(),cy=ou(),ly=fu(),hy=lu();function Xr(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var i=r[e];this.set(i[0],i[1])}}Xr.prototype.clear=uy;Xr.prototype.delete=fy;Xr.prototype.get=cy;Xr.prototype.has=ly;Xr.prototype.set=hy;hu.exports=Xr});var mu=g((zI,du)=>{var pu=oi(),py="Expected a function";function yn(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(py);var t=function(){var i=arguments,n=e?e.apply(this,i):i[0],s=t.cache;if(s.has(n))return s.get(n);var a=r.apply(this,i);return t.cache=s.set(n,a)||s,a};return t.cache=new(yn.Cache||pu),t}yn.Cache=pu;du.exports=yn});var vu=g((WI,gu)=>{var dy=mu(),my=500;function gy(r){var e=dy(r,function(i){return t.size===my&&t.clear(),i}),t=e.cache;return e}gu.exports=gy});var _u=g((HI,yu)=>{var vy=vu(),yy=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,_y=/\\(\\)?/g,wy=vy(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(yy,function(t,i,n,s){e.push(n?s.replace(_y,"$1"):i||t)}),e});yu.exports=wy});var qt=g((GI,wu)=>{function by(r,e){for(var t=-1,i=r==null?0:r.length,n=Array(i);++t<i;)n[t]=e(r[t],t,r);return n}wu.exports=by});var qu=g((KI,Ou)=>{var bu=Mr(),xy=qt(),Sy=ke(),Ay=ni(),Oy=1/0,xu=bu?bu.prototype:void 0,Su=xu?xu.toString:void 0;function Au(r){if(typeof r=="string")return r;if(Sy(r))return xy(r,Au)+"";if(Ay(r))return Su?Su.call(r):"";var e=r+"";return e=="0"&&1/r==-Oy?"-0":e}Ou.exports=Au});var Eu=g((JI,Cu)=>{var qy=qu();function Cy(r){return r==null?"":qy(r)}Cu.exports=Cy});var Ct=g((VI,Iu)=>{var Ey=ke(),Iy=fo(),Ty=_u(),Py=Eu();function My(r,e){return Ey(r)?r:Iy(r,e)?[r]:Ty(Py(r))}Iu.exports=My});var ui=g((YI,Tu)=>{var Ry=ni(),Ly=1/0;function jy(r){if(typeof r=="string"||Ry(r))return r;var e=r+"";return e=="0"&&1/r==-Ly?"-0":e}Tu.exports=jy});var _n=g((XI,Pu)=>{var Ny=Ct(),Uy=ui();function Dy(r,e){e=Ny(e,r);for(var t=0,i=e.length;r!=null&&t<i;)r=r[Uy(e[t++])];return t&&t==i?r:void 0}Pu.exports=Dy});var Ru=g((ZI,Mu)=>{var Fy=_n();function By(r,e,t){var i=r==null?void 0:Fy(r,e);return i===void 0?t:i}Mu.exports=By});var wn=g((QI,Lu)=>{var ky=mr(),$y=function(){try{var r=ky(Object,"defineProperty");return r({},"",{}),r}catch(e){}}();Lu.exports=$y});var fi=g((eT,Nu)=>{var ju=wn();function zy(r,e,t){e=="__proto__"&&ju?ju(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}Nu.exports=zy});var ci=g((rT,Uu)=>{var Wy=fi(),Hy=Vr(),Gy=Object.prototype,Ky=Gy.hasOwnProperty;function Jy(r,e,t){var i=r[e];(!(Ky.call(r,e)&&Hy(i,t))||t===void 0&&!(e in r))&&Wy(r,e,t)}Uu.exports=Jy});var li=g((tT,Du)=>{var Vy=9007199254740991,Yy=/^(?:0|[1-9]\d*)$/;function Xy(r,e){var t=typeof r;return e=e==null?Vy:e,!!e&&(t=="number"||t!="symbol"&&Yy.test(r))&&r>-1&&r%1==0&&r<e}Du.exports=Xy});var ku=g((iT,Bu)=>{var Zy=ci(),Qy=Ct(),e_=li(),Fu=Xe(),r_=ui();function t_(r,e,t,i){if(!Fu(r))return r;e=Qy(e,r);for(var n=-1,s=e.length,a=s-1,u=r;u!=null&&++n<s;){var o=r_(e[n]),c=t;if(o==="__proto__"||o==="constructor"||o==="prototype")return r;if(n!=a){var p=u[o];c=i?i(p,o,u):void 0,c===void 0&&(c=Fu(p)?p:e_(e[n+1])?[]:{})}Zy(u,o,c),u=u[o]}return r}Bu.exports=t_});var zu=g((nT,$u)=>{var i_=ku();function n_(r,e,t){return r==null?r:i_(r,e,t)}$u.exports=n_});var Hu=g((sT,Wu)=>{var s_="__lodash_hash_undefined__";function a_(r){return this.__data__.set(r,s_),this}Wu.exports=a_});var Ku=g((aT,Gu)=>{function o_(r){return this.__data__.has(r)}Gu.exports=o_});var pi=g((oT,Ju)=>{var u_=oi(),f_=Hu(),c_=Ku();function hi(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new u_;++e<t;)this.add(r[e])}hi.prototype.add=hi.prototype.push=f_;hi.prototype.has=c_;Ju.exports=hi});var Yu=g((uT,Vu)=>{function l_(r,e,t,i){for(var n=r.length,s=t+(i?1:-1);i?s--:++s<n;)if(e(r[s],s,r))return s;return-1}Vu.exports=l_});var Zu=g((fT,Xu)=>{function h_(r){return r!==r}Xu.exports=h_});var ef=g((cT,Qu)=>{function p_(r,e,t){for(var i=t-1,n=r.length;++i<n;)if(r[i]===e)return i;return-1}Qu.exports=p_});var tf=g((lT,rf)=>{var d_=Yu(),m_=Zu(),g_=ef();function v_(r,e,t){return e===e?g_(r,e,t):d_(r,m_,t)}rf.exports=v_});var bn=g((hT,nf)=>{var y_=tf();function __(r,e){var t=r==null?0:r.length;return!!t&&y_(r,e,0)>-1}nf.exports=__});var xn=g((pT,sf)=>{function w_(r,e,t){for(var i=-1,n=r==null?0:r.length;++i<n;)if(t(e,r[i]))return!0;return!1}sf.exports=w_});var di=g((dT,af)=>{function b_(r,e){return r.has(e)}af.exports=b_});var Sn=g((mT,of)=>{var x_=mr(),S_=Ve(),A_=x_(S_,"Set");of.exports=A_});var ff=g((gT,uf)=>{function O_(){}uf.exports=O_});var mi=g((vT,cf)=>{function q_(r){var e=-1,t=Array(r.size);return r.forEach(function(i){t[++e]=i}),t}cf.exports=q_});var hf=g((yT,lf)=>{var An=Sn(),C_=ff(),E_=mi(),I_=1/0,T_=An&&1/E_(new An([,-0]))[1]==I_?function(r){return new An(r)}:C_;lf.exports=T_});var On=g((_T,pf)=>{var P_=pi(),M_=bn(),R_=xn(),L_=di(),j_=hf(),N_=mi(),U_=200;function D_(r,e,t){var i=-1,n=M_,s=r.length,a=!0,u=[],o=u;if(t)a=!1,n=R_;else if(s>=U_){var c=e?null:j_(r);if(c)return N_(c);a=!1,n=L_,o=new P_}else o=e?[]:u;e:for(;++i<s;){var p=r[i],b=e?e(p):p;if(p=t||p!==0?p:0,a&&b===b){for(var w=o.length;w--;)if(o[w]===b)continue e;e&&o.push(b),u.push(p)}else n(o,b,t)||(o!==u&&o.push(b),u.push(p))}return u}pf.exports=D_});var mf=g((wT,df)=>{var F_=On();function B_(r){return r&&r.length?F_(r):[]}df.exports=B_});var Et=g((bT,gf)=>{function k_(r){return function(e){return r(e)}}gf.exports=k_});var _f=g((xT,yf)=>{var $_=pi(),z_=bn(),W_=xn(),H_=qt(),G_=Et(),vf=di(),K_=Math.min;function J_(r,e,t){for(var i=t?W_:z_,n=r[0].length,s=r.length,a=s,u=Array(s),o=1/0,c=[];a--;){var p=r[a];a&&e&&(p=H_(p,G_(e))),o=K_(p.length,o),u[a]=!t&&(e||n>=120&&p.length>=120)?new $_(a&&p):void 0}p=r[0];var b=-1,w=u[0];e:for(;++b<n&&c.length<o;){var q=p[b],y=e?e(q):q;if(q=t||q!==0?q:0,!(w?vf(w,y):i(c,y,t))){for(a=s;--a;){var P=u[a];if(!(P?vf(P,y):i(r[a],y,t)))continue e}w&&w.push(y),c.push(q)}}return c}yf.exports=J_});var gi=g((ST,wf)=>{function V_(r){return r}wf.exports=V_});var xf=g((AT,bf)=>{function Y_(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}bf.exports=Y_});var qn=g((OT,Af)=>{var X_=xf(),Sf=Math.max;function Z_(r,e,t){return e=Sf(e===void 0?r.length-1:e,0),function(){for(var i=arguments,n=-1,s=Sf(i.length-e,0),a=Array(s);++n<s;)a[n]=i[e+n];n=-1;for(var u=Array(e+1);++n<e;)u[n]=i[n];return u[e]=t(a),X_(r,this,u)}}Af.exports=Z_});var qf=g((qT,Of)=>{function Q_(r){return function(){return r}}Of.exports=Q_});var If=g((CT,Ef)=>{var ew=qf(),Cf=wn(),rw=gi(),tw=Cf?function(r,e){return Cf(r,"toString",{configurable:!0,enumerable:!1,value:ew(e),writable:!0})}:rw;Ef.exports=tw});var Pf=g((ET,Tf)=>{var iw=800,nw=16,sw=Date.now;function aw(r){var e=0,t=0;return function(){var i=sw(),n=nw-(i-t);if(t=i,n>0){if(++e>=iw)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}Tf.exports=aw});var Cn=g((IT,Mf)=>{var ow=If(),uw=Pf(),fw=uw(ow);Mf.exports=fw});var vi=g((TT,Rf)=>{var cw=gi(),lw=qn(),hw=Cn();function pw(r,e){return hw(lw(r,e,cw),r+"")}Rf.exports=pw});var En=g((PT,Lf)=>{var dw=9007199254740991;function mw(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=dw}Lf.exports=mw});var Zr=g((MT,jf)=>{var gw=si(),vw=En();function yw(r){return r!=null&&vw(r.length)&&!gw(r)}jf.exports=yw});var yi=g((RT,Nf)=>{var _w=Zr(),ww=Ye();function bw(r){return ww(r)&&_w(r)}Nf.exports=bw});var Df=g((LT,Uf)=>{var xw=yi();function Sw(r){return xw(r)?r:[]}Uf.exports=Sw});var Bf=g((jT,Ff)=>{var Aw=qt(),Ow=_f(),qw=vi(),Cw=Df(),Ew=qw(function(r){var e=Aw(r,Cw);return e.length&&e[0]===r[0]?Ow(e):[]});Ff.exports=Ew});var It=g((NT,kf)=>{function Iw(r,e){for(var t=-1,i=e.length,n=r.length;++t<i;)r[n+t]=e[t];return r}kf.exports=Iw});var zf=g((UT,$f)=>{var Tw=dr(),Pw=Ye(),Mw="[object Arguments]";function Rw(r){return Pw(r)&&Tw(r)==Mw}$f.exports=Rw});var Tt=g((DT,Gf)=>{var Wf=zf(),Lw=Ye(),Hf=Object.prototype,jw=Hf.hasOwnProperty,Nw=Hf.propertyIsEnumerable,Uw=Wf(function(){return arguments}())?Wf:function(r){return Lw(r)&&jw.call(r,"callee")&&!Nw.call(r,"callee")};Gf.exports=Uw});var Yf=g((FT,Vf)=>{var Kf=Mr(),Dw=Tt(),Fw=ke(),Jf=Kf?Kf.isConcatSpreadable:void 0;function Bw(r){return Fw(r)||Dw(r)||!!(Jf&&r&&r[Jf])}Vf.exports=Bw});var _i=g((BT,Zf)=>{var kw=It(),$w=Yf();function Xf(r,e,t,i,n){var s=-1,a=r.length;for(t||(t=$w),n||(n=[]);++s<a;){var u=r[s];e>0&&t(u)?e>1?Xf(u,e-1,t,i,n):kw(n,u):i||(n[n.length]=u)}return n}Zf.exports=Xf});var ec=g((kT,Qf)=>{var zw=_i(),Ww=vi(),Hw=On(),Gw=yi(),Kw=Ww(function(r){return Hw(zw(r,1,Gw,!0))});Qf.exports=Kw});var tc=g(($T,rc)=>{function Jw(r){return function(e,t,i){for(var n=-1,s=Object(e),a=i(e),u=a.length;u--;){var o=a[r?u:++n];if(t(s[o],o,s)===!1)break}return e}}rc.exports=Jw});var In=g((zT,ic)=>{var Vw=tc(),Yw=Vw();ic.exports=Yw});var sc=g((WT,nc)=>{function Xw(r,e){for(var t=-1,i=Array(r);++t<r;)i[t]=e(t);return i}nc.exports=Xw});var oc=g((HT,ac)=>{function Zw(){return!1}ac.exports=Zw});var et=g((Pt,Qr)=>{var Qw=Ve(),eb=oc(),cc=typeof Pt=="object"&&Pt&&!Pt.nodeType&&Pt,uc=cc&&typeof Qr=="object"&&Qr&&!Qr.nodeType&&Qr,rb=uc&&uc.exports===cc,fc=rb?Qw.Buffer:void 0,tb=fc?fc.isBuffer:void 0,ib=tb||eb;Qr.exports=ib});var hc=g((GT,lc)=>{var nb=dr(),sb=En(),ab=Ye(),ob="[object Arguments]",ub="[object Array]",fb="[object Boolean]",cb="[object Date]",lb="[object Error]",hb="[object Function]",pb="[object Map]",db="[object Number]",mb="[object Object]",gb="[object RegExp]",vb="[object Set]",yb="[object String]",_b="[object WeakMap]",wb="[object ArrayBuffer]",bb="[object DataView]",xb="[object Float32Array]",Sb="[object Float64Array]",Ab="[object Int8Array]",Ob="[object Int16Array]",qb="[object Int32Array]",Cb="[object Uint8Array]",Eb="[object Uint8ClampedArray]",Ib="[object Uint16Array]",Tb="[object Uint32Array]",we={};we[xb]=we[Sb]=we[Ab]=we[Ob]=we[qb]=we[Cb]=we[Eb]=we[Ib]=we[Tb]=!0;we[ob]=we[ub]=we[wb]=we[fb]=we[bb]=we[cb]=we[lb]=we[hb]=we[pb]=we[db]=we[mb]=we[gb]=we[vb]=we[yb]=we[_b]=!1;function Pb(r){return ab(r)&&sb(r.length)&&!!we[nb(r)]}lc.exports=Pb});var wi=g((Mt,rt)=>{var Mb=mn(),pc=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,Rt=pc&&typeof rt=="object"&&rt&&!rt.nodeType&&rt,Rb=Rt&&Rt.exports===pc,Tn=Rb&&Mb.process,Lb=function(){try{var r=Rt&&Rt.require&&Rt.require("util").types;return r||Tn&&Tn.binding&&Tn.binding("util")}catch(e){}}();rt.exports=Lb});var Lt=g((KT,gc)=>{var jb=hc(),Nb=Et(),dc=wi(),mc=dc&&dc.isTypedArray,Ub=mc?Nb(mc):jb;gc.exports=Ub});var Pn=g((JT,vc)=>{var Db=sc(),Fb=Tt(),Bb=ke(),kb=et(),$b=li(),zb=Lt(),Wb=Object.prototype,Hb=Wb.hasOwnProperty;function Gb(r,e){var t=Bb(r),i=!t&&Fb(r),n=!t&&!i&&kb(r),s=!t&&!i&&!n&&zb(r),a=t||i||n||s,u=a?Db(r.length,String):[],o=u.length;for(var c in r)(e||Hb.call(r,c))&&!(a&&(c=="length"||n&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||$b(c,o)))&&u.push(c);return u}vc.exports=Gb});var jt=g((VT,yc)=>{var Kb=Object.prototype;function Jb(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||Kb;return r===t}yc.exports=Jb});var Mn=g((YT,_c)=>{function Vb(r,e){return function(t){return r(e(t))}}_c.exports=Vb});var bc=g((XT,wc)=>{var Yb=Mn(),Xb=Yb(Object.keys,Object);wc.exports=Xb});var Rn=g((ZT,xc)=>{var Zb=jt(),Qb=bc(),e0=Object.prototype,r0=e0.hasOwnProperty;function t0(r){if(!Zb(r))return Qb(r);var e=[];for(var t in Object(r))r0.call(r,t)&&t!="constructor"&&e.push(t);return e}xc.exports=t0});var Nt=g((QT,Sc)=>{var i0=Pn(),n0=Rn(),s0=Zr();function a0(r){return s0(r)?i0(r):n0(r)}Sc.exports=a0});var Oc=g((e1,Ac)=>{var o0=In(),u0=Nt();function f0(r,e){return r&&o0(r,e,u0)}Ac.exports=f0});var Cc=g((r1,qc)=>{var c0=gi();function l0(r){return typeof r=="function"?r:c0}qc.exports=l0});var Ic=g((t1,Ec)=>{var h0=Oc(),p0=Cc();function d0(r,e){return r&&h0(r,p0(e))}Ec.exports=d0});var Pc=g((i1,Tc)=>{var m0=dr(),g0=ke(),v0=Ye(),y0="[object String]";function _0(r){return typeof r=="string"||!g0(r)&&v0(r)&&m0(r)==y0}Tc.exports=_0});var Rc=g((n1,Mc)=>{var w0=mr(),b0=Ve(),x0=w0(b0,"DataView");Mc.exports=x0});var jc=g((s1,Lc)=>{var S0=mr(),A0=Ve(),O0=S0(A0,"Promise");Lc.exports=O0});var Uc=g((a1,Nc)=>{var q0=mr(),C0=Ve(),E0=q0(C0,"WeakMap");Nc.exports=E0});var it=g((o1,Wc)=>{var Ln=Rc(),jn=ai(),Nn=jc(),Un=Sn(),Dn=Uc(),zc=dr(),tt=vn(),Dc="[object Map]",I0="[object Object]",Fc="[object Promise]",Bc="[object Set]",kc="[object WeakMap]",$c="[object DataView]",T0=tt(Ln),P0=tt(jn),M0=tt(Nn),R0=tt(Un),L0=tt(Dn),Rr=zc;(Ln&&Rr(new Ln(new ArrayBuffer(1)))!=$c||jn&&Rr(new jn)!=Dc||Nn&&Rr(Nn.resolve())!=Fc||Un&&Rr(new Un)!=Bc||Dn&&Rr(new Dn)!=kc)&&(Rr=function(r){var e=zc(r),t=e==I0?r.constructor:void 0,i=t?tt(t):"";if(i)switch(i){case T0:return $c;case P0:return Dc;case M0:return Fc;case R0:return Bc;case L0:return kc}return e});Wc.exports=Rr});var Gc=g((u1,Hc)=>{var j0=Rn(),N0=it(),U0=Tt(),D0=ke(),F0=Zr(),B0=et(),k0=jt(),$0=Lt(),z0="[object Map]",W0="[object Set]",H0=Object.prototype,G0=H0.hasOwnProperty;function K0(r){if(r==null)return!0;if(F0(r)&&(D0(r)||typeof r=="string"||typeof r.splice=="function"||B0(r)||$0(r)||U0(r)))return!r.length;var e=N0(r);if(e==z0||e==W0)return!r.size;if(k0(r))return!j0(r).length;for(var t in r)if(G0.call(r,t))return!1;return!0}Hc.exports=K0});var Jc=g((f1,Kc)=>{var J0=At();function V0(){this.__data__=new J0,this.size=0}Kc.exports=V0});var Yc=g((c1,Vc)=>{function Y0(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}Vc.exports=Y0});var Zc=g((l1,Xc)=>{function X0(r){return this.__data__.get(r)}Xc.exports=X0});var el=g((h1,Qc)=>{function Z0(r){return this.__data__.has(r)}Qc.exports=Z0});var tl=g((p1,rl)=>{var Q0=At(),ex=ai(),rx=oi(),tx=200;function ix(r,e){var t=this.__data__;if(t instanceof Q0){var i=t.__data__;if(!ex||i.length<tx-1)return i.push([r,e]),this.size=++t.size,this;t=this.__data__=new rx(i)}return t.set(r,e),this.size=t.size,this}rl.exports=ix});var bi=g((d1,il)=>{var nx=At(),sx=Jc(),ax=Yc(),ox=Zc(),ux=el(),fx=tl();function nt(r){var e=this.__data__=new nx(r);this.size=e.size}nt.prototype.clear=sx;nt.prototype.delete=ax;nt.prototype.get=ox;nt.prototype.has=ux;nt.prototype.set=fx;il.exports=nt});var sl=g((m1,nl)=>{function cx(r,e){for(var t=-1,i=r==null?0:r.length;++t<i;)if(e(r[t],t,r))return!0;return!1}nl.exports=cx});var Fn=g((g1,al)=>{var lx=pi(),hx=sl(),px=di(),dx=1,mx=2;function gx(r,e,t,i,n,s){var a=t&dx,u=r.length,o=e.length;if(u!=o&&!(a&&o>u))return!1;var c=s.get(r),p=s.get(e);if(c&&p)return c==e&&p==r;var b=-1,w=!0,q=t&mx?new lx:void 0;for(s.set(r,e),s.set(e,r);++b<u;){var y=r[b],P=e[b];if(i)var H=a?i(P,y,b,e,r,s):i(y,P,b,r,e,s);if(H!==void 0){if(H)continue;w=!1;break}if(q){if(!hx(e,function(K,Q){if(!px(q,Q)&&(y===K||n(y,K,t,i,s)))return q.push(Q)})){w=!1;break}}else if(!(y===P||n(y,P,t,i,s))){w=!1;break}}return s.delete(r),s.delete(e),w}al.exports=gx});var Bn=g((v1,ol)=>{var vx=Ve(),yx=vx.Uint8Array;ol.exports=yx});var fl=g((y1,ul)=>{function _x(r){var e=-1,t=Array(r.size);return r.forEach(function(i,n){t[++e]=[n,i]}),t}ul.exports=_x});var dl=g((_1,pl)=>{var cl=Mr(),ll=Bn(),wx=Vr(),bx=Fn(),xx=fl(),Sx=mi(),Ax=1,Ox=2,qx="[object Boolean]",Cx="[object Date]",Ex="[object Error]",Ix="[object Map]",Tx="[object Number]",Px="[object RegExp]",Mx="[object Set]",Rx="[object String]",Lx="[object Symbol]",jx="[object ArrayBuffer]",Nx="[object DataView]",hl=cl?cl.prototype:void 0,kn=hl?hl.valueOf:void 0;function Ux(r,e,t,i,n,s,a){switch(t){case Nx:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case jx:return!(r.byteLength!=e.byteLength||!s(new ll(r),new ll(e)));case qx:case Cx:case Tx:return wx(+r,+e);case Ex:return r.name==e.name&&r.message==e.message;case Px:case Rx:return r==e+"";case Ix:var u=xx;case Mx:var o=i&Ax;if(u||(u=Sx),r.size!=e.size&&!o)return!1;var c=a.get(r);if(c)return c==e;i|=Ox,a.set(r,e);var p=bx(u(r),u(e),i,n,s,a);return a.delete(r),p;case Lx:if(kn)return kn.call(r)==kn.call(e)}return!1}pl.exports=Ux});var $n=g((w1,ml)=>{var Dx=It(),Fx=ke();function Bx(r,e,t){var i=e(r);return Fx(r)?i:Dx(i,t(r))}ml.exports=Bx});var vl=g((b1,gl)=>{function kx(r,e){for(var t=-1,i=r==null?0:r.length,n=0,s=[];++t<i;){var a=r[t];e(a,t,r)&&(s[n++]=a)}return s}gl.exports=kx});var zn=g((x1,yl)=>{function $x(){return[]}yl.exports=$x});var xi=g((S1,wl)=>{var zx=vl(),Wx=zn(),Hx=Object.prototype,Gx=Hx.propertyIsEnumerable,_l=Object.getOwnPropertySymbols,Kx=_l?function(r){return r==null?[]:(r=Object(r),zx(_l(r),function(e){return Gx.call(r,e)}))}:Wx;wl.exports=Kx});var Wn=g((A1,bl)=>{var Jx=$n(),Vx=xi(),Yx=Nt();function Xx(r){return Jx(r,Yx,Vx)}bl.exports=Xx});var Al=g((O1,Sl)=>{var xl=Wn(),Zx=1,Qx=Object.prototype,eS=Qx.hasOwnProperty;function rS(r,e,t,i,n,s){var a=t&Zx,u=xl(r),o=u.length,c=xl(e),p=c.length;if(o!=p&&!a)return!1;for(var b=o;b--;){var w=u[b];if(!(a?w in e:eS.call(e,w)))return!1}var q=s.get(r),y=s.get(e);if(q&&y)return q==e&&y==r;var P=!0;s.set(r,e),s.set(e,r);for(var H=a;++b<o;){w=u[b];var K=r[w],Q=e[w];if(i)var F=a?i(Q,K,w,e,r,s):i(K,Q,w,r,e,s);if(!(F===void 0?K===Q||n(K,Q,t,i,s):F)){P=!1;break}H||(H=w=="constructor")}if(P&&!H){var Z=r.constructor,te=e.constructor;Z!=te&&"constructor"in r&&"constructor"in e&&!(typeof Z=="function"&&Z instanceof Z&&typeof te=="function"&&te instanceof te)&&(P=!1)}return s.delete(r),s.delete(e),P}Sl.exports=rS});var Ml=g((q1,Pl)=>{var Hn=bi(),tS=Fn(),iS=dl(),nS=Al(),Ol=it(),ql=ke(),Cl=et(),sS=Lt(),aS=1,El="[object Arguments]",Il="[object Array]",Si="[object Object]",oS=Object.prototype,Tl=oS.hasOwnProperty;function uS(r,e,t,i,n,s){var a=ql(r),u=ql(e),o=a?Il:Ol(r),c=u?Il:Ol(e);o=o==El?Si:o,c=c==El?Si:c;var p=o==Si,b=c==Si,w=o==c;if(w&&Cl(r)){if(!Cl(e))return!1;a=!0,p=!1}if(w&&!p)return s||(s=new Hn),a||sS(r)?tS(r,e,t,i,n,s):iS(r,e,o,t,i,n,s);if(!(t&aS)){var q=p&&Tl.call(r,"__wrapped__"),y=b&&Tl.call(e,"__wrapped__");if(q||y){var P=q?r.value():r,H=y?e.value():e;return s||(s=new Hn),n(P,H,t,i,s)}}return w?(s||(s=new Hn),nS(r,e,t,i,n,s)):!1}Pl.exports=uS});var Nl=g((C1,jl)=>{var fS=Ml(),Rl=Ye();function Ll(r,e,t,i,n){return r===e?!0:r==null||e==null||!Rl(r)&&!Rl(e)?r!==r&&e!==e:fS(r,e,t,i,Ll,n)}jl.exports=Ll});var Dl=g((E1,Ul)=>{var cS=Nl();function lS(r,e){return cS(r,e)}Ul.exports=lS});var Gn=g((I1,Fl)=>{var hS=fi(),pS=Vr();function dS(r,e,t){(t!==void 0&&!pS(r[e],t)||t===void 0&&!(e in r))&&hS(r,e,t)}Fl.exports=dS});var Kn=g((Ut,st)=>{var mS=Ve(),zl=typeof Ut=="object"&&Ut&&!Ut.nodeType&&Ut,Bl=zl&&typeof st=="object"&&st&&!st.nodeType&&st,gS=Bl&&Bl.exports===zl,kl=gS?mS.Buffer:void 0,$l=kl?kl.allocUnsafe:void 0;function vS(r,e){if(e)return r.slice();var t=r.length,i=$l?$l(t):new r.constructor(t);return r.copy(i),i}st.exports=vS});var Ai=g((T1,Hl)=>{var Wl=Bn();function yS(r){var e=new r.constructor(r.byteLength);return new Wl(e).set(new Wl(r)),e}Hl.exports=yS});var Jn=g((P1,Gl)=>{var _S=Ai();function wS(r,e){var t=e?_S(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}Gl.exports=wS});var Oi=g((M1,Kl)=>{function bS(r,e){var t=-1,i=r.length;for(e||(e=Array(i));++t<i;)e[t]=r[t];return e}Kl.exports=bS});var Yl=g((R1,Vl)=>{var xS=Xe(),Jl=Object.create,SS=function(){function r(){}return function(e){if(!xS(e))return{};if(Jl)return Jl(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}();Vl.exports=SS});var qi=g((L1,Xl)=>{var AS=Mn(),OS=AS(Object.getPrototypeOf,Object);Xl.exports=OS});var Vn=g((j1,Zl)=>{var qS=Yl(),CS=qi(),ES=jt();function IS(r){return typeof r.constructor=="function"&&!ES(r)?qS(CS(r)):{}}Zl.exports=IS});var Yn=g((N1,eh)=>{var TS=dr(),PS=qi(),MS=Ye(),RS="[object Object]",LS=Function.prototype,jS=Object.prototype,Ql=LS.toString,NS=jS.hasOwnProperty,US=Ql.call(Object);function DS(r){if(!MS(r)||TS(r)!=RS)return!1;var e=PS(r);if(e===null)return!0;var t=NS.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Ql.call(t)==US}eh.exports=DS});var Xn=g((U1,rh)=>{function FS(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}rh.exports=FS});var Lr=g((D1,th)=>{var BS=ci(),kS=fi();function $S(r,e,t,i){var n=!t;t||(t={});for(var s=-1,a=e.length;++s<a;){var u=e[s],o=i?i(t[u],r[u],u,t,r):void 0;o===void 0&&(o=r[u]),n?kS(t,u,o):BS(t,u,o)}return t}th.exports=$S});var nh=g((F1,ih)=>{function zS(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}ih.exports=zS});var ah=g((B1,sh)=>{var WS=Xe(),HS=jt(),GS=nh(),KS=Object.prototype,JS=KS.hasOwnProperty;function VS(r){if(!WS(r))return GS(r);var e=HS(r),t=[];for(var i in r)i=="constructor"&&(e||!JS.call(r,i))||t.push(i);return t}sh.exports=VS});var at=g((k1,oh)=>{var YS=Pn(),XS=ah(),ZS=Zr();function QS(r){return ZS(r)?YS(r,!0):XS(r)}oh.exports=QS});var fh=g(($1,uh)=>{var eA=Lr(),rA=at();function tA(r){return eA(r,rA(r))}uh.exports=tA});var mh=g((z1,dh)=>{var ch=Gn(),iA=Kn(),nA=Jn(),sA=Oi(),aA=Vn(),lh=Tt(),hh=ke(),oA=yi(),uA=et(),fA=si(),cA=Xe(),lA=Yn(),hA=Lt(),ph=Xn(),pA=fh();function dA(r,e,t,i,n,s,a){var u=ph(r,t),o=ph(e,t),c=a.get(o);if(c){ch(r,t,c);return}var p=s?s(u,o,t+"",r,e,a):void 0,b=p===void 0;if(b){var w=hh(o),q=!w&&uA(o),y=!w&&!q&&hA(o);p=o,w||q||y?hh(u)?p=u:oA(u)?p=sA(u):q?(b=!1,p=iA(o,!0)):y?(b=!1,p=nA(o,!0)):p=[]:lA(o)||lh(o)?(p=u,lh(u)?p=pA(u):(!cA(u)||fA(u))&&(p=aA(o))):b=!1}b&&(a.set(o,p),n(p,o,i,s,a),a.delete(o)),ch(r,t,p)}dh.exports=dA});var yh=g((W1,vh)=>{var mA=bi(),gA=Gn(),vA=In(),yA=mh(),_A=Xe(),wA=at(),bA=Xn();function gh(r,e,t,i,n){r!==e&&vA(e,function(s,a){if(n||(n=new mA),_A(s))yA(r,e,a,t,gh,i,n);else{var u=i?i(bA(r,a),s,a+"",r,e,n):void 0;u===void 0&&(u=s),gA(r,a,u)}},wA)}vh.exports=gh});var wh=g((H1,_h)=>{var xA=Vr(),SA=Zr(),AA=li(),OA=Xe();function qA(r,e,t){if(!OA(t))return!1;var i=typeof e;return(i=="number"?SA(t)&&AA(e,t.length):i=="string"&&e in t)?xA(t[e],r):!1}_h.exports=qA});var xh=g((G1,bh)=>{var CA=vi(),EA=wh();function IA(r){return CA(function(e,t){var i=-1,n=t.length,s=n>1?t[n-1]:void 0,a=n>2?t[2]:void 0;for(s=r.length>3&&typeof s=="function"?(n--,s):void 0,a&&EA(t[0],t[1],a)&&(s=n<3?void 0:s,n=1),e=Object(e);++i<n;){var u=t[i];u&&r(e,u,i,s)}return e})}bh.exports=IA});var Ah=g((K1,Sh)=>{var TA=yh(),PA=xh(),MA=PA(function(r,e,t){TA(r,e,t)});Sh.exports=MA});var Zn=g((J1,Oh)=>{function RA(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}Oh.exports=RA});var Ch=g((V1,qh)=>{function LA(r,e){for(var t=-1,i=r==null?0:r.length;++t<i&&e(r[t],t,r)!==!1;);return r}qh.exports=LA});var Ih=g((Y1,Eh)=>{var jA=Lr(),NA=Nt();function UA(r,e){return r&&jA(e,NA(e),r)}Eh.exports=UA});var Ph=g((X1,Th)=>{var DA=Lr(),FA=at();function BA(r,e){return r&&DA(e,FA(e),r)}Th.exports=BA});var Rh=g((Z1,Mh)=>{var kA=Lr(),$A=xi();function zA(r,e){return kA(r,$A(r),e)}Mh.exports=zA});var Qn=g((Q1,Lh)=>{var WA=It(),HA=qi(),GA=xi(),KA=zn(),JA=Object.getOwnPropertySymbols,VA=JA?function(r){for(var e=[];r;)WA(e,GA(r)),r=HA(r);return e}:KA;Lh.exports=VA});var Nh=g((eP,jh)=>{var YA=Lr(),XA=Qn();function ZA(r,e){return YA(r,XA(r),e)}jh.exports=ZA});var es=g((rP,Uh)=>{var QA=$n(),eO=Qn(),rO=at();function tO(r){return QA(r,rO,eO)}Uh.exports=tO});var Fh=g((tP,Dh)=>{var iO=Object.prototype,nO=iO.hasOwnProperty;function sO(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&nO.call(r,"index")&&(t.index=r.index,t.input=r.input),t}Dh.exports=sO});var kh=g((iP,Bh)=>{var aO=Ai();function oO(r,e){var t=e?aO(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}Bh.exports=oO});var zh=g((nP,$h)=>{var uO=/\w*$/;function fO(r){var e=new r.constructor(r.source,uO.exec(r));return e.lastIndex=r.lastIndex,e}$h.exports=fO});var Jh=g((sP,Kh)=>{var Wh=Mr(),Hh=Wh?Wh.prototype:void 0,Gh=Hh?Hh.valueOf:void 0;function cO(r){return Gh?Object(Gh.call(r)):{}}Kh.exports=cO});var Yh=g((aP,Vh)=>{var lO=Ai(),hO=kh(),pO=zh(),dO=Jh(),mO=Jn(),gO="[object Boolean]",vO="[object Date]",yO="[object Map]",_O="[object Number]",wO="[object RegExp]",bO="[object Set]",xO="[object String]",SO="[object Symbol]",AO="[object ArrayBuffer]",OO="[object DataView]",qO="[object Float32Array]",CO="[object Float64Array]",EO="[object Int8Array]",IO="[object Int16Array]",TO="[object Int32Array]",PO="[object Uint8Array]",MO="[object Uint8ClampedArray]",RO="[object Uint16Array]",LO="[object Uint32Array]";function jO(r,e,t){var i=r.constructor;switch(e){case AO:return lO(r);case gO:case vO:return new i(+r);case OO:return hO(r,t);case qO:case CO:case EO:case IO:case TO:case PO:case MO:case RO:case LO:return mO(r,t);case yO:return new i;case _O:case xO:return new i(r);case wO:return pO(r);case bO:return new i;case SO:return dO(r)}}Vh.exports=jO});var Zh=g((oP,Xh)=>{var NO=it(),UO=Ye(),DO="[object Map]";function FO(r){return UO(r)&&NO(r)==DO}Xh.exports=FO});var tp=g((uP,rp)=>{var BO=Zh(),kO=Et(),Qh=wi(),ep=Qh&&Qh.isMap,$O=ep?kO(ep):BO;rp.exports=$O});var np=g((fP,ip)=>{var zO=it(),WO=Ye(),HO="[object Set]";function GO(r){return WO(r)&&zO(r)==HO}ip.exports=GO});var up=g((cP,op)=>{var KO=np(),JO=Et(),sp=wi(),ap=sp&&sp.isSet,VO=ap?JO(ap):KO;op.exports=VO});var pp=g((lP,hp)=>{var YO=bi(),XO=Ch(),ZO=ci(),QO=Ih(),eq=Ph(),rq=Kn(),tq=Oi(),iq=Rh(),nq=Nh(),sq=Wn(),aq=es(),oq=it(),uq=Fh(),fq=Yh(),cq=Vn(),lq=ke(),hq=et(),pq=tp(),dq=Xe(),mq=up(),gq=Nt(),vq=at(),yq=1,_q=2,wq=4,fp="[object Arguments]",bq="[object Array]",xq="[object Boolean]",Sq="[object Date]",Aq="[object Error]",cp="[object Function]",Oq="[object GeneratorFunction]",qq="[object Map]",Cq="[object Number]",lp="[object Object]",Eq="[object RegExp]",Iq="[object Set]",Tq="[object String]",Pq="[object Symbol]",Mq="[object WeakMap]",Rq="[object ArrayBuffer]",Lq="[object DataView]",jq="[object Float32Array]",Nq="[object Float64Array]",Uq="[object Int8Array]",Dq="[object Int16Array]",Fq="[object Int32Array]",Bq="[object Uint8Array]",kq="[object Uint8ClampedArray]",$q="[object Uint16Array]",zq="[object Uint32Array]",_e={};_e[fp]=_e[bq]=_e[Rq]=_e[Lq]=_e[xq]=_e[Sq]=_e[jq]=_e[Nq]=_e[Uq]=_e[Dq]=_e[Fq]=_e[qq]=_e[Cq]=_e[lp]=_e[Eq]=_e[Iq]=_e[Tq]=_e[Pq]=_e[Bq]=_e[kq]=_e[$q]=_e[zq]=!0;_e[Aq]=_e[cp]=_e[Mq]=!1;function Ci(r,e,t,i,n,s){var a,u=e&yq,o=e&_q,c=e&wq;if(t&&(a=n?t(r,i,n,s):t(r)),a!==void 0)return a;if(!dq(r))return r;var p=lq(r);if(p){if(a=uq(r),!u)return tq(r,a)}else{var b=oq(r),w=b==cp||b==Oq;if(hq(r))return rq(r,u);if(b==lp||b==fp||w&&!n){if(a=o||w?{}:cq(r),!u)return o?nq(r,eq(a,r)):iq(r,QO(a,r))}else{if(!_e[b])return n?r:{};a=fq(r,b,u)}}s||(s=new YO);var q=s.get(r);if(q)return q;s.set(r,a),mq(r)?r.forEach(function(H){a.add(Ci(H,e,t,H,r,s))}):pq(r)&&r.forEach(function(H,K){a.set(K,Ci(H,e,t,K,r,s))});var y=c?o?aq:sq:o?vq:gq,P=p?void 0:y(r);return XO(P||r,function(H,K){P&&(K=H,H=r[K]),ZO(a,K,Ci(H,e,t,K,r,s))}),a}hp.exports=Ci});var mp=g((hP,dp)=>{function Wq(r,e,t){var i=-1,n=r.length;e<0&&(e=-e>n?0:n+e),t=t>n?n:t,t<0&&(t+=n),n=e>t?0:t-e>>>0,e>>>=0;for(var s=Array(n);++i<n;)s[i]=r[i+e];return s}dp.exports=Wq});var vp=g((pP,gp)=>{var Hq=_n(),Gq=mp();function Kq(r,e){return e.length<2?r:Hq(r,Gq(e,0,-1))}gp.exports=Kq});var _p=g((dP,yp)=>{var Jq=Ct(),Vq=Zn(),Yq=vp(),Xq=ui();function Zq(r,e){return e=Jq(e,r),r=Yq(r,e),r==null||delete r[Xq(Vq(e))]}yp.exports=Zq});var bp=g((mP,wp)=>{var Qq=Yn();function eC(r){return Qq(r)?void 0:r}wp.exports=eC});var Sp=g((gP,xp)=>{var rC=_i();function tC(r){var e=r==null?0:r.length;return e?rC(r,1):[]}xp.exports=tC});var Op=g((vP,Ap)=>{var iC=Sp(),nC=qn(),sC=Cn();function aC(r){return sC(nC(r,void 0,iC),r+"")}Ap.exports=aC});var Cp=g((yP,qp)=>{var oC=qt(),uC=pp(),fC=_p(),cC=Ct(),lC=Lr(),hC=bp(),pC=Op(),dC=es(),mC=1,gC=2,vC=4,yC=pC(function(r,e){var t={};if(r==null)return t;var i=!1;e=oC(e,function(s){return s=cC(s,r),i||(i=s.length>1),s}),lC(r,dC(r),t),i&&(t=uC(t,mC|gC|vC,hC));for(var n=e.length;n--;)fC(t,e[n]);return t});qp.exports=yC});var Ip=g((_P,Ep)=>{var _C=It(),wC=_i(),bC=Oi(),xC=ke();function SC(){var r=arguments.length;if(!r)return[];for(var e=Array(r-1),t=arguments[0],i=r;i--;)e[i-1]=arguments[i];return _C(xC(t)?bC(t):[t],wC(e,1))}Ep.exports=SC});var Pp=g((wP,Tp)=>{Tp.exports=function(e){var t=function(te,O){var ee=te<<O|te>>>32-O;return ee},i=function(te){var O="",ee,G;for(ee=7;ee>=0;ee--)G=te>>>ee*4&15,O+=G.toString(16);return O},n,s,a,u=new Array(80),o=1732584193,c=4023233417,p=2562383102,b=271733878,w=3285377520,q,y,P,H,K,Q;e=unescape(encodeURIComponent(e));var F=e.length,Z=[];for(s=0;s<F-3;s+=4)a=e.charCodeAt(s)<<24|e.charCodeAt(s+1)<<16|e.charCodeAt(s+2)<<8|e.charCodeAt(s+3),Z.push(a);switch(F%4){case 0:s=2147483648;break;case 1:s=e.charCodeAt(F-1)<<24|8388608;break;case 2:s=e.charCodeAt(F-2)<<24|e.charCodeAt(F-1)<<16|32768;break;case 3:s=e.charCodeAt(F-3)<<24|e.charCodeAt(F-2)<<16|e.charCodeAt(F-1)<<8|128;break}for(Z.push(s);Z.length%16!==14;)Z.push(0);for(Z.push(F>>>29),Z.push(F<<3&4294967295),n=0;n<Z.length;n+=16){for(s=0;s<16;s++)u[s]=Z[n+s];for(s=16;s<=79;s++)u[s]=t(u[s-3]^u[s-8]^u[s-14]^u[s-16],1);for(q=o,y=c,P=p,H=b,K=w,s=0;s<=19;s++)Q=t(q,5)+(y&P|~y&H)+K+u[s]+1518500249&4294967295,K=H,H=P,P=t(y,30),y=q,q=Q;for(s=20;s<=39;s++)Q=t(q,5)+(y^P^H)+K+u[s]+1859775393&4294967295,K=H,H=P,P=t(y,30),y=q,q=Q;for(s=40;s<=59;s++)Q=t(q,5)+(y&P|y&H|P&H)+K+u[s]+2400959708&4294967295,K=H,H=P,P=t(y,30),y=q,q=Q;for(s=60;s<=79;s++)Q=t(q,5)+(y^P^H)+K+u[s]+3395469782&4294967295,K=H,H=P,P=t(y,30),y=q,q=Q;o=o+q&4294967295,c=c+y&4294967295,p=p+P&4294967295,b=b+H&4294967295,w=w+K&4294967295}return Q=i(o)+i(c)+i(p)+i(b)+i(w),Q.toLowerCase()}});var $p=g((bP,kp)=>{var Rp=Pp();function Lp(r){return r.map(e=>e&&e.uri).filter(Boolean)}function os(r){return["memberSet","memberList","memberChoice"].find(e=>r[e])}function Mp(r){let e=os(r),t=r[e]?Lp(r[e]):[];return{[t.length>1?e:"memberSet"]:t.map(i=>({uri:i}))}}function jp(r){let{from:e,to:t,type:i}=r,n={from:Mp(e||{}),to:Mp(t||{}),type:[i&&i[0]||"http://www.w3.org/2004/02/skos/core#mappingRelation"]};for(let s of["from","to"])if((n[s][os(n[s])]||[]).length==0){let a=r[s+"Scheme"];a&&a.uri&&(n[s+"Scheme"]={uri:a.uri})}return n}function Np(r){let{from:e,to:t}=r,i=[e,t].filter(Boolean).map(n=>Lp(n[os(n)]||[]));return[].concat(...i).sort()}function Up(r){let e=JSON.stringify(jp(r),["from","fromScheme","to","toScheme","type","memberSet","memberList","memberChoice","uri"]);return"urn:jskos:mapping:content:"+Rp(e+`
|
|
8
|
+
var CDK=(()=>{var em=Object.create;var dt=Object.defineProperty,rm=Object.defineProperties,tm=Object.getOwnPropertyDescriptor,im=Object.getOwnPropertyDescriptors,nm=Object.getOwnPropertyNames,Kt=Object.getOwnPropertySymbols,sm=Object.getPrototypeOf,Ki=Object.prototype.hasOwnProperty,Ds=Object.prototype.propertyIsEnumerable;var Us=(r,e,t)=>e in r?dt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,R=(r,e)=>{for(var t in e||(e={}))Ki.call(e,t)&&Us(r,t,e[t]);if(Kt)for(var t of Kt(e))Ds.call(e,t)&&Us(r,t,e[t]);return r},$=(r,e)=>rm(r,im(e));var mt=(r=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(r,{get:(e,t)=>(typeof require!="undefined"?require:e)[t]}):r)(function(r){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var J=(r,e)=>{var t={};for(var i in r)Ki.call(r,i)&&e.indexOf(i)<0&&(t[i]=r[i]);if(r!=null&&Kt)for(var i of Kt(r))e.indexOf(i)<0&&Ds.call(r,i)&&(t[i]=r[i]);return t};var g=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Jt=(r,e)=>{for(var t in e)dt(r,t,{get:e[t],enumerable:!0})},Fs=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of nm(e))!Ki.call(r,n)&&n!==t&&dt(r,n,{get:()=>e[n],enumerable:!(i=tm(e,n))||i.enumerable});return r};var fe=(r,e,t)=>(t=r!=null?em(sm(r)):{},Fs(e||!r||!r.__esModule?dt(t,"default",{value:r,enumerable:!0}):t,r)),am=r=>Fs(dt({},"__esModule",{value:!0}),r);var j=(r,e,t)=>new Promise((i,n)=>{var s=o=>{try{u(t.next(o))}catch(l){n(l)}},a=o=>{try{u(t.throw(o))}catch(l){n(l)}},u=o=>o.done?i(o.value):Promise.resolve(o.value).then(s,a);u((t=t.apply(r,e)).next())});var Ji=g((OE,Bs)=>{"use strict";Bs.exports=function(e,t){return function(){for(var n=new Array(arguments.length),s=0;s<n.length;s++)n[s]=arguments[s];return e.apply(t,n)}}});var Be=g((qE,Ws)=>{"use strict";var om=Ji(),pr=Object.prototype.toString;function Xi(r){return Array.isArray(r)}function Vi(r){return typeof r=="undefined"}function um(r){return r!==null&&!Vi(r)&&r.constructor!==null&&!Vi(r.constructor)&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function ks(r){return pr.call(r)==="[object ArrayBuffer]"}function fm(r){return pr.call(r)==="[object FormData]"}function cm(r){var e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&ks(r.buffer),e}function lm(r){return typeof r=="string"}function hm(r){return typeof r=="number"}function $s(r){return r!==null&&typeof r=="object"}function Vt(r){if(pr.call(r)!=="[object Object]")return!1;var e=Object.getPrototypeOf(r);return e===null||e===Object.prototype}function pm(r){return pr.call(r)==="[object Date]"}function dm(r){return pr.call(r)==="[object File]"}function mm(r){return pr.call(r)==="[object Blob]"}function zs(r){return pr.call(r)==="[object Function]"}function gm(r){return $s(r)&&zs(r.pipe)}function vm(r){return pr.call(r)==="[object URLSearchParams]"}function ym(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function _m(){return typeof navigator!="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"}function Zi(r,e){if(!(r===null||typeof r=="undefined"))if(typeof r!="object"&&(r=[r]),Xi(r))for(var t=0,i=r.length;t<i;t++)e.call(null,r[t],t,r);else for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.call(null,r[n],n,r)}function Yi(){var r={};function e(n,s){Vt(r[s])&&Vt(n)?r[s]=Yi(r[s],n):Vt(n)?r[s]=Yi({},n):Xi(n)?r[s]=n.slice():r[s]=n}for(var t=0,i=arguments.length;t<i;t++)Zi(arguments[t],e);return r}function wm(r,e,t){return Zi(e,function(n,s){t&&typeof n=="function"?r[s]=om(n,t):r[s]=n}),r}function bm(r){return r.charCodeAt(0)===65279&&(r=r.slice(1)),r}Ws.exports={isArray:Xi,isArrayBuffer:ks,isBuffer:um,isFormData:fm,isArrayBufferView:cm,isString:lm,isNumber:hm,isObject:$s,isPlainObject:Vt,isUndefined:Vi,isDate:pm,isFile:dm,isBlob:mm,isFunction:zs,isStream:gm,isURLSearchParams:vm,isStandardBrowserEnv:_m,forEach:Zi,merge:Yi,extend:wm,trim:ym,stripBOM:bm}});var Qi=g((CE,Gs)=>{"use strict";var Hr=Be();function Hs(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}Gs.exports=function(e,t,i){if(!t)return e;var n;if(i)n=i(t);else if(Hr.isURLSearchParams(t))n=t.toString();else{var s=[];Hr.forEach(t,function(o,l){o===null||typeof o=="undefined"||(Hr.isArray(o)?l=l+"[]":o=[o],Hr.forEach(o,function(w){Hr.isDate(w)?w=w.toISOString():Hr.isObject(w)&&(w=JSON.stringify(w)),s.push(Hs(l)+"="+Hs(w))}))}),n=s.join("&")}if(n){var a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+n}return e}});var Js=g((EE,Ks)=>{"use strict";var xm=Be();function Yt(){this.handlers=[]}Yt.prototype.use=function(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1};Yt.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};Yt.prototype.forEach=function(e){xm.forEach(this.handlers,function(i){i!==null&&e(i)})};Ks.exports=Yt});var Ys=g((IE,Vs)=>{"use strict";var Sm=Be();Vs.exports=function(e,t){Sm.forEach(e,function(n,s){s!==t&&s.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[s])})}});var en=g((TE,Xs)=>{"use strict";Xs.exports=function(e,t,i,n,s){return e.config=t,i&&(e.code=i),e.request=n,e.response=s,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}});var rn=g((PE,Zs)=>{"use strict";Zs.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}});var tn=g((ME,Qs)=>{"use strict";var Am=en();Qs.exports=function(e,t,i,n,s){var a=new Error(e);return Am(a,t,i,n,s)}});var ra=g((RE,ea)=>{"use strict";var Om=tn();ea.exports=function(e,t,i){var n=i.config.validateStatus;!i.status||!n||n(i.status)?e(i):t(Om("Request failed with status code "+i.status,i.config,null,i.request,i))}});var ia=g((LE,ta)=>{"use strict";var Xt=Be();ta.exports=Xt.isStandardBrowserEnv()?function(){return{write:function(t,i,n,s,a,u){var o=[];o.push(t+"="+encodeURIComponent(i)),Xt.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),Xt.isString(s)&&o.push("path="+s),Xt.isString(a)&&o.push("domain="+a),u===!0&&o.push("secure"),document.cookie=o.join("; ")},read:function(t){var i=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()});var sa=g((jE,na)=>{"use strict";na.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}});var oa=g((NE,aa)=>{"use strict";aa.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}});var fa=g((UE,ua)=>{"use strict";var qm=sa(),Cm=oa();ua.exports=function(e,t){return e&&!qm(t)?Cm(e,t):t}});var la=g((DE,ca)=>{"use strict";var nn=Be(),Em=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];ca.exports=function(e){var t={},i,n,s;return e&&nn.forEach(e.split(`
|
|
9
|
+
`),function(u){if(s=u.indexOf(":"),i=nn.trim(u.substr(0,s)).toLowerCase(),n=nn.trim(u.substr(s+1)),i){if(t[i]&&Em.indexOf(i)>=0)return;i==="set-cookie"?t[i]=(t[i]?t[i]:[]).concat([n]):t[i]=t[i]?t[i]+", "+n:n}}),t}});var da=g((FE,pa)=>{"use strict";var ha=Be();pa.exports=ha.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a"),i;function n(s){var a=s;return e&&(t.setAttribute("href",a),a=t.href),t.setAttribute("href",a),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return i=n(window.location.href),function(a){var u=ha.isString(a)?n(a):a;return u.protocol===i.protocol&&u.host===i.host}}():function(){return function(){return!0}}()});var wt=g((BE,ma)=>{"use strict";function sn(r){this.message=r}sn.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};sn.prototype.__CANCEL__=!0;ma.exports=sn});var on=g((kE,ga)=>{"use strict";var Zt=Be(),Im=ra(),Tm=ia(),Pm=Qi(),Mm=fa(),Rm=la(),Lm=da(),an=tn(),jm=rn(),Nm=wt();ga.exports=function(e){return new Promise(function(i,n){var s=e.data,a=e.headers,u=e.responseType,o;function l(){e.cancelToken&&e.cancelToken.unsubscribe(o),e.signal&&e.signal.removeEventListener("abort",o)}Zt.isFormData(s)&&delete a["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var w=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.Authorization="Basic "+btoa(w+":"+b)}var q=Mm(e.baseURL,e.url);p.open(e.method.toUpperCase(),Pm(q,e.params,e.paramsSerializer),!0),p.timeout=e.timeout;function y(){if(!!p){var H="getAllResponseHeaders"in p?Rm(p.getAllResponseHeaders()):null,K=!u||u==="text"||u==="json"?p.responseText:p.response,Q={data:K,status:p.status,statusText:p.statusText,headers:H,config:e,request:p};Im(function(Z){i(Z),l()},function(Z){n(Z),l()},Q),p=null}}if("onloadend"in p?p.onloadend=y:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(y)},p.onabort=function(){!p||(n(an("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){n(an("Network Error",e,null,p)),p=null},p.ontimeout=function(){var K=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",Q=e.transitional||jm;e.timeoutErrorMessage&&(K=e.timeoutErrorMessage),n(an(K,e,Q.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},Zt.isStandardBrowserEnv()){var P=(e.withCredentials||Lm(q))&&e.xsrfCookieName?Tm.read(e.xsrfCookieName):void 0;P&&(a[e.xsrfHeaderName]=P)}"setRequestHeader"in p&&Zt.forEach(a,function(K,Q){typeof s=="undefined"&&Q.toLowerCase()==="content-type"?delete a[Q]:p.setRequestHeader(Q,K)}),Zt.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),u&&u!=="json"&&(p.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&p.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(o=function(H){!p||(n(!H||H&&H.type?new Nm("canceled"):H),p.abort(),p=null)},e.cancelToken&&e.cancelToken.subscribe(o),e.signal&&(e.signal.aborted?o():e.signal.addEventListener("abort",o))),s||(s=null),p.send(s)})}});var ei=g(($E,_a)=>{"use strict";var Me=Be(),va=Ys(),Um=en(),Dm=rn(),Fm={"Content-Type":"application/x-www-form-urlencoded"};function ya(r,e){!Me.isUndefined(r)&&Me.isUndefined(r["Content-Type"])&&(r["Content-Type"]=e)}function Bm(){var r;return typeof XMLHttpRequest!="undefined"?r=on():typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]"&&(r=on()),r}function km(r,e,t){if(Me.isString(r))try{return(e||JSON.parse)(r),Me.trim(r)}catch(i){if(i.name!=="SyntaxError")throw i}return(t||JSON.stringify)(r)}var Qt={transitional:Dm,adapter:Bm(),transformRequest:[function(e,t){return va(t,"Accept"),va(t,"Content-Type"),Me.isFormData(e)||Me.isArrayBuffer(e)||Me.isBuffer(e)||Me.isStream(e)||Me.isFile(e)||Me.isBlob(e)?e:Me.isArrayBufferView(e)?e.buffer:Me.isURLSearchParams(e)?(ya(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):Me.isObject(e)||t&&t["Content-Type"]==="application/json"?(ya(t,"application/json"),km(e)):e}],transformResponse:[function(e){var t=this.transitional||Qt.transitional,i=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,s=!i&&this.responseType==="json";if(s||n&&Me.isString(e)&&e.length)try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?Um(a,this,"E_JSON_PARSE"):a}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Me.forEach(["delete","get","head"],function(e){Qt.headers[e]={}});Me.forEach(["post","put","patch"],function(e){Qt.headers[e]=Me.merge(Fm)});_a.exports=Qt});var ba=g((zE,wa)=>{"use strict";var $m=Be(),zm=ei();wa.exports=function(e,t,i){var n=this||zm;return $m.forEach(i,function(a){e=a.call(n,e,t)}),e}});var un=g((WE,xa)=>{"use strict";xa.exports=function(e){return!!(e&&e.__CANCEL__)}});var Oa=g((HE,Aa)=>{"use strict";var Sa=Be(),fn=ba(),Wm=un(),Hm=ei(),Gm=wt();function cn(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new Gm("canceled")}Aa.exports=function(e){cn(e),e.headers=e.headers||{},e.data=fn.call(e,e.data,e.headers,e.transformRequest),e.headers=Sa.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Sa.forEach(["delete","get","head","post","put","patch","common"],function(n){delete e.headers[n]});var t=e.adapter||Hm.adapter;return t(e).then(function(n){return cn(e),n.data=fn.call(e,n.data,n.headers,e.transformResponse),n},function(n){return Wm(n)||(cn(e),n&&n.response&&(n.response.data=fn.call(e,n.response.data,n.response.headers,e.transformResponse))),Promise.reject(n)})}});var ln=g((GE,qa)=>{"use strict";var We=Be();qa.exports=function(e,t){t=t||{};var i={};function n(p,w){return We.isPlainObject(p)&&We.isPlainObject(w)?We.merge(p,w):We.isPlainObject(w)?We.merge({},w):We.isArray(w)?w.slice():w}function s(p){if(We.isUndefined(t[p])){if(!We.isUndefined(e[p]))return n(void 0,e[p])}else return n(e[p],t[p])}function a(p){if(!We.isUndefined(t[p]))return n(void 0,t[p])}function u(p){if(We.isUndefined(t[p])){if(!We.isUndefined(e[p]))return n(void 0,e[p])}else return n(void 0,t[p])}function o(p){if(p in t)return n(e[p],t[p]);if(p in e)return n(void 0,e[p])}var l={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:o};return We.forEach(Object.keys(e).concat(Object.keys(t)),function(w){var b=l[w]||s,q=b(w);We.isUndefined(q)&&b!==o||(i[w]=q)}),i}});var hn=g((KE,Ca)=>{Ca.exports={version:"0.26.1"}});var Ta=g((JE,Ia)=>{"use strict";var Km=hn().version,pn={};["object","boolean","number","function","string","symbol"].forEach(function(r,e){pn[r]=function(i){return typeof i===r||"a"+(e<1?"n ":" ")+r}});var Ea={};pn.transitional=function(e,t,i){function n(s,a){return"[Axios v"+Km+"] Transitional option '"+s+"'"+a+(i?". "+i:"")}return function(s,a,u){if(e===!1)throw new Error(n(a," has been removed"+(t?" in "+t:"")));return t&&!Ea[a]&&(Ea[a]=!0,console.warn(n(a," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(s,a,u):!0}};function Jm(r,e,t){if(typeof r!="object")throw new TypeError("options must be an object");for(var i=Object.keys(r),n=i.length;n-- >0;){var s=i[n],a=e[s];if(a){var u=r[s],o=u===void 0||a(u,s,r);if(o!==!0)throw new TypeError("option "+s+" must be "+o);continue}if(t!==!0)throw Error("Unknown option "+s)}}Ia.exports={assertOptions:Jm,validators:pn}});var Na=g((VE,ja)=>{"use strict";var Ra=Be(),Vm=Qi(),Pa=Js(),Ma=Oa(),ri=ln(),La=Ta(),Gr=La.validators;function bt(r){this.defaults=r,this.interceptors={request:new Pa,response:new Pa}}bt.prototype.request=function(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=ri(this.defaults,t),t.method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var i=t.transitional;i!==void 0&&La.assertOptions(i,{silentJSONParsing:Gr.transitional(Gr.boolean),forcedJSONParsing:Gr.transitional(Gr.boolean),clarifyTimeoutError:Gr.transitional(Gr.boolean)},!1);var n=[],s=!0;this.interceptors.request.forEach(function(q){typeof q.runWhen=="function"&&q.runWhen(t)===!1||(s=s&&q.synchronous,n.unshift(q.fulfilled,q.rejected))});var a=[];this.interceptors.response.forEach(function(q){a.push(q.fulfilled,q.rejected)});var u;if(!s){var o=[Ma,void 0];for(Array.prototype.unshift.apply(o,n),o=o.concat(a),u=Promise.resolve(t);o.length;)u=u.then(o.shift(),o.shift());return u}for(var l=t;n.length;){var p=n.shift(),w=n.shift();try{l=p(l)}catch(b){w(b);break}}try{u=Ma(l)}catch(b){return Promise.reject(b)}for(;a.length;)u=u.then(a.shift(),a.shift());return u};bt.prototype.getUri=function(e){return e=ri(this.defaults,e),Vm(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};Ra.forEach(["delete","get","head","options"],function(e){bt.prototype[e]=function(t,i){return this.request(ri(i||{},{method:e,url:t,data:(i||{}).data}))}});Ra.forEach(["post","put","patch"],function(e){bt.prototype[e]=function(t,i,n){return this.request(ri(n||{},{method:e,url:t,data:i}))}});ja.exports=bt});var Da=g((YE,Ua)=>{"use strict";var Ym=wt();function Kr(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(n){e=n});var t=this;this.promise.then(function(i){if(!!t._listeners){var n,s=t._listeners.length;for(n=0;n<s;n++)t._listeners[n](i);t._listeners=null}}),this.promise.then=function(i){var n,s=new Promise(function(a){t.subscribe(a),n=a}).then(i);return s.cancel=function(){t.unsubscribe(n)},s},r(function(n){t.reason||(t.reason=new Ym(n),e(t.reason))})}Kr.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};Kr.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]};Kr.prototype.unsubscribe=function(e){if(!!this._listeners){var t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}};Kr.source=function(){var e,t=new Kr(function(n){e=n});return{token:t,cancel:e}};Ua.exports=Kr});var Ba=g((XE,Fa)=>{"use strict";Fa.exports=function(e){return function(i){return e.apply(null,i)}}});var $a=g((ZE,ka)=>{"use strict";var Xm=Be();ka.exports=function(e){return Xm.isObject(e)&&e.isAxiosError===!0}});var Ha=g((QE,dn)=>{"use strict";var za=Be(),Zm=Ji(),ti=Na(),Qm=ln(),eg=ei();function Wa(r){var e=new ti(r),t=Zm(ti.prototype.request,e);return za.extend(t,ti.prototype,e),za.extend(t,e),t.create=function(n){return Wa(Qm(r,n))},t}var er=Wa(eg);er.Axios=ti;er.Cancel=wt();er.CancelToken=Da();er.isCancel=un();er.VERSION=hn().version;er.all=function(e){return Promise.all(e)};er.spread=Ba();er.isAxiosError=$a();dn.exports=er;dn.exports.default=er});var ii=g((eI,Ga)=>{Ga.exports=Ha()});var ke=g((rI,Ka)=>{var rg=Array.isArray;Ka.exports=rg});var mn=g((tI,Ja)=>{var tg=typeof global=="object"&&global&&global.Object===Object&&global;Ja.exports=tg});var Ve=g((iI,Va)=>{var ig=mn(),ng=typeof self=="object"&&self&&self.Object===Object&&self,sg=ig||ng||Function("return this")();Va.exports=sg});var Mr=g((nI,Ya)=>{var ag=Ve(),og=ag.Symbol;Ya.exports=og});var eo=g((sI,Qa)=>{var Xa=Mr(),Za=Object.prototype,ug=Za.hasOwnProperty,fg=Za.toString,xt=Xa?Xa.toStringTag:void 0;function cg(r){var e=ug.call(r,xt),t=r[xt];try{r[xt]=void 0;var i=!0}catch(s){}var n=fg.call(r);return i&&(e?r[xt]=t:delete r[xt]),n}Qa.exports=cg});var to=g((aI,ro)=>{var lg=Object.prototype,hg=lg.toString;function pg(r){return hg.call(r)}ro.exports=pg});var dr=g((oI,so)=>{var io=Mr(),dg=eo(),mg=to(),gg="[object Null]",vg="[object Undefined]",no=io?io.toStringTag:void 0;function yg(r){return r==null?r===void 0?vg:gg:no&&no in Object(r)?dg(r):mg(r)}so.exports=yg});var Ye=g((uI,ao)=>{function _g(r){return r!=null&&typeof r=="object"}ao.exports=_g});var ni=g((fI,oo)=>{var wg=dr(),bg=Ye(),xg="[object Symbol]";function Sg(r){return typeof r=="symbol"||bg(r)&&wg(r)==xg}oo.exports=Sg});var fo=g((cI,uo)=>{var Ag=ke(),Og=ni(),qg=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Cg=/^\w*$/;function Eg(r,e){if(Ag(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||Og(r)?!0:Cg.test(r)||!qg.test(r)||e!=null&&r in Object(e)}uo.exports=Eg});var Xe=g((lI,co)=>{function Ig(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}co.exports=Ig});var si=g((hI,lo)=>{var Tg=dr(),Pg=Xe(),Mg="[object AsyncFunction]",Rg="[object Function]",Lg="[object GeneratorFunction]",jg="[object Proxy]";function Ng(r){if(!Pg(r))return!1;var e=Tg(r);return e==Rg||e==Lg||e==Mg||e==jg}lo.exports=Ng});var po=g((pI,ho)=>{var Ug=Ve(),Dg=Ug["__core-js_shared__"];ho.exports=Dg});var vo=g((dI,go)=>{var gn=po(),mo=function(){var r=/[^.]+$/.exec(gn&&gn.keys&&gn.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function Fg(r){return!!mo&&mo in r}go.exports=Fg});var vn=g((mI,yo)=>{var Bg=Function.prototype,kg=Bg.toString;function $g(r){if(r!=null){try{return kg.call(r)}catch(e){}try{return r+""}catch(e){}}return""}yo.exports=$g});var wo=g((gI,_o)=>{var zg=si(),Wg=vo(),Hg=Xe(),Gg=vn(),Kg=/[\\^$.*+?()[\]{}|]/g,Jg=/^\[object .+?Constructor\]$/,Vg=Function.prototype,Yg=Object.prototype,Xg=Vg.toString,Zg=Yg.hasOwnProperty,Qg=RegExp("^"+Xg.call(Zg).replace(Kg,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ev(r){if(!Hg(r)||Wg(r))return!1;var e=zg(r)?Qg:Jg;return e.test(Gg(r))}_o.exports=ev});var xo=g((vI,bo)=>{function rv(r,e){return r==null?void 0:r[e]}bo.exports=rv});var mr=g((yI,So)=>{var tv=wo(),iv=xo();function nv(r,e){var t=iv(r,e);return tv(t)?t:void 0}So.exports=nv});var St=g((_I,Ao)=>{var sv=mr(),av=sv(Object,"create");Ao.exports=av});var Co=g((wI,qo)=>{var Oo=St();function ov(){this.__data__=Oo?Oo(null):{},this.size=0}qo.exports=ov});var Io=g((bI,Eo)=>{function uv(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}Eo.exports=uv});var Po=g((xI,To)=>{var fv=St(),cv="__lodash_hash_undefined__",lv=Object.prototype,hv=lv.hasOwnProperty;function pv(r){var e=this.__data__;if(fv){var t=e[r];return t===cv?void 0:t}return hv.call(e,r)?e[r]:void 0}To.exports=pv});var Ro=g((SI,Mo)=>{var dv=St(),mv=Object.prototype,gv=mv.hasOwnProperty;function vv(r){var e=this.__data__;return dv?e[r]!==void 0:gv.call(e,r)}Mo.exports=vv});var jo=g((AI,Lo)=>{var yv=St(),_v="__lodash_hash_undefined__";function wv(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=yv&&e===void 0?_v:e,this}Lo.exports=wv});var Uo=g((OI,No)=>{var bv=Co(),xv=Io(),Sv=Po(),Av=Ro(),Ov=jo();function Jr(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var i=r[e];this.set(i[0],i[1])}}Jr.prototype.clear=bv;Jr.prototype.delete=xv;Jr.prototype.get=Sv;Jr.prototype.has=Av;Jr.prototype.set=Ov;No.exports=Jr});var Fo=g((qI,Do)=>{function qv(){this.__data__=[],this.size=0}Do.exports=qv});var Vr=g((CI,Bo)=>{function Cv(r,e){return r===e||r!==r&&e!==e}Bo.exports=Cv});var At=g((EI,ko)=>{var Ev=Vr();function Iv(r,e){for(var t=r.length;t--;)if(Ev(r[t][0],e))return t;return-1}ko.exports=Iv});var zo=g((II,$o)=>{var Tv=At(),Pv=Array.prototype,Mv=Pv.splice;function Rv(r){var e=this.__data__,t=Tv(e,r);if(t<0)return!1;var i=e.length-1;return t==i?e.pop():Mv.call(e,t,1),--this.size,!0}$o.exports=Rv});var Ho=g((TI,Wo)=>{var Lv=At();function jv(r){var e=this.__data__,t=Lv(e,r);return t<0?void 0:e[t][1]}Wo.exports=jv});var Ko=g((PI,Go)=>{var Nv=At();function Uv(r){return Nv(this.__data__,r)>-1}Go.exports=Uv});var Vo=g((MI,Jo)=>{var Dv=At();function Fv(r,e){var t=this.__data__,i=Dv(t,r);return i<0?(++this.size,t.push([r,e])):t[i][1]=e,this}Jo.exports=Fv});var Ot=g((RI,Yo)=>{var Bv=Fo(),kv=zo(),$v=Ho(),zv=Ko(),Wv=Vo();function Yr(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var i=r[e];this.set(i[0],i[1])}}Yr.prototype.clear=Bv;Yr.prototype.delete=kv;Yr.prototype.get=$v;Yr.prototype.has=zv;Yr.prototype.set=Wv;Yo.exports=Yr});var ai=g((LI,Xo)=>{var Hv=mr(),Gv=Ve(),Kv=Hv(Gv,"Map");Xo.exports=Kv});var eu=g((jI,Qo)=>{var Zo=Uo(),Jv=Ot(),Vv=ai();function Yv(){this.size=0,this.__data__={hash:new Zo,map:new(Vv||Jv),string:new Zo}}Qo.exports=Yv});var tu=g((NI,ru)=>{function Xv(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}ru.exports=Xv});var qt=g((UI,iu)=>{var Zv=tu();function Qv(r,e){var t=r.__data__;return Zv(e)?t[typeof e=="string"?"string":"hash"]:t.map}iu.exports=Qv});var su=g((DI,nu)=>{var ey=qt();function ry(r){var e=ey(this,r).delete(r);return this.size-=e?1:0,e}nu.exports=ry});var ou=g((FI,au)=>{var ty=qt();function iy(r){return ty(this,r).get(r)}au.exports=iy});var fu=g((BI,uu)=>{var ny=qt();function sy(r){return ny(this,r).has(r)}uu.exports=sy});var lu=g((kI,cu)=>{var ay=qt();function oy(r,e){var t=ay(this,r),i=t.size;return t.set(r,e),this.size+=t.size==i?0:1,this}cu.exports=oy});var oi=g(($I,hu)=>{var uy=eu(),fy=su(),cy=ou(),ly=fu(),hy=lu();function Xr(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var i=r[e];this.set(i[0],i[1])}}Xr.prototype.clear=uy;Xr.prototype.delete=fy;Xr.prototype.get=cy;Xr.prototype.has=ly;Xr.prototype.set=hy;hu.exports=Xr});var mu=g((zI,du)=>{var pu=oi(),py="Expected a function";function yn(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(py);var t=function(){var i=arguments,n=e?e.apply(this,i):i[0],s=t.cache;if(s.has(n))return s.get(n);var a=r.apply(this,i);return t.cache=s.set(n,a)||s,a};return t.cache=new(yn.Cache||pu),t}yn.Cache=pu;du.exports=yn});var vu=g((WI,gu)=>{var dy=mu(),my=500;function gy(r){var e=dy(r,function(i){return t.size===my&&t.clear(),i}),t=e.cache;return e}gu.exports=gy});var _u=g((HI,yu)=>{var vy=vu(),yy=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,_y=/\\(\\)?/g,wy=vy(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(yy,function(t,i,n,s){e.push(n?s.replace(_y,"$1"):i||t)}),e});yu.exports=wy});var Ct=g((GI,wu)=>{function by(r,e){for(var t=-1,i=r==null?0:r.length,n=Array(i);++t<i;)n[t]=e(r[t],t,r);return n}wu.exports=by});var qu=g((KI,Ou)=>{var bu=Mr(),xy=Ct(),Sy=ke(),Ay=ni(),Oy=1/0,xu=bu?bu.prototype:void 0,Su=xu?xu.toString:void 0;function Au(r){if(typeof r=="string")return r;if(Sy(r))return xy(r,Au)+"";if(Ay(r))return Su?Su.call(r):"";var e=r+"";return e=="0"&&1/r==-Oy?"-0":e}Ou.exports=Au});var Eu=g((JI,Cu)=>{var qy=qu();function Cy(r){return r==null?"":qy(r)}Cu.exports=Cy});var Et=g((VI,Iu)=>{var Ey=ke(),Iy=fo(),Ty=_u(),Py=Eu();function My(r,e){return Ey(r)?r:Iy(r,e)?[r]:Ty(Py(r))}Iu.exports=My});var ui=g((YI,Tu)=>{var Ry=ni(),Ly=1/0;function jy(r){if(typeof r=="string"||Ry(r))return r;var e=r+"";return e=="0"&&1/r==-Ly?"-0":e}Tu.exports=jy});var _n=g((XI,Pu)=>{var Ny=Et(),Uy=ui();function Dy(r,e){e=Ny(e,r);for(var t=0,i=e.length;r!=null&&t<i;)r=r[Uy(e[t++])];return t&&t==i?r:void 0}Pu.exports=Dy});var Ru=g((ZI,Mu)=>{var Fy=_n();function By(r,e,t){var i=r==null?void 0:Fy(r,e);return i===void 0?t:i}Mu.exports=By});var wn=g((QI,Lu)=>{var ky=mr(),$y=function(){try{var r=ky(Object,"defineProperty");return r({},"",{}),r}catch(e){}}();Lu.exports=$y});var fi=g((eT,Nu)=>{var ju=wn();function zy(r,e,t){e=="__proto__"&&ju?ju(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}Nu.exports=zy});var ci=g((rT,Uu)=>{var Wy=fi(),Hy=Vr(),Gy=Object.prototype,Ky=Gy.hasOwnProperty;function Jy(r,e,t){var i=r[e];(!(Ky.call(r,e)&&Hy(i,t))||t===void 0&&!(e in r))&&Wy(r,e,t)}Uu.exports=Jy});var li=g((tT,Du)=>{var Vy=9007199254740991,Yy=/^(?:0|[1-9]\d*)$/;function Xy(r,e){var t=typeof r;return e=e==null?Vy:e,!!e&&(t=="number"||t!="symbol"&&Yy.test(r))&&r>-1&&r%1==0&&r<e}Du.exports=Xy});var ku=g((iT,Bu)=>{var Zy=ci(),Qy=Et(),e_=li(),Fu=Xe(),r_=ui();function t_(r,e,t,i){if(!Fu(r))return r;e=Qy(e,r);for(var n=-1,s=e.length,a=s-1,u=r;u!=null&&++n<s;){var o=r_(e[n]),l=t;if(o==="__proto__"||o==="constructor"||o==="prototype")return r;if(n!=a){var p=u[o];l=i?i(p,o,u):void 0,l===void 0&&(l=Fu(p)?p:e_(e[n+1])?[]:{})}Zy(u,o,l),u=u[o]}return r}Bu.exports=t_});var zu=g((nT,$u)=>{var i_=ku();function n_(r,e,t){return r==null?r:i_(r,e,t)}$u.exports=n_});var Hu=g((sT,Wu)=>{var s_="__lodash_hash_undefined__";function a_(r){return this.__data__.set(r,s_),this}Wu.exports=a_});var Ku=g((aT,Gu)=>{function o_(r){return this.__data__.has(r)}Gu.exports=o_});var pi=g((oT,Ju)=>{var u_=oi(),f_=Hu(),c_=Ku();function hi(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new u_;++e<t;)this.add(r[e])}hi.prototype.add=hi.prototype.push=f_;hi.prototype.has=c_;Ju.exports=hi});var Yu=g((uT,Vu)=>{function l_(r,e,t,i){for(var n=r.length,s=t+(i?1:-1);i?s--:++s<n;)if(e(r[s],s,r))return s;return-1}Vu.exports=l_});var Zu=g((fT,Xu)=>{function h_(r){return r!==r}Xu.exports=h_});var ef=g((cT,Qu)=>{function p_(r,e,t){for(var i=t-1,n=r.length;++i<n;)if(r[i]===e)return i;return-1}Qu.exports=p_});var tf=g((lT,rf)=>{var d_=Yu(),m_=Zu(),g_=ef();function v_(r,e,t){return e===e?g_(r,e,t):d_(r,m_,t)}rf.exports=v_});var bn=g((hT,nf)=>{var y_=tf();function __(r,e){var t=r==null?0:r.length;return!!t&&y_(r,e,0)>-1}nf.exports=__});var xn=g((pT,sf)=>{function w_(r,e,t){for(var i=-1,n=r==null?0:r.length;++i<n;)if(t(e,r[i]))return!0;return!1}sf.exports=w_});var di=g((dT,af)=>{function b_(r,e){return r.has(e)}af.exports=b_});var Sn=g((mT,of)=>{var x_=mr(),S_=Ve(),A_=x_(S_,"Set");of.exports=A_});var ff=g((gT,uf)=>{function O_(){}uf.exports=O_});var mi=g((vT,cf)=>{function q_(r){var e=-1,t=Array(r.size);return r.forEach(function(i){t[++e]=i}),t}cf.exports=q_});var hf=g((yT,lf)=>{var An=Sn(),C_=ff(),E_=mi(),I_=1/0,T_=An&&1/E_(new An([,-0]))[1]==I_?function(r){return new An(r)}:C_;lf.exports=T_});var On=g((_T,pf)=>{var P_=pi(),M_=bn(),R_=xn(),L_=di(),j_=hf(),N_=mi(),U_=200;function D_(r,e,t){var i=-1,n=M_,s=r.length,a=!0,u=[],o=u;if(t)a=!1,n=R_;else if(s>=U_){var l=e?null:j_(r);if(l)return N_(l);a=!1,n=L_,o=new P_}else o=e?[]:u;e:for(;++i<s;){var p=r[i],w=e?e(p):p;if(p=t||p!==0?p:0,a&&w===w){for(var b=o.length;b--;)if(o[b]===w)continue e;e&&o.push(w),u.push(p)}else n(o,w,t)||(o!==u&&o.push(w),u.push(p))}return u}pf.exports=D_});var mf=g((wT,df)=>{var F_=On();function B_(r){return r&&r.length?F_(r):[]}df.exports=B_});var It=g((bT,gf)=>{function k_(r){return function(e){return r(e)}}gf.exports=k_});var _f=g((xT,yf)=>{var $_=pi(),z_=bn(),W_=xn(),H_=Ct(),G_=It(),vf=di(),K_=Math.min;function J_(r,e,t){for(var i=t?W_:z_,n=r[0].length,s=r.length,a=s,u=Array(s),o=1/0,l=[];a--;){var p=r[a];a&&e&&(p=H_(p,G_(e))),o=K_(p.length,o),u[a]=!t&&(e||n>=120&&p.length>=120)?new $_(a&&p):void 0}p=r[0];var w=-1,b=u[0];e:for(;++w<n&&l.length<o;){var q=p[w],y=e?e(q):q;if(q=t||q!==0?q:0,!(b?vf(b,y):i(l,y,t))){for(a=s;--a;){var P=u[a];if(!(P?vf(P,y):i(r[a],y,t)))continue e}b&&b.push(y),l.push(q)}}return l}yf.exports=J_});var gi=g((ST,wf)=>{function V_(r){return r}wf.exports=V_});var xf=g((AT,bf)=>{function Y_(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}bf.exports=Y_});var qn=g((OT,Af)=>{var X_=xf(),Sf=Math.max;function Z_(r,e,t){return e=Sf(e===void 0?r.length-1:e,0),function(){for(var i=arguments,n=-1,s=Sf(i.length-e,0),a=Array(s);++n<s;)a[n]=i[e+n];n=-1;for(var u=Array(e+1);++n<e;)u[n]=i[n];return u[e]=t(a),X_(r,this,u)}}Af.exports=Z_});var qf=g((qT,Of)=>{function Q_(r){return function(){return r}}Of.exports=Q_});var If=g((CT,Ef)=>{var ew=qf(),Cf=wn(),rw=gi(),tw=Cf?function(r,e){return Cf(r,"toString",{configurable:!0,enumerable:!1,value:ew(e),writable:!0})}:rw;Ef.exports=tw});var Pf=g((ET,Tf)=>{var iw=800,nw=16,sw=Date.now;function aw(r){var e=0,t=0;return function(){var i=sw(),n=nw-(i-t);if(t=i,n>0){if(++e>=iw)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}Tf.exports=aw});var Cn=g((IT,Mf)=>{var ow=If(),uw=Pf(),fw=uw(ow);Mf.exports=fw});var vi=g((TT,Rf)=>{var cw=gi(),lw=qn(),hw=Cn();function pw(r,e){return hw(lw(r,e,cw),r+"")}Rf.exports=pw});var En=g((PT,Lf)=>{var dw=9007199254740991;function mw(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=dw}Lf.exports=mw});var Zr=g((MT,jf)=>{var gw=si(),vw=En();function yw(r){return r!=null&&vw(r.length)&&!gw(r)}jf.exports=yw});var yi=g((RT,Nf)=>{var _w=Zr(),ww=Ye();function bw(r){return ww(r)&&_w(r)}Nf.exports=bw});var Df=g((LT,Uf)=>{var xw=yi();function Sw(r){return xw(r)?r:[]}Uf.exports=Sw});var Bf=g((jT,Ff)=>{var Aw=Ct(),Ow=_f(),qw=vi(),Cw=Df(),Ew=qw(function(r){var e=Aw(r,Cw);return e.length&&e[0]===r[0]?Ow(e):[]});Ff.exports=Ew});var Tt=g((NT,kf)=>{function Iw(r,e){for(var t=-1,i=e.length,n=r.length;++t<i;)r[n+t]=e[t];return r}kf.exports=Iw});var zf=g((UT,$f)=>{var Tw=dr(),Pw=Ye(),Mw="[object Arguments]";function Rw(r){return Pw(r)&&Tw(r)==Mw}$f.exports=Rw});var Pt=g((DT,Gf)=>{var Wf=zf(),Lw=Ye(),Hf=Object.prototype,jw=Hf.hasOwnProperty,Nw=Hf.propertyIsEnumerable,Uw=Wf(function(){return arguments}())?Wf:function(r){return Lw(r)&&jw.call(r,"callee")&&!Nw.call(r,"callee")};Gf.exports=Uw});var Yf=g((FT,Vf)=>{var Kf=Mr(),Dw=Pt(),Fw=ke(),Jf=Kf?Kf.isConcatSpreadable:void 0;function Bw(r){return Fw(r)||Dw(r)||!!(Jf&&r&&r[Jf])}Vf.exports=Bw});var _i=g((BT,Zf)=>{var kw=Tt(),$w=Yf();function Xf(r,e,t,i,n){var s=-1,a=r.length;for(t||(t=$w),n||(n=[]);++s<a;){var u=r[s];e>0&&t(u)?e>1?Xf(u,e-1,t,i,n):kw(n,u):i||(n[n.length]=u)}return n}Zf.exports=Xf});var ec=g((kT,Qf)=>{var zw=_i(),Ww=vi(),Hw=On(),Gw=yi(),Kw=Ww(function(r){return Hw(zw(r,1,Gw,!0))});Qf.exports=Kw});var tc=g(($T,rc)=>{function Jw(r){return function(e,t,i){for(var n=-1,s=Object(e),a=i(e),u=a.length;u--;){var o=a[r?u:++n];if(t(s[o],o,s)===!1)break}return e}}rc.exports=Jw});var In=g((zT,ic)=>{var Vw=tc(),Yw=Vw();ic.exports=Yw});var sc=g((WT,nc)=>{function Xw(r,e){for(var t=-1,i=Array(r);++t<r;)i[t]=e(t);return i}nc.exports=Xw});var oc=g((HT,ac)=>{function Zw(){return!1}ac.exports=Zw});var et=g((Mt,Qr)=>{var Qw=Ve(),eb=oc(),cc=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,uc=cc&&typeof Qr=="object"&&Qr&&!Qr.nodeType&&Qr,rb=uc&&uc.exports===cc,fc=rb?Qw.Buffer:void 0,tb=fc?fc.isBuffer:void 0,ib=tb||eb;Qr.exports=ib});var hc=g((GT,lc)=>{var nb=dr(),sb=En(),ab=Ye(),ob="[object Arguments]",ub="[object Array]",fb="[object Boolean]",cb="[object Date]",lb="[object Error]",hb="[object Function]",pb="[object Map]",db="[object Number]",mb="[object Object]",gb="[object RegExp]",vb="[object Set]",yb="[object String]",_b="[object WeakMap]",wb="[object ArrayBuffer]",bb="[object DataView]",xb="[object Float32Array]",Sb="[object Float64Array]",Ab="[object Int8Array]",Ob="[object Int16Array]",qb="[object Int32Array]",Cb="[object Uint8Array]",Eb="[object Uint8ClampedArray]",Ib="[object Uint16Array]",Tb="[object Uint32Array]",we={};we[xb]=we[Sb]=we[Ab]=we[Ob]=we[qb]=we[Cb]=we[Eb]=we[Ib]=we[Tb]=!0;we[ob]=we[ub]=we[wb]=we[fb]=we[bb]=we[cb]=we[lb]=we[hb]=we[pb]=we[db]=we[mb]=we[gb]=we[vb]=we[yb]=we[_b]=!1;function Pb(r){return ab(r)&&sb(r.length)&&!!we[nb(r)]}lc.exports=Pb});var wi=g((Rt,rt)=>{var Mb=mn(),pc=typeof Rt=="object"&&Rt&&!Rt.nodeType&&Rt,Lt=pc&&typeof rt=="object"&&rt&&!rt.nodeType&&rt,Rb=Lt&&Lt.exports===pc,Tn=Rb&&Mb.process,Lb=function(){try{var r=Lt&&Lt.require&&Lt.require("util").types;return r||Tn&&Tn.binding&&Tn.binding("util")}catch(e){}}();rt.exports=Lb});var jt=g((KT,gc)=>{var jb=hc(),Nb=It(),dc=wi(),mc=dc&&dc.isTypedArray,Ub=mc?Nb(mc):jb;gc.exports=Ub});var Pn=g((JT,vc)=>{var Db=sc(),Fb=Pt(),Bb=ke(),kb=et(),$b=li(),zb=jt(),Wb=Object.prototype,Hb=Wb.hasOwnProperty;function Gb(r,e){var t=Bb(r),i=!t&&Fb(r),n=!t&&!i&&kb(r),s=!t&&!i&&!n&&zb(r),a=t||i||n||s,u=a?Db(r.length,String):[],o=u.length;for(var l in r)(e||Hb.call(r,l))&&!(a&&(l=="length"||n&&(l=="offset"||l=="parent")||s&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||$b(l,o)))&&u.push(l);return u}vc.exports=Gb});var Nt=g((VT,yc)=>{var Kb=Object.prototype;function Jb(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||Kb;return r===t}yc.exports=Jb});var Mn=g((YT,_c)=>{function Vb(r,e){return function(t){return r(e(t))}}_c.exports=Vb});var bc=g((XT,wc)=>{var Yb=Mn(),Xb=Yb(Object.keys,Object);wc.exports=Xb});var Rn=g((ZT,xc)=>{var Zb=Nt(),Qb=bc(),e0=Object.prototype,r0=e0.hasOwnProperty;function t0(r){if(!Zb(r))return Qb(r);var e=[];for(var t in Object(r))r0.call(r,t)&&t!="constructor"&&e.push(t);return e}xc.exports=t0});var Ut=g((QT,Sc)=>{var i0=Pn(),n0=Rn(),s0=Zr();function a0(r){return s0(r)?i0(r):n0(r)}Sc.exports=a0});var Oc=g((e1,Ac)=>{var o0=In(),u0=Ut();function f0(r,e){return r&&o0(r,e,u0)}Ac.exports=f0});var Cc=g((r1,qc)=>{var c0=gi();function l0(r){return typeof r=="function"?r:c0}qc.exports=l0});var Ic=g((t1,Ec)=>{var h0=Oc(),p0=Cc();function d0(r,e){return r&&h0(r,p0(e))}Ec.exports=d0});var Pc=g((i1,Tc)=>{var m0=dr(),g0=ke(),v0=Ye(),y0="[object String]";function _0(r){return typeof r=="string"||!g0(r)&&v0(r)&&m0(r)==y0}Tc.exports=_0});var Rc=g((n1,Mc)=>{var w0=mr(),b0=Ve(),x0=w0(b0,"DataView");Mc.exports=x0});var jc=g((s1,Lc)=>{var S0=mr(),A0=Ve(),O0=S0(A0,"Promise");Lc.exports=O0});var Uc=g((a1,Nc)=>{var q0=mr(),C0=Ve(),E0=q0(C0,"WeakMap");Nc.exports=E0});var it=g((o1,Wc)=>{var Ln=Rc(),jn=ai(),Nn=jc(),Un=Sn(),Dn=Uc(),zc=dr(),tt=vn(),Dc="[object Map]",I0="[object Object]",Fc="[object Promise]",Bc="[object Set]",kc="[object WeakMap]",$c="[object DataView]",T0=tt(Ln),P0=tt(jn),M0=tt(Nn),R0=tt(Un),L0=tt(Dn),Rr=zc;(Ln&&Rr(new Ln(new ArrayBuffer(1)))!=$c||jn&&Rr(new jn)!=Dc||Nn&&Rr(Nn.resolve())!=Fc||Un&&Rr(new Un)!=Bc||Dn&&Rr(new Dn)!=kc)&&(Rr=function(r){var e=zc(r),t=e==I0?r.constructor:void 0,i=t?tt(t):"";if(i)switch(i){case T0:return $c;case P0:return Dc;case M0:return Fc;case R0:return Bc;case L0:return kc}return e});Wc.exports=Rr});var Gc=g((u1,Hc)=>{var j0=Rn(),N0=it(),U0=Pt(),D0=ke(),F0=Zr(),B0=et(),k0=Nt(),$0=jt(),z0="[object Map]",W0="[object Set]",H0=Object.prototype,G0=H0.hasOwnProperty;function K0(r){if(r==null)return!0;if(F0(r)&&(D0(r)||typeof r=="string"||typeof r.splice=="function"||B0(r)||$0(r)||U0(r)))return!r.length;var e=N0(r);if(e==z0||e==W0)return!r.size;if(k0(r))return!j0(r).length;for(var t in r)if(G0.call(r,t))return!1;return!0}Hc.exports=K0});var Jc=g((f1,Kc)=>{var J0=Ot();function V0(){this.__data__=new J0,this.size=0}Kc.exports=V0});var Yc=g((c1,Vc)=>{function Y0(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}Vc.exports=Y0});var Zc=g((l1,Xc)=>{function X0(r){return this.__data__.get(r)}Xc.exports=X0});var el=g((h1,Qc)=>{function Z0(r){return this.__data__.has(r)}Qc.exports=Z0});var tl=g((p1,rl)=>{var Q0=Ot(),ex=ai(),rx=oi(),tx=200;function ix(r,e){var t=this.__data__;if(t instanceof Q0){var i=t.__data__;if(!ex||i.length<tx-1)return i.push([r,e]),this.size=++t.size,this;t=this.__data__=new rx(i)}return t.set(r,e),this.size=t.size,this}rl.exports=ix});var bi=g((d1,il)=>{var nx=Ot(),sx=Jc(),ax=Yc(),ox=Zc(),ux=el(),fx=tl();function nt(r){var e=this.__data__=new nx(r);this.size=e.size}nt.prototype.clear=sx;nt.prototype.delete=ax;nt.prototype.get=ox;nt.prototype.has=ux;nt.prototype.set=fx;il.exports=nt});var sl=g((m1,nl)=>{function cx(r,e){for(var t=-1,i=r==null?0:r.length;++t<i;)if(e(r[t],t,r))return!0;return!1}nl.exports=cx});var Fn=g((g1,al)=>{var lx=pi(),hx=sl(),px=di(),dx=1,mx=2;function gx(r,e,t,i,n,s){var a=t&dx,u=r.length,o=e.length;if(u!=o&&!(a&&o>u))return!1;var l=s.get(r),p=s.get(e);if(l&&p)return l==e&&p==r;var w=-1,b=!0,q=t&mx?new lx:void 0;for(s.set(r,e),s.set(e,r);++w<u;){var y=r[w],P=e[w];if(i)var H=a?i(P,y,w,e,r,s):i(y,P,w,r,e,s);if(H!==void 0){if(H)continue;b=!1;break}if(q){if(!hx(e,function(K,Q){if(!px(q,Q)&&(y===K||n(y,K,t,i,s)))return q.push(Q)})){b=!1;break}}else if(!(y===P||n(y,P,t,i,s))){b=!1;break}}return s.delete(r),s.delete(e),b}al.exports=gx});var Bn=g((v1,ol)=>{var vx=Ve(),yx=vx.Uint8Array;ol.exports=yx});var fl=g((y1,ul)=>{function _x(r){var e=-1,t=Array(r.size);return r.forEach(function(i,n){t[++e]=[n,i]}),t}ul.exports=_x});var dl=g((_1,pl)=>{var cl=Mr(),ll=Bn(),wx=Vr(),bx=Fn(),xx=fl(),Sx=mi(),Ax=1,Ox=2,qx="[object Boolean]",Cx="[object Date]",Ex="[object Error]",Ix="[object Map]",Tx="[object Number]",Px="[object RegExp]",Mx="[object Set]",Rx="[object String]",Lx="[object Symbol]",jx="[object ArrayBuffer]",Nx="[object DataView]",hl=cl?cl.prototype:void 0,kn=hl?hl.valueOf:void 0;function Ux(r,e,t,i,n,s,a){switch(t){case Nx:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case jx:return!(r.byteLength!=e.byteLength||!s(new ll(r),new ll(e)));case qx:case Cx:case Tx:return wx(+r,+e);case Ex:return r.name==e.name&&r.message==e.message;case Px:case Rx:return r==e+"";case Ix:var u=xx;case Mx:var o=i&Ax;if(u||(u=Sx),r.size!=e.size&&!o)return!1;var l=a.get(r);if(l)return l==e;i|=Ox,a.set(r,e);var p=bx(u(r),u(e),i,n,s,a);return a.delete(r),p;case Lx:if(kn)return kn.call(r)==kn.call(e)}return!1}pl.exports=Ux});var $n=g((w1,ml)=>{var Dx=Tt(),Fx=ke();function Bx(r,e,t){var i=e(r);return Fx(r)?i:Dx(i,t(r))}ml.exports=Bx});var vl=g((b1,gl)=>{function kx(r,e){for(var t=-1,i=r==null?0:r.length,n=0,s=[];++t<i;){var a=r[t];e(a,t,r)&&(s[n++]=a)}return s}gl.exports=kx});var zn=g((x1,yl)=>{function $x(){return[]}yl.exports=$x});var xi=g((S1,wl)=>{var zx=vl(),Wx=zn(),Hx=Object.prototype,Gx=Hx.propertyIsEnumerable,_l=Object.getOwnPropertySymbols,Kx=_l?function(r){return r==null?[]:(r=Object(r),zx(_l(r),function(e){return Gx.call(r,e)}))}:Wx;wl.exports=Kx});var Wn=g((A1,bl)=>{var Jx=$n(),Vx=xi(),Yx=Ut();function Xx(r){return Jx(r,Yx,Vx)}bl.exports=Xx});var Al=g((O1,Sl)=>{var xl=Wn(),Zx=1,Qx=Object.prototype,eS=Qx.hasOwnProperty;function rS(r,e,t,i,n,s){var a=t&Zx,u=xl(r),o=u.length,l=xl(e),p=l.length;if(o!=p&&!a)return!1;for(var w=o;w--;){var b=u[w];if(!(a?b in e:eS.call(e,b)))return!1}var q=s.get(r),y=s.get(e);if(q&&y)return q==e&&y==r;var P=!0;s.set(r,e),s.set(e,r);for(var H=a;++w<o;){b=u[w];var K=r[b],Q=e[b];if(i)var F=a?i(Q,K,b,e,r,s):i(K,Q,b,r,e,s);if(!(F===void 0?K===Q||n(K,Q,t,i,s):F)){P=!1;break}H||(H=b=="constructor")}if(P&&!H){var Z=r.constructor,te=e.constructor;Z!=te&&"constructor"in r&&"constructor"in e&&!(typeof Z=="function"&&Z instanceof Z&&typeof te=="function"&&te instanceof te)&&(P=!1)}return s.delete(r),s.delete(e),P}Sl.exports=rS});var Ml=g((q1,Pl)=>{var Hn=bi(),tS=Fn(),iS=dl(),nS=Al(),Ol=it(),ql=ke(),Cl=et(),sS=jt(),aS=1,El="[object Arguments]",Il="[object Array]",Si="[object Object]",oS=Object.prototype,Tl=oS.hasOwnProperty;function uS(r,e,t,i,n,s){var a=ql(r),u=ql(e),o=a?Il:Ol(r),l=u?Il:Ol(e);o=o==El?Si:o,l=l==El?Si:l;var p=o==Si,w=l==Si,b=o==l;if(b&&Cl(r)){if(!Cl(e))return!1;a=!0,p=!1}if(b&&!p)return s||(s=new Hn),a||sS(r)?tS(r,e,t,i,n,s):iS(r,e,o,t,i,n,s);if(!(t&aS)){var q=p&&Tl.call(r,"__wrapped__"),y=w&&Tl.call(e,"__wrapped__");if(q||y){var P=q?r.value():r,H=y?e.value():e;return s||(s=new Hn),n(P,H,t,i,s)}}return b?(s||(s=new Hn),nS(r,e,t,i,n,s)):!1}Pl.exports=uS});var Nl=g((C1,jl)=>{var fS=Ml(),Rl=Ye();function Ll(r,e,t,i,n){return r===e?!0:r==null||e==null||!Rl(r)&&!Rl(e)?r!==r&&e!==e:fS(r,e,t,i,Ll,n)}jl.exports=Ll});var Dl=g((E1,Ul)=>{var cS=Nl();function lS(r,e){return cS(r,e)}Ul.exports=lS});var Gn=g((I1,Fl)=>{var hS=fi(),pS=Vr();function dS(r,e,t){(t!==void 0&&!pS(r[e],t)||t===void 0&&!(e in r))&&hS(r,e,t)}Fl.exports=dS});var Kn=g((Dt,st)=>{var mS=Ve(),zl=typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,Bl=zl&&typeof st=="object"&&st&&!st.nodeType&&st,gS=Bl&&Bl.exports===zl,kl=gS?mS.Buffer:void 0,$l=kl?kl.allocUnsafe:void 0;function vS(r,e){if(e)return r.slice();var t=r.length,i=$l?$l(t):new r.constructor(t);return r.copy(i),i}st.exports=vS});var Ai=g((T1,Hl)=>{var Wl=Bn();function yS(r){var e=new r.constructor(r.byteLength);return new Wl(e).set(new Wl(r)),e}Hl.exports=yS});var Jn=g((P1,Gl)=>{var _S=Ai();function wS(r,e){var t=e?_S(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}Gl.exports=wS});var Oi=g((M1,Kl)=>{function bS(r,e){var t=-1,i=r.length;for(e||(e=Array(i));++t<i;)e[t]=r[t];return e}Kl.exports=bS});var Yl=g((R1,Vl)=>{var xS=Xe(),Jl=Object.create,SS=function(){function r(){}return function(e){if(!xS(e))return{};if(Jl)return Jl(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}();Vl.exports=SS});var qi=g((L1,Xl)=>{var AS=Mn(),OS=AS(Object.getPrototypeOf,Object);Xl.exports=OS});var Vn=g((j1,Zl)=>{var qS=Yl(),CS=qi(),ES=Nt();function IS(r){return typeof r.constructor=="function"&&!ES(r)?qS(CS(r)):{}}Zl.exports=IS});var Yn=g((N1,eh)=>{var TS=dr(),PS=qi(),MS=Ye(),RS="[object Object]",LS=Function.prototype,jS=Object.prototype,Ql=LS.toString,NS=jS.hasOwnProperty,US=Ql.call(Object);function DS(r){if(!MS(r)||TS(r)!=RS)return!1;var e=PS(r);if(e===null)return!0;var t=NS.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Ql.call(t)==US}eh.exports=DS});var Xn=g((U1,rh)=>{function FS(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}rh.exports=FS});var Lr=g((D1,th)=>{var BS=ci(),kS=fi();function $S(r,e,t,i){var n=!t;t||(t={});for(var s=-1,a=e.length;++s<a;){var u=e[s],o=i?i(t[u],r[u],u,t,r):void 0;o===void 0&&(o=r[u]),n?kS(t,u,o):BS(t,u,o)}return t}th.exports=$S});var nh=g((F1,ih)=>{function zS(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}ih.exports=zS});var ah=g((B1,sh)=>{var WS=Xe(),HS=Nt(),GS=nh(),KS=Object.prototype,JS=KS.hasOwnProperty;function VS(r){if(!WS(r))return GS(r);var e=HS(r),t=[];for(var i in r)i=="constructor"&&(e||!JS.call(r,i))||t.push(i);return t}sh.exports=VS});var at=g((k1,oh)=>{var YS=Pn(),XS=ah(),ZS=Zr();function QS(r){return ZS(r)?YS(r,!0):XS(r)}oh.exports=QS});var fh=g(($1,uh)=>{var eA=Lr(),rA=at();function tA(r){return eA(r,rA(r))}uh.exports=tA});var mh=g((z1,dh)=>{var ch=Gn(),iA=Kn(),nA=Jn(),sA=Oi(),aA=Vn(),lh=Pt(),hh=ke(),oA=yi(),uA=et(),fA=si(),cA=Xe(),lA=Yn(),hA=jt(),ph=Xn(),pA=fh();function dA(r,e,t,i,n,s,a){var u=ph(r,t),o=ph(e,t),l=a.get(o);if(l){ch(r,t,l);return}var p=s?s(u,o,t+"",r,e,a):void 0,w=p===void 0;if(w){var b=hh(o),q=!b&&uA(o),y=!b&&!q&&hA(o);p=o,b||q||y?hh(u)?p=u:oA(u)?p=sA(u):q?(w=!1,p=iA(o,!0)):y?(w=!1,p=nA(o,!0)):p=[]:lA(o)||lh(o)?(p=u,lh(u)?p=pA(u):(!cA(u)||fA(u))&&(p=aA(o))):w=!1}w&&(a.set(o,p),n(p,o,i,s,a),a.delete(o)),ch(r,t,p)}dh.exports=dA});var yh=g((W1,vh)=>{var mA=bi(),gA=Gn(),vA=In(),yA=mh(),_A=Xe(),wA=at(),bA=Xn();function gh(r,e,t,i,n){r!==e&&vA(e,function(s,a){if(n||(n=new mA),_A(s))yA(r,e,a,t,gh,i,n);else{var u=i?i(bA(r,a),s,a+"",r,e,n):void 0;u===void 0&&(u=s),gA(r,a,u)}},wA)}vh.exports=gh});var wh=g((H1,_h)=>{var xA=Vr(),SA=Zr(),AA=li(),OA=Xe();function qA(r,e,t){if(!OA(t))return!1;var i=typeof e;return(i=="number"?SA(t)&&AA(e,t.length):i=="string"&&e in t)?xA(t[e],r):!1}_h.exports=qA});var xh=g((G1,bh)=>{var CA=vi(),EA=wh();function IA(r){return CA(function(e,t){var i=-1,n=t.length,s=n>1?t[n-1]:void 0,a=n>2?t[2]:void 0;for(s=r.length>3&&typeof s=="function"?(n--,s):void 0,a&&EA(t[0],t[1],a)&&(s=n<3?void 0:s,n=1),e=Object(e);++i<n;){var u=t[i];u&&r(e,u,i,s)}return e})}bh.exports=IA});var Ah=g((K1,Sh)=>{var TA=yh(),PA=xh(),MA=PA(function(r,e,t){TA(r,e,t)});Sh.exports=MA});var Zn=g((J1,Oh)=>{function RA(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}Oh.exports=RA});var Ch=g((V1,qh)=>{function LA(r,e){for(var t=-1,i=r==null?0:r.length;++t<i&&e(r[t],t,r)!==!1;);return r}qh.exports=LA});var Ih=g((Y1,Eh)=>{var jA=Lr(),NA=Ut();function UA(r,e){return r&&jA(e,NA(e),r)}Eh.exports=UA});var Ph=g((X1,Th)=>{var DA=Lr(),FA=at();function BA(r,e){return r&&DA(e,FA(e),r)}Th.exports=BA});var Rh=g((Z1,Mh)=>{var kA=Lr(),$A=xi();function zA(r,e){return kA(r,$A(r),e)}Mh.exports=zA});var Qn=g((Q1,Lh)=>{var WA=Tt(),HA=qi(),GA=xi(),KA=zn(),JA=Object.getOwnPropertySymbols,VA=JA?function(r){for(var e=[];r;)WA(e,GA(r)),r=HA(r);return e}:KA;Lh.exports=VA});var Nh=g((eP,jh)=>{var YA=Lr(),XA=Qn();function ZA(r,e){return YA(r,XA(r),e)}jh.exports=ZA});var es=g((rP,Uh)=>{var QA=$n(),eO=Qn(),rO=at();function tO(r){return QA(r,rO,eO)}Uh.exports=tO});var Fh=g((tP,Dh)=>{var iO=Object.prototype,nO=iO.hasOwnProperty;function sO(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&nO.call(r,"index")&&(t.index=r.index,t.input=r.input),t}Dh.exports=sO});var kh=g((iP,Bh)=>{var aO=Ai();function oO(r,e){var t=e?aO(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}Bh.exports=oO});var zh=g((nP,$h)=>{var uO=/\w*$/;function fO(r){var e=new r.constructor(r.source,uO.exec(r));return e.lastIndex=r.lastIndex,e}$h.exports=fO});var Jh=g((sP,Kh)=>{var Wh=Mr(),Hh=Wh?Wh.prototype:void 0,Gh=Hh?Hh.valueOf:void 0;function cO(r){return Gh?Object(Gh.call(r)):{}}Kh.exports=cO});var Yh=g((aP,Vh)=>{var lO=Ai(),hO=kh(),pO=zh(),dO=Jh(),mO=Jn(),gO="[object Boolean]",vO="[object Date]",yO="[object Map]",_O="[object Number]",wO="[object RegExp]",bO="[object Set]",xO="[object String]",SO="[object Symbol]",AO="[object ArrayBuffer]",OO="[object DataView]",qO="[object Float32Array]",CO="[object Float64Array]",EO="[object Int8Array]",IO="[object Int16Array]",TO="[object Int32Array]",PO="[object Uint8Array]",MO="[object Uint8ClampedArray]",RO="[object Uint16Array]",LO="[object Uint32Array]";function jO(r,e,t){var i=r.constructor;switch(e){case AO:return lO(r);case gO:case vO:return new i(+r);case OO:return hO(r,t);case qO:case CO:case EO:case IO:case TO:case PO:case MO:case RO:case LO:return mO(r,t);case yO:return new i;case _O:case xO:return new i(r);case wO:return pO(r);case bO:return new i;case SO:return dO(r)}}Vh.exports=jO});var Zh=g((oP,Xh)=>{var NO=it(),UO=Ye(),DO="[object Map]";function FO(r){return UO(r)&&NO(r)==DO}Xh.exports=FO});var tp=g((uP,rp)=>{var BO=Zh(),kO=It(),Qh=wi(),ep=Qh&&Qh.isMap,$O=ep?kO(ep):BO;rp.exports=$O});var np=g((fP,ip)=>{var zO=it(),WO=Ye(),HO="[object Set]";function GO(r){return WO(r)&&zO(r)==HO}ip.exports=GO});var up=g((cP,op)=>{var KO=np(),JO=It(),sp=wi(),ap=sp&&sp.isSet,VO=ap?JO(ap):KO;op.exports=VO});var pp=g((lP,hp)=>{var YO=bi(),XO=Ch(),ZO=ci(),QO=Ih(),eq=Ph(),rq=Kn(),tq=Oi(),iq=Rh(),nq=Nh(),sq=Wn(),aq=es(),oq=it(),uq=Fh(),fq=Yh(),cq=Vn(),lq=ke(),hq=et(),pq=tp(),dq=Xe(),mq=up(),gq=Ut(),vq=at(),yq=1,_q=2,wq=4,fp="[object Arguments]",bq="[object Array]",xq="[object Boolean]",Sq="[object Date]",Aq="[object Error]",cp="[object Function]",Oq="[object GeneratorFunction]",qq="[object Map]",Cq="[object Number]",lp="[object Object]",Eq="[object RegExp]",Iq="[object Set]",Tq="[object String]",Pq="[object Symbol]",Mq="[object WeakMap]",Rq="[object ArrayBuffer]",Lq="[object DataView]",jq="[object Float32Array]",Nq="[object Float64Array]",Uq="[object Int8Array]",Dq="[object Int16Array]",Fq="[object Int32Array]",Bq="[object Uint8Array]",kq="[object Uint8ClampedArray]",$q="[object Uint16Array]",zq="[object Uint32Array]",_e={};_e[fp]=_e[bq]=_e[Rq]=_e[Lq]=_e[xq]=_e[Sq]=_e[jq]=_e[Nq]=_e[Uq]=_e[Dq]=_e[Fq]=_e[qq]=_e[Cq]=_e[lp]=_e[Eq]=_e[Iq]=_e[Tq]=_e[Pq]=_e[Bq]=_e[kq]=_e[$q]=_e[zq]=!0;_e[Aq]=_e[cp]=_e[Mq]=!1;function Ci(r,e,t,i,n,s){var a,u=e&yq,o=e&_q,l=e&wq;if(t&&(a=n?t(r,i,n,s):t(r)),a!==void 0)return a;if(!dq(r))return r;var p=lq(r);if(p){if(a=uq(r),!u)return tq(r,a)}else{var w=oq(r),b=w==cp||w==Oq;if(hq(r))return rq(r,u);if(w==lp||w==fp||b&&!n){if(a=o||b?{}:cq(r),!u)return o?nq(r,eq(a,r)):iq(r,QO(a,r))}else{if(!_e[w])return n?r:{};a=fq(r,w,u)}}s||(s=new YO);var q=s.get(r);if(q)return q;s.set(r,a),mq(r)?r.forEach(function(H){a.add(Ci(H,e,t,H,r,s))}):pq(r)&&r.forEach(function(H,K){a.set(K,Ci(H,e,t,K,r,s))});var y=l?o?aq:sq:o?vq:gq,P=p?void 0:y(r);return XO(P||r,function(H,K){P&&(K=H,H=r[K]),ZO(a,K,Ci(H,e,t,K,r,s))}),a}hp.exports=Ci});var mp=g((hP,dp)=>{function Wq(r,e,t){var i=-1,n=r.length;e<0&&(e=-e>n?0:n+e),t=t>n?n:t,t<0&&(t+=n),n=e>t?0:t-e>>>0,e>>>=0;for(var s=Array(n);++i<n;)s[i]=r[i+e];return s}dp.exports=Wq});var vp=g((pP,gp)=>{var Hq=_n(),Gq=mp();function Kq(r,e){return e.length<2?r:Hq(r,Gq(e,0,-1))}gp.exports=Kq});var _p=g((dP,yp)=>{var Jq=Et(),Vq=Zn(),Yq=vp(),Xq=ui();function Zq(r,e){return e=Jq(e,r),r=Yq(r,e),r==null||delete r[Xq(Vq(e))]}yp.exports=Zq});var bp=g((mP,wp)=>{var Qq=Yn();function eC(r){return Qq(r)?void 0:r}wp.exports=eC});var Sp=g((gP,xp)=>{var rC=_i();function tC(r){var e=r==null?0:r.length;return e?rC(r,1):[]}xp.exports=tC});var Op=g((vP,Ap)=>{var iC=Sp(),nC=qn(),sC=Cn();function aC(r){return sC(nC(r,void 0,iC),r+"")}Ap.exports=aC});var Cp=g((yP,qp)=>{var oC=Ct(),uC=pp(),fC=_p(),cC=Et(),lC=Lr(),hC=bp(),pC=Op(),dC=es(),mC=1,gC=2,vC=4,yC=pC(function(r,e){var t={};if(r==null)return t;var i=!1;e=oC(e,function(s){return s=cC(s,r),i||(i=s.length>1),s}),lC(r,dC(r),t),i&&(t=uC(t,mC|gC|vC,hC));for(var n=e.length;n--;)fC(t,e[n]);return t});qp.exports=yC});var Ip=g((_P,Ep)=>{var _C=Tt(),wC=_i(),bC=Oi(),xC=ke();function SC(){var r=arguments.length;if(!r)return[];for(var e=Array(r-1),t=arguments[0],i=r;i--;)e[i-1]=arguments[i];return _C(xC(t)?bC(t):[t],wC(e,1))}Ep.exports=SC});var Pp=g((wP,Tp)=>{Tp.exports=function(e){var t=function(te,O){var ee=te<<O|te>>>32-O;return ee},i=function(te){var O="",ee,G;for(ee=7;ee>=0;ee--)G=te>>>ee*4&15,O+=G.toString(16);return O},n,s,a,u=new Array(80),o=1732584193,l=4023233417,p=2562383102,w=271733878,b=3285377520,q,y,P,H,K,Q;e=unescape(encodeURIComponent(e));var F=e.length,Z=[];for(s=0;s<F-3;s+=4)a=e.charCodeAt(s)<<24|e.charCodeAt(s+1)<<16|e.charCodeAt(s+2)<<8|e.charCodeAt(s+3),Z.push(a);switch(F%4){case 0:s=2147483648;break;case 1:s=e.charCodeAt(F-1)<<24|8388608;break;case 2:s=e.charCodeAt(F-2)<<24|e.charCodeAt(F-1)<<16|32768;break;case 3:s=e.charCodeAt(F-3)<<24|e.charCodeAt(F-2)<<16|e.charCodeAt(F-1)<<8|128;break}for(Z.push(s);Z.length%16!==14;)Z.push(0);for(Z.push(F>>>29),Z.push(F<<3&4294967295),n=0;n<Z.length;n+=16){for(s=0;s<16;s++)u[s]=Z[n+s];for(s=16;s<=79;s++)u[s]=t(u[s-3]^u[s-8]^u[s-14]^u[s-16],1);for(q=o,y=l,P=p,H=w,K=b,s=0;s<=19;s++)Q=t(q,5)+(y&P|~y&H)+K+u[s]+1518500249&4294967295,K=H,H=P,P=t(y,30),y=q,q=Q;for(s=20;s<=39;s++)Q=t(q,5)+(y^P^H)+K+u[s]+1859775393&4294967295,K=H,H=P,P=t(y,30),y=q,q=Q;for(s=40;s<=59;s++)Q=t(q,5)+(y&P|y&H|P&H)+K+u[s]+2400959708&4294967295,K=H,H=P,P=t(y,30),y=q,q=Q;for(s=60;s<=79;s++)Q=t(q,5)+(y^P^H)+K+u[s]+3395469782&4294967295,K=H,H=P,P=t(y,30),y=q,q=Q;o=o+q&4294967295,l=l+y&4294967295,p=p+P&4294967295,w=w+H&4294967295,b=b+K&4294967295}return Q=i(o)+i(l)+i(p)+i(w)+i(b),Q.toLowerCase()}});var $p=g((bP,kp)=>{var Rp=Pp();function Lp(r){return r.map(e=>e&&e.uri).filter(Boolean)}function os(r){return["memberSet","memberList","memberChoice"].find(e=>r[e])}function Mp(r){let e=os(r),t=r[e]?Lp(r[e]):[];return{[t.length>1?e:"memberSet"]:t.map(i=>({uri:i}))}}function jp(r){let{from:e,to:t,type:i}=r,n={from:Mp(e||{}),to:Mp(t||{}),type:[i&&i[0]||"http://www.w3.org/2004/02/skos/core#mappingRelation"]};for(let s of["from","to"])if((n[s][os(n[s])]||[]).length==0){let a=r[s+"Scheme"];a&&a.uri&&(n[s+"Scheme"]={uri:a.uri})}return n}function Np(r){let{from:e,to:t}=r,i=[e,t].filter(Boolean).map(n=>Lp(n[os(n)]||[]));return[].concat(...i).sort()}function Up(r){let e=JSON.stringify(jp(r),["from","fromScheme","to","toScheme","type","memberSet","memberList","memberChoice","uri"]);return"urn:jskos:mapping:content:"+Rp(e+`
|
|
10
10
|
`)}function Dp(r){let e=JSON.stringify(Np(r));return"urn:jskos:mapping:members:"+Rp(e+`
|
|
11
|
-
`)}function as(r){let e=(r.identifier||[]).filter(t=>t&&!t.startsWith("urn:jskos:mapping:")).concat([Dp(r),Up(r)]).sort();return Object.assign({},r,{identifier:e})}function Fp(r,e,t){r=r&&as(r),e=e&&as(e);let i=r&&r.identifier?r.identifier.find(s=>s.startsWith(t)):null,n=e&&e.identifier?e.identifier.find(s=>s.startsWith(t)):null;return i==n}function Bp(r,e){return Fp(r,e,"urn:jskos:mapping:content:")}var OC=Bp;function qC(r,e){return Fp(r,e,"urn:jskos:mapping:members:")}kp.exports={mappingContent:jp,mappingMembers:Np,mappingContentIdentifier:Up,mappingMembersIdentifier:Dp,addMappingIdentifiers:as,compareMappings:Bp,compareMappingContent:OC,compareMappingMembers:qC}});var us=g((xP,Wp)=>{function zp(r,e,t){var i=Array.prototype.slice,n=typeof Object.keys=="function"?Object.keys:function(c){var p=[];for(var b in c)p.push(b);return p},s=function(c,p){return c===p?!0:c instanceof Date&&p instanceof Date?c.getTime()===p.getTime():typeof c!="object"&&typeof p!="object"?c==p:o(c,p)};function a(c){return c==null}function u(c){return Object.prototype.toString.call(c)=="[object Arguments]"}function o(c,p){if(a(c)||a(p)||c.prototype!==p.prototype)return!1;if(u(c))return u(p)?(c=i.call(c),p=i.call(p),s(c,p)):!1;try{var b=n(c),w=n(p),q,y}catch(P){return!1}if(b.length!=w.length)return!1;for(b.sort(),w.sort(),y=b.length-1;y>=0;y--)if(b[y]!=w[y])return!1;for(y=b.length-1;y>=0;y--)if(q=b[y],t){let P=t(c[q],p[q],q);if(P===void 0&&(P=zp(c[q],p[q])),!P)return!1}else if(!s(c[q],p[q]))return!1;return!0}return s(r,e)}Wp.exports={get:(r,e,t=void 0)=>{let i=s=>String.prototype.split.call(e,s).filter(Boolean).reduce((a,u)=>a!=null?a[u]:a,r),n=i(/[,[\]]+?/)||i(/[,[\].]+?/);return n===void 0||n===r?t:n},pick:(r,e)=>e.reduce((t,i)=>(r&&r.hasOwnProperty(i)&&(t[i]=r[i]),t),{}),forOwn:(r,e)=>{for(let t in r)r.hasOwnProperty(t)&&e(r[t],t)},isEqualWith:zp,intersection:(...r)=>r.reduce((e,t)=>e.filter(i=>t.includes(i))),isObject:r=>typeof r=="object"&&r!==null,isString:r=>!!(r&&typeof r.valueOf()=="string"),union:(r,e)=>[...new Set([...r,...e])],unionWith:(r,e,t)=>[...r,...e].reduce((i,n)=>(i.findIndex(s=>t(s,n))!==-1||i.push(n),i),[]),omitMod:(r,e)=>{for(let t of e){typeof t=="string"&&(t=t.split("."));for(let i=0;i<t.length-1;i++)r=r[t[i]];delete r[t.pop()]}}}});var fs=g((SP,CC)=>{CC.exports=[{RELEVANCE:"very high",broader:[{uri:"http://www.w3.org/2004/02/skos/core#closeMatch"}],definition:{de:["gleiche Bedeutung"],en:["same meaning"]},notation:["="],prefLabel:{ar:"\u062A\u0637\u0627\u0628\u0642 \u062A\u0627\u0645",be:"\u0434\u0430\u043A\u043B\u0430\u0434\u043D\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u0446\u044C","be-tarask":"\u0434\u0430\u043A\u043B\u0430\u0434\u043D\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",bn:"\u09B9\u09C1\u09AC\u09C1\u09B9\u09C1 \u09AE\u09BF\u09B2",ca:"equival\xE8ncia exacta",cs:"p\u0159esn\xE1 shoda",da:"exact match",de:"exakte \xDCbereinstimmung",en:"exact match",eo:"ekzakta ekvivalento",es:"equivalencia exacta",fi:"vastaava k\xE4site",fr:"\xE9quivalence exacte",gl:"correspondencia exacta",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05DE\u05D3\u05D5\u05D9\u05E7\u05EA",hu:"pontos egyez\xE9s",id:"sama persis",it:"corrispondenza esatta",ja:"\u5B8C\u5168\u4E00\u81F4",lv:"tie\u0161a sakrit\u012Bba",mk:"\u0442\u043E\u0447\u043D\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",ms:"padanan tepat","ms-arab":"\u06A4\u0627\u062F\u0646\u0646 \u062A\u06A4\u062A",nb:"eksakt samsvar",nl:"exacte match",nn:"eksakt samsvar",pl:"dok\u0142adne dopasowanie",pt:"correspond\xEAncia exata",ro:"echivalentul exact",ru:"\u0442\u043E\u0447\u043D\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",sq:"p\xEBrputhje e p\xEBrpikt\xEB",sr:"\u0442\u0430\u0447\u043D\u043E \u043F\u043E\u0434\u0443\u0434\u0430\u0440\u0430\u045A\u0435",sv:"exakt tr\xE4ff",tr:"tam e\u015Fle\u015Fme",uk:"\u0442\u043E\u0447\u043D\u0430 \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u043D\u0456\u0441\u0442\u044C",zh:"\u7CBE\u78BA\u5339\u914D","zh-hans":"\u7CBE\u786E\u5339\u914D","zh-hant":"\u7CBE\u78BA\u5339\u914D"},SHORT:"exact",uri:"http://www.w3.org/2004/02/skos/core#exactMatch"},{RELEVANCE:"high",broader:[{uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}],definition:{de:["in etwa gleiche Bedeutung"],en:["same general idea but not fully identical meaning"]},notation:["\u2248"],prefLabel:{ar:"\u062A\u0637\u0627\u0628\u0642 \u0642\u0631\u064A\u0628","be-tarask":"\u0431\u043B\u0456\u0437\u043A\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",ca:"equival\xE8ncia inexacta",de:"hohe \xDCbereinstimmung",en:"close match",eo:"proksima kongrua\u0135o",es:"equivalencia inexacta",fi:"l\xE4hes vastaava k\xE4site",fr:"quasi-\xE9quivalence",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05E7\u05E8\u05D5\u05D1\u05D4",it:"corrispondenza parziale",mk:"\u0431\u043B\u0438\u0441\u043A\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",ms:"padanan dekat","ms-arab":"\u06A4\u0627\u062F\u0646\u0646 \u062F\u06A9\u062A",nb:"n\xE6rt samsvar",nl:"nabije match",nn:"n\xE6rt samsvar",pl:"cz\u0119\u015Bciowe dopasowanie",pt:"correspond\xEAncia pr\xF3xima",ru:"\u0431\u043B\u0438\u0437\u043A\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",sr:"\u0431\u043B\u0438\u0441\u043A\u043E \u043F\u043E\u043A\u043B\u0430\u043F\u0430\u045A\u0435",sv:"n\xE4ra matchning",tr:"yak\u0131n e\u015Fle\u015Fme","zh-hans":"\u9AD8\u5EA6\u5339\u914D"},SHORT:"close",uri:"http://www.w3.org/2004/02/skos/core#closeMatch"},{RELEVANCE:"medium",broader:[{uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}],definition:{de:["umfassendere Bedeutung"],en:["broader meaning"]},notation:[">"],prefLabel:{"be-tarask":"\u0448\u044B\u0440\u043E\u043A\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",ca:"relaci\xF3 llunyana",de:"allgemeinere Bedeutung",en:"broad match",eo:"malstrikta kongruo",fi:"vastaava laajempi k\xE4site",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05E8\u05D7\u05D1\u05D4",it:"corrispondenza generica",ja:"\u90E8\u5206\u4E00\u81F4",mk:"\u043F\u043E\u0448\u0438\u0440\u043E\u043A\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",nb:"bredere samsvar",nl:"brede match",nn:"breitt samsvar",pl:"dopasowanie poj\u0119cia o szerszym znaczeniu","pt-br":"correspond\xEAncia gen\xE9rica",ru:"\u0431\u043E\u043B\u0435\u0435 \u0448\u0438\u0440\u043E\u043A\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",sr:"\u0443 \u0448\u0438\u0440\u0435\u043C \u0441\u043C\u0438\u0441\u043B\u0443",sv:"bred tr\xE4ff","zh-hans":"\u5E7F\u6CDB\u5339\u914D"},related:[{uri:"http://www.w3.org/2004/02/skos/core#narrowMatch"}],SHORT:"broad",uri:"http://www.w3.org/2004/02/skos/core#broadMatch"},{RELEVANCE:"medium",broader:[{uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}],definition:{en:["more specific meaning"]},notation:["<"],prefLabel:{"be-tarask":"\u0432\u0443\u0437\u043A\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",ca:"relaci\xF3 estreta",de:"spezifischere Bedeutung",en:"narrow match",eo:"strikta kongruo",fi:"vastaava suppeampi k\xE4site",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05E6\u05E8\u05D4",it:"corrispondenza con termine pi\xF9 specifico",mk:"\u043F\u043E\u0442\u0435\u0441\u043D\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",nb:"smalere samsvar",nl:"nauwe match",nn:"snevert samsvar",pl:"dopasowanie poj\u0119cia o w\u0119\u017Cszym znaczeniu","pt-br":"correspond\xEAncia aproximada",ru:"\u0431\u043E\u043B\u0435\u0435 \u0443\u0437\u043A\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",sr:"\u0443 \u0443\u0436\u0435\u043C \u0441\u043C\u0438\u0441\u043B\u0443",sv:"smal tr\xE4ff",ur:"\u0646\u06CC\u0631\u0648 \u0645\u06CC\u0686","zh-hans":"\u6709\u9650\u5339\u914D"},related:[{uri:"http://www.w3.org/2004/02/skos/core#broadMatch"}],SHORT:"narrow",uri:"http://www.w3.org/2004/02/skos/core#narrowMatch"},{RELEVANCE:"low",broader:[{uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}],definition:{de:["assoziative Verkn\xFCpfung unterschiedlicher Bedeutungen"],en:["associative link between meanings"]},notation:["~"],prefLabel:{"be-tarask":"\u0437\u044C\u0432\u044F\u0437\u0430\u043D\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",ca:"parella relacionada",de:"verwandte Bedeutung",en:"related match",eo:"rilata kongruo",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05E7\u05E9\u05D5\u05E8\u05D4",it:"corrispondenza correlata",lv:"saist\u012Bta sakrit\u012Bba",mk:"\u043F\u043E\u0432\u0440\u0437\u0430\u043D\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",ms:"padanan berkaitan","ms-arab":"\u06A4\u0627\u062F\u0646\u0646 \u0628\u0631\u06A9\u0627\u0621\u064A\u062A\u0646",nb:"relatert samsvar",nl:"gerelateerde match",pl:"dopasowanie poj\u0119cia o powi\u0105zanym znaczeniu",ru:"\u0430\u0441\u0441\u043E\u0446\u0438\u0430\u0442\u0438\u0432\u043D\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",tr:"ili\u015Fkili benze\u015Fme",ur:"\u0645\u062A\u0639\u0644\u0642\u06C1 \u0645\u06CC\u0686",vec:"parente\u0142a re\u0142asionada","zh-hans":"\u5173\u8054\u5339\u914D"},SHORT:"related",uri:"http://www.w3.org/2004/02/skos/core#relatedMatch"},{RELEVANCE:"generic",definition:{de:["unbekannter Bedeutungszusammenhang"],en:["unknown type of link between meanings"]},notation:["\u2192"],prefLabel:{ar:"\u0646\u0648\u0639 \u0639\u0644\u0627\u0642\u0629 \u0627\u0644\u062A\u0637\u0628\u064A\u0642",be:"\u0445\u0430\u0440\u0430\u043A\u0442\u044D\u0440\u043D\u0430\u044F \u0430\u0434\u043D\u043E\u0441\u0456\u043D\u0430 \u0430\u0434\u043B\u044E\u0441\u0442\u0440\u0430\u0432\u0430\u043D\u043D\u044F","be-tarask":"\u0445\u0430\u0440\u0430\u043A\u0442\u044D\u0440\u043D\u0430\u044F \u0430\u0434\u043D\u043E\u0441\u0456\u043D\u0430 \u0430\u0434\u043B\u044E\u0441\u0442\u0440\u0430\u0432\u0430\u043D\u044C\u043D\u044F",ca:"relaci\xF3 de mapatge",de:"allgemeine Mapping-Relation",en:"SKOS generic mapping relation",fr:"lien de correspondance SKOS",he:"\u05D9\u05D7\u05E1 \u05DE\u05D9\u05E4\u05D5\u05D9 \u05DB\u05DC\u05DC\u05D9",id:"relasi pemetaan",mk:"\u043F\u0440\u0435\u0441\u043B\u0438\u043A\u0443\u0432\u0430\u0447\u043A\u0438 \u043E\u0434\u043D\u043E\u0441",nb:"generell mappingrelasjon","pt-br":"rela\xE7\xE3o gen\xE9rica de mapeamento",sr:"\u0440\u0435\u043B\u0430\u0446\u0438\u0458\u0430 \u043C\u0430\u043F\u0438\u0440\u0430\u045A\u0430",sv:"mappnings relation",zh:"\u6620\u5C04\u95DC\u4FC2","zh-hant":"\u6620\u5C04\u95DC\u4FC2"},SHORT:"",uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}]});var Gp=g((AP,Hp)=>{var EC=fs(),Ii={Concept:{type:["http://www.w3.org/2004/02/skos/core#Concept"]},ConceptScheme:{type:["http://www.w3.org/2004/02/skos/core#ConceptScheme"]},ConceptMapping:{type:EC.map(r=>r.uri)},ConceptOccurrence:{type:["http://purl.org/cld/cdtype/CatalogueOrIndex"]},Registry:{type:["http://www.w3.org/ns/dcat#Catalog"]},Distribution:{type:["http://www.w3.org/ns/dcat#Distribution"]},Concordance:{type:["http://rdfs.org/ns/void#Linkset","http://rdf-vocabulary.ddialliance.org/xkos#Correspondence"]},Resource:{},Item:{},ConceptBundle:{},Annotation:{type:["Annotation","http://www.w3.org/ns/oa#Annotation"]}},Ei=Object.keys(Ii).reduce((r,e)=>{for(let t of Ii[e].type||[])r[t]=e;return r},{});function IC(r,e=!1){var t;if(typeof r=="string"&&r)r in Ei?t=Ei[r]:(r=r.toLowerCase().replace(/s$/,""),t=Object.keys(Ii).find(i=>{let n=i.toLowerCase();if(n===r||n==="concept"+r)return!0}));else if(typeof r=="object"&&r.type){let i=Array.isArray(r.type)?r.type:[r.type];for(let n of i)if(n in Ei){t=Ei[n];break}}return e&&t?t.toLowerCase().replace(/^concept(.+)/,"$1"):t}Hp.exports={objectTypes:Ii,guessObjectType:IC}});var ls=g((OP,Kp)=>{var TC=/[\\^$.*+?()[\]{}|]/g,PC=r=>r.replace(TC,"\\$&"),MC=/[%ÄÖÜäöü ]/g,cs=class{constructor(e={}){if(Object.assign(this,e),this.notationPattern||(this.notationPattern=".+"),!this.uriPattern&&this.namespace){this.uriPattern="^"+PC(this.namespace);let t=this.notationPattern.replace(MC,encodeURI);this.uriPattern+="("+t+")$"}this.NOTATION_REGEX=RegExp("^"+this.notationPattern+"$"),this.uriPattern&&(this.URI_REGEX=RegExp(this.uriPattern))}isValidNotation(e){return this.NOTATION_REGEX.exec(e)}notationFromUri(e){if(this.URI_REGEX){let t=this.URI_REGEX.exec(e);if(t)return decodeURI(t[1])}}uriFromNotation(e){if(this.uriPattern)return e=encodeURI(e),this.uriPattern.replace(/^\^|\$$/g,"").replace(/\\/g,"").replace(/\(.*\)/,e)}conceptFromUri(e,t={}){let i=this.notationFromUri(e);if(i===void 0)return;let n={uri:e,notation:[i]};return t.inScheme&&(n.inScheme=[{uri:this.uri}]),t.topConcept&&(n.topConceptOf=[{uri:this.uri}]),n}conceptFromNotation(e,t){if(this.isValidNotation(e))return this.conceptFromUri(this.uriFromNotation(e),t)}};Kp.exports=cs});var hs=g((qP,Vp)=>{var RC=us(),Ti={store:null,path:"",defaults:["en"],getLanguages:Jp,selectLanguage:LC};function Jp(){return RC.get(Ti.store,Ti.path)||Ti.defaults}function LC(r){if(!r)return null;for(let e of Jp())if(r[e])return e;for(let e of Object.keys(r))if(e!="-")return e;return null}Vp.exports=Ti});var nd=g((CP,id)=>{var ie=us(),jC=r=>/^[A-Z]*$/.test(r),ot=(r,e)=>e.split(".").reduce((t,i)=>t&&t[i]?t[i]:null,r),NC=r=>((r instanceof Array?r:[r]).forEach(t=>{t["@context"]="https://gbv.github.io/jskos/context.json"}),r),gs=r=>(Object.keys(r).forEach(e=>{jC(e)||e.startsWith("_")?delete r[e]:r[e]!=null&&typeof r[e]=="object"&&(r[e]=gs(r[e]))}),r),UC=gs,Pi=(r,e=[],t=!0)=>{e=e.concat(["ancestors","narrower","broader","mappings","memberList","TOPCONCEPTS","MAPPINGS","PROVIDER"]);let i=Array.isArray(r)?[]:{};for(let n in r)if(!(t&&n[0]=="_")){if(e.includes(n))if(r[n]&&Array.isArray(r[n])){r[n].length>0?i[n]=[null]:i[n]=[];continue}else{i[n]=null;continue}if(n=="inScheme"){let s=[];for(let a of r.inScheme){let u={uri:a.uri};a.notation&&(u.notation=a.notation),a.prefLabel&&(u.prefLabel=a.prefLabel),s.push(u)}i.inScheme=s;continue}r[n]!=null&&typeof r[n]=="object"?i[n]=Pi(r[n]):i[n]=r[n]}return i},DC=Pi,ps=r=>r?(r.uri?[r.uri]:[]).concat(r.identifier||[]):[],vr=(r,e)=>{if(r==null&&e==null)return!0;let t=s=>s.replace("http://").replace("https://"),i=ps(r).map(t),n=ps(e).map(t);return ie.intersection(i,n).length>0},FC=vr,BC=vr,kC=vr,$C=r=>ie.get(r,"type",[]).includes("http://www.w3.org/2004/02/skos/core#Concept")||ie.get(r,"inScheme")!=null||ie.get(r,"topConceptOf")!=null,Yp=r=>ie.get(r,"type",[]).includes("http://www.w3.org/2004/02/skos/core#ConceptScheme"),Xp=(r,e)=>{if(!r||!e)return!1;for(let t of e)if(vr(r,t))return!0;return!1},zC=Xp,WC=(r,e=!1)=>r.sort((t,i)=>{let n=ie.get(t,"notation[0]"),s=ie.get(i,"notation[0]");if(n&&s&&(n=n.toLowerCase(),s=s.toLowerCase()),e&&(n=parseFloat(n)||n,s=parseFloat(s)||s),(!n||!s||n==s)&&(n=t.uri,s=i.uri),n&&s){if(n>s)return 1;if(n<s)return-1}return 0}),HC=r=>{let e=["notation[0]",["prefLabel.de","prefLabel.en"],"uri"];return r.sort((t,i)=>{for(let n of e){let s,a;if(Array.isArray(n))for(let u of n)s=s||ie.get(t,u),a=a||ie.get(i,u);else s=ie.get(t,n),a=ie.get(i,n);if(s!=null&&a!=null){if(s=s.toLowerCase(),a=a.toLowerCase(),s>a)return 1;if(s<a)return-1}}return 0})},GC=r=>{let e=ie.pick(Pi(r),["from","to","fromScheme","toScheme","creator","contributor","type","created","modified","note","identifier","uri","partOf"]);for(let t of[e.from,e.to])ie.forOwn(t,(i,n)=>{let s=[];for(let a of i)s.push(ie.pick(a,["uri","notation"]));t[n]=s});return e.fromScheme&&(e.fromScheme=ie.pick(e.fromScheme,["uri","notation"])),e.toScheme&&(e.toScheme=ie.pick(e.toScheme,["uri","notation"])),e.partOf&&(e.partOf=e.partOf.map(t=>ie.pick(t,["uri"]))),e},Zp=fs(),Bt=function(r){for(let e of Zp)if(r==e.uri)return e;return null},Qp=Bt("http://www.w3.org/2004/02/skos/core#mappingRelation"),KC=function(r,e=Qp){let t;return Array.isArray(r)&&r.length>0?t=r[0]:t=r,Bt(t)||e},JC=(r,e={})=>{let{language:t}=e,i=ot(r,"from.memberSet.0.notation.0"),n=ot(r,"to.memberSet.0.notation.0");i=i!==null?i:"",n=n!==null?n:"";let s=Bt(ot(r,"type.0"));s=s?s.SHORT:"";let a="",u="",o="";return t&&(a=ot(r,`from.memberSet.0.prefLabel.${t}`),u=ot(r,`to.memberSet.0.prefLabel.${t}`),o=ot(r,`creator.0.prefLabel.${t}`)),{fromNotation:i,toNotation:n,fromLabel:a,toLabel:u,type:s,creator:o}},VC=(r={})=>{let e=r.delimiter||",",t=r.quoteChar||'"',i=r.lineTerminator||`
|
|
12
|
-
`,n=t+t,s=a=>t+(a==null?"":a.split(t).join(n))+t;return a=>a.map(s).join(e)+i},jr=(r,e)=>{let t=[];for(let i of["from","to"])(e==null||i===e)&&(t=t.concat(ie.get(r,`${i}.memberSet`)||ie.get(r,`${i}.memberChoice`)||ie.get(r,`${i}.memberList`)||[]));return t.filter(i=>i!=null)},YC=(r={})=>{let e=VC(r),t=r.language||"en";r.type==null&&(r.type=!0);let i=a=>{a=a||[];let u=[];for(let o of["from","to"]){r.schemes&&u.push(`${o}Scheme`);let c=Math.max(...a.map(p=>jr(p,o).length),1);for(let p=0;p<c;p+=1)u.push(`${o}Notation${p?p+1:""}`),r.labels&&u.push(`${o}Label${p?p+1:""}`)}return r.type&&u.push("type"),r.creator&&u.push("creator"),e(u)},n=(a,u={})=>{let o=[];for(let c of["from","to"]){r.schemes&&o.push(ie.get(a,`${c}Scheme.notation[0]`,""));let p=jr(a,c),b=u[`${c}Count`];b==null&&(b=p.length),b=Math.max(b,1);for(let w=0;w<b;w+=1)o.push(ie.get(p[w],"notation[0]","")),r.labels&&o.push(ie.get(p[w],`prefLabel.${t}`,""))}return r.type&&o.push(ie.get(Bt(ie.get(a,"type[0]")),"SHORT","")),r.creator&&o.push(ie.get(a,`creator[0].prefLabel.${t}`)),e(o)};return{header:i,fromMapping:n,fromMappings:(a,u={header:!0})=>{let o="";u.header&&(o+=i(a));let c={fromCount:Math.max(...a.map(p=>jr(p,"from").length)),toCount:Math.max(...a.map(p=>jr(p,"to").length))};for(let p of a)o+=n(p,c);return o}}};function XC(r,e){return ie.isEqualWith(r,e,(t,i,n)=>{let s={[n]:t},a={[n]:i};if(n=="from"||n=="to")return ie.isEqualWith(Object.getOwnPropertyNames(ie.get(t,n,{})),Object.getOwnPropertyNames(ie.get(i,n,{})))?ie.isEqualWith(jr(s,n),jr(a,n),(u,o,c)=>{if(c!=null)return vr(u,o)}):!1;if(n=="fromScheme"||n=="toScheme")return vr(t,i)})}var{objectTypes:ZC,guessObjectType:ds}=Gp(),QC=(r,e)=>{let t=ds(r),i=ds(e);return!(t&&i&&t!=i)},ed=r=>{Array.isArray(r)&&r.sort((e,t)=>e===null?1:t===null?-1:0)},rd=(r,e)=>(!r||!e||((Array.isArray(r.identifier)||Array.isArray(e.identifier))&&(r.identifier=ie.union(r.identifier||[],e.identifier||[])),!r.uri&&e.uri&&(r.uri=e.uri),r.uri&&e.uri&&r.uri!=e.uri&&!(r.identifier||[]).includes(e.uri)&&(r.identifier=(r.identifier||[]).concat([e.uri])),Array.isArray(r.identifier)&&r.uri&&(r.identifier=r.identifier.filter(t=>t!==r.uri)),(r.identifier||[]).length==0&&delete r.identifier,ed(r.identifier)),r),td=(r,e,t)=>{if(!r||!e)return r||e;t=t||{};let i=t._path||"",n=t.detectMismatch||[],s=t.skipPaths||[],a={};return ie.forOwn(r,(u,o)=>{if(!s.includes(i+o))if(Array.isArray(u)&&Array.isArray(e[o]))a[o]=ie.unionWith(u,e[o],(c,p)=>ie.isObject(c)&&ie.isObject(p)?vr(c,p):c===p),ed(a[o]);else if(ie.isObject(u)&&ie.isObject(e[o]))a[o]=td(u,e[o],Object.assign({_path:`${i}${o}.`},t));else{if(u&&e[o]&&n.includes(i+o)&&!ie.isEqualWith(u,e[o]))throw new Error("Property mismatch in "+i+o);a[o]=u}}),ie.forOwn(e,(u,o)=>{r[o]||(a[o]=u)}),i==""&&ie.omitMod(a,s),t.mergeUris&&rd(a,e),a},ms=r=>Array.isArray(r)?r.map(e=>ms(e)):ie.isObject(r)?(ie.forOwn(r,(e,t)=>{r[t]=ms(e)}),r):ie.isString(r)?r.normalize():r,eE=r=>{var e=/^[A-Za-z][A-Za-z0-9+\-.]*:(?:\/\/(?:(?:[A-Za-z0-9\-._~!$&'()*+,;=:]|%[0-9A-Fa-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9A-Fa-f]{1,4}:){6}|::(?:[0-9A-Fa-f]{1,4}:){5}|(?:[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,1}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){3}|(?:(?:[0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){2}|(?:(?:[0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}:|(?:(?:[0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})?::)(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|(?:(?:[0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})?::)|[Vv][0-9A-Fa-f]+\.[A-Za-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|(?:[A-Za-z0-9\-._~!$&'()*+,;=]|%[0-9A-Fa-f]{2})*)(?::[0-9]*)?(?:\/(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*|\/(?:(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*)?|(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*|)(?:\?(?:[A-Za-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*)?(?:#(?:[A-Za-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*)?$/;return r.match(e)!==null},rE={mappingsByConcepts:(r,e,t)=>{let i=["memberSet","memberList","memberChoice"],n,s;for(let a of i)n=n||ie.get(r,t+"."+a+"[0].notation[0]"),s=s||ie.get(e,t+"."+a+"[0].notation[0]");return n==null||n<s?-1:s==null||n>s?1:0}},tE=(r,e)=>!r||!e?!1:[r.uri].concat(Object.values(r.identities||{}).map(t=>t.uri)).filter(t=>t!=null).includes(ie.get(e,"creator[0].uri")),iE=ls(),nE=hs();function sE(r,e){let t;if(r&&r.notation&&r.notation.length)t=r.notation[0],(Yp(r)||e=="scheme")&&(t=t.toUpperCase());else if(r&&r.inScheme&&r.inScheme[0]&&r.uri)try{t=new iE(r&&r.inScheme&&r.inScheme[0]).notationFromUri(r.uri)}catch(i){}return t||""}function vs(r,e,{language:t}={}){let i=r&&e?r[e]:r;return i&&(i[t]||(t=nE.selectLanguage(i),t))?i[t]:null}function aE(r,e={}){e=e||{};let t=e.fallbackToUri==null?!0:e.fallbackToUri;return ie.get(r,`prefLabel.${e.language}`)||vs(r,"prefLabel",e)||(t&&r&&r.uri?r.uri:"")}function oE(r,e={}){e=e||{};let t=ie.get(r,`definition.${e.language}`)||vs(r,"definition",e)||[];return ie.isString(t)&&(t=[t]),t}function uE(r){return ie.get(r,"stored",ie.get(r,"constructor.stored",ie.get(r,"provider.constructor.stored",!1)))}function fE(r){return ie.isString(r.creator)?r.creator:r.creator&&r.creator.id}function cE(r){return ie.get(r,"creator.name")||""}function lE(r,e){return!!(r&&ie.isString(r.creator)?e&&e.includes(r.creator):e&&r.creator&&e.includes(r.creator.id))}id.exports={addContext:NC,clean:gs,cleanJSKOS:UC,copyDeep:Pi,deepCopy:DC,getAllUris:ps,compare:vr,compareObjects:FC,compareSchemes:BC,compareConcepts:kC,isConcept:$C,isScheme:Yp,isContainedIn:Xp,isSchemeInList:zC,sortConcepts:WC,sortSchemes:HC,minifyMapping:GC,mappingTypes:Zp,mappingTypeByUri:Bt,mappingTypeByType:KC,flattenMapping:JC,mappingCSV:YC,defaultMappingType:Qp,conceptsOfMapping:jr,compareMappingsDeep:XC,objectTypes:ZC,guessObjectType:ds,matchObjectTypes:QC,mergeUris:rd,merge:td,normalize:ms,isValidUri:eE,compareFunctions:rE,userOwnsMapping:tE,notation:sE,languageMapContent:vs,prefLabel:aE,definition:oE,mappingRegistryIsStored:uE,annotationCreatorUri:fE,annotationCreatorName:cE,annotationCreatorMatches:lE}});var He=g((EP,sd)=>{var hE=$p(),pE=nd(),dE=ls(),mE=hs();sd.exports=Object.assign({ConceptScheme:dE,languagePreference:mE},hE,pE)});var od=g((ad,_s)=>{(function(r){if(typeof ad=="object"&&typeof _s!="undefined")_s.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var e;typeof window!="undefined"?e=window:typeof global!="undefined"?e=global:typeof self!="undefined"?e=self:e=this,e.localforage=r()}})(function(){var r,e,t;return function i(n,s,a){function u(p,b){if(!s[p]){if(!n[p]){var w=typeof dt=="function"&&dt;if(!b&&w)return w(p,!0);if(o)return o(p,!0);var q=new Error("Cannot find module '"+p+"'");throw q.code="MODULE_NOT_FOUND",q}var y=s[p]={exports:{}};n[p][0].call(y.exports,function(P){var H=n[p][1][P];return u(H||P)},y,y.exports,i,n,s,a)}return s[p].exports}for(var o=typeof dt=="function"&&dt,c=0;c<a.length;c++)u(a[c]);return u}({1:[function(i,n,s){(function(a){"use strict";var u=a.MutationObserver||a.WebKitMutationObserver,o;if(u){var c=0,p=new u(P),b=a.document.createTextNode("");p.observe(b,{characterData:!0}),o=function(){b.data=c=++c%2}}else if(!a.setImmediate&&typeof a.MessageChannel!="undefined"){var w=new a.MessageChannel;w.port1.onmessage=P,o=function(){w.port2.postMessage(0)}}else"document"in a&&"onreadystatechange"in a.document.createElement("script")?o=function(){var K=a.document.createElement("script");K.onreadystatechange=function(){P(),K.onreadystatechange=null,K.parentNode.removeChild(K),K=null},a.document.documentElement.appendChild(K)}:o=function(){setTimeout(P,0)};var q,y=[];function P(){q=!0;for(var K,Q,F=y.length;F;){for(Q=y,y=[],K=-1;++K<F;)Q[K]();F=y.length}q=!1}n.exports=H;function H(K){y.push(K)===1&&!q&&o()}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],2:[function(i,n,s){"use strict";var a=i(1);function u(){}var o={},c=["REJECTED"],p=["FULFILLED"],b=["PENDING"];n.exports=w;function w(O){if(typeof O!="function")throw new TypeError("resolver must be a function");this.state=b,this.queue=[],this.outcome=void 0,O!==u&&H(this,O)}w.prototype.catch=function(O){return this.then(null,O)},w.prototype.then=function(O,ee){if(typeof O!="function"&&this.state===p||typeof ee!="function"&&this.state===c)return this;var G=new this.constructor(u);if(this.state!==b){var de=this.state===p?O:ee;y(G,de,this.outcome)}else this.queue.push(new q(G,O,ee));return G};function q(O,ee,G){this.promise=O,typeof ee=="function"&&(this.onFulfilled=ee,this.callFulfilled=this.otherCallFulfilled),typeof G=="function"&&(this.onRejected=G,this.callRejected=this.otherCallRejected)}q.prototype.callFulfilled=function(O){o.resolve(this.promise,O)},q.prototype.otherCallFulfilled=function(O){y(this.promise,this.onFulfilled,O)},q.prototype.callRejected=function(O){o.reject(this.promise,O)},q.prototype.otherCallRejected=function(O){y(this.promise,this.onRejected,O)};function y(O,ee,G){a(function(){var de;try{de=ee(G)}catch(qe){return o.reject(O,qe)}de===O?o.reject(O,new TypeError("Cannot resolve promise with itself")):o.resolve(O,de)})}o.resolve=function(O,ee){var G=K(P,ee);if(G.status==="error")return o.reject(O,G.value);var de=G.value;if(de)H(O,de);else{O.state=p,O.outcome=ee;for(var qe=-1,ve=O.queue.length;++qe<ve;)O.queue[qe].callFulfilled(ee)}return O},o.reject=function(O,ee){O.state=c,O.outcome=ee;for(var G=-1,de=O.queue.length;++G<de;)O.queue[G].callRejected(ee);return O};function P(O){var ee=O&&O.then;if(O&&(typeof O=="object"||typeof O=="function")&&typeof ee=="function")return function(){ee.apply(O,arguments)}}function H(O,ee){var G=!1;function de(Te){G||(G=!0,o.reject(O,Te))}function qe(Te){G||(G=!0,o.resolve(O,Te))}function ve(){ee(qe,de)}var Ne=K(ve);Ne.status==="error"&&de(Ne.value)}function K(O,ee){var G={};try{G.value=O(ee),G.status="success"}catch(de){G.status="error",G.value=de}return G}w.resolve=Q;function Q(O){return O instanceof this?O:o.resolve(new this(u),O)}w.reject=F;function F(O){var ee=new this(u);return o.reject(ee,O)}w.all=Z;function Z(O){var ee=this;if(Object.prototype.toString.call(O)!=="[object Array]")return this.reject(new TypeError("must be an array"));var G=O.length,de=!1;if(!G)return this.resolve([]);for(var qe=new Array(G),ve=0,Ne=-1,Te=new this(u);++Ne<G;)Ke(O[Ne],Ne);return Te;function Ke(cr,Er){ee.resolve(cr).then(ze,function(lr){de||(de=!0,o.reject(Te,lr))});function ze(lr){qe[Er]=lr,++ve===G&&!de&&(de=!0,o.resolve(Te,qe))}}}w.race=te;function te(O){var ee=this;if(Object.prototype.toString.call(O)!=="[object Array]")return this.reject(new TypeError("must be an array"));var G=O.length,de=!1;if(!G)return this.resolve([]);for(var qe=-1,ve=new this(u);++qe<G;)Ne(O[qe]);return ve;function Ne(Te){ee.resolve(Te).then(function(Ke){de||(de=!0,o.resolve(ve,Ke))},function(Ke){de||(de=!0,o.reject(ve,Ke))})}}},{1:1}],3:[function(i,n,s){(function(a){"use strict";typeof a.Promise!="function"&&(a.Promise=i(2))}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{2:2}],4:[function(i,n,s){"use strict";var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f};function u(f,v){if(!(f instanceof v))throw new TypeError("Cannot call a class as a function")}function o(){try{if(typeof indexedDB!="undefined")return indexedDB;if(typeof webkitIndexedDB!="undefined")return webkitIndexedDB;if(typeof mozIndexedDB!="undefined")return mozIndexedDB;if(typeof OIndexedDB!="undefined")return OIndexedDB;if(typeof msIndexedDB!="undefined")return msIndexedDB}catch(f){return}}var c=o();function p(){try{if(!c||!c.open)return!1;var f=typeof openDatabase!="undefined"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),v=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!f||v)&&typeof indexedDB!="undefined"&&typeof IDBKeyRange!="undefined"}catch(l){return!1}}function b(f,v){f=f||[],v=v||{};try{return new Blob(f,v)}catch(_){if(_.name!=="TypeError")throw _;for(var l=typeof BlobBuilder!="undefined"?BlobBuilder:typeof MSBlobBuilder!="undefined"?MSBlobBuilder:typeof MozBlobBuilder!="undefined"?MozBlobBuilder:WebKitBlobBuilder,x=new l,S=0;S<f.length;S+=1)x.append(f[S]);return x.getBlob(v.type)}}typeof Promise=="undefined"&&i(3);var w=Promise;function q(f,v){v&&f.then(function(l){v(null,l)},function(l){v(l)})}function y(f,v,l){typeof v=="function"&&f.then(v),typeof l=="function"&&f.catch(l)}function P(f){return typeof f!="string"&&(console.warn(f+" used as a key, but it is not a string."),f=String(f)),f}function H(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var K="local-forage-detect-blob-support",Q=void 0,F={},Z=Object.prototype.toString,te="readonly",O="readwrite";function ee(f){for(var v=f.length,l=new ArrayBuffer(v),x=new Uint8Array(l),S=0;S<v;S++)x[S]=f.charCodeAt(S);return l}function G(f){return new w(function(v){var l=f.transaction(K,O),x=b([""]);l.objectStore(K).put(x,"key"),l.onabort=function(S){S.preventDefault(),S.stopPropagation(),v(!1)},l.oncomplete=function(){var S=navigator.userAgent.match(/Chrome\/(\d+)/),_=navigator.userAgent.match(/Edge\//);v(_||!S||parseInt(S[1],10)>=43)}}).catch(function(){return!1})}function de(f){return typeof Q=="boolean"?w.resolve(Q):G(f).then(function(v){return Q=v,Q})}function qe(f){var v=F[f.name],l={};l.promise=new w(function(x,S){l.resolve=x,l.reject=S}),v.deferredOperations.push(l),v.dbReady?v.dbReady=v.dbReady.then(function(){return l.promise}):v.dbReady=l.promise}function ve(f){var v=F[f.name],l=v.deferredOperations.pop();if(l)return l.resolve(),l.promise}function Ne(f,v){var l=F[f.name],x=l.deferredOperations.pop();if(x)return x.reject(v),x.promise}function Te(f,v){return new w(function(l,x){if(F[f.name]=F[f.name]||m(),f.db)if(v)qe(f),f.db.close();else return l(f.db);var S=[f.name];v&&S.push(f.version);var _=c.open.apply(c,S);v&&(_.onupgradeneeded=function(E){var L=_.result;try{L.createObjectStore(f.storeName),E.oldVersion<=1&&L.createObjectStore(K)}catch(U){if(U.name==="ConstraintError")console.warn('The database "'+f.name+'" has been upgraded from version '+E.oldVersion+" to version "+E.newVersion+', but the storage "'+f.storeName+'" already exists.');else throw U}}),_.onerror=function(E){E.preventDefault(),x(_.error)},_.onsuccess=function(){var E=_.result;E.onversionchange=function(L){L.target.close()},l(E),ve(f)}})}function Ke(f){return Te(f,!1)}function cr(f){return Te(f,!0)}function Er(f,v){if(!f.db)return!0;var l=!f.db.objectStoreNames.contains(f.storeName),x=f.version<f.db.version,S=f.version>f.db.version;if(x&&(f.version!==v&&console.warn('The database "'+f.name+`" can't be downgraded from version `+f.db.version+" to version "+f.version+"."),f.version=f.db.version),S||l){if(l){var _=f.db.version+1;_>f.version&&(f.version=_)}return!0}return!1}function ze(f){return new w(function(v,l){var x=new FileReader;x.onerror=l,x.onloadend=function(S){var _=btoa(S.target.result||"");v({__local_forage_encoded_blob:!0,data:_,type:f.type})},x.readAsBinaryString(f)})}function lr(f){var v=ee(atob(f.data));return b([v],{type:f.type})}function sr(f){return f&&f.__local_forage_encoded_blob}function Bi(f){var v=this,l=v._initReady().then(function(){var x=F[v._dbInfo.name];if(x&&x.dbReady)return x.dbReady});return y(l,f,f),l}function h(f){qe(f);for(var v=F[f.name],l=v.forages,x=0;x<l.length;x++){var S=l[x];S._dbInfo.db&&(S._dbInfo.db.close(),S._dbInfo.db=null)}return f.db=null,Ke(f).then(function(_){return f.db=_,Er(f)?cr(f):_}).then(function(_){f.db=v.db=_;for(var E=0;E<l.length;E++)l[E]._dbInfo.db=_}).catch(function(_){throw Ne(f,_),_})}function d(f,v,l,x){x===void 0&&(x=1);try{var S=f.db.transaction(f.storeName,v);l(null,S)}catch(_){if(x>0&&(!f.db||_.name==="InvalidStateError"||_.name==="NotFoundError"))return w.resolve().then(function(){if(!f.db||_.name==="NotFoundError"&&!f.db.objectStoreNames.contains(f.storeName)&&f.version<=f.db.version)return f.db&&(f.version=f.db.version+1),cr(f)}).then(function(){return h(f).then(function(){d(f,v,l,x-1)})}).catch(l);l(_)}}function m(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function A(f){var v=this,l={db:null};if(f)for(var x in f)l[x]=f[x];var S=F[l.name];S||(S=m(),F[l.name]=S),S.forages.push(v),v._initReady||(v._initReady=v.ready,v.ready=Bi);var _=[];function E(){return w.resolve()}for(var L=0;L<S.forages.length;L++){var U=S.forages[L];U!==v&&_.push(U._initReady().catch(E))}var D=S.forages.slice(0);return w.all(_).then(function(){return l.db=S.db,Ke(l)}).then(function(k){return l.db=k,Er(l,v._defaultConfig.version)?cr(l):k}).then(function(k){l.db=S.db=k,v._dbInfo=l;for(var X=0;X<D.length;X++){var ue=D[X];ue!==v&&(ue._dbInfo.db=l.db,ue._dbInfo.version=l.version)}})}function C(f,v){var l=this;f=P(f);var x=new w(function(S,_){l.ready().then(function(){d(l._dbInfo,te,function(E,L){if(E)return _(E);try{var U=L.objectStore(l._dbInfo.storeName),D=U.get(f);D.onsuccess=function(){var k=D.result;k===void 0&&(k=null),sr(k)&&(k=lr(k)),S(k)},D.onerror=function(){_(D.error)}}catch(k){_(k)}})}).catch(_)});return q(x,v),x}function I(f,v){var l=this,x=new w(function(S,_){l.ready().then(function(){d(l._dbInfo,te,function(E,L){if(E)return _(E);try{var U=L.objectStore(l._dbInfo.storeName),D=U.openCursor(),k=1;D.onsuccess=function(){var X=D.result;if(X){var ue=X.value;sr(ue)&&(ue=lr(ue));var pe=f(ue,X.key,k++);pe!==void 0?S(pe):X.continue()}else S()},D.onerror=function(){_(D.error)}}catch(X){_(X)}})}).catch(_)});return q(x,v),x}function M(f,v,l){var x=this;f=P(f);var S=new w(function(_,E){var L;x.ready().then(function(){return L=x._dbInfo,Z.call(v)==="[object Blob]"?de(L.db).then(function(U){return U?v:ze(v)}):v}).then(function(U){d(x._dbInfo,O,function(D,k){if(D)return E(D);try{var X=k.objectStore(x._dbInfo.storeName);U===null&&(U=void 0);var ue=X.put(U,f);k.oncomplete=function(){U===void 0&&(U=null),_(U)},k.onabort=k.onerror=function(){var pe=ue.error?ue.error:ue.transaction.error;E(pe)}}catch(pe){E(pe)}})}).catch(E)});return q(S,l),S}function T(f,v){var l=this;f=P(f);var x=new w(function(S,_){l.ready().then(function(){d(l._dbInfo,O,function(E,L){if(E)return _(E);try{var U=L.objectStore(l._dbInfo.storeName),D=U.delete(f);L.oncomplete=function(){S()},L.onerror=function(){_(D.error)},L.onabort=function(){var k=D.error?D.error:D.transaction.error;_(k)}}catch(k){_(k)}})}).catch(_)});return q(x,v),x}function N(f){var v=this,l=new w(function(x,S){v.ready().then(function(){d(v._dbInfo,O,function(_,E){if(_)return S(_);try{var L=E.objectStore(v._dbInfo.storeName),U=L.clear();E.oncomplete=function(){x()},E.onabort=E.onerror=function(){var D=U.error?U.error:U.transaction.error;S(D)}}catch(D){S(D)}})}).catch(S)});return q(l,f),l}function B(f){var v=this,l=new w(function(x,S){v.ready().then(function(){d(v._dbInfo,te,function(_,E){if(_)return S(_);try{var L=E.objectStore(v._dbInfo.storeName),U=L.count();U.onsuccess=function(){x(U.result)},U.onerror=function(){S(U.error)}}catch(D){S(D)}})}).catch(S)});return q(l,f),l}function Y(f,v){var l=this,x=new w(function(S,_){if(f<0){S(null);return}l.ready().then(function(){d(l._dbInfo,te,function(E,L){if(E)return _(E);try{var U=L.objectStore(l._dbInfo.storeName),D=!1,k=U.openKeyCursor();k.onsuccess=function(){var X=k.result;if(!X){S(null);return}f===0||D?S(X.key):(D=!0,X.advance(f))},k.onerror=function(){_(k.error)}}catch(X){_(X)}})}).catch(_)});return q(x,v),x}function V(f){var v=this,l=new w(function(x,S){v.ready().then(function(){d(v._dbInfo,te,function(_,E){if(_)return S(_);try{var L=E.objectStore(v._dbInfo.storeName),U=L.openKeyCursor(),D=[];U.onsuccess=function(){var k=U.result;if(!k){x(D);return}D.push(k.key),k.continue()},U.onerror=function(){S(U.error)}}catch(k){S(k)}})}).catch(S)});return q(l,f),l}function z(f,v){v=H.apply(this,arguments);var l=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||l.name,f.storeName=f.storeName||l.storeName);var x=this,S;if(!f.name)S=w.reject("Invalid arguments");else{var _=f.name===l.name&&x._dbInfo.db,E=_?w.resolve(x._dbInfo.db):Ke(f).then(function(L){var U=F[f.name],D=U.forages;U.db=L;for(var k=0;k<D.length;k++)D[k]._dbInfo.db=L;return L});f.storeName?S=E.then(function(L){if(!!L.objectStoreNames.contains(f.storeName)){var U=L.version+1;qe(f);var D=F[f.name],k=D.forages;L.close();for(var X=0;X<k.length;X++){var ue=k[X];ue._dbInfo.db=null,ue._dbInfo.version=U}var pe=new w(function(me,Oe){var Se=c.open(f.name,U);Se.onerror=function(Ge){var ht=Se.result;ht.close(),Oe(Ge)},Se.onupgradeneeded=function(){var Ge=Se.result;Ge.deleteObjectStore(f.storeName)},Se.onsuccess=function(){var Ge=Se.result;Ge.close(),me(Ge)}});return pe.then(function(me){D.db=me;for(var Oe=0;Oe<k.length;Oe++){var Se=k[Oe];Se._dbInfo.db=me,ve(Se._dbInfo)}}).catch(function(me){throw(Ne(f,me)||w.resolve()).catch(function(){}),me})}}):S=E.then(function(L){qe(f);var U=F[f.name],D=U.forages;L.close();for(var k=0;k<D.length;k++){var X=D[k];X._dbInfo.db=null}var ue=new w(function(pe,me){var Oe=c.deleteDatabase(f.name);Oe.onerror=function(){var Se=Oe.result;Se&&Se.close(),me(Oe.error)},Oe.onblocked=function(){console.warn('dropInstance blocked for database "'+f.name+'" until all open connections are closed')},Oe.onsuccess=function(){var Se=Oe.result;Se&&Se.close(),pe(Se)}});return ue.then(function(pe){U.db=pe;for(var me=0;me<D.length;me++){var Oe=D[me];ve(Oe._dbInfo)}}).catch(function(pe){throw(Ne(f,pe)||w.resolve()).catch(function(){}),pe})})}return q(S,v),S}var ae={_driver:"asyncStorage",_initStorage:A,_support:p(),iterate:I,getItem:C,setItem:M,removeItem:T,clear:N,length:B,key:Y,keys:V,dropInstance:z};function se(){return typeof openDatabase=="function"}var ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ye="~~local_forage_type~",ge=/^~~local_forage_type~([^~]+)~/,ne="__lfsc__:",oe=ne.length,he="arbf",Ue="blob",Ce="si08",Pe="ui08",Je="uic8",kr="si16",Ir="si32",$r="ur16",Tr="ui32",Ht="fl32",Pr="fl64",Es=oe+he.length,Is=Object.prototype.toString;function Ts(f){var v=f.length*.75,l=f.length,x,S=0,_,E,L,U;f[f.length-1]==="="&&(v--,f[f.length-2]==="="&&v--);var D=new ArrayBuffer(v),k=new Uint8Array(D);for(x=0;x<l;x+=4)_=ce.indexOf(f[x]),E=ce.indexOf(f[x+1]),L=ce.indexOf(f[x+2]),U=ce.indexOf(f[x+3]),k[S++]=_<<2|E>>4,k[S++]=(E&15)<<4|L>>2,k[S++]=(L&3)<<6|U&63;return D}function ki(f){var v=new Uint8Array(f),l="",x;for(x=0;x<v.length;x+=3)l+=ce[v[x]>>2],l+=ce[(v[x]&3)<<4|v[x+1]>>4],l+=ce[(v[x+1]&15)<<2|v[x+2]>>6],l+=ce[v[x+2]&63];return v.length%3===2?l=l.substring(0,l.length-1)+"=":v.length%3===1&&(l=l.substring(0,l.length-2)+"=="),l}function gd(f,v){var l="";if(f&&(l=Is.call(f)),f&&(l==="[object ArrayBuffer]"||f.buffer&&Is.call(f.buffer)==="[object ArrayBuffer]")){var x,S=ne;f instanceof ArrayBuffer?(x=f,S+=he):(x=f.buffer,l==="[object Int8Array]"?S+=Ce:l==="[object Uint8Array]"?S+=Pe:l==="[object Uint8ClampedArray]"?S+=Je:l==="[object Int16Array]"?S+=kr:l==="[object Uint16Array]"?S+=$r:l==="[object Int32Array]"?S+=Ir:l==="[object Uint32Array]"?S+=Tr:l==="[object Float32Array]"?S+=Ht:l==="[object Float64Array]"?S+=Pr:v(new Error("Failed to get type for BinaryArray"))),v(S+ki(x))}else if(l==="[object Blob]"){var _=new FileReader;_.onload=function(){var E=ye+f.type+"~"+ki(this.result);v(ne+Ue+E)},_.readAsArrayBuffer(f)}else try{v(JSON.stringify(f))}catch(E){console.error("Couldn't convert value into a JSON string: ",f),v(null,E)}}function vd(f){if(f.substring(0,oe)!==ne)return JSON.parse(f);var v=f.substring(Es),l=f.substring(oe,Es),x;if(l===Ue&&ge.test(v)){var S=v.match(ge);x=S[1],v=v.substring(S[0].length)}var _=Ts(v);switch(l){case he:return _;case Ue:return b([_],{type:x});case Ce:return new Int8Array(_);case Pe:return new Uint8Array(_);case Je:return new Uint8ClampedArray(_);case kr:return new Int16Array(_);case $r:return new Uint16Array(_);case Ir:return new Int32Array(_);case Tr:return new Uint32Array(_);case Ht:return new Float32Array(_);case Pr:return new Float64Array(_);default:throw new Error("Unkown type: "+l)}}var $i={serialize:gd,deserialize:vd,stringToBuffer:Ts,bufferToString:ki};function Ps(f,v,l,x){f.executeSql("CREATE TABLE IF NOT EXISTS "+v.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],l,x)}function yd(f){var v=this,l={db:null};if(f)for(var x in f)l[x]=typeof f[x]!="string"?f[x].toString():f[x];var S=new w(function(_,E){try{l.db=openDatabase(l.name,String(l.version),l.description,l.size)}catch(L){return E(L)}l.db.transaction(function(L){Ps(L,l,function(){v._dbInfo=l,_()},function(U,D){E(D)})},E)});return l.serializer=$i,S}function hr(f,v,l,x,S,_){f.executeSql(l,x,S,function(E,L){L.code===L.SYNTAX_ERR?E.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[v.storeName],function(U,D){D.rows.length?_(U,L):Ps(U,v,function(){U.executeSql(l,x,S,_)},_)},_):_(E,L)},_)}function _d(f,v){var l=this;f=P(f);var x=new w(function(S,_){l.ready().then(function(){var E=l._dbInfo;E.db.transaction(function(L){hr(L,E,"SELECT * FROM "+E.storeName+" WHERE key = ? LIMIT 1",[f],function(U,D){var k=D.rows.length?D.rows.item(0).value:null;k&&(k=E.serializer.deserialize(k)),S(k)},function(U,D){_(D)})})}).catch(_)});return q(x,v),x}function wd(f,v){var l=this,x=new w(function(S,_){l.ready().then(function(){var E=l._dbInfo;E.db.transaction(function(L){hr(L,E,"SELECT * FROM "+E.storeName,[],function(U,D){for(var k=D.rows,X=k.length,ue=0;ue<X;ue++){var pe=k.item(ue),me=pe.value;if(me&&(me=E.serializer.deserialize(me)),me=f(me,pe.key,ue+1),me!==void 0){S(me);return}}S()},function(U,D){_(D)})})}).catch(_)});return q(x,v),x}function Ms(f,v,l,x){var S=this;f=P(f);var _=new w(function(E,L){S.ready().then(function(){v===void 0&&(v=null);var U=v,D=S._dbInfo;D.serializer.serialize(v,function(k,X){X?L(X):D.db.transaction(function(ue){hr(ue,D,"INSERT OR REPLACE INTO "+D.storeName+" (key, value) VALUES (?, ?)",[f,k],function(){E(U)},function(pe,me){L(me)})},function(ue){if(ue.code===ue.QUOTA_ERR){if(x>0){E(Ms.apply(S,[f,U,l,x-1]));return}L(ue)}})})}).catch(L)});return q(_,l),_}function bd(f,v,l){return Ms.apply(this,[f,v,l,1])}function xd(f,v){var l=this;f=P(f);var x=new w(function(S,_){l.ready().then(function(){var E=l._dbInfo;E.db.transaction(function(L){hr(L,E,"DELETE FROM "+E.storeName+" WHERE key = ?",[f],function(){S()},function(U,D){_(D)})})}).catch(_)});return q(x,v),x}function Sd(f){var v=this,l=new w(function(x,S){v.ready().then(function(){var _=v._dbInfo;_.db.transaction(function(E){hr(E,_,"DELETE FROM "+_.storeName,[],function(){x()},function(L,U){S(U)})})}).catch(S)});return q(l,f),l}function Ad(f){var v=this,l=new w(function(x,S){v.ready().then(function(){var _=v._dbInfo;_.db.transaction(function(E){hr(E,_,"SELECT COUNT(key) as c FROM "+_.storeName,[],function(L,U){var D=U.rows.item(0).c;x(D)},function(L,U){S(U)})})}).catch(S)});return q(l,f),l}function Od(f,v){var l=this,x=new w(function(S,_){l.ready().then(function(){var E=l._dbInfo;E.db.transaction(function(L){hr(L,E,"SELECT key FROM "+E.storeName+" WHERE id = ? LIMIT 1",[f+1],function(U,D){var k=D.rows.length?D.rows.item(0).key:null;S(k)},function(U,D){_(D)})})}).catch(_)});return q(x,v),x}function qd(f){var v=this,l=new w(function(x,S){v.ready().then(function(){var _=v._dbInfo;_.db.transaction(function(E){hr(E,_,"SELECT key FROM "+_.storeName,[],function(L,U){for(var D=[],k=0;k<U.rows.length;k++)D.push(U.rows.item(k).key);x(D)},function(L,U){S(U)})})}).catch(S)});return q(l,f),l}function Cd(f){return new w(function(v,l){f.transaction(function(x){x.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(S,_){for(var E=[],L=0;L<_.rows.length;L++)E.push(_.rows.item(L).name);v({db:f,storeNames:E})},function(S,_){l(_)})},function(x){l(x)})})}function Ed(f,v){v=H.apply(this,arguments);var l=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||l.name,f.storeName=f.storeName||l.storeName);var x=this,S;return f.name?S=new w(function(_){var E;f.name===l.name?E=x._dbInfo.db:E=openDatabase(f.name,"","",0),f.storeName?_({db:E,storeNames:[f.storeName]}):_(Cd(E))}).then(function(_){return new w(function(E,L){_.db.transaction(function(U){function D(pe){return new w(function(me,Oe){U.executeSql("DROP TABLE IF EXISTS "+pe,[],function(){me()},function(Se,Ge){Oe(Ge)})})}for(var k=[],X=0,ue=_.storeNames.length;X<ue;X++)k.push(D(_.storeNames[X]));w.all(k).then(function(){E()}).catch(function(pe){L(pe)})},function(U){L(U)})})}):S=w.reject("Invalid arguments"),q(S,v),S}var Id={_driver:"webSQLStorage",_initStorage:yd,_support:se(),iterate:wd,getItem:_d,setItem:bd,removeItem:xd,clear:Sd,length:Ad,key:Od,keys:qd,dropInstance:Ed};function Td(){try{return typeof localStorage!="undefined"&&"setItem"in localStorage&&!!localStorage.setItem}catch(f){return!1}}function Rs(f,v){var l=f.name+"/";return f.storeName!==v.storeName&&(l+=f.storeName+"/"),l}function Pd(){var f="_localforage_support_test";try{return localStorage.setItem(f,!0),localStorage.removeItem(f),!1}catch(v){return!0}}function Md(){return!Pd()||localStorage.length>0}function Rd(f){var v=this,l={};if(f)for(var x in f)l[x]=f[x];return l.keyPrefix=Rs(f,v._defaultConfig),Md()?(v._dbInfo=l,l.serializer=$i,w.resolve()):w.reject()}function Ld(f){var v=this,l=v.ready().then(function(){for(var x=v._dbInfo.keyPrefix,S=localStorage.length-1;S>=0;S--){var _=localStorage.key(S);_.indexOf(x)===0&&localStorage.removeItem(_)}});return q(l,f),l}function jd(f,v){var l=this;f=P(f);var x=l.ready().then(function(){var S=l._dbInfo,_=localStorage.getItem(S.keyPrefix+f);return _&&(_=S.serializer.deserialize(_)),_});return q(x,v),x}function Nd(f,v){var l=this,x=l.ready().then(function(){for(var S=l._dbInfo,_=S.keyPrefix,E=_.length,L=localStorage.length,U=1,D=0;D<L;D++){var k=localStorage.key(D);if(k.indexOf(_)===0){var X=localStorage.getItem(k);if(X&&(X=S.serializer.deserialize(X)),X=f(X,k.substring(E),U++),X!==void 0)return X}}});return q(x,v),x}function Ud(f,v){var l=this,x=l.ready().then(function(){var S=l._dbInfo,_;try{_=localStorage.key(f)}catch(E){_=null}return _&&(_=_.substring(S.keyPrefix.length)),_});return q(x,v),x}function Dd(f){var v=this,l=v.ready().then(function(){for(var x=v._dbInfo,S=localStorage.length,_=[],E=0;E<S;E++){var L=localStorage.key(E);L.indexOf(x.keyPrefix)===0&&_.push(L.substring(x.keyPrefix.length))}return _});return q(l,f),l}function Fd(f){var v=this,l=v.keys().then(function(x){return x.length});return q(l,f),l}function Bd(f,v){var l=this;f=P(f);var x=l.ready().then(function(){var S=l._dbInfo;localStorage.removeItem(S.keyPrefix+f)});return q(x,v),x}function kd(f,v,l){var x=this;f=P(f);var S=x.ready().then(function(){v===void 0&&(v=null);var _=v;return new w(function(E,L){var U=x._dbInfo;U.serializer.serialize(v,function(D,k){if(k)L(k);else try{localStorage.setItem(U.keyPrefix+f,D),E(_)}catch(X){(X.name==="QuotaExceededError"||X.name==="NS_ERROR_DOM_QUOTA_REACHED")&&L(X),L(X)}})})});return q(S,l),S}function $d(f,v){if(v=H.apply(this,arguments),f=typeof f!="function"&&f||{},!f.name){var l=this.config();f.name=f.name||l.name,f.storeName=f.storeName||l.storeName}var x=this,S;return f.name?S=new w(function(_){f.storeName?_(Rs(f,x._defaultConfig)):_(f.name+"/")}).then(function(_){for(var E=localStorage.length-1;E>=0;E--){var L=localStorage.key(E);L.indexOf(_)===0&&localStorage.removeItem(L)}}):S=w.reject("Invalid arguments"),q(S,v),S}var zd={_driver:"localStorageWrapper",_initStorage:Rd,_support:Td(),iterate:Nd,getItem:jd,setItem:kd,removeItem:Bd,clear:Ld,length:Fd,key:Ud,keys:Dd,dropInstance:$d},Wd=function(v,l){return v===l||typeof v=="number"&&typeof l=="number"&&isNaN(v)&&isNaN(l)},Hd=function(v,l){for(var x=v.length,S=0;S<x;){if(Wd(v[S],l))return!0;S++}return!1},Ls=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},lt={},js={},zr={INDEXEDDB:ae,WEBSQL:Id,LOCALSTORAGE:zd},Gd=[zr.INDEXEDDB._driver,zr.WEBSQL._driver,zr.LOCALSTORAGE._driver],Gt=["dropInstance"],zi=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Gt),Kd={description:"",driver:Gd.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Jd(f,v){f[v]=function(){var l=arguments;return f.ready().then(function(){return f[v].apply(f,l)})}}function Wi(){for(var f=1;f<arguments.length;f++){var v=arguments[f];if(v)for(var l in v)v.hasOwnProperty(l)&&(Ls(v[l])?arguments[0][l]=v[l].slice():arguments[0][l]=v[l])}return arguments[0]}var Vd=function(){function f(v){u(this,f);for(var l in zr)if(zr.hasOwnProperty(l)){var x=zr[l],S=x._driver;this[l]=S,lt[S]||this.defineDriver(x)}this._defaultConfig=Wi({},Kd),this._config=Wi({},this._defaultConfig,v),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return f.prototype.config=function(l){if((typeof l=="undefined"?"undefined":a(l))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var x in l){if(x==="storeName"&&(l[x]=l[x].replace(/\W/g,"_")),x==="version"&&typeof l[x]!="number")return new Error("Database version must be a number.");this._config[x]=l[x]}return"driver"in l&&l.driver?this.setDriver(this._config.driver):!0}else return typeof l=="string"?this._config[l]:this._config},f.prototype.defineDriver=function(l,x,S){var _=new w(function(E,L){try{var U=l._driver,D=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!l._driver){L(D);return}for(var k=zi.concat("_initStorage"),X=0,ue=k.length;X<ue;X++){var pe=k[X],me=!Hd(Gt,pe);if((me||l[pe])&&typeof l[pe]!="function"){L(D);return}}var Oe=function(){for(var ht=function(Zd){return function(){var Qd=new Error("Method "+Zd+" is not implemented by the current driver"),Ns=w.reject(Qd);return q(Ns,arguments[arguments.length-1]),Ns}},Hi=0,Xd=Gt.length;Hi<Xd;Hi++){var Gi=Gt[Hi];l[Gi]||(l[Gi]=ht(Gi))}};Oe();var Se=function(ht){lt[U]&&console.info("Redefining LocalForage driver: "+U),lt[U]=l,js[U]=ht,E()};"_support"in l?l._support&&typeof l._support=="function"?l._support().then(Se,L):Se(!!l._support):Se(!0)}catch(Ge){L(Ge)}});return y(_,x,S),_},f.prototype.driver=function(){return this._driver||null},f.prototype.getDriver=function(l,x,S){var _=lt[l]?w.resolve(lt[l]):w.reject(new Error("Driver not found."));return y(_,x,S),_},f.prototype.getSerializer=function(l){var x=w.resolve($i);return y(x,l),x},f.prototype.ready=function(l){var x=this,S=x._driverSet.then(function(){return x._ready===null&&(x._ready=x._initDriver()),x._ready});return y(S,l,l),S},f.prototype.setDriver=function(l,x,S){var _=this;Ls(l)||(l=[l]);var E=this._getSupportedDrivers(l);function L(){_._config.driver=_.driver()}function U(X){return _._extend(X),L(),_._ready=_._initStorage(_._config),_._ready}function D(X){return function(){var ue=0;function pe(){for(;ue<X.length;){var me=X[ue];return ue++,_._dbInfo=null,_._ready=null,_.getDriver(me).then(U).catch(pe)}L();var Oe=new Error("No available storage method found.");return _._driverSet=w.reject(Oe),_._driverSet}return pe()}}var k=this._driverSet!==null?this._driverSet.catch(function(){return w.resolve()}):w.resolve();return this._driverSet=k.then(function(){var X=E[0];return _._dbInfo=null,_._ready=null,_.getDriver(X).then(function(ue){_._driver=ue._driver,L(),_._wrapLibraryMethodsWithReady(),_._initDriver=D(E)})}).catch(function(){L();var X=new Error("No available storage method found.");return _._driverSet=w.reject(X),_._driverSet}),y(this._driverSet,x,S),this._driverSet},f.prototype.supports=function(l){return!!js[l]},f.prototype._extend=function(l){Wi(this,l)},f.prototype._getSupportedDrivers=function(l){for(var x=[],S=0,_=l.length;S<_;S++){var E=l[S];this.supports(E)&&x.push(E)}return x},f.prototype._wrapLibraryMethodsWithReady=function(){for(var l=0,x=zi.length;l<x;l++)Jd(this,zi[l])},f.prototype.createInstance=function(l){return new f(l)},f}(),Yd=new Vd;n.exports=Yd},{3:3}]},{},[4])(4)})});var qs=g((Os,ld)=>{"use strict";(function(r,e,t){let i;(i=t.define)&&i.amd?i([],function(){return e}):(i=t.modules)?i[r.toLowerCase()]=e:typeof Os=="object"?ld.exports=e:t[r]=e})("FlexSearch",function r(e){function t(h,d){let m=d?d.id:h&&h.id;this.id=m||m===0?m:Ke++,this.init(h,d),u(this,"index",function(){return this.a?Object.keys(this.a.index[this.a.keys[0]].c):Object.keys(this.c)}),u(this,"length",function(){return this.index.length})}function i(h,d,m,A){return this.u!==this.g&&(this.o=this.o.concat(m),this.u++,A&&this.o.length>=A&&(this.u=this.g),this.u===this.g&&(this.cache&&this.j.set(d,this.o),this.F&&this.F(this.o))),this}function n(h){let d=G();for(let m in h)if(h.hasOwnProperty(m)){let A=h[m];F(A)?d[m]=A.slice(0):te(A)?d[m]=n(A):d[m]=A}return d}function s(h,d){let m=h.length,A=Z(d),C=[];for(let I=0,M=0;I<m;I++){let T=h[I];(A&&d(T)||!A&&!d[T])&&(C[M++]=T)}return C}function a(h,d,m,A,C,I,M,T,N,B){m=K(m,M?0:C,T,I,d,N,B);let Y;if(T&&(T=m.page,Y=m.next,m=m.result),M)d=this.where(M,null,C,m);else{for(d=m,m=this.l,C=d.length,I=Array(C),M=0;M<C;M++)I[M]=m[d[M]];d=I}return m=d,A&&(Z(A)||(ze=A.split(":"),1<ze.length?A=P:(ze=ze[0],A=y)),m.sort(A)),m=H(T,Y,m),this.cache&&this.j.set(h,m),m}function u(h,d,m){Object.defineProperty(h,d,{get:m})}function o(h){return new RegExp(h,"g")}function c(h,d){for(let m=0;m<d.length;m+=2)h=h.replace(d[m],d[m+1]);return h}function p(h,d,m,A,C,I,M,T){return d[m]?d[m]:(C=C?(T-(M||T/1.5))*I+(M||T/1.5)*C:I,d[m]=C,C>=M&&(h=h[T-(C+.5>>0)],h=h[m]||(h[m]=[]),h[h.length]=A),C)}function b(h,d){if(h){let m=Object.keys(h);for(let A=0,C=m.length;A<C;A++){let I=m[A],M=h[I];if(M)for(let T=0,N=M.length;T<N;T++)if(M[T]===d){N===1?delete h[I]:M.splice(T,1);break}else te(M[T])&&b(M[T],d)}}}function w(h){let d="",m="";var A="";for(let C=0;C<h.length;C++){let I=h[C];I!==m&&(C&&I==="h"?(A=A==="a"||A==="e"||A==="i"||A==="o"||A==="u"||A==="y",((m==="a"||m==="e"||m==="i"||m==="o"||m==="u"||m==="y")&&A||m===" ")&&(d+=I)):d+=I),A=C===h.length-1?"":h[C+1],m=I}return d}function q(h,d){return h=h.length-d.length,0>h?1:h?-1:0}function y(h,d){return h=h[ze],d=d[ze],h<d?-1:h>d?1:0}function P(h,d){let m=ze.length;for(let A=0;A<m;A++)h=h[ze[A]],d=d[ze[A]];return h<d?-1:h>d?1:0}function H(h,d,m){return h?{page:h,next:d?""+d:null,result:m}:m}function K(h,d,m,A,C,I,M){let T,N=[];if(m===!0){m="0";var B=""}else B=m&&m.split(":");let Y=h.length;if(1<Y){let ge=G(),ne=[],oe,he;var V=0,z;let Ue;var ae=!0;let Ce,Pe=0,Je,kr,Ir,$r;if(B&&(B.length===2?(Ir=B,B=!1):B=$r=parseInt(B[0],10)),M){for(oe=G();V<Y;V++)if(C[V]==="not")for(he=h[V],Ue=he.length,z=0;z<Ue;z++)oe["@"+he[z]]=1;else kr=V+1;if(O(kr))return H(m,T,N);V=0}else Je=Q(C)&&C;let Tr;for(;V<Y;V++){let Ht=V===(kr||Y)-1;if(!Je||!V)if((z=Je||C&&C[V])&&z!=="and")if(z==="or")Tr=!1;else continue;else Tr=I=!0;if(he=h[V],Ue=he.length){if(ae)if(Ce){var se=Ce.length;for(z=0;z<se;z++){ae=Ce[z];var ce="@"+ae;M&&oe[ce]||(ge[ce]=1,I||(N[Pe++]=ae))}Ce=null,ae=!1}else{Ce=he;continue}for(ce=!1,z=0;z<Ue;z++){se=he[z];var ye="@"+se;let Pr=I?ge[ye]||0:V;if(!(!Pr&&!A||M&&oe[ye]||!I&&ge[ye]))if(Pr===V){if(Ht){if((!$r||--$r<Pe)&&(N[Pe++]=se,d&&Pe===d))return H(m,Pe+(B||0),N)}else ge[ye]=V+1;ce=!0}else A&&(ye=ne[Pr]||(ne[Pr]=[]),ye[ye.length]=se)}if(Tr&&!ce&&!A)break}else if(Tr&&!A)return H(m,T,he)}if(Ce)if(V=Ce.length,M)for(z=B?parseInt(B,10):0;z<V;z++)h=Ce[z],oe["@"+h]||(N[Pe++]=h);else N=Ce;if(A){for(Pe=N.length,Ir?(V=parseInt(Ir[0],10)+1,z=parseInt(Ir[1],10)+1):(V=ne.length,z=0);V--;)if(se=ne[V]){for(Ue=se.length;z<Ue;z++)if(A=se[z],(!M||!oe["@"+A])&&(N[Pe++]=A,d&&Pe===d))return H(m,V+":"+z,N);z=0}}}else!Y||C&&C[0]==="not"||(N=h[0],B&&(B=parseInt(B[0],10)));return d&&(M=N.length,B&&B>M&&(B=0),B=B||0,T=B+d,T<M?N=N.slice(B,T):(T=0,B&&(N=N.slice(B)))),H(m,T,N)}function Q(h){return typeof h=="string"}function F(h){return h.constructor===Array}function Z(h){return typeof h=="function"}function te(h){return typeof h=="object"}function O(h){return typeof h=="undefined"}function ee(h){let d=Array(h);for(let m=0;m<h;m++)d[m]=G();return d}function G(){return Object.create(null)}function de(){let h,d;self.onmessage=function(m){if(m=m.data)if(m.search){let A=d.search(m.content,m.threshold?{limit:m.limit,threshold:m.threshold,where:m.where}:m.limit);self.postMessage({id:h,content:m.content,limit:m.limit,result:A})}else m.add?d.add(m.id,m.content):m.update?d.update(m.id,m.content):m.remove?d.remove(m.id):m.clear?d.clear():m.info?(m=d.info(),m.worker=h,console.log(m)):m.register&&(h=m.id,m.options.cache=!1,m.options.async=!1,m.options.worker=!1,d=new Function(m.register.substring(m.register.indexOf("{")+1,m.register.lastIndexOf("}")))(),d=new d(m.options))}}function qe(h,d,m,A){h=e("flexsearch","id"+h,de,function(I){(I=I.data)&&I.result&&A(I.id,I.content,I.result,I.limit,I.where,I.cursor,I.suggest)},d);let C=r.toString();return m.id=d,h.postMessage({register:C,options:m,id:d}),h}let ve={encode:"icase",f:"forward",split:/\W+/,cache:!1,async:!1,g:!1,D:!1,a:!1,b:9,threshold:0,depth:0},Ne={memory:{encode:"extra",f:"strict",threshold:0,b:1},speed:{encode:"icase",f:"strict",threshold:1,b:3,depth:2},match:{encode:"extra",f:"full",threshold:1,b:3},score:{encode:"extra",f:"strict",threshold:1,b:9,depth:4},balance:{encode:"balance",f:"strict",threshold:0,b:3,depth:3},fast:{encode:"icase",f:"strict",threshold:8,b:9,depth:1}},Te=[],Ke=0,cr={},Er={};t.create=function(h,d){return new t(h,d)},t.registerMatcher=function(h){for(let d in h)h.hasOwnProperty(d)&&Te.push(o(d),h[d]);return this},t.registerEncoder=function(h,d){return sr[h]=d.bind(sr),this},t.registerLanguage=function(h,d){return cr[h]=d.filter,Er[h]=d.stemmer,this},t.encode=function(h,d){return sr[h](d)},t.prototype.init=function(h,d){if(this.v=[],d){var m=d.preset;h=d}else h||(h=ve),m=h.preset;if(d={},Q(h)?(d=Ne[h],h={}):m&&(d=Ne[m]),m=h.worker)if(typeof Worker=="undefined")h.worker=!1,this.m=null;else{var A=parseInt(m,10)||4;this.C=-1,this.u=0,this.o=[],this.F=null,this.m=Array(A);for(var C=0;C<A;C++)this.m[C]=qe(this.id,C,h,i.bind(this))}if(this.f=h.tokenize||d.f||this.f||ve.f,this.split=O(m=h.split)?this.split||ve.split:Q(m)?o(m):m,this.D=h.rtl||this.D||ve.D,this.async=typeof Promise=="undefined"||O(m=h.async)?this.async||ve.async:m,this.g=O(m=h.worker)?this.g||ve.g:m,this.threshold=O(m=h.threshold)?d.threshold||this.threshold||ve.threshold:m,this.b=O(m=h.resolution)?m=d.b||this.b||ve.b:m,m<=this.threshold&&(this.b=this.threshold+1),this.depth=this.f!=="strict"||O(m=h.depth)?d.depth||this.depth||ve.depth:m,this.w=(m=O(m=h.encode)?d.encode||ve.encode:m)&&sr[m]&&sr[m].bind(sr)||(Z(m)?m:this.w||!1),(m=h.matcher)&&this.addMatcher(m),m=(d=h.lang)||h.filter){if(Q(m)&&(m=cr[m]),F(m)){A=this.w,C=G();for(var I=0;I<m.length;I++){var M=A?A(m[I]):m[I];C[M]=1}m=C}this.filter=m}if(m=d||h.stemmer){var T;d=Q(m)?Er[m]:m,A=this.w,C=[];for(T in d)d.hasOwnProperty(T)&&(I=A?A(T):T,C.push(o(I+"($|\\W)"),A?A(d[T]):d[T]));this.stemmer=T=C}if(this.a=C=(m=h.doc)?n(m):this.a||ve.a,this.i=ee(this.b-(this.threshold||0)),this.h=G(),this.c=G(),C){if(this.l=G(),h.doc=null,T=C.index={},d=C.keys=[],A=C.field,I=C.tag,M=C.store,F(C.id)||(C.id=C.id.split(":")),M){var N=G();if(Q(M))N[M]=1;else if(F(M))for(let B=0;B<M.length;B++)N[M[B]]=1;else te(M)&&(N=M);C.store=N}if(I){if(this.G=G(),M=G(),A)if(Q(A))M[A]=h;else if(F(A))for(N=0;N<A.length;N++)M[A[N]]=h;else te(A)&&(M=A);for(F(I)||(C.tag=I=[I]),A=0;A<I.length;A++)this.G[I[A]]=G();this.I=I,A=M}if(A){let B;for(F(A)||(te(A)?(B=A,C.field=A=Object.keys(A)):C.field=A=[A]),C=0;C<A.length;C++)I=A[C],F(I)||(B&&(h=B[I]),d[C]=I,A[C]=I.split(":")),T[I]=new t(h)}h.doc=m}return this.B=!0,this.j=(this.cache=m=O(m=h.cache)?this.cache||ve.cache:m)?new Bi(m):!1,this},t.prototype.encode=function(h){return h&&(Te.length&&(h=c(h,Te)),this.v.length&&(h=c(h,this.v)),this.w&&(h=this.w(h)),this.stemmer&&(h=c(h,this.stemmer))),h},t.prototype.addMatcher=function(h){let d=this.v;for(let m in h)h.hasOwnProperty(m)&&d.push(o(m),h[m]);return this},t.prototype.add=function(h,d,m,A,C){if(this.a&&te(h))return this.A("add",h,d);if(d&&Q(d)&&(h||h===0)){var I="@"+h;if(this.c[I]&&!A)return this.update(h,d);if(this.g)return++this.C>=this.m.length&&(this.C=0),this.m[this.C].postMessage({add:!0,id:h,content:d}),this.c[I]=""+this.C,m&&m(),this;if(!C){if(this.async&&typeof importScripts!="function"){let ne=this;if(I=new Promise(function(oe){setTimeout(function(){ne.add(h,d,null,A,!0),ne=null,oe()})}),m)I.then(m);else return I;return this}if(m)return this.add(h,d,null,A,!0),m(),this}if(d=this.encode(d),!d.length)return this;m=this.f,C=Z(m)?m(d):d.split(this.split),this.filter&&(C=s(C,this.filter));let V=G();V._ctx=G();let z=C.length,ae=this.threshold,se=this.depth,ce=this.b,ye=this.i,ge=this.D;for(let ne=0;ne<z;ne++){var M=C[ne];if(M){var T=M.length,N=(ge?ne+1:z-ne)/z,B="";switch(m){case"reverse":case"both":for(var Y=T;--Y;)B=M[Y]+B,p(ye,V,B,h,ge?1:(T-Y)/T,N,ae,ce-1);B="";case"forward":for(Y=0;Y<T;Y++)B+=M[Y],p(ye,V,B,h,ge?(Y+1)/T:1,N,ae,ce-1);break;case"full":for(Y=0;Y<T;Y++){let oe=(ge?Y+1:T-Y)/T;for(let he=T;he>Y;he--)B=M.substring(Y,he),p(ye,V,B,h,oe,N,ae,ce-1)}break;default:if(T=p(ye,V,M,h,1,N,ae,ce-1),se&&1<z&&T>=ae)for(T=V._ctx[M]||(V._ctx[M]=G()),M=this.h[M]||(this.h[M]=ee(ce-(ae||0))),N=ne-se,B=ne+se+1,0>N&&(N=0),B>z&&(B=z);N<B;N++)N!==ne&&p(M,T,C[N],h,0,ce-(N<ne?ne-N:N-ne),ae,ce-1)}}}this.c[I]=1,this.B=!1}return this},t.prototype.A=function(h,d,m){if(F(d)){var A=d.length;if(A--){for(var C=0;C<A;C++)this.A(h,d[C]);return this.A(h,d[A],m)}}else{var I=this.a.index,M=this.a.keys,T=this.a.tag;C=this.a.store;var N,B=this.a.id;A=d;for(var Y=0;Y<B.length;Y++)A=A[B[Y]];if(h==="remove"&&(delete this.l[A],B=M.length,B--)){for(d=0;d<B;d++)I[M[d]].remove(A);return I[M[B]].remove(A,m)}if(T){for(N=0;N<T.length;N++){var V=T[N],z=d;for(B=V.split(":"),Y=0;Y<B.length;Y++)z=z[B[Y]];z="@"+z}N=this.G[V],N=N[z]||(N[z]=[])}B=this.a.field;for(let ae=0,se=B.length;ae<se;ae++){for(V=B[ae],T=d,z=0;z<V.length;z++)T=T[V[z]];V=I[M[ae]],z=h==="add"?V.add:V.update,ae===se-1?z.call(V,A,T,m):z.call(V,A,T)}if(C){for(m=Object.keys(C),h=G(),I=0;I<m.length;I++)if(M=m[I],C[M]){M=M.split(":");let ae,se;for(B=0;B<M.length;B++)T=M[B],ae=(ae||d)[T],se=(se||h)[T]=ae}d=h}N&&(N[N.length]=d),this.l[A]=d}return this},t.prototype.update=function(h,d,m){return this.a&&te(h)?this.A("update",h,d):(this.c["@"+h]&&Q(d)&&(this.remove(h),this.add(h,d,m,!0)),this)},t.prototype.remove=function(h,d,m){if(this.a&&te(h))return this.A("remove",h,d);var A="@"+h;if(this.c[A]){if(this.g)return this.m[this.c[A]].postMessage({remove:!0,id:h}),delete this.c[A],d&&d(),this;if(!m){if(this.async&&typeof importScripts!="function"){let C=this;if(A=new Promise(function(I){setTimeout(function(){C.remove(h,null,!0),C=null,I()})}),d)A.then(d);else return A;return this}if(d)return this.remove(h,null,!0),d(),this}for(d=0;d<this.b-(this.threshold||0);d++)b(this.i[d],h);this.depth&&b(this.h,h),delete this.c[A],this.B=!1}return this};let ze;t.prototype.search=function(h,d,m,A){if(te(d)){if(F(d))for(var C=0;C<d.length;C++)d[C].query=h;else d.query=h;h=d,d=1e3}else d&&Z(d)?(m=d,d=1e3):d||d===0||(d=1e3);if(this.g){this.F=m,this.u=0,this.o=[];for(var I=0;I<this.g;I++)this.m[I].postMessage({search:!0,limit:d,content:h})}else{var M=[],T=h;if(te(h)&&!F(h)){m||(m=h.callback)&&(T.callback=null);var N=h.sort,B=h.page;d=h.limit,I=h.threshold;var Y=h.suggest;h=h.query}if(this.a){I=this.a.index;let ge=T.where;var V=T.bool||"or",z=T.field;let ne=V,oe,he;if(z)F(z)||(z=[z]);else if(F(T)){var ae=T;z=[],ne=[];for(var se=0;se<T.length;se++)A=T[se],C=A.bool||V,z[se]=A.field,ne[se]=C,C==="not"?oe=!0:C==="and"&&(he=!0)}else z=this.a.keys;for(V=z.length,se=0;se<V;se++)ae&&(T=ae[se]),B&&!Q(T)&&(T.page=null,T.limit=0),M[se]=I[z[se]].search(T,0);if(m)return m(a.call(this,h,ne,M,N,d,Y,ge,B,he,oe));if(this.async){let Ue=this;return new Promise(function(Ce){Promise.all(M).then(function(Pe){Ce(a.call(Ue,h,ne,Pe,N,d,Y,ge,B,he,oe))})})}return a.call(this,h,ne,M,N,d,Y,ge,B,he,oe)}if(I||(I=this.threshold||0),!A){if(this.async&&typeof importScripts!="function"){let ge=this;if(I=new Promise(function(ne){setTimeout(function(){ne(ge.search(T,d,null,!0)),ge=null})}),m)I.then(m);else return I;return this}if(m)return m(this.search(T,d,null,!0)),this}if(!h||!Q(h))return M;if(T=h,this.cache)if(this.B){if(m=this.j.get(h))return m}else this.j.clear(),this.B=!0;if(T=this.encode(T),!T.length)return M;m=this.f,m=Z(m)?m(T):T.split(this.split),this.filter&&(m=s(m,this.filter)),ae=m.length,A=!0,C=[];var ce=G(),ye=0;if(1<ae&&(this.depth&&this.f==="strict"?V=!0:m.sort(q)),!V||(se=this.h)){let ge=this.b;for(;ye<ae;ye++){let ne=m[ye];if(ne){if(V){if(!z){if(se[ne])z=ne,ce[ne]=1;else if(!Y)return M}if(Y&&ye===ae-1&&!C.length)V=!1,ne=z||ne,ce[ne]=0;else if(!z)continue}if(!ce[ne]){let oe=[],he=!1,Ue=0,Ce=V?se[z]:this.i;if(Ce){let Pe;for(let Je=0;Je<ge-I;Je++)(Pe=Ce[Je]&&Ce[Je][ne])&&(oe[Ue++]=Pe,he=!0)}if(he)z=ne,C[C.length]=1<Ue?oe.concat.apply([],oe):oe[0];else if(!Y){A=!1;break}ce[ne]=1}}}}else A=!1;return A&&(M=K(C,d,B,Y)),this.cache&&this.j.set(h,M),M}},t.prototype.find=function(h,d){return this.where(h,d,1)[0]||null},t.prototype.where=function(h,d,m,A){let C=this.l,I=[],M=0,T;var N;let B;if(te(h)){m||(m=d);var Y=Object.keys(h),V=Y.length;if(T=!1,V===1&&Y[0]==="id")return[C[h.id]];if((N=this.I)&&!A)for(var z=0;z<N.length;z++){var ae=N[z],se=h[ae];if(!O(se)){if(B=this.G[ae]["@"+se],--V===0)return B;Y.splice(Y.indexOf(ae),1),delete h[ae];break}}for(N=Array(V),z=0;z<V;z++)N[z]=Y[z].split(":")}else{if(Z(h)){for(d=A||Object.keys(C),m=d.length,Y=0;Y<m;Y++)V=C[d[Y]],h(V)&&(I[M++]=V);return I}if(O(d))return[C[h]];if(h==="id")return[C[d]];Y=[h],V=1,N=[h.split(":")],T=!0}for(A=B||A||Object.keys(C),z=A.length,ae=0;ae<z;ae++){se=B?A[ae]:C[A[ae]];let ce=!0;for(let ye=0;ye<V;ye++){T||(d=h[Y[ye]]);let ge=N[ye],ne=ge.length,oe=se;if(1<ne)for(let he=0;he<ne;he++)oe=oe[ge[he]];else oe=oe[ge[0]];if(oe!==d){ce=!1;break}}if(ce&&(I[M++]=se,m&&M===m))break}return I},t.prototype.info=function(){if(this.g)for(let h=0;h<this.g;h++)this.m[h].postMessage({info:!0,id:this.id});else return{id:this.id,items:this.length,cache:this.cache&&this.cache.s?this.cache.s.length:!1,matcher:Te.length+(this.v?this.v.length:0),worker:this.g,threshold:this.threshold,depth:this.depth,resolution:this.b,contextual:this.depth&&this.f==="strict"}},t.prototype.clear=function(){return this.destroy().init()},t.prototype.destroy=function(){if(this.cache&&(this.j.clear(),this.j=null),this.i=this.h=this.c=null,this.a){let h=this.a.keys;for(let d=0;d<h.length;d++)this.a.index[h[d]].destroy();this.a=this.l=null}return this},t.prototype.export=function(h){let d=!h||O(h.serialize)||h.serialize;if(this.a){let A=!h||O(h.doc)||h.doc;var m=!h||O(h.index)||h.index;h=[];let C=0;if(m)for(m=this.a.keys;C<m.length;C++){let I=this.a.index[m[C]];h[C]=[I.i,I.h,Object.keys(I.c)]}A&&(h[C]=this.l)}else h=[this.i,this.h,Object.keys(this.c)];return d&&(h=JSON.stringify(h)),h},t.prototype.import=function(h,d){(!d||O(d.serialize)||d.serialize)&&(h=JSON.parse(h));let m=G();if(this.a){var A=!d||O(d.doc)||d.doc,C=0;if(!d||O(d.index)||d.index){d=this.a.keys;let M=d.length;for(var I=h[0][2];C<I.length;C++)m[I[C]]=1;for(C=0;C<M;C++){I=this.a.index[d[C]];let T=h[C];T&&(I.i=T[0],I.h=T[1],I.c=m)}}A&&(this.l=te(A)?A:h[C])}else{for(A=h[2],C=0;C<A.length;C++)m[A[C]]=1;this.i=h[0],this.h=h[1],this.c=m}};let lr=function(){let h=o("\\s+"),d=o("[^a-z0-9 ]"),m=[o("[-/]")," ",d,"",h," "];return function(A){return w(c(A.toLowerCase(),m))}}(),sr={icase:function(h){return h.toLowerCase()},simple:function(){let h=o("\\s+"),d=o("[^a-z0-9 ]"),m=o("[-/]"),A=o("[\xE0\xE1\xE2\xE3\xE4\xE5]"),C=o("[\xE8\xE9\xEA\xEB]"),I=o("[\xEC\xED\xEE\xEF]"),M=o("[\xF2\xF3\xF4\xF5\xF6\u0151]"),T=o("[\xF9\xFA\xFB\xFC\u0171]"),N=o("[\xFD\u0177\xFF]"),B=o("\xF1"),Y=o("[\xE7c]"),V=o("\xDF"),z=o(" & "),ae=[A,"a",C,"e",I,"i",M,"o",T,"u",N,"y",B,"n",Y,"k",V,"s",z," and ",m," ",d,"",h," "];return function(se){return se=c(se.toLowerCase(),ae),se===" "?"":se}}(),advanced:function(){let h=o("ae"),d=o("ai"),m=o("ay"),A=o("ey"),C=o("oe"),I=o("ue"),M=o("ie"),T=o("sz"),N=o("zs"),B=o("ck"),Y=o("cc"),V=o("sh"),z=o("th"),ae=o("dt"),se=o("ph"),ce=o("pf"),ye=o("ou"),ge=o("uo"),ne=[h,"a",d,"ei",m,"ei",A,"ei",C,"o",I,"u",M,"i",T,"s",N,"s",V,"s",B,"k",Y,"k",z,"t",ae,"t",se,"f",ce,"f",ye,"o",ge,"u"];return function(oe,he){return oe&&(oe=this.simple(oe),2<oe.length&&(oe=c(oe,ne)),he||1<oe.length&&(oe=w(oe)),oe)}}(),extra:function(){let h=o("p"),d=o("z"),m=o("[cgq]"),A=o("n"),C=o("d"),I=o("[vw]"),M=o("[aeiouy]"),T=[h,"b",d,"s",m,"k",A,"m",C,"t",I,"f",M,""];return function(N){if(!N)return N;if(N=this.advanced(N,!0),1<N.length){N=N.split(" ");for(let B=0;B<N.length;B++){let Y=N[B];1<Y.length&&(N[B]=Y[0]+c(Y.substring(1),T))}N=N.join(" "),N=w(N)}return N}}(),balance:lr},Bi=function(){function h(d){this.clear(),this.H=d!==!0&&d}return h.prototype.clear=function(){this.cache=G(),this.count=G(),this.index=G(),this.s=[]},h.prototype.set=function(d,m){if(this.H&&O(this.cache[d])){let A=this.s.length;if(A===this.H){A--;let C=this.s[A];delete this.cache[C],delete this.count[C],delete this.index[C]}this.index[d]=A,this.s[A]=d,this.count[d]=-1,this.cache[d]=m,this.get(d)}else this.cache[d]=m},h.prototype.get=function(d){let m=this.cache[d];if(this.H&&m){var A=++this.count[d];let I=this.index,M=I[d];if(0<M){let T=this.s;for(var C=M;this.count[T[--M]]<=A&&M!==-1;);if(M++,M!==C){for(A=C;A>M;A--)C=T[A-1],T[A]=C,I[C]=A;T[M]=d,I[d]=M}}}return m},h}();return t}(function(){let r={},e=typeof Blob!="undefined"&&typeof URL!="undefined"&&URL.createObjectURL;return function(t,i,n,s,a){return n=e?URL.createObjectURL(new Blob(["("+n.toString()+")()"],{type:"text/javascript"})):t+".min.js",t+="-"+i,r[t]||(r[t]=[]),r[t][a]=new Worker(n),r[t][a].onmessage=s,r[t][a]}}()),Os)});var xE={};Jt(xE,{BaseProvider:()=>le,CocodaSDK:()=>Cr,ConceptApiProvider:()=>ir,LabelSearchSuggestionProvider:()=>br,LocApiProvider:()=>Sr,LocalMappingsProvider:()=>yr,MappingsApiProvider:()=>tr,MyCoReProvider:()=>Or,OccurrencesApiProvider:()=>_r,ReconciliationApiProvider:()=>wr,SkohubProvider:()=>Ar,SkosmosApiProvider:()=>xr,addAllProviders:()=>bE,cdk:()=>md,errors:()=>Fe,utils:()=>Ur});var Fe={};Jt(Fe,{BackendError:()=>gt,BackendUnavailableError:()=>vt,CDKError:()=>Ee,InvalidOrMissingParameterError:()=>W,InvalidProviderError:()=>Wr,InvalidRequestError:()=>Qe,MethodNotImplementedError:()=>mt,MissingApiUrlError:()=>De,NetworkError:()=>yt});var Ee=class extends Error{constructor({message:e="",relatedError:t=null,code:i=null}={}){!e&&t&&t.message&&(e=t.message),super(e),this.name=this.constructor.name,this.relatedError=t,this.code=i}},mt=class extends Ee{constructor(n){var s=n,{method:e,message:t=""}=s,i=J(s,["method","message"]);i.message=`Method not implemented: ${e} (${t})`,super(i)}},W=class extends Ee{constructor(n){var s=n,{parameter:e,message:t=""}=s,i=J(s,["parameter","message"]);i.message=`Invalid or missing parameter: ${e} (${t})`,super(i)}},Qe=class extends Ee{},gt=class extends Ee{},vt=class extends Ee{},yt=class extends Ee{},De=class extends Ee{},Wr=class extends Ee{};var dd=fe(ii(),1);var re=fe(Ru(),1),xe=fe(zu(),1),gr=fe(mf(),1),Dt=fe(Bf(),1),rs=fe(ec(),1),ts=fe(Ic(),1),Ie=fe(ke(),1),Ft=fe(Xe(),1),be=fe(Pc(),1),is=fe(Gc(),1),rr=fe(Dl(),1),AC=fe(Ah(),1),ns=fe(Zn(),1),ar=fe(Cp(),1),ss=fe(Ip(),1);var qr=fe(He(),1);var Wt={};Jt(Wt,{BaseProvider:()=>le,ConceptApiProvider:()=>ir,LabelSearchSuggestionProvider:()=>br,LocApiProvider:()=>Sr,LocalMappingsProvider:()=>yr,MappingsApiProvider:()=>tr,MyCoReProvider:()=>Or,OccurrencesApiProvider:()=>_r,ReconciliationApiProvider:()=>wr,SkohubProvider:()=>Ar,SkosmosApiProvider:()=>xr});var ut=fe(He(),1);var Mi=fe(ii(),1);var Ur={};Jt(Ur,{concatUrl:()=>or,listOfCapabilities:()=>Ae,requestMethods:()=>ys,withCustomProps:()=>Nr});var ys=[{method:"getRegistries",fallback:[],type:"Registries"},{method:"getSchemes",fallback:[],type:"Schemes"},{method:"vocSearch",fallback:[],type:"Schemes"},{method:"getTypes",fallback:[],type:"Types"},{method:"suggest",fallback:["",[],[],[]]},{method:"vocSuggest",fallback:["",[],[],[]]},{method:"getConcordances",fallback:[],type:"Concordances"},{method:"getOccurrences",fallback:[],type:"Occurrences"},{method:"getTop",fallback:[],type:"Concepts"},{method:"getConcepts",fallback:[],type:"Concepts"},{method:"getNarrower",fallback:[],type:"Concepts"},{method:"getAncestors",fallback:[],type:"Concepts"},{method:"search",fallback:[],type:"Concepts"},{method:"getMapping",fallback:null,type:"Mapping"},{method:"getMappings",fallback:[],type:"Mappings"},{method:"postMapping",fallback:null,type:"Mapping"},{method:"postMappings",fallback:[],type:"Mapping"},{method:"putMapping",fallback:null,type:"Mapping"},{method:"patchMapping",fallback:null,type:"Mapping"},{method:"deleteMapping",fallback:!1},{method:"deleteMappings",fallback:[]},{method:"getAnnotations",fallback:[],type:"Annotations"},{method:"postAnnotation",fallback:null,type:"Annotation"},{method:"putAnnotation",fallback:null,type:"Annotation"},{method:"patchAnnotation",fallback:null,type:"Annotation"},{method:"deleteAnnotation",fallback:!1}];function or(...r){let[e,...t]=r;for(let i of t)e.endsWith("/")||(e+="/"),i.startsWith("/")&&(i=i.slice(1)),e+=i;return e}function Nr(r,e){return r._totalCount=e._totalCount,r._url=e._url,r}var Ae=["schemes","top","data","concepts","narrower","ancestors","types","suggest","search","auth","mappings","concordances","annotations","occurrences"];var le=class{constructor(e={}){this._jskos=e,this.axios=Mi.default.create({timeout:2e4}),this._path=typeof window!="undefined"&&window.location.pathname,this.has={},this._defaultLanguages="en,de,fr,es,nl,it,fi,pl,ru,cs,jp".split(","),this.languages=[],this._auth={key:null,bearerToken:null},this._repeating=[],this._api={status:e.status,schemes:Array.isArray(e.schemes)?void 0:e.schemes,top:e.top,data:e.data,concepts:e.concepts,narrower:e.narrower,ancestors:e.ancestors,types:e.types,suggest:e.suggest,search:e.search,"voc-suggest":e["voc-suggest"],"voc-search":e["voc-search"],mappings:e.mappings,concordances:e.concordances,annotations:e.annotations,occurrences:e.occurrences,reconcile:e.reconcile,api:e.api},this._config={},this.setRetryConfig(),this.axios.interceptors.request.use(i=>{if(!i._skipAdditionalParameters){let n=gr.default([].concat(re.default(i,"params.language","").split(","),this.languages,this._defaultLanguages).filter(s=>s!="")).join(",");xe.default(i,"params.language",n),this.has.auth&&this._auth.bearerToken&&!re.default(i,"headers.Authorization")&&xe.default(i,"headers.Authorization",`Bearer ${this._auth.bearerToken}`)}if(i.url.startsWith("http:")&&typeof window!="undefined"&&window.location.protocol=="https:")throw new Mi.default.Cancel("Can't call http API from https.");return i}),this.axios.interceptors.response.use(({data:i,headers:n={},config:s={}})=>{i=ut.default.normalize(i);let a=s.url;if(a.endsWith("?")||(a+="?"),ts.default(s.params||{},(u,o)=>{a+=`${o}=${encodeURIComponent(u)}&`}),Ie.default(i)||Ft.default(i)){let u=parseInt(n["x-total-count"]);isNaN(u)||(i._totalCount=u),i._url=a}return i},i=>{let n=re.default(i,"config._retryCount",0),s=re.default(i,"config.method"),a=re.default(i,"response.status");return this._retryConfig.methods.includes(s)&&this._retryConfig.statusCodes.includes(a)&&n<this._retryConfig.count?(i.config._retryCount=n+1,i.config.data&&(i.config.data=JSON.parse(i.config.data)),new Promise((u,o)=>{setTimeout(()=>{this.axios(i.config).then(u).catch(o)},(()=>{let c=this._retryConfig.delay;return typeof c=="function"?c(n):c})())})):Promise.reject(i)});let t=[];for(let{method:i,type:n}of ys){let s=this[i]&&this[i].bind(this);if(!s){this[i]=()=>{throw new mt({method:i})};continue}this[i]=(a={})=>{if(a._raw)return delete a._raw,s(a);let u=t.find(b=>b.method==i&&rr.default(b.options,a));if(u)return u.promise;let o;a.cancelToken||(o=this.getCancelTokenSource(),a.cancelToken=o.token);let c=this.init().then(()=>s(a)).then(b=>(Ie.default(b)&&b._totalCount===void 0?b._totalCount=b.length:Ft.default(b)&&b._totalCount===void 0&&(b._totalCount=1),b&&n&&this[`adjust${n}`]&&(b=this[`adjust${n}`](b)),b)).catch(b=>{throw b instanceof Ee?b:b.response?b.response.status.toString().startsWith(4)?new Qe({relatedError:b,code:b.response.status}):new gt({relatedError:b,code:b.response.status}):b.request?typeof navigator!="undefined"&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection)?new vt({relatedError:b}):new yt({relatedError:b}):new Ee({relatedError:b})});o&&(c.cancel=(...b)=>o.cancel(...b));let p={method:i,options:ar.default(a,["cancelToken"]),promise:c};return t.push(p),c.catch(()=>{}).then(()=>t.splice(t.indexOf(p),1)),c}}}get uri(){return this._jskos.uri}get notation(){return this._jskos.notation}get prefLabel(){return this._jskos.prefLabel}get definition(){return this._jskos.definition}get schemes(){return this._jskos.schemes}get excludedSchemes(){return this._jskos.excludedSchemes}get stored(){return this._jskos.stored!==void 0?this._jskos.stored:this.constructor.stored}init(){return j(this,null,function*(){return this._init?this._init:(this._init=(()=>j(this,null,function*(){this._prepare();let e;if(be.default(this._api.status))try{e=yield this.axios({method:"get",url:this._api.status})}catch(t){re.default(t,"response.status")===404&&(this._api.status=null)}else e=this._api.status;if(Ft.default(e)&&!is.default(e)){this._config=e.config||{};for(let t of Object.keys(this._api))this._api[t]===void 0&&(this._api[t]=e[t]||null)}this._setup()}))(),this._init)})}_prepare(){}_setup(){}getCancelTokenSource(){return Mi.default.CancelToken.source()}setAuth({key:e=this._auth.key,bearerToken:t=this._auth.bearerToken}){this._auth.key=e,this._auth.bearerToken=t}setRetryConfig(e={}){this._retryConfig=Object.assign({methods:["get","head","options"],statusCodes:[401,403],count:3,delay:t=>300*t},e)}isAuthorizedFor({type:e,action:t,user:i,crossUser:n}){if(t=="read"&&this.has[e]===!0)return!0;if(!this.has[e])return!1;let s=re.default(this._config,`${e}.${t}`);if(!s)return!!this.has[e][t];if(s.auth&&(!i||!this._auth.key)||s.auth&&this._auth.key!=re.default(this._config,"auth.key"))return!1;let a=[i.uri].concat(Object.values(i.identities||{}).map(u=>u.uri)).filter(u=>u!=null);if(s.auth&&s.identities&&Dt.default(a,s.identities).length==0)return!1;if(s.auth&&s.identityProviders){let u=Object.keys(i&&i.identities||{});if(Dt.default(u,s.identityProviders).length==0)return!1}return n?s.crossUser===!0||Dt.default(s.crossUser||[],a).length>0:!!this.has[e][t]}supportsScheme(e){if(!e)return!1;let t=Ie.default(this.schemes)?this.schemes:null;return t==null&&!ut.default.isContainedIn(e,this.excludedSchemes||[])?!0:ut.default.isContainedIn(e,t)}adjustConcept(e){if(!e||e.__SAVED__)return e;e._getNarrower=t=>this.getNarrower($(R({},t),{concept:e})),e._getAncestors=t=>this.getAncestors($(R({},t),{concept:e})),e._getDetails=t=>j(this,null,function*(){return(yield this.getConcepts($(R({},t),{concepts:[e]})))[0]});for(let t of["broader","narrower","ancestors"])Array.isArray(e[t])&&e[t].length&&!e[t].includes(null)&&(e[t]=this.adjustConcepts(e[t]));return e._registry=this,e}adjustConcepts(e){return Nr(e.map(t=>this.adjustConcept(t)),e)}adjustRegistries(e){return e}adjustScheme(e){if(!e||e.__SAVED__)return e;let t=e._registry;return e._registry=this.cdk&&this.cdk.registryForScheme(e),!e._registry||t===e._registry||e._registry._api.api===this._api.api?e._registry=t||this:["concepts","topConcepts"].forEach(i=>{Array.isArray(e[i])&&(e[i].length===0||e[i][0]===null)&&delete e[i]}),e._registry&&(e._getTop=i=>e._registry.getTop($(R({},i),{scheme:e})),e._getTypes=i=>e._registry.getTypes($(R({},i),{scheme:e})),e._suggest=s=>{var a=s,{search:i}=a,n=J(a,["search"]);return e._registry.suggest($(R({},n),{search:i,scheme:e}))}),e}adjustSchemes(e){return Nr(e.map(t=>this.adjustScheme(t)),e)}adjustConcordances(e){for(let t of e)t._registry=this;return e}adjustMapping(e){for(let t of["from","to"]){let i=`${t}Scheme`;e[i]||(e[i]=re.default(ut.default.conceptsOfMapping(e,t),"[0].inScheme[0]",null))}if(e._registry=this,!e.identifier){let t=re.default(ut.default.addMappingIdentifiers(e),"identifier");t&&(e.identifier=t)}return e}adjustMappings(e){return Nr(e.map(t=>this.adjustMapping(t)),e)}postMappings(){return j(this,arguments,function*(i={}){var n=i,{mappings:e}=n,t=J(n,["mappings"]);if(!e||!e.length)throw new W({parameter:"mappings"});return this._callHelperForArrayWrappers({method:"postMapping",items:e,itemProperty:"mapping",config:t})})}deleteMappings(){return j(this,arguments,function*(i={}){var n=i,{mappings:e}=n,t=J(n,["mappings"]);if(!e||!e.length)throw new W({parameter:"mappings"});return this._callHelperForArrayWrappers({method:"deleteMapping",items:e,itemProperty:"mapping",config:t})})}_callHelperForArrayWrappers(s){return j(this,arguments,function*({method:e,items:t,itemProperty:i,config:n}){let a=[],u=yield Promise.all(t.map(o=>j(this,null,function*(){try{return yield this[e]($(R({[i]:o},n),{_raw:!0}))}catch(c){return a[t.indexOf(o)]=c,null}})));return u._errors=a,u})}};le.providerName="Base";var Le=fe(He(),1);var ur=fe(od(),1);var Ri,gE=new Uint8Array(16);function ws(){if(!Ri&&(Ri=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ri))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ri(gE)}var Re=[];for(let r=0;r<256;++r)Re.push((r+256).toString(16).slice(1));function ud(r,e=0){return(Re[r[e+0]]+Re[r[e+1]]+Re[r[e+2]]+Re[r[e+3]]+"-"+Re[r[e+4]]+Re[r[e+5]]+"-"+Re[r[e+6]]+Re[r[e+7]]+"-"+Re[r[e+8]]+Re[r[e+9]]+"-"+Re[r[e+10]]+Re[r[e+11]]+Re[r[e+12]]+Re[r[e+13]]+Re[r[e+14]]+Re[r[e+15]]).toLowerCase()}var vE=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),bs={randomUUID:vE};function yE(r,e,t){if(bs.randomUUID&&!e&&!r)return bs.randomUUID();r=r||{};let i=r.random||(r.rng||ws)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){t=t||0;for(let n=0;n<16;++n)e[t+n]=i[n];return e}return ud(i)}var Li=yE;var ji="urn:uuid:",yr=class extends le{_prepare(){this.has.mappings={read:!0,create:!0,update:!0,delete:!0},Ae.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}_setup(){this.queue=[],this.localStorageKey="cocoda-mappings--"+this._path;let e="mappings",t=()=>ur.default.getItem(this.localStorageKey).then(i=>{i=i||[];let n=0;for(let s of i.filter(a=>!a.uri||!a.uri.startsWith(ji)))s.uri&&(s.identifier||(s.identifier=[]),s.identifier.push(s.uri)),s.uri=`${ji}${Li()}`,n+=1;return n&&console.warn(`URIs added to ${n} local mappings.`),ur.default.setItem(this.localStorageKey,i)});ur.default.getItem(e).then(i=>{i&&console.warn(`Warning: There is old data in local storage (or IndexedDB, depending on the ) with the key "${e}". This data will not be used anymore. A manual export is necessary to get this data back.`)}),this.queue.push(t().catch(i=>{console.warn("Error when adding URIs to local mappings:",i)}))}isAuthorizedFor({type:e,action:t}){return e=="mappings"&&t!="anonymous"}_getMappingsQueue(){let e=ns.default(this.queue)||Promise.resolve();return new Promise(t=>{function i(){var a,u,o=new Promise((c,p)=>{a=c,u=p});return o.resolve=a,o.reject=u,o}let n=i(),s=()=>{n.resolve()};this.queue.push(n),e.then(()=>ur.default.getItem(this.localStorageKey)).then(a=>{t({mappings:a,done:s})})})}getMapping(i){return j(this,null,function*(){var n=i,{mapping:e}=n,t=J(n,["mapping"]);if(t._raw=!0,!e||!e.uri)throw new W({parameter:"mapping"});return(yield this.getMappings($(R({},t),{uri:e.uri})))[0]})}getMappings(){return j(this,arguments,function*({from:e,fromScheme:t,to:i,toScheme:n,creator:s,type:a,partOf:u,offset:o,limit:c,direction:p,mode:b,identifier:w,uri:q}={}){let y={};return e&&(y.from=be.default(e)?e:e.uri),t&&(y.fromScheme=be.default(t)?{uri:t}:t),i&&(y.to=be.default(i)?i:i.uri),n&&(y.toScheme=be.default(n)?{uri:n}:n),s&&(y.creator=be.default(s)?s:Le.default.prefLabel(s)),a&&(y.type=be.default(a)?a:a.uri),u&&(y.partOf=be.default(u)?u:u.uri),o&&(y.offset=o),c&&(y.limit=c),p&&(y.direction=p),b&&(y.mode=b),w&&(y.identifier=w),q&&(y.uri=q),this._getMappingsQueue().catch(P=>{throw new Ee({message:"Could not get mappings from local storage",relatedError:P})}).then(({mappings:P,done:H})=>{H();let K=(F,Z)=>F.uri==Z||Z&&F.notation&&F.notation[0].toLowerCase()==Z.toLowerCase();if((y.from||y.to)&&(P=P.filter(F=>{let Z=Le.default.conceptsOfMapping(F,"from").find(G=>K(G,y.from))!=null,te=Le.default.conceptsOfMapping(F,"to").find(G=>K(G,y.from))!=null,O=Le.default.conceptsOfMapping(F,"from").find(G=>K(G,y.to))!=null,ee=Le.default.conceptsOfMapping(F,"to").find(G=>K(G,y.to))!=null;return y.direction=="backward"?y.mode=="or"?y.from&&te||y.to&&O:(!y.from||te)&&(!y.to||O):y.direction=="both"?y.mode=="or"?y.from&&(Z||te)||y.to&&(O||ee):(!y.from||Z)&&(!y.to||ee)||(!y.from||te)&&(!y.to||O):y.mode=="or"?y.from&&Z||y.to&&ee:(!y.from||Z)&&(!y.to||ee)})),(y.fromScheme||y.toScheme)&&(P=P.filter(F=>{let Z=Le.default.compare(F.fromScheme,y.fromScheme),te=Le.default.compare(F.toScheme,y.fromScheme),O=Le.default.compare(F.fromScheme,y.toScheme),ee=Le.default.compare(F.toScheme,y.toScheme);return y.direction=="backward"?y.mode=="or"?y.fromScheme&&te||y.toScheme&&O:(!y.fromScheme||te)&&(!y.toScheme||O):y.direction=="both"?y.mode=="or"?y.fromScheme&&(Z||te)||y.toScheme&&(O||ee):(!y.fromScheme||Z)&&(!y.toScheme||ee)||(!y.fromScheme||te)&&(!y.toScheme||O):y.mode=="or"?y.fromScheme&&Z||y.toScheme&&ee:(!y.fromScheme||Z)&&(!y.toScheme||ee)})),y.creator){let F=y.creator.split("|");P=P.filter(Z=>(Z.creator&&Z.creator.find(te=>F.includes(Le.default.prefLabel(te))||F.includes(te.uri)))!=null)}y.type&&(P=P.filter(F=>(F.type||[Le.default.defaultMappingType.uri]).includes(y.type))),y.partOf&&(P=P.filter(F=>F.partOf!=null&&F.partOf.find(Z=>Le.default.compare(Z,{uri:y.partOf}))!=null)),y.identifier&&(P=P.filter(F=>y.identifier.split("|").map(Z=>(F.identifier||[]).includes(Z)||F.uri==Z).reduce((Z,te)=>Z||te))),y.uri&&(P=P.filter(F=>F.uri==y.uri));let Q=P.length;return P=P.sort((F,Z)=>{let te=F.modified||F.created,O=Z.modified||Z.created;return O==null?-1:te==null?1:te>O?-1:1}),P=P.slice(y.offset||0),P=P.slice(0,y.limit),P._totalCount=Q,P})})}postMapping(t){return j(this,arguments,function*({mapping:e}){if(!e)throw new W({parameter:"mapping"});let{mappings:i,done:n}=yield this._getMappingsQueue();if((!e.uri||!e.uri.startsWith(ji))&&(e.uri&&(e.identifier||(e.identifier=[]),e.identifier.push(e.uri)),e.uri=`${ji}${Li()}`),i.find(s=>s.uri==e.uri))throw n(),new W({parameter:"mapping",message:"Duplicate URI"});e.created||(e.created=new Date().toISOString()),e.modified||(e.modified=e.created),i.push(e),i=i.map(s=>Le.default.minifyMapping(s));try{return yield ur.default.setItem(this.localStorageKey,i),n(),e}catch(s){throw n(),s}})}putMapping(t){return j(this,arguments,function*({mapping:e}){if(!e)throw new W({parameter:"mapping"});let{mappings:i,done:n}=yield this._getMappingsQueue(),s=i.findIndex(a=>a.uri==e.uri);if(s==-1)throw n(),new W({parameter:"mapping",message:"Mapping not found"});e.created||(e.created=i[s].created),e.modified=new Date().toISOString(),i[s]=e,i=i.map(a=>Le.default.minifyMapping(a));try{return yield ur.default.setItem(this.localStorageKey,i),n(),e}catch(a){throw n(),a}})}patchMapping(t){return j(this,arguments,function*({mapping:e}){if(!e)throw new W({parameter:"mapping"});let{mappings:i,done:n}=yield this._getMappingsQueue(),s=i.findIndex(a=>a.uri==e.uri);if(s==-1)throw n(),new W({parameter:"mapping",message:"Mapping not found"});e.created||(e.created=i[s].created),e.modified=new Date().toISOString(),i[s]=Object.assign(i[s],e),i=i.map(a=>Le.default.minifyMapping(a));try{return yield ur.default.setItem(this.localStorageKey,i),n(),e}catch(a){throw n(),a}})}deleteMapping(t){return j(this,arguments,function*({mapping:e}){if(!e)throw new W({parameter:"mapping"});let{mappings:i,done:n}=yield this._getMappingsQueue();try{return i=i.filter(s=>s.uri!=e.uri),i=i.map(s=>Le.default.minifyMapping(s)),yield ur.default.setItem(this.localStorageKey,i),n(),!0}catch(s){throw n(),s}})}};yr.providerName="LocalMappings";yr.stored=!0;var ft=fe(He(),1);var tr=class extends le{_prepare(){this._api.api&&this._api.status===void 0&&(this._api.status=or(this._api.api,"/status")),this.has.mappings=!0,this.has.concordances=!0,this.has.annotations=!0,Ae.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}_setup(){if(this._api.api){let e={mappings:"/mappings",concordances:"/concordances",annotations:"/annotations"};for(let t of Object.keys(e))this._api[t]===void 0&&(this._api[t]=or(this._api.api,e[t]))}this.has.mappings=this._api.mappings?{}:!1,this.has.mappings&&(this.has.mappings.read=!!re.default(this._config,"mappings.read",!0),this.has.mappings.create=!!re.default(this._config,"mappings.create"),this.has.mappings.update=!!re.default(this._config,"mappings.update"),this.has.mappings.delete=!!re.default(this._config,"mappings.delete"),this.has.mappings.anonymous=!!re.default(this._config,"mappings.anonymous")),this.has.concordances=this._api.concordances?{}:!1,this.has.concordances&&(this.has.concordances.read=!!re.default(this._config,"concordances.read"),this.has.concordances.create=!!re.default(this._config,"concordances.create"),this.has.concordances.update=!!re.default(this._config,"concordances.update"),this.has.concordances.delete=!!re.default(this._config,"concordances.delete")),this.has.annotations=this._api.annotations?{}:!1,this.has.annotations&&(this.has.annotations.read=!!re.default(this._config,"annotations.read"),this.has.annotations.create=!!re.default(this._config,"annotations.create"),this.has.annotations.update=!!re.default(this._config,"annotations.update"),this.has.annotations.delete=!!re.default(this._config,"annotations.delete")),this.has.auth=re.default(this._config,"auth.key")!=null,this._defaultParams={properties:"annotations"}}getMapping(i){return j(this,null,function*(){var n=i,{mapping:e}=n,t=J(n,["mapping"]);if(!e)throw new W({parameter:"mapping"});if(!e.uri||!e.uri.startsWith(this._api.mappings))throw new W({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});try{return yield this.axios($(R({},t),{url:e.uri,params:R(R({},this._defaultParams),t.params||{})}))}catch(s){if(re.default(s,"response.status")==404)return null;throw s}})}getMappings(Z){return j(this,null,function*(){var te=Z,{from:e,fromScheme:t,to:i,toScheme:n,creator:s,type:a,partOf:u,offset:o,limit:c,direction:p,mode:b,identifier:w,cardinality:q,annotatedBy:y,annotatedFor:P,annotatedWith:H,sort:K,order:Q}=te,F=J(te,["from","fromScheme","to","toScheme","creator","type","partOf","offset","limit","direction","mode","identifier","cardinality","annotatedBy","annotatedFor","annotatedWith","sort","order"]);let O={},ee=this._api.mappings;return e&&(O.from=be.default(e)?e:e.uri),t&&(O.fromScheme=be.default(t)?t:t.uri),i&&(O.to=be.default(i)?i:i.uri),n&&(O.toScheme=be.default(n)?n:n.uri),s&&(O.creator=be.default(s)?s:ft.default.prefLabel(s)),a&&(O.type=be.default(a)?a:a.uri),u&&(O.partOf=be.default(u)?u:u.uri),o&&(O.offset=o),c&&(O.limit=c),p&&(O.direction=p),q&&(O.cardinality=q),y&&(O.annotatedBy=y),P&&(O.annotatedFor=P),H&&(O.annotatedWith=H),b&&(O.mode=b),w&&(O.identifier=w),K&&(O.sort=K),Q&&(O.order=Q),this.axios($(R({},F),{method:"get",url:ee,params:R(R(R({},this._defaultParams),F.params||{}),O)}))})}postMapping(i){return j(this,null,function*(){var n=i,{mapping:e}=n,t=J(n,["mapping"]);if(!e)throw new W({parameter:"mapping"});return e=ft.default.minifyMapping(e),e=ft.default.addMappingIdentifiers(e),this.axios($(R({},t),{method:"post",url:this._api.mappings,data:e,params:R(R({},this._defaultParams),t.params||{})}))})}putMapping(i){return j(this,null,function*(){var n=i,{mapping:e}=n,t=J(n,["mapping"]);if(!e)throw new W({parameter:"mapping"});e=ft.default.minifyMapping(e),e=ft.default.addMappingIdentifiers(e);let s=e.uri;if(!s||!s.startsWith(this._api.mappings))throw new W({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"put",url:s,data:e,params:R(R({},this._defaultParams),t.params||{})}))})}patchMapping(i){return j(this,null,function*(){var n=i,{mapping:e}=n,t=J(n,["mapping"]);if(!e)throw new W({parameter:"mapping"});let s=e.uri;if(!s||!s.startsWith(this._api.mappings))throw new W({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"patch",url:s,data:ar.default(e,"uri"),params:R(R({},this._defaultParams),t.params||{})}))})}deleteMapping(i){return j(this,null,function*(){var n=i,{mapping:e}=n,t=J(n,["mapping"]);if(!e)throw new W({parameter:"mapping"});let s=e.uri;if(!s||!s.startsWith(this._api.mappings))throw new W({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});return yield this.axios($(R({},t),{method:"delete",url:s})),!0})}getAnnotations(i){return j(this,null,function*(){var n=i,{target:e}=n,t=J(n,["target"]);return e&&xe.default(t,"params.target",e),this.axios($(R({},t),{method:"get",url:this._api.annotations}))})}postAnnotation(i){return j(this,null,function*(){var n=i,{annotation:e}=n,t=J(n,["annotation"]);return this.axios($(R({},t),{method:"post",url:this._api.annotations,data:e}))})}putAnnotation(i){return j(this,null,function*(){var n=i,{annotation:e}=n,t=J(n,["annotation"]);let s=e.id;if(!s||!s.startsWith(this._api.annotations))throw new W({parameter:"annotation",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"put",url:s,data:e}))})}patchAnnotation(i){return j(this,null,function*(){var n=i,{annotation:e}=n,t=J(n,["annotation"]);let s=e.id;if(!s||!s.startsWith(this._api.annotations))throw new W({parameter:"annotation",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"patch",url:s,data:e}))})}deleteAnnotation(i){return j(this,null,function*(){var n=i,{annotation:e}=n,t=J(n,["annotation"]);let s=e.id;if(!s||!s.startsWith(this._api.annotations))throw new W({parameter:"annotation",message:"URI doesn't seem to be part of this registry."});return yield this.axios($(R({},t),{method:"delete",url:s})),!0})}getConcordances(e){return j(this,null,function*(){return this.axios($(R({},e),{method:"get",url:this._api.concordances}))})}postConcordance(i){return j(this,null,function*(){var n=i,{concordance:e}=n,t=J(n,["concordance"]);if(!e)throw new W({parameter:"concordance"});return this.axios($(R({},t),{method:"post",url:this._api.concordances,data:e,params:R(R({},this._defaultParams),t.params||{})}))})}putConcordance(i){return j(this,null,function*(){var n=i,{concordance:e}=n,t=J(n,["concordance"]);if(!e)throw new W({parameter:"concordance"});let s=e.uri;if(!s||!s.startsWith(this._api.concordances))throw new W({parameter:"concordance",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"put",url:s,data:e,params:R(R({},this._defaultParams),t.params||{})}))})}patchConcordance(i){return j(this,null,function*(){var n=i,{concordance:e}=n,t=J(n,["concordance"]);if(!e)throw new W({parameter:"concordance"});let s=e.uri;if(!s||!s.startsWith(this._api.concordances))throw new W({parameter:"concordance",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"patch",url:s,data:ar.default(e,"uri"),params:R(R({},this._defaultParams),t.params||{})}))})}deleteConcordance(i){return j(this,null,function*(){var n=i,{concordance:e}=n,t=J(n,["concordance"]);if(!e)throw new W({parameter:"concordance"});let s=e.uri;if(!s||!s.startsWith(this._api.concordances))throw new W({parameter:"concordance",message:"URI doesn't seem to be part of this registry."});return yield this.axios($(R({},t),{method:"delete",url:s})),!0})}};tr.providerName="MappingsApi";tr.stored=!0;var ct=fe(He(),1);var xs={},_r=class extends le{get _cache(){return xs[this.uri]}_prepare(){xs[this.uri]=[],this._occurrencesSupportedSchemes=[],this.has.occurrences=!0,this.has.mappings=!0,Ae.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}_occurrencesIsSupported(e){return j(this,null,function*(){if(!(this._occurrencesSupportedSchemes&&this._occurrencesSupportedSchemes.length))try{let i=or(this._api.api,"voc"),n=yield this.axios({method:"get",url:i});this._occurrencesSupportedSchemes=n||[]}catch(i){}let t=!1;for(let i of this._occurrencesSupportedSchemes)ct.default.compare(e,i)&&(t=!0);return t})}getMappings(e){return j(this,null,function*(){let t=yield this.getOccurrences(e),i=e.from,n=re.default(i,"inScheme[0]")||e.fromScheme,s=e.to,a=re.default(s,"inScheme[0]")||e.toScheme,u=[];for(let o of t){if(!o)continue;let c={};c.from=re.default(o,"memberSet[0]"),c.from?c.from={memberSet:[c.from]}:c.from=null,c.fromScheme=re.default(o,"memberSet[0].inScheme[0]"),c.to=re.default(o,"memberSet[1]"),c.to?c.to={memberSet:[c.to]}:c.to={memberSet:[]},c.toScheme=re.default(o,"memberSet[1].inScheme[0]"),(i&&ct.default.compare(i,re.default(c,"to.memberSet[0]"))||s&&ct.default.compare(s,re.default(c,"from.memberSet[0]")))&&([c.from,c.fromScheme,c.to,c.toScheme]=[c.to,c.toScheme,c.from,c.fromScheme]),!c.fromScheme&&n&&(c.fromScheme=n),!c.toScheme&&a&&(c.toScheme=a),c.type=[ct.default.defaultMappingType.uri],c._occurrence=o,c=ct.default.addMappingIdentifiers(c),u.push(c)}return u._url=t._url,u})}getOccurrences(a){return j(this,null,function*(){var u=a,{from:e,to:t,concepts:i,threshold:n=0}=u,s=J(u,["from","to","concepts","threshold"]);let o=[];i=(i||[]).concat([e,t]).filter(y=>!!y);for(let y of i)o.push(this._occurrencesIsSupported(re.default(y,"inScheme[0]")).then(P=>P&&y.uri?y.uri:null));let c=yield Promise.all(o);if(c=c.filter(y=>y!=null),c.length==0)throw new W({parameter:"concepts"});o=[];for(let y of c)o.push(this._getOccurrences($(R({},s),{params:{member:y,scheme:"*",threshold:n}})));let p=yield Promise.all(o),b=ss.default([],...p),w=[],q=[];for(let y=0;y<b.length;y+=1){let P=b[y];if(!P)continue;let H=P.memberSet.reduce((K,Q)=>K.concat(Q.uri),[]).sort().join(" ");w.includes(H)?q.push(y):w.push(H)}return q.forEach(y=>{delete b[y]}),b=b.filter(y=>y!=null),b=b.sort((y,P)=>parseInt(P.count||0)-parseInt(y.count||0)),b._url=p.map(y=>y._url),b})}_getOccurrences(e){return j(this,null,function*(){let t=this._cache.find(n=>rr.default(n.config.params,e.params));if(t)return t.data;let i=yield this.axios($(R({},e),{method:"get",url:this._api.api}));return this._cache.push({config:e,data:i}),this._cache.length>20&&(xs[this.uri]=this._cache.slice(this._cache.length-20)),i})}};_r.providerName="OccurrencesApi";_r.stored=!1;var Dr=fe(He(),1);var ir=class extends le{_prepare(){this._api.api&&this._api.status===void 0&&(this._api.status=or(this._api.api,"/status")),this.has.schemes=!0,this.has.top=!0,this.has.data=!0,this.has.concepts=!0,this.has.narrower=!0,this.has.ancestors=!0,this.has.types=!0,this.has.suggest=!0,this.has.search=!0,this.has.auth=!0,Ae.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}_setup(){if(this._api.api){let e={schemes:"/voc",top:"/voc/top",concepts:"/voc/concepts",data:"/data",narrower:"/narrower",ancestors:"/ancestors",types:"/types",suggest:"/suggest",search:"/search"};for(let t of Object.keys(e))this._api[t]===void 0&&(this._api[t]=or(this._api.api,e[t]))}this.has.schemes=!!this._api.schemes,!this.has.schemes&&Array.isArray(this.schemes)&&(this.has.schemes=!0),this.has.top=!!this._api.top,this.has.data=!!this._api.data,this.has.concepts=!!this._api.concepts||this.has.data,this.has.narrower=!!this._api.narrower,this.has.ancestors=!!this._api.ancestors,this.has.types=!!this._api.types,this.has.suggest=!!this._api.suggest,this.has.search=!!this._api.search,this.has.auth=re.default(this._config,"auth.key")!=null,this._defaultParams={properties:"+created,issued,modified,editorialNote,scopeNote"}}static _registryConfigForBartocApiConfig({url:e,scheme:t}={}){return!e||!t?null:{api:e,schemes:[t]}}_getSchemeUri(e){return j(this,null,function*(){this._approvedSchemes=this._approvedSchemes||[],this._rejectedSchemes=this._rejectedSchemes||[];let t=this._approvedSchemes.find(s=>Dr.default.compare(e,s));if(t)return t.uri;if(this._rejectedSchemes.find(s=>Dr.default.compare(e,s)))return null;let n=(yield this.getSchemes({params:{uri:Dr.default.getAllUris(e).join("|")}})).find(s=>Dr.default.compare(s,e));return n?(this._approvedSchemes.push({uri:n.uri,identifier:Dr.default.getAllUris(e)}),n.uri):(this._rejectedSchemes.push({uri:e.uri,identifier:e.identifier}),null)})}getSchemes(e){return j(this,null,function*(){if(!this._api.schemes){if(Array.isArray(this.schemes))return this.schemes;throw new De}let t=yield this.axios($(R({},e),{method:"get",url:this._api.schemes,params:R($(R({},this._defaultParams),{limit:500}),e.params||{})}));return Array.isArray(this.schemes)?Nr(t.filter(i=>Dr.default.isContainedIn(i,this.schemes)),t):t})}getTop(i){return j(this,null,function*(){var n=i,{scheme:e}=n,t=J(n,["scheme"]);if(!this._api.top)throw new De;if(!e)throw new W({parameter:"scheme"});let s=yield this._getSchemeUri(e);if(!s)throw new W({parameter:"scheme",message:"Requested vocabulary seems to be unsupported by this API."});return Array.isArray(this._api.top)?this._api.top:this.axios($(R({},t),{method:"get",url:this._api.top,params:$(R($(R({},this._defaultParams),{limit:1e4}),t.params||{}),{uri:s})}))})}getConcepts(i){return j(this,null,function*(){var n=i,{concepts:e}=n,t=J(n,["concepts"]);if(this.has.data===!1)throw new De;if(!e)throw new W({parameter:"concepts"});Array.isArray(e)||(e=[e]);let s=e.map(a=>a.uri).filter(a=>a!=null);return this.axios($(R({},t),{method:"get",url:this._api.data,params:$(R($(R({},this._defaultParams),{limit:500}),t.params||{}),{uri:s.join("|")})}))})}getNarrower(i){return j(this,null,function*(){var n=i,{concept:e}=n,t=J(n,["concept"]);if(!this._api.narrower)throw new De;if(!e||!e.uri)throw new W({parameter:"concept"});return this.axios($(R({},t),{method:"get",url:this._api.narrower,params:$(R($(R({},this._defaultParams),{limit:1e4}),t.params||{}),{uri:e.uri})}))})}getAncestors(i){return j(this,null,function*(){var n=i,{concept:e}=n,t=J(n,["concept"]);if(!this._api.ancestors)throw new De;if(!e||!e.uri)throw new W({parameter:"concept"});return this.axios($(R({},t),{method:"get",url:this._api.ancestors,params:$(R($(R({},this._defaultParams),{limit:1e4}),t.params||{}),{uri:e.uri})}))})}suggest(s){return j(this,null,function*(){var a=s,{use:e="notation,label",types:t=[],sort:i="score"}=a,n=J(a,["use","types","sort"]);return this._search($(R({},n),{endpoint:"suggest",params:$(R({},n.params),{type:t.join("|"),use:e,sort:i})}))})}search(i){return j(this,null,function*(){var n=i,{types:e=[]}=n,t=J(n,["types"]);return this._search($(R({},t),{endpoint:"search",params:$(R({},t.params),{type:e.join("|")})}))})}vocSuggest(n){return j(this,null,function*(){var s=n,{use:e="notation,label",sort:t="score"}=s,i=J(s,["use","sort"]);return this._search($(R({},i),{endpoint:"voc-suggest",params:$(R({},i.params),{use:e,sort:t})}))})}vocSearch(e){return j(this,null,function*(){return this._search($(R({},e),{endpoint:"voc-search"}))})}_search(o){return j(this,null,function*(){var c=o,{endpoint:e,scheme:t,search:i,limit:n,offset:s,params:a}=c,u=J(c,["endpoint","scheme","search","limit","offset","params"]);let p=this._api[e];if(!p)throw new De;if(!i)throw new W({parameter:"search"});n=n||this._jskos.suggestResultLimit||100,s=s||0;let b=t&&(yield this._getSchemeUri(t));return p=p.replace("{searchTerms}",i),this.axios($(R({},u),{params:$(R(R({},this._defaultParams),a),{limit:n,count:n,offset:s,search:i,query:i,voc:b}),method:"get",url:p}))})}getTypes(i){return j(this,null,function*(){var n=i,{scheme:e}=n,t=J(n,["scheme"]);if(!this._api.types)throw new De;if(Array.isArray(this._api.types))return this._api.types;let s=e&&(yield this._getSchemeUri(e));return s&&xe.default(t,"params.uri",s),this.axios($(R({},t),{method:"get",url:this._api.types}))})}};ir.providerName="ConceptApi";ir.providerType="http://bartoc.org/api-type/jskos";var kt=fe(He(),1);var Ss={},wr=class extends le{get _cache(){return Ss[this.uri]}_prepare(){Ss[this.uri]=[],this.has.mappings=!0,Ae.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}getMappings(s){return j(this,null,function*(){var a=s,{from:e,to:t,mode:i}=a,n=J(a,["from","to","mode"]);let u=[];Ie.default(this.schemes)&&(u=this.schemes);let o,c,p=re.default(e,"inScheme[0]"),b=re.default(t,"inScheme[0]"),w,q;if(!e||kt.default.isContainedIn(p,u)?(o=!0,c=t,w=b,q=u.find(O=>kt.default.compare(O,p))||u[0]):(o=!1,c=e,w=p,q=u.find(O=>kt.default.compare(O,b))||u[0]),i!="or")return[];if(!this._api.api)throw new De;if(!c)throw new W({parameter:o?"to":"from"});let y=kt.default.languagePreference.selectLanguage(c.prefLabel);if(!y)throw new W({parameter:o?"to":"from",message:"Missing language"});let P=re.default(c,`altLabel.${y}`,[]);be.default(P)&&(P=[P]);let H=re.default(c,`prefLabel.${y}`),K=P.concat([H]);K=[H];let{url:Q,data:F}=yield this._getReconciliationResults($(R({},n),{labels:K,language:y}));F=[].concat(...Object.values(F).map(O=>O.result)).filter(O=>O),F=F.sort((O,ee)=>O.score!=ee.score?ee.score-O.score:O.match!=ee.match?O.match?-1:1:O.id.length-ee.id.length);let Z=re.default(q,"namespace",""),te=F.map(O=>({fromScheme:w,from:{memberSet:[c]},toScheme:q,to:{memberSet:[{uri:Z+O.id}]},type:[O.match?"http://www.w3.org/2004/02/skos/core#exactMatch":O.score>=80?"http://www.w3.org/2004/02/skos/core#closeMatch":"http://www.w3.org/2004/02/skos/core#mappingRelation"]}));return o&&(te=te.map(O=>Object.assign(O,{fromScheme:O.toScheme,from:O.to,toScheme:O.fromScheme,to:O.from}))),te._url=Q,te})}_getReconciliationResults(n){return j(this,null,function*(){var s=n,{labels:e,language:t}=s,i=J(s,["labels","language"]);e=e.sort();let a=this._cache.find(q=>rr.default(q.labels,e)&&q.language==t);if(a)return a;let u={},o=0;for(let q of e)u[`q${o}`]={query:q},o+=1;let c=this._api.api;t&&(c=c.replace("{language}",t));let p=`queries=${encodeURIComponent(JSON.stringify(u))}`;xe.default(i,["headers","Content-Type"],"application/x-www-form-urlencoded");let b=yield this.axios($(R({},i),{method:"post",url:c,data:p}));b=b||{};let w={labels:e,language:t,data:b,url:`${c}${c.includes("?")?"&":"?"}${p}`};return this._cache.push(w),this._cache.length>20&&(Ss[this.uri]=this._cache.slice(this._cache.length-20)),w})}};wr.providerName="ReconciliationApi";wr.stored=!1;var $t=fe(He(),1);var br=class extends le{_prepare(){this._cache=[],this.has.mappings=!0,Ae.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}supportsScheme(e){return re.default(e,"_registry.has.search",!1)}getMappings(u){return j(this,null,function*(){var o=u,{from:e,to:t,mode:i,selected:n,limit:s=10}=o,a=J(o,["from","to","mode","selected","limit"]);if(i!="or")return[];if(!n)throw new W({parameter:"selected"});let c=[];e&&this.supportsScheme(n.scheme[!1])?c.push(this._getMappings($(R({},a),{concept:e,sourceScheme:n.scheme[!0],targetScheme:n.scheme[!1],limit:s}))):c.push(Promise.resolve([])),t&&this.supportsScheme(n.scheme[!0])?c.push(this._getMappings($(R({},a),{concept:t,sourceScheme:n.scheme[!1],targetScheme:n.scheme[!0],limit:s,swap:!0}))):c.push(Promise.resolve([]));let[p,b]=yield Promise.all(c);for(b=b.filter(w=>!p.find(q=>$t.default.compareMappingMembers(w,q)));p.length+b.length>s;)b.length>=p.length?b=b.slice(0,-1):p=p.slice(0,-1);return rs.default(p,b)})}_getMappings(u){return j(this,null,function*(){var o=u,{concept:e,sourceScheme:t,targetScheme:i,limit:n,swap:s=!1}=o,a=J(o,["concept","sourceScheme","targetScheme","limit","swap"]);if(!e||!t||!i)return[];if($t.default.compare(t,i))return[];let c=$t.default.languagePreference.selectLanguage(e.prefLabel)||this._defaultLanguages[0],p=$t.default.prefLabel(e,{fallbackToUri:!1,language:c});if(!p)return[];let b=/^[\s\wäüöÄÜÖß]*\w/.exec(p);p=b?b[0]:p;let q=(yield this._getResults($(R({},a),{label:p,targetScheme:i,limit:n}))).map(y=>({fromScheme:t,from:{memberSet:[e]},toScheme:i,to:{memberSet:[y]},type:["http://www.w3.org/2004/02/skos/core#mappingRelation"]}));return s&&(q=q.map(y=>Object.assign(y,{fromScheme:y.toScheme,from:y.to,toScheme:y.fromScheme,to:y.from}))),q})}_getResults(s){return j(this,null,function*(){var a=s,{label:e,targetScheme:t,limit:i}=a,n=J(a,["label","targetScheme","limit"]);let u=(this._cache[t.uri]||{})[e];if(u&&u._limit>=i)return u;let o=re.default(t,"_registry");if(!o||o.has.search===!1)return[];let c=yield o.search($(R({},n),{search:e,scheme:t,limit:i}));return this._cache[t.uri]||(this._cache[t.uri]={}),this._cache[t.uri][e]=c,this._cache[t.uri][e]._limit=i,c})}};br.providerName="LabelSearchSuggestion";br.stored=!1;var je=fe(He(),1);var xr=class extends le{_prepare(){this.has.schemes=!0,this.has.top=!0,this.has.data=!0,this.has.concepts=!0,this.has.narrower=!0,this.has.ancestors=!0,this.has.types=!0,this.has.suggest=!0,this.has.search=!0,Ae.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}static _registryConfigForBartocApiConfig({url:e,scheme:t}={}){if(!e||!t)return null;let i={},n=e.match(/(.+\/)([^/]+)\/$/);return n?(i.api=n[1]+"rest/v1/",t.VOCID=n[2],i.schemes=[t],i):null}get _language(){return this.languages[0]||this._defaultLanguages[0]||"en"}_getApiUrl(e,t,i){let n=e&&e.VOCID||re.default(this.schemes.find(a=>je.default.compare(a,e)),"VOCID");if(!n)throw new W({parameter:"scheme",message:"Missing scheme or VOCID property on scheme"});t=t||"",i=i||{},i.lang||(i.lang=this._language);let s=Object.keys(i).map(a=>`${a}=${encodeURIComponent(i[a])}`).join("&");return`${this._api.api}${n}${t}${s?"?"+s:""}`}_getDataUrl(e,{addFormatParameter:t=!0}={}){let i=re.default(e,"inScheme[0]");if(!e||!e.uri)throw new W({parameter:"concept",message:"Missing concept URI"});return this._getApiUrl(i,"/data",t?{format:"application/json"}:{})}_getSchemeUri(e){return j(this,null,function*(){this._approvedSchemes=this._approvedSchemes||[],this._rejectedSchemes=this._rejectedSchemes||[];let t=this._approvedSchemes.find(a=>je.default.compare(e,a));if(t)return t.uri;if(this._rejectedSchemes.find(a=>je.default.compare(e,a)))return null;let i=this._getApiUrl(e,"/"),s=(yield this.axios({method:"get",url:i})).conceptschemes.find(a=>je.default.compare(a,e));return s?(this._approvedSchemes.push({uri:s.uri,identifier:je.default.getAllUris(e)}),s.uri):(this._rejectedSchemes.push({uri:e.uri,identifier:e.identifier}),null)})}_toJskosConcept(e,{concept:t,scheme:i,result:n,language:s}={}){if(!e)return null;t=je.default.deepCopy(t||{}),s=s||e.lang||"en",t.uri=e.uri,i&&(t.inScheme=[i]);let a=e.matchedPrefLabel||e.prefLabel||e.label;if(be.default(a))xe.default(t,`prefLabel.${s}`,a);else{a&&!Ie.default(a)&&(a=[a]);for(let c of a||[])xe.default(t,`prefLabel.${c.lang}`,c.value)}let u=e.altLabel;if(be.default(u))xe.default(t,`altLabel.${s}`,[u]);else{u&&!Ie.default(u)&&(u=[u]);for(let c of u||[])re.default(t,`altLabel.${c.lang}`)?(t.altLabel[c.lang].push(c.value),t.altLabel[c.lang]=gr.default(t.altLabel[c.lang])):xe.default(t,`altLabel.${c.lang}`,[c.value])}let o=e.notation||e["skos:notation"]||je.default.notation(t);o&&(t.notation=[o.value||o]),e.broader&&(Ie.default(e.broader)||(e.broader=[e.broader]),t.broader=e.broader.map(c=>be.default(c)?{uri:c}:c)),e.hasChildren===!0?t.narrower=[null]:e.hasChildren===!1&&(t.narrower=[]),e.type&&!Ie.default(e.type)&&(e.type=[e.type]),t.type=t.type||[];for(let c of e.type||[]){if(!je.default.isValidUri(c))continue;let p=c.slice(0,c.indexOf(":"));n&&n["@context"]&&n["@context"][p]&&(c=c.replace(p+":",n["@context"][p])),t.type.push(c)}return t.type=gr.default(t.type),t.type.length||(t.type=["http://www.w3.org/2004/02/skos/core#Concept"]),t}getSchemes(t){return j(this,null,function*(){var e=J(t,[]);let i=[];for(let n of this.schemes||[]){let s=this._getApiUrl(n,"/"),u=(yield this.axios($(R({},e),{method:"get",url:s}))).conceptschemes.find(c=>je.default.compare(c,n)),o=u&&(u.prefLabel||u.label||u.title);o&&xe.default(n,`prefLabel.${this._language}`,o),i.push(n),this._approvedSchemes=this._approvedSchemes||[],this._approvedSchemes.find(c=>je.default.compare(n,c))||this._approvedSchemes.push({uri:u.uri,identifier:je.default.getAllUris(n)})}return i})}getTop(i){return j(this,null,function*(){var n=i,{scheme:e}=n,t=J(n,["scheme"]);let s=this._getApiUrl(e,"/topConcepts"),a=yield this._getSchemeUri(e);if(!a)throw new W({parameter:"scheme",message:"Missing or unsupported scheme or VOCID property on scheme"});xe.default(t,"params.scheme",a);let u=yield this.axios($(R({},t),{method:"get",url:s})),o=[];for(let c of u.topconcepts||[]){let p=this._toJskosConcept(c,{scheme:e,language:this._language});p.topConceptOf=[e],o.push(p)}return o})}getConcepts(i){return j(this,null,function*(){var n=i,{concepts:e}=n,t=J(n,["concepts"]);Ie.default(e)||(e=[e]),e=e.map(a=>({uri:a.uri,inScheme:a.inScheme}));let s=[];for(let a of e){let u=this._getDataUrl(a,{addFormatParameter:!1});if(!u)continue;let o=yield this.axios($(R({},t),{method:"get",url:u,params:{uri:a.uri,format:"application/json"}})),c=o&&o.graph&&o.graph.find(p=>je.default.compare(p,a));if(c){let p=this._toJskosConcept(c,{concept:a,result:o});for(let b of["broader","narrower"]){let w=c[b]||p[b];w&&!Ie.default(w)&&(w=[w]),w||(w=[]),p[b]=w.map(q=>this._toJskosConcept(o.graph.find(y=>je.default.compare(y,q)),{scheme:a.inScheme[0],result:o}))}p.ancestors=[],s.push(p)}}return s})}getNarrower(i){return j(this,null,function*(){var n=i,{concept:e}=n,t=J(n,["concept"]);if(!e||!e.uri)throw new W({parameter:"concept"});let s=e.inScheme[0],a=this._getApiUrl(s,"/children");return xe.default(t,"params.uri",e.uri),((yield this.axios($(R({},t),{method:"get",url:a}))).narrower||[]).map(c=>this._toJskosConcept(c,{scheme:s}))})}getAncestors(i){return j(this,null,function*(){var n=i,{concept:e}=n,t=J(n,["concept"]);if(!e||!e.uri)throw new W({parameter:"concept"});let s=e.inScheme[0],a=this._getApiUrl(s,"/broaderTransitive");xe.default(t,"params.uri",e.uri);let u=yield this.axios($(R({},t),{method:"get",url:a})),o=[],c=e.uri;for(;c;){if(c!=e.uri){let b=re.default(u,`broaderTransitive["${c}"]`);o=o.concat([b])}c=re.default(u,`broaderTransitive["${c}"].broader[0]`)}return o.map(b=>this._toJskosConcept(b,{scheme:s})).filter(b=>b.uri!=e.uri)})}suggest(e){return j(this,null,function*(){e._raw=!0;let t=yield this.search(e),i=[e.search,[],[],[]];for(let n of t){let s=je.default.notation(n),a=je.default.prefLabel(n);i[1].push((s?s+" ":"")+a),i[2].push(""),i[3].push(n.uri)}return t._totalCount!=null?i._totalCount=t._totalCount:i._totalCount=t.length,i})}search(a){return j(this,null,function*(){var u=a,{search:e,scheme:t,limit:i,types:n=[]}=u,s=J(u,["search","scheme","limit","types"]);let o=this._getApiUrl(t,"/search");return xe.default(s,"params.query",`${e}*`),xe.default(s,"params.unique",1),xe.default(s,"params.maxhits",i||100),xe.default(s,"params.type",n.join(" ")),((yield this.axios($(R({},s),{method:"get",url:o}))).results||[]).map(b=>this._toJskosConcept(b,{scheme:t}))})}getTypes(i){return j(this,null,function*(){var n=i,{scheme:e}=n,t=J(n,["scheme"]);let s=this._getApiUrl(e,"/types"),a=[],u=yield this.axios($(R({},t),{method:"get",url:s}));for(let o of u&&u.types||[])o.uri!="http://www.w3.org/2004/02/skos/core#Concept"&&(o.label&&(o.prefLabel={[u["@context"]["@language"]]:o.label},delete o.label),a.push(o));return a._url=s,a})}};xr.providerName="SkosmosApi";xr.providerType="http://bartoc.org/api-type/skosmos";var fr=fe(He(),1),Ni=fe(ii(),1);var Di="http://id.loc.gov/authorities/",Ui=[{uri:`${Di}subjects`,identifier:["http://bartoc.org/en/node/454"],notation:["LCSH"],concepts:[null],topConcepts:[]},{uri:`${Di}names`,identifier:["http://bartoc.org/en/node/18536"],notation:["LCNAF"],concepts:[null],topConcepts:[]}],fd=`${Di}classification`;function cd(r){let e={};e.uri=r["@id"],e.notation=(r["http://www.loc.gov/mads/rdf/v1#code"]||[]).map(n=>n["@value"]);let t=r["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]||r["http://www.w3.org/2000/01/rdf-schema#label"]||[];t.length&&(e.prefLabel={},e.prefLabel[t[0]["@language"]||"en"]=t[0]["@value"]);let i=r["http://www.w3.org/2004/02/skos/core#altLabel"]||[];i.length&&(e.altLabel={en:i.map(n=>n["@value"])});for(let n of r["http://www.w3.org/2000/01/rdf-schema#comment"]||[])e.definition=e.definition||{},e.definition.en=e.definition.en||[],e.definition.en.push(n["@value"]);return e}function _E(r){let e=cd(r);return e.namespace=e.uri+"/",e.type=["http://www.w3.org/2004/02/skos/core#ConceptScheme"],e}var As=r=>e=>!e||!r||!r.namespace?!0:e.uri.startsWith(r.namespace);function wE(r,{scheme:e}){let t=cd(r);t.type=["http://www.w3.org/2004/02/skos/core#Concept"],t.inScheme=e?[e]:(r["http://www.loc.gov/mads/rdf/v1#isMemberOfMADSScheme"]||[]).map(s=>Ui.find(a=>a.uri===s["@id"])),(!t.inScheme.length||!t.inScheme[0])&&delete t.inScheme;let i=r["http://www.loc.gov/mads/rdf/v1#hasNarrowerAuthority"]||fr.default.compare(t.inScheme[0],{uri:fd})&&r["http://www.loc.gov/mads/rdf/v1#hasMADSCollectionMember"]||[];t.narrower=i.map(s=>({uri:s["@id"]})).filter(As(t.inScheme&&t.inScheme[0]));let n=r["http://www.loc.gov/mads/rdf/v1#hasBroaderAuthority"]||fr.default.compare(t.inScheme[0],{uri:fd})&&r["http://www.loc.gov/mads/rdf/v1#isMemberOfMADSCollection"]||[];return t.broader=n.map(s=>({uri:s["@id"]})).filter(As(t.inScheme&&t.inScheme[0])),t}var Sr=class extends le{_prepare(){this.has.schemes=!0,this.has.top=!1,this.has.data=!0,this.has.concepts=!0,this.has.narrower=!1,this.has.ancestors=!1,this.has.suggest=!0,this.has.search=!0,Ae.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}static _registryConfigForBartocApiConfig({scheme:e}={}){return!e||!Ui.find(t=>fr.default.compare(t,e))?null:{schemes:[e]}}getSchemes(){return j(this,null,function*(){let e=[];for(let t of yield Promise.all(Ui.filter(i=>!this.schemes||!this.schemes.length||this.schemes.find(n=>fr.default.compare(i,n))).map(i=>(0,Ni.default)({method:"get",url:`${i.uri.replace("http:","https:")}.json`}).then(({status:n,data:s})=>{if(n===200){let a=s.find(u=>i.uri===u["@id"]);if(a)return a=fr.default.merge(_E(a),i),a.topConcepts=(a.topConcepts||[]).filter(u=>u),a}return null}))))t&&e.push(t);return e})}getConcepts(t){return j(this,arguments,function*({concepts:e}){Array.isArray(e)||(e=[e]);let i=[];for(let n of yield Promise.all(e.map(s=>(0,Ni.default)({method:"get",url:`${s.uri.replace("http:","https:")}.json`}).then(({status:a,data:u})=>{if(a===200){let o=u.find(c=>s.uri===c["@id"]);return o?wE(o,{scheme:s.inScheme&&s.inScheme[0]}):null}}))))n&&i.push(n);return i})}suggest(e){return j(this,null,function*(){let t=yield this.search(e);return[e.search,t.map(i=>fr.default.prefLabel(i,{fallbackToUri:!0})),[],t.map(i=>i.uri)]})}search(s){return j(this,arguments,function*({search:e,scheme:t,limit:i,offset:n}){let a=fr.default.getAllUris(t).find(o=>o.startsWith(Di));if(!a||!Ui.find(o=>fr.default.compare(o,{uri:a})))throw new W({parameter:"scheme",message:"provided scheme is not supported (yet)"});if(!e)throw new W({parameter:"search",message:"parameter is empty or missing"});i=i||this._jskos.suggestResultLimit||100,n=n||0;let{data:u}=yield(0,Ni.default)({method:"get",url:`${a}/suggest2`.replace("http:","https:"),params:{q:e,count:i||100,offset:n,searchtype:"keyword"}});return(u.hits||[]).map(o=>({uri:o.uri,notation:[o.token],prefLabel:{en:o.aLabel},inScheme:[t]})).filter(As(t))})}};Sr.providerName="LocApi";Sr.providerType="http://bartoc.org/api-type/loc";var Br=fe(He(),1),hd=fe(qs(),1);function Fi(r){return r.replace(/\\u[\dA-F]{4}/gi,function(e){return String.fromCharCode(parseInt(e.replace(/\\u/g,""),16))})}var Fr={},Ar=class extends le{_prepare(){this.has.schemes=!0,this.has.top=!0,this.has.data=!0,this.has.concepts=!0,this.has.narrower=!0,this.has.ancestors=!0,this.has.suggest=!0,this.has.search=!0,Ae.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1}),Fr[this.uri]={index:{},conceptCache:{},schemeCache:{}}}get _index(){return Fr[this.uri]&&Fr[this.uri].index}get _conceptCache(){return Fr[this.uri]&&Fr[this.uri].conceptCache}get _schemeCache(){return Fr[this.uri]&&Fr[this.uri].schemeCache}static _registryConfigForBartocApiConfig({url:e,scheme:t}={}){return!e||!t?null:{schemes:[{uri:e,identifier:Br.default.getAllUris(t).filter(n=>n!==e)}]}}_loadScheme(i){return j(this,null,function*(){var n=i,{scheme:e}=n,t=J(n,["scheme"]);let s=Br.default.getAllUris(e);for(let y of s)if(this._schemeCache[y])return this._schemeCache[y];let a=this.schemes.find(y=>Br.default.compare(y,e));if(!a||!a.uri)throw new Qe({message:`Tried to load unsupported scheme (${e&&e.uri})`});let u=a.uri;s=gr.default(s.concat(Br.default.getAllUris(a)));let o=".json";u.endsWith("/")&&(o="index.json");let c=yield this.axios($(R({},t),{url:`${u}${o}`,_skipAdditionalParameters:!0}));if(c.id!==u)throw new Qe({message:"Skohub URL did not return expected concept scheme"});let{title:p,preferredNamespaceUri:b,hasTopConcept:w,description:q}=c;e={uri:u,identifier:s.filter(y=>y!==u)},e.prefLabel=p,Object.keys(e.prefLabel||{}).forEach(y=>{e.prefLabel[y]=Fi(e.prefLabel[y])}),e.namespace=b,e.topConcepts=(w||[]).map(y=>this._toJskosConcept(y)),e.concepts=[null],q&&(e.definition=q,Object.keys(e.definition).forEach(y=>{e.definition[y]=[Fi(e.definition[y])]}));for(let y of Object.keys(e).filter(P=>!e[P]))delete e[y];for(let y of s)this._schemeCache[y]=e;return e})}_loadConcept(i){return j(this,null,function*(){var n=i,{uri:e}=n,t=J(n,["uri"]);if(this._conceptCache[e])return this._conceptCache[e];try{let s=yield this.axios($(R({},t),{url:`${e}.json`,_skipAdditionalParameters:!0}));if(s.id!==e)throw new Qe({message:"Skohub URL did not return expected concept URI"});let a=this._toJskosConcept(s);return this._conceptCache[e]=a,a}catch(s){return null}})}_toJskosConcept(e){let t={uri:e.id};return t.prefLabel=e.prefLabel,Object.keys(t.prefLabel||{}).forEach(i=>{t.prefLabel[i]=Fi(t.prefLabel[i])}),t.narrower=(e.narrower||[]).map(i=>this._toJskosConcept(i)),t.notation=e.notation||[],e.broader&&e.broader.id&&(t.broader=[{uri:e.broader.id}]),e.inScheme&&e.inScheme.id&&(t.inScheme=[{uri:e.inScheme.id}]),e.scopeNote&&(t.scopeNote=e.scopeNote,Object.keys(t.scopeNote).forEach(i=>{t.scopeNote[i]=[Fi(t.scopeNote[i])]})),t}getSchemes(t){return j(this,null,function*(){var e=J(t,[]);return Promise.all(this.schemes.map(i=>this._loadScheme($(R({},e),{scheme:i}))))})}getTop(i){return j(this,null,function*(){var n=i,{scheme:e}=n,t=J(n,["scheme"]);if(!e||!e.uri)throw new W({parameter:"scheme",message:"Missing scheme URI"});return e=yield this._loadScheme(R({scheme:e},t)),e.topConcepts||[]})}getConcepts(i){return j(this,null,function*(){var n=i,{concepts:e}=n,t=J(n,["concepts"]);return Ie.default(e)||(e=[e]),(yield Promise.all(e.map(({uri:s})=>this._loadConcept($(R({},t),{uri:s}))))).filter(Boolean)})}getAncestors(i){return j(this,null,function*(){var n=i,{concept:e}=n,t=J(n,["concept"]);if(!e||!e.uri)throw new W({parameter:"concept"});if(e.ancestors&&e.ancestors[0]!==null)return e.ancestors;if(e=yield this._loadConcept($(R({},t),{uri:e.uri})),!e||!e.broader||!e.broader.length)return[];let s=e.broader[0];return[s].concat(yield this.getAncestors(R({concept:s},t))).map(a=>({uri:a.uri}))})}getNarrower(i){return j(this,null,function*(){var n=i,{concept:e}=n,t=J(n,["concept"]);if(!e||!e.uri)throw new W({parameter:"concept"});return e.narrower&&e.narrower[0]!==null||(e=yield this._loadConcept($(R({},t),{uri:e.uri}))),e.narrower})}search(n){return j(this,arguments,function*({search:e,scheme:t,limit:i=100}){if(t=yield this._loadScheme({scheme:t}),!t||!t.uri)throw new W({parameter:"scheme"});if(!e)throw new W({parameter:"search"});let s;this._index[t.uri]||(this._index[t.uri]={});for(let o of[""].concat(this.languages)){if(this._index[t.uri][o]){s=this._index[t.uri][o];break}if(this._index[t.uri][o]!==null)try{let c=o?`.${o}.index`:".index";t.uri.endsWith("/")&&(c=`index${c}`);let p=yield this.axios({url:`${t.uri}${c}`,_skipAdditionalParameters:!0});if(p.length<100){this._index[t.uri][o]=null;continue}s=hd.default.create(),s.import(p),this._index[t.uri][o]=s;break}catch(c){this._index[t.uri][o]=null}}if(!s)throw new Qe({message:"Could not find search index for any of the available languages "+this.languages.join(",")});let a=s.search(e);return(yield this.getConcepts({concepts:a.map(o=>({uri:o}))})).slice(0,i)})}suggest(e){return j(this,null,function*(){e._raw=!0;let t=yield this.search(e),i=[e.search,[],[],[]];for(let n of t){let s=Br.default.notation(n),a=Br.default.prefLabel(n);i[1].push((s?s+" ":"")+a),i[2].push(""),i[3].push(n.uri)}return t._totalCount!=null?i._totalCount=t._totalCount:i._totalCount=t.length,i})}};Ar.providerName="Skohub";Ar.providerType="http://bartoc.org/api-type/skohub";var zt=fe(He(),1),pd=fe(qs(),1);var $e={},Or=class extends le{_prepare(){this.has.schemes=!0,this.has.top=!0,this.has.data=!0,this.has.concepts=!0,this.has.narrower=!0,this.has.ancestors=!0,this.has.suggest=!0,this.has.search=!0,Ae.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}_setup(){this._scheme=null}static _registryConfigForBartocApiConfig({url:e,scheme:t}={}){return!e||!t?null:{api:e}}_schemeInfoToJSKOS(e){let t=e.labels.find(s=>s.lang==="x-uri").text,i={};e.labels.filter(s=>!s.lang.startsWith("x-")).forEach(s=>{i[s.lang]=s.text});let n={uri:t,prefLabel:i};return e.categories&&e.categories.length&&(n.topConcepts=[null]),e.category&&e.category.length&&(n.concepts=[null]),n}_categoryToJSKOS(e,{scheme:t,broader:i=[]}){if(!e||!t)return null;let n=e.ID,s=`${t.uri}/${n}`;if($e[t.uri].concepts[s])return $e[t.uri].concepts[s];let a={};e.labels.filter(o=>!o.lang.startsWith("x-")&&o.text).forEach(o=>{a[o.lang]=o.text.replace(`${n} `,""),$e[t.uri].searchIndex.add(s,a[o.lang])});let u={};return e.labels.filter(o=>!o.lang.startsWith("x-")&&o.description).forEach(o=>{u[o.lang]||(u[o.lang]=[]),u[o.lang].push(o.description)}),$e[t.uri].concepts[s]={uri:s,notation:[n],prefLabel:a,scopeNote:u,inScheme:[{uri:t.uri}],narrower:(e.categories||[]).map(o=>({uri:`${t.uri}/${o.ID}`})),broader:i},$e[t.uri].concepts[s]}_removeNarrower(e){return e&&Object.assign({},e,{narrower:e.narrower&&e.narrower.length?[null]:[]})}_loadSchemeData(e){return j(this,null,function*(){let t=yield this.axios($(R({},e),{method:"get",url:this._api.api,_skipAdditionalParameters:!0}));this._scheme=this._schemeInfoToJSKOS(t);let i=this._scheme.uri;$e[i]={schemeInfo:t,searchIndex:pd.default.create({tokenize:"full"}),concepts:{}};let n=(s,{broader:a=[]}={})=>{let u=this._categoryToJSKOS(s,{scheme:this._scheme,broader:a});(s.categories||[]).forEach(o=>n(o,{broader:[{uri:u.uri}]}))};t.categories.forEach(s=>n(s)),$e[i].topConcepts=t.categories.map(s=>this._categoryToJSKOS(s,{scheme:this._scheme}))})}getSchemes(){return j(this,arguments,function*(e={}){if(!this._api.api)throw new De;return this._scheme||(this._loadSchemeDataPromise||(this._loadSchemeDataPromise=this._loadSchemeData(e)),yield this._loadSchemeDataPromise),[this._scheme]})}getTop(i){return j(this,null,function*(){var n=i,{scheme:e}=n,t=J(n,["scheme"]);if(!e||!e.uri)throw new W({parameter:"scheme",message:"Missing scheme URI"});if(this._scheme||(yield this.getSchemes(t)),!zt.default.compare(e,this._scheme))throw new W({parameter:"scheme",message:"Requested vocabulary seems to be unsupported by this API."});return $e[this._scheme.uri].topConcepts.map(this._removeNarrower)})}getConcepts(i){return j(this,null,function*(){var n=i,{concepts:e}=n,t=J(n,["concepts"]);return Ie.default(e)||(e=[e]),this._scheme||(yield this.getSchemes(t)),e.map(s=>$e[this._scheme.uri].concepts[s.uri]).map(this._removeNarrower)})}getAncestors(i){return j(this,null,function*(){var n=i,{concept:e}=n,t=J(n,["concept"]);if(!e||!e.uri)throw new W({parameter:"concept"});if(e.ancestors&&e.ancestors[0]!==null)return e.ancestors;this._scheme||(yield this.getSchemes(t)),e=$e[this._scheme.uri].concepts[e.uri];let s=e&&e.broader&&e.broader[0];return s?[s].concat(yield this.getAncestors(R({concept:s},t))):[]})}getNarrower(i){return j(this,null,function*(){var n=i,{concept:e}=n,t=J(n,["concept"]);if(!e||!e.uri)throw new W({parameter:"concept"});return e.narrower&&e.narrower[0]!==null?e.narrower:(this._scheme||(yield this.getSchemes(t)),e=$e[this._scheme.uri].concepts[e.uri],(e&&e.narrower||[]).map(s=>$e[this._scheme.uri].concepts[s.uri]).map(this._removeNarrower))})}search(n){return j(this,arguments,function*({search:e,scheme:t,limit:i=100}){if(!t||!t.uri)throw new W({parameter:"scheme"});if(!e)throw new W({parameter:"search"});if(!t||!t.uri)throw new W({parameter:"scheme",message:"Missing scheme URI"});if(this._scheme||(yield this.getSchemes()),!zt.default.compare(t,this._scheme))throw new W({parameter:"scheme",message:"Requested vocabulary seems to be unsupported by this API."});return(yield $e[this._scheme.uri].searchIndex.search(e)).map(a=>$e[this._scheme.uri].concepts[a]).map(this._removeNarrower).slice(0,i)})}suggest(e){return j(this,null,function*(){e._raw=!0;let t=yield this.search(e),i=[e.search,[],[],[]];for(let n of t){let s=zt.default.notation(n),a=zt.default.prefLabel(n);i[1].push((s?s+" ":"")+a),i[2].push(""),i[3].push(n.uri)}return t._totalCount!=null?i._totalCount=t._totalCount:i._totalCount=t.length,i})}};Or.providerName="MyCoRe";Or.providerType="http://bartoc.org/api-type/mycore";var nr={[le.providerName]:le,init(r){if(this[r.provider])return new this[r.provider](r);throw new Wr},addProvider(r){if(r.prototype instanceof le||r===le)this[r.providerName]=r;else throw new Wr}};nr.addProvider(ir);nr.addProvider(tr);Object.values(Wt).forEach(r=>{nr.addProvider(r)});var Cs={},Cr=class{constructor(e){this.config=e,this.axios=dd.default.create()}setConfig(e){this.config=e}get config(){return this._config}set config(e){e=e||{},e.registries=e.registries||[],e.registries=e.registries.map(t=>nr.init(t)).filter(t=>t),e.registries.forEach(t=>{t.cdk=this}),this._config=e}get providers(){return nr}createInstance(e){return new Cr(e)}loadConfig(e){return j(this,null,function*(){let t=yield this.axios.get(e);this.config=t.data})}loadBuildInfo(a){var u=a,{url:e,buildInfo:t=null,interval:i=6e4,callback:n}=u,s=J(u,["url","buildInfo","interval","callback"]);if(!e&&!this.config.cocodaBaseUrl)throw new Ee({message:"Could not determine URL to load build config."});return e||(e=`${this.config.cocodaBaseUrl}build-info.json`),this.repeat($(R({},s),{function:()=>j(this,null,function*(){return(yield this.axios.get(e,{headers:{"Cache-Control":"no-cache"}})).data}),interval:i,callback:(o,c,p)=>{o?n(o):(p||!p&&t&&!rr.default(c,t))&&n(null,c,p||t)}}))}getRegistryForUri(e){return this.config.registries.find(t=>t.uri==e)}initializeRegistry(e){return e=nr.init(e),e.cdk=this,e}addProvider(e){nr.addProvider(e)}static addProvider(e){nr.addProvider(e)}repeat({function:e,interval:t=15e3,callback:i,callImmediately:n=!0}={}){if(!e)throw new W({parameter:"function"});if(typeof e!="function")throw new W({parameter:"function",message:"function needs to be a function"});let s=()=>j(this,null,function*(){return e()});if(t=parseInt(t),isNaN(t))throw new W({parameter:"interval"});if(!i)throw new W({parameter:"callback"});if(typeof i!="function")throw new W({parameter:"callback",message:"callback needs to be a function"});let a={timer:null,result:null,error:null,isPaused:!1,interval:t},u=w=>{let q=a.result;rr.default(q,w)||(a.result=w,a.error=null,i(null,w,q))},o=w=>{a.error=w,i(w)},c=w=>{a.isPaused||(a.timer=setTimeout(()=>{w()},a.interval))},p=()=>s().then(u).catch(o).then(()=>c(p)),b=(w=n)=>{w?p():c(p)};return b(),{start:(...w)=>{a.isPaused=!1,b(...w)},stop:()=>{a.isPaused=!0,a.timer?clearTimeout(a.timer):setTimeout(()=>{a.timer&&clearTimeout(a.timer)},a.interval)},get isPaused(){return a.isPaused},get lastResult(){return a.result},get hasErrored(){return!!a.error},get interval(){return a.interval},set interval(w){a.interval=w}}}getSchemes(){return j(this,arguments,function*(e={}){let t=[],i=[];for(let n of this.config.registries)if(n.has.schemes!==!1){let s=n.getSchemes(e).then(a=>{for(let u of a){u._registry=n,u.__DETAILSLOADED__=1,u.type=u.type||["http://www.w3.org/2004/02/skos/core#ConceptScheme"];let o=t.find(w=>qr.default.compare(w,u)),c,p,b=!1;if(o){c=this.config.registries.indexOf(n),c!=-1&&(c=this.config.registries.length-c),p=this.config.registries.indexOf(re.default(o,"_registry")),p!=-1&&(p=this.config.registries.length-p);let w=u.concepts?u.concepts.length==0?-1:1:0,q=o.concepts?o.concepts.length==0?-1:1:0;w>q?b=!0:w<q?b=!1:b=p<c}if(!o||b){if(b){let w=t.findIndex(q=>qr.default.compare(q,o));w!=-1&&t.splice(w,1),u=qr.default.merge(u,ar.default(o,["concepts","topConcepts"]),{mergeUris:!0,skipPaths:["_registry"]})}u._registry=n,t.push(u)}else{let w=t.findIndex(q=>qr.default.compare(q,u));if(w!=-1){let q=t[w]._registry;t[w]=qr.default.merge(t[w],ar.default(u,["concepts","topConcepts"]),{mergeUris:!0,skipPaths:["_registry"]}),t[w]._registry=q}}}}).catch(a=>{console.warn("Couldn't load schemes for registry",n.uri,a)});i.push(s)}return yield Promise.all(i),t.forEach(n=>{let s=n._registry;delete n._registry;let a=this.registryForScheme(n);!a||a._api.api===s._api.api?n._registry=s:n._registry=a}),qr.default.sortSchemes(t.filter(Boolean))})}registryForScheme(e){let t=e._registry;if(t)return t;for(let i of e.API||[]){let n=i,{type:s}=n,a=J(n,["type"]);let u=a.url;if(Cs[u]){let o=Cs[u];return Array.isArray(o._jskos.schemes)&&!qr.default.isContainedIn(e,o._jskos.schemes)&&o._jskos.schemes.push(e),o}else{let o=Object.values(nr).find(p=>p.providerType===s);if(!o||!o._registryConfigForBartocApiConfig)continue;let c=o.providerName;if(a.scheme=e,a=nr[c]._registryConfigForBartocApiConfig(a),!a)continue;a.provider=c;try{if(t=this.initializeRegistry(a),t)return Cs[u]=t,t}catch(p){continue}}}return null}};var md=new Cr;function bE(r){Object.values(Wt).forEach(e=>(r||md).addProvider(e))}return am(xE);})();
|
|
11
|
+
`)}function as(r){let e=(r.identifier||[]).filter(t=>t&&!t.startsWith("urn:jskos:mapping:")).concat([Dp(r),Up(r)]).sort();return Object.assign({},r,{identifier:e})}function Fp(r,e,t){r=r&&as(r),e=e&&as(e);let i=r&&r.identifier?r.identifier.find(s=>s.startsWith(t)):null,n=e&&e.identifier?e.identifier.find(s=>s.startsWith(t)):null;return i==n}function Bp(r,e){return Fp(r,e,"urn:jskos:mapping:content:")}var OC=Bp;function qC(r,e){return Fp(r,e,"urn:jskos:mapping:members:")}kp.exports={mappingContent:jp,mappingMembers:Np,mappingContentIdentifier:Up,mappingMembersIdentifier:Dp,addMappingIdentifiers:as,compareMappings:Bp,compareMappingContent:OC,compareMappingMembers:qC}});var us=g((xP,Wp)=>{function zp(r,e,t){var i=Array.prototype.slice,n=typeof Object.keys=="function"?Object.keys:function(l){var p=[];for(var w in l)p.push(w);return p},s=function(l,p){return l===p?!0:l instanceof Date&&p instanceof Date?l.getTime()===p.getTime():typeof l!="object"&&typeof p!="object"?l==p:o(l,p)};function a(l){return l==null}function u(l){return Object.prototype.toString.call(l)=="[object Arguments]"}function o(l,p){if(a(l)||a(p)||l.prototype!==p.prototype)return!1;if(u(l))return u(p)?(l=i.call(l),p=i.call(p),s(l,p)):!1;try{var w=n(l),b=n(p),q,y}catch(P){return!1}if(w.length!=b.length)return!1;for(w.sort(),b.sort(),y=w.length-1;y>=0;y--)if(w[y]!=b[y])return!1;for(y=w.length-1;y>=0;y--)if(q=w[y],t){let P=t(l[q],p[q],q);if(P===void 0&&(P=zp(l[q],p[q])),!P)return!1}else if(!s(l[q],p[q]))return!1;return!0}return s(r,e)}Wp.exports={get:(r,e,t=void 0)=>{let i=s=>String.prototype.split.call(e,s).filter(Boolean).reduce((a,u)=>a!=null?a[u]:a,r),n=i(/[,[\]]+?/)||i(/[,[\].]+?/);return n===void 0||n===r?t:n},pick:(r,e)=>e.reduce((t,i)=>(r&&r.hasOwnProperty(i)&&(t[i]=r[i]),t),{}),forOwn:(r,e)=>{for(let t in r)r.hasOwnProperty(t)&&e(r[t],t)},isEqualWith:zp,intersection:(...r)=>r.reduce((e,t)=>e.filter(i=>t.includes(i))),isObject:r=>typeof r=="object"&&r!==null,isString:r=>!!(r&&typeof r.valueOf()=="string"),union:(r,e)=>[...new Set([...r,...e])],unionWith:(r,e,t)=>[...r,...e].reduce((i,n)=>(i.findIndex(s=>t(s,n))!==-1||i.push(n),i),[]),omitMod:(r,e)=>{for(let t of e){typeof t=="string"&&(t=t.split("."));for(let i=0;i<t.length-1;i++)r=r[t[i]];delete r[t.pop()]}}}});var fs=g((SP,CC)=>{CC.exports=[{RELEVANCE:"very high",broader:[{uri:"http://www.w3.org/2004/02/skos/core#closeMatch"}],definition:{de:["gleiche Bedeutung"],en:["same meaning"]},notation:["="],prefLabel:{ar:"\u062A\u0637\u0627\u0628\u0642 \u062A\u0627\u0645",be:"\u0434\u0430\u043A\u043B\u0430\u0434\u043D\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u0446\u044C","be-tarask":"\u0434\u0430\u043A\u043B\u0430\u0434\u043D\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",bn:"\u09B9\u09C1\u09AC\u09C1\u09B9\u09C1 \u09AE\u09BF\u09B2",ca:"equival\xE8ncia exacta",cs:"p\u0159esn\xE1 shoda",da:"exact match",de:"exakte \xDCbereinstimmung",en:"exact match",eo:"ekzakta ekvivalento",es:"equivalencia exacta",fi:"vastaava k\xE4site",fr:"\xE9quivalence exacte",gl:"correspondencia exacta",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05DE\u05D3\u05D5\u05D9\u05E7\u05EA",hu:"pontos egyez\xE9s",id:"sama persis",it:"corrispondenza esatta",ja:"\u5B8C\u5168\u4E00\u81F4",lv:"tie\u0161a sakrit\u012Bba",mk:"\u0442\u043E\u0447\u043D\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",ms:"padanan tepat","ms-arab":"\u06A4\u0627\u062F\u0646\u0646 \u062A\u06A4\u062A",nb:"eksakt samsvar",nl:"exacte match",nn:"eksakt samsvar",pl:"dok\u0142adne dopasowanie",pt:"correspond\xEAncia exata",ro:"echivalentul exact",ru:"\u0442\u043E\u0447\u043D\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",sq:"p\xEBrputhje e p\xEBrpikt\xEB",sr:"\u0442\u0430\u0447\u043D\u043E \u043F\u043E\u0434\u0443\u0434\u0430\u0440\u0430\u045A\u0435",sv:"exakt tr\xE4ff",tr:"tam e\u015Fle\u015Fme",uk:"\u0442\u043E\u0447\u043D\u0430 \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u043D\u0456\u0441\u0442\u044C",zh:"\u7CBE\u78BA\u5339\u914D","zh-hans":"\u7CBE\u786E\u5339\u914D","zh-hant":"\u7CBE\u78BA\u5339\u914D"},SHORT:"exact",uri:"http://www.w3.org/2004/02/skos/core#exactMatch"},{RELEVANCE:"high",broader:[{uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}],definition:{de:["in etwa gleiche Bedeutung"],en:["same general idea but not fully identical meaning"]},notation:["\u2248"],prefLabel:{ar:"\u062A\u0637\u0627\u0628\u0642 \u0642\u0631\u064A\u0628","be-tarask":"\u0431\u043B\u0456\u0437\u043A\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",ca:"equival\xE8ncia inexacta",de:"hohe \xDCbereinstimmung",en:"close match",eo:"proksima kongrua\u0135o",es:"equivalencia inexacta",fi:"l\xE4hes vastaava k\xE4site",fr:"quasi-\xE9quivalence",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05E7\u05E8\u05D5\u05D1\u05D4",it:"corrispondenza parziale",mk:"\u0431\u043B\u0438\u0441\u043A\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",ms:"padanan dekat","ms-arab":"\u06A4\u0627\u062F\u0646\u0646 \u062F\u06A9\u062A",nb:"n\xE6rt samsvar",nl:"nabije match",nn:"n\xE6rt samsvar",pl:"cz\u0119\u015Bciowe dopasowanie",pt:"correspond\xEAncia pr\xF3xima",ru:"\u0431\u043B\u0438\u0437\u043A\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",sr:"\u0431\u043B\u0438\u0441\u043A\u043E \u043F\u043E\u043A\u043B\u0430\u043F\u0430\u045A\u0435",sv:"n\xE4ra matchning",tr:"yak\u0131n e\u015Fle\u015Fme","zh-hans":"\u9AD8\u5EA6\u5339\u914D"},SHORT:"close",uri:"http://www.w3.org/2004/02/skos/core#closeMatch"},{RELEVANCE:"medium",broader:[{uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}],definition:{de:["umfassendere Bedeutung"],en:["broader meaning"]},notation:[">"],prefLabel:{"be-tarask":"\u0448\u044B\u0440\u043E\u043A\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",ca:"relaci\xF3 llunyana",de:"allgemeinere Bedeutung",en:"broad match",eo:"malstrikta kongruo",fi:"vastaava laajempi k\xE4site",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05E8\u05D7\u05D1\u05D4",it:"corrispondenza generica",ja:"\u90E8\u5206\u4E00\u81F4",mk:"\u043F\u043E\u0448\u0438\u0440\u043E\u043A\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",nb:"bredere samsvar",nl:"brede match",nn:"breitt samsvar",pl:"dopasowanie poj\u0119cia o szerszym znaczeniu","pt-br":"correspond\xEAncia gen\xE9rica",ru:"\u0431\u043E\u043B\u0435\u0435 \u0448\u0438\u0440\u043E\u043A\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",sr:"\u0443 \u0448\u0438\u0440\u0435\u043C \u0441\u043C\u0438\u0441\u043B\u0443",sv:"bred tr\xE4ff","zh-hans":"\u5E7F\u6CDB\u5339\u914D"},related:[{uri:"http://www.w3.org/2004/02/skos/core#narrowMatch"}],SHORT:"broad",uri:"http://www.w3.org/2004/02/skos/core#broadMatch"},{RELEVANCE:"medium",broader:[{uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}],definition:{en:["more specific meaning"]},notation:["<"],prefLabel:{"be-tarask":"\u0432\u0443\u0437\u043A\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",ca:"relaci\xF3 estreta",de:"spezifischere Bedeutung",en:"narrow match",eo:"strikta kongruo",fi:"vastaava suppeampi k\xE4site",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05E6\u05E8\u05D4",it:"corrispondenza con termine pi\xF9 specifico",mk:"\u043F\u043E\u0442\u0435\u0441\u043D\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",nb:"smalere samsvar",nl:"nauwe match",nn:"snevert samsvar",pl:"dopasowanie poj\u0119cia o w\u0119\u017Cszym znaczeniu","pt-br":"correspond\xEAncia aproximada",ru:"\u0431\u043E\u043B\u0435\u0435 \u0443\u0437\u043A\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",sr:"\u0443 \u0443\u0436\u0435\u043C \u0441\u043C\u0438\u0441\u043B\u0443",sv:"smal tr\xE4ff",ur:"\u0646\u06CC\u0631\u0648 \u0645\u06CC\u0686","zh-hans":"\u6709\u9650\u5339\u914D"},related:[{uri:"http://www.w3.org/2004/02/skos/core#broadMatch"}],SHORT:"narrow",uri:"http://www.w3.org/2004/02/skos/core#narrowMatch"},{RELEVANCE:"low",broader:[{uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}],definition:{de:["assoziative Verkn\xFCpfung unterschiedlicher Bedeutungen"],en:["associative link between meanings"]},notation:["~"],prefLabel:{"be-tarask":"\u0437\u044C\u0432\u044F\u0437\u0430\u043D\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",ca:"parella relacionada",de:"verwandte Bedeutung",en:"related match",eo:"rilata kongruo",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05E7\u05E9\u05D5\u05E8\u05D4",it:"corrispondenza correlata",lv:"saist\u012Bta sakrit\u012Bba",mk:"\u043F\u043E\u0432\u0440\u0437\u0430\u043D\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",ms:"padanan berkaitan","ms-arab":"\u06A4\u0627\u062F\u0646\u0646 \u0628\u0631\u06A9\u0627\u0621\u064A\u062A\u0646",nb:"relatert samsvar",nl:"gerelateerde match",pl:"dopasowanie poj\u0119cia o powi\u0105zanym znaczeniu",ru:"\u0430\u0441\u0441\u043E\u0446\u0438\u0430\u0442\u0438\u0432\u043D\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",tr:"ili\u015Fkili benze\u015Fme",ur:"\u0645\u062A\u0639\u0644\u0642\u06C1 \u0645\u06CC\u0686",vec:"parente\u0142a re\u0142asionada","zh-hans":"\u5173\u8054\u5339\u914D"},SHORT:"related",uri:"http://www.w3.org/2004/02/skos/core#relatedMatch"},{RELEVANCE:"generic",definition:{de:["unbekannter Bedeutungszusammenhang"],en:["unknown type of link between meanings"]},notation:["\u2192"],prefLabel:{ar:"\u0646\u0648\u0639 \u0639\u0644\u0627\u0642\u0629 \u0627\u0644\u062A\u0637\u0628\u064A\u0642",be:"\u0445\u0430\u0440\u0430\u043A\u0442\u044D\u0440\u043D\u0430\u044F \u0430\u0434\u043D\u043E\u0441\u0456\u043D\u0430 \u0430\u0434\u043B\u044E\u0441\u0442\u0440\u0430\u0432\u0430\u043D\u043D\u044F","be-tarask":"\u0445\u0430\u0440\u0430\u043A\u0442\u044D\u0440\u043D\u0430\u044F \u0430\u0434\u043D\u043E\u0441\u0456\u043D\u0430 \u0430\u0434\u043B\u044E\u0441\u0442\u0440\u0430\u0432\u0430\u043D\u044C\u043D\u044F",ca:"relaci\xF3 de mapatge",de:"allgemeine Mapping-Relation",en:"SKOS generic mapping relation",fr:"lien de correspondance SKOS",he:"\u05D9\u05D7\u05E1 \u05DE\u05D9\u05E4\u05D5\u05D9 \u05DB\u05DC\u05DC\u05D9",id:"relasi pemetaan",mk:"\u043F\u0440\u0435\u0441\u043B\u0438\u043A\u0443\u0432\u0430\u0447\u043A\u0438 \u043E\u0434\u043D\u043E\u0441",nb:"generell mappingrelasjon","pt-br":"rela\xE7\xE3o gen\xE9rica de mapeamento",sr:"\u0440\u0435\u043B\u0430\u0446\u0438\u0458\u0430 \u043C\u0430\u043F\u0438\u0440\u0430\u045A\u0430",sv:"mappnings relation",zh:"\u6620\u5C04\u95DC\u4FC2","zh-hant":"\u6620\u5C04\u95DC\u4FC2"},SHORT:"",uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}]});var Gp=g((AP,Hp)=>{var EC=fs(),Ii={Concept:{type:["http://www.w3.org/2004/02/skos/core#Concept"]},ConceptScheme:{type:["http://www.w3.org/2004/02/skos/core#ConceptScheme"]},ConceptMapping:{type:EC.map(r=>r.uri)},ConceptOccurrence:{type:["http://purl.org/cld/cdtype/CatalogueOrIndex"]},Registry:{type:["http://www.w3.org/ns/dcat#Catalog"]},Distribution:{type:["http://www.w3.org/ns/dcat#Distribution"]},Concordance:{type:["http://rdfs.org/ns/void#Linkset","http://rdf-vocabulary.ddialliance.org/xkos#Correspondence"]},Resource:{},Item:{},ConceptBundle:{},Annotation:{type:["Annotation","http://www.w3.org/ns/oa#Annotation"]}},Ei=Object.keys(Ii).reduce((r,e)=>{for(let t of Ii[e].type||[])r[t]=e;return r},{});function IC(r,e=!1){var t;if(typeof r=="string"&&r)r in Ei?t=Ei[r]:(r=r.toLowerCase().replace(/s$/,""),t=Object.keys(Ii).find(i=>{let n=i.toLowerCase();if(n===r||n==="concept"+r)return!0}));else if(typeof r=="object"&&r.type){let i=Array.isArray(r.type)?r.type:[r.type];for(let n of i)if(n in Ei){t=Ei[n];break}}return e&&t?t.toLowerCase().replace(/^concept(.+)/,"$1"):t}Hp.exports={objectTypes:Ii,guessObjectType:IC}});var ls=g((OP,Kp)=>{var TC=/[\\^$.*+?()[\]{}|]/g,PC=r=>r.replace(TC,"\\$&"),MC=/[%ÄÖÜäöü ]/g,cs=class{constructor(e={}){if(Object.assign(this,e),this.notationPattern||(this.notationPattern=".+"),!this.uriPattern&&this.namespace){this.uriPattern="^"+PC(this.namespace);let t=this.notationPattern.replace(MC,encodeURI);this.uriPattern+="("+t+")$"}this.NOTATION_REGEX=RegExp("^"+this.notationPattern+"$"),this.uriPattern&&(this.URI_REGEX=RegExp(this.uriPattern))}isValidNotation(e){return this.NOTATION_REGEX.exec(e)}notationFromUri(e){if(this.URI_REGEX){let t=this.URI_REGEX.exec(e);if(t)return decodeURI(t[1])}}uriFromNotation(e){if(this.uriPattern)return e=encodeURI(e),this.uriPattern.replace(/^\^|\$$/g,"").replace(/\\/g,"").replace(/\(.*\)/,e)}conceptFromUri(e,t={}){let i=this.notationFromUri(e);if(i===void 0)return;let n={uri:e,notation:[i]};return t.inScheme&&(n.inScheme=[{uri:this.uri}]),t.topConcept&&(n.topConceptOf=[{uri:this.uri}]),n}conceptFromNotation(e,t){if(this.isValidNotation(e))return this.conceptFromUri(this.uriFromNotation(e),t)}};Kp.exports=cs});var hs=g((qP,Vp)=>{var RC=us(),Ti={store:null,path:"",defaults:["en"],getLanguages:Jp,selectLanguage:LC};function Jp(){return RC.get(Ti.store,Ti.path)||Ti.defaults}function LC(r){if(!r)return null;for(let e of Jp())if(r[e])return e;for(let e of Object.keys(r))if(e!="-")return e;return null}Vp.exports=Ti});var nd=g((CP,id)=>{var ie=us(),jC=r=>/^[A-Z]*$/.test(r),ot=(r,e)=>e.split(".").reduce((t,i)=>t&&t[i]?t[i]:null,r),NC=r=>((r instanceof Array?r:[r]).forEach(t=>{t["@context"]="https://gbv.github.io/jskos/context.json"}),r),gs=r=>(Object.keys(r).forEach(e=>{jC(e)||e.startsWith("_")?delete r[e]:r[e]!=null&&typeof r[e]=="object"&&(r[e]=gs(r[e]))}),r),UC=gs,Pi=(r,e=[],t=!0)=>{e=e.concat(["ancestors","narrower","broader","mappings","memberList","TOPCONCEPTS","MAPPINGS","PROVIDER"]);let i=Array.isArray(r)?[]:{};for(let n in r)if(!(t&&n[0]=="_")){if(e.includes(n))if(r[n]&&Array.isArray(r[n])){r[n].length>0?i[n]=[null]:i[n]=[];continue}else{i[n]=null;continue}if(n=="inScheme"){let s=[];for(let a of r.inScheme){let u={uri:a.uri};a.notation&&(u.notation=a.notation),a.prefLabel&&(u.prefLabel=a.prefLabel),s.push(u)}i.inScheme=s;continue}r[n]!=null&&typeof r[n]=="object"?i[n]=Pi(r[n]):i[n]=r[n]}return i},DC=Pi,ps=r=>r?(r.uri?[r.uri]:[]).concat(r.identifier||[]):[],vr=(r,e)=>{if(r==null&&e==null)return!0;let t=s=>s.replace("http://").replace("https://"),i=ps(r).map(t),n=ps(e).map(t);return ie.intersection(i,n).length>0},FC=vr,BC=vr,kC=vr,$C=r=>ie.get(r,"type",[]).includes("http://www.w3.org/2004/02/skos/core#Concept")||ie.get(r,"inScheme")!=null||ie.get(r,"topConceptOf")!=null,Yp=r=>ie.get(r,"type",[]).includes("http://www.w3.org/2004/02/skos/core#ConceptScheme"),Xp=(r,e)=>{if(!r||!e)return!1;for(let t of e)if(vr(r,t))return!0;return!1},zC=Xp,WC=(r,e=!1)=>r.sort((t,i)=>{let n=ie.get(t,"notation[0]"),s=ie.get(i,"notation[0]");if(n&&s&&(n=n.toLowerCase(),s=s.toLowerCase()),e&&(n=parseFloat(n)||n,s=parseFloat(s)||s),(!n||!s||n==s)&&(n=t.uri,s=i.uri),n&&s){if(n>s)return 1;if(n<s)return-1}return 0}),HC=r=>{let e=["notation[0]",["prefLabel.de","prefLabel.en"],"uri"];return r.sort((t,i)=>{for(let n of e){let s,a;if(Array.isArray(n))for(let u of n)s=s||ie.get(t,u),a=a||ie.get(i,u);else s=ie.get(t,n),a=ie.get(i,n);if(s!=null&&a!=null){if(s=s.toLowerCase(),a=a.toLowerCase(),s>a)return 1;if(s<a)return-1}}return 0})},GC=r=>{let e=ie.pick(Pi(r),["from","to","fromScheme","toScheme","creator","contributor","type","created","modified","note","identifier","uri","partOf"]);for(let t of[e.from,e.to])ie.forOwn(t,(i,n)=>{let s=[];for(let a of i)s.push(ie.pick(a,["uri","notation"]));t[n]=s});return e.fromScheme&&(e.fromScheme=ie.pick(e.fromScheme,["uri","notation"])),e.toScheme&&(e.toScheme=ie.pick(e.toScheme,["uri","notation"])),e.partOf&&(e.partOf=e.partOf.map(t=>ie.pick(t,["uri"]))),e},Zp=fs(),kt=function(r){for(let e of Zp)if(r==e.uri)return e;return null},Qp=kt("http://www.w3.org/2004/02/skos/core#mappingRelation"),KC=function(r,e=Qp){let t;return Array.isArray(r)&&r.length>0?t=r[0]:t=r,kt(t)||e},JC=(r,e={})=>{let{language:t}=e,i=ot(r,"from.memberSet.0.notation.0"),n=ot(r,"to.memberSet.0.notation.0");i=i!==null?i:"",n=n!==null?n:"";let s=kt(ot(r,"type.0"));s=s?s.SHORT:"";let a="",u="",o="";return t&&(a=ot(r,`from.memberSet.0.prefLabel.${t}`),u=ot(r,`to.memberSet.0.prefLabel.${t}`),o=ot(r,`creator.0.prefLabel.${t}`)),{fromNotation:i,toNotation:n,fromLabel:a,toLabel:u,type:s,creator:o}},VC=(r={})=>{let e=r.delimiter||",",t=r.quoteChar||'"',i=r.lineTerminator||`
|
|
12
|
+
`,n=t+t,s=a=>t+(a==null?"":a.split(t).join(n))+t;return a=>a.map(s).join(e)+i},jr=(r,e)=>{let t=[];for(let i of["from","to"])(e==null||i===e)&&(t=t.concat(ie.get(r,`${i}.memberSet`)||ie.get(r,`${i}.memberChoice`)||ie.get(r,`${i}.memberList`)||[]));return t.filter(i=>i!=null)},YC=(r={})=>{let e=VC(r),t=r.language||"en";r.type==null&&(r.type=!0);let i=a=>{a=a||[];let u=[];for(let o of["from","to"]){r.schemes&&u.push(`${o}Scheme`);let l=Math.max(...a.map(p=>jr(p,o).length),1);for(let p=0;p<l;p+=1)u.push(`${o}Notation${p?p+1:""}`),r.labels&&u.push(`${o}Label${p?p+1:""}`)}return r.type&&u.push("type"),r.creator&&u.push("creator"),e(u)},n=(a,u={})=>{let o=[];for(let l of["from","to"]){r.schemes&&o.push(ie.get(a,`${l}Scheme.notation[0]`,""));let p=jr(a,l),w=u[`${l}Count`];w==null&&(w=p.length),w=Math.max(w,1);for(let b=0;b<w;b+=1)o.push(ie.get(p[b],"notation[0]","")),r.labels&&o.push(ie.get(p[b],`prefLabel.${t}`,""))}return r.type&&o.push(ie.get(kt(ie.get(a,"type[0]")),"SHORT","")),r.creator&&o.push(ie.get(a,`creator[0].prefLabel.${t}`)),e(o)};return{header:i,fromMapping:n,fromMappings:(a,u={header:!0})=>{let o="";u.header&&(o+=i(a));let l={fromCount:Math.max(...a.map(p=>jr(p,"from").length)),toCount:Math.max(...a.map(p=>jr(p,"to").length))};for(let p of a)o+=n(p,l);return o}}};function XC(r,e){return ie.isEqualWith(r,e,(t,i,n)=>{let s={[n]:t},a={[n]:i};if(n=="from"||n=="to")return ie.isEqualWith(Object.getOwnPropertyNames(ie.get(t,n,{})),Object.getOwnPropertyNames(ie.get(i,n,{})))?ie.isEqualWith(jr(s,n),jr(a,n),(u,o,l)=>{if(l!=null)return vr(u,o)}):!1;if(n=="fromScheme"||n=="toScheme")return vr(t,i)})}var{objectTypes:ZC,guessObjectType:ds}=Gp(),QC=(r,e)=>{let t=ds(r),i=ds(e);return!(t&&i&&t!=i)},ed=r=>{Array.isArray(r)&&r.sort((e,t)=>e===null?1:t===null?-1:0)},rd=(r,e)=>(!r||!e||((Array.isArray(r.identifier)||Array.isArray(e.identifier))&&(r.identifier=ie.union(r.identifier||[],e.identifier||[])),!r.uri&&e.uri&&(r.uri=e.uri),r.uri&&e.uri&&r.uri!=e.uri&&!(r.identifier||[]).includes(e.uri)&&(r.identifier=(r.identifier||[]).concat([e.uri])),Array.isArray(r.identifier)&&r.uri&&(r.identifier=r.identifier.filter(t=>t!==r.uri)),(r.identifier||[]).length==0&&delete r.identifier,ed(r.identifier)),r),td=(r,e,t)=>{if(!r||!e)return r||e;t=t||{};let i=t._path||"",n=t.detectMismatch||[],s=t.skipPaths||[],a={};return ie.forOwn(r,(u,o)=>{if(!s.includes(i+o))if(Array.isArray(u)&&Array.isArray(e[o]))a[o]=ie.unionWith(u,e[o],(l,p)=>ie.isObject(l)&&ie.isObject(p)?vr(l,p):l===p),ed(a[o]);else if(ie.isObject(u)&&ie.isObject(e[o]))a[o]=td(u,e[o],Object.assign({_path:`${i}${o}.`},t));else{if(u&&e[o]&&n.includes(i+o)&&!ie.isEqualWith(u,e[o]))throw new Error("Property mismatch in "+i+o);a[o]=u}}),ie.forOwn(e,(u,o)=>{r[o]||(a[o]=u)}),i==""&&ie.omitMod(a,s),t.mergeUris&&rd(a,e),a},ms=r=>Array.isArray(r)?r.map(e=>ms(e)):ie.isObject(r)?(ie.forOwn(r,(e,t)=>{r[t]=ms(e)}),r):ie.isString(r)?r.normalize():r,eE=r=>{var e=/^[A-Za-z][A-Za-z0-9+\-.]*:(?:\/\/(?:(?:[A-Za-z0-9\-._~!$&'()*+,;=:]|%[0-9A-Fa-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9A-Fa-f]{1,4}:){6}|::(?:[0-9A-Fa-f]{1,4}:){5}|(?:[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,1}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){3}|(?:(?:[0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){2}|(?:(?:[0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}:|(?:(?:[0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})?::)(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|(?:(?:[0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})?::)|[Vv][0-9A-Fa-f]+\.[A-Za-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|(?:[A-Za-z0-9\-._~!$&'()*+,;=]|%[0-9A-Fa-f]{2})*)(?::[0-9]*)?(?:\/(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*|\/(?:(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*)?|(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*|)(?:\?(?:[A-Za-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*)?(?:#(?:[A-Za-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*)?$/;return r.match(e)!==null},rE={mappingsByConcepts:(r,e,t)=>{let i=["memberSet","memberList","memberChoice"],n,s;for(let a of i)n=n||ie.get(r,t+"."+a+"[0].notation[0]"),s=s||ie.get(e,t+"."+a+"[0].notation[0]");return n==null||n<s?-1:s==null||n>s?1:0}},tE=(r,e)=>!r||!e?!1:[r.uri].concat(Object.values(r.identities||{}).map(t=>t.uri)).filter(t=>t!=null).includes(ie.get(e,"creator[0].uri")),iE=ls(),nE=hs();function sE(r,e){let t;if(r&&r.notation&&r.notation.length)t=r.notation[0],(Yp(r)||e=="scheme")&&(t=t.toUpperCase());else if(r&&r.inScheme&&r.inScheme[0]&&r.uri)try{t=new iE(r&&r.inScheme&&r.inScheme[0]).notationFromUri(r.uri)}catch(i){}return t||""}function vs(r,e,{language:t}={}){let i=r&&e?r[e]:r;return i&&(i[t]||(t=nE.selectLanguage(i),t))?i[t]:null}function aE(r,e={}){e=e||{};let t=e.fallbackToUri==null?!0:e.fallbackToUri;return ie.get(r,`prefLabel.${e.language}`)||vs(r,"prefLabel",e)||(t&&r&&r.uri?r.uri:"")}function oE(r,e={}){e=e||{};let t=ie.get(r,`definition.${e.language}`)||vs(r,"definition",e)||[];return ie.isString(t)&&(t=[t]),t}function uE(r){return ie.get(r,"stored",ie.get(r,"constructor.stored",ie.get(r,"provider.constructor.stored",!1)))}function fE(r){return ie.isString(r.creator)?r.creator:r.creator&&r.creator.id}function cE(r){return ie.get(r,"creator.name")||""}function lE(r,e){return!!(r&&ie.isString(r.creator)?e&&e.includes(r.creator):e&&r.creator&&e.includes(r.creator.id))}id.exports={addContext:NC,clean:gs,cleanJSKOS:UC,copyDeep:Pi,deepCopy:DC,getAllUris:ps,compare:vr,compareObjects:FC,compareSchemes:BC,compareConcepts:kC,isConcept:$C,isScheme:Yp,isContainedIn:Xp,isSchemeInList:zC,sortConcepts:WC,sortSchemes:HC,minifyMapping:GC,mappingTypes:Zp,mappingTypeByUri:kt,mappingTypeByType:KC,flattenMapping:JC,mappingCSV:YC,defaultMappingType:Qp,conceptsOfMapping:jr,compareMappingsDeep:XC,objectTypes:ZC,guessObjectType:ds,matchObjectTypes:QC,mergeUris:rd,merge:td,normalize:ms,isValidUri:eE,compareFunctions:rE,userOwnsMapping:tE,notation:sE,languageMapContent:vs,prefLabel:aE,definition:oE,mappingRegistryIsStored:uE,annotationCreatorUri:fE,annotationCreatorName:cE,annotationCreatorMatches:lE}});var He=g((EP,sd)=>{var hE=$p(),pE=nd(),dE=ls(),mE=hs();sd.exports=Object.assign({ConceptScheme:dE,languagePreference:mE},hE,pE)});var od=g((ad,_s)=>{(function(r){if(typeof ad=="object"&&typeof _s!="undefined")_s.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var e;typeof window!="undefined"?e=window:typeof global!="undefined"?e=global:typeof self!="undefined"?e=self:e=this,e.localforage=r()}})(function(){var r,e,t;return function i(n,s,a){function u(p,w){if(!s[p]){if(!n[p]){var b=typeof mt=="function"&&mt;if(!w&&b)return b(p,!0);if(o)return o(p,!0);var q=new Error("Cannot find module '"+p+"'");throw q.code="MODULE_NOT_FOUND",q}var y=s[p]={exports:{}};n[p][0].call(y.exports,function(P){var H=n[p][1][P];return u(H||P)},y,y.exports,i,n,s,a)}return s[p].exports}for(var o=typeof mt=="function"&&mt,l=0;l<a.length;l++)u(a[l]);return u}({1:[function(i,n,s){(function(a){"use strict";var u=a.MutationObserver||a.WebKitMutationObserver,o;if(u){var l=0,p=new u(P),w=a.document.createTextNode("");p.observe(w,{characterData:!0}),o=function(){w.data=l=++l%2}}else if(!a.setImmediate&&typeof a.MessageChannel!="undefined"){var b=new a.MessageChannel;b.port1.onmessage=P,o=function(){b.port2.postMessage(0)}}else"document"in a&&"onreadystatechange"in a.document.createElement("script")?o=function(){var K=a.document.createElement("script");K.onreadystatechange=function(){P(),K.onreadystatechange=null,K.parentNode.removeChild(K),K=null},a.document.documentElement.appendChild(K)}:o=function(){setTimeout(P,0)};var q,y=[];function P(){q=!0;for(var K,Q,F=y.length;F;){for(Q=y,y=[],K=-1;++K<F;)Q[K]();F=y.length}q=!1}n.exports=H;function H(K){y.push(K)===1&&!q&&o()}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],2:[function(i,n,s){"use strict";var a=i(1);function u(){}var o={},l=["REJECTED"],p=["FULFILLED"],w=["PENDING"];n.exports=b;function b(O){if(typeof O!="function")throw new TypeError("resolver must be a function");this.state=w,this.queue=[],this.outcome=void 0,O!==u&&H(this,O)}b.prototype.catch=function(O){return this.then(null,O)},b.prototype.then=function(O,ee){if(typeof O!="function"&&this.state===p||typeof ee!="function"&&this.state===l)return this;var G=new this.constructor(u);if(this.state!==w){var de=this.state===p?O:ee;y(G,de,this.outcome)}else this.queue.push(new q(G,O,ee));return G};function q(O,ee,G){this.promise=O,typeof ee=="function"&&(this.onFulfilled=ee,this.callFulfilled=this.otherCallFulfilled),typeof G=="function"&&(this.onRejected=G,this.callRejected=this.otherCallRejected)}q.prototype.callFulfilled=function(O){o.resolve(this.promise,O)},q.prototype.otherCallFulfilled=function(O){y(this.promise,this.onFulfilled,O)},q.prototype.callRejected=function(O){o.reject(this.promise,O)},q.prototype.otherCallRejected=function(O){y(this.promise,this.onRejected,O)};function y(O,ee,G){a(function(){var de;try{de=ee(G)}catch(qe){return o.reject(O,qe)}de===O?o.reject(O,new TypeError("Cannot resolve promise with itself")):o.resolve(O,de)})}o.resolve=function(O,ee){var G=K(P,ee);if(G.status==="error")return o.reject(O,G.value);var de=G.value;if(de)H(O,de);else{O.state=p,O.outcome=ee;for(var qe=-1,ve=O.queue.length;++qe<ve;)O.queue[qe].callFulfilled(ee)}return O},o.reject=function(O,ee){O.state=l,O.outcome=ee;for(var G=-1,de=O.queue.length;++G<de;)O.queue[G].callRejected(ee);return O};function P(O){var ee=O&&O.then;if(O&&(typeof O=="object"||typeof O=="function")&&typeof ee=="function")return function(){ee.apply(O,arguments)}}function H(O,ee){var G=!1;function de(Te){G||(G=!0,o.reject(O,Te))}function qe(Te){G||(G=!0,o.resolve(O,Te))}function ve(){ee(qe,de)}var Ne=K(ve);Ne.status==="error"&&de(Ne.value)}function K(O,ee){var G={};try{G.value=O(ee),G.status="success"}catch(de){G.status="error",G.value=de}return G}b.resolve=Q;function Q(O){return O instanceof this?O:o.resolve(new this(u),O)}b.reject=F;function F(O){var ee=new this(u);return o.reject(ee,O)}b.all=Z;function Z(O){var ee=this;if(Object.prototype.toString.call(O)!=="[object Array]")return this.reject(new TypeError("must be an array"));var G=O.length,de=!1;if(!G)return this.resolve([]);for(var qe=new Array(G),ve=0,Ne=-1,Te=new this(u);++Ne<G;)Ke(O[Ne],Ne);return Te;function Ke(cr,Er){ee.resolve(cr).then(ze,function(lr){de||(de=!0,o.reject(Te,lr))});function ze(lr){qe[Er]=lr,++ve===G&&!de&&(de=!0,o.resolve(Te,qe))}}}b.race=te;function te(O){var ee=this;if(Object.prototype.toString.call(O)!=="[object Array]")return this.reject(new TypeError("must be an array"));var G=O.length,de=!1;if(!G)return this.resolve([]);for(var qe=-1,ve=new this(u);++qe<G;)Ne(O[qe]);return ve;function Ne(Te){ee.resolve(Te).then(function(Ke){de||(de=!0,o.resolve(ve,Ke))},function(Ke){de||(de=!0,o.reject(ve,Ke))})}}},{1:1}],3:[function(i,n,s){(function(a){"use strict";typeof a.Promise!="function"&&(a.Promise=i(2))}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{2:2}],4:[function(i,n,s){"use strict";var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f};function u(f,v){if(!(f instanceof v))throw new TypeError("Cannot call a class as a function")}function o(){try{if(typeof indexedDB!="undefined")return indexedDB;if(typeof webkitIndexedDB!="undefined")return webkitIndexedDB;if(typeof mozIndexedDB!="undefined")return mozIndexedDB;if(typeof OIndexedDB!="undefined")return OIndexedDB;if(typeof msIndexedDB!="undefined")return msIndexedDB}catch(f){return}}var l=o();function p(){try{if(!l||!l.open)return!1;var f=typeof openDatabase!="undefined"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),v=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!f||v)&&typeof indexedDB!="undefined"&&typeof IDBKeyRange!="undefined"}catch(c){return!1}}function w(f,v){f=f||[],v=v||{};try{return new Blob(f,v)}catch(_){if(_.name!=="TypeError")throw _;for(var c=typeof BlobBuilder!="undefined"?BlobBuilder:typeof MSBlobBuilder!="undefined"?MSBlobBuilder:typeof MozBlobBuilder!="undefined"?MozBlobBuilder:WebKitBlobBuilder,x=new c,S=0;S<f.length;S+=1)x.append(f[S]);return x.getBlob(v.type)}}typeof Promise=="undefined"&&i(3);var b=Promise;function q(f,v){v&&f.then(function(c){v(null,c)},function(c){v(c)})}function y(f,v,c){typeof v=="function"&&f.then(v),typeof c=="function"&&f.catch(c)}function P(f){return typeof f!="string"&&(console.warn(f+" used as a key, but it is not a string."),f=String(f)),f}function H(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var K="local-forage-detect-blob-support",Q=void 0,F={},Z=Object.prototype.toString,te="readonly",O="readwrite";function ee(f){for(var v=f.length,c=new ArrayBuffer(v),x=new Uint8Array(c),S=0;S<v;S++)x[S]=f.charCodeAt(S);return c}function G(f){return new b(function(v){var c=f.transaction(K,O),x=w([""]);c.objectStore(K).put(x,"key"),c.onabort=function(S){S.preventDefault(),S.stopPropagation(),v(!1)},c.oncomplete=function(){var S=navigator.userAgent.match(/Chrome\/(\d+)/),_=navigator.userAgent.match(/Edge\//);v(_||!S||parseInt(S[1],10)>=43)}}).catch(function(){return!1})}function de(f){return typeof Q=="boolean"?b.resolve(Q):G(f).then(function(v){return Q=v,Q})}function qe(f){var v=F[f.name],c={};c.promise=new b(function(x,S){c.resolve=x,c.reject=S}),v.deferredOperations.push(c),v.dbReady?v.dbReady=v.dbReady.then(function(){return c.promise}):v.dbReady=c.promise}function ve(f){var v=F[f.name],c=v.deferredOperations.pop();if(c)return c.resolve(),c.promise}function Ne(f,v){var c=F[f.name],x=c.deferredOperations.pop();if(x)return x.reject(v),x.promise}function Te(f,v){return new b(function(c,x){if(F[f.name]=F[f.name]||m(),f.db)if(v)qe(f),f.db.close();else return c(f.db);var S=[f.name];v&&S.push(f.version);var _=l.open.apply(l,S);v&&(_.onupgradeneeded=function(E){var L=_.result;try{L.createObjectStore(f.storeName),E.oldVersion<=1&&L.createObjectStore(K)}catch(U){if(U.name==="ConstraintError")console.warn('The database "'+f.name+'" has been upgraded from version '+E.oldVersion+" to version "+E.newVersion+', but the storage "'+f.storeName+'" already exists.');else throw U}}),_.onerror=function(E){E.preventDefault(),x(_.error)},_.onsuccess=function(){var E=_.result;E.onversionchange=function(L){L.target.close()},c(E),ve(f)}})}function Ke(f){return Te(f,!1)}function cr(f){return Te(f,!0)}function Er(f,v){if(!f.db)return!0;var c=!f.db.objectStoreNames.contains(f.storeName),x=f.version<f.db.version,S=f.version>f.db.version;if(x&&(f.version!==v&&console.warn('The database "'+f.name+`" can't be downgraded from version `+f.db.version+" to version "+f.version+"."),f.version=f.db.version),S||c){if(c){var _=f.db.version+1;_>f.version&&(f.version=_)}return!0}return!1}function ze(f){return new b(function(v,c){var x=new FileReader;x.onerror=c,x.onloadend=function(S){var _=btoa(S.target.result||"");v({__local_forage_encoded_blob:!0,data:_,type:f.type})},x.readAsBinaryString(f)})}function lr(f){var v=ee(atob(f.data));return w([v],{type:f.type})}function sr(f){return f&&f.__local_forage_encoded_blob}function Bi(f){var v=this,c=v._initReady().then(function(){var x=F[v._dbInfo.name];if(x&&x.dbReady)return x.dbReady});return y(c,f,f),c}function h(f){qe(f);for(var v=F[f.name],c=v.forages,x=0;x<c.length;x++){var S=c[x];S._dbInfo.db&&(S._dbInfo.db.close(),S._dbInfo.db=null)}return f.db=null,Ke(f).then(function(_){return f.db=_,Er(f)?cr(f):_}).then(function(_){f.db=v.db=_;for(var E=0;E<c.length;E++)c[E]._dbInfo.db=_}).catch(function(_){throw Ne(f,_),_})}function d(f,v,c,x){x===void 0&&(x=1);try{var S=f.db.transaction(f.storeName,v);c(null,S)}catch(_){if(x>0&&(!f.db||_.name==="InvalidStateError"||_.name==="NotFoundError"))return b.resolve().then(function(){if(!f.db||_.name==="NotFoundError"&&!f.db.objectStoreNames.contains(f.storeName)&&f.version<=f.db.version)return f.db&&(f.version=f.db.version+1),cr(f)}).then(function(){return h(f).then(function(){d(f,v,c,x-1)})}).catch(c);c(_)}}function m(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function A(f){var v=this,c={db:null};if(f)for(var x in f)c[x]=f[x];var S=F[c.name];S||(S=m(),F[c.name]=S),S.forages.push(v),v._initReady||(v._initReady=v.ready,v.ready=Bi);var _=[];function E(){return b.resolve()}for(var L=0;L<S.forages.length;L++){var U=S.forages[L];U!==v&&_.push(U._initReady().catch(E))}var D=S.forages.slice(0);return b.all(_).then(function(){return c.db=S.db,Ke(c)}).then(function(k){return c.db=k,Er(c,v._defaultConfig.version)?cr(c):k}).then(function(k){c.db=S.db=k,v._dbInfo=c;for(var X=0;X<D.length;X++){var ue=D[X];ue!==v&&(ue._dbInfo.db=c.db,ue._dbInfo.version=c.version)}})}function C(f,v){var c=this;f=P(f);var x=new b(function(S,_){c.ready().then(function(){d(c._dbInfo,te,function(E,L){if(E)return _(E);try{var U=L.objectStore(c._dbInfo.storeName),D=U.get(f);D.onsuccess=function(){var k=D.result;k===void 0&&(k=null),sr(k)&&(k=lr(k)),S(k)},D.onerror=function(){_(D.error)}}catch(k){_(k)}})}).catch(_)});return q(x,v),x}function I(f,v){var c=this,x=new b(function(S,_){c.ready().then(function(){d(c._dbInfo,te,function(E,L){if(E)return _(E);try{var U=L.objectStore(c._dbInfo.storeName),D=U.openCursor(),k=1;D.onsuccess=function(){var X=D.result;if(X){var ue=X.value;sr(ue)&&(ue=lr(ue));var pe=f(ue,X.key,k++);pe!==void 0?S(pe):X.continue()}else S()},D.onerror=function(){_(D.error)}}catch(X){_(X)}})}).catch(_)});return q(x,v),x}function M(f,v,c){var x=this;f=P(f);var S=new b(function(_,E){var L;x.ready().then(function(){return L=x._dbInfo,Z.call(v)==="[object Blob]"?de(L.db).then(function(U){return U?v:ze(v)}):v}).then(function(U){d(x._dbInfo,O,function(D,k){if(D)return E(D);try{var X=k.objectStore(x._dbInfo.storeName);U===null&&(U=void 0);var ue=X.put(U,f);k.oncomplete=function(){U===void 0&&(U=null),_(U)},k.onabort=k.onerror=function(){var pe=ue.error?ue.error:ue.transaction.error;E(pe)}}catch(pe){E(pe)}})}).catch(E)});return q(S,c),S}function T(f,v){var c=this;f=P(f);var x=new b(function(S,_){c.ready().then(function(){d(c._dbInfo,O,function(E,L){if(E)return _(E);try{var U=L.objectStore(c._dbInfo.storeName),D=U.delete(f);L.oncomplete=function(){S()},L.onerror=function(){_(D.error)},L.onabort=function(){var k=D.error?D.error:D.transaction.error;_(k)}}catch(k){_(k)}})}).catch(_)});return q(x,v),x}function N(f){var v=this,c=new b(function(x,S){v.ready().then(function(){d(v._dbInfo,O,function(_,E){if(_)return S(_);try{var L=E.objectStore(v._dbInfo.storeName),U=L.clear();E.oncomplete=function(){x()},E.onabort=E.onerror=function(){var D=U.error?U.error:U.transaction.error;S(D)}}catch(D){S(D)}})}).catch(S)});return q(c,f),c}function B(f){var v=this,c=new b(function(x,S){v.ready().then(function(){d(v._dbInfo,te,function(_,E){if(_)return S(_);try{var L=E.objectStore(v._dbInfo.storeName),U=L.count();U.onsuccess=function(){x(U.result)},U.onerror=function(){S(U.error)}}catch(D){S(D)}})}).catch(S)});return q(c,f),c}function Y(f,v){var c=this,x=new b(function(S,_){if(f<0){S(null);return}c.ready().then(function(){d(c._dbInfo,te,function(E,L){if(E)return _(E);try{var U=L.objectStore(c._dbInfo.storeName),D=!1,k=U.openKeyCursor();k.onsuccess=function(){var X=k.result;if(!X){S(null);return}f===0||D?S(X.key):(D=!0,X.advance(f))},k.onerror=function(){_(k.error)}}catch(X){_(X)}})}).catch(_)});return q(x,v),x}function V(f){var v=this,c=new b(function(x,S){v.ready().then(function(){d(v._dbInfo,te,function(_,E){if(_)return S(_);try{var L=E.objectStore(v._dbInfo.storeName),U=L.openKeyCursor(),D=[];U.onsuccess=function(){var k=U.result;if(!k){x(D);return}D.push(k.key),k.continue()},U.onerror=function(){S(U.error)}}catch(k){S(k)}})}).catch(S)});return q(c,f),c}function z(f,v){v=H.apply(this,arguments);var c=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||c.name,f.storeName=f.storeName||c.storeName);var x=this,S;if(!f.name)S=b.reject("Invalid arguments");else{var _=f.name===c.name&&x._dbInfo.db,E=_?b.resolve(x._dbInfo.db):Ke(f).then(function(L){var U=F[f.name],D=U.forages;U.db=L;for(var k=0;k<D.length;k++)D[k]._dbInfo.db=L;return L});f.storeName?S=E.then(function(L){if(!!L.objectStoreNames.contains(f.storeName)){var U=L.version+1;qe(f);var D=F[f.name],k=D.forages;L.close();for(var X=0;X<k.length;X++){var ue=k[X];ue._dbInfo.db=null,ue._dbInfo.version=U}var pe=new b(function(me,Oe){var Se=l.open(f.name,U);Se.onerror=function(Ge){var pt=Se.result;pt.close(),Oe(Ge)},Se.onupgradeneeded=function(){var Ge=Se.result;Ge.deleteObjectStore(f.storeName)},Se.onsuccess=function(){var Ge=Se.result;Ge.close(),me(Ge)}});return pe.then(function(me){D.db=me;for(var Oe=0;Oe<k.length;Oe++){var Se=k[Oe];Se._dbInfo.db=me,ve(Se._dbInfo)}}).catch(function(me){throw(Ne(f,me)||b.resolve()).catch(function(){}),me})}}):S=E.then(function(L){qe(f);var U=F[f.name],D=U.forages;L.close();for(var k=0;k<D.length;k++){var X=D[k];X._dbInfo.db=null}var ue=new b(function(pe,me){var Oe=l.deleteDatabase(f.name);Oe.onerror=function(){var Se=Oe.result;Se&&Se.close(),me(Oe.error)},Oe.onblocked=function(){console.warn('dropInstance blocked for database "'+f.name+'" until all open connections are closed')},Oe.onsuccess=function(){var Se=Oe.result;Se&&Se.close(),pe(Se)}});return ue.then(function(pe){U.db=pe;for(var me=0;me<D.length;me++){var Oe=D[me];ve(Oe._dbInfo)}}).catch(function(pe){throw(Ne(f,pe)||b.resolve()).catch(function(){}),pe})})}return q(S,v),S}var ae={_driver:"asyncStorage",_initStorage:A,_support:p(),iterate:I,getItem:C,setItem:M,removeItem:T,clear:N,length:B,key:Y,keys:V,dropInstance:z};function se(){return typeof openDatabase=="function"}var ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ye="~~local_forage_type~",ge=/^~~local_forage_type~([^~]+)~/,ne="__lfsc__:",oe=ne.length,he="arbf",Ue="blob",Ce="si08",Pe="ui08",Je="uic8",kr="si16",Ir="si32",$r="ur16",Tr="ui32",Ht="fl32",Pr="fl64",Es=oe+he.length,Is=Object.prototype.toString;function Ts(f){var v=f.length*.75,c=f.length,x,S=0,_,E,L,U;f[f.length-1]==="="&&(v--,f[f.length-2]==="="&&v--);var D=new ArrayBuffer(v),k=new Uint8Array(D);for(x=0;x<c;x+=4)_=ce.indexOf(f[x]),E=ce.indexOf(f[x+1]),L=ce.indexOf(f[x+2]),U=ce.indexOf(f[x+3]),k[S++]=_<<2|E>>4,k[S++]=(E&15)<<4|L>>2,k[S++]=(L&3)<<6|U&63;return D}function ki(f){var v=new Uint8Array(f),c="",x;for(x=0;x<v.length;x+=3)c+=ce[v[x]>>2],c+=ce[(v[x]&3)<<4|v[x+1]>>4],c+=ce[(v[x+1]&15)<<2|v[x+2]>>6],c+=ce[v[x+2]&63];return v.length%3===2?c=c.substring(0,c.length-1)+"=":v.length%3===1&&(c=c.substring(0,c.length-2)+"=="),c}function gd(f,v){var c="";if(f&&(c=Is.call(f)),f&&(c==="[object ArrayBuffer]"||f.buffer&&Is.call(f.buffer)==="[object ArrayBuffer]")){var x,S=ne;f instanceof ArrayBuffer?(x=f,S+=he):(x=f.buffer,c==="[object Int8Array]"?S+=Ce:c==="[object Uint8Array]"?S+=Pe:c==="[object Uint8ClampedArray]"?S+=Je:c==="[object Int16Array]"?S+=kr:c==="[object Uint16Array]"?S+=$r:c==="[object Int32Array]"?S+=Ir:c==="[object Uint32Array]"?S+=Tr:c==="[object Float32Array]"?S+=Ht:c==="[object Float64Array]"?S+=Pr:v(new Error("Failed to get type for BinaryArray"))),v(S+ki(x))}else if(c==="[object Blob]"){var _=new FileReader;_.onload=function(){var E=ye+f.type+"~"+ki(this.result);v(ne+Ue+E)},_.readAsArrayBuffer(f)}else try{v(JSON.stringify(f))}catch(E){console.error("Couldn't convert value into a JSON string: ",f),v(null,E)}}function vd(f){if(f.substring(0,oe)!==ne)return JSON.parse(f);var v=f.substring(Es),c=f.substring(oe,Es),x;if(c===Ue&&ge.test(v)){var S=v.match(ge);x=S[1],v=v.substring(S[0].length)}var _=Ts(v);switch(c){case he:return _;case Ue:return w([_],{type:x});case Ce:return new Int8Array(_);case Pe:return new Uint8Array(_);case Je:return new Uint8ClampedArray(_);case kr:return new Int16Array(_);case $r:return new Uint16Array(_);case Ir:return new Int32Array(_);case Tr:return new Uint32Array(_);case Ht:return new Float32Array(_);case Pr:return new Float64Array(_);default:throw new Error("Unkown type: "+c)}}var $i={serialize:gd,deserialize:vd,stringToBuffer:Ts,bufferToString:ki};function Ps(f,v,c,x){f.executeSql("CREATE TABLE IF NOT EXISTS "+v.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],c,x)}function yd(f){var v=this,c={db:null};if(f)for(var x in f)c[x]=typeof f[x]!="string"?f[x].toString():f[x];var S=new b(function(_,E){try{c.db=openDatabase(c.name,String(c.version),c.description,c.size)}catch(L){return E(L)}c.db.transaction(function(L){Ps(L,c,function(){v._dbInfo=c,_()},function(U,D){E(D)})},E)});return c.serializer=$i,S}function hr(f,v,c,x,S,_){f.executeSql(c,x,S,function(E,L){L.code===L.SYNTAX_ERR?E.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[v.storeName],function(U,D){D.rows.length?_(U,L):Ps(U,v,function(){U.executeSql(c,x,S,_)},_)},_):_(E,L)},_)}function _d(f,v){var c=this;f=P(f);var x=new b(function(S,_){c.ready().then(function(){var E=c._dbInfo;E.db.transaction(function(L){hr(L,E,"SELECT * FROM "+E.storeName+" WHERE key = ? LIMIT 1",[f],function(U,D){var k=D.rows.length?D.rows.item(0).value:null;k&&(k=E.serializer.deserialize(k)),S(k)},function(U,D){_(D)})})}).catch(_)});return q(x,v),x}function wd(f,v){var c=this,x=new b(function(S,_){c.ready().then(function(){var E=c._dbInfo;E.db.transaction(function(L){hr(L,E,"SELECT * FROM "+E.storeName,[],function(U,D){for(var k=D.rows,X=k.length,ue=0;ue<X;ue++){var pe=k.item(ue),me=pe.value;if(me&&(me=E.serializer.deserialize(me)),me=f(me,pe.key,ue+1),me!==void 0){S(me);return}}S()},function(U,D){_(D)})})}).catch(_)});return q(x,v),x}function Ms(f,v,c,x){var S=this;f=P(f);var _=new b(function(E,L){S.ready().then(function(){v===void 0&&(v=null);var U=v,D=S._dbInfo;D.serializer.serialize(v,function(k,X){X?L(X):D.db.transaction(function(ue){hr(ue,D,"INSERT OR REPLACE INTO "+D.storeName+" (key, value) VALUES (?, ?)",[f,k],function(){E(U)},function(pe,me){L(me)})},function(ue){if(ue.code===ue.QUOTA_ERR){if(x>0){E(Ms.apply(S,[f,U,c,x-1]));return}L(ue)}})})}).catch(L)});return q(_,c),_}function bd(f,v,c){return Ms.apply(this,[f,v,c,1])}function xd(f,v){var c=this;f=P(f);var x=new b(function(S,_){c.ready().then(function(){var E=c._dbInfo;E.db.transaction(function(L){hr(L,E,"DELETE FROM "+E.storeName+" WHERE key = ?",[f],function(){S()},function(U,D){_(D)})})}).catch(_)});return q(x,v),x}function Sd(f){var v=this,c=new b(function(x,S){v.ready().then(function(){var _=v._dbInfo;_.db.transaction(function(E){hr(E,_,"DELETE FROM "+_.storeName,[],function(){x()},function(L,U){S(U)})})}).catch(S)});return q(c,f),c}function Ad(f){var v=this,c=new b(function(x,S){v.ready().then(function(){var _=v._dbInfo;_.db.transaction(function(E){hr(E,_,"SELECT COUNT(key) as c FROM "+_.storeName,[],function(L,U){var D=U.rows.item(0).c;x(D)},function(L,U){S(U)})})}).catch(S)});return q(c,f),c}function Od(f,v){var c=this,x=new b(function(S,_){c.ready().then(function(){var E=c._dbInfo;E.db.transaction(function(L){hr(L,E,"SELECT key FROM "+E.storeName+" WHERE id = ? LIMIT 1",[f+1],function(U,D){var k=D.rows.length?D.rows.item(0).key:null;S(k)},function(U,D){_(D)})})}).catch(_)});return q(x,v),x}function qd(f){var v=this,c=new b(function(x,S){v.ready().then(function(){var _=v._dbInfo;_.db.transaction(function(E){hr(E,_,"SELECT key FROM "+_.storeName,[],function(L,U){for(var D=[],k=0;k<U.rows.length;k++)D.push(U.rows.item(k).key);x(D)},function(L,U){S(U)})})}).catch(S)});return q(c,f),c}function Cd(f){return new b(function(v,c){f.transaction(function(x){x.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(S,_){for(var E=[],L=0;L<_.rows.length;L++)E.push(_.rows.item(L).name);v({db:f,storeNames:E})},function(S,_){c(_)})},function(x){c(x)})})}function Ed(f,v){v=H.apply(this,arguments);var c=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||c.name,f.storeName=f.storeName||c.storeName);var x=this,S;return f.name?S=new b(function(_){var E;f.name===c.name?E=x._dbInfo.db:E=openDatabase(f.name,"","",0),f.storeName?_({db:E,storeNames:[f.storeName]}):_(Cd(E))}).then(function(_){return new b(function(E,L){_.db.transaction(function(U){function D(pe){return new b(function(me,Oe){U.executeSql("DROP TABLE IF EXISTS "+pe,[],function(){me()},function(Se,Ge){Oe(Ge)})})}for(var k=[],X=0,ue=_.storeNames.length;X<ue;X++)k.push(D(_.storeNames[X]));b.all(k).then(function(){E()}).catch(function(pe){L(pe)})},function(U){L(U)})})}):S=b.reject("Invalid arguments"),q(S,v),S}var Id={_driver:"webSQLStorage",_initStorage:yd,_support:se(),iterate:wd,getItem:_d,setItem:bd,removeItem:xd,clear:Sd,length:Ad,key:Od,keys:qd,dropInstance:Ed};function Td(){try{return typeof localStorage!="undefined"&&"setItem"in localStorage&&!!localStorage.setItem}catch(f){return!1}}function Rs(f,v){var c=f.name+"/";return f.storeName!==v.storeName&&(c+=f.storeName+"/"),c}function Pd(){var f="_localforage_support_test";try{return localStorage.setItem(f,!0),localStorage.removeItem(f),!1}catch(v){return!0}}function Md(){return!Pd()||localStorage.length>0}function Rd(f){var v=this,c={};if(f)for(var x in f)c[x]=f[x];return c.keyPrefix=Rs(f,v._defaultConfig),Md()?(v._dbInfo=c,c.serializer=$i,b.resolve()):b.reject()}function Ld(f){var v=this,c=v.ready().then(function(){for(var x=v._dbInfo.keyPrefix,S=localStorage.length-1;S>=0;S--){var _=localStorage.key(S);_.indexOf(x)===0&&localStorage.removeItem(_)}});return q(c,f),c}function jd(f,v){var c=this;f=P(f);var x=c.ready().then(function(){var S=c._dbInfo,_=localStorage.getItem(S.keyPrefix+f);return _&&(_=S.serializer.deserialize(_)),_});return q(x,v),x}function Nd(f,v){var c=this,x=c.ready().then(function(){for(var S=c._dbInfo,_=S.keyPrefix,E=_.length,L=localStorage.length,U=1,D=0;D<L;D++){var k=localStorage.key(D);if(k.indexOf(_)===0){var X=localStorage.getItem(k);if(X&&(X=S.serializer.deserialize(X)),X=f(X,k.substring(E),U++),X!==void 0)return X}}});return q(x,v),x}function Ud(f,v){var c=this,x=c.ready().then(function(){var S=c._dbInfo,_;try{_=localStorage.key(f)}catch(E){_=null}return _&&(_=_.substring(S.keyPrefix.length)),_});return q(x,v),x}function Dd(f){var v=this,c=v.ready().then(function(){for(var x=v._dbInfo,S=localStorage.length,_=[],E=0;E<S;E++){var L=localStorage.key(E);L.indexOf(x.keyPrefix)===0&&_.push(L.substring(x.keyPrefix.length))}return _});return q(c,f),c}function Fd(f){var v=this,c=v.keys().then(function(x){return x.length});return q(c,f),c}function Bd(f,v){var c=this;f=P(f);var x=c.ready().then(function(){var S=c._dbInfo;localStorage.removeItem(S.keyPrefix+f)});return q(x,v),x}function kd(f,v,c){var x=this;f=P(f);var S=x.ready().then(function(){v===void 0&&(v=null);var _=v;return new b(function(E,L){var U=x._dbInfo;U.serializer.serialize(v,function(D,k){if(k)L(k);else try{localStorage.setItem(U.keyPrefix+f,D),E(_)}catch(X){(X.name==="QuotaExceededError"||X.name==="NS_ERROR_DOM_QUOTA_REACHED")&&L(X),L(X)}})})});return q(S,c),S}function $d(f,v){if(v=H.apply(this,arguments),f=typeof f!="function"&&f||{},!f.name){var c=this.config();f.name=f.name||c.name,f.storeName=f.storeName||c.storeName}var x=this,S;return f.name?S=new b(function(_){f.storeName?_(Rs(f,x._defaultConfig)):_(f.name+"/")}).then(function(_){for(var E=localStorage.length-1;E>=0;E--){var L=localStorage.key(E);L.indexOf(_)===0&&localStorage.removeItem(L)}}):S=b.reject("Invalid arguments"),q(S,v),S}var zd={_driver:"localStorageWrapper",_initStorage:Rd,_support:Td(),iterate:Nd,getItem:jd,setItem:kd,removeItem:Bd,clear:Ld,length:Fd,key:Ud,keys:Dd,dropInstance:$d},Wd=function(v,c){return v===c||typeof v=="number"&&typeof c=="number"&&isNaN(v)&&isNaN(c)},Hd=function(v,c){for(var x=v.length,S=0;S<x;){if(Wd(v[S],c))return!0;S++}return!1},Ls=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},ht={},js={},zr={INDEXEDDB:ae,WEBSQL:Id,LOCALSTORAGE:zd},Gd=[zr.INDEXEDDB._driver,zr.WEBSQL._driver,zr.LOCALSTORAGE._driver],Gt=["dropInstance"],zi=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Gt),Kd={description:"",driver:Gd.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Jd(f,v){f[v]=function(){var c=arguments;return f.ready().then(function(){return f[v].apply(f,c)})}}function Wi(){for(var f=1;f<arguments.length;f++){var v=arguments[f];if(v)for(var c in v)v.hasOwnProperty(c)&&(Ls(v[c])?arguments[0][c]=v[c].slice():arguments[0][c]=v[c])}return arguments[0]}var Vd=function(){function f(v){u(this,f);for(var c in zr)if(zr.hasOwnProperty(c)){var x=zr[c],S=x._driver;this[c]=S,ht[S]||this.defineDriver(x)}this._defaultConfig=Wi({},Kd),this._config=Wi({},this._defaultConfig,v),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return f.prototype.config=function(c){if((typeof c=="undefined"?"undefined":a(c))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var x in c){if(x==="storeName"&&(c[x]=c[x].replace(/\W/g,"_")),x==="version"&&typeof c[x]!="number")return new Error("Database version must be a number.");this._config[x]=c[x]}return"driver"in c&&c.driver?this.setDriver(this._config.driver):!0}else return typeof c=="string"?this._config[c]:this._config},f.prototype.defineDriver=function(c,x,S){var _=new b(function(E,L){try{var U=c._driver,D=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!c._driver){L(D);return}for(var k=zi.concat("_initStorage"),X=0,ue=k.length;X<ue;X++){var pe=k[X],me=!Hd(Gt,pe);if((me||c[pe])&&typeof c[pe]!="function"){L(D);return}}var Oe=function(){for(var pt=function(Zd){return function(){var Qd=new Error("Method "+Zd+" is not implemented by the current driver"),Ns=b.reject(Qd);return q(Ns,arguments[arguments.length-1]),Ns}},Hi=0,Xd=Gt.length;Hi<Xd;Hi++){var Gi=Gt[Hi];c[Gi]||(c[Gi]=pt(Gi))}};Oe();var Se=function(pt){ht[U]&&console.info("Redefining LocalForage driver: "+U),ht[U]=c,js[U]=pt,E()};"_support"in c?c._support&&typeof c._support=="function"?c._support().then(Se,L):Se(!!c._support):Se(!0)}catch(Ge){L(Ge)}});return y(_,x,S),_},f.prototype.driver=function(){return this._driver||null},f.prototype.getDriver=function(c,x,S){var _=ht[c]?b.resolve(ht[c]):b.reject(new Error("Driver not found."));return y(_,x,S),_},f.prototype.getSerializer=function(c){var x=b.resolve($i);return y(x,c),x},f.prototype.ready=function(c){var x=this,S=x._driverSet.then(function(){return x._ready===null&&(x._ready=x._initDriver()),x._ready});return y(S,c,c),S},f.prototype.setDriver=function(c,x,S){var _=this;Ls(c)||(c=[c]);var E=this._getSupportedDrivers(c);function L(){_._config.driver=_.driver()}function U(X){return _._extend(X),L(),_._ready=_._initStorage(_._config),_._ready}function D(X){return function(){var ue=0;function pe(){for(;ue<X.length;){var me=X[ue];return ue++,_._dbInfo=null,_._ready=null,_.getDriver(me).then(U).catch(pe)}L();var Oe=new Error("No available storage method found.");return _._driverSet=b.reject(Oe),_._driverSet}return pe()}}var k=this._driverSet!==null?this._driverSet.catch(function(){return b.resolve()}):b.resolve();return this._driverSet=k.then(function(){var X=E[0];return _._dbInfo=null,_._ready=null,_.getDriver(X).then(function(ue){_._driver=ue._driver,L(),_._wrapLibraryMethodsWithReady(),_._initDriver=D(E)})}).catch(function(){L();var X=new Error("No available storage method found.");return _._driverSet=b.reject(X),_._driverSet}),y(this._driverSet,x,S),this._driverSet},f.prototype.supports=function(c){return!!js[c]},f.prototype._extend=function(c){Wi(this,c)},f.prototype._getSupportedDrivers=function(c){for(var x=[],S=0,_=c.length;S<_;S++){var E=c[S];this.supports(E)&&x.push(E)}return x},f.prototype._wrapLibraryMethodsWithReady=function(){for(var c=0,x=zi.length;c<x;c++)Jd(this,zi[c])},f.prototype.createInstance=function(c){return new f(c)},f}(),Yd=new Vd;n.exports=Yd},{3:3}]},{},[4])(4)})});var qs=g((Os,ld)=>{"use strict";(function(r,e,t){let i;(i=t.define)&&i.amd?i([],function(){return e}):(i=t.modules)?i[r.toLowerCase()]=e:typeof Os=="object"?ld.exports=e:t[r]=e})("FlexSearch",function r(e){function t(h,d){let m=d?d.id:h&&h.id;this.id=m||m===0?m:Ke++,this.init(h,d),u(this,"index",function(){return this.a?Object.keys(this.a.index[this.a.keys[0]].c):Object.keys(this.c)}),u(this,"length",function(){return this.index.length})}function i(h,d,m,A){return this.u!==this.g&&(this.o=this.o.concat(m),this.u++,A&&this.o.length>=A&&(this.u=this.g),this.u===this.g&&(this.cache&&this.j.set(d,this.o),this.F&&this.F(this.o))),this}function n(h){let d=G();for(let m in h)if(h.hasOwnProperty(m)){let A=h[m];F(A)?d[m]=A.slice(0):te(A)?d[m]=n(A):d[m]=A}return d}function s(h,d){let m=h.length,A=Z(d),C=[];for(let I=0,M=0;I<m;I++){let T=h[I];(A&&d(T)||!A&&!d[T])&&(C[M++]=T)}return C}function a(h,d,m,A,C,I,M,T,N,B){m=K(m,M?0:C,T,I,d,N,B);let Y;if(T&&(T=m.page,Y=m.next,m=m.result),M)d=this.where(M,null,C,m);else{for(d=m,m=this.l,C=d.length,I=Array(C),M=0;M<C;M++)I[M]=m[d[M]];d=I}return m=d,A&&(Z(A)||(ze=A.split(":"),1<ze.length?A=P:(ze=ze[0],A=y)),m.sort(A)),m=H(T,Y,m),this.cache&&this.j.set(h,m),m}function u(h,d,m){Object.defineProperty(h,d,{get:m})}function o(h){return new RegExp(h,"g")}function l(h,d){for(let m=0;m<d.length;m+=2)h=h.replace(d[m],d[m+1]);return h}function p(h,d,m,A,C,I,M,T){return d[m]?d[m]:(C=C?(T-(M||T/1.5))*I+(M||T/1.5)*C:I,d[m]=C,C>=M&&(h=h[T-(C+.5>>0)],h=h[m]||(h[m]=[]),h[h.length]=A),C)}function w(h,d){if(h){let m=Object.keys(h);for(let A=0,C=m.length;A<C;A++){let I=m[A],M=h[I];if(M)for(let T=0,N=M.length;T<N;T++)if(M[T]===d){N===1?delete h[I]:M.splice(T,1);break}else te(M[T])&&w(M[T],d)}}}function b(h){let d="",m="";var A="";for(let C=0;C<h.length;C++){let I=h[C];I!==m&&(C&&I==="h"?(A=A==="a"||A==="e"||A==="i"||A==="o"||A==="u"||A==="y",((m==="a"||m==="e"||m==="i"||m==="o"||m==="u"||m==="y")&&A||m===" ")&&(d+=I)):d+=I),A=C===h.length-1?"":h[C+1],m=I}return d}function q(h,d){return h=h.length-d.length,0>h?1:h?-1:0}function y(h,d){return h=h[ze],d=d[ze],h<d?-1:h>d?1:0}function P(h,d){let m=ze.length;for(let A=0;A<m;A++)h=h[ze[A]],d=d[ze[A]];return h<d?-1:h>d?1:0}function H(h,d,m){return h?{page:h,next:d?""+d:null,result:m}:m}function K(h,d,m,A,C,I,M){let T,N=[];if(m===!0){m="0";var B=""}else B=m&&m.split(":");let Y=h.length;if(1<Y){let ge=G(),ne=[],oe,he;var V=0,z;let Ue;var ae=!0;let Ce,Pe=0,Je,kr,Ir,$r;if(B&&(B.length===2?(Ir=B,B=!1):B=$r=parseInt(B[0],10)),M){for(oe=G();V<Y;V++)if(C[V]==="not")for(he=h[V],Ue=he.length,z=0;z<Ue;z++)oe["@"+he[z]]=1;else kr=V+1;if(O(kr))return H(m,T,N);V=0}else Je=Q(C)&&C;let Tr;for(;V<Y;V++){let Ht=V===(kr||Y)-1;if(!Je||!V)if((z=Je||C&&C[V])&&z!=="and")if(z==="or")Tr=!1;else continue;else Tr=I=!0;if(he=h[V],Ue=he.length){if(ae)if(Ce){var se=Ce.length;for(z=0;z<se;z++){ae=Ce[z];var ce="@"+ae;M&&oe[ce]||(ge[ce]=1,I||(N[Pe++]=ae))}Ce=null,ae=!1}else{Ce=he;continue}for(ce=!1,z=0;z<Ue;z++){se=he[z];var ye="@"+se;let Pr=I?ge[ye]||0:V;if(!(!Pr&&!A||M&&oe[ye]||!I&&ge[ye]))if(Pr===V){if(Ht){if((!$r||--$r<Pe)&&(N[Pe++]=se,d&&Pe===d))return H(m,Pe+(B||0),N)}else ge[ye]=V+1;ce=!0}else A&&(ye=ne[Pr]||(ne[Pr]=[]),ye[ye.length]=se)}if(Tr&&!ce&&!A)break}else if(Tr&&!A)return H(m,T,he)}if(Ce)if(V=Ce.length,M)for(z=B?parseInt(B,10):0;z<V;z++)h=Ce[z],oe["@"+h]||(N[Pe++]=h);else N=Ce;if(A){for(Pe=N.length,Ir?(V=parseInt(Ir[0],10)+1,z=parseInt(Ir[1],10)+1):(V=ne.length,z=0);V--;)if(se=ne[V]){for(Ue=se.length;z<Ue;z++)if(A=se[z],(!M||!oe["@"+A])&&(N[Pe++]=A,d&&Pe===d))return H(m,V+":"+z,N);z=0}}}else!Y||C&&C[0]==="not"||(N=h[0],B&&(B=parseInt(B[0],10)));return d&&(M=N.length,B&&B>M&&(B=0),B=B||0,T=B+d,T<M?N=N.slice(B,T):(T=0,B&&(N=N.slice(B)))),H(m,T,N)}function Q(h){return typeof h=="string"}function F(h){return h.constructor===Array}function Z(h){return typeof h=="function"}function te(h){return typeof h=="object"}function O(h){return typeof h=="undefined"}function ee(h){let d=Array(h);for(let m=0;m<h;m++)d[m]=G();return d}function G(){return Object.create(null)}function de(){let h,d;self.onmessage=function(m){if(m=m.data)if(m.search){let A=d.search(m.content,m.threshold?{limit:m.limit,threshold:m.threshold,where:m.where}:m.limit);self.postMessage({id:h,content:m.content,limit:m.limit,result:A})}else m.add?d.add(m.id,m.content):m.update?d.update(m.id,m.content):m.remove?d.remove(m.id):m.clear?d.clear():m.info?(m=d.info(),m.worker=h,console.log(m)):m.register&&(h=m.id,m.options.cache=!1,m.options.async=!1,m.options.worker=!1,d=new Function(m.register.substring(m.register.indexOf("{")+1,m.register.lastIndexOf("}")))(),d=new d(m.options))}}function qe(h,d,m,A){h=e("flexsearch","id"+h,de,function(I){(I=I.data)&&I.result&&A(I.id,I.content,I.result,I.limit,I.where,I.cursor,I.suggest)},d);let C=r.toString();return m.id=d,h.postMessage({register:C,options:m,id:d}),h}let ve={encode:"icase",f:"forward",split:/\W+/,cache:!1,async:!1,g:!1,D:!1,a:!1,b:9,threshold:0,depth:0},Ne={memory:{encode:"extra",f:"strict",threshold:0,b:1},speed:{encode:"icase",f:"strict",threshold:1,b:3,depth:2},match:{encode:"extra",f:"full",threshold:1,b:3},score:{encode:"extra",f:"strict",threshold:1,b:9,depth:4},balance:{encode:"balance",f:"strict",threshold:0,b:3,depth:3},fast:{encode:"icase",f:"strict",threshold:8,b:9,depth:1}},Te=[],Ke=0,cr={},Er={};t.create=function(h,d){return new t(h,d)},t.registerMatcher=function(h){for(let d in h)h.hasOwnProperty(d)&&Te.push(o(d),h[d]);return this},t.registerEncoder=function(h,d){return sr[h]=d.bind(sr),this},t.registerLanguage=function(h,d){return cr[h]=d.filter,Er[h]=d.stemmer,this},t.encode=function(h,d){return sr[h](d)},t.prototype.init=function(h,d){if(this.v=[],d){var m=d.preset;h=d}else h||(h=ve),m=h.preset;if(d={},Q(h)?(d=Ne[h],h={}):m&&(d=Ne[m]),m=h.worker)if(typeof Worker=="undefined")h.worker=!1,this.m=null;else{var A=parseInt(m,10)||4;this.C=-1,this.u=0,this.o=[],this.F=null,this.m=Array(A);for(var C=0;C<A;C++)this.m[C]=qe(this.id,C,h,i.bind(this))}if(this.f=h.tokenize||d.f||this.f||ve.f,this.split=O(m=h.split)?this.split||ve.split:Q(m)?o(m):m,this.D=h.rtl||this.D||ve.D,this.async=typeof Promise=="undefined"||O(m=h.async)?this.async||ve.async:m,this.g=O(m=h.worker)?this.g||ve.g:m,this.threshold=O(m=h.threshold)?d.threshold||this.threshold||ve.threshold:m,this.b=O(m=h.resolution)?m=d.b||this.b||ve.b:m,m<=this.threshold&&(this.b=this.threshold+1),this.depth=this.f!=="strict"||O(m=h.depth)?d.depth||this.depth||ve.depth:m,this.w=(m=O(m=h.encode)?d.encode||ve.encode:m)&&sr[m]&&sr[m].bind(sr)||(Z(m)?m:this.w||!1),(m=h.matcher)&&this.addMatcher(m),m=(d=h.lang)||h.filter){if(Q(m)&&(m=cr[m]),F(m)){A=this.w,C=G();for(var I=0;I<m.length;I++){var M=A?A(m[I]):m[I];C[M]=1}m=C}this.filter=m}if(m=d||h.stemmer){var T;d=Q(m)?Er[m]:m,A=this.w,C=[];for(T in d)d.hasOwnProperty(T)&&(I=A?A(T):T,C.push(o(I+"($|\\W)"),A?A(d[T]):d[T]));this.stemmer=T=C}if(this.a=C=(m=h.doc)?n(m):this.a||ve.a,this.i=ee(this.b-(this.threshold||0)),this.h=G(),this.c=G(),C){if(this.l=G(),h.doc=null,T=C.index={},d=C.keys=[],A=C.field,I=C.tag,M=C.store,F(C.id)||(C.id=C.id.split(":")),M){var N=G();if(Q(M))N[M]=1;else if(F(M))for(let B=0;B<M.length;B++)N[M[B]]=1;else te(M)&&(N=M);C.store=N}if(I){if(this.G=G(),M=G(),A)if(Q(A))M[A]=h;else if(F(A))for(N=0;N<A.length;N++)M[A[N]]=h;else te(A)&&(M=A);for(F(I)||(C.tag=I=[I]),A=0;A<I.length;A++)this.G[I[A]]=G();this.I=I,A=M}if(A){let B;for(F(A)||(te(A)?(B=A,C.field=A=Object.keys(A)):C.field=A=[A]),C=0;C<A.length;C++)I=A[C],F(I)||(B&&(h=B[I]),d[C]=I,A[C]=I.split(":")),T[I]=new t(h)}h.doc=m}return this.B=!0,this.j=(this.cache=m=O(m=h.cache)?this.cache||ve.cache:m)?new Bi(m):!1,this},t.prototype.encode=function(h){return h&&(Te.length&&(h=l(h,Te)),this.v.length&&(h=l(h,this.v)),this.w&&(h=this.w(h)),this.stemmer&&(h=l(h,this.stemmer))),h},t.prototype.addMatcher=function(h){let d=this.v;for(let m in h)h.hasOwnProperty(m)&&d.push(o(m),h[m]);return this},t.prototype.add=function(h,d,m,A,C){if(this.a&&te(h))return this.A("add",h,d);if(d&&Q(d)&&(h||h===0)){var I="@"+h;if(this.c[I]&&!A)return this.update(h,d);if(this.g)return++this.C>=this.m.length&&(this.C=0),this.m[this.C].postMessage({add:!0,id:h,content:d}),this.c[I]=""+this.C,m&&m(),this;if(!C){if(this.async&&typeof importScripts!="function"){let ne=this;if(I=new Promise(function(oe){setTimeout(function(){ne.add(h,d,null,A,!0),ne=null,oe()})}),m)I.then(m);else return I;return this}if(m)return this.add(h,d,null,A,!0),m(),this}if(d=this.encode(d),!d.length)return this;m=this.f,C=Z(m)?m(d):d.split(this.split),this.filter&&(C=s(C,this.filter));let V=G();V._ctx=G();let z=C.length,ae=this.threshold,se=this.depth,ce=this.b,ye=this.i,ge=this.D;for(let ne=0;ne<z;ne++){var M=C[ne];if(M){var T=M.length,N=(ge?ne+1:z-ne)/z,B="";switch(m){case"reverse":case"both":for(var Y=T;--Y;)B=M[Y]+B,p(ye,V,B,h,ge?1:(T-Y)/T,N,ae,ce-1);B="";case"forward":for(Y=0;Y<T;Y++)B+=M[Y],p(ye,V,B,h,ge?(Y+1)/T:1,N,ae,ce-1);break;case"full":for(Y=0;Y<T;Y++){let oe=(ge?Y+1:T-Y)/T;for(let he=T;he>Y;he--)B=M.substring(Y,he),p(ye,V,B,h,oe,N,ae,ce-1)}break;default:if(T=p(ye,V,M,h,1,N,ae,ce-1),se&&1<z&&T>=ae)for(T=V._ctx[M]||(V._ctx[M]=G()),M=this.h[M]||(this.h[M]=ee(ce-(ae||0))),N=ne-se,B=ne+se+1,0>N&&(N=0),B>z&&(B=z);N<B;N++)N!==ne&&p(M,T,C[N],h,0,ce-(N<ne?ne-N:N-ne),ae,ce-1)}}}this.c[I]=1,this.B=!1}return this},t.prototype.A=function(h,d,m){if(F(d)){var A=d.length;if(A--){for(var C=0;C<A;C++)this.A(h,d[C]);return this.A(h,d[A],m)}}else{var I=this.a.index,M=this.a.keys,T=this.a.tag;C=this.a.store;var N,B=this.a.id;A=d;for(var Y=0;Y<B.length;Y++)A=A[B[Y]];if(h==="remove"&&(delete this.l[A],B=M.length,B--)){for(d=0;d<B;d++)I[M[d]].remove(A);return I[M[B]].remove(A,m)}if(T){for(N=0;N<T.length;N++){var V=T[N],z=d;for(B=V.split(":"),Y=0;Y<B.length;Y++)z=z[B[Y]];z="@"+z}N=this.G[V],N=N[z]||(N[z]=[])}B=this.a.field;for(let ae=0,se=B.length;ae<se;ae++){for(V=B[ae],T=d,z=0;z<V.length;z++)T=T[V[z]];V=I[M[ae]],z=h==="add"?V.add:V.update,ae===se-1?z.call(V,A,T,m):z.call(V,A,T)}if(C){for(m=Object.keys(C),h=G(),I=0;I<m.length;I++)if(M=m[I],C[M]){M=M.split(":");let ae,se;for(B=0;B<M.length;B++)T=M[B],ae=(ae||d)[T],se=(se||h)[T]=ae}d=h}N&&(N[N.length]=d),this.l[A]=d}return this},t.prototype.update=function(h,d,m){return this.a&&te(h)?this.A("update",h,d):(this.c["@"+h]&&Q(d)&&(this.remove(h),this.add(h,d,m,!0)),this)},t.prototype.remove=function(h,d,m){if(this.a&&te(h))return this.A("remove",h,d);var A="@"+h;if(this.c[A]){if(this.g)return this.m[this.c[A]].postMessage({remove:!0,id:h}),delete this.c[A],d&&d(),this;if(!m){if(this.async&&typeof importScripts!="function"){let C=this;if(A=new Promise(function(I){setTimeout(function(){C.remove(h,null,!0),C=null,I()})}),d)A.then(d);else return A;return this}if(d)return this.remove(h,null,!0),d(),this}for(d=0;d<this.b-(this.threshold||0);d++)w(this.i[d],h);this.depth&&w(this.h,h),delete this.c[A],this.B=!1}return this};let ze;t.prototype.search=function(h,d,m,A){if(te(d)){if(F(d))for(var C=0;C<d.length;C++)d[C].query=h;else d.query=h;h=d,d=1e3}else d&&Z(d)?(m=d,d=1e3):d||d===0||(d=1e3);if(this.g){this.F=m,this.u=0,this.o=[];for(var I=0;I<this.g;I++)this.m[I].postMessage({search:!0,limit:d,content:h})}else{var M=[],T=h;if(te(h)&&!F(h)){m||(m=h.callback)&&(T.callback=null);var N=h.sort,B=h.page;d=h.limit,I=h.threshold;var Y=h.suggest;h=h.query}if(this.a){I=this.a.index;let ge=T.where;var V=T.bool||"or",z=T.field;let ne=V,oe,he;if(z)F(z)||(z=[z]);else if(F(T)){var ae=T;z=[],ne=[];for(var se=0;se<T.length;se++)A=T[se],C=A.bool||V,z[se]=A.field,ne[se]=C,C==="not"?oe=!0:C==="and"&&(he=!0)}else z=this.a.keys;for(V=z.length,se=0;se<V;se++)ae&&(T=ae[se]),B&&!Q(T)&&(T.page=null,T.limit=0),M[se]=I[z[se]].search(T,0);if(m)return m(a.call(this,h,ne,M,N,d,Y,ge,B,he,oe));if(this.async){let Ue=this;return new Promise(function(Ce){Promise.all(M).then(function(Pe){Ce(a.call(Ue,h,ne,Pe,N,d,Y,ge,B,he,oe))})})}return a.call(this,h,ne,M,N,d,Y,ge,B,he,oe)}if(I||(I=this.threshold||0),!A){if(this.async&&typeof importScripts!="function"){let ge=this;if(I=new Promise(function(ne){setTimeout(function(){ne(ge.search(T,d,null,!0)),ge=null})}),m)I.then(m);else return I;return this}if(m)return m(this.search(T,d,null,!0)),this}if(!h||!Q(h))return M;if(T=h,this.cache)if(this.B){if(m=this.j.get(h))return m}else this.j.clear(),this.B=!0;if(T=this.encode(T),!T.length)return M;m=this.f,m=Z(m)?m(T):T.split(this.split),this.filter&&(m=s(m,this.filter)),ae=m.length,A=!0,C=[];var ce=G(),ye=0;if(1<ae&&(this.depth&&this.f==="strict"?V=!0:m.sort(q)),!V||(se=this.h)){let ge=this.b;for(;ye<ae;ye++){let ne=m[ye];if(ne){if(V){if(!z){if(se[ne])z=ne,ce[ne]=1;else if(!Y)return M}if(Y&&ye===ae-1&&!C.length)V=!1,ne=z||ne,ce[ne]=0;else if(!z)continue}if(!ce[ne]){let oe=[],he=!1,Ue=0,Ce=V?se[z]:this.i;if(Ce){let Pe;for(let Je=0;Je<ge-I;Je++)(Pe=Ce[Je]&&Ce[Je][ne])&&(oe[Ue++]=Pe,he=!0)}if(he)z=ne,C[C.length]=1<Ue?oe.concat.apply([],oe):oe[0];else if(!Y){A=!1;break}ce[ne]=1}}}}else A=!1;return A&&(M=K(C,d,B,Y)),this.cache&&this.j.set(h,M),M}},t.prototype.find=function(h,d){return this.where(h,d,1)[0]||null},t.prototype.where=function(h,d,m,A){let C=this.l,I=[],M=0,T;var N;let B;if(te(h)){m||(m=d);var Y=Object.keys(h),V=Y.length;if(T=!1,V===1&&Y[0]==="id")return[C[h.id]];if((N=this.I)&&!A)for(var z=0;z<N.length;z++){var ae=N[z],se=h[ae];if(!O(se)){if(B=this.G[ae]["@"+se],--V===0)return B;Y.splice(Y.indexOf(ae),1),delete h[ae];break}}for(N=Array(V),z=0;z<V;z++)N[z]=Y[z].split(":")}else{if(Z(h)){for(d=A||Object.keys(C),m=d.length,Y=0;Y<m;Y++)V=C[d[Y]],h(V)&&(I[M++]=V);return I}if(O(d))return[C[h]];if(h==="id")return[C[d]];Y=[h],V=1,N=[h.split(":")],T=!0}for(A=B||A||Object.keys(C),z=A.length,ae=0;ae<z;ae++){se=B?A[ae]:C[A[ae]];let ce=!0;for(let ye=0;ye<V;ye++){T||(d=h[Y[ye]]);let ge=N[ye],ne=ge.length,oe=se;if(1<ne)for(let he=0;he<ne;he++)oe=oe[ge[he]];else oe=oe[ge[0]];if(oe!==d){ce=!1;break}}if(ce&&(I[M++]=se,m&&M===m))break}return I},t.prototype.info=function(){if(this.g)for(let h=0;h<this.g;h++)this.m[h].postMessage({info:!0,id:this.id});else return{id:this.id,items:this.length,cache:this.cache&&this.cache.s?this.cache.s.length:!1,matcher:Te.length+(this.v?this.v.length:0),worker:this.g,threshold:this.threshold,depth:this.depth,resolution:this.b,contextual:this.depth&&this.f==="strict"}},t.prototype.clear=function(){return this.destroy().init()},t.prototype.destroy=function(){if(this.cache&&(this.j.clear(),this.j=null),this.i=this.h=this.c=null,this.a){let h=this.a.keys;for(let d=0;d<h.length;d++)this.a.index[h[d]].destroy();this.a=this.l=null}return this},t.prototype.export=function(h){let d=!h||O(h.serialize)||h.serialize;if(this.a){let A=!h||O(h.doc)||h.doc;var m=!h||O(h.index)||h.index;h=[];let C=0;if(m)for(m=this.a.keys;C<m.length;C++){let I=this.a.index[m[C]];h[C]=[I.i,I.h,Object.keys(I.c)]}A&&(h[C]=this.l)}else h=[this.i,this.h,Object.keys(this.c)];return d&&(h=JSON.stringify(h)),h},t.prototype.import=function(h,d){(!d||O(d.serialize)||d.serialize)&&(h=JSON.parse(h));let m=G();if(this.a){var A=!d||O(d.doc)||d.doc,C=0;if(!d||O(d.index)||d.index){d=this.a.keys;let M=d.length;for(var I=h[0][2];C<I.length;C++)m[I[C]]=1;for(C=0;C<M;C++){I=this.a.index[d[C]];let T=h[C];T&&(I.i=T[0],I.h=T[1],I.c=m)}}A&&(this.l=te(A)?A:h[C])}else{for(A=h[2],C=0;C<A.length;C++)m[A[C]]=1;this.i=h[0],this.h=h[1],this.c=m}};let lr=function(){let h=o("\\s+"),d=o("[^a-z0-9 ]"),m=[o("[-/]")," ",d,"",h," "];return function(A){return b(l(A.toLowerCase(),m))}}(),sr={icase:function(h){return h.toLowerCase()},simple:function(){let h=o("\\s+"),d=o("[^a-z0-9 ]"),m=o("[-/]"),A=o("[\xE0\xE1\xE2\xE3\xE4\xE5]"),C=o("[\xE8\xE9\xEA\xEB]"),I=o("[\xEC\xED\xEE\xEF]"),M=o("[\xF2\xF3\xF4\xF5\xF6\u0151]"),T=o("[\xF9\xFA\xFB\xFC\u0171]"),N=o("[\xFD\u0177\xFF]"),B=o("\xF1"),Y=o("[\xE7c]"),V=o("\xDF"),z=o(" & "),ae=[A,"a",C,"e",I,"i",M,"o",T,"u",N,"y",B,"n",Y,"k",V,"s",z," and ",m," ",d,"",h," "];return function(se){return se=l(se.toLowerCase(),ae),se===" "?"":se}}(),advanced:function(){let h=o("ae"),d=o("ai"),m=o("ay"),A=o("ey"),C=o("oe"),I=o("ue"),M=o("ie"),T=o("sz"),N=o("zs"),B=o("ck"),Y=o("cc"),V=o("sh"),z=o("th"),ae=o("dt"),se=o("ph"),ce=o("pf"),ye=o("ou"),ge=o("uo"),ne=[h,"a",d,"ei",m,"ei",A,"ei",C,"o",I,"u",M,"i",T,"s",N,"s",V,"s",B,"k",Y,"k",z,"t",ae,"t",se,"f",ce,"f",ye,"o",ge,"u"];return function(oe,he){return oe&&(oe=this.simple(oe),2<oe.length&&(oe=l(oe,ne)),he||1<oe.length&&(oe=b(oe)),oe)}}(),extra:function(){let h=o("p"),d=o("z"),m=o("[cgq]"),A=o("n"),C=o("d"),I=o("[vw]"),M=o("[aeiouy]"),T=[h,"b",d,"s",m,"k",A,"m",C,"t",I,"f",M,""];return function(N){if(!N)return N;if(N=this.advanced(N,!0),1<N.length){N=N.split(" ");for(let B=0;B<N.length;B++){let Y=N[B];1<Y.length&&(N[B]=Y[0]+l(Y.substring(1),T))}N=N.join(" "),N=b(N)}return N}}(),balance:lr},Bi=function(){function h(d){this.clear(),this.H=d!==!0&&d}return h.prototype.clear=function(){this.cache=G(),this.count=G(),this.index=G(),this.s=[]},h.prototype.set=function(d,m){if(this.H&&O(this.cache[d])){let A=this.s.length;if(A===this.H){A--;let C=this.s[A];delete this.cache[C],delete this.count[C],delete this.index[C]}this.index[d]=A,this.s[A]=d,this.count[d]=-1,this.cache[d]=m,this.get(d)}else this.cache[d]=m},h.prototype.get=function(d){let m=this.cache[d];if(this.H&&m){var A=++this.count[d];let I=this.index,M=I[d];if(0<M){let T=this.s;for(var C=M;this.count[T[--M]]<=A&&M!==-1;);if(M++,M!==C){for(A=C;A>M;A--)C=T[A-1],T[A]=C,I[C]=A;T[M]=d,I[d]=M}}}return m},h}();return t}(function(){let r={},e=typeof Blob!="undefined"&&typeof URL!="undefined"&&URL.createObjectURL;return function(t,i,n,s,a){return n=e?URL.createObjectURL(new Blob(["("+n.toString()+")()"],{type:"text/javascript"})):t+".min.js",t+="-"+i,r[t]||(r[t]=[]),r[t][a]=new Worker(n),r[t][a].onmessage=s,r[t][a]}}()),Os)});var xE={};Jt(xE,{BaseProvider:()=>le,CocodaSDK:()=>Cr,ConceptApiProvider:()=>ir,LabelSearchSuggestionProvider:()=>br,LocApiProvider:()=>Sr,LocalMappingsProvider:()=>yr,MappingsApiProvider:()=>tr,MyCoReProvider:()=>Or,OccurrencesApiProvider:()=>_r,ReconciliationApiProvider:()=>wr,SkohubProvider:()=>Ar,SkosmosApiProvider:()=>xr,addAllProviders:()=>bE,cdk:()=>md,errors:()=>Fe,utils:()=>Ur});var Fe={};Jt(Fe,{BackendError:()=>vt,BackendUnavailableError:()=>yt,CDKError:()=>Ee,InvalidOrMissingParameterError:()=>W,InvalidProviderError:()=>Wr,InvalidRequestError:()=>Qe,MethodNotImplementedError:()=>gt,MissingApiUrlError:()=>De,NetworkError:()=>_t});var Ee=class extends Error{constructor({message:e="",relatedError:t=null,code:i=null}={}){!e&&t&&t.message&&(e=t.message),super(e),this.name=this.constructor.name,this.relatedError=t,this.code=i}},gt=class extends Ee{constructor(n){var s=n,{method:e,message:t=""}=s,i=J(s,["method","message"]);i.message=`Method not implemented: ${e} (${t})`,super(i)}},W=class extends Ee{constructor(n){var s=n,{parameter:e,message:t=""}=s,i=J(s,["parameter","message"]);i.message=`Invalid or missing parameter: ${e} (${t})`,super(i)}},Qe=class extends Ee{},vt=class extends Ee{},yt=class extends Ee{},_t=class extends Ee{},De=class extends Ee{},Wr=class extends Ee{};var dd=fe(ii(),1);var re=fe(Ru(),1),xe=fe(zu(),1),gr=fe(mf(),1),Ft=fe(Bf(),1),rs=fe(ec(),1),ts=fe(Ic(),1),Ie=fe(ke(),1),Bt=fe(Xe(),1),be=fe(Pc(),1),is=fe(Gc(),1),rr=fe(Dl(),1),AC=fe(Ah(),1),ns=fe(Zn(),1),ar=fe(Cp(),1),ss=fe(Ip(),1);var qr=fe(He(),1);var Wt={};Jt(Wt,{BaseProvider:()=>le,ConceptApiProvider:()=>ir,LabelSearchSuggestionProvider:()=>br,LocApiProvider:()=>Sr,LocalMappingsProvider:()=>yr,MappingsApiProvider:()=>tr,MyCoReProvider:()=>Or,OccurrencesApiProvider:()=>_r,ReconciliationApiProvider:()=>wr,SkohubProvider:()=>Ar,SkosmosApiProvider:()=>xr});var ut=fe(He(),1);var Mi=fe(ii(),1);var Ur={};Jt(Ur,{concatUrl:()=>or,listOfCapabilities:()=>Ae,requestMethods:()=>ys,withCustomProps:()=>Nr});var ys=[{method:"getRegistries",fallback:[],type:"Registries"},{method:"getSchemes",fallback:[],type:"Schemes"},{method:"vocSearch",fallback:[],type:"Schemes"},{method:"getTypes",fallback:[],type:"Types"},{method:"suggest",fallback:["",[],[],[]]},{method:"vocSuggest",fallback:["",[],[],[]]},{method:"getConcordances",fallback:[],type:"Concordances"},{method:"getOccurrences",fallback:[],type:"Occurrences"},{method:"getTop",fallback:[],type:"Concepts"},{method:"getConcepts",fallback:[],type:"Concepts"},{method:"getNarrower",fallback:[],type:"Concepts"},{method:"getAncestors",fallback:[],type:"Concepts"},{method:"search",fallback:[],type:"Concepts"},{method:"getMapping",fallback:null,type:"Mapping"},{method:"getMappings",fallback:[],type:"Mappings"},{method:"postMapping",fallback:null,type:"Mapping"},{method:"postMappings",fallback:[],type:"Mapping"},{method:"putMapping",fallback:null,type:"Mapping"},{method:"patchMapping",fallback:null,type:"Mapping"},{method:"deleteMapping",fallback:!1},{method:"deleteMappings",fallback:[]},{method:"getAnnotations",fallback:[],type:"Annotations"},{method:"postAnnotation",fallback:null,type:"Annotation"},{method:"putAnnotation",fallback:null,type:"Annotation"},{method:"patchAnnotation",fallback:null,type:"Annotation"},{method:"deleteAnnotation",fallback:!1}];function or(...r){let[e,...t]=r;for(let i of t)e.endsWith("/")||(e+="/"),i.startsWith("/")&&(i=i.slice(1)),e+=i;return e}function Nr(r,e){return r._totalCount=e._totalCount,r._url=e._url,r}var Ae=["schemes","top","data","concepts","narrower","ancestors","types","suggest","search","auth","mappings","concordances","annotations","occurrences"];var le=class{constructor(e={}){this._jskos=e,this.axios=Mi.default.create({timeout:2e4}),this._path=typeof window!="undefined"&&window.location.pathname,this.has={},this._defaultLanguages="en,de,fr,es,nl,it,fi,pl,ru,cs,jp".split(","),this.languages=[],this._auth={key:null,bearerToken:null},this._repeating=[],this._api={status:e.status,schemes:Array.isArray(e.schemes)?void 0:e.schemes,top:e.top,data:e.data,concepts:e.concepts,narrower:e.narrower,ancestors:e.ancestors,types:e.types,suggest:e.suggest,search:e.search,"voc-suggest":e["voc-suggest"],"voc-search":e["voc-search"],mappings:e.mappings,concordances:e.concordances,annotations:e.annotations,occurrences:e.occurrences,reconcile:e.reconcile,api:e.api},this._config={},this.setRetryConfig(),this.axios.interceptors.request.use(i=>{if(!i._skipAdditionalParameters){let n=gr.default([].concat(re.default(i,"params.language","").split(","),this.languages,this._defaultLanguages).filter(s=>s!="")).join(",");xe.default(i,"params.language",n),this.has.auth&&this._auth.bearerToken&&!re.default(i,"headers.Authorization")&&xe.default(i,"headers.Authorization",`Bearer ${this._auth.bearerToken}`)}if(i.url.startsWith("http:")&&typeof window!="undefined"&&window.location.protocol=="https:")throw new Mi.default.Cancel("Can't call http API from https.");return i}),this.axios.interceptors.response.use(({data:i,headers:n={},config:s={}})=>{i=ut.default.normalize(i);let a=s.url;if(a.endsWith("?")||(a+="?"),ts.default(s.params||{},(u,o)=>{a+=`${o}=${encodeURIComponent(u)}&`}),Ie.default(i)||Bt.default(i)){let u=parseInt(n["x-total-count"]);isNaN(u)||(i._totalCount=u),i._url=a}return i},i=>{let n=re.default(i,"config._retryCount",0),s=re.default(i,"config.method"),a=re.default(i,"response.status");return this._retryConfig.methods.includes(s)&&this._retryConfig.statusCodes.includes(a)&&n<this._retryConfig.count?(i.config._retryCount=n+1,i.config.data&&(i.config.data=JSON.parse(i.config.data)),new Promise((u,o)=>{setTimeout(()=>{this.axios(i.config).then(u).catch(o)},(()=>{let l=this._retryConfig.delay;return typeof l=="function"?l(n):l})())})):Promise.reject(i)});let t=[];for(let{method:i,type:n}of ys){let s=this[i]&&this[i].bind(this);if(!s){this[i]=()=>{throw new gt({method:i})};continue}this[i]=(a={})=>{if(a._raw)return delete a._raw,s(a);let u=t.find(w=>w.method==i&&rr.default(w.options,a));if(u)return u.promise;let o;a.cancelToken||(o=this.getCancelTokenSource(),a.cancelToken=o.token);let l=this.init().then(()=>s(a)).then(w=>(Ie.default(w)&&w._totalCount===void 0?w._totalCount=w.length:Bt.default(w)&&w._totalCount===void 0&&(w._totalCount=1),w&&n&&this[`adjust${n}`]&&(w=this[`adjust${n}`](w)),w)).catch(w=>{throw w instanceof Ee?w:w.response?w.response.status.toString().startsWith(4)?new Qe({relatedError:w,code:w.response.status}):new vt({relatedError:w,code:w.response.status}):w.request?typeof navigator!="undefined"&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection)?new yt({relatedError:w}):new _t({relatedError:w}):new Ee({relatedError:w})});o&&(l.cancel=(...w)=>o.cancel(...w));let p={method:i,options:ar.default(a,["cancelToken"]),promise:l};return t.push(p),l.catch(()=>{}).then(()=>t.splice(t.indexOf(p),1)),l}}}get uri(){return this._jskos.uri}get notation(){return this._jskos.notation}get prefLabel(){return this._jskos.prefLabel}get definition(){return this._jskos.definition}get schemes(){return this._jskos.schemes}get excludedSchemes(){return this._jskos.excludedSchemes}get stored(){return this._jskos.stored!==void 0?this._jskos.stored:this.constructor.stored}init(){return j(this,null,function*(){return this._init?this._init:(this._init=(()=>j(this,null,function*(){this._prepare();let e;if(be.default(this._api.status))try{e=yield this.axios({method:"get",url:this._api.status})}catch(t){re.default(t,"response.status")===404&&(this._api.status=null)}else e=this._api.status;if(Bt.default(e)&&!is.default(e)){this._config=e.config||{};for(let t of Object.keys(this._api))this._api[t]===void 0&&(this._api[t]=e[t]||null)}this._setup()}))(),this._init)})}_prepare(){}_setup(){}getCancelTokenSource(){return Mi.default.CancelToken.source()}setAuth({key:e=this._auth.key,bearerToken:t=this._auth.bearerToken}){this._auth.key=e,this._auth.bearerToken=t}setRetryConfig(e={}){this._retryConfig=Object.assign({methods:["get","head","options"],statusCodes:[401,403],count:3,delay:t=>300*t},e)}isAuthorizedFor({type:e,action:t,user:i,crossUser:n}){if(t=="read"&&this.has[e]===!0)return!0;if(!this.has[e])return!1;let s=re.default(this._config,`${e}.${t}`);if(!s)return!!this.has[e][t];if(s.auth&&(!i||!this._auth.key)||s.auth&&this._auth.key!=re.default(this._config,"auth.key"))return!1;let a=[i.uri].concat(Object.values(i.identities||{}).map(u=>u.uri)).filter(u=>u!=null);if(s.auth&&s.identities&&Ft.default(a,s.identities).length==0)return!1;if(s.auth&&s.identityProviders){let u=Object.keys(i&&i.identities||{});if(Ft.default(u,s.identityProviders).length==0)return!1}return n?s.crossUser===!0||Ft.default(s.crossUser||[],a).length>0:!!this.has[e][t]}supportsScheme(e){if(!e)return!1;let t=Ie.default(this.schemes)?this.schemes:null;return t==null&&!ut.default.isContainedIn(e,this.excludedSchemes||[])?!0:ut.default.isContainedIn(e,t)}adjustConcept(e){if(!e||e.__SAVED__)return e;e._getNarrower=t=>this.getNarrower($(R({},t),{concept:e})),e._getAncestors=t=>this.getAncestors($(R({},t),{concept:e})),e._getDetails=t=>j(this,null,function*(){return(yield this.getConcepts($(R({},t),{concepts:[e]})))[0]});for(let t of["broader","narrower","ancestors"])Array.isArray(e[t])&&e[t].length&&!e[t].includes(null)&&(e[t]=this.adjustConcepts(e[t]));return e._registry=this,e}adjustConcepts(e){return Nr(e.map(t=>this.adjustConcept(t)),e)}adjustRegistries(e){return e}adjustScheme(e){if(!e||e.__SAVED__)return e;let t=e._registry;return e._registry=this.cdk&&this.cdk.registryForScheme(e),!e._registry||t===e._registry||e._registry._api.api===this._api.api?e._registry=t||this:["concepts","topConcepts"].forEach(i=>{Array.isArray(e[i])&&(e[i].length===0||e[i][0]===null)&&delete e[i]}),e._registry&&(e._getTop=i=>e._registry.getTop($(R({},i),{scheme:e})),e._getTypes=i=>e._registry.getTypes($(R({},i),{scheme:e})),e._suggest=s=>{var a=s,{search:i}=a,n=J(a,["search"]);return e._registry.suggest($(R({},n),{search:i,scheme:e}))}),e}adjustSchemes(e){return Nr(e.map(t=>this.adjustScheme(t)),e)}adjustConcordances(e){for(let t of e)t._registry=this;return e}adjustMapping(e){for(let t of["from","to"]){let i=`${t}Scheme`;e[i]||(e[i]=re.default(ut.default.conceptsOfMapping(e,t),"[0].inScheme[0]",null))}if(e._registry=this,!e.identifier){let t=re.default(ut.default.addMappingIdentifiers(e),"identifier");t&&(e.identifier=t)}return e}adjustMappings(e){return Nr(e.map(t=>this.adjustMapping(t)),e)}postMappings(){return j(this,arguments,function*(i={}){var n=i,{mappings:e}=n,t=J(n,["mappings"]);if(!e||!e.length)throw new W({parameter:"mappings"});return this._callHelperForArrayWrappers({method:"postMapping",items:e,itemProperty:"mapping",config:t})})}deleteMappings(){return j(this,arguments,function*(i={}){var n=i,{mappings:e}=n,t=J(n,["mappings"]);if(!e||!e.length)throw new W({parameter:"mappings"});return this._callHelperForArrayWrappers({method:"deleteMapping",items:e,itemProperty:"mapping",config:t})})}_callHelperForArrayWrappers(s){return j(this,arguments,function*({method:e,items:t,itemProperty:i,config:n}){let a=[],u=yield Promise.all(t.map(o=>j(this,null,function*(){try{return yield this[e]($(R({[i]:o},n),{_raw:!0}))}catch(l){return a[t.indexOf(o)]=l,null}})));return u._errors=a,u})}};le.providerName="Base";var Le=fe(He(),1);var ur=fe(od(),1);var Ri,gE=new Uint8Array(16);function ws(){if(!Ri&&(Ri=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ri))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ri(gE)}var Re=[];for(let r=0;r<256;++r)Re.push((r+256).toString(16).slice(1));function ud(r,e=0){return(Re[r[e+0]]+Re[r[e+1]]+Re[r[e+2]]+Re[r[e+3]]+"-"+Re[r[e+4]]+Re[r[e+5]]+"-"+Re[r[e+6]]+Re[r[e+7]]+"-"+Re[r[e+8]]+Re[r[e+9]]+"-"+Re[r[e+10]]+Re[r[e+11]]+Re[r[e+12]]+Re[r[e+13]]+Re[r[e+14]]+Re[r[e+15]]).toLowerCase()}var vE=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),bs={randomUUID:vE};function yE(r,e,t){if(bs.randomUUID&&!e&&!r)return bs.randomUUID();r=r||{};let i=r.random||(r.rng||ws)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){t=t||0;for(let n=0;n<16;++n)e[t+n]=i[n];return e}return ud(i)}var Li=yE;var ji="urn:uuid:",yr=class extends le{_prepare(){this.has.mappings={read:!0,create:!0,update:!0,delete:!0},Ae.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}_setup(){this.queue=[],this.localStorageKey="cocoda-mappings--"+this._path;let e="mappings",t=()=>ur.default.getItem(this.localStorageKey).then(i=>{i=i||[];let n=0;for(let s of i.filter(a=>!a.uri||!a.uri.startsWith(ji)))s.uri&&(s.identifier||(s.identifier=[]),s.identifier.push(s.uri)),s.uri=`${ji}${Li()}`,n+=1;return n&&console.warn(`URIs added to ${n} local mappings.`),ur.default.setItem(this.localStorageKey,i)});ur.default.getItem(e).then(i=>{i&&console.warn(`Warning: There is old data in local storage (or IndexedDB, depending on the ) with the key "${e}". This data will not be used anymore. A manual export is necessary to get this data back.`)}),this.queue.push(t().catch(i=>{console.warn("Error when adding URIs to local mappings:",i)}))}isAuthorizedFor({type:e,action:t}){return e=="mappings"&&t!="anonymous"}_getMappingsQueue(){let e=ns.default(this.queue)||Promise.resolve();return new Promise(t=>{function i(){var a,u,o=new Promise((l,p)=>{a=l,u=p});return o.resolve=a,o.reject=u,o}let n=i(),s=()=>{n.resolve()};this.queue.push(n),e.then(()=>ur.default.getItem(this.localStorageKey)).then(a=>{t({mappings:a,done:s})})})}getMapping(i){return j(this,null,function*(){var n=i,{mapping:e}=n,t=J(n,["mapping"]);if(t._raw=!0,!e||!e.uri)throw new W({parameter:"mapping"});return(yield this.getMappings($(R({},t),{uri:e.uri})))[0]})}getMappings(){return j(this,arguments,function*({from:e,fromScheme:t,to:i,toScheme:n,creator:s,type:a,partOf:u,offset:o,limit:l,direction:p,mode:w,identifier:b,uri:q}={}){let y={};return e&&(y.from=be.default(e)?e:e.uri),t&&(y.fromScheme=be.default(t)?{uri:t}:t),i&&(y.to=be.default(i)?i:i.uri),n&&(y.toScheme=be.default(n)?{uri:n}:n),s&&(y.creator=be.default(s)?s:Le.default.prefLabel(s)),a&&(y.type=be.default(a)?a:a.uri),u&&(y.partOf=be.default(u)?u:u.uri),o&&(y.offset=o),l&&(y.limit=l),p&&(y.direction=p),w&&(y.mode=w),b&&(y.identifier=b),q&&(y.uri=q),this._getMappingsQueue().catch(P=>{throw new Ee({message:"Could not get mappings from local storage",relatedError:P})}).then(({mappings:P,done:H})=>{H();let K=(F,Z)=>F.uri==Z||Z&&F.notation&&F.notation[0].toLowerCase()==Z.toLowerCase();if((y.from||y.to)&&(P=P.filter(F=>{let Z=Le.default.conceptsOfMapping(F,"from").find(G=>K(G,y.from))!=null,te=Le.default.conceptsOfMapping(F,"to").find(G=>K(G,y.from))!=null,O=Le.default.conceptsOfMapping(F,"from").find(G=>K(G,y.to))!=null,ee=Le.default.conceptsOfMapping(F,"to").find(G=>K(G,y.to))!=null;return y.direction=="backward"?y.mode=="or"?y.from&&te||y.to&&O:(!y.from||te)&&(!y.to||O):y.direction=="both"?y.mode=="or"?y.from&&(Z||te)||y.to&&(O||ee):(!y.from||Z)&&(!y.to||ee)||(!y.from||te)&&(!y.to||O):y.mode=="or"?y.from&&Z||y.to&&ee:(!y.from||Z)&&(!y.to||ee)})),(y.fromScheme||y.toScheme)&&(P=P.filter(F=>{let Z=Le.default.compare(F.fromScheme,y.fromScheme),te=Le.default.compare(F.toScheme,y.fromScheme),O=Le.default.compare(F.fromScheme,y.toScheme),ee=Le.default.compare(F.toScheme,y.toScheme);return y.direction=="backward"?y.mode=="or"?y.fromScheme&&te||y.toScheme&&O:(!y.fromScheme||te)&&(!y.toScheme||O):y.direction=="both"?y.mode=="or"?y.fromScheme&&(Z||te)||y.toScheme&&(O||ee):(!y.fromScheme||Z)&&(!y.toScheme||ee)||(!y.fromScheme||te)&&(!y.toScheme||O):y.mode=="or"?y.fromScheme&&Z||y.toScheme&&ee:(!y.fromScheme||Z)&&(!y.toScheme||ee)})),y.creator){let F=y.creator.split("|");P=P.filter(Z=>(Z.creator&&Z.creator.find(te=>F.includes(Le.default.prefLabel(te))||F.includes(te.uri)))!=null)}y.type&&(P=P.filter(F=>(F.type||[Le.default.defaultMappingType.uri]).includes(y.type))),y.partOf&&(P=P.filter(F=>F.partOf!=null&&F.partOf.find(Z=>Le.default.compare(Z,{uri:y.partOf}))!=null)),y.identifier&&(P=P.filter(F=>y.identifier.split("|").map(Z=>(F.identifier||[]).includes(Z)||F.uri==Z).reduce((Z,te)=>Z||te))),y.uri&&(P=P.filter(F=>F.uri==y.uri));let Q=P.length;return P=P.sort((F,Z)=>{let te=F.modified||F.created,O=Z.modified||Z.created;return O==null?-1:te==null?1:te>O?-1:1}),P=P.slice(y.offset||0),P=P.slice(0,y.limit),P._totalCount=Q,P})})}postMapping(t){return j(this,arguments,function*({mapping:e}){if(!e)throw new W({parameter:"mapping"});let{mappings:i,done:n}=yield this._getMappingsQueue();if((!e.uri||!e.uri.startsWith(ji))&&(e.uri&&(e.identifier||(e.identifier=[]),e.identifier.push(e.uri)),e.uri=`${ji}${Li()}`),i.find(s=>s.uri==e.uri))throw n(),new W({parameter:"mapping",message:"Duplicate URI"});e.created||(e.created=new Date().toISOString()),e.modified||(e.modified=e.created),i.push(e),i=i.map(s=>Le.default.minifyMapping(s));try{return yield ur.default.setItem(this.localStorageKey,i),n(),e}catch(s){throw n(),s}})}putMapping(t){return j(this,arguments,function*({mapping:e}){if(!e)throw new W({parameter:"mapping"});let{mappings:i,done:n}=yield this._getMappingsQueue(),s=i.findIndex(a=>a.uri==e.uri);if(s==-1)throw n(),new W({parameter:"mapping",message:"Mapping not found"});e.created||(e.created=i[s].created),e.modified=new Date().toISOString(),i[s]=e,i=i.map(a=>Le.default.minifyMapping(a));try{return yield ur.default.setItem(this.localStorageKey,i),n(),e}catch(a){throw n(),a}})}patchMapping(t){return j(this,arguments,function*({mapping:e}){if(!e)throw new W({parameter:"mapping"});let{mappings:i,done:n}=yield this._getMappingsQueue(),s=i.findIndex(a=>a.uri==e.uri);if(s==-1)throw n(),new W({parameter:"mapping",message:"Mapping not found"});e.created||(e.created=i[s].created),e.modified=new Date().toISOString(),i[s]=Object.assign(i[s],e),i=i.map(a=>Le.default.minifyMapping(a));try{return yield ur.default.setItem(this.localStorageKey,i),n(),e}catch(a){throw n(),a}})}deleteMapping(t){return j(this,arguments,function*({mapping:e}){if(!e)throw new W({parameter:"mapping"});let{mappings:i,done:n}=yield this._getMappingsQueue();try{return i=i.filter(s=>s.uri!=e.uri),i=i.map(s=>Le.default.minifyMapping(s)),yield ur.default.setItem(this.localStorageKey,i),n(),!0}catch(s){throw n(),s}})}};yr.providerName="LocalMappings";yr.stored=!0;var ft=fe(He(),1);var tr=class extends le{_prepare(){this._api.api&&this._api.status===void 0&&(this._api.status=or(this._api.api,"/status")),this.has.mappings=!0,this.has.concordances=!0,this.has.annotations=!0,Ae.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}_setup(){if(this._api.api){let e={mappings:"/mappings",concordances:"/concordances",annotations:"/annotations"};for(let t of Object.keys(e))this._api[t]===void 0&&(this._api[t]=or(this._api.api,e[t]))}this.has.mappings=this._api.mappings?{}:!1,this.has.mappings&&(this.has.mappings.read=!!re.default(this._config,"mappings.read",!0),this.has.mappings.create=!!re.default(this._config,"mappings.create"),this.has.mappings.update=!!re.default(this._config,"mappings.update"),this.has.mappings.delete=!!re.default(this._config,"mappings.delete"),this.has.mappings.anonymous=!!re.default(this._config,"mappings.anonymous")),this.has.concordances=this._api.concordances?{}:!1,this.has.concordances&&(this.has.concordances.read=!!re.default(this._config,"concordances.read"),this.has.concordances.create=!!re.default(this._config,"concordances.create"),this.has.concordances.update=!!re.default(this._config,"concordances.update"),this.has.concordances.delete=!!re.default(this._config,"concordances.delete")),this.has.annotations=this._api.annotations?{}:!1,this.has.annotations&&(this.has.annotations.read=!!re.default(this._config,"annotations.read"),this.has.annotations.create=!!re.default(this._config,"annotations.create"),this.has.annotations.update=!!re.default(this._config,"annotations.update"),this.has.annotations.delete=!!re.default(this._config,"annotations.delete")),this.has.auth=re.default(this._config,"auth.key")!=null,this._defaultParams={properties:"annotations"}}getMapping(i){return j(this,null,function*(){var n=i,{mapping:e}=n,t=J(n,["mapping"]);if(!e)throw new W({parameter:"mapping"});if(!e.uri||!e.uri.startsWith(this._api.mappings))throw new W({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});try{return yield this.axios($(R({},t),{url:e.uri,params:R(R({},this._defaultParams),t.params||{})}))}catch(s){if(re.default(s,"response.status")==404)return null;throw s}})}getMappings(Z){return j(this,null,function*(){var te=Z,{from:e,fromScheme:t,to:i,toScheme:n,creator:s,type:a,partOf:u,offset:o,limit:l,direction:p,mode:w,identifier:b,cardinality:q,annotatedBy:y,annotatedFor:P,annotatedWith:H,sort:K,order:Q}=te,F=J(te,["from","fromScheme","to","toScheme","creator","type","partOf","offset","limit","direction","mode","identifier","cardinality","annotatedBy","annotatedFor","annotatedWith","sort","order"]);let O={},ee=this._api.mappings;return e&&(O.from=be.default(e)?e:e.uri),t&&(O.fromScheme=be.default(t)?t:t.uri),i&&(O.to=be.default(i)?i:i.uri),n&&(O.toScheme=be.default(n)?n:n.uri),s&&(O.creator=be.default(s)?s:ft.default.prefLabel(s)),a&&(O.type=be.default(a)?a:a.uri),u&&(O.partOf=be.default(u)?u:u.uri),o&&(O.offset=o),l&&(O.limit=l),p&&(O.direction=p),q&&(O.cardinality=q),y&&(O.annotatedBy=y),P&&(O.annotatedFor=P),H&&(O.annotatedWith=H),w&&(O.mode=w),b&&(O.identifier=b),K&&(O.sort=K),Q&&(O.order=Q),this.axios($(R({},F),{method:"get",url:ee,params:R(R(R({},this._defaultParams),F.params||{}),O)}))})}postMapping(i){return j(this,null,function*(){var n=i,{mapping:e}=n,t=J(n,["mapping"]);if(!e)throw new W({parameter:"mapping"});return e=ft.default.minifyMapping(e),e=ft.default.addMappingIdentifiers(e),this.axios($(R({},t),{method:"post",url:this._api.mappings,data:e,params:R(R({},this._defaultParams),t.params||{})}))})}putMapping(i){return j(this,null,function*(){var n=i,{mapping:e}=n,t=J(n,["mapping"]);if(!e)throw new W({parameter:"mapping"});e=ft.default.minifyMapping(e),e=ft.default.addMappingIdentifiers(e);let s=e.uri;if(!s||!s.startsWith(this._api.mappings))throw new W({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"put",url:s,data:e,params:R(R({},this._defaultParams),t.params||{})}))})}patchMapping(i){return j(this,null,function*(){var n=i,{mapping:e}=n,t=J(n,["mapping"]);if(!e)throw new W({parameter:"mapping"});let s=e.uri;if(!s||!s.startsWith(this._api.mappings))throw new W({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"patch",url:s,data:ar.default(e,"uri"),params:R(R({},this._defaultParams),t.params||{})}))})}deleteMapping(i){return j(this,null,function*(){var n=i,{mapping:e}=n,t=J(n,["mapping"]);if(!e)throw new W({parameter:"mapping"});let s=e.uri;if(!s||!s.startsWith(this._api.mappings))throw new W({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});return yield this.axios($(R({},t),{method:"delete",url:s})),!0})}getAnnotations(i){return j(this,null,function*(){var n=i,{target:e}=n,t=J(n,["target"]);return e&&xe.default(t,"params.target",e),this.axios($(R({},t),{method:"get",url:this._api.annotations}))})}postAnnotation(i){return j(this,null,function*(){var n=i,{annotation:e}=n,t=J(n,["annotation"]);return this.axios($(R({},t),{method:"post",url:this._api.annotations,data:e}))})}putAnnotation(i){return j(this,null,function*(){var n=i,{annotation:e}=n,t=J(n,["annotation"]);let s=e.id;if(!s||!s.startsWith(this._api.annotations))throw new W({parameter:"annotation",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"put",url:s,data:e}))})}patchAnnotation(i){return j(this,null,function*(){var n=i,{annotation:e}=n,t=J(n,["annotation"]);let s=e.id;if(!s||!s.startsWith(this._api.annotations))throw new W({parameter:"annotation",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"patch",url:s,data:e}))})}deleteAnnotation(i){return j(this,null,function*(){var n=i,{annotation:e}=n,t=J(n,["annotation"]);let s=e.id;if(!s||!s.startsWith(this._api.annotations))throw new W({parameter:"annotation",message:"URI doesn't seem to be part of this registry."});return yield this.axios($(R({},t),{method:"delete",url:s})),!0})}getConcordances(e){return j(this,null,function*(){return this.axios($(R({},e),{method:"get",url:this._api.concordances}))})}postConcordance(i){return j(this,null,function*(){var n=i,{concordance:e}=n,t=J(n,["concordance"]);if(!e)throw new W({parameter:"concordance"});return this.axios($(R({},t),{method:"post",url:this._api.concordances,data:e,params:R(R({},this._defaultParams),t.params||{})}))})}putConcordance(i){return j(this,null,function*(){var n=i,{concordance:e}=n,t=J(n,["concordance"]);if(!e)throw new W({parameter:"concordance"});let s=e.uri;if(!s||!s.startsWith(this._api.concordances))throw new W({parameter:"concordance",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"put",url:s,data:e,params:R(R({},this._defaultParams),t.params||{})}))})}patchConcordance(i){return j(this,null,function*(){var n=i,{concordance:e}=n,t=J(n,["concordance"]);if(!e)throw new W({parameter:"concordance"});let s=e.uri;if(!s||!s.startsWith(this._api.concordances))throw new W({parameter:"concordance",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"patch",url:s,data:ar.default(e,"uri"),params:R(R({},this._defaultParams),t.params||{})}))})}deleteConcordance(i){return j(this,null,function*(){var n=i,{concordance:e}=n,t=J(n,["concordance"]);if(!e)throw new W({parameter:"concordance"});let s=e.uri;if(!s||!s.startsWith(this._api.concordances))throw new W({parameter:"concordance",message:"URI doesn't seem to be part of this registry."});return yield this.axios($(R({},t),{method:"delete",url:s})),!0})}};tr.providerName="MappingsApi";tr.stored=!0;var ct=fe(He(),1);var xs={},_r=class extends le{get _cache(){return xs[this.uri]}_prepare(){xs[this.uri]=[],this._occurrencesSupportedSchemes=[],this.has.occurrences=!0,this.has.mappings=!0,Ae.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}_occurrencesIsSupported(e){return j(this,null,function*(){if(!(this._occurrencesSupportedSchemes&&this._occurrencesSupportedSchemes.length))try{let i=or(this._api.api,"voc"),n=yield this.axios({method:"get",url:i});this._occurrencesSupportedSchemes=n||[]}catch(i){}let t=!1;for(let i of this._occurrencesSupportedSchemes)ct.default.compare(e,i)&&(t=!0);return t})}getMappings(e){return j(this,null,function*(){let t=yield this.getOccurrences(e),i=e.from,n=re.default(i,"inScheme[0]")||e.fromScheme,s=e.to,a=re.default(s,"inScheme[0]")||e.toScheme,u=[];for(let o of t){if(!o)continue;let l={};l.from=re.default(o,"memberSet[0]"),l.from?l.from={memberSet:[l.from]}:l.from=null,l.fromScheme=re.default(o,"memberSet[0].inScheme[0]"),l.to=re.default(o,"memberSet[1]"),l.to?l.to={memberSet:[l.to]}:l.to={memberSet:[]},l.toScheme=re.default(o,"memberSet[1].inScheme[0]"),(i&&ct.default.compare(i,re.default(l,"to.memberSet[0]"))||s&&ct.default.compare(s,re.default(l,"from.memberSet[0]")))&&([l.from,l.fromScheme,l.to,l.toScheme]=[l.to,l.toScheme,l.from,l.fromScheme]),!l.fromScheme&&n&&(l.fromScheme=n),!l.toScheme&&a&&(l.toScheme=a),l.type=[ct.default.defaultMappingType.uri],l._occurrence=o,l=ct.default.addMappingIdentifiers(l),u.push(l)}return u._url=t._url,u})}getOccurrences(a){return j(this,null,function*(){var u=a,{from:e,to:t,concepts:i,threshold:n=0}=u,s=J(u,["from","to","concepts","threshold"]);let o=[];i=(i||[]).concat([e,t]).filter(y=>!!y);for(let y of i)o.push(this._occurrencesIsSupported(re.default(y,"inScheme[0]")).then(P=>P&&y.uri?y.uri:null));let l=yield Promise.all(o);if(l=l.filter(y=>y!=null),l.length==0)throw new W({parameter:"concepts"});o=[];for(let y of l)o.push(this._getOccurrences($(R({},s),{params:{member:y,scheme:"*",threshold:n}})));let p=yield Promise.all(o),w=ss.default([],...p),b=[],q=[];for(let y=0;y<w.length;y+=1){let P=w[y];if(!P)continue;let H=P.memberSet.reduce((K,Q)=>K.concat(Q.uri),[]).sort().join(" ");b.includes(H)?q.push(y):b.push(H)}return q.forEach(y=>{delete w[y]}),w=w.filter(y=>y!=null),w=w.sort((y,P)=>parseInt(P.count||0)-parseInt(y.count||0)),w._url=p.map(y=>y._url),w})}_getOccurrences(e){return j(this,null,function*(){let t=this._cache.find(n=>rr.default(n.config.params,e.params));if(t)return t.data;let i=yield this.axios($(R({},e),{method:"get",url:this._api.api}));return this._cache.push({config:e,data:i}),this._cache.length>20&&(xs[this.uri]=this._cache.slice(this._cache.length-20)),i})}};_r.providerName="OccurrencesApi";_r.stored=!1;var Dr=fe(He(),1);var ir=class extends le{_prepare(){this._api.api&&this._api.status===void 0&&(this._api.status=or(this._api.api,"/status")),this.has.schemes=!0,this.has.top=!0,this.has.data=!0,this.has.concepts=!0,this.has.narrower=!0,this.has.ancestors=!0,this.has.types=!0,this.has.suggest=!0,this.has.search=!0,this.has.auth=!0,Ae.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}_setup(){if(this._api.api){let e={schemes:"/voc",top:"/voc/top",concepts:"/voc/concepts",data:"/data",narrower:"/narrower",ancestors:"/ancestors",types:"/types",suggest:"/suggest",search:"/search"};for(let t of Object.keys(e))this._api[t]===void 0&&(this._api[t]=or(this._api.api,e[t]))}this.has.schemes=!!this._api.schemes,!this.has.schemes&&Array.isArray(this.schemes)&&(this.has.schemes=!0),this.has.top=!!this._api.top,this.has.data=!!this._api.data,this.has.concepts=!!this._api.concepts||this.has.data,this.has.narrower=!!this._api.narrower,this.has.ancestors=!!this._api.ancestors,this.has.types=!!this._api.types,this.has.suggest=!!this._api.suggest,this.has.search=!!this._api.search,this.has.auth=re.default(this._config,"auth.key")!=null,this._defaultParams={properties:"+created,issued,modified,editorialNote,scopeNote"}}static _registryConfigForBartocApiConfig({url:e,scheme:t}={}){return!e||!t?null:{api:e,schemes:[t]}}_getSchemeUri(e){return j(this,null,function*(){this._approvedSchemes=this._approvedSchemes||[],this._rejectedSchemes=this._rejectedSchemes||[];let t=this._approvedSchemes.find(s=>Dr.default.compare(e,s));if(t)return t.uri;if(this._rejectedSchemes.find(s=>Dr.default.compare(e,s)))return null;let n=(yield this.getSchemes({params:{uri:Dr.default.getAllUris(e).join("|")}})).find(s=>Dr.default.compare(s,e));return n?(this._approvedSchemes.push({uri:n.uri,identifier:Dr.default.getAllUris(e)}),n.uri):(this._rejectedSchemes.push({uri:e.uri,identifier:e.identifier}),null)})}getSchemes(e){return j(this,null,function*(){if(!this._api.schemes){if(Array.isArray(this.schemes))return this.schemes;throw new De}let t=yield this.axios($(R({},e),{method:"get",url:this._api.schemes,params:R($(R({},this._defaultParams),{limit:500}),e.params||{})}));return Array.isArray(this.schemes)?Nr(t.filter(i=>Dr.default.isContainedIn(i,this.schemes)),t):t})}getTop(i){return j(this,null,function*(){var n=i,{scheme:e}=n,t=J(n,["scheme"]);if(!this._api.top)throw new De;if(!e)throw new W({parameter:"scheme"});let s=yield this._getSchemeUri(e);if(!s)throw new W({parameter:"scheme",message:"Requested vocabulary seems to be unsupported by this API."});return Array.isArray(this._api.top)?this._api.top:this.axios($(R({},t),{method:"get",url:this._api.top,params:$(R($(R({},this._defaultParams),{limit:1e4}),t.params||{}),{uri:s})}))})}getConcepts(i){return j(this,null,function*(){var n=i,{concepts:e}=n,t=J(n,["concepts"]);if(this.has.data===!1)throw new De;if(!e)throw new W({parameter:"concepts"});Array.isArray(e)||(e=[e]);let s=e.map(a=>a.uri).filter(a=>a!=null);return this.axios($(R({},t),{method:"get",url:this._api.data,params:$(R($(R({},this._defaultParams),{limit:500}),t.params||{}),{uri:s.join("|")})}))})}getNarrower(i){return j(this,null,function*(){var n=i,{concept:e}=n,t=J(n,["concept"]);if(!this._api.narrower)throw new De;if(!e||!e.uri)throw new W({parameter:"concept"});return this.axios($(R({},t),{method:"get",url:this._api.narrower,params:$(R($(R({},this._defaultParams),{limit:1e4}),t.params||{}),{uri:e.uri})}))})}getAncestors(i){return j(this,null,function*(){var n=i,{concept:e}=n,t=J(n,["concept"]);if(!this._api.ancestors)throw new De;if(!e||!e.uri)throw new W({parameter:"concept"});return this.axios($(R({},t),{method:"get",url:this._api.ancestors,params:$(R($(R({},this._defaultParams),{limit:1e4}),t.params||{}),{uri:e.uri})}))})}suggest(a){return j(this,null,function*(){var u=a,{use:e="notation,label",types:t=[],sort:i="score",params:n={}}=u,s=J(u,["use","types","sort","params"]);return this._search($(R({},s),{endpoint:"suggest",params:$(R({},n),{type:t.join("|"),use:e,sort:i})}))})}search(n){return j(this,null,function*(){var s=n,{types:e=[],params:t={}}=s,i=J(s,["types","params"]);return this._search($(R({},i),{endpoint:"search",params:$(R({},t),{type:e.join("|")})}))})}vocSuggest(s){return j(this,null,function*(){var a=s,{use:e="notation,label",sort:t="score",params:i={}}=a,n=J(a,["use","sort","params"]);return this._search($(R({},n),{endpoint:"voc-suggest",params:$(R({},i),{use:e,sort:t})}))})}vocSearch(e){return j(this,null,function*(){return this._search($(R({},e),{endpoint:"voc-search"}))})}_search(l){return j(this,null,function*(){var p=l,{endpoint:e,scheme:t,search:i,limit:n,offset:s,params:a,url:u}=p,o=J(p,["endpoint","scheme","search","limit","offset","params","url"]);if(u=u!=null?u:this._api[e],!u)throw new De;if(!i)throw new W({parameter:"search"});n=n||this._jskos.suggestResultLimit||100,s=s||0;let w=t&&(yield this._getSchemeUri(t));return u=u.replace("{searchTerms}",i),this.axios($(R({},o),{params:$(R(R({},this._defaultParams),a),{limit:n,count:n,offset:s,search:i,query:i,voc:w}),method:"get",url:u}))})}getTypes(i){return j(this,null,function*(){var n=i,{scheme:e}=n,t=J(n,["scheme"]);if(!this._api.types)throw new De;if(Array.isArray(this._api.types))return this._api.types;let s=e&&(yield this._getSchemeUri(e));return s&&xe.default(t,"params.uri",s),this.axios($(R({},t),{method:"get",url:this._api.types}))})}};ir.providerName="ConceptApi";ir.providerType="http://bartoc.org/api-type/jskos";var $t=fe(He(),1);var Ss={},wr=class extends le{get _cache(){return Ss[this.uri]}_prepare(){Ss[this.uri]=[],this.has.mappings=!0,Ae.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}getMappings(s){return j(this,null,function*(){var a=s,{from:e,to:t,mode:i}=a,n=J(a,["from","to","mode"]);let u=[];Ie.default(this.schemes)&&(u=this.schemes);let o,l,p=re.default(e,"inScheme[0]"),w=re.default(t,"inScheme[0]"),b,q;if(!e||$t.default.isContainedIn(p,u)?(o=!0,l=t,b=w,q=u.find(O=>$t.default.compare(O,p))||u[0]):(o=!1,l=e,b=p,q=u.find(O=>$t.default.compare(O,w))||u[0]),i!="or")return[];if(!this._api.api)throw new De;if(!l)throw new W({parameter:o?"to":"from"});let y=$t.default.languagePreference.selectLanguage(l.prefLabel);if(!y)throw new W({parameter:o?"to":"from",message:"Missing language"});let P=re.default(l,`altLabel.${y}`,[]);be.default(P)&&(P=[P]);let H=re.default(l,`prefLabel.${y}`),K=P.concat([H]);K=[H];let{url:Q,data:F}=yield this._getReconciliationResults($(R({},n),{labels:K,language:y}));F=[].concat(...Object.values(F).map(O=>O.result)).filter(O=>O),F=F.sort((O,ee)=>O.score!=ee.score?ee.score-O.score:O.match!=ee.match?O.match?-1:1:O.id.length-ee.id.length);let Z=re.default(q,"namespace",""),te=F.map(O=>({fromScheme:b,from:{memberSet:[l]},toScheme:q,to:{memberSet:[{uri:Z+O.id}]},type:[O.match?"http://www.w3.org/2004/02/skos/core#exactMatch":O.score>=80?"http://www.w3.org/2004/02/skos/core#closeMatch":"http://www.w3.org/2004/02/skos/core#mappingRelation"]}));return o&&(te=te.map(O=>Object.assign(O,{fromScheme:O.toScheme,from:O.to,toScheme:O.fromScheme,to:O.from}))),te._url=Q,te})}_getReconciliationResults(n){return j(this,null,function*(){var s=n,{labels:e,language:t}=s,i=J(s,["labels","language"]);e=e.sort();let a=this._cache.find(q=>rr.default(q.labels,e)&&q.language==t);if(a)return a;let u={},o=0;for(let q of e)u[`q${o}`]={query:q},o+=1;let l=this._api.api;t&&(l=l.replace("{language}",t));let p=`queries=${encodeURIComponent(JSON.stringify(u))}`;xe.default(i,["headers","Content-Type"],"application/x-www-form-urlencoded");let w=yield this.axios($(R({},i),{method:"post",url:l,data:p}));w=w||{};let b={labels:e,language:t,data:w,url:`${l}${l.includes("?")?"&":"?"}${p}`};return this._cache.push(b),this._cache.length>20&&(Ss[this.uri]=this._cache.slice(this._cache.length-20)),b})}};wr.providerName="ReconciliationApi";wr.stored=!1;var lt=fe(He(),1);var br=class extends le{_prepare(){this._cache=[],this.has.mappings=!0,Ae.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}supportsScheme(e){return super.supportsScheme(e)&&re.default(e,"_registry.has.search",!1)}getMappings(u){return j(this,null,function*(){var o=u,{from:e,to:t,mode:i,selected:n,limit:s=10}=o,a=J(o,["from","to","mode","selected","limit"]);if(i!="or")return[];if(!n)throw new W({parameter:"selected"});let l=[];e&&this.supportsScheme(n.scheme[!1])?l.push(this._getMappings($(R({},a),{concept:e,sourceScheme:n.scheme[!0],targetScheme:n.scheme[!1],limit:s}))):l.push(Promise.resolve([])),t&&this.supportsScheme(n.scheme[!0])?l.push(this._getMappings($(R({},a),{concept:t,sourceScheme:n.scheme[!1],targetScheme:n.scheme[!0],limit:s,swap:!0}))):l.push(Promise.resolve([]));let[p,w]=yield Promise.all(l);for(w=w.filter(b=>!p.find(q=>lt.default.compareMappingMembers(b,q)));p.length+w.length>s;)w.length>=p.length?w=w.slice(0,-1):p=p.slice(0,-1);return rs.default(p,w)})}_getMappings(u){return j(this,null,function*(){var o=u,{concept:e,sourceScheme:t,targetScheme:i,limit:n,swap:s=!1}=o,a=J(o,["concept","sourceScheme","targetScheme","limit","swap"]);if(!e||!t||!i)return[];if(lt.default.compare(t,i))return[];let l=lt.default.languagePreference.selectLanguage(e.prefLabel)||this._defaultLanguages[0],p=lt.default.prefLabel(e,{fallbackToUri:!1,language:l});if(!p)return[];let w=/^[\s\wäüöÄÜÖß]*\w/.exec(p);p=w?w[0]:p;let q=(yield this._getResults($(R({},a),{label:p,targetScheme:i,limit:n}))).map(y=>({fromScheme:t,from:{memberSet:[e]},toScheme:i,to:{memberSet:[y]},type:["http://www.w3.org/2004/02/skos/core#mappingRelation"]}));return s&&(q=q.map(y=>Object.assign(y,{fromScheme:y.toScheme,from:y.to,toScheme:y.fromScheme,to:y.from}))),q})}_getResults(s){return j(this,null,function*(){var a=s,{label:e,targetScheme:t,limit:i}=a,n=J(a,["label","targetScheme","limit"]);var w;let u=(this._cache[t.uri]||{})[e];if(u&&u._limit>=i)return u;let o=re.default(t,"_registry");if(!o||o.has.search===!1)return[];let l=(w=(this._jskos.overrides||[]).find(b=>lt.default.compare(b,t)))==null?void 0:w.search,p=yield o.search($(R({},n),{url:l,search:e,scheme:t,limit:i}));return this._cache[t.uri]||(this._cache[t.uri]={}),this._cache[t.uri][e]=p,this._cache[t.uri][e]._limit=i,p})}};br.providerName="LabelSearchSuggestion";br.stored=!1;var je=fe(He(),1);var xr=class extends le{_prepare(){this.has.schemes=!0,this.has.top=!0,this.has.data=!0,this.has.concepts=!0,this.has.narrower=!0,this.has.ancestors=!0,this.has.types=!0,this.has.suggest=!0,this.has.search=!0,Ae.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}static _registryConfigForBartocApiConfig({url:e,scheme:t}={}){if(!e||!t)return null;let i={},n=e.match(/(.+\/)([^/]+)\/$/);return n?(i.api=n[1]+"rest/v1/",t.VOCID=n[2],i.schemes=[t],i):null}get _language(){return this.languages[0]||this._defaultLanguages[0]||"en"}_getApiUrl(e,t,i){let n=e&&e.VOCID||re.default(this.schemes.find(a=>je.default.compare(a,e)),"VOCID");if(!n)throw new W({parameter:"scheme",message:"Missing scheme or VOCID property on scheme"});t=t||"",i=i||{},i.lang||(i.lang=this._language);let s=Object.keys(i).map(a=>`${a}=${encodeURIComponent(i[a])}`).join("&");return`${this._api.api}${n}${t}${s?"?"+s:""}`}_getDataUrl(e,{addFormatParameter:t=!0}={}){let i=re.default(e,"inScheme[0]");if(!e||!e.uri)throw new W({parameter:"concept",message:"Missing concept URI"});return this._getApiUrl(i,"/data",t?{format:"application/json"}:{})}_getSchemeUri(e){return j(this,null,function*(){this._approvedSchemes=this._approvedSchemes||[],this._rejectedSchemes=this._rejectedSchemes||[];let t=this._approvedSchemes.find(a=>je.default.compare(e,a));if(t)return t.uri;if(this._rejectedSchemes.find(a=>je.default.compare(e,a)))return null;let i=this._getApiUrl(e,"/"),s=(yield this.axios({method:"get",url:i})).conceptschemes.find(a=>je.default.compare(a,e));return s?(this._approvedSchemes.push({uri:s.uri,identifier:je.default.getAllUris(e)}),s.uri):(this._rejectedSchemes.push({uri:e.uri,identifier:e.identifier}),null)})}_toJskosConcept(e,{concept:t,scheme:i,result:n,language:s}={}){if(!e)return null;t=je.default.deepCopy(t||{}),s=s||e.lang||"en",t.uri=e.uri,i&&(t.inScheme=[i]);let a=e.matchedPrefLabel||e.prefLabel||e.label;if(be.default(a))xe.default(t,`prefLabel.${s}`,a);else{a&&!Ie.default(a)&&(a=[a]);for(let l of a||[])xe.default(t,`prefLabel.${l.lang}`,l.value)}let u=e.altLabel;if(be.default(u))xe.default(t,`altLabel.${s}`,[u]);else{u&&!Ie.default(u)&&(u=[u]);for(let l of u||[])re.default(t,`altLabel.${l.lang}`)?(t.altLabel[l.lang].push(l.value),t.altLabel[l.lang]=gr.default(t.altLabel[l.lang])):xe.default(t,`altLabel.${l.lang}`,[l.value])}let o=e.notation||e["skos:notation"]||je.default.notation(t);o&&(t.notation=[o.value||o]),e.broader&&(Ie.default(e.broader)||(e.broader=[e.broader]),t.broader=e.broader.map(l=>be.default(l)?{uri:l}:l)),e.hasChildren===!0?t.narrower=[null]:e.hasChildren===!1&&(t.narrower=[]),e.type&&!Ie.default(e.type)&&(e.type=[e.type]),t.type=t.type||[];for(let l of e.type||[]){if(!je.default.isValidUri(l))continue;let p=l.slice(0,l.indexOf(":"));n&&n["@context"]&&n["@context"][p]&&(l=l.replace(p+":",n["@context"][p])),t.type.push(l)}return t.type=gr.default(t.type),t.type.length||(t.type=["http://www.w3.org/2004/02/skos/core#Concept"]),t}getSchemes(t){return j(this,null,function*(){var e=J(t,[]);let i=[];for(let n of this.schemes||[]){let s=this._getApiUrl(n,"/"),u=(yield this.axios($(R({},e),{method:"get",url:s}))).conceptschemes.find(l=>je.default.compare(l,n)),o=u&&(u.prefLabel||u.label||u.title);o&&xe.default(n,`prefLabel.${this._language}`,o),i.push(n),this._approvedSchemes=this._approvedSchemes||[],this._approvedSchemes.find(l=>je.default.compare(n,l))||this._approvedSchemes.push({uri:u.uri,identifier:je.default.getAllUris(n)})}return i})}getTop(i){return j(this,null,function*(){var n=i,{scheme:e}=n,t=J(n,["scheme"]);let s=this._getApiUrl(e,"/topConcepts"),a=yield this._getSchemeUri(e);if(!a)throw new W({parameter:"scheme",message:"Missing or unsupported scheme or VOCID property on scheme"});xe.default(t,"params.scheme",a);let u=yield this.axios($(R({},t),{method:"get",url:s})),o=[];for(let l of u.topconcepts||[]){let p=this._toJskosConcept(l,{scheme:e,language:this._language});p.topConceptOf=[e],o.push(p)}return o})}getConcepts(i){return j(this,null,function*(){var n=i,{concepts:e}=n,t=J(n,["concepts"]);Ie.default(e)||(e=[e]),e=e.map(a=>({uri:a.uri,inScheme:a.inScheme}));let s=[];for(let a of e){let u=this._getDataUrl(a,{addFormatParameter:!1});if(!u)continue;let o=yield this.axios($(R({},t),{method:"get",url:u,params:{uri:a.uri,format:"application/json"}})),l=o&&o.graph&&o.graph.find(p=>je.default.compare(p,a));if(l){let p=this._toJskosConcept(l,{concept:a,result:o});for(let w of["broader","narrower"]){let b=l[w]||p[w];b&&!Ie.default(b)&&(b=[b]),b||(b=[]),p[w]=b.map(q=>this._toJskosConcept(o.graph.find(y=>je.default.compare(y,q)),{scheme:a.inScheme[0],result:o}))}p.ancestors=[],s.push(p)}}return s})}getNarrower(i){return j(this,null,function*(){var n=i,{concept:e}=n,t=J(n,["concept"]);if(!e||!e.uri)throw new W({parameter:"concept"});let s=e.inScheme[0],a=this._getApiUrl(s,"/children");return xe.default(t,"params.uri",e.uri),((yield this.axios($(R({},t),{method:"get",url:a}))).narrower||[]).map(l=>this._toJskosConcept(l,{scheme:s}))})}getAncestors(i){return j(this,null,function*(){var n=i,{concept:e}=n,t=J(n,["concept"]);if(!e||!e.uri)throw new W({parameter:"concept"});let s=e.inScheme[0],a=this._getApiUrl(s,"/broaderTransitive");xe.default(t,"params.uri",e.uri);let u=yield this.axios($(R({},t),{method:"get",url:a})),o=[],l=e.uri;for(;l;){if(l!=e.uri){let w=re.default(u,`broaderTransitive["${l}"]`);o=o.concat([w])}l=re.default(u,`broaderTransitive["${l}"].broader[0]`)}return o.map(w=>this._toJskosConcept(w,{scheme:s})).filter(w=>w.uri!=e.uri)})}suggest(e){return j(this,null,function*(){e._raw=!0;let t=yield this.search(e),i=[e.search,[],[],[]];for(let n of t){let s=je.default.notation(n),a=je.default.prefLabel(n);i[1].push((s?s+" ":"")+a),i[2].push(""),i[3].push(n.uri)}return t._totalCount!=null?i._totalCount=t._totalCount:i._totalCount=t.length,i})}search(a){return j(this,null,function*(){var u=a,{search:e,scheme:t,limit:i,types:n=[]}=u,s=J(u,["search","scheme","limit","types"]);let o=this._getApiUrl(t,"/search");return xe.default(s,"params.query",`${e}*`),xe.default(s,"params.unique",1),xe.default(s,"params.maxhits",i||100),xe.default(s,"params.type",n.join(" ")),((yield this.axios($(R({},s),{method:"get",url:o}))).results||[]).map(w=>this._toJskosConcept(w,{scheme:t}))})}getTypes(i){return j(this,null,function*(){var n=i,{scheme:e}=n,t=J(n,["scheme"]);let s=this._getApiUrl(e,"/types"),a=[],u=yield this.axios($(R({},t),{method:"get",url:s}));for(let o of u&&u.types||[])o.uri!="http://www.w3.org/2004/02/skos/core#Concept"&&(o.label&&(o.prefLabel={[u["@context"]["@language"]]:o.label},delete o.label),a.push(o));return a._url=s,a})}};xr.providerName="SkosmosApi";xr.providerType="http://bartoc.org/api-type/skosmos";var fr=fe(He(),1),Ni=fe(ii(),1);var Di="http://id.loc.gov/authorities/",Ui=[{uri:`${Di}subjects`,identifier:["http://bartoc.org/en/node/454"],notation:["LCSH"],concepts:[null],topConcepts:[]},{uri:`${Di}names`,identifier:["http://bartoc.org/en/node/18536"],notation:["LCNAF"],concepts:[null],topConcepts:[]}],fd=`${Di}classification`;function cd(r){let e={};e.uri=r["@id"],e.notation=(r["http://www.loc.gov/mads/rdf/v1#code"]||[]).map(n=>n["@value"]);let t=r["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]||r["http://www.w3.org/2000/01/rdf-schema#label"]||[];t.length&&(e.prefLabel={},e.prefLabel[t[0]["@language"]||"en"]=t[0]["@value"]);let i=r["http://www.w3.org/2004/02/skos/core#altLabel"]||[];i.length&&(e.altLabel={en:i.map(n=>n["@value"])});for(let n of r["http://www.w3.org/2000/01/rdf-schema#comment"]||[])e.definition=e.definition||{},e.definition.en=e.definition.en||[],e.definition.en.push(n["@value"]);return e}function _E(r){let e=cd(r);return e.namespace=e.uri+"/",e.type=["http://www.w3.org/2004/02/skos/core#ConceptScheme"],e}var As=r=>e=>!e||!r||!r.namespace?!0:e.uri.startsWith(r.namespace);function wE(r,{scheme:e}){let t=cd(r);t.type=["http://www.w3.org/2004/02/skos/core#Concept"],t.inScheme=e?[e]:(r["http://www.loc.gov/mads/rdf/v1#isMemberOfMADSScheme"]||[]).map(s=>Ui.find(a=>a.uri===s["@id"])),(!t.inScheme.length||!t.inScheme[0])&&delete t.inScheme;let i=r["http://www.loc.gov/mads/rdf/v1#hasNarrowerAuthority"]||fr.default.compare(t.inScheme[0],{uri:fd})&&r["http://www.loc.gov/mads/rdf/v1#hasMADSCollectionMember"]||[];t.narrower=i.map(s=>({uri:s["@id"]})).filter(As(t.inScheme&&t.inScheme[0]));let n=r["http://www.loc.gov/mads/rdf/v1#hasBroaderAuthority"]||fr.default.compare(t.inScheme[0],{uri:fd})&&r["http://www.loc.gov/mads/rdf/v1#isMemberOfMADSCollection"]||[];return t.broader=n.map(s=>({uri:s["@id"]})).filter(As(t.inScheme&&t.inScheme[0])),t}var Sr=class extends le{_prepare(){this.has.schemes=!0,this.has.top=!1,this.has.data=!0,this.has.concepts=!0,this.has.narrower=!1,this.has.ancestors=!1,this.has.suggest=!0,this.has.search=!0,Ae.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}static _registryConfigForBartocApiConfig({scheme:e}={}){return!e||!Ui.find(t=>fr.default.compare(t,e))?null:{schemes:[e]}}getSchemes(){return j(this,null,function*(){let e=[];for(let t of yield Promise.all(Ui.filter(i=>!this.schemes||!this.schemes.length||this.schemes.find(n=>fr.default.compare(i,n))).map(i=>(0,Ni.default)({method:"get",url:`${i.uri.replace("http:","https:")}.json`}).then(({status:n,data:s})=>{if(n===200){let a=s.find(u=>i.uri===u["@id"]);if(a)return a=fr.default.merge(_E(a),i),a.topConcepts=(a.topConcepts||[]).filter(u=>u),a}return null}))))t&&e.push(t);return e})}getConcepts(t){return j(this,arguments,function*({concepts:e}){Array.isArray(e)||(e=[e]);let i=[];for(let n of yield Promise.all(e.map(s=>(0,Ni.default)({method:"get",url:`${s.uri.replace("http:","https:")}.json`}).then(({status:a,data:u})=>{if(a===200){let o=u.find(l=>s.uri===l["@id"]);return o?wE(o,{scheme:s.inScheme&&s.inScheme[0]}):null}}))))n&&i.push(n);return i})}suggest(e){return j(this,null,function*(){let t=yield this.search(e);return[e.search,t.map(i=>fr.default.prefLabel(i,{fallbackToUri:!0})),[],t.map(i=>i.uri)]})}search(s){return j(this,arguments,function*({search:e,scheme:t,limit:i,offset:n}){let a=fr.default.getAllUris(t).find(o=>o.startsWith(Di));if(!a||!Ui.find(o=>fr.default.compare(o,{uri:a})))throw new W({parameter:"scheme",message:"provided scheme is not supported (yet)"});if(!e)throw new W({parameter:"search",message:"parameter is empty or missing"});i=i||this._jskos.suggestResultLimit||100,n=n||0;let{data:u}=yield(0,Ni.default)({method:"get",url:`${a}/suggest2`.replace("http:","https:"),params:{q:e,count:i||100,offset:n,searchtype:"keyword"}});return(u.hits||[]).map(o=>({uri:o.uri,notation:[o.token],prefLabel:{en:o.aLabel},inScheme:[t]})).filter(As(t))})}};Sr.providerName="LocApi";Sr.providerType="http://bartoc.org/api-type/loc";var Br=fe(He(),1),hd=fe(qs(),1);function Fi(r){return r.replace(/\\u[\dA-F]{4}/gi,function(e){return String.fromCharCode(parseInt(e.replace(/\\u/g,""),16))})}var Fr={},Ar=class extends le{_prepare(){this.has.schemes=!0,this.has.top=!0,this.has.data=!0,this.has.concepts=!0,this.has.narrower=!0,this.has.ancestors=!0,this.has.suggest=!0,this.has.search=!0,Ae.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1}),Fr[this.uri]={index:{},conceptCache:{},schemeCache:{}}}get _index(){return Fr[this.uri]&&Fr[this.uri].index}get _conceptCache(){return Fr[this.uri]&&Fr[this.uri].conceptCache}get _schemeCache(){return Fr[this.uri]&&Fr[this.uri].schemeCache}static _registryConfigForBartocApiConfig({url:e,scheme:t}={}){return!e||!t?null:{schemes:[{uri:e,identifier:Br.default.getAllUris(t).filter(n=>n!==e)}]}}_loadScheme(i){return j(this,null,function*(){var n=i,{scheme:e}=n,t=J(n,["scheme"]);let s=Br.default.getAllUris(e);for(let y of s)if(this._schemeCache[y])return this._schemeCache[y];let a=this.schemes.find(y=>Br.default.compare(y,e));if(!a||!a.uri)throw new Qe({message:`Tried to load unsupported scheme (${e&&e.uri})`});let u=a.uri;s=gr.default(s.concat(Br.default.getAllUris(a)));let o=".json";u.endsWith("/")&&(o="index.json");let l=yield this.axios($(R({},t),{url:`${u}${o}`,_skipAdditionalParameters:!0}));if(l.id!==u)throw new Qe({message:"Skohub URL did not return expected concept scheme"});let{title:p,preferredNamespaceUri:w,hasTopConcept:b,description:q}=l;e={uri:u,identifier:s.filter(y=>y!==u)},e.prefLabel=p,Object.keys(e.prefLabel||{}).forEach(y=>{e.prefLabel[y]=Fi(e.prefLabel[y])}),e.namespace=w,e.topConcepts=(b||[]).map(y=>this._toJskosConcept(y)),e.concepts=[null],q&&(e.definition=q,Object.keys(e.definition).forEach(y=>{e.definition[y]=[Fi(e.definition[y])]}));for(let y of Object.keys(e).filter(P=>!e[P]))delete e[y];for(let y of s)this._schemeCache[y]=e;return e})}_loadConcept(i){return j(this,null,function*(){var n=i,{uri:e}=n,t=J(n,["uri"]);if(this._conceptCache[e])return this._conceptCache[e];try{let s=yield this.axios($(R({},t),{url:`${e}.json`,_skipAdditionalParameters:!0}));if(s.id!==e)throw new Qe({message:"Skohub URL did not return expected concept URI"});let a=this._toJskosConcept(s);return this._conceptCache[e]=a,a}catch(s){return null}})}_toJskosConcept(e){let t={uri:e.id};return t.prefLabel=e.prefLabel,Object.keys(t.prefLabel||{}).forEach(i=>{t.prefLabel[i]=Fi(t.prefLabel[i])}),t.narrower=(e.narrower||[]).map(i=>this._toJskosConcept(i)),t.notation=e.notation||[],e.broader&&e.broader.id&&(t.broader=[{uri:e.broader.id}]),e.inScheme&&e.inScheme.id&&(t.inScheme=[{uri:e.inScheme.id}]),e.scopeNote&&(t.scopeNote=e.scopeNote,Object.keys(t.scopeNote).forEach(i=>{t.scopeNote[i]=[Fi(t.scopeNote[i])]})),t}getSchemes(t){return j(this,null,function*(){var e=J(t,[]);return Promise.all(this.schemes.map(i=>this._loadScheme($(R({},e),{scheme:i}))))})}getTop(i){return j(this,null,function*(){var n=i,{scheme:e}=n,t=J(n,["scheme"]);if(!e||!e.uri)throw new W({parameter:"scheme",message:"Missing scheme URI"});return e=yield this._loadScheme(R({scheme:e},t)),e.topConcepts||[]})}getConcepts(i){return j(this,null,function*(){var n=i,{concepts:e}=n,t=J(n,["concepts"]);return Ie.default(e)||(e=[e]),(yield Promise.all(e.map(({uri:s})=>this._loadConcept($(R({},t),{uri:s}))))).filter(Boolean)})}getAncestors(i){return j(this,null,function*(){var n=i,{concept:e}=n,t=J(n,["concept"]);if(!e||!e.uri)throw new W({parameter:"concept"});if(e.ancestors&&e.ancestors[0]!==null)return e.ancestors;if(e=yield this._loadConcept($(R({},t),{uri:e.uri})),!e||!e.broader||!e.broader.length)return[];let s=e.broader[0];return[s].concat(yield this.getAncestors(R({concept:s},t))).map(a=>({uri:a.uri}))})}getNarrower(i){return j(this,null,function*(){var n=i,{concept:e}=n,t=J(n,["concept"]);if(!e||!e.uri)throw new W({parameter:"concept"});return e.narrower&&e.narrower[0]!==null||(e=yield this._loadConcept($(R({},t),{uri:e.uri}))),e.narrower})}search(n){return j(this,arguments,function*({search:e,scheme:t,limit:i=100}){if(t=yield this._loadScheme({scheme:t}),!t||!t.uri)throw new W({parameter:"scheme"});if(!e)throw new W({parameter:"search"});let s;this._index[t.uri]||(this._index[t.uri]={});for(let o of[""].concat(this.languages)){if(this._index[t.uri][o]){s=this._index[t.uri][o];break}if(this._index[t.uri][o]!==null)try{let l=o?`.${o}.index`:".index";t.uri.endsWith("/")&&(l=`index${l}`);let p=yield this.axios({url:`${t.uri}${l}`,_skipAdditionalParameters:!0});if(p.length<100){this._index[t.uri][o]=null;continue}s=hd.default.create(),s.import(p),this._index[t.uri][o]=s;break}catch(l){this._index[t.uri][o]=null}}if(!s)throw new Qe({message:"Could not find search index for any of the available languages "+this.languages.join(",")});let a=s.search(e);return(yield this.getConcepts({concepts:a.map(o=>({uri:o}))})).slice(0,i)})}suggest(e){return j(this,null,function*(){e._raw=!0;let t=yield this.search(e),i=[e.search,[],[],[]];for(let n of t){let s=Br.default.notation(n),a=Br.default.prefLabel(n);i[1].push((s?s+" ":"")+a),i[2].push(""),i[3].push(n.uri)}return t._totalCount!=null?i._totalCount=t._totalCount:i._totalCount=t.length,i})}};Ar.providerName="Skohub";Ar.providerType="http://bartoc.org/api-type/skohub";var zt=fe(He(),1),pd=fe(qs(),1);var $e={},Or=class extends le{_prepare(){this.has.schemes=!0,this.has.top=!0,this.has.data=!0,this.has.concepts=!0,this.has.narrower=!0,this.has.ancestors=!0,this.has.suggest=!0,this.has.search=!0,Ae.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}_setup(){this._scheme=null}static _registryConfigForBartocApiConfig({url:e,scheme:t}={}){return!e||!t?null:{api:e}}_schemeInfoToJSKOS(e){let t=e.labels.find(s=>s.lang==="x-uri").text,i={};e.labels.filter(s=>!s.lang.startsWith("x-")).forEach(s=>{i[s.lang]=s.text});let n={uri:t,prefLabel:i};return e.categories&&e.categories.length&&(n.topConcepts=[null]),e.category&&e.category.length&&(n.concepts=[null]),n}_categoryToJSKOS(e,{scheme:t,broader:i=[]}){if(!e||!t)return null;let n=e.ID,s=`${t.uri}/${n}`;if($e[t.uri].concepts[s])return $e[t.uri].concepts[s];let a={};e.labels.filter(o=>!o.lang.startsWith("x-")&&o.text).forEach(o=>{a[o.lang]=o.text.replace(`${n} `,""),$e[t.uri].searchIndex.add(s,a[o.lang])});let u={};return e.labels.filter(o=>!o.lang.startsWith("x-")&&o.description).forEach(o=>{u[o.lang]||(u[o.lang]=[]),u[o.lang].push(o.description)}),$e[t.uri].concepts[s]={uri:s,notation:[n],prefLabel:a,scopeNote:u,inScheme:[{uri:t.uri}],narrower:(e.categories||[]).map(o=>({uri:`${t.uri}/${o.ID}`})),broader:i},$e[t.uri].concepts[s]}_removeNarrower(e){return e&&Object.assign({},e,{narrower:e.narrower&&e.narrower.length?[null]:[]})}_loadSchemeData(e){return j(this,null,function*(){let t=yield this.axios($(R({},e),{method:"get",url:this._api.api,_skipAdditionalParameters:!0}));this._scheme=this._schemeInfoToJSKOS(t);let i=this._scheme.uri;$e[i]={schemeInfo:t,searchIndex:pd.default.create({tokenize:"full"}),concepts:{}};let n=(s,{broader:a=[]}={})=>{let u=this._categoryToJSKOS(s,{scheme:this._scheme,broader:a});(s.categories||[]).forEach(o=>n(o,{broader:[{uri:u.uri}]}))};t.categories.forEach(s=>n(s)),$e[i].topConcepts=t.categories.map(s=>this._categoryToJSKOS(s,{scheme:this._scheme}))})}getSchemes(){return j(this,arguments,function*(e={}){if(!this._api.api)throw new De;return this._scheme||(this._loadSchemeDataPromise||(this._loadSchemeDataPromise=this._loadSchemeData(e)),yield this._loadSchemeDataPromise),[this._scheme]})}getTop(i){return j(this,null,function*(){var n=i,{scheme:e}=n,t=J(n,["scheme"]);if(!e||!e.uri)throw new W({parameter:"scheme",message:"Missing scheme URI"});if(this._scheme||(yield this.getSchemes(t)),!zt.default.compare(e,this._scheme))throw new W({parameter:"scheme",message:"Requested vocabulary seems to be unsupported by this API."});return $e[this._scheme.uri].topConcepts.map(this._removeNarrower)})}getConcepts(i){return j(this,null,function*(){var n=i,{concepts:e}=n,t=J(n,["concepts"]);return Ie.default(e)||(e=[e]),this._scheme||(yield this.getSchemes(t)),e.map(s=>$e[this._scheme.uri].concepts[s.uri]).map(this._removeNarrower)})}getAncestors(i){return j(this,null,function*(){var n=i,{concept:e}=n,t=J(n,["concept"]);if(!e||!e.uri)throw new W({parameter:"concept"});if(e.ancestors&&e.ancestors[0]!==null)return e.ancestors;this._scheme||(yield this.getSchemes(t)),e=$e[this._scheme.uri].concepts[e.uri];let s=e&&e.broader&&e.broader[0];return s?[s].concat(yield this.getAncestors(R({concept:s},t))):[]})}getNarrower(i){return j(this,null,function*(){var n=i,{concept:e}=n,t=J(n,["concept"]);if(!e||!e.uri)throw new W({parameter:"concept"});return e.narrower&&e.narrower[0]!==null?e.narrower:(this._scheme||(yield this.getSchemes(t)),e=$e[this._scheme.uri].concepts[e.uri],(e&&e.narrower||[]).map(s=>$e[this._scheme.uri].concepts[s.uri]).map(this._removeNarrower))})}search(n){return j(this,arguments,function*({search:e,scheme:t,limit:i=100}){if(!t||!t.uri)throw new W({parameter:"scheme"});if(!e)throw new W({parameter:"search"});if(!t||!t.uri)throw new W({parameter:"scheme",message:"Missing scheme URI"});if(this._scheme||(yield this.getSchemes()),!zt.default.compare(t,this._scheme))throw new W({parameter:"scheme",message:"Requested vocabulary seems to be unsupported by this API."});return(yield $e[this._scheme.uri].searchIndex.search(e)).map(a=>$e[this._scheme.uri].concepts[a]).map(this._removeNarrower).slice(0,i)})}suggest(e){return j(this,null,function*(){e._raw=!0;let t=yield this.search(e),i=[e.search,[],[],[]];for(let n of t){let s=zt.default.notation(n),a=zt.default.prefLabel(n);i[1].push((s?s+" ":"")+a),i[2].push(""),i[3].push(n.uri)}return t._totalCount!=null?i._totalCount=t._totalCount:i._totalCount=t.length,i})}};Or.providerName="MyCoRe";Or.providerType="http://bartoc.org/api-type/mycore";var nr={[le.providerName]:le,init(r){if(this[r.provider])return new this[r.provider](r);throw new Wr},addProvider(r){if(r.prototype instanceof le||r===le)this[r.providerName]=r;else throw new Wr}};nr.addProvider(ir);nr.addProvider(tr);Object.values(Wt).forEach(r=>{nr.addProvider(r)});var Cs={},Cr=class{constructor(e){this.config=e,this.axios=dd.default.create()}setConfig(e){this.config=e}get config(){return this._config}set config(e){e=e||{},e.registries=e.registries||[],e.registries=e.registries.map(t=>nr.init(t)).filter(t=>t),e.registries.forEach(t=>{t.cdk=this}),this._config=e}get providers(){return nr}createInstance(e){return new Cr(e)}loadConfig(e){return j(this,null,function*(){let t=yield this.axios.get(e);this.config=t.data})}loadBuildInfo(a){var u=a,{url:e,buildInfo:t=null,interval:i=6e4,callback:n}=u,s=J(u,["url","buildInfo","interval","callback"]);if(!e&&!this.config.cocodaBaseUrl)throw new Ee({message:"Could not determine URL to load build config."});return e||(e=`${this.config.cocodaBaseUrl}build-info.json`),this.repeat($(R({},s),{function:()=>j(this,null,function*(){return(yield this.axios.get(e,{headers:{"Cache-Control":"no-cache"}})).data}),interval:i,callback:(o,l,p)=>{o?n(o):(p||!p&&t&&!rr.default(l,t))&&n(null,l,p||t)}}))}getRegistryForUri(e){return this.config.registries.find(t=>t.uri==e)}initializeRegistry(e){return e=nr.init(e),e.cdk=this,e}addProvider(e){nr.addProvider(e)}static addProvider(e){nr.addProvider(e)}repeat({function:e,interval:t=15e3,callback:i,callImmediately:n=!0}={}){if(!e)throw new W({parameter:"function"});if(typeof e!="function")throw new W({parameter:"function",message:"function needs to be a function"});let s=()=>j(this,null,function*(){return e()});if(t=parseInt(t),isNaN(t))throw new W({parameter:"interval"});if(!i)throw new W({parameter:"callback"});if(typeof i!="function")throw new W({parameter:"callback",message:"callback needs to be a function"});let a={timer:null,result:null,error:null,isPaused:!1,interval:t},u=b=>{let q=a.result;rr.default(q,b)||(a.result=b,a.error=null,i(null,b,q))},o=b=>{a.error=b,i(b)},l=b=>{a.isPaused||(a.timer=setTimeout(()=>{b()},a.interval))},p=()=>s().then(u).catch(o).then(()=>l(p)),w=(b=n)=>{b?p():l(p)};return w(),{start:(...b)=>{a.isPaused=!1,w(...b)},stop:()=>{a.isPaused=!0,a.timer?clearTimeout(a.timer):setTimeout(()=>{a.timer&&clearTimeout(a.timer)},a.interval)},get isPaused(){return a.isPaused},get lastResult(){return a.result},get hasErrored(){return!!a.error},get interval(){return a.interval},set interval(b){a.interval=b}}}getSchemes(){return j(this,arguments,function*(e={}){let t=[],i=[];for(let n of this.config.registries)if(n.has.schemes!==!1){let s=n.getSchemes(e).then(a=>{for(let u of a){u._registry=n,u.__DETAILSLOADED__=1,u.type=u.type||["http://www.w3.org/2004/02/skos/core#ConceptScheme"];let o=t.find(b=>qr.default.compare(b,u)),l,p,w=!1;if(o){l=this.config.registries.indexOf(n),l!=-1&&(l=this.config.registries.length-l),p=this.config.registries.indexOf(re.default(o,"_registry")),p!=-1&&(p=this.config.registries.length-p);let b=u.concepts?u.concepts.length==0?-1:1:0,q=o.concepts?o.concepts.length==0?-1:1:0;b>q?w=!0:b<q?w=!1:w=p<l}if(!o||w){if(w){let b=t.findIndex(q=>qr.default.compare(q,o));b!=-1&&t.splice(b,1),u=qr.default.merge(u,ar.default(o,["concepts","topConcepts"]),{mergeUris:!0,skipPaths:["_registry"]})}u._registry=n,t.push(u)}else{let b=t.findIndex(q=>qr.default.compare(q,u));if(b!=-1){let q=t[b]._registry;t[b]=qr.default.merge(t[b],ar.default(u,["concepts","topConcepts"]),{mergeUris:!0,skipPaths:["_registry"]}),t[b]._registry=q}}}}).catch(a=>{console.warn("Couldn't load schemes for registry",n.uri,a)});i.push(s)}return yield Promise.all(i),t.forEach(n=>{let s=n._registry;delete n._registry;let a=this.registryForScheme(n);!a||a._api.api===s._api.api?n._registry=s:n._registry=a}),qr.default.sortSchemes(t.filter(Boolean))})}registryForScheme(e){let t=e._registry;if(t)return t;for(let i of e.API||[]){let n=i,{type:s}=n,a=J(n,["type"]);let u=a.url;if(Cs[u]){let o=Cs[u];return Array.isArray(o._jskos.schemes)&&!qr.default.isContainedIn(e,o._jskos.schemes)&&o._jskos.schemes.push(e),o}else{let o=Object.values(nr).find(p=>p.providerType===s);if(!o||!o._registryConfigForBartocApiConfig)continue;let l=o.providerName;if(a.scheme=e,a=nr[l]._registryConfigForBartocApiConfig(a),!a)continue;a.provider=l;try{if(t=this.initializeRegistry(a),t)return Cs[u]=t,t}catch(p){continue}}}return null}};var md=new Cr;function bE(r){Object.values(Wt).forEach(e=>(r||md).addProvider(e))}return am(xE);})();
|
|
13
13
|
/*!
|
|
14
14
|
localForage -- Offline Storage, Improved
|
|
15
15
|
Version 1.10.0
|