@sfgrp/distinguish 0.3.2 → 0.4.0
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/distinguish.es.js +923 -877
- package/dist/distinguish.umd.js +5 -5
- package/dist/style.css +1 -1
- package/package.json +13 -12
package/dist/distinguish.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(function(O,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","vue","pinia"],n):(O=typeof globalThis<"u"?globalThis:O||self,n(O.Distinguish={},O.Vue,O.Pinia))})(this,function(O,n,Q){"use strict";function xe(e,t){return function(){return e.apply(t,arguments)}}const{toString:St}=Object.prototype,{getPrototypeOf:de}=Object,Y=(e=>t=>{const r=St.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),x=e=>(e=e.toLowerCase(),t=>Y(t)===e),Z=e=>t=>typeof t===e,{isArray:j}=Array,H=Z("undefined");function Bt(e){return e!==null&&!H(e)&&e.constructor!==null&&!H(e.constructor)&&T(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Oe=x("ArrayBuffer");function Ct(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Oe(e.buffer),t}const Nt=Z("string"),T=Z("function"),De=Z("number"),v=e=>e!==null&&typeof e=="object",Rt=e=>e===!0||e===!1,ee=e=>{if(Y(e)!=="object")return!1;const t=de(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Tt=x("Date"),xt=x("File"),Ot=x("Blob"),Dt=x("FileList"),Vt=e=>v(e)&&T(e.pipe),At=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||T(e.append)&&((t=Y(e))==="formdata"||t==="object"&&T(e.toString)&&e.toString()==="[object FormData]"))},It=x("URLSearchParams"),[Lt,Ut,$t,Pt]=["ReadableStream","Request","Response","Headers"].map(x),Ft=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function z(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let o,s;if(typeof e!="object"&&(e=[e]),j(e))for(o=0,s=e.length;o<s;o++)t.call(null,e[o],o,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let c;for(o=0;o<a;o++)c=i[o],t.call(null,e[c],c,e)}}function Ve(e,t){t=t.toLowerCase();const r=Object.keys(e);let o=r.length,s;for(;o-- >0;)if(s=r[o],t===s.toLowerCase())return s;return null}const L=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ae=e=>!H(e)&&e!==L;function pe(){const{caseless:e}=Ae(this)&&this||{},t={},r=(o,s)=>{const i=e&&Ve(t,s)||s;ee(t[i])&&ee(o)?t[i]=pe(t[i],o):ee(o)?t[i]=pe({},o):j(o)?t[i]=o.slice():t[i]=o};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&z(arguments[o],r);return t}const Mt=(e,t,r,{allOwnKeys:o}={})=>(z(t,(s,i)=>{r&&T(s)?e[i]=xe(s,r):e[i]=s},{allOwnKeys:o}),e),jt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),qt=(e,t,r,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Ht=(e,t,r,o)=>{let s,i,a;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)a=s[i],(!o||o(a,e,t))&&!c[a]&&(t[a]=e[a],c[a]=!0);e=r!==!1&&de(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},zt=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const o=e.indexOf(t,r);return o!==-1&&o===r},Kt=e=>{if(!e)return null;if(j(e))return e;let t=e.length;if(!De(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Jt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&de(Uint8Array)),Wt=(e,t)=>{const o=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=o.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},Gt=(e,t)=>{let r;const o=[];for(;(r=e.exec(t))!==null;)o.push(r);return o},Xt=x("HTMLFormElement"),Qt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,o,s){return o.toUpperCase()+s}),Ie=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Yt=x("RegExp"),Le=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),o={};z(r,(s,i)=>{let a;(a=t(s,i,e))!==!1&&(o[i]=a||s)}),Object.defineProperties(e,o)},Zt=e=>{Le(e,(t,r)=>{if(T(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const o=e[r];if(T(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},vt=(e,t)=>{const r={},o=s=>{s.forEach(i=>{r[i]=!0})};return j(e)?o(e):o(String(e).split(t)),r},en=()=>{},tn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,ue="abcdefghijklmnopqrstuvwxyz",Ue="0123456789",$e={DIGIT:Ue,ALPHA:ue,ALPHA_DIGIT:ue+ue.toUpperCase()+Ue},nn=(e=16,t=$e.ALPHA_DIGIT)=>{let r="";const{length:o}=t;for(;e--;)r+=t[Math.random()*o|0];return r};function rn(e){return!!(e&&T(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const on=e=>{const t=new Array(10),r=(o,s)=>{if(v(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[s]=o;const i=j(o)?[]:{};return z(o,(a,c)=>{const u=r(a,s+1);!H(u)&&(i[c]=u)}),t[s]=void 0,i}}return o};return r(e,0)},sn=x("AsyncFunction"),an=e=>e&&(v(e)||T(e))&&T(e.then)&&T(e.catch),Pe=((e,t)=>e?setImmediate:t?((r,o)=>(L.addEventListener("message",({source:s,data:i})=>{s===L&&i===r&&o.length&&o.shift()()},!1),s=>{o.push(s),L.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",T(L.postMessage)),cn=typeof queueMicrotask<"u"?queueMicrotask.bind(L):typeof process<"u"&&process.nextTick||Pe,l={isArray:j,isArrayBuffer:Oe,isBuffer:Bt,isFormData:At,isArrayBufferView:Ct,isString:Nt,isNumber:De,isBoolean:Rt,isObject:v,isPlainObject:ee,isReadableStream:Lt,isRequest:Ut,isResponse:$t,isHeaders:Pt,isUndefined:H,isDate:Tt,isFile:xt,isBlob:Ot,isRegExp:Yt,isFunction:T,isStream:Vt,isURLSearchParams:It,isTypedArray:Jt,isFileList:Dt,forEach:z,merge:pe,extend:Mt,trim:Ft,stripBOM:jt,inherits:qt,toFlatObject:Ht,kindOf:Y,kindOfTest:x,endsWith:zt,toArray:Kt,forEachEntry:Wt,matchAll:Gt,isHTMLForm:Xt,hasOwnProperty:Ie,hasOwnProp:Ie,reduceDescriptors:Le,freezeMethods:Zt,toObjectSet:vt,toCamelCase:Qt,noop:en,toFiniteNumber:tn,findKey:Ve,global:L,isContextDefined:Ae,ALPHABET:$e,generateString:nn,isSpecCompliantForm:rn,toJSONObject:on,isAsyncFn:sn,isThenable:an,setImmediate:Pe,asap:cn};function g(e,t,r,o,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),o&&(this.request=o),s&&(this.response=s,this.status=s.status?s.status:null)}l.inherits(g,Error,{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:l.toJSONObject(this.config),code:this.code,status:this.status}}});const Fe=g.prototype,Me={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Me[e]={value:e}}),Object.defineProperties(g,Me),Object.defineProperty(Fe,"isAxiosError",{value:!0}),g.from=(e,t,r,o,s,i)=>{const a=Object.create(Fe);return l.toFlatObject(e,a,function(u){return u!==Error.prototype},c=>c!=="isAxiosError"),g.call(a,e.message,t,r,o,s),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const ln=null;function fe(e){return l.isPlainObject(e)||l.isArray(e)}function je(e){return l.endsWith(e,"[]")?e.slice(0,-2):e}function qe(e,t,r){return e?e.concat(t).map(function(s,i){return s=je(s),!r&&i?"["+s+"]":s}).join(r?".":""):t}function dn(e){return l.isArray(e)&&!e.some(fe)}const pn=l.toFlatObject(l,{},null,function(t){return/^is[A-Z]/.test(t)});function te(e,t,r){if(!l.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=l.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,h){return!l.isUndefined(h[y])});const o=r.metaTokens,s=r.visitor||p,i=r.dots,a=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(t);if(!l.isFunction(s))throw new TypeError("visitor must be a function");function d(m){if(m===null)return"";if(l.isDate(m))return m.toISOString();if(!u&&l.isBlob(m))throw new g("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(m)||l.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function p(m,y,h){let _=m;if(m&&!h&&typeof m=="object"){if(l.endsWith(y,"{}"))y=o?y:y.slice(0,-2),m=JSON.stringify(m);else if(l.isArray(m)&&dn(m)||(l.isFileList(m)||l.endsWith(y,"[]"))&&(_=l.toArray(m)))return y=je(y),_.forEach(function(S,V){!(l.isUndefined(S)||S===null)&&t.append(a===!0?qe([y],V,i):a===null?y:y+"[]",d(S))}),!1}return fe(m)?!0:(t.append(qe(h,y,i),d(m)),!1)}const f=[],b=Object.assign(pn,{defaultVisitor:p,convertValue:d,isVisitable:fe});function k(m,y){if(!l.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(m),l.forEach(m,function(_,w){(!(l.isUndefined(_)||_===null)&&s.call(t,_,l.isString(w)?w.trim():w,y,b))===!0&&k(_,y?y.concat(w):[w])}),f.pop()}}if(!l.isObject(e))throw new TypeError("data must be an object");return k(e),t}function He(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function me(e,t){this._pairs=[],e&&te(e,this,t)}const ze=me.prototype;ze.append=function(t,r){this._pairs.push([t,r])},ze.toString=function(t){const r=t?function(o){return t.call(this,o,He)}:He;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function un(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ke(e,t,r){if(!t)return e;const o=r&&r.encode||un,s=r&&r.serialize;let i;if(s?i=s(t,r):i=l.isURLSearchParams(t)?t.toString():new me(t,r).toString(o),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Je{constructor(){this.handlers=[]}use(t,r,o){return this.handlers.push({fulfilled:t,rejected:r,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){l.forEach(this.handlers,function(o){o!==null&&t(o)})}}const We={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fn={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:me,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},he=typeof window<"u"&&typeof document<"u",ge=typeof navigator=="object"&&navigator||void 0,mn=he&&(!ge||["ReactNative","NativeScript","NS"].indexOf(ge.product)<0),hn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",gn=he&&window.location.href||"http://localhost",C={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:he,hasStandardBrowserEnv:mn,hasStandardBrowserWebWorkerEnv:hn,navigator:ge,origin:gn},Symbol.toStringTag,{value:"Module"})),...fn};function yn(e,t){return te(e,new C.classes.URLSearchParams,Object.assign({visitor:function(r,o,s,i){return C.isNode&&l.isBuffer(r)?(this.append(o,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function bn(e){return l.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function _n(e){const t={},r=Object.keys(e);let o;const s=r.length;let i;for(o=0;o<s;o++)i=r[o],t[i]=e[i];return t}function Ge(e){function t(r,o,s,i){let a=r[i++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),u=i>=r.length;return a=!a&&l.isArray(s)?s.length:a,u?(l.hasOwnProp(s,a)?s[a]=[s[a],o]:s[a]=o,!c):((!s[a]||!l.isObject(s[a]))&&(s[a]=[]),t(r,o,s[a],i)&&l.isArray(s[a])&&(s[a]=_n(s[a])),!c)}if(l.isFormData(e)&&l.isFunction(e.entries)){const r={};return l.forEachEntry(e,(o,s)=>{t(bn(o),s,r,0)}),r}return null}function En(e,t,r){if(l.isString(e))try{return(t||JSON.parse)(e),l.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(0,JSON.stringify)(e)}const K={transitional:We,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const o=r.getContentType()||"",s=o.indexOf("application/json")>-1,i=l.isObject(t);if(i&&l.isHTMLForm(t)&&(t=new FormData(t)),l.isFormData(t))return s?JSON.stringify(Ge(t)):t;if(l.isArrayBuffer(t)||l.isBuffer(t)||l.isStream(t)||l.isFile(t)||l.isBlob(t)||l.isReadableStream(t))return t;if(l.isArrayBufferView(t))return t.buffer;if(l.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(o.indexOf("application/x-www-form-urlencoded")>-1)return yn(t,this.formSerializer).toString();if((c=l.isFileList(t))||o.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return te(c?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||s?(r.setContentType("application/json",!1),En(t)):t}],transformResponse:[function(t){const r=this.transitional||K.transitional,o=r&&r.forcedJSONParsing,s=this.responseType==="json";if(l.isResponse(t)||l.isReadableStream(t))return t;if(t&&l.isString(t)&&(o&&!this.responseType||s)){const a=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(a)throw c.name==="SyntaxError"?g.from(c,g.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:C.classes.FormData,Blob:C.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch"],e=>{K.headers[e]={}});const kn=l.toObjectSet(["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"]),wn=e=>{const t={};let r,o,s;return e&&e.split(`
|
|
2
|
-
`).forEach(function(a){s=a.indexOf(":"),r=a.substring(0,s).trim().toLowerCase(),o=a.substring(s+1).trim(),!(!r||t[r]&&
|
|
3
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const o=new this(t);return r.forEach(s=>o.set(s)),o}static accessor(t){const o=(this[Xe]=this[Xe]={accessors:{}}).accessors,s=this.prototype;function i(a){const c=J(a);o[c]||(Nn(s,a),o[c]=!0)}return l.isArray(t)?t.forEach(i):i(t),this}}N.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(N.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[r]=o}}}),l.freezeMethods(N);function be(e,t){const r=this||K,o=t||r,s=N.from(o.headers);let i=o.data;return l.forEach(e,function(c){i=c.call(r,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function Qe(e){return!!(e&&e.__CANCEL__)}function q(e,t,r){g.call(this,e??"canceled",g.ERR_CANCELED,t,r),this.name="CanceledError"}l.inherits(q,g,{__CANCEL__:!0});function Ye(e,t,r){const o=r.config.validateStatus;!r.status||!o||o(r.status)?e(r):t(new g("Request failed with status code "+r.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Rn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Tn(e,t){e=e||10;const r=new Array(e),o=new Array(e);let s=0,i=0,a;return t=t!==void 0?t:1e3,function(u){const d=Date.now(),p=o[i];a||(a=d),r[s]=u,o[s]=d;let f=i,b=0;for(;f!==s;)b+=r[f++],f=f%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),d-a<t)return;const k=p&&d-p;return k?Math.round(b*1e3/k):void 0}}function xn(e,t){let r=0,o=1e3/t,s,i;const a=(d,p=Date.now())=>{r=p,s=null,i&&(clearTimeout(i),i=null),e.apply(null,d)};return[(...d)=>{const p=Date.now(),f=p-r;f>=o?a(d,p):(s=d,i||(i=setTimeout(()=>{i=null,a(s)},o-f)))},()=>s&&a(s)]}const re=(e,t,r=3)=>{let o=0;const s=Tn(50,250);return xn(i=>{const a=i.loaded,c=i.lengthComputable?i.total:void 0,u=a-o,d=s(u),p=a<=c;o=a;const f={loaded:a,total:c,progress:c?a/c:void 0,bytes:u,rate:d||void 0,estimated:d&&c&&p?(c-a)/d:void 0,event:i,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(f)},r)},Ze=(e,t)=>{const r=e!=null;return[o=>t[0]({lengthComputable:r,total:e,loaded:o}),t[1]]},ve=e=>(...t)=>l.asap(()=>e(...t)),On=C.hasStandardBrowserEnv?function(){const t=C.navigator&&/(msie|trident)/i.test(C.navigator.userAgent),r=document.createElement("a");let o;function s(i){let a=i;return t&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return o=s(window.location.href),function(a){const c=l.isString(a)?s(a):a;return c.protocol===o.protocol&&c.host===o.host}}():function(){return function(){return!0}}(),Dn=C.hasStandardBrowserEnv?{write(e,t,r,o,s,i){const a=[e+"="+encodeURIComponent(t)];l.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),l.isString(o)&&a.push("path="+o),l.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Vn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function An(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function et(e,t){return e&&!Vn(t)?An(e,t):t}const tt=e=>e instanceof N?{...e}:e;function U(e,t){t=t||{};const r={};function o(d,p,f){return l.isPlainObject(d)&&l.isPlainObject(p)?l.merge.call({caseless:f},d,p):l.isPlainObject(p)?l.merge({},p):l.isArray(p)?p.slice():p}function s(d,p,f){if(l.isUndefined(p)){if(!l.isUndefined(d))return o(void 0,d,f)}else return o(d,p,f)}function i(d,p){if(!l.isUndefined(p))return o(void 0,p)}function a(d,p){if(l.isUndefined(p)){if(!l.isUndefined(d))return o(void 0,d)}else return o(void 0,p)}function c(d,p,f){if(f in t)return o(d,p);if(f in e)return o(void 0,d)}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(d,p)=>s(tt(d),tt(p),!0)};return l.forEach(Object.keys(Object.assign({},e,t)),function(p){const f=u[p]||s,b=f(e[p],t[p],p);l.isUndefined(b)&&f!==c||(r[p]=b)}),r}const nt=e=>{const t=U({},e);let{data:r,withXSRFToken:o,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:c}=t;t.headers=a=N.from(a),t.url=Ke(et(t.baseURL,t.url),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let u;if(l.isFormData(r)){if(C.hasStandardBrowserEnv||C.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[d,...p]=u?u.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([d||"multipart/form-data",...p].join("; "))}}if(C.hasStandardBrowserEnv&&(o&&l.isFunction(o)&&(o=o(t)),o||o!==!1&&On(t.url))){const d=s&&i&&Dn.read(i);d&&a.set(s,d)}return t},In=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,o){const s=nt(e);let i=s.data;const a=N.from(s.headers).normalize();let{responseType:c,onUploadProgress:u,onDownloadProgress:d}=s,p,f,b,k,m;function y(){k&&k(),m&&m(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let h=new XMLHttpRequest;h.open(s.method.toUpperCase(),s.url,!0),h.timeout=s.timeout;function _(){if(!h)return;const S=N.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),R={data:!c||c==="text"||c==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:S,config:e,request:h};Ye(function(M){r(M),y()},function(M){o(M),y()},R),h=null}"onloadend"in h?h.onloadend=_:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(_)},h.onabort=function(){h&&(o(new g("Request aborted",g.ECONNABORTED,e,h)),h=null)},h.onerror=function(){o(new g("Network Error",g.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let V=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const R=s.transitional||We;s.timeoutErrorMessage&&(V=s.timeoutErrorMessage),o(new g(V,R.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,e,h)),h=null},i===void 0&&a.setContentType(null),"setRequestHeader"in h&&l.forEach(a.toJSON(),function(V,R){h.setRequestHeader(R,V)}),l.isUndefined(s.withCredentials)||(h.withCredentials=!!s.withCredentials),c&&c!=="json"&&(h.responseType=s.responseType),d&&([b,m]=re(d,!0),h.addEventListener("progress",b)),u&&h.upload&&([f,k]=re(u),h.upload.addEventListener("progress",f),h.upload.addEventListener("loadend",k)),(s.cancelToken||s.signal)&&(p=S=>{h&&(o(!S||S.type?new q(null,e,h):S),h.abort(),h=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const w=Rn(s.url);if(w&&C.protocols.indexOf(w)===-1){o(new g("Unsupported protocol "+w+":",g.ERR_BAD_REQUEST,e));return}h.send(i||null)})},Ln=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let o=new AbortController,s;const i=function(d){if(!s){s=!0,c();const p=d instanceof Error?d:this.reason;o.abort(p instanceof g?p:new q(p instanceof Error?p.message:p))}};let a=t&&setTimeout(()=>{a=null,i(new g(`timeout ${t} of ms exceeded`,g.ETIMEDOUT))},t);const c=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i)}),e=null)};e.forEach(d=>d.addEventListener("abort",i));const{signal:u}=o;return u.unsubscribe=()=>l.asap(c),u}},Un=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let o=0,s;for(;o<r;)s=o+t,yield e.slice(o,s),o=s},$n=async function*(e,t){for await(const r of Pn(e))yield*Un(r,t)},Pn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:o}=await t.read();if(r)break;yield o}}finally{await t.cancel()}},rt=(e,t,r,o)=>{const s=$n(e,t);let i=0,a,c=u=>{a||(a=!0,o&&o(u))};return new ReadableStream({async pull(u){try{const{done:d,value:p}=await s.next();if(d){c(),u.close();return}let f=p.byteLength;if(r){let b=i+=f;r(b)}u.enqueue(new Uint8Array(p))}catch(d){throw c(d),d}},cancel(u){return c(u),s.return()}},{highWaterMark:2})},oe=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ot=oe&&typeof ReadableStream=="function",Fn=oe&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),st=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Mn=ot&&st(()=>{let e=!1;const t=new Request(C.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),it=64*1024,_e=ot&&st(()=>l.isReadableStream(new Response("").body)),se={stream:_e&&(e=>e.body)};oe&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!se[t]&&(se[t]=l.isFunction(e[t])?r=>r[t]():(r,o)=>{throw new g(`Response type '${t}' is not supported`,g.ERR_NOT_SUPPORT,o)})})})(new Response);const jn=async e=>{if(e==null)return 0;if(l.isBlob(e))return e.size;if(l.isSpecCompliantForm(e))return(await new Request(C.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(l.isArrayBufferView(e)||l.isArrayBuffer(e))return e.byteLength;if(l.isURLSearchParams(e)&&(e=e+""),l.isString(e))return(await Fn(e)).byteLength},qn=async(e,t)=>{const r=l.toFiniteNumber(e.getContentLength());return r??jn(t)},Ee={http:ln,xhr:In,fetch:oe&&(async e=>{let{url:t,method:r,data:o,signal:s,cancelToken:i,timeout:a,onDownloadProgress:c,onUploadProgress:u,responseType:d,headers:p,withCredentials:f="same-origin",fetchOptions:b}=nt(e);d=d?(d+"").toLowerCase():"text";let k=Ln([s,i&&i.toAbortSignal()],a),m;const y=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let h;try{if(u&&Mn&&r!=="get"&&r!=="head"&&(h=await qn(p,o))!==0){let R=new Request(t,{method:"POST",body:o,duplex:"half"}),I;if(l.isFormData(o)&&(I=R.headers.get("content-type"))&&p.setContentType(I),R.body){const[M,le]=Ze(h,re(ve(u)));o=rt(R.body,it,M,le)}}l.isString(f)||(f=f?"include":"omit");const _="credentials"in Request.prototype;m=new Request(t,{...b,signal:k,method:r.toUpperCase(),headers:p.normalize().toJSON(),body:o,duplex:"half",credentials:_?f:void 0});let w=await fetch(m);const S=_e&&(d==="stream"||d==="response");if(_e&&(c||S&&y)){const R={};["status","statusText","headers"].forEach(wt=>{R[wt]=w[wt]});const I=l.toFiniteNumber(w.headers.get("content-length")),[M,le]=c&&Ze(I,re(ve(c),!0))||[];w=new Response(rt(w.body,it,M,()=>{le&&le(),y&&y()}),R)}d=d||"text";let V=await se[l.findKey(se,d)||"text"](w,e);return!S&&y&&y(),await new Promise((R,I)=>{Ye(R,I,{data:V,headers:N.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:m})})}catch(_){throw y&&y(),_&&_.name==="TypeError"&&/fetch/i.test(_.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,e,m),{cause:_.cause||_}):g.from(_,_&&_.code,e,m)}})};l.forEach(Ee,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const at=e=>`- ${e}`,Hn=e=>l.isFunction(e)||e===null||e===!1,ct={getAdapter:e=>{e=l.isArray(e)?e:[e];const{length:t}=e;let r,o;const s={};for(let i=0;i<t;i++){r=e[i];let a;if(o=r,!Hn(r)&&(o=Ee[(a=String(r)).toLowerCase()],o===void 0))throw new g(`Unknown adapter '${a}'`);if(o)break;s[a||"#"+i]=o}if(!o){const i=Object.entries(s).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since :
|
|
1
|
+
(function(D,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","vue","pinia"],n):(D=typeof globalThis<"u"?globalThis:D||self,n(D.Distinguish={},D.Vue,D.Pinia))})(this,function(D,n,Y){"use strict";function xe(e,t){return function(){return e.apply(t,arguments)}}const{toString:St}=Object.prototype,{getPrototypeOf:de}=Object,Z=(e=>t=>{const r=St.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),x=e=>(e=e.toLowerCase(),t=>Z(t)===e),v=e=>t=>typeof t===e,{isArray:j}=Array,z=v("undefined");function Bt(e){return e!==null&&!z(e)&&e.constructor!==null&&!z(e.constructor)&&T(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const De=x("ArrayBuffer");function Ct(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&De(e.buffer),t}const Nt=v("string"),T=v("function"),Oe=v("number"),ee=e=>e!==null&&typeof e=="object",Rt=e=>e===!0||e===!1,te=e=>{if(Z(e)!=="object")return!1;const t=de(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Tt=x("Date"),xt=x("File"),Dt=x("Blob"),Ot=x("FileList"),Vt=e=>ee(e)&&T(e.pipe),It=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||T(e.append)&&((t=Z(e))==="formdata"||t==="object"&&T(e.toString)&&e.toString()==="[object FormData]"))},At=x("URLSearchParams"),[Lt,Ut,$t,Ft]=["ReadableStream","Request","Response","Headers"].map(x),Pt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function K(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let o,s;if(typeof e!="object"&&(e=[e]),j(e))for(o=0,s=e.length;o<s;o++)t.call(null,e[o],o,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let c;for(o=0;o<a;o++)c=i[o],t.call(null,e[c],c,e)}}function Ve(e,t){t=t.toLowerCase();const r=Object.keys(e);let o=r.length,s;for(;o-- >0;)if(s=r[o],t===s.toLowerCase())return s;return null}const L=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ie=e=>!z(e)&&e!==L;function pe(){const{caseless:e}=Ie(this)&&this||{},t={},r=(o,s)=>{const i=e&&Ve(t,s)||s;te(t[i])&&te(o)?t[i]=pe(t[i],o):te(o)?t[i]=pe({},o):j(o)?t[i]=o.slice():t[i]=o};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&K(arguments[o],r);return t}const Mt=(e,t,r,{allOwnKeys:o}={})=>(K(t,(s,i)=>{r&&T(s)?e[i]=xe(s,r):e[i]=s},{allOwnKeys:o}),e),jt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),qt=(e,t,r,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Ht=(e,t,r,o)=>{let s,i,a;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)a=s[i],(!o||o(a,e,t))&&!c[a]&&(t[a]=e[a],c[a]=!0);e=r!==!1&&de(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},zt=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const o=e.indexOf(t,r);return o!==-1&&o===r},Kt=e=>{if(!e)return null;if(j(e))return e;let t=e.length;if(!Oe(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Jt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&de(Uint8Array)),Wt=(e,t)=>{const o=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=o.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},Gt=(e,t)=>{let r;const o=[];for(;(r=e.exec(t))!==null;)o.push(r);return o},Xt=x("HTMLFormElement"),Qt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,o,s){return o.toUpperCase()+s}),Ae=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Yt=x("RegExp"),Le=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),o={};K(r,(s,i)=>{let a;(a=t(s,i,e))!==!1&&(o[i]=a||s)}),Object.defineProperties(e,o)},Zt=e=>{Le(e,(t,r)=>{if(T(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const o=e[r];if(T(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},vt=(e,t)=>{const r={},o=s=>{s.forEach(i=>{r[i]=!0})};return j(e)?o(e):o(String(e).split(t)),r},en=()=>{},tn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,ue="abcdefghijklmnopqrstuvwxyz",Ue="0123456789",$e={DIGIT:Ue,ALPHA:ue,ALPHA_DIGIT:ue+ue.toUpperCase()+Ue},nn=(e=16,t=$e.ALPHA_DIGIT)=>{let r="";const{length:o}=t;for(;e--;)r+=t[Math.random()*o|0];return r};function rn(e){return!!(e&&T(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const on=e=>{const t=new Array(10),r=(o,s)=>{if(ee(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[s]=o;const i=j(o)?[]:{};return K(o,(a,c)=>{const u=r(a,s+1);!z(u)&&(i[c]=u)}),t[s]=void 0,i}}return o};return r(e,0)},sn=x("AsyncFunction"),an=e=>e&&(ee(e)||T(e))&&T(e.then)&&T(e.catch),Fe=((e,t)=>e?setImmediate:t?((r,o)=>(L.addEventListener("message",({source:s,data:i})=>{s===L&&i===r&&o.length&&o.shift()()},!1),s=>{o.push(s),L.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",T(L.postMessage)),cn=typeof queueMicrotask<"u"?queueMicrotask.bind(L):typeof process<"u"&&process.nextTick||Fe,l={isArray:j,isArrayBuffer:De,isBuffer:Bt,isFormData:It,isArrayBufferView:Ct,isString:Nt,isNumber:Oe,isBoolean:Rt,isObject:ee,isPlainObject:te,isReadableStream:Lt,isRequest:Ut,isResponse:$t,isHeaders:Ft,isUndefined:z,isDate:Tt,isFile:xt,isBlob:Dt,isRegExp:Yt,isFunction:T,isStream:Vt,isURLSearchParams:At,isTypedArray:Jt,isFileList:Ot,forEach:K,merge:pe,extend:Mt,trim:Pt,stripBOM:jt,inherits:qt,toFlatObject:Ht,kindOf:Z,kindOfTest:x,endsWith:zt,toArray:Kt,forEachEntry:Wt,matchAll:Gt,isHTMLForm:Xt,hasOwnProperty:Ae,hasOwnProp:Ae,reduceDescriptors:Le,freezeMethods:Zt,toObjectSet:vt,toCamelCase:Qt,noop:en,toFiniteNumber:tn,findKey:Ve,global:L,isContextDefined:Ie,ALPHABET:$e,generateString:nn,isSpecCompliantForm:rn,toJSONObject:on,isAsyncFn:sn,isThenable:an,setImmediate:Fe,asap:cn};function g(e,t,r,o,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),o&&(this.request=o),s&&(this.response=s,this.status=s.status?s.status:null)}l.inherits(g,Error,{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:l.toJSONObject(this.config),code:this.code,status:this.status}}});const Pe=g.prototype,Me={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Me[e]={value:e}}),Object.defineProperties(g,Me),Object.defineProperty(Pe,"isAxiosError",{value:!0}),g.from=(e,t,r,o,s,i)=>{const a=Object.create(Pe);return l.toFlatObject(e,a,function(u){return u!==Error.prototype},c=>c!=="isAxiosError"),g.call(a,e.message,t,r,o,s),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const ln=null;function fe(e){return l.isPlainObject(e)||l.isArray(e)}function je(e){return l.endsWith(e,"[]")?e.slice(0,-2):e}function qe(e,t,r){return e?e.concat(t).map(function(s,i){return s=je(s),!r&&i?"["+s+"]":s}).join(r?".":""):t}function dn(e){return l.isArray(e)&&!e.some(fe)}const pn=l.toFlatObject(l,{},null,function(t){return/^is[A-Z]/.test(t)});function ne(e,t,r){if(!l.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=l.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,h){return!l.isUndefined(h[y])});const o=r.metaTokens,s=r.visitor||p,i=r.dots,a=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(t);if(!l.isFunction(s))throw new TypeError("visitor must be a function");function d(m){if(m===null)return"";if(l.isDate(m))return m.toISOString();if(!u&&l.isBlob(m))throw new g("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(m)||l.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function p(m,y,h){let _=m;if(m&&!h&&typeof m=="object"){if(l.endsWith(y,"{}"))y=o?y:y.slice(0,-2),m=JSON.stringify(m);else if(l.isArray(m)&&dn(m)||(l.isFileList(m)||l.endsWith(y,"[]"))&&(_=l.toArray(m)))return y=je(y),_.forEach(function(S,V){!(l.isUndefined(S)||S===null)&&t.append(a===!0?qe([y],V,i):a===null?y:y+"[]",d(S))}),!1}return fe(m)?!0:(t.append(qe(h,y,i),d(m)),!1)}const f=[],b=Object.assign(pn,{defaultVisitor:p,convertValue:d,isVisitable:fe});function w(m,y){if(!l.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(m),l.forEach(m,function(_,E){(!(l.isUndefined(_)||_===null)&&s.call(t,_,l.isString(E)?E.trim():E,y,b))===!0&&w(_,y?y.concat(E):[E])}),f.pop()}}if(!l.isObject(e))throw new TypeError("data must be an object");return w(e),t}function He(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function me(e,t){this._pairs=[],e&&ne(e,this,t)}const ze=me.prototype;ze.append=function(t,r){this._pairs.push([t,r])},ze.toString=function(t){const r=t?function(o){return t.call(this,o,He)}:He;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function un(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ke(e,t,r){if(!t)return e;const o=r&&r.encode||un,s=r&&r.serialize;let i;if(s?i=s(t,r):i=l.isURLSearchParams(t)?t.toString():new me(t,r).toString(o),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Je{constructor(){this.handlers=[]}use(t,r,o){return this.handlers.push({fulfilled:t,rejected:r,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){l.forEach(this.handlers,function(o){o!==null&&t(o)})}}const We={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fn={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:me,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},he=typeof window<"u"&&typeof document<"u",ge=typeof navigator=="object"&&navigator||void 0,mn=he&&(!ge||["ReactNative","NativeScript","NS"].indexOf(ge.product)<0),hn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",gn=he&&window.location.href||"http://localhost",C={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:he,hasStandardBrowserEnv:mn,hasStandardBrowserWebWorkerEnv:hn,navigator:ge,origin:gn},Symbol.toStringTag,{value:"Module"})),...fn};function yn(e,t){return ne(e,new C.classes.URLSearchParams,Object.assign({visitor:function(r,o,s,i){return C.isNode&&l.isBuffer(r)?(this.append(o,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function bn(e){return l.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function _n(e){const t={},r=Object.keys(e);let o;const s=r.length;let i;for(o=0;o<s;o++)i=r[o],t[i]=e[i];return t}function Ge(e){function t(r,o,s,i){let a=r[i++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),u=i>=r.length;return a=!a&&l.isArray(s)?s.length:a,u?(l.hasOwnProp(s,a)?s[a]=[s[a],o]:s[a]=o,!c):((!s[a]||!l.isObject(s[a]))&&(s[a]=[]),t(r,o,s[a],i)&&l.isArray(s[a])&&(s[a]=_n(s[a])),!c)}if(l.isFormData(e)&&l.isFunction(e.entries)){const r={};return l.forEachEntry(e,(o,s)=>{t(bn(o),s,r,0)}),r}return null}function kn(e,t,r){if(l.isString(e))try{return(t||JSON.parse)(e),l.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(0,JSON.stringify)(e)}const J={transitional:We,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const o=r.getContentType()||"",s=o.indexOf("application/json")>-1,i=l.isObject(t);if(i&&l.isHTMLForm(t)&&(t=new FormData(t)),l.isFormData(t))return s?JSON.stringify(Ge(t)):t;if(l.isArrayBuffer(t)||l.isBuffer(t)||l.isStream(t)||l.isFile(t)||l.isBlob(t)||l.isReadableStream(t))return t;if(l.isArrayBufferView(t))return t.buffer;if(l.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(o.indexOf("application/x-www-form-urlencoded")>-1)return yn(t,this.formSerializer).toString();if((c=l.isFileList(t))||o.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return ne(c?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||s?(r.setContentType("application/json",!1),kn(t)):t}],transformResponse:[function(t){const r=this.transitional||J.transitional,o=r&&r.forcedJSONParsing,s=this.responseType==="json";if(l.isResponse(t)||l.isReadableStream(t))return t;if(t&&l.isString(t)&&(o&&!this.responseType||s)){const a=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(a)throw c.name==="SyntaxError"?g.from(c,g.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:C.classes.FormData,Blob:C.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch"],e=>{J.headers[e]={}});const wn=l.toObjectSet(["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"]),En=e=>{const t={};let r,o,s;return e&&e.split(`
|
|
2
|
+
`).forEach(function(a){s=a.indexOf(":"),r=a.substring(0,s).trim().toLowerCase(),o=a.substring(s+1).trim(),!(!r||t[r]&&wn[r])&&(r==="set-cookie"?t[r]?t[r].push(o):t[r]=[o]:t[r]=t[r]?t[r]+", "+o:o)}),t},Xe=Symbol("internals");function W(e){return e&&String(e).trim().toLowerCase()}function re(e){return e===!1||e==null?e:l.isArray(e)?e.map(re):String(e)}function Sn(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=r.exec(e);)t[o[1]]=o[2];return t}const Bn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ye(e,t,r,o,s){if(l.isFunction(o))return o.call(this,t,r);if(s&&(t=r),!!l.isString(t)){if(l.isString(o))return t.indexOf(o)!==-1;if(l.isRegExp(o))return o.test(t)}}function Cn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,o)=>r.toUpperCase()+o)}function Nn(e,t){const r=l.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+r,{value:function(s,i,a){return this[o].call(this,t,s,i,a)},configurable:!0})})}class N{constructor(t){t&&this.set(t)}set(t,r,o){const s=this;function i(c,u,d){const p=W(u);if(!p)throw new Error("header name must be a non-empty string");const f=l.findKey(s,p);(!f||s[f]===void 0||d===!0||d===void 0&&s[f]!==!1)&&(s[f||u]=re(c))}const a=(c,u)=>l.forEach(c,(d,p)=>i(d,p,u));if(l.isPlainObject(t)||t instanceof this.constructor)a(t,r);else if(l.isString(t)&&(t=t.trim())&&!Bn(t))a(En(t),r);else if(l.isHeaders(t))for(const[c,u]of t.entries())i(u,c,o);else t!=null&&i(r,t,o);return this}get(t,r){if(t=W(t),t){const o=l.findKey(this,t);if(o){const s=this[o];if(!r)return s;if(r===!0)return Sn(s);if(l.isFunction(r))return r.call(this,s,o);if(l.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=W(t),t){const o=l.findKey(this,t);return!!(o&&this[o]!==void 0&&(!r||ye(this,this[o],o,r)))}return!1}delete(t,r){const o=this;let s=!1;function i(a){if(a=W(a),a){const c=l.findKey(o,a);c&&(!r||ye(o,o[c],c,r))&&(delete o[c],s=!0)}}return l.isArray(t)?t.forEach(i):i(t),s}clear(t){const r=Object.keys(this);let o=r.length,s=!1;for(;o--;){const i=r[o];(!t||ye(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const r=this,o={};return l.forEach(this,(s,i)=>{const a=l.findKey(o,i);if(a){r[a]=re(s),delete r[i];return}const c=t?Cn(i):String(i).trim();c!==i&&delete r[i],r[c]=re(s),o[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return l.forEach(this,(o,s)=>{o!=null&&o!==!1&&(r[s]=t&&l.isArray(o)?o.join(", "):o)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
3
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const o=new this(t);return r.forEach(s=>o.set(s)),o}static accessor(t){const o=(this[Xe]=this[Xe]={accessors:{}}).accessors,s=this.prototype;function i(a){const c=W(a);o[c]||(Nn(s,a),o[c]=!0)}return l.isArray(t)?t.forEach(i):i(t),this}}N.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(N.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[r]=o}}}),l.freezeMethods(N);function be(e,t){const r=this||J,o=t||r,s=N.from(o.headers);let i=o.data;return l.forEach(e,function(c){i=c.call(r,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function Qe(e){return!!(e&&e.__CANCEL__)}function q(e,t,r){g.call(this,e??"canceled",g.ERR_CANCELED,t,r),this.name="CanceledError"}l.inherits(q,g,{__CANCEL__:!0});function Ye(e,t,r){const o=r.config.validateStatus;!r.status||!o||o(r.status)?e(r):t(new g("Request failed with status code "+r.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Rn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Tn(e,t){e=e||10;const r=new Array(e),o=new Array(e);let s=0,i=0,a;return t=t!==void 0?t:1e3,function(u){const d=Date.now(),p=o[i];a||(a=d),r[s]=u,o[s]=d;let f=i,b=0;for(;f!==s;)b+=r[f++],f=f%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),d-a<t)return;const w=p&&d-p;return w?Math.round(b*1e3/w):void 0}}function xn(e,t){let r=0,o=1e3/t,s,i;const a=(d,p=Date.now())=>{r=p,s=null,i&&(clearTimeout(i),i=null),e.apply(null,d)};return[(...d)=>{const p=Date.now(),f=p-r;f>=o?a(d,p):(s=d,i||(i=setTimeout(()=>{i=null,a(s)},o-f)))},()=>s&&a(s)]}const oe=(e,t,r=3)=>{let o=0;const s=Tn(50,250);return xn(i=>{const a=i.loaded,c=i.lengthComputable?i.total:void 0,u=a-o,d=s(u),p=a<=c;o=a;const f={loaded:a,total:c,progress:c?a/c:void 0,bytes:u,rate:d||void 0,estimated:d&&c&&p?(c-a)/d:void 0,event:i,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(f)},r)},Ze=(e,t)=>{const r=e!=null;return[o=>t[0]({lengthComputable:r,total:e,loaded:o}),t[1]]},ve=e=>(...t)=>l.asap(()=>e(...t)),Dn=C.hasStandardBrowserEnv?function(){const t=C.navigator&&/(msie|trident)/i.test(C.navigator.userAgent),r=document.createElement("a");let o;function s(i){let a=i;return t&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return o=s(window.location.href),function(a){const c=l.isString(a)?s(a):a;return c.protocol===o.protocol&&c.host===o.host}}():function(){return function(){return!0}}(),On=C.hasStandardBrowserEnv?{write(e,t,r,o,s,i){const a=[e+"="+encodeURIComponent(t)];l.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),l.isString(o)&&a.push("path="+o),l.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Vn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function In(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function et(e,t){return e&&!Vn(t)?In(e,t):t}const tt=e=>e instanceof N?{...e}:e;function U(e,t){t=t||{};const r={};function o(d,p,f){return l.isPlainObject(d)&&l.isPlainObject(p)?l.merge.call({caseless:f},d,p):l.isPlainObject(p)?l.merge({},p):l.isArray(p)?p.slice():p}function s(d,p,f){if(l.isUndefined(p)){if(!l.isUndefined(d))return o(void 0,d,f)}else return o(d,p,f)}function i(d,p){if(!l.isUndefined(p))return o(void 0,p)}function a(d,p){if(l.isUndefined(p)){if(!l.isUndefined(d))return o(void 0,d)}else return o(void 0,p)}function c(d,p,f){if(f in t)return o(d,p);if(f in e)return o(void 0,d)}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(d,p)=>s(tt(d),tt(p),!0)};return l.forEach(Object.keys(Object.assign({},e,t)),function(p){const f=u[p]||s,b=f(e[p],t[p],p);l.isUndefined(b)&&f!==c||(r[p]=b)}),r}const nt=e=>{const t=U({},e);let{data:r,withXSRFToken:o,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:c}=t;t.headers=a=N.from(a),t.url=Ke(et(t.baseURL,t.url),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let u;if(l.isFormData(r)){if(C.hasStandardBrowserEnv||C.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[d,...p]=u?u.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([d||"multipart/form-data",...p].join("; "))}}if(C.hasStandardBrowserEnv&&(o&&l.isFunction(o)&&(o=o(t)),o||o!==!1&&Dn(t.url))){const d=s&&i&&On.read(i);d&&a.set(s,d)}return t},An=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,o){const s=nt(e);let i=s.data;const a=N.from(s.headers).normalize();let{responseType:c,onUploadProgress:u,onDownloadProgress:d}=s,p,f,b,w,m;function y(){w&&w(),m&&m(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let h=new XMLHttpRequest;h.open(s.method.toUpperCase(),s.url,!0),h.timeout=s.timeout;function _(){if(!h)return;const S=N.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),R={data:!c||c==="text"||c==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:S,config:e,request:h};Ye(function(M){r(M),y()},function(M){o(M),y()},R),h=null}"onloadend"in h?h.onloadend=_:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(_)},h.onabort=function(){h&&(o(new g("Request aborted",g.ECONNABORTED,e,h)),h=null)},h.onerror=function(){o(new g("Network Error",g.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let V=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const R=s.transitional||We;s.timeoutErrorMessage&&(V=s.timeoutErrorMessage),o(new g(V,R.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,e,h)),h=null},i===void 0&&a.setContentType(null),"setRequestHeader"in h&&l.forEach(a.toJSON(),function(V,R){h.setRequestHeader(R,V)}),l.isUndefined(s.withCredentials)||(h.withCredentials=!!s.withCredentials),c&&c!=="json"&&(h.responseType=s.responseType),d&&([b,m]=oe(d,!0),h.addEventListener("progress",b)),u&&h.upload&&([f,w]=oe(u),h.upload.addEventListener("progress",f),h.upload.addEventListener("loadend",w)),(s.cancelToken||s.signal)&&(p=S=>{h&&(o(!S||S.type?new q(null,e,h):S),h.abort(),h=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const E=Rn(s.url);if(E&&C.protocols.indexOf(E)===-1){o(new g("Unsupported protocol "+E+":",g.ERR_BAD_REQUEST,e));return}h.send(i||null)})},Ln=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let o=new AbortController,s;const i=function(d){if(!s){s=!0,c();const p=d instanceof Error?d:this.reason;o.abort(p instanceof g?p:new q(p instanceof Error?p.message:p))}};let a=t&&setTimeout(()=>{a=null,i(new g(`timeout ${t} of ms exceeded`,g.ETIMEDOUT))},t);const c=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i)}),e=null)};e.forEach(d=>d.addEventListener("abort",i));const{signal:u}=o;return u.unsubscribe=()=>l.asap(c),u}},Un=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let o=0,s;for(;o<r;)s=o+t,yield e.slice(o,s),o=s},$n=async function*(e,t){for await(const r of Fn(e))yield*Un(r,t)},Fn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:o}=await t.read();if(r)break;yield o}}finally{await t.cancel()}},rt=(e,t,r,o)=>{const s=$n(e,t);let i=0,a,c=u=>{a||(a=!0,o&&o(u))};return new ReadableStream({async pull(u){try{const{done:d,value:p}=await s.next();if(d){c(),u.close();return}let f=p.byteLength;if(r){let b=i+=f;r(b)}u.enqueue(new Uint8Array(p))}catch(d){throw c(d),d}},cancel(u){return c(u),s.return()}},{highWaterMark:2})},se=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ot=se&&typeof ReadableStream=="function",Pn=se&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),st=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Mn=ot&&st(()=>{let e=!1;const t=new Request(C.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),it=64*1024,_e=ot&&st(()=>l.isReadableStream(new Response("").body)),ie={stream:_e&&(e=>e.body)};se&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ie[t]&&(ie[t]=l.isFunction(e[t])?r=>r[t]():(r,o)=>{throw new g(`Response type '${t}' is not supported`,g.ERR_NOT_SUPPORT,o)})})})(new Response);const jn=async e=>{if(e==null)return 0;if(l.isBlob(e))return e.size;if(l.isSpecCompliantForm(e))return(await new Request(C.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(l.isArrayBufferView(e)||l.isArrayBuffer(e))return e.byteLength;if(l.isURLSearchParams(e)&&(e=e+""),l.isString(e))return(await Pn(e)).byteLength},qn=async(e,t)=>{const r=l.toFiniteNumber(e.getContentLength());return r??jn(t)},ke={http:ln,xhr:An,fetch:se&&(async e=>{let{url:t,method:r,data:o,signal:s,cancelToken:i,timeout:a,onDownloadProgress:c,onUploadProgress:u,responseType:d,headers:p,withCredentials:f="same-origin",fetchOptions:b}=nt(e);d=d?(d+"").toLowerCase():"text";let w=Ln([s,i&&i.toAbortSignal()],a),m;const y=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let h;try{if(u&&Mn&&r!=="get"&&r!=="head"&&(h=await qn(p,o))!==0){let R=new Request(t,{method:"POST",body:o,duplex:"half"}),A;if(l.isFormData(o)&&(A=R.headers.get("content-type"))&&p.setContentType(A),R.body){const[M,le]=Ze(h,oe(ve(u)));o=rt(R.body,it,M,le)}}l.isString(f)||(f=f?"include":"omit");const _="credentials"in Request.prototype;m=new Request(t,{...b,signal:w,method:r.toUpperCase(),headers:p.normalize().toJSON(),body:o,duplex:"half",credentials:_?f:void 0});let E=await fetch(m);const S=_e&&(d==="stream"||d==="response");if(_e&&(c||S&&y)){const R={};["status","statusText","headers"].forEach(Et=>{R[Et]=E[Et]});const A=l.toFiniteNumber(E.headers.get("content-length")),[M,le]=c&&Ze(A,oe(ve(c),!0))||[];E=new Response(rt(E.body,it,M,()=>{le&&le(),y&&y()}),R)}d=d||"text";let V=await ie[l.findKey(ie,d)||"text"](E,e);return!S&&y&&y(),await new Promise((R,A)=>{Ye(R,A,{data:V,headers:N.from(E.headers),status:E.status,statusText:E.statusText,config:e,request:m})})}catch(_){throw y&&y(),_&&_.name==="TypeError"&&/fetch/i.test(_.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,e,m),{cause:_.cause||_}):g.from(_,_&&_.code,e,m)}})};l.forEach(ke,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const at=e=>`- ${e}`,Hn=e=>l.isFunction(e)||e===null||e===!1,ct={getAdapter:e=>{e=l.isArray(e)?e:[e];const{length:t}=e;let r,o;const s={};for(let i=0;i<t;i++){r=e[i];let a;if(o=r,!Hn(r)&&(o=ke[(a=String(r)).toLowerCase()],o===void 0))throw new g(`Unknown adapter '${a}'`);if(o)break;s[a||"#"+i]=o}if(!o){const i=Object.entries(s).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since :
|
|
4
4
|
`+i.map(at).join(`
|
|
5
|
-
`):" "+at(i[0]):"as no adapter specified";throw new g("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o},adapters:
|
|
6
|
-
`+i):o.stack=i}catch{}}throw o}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=U(this.defaults,r);const{transitional:o,paramsSerializer:s,headers:i}=r;o!==void 0&&Se.assertOptions(o,{silentJSONParsing:A.transitional(A.boolean),forcedJSONParsing:A.transitional(A.boolean),clarifyTimeoutError:A.transitional(A.boolean)},!1),s!=null&&(l.isFunction(s)?r.paramsSerializer={serialize:s}:Se.assertOptions(s,{encode:A.function,serialize:A.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=i&&l.merge(i.common,i[r.method]);i&&l.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),r.headers=N.concat(a,i);const c=[];let u=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(u=u&&y.synchronous,c.unshift(y.fulfilled,y.rejected))});const d=[];this.interceptors.response.forEach(function(y){d.push(y.fulfilled,y.rejected)});let p,f=0,b;if(!u){const m=[lt.bind(this),void 0];for(m.unshift.apply(m,c),m.push.apply(m,d),b=m.length,p=Promise.resolve(r);f<b;)p=p.then(m[f++],m[f++]);return p}b=c.length;let k=r;for(f=0;f<b;){const m=c[f++],y=c[f++];try{k=m(k)}catch(h){y.call(this,h);break}}try{p=lt.call(this,k)}catch(m){return Promise.reject(m)}for(f=0,b=d.length;f<b;)p=p.then(d[f++],d[f++]);return p}getUri(t){t=U(this.defaults,t);const r=et(t.baseURL,t.url);return Ke(r,t.params,t.paramsSerializer)}}l.forEach(["delete","get","head","options"],function(t){$.prototype[t]=function(r,o){return this.request(U(o||{},{method:t,url:r,data:(o||{}).data}))}}),l.forEach(["post","put","patch"],function(t){function r(o){return function(i,a,c){return this.request(U(c||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}$.prototype[t]=r(),$.prototype[t+"Form"]=r(!0)});class Be{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const o=this;this.promise.then(s=>{if(!o._listeners)return;let i=o._listeners.length;for(;i-- >0;)o._listeners[i](s);o._listeners=null}),this.promise.then=s=>{let i;const a=new Promise(c=>{o.subscribe(c),i=c}).then(s);return a.cancel=function(){o.unsubscribe(i)},a},t(function(i,a,c){o.reason||(o.reason=new q(i,a,c),r(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=o=>{t.abort(o)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Be(function(s){t=s}),cancel:t}}}function Kn(e){return function(r){return e.apply(null,r)}}function Jn(e){return l.isObject(e)&&e.isAxiosError===!0}const Ce={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ce).forEach(([e,t])=>{Ce[t]=e});function ut(e){const t=new $(e),r=xe($.prototype.request,t);return l.extend(r,$.prototype,t,{allOwnKeys:!0}),l.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return ut(U(e,s))},r}const E=ut(K);E.Axios=$,E.CanceledError=q,E.CancelToken=Be,E.isCancel=Qe,E.VERSION=dt,E.toFormData=te,E.AxiosError=g,E.Cancel=E.CanceledError,E.all=function(t){return Promise.all(t)},E.spread=Kn,E.isAxiosError=Jn,E.mergeConfig=U,E.AxiosHeaders=N,E.formToJSON=e=>Ge(l.isHTMLForm(e)?new FormData(e):e),E.getAdapter=ct.getAdapter,E.HttpStatusCode=Ce,E.default=E;const ft=(e={})=>{const t=P(),{baseURL:r,projectId:o,projectToken:s,userToken:i,csrfToken:a}=t.getAPIConfig,c={baseURL:r,params:{project_id:o,project_token:s,token:i},...e};return(!s||!(o&&i)&&a)&&Object.assign(c,{headers:{"X-CSRF-Token":a}}),E.create({...c})};class Wn{static key(t,r){return ft().get(`/observation_matrices/${t}/key`,r)}}const W={Used:"used",Useful:"useful",Useless:"useless"},Gn=e=>({characterStateId:e.id,depictionIds:e.depiction_ids,label:e.label,position:e.position,...mt(e)}),Xn=e=>({depictionId:e.id,caption:e.caption,figureLabel:e.figure_label,imageUrl:e.image.medium}),G={Qualitative:"Descriptor::Qualitative",Continuous:"Descriptor::Continuous",Sample:"Descriptor::Sample",PresenceAbsence:"Descriptor::PresenceAbsence"},X=e=>({descriptorId:e.id,name:e.name,description:e.description,position:e.position,status:e.status,type:e.type,depictionIds:e.depiction_ids,usefulness:e.usefulness,weight:e.weight}),Qn=e=>({...X(e),defaultUnit:e.default_unit,max:e.max,min:e.min}),Yn=e=>({...X(e),defaultUnit:e.default_unit,max:e.max,min:e.min}),Zn=e=>({...X(e),states:e.states.map(t=>mt(t))}),vn=e=>({...X(e),characterStates:e.states.map(t=>Gn(t))}),er=e=>{switch(e.type){case G.Continuous:return Qn(e);case G.Sample:return Yn(e);case G.PresenceAbsence:return Zn(e);case G.Qualitative:return vn(e);default:return X(e)}},tr=e=>({observationMatrixId:e.observation_matrix_id,name:e.observation_matrix.name,globalId:e.observation_matrix.global_id}),mt=e=>({name:e.name,numberOfObjects:e.number_of_objects,status:e.status}),ht=e=>({errorDescriptors:e.error_descriptors,errors:e.errors,objectLabel:e.object.object_label,objectTag:e.object.object_tag,observationObjectId:e.object.observation_object_id,observationObjectType:e.object.observation_object_type,rowId:e.object.id}),nr=e=>({keywordId:e.id,definition:e.description,name:e.name}),rr=e=>({languageId:e.id,name:e.english_name}),D=Q.defineStore("observationMatrix",{state:()=>({observationMatrix:void 0,citation:void 0,descriptors:[],eliminated:[],remaining:[],availableKeywords:[],availableLanguages:[]}),getters:{getCitation:e=>e.citation,getObservationMatrix:e=>e.observationMatrix,getDescriptors:e=>e.descriptors,getDescriptorById:e=>t=>e.descriptors.find(r=>r.descriptorId===t),getDescriptorsUsed:e=>e.descriptors.filter(t=>t.status===W.Used),getDescriptorsUseless:e=>e.descriptors.filter(t=>t.status===W.Useless),getDescriptorsUseful:e=>e.descriptors.filter(t=>t.status===W.Useful),getEliminated:e=>e.eliminated,getKeywords:e=>e.availableKeywords,getLanguages:e=>e.availableLanguages,getRemaining:e=>e.remaining},actions:{setDescriptors(e){this.descriptors=e},setEliminated(e){this.eliminated=e},setRemaining(e){this.remaining=e},setLanguages(e){this.availableLanguages=e},setKeywords(e){this.availableKeywords=e},setObservationMatrix(e){this.observationMatrix=e},async requestInteractiveKey({observationMatrixId:e,params:t={},opt:r={}}){const o=await Wn.key(e,{params:t}),{data:s}=o;return r.refreshOnlyTaxa||(this.setObservationMatrix(tr(s)),this.setDescriptors(s.list_of_descriptors.map(i=>er(i))),this.setKeywords(s.descriptor_available_keywords.map(i=>nr(i))),this.setLanguages(s.descriptor_available_languages.map(i=>rr(i)))),this.setEliminated(s.eliminated.map(i=>ht(i))),this.setRemaining(s.remaining.map(i=>ht(i))),o}}}),B=Q.defineStore("filter",{state:()=>({descriptors:{},eliminateUnknown:void 0,errorTolerance:void 0,identifiedToRank:void 0,keywordIds:[],languageId:void 0,rowIds:[],sorting:void 0}),getters:{getKeywordIds:e=>e.keywordIds,getLanguageId:e=>e.languageId,getRowIds:e=>e.rowIds,getDescriptors:e=>e.descriptors,getIdentifiedToRank:e=>e.identifiedToRank,getEliminateUknown:e=>e.eliminateUnknown,getErrorTolerance:e=>e.errorTolerance,getSorting:e=>e.sorting,getDescriptorValueById:e=>t=>{const r=e.descriptors[t];return typeof r=="boolean"?r:r||""},getFilterParams:e=>({selected_descriptors:Object.entries(e.descriptors).map(([r,o])=>Array.isArray(o)?`${r}:${o.join("|")}`:`${r}:${o}`).join("||"),language_id:e.languageId,keyword_ids:e.keywordIds,sorting:e.sorting,identified_to_rank:e.identifiedToRank,error_tolerance:e.errorTolerance,eliminate_unknown:e.eliminateUnknown,row_filter:e.rowIds.join("|")})},actions:{setDescriptor({descriptorId:e,value:t}){this.descriptors[e]=t},removeDescriptor(e){delete this.descriptors[e]},removeKeywordId(e){const t=this.keywordIds.findIndex(r=>r===e);t>-1&&this.keywordIds.splice(t,1)},addKeywordId(e){this.keywordIds.push(e)},setLanguageId(e){this.languageId=e},setErrorTolerance(e){this.errorTolerance=e},setEliminateUnknown(e){this.eliminateUnknown=e}}}),P=Q.defineStore("settings",{state:()=>({gridLayout:"distinguish-layout-mode-1",isLoading:!1,isRefreshing:!1,refreshOnlyTaxa:!1,rowFilter:!0,shouldUpdate:!0,observationMatrixId:void 0,errorMessage:"",apiConfig:{baseURL:"",projectId:void 0,projectToken:void 0,userToken:void 0}}),getters:{getErrorMessage:e=>e.errorMessage,getIsLoading:e=>e.isLoading,getLayout:e=>e.gridLayout,getRefreshOnlyTaxa:e=>e.refreshOnlyTaxa,getRowFilter:e=>e.rowFilter,getShouldUpdate:e=>e.shouldUpdate,getObservationMatrixId:e=>e.observationMatrixId,getAPIConfig:e=>e.apiConfig},actions:{setObservationMatrixId(e){this.observationMatrixId=e},setShouldUpdate(e){this.shouldUpdate=e},setRefreshOnlyTaxa(e){this.refreshOnlyTaxa=e},setAPIConfig(e){this.apiConfig=e},checkUpdate(){const e=B(),t=D(),r=this.observationMatrixId;this.shouldUpdate&&r&&(this.isLoading=!0,t.requestInteractiveKey({observationMatrixId:r,params:e.getFilterParams,opt:{refreshOnlyTaxa:this.refreshOnlyTaxa}}).then(o=>this.errorMessage="").catch(o=>this.errorMessage=o.message).finally(()=>this.isLoading=!1))}}}),or=n.defineComponent({__name:"FilterEliminateUnknowns",setup(e){const t=B(),r=n.computed({get:()=>!!t.getEliminateUknown,set:o=>{t.setEliminateUnknown(o)}});return(o,s)=>(n.openBlock(),n.createElementBlock("label",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i),type:"checkbox"},null,512),[[n.vModelCheckbox,r.value]]),s[1]||(s[1]=n.createTextVNode(" Eliminate unknowns "))]))}}),sr=["value"],ir=n.defineComponent({__name:"FilterErrorTolerance",setup(e){const t=[0,1,2],r=B(),o=n.computed({get:()=>r.getErrorTolerance,set:s=>{r.setErrorTolerance(s)}});return(s,i)=>(n.openBlock(),n.createElementBlock("div",null,[i[2]||(i[2]=n.createElementVNode("label",{for:"languages",class:"distinguish-input-label"}," Error tolerance ",-1)),n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":i[0]||(i[0]=a=>o.value=a),name:"languages",role:"listbox"},[i[1]||(i[1]=n.createElementVNode("option",{value:""},null,-1)),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(t,a=>n.createElementVNode("option",{key:a,value:a},n.toDisplayString(a),9,sr)),64))],512),[[n.vModelSelect,o.value]])]))}}),ar=["otu","subspecies","species","subgenus","genus","subtribe","tribe","subfamily","family"],cr=n.defineComponent({__name:"FilterRank",setup(e){const t=B(),r=n.computed({get(){return t.getIdentifiedToRank},set(o){t.$patch({identifiedToRank:o})}});return(o,s)=>(n.openBlock(),n.createElementBlock("div",null,[s[2]||(s[2]=n.createElementVNode("label",{class:"distinguish-input-label"},"Identified to rank",-1)),n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i)},[s[1]||(s[1]=n.createElementVNode("option",{value:void 0},null,-1)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(ar),i=>(n.openBlock(),n.createElementBlock("option",{key:i},n.toDisplayString(i),1))),128))],512),[[n.vModelSelect,r.value]])]))}}),lr=n.defineComponent({__name:"FilterSort",setup(e){const t=["ordered","weighted","optimized"],r=B(),o=n.computed({get(){return r.getSorting},set(s){r.$patch({sorting:s})}});return(s,i)=>(n.openBlock(),n.createElementBlock("div",null,[i[2]||(i[2]=n.createElementVNode("label",{class:"distinguish-input-label"},"Descriptor sorting",-1)),n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":i[0]||(i[0]=a=>o.value=a)},[i[1]||(i[1]=n.createElementVNode("option",{value:void 0},null,-1)),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(t,a=>n.createElementVNode("option",{key:a},n.toDisplayString(a),1)),64))],512),[[n.vModelSelect,o.value]])]))}}),dr=["value"],pr=n.defineComponent({__name:"FilterLanguage",setup(e){const t=B(),r=D(),o=n.computed({get:()=>t.getLanguageId,set:s=>{t.setLanguageId(Number(s))}});return(s,i)=>(n.openBlock(),n.createElementBlock("div",null,[i[1]||(i[1]=n.createElementVNode("label",{for:"languages",class:"distinguish-input-label"}," Languages ",-1)),n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":i[0]||(i[0]=a=>o.value=a),name:"languages",role:"listbox"},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(r).getLanguages,({languageId:a,name:c})=>(n.openBlock(),n.createElementBlock("option",{key:a,value:a},n.toDisplayString(c),9,dr))),128))],512),[[n.vModelSelect,o.value]])]))}}),ur=["disabled"],ie=n.defineComponent({__name:"VBtn",props:{color:{default:"primary"},size:{default:"medium"},disabled:{type:Boolean}},setup(e){const t=e,r=n.computed(()=>[`distinguish-btn-${t.color}-color`,`distinguish-btn-${t.size}-size`]);return(o,s)=>(n.openBlock(),n.createElementBlock("button",{type:"button",class:n.normalizeClass(["distinguish-btn",r.value]),disabled:o.disabled},[n.renderSlot(o.$slots,"default")],10,ur))}}),fr={class:"distinguish-modal-wrapper"},mr={class:"distinguish-modal-header"},hr={class:"distinguish-modal-body"},gr={class:"distinguish-modal-footer"},Ne=n.defineComponent({__name:"VModal",props:{containerClass:{},containerStyle:{}},emits:["close"],setup(e,{emit:t}){const r=t,o=s=>{s.preventDefault(),s.key==="Escape"&&r("close")};return n.onMounted(()=>document.addEventListener("keydown",o)),n.onUnmounted(()=>document.removeEventListener("keydown",o)),(s,i)=>(n.openBlock(),n.createBlock(n.Transition,{name:"distinguish-modal"},{default:n.withCtx(()=>[n.createElementVNode("div",{class:"distinguish-modal-mask",onClick:i[2]||(i[2]=a=>r("close")),onKey:i[3]||(i[3]=a=>r("close"))},[n.createElementVNode("div",fr,[n.createElementVNode("div",{class:n.normalizeClass(["distinguish-modal-container",s.containerClass]),style:n.normalizeStyle({...s.containerStyle}),onClick:i[1]||(i[1]=n.withModifiers(()=>{},["stop"]))},[n.createElementVNode("div",mr,[n.createElementVNode("div",{class:"distinguish-modal-close",onClick:i[0]||(i[0]=a=>r("close"))}),n.renderSlot(s.$slots,"header")]),n.createElementVNode("div",hr,[n.renderSlot(s.$slots,"body")]),n.createElementVNode("div",gr,[n.renderSlot(s.$slots,"footer")])],6)])],32)]),_:3}))}}),yr={class:"distinguish-list-checkboxes"},br=["value"],_r=n.defineComponent({__name:"FilterKeywords",setup(e){const t=D(),r=B(),o=n.ref(!1),s=n.computed({get:()=>r.getKeywordIds,set:i=>{r.$patch({keywordIds:i})}});return(i,a)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(ie,{color:"primary",size:"medium",disabled:!n.unref(t).getKeywords.length,title:n.unref(t).getKeywords.length?"":"No tags defined.",onClick:a[0]||(a[0]=c=>o.value=!0)},{default:n.withCtx(()=>a[3]||(a[3]=[n.createTextVNode(" Keyword ")])),_:1},8,["disabled","title"]),o.value?(n.openBlock(),n.createBlock(Ne,{key:0,onClose:a[2]||(a[2]=c=>o.value=!1)},{header:n.withCtx(()=>a[4]||(a[4]=[n.createElementVNode("h3",null,"Keywords",-1)])),body:n.withCtx(()=>[n.createElementVNode("ul",yr,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(t).getKeywords,({keywordId:c,name:u})=>(n.openBlock(),n.createElementBlock("li",{key:c},[n.createElementVNode("label",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":a[1]||(a[1]=d=>s.value=d),value:c,type:"checkbox"},null,8,br),[[n.vModelCheckbox,s.value]]),n.createTextVNode(" "+n.toDisplayString(u),1)])]))),128))])]),_:1})):n.createCommentVNode("",!0)],64))}}),Er=n.defineComponent({__name:"SettingRefresh",setup(e){const t=P(),r=n.computed({get:()=>t.getRefreshOnlyTaxa,set:o=>{t.setRefreshOnlyTaxa(o)}});return(o,s)=>(n.openBlock(),n.createElementBlock("label",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i),type:"checkbox"},null,512),[[n.vModelCheckbox,r.value]]),s[1]||(s[1]=n.createTextVNode(" Refresh only taxa "))]))}}),ae=(e,t)=>{const r=e.__vccOpts||e;for(const[o,s]of t)r[o]=s;return r},kr={},wr={class:"distinguish-menu-list"};function Sr(e,t){return n.openBlock(),n.createElementBlock("ul",wr,[n.renderSlot(e.$slots,"default")])}const Br=ae(kr,[["render",Sr]]),Cr={},Nr={class:"distinguish-list-item"};function Rr(e,t){return n.openBlock(),n.createElementBlock("li",Nr,[n.renderSlot(e.$slots,"default")])}const F=ae(Cr,[["render",Rr]]),gt={"distinguish-layout-mode-1":"distinguish-layout-mode-2","distinguish-layout-mode-2":"distinguish-layout-mode-1"},Tr={},xr={class:"distinguish-grid"};function Or(e,t){return n.openBlock(),n.createElementBlock("div",xr,[n.renderSlot(e.$slots,"default")])}const yt=ae(Tr,[["render",Or]]),Dr=n.defineComponent({__name:"GridToggle",setup(e){const t=P(),r=n.computed(()=>t.getLayout),o=()=>{t.$patch({gridLayout:gt[r.value]})};return(s,i)=>(n.openBlock(),n.createBlock(ie,{class:n.normalizeClass(n.unref(gt)[r.value]),onClick:o},{default:n.withCtx(()=>[n.createVNode(yt,{class:"distinguish-grid-icon"},{default:n.withCtx(()=>i[0]||(i[0]=[n.createElementVNode("div",{class:"distinguish-panel-descriptors"},null,-1),n.createElementVNode("div",{class:"distinguish-panel-remaining"},null,-1),n.createElementVNode("div",{class:"distinguish-panel-eliminated"},null,-1)])),_:1})]),_:1},8,["class"]))}}),Vr=n.defineComponent({__name:"ResetButton",setup(e){const t=B();return(r,o)=>(n.openBlock(),n.createBlock(ie,{color:"primary",size:"medium",onClick:o[0]||(o[0]=s=>n.unref(t).$reset())},{default:n.withCtx(()=>o[1]||(o[1]=[n.createTextVNode(" Reset ")])),_:1}))}}),Ar={class:"distinguish-header-error-message"},Ir=n.defineComponent({__name:"ErrorMessage",setup(e){const t=P();return(r,o)=>(n.openBlock(),n.createElementBlock("span",Ar,n.toDisplayString(n.unref(t).getErrorMessage),1))}}),Lr={class:"distinguish-header-bar"},Ur={class:"distinguish-header-bar__buttons"},$r=n.defineComponent({__name:"HeaderBar",setup(e){return(t,r)=>(n.openBlock(),n.createElementBlock("div",Lr,[n.createVNode(Ir),n.createVNode(Br,null,{default:n.withCtx(()=>[n.createVNode(F,null,{default:n.withCtx(()=>[n.createVNode(Er)]),_:1}),n.createVNode(F,null,{default:n.withCtx(()=>[n.createVNode(or)]),_:1}),n.createVNode(F,null,{default:n.withCtx(()=>[n.createVNode(ir)]),_:1}),n.createVNode(F,null,{default:n.withCtx(()=>[n.createVNode(cr)]),_:1}),n.createVNode(F,null,{default:n.withCtx(()=>[n.createVNode(pr)]),_:1}),n.createVNode(F,null,{default:n.withCtx(()=>[n.createVNode(lr)]),_:1}),n.createVNode(F,null,{default:n.withCtx(()=>[n.createVNode(_r)]),_:1})]),_:1}),n.createElementVNode("div",Ur,[n.createVNode(Vr),n.createVNode(Dr)])]))}}),Pr={},Fr={class:"distinguish-panel"};function Mr(e,t){return n.openBlock(),n.createElementBlock("div",Fr,[n.renderSlot(e.$slots,"default")])}const Re=ae(Pr,[["render",Mr]]),jr=["innerHTML"],qr=n.defineComponent({__name:"PanelEliminated",props:{render:{type:Function}},setup(e){const t=D(),r=n.computed(()=>t.getEliminated);return(o,s)=>(n.openBlock(),n.createBlock(Re,{class:"distinguish-panel-eliminated"},{default:n.withCtx(()=>[n.createElementVNode("h2",null,"Eliminated ("+n.toDisplayString(r.value.length)+")",1),n.createElementVNode("ul",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value,i=>(n.openBlock(),n.createElementBlock("li",{key:i.rowId,class:"distinguish-row-item"},[n.renderSlot(o.$slots,"default",{item:i},()=>[n.createElementVNode("span",{innerHTML:o.render?o.render(i):i.objectTag},null,8,jr)])]))),128))])]),_:3}))}}),Hr={class:"distinguish-list-checkboxes"},zr=["value"],Kr=n.defineComponent({__name:"FilterRow",setup(e){const t=D(),r=P(),o=B(),s=n.ref(!1),i=n.ref([]),a=n.computed(()=>{const u=o.getRowIds,d=i.value;return u.length!==d.length||!u.every(p=>d.includes(p))}),c=n.computed({get:()=>o.getRowIds,set:u=>{o.$patch({rowIds:u})}});return n.watch(s,u=>{r.setShouldUpdate(!u),!u&&a.value&&r.checkUpdate(),i.value=o.getRowIds}),(u,d)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(ie,{color:"primary",size:"medium",onClick:d[0]||(d[0]=p=>s.value=!0)},{default:n.withCtx(()=>d[3]||(d[3]=[n.createTextVNode(" Select ")])),_:1}),s.value?(n.openBlock(),n.createBlock(Ne,{key:0,onClose:d[2]||(d[2]=p=>s.value=!1)},{header:n.withCtx(()=>d[4]||(d[4]=[n.createElementVNode("h3",null,"Filter row",-1)])),body:n.withCtx(()=>[n.createElementVNode("div",null,[n.createElementVNode("ul",Hr,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(t).getRemaining,p=>(n.openBlock(),n.createElementBlock("li",{key:p.rowId},[n.createElementVNode("label",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":d[1]||(d[1]=f=>c.value=f),value:p.rowId,type:"checkbox"},null,8,zr),[[n.vModelCheckbox,c.value]]),n.createTextVNode(" "+n.toDisplayString(p.objectLabel),1)])]))),128))])])]),_:1})):n.createCommentVNode("",!0)],64))}}),Jr={class:"distinguish-title-section"},Wr=["innerHTML"],Gr=n.defineComponent({__name:"PanelRemaining",props:{render:{type:Function}},setup(e){const t=D(),r=n.computed(()=>t.getRemaining);return(o,s)=>(n.openBlock(),n.createBlock(Re,{class:"distinguish-panel-remaining"},{default:n.withCtx(()=>[n.createElementVNode("div",Jr,[n.createElementVNode("h2",null,"Remaining ("+n.toDisplayString(r.value.length)+")",1),n.createVNode(Kr)]),n.createElementVNode("ul",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value,i=>(n.openBlock(),n.createElementBlock("li",{key:i.rowId,class:"distinguish-row-item"},[n.renderSlot(o.$slots,"default",{item:i},()=>[n.createElementVNode("span",{innerHTML:o.render?o.render(i):i.objectTag},null,8,Wr)])]))),128))])]),_:3}))}});class Xr{static find(t){return ft().get(`/depictions/${t}.json`,{params:{extend:["image"]}})}}const Qr={key:0,class:"distinguish-depiction-box"},Yr=["src"],bt=n.defineComponent({__name:"VDepiction",props:{depictionId:{}},setup(e){const t=e,r=n.ref();return Xr.find(t.depictionId).then(({data:o})=>{r.value=Xn(o)}),(o,s)=>r.value?(n.openBlock(),n.createElementBlock("div",Qr,[n.createElementVNode("img",{src:r.value.imageUrl},null,8,Yr)])):n.createCommentVNode("",!0)}}),Zr={class:"distinguish-character-descriptor__cell"},vr=["value"],eo=n.defineComponent({__name:"CharacterStateCell",props:{characterState:{},descriptorId:{}},setup(e){const t=e,r=B(),o=n.computed({get:()=>r.getDescriptorValueById(t.descriptorId)||[],set:s=>{s.length?r.setDescriptor({descriptorId:t.descriptorId,value:s}):r.removeDescriptor(t.descriptorId)}});return(s,i)=>(n.openBlock(),n.createElementBlock("div",Zr,[n.createElementVNode("label",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.characterState.depictionIds,a=>(n.openBlock(),n.createBlock(bt,{key:a,"depiction-id":a},null,8,["depiction-id"]))),128)),n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=a=>o.value=a),value:s.characterState.characterStateId,type:"checkbox"},null,8,vr),[[n.vModelCheckbox,o.value]]),n.createTextVNode(" "+n.toDisplayString(s.characterState.name),1)])]))}}),to={class:"distinguish-character-states-grid"},no=n.defineComponent({__name:"CharacterStateGrid",props:{descriptor:{}},setup(e){const t=e,r=B(),o=P(),s=n.ref(),i=n.computed(()=>{const a=r.getDescriptorValueById(t.descriptor.descriptorId)||[],c=s.value||[];return a.length!==c.length||!a.every(u=>c.includes(u))});return n.onMounted(()=>{o.setShouldUpdate(!1),s.value=r.getDescriptorValueById(t.descriptor.descriptorId)}),n.onUnmounted(()=>{o.setShouldUpdate(!0),i.value&&o.checkUpdate()}),(a,c)=>(n.openBlock(),n.createElementBlock("div",to,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.descriptor.characterStates,u=>(n.openBlock(),n.createBlock(eo,{key:u.characterStateId,"descriptor-id":a.descriptor.descriptorId,"character-state":u},null,8,["descriptor-id","character-state"]))),128))]))}}),ro={key:0},oo={key:1},so={class:"descriptor-modal__depiction"},io=n.defineComponent({__name:"DescriptorModal",props:{descriptor:{}},setup(e){return(t,r)=>(n.openBlock(),n.createBlock(Ne,{"container-class":"distinguish-descriptor-modal"},{header:n.withCtx(()=>[n.createElementVNode("h3",null,n.toDisplayString(t.descriptor.name),1),t.descriptor.description?(n.openBlock(),n.createElementBlock("span",ro,n.toDisplayString(t.descriptor.description),1)):(n.openBlock(),n.createElementBlock("i",oo," No further description available. "))]),body:n.withCtx(()=>[n.createElementVNode("div",so,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(t.descriptor.depictionIds,o=>(n.openBlock(),n.createBlock(bt,{key:o,"depiction-id":o},null,8,["depiction-id"]))),128))]),r[0]||(r[0]=n.createElementVNode("hr",null,null,-1)),t.descriptor.type===n.unref(G).Qualitative?(n.openBlock(),n.createBlock(no,{key:0,descriptor:t.descriptor},null,8,["descriptor"])):n.createCommentVNode("",!0)]),_:1}))}}),ao=["id"],co={class:"distinguish-input-label"},ce=n.defineComponent({__name:"DescriptorContainer",props:{descriptor:{}},setup(e){const t=n.ref(!1);return(r,o)=>(n.openBlock(),n.createElementBlock("div",{id:`descriptor-${r.descriptor.descriptorId}`,class:"distinguish-descriptor-container"},[n.createElementVNode("div",co,[n.createElementVNode("span",{class:"distinguish-link",onClick:o[0]||(o[0]=s=>t.value=!0)},[n.renderSlot(r.$slots,"title",{},()=>[n.createTextVNode(n.toDisplayString(r.descriptor.name),1)])])]),n.renderSlot(r.$slots,"default"),t.value?(n.openBlock(),n.createBlock(io,{key:0,descriptor:r.descriptor,onClose:o[1]||(o[1]=s=>t.value=!1)},null,8,["descriptor"])):n.createCommentVNode("",!0)],8,ao))}}),lo=n.defineComponent({__name:"DescriptorContinuous",props:{descriptor:{}},setup(e){const t=e,r=B(),o=n.ref(String(r.getDescriptorValueById(t.descriptor.descriptorId))),s=()=>{const{descriptorId:i}=t.descriptor,a=o.value.trim();a?r.setDescriptor({descriptorId:i,value:a}):r.removeDescriptor(i)};return(i,a)=>(n.openBlock(),n.createBlock(ce,{class:"distinguish-descriptor-continuous",descriptor:i.descriptor},{title:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(i.descriptor.name)+" ("+n.toDisplayString(i.descriptor.min)+"-"+n.toDisplayString(i.descriptor.max)+" "+n.toDisplayString(i.descriptor.defaultUnit)+") ",1)]),default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=c=>o.value=c),type:"text",onBlur:s,onKeyup:n.withKeys(s,["enter"])},null,544),[[n.vModelText,o.value]])]),_:1},8,["descriptor"]))}}),po=["value"],uo={key:0},fo=n.defineComponent({__name:"DescriptorPresenceAbsence",props:{descriptor:{}},setup(e){const t={Presence:!0,Absent:!1},r=e,o=B(),s=n.computed({get:()=>o.getDescriptorValueById(r.descriptor.descriptorId),set:a=>{const{descriptorId:c}=r.descriptor;typeof a=="boolean"?o.setDescriptor({descriptorId:c,value:!!a}):o.removeDescriptor(c)}}),i=a=>{var u;const{states:c}=r.descriptor;return((u=c.find(d=>d.name===String(a)))==null?void 0:u.numberOfObjects)||0};return(a,c)=>(n.openBlock(),n.createBlock(ce,{class:"distinguish-descriptor-presence-absence",descriptor:a.descriptor},{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":c[0]||(c[0]=u=>s.value=u)},[c[1]||(c[1]=n.createElementVNode("option",null,null,-1)),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(t,(u,d)=>n.createElementVNode("option",{key:d,value:u},[a.descriptor.status===n.unref(W).Useless?(n.openBlock(),n.createElementBlock("span",uo,"-")):n.createCommentVNode("",!0),n.createTextVNode(" "+n.toDisplayString(d)+" ("+n.toDisplayString(i(u))+") ",1)],8,po)),64))],512),[[n.vModelSelect,s.value]])]),_:1},8,["descriptor"]))}}),mo=["value","selected"],ho={key:0},go={key:1},yo=n.defineComponent({__name:"DescriptorQualitative",props:{descriptor:{}},setup(e){const t=e,r=B(),o=i=>{const a=i.target,{descriptorId:c}=t.descriptor;a.value?r.setDescriptor({descriptorId:c,value:[Number(a.value)]}):r.removeDescriptor(c)},s=i=>r.getDescriptorValueById(t.descriptor.descriptorId).includes(i.characterStateId);return(i,a)=>(n.openBlock(),n.createBlock(ce,{class:"distinguish-descriptor-qualitative",descriptor:i.descriptor},{default:n.withCtx(()=>[n.createElementVNode("select",{name:"listbox",onChange:o},[a[0]||(a[0]=n.createElementVNode("option",{value:""},null,-1)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.descriptor.characterStates,c=>(n.openBlock(),n.createElementBlock("option",{key:c.characterStateId,value:c.characterStateId,selected:s(c)},[s(c)?(n.openBlock(),n.createElementBlock("span",ho,">")):n.createCommentVNode("",!0),c.status===n.unref(W).Useless?(n.openBlock(),n.createElementBlock("span",go,"-")):n.createCommentVNode("",!0),n.createTextVNode(" "+n.toDisplayString(c.name)+" ("+n.toDisplayString(c.numberOfObjects)+") ",1)],8,mo))),128))],32)]),_:1},8,["descriptor"]))}}),bo=n.defineComponent({__name:"DescriptorSample",props:{descriptor:{}},setup(e){const t=e,r=B(),o=n.ref(String(r.getDescriptorValueById(t.descriptor.descriptorId))),s=()=>{const{descriptorId:i}=t.descriptor,a=o.value.trim();a?r.setDescriptor({descriptorId:i,value:a}):r.removeDescriptor(i)};return(i,a)=>(n.openBlock(),n.createBlock(ce,{class:"distinguish-descriptor-sample",descriptor:i.descriptor},{title:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(i.descriptor.name)+" ("+n.toDisplayString(i.descriptor.min)+"-"+n.toDisplayString(i.descriptor.max)+" "+n.toDisplayString(i.descriptor.defaultUnit)+") ",1)]),default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=c=>o.value=c),type:"text",onBlur:s,onKeyup:n.withKeys(s,["enter"])},null,544),[[n.vModelText,o.value]])]),_:1},8,["descriptor"]))}}),Te=n.defineComponent({__name:"DescriptorsList",props:{title:{},descriptors:{}},setup(e){const t={DescriptorContinuous:lo,DescriptorPresenceAbsence:fo,DescriptorQualitative:yo,DescriptorSample:bo},r=o=>{const s=o.replace("::","");return t[s]};return(o,s)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createElementVNode("h2",null,n.toDisplayString(o.title),1),n.createElementVNode("ol",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.descriptors,i=>(n.openBlock(),n.createElementBlock("li",{key:i.descriptorId},[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(r(i.type)),{descriptor:i},null,8,["descriptor"]))]))),128))])],64))}}),_o=n.defineComponent({__name:"PanelDescriptors",setup(e){const t=D();return(r,o)=>(n.openBlock(),n.createBlock(Re,{class:"distinguish-panel-descriptors"},{default:n.withCtx(()=>[n.unref(t).getDescriptorsUsed.length?(n.openBlock(),n.createBlock(Te,{key:0,descriptors:n.unref(t).getDescriptorsUsed,title:"Used Descriptors"},null,8,["descriptors"])):n.createCommentVNode("",!0),n.unref(t).getDescriptorsUseful.length?(n.openBlock(),n.createBlock(Te,{key:1,descriptors:n.unref(t).getDescriptorsUseful,title:"Descriptors Useful for Identification"},null,8,["descriptors"])):n.createCommentVNode("",!0),n.unref(t).getDescriptorsUseless.length?(n.openBlock(),n.createBlock(Te,{key:2,descriptors:n.unref(t).getDescriptorsUseless,title:"Descriptors no longer relevant for identification"},null,8,["descriptors"])):n.createCommentVNode("",!0)]),_:1}))}}),Eo={class:"distinguish-spinner-container"},ko={class:"distinguish-spinner-legend"},wo=["innerHTML"],So=n.defineComponent({__name:"VSpinner",props:{legend:{type:String,default:"Loading, please wait."}},setup(e){return(t,r)=>(n.openBlock(),n.createBlock(n.Transition,{name:"fade"},{default:n.withCtx(()=>[n.createElementVNode("div",Eo,[n.createElementVNode("div",null,[r[0]||(r[0]=n.createElementVNode("div",{class:"distinguish-spinner"},null,-1)),n.createElementVNode("div",ko,[n.createElementVNode("span",{innerHTML:e.legend},null,8,wo),n.renderSlot(t.$slots,"default")])])])]),_:3}))}}),Bo={class:"distinguish-title"},Co={key:0},No=n.defineComponent({__name:"TitleMatrix",setup(e){const t=D();return(r,o)=>(n.openBlock(),n.createElementBlock("h1",Bo,[o[0]||(o[0]=n.createTextVNode(" Interactive key ")),n.unref(t).getObservationMatrix?(n.openBlock(),n.createElementBlock("span",Co,"| "+n.toDisplayString(n.unref(t).getObservationMatrix.name),1)):n.createCommentVNode("",!0)]))}}),Ro=["title"],To=n.defineComponent({__name:"TitleMatrixCitation",setup(e){const t=D(),r=n.computed(()=>{const o=t.getCitation;return Object.values(o||{}).filter(Boolean).join(", ")});return(o,s)=>(n.openBlock(),n.createElementBlock("span",{class:"distinguish-title-citation",title:r.value},n.toDisplayString(r.value),9,Ro))}}),xo={class:"distinguish-title-section"},Oo=n.defineComponent({__name:"TitleKey",setup(e){return(t,r)=>(n.openBlock(),n.createElementBlock("div",xo,[n.createVNode(No),n.createVNode(To)]))}}),Do={class:"distinguish-app-container"},_t=n.defineComponent({name:"Distinguish",__name:"App",props:{observationMatrixId:{},apiConfig:{},renderItem:{type:Function}},setup(e){const t=e,r=P(),o=B(),s=n.computed(()=>r.getIsLoading),i=n.computed(()=>r.getLayout);return(()=>{r.setAPIConfig(t.apiConfig),r.setObservationMatrixId(t.observationMatrixId),r.checkUpdate()})(),o.$subscribe(c=>{r.shouldUpdate&&r.checkUpdate()}),(c,u)=>(n.openBlock(),n.createElementBlock("div",Do,[n.createVNode(Oo),n.createVNode($r),n.createVNode(yt,{class:n.normalizeClass(i.value)},{default:n.withCtx(()=>[n.createVNode(_o),n.createVNode(Gr,{render:t.renderItem},{default:n.withCtx(d=>[n.renderSlot(c.$slots,"remaining-item",n.normalizeProps(n.guardReactiveProps(d)))]),_:3},8,["render"]),n.createVNode(qr,{render:t.renderItem},{default:n.withCtx(d=>[n.renderSlot(c.$slots,"eliminated-item",n.normalizeProps(n.guardReactiveProps(d)))]),_:3},8,["render"])]),_:3},8,["class"]),s.value?(n.openBlock(),n.createBlock(So,{key:0,legend:"Loading interactive key..."})):n.createCommentVNode("",!0)]))}});function Et(e){const t=e||'[data-interactive-key="true"]';return[...document.querySelectorAll(t)].map(s=>kt(s,Ao(s)))}function Vo(){Et()}function Ao(e){return{observationMatrixId:Number(e.getAttribute("data-observation-matrix-id")),apiConfig:{baseURL:e.getAttribute("data-base-url")||"",projectToken:e.getAttribute("data-project-token")||void 0,projectId:Number(e.getAttribute("data-project-id"))||void 0,userToken:e.getAttribute("data-user-token")||void 0,csrfToken:e.getAttribute("data-csrf-token")||void 0}}}function kt(e,t){const{apiConfig:r,observationMatrixId:o}=t;if(!o)throw"Missing observation matrix ID";if(!r||!r.projectToken&&!r.csrfToken&&!(r.projectId&&r.userToken))throw"Missing API configuration";const s=n.createApp(_t,{observationMatrixId:o,apiConfig:r});return s.use(Q.createPinia()),s.mount(e),s}typeof window<"u"&&window.addEventListener("DOMContentLoaded",Vo),O.VueInteractiveKey=_t,O.createInteractiveKey=kt,O.discoverInteractiveKey=Et,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});
|
|
5
|
+
`):" "+at(i[0]):"as no adapter specified";throw new g("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o},adapters:ke};function we(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new q(null,e)}function lt(e){return we(e),e.headers=N.from(e.headers),e.data=be.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ct.getAdapter(e.adapter||J.adapter)(e).then(function(o){return we(e),o.data=be.call(e,e.transformResponse,o),o.headers=N.from(o.headers),o},function(o){return Qe(o)||(we(e),o&&o.response&&(o.response.data=be.call(e,e.transformResponse,o.response),o.response.headers=N.from(o.response.headers))),Promise.reject(o)})}const dt="1.7.7",Ee={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ee[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const pt={};Ee.transitional=function(t,r,o){function s(i,a){return"[Axios v"+dt+"] Transitional option '"+i+"'"+a+(o?". "+o:"")}return(i,a,c)=>{if(t===!1)throw new g(s(a," has been removed"+(r?" in "+r:"")),g.ERR_DEPRECATED);return r&&!pt[a]&&(pt[a]=!0,console.warn(s(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,a,c):!0}};function zn(e,t,r){if(typeof e!="object")throw new g("options must be an object",g.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let s=o.length;for(;s-- >0;){const i=o[s],a=t[i];if(a){const c=e[i],u=c===void 0||a(c,i,e);if(u!==!0)throw new g("option "+i+" must be "+u,g.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new g("Unknown option "+i,g.ERR_BAD_OPTION)}}const Se={assertOptions:zn,validators:Ee},I=Se.validators;class ${constructor(t){this.defaults=t,this.interceptors={request:new Je,response:new Je}}async request(t,r){try{return await this._request(t,r)}catch(o){if(o instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{o.stack?i&&!String(o.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(o.stack+=`
|
|
6
|
+
`+i):o.stack=i}catch{}}throw o}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=U(this.defaults,r);const{transitional:o,paramsSerializer:s,headers:i}=r;o!==void 0&&Se.assertOptions(o,{silentJSONParsing:I.transitional(I.boolean),forcedJSONParsing:I.transitional(I.boolean),clarifyTimeoutError:I.transitional(I.boolean)},!1),s!=null&&(l.isFunction(s)?r.paramsSerializer={serialize:s}:Se.assertOptions(s,{encode:I.function,serialize:I.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=i&&l.merge(i.common,i[r.method]);i&&l.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),r.headers=N.concat(a,i);const c=[];let u=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(u=u&&y.synchronous,c.unshift(y.fulfilled,y.rejected))});const d=[];this.interceptors.response.forEach(function(y){d.push(y.fulfilled,y.rejected)});let p,f=0,b;if(!u){const m=[lt.bind(this),void 0];for(m.unshift.apply(m,c),m.push.apply(m,d),b=m.length,p=Promise.resolve(r);f<b;)p=p.then(m[f++],m[f++]);return p}b=c.length;let w=r;for(f=0;f<b;){const m=c[f++],y=c[f++];try{w=m(w)}catch(h){y.call(this,h);break}}try{p=lt.call(this,w)}catch(m){return Promise.reject(m)}for(f=0,b=d.length;f<b;)p=p.then(d[f++],d[f++]);return p}getUri(t){t=U(this.defaults,t);const r=et(t.baseURL,t.url);return Ke(r,t.params,t.paramsSerializer)}}l.forEach(["delete","get","head","options"],function(t){$.prototype[t]=function(r,o){return this.request(U(o||{},{method:t,url:r,data:(o||{}).data}))}}),l.forEach(["post","put","patch"],function(t){function r(o){return function(i,a,c){return this.request(U(c||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}$.prototype[t]=r(),$.prototype[t+"Form"]=r(!0)});class Be{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const o=this;this.promise.then(s=>{if(!o._listeners)return;let i=o._listeners.length;for(;i-- >0;)o._listeners[i](s);o._listeners=null}),this.promise.then=s=>{let i;const a=new Promise(c=>{o.subscribe(c),i=c}).then(s);return a.cancel=function(){o.unsubscribe(i)},a},t(function(i,a,c){o.reason||(o.reason=new q(i,a,c),r(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=o=>{t.abort(o)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Be(function(s){t=s}),cancel:t}}}function Kn(e){return function(r){return e.apply(null,r)}}function Jn(e){return l.isObject(e)&&e.isAxiosError===!0}const Ce={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ce).forEach(([e,t])=>{Ce[t]=e});function ut(e){const t=new $(e),r=xe($.prototype.request,t);return l.extend(r,$.prototype,t,{allOwnKeys:!0}),l.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return ut(U(e,s))},r}const k=ut(J);k.Axios=$,k.CanceledError=q,k.CancelToken=Be,k.isCancel=Qe,k.VERSION=dt,k.toFormData=ne,k.AxiosError=g,k.Cancel=k.CanceledError,k.all=function(t){return Promise.all(t)},k.spread=Kn,k.isAxiosError=Jn,k.mergeConfig=U,k.AxiosHeaders=N,k.formToJSON=e=>Ge(l.isHTMLForm(e)?new FormData(e):e),k.getAdapter=ct.getAdapter,k.HttpStatusCode=Ce,k.default=k;const ft=(e={})=>{const t=F(),{baseURL:r,projectId:o,projectToken:s,userToken:i,csrfToken:a}=t.getAPIConfig,c={baseURL:r,params:{project_id:o,project_token:s,token:i},...e};return(!s||!(o&&i)&&a)&&Object.assign(c,{headers:{"X-CSRF-Token":a}}),k.create({...c})};class Wn{static key(t,r){return ft().get(`/observation_matrices/${t}/key`,r)}}const G={Used:"used",Useful:"useful",Useless:"useless"},Gn=e=>({characterStateId:e.id,depictionIds:e.depiction_ids,label:e.label,position:e.position,...mt(e)}),Xn=e=>({depictionId:e.id,caption:e.caption,figureLabel:e.figure_label,imageUrl:e.image.medium}),X={Qualitative:"Descriptor::Qualitative",Continuous:"Descriptor::Continuous",Sample:"Descriptor::Sample",PresenceAbsence:"Descriptor::PresenceAbsence"},Q=e=>({descriptorId:e.id,name:e.name,description:e.description,position:e.position,status:e.status,type:e.type,depictionIds:e.depiction_ids,usefulness:e.usefulness,weight:e.weight}),Qn=e=>({...Q(e),defaultUnit:e.default_unit,max:e.max,min:e.min}),Yn=e=>({...Q(e),defaultUnit:e.default_unit,max:e.max,min:e.min}),Zn=e=>({...Q(e),states:e.states.map(t=>mt(t))}),vn=e=>({...Q(e),characterStates:e.states.map(t=>Gn(t))}),er=e=>{switch(e.type){case X.Continuous:return Qn(e);case X.Sample:return Yn(e);case X.PresenceAbsence:return Zn(e);case X.Qualitative:return vn(e);default:return Q(e)}},tr=e=>({observationMatrixId:e.observation_matrix_id,name:e.observation_matrix.name,globalId:e.observation_matrix.global_id}),mt=e=>({name:e.name,numberOfObjects:e.number_of_objects,status:e.status}),ht=e=>({errorDescriptors:e.error_descriptors,errors:e.errors,objectLabel:e.object.object_label,objectTag:e.object.object_tag,observationObjectId:e.object.observation_object_id,observationObjectType:e.object.observation_object_type,rowId:e.object.id}),nr=e=>({keywordId:e.id,definition:e.description,name:e.name}),rr=e=>({languageId:e.id,name:e.english_name}),O=Y.defineStore("observationMatrix",{state:()=>({observationMatrix:void 0,citation:void 0,descriptors:[],eliminated:[],remaining:[],availableKeywords:[],availableLanguages:[]}),getters:{getCitation:e=>e.citation,getObservationMatrix:e=>e.observationMatrix,getDescriptors:e=>e.descriptors,getDescriptorById:e=>t=>e.descriptors.find(r=>r.descriptorId===t),getDescriptorsUsed:e=>e.descriptors.filter(t=>t.status===G.Used),getDescriptorsUseless:e=>e.descriptors.filter(t=>t.status===G.Useless),getDescriptorsUseful:e=>e.descriptors.filter(t=>t.status===G.Useful),getEliminated:e=>e.eliminated,getKeywords:e=>e.availableKeywords,getLanguages:e=>e.availableLanguages,getRemaining:e=>e.remaining},actions:{setDescriptors(e){this.descriptors=e},setEliminated(e){this.eliminated=e},setRemaining(e){this.remaining=e},setLanguages(e){this.availableLanguages=e},setKeywords(e){this.availableKeywords=e},setObservationMatrix(e){this.observationMatrix=e},async requestInteractiveKey({observationMatrixId:e,params:t={},opt:r={}}){const o=await Wn.key(e,{params:t}),{data:s}=o;return r.refreshOnlyTaxa||(this.setObservationMatrix(tr(s)),this.setDescriptors(s.list_of_descriptors.map(i=>er(i))),this.setKeywords(s.descriptor_available_keywords.map(i=>nr(i))),this.setLanguages(s.descriptor_available_languages.map(i=>rr(i)))),this.setEliminated(s.eliminated.map(i=>ht(i))),this.setRemaining(s.remaining.map(i=>ht(i))),o}}}),B=Y.defineStore("filter",{state:()=>({descriptors:{},eliminateUnknown:void 0,rowFilter:!0,errorTolerance:void 0,identifiedToRank:void 0,keywordIds:[],languageId:void 0,rowIds:[],sorting:void 0}),getters:{getKeywordIds:e=>e.keywordIds,getLanguageId:e=>e.languageId,getRowIds:e=>e.rowIds,getRowFilter:e=>e.rowFilter,getDescriptors:e=>e.descriptors,getIdentifiedToRank:e=>e.identifiedToRank,getEliminateUknown:e=>e.eliminateUnknown,getErrorTolerance:e=>e.errorTolerance,getSorting:e=>e.sorting,getDescriptorValueById:e=>t=>{const r=e.descriptors[t];return typeof r=="boolean"?r:r||""},getFilterParams:e=>({selected_descriptors:Object.entries(e.descriptors).map(([r,o])=>Array.isArray(o)?`${r}:${o.join("|")}`:`${r}:${o}`).join("||"),language_id:e.languageId,keyword_ids:e.keywordIds,sorting:e.sorting,identified_to_rank:e.identifiedToRank,error_tolerance:e.errorTolerance,eliminate_unknown:e.eliminateUnknown,row_filter:e.rowFilter?e.rowIds.join("|"):[]})},actions:{setDescriptor({descriptorId:e,value:t}){this.descriptors[e]=t},removeDescriptor(e){delete this.descriptors[e]},removeKeywordId(e){const t=this.keywordIds.findIndex(r=>r===e);t>-1&&this.keywordIds.splice(t,1)},addKeywordId(e){this.keywordIds.push(e)},setLanguageId(e){this.languageId=e},setErrorTolerance(e){this.errorTolerance=e},setEliminateUnknown(e){this.eliminateUnknown=e}}}),F=Y.defineStore("settings",{state:()=>({gridLayout:"distinguish-layout-mode-1",isLoading:!1,isRefreshing:!1,refreshOnlyTaxa:!1,shouldUpdate:!0,observationMatrixId:void 0,errorMessage:"",apiConfig:{baseURL:"",projectId:void 0,projectToken:void 0,userToken:void 0}}),getters:{getErrorMessage:e=>e.errorMessage,getIsLoading:e=>e.isLoading,getLayout:e=>e.gridLayout,getRefreshOnlyTaxa:e=>e.refreshOnlyTaxa,getShouldUpdate:e=>e.shouldUpdate,getObservationMatrixId:e=>e.observationMatrixId,getAPIConfig:e=>e.apiConfig},actions:{setObservationMatrixId(e){this.observationMatrixId=e},setShouldUpdate(e){this.shouldUpdate=e},setRefreshOnlyTaxa(e){this.refreshOnlyTaxa=e},setAPIConfig(e){this.apiConfig=e},checkUpdate(){const e=B(),t=O(),r=this.observationMatrixId;this.shouldUpdate&&r&&(this.isLoading=!0,t.requestInteractiveKey({observationMatrixId:r,params:e.getFilterParams,opt:{refreshOnlyTaxa:this.refreshOnlyTaxa}}).then(o=>this.errorMessage="").catch(o=>this.errorMessage=o.message).finally(()=>this.isLoading=!1))}}}),or=n.defineComponent({__name:"FilterEliminateUnknowns",setup(e){const t=B(),r=n.computed({get:()=>!!t.getEliminateUknown,set:o=>{t.setEliminateUnknown(o)}});return(o,s)=>(n.openBlock(),n.createElementBlock("label",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i),type:"checkbox"},null,512),[[n.vModelCheckbox,r.value]]),s[1]||(s[1]=n.createTextVNode(" Eliminate unknowns "))]))}}),sr=["value"],ir=n.defineComponent({__name:"FilterErrorTolerance",setup(e){const t=[0,1,2],r=B(),o=n.computed({get:()=>r.getErrorTolerance,set:s=>{r.setErrorTolerance(s)}});return(s,i)=>(n.openBlock(),n.createElementBlock("div",null,[i[2]||(i[2]=n.createElementVNode("label",{for:"languages",class:"distinguish-input-label"}," Error tolerance ",-1)),n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":i[0]||(i[0]=a=>o.value=a),name:"languages",role:"listbox"},[i[1]||(i[1]=n.createElementVNode("option",{value:""},null,-1)),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(t,a=>n.createElementVNode("option",{key:a,value:a},n.toDisplayString(a),9,sr)),64))],512),[[n.vModelSelect,o.value]])]))}}),ar=["otu","subspecies","species","subgenus","genus","subtribe","tribe","subfamily","family"],cr=n.defineComponent({__name:"FilterRank",setup(e){const t=B(),r=n.computed({get(){return t.getIdentifiedToRank},set(o){t.$patch({identifiedToRank:o})}});return(o,s)=>(n.openBlock(),n.createElementBlock("div",null,[s[2]||(s[2]=n.createElementVNode("label",{class:"distinguish-input-label"},"Identified to rank",-1)),n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i)},[s[1]||(s[1]=n.createElementVNode("option",{value:void 0},null,-1)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(ar),i=>(n.openBlock(),n.createElementBlock("option",{key:i},n.toDisplayString(i),1))),128))],512),[[n.vModelSelect,r.value]])]))}}),lr=n.defineComponent({__name:"FilterSort",setup(e){const t=["ordered","weighted","optimized"],r=B(),o=n.computed({get(){return r.getSorting},set(s){r.$patch({sorting:s})}});return(s,i)=>(n.openBlock(),n.createElementBlock("div",null,[i[2]||(i[2]=n.createElementVNode("label",{class:"distinguish-input-label"},"Descriptor sorting",-1)),n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":i[0]||(i[0]=a=>o.value=a)},[i[1]||(i[1]=n.createElementVNode("option",{value:void 0},null,-1)),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(t,a=>n.createElementVNode("option",{key:a},n.toDisplayString(a),1)),64))],512),[[n.vModelSelect,o.value]])]))}}),dr=["value"],pr=n.defineComponent({__name:"FilterLanguage",setup(e){const t=B(),r=O(),o=n.computed({get:()=>t.getLanguageId,set:s=>{t.setLanguageId(Number(s))}});return(s,i)=>(n.openBlock(),n.createElementBlock("div",null,[i[1]||(i[1]=n.createElementVNode("label",{for:"languages",class:"distinguish-input-label"}," Languages ",-1)),n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":i[0]||(i[0]=a=>o.value=a),name:"languages",role:"listbox"},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(r).getLanguages,({languageId:a,name:c})=>(n.openBlock(),n.createElementBlock("option",{key:a,value:a},n.toDisplayString(c),9,dr))),128))],512),[[n.vModelSelect,o.value]])]))}}),ur=["disabled"],H=n.defineComponent({__name:"VBtn",props:{color:{default:"primary"},size:{default:"medium"},disabled:{type:Boolean}},setup(e){const t=e,r=n.computed(()=>[`distinguish-btn-${t.color}-color`,`distinguish-btn-${t.size}-size`]);return(o,s)=>(n.openBlock(),n.createElementBlock("button",{type:"button",class:n.normalizeClass(["distinguish-btn",r.value]),disabled:o.disabled},[n.renderSlot(o.$slots,"default")],10,ur))}}),fr={class:"distinguish-modal-wrapper"},mr={class:"distinguish-modal-header"},hr={class:"distinguish-modal-body"},gr={class:"distinguish-modal-footer"},Ne=n.defineComponent({__name:"VModal",props:{containerClass:{},containerStyle:{}},emits:["close"],setup(e,{emit:t}){const r=t,o=s=>{s.preventDefault(),s.key==="Escape"&&r("close")};return n.onMounted(()=>document.addEventListener("keydown",o)),n.onUnmounted(()=>document.removeEventListener("keydown",o)),(s,i)=>(n.openBlock(),n.createBlock(n.Transition,{name:"distinguish-modal"},{default:n.withCtx(()=>[n.createElementVNode("div",{class:"distinguish-modal-mask",onClick:i[2]||(i[2]=a=>r("close")),onKey:i[3]||(i[3]=a=>r("close"))},[n.createElementVNode("div",fr,[n.createElementVNode("div",{class:n.normalizeClass(["distinguish-modal-container",s.containerClass]),style:n.normalizeStyle({...s.containerStyle}),onClick:i[1]||(i[1]=n.withModifiers(()=>{},["stop"]))},[n.createElementVNode("div",mr,[n.createElementVNode("div",{class:"distinguish-modal-close",onClick:i[0]||(i[0]=a=>r("close"))}),n.renderSlot(s.$slots,"header")]),n.createElementVNode("div",hr,[n.renderSlot(s.$slots,"body")]),n.createElementVNode("div",gr,[n.renderSlot(s.$slots,"footer")])],6)])],32)]),_:3}))}}),yr={class:"distinguish-list-checkboxes"},br=["value"],_r=n.defineComponent({__name:"FilterKeywords",setup(e){const t=O(),r=B(),o=n.ref(!1),s=n.computed({get:()=>r.getKeywordIds,set:i=>{r.$patch({keywordIds:i})}});return(i,a)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(H,{color:"primary",size:"medium",disabled:!n.unref(t).getKeywords.length,title:n.unref(t).getKeywords.length?"":"No tags defined.",onClick:a[0]||(a[0]=c=>o.value=!0)},{default:n.withCtx(()=>a[3]||(a[3]=[n.createTextVNode(" Keyword ")])),_:1},8,["disabled","title"]),o.value?(n.openBlock(),n.createBlock(Ne,{key:0,onClose:a[2]||(a[2]=c=>o.value=!1)},{header:n.withCtx(()=>a[4]||(a[4]=[n.createElementVNode("h3",null,"Keywords",-1)])),body:n.withCtx(()=>[n.createElementVNode("ul",yr,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(t).getKeywords,({keywordId:c,name:u})=>(n.openBlock(),n.createElementBlock("li",{key:c},[n.createElementVNode("label",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":a[1]||(a[1]=d=>s.value=d),value:c,type:"checkbox"},null,8,br),[[n.vModelCheckbox,s.value]]),n.createTextVNode(" "+n.toDisplayString(u),1)])]))),128))])]),_:1})):n.createCommentVNode("",!0)],64))}}),kr=n.defineComponent({__name:"SettingRefresh",setup(e){const t=F(),r=n.computed({get:()=>t.getRefreshOnlyTaxa,set:o=>{t.setRefreshOnlyTaxa(o)}});return(o,s)=>(n.openBlock(),n.createElementBlock("label",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i),type:"checkbox"},null,512),[[n.vModelCheckbox,r.value]]),s[1]||(s[1]=n.createTextVNode(" Refresh only taxa "))]))}}),ae=(e,t)=>{const r=e.__vccOpts||e;for(const[o,s]of t)r[o]=s;return r},wr={},Er={class:"distinguish-menu-list"};function Sr(e,t){return n.openBlock(),n.createElementBlock("ul",Er,[n.renderSlot(e.$slots,"default")])}const Br=ae(wr,[["render",Sr]]),Cr={},Nr={class:"distinguish-list-item"};function Rr(e,t){return n.openBlock(),n.createElementBlock("li",Nr,[n.renderSlot(e.$slots,"default")])}const P=ae(Cr,[["render",Rr]]),gt={"distinguish-layout-mode-1":"distinguish-layout-mode-2","distinguish-layout-mode-2":"distinguish-layout-mode-1"},Tr={},xr={class:"distinguish-grid"};function Dr(e,t){return n.openBlock(),n.createElementBlock("div",xr,[n.renderSlot(e.$slots,"default")])}const yt=ae(Tr,[["render",Dr]]),Or=n.defineComponent({__name:"GridToggle",setup(e){const t=F(),r=n.computed(()=>t.getLayout),o=()=>{t.$patch({gridLayout:gt[r.value]})};return(s,i)=>(n.openBlock(),n.createBlock(H,{class:n.normalizeClass(n.unref(gt)[r.value]),onClick:o},{default:n.withCtx(()=>[n.createVNode(yt,{class:"distinguish-grid-icon"},{default:n.withCtx(()=>i[0]||(i[0]=[n.createElementVNode("div",{class:"distinguish-panel-descriptors"},null,-1),n.createElementVNode("div",{class:"distinguish-panel-remaining"},null,-1),n.createElementVNode("div",{class:"distinguish-panel-eliminated"},null,-1)])),_:1})]),_:1},8,["class"]))}}),Vr=n.defineComponent({__name:"ResetButton",setup(e){const t=B();return(r,o)=>(n.openBlock(),n.createBlock(H,{color:"primary",size:"medium",onClick:o[0]||(o[0]=s=>n.unref(t).$reset())},{default:n.withCtx(()=>o[1]||(o[1]=[n.createTextVNode(" Reset ")])),_:1}))}}),Ir={class:"distinguish-header-error-message"},Ar=n.defineComponent({__name:"ErrorMessage",setup(e){const t=F();return(r,o)=>(n.openBlock(),n.createElementBlock("span",Ir,n.toDisplayString(n.unref(t).getErrorMessage),1))}}),Lr={class:"distinguish-header-bar"},Ur={class:"distinguish-header-bar__buttons"},$r=n.defineComponent({__name:"HeaderBar",setup(e){return(t,r)=>(n.openBlock(),n.createElementBlock("div",Lr,[n.createVNode(Ar),n.createVNode(Br,null,{default:n.withCtx(()=>[n.createVNode(P,null,{default:n.withCtx(()=>[n.createVNode(kr)]),_:1}),n.createVNode(P,null,{default:n.withCtx(()=>[n.createVNode(or)]),_:1}),n.createVNode(P,null,{default:n.withCtx(()=>[n.createVNode(ir)]),_:1}),n.createVNode(P,null,{default:n.withCtx(()=>[n.createVNode(cr)]),_:1}),n.createVNode(P,null,{default:n.withCtx(()=>[n.createVNode(pr)]),_:1}),n.createVNode(P,null,{default:n.withCtx(()=>[n.createVNode(lr)]),_:1}),n.createVNode(P,null,{default:n.withCtx(()=>[n.createVNode(_r)]),_:1})]),_:1}),n.createElementVNode("div",Ur,[n.createVNode(Vr),n.createVNode(Or)])]))}}),Fr={},Pr={class:"distinguish-panel"};function Mr(e,t){return n.openBlock(),n.createElementBlock("div",Pr,[n.renderSlot(e.$slots,"default")])}const Re=ae(Fr,[["render",Mr]]),jr=["innerHTML"],qr=n.defineComponent({__name:"PanelEliminated",props:{render:{type:Function}},setup(e){const t=O(),r=n.computed(()=>t.getEliminated);return(o,s)=>(n.openBlock(),n.createBlock(Re,{class:"distinguish-panel-eliminated"},{default:n.withCtx(()=>[n.createElementVNode("h2",null,"Eliminated ("+n.toDisplayString(r.value.length)+")",1),n.createElementVNode("ul",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value,i=>(n.openBlock(),n.createElementBlock("li",{key:i.rowId,class:"distinguish-row-item"},[n.renderSlot(o.$slots,"default",{item:i},()=>[n.createElementVNode("span",{innerHTML:o.render?o.render(i):i.objectTag},null,8,jr)])]))),128))])]),_:3}))}}),Hr={class:"distinguish-row-filter-buttons"},zr={class:"distinguish-list-checkboxes"},Kr=["value"],Jr=n.defineComponent({__name:"FilterRow",setup(e){const t=O(),r=F(),o=B(),s=n.ref(!1),i=n.ref([]),a=n.computed(()=>{const u=o.getRowIds,d=i.value;return u.length!==d.length||!u.every(p=>d.includes(p))}),c=n.computed({get:()=>o.getRowIds,set:u=>{o.$patch({rowIds:u})}});return n.watch(s,u=>{r.setShouldUpdate(!u),!u&&a.value&&(o.rowFilter=!0,r.checkUpdate()),i.value=o.getRowIds}),(u,d)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(H,{color:"primary",size:"medium",onClick:d[0]||(d[0]=p=>s.value=!0)},{default:n.withCtx(()=>d[5]||(d[5]=[n.createTextVNode(" Select ")])),_:1}),s.value?(n.openBlock(),n.createBlock(Ne,{key:0,onClose:d[4]||(d[4]=p=>s.value=!1)},{header:n.withCtx(()=>d[6]||(d[6]=[n.createElementVNode("h3",null,"Filter row",-1)])),body:n.withCtx(()=>[n.createElementVNode("div",null,[n.createElementVNode("div",Hr,[n.unref(t).getRemaining.length!==c.value.length||c.value.length==0?(n.openBlock(),n.createBlock(H,{key:0,color:"primary",size:"medium",onClick:d[1]||(d[1]=()=>c.value=n.unref(t).getRemaining.map(p=>p.rowId))},{default:n.withCtx(()=>d[7]||(d[7]=[n.createTextVNode(" Select all ")])),_:1})):(n.openBlock(),n.createBlock(H,{key:1,color:"primary",size:"medium",onClick:d[2]||(d[2]=()=>c.value=[])},{default:n.withCtx(()=>d[8]||(d[8]=[n.createTextVNode(" Unselect all ")])),_:1}))]),n.createElementVNode("ul",zr,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(t).getRemaining,p=>(n.openBlock(),n.createElementBlock("li",{key:p.rowId},[n.createElementVNode("label",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":d[3]||(d[3]=f=>c.value=f),value:p.rowId,type:"checkbox"},null,8,Kr),[[n.vModelCheckbox,c.value]]),n.createTextVNode(" "+n.toDisplayString(p.objectLabel),1)])]))),128))])])]),_:1})):n.createCommentVNode("",!0)],64))}}),Wr={class:"distinguish-title-section"},Gr=["innerHTML"],Xr=n.defineComponent({__name:"PanelRemaining",props:{render:{type:Function}},setup(e){const t=O(),r=n.computed(()=>t.getRemaining);return(o,s)=>(n.openBlock(),n.createBlock(Re,{class:"distinguish-panel-remaining"},{default:n.withCtx(()=>[n.createElementVNode("div",Wr,[n.createElementVNode("h2",null,"Remaining ("+n.toDisplayString(r.value.length)+")",1),n.createVNode(Jr)]),n.createElementVNode("ul",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value,i=>(n.openBlock(),n.createElementBlock("li",{key:i.rowId,class:"distinguish-row-item"},[n.renderSlot(o.$slots,"default",{item:i},()=>[n.createElementVNode("span",{innerHTML:o.render?o.render(i):i.objectTag},null,8,Gr)])]))),128))])]),_:3}))}});class Qr{static find(t){return ft().get(`/depictions/${t}.json`,{params:{extend:["image"]}})}}const Yr={key:0,class:"distinguish-depiction-box"},Zr=["src"],bt=n.defineComponent({__name:"VDepiction",props:{depictionId:{}},setup(e){const t=e,r=n.ref();return Qr.find(t.depictionId).then(({data:o})=>{r.value=Xn(o)}),(o,s)=>r.value?(n.openBlock(),n.createElementBlock("div",Yr,[n.createElementVNode("img",{src:r.value.imageUrl},null,8,Zr)])):n.createCommentVNode("",!0)}}),vr={class:"distinguish-character-descriptor__cell"},eo=["value"],to=n.defineComponent({__name:"CharacterStateCell",props:{characterState:{},descriptorId:{}},setup(e){const t=e,r=B(),o=n.computed({get:()=>r.getDescriptorValueById(t.descriptorId)||[],set:s=>{s.length?r.setDescriptor({descriptorId:t.descriptorId,value:s}):r.removeDescriptor(t.descriptorId)}});return(s,i)=>(n.openBlock(),n.createElementBlock("div",vr,[n.createElementVNode("label",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.characterState.depictionIds,a=>(n.openBlock(),n.createBlock(bt,{key:a,"depiction-id":a},null,8,["depiction-id"]))),128)),n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=a=>o.value=a),value:s.characterState.characterStateId,type:"checkbox"},null,8,eo),[[n.vModelCheckbox,o.value]]),n.createTextVNode(" "+n.toDisplayString(s.characterState.name),1)])]))}}),no={class:"distinguish-character-states-grid"},ro=n.defineComponent({__name:"CharacterStateGrid",props:{descriptor:{}},setup(e){const t=e,r=B(),o=F(),s=n.ref(),i=n.computed(()=>{const a=r.getDescriptorValueById(t.descriptor.descriptorId)||[],c=s.value||[];return a.length!==c.length||!a.every(u=>c.includes(u))});return n.onMounted(()=>{o.setShouldUpdate(!1),s.value=r.getDescriptorValueById(t.descriptor.descriptorId)}),n.onUnmounted(()=>{o.setShouldUpdate(!0),i.value&&o.checkUpdate()}),(a,c)=>(n.openBlock(),n.createElementBlock("div",no,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.descriptor.characterStates,u=>(n.openBlock(),n.createBlock(to,{key:u.characterStateId,"descriptor-id":a.descriptor.descriptorId,"character-state":u},null,8,["descriptor-id","character-state"]))),128))]))}}),oo={key:0},so={key:1},io={class:"descriptor-modal__depiction"},ao=n.defineComponent({__name:"DescriptorModal",props:{descriptor:{}},setup(e){return(t,r)=>(n.openBlock(),n.createBlock(Ne,{"container-class":"distinguish-descriptor-modal"},{header:n.withCtx(()=>[n.createElementVNode("h3",null,n.toDisplayString(t.descriptor.name),1),t.descriptor.description?(n.openBlock(),n.createElementBlock("span",oo,n.toDisplayString(t.descriptor.description),1)):(n.openBlock(),n.createElementBlock("i",so," No further description available. "))]),body:n.withCtx(()=>[n.createElementVNode("div",io,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(t.descriptor.depictionIds,o=>(n.openBlock(),n.createBlock(bt,{key:o,"depiction-id":o},null,8,["depiction-id"]))),128))]),r[0]||(r[0]=n.createElementVNode("hr",null,null,-1)),t.descriptor.type===n.unref(X).Qualitative?(n.openBlock(),n.createBlock(ro,{key:0,descriptor:t.descriptor},null,8,["descriptor"])):n.createCommentVNode("",!0)]),_:1}))}}),co=["id"],lo={class:"distinguish-input-label"},ce=n.defineComponent({__name:"DescriptorContainer",props:{descriptor:{}},setup(e){const t=n.ref(!1);return(r,o)=>(n.openBlock(),n.createElementBlock("div",{id:`descriptor-${r.descriptor.descriptorId}`,class:"distinguish-descriptor-container"},[n.createElementVNode("div",lo,[n.createElementVNode("span",{class:"distinguish-link",onClick:o[0]||(o[0]=s=>t.value=!0)},[n.renderSlot(r.$slots,"title",{},()=>[n.createTextVNode(n.toDisplayString(r.descriptor.name),1)])])]),n.renderSlot(r.$slots,"default"),t.value?(n.openBlock(),n.createBlock(ao,{key:0,descriptor:r.descriptor,onClose:o[1]||(o[1]=s=>t.value=!1)},null,8,["descriptor"])):n.createCommentVNode("",!0)],8,co))}}),po=n.defineComponent({__name:"DescriptorContinuous",props:{descriptor:{}},setup(e){const t=e,r=B(),o=n.ref(String(r.getDescriptorValueById(t.descriptor.descriptorId))),s=()=>{const{descriptorId:i}=t.descriptor,a=o.value.trim();a?r.setDescriptor({descriptorId:i,value:a}):r.removeDescriptor(i)};return(i,a)=>(n.openBlock(),n.createBlock(ce,{class:"distinguish-descriptor-continuous",descriptor:i.descriptor},{title:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(i.descriptor.name)+" ("+n.toDisplayString(i.descriptor.min)+"-"+n.toDisplayString(i.descriptor.max)+" "+n.toDisplayString(i.descriptor.defaultUnit)+") ",1)]),default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=c=>o.value=c),type:"text",onBlur:s,onKeyup:n.withKeys(s,["enter"])},null,544),[[n.vModelText,o.value]])]),_:1},8,["descriptor"]))}}),uo=["value"],fo={key:0},mo=n.defineComponent({__name:"DescriptorPresenceAbsence",props:{descriptor:{}},setup(e){const t={Presence:!0,Absent:!1},r=e,o=B(),s=n.computed({get:()=>o.getDescriptorValueById(r.descriptor.descriptorId),set:a=>{const{descriptorId:c}=r.descriptor;typeof a=="boolean"?o.setDescriptor({descriptorId:c,value:!!a}):o.removeDescriptor(c)}}),i=a=>{var u;const{states:c}=r.descriptor;return((u=c.find(d=>d.name===String(a)))==null?void 0:u.numberOfObjects)||0};return(a,c)=>(n.openBlock(),n.createBlock(ce,{class:"distinguish-descriptor-presence-absence",descriptor:a.descriptor},{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":c[0]||(c[0]=u=>s.value=u)},[c[1]||(c[1]=n.createElementVNode("option",null,null,-1)),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(t,(u,d)=>n.createElementVNode("option",{key:d,value:u},[a.descriptor.status===n.unref(G).Useless?(n.openBlock(),n.createElementBlock("span",fo,"-")):n.createCommentVNode("",!0),n.createTextVNode(" "+n.toDisplayString(d)+" ("+n.toDisplayString(i(u))+") ",1)],8,uo)),64))],512),[[n.vModelSelect,s.value]])]),_:1},8,["descriptor"]))}}),ho=["value","selected"],go={key:0},yo={key:1},bo=n.defineComponent({__name:"DescriptorQualitative",props:{descriptor:{}},setup(e){const t=e,r=B(),o=i=>{const a=i.target,{descriptorId:c}=t.descriptor;a.value?r.setDescriptor({descriptorId:c,value:[Number(a.value)]}):r.removeDescriptor(c)},s=i=>r.getDescriptorValueById(t.descriptor.descriptorId).includes(i.characterStateId);return(i,a)=>(n.openBlock(),n.createBlock(ce,{class:"distinguish-descriptor-qualitative",descriptor:i.descriptor},{default:n.withCtx(()=>[n.createElementVNode("select",{name:"listbox",onChange:o},[a[0]||(a[0]=n.createElementVNode("option",{value:""},null,-1)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.descriptor.characterStates,c=>(n.openBlock(),n.createElementBlock("option",{key:c.characterStateId,value:c.characterStateId,selected:s(c)},[s(c)?(n.openBlock(),n.createElementBlock("span",go,">")):n.createCommentVNode("",!0),c.status===n.unref(G).Useless?(n.openBlock(),n.createElementBlock("span",yo,"-")):n.createCommentVNode("",!0),n.createTextVNode(" "+n.toDisplayString(c.name)+" ("+n.toDisplayString(c.numberOfObjects)+") ",1)],8,ho))),128))],32)]),_:1},8,["descriptor"]))}}),_o=n.defineComponent({__name:"DescriptorSample",props:{descriptor:{}},setup(e){const t=e,r=B(),o=n.ref(String(r.getDescriptorValueById(t.descriptor.descriptorId))),s=()=>{const{descriptorId:i}=t.descriptor,a=o.value.trim();a?r.setDescriptor({descriptorId:i,value:a}):r.removeDescriptor(i)};return(i,a)=>(n.openBlock(),n.createBlock(ce,{class:"distinguish-descriptor-sample",descriptor:i.descriptor},{title:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(i.descriptor.name)+" ("+n.toDisplayString(i.descriptor.min)+"-"+n.toDisplayString(i.descriptor.max)+" "+n.toDisplayString(i.descriptor.defaultUnit)+") ",1)]),default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=c=>o.value=c),type:"text",onBlur:s,onKeyup:n.withKeys(s,["enter"])},null,544),[[n.vModelText,o.value]])]),_:1},8,["descriptor"]))}}),Te=n.defineComponent({__name:"DescriptorsList",props:{title:{},descriptors:{}},setup(e){const t={DescriptorContinuous:po,DescriptorPresenceAbsence:mo,DescriptorQualitative:bo,DescriptorSample:_o},r=o=>{const s=o.replace("::","");return t[s]};return(o,s)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createElementVNode("h2",null,n.toDisplayString(o.title),1),n.createElementVNode("ol",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.descriptors,i=>(n.openBlock(),n.createElementBlock("li",{key:i.descriptorId},[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(r(i.type)),{descriptor:i},null,8,["descriptor"]))]))),128))])],64))}}),ko={key:0},wo=n.defineComponent({__name:"FilterRowCheckbox",setup(e){const t=B(),r=n.computed({get:()=>t.getRowFilter,set:o=>t.$patch({rowFilter:o})});return(o,s)=>n.unref(t).rowIds.length?(n.openBlock(),n.createElementBlock("label",ko,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i),type:"checkbox"},null,512),[[n.vModelCheckbox,r.value]]),s[1]||(s[1]=n.createTextVNode(" Filter "))])):n.createCommentVNode("",!0)}}),Eo=n.defineComponent({__name:"PanelDescriptors",setup(e){const t=O();return(r,o)=>(n.openBlock(),n.createBlock(Re,{class:"distinguish-panel-descriptors"},{default:n.withCtx(()=>[n.createVNode(wo),n.unref(t).getDescriptorsUsed.length?(n.openBlock(),n.createBlock(Te,{key:0,descriptors:n.unref(t).getDescriptorsUsed,title:"Used Descriptors"},null,8,["descriptors"])):n.createCommentVNode("",!0),n.unref(t).getDescriptorsUseful.length?(n.openBlock(),n.createBlock(Te,{key:1,descriptors:n.unref(t).getDescriptorsUseful,title:"Descriptors Useful for Identification"},null,8,["descriptors"])):n.createCommentVNode("",!0),n.unref(t).getDescriptorsUseless.length?(n.openBlock(),n.createBlock(Te,{key:2,descriptors:n.unref(t).getDescriptorsUseless,title:"Descriptors no longer relevant for identification"},null,8,["descriptors"])):n.createCommentVNode("",!0)]),_:1}))}}),So={class:"distinguish-spinner-container"},Bo={class:"distinguish-spinner-legend"},Co=["innerHTML"],No=n.defineComponent({__name:"VSpinner",props:{legend:{type:String,default:"Loading, please wait."}},setup(e){return(t,r)=>(n.openBlock(),n.createBlock(n.Transition,{name:"fade"},{default:n.withCtx(()=>[n.createElementVNode("div",So,[n.createElementVNode("div",null,[r[0]||(r[0]=n.createElementVNode("div",{class:"distinguish-spinner"},null,-1)),n.createElementVNode("div",Bo,[n.createElementVNode("span",{innerHTML:e.legend},null,8,Co),n.renderSlot(t.$slots,"default")])])])]),_:3}))}}),Ro={class:"distinguish-title"},To={key:0},xo=n.defineComponent({__name:"TitleMatrix",setup(e){const t=O();return(r,o)=>(n.openBlock(),n.createElementBlock("h1",Ro,[o[0]||(o[0]=n.createTextVNode(" Interactive key ")),n.unref(t).getObservationMatrix?(n.openBlock(),n.createElementBlock("span",To,"| "+n.toDisplayString(n.unref(t).getObservationMatrix.name),1)):n.createCommentVNode("",!0)]))}}),Do=["title"],Oo=n.defineComponent({__name:"TitleMatrixCitation",setup(e){const t=O(),r=n.computed(()=>{const o=t.getCitation;return Object.values(o||{}).filter(Boolean).join(", ")});return(o,s)=>(n.openBlock(),n.createElementBlock("span",{class:"distinguish-title-citation",title:r.value},n.toDisplayString(r.value),9,Do))}}),Vo={class:"distinguish-title-section"},Io=n.defineComponent({__name:"TitleKey",setup(e){return(t,r)=>(n.openBlock(),n.createElementBlock("div",Vo,[n.createVNode(xo),n.createVNode(Oo)]))}}),Ao={class:"distinguish-app-container"},_t=n.defineComponent({name:"Distinguish",__name:"App",props:{observationMatrixId:{},apiConfig:{},renderItem:{type:Function}},setup(e){const t=e,r=F(),o=B(),s=n.computed(()=>r.getIsLoading),i=n.computed(()=>r.getLayout);return(()=>{r.setAPIConfig(t.apiConfig),r.setObservationMatrixId(t.observationMatrixId),r.checkUpdate()})(),o.$subscribe(c=>{r.shouldUpdate&&r.checkUpdate()}),(c,u)=>(n.openBlock(),n.createElementBlock("div",Ao,[n.createVNode(Io),n.createVNode($r),n.createVNode(yt,{class:n.normalizeClass(i.value)},{default:n.withCtx(()=>[n.createVNode(Eo),n.createVNode(Xr,{render:t.renderItem},{default:n.withCtx(d=>[n.renderSlot(c.$slots,"remaining-item",n.normalizeProps(n.guardReactiveProps(d)))]),_:3},8,["render"]),n.createVNode(qr,{render:t.renderItem},{default:n.withCtx(d=>[n.renderSlot(c.$slots,"eliminated-item",n.normalizeProps(n.guardReactiveProps(d)))]),_:3},8,["render"])]),_:3},8,["class"]),s.value?(n.openBlock(),n.createBlock(No,{key:0,legend:"Loading interactive key..."})):n.createCommentVNode("",!0)]))}});function kt(e){const t=e||'[data-interactive-key="true"]';return[...document.querySelectorAll(t)].map(s=>wt(s,Uo(s)))}function Lo(){kt()}function Uo(e){return{observationMatrixId:Number(e.getAttribute("data-observation-matrix-id")),apiConfig:{baseURL:e.getAttribute("data-base-url")||"",projectToken:e.getAttribute("data-project-token")||void 0,projectId:Number(e.getAttribute("data-project-id"))||void 0,userToken:e.getAttribute("data-user-token")||void 0,csrfToken:e.getAttribute("data-csrf-token")||void 0}}}function wt(e,t){const{apiConfig:r,observationMatrixId:o}=t;if(!o)throw"Missing observation matrix ID";if(!r||!r.projectToken&&!r.csrfToken&&!(r.projectId&&r.userToken))throw"Missing API configuration";const s=n.createApp(_t,{observationMatrixId:o,apiConfig:r});return s.use(Y.createPinia()),s.mount(e),s}typeof window<"u"&&window.addEventListener("DOMContentLoaded",Lo),D.VueInteractiveKey=_t,D.createInteractiveKey=wt,D.discoverInteractiveKey=kt,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.distinguish-menu-list{display:flex;list-style:none;align-items:center;margin:0}.distinguish-menu-list li:first-child{padding-left:0}.distinguish-list-item{justify-content:center;padding-left:1em;padding-right:1em;border-right:1px solid #e5e5e5}:root{--distinguish-primary-content-color: #ffffff;--distinguish-bg-color: #f7f8fc;--distinguish-bg-panel-color: #ffffff;--distinguish-bg-modal-color: #ffffff;--distinguish-bg-disabled-color: #e5e5e5;--distinguish-disabled-color: #999;--distinguish-error-color: #ff0000;--distinguish-primary-color: #5d9ece;--distinguish-border-color: #cccccc;--distinguish-link-color: #5d9ece;--distinguish-btn-medium-size: 28px}.distinguish-link{color:var(--distinguish-link-color);cursor:pointer}.distinguish-btn{border-radius:8px;border:none}.distinguish-btn-primary-color{background-color:var(--distinguish-primary-color);color:var(--distinguish-primary-content-color)}.distinguish-btn-medium-size{min-height:var(--distinguish-btn-medium-size)}.distinguish-btn:disabled{background-color:var(--distinguish-bg-disabled-color);color:var(--distinguish-disabled-color)}.distinguish-panel{background-color:var(--distinguish-bg-panel-color);padding:1rem;overflow-y:scroll}.distinguish-spinner-container{display:flex;position:fixed;justify-content:center;width:100vw;height:100vh;background-color:var(--distinguish-bg-color);align-items:center;z-index:9999;height:100%;opacity:.9;top:0;left:0}.distinguish-spinner{border:5px solid rgba(0,0,0,.3);width:36px;height:36px;border-radius:50%;border-left-color:var(--distinguish-primary-color);margin:20px auto 0;animation:spin 1s ease infinite}.distinguish-spinner-legend{margin:1rem 0;font-size:1rem}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.distinguish-modal-mask{position:fixed;z-index:1099;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:table;transition:opacity .3s ease}.distinguish-modal-wrapper{display:table-cell;vertical-align:middle}.distinguish-modal-container{position:relative;width:600px;margin:0 auto;padding:20px 30px;background-color:var(--distinguish-bg-modal-color);border-radius:2px;box-shadow:0 2px 8px #00000054;transition:all .3s ease;max-height:90vh;overflow-y:auto}.distinguish-modal-close{position:absolute;cursor:pointer;top:26px;right:30px;width:10px;height:10px;background-size:10px 10px;opacity:.4}.distinguish-modal-close:hover{opacity:1}.distinguish-modal-header h3{margin-top:0}.distinguish-modal-body{margin:20px 0}.distinguish-modal-default-button{float:right}.distinguish-modal-enter,.distinguish-modal-leave-active{opacity:0}.distinguish-modal-enter .distinguish-modal-container,.distinguish-modal-leave-active .distinguish-modal-container{-webkit-transform:scale(1.1);transform:scale(1.1)}.distinguish-transparent-modal{background-color:#000c!important}.distinguish-transparent-modal .distinguish-modal-header h3{margin:0 0 2em 2em;padding:6px 6px 6px 12px;border-radius:3px;background-color:#0000004d;color:#ffffff80}.distinguish-transparent-modal .distinguish-modal-close{right:42px;top:30px;color:#ffffff80}.distinguish-transparent-modal .distinguish-modal-container{width:70%;position:relative;background-color:transparent!important;box-shadow:none}.distinguish-transparent-modal .distinguish-modal-container .distinguish-modal-body{overflow:auto;margin-right:1em;max-height:80vh}.distinguish-transparent-modal .distinguish-modal-container .distinguish-modal-body::-webkit-scrollbar{position:absolute;right:40px;-webkit-appearance:none}.distinguish-transparent-modal .distinguish-modal-container .distinguish-modal-body::-webkit-scrollbar:vertical{width:6px}.distinguish-transparent-modal .distinguish-modal-container .distinguish-modal-body::-webkit-scrollbar:horizontal{height:6px}.distinguish-transparent-modal .distinguish-modal-container .distinguish-modal-body::-webkit-scrollbar-thumb{border-radius:8px;width:11px;height:5px;border:rgba(255,255,255,.5);background-color:#ffffff80}.distinguish-transparent-modal .distinguish-modal-container .distinguish-modal-body::-webkit-scrollbar-track{background-color:#0000004d;border-radius:8px}.distinguish-grid{width:100%;grid-template-rows:1fr;height:100%;overflow:hidden}.distinguish-layout-mode-1 .distinguish-panel-descriptors{grid-area:1/1/2/3}.distinguish-layout-mode-1 .distinguish-panel-remaining{grid-area:2/1/3/2}.distinguish-layout-mode-1 .distinguish-panel-eliminated{grid-area:2/2/3/3}.distinguish-layout-mode-2 .distinguish-panel-descriptors{grid-area:1/1/3/2}.distinguish-layout-mode-2 .distinguish-panel-remaining{grid-area:1/2/2/3}.distinguish-layout-mode-2 .distinguish-panel-eliminated{grid-area:2/2/3/3}.distinguish-app-container{display:flex;flex-direction:column;height:100%;max-height:100%;font-family:Arial,Helvetica,sans-serif;font-size:13px}.distinguish-app-container input,.distinguish-app-container select{padding:.5em 1em;border:1px solid;border-radius:2px;border-color:var(--distinguish-border-color)}.distinguish-app-container .distinguish-header-error-message{color:var(--distinguish-error-color)}.distinguish-depiction-box{display:flex;align-items:center;justify-content:center;border:1px solid black;height:300px;width:300px}.distinguish-row-item-error{cursor:pointer}.distinguish-character-descriptor__cell{display:flex;align-items:flex-end}.distinguish-character-states-grid{display:grid;grid-template-columns:repeat(3,minmax(33.33%,1fr));gap:1em}.distinguish-list-checkboxes{list-style:none;padding:0}.distinguish-input-label{display:block}.distinguish-header-bar{background-color:var(--distinguish-bg-panel-color);padding:1em;box-shadow:#24252614 4px 4px 15px;border-bottom:1px solid var(--distinguish-border-color);display:flex;justify-content:space-between;align-items:center}.distinguish-header-bar__buttons{display:flex;align-items:center}.distinguish-title-section{display:flex;justify-content:space-between;align-items:center}.distinguish-header-bar__buttons{display:flex;flex-direction:row;align-items:center;gap:.5em}.distinguish-descriptor-modal{width:1000px;max-height:90vh;overflow-y:scroll}.distinguish-descriptor-modal__depiction{display:flex;justify-content:center}.distinguish-grid-icon{width:20px;height:12px;border:2px solid transparent;background-color:transparent;grid-gap:2px}.distinguish-grid-icon>div{background-color:#fff}.distinguish-grid{display:grid;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr);grid-column-gap:0px;grid-row-gap:0px;grid-gap:1px;background-color:var(--distinguish-border-color);box-shadow:0 1px 1px #0003}
|
|
1
|
+
.distinguish-menu-list{display:flex;list-style:none;align-items:center;margin:0}.distinguish-menu-list li:first-child{padding-left:0}.distinguish-list-item{justify-content:center;padding-left:1em;padding-right:1em;border-right:1px solid #e5e5e5}.distinguish-row-filter-buttons{display:flex;flex-direction:row;gap:.5rem}:root{--distinguish-primary-content-color: #ffffff;--distinguish-bg-color: #f7f8fc;--distinguish-bg-panel-color: #ffffff;--distinguish-bg-modal-color: #ffffff;--distinguish-bg-disabled-color: #e5e5e5;--distinguish-disabled-color: #999;--distinguish-error-color: #ff0000;--distinguish-primary-color: #5d9ece;--distinguish-border-color: #cccccc;--distinguish-link-color: #5d9ece;--distinguish-btn-medium-size: 28px}.distinguish-link{color:var(--distinguish-link-color);cursor:pointer}.distinguish-btn{border-radius:8px;border:none;cursor:pointer}.distinguish-btn-primary-color{background-color:var(--distinguish-primary-color);color:var(--distinguish-primary-content-color)}.distinguish-btn-medium-size{min-height:var(--distinguish-btn-medium-size)}.distinguish-btn:disabled{background-color:var(--distinguish-bg-disabled-color);color:var(--distinguish-disabled-color)}.distinguish-panel{background-color:var(--distinguish-bg-panel-color);padding:1rem;overflow-y:scroll}.distinguish-spinner-container{display:flex;position:fixed;justify-content:center;width:100vw;height:100vh;background-color:var(--distinguish-bg-color);align-items:center;z-index:9999;height:100%;opacity:.9;top:0;left:0}.distinguish-spinner{border:5px solid rgba(0,0,0,.3);width:36px;height:36px;border-radius:50%;border-left-color:var(--distinguish-primary-color);margin:20px auto 0;animation:spin 1s ease infinite}.distinguish-spinner-legend{margin:1rem 0;font-size:1rem}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.distinguish-modal-mask{position:fixed;z-index:1099;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:table;transition:opacity .3s ease}.distinguish-modal-wrapper{display:table-cell;vertical-align:middle}.distinguish-modal-container{position:relative;width:600px;margin:0 auto;padding:20px 30px;background-color:var(--distinguish-bg-modal-color);border-radius:2px;box-shadow:0 2px 8px #00000054;transition:all .3s ease;max-height:90vh;overflow-y:auto}.distinguish-modal-close{position:absolute;cursor:pointer;top:26px;right:30px;width:10px;height:10px;background-size:10px 10px;opacity:.4}.distinguish-modal-close:hover{opacity:1}.distinguish-modal-header h3{margin-top:0}.distinguish-modal-body{margin:20px 0}.distinguish-modal-default-button{float:right}.distinguish-modal-enter,.distinguish-modal-leave-active{opacity:0}.distinguish-modal-enter .distinguish-modal-container,.distinguish-modal-leave-active .distinguish-modal-container{-webkit-transform:scale(1.1);transform:scale(1.1)}.distinguish-transparent-modal{background-color:#000c!important}.distinguish-transparent-modal .distinguish-modal-header h3{margin:0 0 2em 2em;padding:6px 6px 6px 12px;border-radius:3px;background-color:#0000004d;color:#ffffff80}.distinguish-transparent-modal .distinguish-modal-close{right:42px;top:30px;color:#ffffff80}.distinguish-transparent-modal .distinguish-modal-container{width:70%;position:relative;background-color:transparent!important;box-shadow:none}.distinguish-transparent-modal .distinguish-modal-container .distinguish-modal-body{overflow:auto;margin-right:1em;max-height:80vh}.distinguish-transparent-modal .distinguish-modal-container .distinguish-modal-body::-webkit-scrollbar{position:absolute;right:40px;-webkit-appearance:none}.distinguish-transparent-modal .distinguish-modal-container .distinguish-modal-body::-webkit-scrollbar:vertical{width:6px}.distinguish-transparent-modal .distinguish-modal-container .distinguish-modal-body::-webkit-scrollbar:horizontal{height:6px}.distinguish-transparent-modal .distinguish-modal-container .distinguish-modal-body::-webkit-scrollbar-thumb{border-radius:8px;width:11px;height:5px;border:rgba(255,255,255,.5);background-color:#ffffff80}.distinguish-transparent-modal .distinguish-modal-container .distinguish-modal-body::-webkit-scrollbar-track{background-color:#0000004d;border-radius:8px}.distinguish-grid{width:100%;grid-template-rows:1fr;height:100%;overflow:hidden}.distinguish-layout-mode-1 .distinguish-panel-descriptors{grid-area:1/1/2/3}.distinguish-layout-mode-1 .distinguish-panel-remaining{grid-area:2/1/3/2}.distinguish-layout-mode-1 .distinguish-panel-eliminated{grid-area:2/2/3/3}.distinguish-layout-mode-2 .distinguish-panel-descriptors{grid-area:1/1/3/2}.distinguish-layout-mode-2 .distinguish-panel-remaining{grid-area:1/2/2/3}.distinguish-layout-mode-2 .distinguish-panel-eliminated{grid-area:2/2/3/3}.distinguish-app-container{display:flex;flex-direction:column;height:100%;max-height:100%;font-family:Arial,Helvetica,sans-serif;font-size:13px}.distinguish-app-container input,.distinguish-app-container select{padding:.5em 1em;border:1px solid;border-radius:2px;border-color:var(--distinguish-border-color)}.distinguish-app-container .distinguish-header-error-message{color:var(--distinguish-error-color)}.distinguish-depiction-box{display:flex;align-items:center;justify-content:center;border:1px solid black;height:300px;width:300px}.distinguish-row-item-error{cursor:pointer}.distinguish-character-descriptor__cell{display:flex;align-items:flex-end}.distinguish-character-states-grid{display:grid;grid-template-columns:repeat(3,minmax(33.33%,1fr));gap:1em}.distinguish-list-checkboxes{list-style:none;padding:0}.distinguish-input-label{display:block}.distinguish-header-bar{background-color:var(--distinguish-bg-panel-color);padding:1em;box-shadow:#24252614 4px 4px 15px;border-bottom:1px solid var(--distinguish-border-color);display:flex;justify-content:space-between;align-items:center}.distinguish-header-bar__buttons{display:flex;align-items:center}.distinguish-title-section{display:flex;justify-content:space-between;align-items:center}.distinguish-header-bar__buttons{display:flex;flex-direction:row;align-items:center;gap:.5em}.distinguish-descriptor-modal{width:1000px;max-height:90vh;overflow-y:scroll}.distinguish-descriptor-modal__depiction{display:flex;justify-content:center}.distinguish-grid-icon{width:20px;height:12px;border:2px solid transparent;background-color:transparent;grid-gap:2px}.distinguish-grid-icon>div{background-color:#fff}.distinguish-grid{display:grid;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr);grid-column-gap:0px;grid-row-gap:0px;grid-gap:1px;background-color:var(--distinguish-border-color);box-shadow:0 1px 1px #0003}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@sfgrp/distinguish",
|
|
3
3
|
"private": false,
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.4.0",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
8
8
|
],
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
".": {
|
|
13
13
|
"import": "./dist/distinguish.es.js",
|
|
14
14
|
"require": "./dist/distinguish.umd.cjs"
|
|
15
|
-
}
|
|
15
|
+
},
|
|
16
|
+
"./dist/style.css": "./dist/style.css"
|
|
16
17
|
},
|
|
17
18
|
"publishConfig": {
|
|
18
19
|
"access": "public"
|
|
@@ -37,23 +38,23 @@
|
|
|
37
38
|
},
|
|
38
39
|
"dependencies": {
|
|
39
40
|
"axios": "^1.7.7",
|
|
40
|
-
"pinia": "^2.2.
|
|
41
|
-
"vue": "^3.5.
|
|
41
|
+
"pinia": "^2.2.4",
|
|
42
|
+
"vue": "^3.5.11"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
|
-
"@pinia/testing": "^0.1.
|
|
45
|
+
"@pinia/testing": "^0.1.6",
|
|
45
46
|
"@testing-library/user-event": "^14.5.2",
|
|
46
47
|
"@testing-library/vue": "^8.1.0",
|
|
47
48
|
"@vitejs/plugin-vue": "^5.1.4",
|
|
48
49
|
"c8": "^10.1.2",
|
|
49
|
-
"eslint": "^9.
|
|
50
|
+
"eslint": "^9.12.0",
|
|
50
51
|
"eslint-plugin-vue": "^9.28.0",
|
|
51
|
-
"jsdom": "^25.0.
|
|
52
|
-
"msw": "^2.4.
|
|
53
|
-
"sass": "^1.79.
|
|
54
|
-
"typescript": "^5.6.
|
|
55
|
-
"vite": "^5.4.
|
|
56
|
-
"vitest": "^2.1.
|
|
52
|
+
"jsdom": "^25.0.1",
|
|
53
|
+
"msw": "^2.4.9",
|
|
54
|
+
"sass": "^1.79.4",
|
|
55
|
+
"typescript": "^5.6.3",
|
|
56
|
+
"vite": "^5.4.8",
|
|
57
|
+
"vitest": "^2.1.2",
|
|
57
58
|
"vue-tsc": "^2.1.6"
|
|
58
59
|
}
|
|
59
60
|
}
|