@sfgrp/distinguish 0.0.1

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.
@@ -0,0 +1,46 @@
1
+ (function(u,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","vue","pinia"],e):(u=typeof globalThis!="undefined"?globalThis:u||self,e(u.InteractiveKey={},u.Vue,u.pinia))})(this,function(u,e,y){"use strict";var Io=Object.defineProperty,To=Object.defineProperties;var Lo=Object.getOwnPropertyDescriptors;var at=Object.getOwnPropertySymbols;var Oo=Object.prototype.hasOwnProperty,Uo=Object.prototype.propertyIsEnumerable;var st=(u,e,y)=>e in u?Io(u,e,{enumerable:!0,configurable:!0,writable:!0,value:y}):u[e]=y,B=(u,e)=>{for(var y in e||(e={}))Oo.call(e,y)&&st(u,y,e[y]);if(at)for(var y of at(e))Uo.call(e,y)&&st(u,y,e[y]);return u},R=(u,e)=>To(u,Lo(e));const xe=e.reactive({baseURL:"",projectId:void 0,projectToken:void 0,userToken:void 0}),we=()=>{const t=r=>{Object.assign(xe,r)};return R(B({},e.toRefs(xe)),{updatePreferences:t})};var ne={exports:{}},Ee=function(r,n){return function(){for(var i=new Array(arguments.length),a=0;a<i.length;a++)i[a]=arguments[a];return r.apply(n,i)}},lt=Ee,oe=Object.prototype.toString,ie=function(t){return function(r){var n=oe.call(r);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())}}(Object.create(null));function $(t){return t=t.toLowerCase(),function(n){return ie(n)===t}}function ae(t){return Array.isArray(t)}function K(t){return typeof t=="undefined"}function ct(t){return t!==null&&!K(t)&&t.constructor!==null&&!K(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}var Ce=$("ArrayBuffer");function dt(t){var r;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?r=ArrayBuffer.isView(t):r=t&&t.buffer&&Ce(t.buffer),r}function pt(t){return typeof t=="string"}function ft(t){return typeof t=="number"}function Be(t){return t!==null&&typeof t=="object"}function H(t){if(ie(t)!=="object")return!1;var r=Object.getPrototypeOf(t);return r===null||r===Object.prototype}var ut=$("Date"),mt=$("File"),ht=$("Blob"),_t=$("FileList");function se(t){return oe.call(t)==="[object Function]"}function gt(t){return Be(t)&&se(t.pipe)}function yt(t){var r="[object FormData]";return t&&(typeof FormData=="function"&&t instanceof FormData||oe.call(t)===r||se(t.toString)&&t.toString()===r)}var bt=$("URLSearchParams");function kt(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function xt(){return typeof navigator!="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"}function le(t,r){if(!(t===null||typeof t=="undefined"))if(typeof t!="object"&&(t=[t]),ae(t))for(var n=0,o=t.length;n<o;n++)r.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&r.call(null,t[i],i,t)}function ce(){var t={};function r(i,a){H(t[a])&&H(i)?t[a]=ce(t[a],i):H(i)?t[a]=ce({},i):ae(i)?t[a]=i.slice():t[a]=i}for(var n=0,o=arguments.length;n<o;n++)le(arguments[n],r);return t}function wt(t,r,n){return le(r,function(i,a){n&&typeof i=="function"?t[a]=lt(i,n):t[a]=i}),t}function Et(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}function Ct(t,r,n,o){t.prototype=Object.create(r.prototype,o),t.prototype.constructor=t,n&&Object.assign(t.prototype,n)}function Bt(t,r,n){var o,i,a,s={};r=r||{};do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)a=o[i],s[a]||(r[a]=t[a],s[a]=!0);t=Object.getPrototypeOf(t)}while(t&&(!n||n(t,r))&&t!==Object.prototype);return r}function St(t,r,n){t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=r.length;var o=t.indexOf(r,n);return o!==-1&&o===n}function Nt(t){if(!t)return null;var r=t.length;if(K(r))return null;for(var n=new Array(r);r-- >0;)n[r]=t[r];return n}var $t=function(t){return function(r){return t&&r instanceof t}}(typeof Uint8Array!="undefined"&&Object.getPrototypeOf(Uint8Array)),h={isArray:ae,isArrayBuffer:Ce,isBuffer:ct,isFormData:yt,isArrayBufferView:dt,isString:pt,isNumber:ft,isObject:Be,isPlainObject:H,isUndefined:K,isDate:ut,isFile:mt,isBlob:ht,isFunction:se,isStream:gt,isURLSearchParams:bt,isStandardBrowserEnv:xt,forEach:le,merge:ce,extend:wt,trim:kt,stripBOM:Et,inherits:Ct,toFlatObject:Bt,kindOf:ie,kindOfTest:$,endsWith:St,toArray:Nt,isTypedArray:$t,isFileList:_t},I=h;function Se(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Ne=function(r,n,o){if(!n)return r;var i;if(o)i=o(n);else if(I.isURLSearchParams(n))i=n.toString();else{var a=[];I.forEach(n,function(d,p){d===null||typeof d=="undefined"||(I.isArray(d)?p=p+"[]":d=[d],I.forEach(d,function(f){I.isDate(f)?f=f.toISOString():I.isObject(f)&&(f=JSON.stringify(f)),a.push(Se(p)+"="+Se(f))}))}),i=a.join("&")}if(i){var s=r.indexOf("#");s!==-1&&(r=r.slice(0,s)),r+=(r.indexOf("?")===-1?"?":"&")+i}return r},Vt=h;function J(){this.handlers=[]}J.prototype.use=function(r,n,o){return this.handlers.push({fulfilled:r,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1},J.prototype.eject=function(r){this.handlers[r]&&(this.handlers[r]=null)},J.prototype.forEach=function(r){Vt.forEach(this.handlers,function(o){o!==null&&r(o)})};var Dt=J,Rt=h,It=function(r,n){Rt.forEach(r,function(i,a){a!==n&&a.toUpperCase()===n.toUpperCase()&&(r[n]=i,delete r[a])})},$e=h;function T(t,r,n,o,i){Error.call(this),this.message=t,this.name="AxiosError",r&&(this.code=r),n&&(this.config=n),o&&(this.request=o),i&&(this.response=i)}$e.inherits(T,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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Ve=T.prototype,De={};["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"].forEach(function(t){De[t]={value:t}}),Object.defineProperties(T,De),Object.defineProperty(Ve,"isAxiosError",{value:!0}),T.from=function(t,r,n,o,i,a){var s=Object.create(Ve);return $e.toFlatObject(t,s,function(d){return d!==Error.prototype}),T.call(s,t.message,r,n,o,i),s.name=t.name,a&&Object.assign(s,a),s};var L=T,Re={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},w=h;function Tt(t,r){r=r||new FormData;var n=[];function o(a){return a===null?"":w.isDate(a)?a.toISOString():w.isArrayBuffer(a)||w.isTypedArray(a)?typeof Blob=="function"?new Blob([a]):Buffer.from(a):a}function i(a,s){if(w.isPlainObject(a)||w.isArray(a)){if(n.indexOf(a)!==-1)throw Error("Circular reference detected in "+s);n.push(a),w.forEach(a,function(d,p){if(!w.isUndefined(d)){var c=s?s+"."+p:p,f;if(d&&!s&&typeof d=="object"){if(w.endsWith(p,"{}"))d=JSON.stringify(d);else if(w.endsWith(p,"[]")&&(f=w.toArray(d))){f.forEach(function(b){!w.isUndefined(b)&&r.append(c,o(b))});return}}i(d,c)}}),n.pop()}else r.append(s,o(a))}return i(t),r}var Ie=Tt,de=L,Lt=function(r,n,o){var i=o.config.validateStatus;!o.status||!i||i(o.status)?r(o):n(new de("Request failed with status code "+o.status,[de.ERR_BAD_REQUEST,de.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))},W=h,Ot=W.isStandardBrowserEnv()?function(){return{write:function(n,o,i,a,s,l){var d=[];d.push(n+"="+encodeURIComponent(o)),W.isNumber(i)&&d.push("expires="+new Date(i).toGMTString()),W.isString(a)&&d.push("path="+a),W.isString(s)&&d.push("domain="+s),l===!0&&d.push("secure"),document.cookie=d.join("; ")},read:function(n){var o=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Ut=function(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)},At=function(r,n){return n?r.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):r},Mt=Ut,Pt=At,Te=function(r,n){return r&&!Mt(n)?Pt(r,n):n},pe=h,jt=["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"],Ft=function(r){var n={},o,i,a;return r&&pe.forEach(r.split(`
2
+ `),function(l){if(a=l.indexOf(":"),o=pe.trim(l.substr(0,a)).toLowerCase(),i=pe.trim(l.substr(a+1)),o){if(n[o]&&jt.indexOf(o)>=0)return;o==="set-cookie"?n[o]=(n[o]?n[o]:[]).concat([i]):n[o]=n[o]?n[o]+", "+i:i}}),n},Le=h,vt=Le.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),o;function i(a){var s=a;return r&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=i(window.location.href),function(s){var l=Le.isString(s)?i(s):s;return l.protocol===o.protocol&&l.host===o.host}}():function(){return function(){return!0}}(),fe=L,zt=h;function Oe(t){fe.call(this,t==null?"canceled":t,fe.ERR_CANCELED),this.name="CanceledError"}zt.inherits(Oe,fe,{__CANCEL__:!0});var Q=Oe,qt=function(r){var n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return n&&n[1]||""},P=h,Kt=Lt,Ht=Ot,Jt=Ne,Wt=Te,Qt=Ft,Gt=vt,Xt=Re,S=L,Yt=Q,Zt=qt,Ue=function(r){return new Promise(function(o,i){var a=r.data,s=r.headers,l=r.responseType,d;function p(){r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}P.isFormData(a)&&P.isStandardBrowserEnv()&&delete s["Content-Type"];var c=new XMLHttpRequest;if(r.auth){var f=r.auth.username||"",b=r.auth.password?unescape(encodeURIComponent(r.auth.password)):"";s.Authorization="Basic "+btoa(f+":"+b)}var _=Wt(r.baseURL,r.url);c.open(r.method.toUpperCase(),Jt(_,r.params,r.paramsSerializer),!0),c.timeout=r.timeout;function te(){if(!!c){var E="getAllResponseHeaders"in c?Qt(c.getAllResponseHeaders()):null,M=!l||l==="text"||l==="json"?c.responseText:c.response,D={data:M,status:c.status,statusText:c.statusText,headers:E,config:r,request:c};Kt(function(ke){o(ke),p()},function(ke){i(ke),p()},D),c=null}}if("onloadend"in c?c.onloadend=te:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(te)},c.onabort=function(){!c||(i(new S("Request aborted",S.ECONNABORTED,r,c)),c=null)},c.onerror=function(){i(new S("Network Error",S.ERR_NETWORK,r,c,c)),c=null},c.ontimeout=function(){var M=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded",D=r.transitional||Xt;r.timeoutErrorMessage&&(M=r.timeoutErrorMessage),i(new S(M,D.clarifyTimeoutError?S.ETIMEDOUT:S.ECONNABORTED,r,c)),c=null},P.isStandardBrowserEnv()){var re=(r.withCredentials||Gt(_))&&r.xsrfCookieName?Ht.read(r.xsrfCookieName):void 0;re&&(s[r.xsrfHeaderName]=re)}"setRequestHeader"in c&&P.forEach(s,function(M,D){typeof a=="undefined"&&D.toLowerCase()==="content-type"?delete s[D]:c.setRequestHeader(D,M)}),P.isUndefined(r.withCredentials)||(c.withCredentials=!!r.withCredentials),l&&l!=="json"&&(c.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&c.addEventListener("progress",r.onDownloadProgress),typeof r.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",r.onUploadProgress),(r.cancelToken||r.signal)&&(d=function(E){!c||(i(!E||E&&E.type?new Yt:E),c.abort(),c=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d))),a||(a=null);var be=Zt(_);if(be&&["http","https","file"].indexOf(be)===-1){i(new S("Unsupported protocol "+be+":",S.ERR_BAD_REQUEST,r));return}c.send(a)})},er=null,m=h,Ae=It,Me=L,tr=Re,rr=Ie,nr={"Content-Type":"application/x-www-form-urlencoded"};function Pe(t,r){!m.isUndefined(t)&&m.isUndefined(t["Content-Type"])&&(t["Content-Type"]=r)}function or(){var t;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(t=Ue),t}function ir(t,r,n){if(m.isString(t))try{return(r||JSON.parse)(t),m.trim(t)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(t)}var G={transitional:tr,adapter:or(),transformRequest:[function(r,n){if(Ae(n,"Accept"),Ae(n,"Content-Type"),m.isFormData(r)||m.isArrayBuffer(r)||m.isBuffer(r)||m.isStream(r)||m.isFile(r)||m.isBlob(r))return r;if(m.isArrayBufferView(r))return r.buffer;if(m.isURLSearchParams(r))return Pe(n,"application/x-www-form-urlencoded;charset=utf-8"),r.toString();var o=m.isObject(r),i=n&&n["Content-Type"],a;if((a=m.isFileList(r))||o&&i==="multipart/form-data"){var s=this.env&&this.env.FormData;return rr(a?{"files[]":r}:r,s&&new s)}else if(o||i==="application/json")return Pe(n,"application/json"),ir(r);return r}],transformResponse:[function(r){var n=this.transitional||G.transitional,o=n&&n.silentJSONParsing,i=n&&n.forcedJSONParsing,a=!o&&this.responseType==="json";if(a||i&&m.isString(r)&&r.length)try{return JSON.parse(r)}catch(s){if(a)throw s.name==="SyntaxError"?Me.from(s,Me.ERR_BAD_RESPONSE,this,null,this.response):s}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:er},validateStatus:function(r){return r>=200&&r<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};m.forEach(["delete","get","head"],function(r){G.headers[r]={}}),m.forEach(["post","put","patch"],function(r){G.headers[r]=m.merge(nr)});var ue=G,ar=h,sr=ue,lr=function(r,n,o){var i=this||sr;return ar.forEach(o,function(s){r=s.call(i,r,n)}),r},je=function(r){return!!(r&&r.__CANCEL__)},Fe=h,me=lr,cr=je,dr=ue,pr=Q;function he(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new pr}var fr=function(r){he(r),r.headers=r.headers||{},r.data=me.call(r,r.data,r.headers,r.transformRequest),r.headers=Fe.merge(r.headers.common||{},r.headers[r.method]||{},r.headers),Fe.forEach(["delete","get","head","post","put","patch","common"],function(i){delete r.headers[i]});var n=r.adapter||dr.adapter;return n(r).then(function(i){return he(r),i.data=me.call(r,i.data,i.headers,r.transformResponse),i},function(i){return cr(i)||(he(r),i&&i.response&&(i.response.data=me.call(r,i.response.data,i.response.headers,r.transformResponse))),Promise.reject(i)})},x=h,ve=function(r,n){n=n||{};var o={};function i(c,f){return x.isPlainObject(c)&&x.isPlainObject(f)?x.merge(c,f):x.isPlainObject(f)?x.merge({},f):x.isArray(f)?f.slice():f}function a(c){if(x.isUndefined(n[c])){if(!x.isUndefined(r[c]))return i(void 0,r[c])}else return i(r[c],n[c])}function s(c){if(!x.isUndefined(n[c]))return i(void 0,n[c])}function l(c){if(x.isUndefined(n[c])){if(!x.isUndefined(r[c]))return i(void 0,r[c])}else return i(void 0,n[c])}function d(c){if(c in n)return i(r[c],n[c]);if(c in r)return i(void 0,r[c])}var p={url:s,method:s,data:s,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:d};return x.forEach(Object.keys(r).concat(Object.keys(n)),function(f){var b=p[f]||a,_=b(f);x.isUndefined(_)&&b!==d||(o[f]=_)}),o},ze={version:"0.27.2"},ur=ze.version,N=L,_e={};["object","boolean","number","function","string","symbol"].forEach(function(t,r){_e[t]=function(o){return typeof o===t||"a"+(r<1?"n ":" ")+t}});var qe={};_e.transitional=function(r,n,o){function i(a,s){return"[Axios v"+ur+"] Transitional option '"+a+"'"+s+(o?". "+o:"")}return function(a,s,l){if(r===!1)throw new N(i(s," has been removed"+(n?" in "+n:"")),N.ERR_DEPRECATED);return n&&!qe[s]&&(qe[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),r?r(a,s,l):!0}};function mr(t,r,n){if(typeof t!="object")throw new N("options must be an object",N.ERR_BAD_OPTION_VALUE);for(var o=Object.keys(t),i=o.length;i-- >0;){var a=o[i],s=r[a];if(s){var l=t[a],d=l===void 0||s(l,a,t);if(d!==!0)throw new N("option "+a+" must be "+d,N.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new N("Unknown option "+a,N.ERR_BAD_OPTION)}}var hr={assertOptions:mr,validators:_e},Ke=h,_r=Ne,He=Dt,Je=fr,X=ve,gr=Te,We=hr,O=We.validators;function U(t){this.defaults=t,this.interceptors={request:new He,response:new He}}U.prototype.request=function(r,n){typeof r=="string"?(n=n||{},n.url=r):n=r||{},n=X(this.defaults,n),n.method?n.method=n.method.toLowerCase():this.defaults.method?n.method=this.defaults.method.toLowerCase():n.method="get";var o=n.transitional;o!==void 0&&We.assertOptions(o,{silentJSONParsing:O.transitional(O.boolean),forcedJSONParsing:O.transitional(O.boolean),clarifyTimeoutError:O.transitional(O.boolean)},!1);var i=[],a=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(a=a&&_.synchronous,i.unshift(_.fulfilled,_.rejected))});var s=[];this.interceptors.response.forEach(function(_){s.push(_.fulfilled,_.rejected)});var l;if(!a){var d=[Je,void 0];for(Array.prototype.unshift.apply(d,i),d=d.concat(s),l=Promise.resolve(n);d.length;)l=l.then(d.shift(),d.shift());return l}for(var p=n;i.length;){var c=i.shift(),f=i.shift();try{p=c(p)}catch(b){f(b);break}}try{l=Je(p)}catch(b){return Promise.reject(b)}for(;s.length;)l=l.then(s.shift(),s.shift());return l},U.prototype.getUri=function(r){r=X(this.defaults,r);var n=gr(r.baseURL,r.url);return _r(n,r.params,r.paramsSerializer)},Ke.forEach(["delete","get","head","options"],function(r){U.prototype[r]=function(n,o){return this.request(X(o||{},{method:r,url:n,data:(o||{}).data}))}}),Ke.forEach(["post","put","patch"],function(r){function n(o){return function(a,s,l){return this.request(X(l||{},{method:r,headers:o?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}U.prototype[r]=n(),U.prototype[r+"Form"]=n(!0)});var yr=U,br=Q;function A(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(i){r=i});var n=this;this.promise.then(function(o){if(!!n._listeners){var i,a=n._listeners.length;for(i=0;i<a;i++)n._listeners[i](o);n._listeners=null}}),this.promise.then=function(o){var i,a=new Promise(function(s){n.subscribe(s),i=s}).then(o);return a.cancel=function(){n.unsubscribe(i)},a},t(function(i){n.reason||(n.reason=new br(i),r(n.reason))})}A.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},A.prototype.subscribe=function(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]},A.prototype.unsubscribe=function(r){if(!!this._listeners){var n=this._listeners.indexOf(r);n!==-1&&this._listeners.splice(n,1)}},A.source=function(){var r,n=new A(function(i){r=i});return{token:n,cancel:r}};var kr=A,xr=function(r){return function(o){return r.apply(null,o)}},wr=h,Er=function(r){return wr.isObject(r)&&r.isAxiosError===!0},Qe=h,Cr=Ee,Y=yr,Br=ve,Sr=ue;function Ge(t){var r=new Y(t),n=Cr(Y.prototype.request,r);return Qe.extend(n,Y.prototype,r),Qe.extend(n,r),n.create=function(i){return Ge(Br(t,i))},n}var k=Ge(Sr);k.Axios=Y,k.CanceledError=Q,k.CancelToken=kr,k.isCancel=je,k.VERSION=ze.version,k.toFormData=Ie,k.AxiosError=L,k.Cancel=k.CanceledError,k.all=function(r){return Promise.all(r)},k.spread=xr,k.isAxiosError=Er,ne.exports=k,ne.exports.default=k;var Nr=ne.exports;const Xe=(t={})=>{const{baseURL:r,projectId:n,projectToken:o,userToken:i,csrfToken:a}=we(),s=B({baseURL:r.value,params:{project_id:n==null?void 0:n.value,project_token:o==null?void 0:o.value,token:i==null?void 0:i.value}},t);return(!o||!(n&&i))&&Object.assign(s,{headers:{"X-CSRF-Token":a}}),Nr.create(B({},s))};class $r{static key(r,n){return Xe().get(`/observation_matrices/${r}/key`,n)}}const Vr=t=>({characterStateId:t.id,depictionIds:t.depiction_ids,label:t.label,name:t.name,numberOfObjects:t.number_of_objects,position:t.position,status:t.status}),Dr=t=>({depictionId:t.id,caption:t.caption,figureLabel:t.figure_label,imageUrl:t.image.medium}),j={Qualitative:"Descriptor::Qualitative",Continuous:"Descriptor::Continuous",Sample:"Descriptor::Sample",Presence:"Descriptor::PresenceAbsence"},F=t=>({descriptorId:t.id,name:t.name,description:t.description,position:t.position,status:t.status,type:t.type,depictionIds:t.depiction_ids,usefulness:t.usefulness,weight:t.weight}),Rr=t=>R(B({},F(t)),{defaultUnit:t.default_unit,max:t.max,min:t.min}),Ir=t=>R(B({},F(t)),{defaultUnit:t.default_unit,max:t.max,min:t.min}),Tr=t=>R(B({},F(t)),{presence:t.precense}),Lr=t=>R(B({},F(t)),{characterStates:t.states.map(r=>Vr(r))}),Or=t=>{switch(t.type){case j.Continuous:return Rr(t);case j.Sample:return Ir(t);case j.PresenceAbsence:return Tr(t);case j.Qualitative:return Lr(t);default:return F(t)}},Ur=t=>({observationMatrixId:t.observation_matrix_id,name:t.observation_matrix.name,globalId:t.observation_matrix.global_id}),Ye=t=>({errorDescriptors:t.error_descriptors,errors:t.errors,objectLabel:t.object.object_label,objectTag:t.object.object_tag,observationObjectId:t.object.observation_object_id,observationObjectType:t.object.observation_object_type,rowId:t.object.id}),Ar=t=>({keywordId:t.id,definition:t.description,name:t.name}),Mr=t=>({languageId:t.id,name:t.english_name}),C=y.defineStore("observationMatrix",{state:()=>({observationMatrix:void 0,citation:void 0,descriptors:[],eliminated:[],remaining:[],availableKeywords:[],availableLanguages:[]}),getters:{getCitation:t=>t.citation,getObservationMatrix:t=>t.observationMatrix,getDescriptors:t=>t.descriptors,getDescriptorById:t=>r=>t.descriptors.find(n=>n.descriptorId===r),getDescriptorsUsed:t=>t.descriptors.filter(r=>r.status==="used"),getDescriptorsUseless:t=>t.descriptors.filter(r=>r.status==="useless"),getDescriptorsUseful:t=>t.descriptors.filter(r=>r.status==="useful"),getEliminated:t=>t.eliminated,getKeywords:t=>t.availableKeywords,getLanguages:t=>t.availableLanguages,getRemaining:t=>t.remaining},actions:{setDescriptors(t){this.descriptors=t},setEliminated(t){this.eliminated=t},setRemaining(t){this.remaining=t},setLanguages(t){this.availableLanguages=t},setKeywords(t){this.availableKeywords=t},setObservationMatrix(t){this.observationMatrix=t},async requestInteractiveKey({observationMatrixId:t,params:r={},opt:n={}}){const o=await $r.key(t,{params:r}),{data:i}=o;return n.refreshOnlyTaxa||(this.setObservationMatrix(Ur(i)),this.setDescriptors(i.list_of_descriptors.map(a=>Or(a))),this.setKeywords(i.descriptor_available_keywords.map(a=>Ar(a))),this.setLanguages(i.descriptor_available_languages.map(a=>Mr(a)))),this.setEliminated(i.eliminated.map(a=>Ye(a))),this.setRemaining(i.remaining.map(a=>Ye(a))),o}}}),g=y.defineStore("filter",{state:()=>({descriptors:{},eliminateUnknown:void 0,errorTolerance:void 0,identifiedToRank:void 0,keywordIds:[],languageId:void 0,rowIds:[],sorting:void 0}),getters:{getKeywordIds:t=>t.keywordIds,getLanguageId:t=>t.languageId,getRowIds:t=>t.rowIds,getDescriptors:t=>t.descriptors,getIdentifiedToRank:t=>t.identifiedToRank,getEliminateUknown:t=>t.eliminateUnknown,getErrorTolerance:t=>t.errorTolerance,getSorting:t=>t.sorting,getDescriptorValueById:t=>r=>{const n=t.descriptors[r];return typeof n=="boolean"?n:n||""},getFilterParams:t=>({selected_descriptors:Object.entries(t.descriptors).map(([n,o])=>Array.isArray(o)?`${n}:${o.join("|")}`:`${n}:${o}`).join("||"),language_id:t.languageId,keyword_ids:t.keywordIds,sorting:t.sorting,identified_to_rank:t.identifiedToRank,error_tolerance:t.errorTolerance,eliminate_unknown:t.eliminateUnknown,row_filter:t.rowIds.join("|")})},actions:{setDescriptor({descriptorId:t,value:r}){this.descriptors[t]=r},removeDescriptor(t){delete this.descriptors[t]},removeKeywordId(t){const r=this.keywordIds.findIndex(n=>n===t);r>-1&&this.keywordIds.splice(r,1)},addKeywordId(t){this.keywordIds.push(t)},setLanguageId(t){this.languageId=t},setErrorTolerance(t){this.errorTolerance=t},setEliminateUnknown(t){this.eliminateUnknown=t}}}),v=y.defineStore("settings",{state:()=>({gridLayout:"layout-mode-1",isLoading:!1,isRefreshing:!1,refreshOnlyTaxa:!1,rowFilter:!0,shouldUpdate:!0,observationMatrixId:void 0}),getters:{getIsLoading:t=>t.isLoading,getLayout:t=>t.gridLayout,getRefreshOnlyTaxa:t=>t.refreshOnlyTaxa,getRowFilter:t=>t.rowFilter,getShouldUpdate:t=>t.shouldUpdate,getObservationMatrixId:t=>t.observationMatrixId},actions:{setObservationMatrixId(t){this.observationMatrixId=t},setShouldUpdate(t){this.shouldUpdate=t},setRefreshOnlyTaxa(t){this.refreshOnlyTaxa=t},checkUpdate(){const t=g(),r=C(),n=this.observationMatrixId;this.shouldUpdate&&n&&(this.isLoading=!0,r.requestInteractiveKey({observationMatrixId:n,params:t.getFilterParams,opt:{refreshOnlyTaxa:this.refreshOnlyTaxa}}).then(o=>{this.isLoading=!1}))}}}),Pr=e.createTextVNode(" Eliminate unknowns "),jr=e.defineComponent({__name:"FilterEliminateUnknowns",setup(t){const r=g(),n=e.computed({get:()=>!!r.getEliminateUknown,set:o=>{r.setEliminateUnknown(o)}});return(o,i)=>(e.openBlock(),e.createElementBlock("label",null,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=a=>e.isRef(n)?n.value=a:null),type:"checkbox"},null,512),[[e.vModelCheckbox,e.unref(n)]]),Pr]))}}),Fr=e.createElementVNode("label",{for:"languages",class:"d-block"}," Error tolerance ",-1),vr=e.createElementVNode("option",{value:""},null,-1),zr=["value"],qr=e.defineComponent({__name:"FilterErrorTolerance",setup(t){const r=[0,1,2],n=g(),o=e.computed({get:()=>n.getErrorTolerance,set:i=>{n.setErrorTolerance(i)}});return(i,a)=>(e.openBlock(),e.createElementBlock("div",null,[Fr,e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":a[0]||(a[0]=s=>e.isRef(o)?o.value=s:null),name:"languages",role:"listbox"},[vr,(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(r,s=>e.createElementVNode("option",{key:s,value:s},e.toDisplayString(s),9,zr)),64))],512),[[e.vModelSelect,e.unref(o)]])]))}}),Kr=["otu","subspecies","species","subgenus","genus","subtribe","tribe","subfamily","family"],Hr=e.createElementVNode("label",{class:"d-block"},"Identified to rank",-1),Jr=e.createElementVNode("option",{value:void 0},null,-1),Wr=e.defineComponent({__name:"FilterRank",setup(t){const r=g(),n=e.computed({get(){return r.getIdentifiedToRank},set(o){r.$patch({identifiedToRank:o})}});return(o,i)=>(e.openBlock(),e.createElementBlock("div",null,[Hr,e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":i[0]||(i[0]=a=>e.isRef(n)?n.value=a:null)},[Jr,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Kr),a=>(e.openBlock(),e.createElementBlock("option",{key:a},e.toDisplayString(a),1))),128))],512),[[e.vModelSelect,e.unref(n)]])]))}}),Qr=e.createElementVNode("label",{class:"d-block"},"Descriptor sorting",-1),Gr=e.createElementVNode("option",{value:void 0},null,-1),Xr=e.defineComponent({__name:"FilterSort",setup(t){const r=["ordered","weighted","optimized"],n=g(),o=e.computed({get(){return n.getSorting},set(i){n.$patch({sorting:i})}});return(i,a)=>(e.openBlock(),e.createElementBlock("div",null,[Qr,e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":a[0]||(a[0]=s=>e.isRef(o)?o.value=s:null)},[Gr,(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(r,s=>e.createElementVNode("option",{key:s},e.toDisplayString(s),1)),64))],512),[[e.vModelSelect,e.unref(o)]])]))}}),Yr=e.createElementVNode("label",{for:"languages",class:"d-block"}," Languages ",-1),Zr=["value"],en=e.defineComponent({__name:"FilterLanguage",setup(t){const r=g(),n=C(),o=e.computed({get:()=>r.getLanguageId,set:i=>{r.setLanguageId(Number(i))}});return(i,a)=>(e.openBlock(),e.createElementBlock("div",null,[Yr,e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":a[0]||(a[0]=s=>e.isRef(o)?o.value=s:null),name:"languages",role:"listbox"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n).getLanguages,({languageId:s,name:l})=>(e.openBlock(),e.createElementBlock("option",{key:s,value:s},e.toDisplayString(l),9,Zr))),128))],512),[[e.vModelSelect,e.unref(o)]])]))}});var Ao=(()=>`.btn{border-radius:8px;border:none}.btn-primary-color{background-color:var(--primary-color);color:#fff}.btn-medium-size{min-height:var(--btn-medium-size)}
3
+ `)();const Z=e.defineComponent({__name:"VBtn",props:{color:{default:"primary"},size:{default:"medium"}},setup(t){const r=t,n=e.computed(()=>[`btn-${r.color}-color`,`btn-${r.size}-size`]);return(o,i)=>(e.openBlock(),e.createElementBlock("button",{type:"button",class:e.normalizeClass(["btn",e.unref(n)])},[e.renderSlot(o.$slots,"default")],2))}});var Mo=(()=>`.modal-mask{position:fixed;z-index:1099;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:table;transition:opacity .3s ease}.modal-wrapper{display:table-cell;vertical-align:middle}.modal-container{position:relative;width:300px;margin:0 auto;padding:20px 30px;background-color:#fff;border-radius:2px;box-shadow:0 2px 8px #00000054;transition:all .3s ease;font-family:IBM Plex Sans,Helvetica,Arial,sans-serif;max-height:90vh;overflow-y:auto}.modal-close{position:absolute;cursor:pointer;top:26px;right:30px;width:10px;height:10px;background-image:image-url("close.svg");background-size:10px 10px;opacity:.4}.modal-close:hover{opacity:1}.modal-header h3{margin-top:0;color:#42b983}.modal-body{margin:20px 0}.modal-default-button{float:right}.modal-enter,.modal-leave-active{opacity:0}.modal-enter .modal-container,.modal-leave-active .modal-container{-webkit-transform:scale(1.1);transform:scale(1.1)}.transparent-modal{background-color:#000c!important}.transparent-modal .modal-header h3{margin:0 0 2em 2em;padding:6px 6px 6px 12px;border-radius:3px;background-color:#0000004d;color:#ffffff80}.transparent-modal .modal-close{right:42px;top:30px;color:#ffffff80;background-image:image-url("w_close.svg")}.transparent-modal .modal-container{width:70%;position:relative;background-color:transparent!important;box-shadow:none}.transparent-modal .modal-container .modal-body{overflow:auto;margin-right:1em;max-height:80vh}.transparent-modal .modal-container .modal-body::-webkit-scrollbar{position:absolute;right:40px;-webkit-appearance:none}.transparent-modal .modal-container .modal-body::-webkit-scrollbar:vertical{width:6px}.transparent-modal .modal-container .modal-body::-webkit-scrollbar:horizontal{height:6px}.transparent-modal .modal-container .modal-body::-webkit-scrollbar-thumb{border-radius:8px;width:11px;height:5px;border:rgba(255,255,255,.5);background-color:#ffffff80}.transparent-modal .modal-container .modal-body::-webkit-scrollbar-track{background-color:#0000004d;border-radius:8px}
4
+ `)();const tn={class:"modal-wrapper"},rn={class:"modal-header"},nn={class:"modal-body"},on={class:"modal-footer"},ge=e.defineComponent({__name:"VModal",props:{containerClass:null,containerStyle:null},emits:["close"],setup(t,{emit:r}){const n=o=>{o.preventDefault(),o.key==="Escape"&&r("close")};return e.onMounted(()=>document.addEventListener("keydown",n)),e.onUnmounted(()=>document.removeEventListener("keydown",n)),(o,i)=>(e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"modal-mask",onClick:i[2]||(i[2]=a=>r("close")),onKey:i[3]||(i[3]=a=>r("close"))},[e.createElementVNode("div",tn,[e.createElementVNode("div",{class:e.normalizeClass(["modal-container",t.containerClass]),style:e.normalizeStyle(B({},t.containerStyle)),onClick:i[1]||(i[1]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",rn,[e.createElementVNode("div",{class:"modal-close",onClick:i[0]||(i[0]=a=>r("close"))}),e.renderSlot(o.$slots,"header")]),e.createElementVNode("div",nn,[e.renderSlot(o.$slots,"body")]),e.createElementVNode("div",on,[e.renderSlot(o.$slots,"footer")])],6)])],32)]),_:3}))}}),an=e.createTextVNode(" Keyword "),sn=e.createElementVNode("h3",null,"Keywords",-1),ln={class:"list-none p-0"},cn=["value"],dn=e.defineComponent({__name:"FilterKeywords",setup(t){const r=C(),n=g(),o=e.ref(!1),i=e.computed({get:()=>n.getKeywordIds,set:a=>{n.$patch({keywordIds:a})}});return(a,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Z,{color:"primary",size:"medium",onClick:s[0]||(s[0]=l=>o.value=!0)},{default:e.withCtx(()=>[an]),_:1}),o.value?(e.openBlock(),e.createBlock(ge,{key:0,onClose:s[2]||(s[2]=l=>o.value=!1)},{header:e.withCtx(()=>[sn]),body:e.withCtx(()=>[e.createElementVNode("ul",ln,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).getKeywords,({keywordId:l,name:d})=>(e.openBlock(),e.createElementBlock("li",{key:l},[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":s[1]||(s[1]=p=>e.isRef(i)?i.value=p:null),value:l,type:"checkbox"},null,8,cn),[[e.vModelCheckbox,e.unref(i)]]),e.createTextVNode(" "+e.toDisplayString(d),1)])]))),128))])]),_:1})):e.createCommentVNode("",!0)],64))}}),pn=e.createTextVNode(" Refresh only taxa "),fn=e.defineComponent({__name:"SettingRefresh",setup(t){const r=v(),n=e.computed({get:()=>r.getRefreshOnlyTaxa,set:o=>{r.setRefreshOnlyTaxa(o)}});return(o,i)=>(e.openBlock(),e.createElementBlock("label",null,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=a=>e.isRef(n)?n.value=a:null),type:"checkbox"},null,512),[[e.vModelCheckbox,e.unref(n)]]),pn]))}});var Po=(()=>`.menu-list{display:flex;list-style:none;align-items:center;margin:0}.menu-list li:first-child{padding-left:0}
5
+ `)(),z=(t,r)=>{const n=t.__vccOpts||t;for(const[o,i]of r)n[o]=i;return n};const un={},mn={class:"menu-list"};function hn(t,r){return e.openBlock(),e.createElementBlock("ul",mn,[e.renderSlot(t.$slots,"default")])}var _n=z(un,[["render",hn]]),jo=(()=>`.list-item[data-v-3f00bdeb]{justify-content:center;padding-left:1em;padding-right:1em;border-right:1px solid #e5e5e5}
6
+ `)();const gn={},yn={class:"list-item"};function bn(t,r){return e.openBlock(),e.createElementBlock("li",yn,[e.renderSlot(t.$slots,"default",{},void 0,!0)])}var V=z(gn,[["render",bn],["__scopeId","data-v-3f00bdeb"]]);const Ze={"layout-mode-1":"layout-mode-2","layout-mode-2":"layout-mode-1"};var Fo=(()=>`.grid[data-v-203acd5e]{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(--border-color);box-shadow:0 2px 2px #0003}
7
+ `)();const kn={},xn={class:"grid"};function wn(t,r){return e.openBlock(),e.createElementBlock("div",xn,[e.renderSlot(t.$slots,"default",{},void 0,!0)])}var et=z(kn,[["render",wn],["__scopeId","data-v-203acd5e"]]),vo=(()=>`.grid-icon{width:20px;height:12px;border:2px solid transparent;background-color:transparent;grid-gap:2px}.grid-icon>div{background-color:#fff}
8
+ `)();const En=e.createElementVNode("div",{class:"panel-descriptors"},null,-1),Cn=e.createElementVNode("div",{class:"panel-remaining"},null,-1),Bn=e.createElementVNode("div",{class:"panel-eliminated"},null,-1),Sn=e.defineComponent({__name:"GridToggle",setup(t){const r=v(),n=e.computed(()=>r.getLayout),o=()=>{r.$patch({gridLayout:Ze[n.value]})};return(i,a)=>(e.openBlock(),e.createBlock(Z,{class:e.normalizeClass(e.unref(Ze)[e.unref(n)]),onClick:o},{default:e.withCtx(()=>[e.createVNode(et,{class:"grid-icon"},{default:e.withCtx(()=>[En,Cn,Bn]),_:1})]),_:1},8,["class"]))}}),Nn=e.createTextVNode(" Reset "),$n=e.defineComponent({__name:"ResetButton",setup(t){const r=g();return(n,o)=>(e.openBlock(),e.createBlock(Z,{color:"primary",size:"medium",onClick:o[0]||(o[0]=i=>e.unref(r).$reset())},{default:e.withCtx(()=>[Nn]),_:1}))}});var zo=(()=>`.header-bar[data-v-2f031624]{background-color:var(--bg-panel-color);padding:1em;box-shadow:#24252614 4px 4px 15px;border-radius:.9rem;display:flex;justify-content:space-between;align-items:center}.header-bar__buttons[data-v-2f031624]{display:flex;align-items:center}
9
+ `)();const Vn=t=>(e.pushScopeId("data-v-2f031624"),t=t(),e.popScopeId(),t),Dn={class:"header-bar"},Rn=Vn(()=>e.createElementVNode("div",null,null,-1)),In={class:"header-bar__buttons"};var Tn=z(e.defineComponent({__name:"HeaderBar",setup(t){return(r,n)=>(e.openBlock(),e.createElementBlock("div",Dn,[Rn,e.createVNode(_n,null,{default:e.withCtx(()=>[e.createVNode(V,null,{default:e.withCtx(()=>[e.createVNode(fn)]),_:1}),e.createVNode(V,null,{default:e.withCtx(()=>[e.createVNode(jr)]),_:1}),e.createVNode(V,null,{default:e.withCtx(()=>[e.createVNode(qr)]),_:1}),e.createVNode(V,null,{default:e.withCtx(()=>[e.createVNode(Wr)]),_:1}),e.createVNode(V,null,{default:e.withCtx(()=>[e.createVNode(en)]),_:1}),e.createVNode(V,null,{default:e.withCtx(()=>[e.createVNode(Xr)]),_:1}),e.createVNode(V,null,{default:e.withCtx(()=>[e.createVNode(dn)]),_:1})]),_:1}),e.createElementVNode("div",In,[e.createVNode($n,{class:"margin-small-right"}),e.createVNode(Sn)])]))}}),[["__scopeId","data-v-2f031624"]]);const Ln=["innerHTML"],tt=e.defineComponent({__name:"PanelRowItem",props:{row:null},setup(t){return(r,n)=>(e.openBlock(),e.createElementBlock("li",{innerHTML:t.row.objectTag},null,8,Ln))}}),On=e.defineComponent({__name:"PanelEliminated",setup(t){const r=C(),n=e.computed(()=>r.getEliminated);return(o,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("h2",null,"Eliminated ("+e.toDisplayString(e.unref(n).length)+")",1),e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n),a=>(e.openBlock(),e.createBlock(tt,{key:a.rowId,row:a,class:"margin-small-bottom"},null,8,["row"]))),128))])]))}}),Un=e.createTextVNode(" Select "),An=e.createElementVNode("h3",null,"Filter row",-1),Mn={class:"list-none p-0"},Pn=["value"],jn=e.defineComponent({__name:"FilterRow",setup(t){const r=C(),n=v(),o=g(),i=e.ref(!1),a=e.ref([]),s=e.computed(()=>{const d=o.getRowIds,p=a.value;return d.length!==p.length||!d.every(c=>p.includes(c))}),l=e.computed({get:()=>o.getRowIds,set:d=>{o.$patch({rowIds:d})}});return e.watch(i,d=>{n.setShouldUpdate(!d),!d&&s.value&&n.checkUpdate(),a.value=o.getRowIds}),(d,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Z,{color:"primary",size:"medium",onClick:p[0]||(p[0]=c=>i.value=!0)},{default:e.withCtx(()=>[Un]),_:1}),i.value?(e.openBlock(),e.createBlock(ge,{key:0,onClose:p[2]||(p[2]=c=>i.value=!1)},{header:e.withCtx(()=>[An]),body:e.withCtx(()=>[e.createElementVNode("ul",Mn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).getRemaining,c=>(e.openBlock(),e.createElementBlock("li",{key:c.rowId},[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":p[1]||(p[1]=f=>e.isRef(l)?l.value=f:null),value:c.rowId,type:"checkbox"},null,8,Pn),[[e.vModelCheckbox,e.unref(l)]]),e.createTextVNode(" "+e.toDisplayString(c.objectLabel),1)])]))),128))])]),_:1})):e.createCommentVNode("",!0)],64))}}),Fn={class:"d-flex justify-between align-center"},vn=e.defineComponent({__name:"PanelRemaining",setup(t){const r=C(),n=e.computed(()=>r.getRemaining);return(o,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Fn,[e.createElementVNode("h2",null,"Remaining ("+e.toDisplayString(e.unref(n).length)+")",1),e.createVNode(jn)]),e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n),a=>(e.openBlock(),e.createBlock(tt,{key:a.rowId,row:a,class:"margin-small-bottom"},null,8,["row"]))),128))])]))}});class zn{static find(r){return Xe().get(`/depictions/${r}.json`,{params:{extend:["image"]}})}}var Ko=(()=>`.depiction-box{display:flex;align-items:center;justify-content:center;border:1px solid black;height:300px;width:300px}
10
+ `)();const qn={key:0,class:"depiction-box"},Kn=["src"],rt=e.defineComponent({__name:"VDepiction",props:{depictionId:null},setup(t){const r=t,n=e.ref();return zn.find(r.depictionId).then(({data:o})=>{n.value=Dr(o)}),(o,i)=>n.value?(e.openBlock(),e.createElementBlock("div",qn,[e.createElementVNode("img",{src:n.value.imageUrl},null,8,Kn)])):e.createCommentVNode("",!0)}});var Ho=(()=>`.character-descriptor__cell{display:flex;align-items:flex-end}
11
+ `)();const Hn={class:"character-descriptor__cell"},Jn=["value"],Wn=e.defineComponent({__name:"CharacterStateCell",props:{characterState:null,descriptorId:null},setup(t){const r=t,n=g(),o=e.computed({get:()=>n.getDescriptorValueById(r.descriptorId)||[],set:i=>{i.length?n.setDescriptor({descriptorId:r.descriptorId,value:i}):n.removeDescriptor(r.descriptorId)}});return(i,a)=>(e.openBlock(),e.createElementBlock("div",Hn,[e.createElementVNode("label",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.characterState.depictionIds,s=>(e.openBlock(),e.createBlock(rt,{key:s,"depiction-id":s},null,8,["depiction-id"]))),128)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=s=>e.isRef(o)?o.value=s:null),value:t.characterState.characterStateId,type:"checkbox"},null,8,Jn),[[e.vModelCheckbox,e.unref(o)]]),e.createTextVNode(" "+e.toDisplayString(t.characterState.name),1)])]))}});var Jo=(()=>`.character-states-grid{display:grid;grid-template-columns:repeat(3,minmax(33.33%,1fr));gap:1em}
12
+ `)();const Qn={class:"character-states-grid"},Gn=e.defineComponent({__name:"CharacterStateGrid",props:{descriptor:null},setup(t){const r=t,n=g(),o=v(),i=e.ref(),a=e.computed(()=>{const s=n.getDescriptorValueById(r.descriptor.descriptorId)||[],l=i.value||[];return s.length!==l.length||!s.every(d=>l.includes(d))});return e.onMounted(()=>{o.setShouldUpdate(!1),i.value=n.getDescriptorValueById(r.descriptor.descriptorId)}),e.onUnmounted(()=>{o.setShouldUpdate(!0),a.value&&o.checkUpdate()}),(s,l)=>(e.openBlock(),e.createElementBlock("div",Qn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.descriptor.characterStates,d=>(e.openBlock(),e.createBlock(Wn,{key:d.characterStateId,"descriptor-id":t.descriptor.descriptorId,"character-state":d},null,8,["descriptor-id","character-state"]))),128))]))}});var Wo=(()=>`.descriptor-modal{width:1000px;max-height:90vh;overflow-y:scroll}.descriptor-modal__depiction{display:flex;justify-content:center}
13
+ `)();const Xn={key:0},Yn={class:"descriptor-modal__depiction"},Zn=e.createElementVNode("hr",null,null,-1),eo=e.defineComponent({__name:"DescriptorModal",props:{descriptor:null},setup(t){return(r,n)=>(e.openBlock(),e.createBlock(ge,{"container-class":"descriptor-modal"},{header:e.withCtx(()=>[e.createElementVNode("h3",null,e.toDisplayString(t.descriptor.name),1),t.descriptor.description?(e.openBlock(),e.createElementBlock("span",Xn,e.toDisplayString(t.descriptor.description),1)):e.createCommentVNode("",!0)]),body:e.withCtx(()=>[e.createElementVNode("div",Yn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.descriptor.depictionIds,o=>(e.openBlock(),e.createBlock(rt,{key:o,"depiction-id":o},null,8,["depiction-id"]))),128))]),Zn,t.descriptor.type===e.unref(j).Qualitative?(e.openBlock(),e.createBlock(Gn,{key:0,descriptor:t.descriptor},null,8,["descriptor"])):e.createCommentVNode("",!0)]),_:1}))}}),to=["id"],ro={class:"d-block"},ee=e.defineComponent({__name:"DescriptorContainer",props:{descriptor:null},setup(t){const r=e.ref(!1);return(n,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{id:`descriptor-${t.descriptor.descriptorId}`},[e.createElementVNode("div",ro,[e.createElementVNode("span",{class:"link",onClick:o[0]||(o[0]=i=>r.value=!0)},[e.renderSlot(n.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.descriptor.name),1)])])]),e.renderSlot(n.$slots,"default")],8,to),r.value?(e.openBlock(),e.createBlock(eo,{key:0,descriptor:t.descriptor,onClose:o[1]||(o[1]=i=>r.value=!1)},null,8,["descriptor"])):e.createCommentVNode("",!0)],64))}}),no=["onKeyup"],oo=e.defineComponent({__name:"DescriptorContinuous",props:{descriptor:null},setup(t){const r=t,n=g(),o=e.ref(String(n.getDescriptorValueById(r.descriptor.descriptorId))),i=()=>{n.setDescriptor({descriptorId:r.descriptor.descriptorId,value:o.value})};return(a,s)=>(e.openBlock(),e.createBlock(ee,{descriptor:t.descriptor},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.descriptor.name)+" ("+e.toDisplayString(t.descriptor.min)+"-"+e.toDisplayString(t.descriptor.max)+" "+e.toDisplayString(t.descriptor.defaultUnit)+") ",1)]),default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>o.value=l),type:"text",onBlur:i,onKeyup:e.withKeys(i,["enter"])},null,40,no),[[e.vModelText,o.value]])]),_:1},8,["descriptor"]))}}),io=[e.createElementVNode("option",null,null,-1),e.createElementVNode("option",{value:!0}," Present ",-1),e.createElementVNode("option",{value:!1}," Absent ",-1)],ao=e.defineComponent({__name:"DescriptorPresenceAbsence",props:{descriptor:null},setup(t){const r=t,n=g(),o=e.computed({get:()=>n.getDescriptorValueById(r.descriptor.descriptorId),set:i=>{const{descriptorId:a}=r.descriptor;typeof i=="boolean"?n.setDescriptor({descriptorId:a,value:Boolean(i)}):n.removeDescriptor(a)}});return(i,a)=>(e.openBlock(),e.createBlock(ee,{descriptor:t.descriptor},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":a[0]||(a[0]=s=>e.isRef(o)?o.value=s:null)},io,512),[[e.vModelSelect,e.unref(o)]])]),_:1},8,["descriptor"]))}}),so=e.createElementVNode("option",{value:""},null,-1),lo=["value","selected"],co={key:0},po={key:1},fo=e.defineComponent({__name:"DescriptorQualitative",props:{descriptor:null},setup(t){const r=t,n=g(),o=a=>{const s=a.target,{descriptorId:l}=r.descriptor;s.value?n.setDescriptor({descriptorId:l,value:[Number(s.value)]}):n.removeDescriptor(l)},i=a=>n.getDescriptorValueById(r.descriptor.descriptorId).includes(a.characterStateId);return(a,s)=>(e.openBlock(),e.createBlock(ee,{descriptor:t.descriptor},{default:e.withCtx(()=>[e.createElementVNode("select",{name:"listbox",onChange:o},[so,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.descriptor.characterStates,l=>(e.openBlock(),e.createElementBlock("option",{key:l.characterStateId,value:l.characterStateId,selected:i(l)},[i(l)?(e.openBlock(),e.createElementBlock("span",co,">")):e.createCommentVNode("",!0),l.status==="useless"?(e.openBlock(),e.createElementBlock("span",po,"-")):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(l.name)+" ("+e.toDisplayString(l.numberOfObjects)+") ",1)],8,lo))),128))],32)]),_:1},8,["descriptor"]))}}),uo=["onKeyup"],mo=e.defineComponent({__name:"DescriptorSample",props:{descriptor:null},setup(t){const r=t,n=g(),o=e.ref(String(n.getDescriptorValueById(r.descriptor.descriptorId))),i=()=>{n.setDescriptor({descriptorId:r.descriptor.descriptorId,value:o.value})};return(a,s)=>(e.openBlock(),e.createBlock(ee,{descriptor:t.descriptor},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.descriptor.name)+" ("+e.toDisplayString(t.descriptor.min)+"-"+e.toDisplayString(t.descriptor.max)+" "+e.toDisplayString(t.descriptor.defaultUnit)+") ",1)]),default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>o.value=l),type:"text",onBlur:i,onKeyup:e.withKeys(i,["enter"])},null,40,uo),[[e.vModelText,o.value]])]),_:1},8,["descriptor"]))}}),ye=e.defineComponent({__name:"DescriptorsList",props:{title:null,descriptors:null},setup(t){const r={DescriptorContinuous:oo,DescriptorPresenceAbsence:ao,DescriptorQualitative:fo,DescriptorSample:mo},n=o=>{const i=o.replace("::","");return r[i]};return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("h2",null,e.toDisplayString(t.title),1),e.createElementVNode("ol",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.descriptors,a=>(e.openBlock(),e.createElementBlock("li",{key:a.descriptorId},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(a.type)),{descriptor:a},null,8,["descriptor"]))]))),128))])],64))}}),ho={class:"descriptors-view"},_o=e.defineComponent({__name:"PanelDescriptors",setup(t){const r=C();return(n,o)=>(e.openBlock(),e.createElementBlock("div",ho,[e.unref(r).getDescriptorsUsed.length?(e.openBlock(),e.createBlock(ye,{key:0,descriptors:e.unref(r).getDescriptorsUsed,title:"Used Descriptors"},null,8,["descriptors"])):e.createCommentVNode("",!0),e.unref(r).getDescriptorsUseful.length?(e.openBlock(),e.createBlock(ye,{key:1,descriptors:e.unref(r).getDescriptorsUseful,title:"Descriptors Useful for Identification"},null,8,["descriptors"])):e.createCommentVNode("",!0),e.unref(r).getDescriptorsUseless.length?(e.openBlock(),e.createBlock(ye,{key:2,descriptors:e.unref(r).getDescriptorsUseless,title:"Descriptors no longer relevant for identification"},null,8,["descriptors"])):e.createCommentVNode("",!0)]))}});var Yo=(()=>`.tw-spinner[data-v-3541fc5b]{display:flex;margin:0 auto;height:auto;width:auto;align-items:center;justify-content:center}.fade-enter-active[data-v-3541fc5b],.fade-leave-active[data-v-3541fc5b]{transition:opacity .5s}.fade-enter[data-v-3541fc5b],.fade-leave-to[data-v-3541fc5b]{opacity:0}.tw-spinner-left[data-v-3541fc5b]{flex-direction:row}.tw-spinner-right[data-v-3541fc5b]{flex-direction:row-reverse}.tw-spinner-top[data-v-3541fc5b]{flex-direction:column}.tw-spinner-bottom[data-v-3541fc5b]{flex-direction:column-reverse}.box-spinner[data-v-3541fc5b]{display:flex;position:absolute;box-shadow:0 1px 1px #0003;background-image:none!important;background-color:#fff;align-items:center;z-index:9999;height:100%;opacity:.9}.tw-spinner[data-v-3541fc5b]{font-size:20px;overflow:hidden;width:100%;position:relative}.tw-spinner svg[data-v-3541fc5b]{display:block;position:relative;width:30px;height:30px;margin:0 auto}.tw-spinner #Tail[data-v-3541fc5b]{opacity:0;animation:tail-3541fc5b 2s ease infinite;fill:#41ba8d}.tw-spinner #LeftBottom[data-v-3541fc5b]{fill:#00845d;opacity:0;animation:spinner-3541fc5b 1s ease alternate infinite;animation-delay:0s}.tw-spinner #LeftMid[data-v-3541fc5b]{fill:#28221b;opacity:0;animation:spinner-3541fc5b 1s ease alternate infinite;animation-delay:.2s}.tw-spinner #LeftTop[data-v-3541fc5b]{fill:#342d25;opacity:0;animation:spinner-3541fc5b 1s ease alternate infinite;animation-delay:.4s}.tw-spinner #Head[data-v-3541fc5b]{fill:#342d25;opacity:0;animation:spinner-3541fc5b 1s ease alternate infinite;animation-delay:.6s}@keyframes spinner-3541fc5b{0%{opacity:0}30%{opacity:0}90%{opacity:1}to{opacity:1}}@keyframes tail-3541fc5b{0%{opacity:0}30%{opacity:1}50%{opacity:1}90%{opacity:0}to{opacity:0}}
14
+ `)();const q=t=>(e.pushScopeId("data-v-3541fc5b"),t=t(),e.popScopeId(),t),go=[q(()=>e.createElementVNode("path",{id:"LeftTop",d:`M14.2,63.1C24.3,63.1,28,76.3,28,76.3s5,15.5,15.3,15.5c7.7,0,9.4-6.3,9.8-9.1c0-0.1,0-0.2,0-0.4s0-0.5,0.1-0.8
15
+ c0-0.1,0-0.1,0-0.2c0.3-2-0.8-4-2.7-4.8l0,0c-3.1-1.1-5.9-3-8-5.6c-6.4-7.4-3-17,4.5-23.6c-3.5-4-8-8.7-12-10.8
16
+ c-8.7-4.6-15.7,2.6-16.2,3.2L18.7,40c-0.6,0.8-1.2,1.6-1.8,2.5l-0.1,0.1c-0.6,0.9-1.2,1.8-1.8,2.7L15,45.4c-0.5,0.8-1,1.6-1.5,2.4
17
+ l-0.3,0.5c-1,1.8-2,3.6-3,5.5L10,54.3c-0.4,0.9-0.9,1.8-1.3,2.7l-0.1,0.1C8.2,58,7.8,59,7.4,59.9l-0.2,0.5c-0.3,0.8-0.6,1.5-0.9,2.3
18
+ l-0.2,0.6c-0.4,1-0.7,1.9-1,2.9L5,66.7c-0.1,0.3-0.2,0.5-0.2,0.8C7.1,64.7,10.5,63.1,14.2,63.1z`},null,-1)),q(()=>e.createElementVNode("path",{id:"Head",d:`M36.2,33c5.3,1.8,11.4,6.8,15.7,11c0.5-0.3,1.1-0.6,1.6-0.9c2.3-1.2,4.7-2.1,7.2-2.7
19
+ c-2.4-4.9-5.6-12.8-4.9-18.3c1.4-11.2,13.6-12,13.6-12S58.3,12.5,59,22.9c0.3,5,4.7,12.5,7.5,16.8c7-0.1,13,2.7,15.8,8
20
+ c0.3,0.5,0.5,1.1,0.7,1.6l0,0c0.5,1,1.3,1.9,2.3,2.4c3.6,1.2,7.6,2.5,11.7,4.2c5.8,2.3,11.5,5,17,8.1c0.5,0.2,1,0,1.2-0.5
21
+ c0.1-0.3,0.1-0.7-0.2-0.9c-27.2-26.1-8-36.3-8-36.3c-9.8,14.2,6.6,24.5,25.5,35.1c16.6,9.3,28.4,19.5,41.3,12.7
22
+ c6.4-3.4,1.9-11-1-15.2c-2.2-2.9-4-6-5.6-9.2c-1-2.1-1.3-4.4-0.8-6.6c0.7-3.1-0.4-6.8-2.8-10.5c-1.8-2.8-5.1-5.7-7.6-7.6
23
+ c-1.6-1.3-3.1-2.7-4.3-4.4c-9-12.6-32.2-17.9-32.2-17.9l0,0C97.5-2.6,74.3,0.1,54,10.2l0,0c-6.9,3.5-13.5,7.7-19.4,12.7l-0.8,0.6
24
+ c-1.4,1.2-2.8,2.5-4.2,3.8l0,0c-0.8,0.8-1.6,1.5-2.3,2.3l0,0c-1.5,1.6-3,3.2-4.4,4.9l-0.2,0.2l-0.4,0.5C25.2,32.8,29.6,30.9,36.2,33
25
+ z M145.8,33.9c3.9-1.7,8.5,0.1,10.2,4c0.6,1.3,0.8,2.7,0.6,4c-2.5,1.2-5.5,0.9-7.7-0.9C146.5,39.5,145.3,36.7,145.8,33.9L145.8,33.9
26
+ z`},null,-1)),q(()=>e.createElementVNode("path",{id:"LeftMid",d:`M53.2,106.9c-0.2-2-0.4-4-0.4-6.3c-2.3,1-4.7,1.5-7.2,1.5c-19,0-19.5-18.8-26.2-29.2
27
+ c-7-10.8-16.8,0.9-17.8,7.2c0,0.3-0.1,0.5-0.1,0.7c-0.1,0.6-0.2,1.3-0.3,1.9C1,83.1,1,83.4,1,83.6c-0.1,0.8-0.2,1.6-0.3,2.3
28
+ c0,0.3-0.1,0.5-0.1,0.8c-0.1,1-0.2,2.1-0.3,3.1c0,0.1,0,0.2,0,0.3c-0.1,0.9-0.2,1.9-0.2,2.8c0,0.3,0,0.6,0,0.9C0,94.9,0,95.8,0,96.7
29
+ c0,0.1,0,0.2,0,0.3s0,0.1,0,0.1s0,0.1,0,0.1c0,0.4,0,0.8,0,1.2s0,0.8,0,1.2c0,0.6,0,1.2,0.1,1.7c0,0.2,0,0.5,0,0.7
30
+ c1.5,30.7,17.5,58.9,43,76c-8-7.8-12.7-17.8-12.7-28.6c0-13.4,7.3-26,19.1-34.4C52,113.2,53.5,110.1,53.2,106.9z`},null,-1)),q(()=>e.createElementVNode("path",{id:"LeftBottom",d:`M128.3,170c-5.8,2.4-12,3.9-18.3,4.4c-1.1,0.1-2.2,0.1-3.3,0.1c-12.3,0-28.4-4.8-40.7-25.3
31
+ l-1.6-2.7c-1.9,2.7-2.9,6-2.9,9.3c0,13.9,16.6,26.5,36.7,26.5c5.4,0.1,10.7-0.6,15.9-2c-4.6,2.9-13.8,5.6-21.9,5.6
32
+ C69.2,186,50,170.8,50,152.7c0.1-6.3,2.1-12.5,5.8-17.6c1.5-2.1,1.9-4.8,1.1-7.2l0,0c-10.5,6.1-17,15.4-17,26.6
33
+ c0,17.2,15.3,31.9,37,37.9c1.2,0.3,2.5,0.5,3.7,0.7c15.6,2.6,29.5-0.1,38.9-9.1C123.5,180.1,126.5,175.3,128.3,170z`},null,-1)),q(()=>e.createElementVNode("path",{id:"Tail",class:"st0",d:`M171,33.8c28,39.3,18.8,93.8-20.5,121.8c-2.4,1.7-4.9,3.3-7.5,4.8l-0.2,0.2c0-0.4,0-0.9,0.1-1.3
34
+ c0.6-3.9,2.1-7.6,4.4-10.8c7.5-10.7,12.4-27-0.3-48.1c-7-11.6-21.7-28-51.7-40.1c-4.1-1.7-8.1-3.1-11.8-4.2L82,55.6l-0.2-0.1
35
+ c-1.1-0.3-2.1-0.6-3.1-0.9h-0.2l-2.9-0.8h-0.1l-1.3-0.3h-0.1l-2.6-0.6h-0.1l-2.3-0.5h-0.2l-1-0.2l0,0L67,51.7h-0.2l-0.7-0.2h-0.2
36
+ l-0.8-0.2H65l-0.6-0.1h-0.2L63.7,51l-0.1,0.4v0.1l-0.1,0.3l0,0.2l-0.1,0.3l-0.1,0.2l-0.1,0.3l-0.1,0.2L63,53.5L63,53.7l-0.1,0.4
37
+ l-0.1,0.2l-0.1,0.5l-0.1,0.3l-0.1,0.6L62.3,56l-0.1,0.5l-0.1,0.3L62,57.2l-0.1,0.4L61.8,58l-0.1,0.4l-0.1,0.5l-0.1,0.4l-0.1,0.5
38
+ l-0.1,0.4l-0.1,0.6l-0.1,0.5L61,61.9l-0.1,0.4l-0.1,0.5l-0.1,0.5l-0.1,0.5l-0.1,0.5l-0.1,0.5l-0.1,0.5l-0.1,0.5l-0.1,0.5L60,66.9
39
+ l-0.1,0.5l-0.1,0.7l-0.1,0.5l-0.2,1l-0.1,0.5l-0.1,0.6l-0.1,0.5l-0.1,0.6l-0.1,0.6L59,73.1l-0.1,0.6l-0.1,0.6l-0.1,0.6l-0.1,0.7
40
+ l-0.1,0.6l-0.1,0.8l-0.1,0.5c-0.2,1.8-0.4,3.6-0.6,5.5V83c0,0.6-0.1,1.1-0.1,1.7l0,0c0,0.6-0.1,1.1-0.1,1.7v0.1
41
+ c0,0.6-0.1,1.1-0.1,1.7l0,0c-0.2,3-0.2,6.2-0.2,9.5c0.1,4.3,0.4,8.5,0.8,12.7c0,0.3,0.1,0.7,0.1,1.1c0.7,5.8,1.9,11.4,3.6,17
42
+ c1.5,4.5,3.2,8.9,5.2,13.2c0.9,1.7,1.8,3.4,2.8,5.1c9.2,15.3,21.5,23,36.6,23c1,0,2.1,0,3.2-0.1c7-0.6,13.9-2.5,20.2-5.6
43
+ c4.9-24.5-8.4-59.3-36.1-88.3C90,71.8,86,68,81.7,64.4c9.2,6.9,13.9,10.7,19.2,16.3c37.8,39.6,49.7,89.7,26.5,111.9
44
+ c-3.4,3.3-7.5,5.8-11.9,7.5c5.8-1.6,11.1-4.5,15.4-8.6c1.4-1.3,2.6-2.7,3.8-4.2c49.6-20.7,73-77.7,52.4-127.3
45
+ C183.1,50.4,177.7,41.6,171,33.8z`},null,-1))],yo=["innerHTML"];var bo=z(e.defineComponent({__name:"VSpinner",props:{fullScreen:{type:Boolean,default:!1},legend:{type:String,default:"Loading, please wait."},resize:{type:Boolean,default:!0},legendStyle:{type:Object,default:()=>({color:"#444",marginTop:"30px",textAlign:"center"})},showLegend:{type:Boolean,default:!0},showSpinner:{type:Boolean,default:!0},spinnerPosition:{type:String,default:"top"},logoSize:{type:Object,default:()=>({width:"50px",height:"50px"})}},setup(t){const r=t,n={position:"fixed",width:"100vw",height:"100vh",top:"0px",left:"0px"},o=e.ref(),i=e.ref({}),a=e.ref();e.onMounted(()=>{s(),r.resize&&!r.fullScreen&&d()}),e.onUnmounted(()=>clearInterval(a.value));const s=()=>{var c;const p=(c=o.value)==null?void 0:c.parentNode;!p||Object.assign(i.value,r.fullScreen?n:l(p))},l=p=>{const c=p.getBoundingClientRect(),f=window.getComputedStyle(p,null),b=parseInt(f.getPropertyValue("padding-left"),10),_=parseInt(f.getPropertyValue("padding-right"),10),te=parseInt(f.getPropertyValue("padding-top"),10),re=parseInt(f.getPropertyValue("padding-bottom"),10);return{position:"absolute",width:c.width-b-_+"px",height:c.height-te-re+"px"}},d=()=>{a.value=setInterval(s,500)};return(p,c)=>(e.openBlock(),e.createBlock(e.Transition,{name:"fade"},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"spinnerElement",ref:o,class:"box-spinner mx-spinner absolute bg-white opacity-90",style:e.normalizeStyle(i.value)},[e.createElementVNode("div",{class:e.normalizeClass(["tw-spinner",[`tw-spinner-${t.spinnerPosition}`]])},[t.showSpinner?(e.openBlock(),e.createElementBlock("svg",{key:0,style:e.normalizeStyle([t.logoSize,{"enable-background":"new 0 0 194.6 200"}]),version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 194.6 200","xml:space":"preserve"},go,4)):e.createCommentVNode("",!0),e.createElementVNode("div",{style:e.normalizeStyle(t.legendStyle)},[t.showLegend?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:t.legend},null,8,yo)):e.createCommentVNode("",!0),e.renderSlot(p.$slots,"default",{},void 0,!0)],4)],2)],4)]),_:3}))}}),[["__scopeId","data-v-3541fc5b"]]);const ko=e.createTextVNode(" Interactive key "),xo={key:0},wo=e.defineComponent({__name:"TitleMatrix",setup(t){const r=C();return(n,o)=>(e.openBlock(),e.createElementBlock("h1",null,[ko,e.unref(r).getObservationMatrix?(e.openBlock(),e.createElementBlock("span",xo,"| "+e.toDisplayString(e.unref(r).getObservationMatrix.name),1)):e.createCommentVNode("",!0)]))}}),Eo=["title"],Co=e.defineComponent({__name:"TitleMatrixCitation",setup(t){const r=C(),n=e.computed(()=>{const o=r.getCitation;return Object.values(o||{}).filter(Boolean).join(", ")});return(o,i)=>(e.openBlock(),e.createElementBlock("span",{title:e.unref(n)},e.toDisplayString(e.unref(n)),9,Eo))}}),Bo={class:"d-flex justify-between"},So=e.defineComponent({__name:"TitleKey",setup(t){return(r,n)=>(e.openBlock(),e.createElementBlock("div",Bo,[e.createVNode(wo),e.createVNode(Co)]))}}),No={class:"vue-interactive-keys"},$o={name:"InteractiveKey"},nt=e.defineComponent(R(B({},$o),{props:{observationMatrixId:{default:1},apiConfig:null},setup(t){const r=t,n=v(),o=g();C();const i=e.computed(()=>n.getIsLoading),a=e.computed(()=>n.getLayout);return(()=>{we().updatePreferences(r.apiConfig),n.setObservationMatrixId(r.observationMatrixId),n.checkUpdate()})(),o.$subscribe(l=>{n.shouldUpdate&&n.checkUpdate()}),(l,d)=>(e.openBlock(),e.createElementBlock("div",No,[e.createVNode(So),e.createVNode(Tn,{class:"margin-medium-bottom"}),e.createVNode(et,{class:e.normalizeClass(["w-100",e.unref(a)])},{default:e.withCtx(()=>[e.createVNode(_o,{class:"panel-descriptors grid-panel"}),e.createVNode(vn,{class:"panel-remaining grid-panel"}),e.createVNode(On,{class:"panel-eliminated grid-panel"})]),_:1},8,["class"]),e.unref(i)?(e.openBlock(),e.createBlock(bo,{key:0,"full-screen":"",legend:"Loading interactive key..."})):e.createCommentVNode("",!0)]))}}));var ii=(()=>`:root{--bg-color: #f7f8fc;--bg-panel-color: #FFFFFF;--primary-color: #5D9ECE;--border-color: #CCCCCC;--link-color: #5D9ECE;--btn-medium-size: 28px}.d-block{display:block}.d-flex{display:flex}.justify-between{justify-content:space-between}.align-center{align-items:center}.w-100{height:100%}.margin-medium-bottom{margin-bottom:1em}.margin-small-right{margin-right:.5em}.p-0{padding:0}.link{color:var(--link-color);cursor:pointer}.list-none{list-style:none}body{background-color:var(--bg-color)}.vue-interactive-keys{height:calc(100vh - 160px);max-height:calc(100vh - 160px);font-family:Arial,Helvetica,sans-serif;font-size:13px}.vue-interactive-keys .grid-panel{background-color:#fff;padding:1rem;overflow-y:scroll}.vue-interactive-keys .layout-mode-1 .panel-descriptors{grid-area:1/1/2/3}.vue-interactive-keys .layout-mode-1 .panel-remaining{grid-area:2/1/3/2}.vue-interactive-keys .layout-mode-1 .panel-eliminated{grid-area:2/2/3/3}.vue-interactive-keys .layout-mode-2 .panel-descriptors{grid-area:1/1/3/2}.vue-interactive-keys .layout-mode-2 .panel-remaining{grid-area:1/2/2/3}.vue-interactive-keys .layout-mode-2 .panel-eliminated{grid-area:2/2/3/3}.vue-interactive-keys input,.vue-interactive-keys select{padding:.5em 1em;border:1px solid;border-radius:2px;border-color:var(--border-color);background-color:#fff}
46
+ `)();function ot(t){const r=t||'[data-interactive-key="true"]';return[...document.querySelectorAll(r)].map(i=>it(i,Do(i)))}function Vo(){ot()}function Do(t){return{observationMatrixId:Number(t.getAttribute("data-observation-matrix-id")),apiConfig:{baseURL:t.getAttribute("data-base-url")||"",projectToken:t.getAttribute("data-project-token")||void 0,projectId:Number(t.getAttribute("data-project-id"))||void 0,userToken:t.getAttribute("data-user-token")||void 0,csrfToken:t.getAttribute("data-csrf-token")||void 0}}}function it(t,r){const{apiConfig:n,observationMatrixId:o}=r;if(!o)throw"Missing observation matrix ID";if(!n||!n.projectToken&&!n.csrfToken&&!(n.projectId&&n.userToken))throw"Missing API configuration";const i=e.createApp(nt,{observationMatrixId:o,apiConfig:n});return i.use(y.createPinia()),i.mount(t),i}window.addEventListener("DOMContentLoaded",Vo),u.VueInteractiveKey=nt,u.createInteractiveKey=it,u.discoverInteractiveKey=ot,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ .btn{border-radius:8px;border:none}.btn-primary-color{background-color:var(--primary-color);color:#fff}.btn-medium-size{min-height:var(--btn-medium-size)}.modal-mask{position:fixed;z-index:1099;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:table;transition:opacity .3s ease}.modal-wrapper{display:table-cell;vertical-align:middle}.modal-container{position:relative;width:300px;margin:0 auto;padding:20px 30px;background-color:#fff;border-radius:2px;box-shadow:0 2px 8px #00000054;transition:all .3s ease;font-family:IBM Plex Sans,Helvetica,Arial,sans-serif;max-height:90vh;overflow-y:auto}.modal-close{position:absolute;cursor:pointer;top:26px;right:30px;width:10px;height:10px;background-image:image-url("close.svg");background-size:10px 10px;opacity:.4}.modal-close:hover{opacity:1}.modal-header h3{margin-top:0;color:#42b983}.modal-body{margin:20px 0}.modal-default-button{float:right}.modal-enter,.modal-leave-active{opacity:0}.modal-enter .modal-container,.modal-leave-active .modal-container{-webkit-transform:scale(1.1);transform:scale(1.1)}.transparent-modal{background-color:#000c!important}.transparent-modal .modal-header h3{margin:0 0 2em 2em;padding:6px 6px 6px 12px;border-radius:3px;background-color:#0000004d;color:#ffffff80}.transparent-modal .modal-close{right:42px;top:30px;color:#ffffff80;background-image:image-url("w_close.svg")}.transparent-modal .modal-container{width:70%;position:relative;background-color:transparent!important;box-shadow:none}.transparent-modal .modal-container .modal-body{overflow:auto;margin-right:1em;max-height:80vh}.transparent-modal .modal-container .modal-body::-webkit-scrollbar{position:absolute;right:40px;-webkit-appearance:none}.transparent-modal .modal-container .modal-body::-webkit-scrollbar:vertical{width:6px}.transparent-modal .modal-container .modal-body::-webkit-scrollbar:horizontal{height:6px}.transparent-modal .modal-container .modal-body::-webkit-scrollbar-thumb{border-radius:8px;width:11px;height:5px;border:rgba(255,255,255,.5);background-color:#ffffff80}.transparent-modal .modal-container .modal-body::-webkit-scrollbar-track{background-color:#0000004d;border-radius:8px}.menu-list{display:flex;list-style:none;align-items:center;margin:0}.menu-list li:first-child{padding-left:0}.list-item[data-v-3f00bdeb]{justify-content:center;padding-left:1em;padding-right:1em;border-right:1px solid #e5e5e5}.grid[data-v-203acd5e]{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(--border-color);box-shadow:0 2px 2px #0003}.grid-icon{width:20px;height:12px;border:2px solid transparent;background-color:transparent;grid-gap:2px}.grid-icon>div{background-color:#fff}.header-bar[data-v-2f031624]{background-color:var(--bg-panel-color);padding:1em;box-shadow:#24252614 4px 4px 15px;border-radius:.9rem;display:flex;justify-content:space-between;align-items:center}.header-bar__buttons[data-v-2f031624]{display:flex;align-items:center}.depiction-box{display:flex;align-items:center;justify-content:center;border:1px solid black;height:300px;width:300px}.character-descriptor__cell{display:flex;align-items:flex-end}.character-states-grid{display:grid;grid-template-columns:repeat(3,minmax(33.33%,1fr));gap:1em}.descriptor-modal{width:1000px;max-height:90vh;overflow-y:scroll}.descriptor-modal__depiction{display:flex;justify-content:center}.tw-spinner[data-v-3541fc5b]{display:flex;margin:0 auto;height:auto;width:auto;align-items:center;justify-content:center}.fade-enter-active[data-v-3541fc5b],.fade-leave-active[data-v-3541fc5b]{transition:opacity .5s}.fade-enter[data-v-3541fc5b],.fade-leave-to[data-v-3541fc5b]{opacity:0}.tw-spinner-left[data-v-3541fc5b]{flex-direction:row}.tw-spinner-right[data-v-3541fc5b]{flex-direction:row-reverse}.tw-spinner-top[data-v-3541fc5b]{flex-direction:column}.tw-spinner-bottom[data-v-3541fc5b]{flex-direction:column-reverse}.box-spinner[data-v-3541fc5b]{display:flex;position:absolute;box-shadow:0 1px 1px #0003;background-image:none!important;background-color:#fff;align-items:center;z-index:9999;height:100%;opacity:.9}.tw-spinner[data-v-3541fc5b]{font-size:20px;overflow:hidden;width:100%;position:relative}.tw-spinner svg[data-v-3541fc5b]{display:block;position:relative;width:30px;height:30px;margin:0 auto}.tw-spinner #Tail[data-v-3541fc5b]{opacity:0;animation:tail-3541fc5b 2s ease infinite;fill:#41ba8d}.tw-spinner #LeftBottom[data-v-3541fc5b]{fill:#00845d;opacity:0;animation:spinner-3541fc5b 1s ease alternate infinite;animation-delay:0s}.tw-spinner #LeftMid[data-v-3541fc5b]{fill:#28221b;opacity:0;animation:spinner-3541fc5b 1s ease alternate infinite;animation-delay:.2s}.tw-spinner #LeftTop[data-v-3541fc5b]{fill:#342d25;opacity:0;animation:spinner-3541fc5b 1s ease alternate infinite;animation-delay:.4s}.tw-spinner #Head[data-v-3541fc5b]{fill:#342d25;opacity:0;animation:spinner-3541fc5b 1s ease alternate infinite;animation-delay:.6s}@keyframes spinner-3541fc5b{0%{opacity:0}30%{opacity:0}90%{opacity:1}to{opacity:1}}@keyframes tail-3541fc5b{0%{opacity:0}30%{opacity:1}50%{opacity:1}90%{opacity:0}to{opacity:0}}:root{--bg-color: #f7f8fc;--bg-panel-color: #FFFFFF;--primary-color: #5D9ECE;--border-color: #CCCCCC;--link-color: #5D9ECE;--btn-medium-size: 28px}.d-block{display:block}.d-flex{display:flex}.justify-between{justify-content:space-between}.align-center{align-items:center}.w-100{height:100%}.margin-medium-bottom{margin-bottom:1em}.margin-small-right{margin-right:.5em}.p-0{padding:0}.link{color:var(--link-color);cursor:pointer}.list-none{list-style:none}body{background-color:var(--bg-color)}.vue-interactive-keys{height:calc(100vh - 160px);max-height:calc(100vh - 160px);font-family:Arial,Helvetica,sans-serif;font-size:13px}.vue-interactive-keys .grid-panel{background-color:#fff;padding:1rem;overflow-y:scroll}.vue-interactive-keys .layout-mode-1 .panel-descriptors{grid-area:1/1/2/3}.vue-interactive-keys .layout-mode-1 .panel-remaining{grid-area:2/1/3/2}.vue-interactive-keys .layout-mode-1 .panel-eliminated{grid-area:2/2/3/3}.vue-interactive-keys .layout-mode-2 .panel-descriptors{grid-area:1/1/3/2}.vue-interactive-keys .layout-mode-2 .panel-remaining{grid-area:1/2/2/3}.vue-interactive-keys .layout-mode-2 .panel-eliminated{grid-area:2/2/3/3}.vue-interactive-keys input,.vue-interactive-keys select{padding:.5em 1em;border:1px solid;border-radius:2px;border-color:var(--border-color);background-color:#fff}
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@sfgrp/distinguish",
3
+ "private": false,
4
+ "version": "0.0.1",
5
+ "files": ["dist"],
6
+ "main": "./dist/interactive-key.umd.js",
7
+ "module": "./dist/interactive-key.es.js",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/interactive-key.es.js",
11
+ "require": "./dist/interactive-key.umd.js"
12
+ }
13
+ },
14
+ "homepage": "https://github.com/SpeciesFileGroup/distinguish",
15
+ "license": "NCSA",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/SpeciesFileGroup/distinguish.git"
19
+ },
20
+ "keywords": [
21
+ "species file group",
22
+ "interactive key",
23
+ "distinguish"
24
+ ],
25
+ "scripts": {
26
+ "dev": "vite",
27
+ "build": "vue-tsc --noEmit && vite build",
28
+ "preview": "vite preview",
29
+ "test": "vitest",
30
+ "coverage": "vitest run --coverage"
31
+ },
32
+ "dependencies": {
33
+ "axios": "^0.27.2",
34
+ "pinia": "^2.0.14",
35
+ "vue": "^3.2.37"
36
+ },
37
+ "devDependencies": {
38
+ "@pinia/testing": "^0.0.12",
39
+ "@testing-library/user-event": "^14.2.0",
40
+ "@testing-library/vue": "^6.6.0",
41
+ "@typescript-eslint/eslint-plugin": "^5.27.1",
42
+ "@typescript-eslint/parser": "^5.27.1",
43
+ "@vitejs/plugin-vue": "^2.3.3",
44
+ "@vue/eslint-config-typescript": "^10.0.0",
45
+ "c8": "^7.11.3",
46
+ "eslint": "^8.17.0",
47
+ "eslint-plugin-vue": "^9.1.0",
48
+ "jsdom": "^19.0.0",
49
+ "msw": "^0.42.1",
50
+ "sass": "^1.52.3",
51
+ "typescript": "^4.7.3",
52
+ "vite": "^2.9.10",
53
+ "vitest": "^0.14.1",
54
+ "vue-tsc": "^0.37.3"
55
+ }
56
+ }