@arbocollab/arbo-web-people 0.1.85-alpha.10 → 0.1.85-alpha.11
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/cjs/index.cjs.js +2 -2
- package/es/index.es.js +2 -2
- package/npmjs.npmrc +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/umd/index.umd.js +2 -2
package/umd/index.umd.js
CHANGED
|
@@ -26,7 +26,7 @@ Expected function or array of functions, received type ${typeof t}.`),Pa)}functi
|
|
|
26
26
|
* vue v3.5.18
|
|
27
27
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
28
28
|
* @license MIT
|
|
29
|
-
**/function Fge(){tge()}ge.env.NODE_ENV!=="production"&&Fge();var Vge=Object.defineProperty,Bge=(t,e,n)=>e in t?Vge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Yd=(t,e,n)=>(Bge(t,typeof e!="symbol"?e+"":e,n),n);const S2=(t,e)=>e.some(n=>t instanceof n);let sH,lH;function Uge(){return sH||(sH=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Wge(){return lH||(lH=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const A2=new WeakMap,k2=new WeakMap,qk=new WeakMap;function zge(t){const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("success",a),t.removeEventListener("error",o)},a=()=>{n(Sm(t.result)),i()},o=()=>{r(t.error),i()};t.addEventListener("success",a),t.addEventListener("error",o)});return qk.set(e,t),e}function jge(t){if(A2.has(t))return;const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("complete",a),t.removeEventListener("error",o),t.removeEventListener("abort",o)},a=()=>{n(),i()},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",a),t.addEventListener("error",o),t.addEventListener("abort",o)});A2.set(t,e)}let E2={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return A2.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Sm(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function uH(t){E2=t(E2)}function Hge(t){return Wge().includes(t)?function(...e){return t.apply(T2(this),e),Sm(this.request)}:function(...e){return Sm(t.apply(T2(this),e))}}function Yge(t){return typeof t=="function"?Hge(t):(t instanceof IDBTransaction&&jge(t),S2(t,Uge())?new Proxy(t,E2):t)}function Sm(t){if(t instanceof IDBRequest)return zge(t);if(k2.has(t))return k2.get(t);const e=Yge(t);return e!==t&&(k2.set(t,e),qk.set(e,t)),e}const T2=t=>qk.get(t);function qge(t,e,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const o=indexedDB.open(t,e),s=Sm(o);return r&&o.addEventListener("upgradeneeded",l=>{r(Sm(o.result),l.oldVersion,l.newVersion,Sm(o.transaction),l)}),n&&o.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),s.then(l=>{a&&l.addEventListener("close",()=>a()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),s}const Kge=["get","getKey","getAll","getAllKeys","count"],Gge=["put","add","delete","clear"],D2=new Map;function cH(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(D2.get(e))return D2.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,i=Gge.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||Kge.includes(n)))return;const a=async function(o,...s){const l=this.transaction(o,i?"readwrite":"readonly");let c=l.store;return r&&(c=c.index(s.shift())),(await Promise.all([c[n](...s),i&&l.done]))[0]};return D2.set(e,a),a}uH(t=>({...t,get:(e,n,r)=>cH(e,n)||t.get(e,n,r),has:(e,n)=>!!cH(e,n)||t.has(e,n)}));const Zge=["continue","continuePrimaryKey","advance"],dH={},O2=new WeakMap,fH=new WeakMap,Qge={get(t,e){if(!Zge.includes(e))return t[e];let n=dH[e];return n||(n=dH[e]=function(...r){O2.set(this,fH.get(this)[e](...r))}),n}};async function*Xge(...t){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...t)),!e)return;e=e;const n=new Proxy(e,Qge);for(fH.set(n,e),qk.set(n,T2(e));e;)yield n,e=await(O2.get(n)||e.continue()),O2.delete(n)}function hH(t,e){return e===Symbol.asyncIterator&&S2(t,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&S2(t,[IDBIndex,IDBObjectStore])}uH(t=>({...t,get(e,n,r){return hH(e,n)?Xge:t.get(e,n,r)},has(e,n){return hH(e,n)||t.has(e,n)}}));const Jge="0.0.372-alpha.16",eve={version:Jge},pH="mediaCachingDB",qd="mediaStore",Kk="__cache_flag__",tve=1,mH=!1,Gk=eve.version;let D0=null,Zk=!1,Qk=null,nve=class{constructor(){Yd(this,"logs",[]),Yd(this,"logTimeout",null),Yd(this,"LOG_DELAY",2e3),Yd(this,"MAX_LOGS",100)}addLog(e){const n={...e,timestamp:Date.now()};this.logs.push(n),this.logs.length>this.MAX_LOGS&&(this.logs=this.logs.slice(-this.MAX_LOGS)),this.scheduleLogging()}scheduleLogging(){this.logTimeout&&clearTimeout(this.logTimeout),this.logTimeout=setTimeout(()=>{this.printLogs()},this.LOG_DELAY)}printLogs(){}groupLogsByOperation(){const e={};return this.logs.forEach(n=>{e[n.operation]||(e[n.operation]=[]),e[n.operation].push(n)}),e}getOperationDisplay(e){switch(e){case"HIT":return"✅ HIT";case"MISS":return"⚠️ MISS";case"SAVE":return"💾 SAVE";case"ERROR":return"❌ ERROR";default:return e}}truncateUrl(e,n){return e.length<=n?e:e.substring(0,n-3)+"..."}printEnhancedSummary(){const e=this.logs.reduce((a,o)=>(a.total++,o.size&&(a.totalSize+=o.size),o.duration&&(a.totalDuration+=o.duration,a.minDuration=Math.min(a.minDuration,o.duration),a.maxDuration=Math.max(a.maxDuration,o.duration)),a[o.operation]=(a[o.operation]||0)+1,a),{total:0,totalSize:0,totalDuration:0,minDuration:Number.POSITIVE_INFINITY,maxDuration:0,HIT:0,MISS:0,SAVE:0,ERROR:0});if(e.total===0)return;const n=e.totalDuration/e.total,r=e.total>0?(e.HIT/e.total*100).toFixed(1):"0",i=[{metric:"Total Operations",value:e.total,percentage:"100%",performance:`${n.toFixed(1)}ms avg`},{metric:"Cache Hits",value:e.HIT,percentage:`${r}%`,performance:"✅ Optimal"},{metric:"Cache Misses",value:e.MISS,percentage:`${e.total?(e.MISS/e.total*100).toFixed(1):"0"}%`,performance:"⚠️ Network"},{metric:"New Saves",value:e.SAVE,percentage:`${e.total?(e.SAVE/e.total*100).toFixed(1):"0"}%`,performance:"💾 Storage"},{metric:"Errors",value:e.ERROR,percentage:`${e.total?(e.ERROR/e.total*100).toFixed(1):"0"}%`,performance:e.ERROR?"❌ Issues":"✅ Clean"},{metric:"Total Data Size",value:`${(e.totalSize/1024).toFixed(1)} KB`,percentage:"N/A",performance:"📦 Storage"},{metric:"Performance Range",value:`${isFinite(e.minDuration)?e.minDuration.toFixed(1):"0"}-${e.maxDuration.toFixed(1)}ms`,percentage:"N/A",performance:"⚡ Speed"}];console.table(i)}forceLog(){this.logTimeout&&(clearTimeout(this.logTimeout),this.logTimeout=null),this.printLogs()}clear(){this.logs=[],this.logTimeout&&(clearTimeout(this.logTimeout),this.logTimeout=null)}};const Yh=new nve;async function O0(){if(D0)return D0;try{return D0=await qge(pH,tve,{upgrade(t,e,n){mH&&console.warn(`Upgrading IndexedDB from version ${e} to ${n}`),t.objectStoreNames.contains(qd)||t.createObjectStore(qd)},blocked(){},blocking(){}}),D0}catch(t){throw t}}async function C2(){try{const t=await O0();if(!t)throw new Error("Failed to initialize database");await t.put(qd,Gk,Kk)}catch(t){throw t}}async function gH(){return Qk||(Zk?Promise.resolve():(Qk=rve(),Qk))}async function rve(){try{const t=await O0();if(!t)throw new Error("Failed to initialize database");const e=await t.get(qd,Kk);e===void 0?await C2():e!==Gk&&await C2(),Zk=!0}catch{try{await C2(),Zk=!0}catch(t){throw Zk=!1,Qk=null,t}}}async function vH(t){const e=performance.now();try{const n=await O0();if(!n)return Yh.addLog({url:t,operation:"ERROR",error:"Failed to initialize database",duration:performance.now()-e}),null;const r=await n.get(qd,t),i=performance.now()-e;return r?(Yh.addLog({url:t,operation:"HIT",size:typeof r=="string"?new Blob([r]).size:0,duration:i}),r):(Yh.addLog({url:t,operation:"MISS",duration:i}),null)}catch(n){const r=performance.now()-e;return n instanceof Error&&n.name==="VersionError"?(await ive(),Yh.addLog({url:t,operation:"ERROR",error:"VersionError - database reset",duration:r}),null):(Yh.addLog({url:t,operation:"ERROR",error:n instanceof Error?n.message:"Unknown error",duration:r}),null)}}async function Xk(t,e){const n=performance.now();try{const r=await O0();if(!r)throw Yh.addLog({url:t,operation:"ERROR",error:"Failed to initialize database",duration:performance.now()-n}),new Error("Failed to initialize database");const i=new Blob([e]).size;await r.put(qd,e,t),await r.get(qd,Kk)!==Gk&&await r.put(qd,Gk,Kk);const a=performance.now()-n;Yh.addLog({url:t,operation:"SAVE",size:i,duration:a})}catch(r){const i=performance.now()-n;throw Yh.addLog({url:t,operation:"ERROR",error:r instanceof Error?r.message:"Unknown error",duration:i}),r}}async function yH(t){try{const e=await O0();if(!e)throw new Error("Failed to initialize database");await e.delete(qd,t)}catch(e){throw e}}async function ive(){try{D0=null;const t=indexedDB.deleteDatabase(pH);await new Promise((e,n)=>{t.onsuccess=()=>e(),t.onerror=()=>n(t.error),t.onblocked=()=>{mH&&console.warn("Database deletion blocked - close other tabs using this database"),n(new Error("Database deletion blocked"))}})}catch(t){throw t}}let ave=class{constructor(){Yd(this,"batchQueue",[]),Yd(this,"batchTimeout",null),Yd(this,"BATCH_DELAY",50),Yd(this,"MAX_BATCH_SIZE",10),Yd(this,"MAX_BATCH_WAIT",100)}async addRequest(e){return new Promise((n,r)=>{const i={url:e,resolve:n,reject:r,timestamp:Date.now()};this.batchQueue.push(i),this.batchQueue.length>=this.MAX_BATCH_SIZE?this.processBatch():this.batchTimeout||(this.batchTimeout=setTimeout(()=>{this.processBatch()},this.BATCH_DELAY))})}async processBatch(){if(this.batchTimeout&&(clearTimeout(this.batchTimeout),this.batchTimeout=null),this.batchQueue.length===0)return;const e=this.batchQueue.splice(0,this.MAX_BATCH_SIZE),n=e.map(i=>i.url),r=[...new Set(n)];try{const i=await this.fetchBatch(r);e.forEach(a=>{const o=i.get(a.url);o!==void 0?a.resolve(o):a.reject(new Error("Request not found in batch results"))})}catch(i){e.forEach(a=>{a.reject(i)})}}async fetchBatch(e){const n=new Map,r=e.map(async s=>{try{const l=await vH(s);return{url:s,result:l}}catch(l){return{url:s,result:null,error:l}}}),i=await Promise.all(r),a=new Set;i.forEach(({url:s,result:l})=>{l&&(n.set(s,l),a.add(s))});const o=e.filter(s=>!a.has(s));if(o.length>0){const s=o.map(async l=>{try{const c=await this.fetchSingleResource(l);return{url:l,result:c}}catch{return{url:l,result:null}}});(await Promise.all(s)).forEach(({url:l,result:c})=>{n.set(l,c)})}return n}async fetchSingleResource(e){try{const n=await fetch(e);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const r=n.headers.get("Content-Type");if(!r)throw new Error("No content type received");if(r.includes("image/svg+xml")){const i=await n.text();return await Xk(e,i),i}if(r.includes("image/")){const i=await n.blob();if(!i||i.size===0)throw new Error("Invalid or empty blob received from server");const a=await this.blobToBase64(i);return await Xk(e,a),a}throw new Error(`Unsupported content type: ${r}`)}catch{return null}}blobToBase64(e){return new Promise((n,r)=>{const i=new FileReader;i.onload=()=>n(i.result),i.onerror=r,i.readAsDataURL(e)})}forceProcess(){this.batchTimeout&&(clearTimeout(this.batchTimeout),this.batchTimeout=null),this.processBatch()}getStatus(){return{queueLength:this.batchQueue.length,hasTimeout:!!this.batchTimeout}}clear(){this.batchTimeout&&(clearTimeout(this.batchTimeout),this.batchTimeout=null),this.batchQueue.forEach(e=>{e.reject(new Error("Batch cleared"))}),this.batchQueue=[]}};const ove=new ave;async function sve(t){return ove.addRequest(t)}const Ht=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},Jk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABLAAAAKjCAYAAAANs/bAAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAACdLSURBVHgB7d0LaxzJ2bDh+jLByxgZGRktEhYeCBgE+d/5R4FAYIPDGhsbGQubmDUR30uN07uSrcMcuqufqrouGLQJe7DlHvXTN1U1/+9vf/vb/08AAAAAENSfEgAAAAAEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAEJqABQAAAEBoAhYAAAAAoQlYAAAAAIQmYAEAAAAQmoAFAAAAQGgCFgAAAAChCVgAAAAAhCZgAQAAABCagAUAAABAaAIWAAAAAKEJWAAAAACEJmABAAAAENqfE0Ahjx49SsvlMi0Wi/Vf//TTT7//df46/D23ubq6+uH19evX9N///jd9+fJl/b+Hrw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PEKAABgHiIWtRKwKEq8AgAAmJeIRY0ELIoRrwAAAGIQsaiNgEUR4hUAAEAsIhY1EbCYnHgFAAAQk4hFLQQsJiVeAQAAxCZiUQMBi8mIVwAAAHUQsYhOwGIS4hUAAEBdcsTKz3GLxSJBNAIWoxOvAAAA6nRwcCBiEZKAxajEKwAAgLotl0sRi3AELEYjXgEAALRBxCIaAYtRiFcAAABtEbGIRMBib+IVAABAm0QsohCw2It4BQAA0DYRiwgELHYmXgEAAPRBxGJuAhY7Ea8AAAD6ImIxJwGLrYlXAAAAfRKxmIuAxVbEKwAAgL6JWMxBwGJj4hUAAACZiEVpAhYbEa8AAAC4Lkes8/Nzz4kUIWDxIPEKAACA23hepBQBi3v5YQQAAMB9PDdSgoDFnfwQAgAAYBOeH5magMWt/PABAABgG54jmZKAxQ/80AEAAGAXnieZioDFDX7YAAAAsA/PlUxBwOJ3fsgAAAAwBs+XjE3AYs0PFwAAAMbkOZMxCVj4oQIAAMAkPG8yFgGrc36YAAAAMCXPnYxBwOqYHyIAAACU4PmTff0fcAVXtCn46yAAAAAASUVORK5CYII=",lve=[],uve=["UploadInProgress"],cve=["innerHTML"],dve=["src","alt"],hr=Ht(Qe({__name:"SvgRender",props:{name:{default:""},url:{default:""},alt:{default:"image"},classIcon:{default:"arbo-icon-state"},type:{default:"icon"},isSquareSize:{type:Boolean,default:!1},imageDefault:{default:Jk},iconStyle:{default:""}},emits:["error","load"],setup(t,{emit:e}){const n=t,r=jt({imageSrc:null,retried:!1,svgContent:null,isLoading:!1,error:null}),i=e,a=re(null),o=Eu("ASSET_URL","https://arbodev.s3.ap-south-1.amazonaws.com"),s=C=>{var F;return C&&((F=C.split(".").pop())==null?void 0:F.toLowerCase())||""},l=()=>Math.random().toString(36).slice(2,11),c=C=>new Promise((F,W)=>{if(C.type==="image/gif"){const j=new FileReader;j.onload=()=>F(j.result),j.onerror=W,j.readAsDataURL(C);return}const H=new Image;H.onload=()=>{try{const j=document.createElement("canvas"),N=j.getContext("2d");if(!N){W(new Error("Could not get canvas context"));return}j.width=H.naturalWidth||H.width,j.height=H.naturalHeight||H.height,N.drawImage(H,0,0);const U=j.toDataURL("image/png",.9);URL.revokeObjectURL(H.src),F(U)}catch(j){URL.revokeObjectURL(H.src),W(j)}},H.onerror=()=>{URL.revokeObjectURL(H.src),W(new Error("Failed to load image from blob"))},H.src=URL.createObjectURL(C)}),f=re(null),h=C=>{if(!C.startsWith("data:image/"))return!1;const F=C.split(",")[1];if(!F||F.length===0)return!1;try{const W=F.substring(0,Math.min(100,F.length));return atob(W),!0}catch(W){return console.warn("Invalid base64 data detected:",W),!1}},p=Z(()=>r.imageSrc||""),g=Z(()=>r.svgContent),y=Z(()=>!!(n.name&&n.type!=="visual")),v=Z(()=>{let C=n.classIcon;return y.value&&(C+=" arbo__internal-icon"),C}),b=Z(()=>{if(n.name&&n.type!=="visual")return!0;const C=s((n==null?void 0:n.url)||"");return(C==null?void 0:C.toLowerCase())==="svg"}),w=C=>{if(!C)return null;try{const F=new DOMParser().parseFromString(C,"image/svg+xml"),W=F.documentElement,H=`-${l()}`,j=F.querySelector("linearGradient");if(j){const le=j.getAttribute("id");if(le){const _e=le+H;j.setAttribute("id",_e);const be=F.querySelector("rect");be&&be.getAttribute("fill")===`url(#${le})`&&be.setAttribute("fill",`url(#${_e})`)}}const N=W.getAttribute("style")||"",U=n.iconStyle||"",ee=`${N}; ${U}`.trim();return ee&&W.setAttribute("style",ee),W.setAttribute("class",v.value),new XMLSerializer().serializeToString(F)}catch(F){return console.error("Error formatting SVG:",F),r.error="Failed to format SVG",C}};async function S(C){if(!C)return null;const F=await vH(C);if(F)if(F.startsWith("data:image/")&&!h(F)){console.warn("Cached base64 is corrupted, removing from cache and refetching:",C);try{await yH(C),console.warn("Successfully removed corrupted cache entry")}catch(W){console.warn("Failed to remove corrupted cache entry:",W)}}else return F;try{r.isLoading=!0;const W=await fetch(C);if(!W.ok)throw new Error(`HTTP error! status: ${W.status}`);const H=W.headers.get("Content-Type");if(H!=null&&H.includes("image/svg+xml")||H!=null&&H.includes("text/xml")){const j=await W.text();if(j.trim())return await Xk(C,j),j;throw new Error("Empty SVG content received")}else if(H&&(H.includes("image/jpeg")||H.includes("image/jpg")||H.includes("image/png")||H.includes("image/gif")||H.includes("image/webp"))){const j=await W.blob();if(j&&j.size>0){const N=await c(j);return await Xk(C,N),N}else throw new Error("Invalid or empty blob received from server")}else throw new Error(`Unsupported content type: ${H}`)}catch(W){return console.error(`Failed to fetch media: ${C}`,W),r.error=`Failed to fetch media: ${W}`,null}finally{r.isLoading=!1}}const T=()=>{if(!n.name||n.type==="visual")return"";let C=`${o}/icon/tess`,F="TESSRAPP_Icon_";switch(n.type){case"rating":{C=`${o}/icon/tess/rating`;break}case"country":{C=n.isSquareSize?`${o}/icon/flags/1x1`:`${o}/icon/flags/4x3`,F="";break}default:{C=`${o}/icon/tess`;break}}return`${C}/${F}${n.name}.svg`},_=async()=>{switch(r.isLoading=!0,r.svgContent=null,r.imageSrc=null,r.error=null,f.value=null,!0){case(n.name&&n.type!=="visual"):await E();break;case(n.url&&n.type!=="visual"):await D();break;case!!(n.type==="visual"&&n.name):await O();break;default:await V();break}setTimeout(()=>{r.isLoading=!1},300)},E=async()=>{try{const C=T(),F=await S(C);if(typeof F=="string")F.startsWith("data:image/")?(r.imageSrc=F,r.svgContent=null,f.value=C):r.svgContent=F;else throw new Error("Failed to load internal icon")}catch(C){console.error("Error loading internal icon:",C),r.error=`Failed to load icon: ${C}`,await V()}},D=async()=>{try{const C=await S(n.url);if(typeof C=="string")C.startsWith("data:image/")?(r.imageSrc=C,r.svgContent=null,f.value=n.url):r.svgContent=C;else throw new Error("Failed to load external media")}catch(C){console.error("Error loading external media:",C),r.error=`Failed to load external media: ${C}`,await V()}},O=async()=>{try{const C=`${o}/icon/visual`,F="TESSRAPP_Visual_",W=lve.includes(n.name)?"svg":uve.includes(n.name)?"gif":"png",H=`${C}/${F}${n.name}.${W}`,j=await S(H);if(typeof j=="string")j.startsWith("data:image/")?(r.imageSrc=j,r.svgContent=null,f.value=H):r.svgContent=j;else throw new Error("Failed to load visual asset")}catch(C){console.error("Error loading visual asset:",C),r.error=`Failed to load visual asset: ${C}`,await V()}},V=async()=>{try{const C=typeof n.imageDefault=="string"?n.imageDefault:Jk,F=await S(C);typeof F=="string"?F.startsWith("data:image/")?(r.imageSrc=F,r.svgContent=null,f.value=C):r.svgContent=F:r.imageSrc=C}catch(C){console.error("Error loading default image:",C),r.imageSrc=typeof n.imageDefault=="string"?n.imageDefault:Jk}},P=async()=>{var C;if(i("error",r.error||"Image failed to load"),!r.retried){try{if((C=r.imageSrc)!=null&&C.startsWith("data:image/")&&f.value){console.warn("Base64 image failed to load, removing potentially corrupted cache entry");try{await yH(f.value)}catch(F){console.warn("Failed to remove corrupted cache entry:",F)}}}catch(F){console.error("Error during image error recovery:",F);const W=typeof n.imageDefault=="string"?n.imageDefault:Jk;await V(),r.imageSrc=W,f.value=null}r.retried=!0}},M=()=>{i("load")};return Ge(()=>[n.name,n.url,n.type],async()=>{r.retried=!1,r.error=null,await _()}),Os(async()=>{r.retried=!1,r.error=null,await _()}),Wt(async()=>{await gH()}),(C,F)=>b.value&&g.value?(R(),Y("div",{key:0,class:"svg-render",innerHTML:w(g.value)},null,8,cve)):p.value?(R(),Y("img",{key:1,ref_key:"imgInstance",ref:a,src:p.value,alt:n.alt,class:Fe(n.classIcon),onError:P,onLoad:M},null,42,dve)):pe("",!0)}}),[["__scopeId","data-v-58ceffbd"]]),Yn=Qe({__name:"Icon.ce",props:{name:{type:String,required:!0},type:{type:String,default:"icon"},isSquareSize:{type:Boolean,default:!1}},setup(t){const e=t;return(n,r)=>(R(),Re(hr,Ft(e,{"class-icon":`arbo--icon ${e.type}`}),null,16,["class-icon"]))}});var Is="top",$l="bottom",Pl="right",Ms="left",I2="auto",C0=[Is,$l,Pl,Ms],ky="start",I0="end",fve="clippingParents",bH="viewport",M0="popper",hve="reference",_H=C0.reduce(function(t,e){return t.concat([e+"-"+ky,e+"-"+I0])},[]),wH=[].concat(C0,[I2]).reduce(function(t,e){return t.concat([e,e+"-"+ky,e+"-"+I0])},[]),pve="beforeRead",mve="read",gve="afterRead",vve="beforeMain",yve="main",bve="afterMain",_ve="beforeWrite",wve="write",xve="afterWrite",Sve=[pve,mve,gve,vve,yve,bve,_ve,wve,xve];function Hc(t){return t?(t.nodeName||"").toLowerCase():null}function nl(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Am(t){var e=nl(t).Element;return t instanceof e||t instanceof Element}function Ll(t){var e=nl(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function M2(t){if(typeof ShadowRoot>"u")return!1;var e=nl(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Ave(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},a=e.elements[n];!Ll(a)||!Hc(a)||(Object.assign(a.style,r),Object.keys(i).forEach(function(o){var s=i[o];s===!1?a.removeAttribute(o):a.setAttribute(o,s===!0?"":s)}))})}function kve(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],a=e.attributes[r]||{},o=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),s=o.reduce(function(l,c){return l[c]="",l},{});!Ll(i)||!Hc(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(l){i.removeAttribute(l)}))})}}const xH={name:"applyStyles",enabled:!0,phase:"write",fn:Ave,effect:kve,requires:["computeStyles"]};function Yc(t){return t.split("-")[0]}var km=Math.max,eE=Math.min,Ey=Math.round;function R2(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function SH(){return!/^((?!chrome|android).)*safari/i.test(R2())}function Ty(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),i=1,a=1;e&&Ll(t)&&(i=t.offsetWidth>0&&Ey(r.width)/t.offsetWidth||1,a=t.offsetHeight>0&&Ey(r.height)/t.offsetHeight||1);var o=Am(t)?nl(t):window,s=o.visualViewport,l=!SH()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,f=(r.top+(l&&s?s.offsetTop:0))/a,h=r.width/i,p=r.height/a;return{width:h,height:p,top:f,right:c+h,bottom:f+p,left:c,x:c,y:f}}function $2(t){var e=Ty(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function AH(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&M2(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Kd(t){return nl(t).getComputedStyle(t)}function Eve(t){return["table","td","th"].indexOf(Hc(t))>=0}function qh(t){return((Am(t)?t.ownerDocument:t.document)||window.document).documentElement}function tE(t){return Hc(t)==="html"?t:t.assignedSlot||t.parentNode||(M2(t)?t.host:null)||qh(t)}function kH(t){return!Ll(t)||Kd(t).position==="fixed"?null:t.offsetParent}function Tve(t){var e=/firefox/i.test(R2()),n=/Trident/i.test(R2());if(n&&Ll(t)){var r=Kd(t);if(r.position==="fixed")return null}var i=tE(t);for(M2(i)&&(i=i.host);Ll(i)&&["html","body"].indexOf(Hc(i))<0;){var a=Kd(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||e&&a.willChange==="filter"||e&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function R0(t){for(var e=nl(t),n=kH(t);n&&Eve(n)&&Kd(n).position==="static";)n=kH(n);return n&&(Hc(n)==="html"||Hc(n)==="body"&&Kd(n).position==="static")?e:n||Tve(t)||e}function P2(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function $0(t,e,n){return km(t,eE(e,n))}function Dve(t,e,n){var r=$0(t,e,n);return r>n?n:r}function EH(){return{top:0,right:0,bottom:0,left:0}}function TH(t){return Object.assign({},EH(),t)}function DH(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var Ove=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,TH(typeof t!="number"?t:DH(t,C0))};function Cve(t){var e,n=t.state,r=t.name,i=t.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=Yc(n.placement),l=P2(s),c=[Ms,Pl].indexOf(s)>=0,f=c?"height":"width";if(!(!a||!o)){var h=Ove(i.padding,n),p=$2(a),g=l==="y"?Is:Ms,y=l==="y"?$l:Pl,v=n.rects.reference[f]+n.rects.reference[l]-o[l]-n.rects.popper[f],b=o[l]-n.rects.reference[l],w=R0(a),S=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,T=v/2-b/2,_=h[g],E=S-p[f]-h[y],D=S/2-p[f]/2+T,O=$0(_,D,E),V=l;n.modifiersData[r]=(e={},e[V]=O,e.centerOffset=O-D,e)}}function Ive(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||AH(e.elements.popper,i)&&(e.elements.arrow=i))}const Mve={name:"arrow",enabled:!0,phase:"main",fn:Cve,effect:Ive,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Dy(t){return t.split("-")[1]}var Rve={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $ve(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:Ey(n*i)/i||0,y:Ey(r*i)/i||0}}function OH(t){var e,n=t.popper,r=t.popperRect,i=t.placement,a=t.variation,o=t.offsets,s=t.position,l=t.gpuAcceleration,c=t.adaptive,f=t.roundOffsets,h=t.isFixed,p=o.x,g=p===void 0?0:p,y=o.y,v=y===void 0?0:y,b=typeof f=="function"?f({x:g,y:v}):{x:g,y:v};g=b.x,v=b.y;var w=o.hasOwnProperty("x"),S=o.hasOwnProperty("y"),T=Ms,_=Is,E=window;if(c){var D=R0(n),O="clientHeight",V="clientWidth";if(D===nl(n)&&(D=qh(n),Kd(D).position!=="static"&&s==="absolute"&&(O="scrollHeight",V="scrollWidth")),D=D,i===Is||(i===Ms||i===Pl)&&a===I0){_=$l;var P=h&&D===E&&E.visualViewport?E.visualViewport.height:D[O];v-=P-r.height,v*=l?1:-1}if(i===Ms||(i===Is||i===$l)&&a===I0){T=Pl;var M=h&&D===E&&E.visualViewport?E.visualViewport.width:D[V];g-=M-r.width,g*=l?1:-1}}var C=Object.assign({position:s},c&&Rve),F=f===!0?$ve({x:g,y:v},nl(n)):{x:g,y:v};if(g=F.x,v=F.y,l){var W;return Object.assign({},C,(W={},W[_]=S?"0":"",W[T]=w?"0":"",W.transform=(E.devicePixelRatio||1)<=1?"translate("+g+"px, "+v+"px)":"translate3d("+g+"px, "+v+"px, 0)",W))}return Object.assign({},C,(e={},e[_]=S?v+"px":"",e[T]=w?g+"px":"",e.transform="",e))}function Pve(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,o=a===void 0?!0:a,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:Yc(e.placement),variation:Dy(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,OH(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,OH(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Lve={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Pve,data:{}};var nE={passive:!0};function Nve(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,a=i===void 0?!0:i,o=r.resize,s=o===void 0?!0:o,l=nl(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return a&&c.forEach(function(f){f.addEventListener("scroll",n.update,nE)}),s&&l.addEventListener("resize",n.update,nE),function(){a&&c.forEach(function(f){f.removeEventListener("scroll",n.update,nE)}),s&&l.removeEventListener("resize",n.update,nE)}}const Fve={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Nve,data:{}};var Vve={left:"right",right:"left",bottom:"top",top:"bottom"};function rE(t){return t.replace(/left|right|bottom|top/g,function(e){return Vve[e]})}var Bve={start:"end",end:"start"};function CH(t){return t.replace(/start|end/g,function(e){return Bve[e]})}function L2(t){var e=nl(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function N2(t){return Ty(qh(t)).left+L2(t).scrollLeft}function Uve(t,e){var n=nl(t),r=qh(t),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;var c=SH();(c||!c&&e==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s+N2(t),y:l}}function Wve(t){var e,n=qh(t),r=L2(t),i=(e=t.ownerDocument)==null?void 0:e.body,a=km(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=km(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+N2(t),l=-r.scrollTop;return Kd(i||n).direction==="rtl"&&(s+=km(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:l}}function F2(t){var e=Kd(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function IH(t){return["html","body","#document"].indexOf(Hc(t))>=0?t.ownerDocument.body:Ll(t)&&F2(t)?t:IH(tE(t))}function P0(t,e){var n;e===void 0&&(e=[]);var r=IH(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),a=nl(r),o=i?[a].concat(a.visualViewport||[],F2(r)?r:[]):r,s=e.concat(o);return i?s:s.concat(P0(tE(o)))}function V2(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function zve(t,e){var n=Ty(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function MH(t,e,n){return e===bH?V2(Uve(t,n)):Am(e)?zve(e,n):V2(Wve(qh(t)))}function jve(t){var e=P0(tE(t)),n=["absolute","fixed"].indexOf(Kd(t).position)>=0,r=n&&Ll(t)?R0(t):t;return Am(r)?e.filter(function(i){return Am(i)&&AH(i,r)&&Hc(i)!=="body"}):[]}function Hve(t,e,n,r){var i=e==="clippingParents"?jve(t):[].concat(e),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(l,c){var f=MH(t,c,r);return l.top=km(f.top,l.top),l.right=eE(f.right,l.right),l.bottom=eE(f.bottom,l.bottom),l.left=km(f.left,l.left),l},MH(t,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function RH(t){var e=t.reference,n=t.element,r=t.placement,i=r?Yc(r):null,a=r?Dy(r):null,o=e.x+e.width/2-n.width/2,s=e.y+e.height/2-n.height/2,l;switch(i){case Is:l={x:o,y:e.y-n.height};break;case $l:l={x:o,y:e.y+e.height};break;case Pl:l={x:e.x+e.width,y:s};break;case Ms:l={x:e.x-n.width,y:s};break;default:l={x:e.x,y:e.y}}var c=i?P2(i):null;if(c!=null){var f=c==="y"?"height":"width";switch(a){case ky:l[c]=l[c]-(e[f]/2-n[f]/2);break;case I0:l[c]=l[c]+(e[f]/2-n[f]/2);break}}return l}function L0(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,a=n.strategy,o=a===void 0?t.strategy:a,s=n.boundary,l=s===void 0?fve:s,c=n.rootBoundary,f=c===void 0?bH:c,h=n.elementContext,p=h===void 0?M0:h,g=n.altBoundary,y=g===void 0?!1:g,v=n.padding,b=v===void 0?0:v,w=TH(typeof b!="number"?b:DH(b,C0)),S=p===M0?hve:M0,T=t.rects.popper,_=t.elements[y?S:p],E=Hve(Am(_)?_:_.contextElement||qh(t.elements.popper),l,f,o),D=Ty(t.elements.reference),O=RH({reference:D,element:T,placement:i}),V=V2(Object.assign({},T,O)),P=p===M0?V:D,M={top:E.top-P.top+w.top,bottom:P.bottom-E.bottom+w.bottom,left:E.left-P.left+w.left,right:P.right-E.right+w.right},C=t.modifiersData.offset;if(p===M0&&C){var F=C[i];Object.keys(M).forEach(function(W){var H=[Pl,$l].indexOf(W)>=0?1:-1,j=[Is,$l].indexOf(W)>=0?"y":"x";M[W]+=F[j]*H})}return M}function Yve(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?wH:l,f=Dy(r),h=f?s?_H:_H.filter(function(y){return Dy(y)===f}):C0,p=h.filter(function(y){return c.indexOf(y)>=0});p.length===0&&(p=h);var g=p.reduce(function(y,v){return y[v]=L0(t,{placement:v,boundary:i,rootBoundary:a,padding:o})[Yc(v)],y},{});return Object.keys(g).sort(function(y,v){return g[y]-g[v]})}function qve(t){if(Yc(t)===I2)return[];var e=rE(t);return[CH(t),e,CH(e)]}function Kve(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!0:o,l=n.fallbackPlacements,c=n.padding,f=n.boundary,h=n.rootBoundary,p=n.altBoundary,g=n.flipVariations,y=g===void 0?!0:g,v=n.allowedAutoPlacements,b=e.options.placement,w=Yc(b),S=w===b,T=l||(S||!y?[rE(b)]:qve(b)),_=[b].concat(T).reduce(function(me,Ee){return me.concat(Yc(Ee)===I2?Yve(e,{placement:Ee,boundary:f,rootBoundary:h,padding:c,flipVariations:y,allowedAutoPlacements:v}):Ee)},[]),E=e.rects.reference,D=e.rects.popper,O=new Map,V=!0,P=_[0],M=0;M<_.length;M++){var C=_[M],F=Yc(C),W=Dy(C)===ky,H=[Is,$l].indexOf(F)>=0,j=H?"width":"height",N=L0(e,{placement:C,boundary:f,rootBoundary:h,altBoundary:p,padding:c}),U=H?W?Pl:Ms:W?$l:Is;E[j]>D[j]&&(U=rE(U));var ee=rE(U),le=[];if(a&&le.push(N[F]<=0),s&&le.push(N[U]<=0,N[ee]<=0),le.every(function(me){return me})){P=C,V=!1;break}O.set(C,le)}if(V)for(var _e=y?3:1,be=function(me){var Ee=_.find(function(Ce){var de=O.get(Ce);if(de)return de.slice(0,me).every(function(G){return G})});if(Ee)return P=Ee,"break"},Te=_e;Te>0;Te--){var J=be(Te);if(J==="break")break}e.placement!==P&&(e.modifiersData[r]._skip=!0,e.placement=P,e.reset=!0)}}const Gve={name:"flip",enabled:!0,phase:"main",fn:Kve,requiresIfExists:["offset"],data:{_skip:!1}};function $H(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function PH(t){return[Is,Pl,$l,Ms].some(function(e){return t[e]>=0})}function Zve(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,a=e.modifiersData.preventOverflow,o=L0(e,{elementContext:"reference"}),s=L0(e,{altBoundary:!0}),l=$H(o,r),c=$H(s,i,a),f=PH(l),h=PH(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const Qve={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Zve};function Xve(t,e,n){var r=Yc(t),i=[Ms,Is].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[Ms,Pl].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function Jve(t){var e=t.state,n=t.options,r=t.name,i=n.offset,a=i===void 0?[0,0]:i,o=wH.reduce(function(f,h){return f[h]=Xve(h,e.rects,a),f},{}),s=o[e.placement],l=s.x,c=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=o}const eye={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Jve};function tye(t){var e=t.state,n=t.name;e.modifiersData[n]=RH({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const nye={name:"popperOffsets",enabled:!0,phase:"read",fn:tye,data:{}};function rye(t){return t==="x"?"y":"x"}function iye(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!1:o,l=n.boundary,c=n.rootBoundary,f=n.altBoundary,h=n.padding,p=n.tether,g=p===void 0?!0:p,y=n.tetherOffset,v=y===void 0?0:y,b=L0(e,{boundary:l,rootBoundary:c,padding:h,altBoundary:f}),w=Yc(e.placement),S=Dy(e.placement),T=!S,_=P2(w),E=rye(_),D=e.modifiersData.popperOffsets,O=e.rects.reference,V=e.rects.popper,P=typeof v=="function"?v(Object.assign({},e.rects,{placement:e.placement})):v,M=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),C=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,F={x:0,y:0};if(D){if(a){var W,H=_==="y"?Is:Ms,j=_==="y"?$l:Pl,N=_==="y"?"height":"width",U=D[_],ee=U+b[H],le=U-b[j],_e=g?-V[N]/2:0,be=S===ky?O[N]:V[N],Te=S===ky?-V[N]:-O[N],J=e.elements.arrow,me=g&&J?$2(J):{width:0,height:0},Ee=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:EH(),Ce=Ee[H],de=Ee[j],G=$0(0,O[N],me[N]),ve=T?O[N]/2-_e-G-Ce-M.mainAxis:be-G-Ce-M.mainAxis,Ue=T?-O[N]/2+_e+G+de+M.mainAxis:Te+G+de+M.mainAxis,ce=e.elements.arrow&&R0(e.elements.arrow),Ye=ce?_==="y"?ce.clientTop||0:ce.clientLeft||0:0,te=(W=C==null?void 0:C[_])!=null?W:0,ae=U+ve-te-Ye,ne=U+Ue-te,Ne=$0(g?eE(ee,ae):ee,U,g?km(le,ne):le);D[_]=Ne,F[_]=Ne-U}if(s){var Me,Ve=_==="x"?Is:Ms,at=_==="x"?$l:Pl,Ie=D[E],Ze=E==="y"?"height":"width",tt=Ie+b[Ve],Oe=Ie-b[at],Be=[Is,Ms].indexOf(w)!==-1,gt=(Me=C==null?void 0:C[E])!=null?Me:0,Bt=Be?tt:Ie-O[Ze]-V[Ze]-gt+M.altAxis,qt=Be?Ie+O[Ze]+V[Ze]-gt-M.altAxis:Oe,yt=g&&Be?Dve(Bt,Ie,qt):$0(g?Bt:tt,Ie,g?qt:Oe);D[E]=yt,F[E]=yt-Ie}e.modifiersData[r]=F}}const aye={name:"preventOverflow",enabled:!0,phase:"main",fn:iye,requiresIfExists:["offset"]};function oye(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function sye(t){return t===nl(t)||!Ll(t)?L2(t):oye(t)}function lye(t){var e=t.getBoundingClientRect(),n=Ey(e.width)/t.offsetWidth||1,r=Ey(e.height)/t.offsetHeight||1;return n!==1||r!==1}function uye(t,e,n){n===void 0&&(n=!1);var r=Ll(e),i=Ll(e)&&lye(e),a=qh(e),o=Ty(t,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Hc(e)!=="body"||F2(a))&&(s=sye(e)),Ll(e)?(l=Ty(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):a&&(l.x=N2(a))),{x:o.left+s.scrollLeft-l.x,y:o.top+s.scrollTop-l.y,width:o.width,height:o.height}}function cye(t){var e=new Map,n=new Set,r=[];t.forEach(function(a){e.set(a.name,a)});function i(a){n.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!n.has(s)){var l=e.get(s);l&&i(l)}}),r.push(a)}return t.forEach(function(a){n.has(a.name)||i(a)}),r}function dye(t){var e=cye(t);return Sve.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function fye(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function hye(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var LH={placement:"bottom",modifiers:[],strategy:"absolute"};function NH(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function pye(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,i=e.defaultOptions,a=i===void 0?LH:i;return function(o,s,l){l===void 0&&(l=a);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},LH,a),modifiersData:{},elements:{reference:o,popper:s},attributes:{},styles:{}},f=[],h=!1,p={state:c,setOptions:function(v){var b=typeof v=="function"?v(c.options):v;y(),c.options=Object.assign({},a,c.options,b),c.scrollParents={reference:Am(o)?P0(o):o.contextElement?P0(o.contextElement):[],popper:P0(s)};var w=dye(hye([].concat(r,c.options.modifiers)));return c.orderedModifiers=w.filter(function(S){return S.enabled}),g(),p.update()},forceUpdate:function(){if(!h){var v=c.elements,b=v.reference,w=v.popper;if(NH(b,w)){c.rects={reference:uye(b,R0(w),c.options.strategy==="fixed"),popper:$2(w)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(V){return c.modifiersData[V.name]=Object.assign({},V.data)});for(var S=0;S<c.orderedModifiers.length;S++){if(c.reset===!0){c.reset=!1,S=-1;continue}var T=c.orderedModifiers[S],_=T.fn,E=T.options,D=E===void 0?{}:E,O=T.name;typeof _=="function"&&(c=_({state:c,options:D,name:O,instance:p})||c)}}}},update:fye(function(){return new Promise(function(v){p.forceUpdate(),v(c)})}),destroy:function(){y(),h=!0}};if(!NH(o,s))return p;p.setOptions(l).then(function(v){!h&&l.onFirstUpdate&&l.onFirstUpdate(v)});function g(){c.orderedModifiers.forEach(function(v){var b=v.name,w=v.options,S=w===void 0?{}:w,T=v.effect;if(typeof T=="function"){var _=T({state:c,name:b,instance:p,options:S}),E=function(){};f.push(_||E)}})}function y(){f.forEach(function(v){return v()}),f=[]}return p}}var mye=[Fve,nye,Lve,xH,eye,Gve,aye,Mve,Qve],gye=pye({defaultModifiers:mye}),vye="tippy-box",FH="tippy-content",yye="tippy-backdrop",VH="tippy-arrow",BH="tippy-svg-arrow",Em={passive:!0,capture:!0},UH=function(){return document.body};function bye(t,e){return{}.hasOwnProperty.call(t,e)}function B2(t,e,n){if(Array.isArray(t)){var r=t[e];return r??(Array.isArray(n)?n[e]:n)}return t}function U2(t,e){var n={}.toString.call(t);return n.indexOf("[object")===0&&n.indexOf(e+"]")>-1}function WH(t,e){return typeof t=="function"?t.apply(void 0,e):t}function zH(t,e){if(e===0)return t;var n;return function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)}}function _ye(t,e){var n=Object.assign({},t);return e.forEach(function(r){delete n[r]}),n}function wye(t){return t.split(/\s+/).filter(Boolean)}function Oy(t){return[].concat(t)}function jH(t,e){t.indexOf(e)===-1&&t.push(e)}function xye(t){return t.filter(function(e,n){return t.indexOf(e)===n})}function Sye(t){return t.split("-")[0]}function iE(t){return[].slice.call(t)}function HH(t){return Object.keys(t).reduce(function(e,n){return t[n]!==void 0&&(e[n]=t[n]),e},{})}function N0(){return document.createElement("div")}function F0(t){return["Element","Fragment"].some(function(e){return U2(t,e)})}function Aye(t){return U2(t,"NodeList")}function kye(t){return U2(t,"MouseEvent")}function Eye(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function Tye(t){return F0(t)?[t]:Aye(t)?iE(t):Array.isArray(t)?t:iE(document.querySelectorAll(t))}function W2(t,e){t.forEach(function(n){n&&(n.style.transitionDuration=e+"ms")})}function YH(t,e){t.forEach(function(n){n&&n.setAttribute("data-state",e)})}function Dye(t){var e,n=Oy(t),r=n[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function Oye(t,e){var n=e.clientX,r=e.clientY;return t.every(function(i){var a=i.popperRect,o=i.popperState,s=i.props,l=s.interactiveBorder,c=Sye(o.placement),f=o.modifiersData.offset;if(!f)return!0;var h=c==="bottom"?f.top.y:0,p=c==="top"?f.bottom.y:0,g=c==="right"?f.left.x:0,y=c==="left"?f.right.x:0,v=a.top-r+h>l,b=r-a.bottom-p>l,w=a.left-n+g>l,S=n-a.right-y>l;return v||b||w||S})}function z2(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){t[r](i,n)})}function qH(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var qc={isTouch:!1},KH=0;function Cye(){qc.isTouch||(qc.isTouch=!0,window.performance&&document.addEventListener("mousemove",GH))}function GH(){var t=performance.now();t-KH<20&&(qc.isTouch=!1,document.removeEventListener("mousemove",GH)),KH=t}function Iye(){var t=document.activeElement;if(Eye(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function Mye(){document.addEventListener("touchstart",Cye,Em),window.addEventListener("blur",Iye)}var Rye=typeof window<"u"&&typeof document<"u",$ye=Rye?!!window.msCrypto:!1;function Cy(t){var e=t==="destroy"?"n already-":" ";return[t+"() was called on a"+e+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function ZH(t){var e=/[ \t]{2,}/g,n=/^[ \t]*/gm;return t.replace(e," ").replace(n,"").trim()}function Pye(t){return ZH(`
|
|
29
|
+
**/function Fge(){tge()}ge.env.NODE_ENV!=="production"&&Fge();var Vge=Object.defineProperty,Bge=(t,e,n)=>e in t?Vge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Yd=(t,e,n)=>(Bge(t,typeof e!="symbol"?e+"":e,n),n);const S2=(t,e)=>e.some(n=>t instanceof n);let sH,lH;function Uge(){return sH||(sH=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Wge(){return lH||(lH=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const A2=new WeakMap,k2=new WeakMap,qk=new WeakMap;function zge(t){const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("success",a),t.removeEventListener("error",o)},a=()=>{n(Sm(t.result)),i()},o=()=>{r(t.error),i()};t.addEventListener("success",a),t.addEventListener("error",o)});return qk.set(e,t),e}function jge(t){if(A2.has(t))return;const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("complete",a),t.removeEventListener("error",o),t.removeEventListener("abort",o)},a=()=>{n(),i()},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",a),t.addEventListener("error",o),t.addEventListener("abort",o)});A2.set(t,e)}let E2={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return A2.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Sm(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function uH(t){E2=t(E2)}function Hge(t){return Wge().includes(t)?function(...e){return t.apply(T2(this),e),Sm(this.request)}:function(...e){return Sm(t.apply(T2(this),e))}}function Yge(t){return typeof t=="function"?Hge(t):(t instanceof IDBTransaction&&jge(t),S2(t,Uge())?new Proxy(t,E2):t)}function Sm(t){if(t instanceof IDBRequest)return zge(t);if(k2.has(t))return k2.get(t);const e=Yge(t);return e!==t&&(k2.set(t,e),qk.set(e,t)),e}const T2=t=>qk.get(t);function qge(t,e,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const o=indexedDB.open(t,e),s=Sm(o);return r&&o.addEventListener("upgradeneeded",l=>{r(Sm(o.result),l.oldVersion,l.newVersion,Sm(o.transaction),l)}),n&&o.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),s.then(l=>{a&&l.addEventListener("close",()=>a()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),s}const Kge=["get","getKey","getAll","getAllKeys","count"],Gge=["put","add","delete","clear"],D2=new Map;function cH(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(D2.get(e))return D2.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,i=Gge.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||Kge.includes(n)))return;const a=async function(o,...s){const l=this.transaction(o,i?"readwrite":"readonly");let c=l.store;return r&&(c=c.index(s.shift())),(await Promise.all([c[n](...s),i&&l.done]))[0]};return D2.set(e,a),a}uH(t=>({...t,get:(e,n,r)=>cH(e,n)||t.get(e,n,r),has:(e,n)=>!!cH(e,n)||t.has(e,n)}));const Zge=["continue","continuePrimaryKey","advance"],dH={},O2=new WeakMap,fH=new WeakMap,Qge={get(t,e){if(!Zge.includes(e))return t[e];let n=dH[e];return n||(n=dH[e]=function(...r){O2.set(this,fH.get(this)[e](...r))}),n}};async function*Xge(...t){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...t)),!e)return;e=e;const n=new Proxy(e,Qge);for(fH.set(n,e),qk.set(n,T2(e));e;)yield n,e=await(O2.get(n)||e.continue()),O2.delete(n)}function hH(t,e){return e===Symbol.asyncIterator&&S2(t,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&S2(t,[IDBIndex,IDBObjectStore])}uH(t=>({...t,get(e,n,r){return hH(e,n)?Xge:t.get(e,n,r)},has(e,n){return hH(e,n)||t.has(e,n)}}));const Jge="0.0.372-alpha.17",eve={version:Jge},pH="mediaCachingDB",qd="mediaStore",Kk="__cache_flag__",tve=1,mH=!1,Gk=eve.version;let D0=null,Zk=!1,Qk=null,nve=class{constructor(){Yd(this,"logs",[]),Yd(this,"logTimeout",null),Yd(this,"LOG_DELAY",2e3),Yd(this,"MAX_LOGS",100)}addLog(e){const n={...e,timestamp:Date.now()};this.logs.push(n),this.logs.length>this.MAX_LOGS&&(this.logs=this.logs.slice(-this.MAX_LOGS)),this.scheduleLogging()}scheduleLogging(){this.logTimeout&&clearTimeout(this.logTimeout),this.logTimeout=setTimeout(()=>{this.printLogs()},this.LOG_DELAY)}printLogs(){}groupLogsByOperation(){const e={};return this.logs.forEach(n=>{e[n.operation]||(e[n.operation]=[]),e[n.operation].push(n)}),e}getOperationDisplay(e){switch(e){case"HIT":return"✅ HIT";case"MISS":return"⚠️ MISS";case"SAVE":return"💾 SAVE";case"ERROR":return"❌ ERROR";default:return e}}truncateUrl(e,n){return e.length<=n?e:e.substring(0,n-3)+"..."}printEnhancedSummary(){const e=this.logs.reduce((a,o)=>(a.total++,o.size&&(a.totalSize+=o.size),o.duration&&(a.totalDuration+=o.duration,a.minDuration=Math.min(a.minDuration,o.duration),a.maxDuration=Math.max(a.maxDuration,o.duration)),a[o.operation]=(a[o.operation]||0)+1,a),{total:0,totalSize:0,totalDuration:0,minDuration:Number.POSITIVE_INFINITY,maxDuration:0,HIT:0,MISS:0,SAVE:0,ERROR:0});if(e.total===0)return;const n=e.totalDuration/e.total,r=e.total>0?(e.HIT/e.total*100).toFixed(1):"0",i=[{metric:"Total Operations",value:e.total,percentage:"100%",performance:`${n.toFixed(1)}ms avg`},{metric:"Cache Hits",value:e.HIT,percentage:`${r}%`,performance:"✅ Optimal"},{metric:"Cache Misses",value:e.MISS,percentage:`${e.total?(e.MISS/e.total*100).toFixed(1):"0"}%`,performance:"⚠️ Network"},{metric:"New Saves",value:e.SAVE,percentage:`${e.total?(e.SAVE/e.total*100).toFixed(1):"0"}%`,performance:"💾 Storage"},{metric:"Errors",value:e.ERROR,percentage:`${e.total?(e.ERROR/e.total*100).toFixed(1):"0"}%`,performance:e.ERROR?"❌ Issues":"✅ Clean"},{metric:"Total Data Size",value:`${(e.totalSize/1024).toFixed(1)} KB`,percentage:"N/A",performance:"📦 Storage"},{metric:"Performance Range",value:`${isFinite(e.minDuration)?e.minDuration.toFixed(1):"0"}-${e.maxDuration.toFixed(1)}ms`,percentage:"N/A",performance:"⚡ Speed"}];console.table(i)}forceLog(){this.logTimeout&&(clearTimeout(this.logTimeout),this.logTimeout=null),this.printLogs()}clear(){this.logs=[],this.logTimeout&&(clearTimeout(this.logTimeout),this.logTimeout=null)}};const Yh=new nve;async function O0(){if(D0)return D0;try{return D0=await qge(pH,tve,{upgrade(t,e,n){mH&&console.warn(`Upgrading IndexedDB from version ${e} to ${n}`),t.objectStoreNames.contains(qd)||t.createObjectStore(qd)},blocked(){},blocking(){}}),D0}catch(t){throw t}}async function C2(){try{const t=await O0();if(!t)throw new Error("Failed to initialize database");await t.put(qd,Gk,Kk)}catch(t){throw t}}async function gH(){return Qk||(Zk?Promise.resolve():(Qk=rve(),Qk))}async function rve(){try{const t=await O0();if(!t)throw new Error("Failed to initialize database");const e=await t.get(qd,Kk);e===void 0?await C2():e!==Gk&&await C2(),Zk=!0}catch{try{await C2(),Zk=!0}catch(t){throw Zk=!1,Qk=null,t}}}async function vH(t){const e=performance.now();try{const n=await O0();if(!n)return Yh.addLog({url:t,operation:"ERROR",error:"Failed to initialize database",duration:performance.now()-e}),null;const r=await n.get(qd,t),i=performance.now()-e;return r?(Yh.addLog({url:t,operation:"HIT",size:typeof r=="string"?new Blob([r]).size:0,duration:i}),r):(Yh.addLog({url:t,operation:"MISS",duration:i}),null)}catch(n){const r=performance.now()-e;return n instanceof Error&&n.name==="VersionError"?(await ive(),Yh.addLog({url:t,operation:"ERROR",error:"VersionError - database reset",duration:r}),null):(Yh.addLog({url:t,operation:"ERROR",error:n instanceof Error?n.message:"Unknown error",duration:r}),null)}}async function Xk(t,e){const n=performance.now();try{const r=await O0();if(!r)throw Yh.addLog({url:t,operation:"ERROR",error:"Failed to initialize database",duration:performance.now()-n}),new Error("Failed to initialize database");const i=new Blob([e]).size;await r.put(qd,e,t),await r.get(qd,Kk)!==Gk&&await r.put(qd,Gk,Kk);const a=performance.now()-n;Yh.addLog({url:t,operation:"SAVE",size:i,duration:a})}catch(r){const i=performance.now()-n;throw Yh.addLog({url:t,operation:"ERROR",error:r instanceof Error?r.message:"Unknown error",duration:i}),r}}async function yH(t){try{const e=await O0();if(!e)throw new Error("Failed to initialize database");await e.delete(qd,t)}catch(e){throw e}}async function ive(){try{D0=null;const t=indexedDB.deleteDatabase(pH);await new Promise((e,n)=>{t.onsuccess=()=>e(),t.onerror=()=>n(t.error),t.onblocked=()=>{mH&&console.warn("Database deletion blocked - close other tabs using this database"),n(new Error("Database deletion blocked"))}})}catch(t){throw t}}let ave=class{constructor(){Yd(this,"batchQueue",[]),Yd(this,"batchTimeout",null),Yd(this,"BATCH_DELAY",50),Yd(this,"MAX_BATCH_SIZE",10),Yd(this,"MAX_BATCH_WAIT",100)}async addRequest(e){return new Promise((n,r)=>{const i={url:e,resolve:n,reject:r,timestamp:Date.now()};this.batchQueue.push(i),this.batchQueue.length>=this.MAX_BATCH_SIZE?this.processBatch():this.batchTimeout||(this.batchTimeout=setTimeout(()=>{this.processBatch()},this.BATCH_DELAY))})}async processBatch(){if(this.batchTimeout&&(clearTimeout(this.batchTimeout),this.batchTimeout=null),this.batchQueue.length===0)return;const e=this.batchQueue.splice(0,this.MAX_BATCH_SIZE),n=e.map(i=>i.url),r=[...new Set(n)];try{const i=await this.fetchBatch(r);e.forEach(a=>{const o=i.get(a.url);o!==void 0?a.resolve(o):a.reject(new Error("Request not found in batch results"))})}catch(i){e.forEach(a=>{a.reject(i)})}}async fetchBatch(e){const n=new Map,r=e.map(async s=>{try{const l=await vH(s);return{url:s,result:l}}catch(l){return{url:s,result:null,error:l}}}),i=await Promise.all(r),a=new Set;i.forEach(({url:s,result:l})=>{l&&(n.set(s,l),a.add(s))});const o=e.filter(s=>!a.has(s));if(o.length>0){const s=o.map(async l=>{try{const c=await this.fetchSingleResource(l);return{url:l,result:c}}catch{return{url:l,result:null}}});(await Promise.all(s)).forEach(({url:l,result:c})=>{n.set(l,c)})}return n}async fetchSingleResource(e){try{const n=await fetch(e);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const r=n.headers.get("Content-Type");if(!r)throw new Error("No content type received");if(r.includes("image/svg+xml")){const i=await n.text();return await Xk(e,i),i}if(r.includes("image/")){const i=await n.blob();if(!i||i.size===0)throw new Error("Invalid or empty blob received from server");const a=await this.blobToBase64(i);return await Xk(e,a),a}throw new Error(`Unsupported content type: ${r}`)}catch{return null}}blobToBase64(e){return new Promise((n,r)=>{const i=new FileReader;i.onload=()=>n(i.result),i.onerror=r,i.readAsDataURL(e)})}forceProcess(){this.batchTimeout&&(clearTimeout(this.batchTimeout),this.batchTimeout=null),this.processBatch()}getStatus(){return{queueLength:this.batchQueue.length,hasTimeout:!!this.batchTimeout}}clear(){this.batchTimeout&&(clearTimeout(this.batchTimeout),this.batchTimeout=null),this.batchQueue.forEach(e=>{e.reject(new Error("Batch cleared"))}),this.batchQueue=[]}};const ove=new ave;async function sve(t){return ove.addRequest(t)}const Ht=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},Jk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABLAAAAKjCAYAAAANs/bAAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAACdLSURBVHgB7d0LaxzJ2bDh+jLByxgZGRktEhYeCBgE+d/5R4FAYIPDGhsb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RiwgELHYmXgEAAPRBxGJuAhY7Ea8AAAD6ImIxJwGLrYlXAAAAfRKxmIuAxVbEKwAAgL6JWMxBwGJj4hUAAACZiEVpAhYbEa8AAAC4Lkes8/Nzz4kUIWDxIPEKAACA23hepBQBi3v5YQQAAMB9PDdSgoDFnfwQAgAAYBOeH5magMWt/PABAABgG54jmZKAxQ/80AEAAGAXnieZioDFDX7YAAAAsA/PlUxBwOJ3fsgAAAAwBs+XjE3AYs0PFwAAAMbkOZMxCVj4oQIAAMAkPG8yFgGrc36YAAAAMCXPnYxBwOqYHyIAAACU4PmTff0fcAVXtCn46yAAAAAASUVORK5CYII=",lve=[],uve=["UploadInProgress"],cve=["innerHTML"],dve=["src","alt"],hr=Ht(Qe({__name:"SvgRender",props:{name:{default:""},url:{default:""},alt:{default:"image"},classIcon:{default:"arbo-icon-state"},type:{default:"icon"},isSquareSize:{type:Boolean,default:!1},imageDefault:{default:Jk},iconStyle:{default:""}},emits:["error","load"],setup(t,{emit:e}){const n=t,r=jt({imageSrc:null,retried:!1,svgContent:null,isLoading:!1,error:null}),i=e,a=re(null),o=Eu("ASSET_URL","https://arbodev.s3.ap-south-1.amazonaws.com"),s=C=>{var F;return C&&((F=C.split(".").pop())==null?void 0:F.toLowerCase())||""},l=()=>Math.random().toString(36).slice(2,11),c=C=>new Promise((F,W)=>{if(C.type==="image/gif"){const j=new FileReader;j.onload=()=>F(j.result),j.onerror=W,j.readAsDataURL(C);return}const H=new Image;H.onload=()=>{try{const j=document.createElement("canvas"),N=j.getContext("2d");if(!N){W(new Error("Could not get canvas context"));return}j.width=H.naturalWidth||H.width,j.height=H.naturalHeight||H.height,N.drawImage(H,0,0);const U=j.toDataURL("image/png",.9);URL.revokeObjectURL(H.src),F(U)}catch(j){URL.revokeObjectURL(H.src),W(j)}},H.onerror=()=>{URL.revokeObjectURL(H.src),W(new Error("Failed to load image from blob"))},H.src=URL.createObjectURL(C)}),f=re(null),h=C=>{if(!C.startsWith("data:image/"))return!1;const F=C.split(",")[1];if(!F||F.length===0)return!1;try{const W=F.substring(0,Math.min(100,F.length));return atob(W),!0}catch(W){return console.warn("Invalid base64 data detected:",W),!1}},p=Z(()=>r.imageSrc||""),g=Z(()=>r.svgContent),y=Z(()=>!!(n.name&&n.type!=="visual")),v=Z(()=>{let C=n.classIcon;return y.value&&(C+=" arbo__internal-icon"),C}),b=Z(()=>{if(n.name&&n.type!=="visual")return!0;const C=s((n==null?void 0:n.url)||"");return(C==null?void 0:C.toLowerCase())==="svg"}),w=C=>{if(!C)return null;try{const F=new DOMParser().parseFromString(C,"image/svg+xml"),W=F.documentElement,H=`-${l()}`,j=F.querySelector("linearGradient");if(j){const le=j.getAttribute("id");if(le){const _e=le+H;j.setAttribute("id",_e);const be=F.querySelector("rect");be&&be.getAttribute("fill")===`url(#${le})`&&be.setAttribute("fill",`url(#${_e})`)}}const N=W.getAttribute("style")||"",U=n.iconStyle||"",ee=`${N}; ${U}`.trim();return ee&&W.setAttribute("style",ee),W.setAttribute("class",v.value),new XMLSerializer().serializeToString(F)}catch(F){return console.error("Error formatting SVG:",F),r.error="Failed to format SVG",C}};async function S(C){if(!C)return null;const F=await vH(C);if(F)if(F.startsWith("data:image/")&&!h(F)){console.warn("Cached base64 is corrupted, removing from cache and refetching:",C);try{await yH(C),console.warn("Successfully removed corrupted cache entry")}catch(W){console.warn("Failed to remove corrupted cache entry:",W)}}else return F;try{r.isLoading=!0;const W=await fetch(C);if(!W.ok)throw new Error(`HTTP error! status: ${W.status}`);const H=W.headers.get("Content-Type");if(H!=null&&H.includes("image/svg+xml")||H!=null&&H.includes("text/xml")){const j=await W.text();if(j.trim())return await Xk(C,j),j;throw new Error("Empty SVG content received")}else if(H&&(H.includes("image/jpeg")||H.includes("image/jpg")||H.includes("image/png")||H.includes("image/gif")||H.includes("image/webp"))){const j=await W.blob();if(j&&j.size>0){const N=await c(j);return await Xk(C,N),N}else throw new Error("Invalid or empty blob received from server")}else throw new Error(`Unsupported content type: ${H}`)}catch(W){return console.error(`Failed to fetch media: ${C}`,W),r.error=`Failed to fetch media: ${W}`,null}finally{r.isLoading=!1}}const T=()=>{if(!n.name||n.type==="visual")return"";let C=`${o}/icon/tess`,F="TESSRAPP_Icon_";switch(n.type){case"rating":{C=`${o}/icon/tess/rating`;break}case"country":{C=n.isSquareSize?`${o}/icon/flags/1x1`:`${o}/icon/flags/4x3`,F="";break}default:{C=`${o}/icon/tess`;break}}return`${C}/${F}${n.name}.svg`},_=async()=>{switch(r.isLoading=!0,r.svgContent=null,r.imageSrc=null,r.error=null,f.value=null,!0){case(n.name&&n.type!=="visual"):await E();break;case(n.url&&n.type!=="visual"):await D();break;case!!(n.type==="visual"&&n.name):await O();break;default:await V();break}setTimeout(()=>{r.isLoading=!1},300)},E=async()=>{try{const C=T(),F=await S(C);if(typeof F=="string")F.startsWith("data:image/")?(r.imageSrc=F,r.svgContent=null,f.value=C):r.svgContent=F;else throw new Error("Failed to load internal icon")}catch(C){console.error("Error loading internal icon:",C),r.error=`Failed to load icon: ${C}`,await V()}},D=async()=>{try{const C=await S(n.url);if(typeof C=="string")C.startsWith("data:image/")?(r.imageSrc=C,r.svgContent=null,f.value=n.url):r.svgContent=C;else throw new Error("Failed to load external media")}catch(C){console.error("Error loading external media:",C),r.error=`Failed to load external media: ${C}`,await V()}},O=async()=>{try{const C=`${o}/icon/visual`,F="TESSRAPP_Visual_",W=lve.includes(n.name)?"svg":uve.includes(n.name)?"gif":"png",H=`${C}/${F}${n.name}.${W}`,j=await S(H);if(typeof j=="string")j.startsWith("data:image/")?(r.imageSrc=j,r.svgContent=null,f.value=H):r.svgContent=j;else throw new Error("Failed to load visual asset")}catch(C){console.error("Error loading visual asset:",C),r.error=`Failed to load visual asset: ${C}`,await V()}},V=async()=>{try{const C=typeof n.imageDefault=="string"?n.imageDefault:Jk,F=await S(C);typeof F=="string"?F.startsWith("data:image/")?(r.imageSrc=F,r.svgContent=null,f.value=C):r.svgContent=F:r.imageSrc=C}catch(C){console.error("Error loading default image:",C),r.imageSrc=typeof n.imageDefault=="string"?n.imageDefault:Jk}},P=async()=>{var C;if(i("error",r.error||"Image failed to load"),!r.retried){try{if((C=r.imageSrc)!=null&&C.startsWith("data:image/")&&f.value){console.warn("Base64 image failed to load, removing potentially corrupted cache entry");try{await yH(f.value)}catch(F){console.warn("Failed to remove corrupted cache entry:",F)}}}catch(F){console.error("Error during image error recovery:",F);const W=typeof n.imageDefault=="string"?n.imageDefault:Jk;await V(),r.imageSrc=W,f.value=null}r.retried=!0}},M=()=>{i("load")};return Ge(()=>[n.name,n.url,n.type],async()=>{r.retried=!1,r.error=null,await _()}),Os(async()=>{r.retried=!1,r.error=null,await _()}),Wt(async()=>{await gH()}),(C,F)=>b.value&&g.value?(R(),Y("div",{key:0,class:"svg-render",innerHTML:w(g.value)},null,8,cve)):p.value?(R(),Y("img",{key:1,ref_key:"imgInstance",ref:a,src:p.value,alt:n.alt,class:Fe(n.classIcon),onError:P,onLoad:M},null,42,dve)):pe("",!0)}}),[["__scopeId","data-v-58ceffbd"]]),Yn=Qe({__name:"Icon.ce",props:{name:{type:String,required:!0},type:{type:String,default:"icon"},isSquareSize:{type:Boolean,default:!1}},setup(t){const e=t;return(n,r)=>(R(),Re(hr,Ft(e,{"class-icon":`arbo--icon ${e.type}`}),null,16,["class-icon"]))}});var Is="top",$l="bottom",Pl="right",Ms="left",I2="auto",C0=[Is,$l,Pl,Ms],ky="start",I0="end",fve="clippingParents",bH="viewport",M0="popper",hve="reference",_H=C0.reduce(function(t,e){return t.concat([e+"-"+ky,e+"-"+I0])},[]),wH=[].concat(C0,[I2]).reduce(function(t,e){return t.concat([e,e+"-"+ky,e+"-"+I0])},[]),pve="beforeRead",mve="read",gve="afterRead",vve="beforeMain",yve="main",bve="afterMain",_ve="beforeWrite",wve="write",xve="afterWrite",Sve=[pve,mve,gve,vve,yve,bve,_ve,wve,xve];function Hc(t){return t?(t.nodeName||"").toLowerCase():null}function nl(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Am(t){var e=nl(t).Element;return t instanceof e||t instanceof Element}function Ll(t){var e=nl(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function M2(t){if(typeof ShadowRoot>"u")return!1;var e=nl(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Ave(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},a=e.elements[n];!Ll(a)||!Hc(a)||(Object.assign(a.style,r),Object.keys(i).forEach(function(o){var s=i[o];s===!1?a.removeAttribute(o):a.setAttribute(o,s===!0?"":s)}))})}function kve(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],a=e.attributes[r]||{},o=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),s=o.reduce(function(l,c){return l[c]="",l},{});!Ll(i)||!Hc(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(l){i.removeAttribute(l)}))})}}const xH={name:"applyStyles",enabled:!0,phase:"write",fn:Ave,effect:kve,requires:["computeStyles"]};function Yc(t){return t.split("-")[0]}var km=Math.max,eE=Math.min,Ey=Math.round;function R2(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function SH(){return!/^((?!chrome|android).)*safari/i.test(R2())}function Ty(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),i=1,a=1;e&&Ll(t)&&(i=t.offsetWidth>0&&Ey(r.width)/t.offsetWidth||1,a=t.offsetHeight>0&&Ey(r.height)/t.offsetHeight||1);var o=Am(t)?nl(t):window,s=o.visualViewport,l=!SH()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,f=(r.top+(l&&s?s.offsetTop:0))/a,h=r.width/i,p=r.height/a;return{width:h,height:p,top:f,right:c+h,bottom:f+p,left:c,x:c,y:f}}function $2(t){var e=Ty(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function AH(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&M2(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Kd(t){return nl(t).getComputedStyle(t)}function Eve(t){return["table","td","th"].indexOf(Hc(t))>=0}function qh(t){return((Am(t)?t.ownerDocument:t.document)||window.document).documentElement}function tE(t){return Hc(t)==="html"?t:t.assignedSlot||t.parentNode||(M2(t)?t.host:null)||qh(t)}function kH(t){return!Ll(t)||Kd(t).position==="fixed"?null:t.offsetParent}function Tve(t){var e=/firefox/i.test(R2()),n=/Trident/i.test(R2());if(n&&Ll(t)){var r=Kd(t);if(r.position==="fixed")return null}var i=tE(t);for(M2(i)&&(i=i.host);Ll(i)&&["html","body"].indexOf(Hc(i))<0;){var a=Kd(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||e&&a.willChange==="filter"||e&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function R0(t){for(var e=nl(t),n=kH(t);n&&Eve(n)&&Kd(n).position==="static";)n=kH(n);return n&&(Hc(n)==="html"||Hc(n)==="body"&&Kd(n).position==="static")?e:n||Tve(t)||e}function P2(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function $0(t,e,n){return km(t,eE(e,n))}function Dve(t,e,n){var r=$0(t,e,n);return r>n?n:r}function EH(){return{top:0,right:0,bottom:0,left:0}}function TH(t){return Object.assign({},EH(),t)}function DH(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var Ove=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,TH(typeof t!="number"?t:DH(t,C0))};function Cve(t){var e,n=t.state,r=t.name,i=t.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=Yc(n.placement),l=P2(s),c=[Ms,Pl].indexOf(s)>=0,f=c?"height":"width";if(!(!a||!o)){var h=Ove(i.padding,n),p=$2(a),g=l==="y"?Is:Ms,y=l==="y"?$l:Pl,v=n.rects.reference[f]+n.rects.reference[l]-o[l]-n.rects.popper[f],b=o[l]-n.rects.reference[l],w=R0(a),S=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,T=v/2-b/2,_=h[g],E=S-p[f]-h[y],D=S/2-p[f]/2+T,O=$0(_,D,E),V=l;n.modifiersData[r]=(e={},e[V]=O,e.centerOffset=O-D,e)}}function Ive(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||AH(e.elements.popper,i)&&(e.elements.arrow=i))}const Mve={name:"arrow",enabled:!0,phase:"main",fn:Cve,effect:Ive,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Dy(t){return t.split("-")[1]}var Rve={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $ve(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:Ey(n*i)/i||0,y:Ey(r*i)/i||0}}function OH(t){var e,n=t.popper,r=t.popperRect,i=t.placement,a=t.variation,o=t.offsets,s=t.position,l=t.gpuAcceleration,c=t.adaptive,f=t.roundOffsets,h=t.isFixed,p=o.x,g=p===void 0?0:p,y=o.y,v=y===void 0?0:y,b=typeof f=="function"?f({x:g,y:v}):{x:g,y:v};g=b.x,v=b.y;var w=o.hasOwnProperty("x"),S=o.hasOwnProperty("y"),T=Ms,_=Is,E=window;if(c){var D=R0(n),O="clientHeight",V="clientWidth";if(D===nl(n)&&(D=qh(n),Kd(D).position!=="static"&&s==="absolute"&&(O="scrollHeight",V="scrollWidth")),D=D,i===Is||(i===Ms||i===Pl)&&a===I0){_=$l;var P=h&&D===E&&E.visualViewport?E.visualViewport.height:D[O];v-=P-r.height,v*=l?1:-1}if(i===Ms||(i===Is||i===$l)&&a===I0){T=Pl;var M=h&&D===E&&E.visualViewport?E.visualViewport.width:D[V];g-=M-r.width,g*=l?1:-1}}var C=Object.assign({position:s},c&&Rve),F=f===!0?$ve({x:g,y:v},nl(n)):{x:g,y:v};if(g=F.x,v=F.y,l){var W;return Object.assign({},C,(W={},W[_]=S?"0":"",W[T]=w?"0":"",W.transform=(E.devicePixelRatio||1)<=1?"translate("+g+"px, "+v+"px)":"translate3d("+g+"px, "+v+"px, 0)",W))}return Object.assign({},C,(e={},e[_]=S?v+"px":"",e[T]=w?g+"px":"",e.transform="",e))}function Pve(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,o=a===void 0?!0:a,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:Yc(e.placement),variation:Dy(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,OH(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,OH(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Lve={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Pve,data:{}};var nE={passive:!0};function Nve(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,a=i===void 0?!0:i,o=r.resize,s=o===void 0?!0:o,l=nl(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return a&&c.forEach(function(f){f.addEventListener("scroll",n.update,nE)}),s&&l.addEventListener("resize",n.update,nE),function(){a&&c.forEach(function(f){f.removeEventListener("scroll",n.update,nE)}),s&&l.removeEventListener("resize",n.update,nE)}}const Fve={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Nve,data:{}};var Vve={left:"right",right:"left",bottom:"top",top:"bottom"};function rE(t){return t.replace(/left|right|bottom|top/g,function(e){return Vve[e]})}var Bve={start:"end",end:"start"};function CH(t){return t.replace(/start|end/g,function(e){return Bve[e]})}function L2(t){var e=nl(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function N2(t){return Ty(qh(t)).left+L2(t).scrollLeft}function Uve(t,e){var n=nl(t),r=qh(t),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;var c=SH();(c||!c&&e==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s+N2(t),y:l}}function Wve(t){var e,n=qh(t),r=L2(t),i=(e=t.ownerDocument)==null?void 0:e.body,a=km(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=km(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+N2(t),l=-r.scrollTop;return Kd(i||n).direction==="rtl"&&(s+=km(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:l}}function F2(t){var e=Kd(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function IH(t){return["html","body","#document"].indexOf(Hc(t))>=0?t.ownerDocument.body:Ll(t)&&F2(t)?t:IH(tE(t))}function P0(t,e){var n;e===void 0&&(e=[]);var r=IH(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),a=nl(r),o=i?[a].concat(a.visualViewport||[],F2(r)?r:[]):r,s=e.concat(o);return i?s:s.concat(P0(tE(o)))}function V2(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function zve(t,e){var n=Ty(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function MH(t,e,n){return e===bH?V2(Uve(t,n)):Am(e)?zve(e,n):V2(Wve(qh(t)))}function jve(t){var e=P0(tE(t)),n=["absolute","fixed"].indexOf(Kd(t).position)>=0,r=n&&Ll(t)?R0(t):t;return Am(r)?e.filter(function(i){return Am(i)&&AH(i,r)&&Hc(i)!=="body"}):[]}function Hve(t,e,n,r){var i=e==="clippingParents"?jve(t):[].concat(e),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(l,c){var f=MH(t,c,r);return l.top=km(f.top,l.top),l.right=eE(f.right,l.right),l.bottom=eE(f.bottom,l.bottom),l.left=km(f.left,l.left),l},MH(t,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function RH(t){var e=t.reference,n=t.element,r=t.placement,i=r?Yc(r):null,a=r?Dy(r):null,o=e.x+e.width/2-n.width/2,s=e.y+e.height/2-n.height/2,l;switch(i){case Is:l={x:o,y:e.y-n.height};break;case $l:l={x:o,y:e.y+e.height};break;case Pl:l={x:e.x+e.width,y:s};break;case Ms:l={x:e.x-n.width,y:s};break;default:l={x:e.x,y:e.y}}var c=i?P2(i):null;if(c!=null){var f=c==="y"?"height":"width";switch(a){case ky:l[c]=l[c]-(e[f]/2-n[f]/2);break;case I0:l[c]=l[c]+(e[f]/2-n[f]/2);break}}return l}function L0(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,a=n.strategy,o=a===void 0?t.strategy:a,s=n.boundary,l=s===void 0?fve:s,c=n.rootBoundary,f=c===void 0?bH:c,h=n.elementContext,p=h===void 0?M0:h,g=n.altBoundary,y=g===void 0?!1:g,v=n.padding,b=v===void 0?0:v,w=TH(typeof b!="number"?b:DH(b,C0)),S=p===M0?hve:M0,T=t.rects.popper,_=t.elements[y?S:p],E=Hve(Am(_)?_:_.contextElement||qh(t.elements.popper),l,f,o),D=Ty(t.elements.reference),O=RH({reference:D,element:T,placement:i}),V=V2(Object.assign({},T,O)),P=p===M0?V:D,M={top:E.top-P.top+w.top,bottom:P.bottom-E.bottom+w.bottom,left:E.left-P.left+w.left,right:P.right-E.right+w.right},C=t.modifiersData.offset;if(p===M0&&C){var F=C[i];Object.keys(M).forEach(function(W){var H=[Pl,$l].indexOf(W)>=0?1:-1,j=[Is,$l].indexOf(W)>=0?"y":"x";M[W]+=F[j]*H})}return M}function Yve(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?wH:l,f=Dy(r),h=f?s?_H:_H.filter(function(y){return Dy(y)===f}):C0,p=h.filter(function(y){return c.indexOf(y)>=0});p.length===0&&(p=h);var g=p.reduce(function(y,v){return y[v]=L0(t,{placement:v,boundary:i,rootBoundary:a,padding:o})[Yc(v)],y},{});return Object.keys(g).sort(function(y,v){return g[y]-g[v]})}function qve(t){if(Yc(t)===I2)return[];var e=rE(t);return[CH(t),e,CH(e)]}function Kve(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!0:o,l=n.fallbackPlacements,c=n.padding,f=n.boundary,h=n.rootBoundary,p=n.altBoundary,g=n.flipVariations,y=g===void 0?!0:g,v=n.allowedAutoPlacements,b=e.options.placement,w=Yc(b),S=w===b,T=l||(S||!y?[rE(b)]:qve(b)),_=[b].concat(T).reduce(function(me,Ee){return me.concat(Yc(Ee)===I2?Yve(e,{placement:Ee,boundary:f,rootBoundary:h,padding:c,flipVariations:y,allowedAutoPlacements:v}):Ee)},[]),E=e.rects.reference,D=e.rects.popper,O=new Map,V=!0,P=_[0],M=0;M<_.length;M++){var C=_[M],F=Yc(C),W=Dy(C)===ky,H=[Is,$l].indexOf(F)>=0,j=H?"width":"height",N=L0(e,{placement:C,boundary:f,rootBoundary:h,altBoundary:p,padding:c}),U=H?W?Pl:Ms:W?$l:Is;E[j]>D[j]&&(U=rE(U));var ee=rE(U),le=[];if(a&&le.push(N[F]<=0),s&&le.push(N[U]<=0,N[ee]<=0),le.every(function(me){return me})){P=C,V=!1;break}O.set(C,le)}if(V)for(var _e=y?3:1,be=function(me){var Ee=_.find(function(Ce){var de=O.get(Ce);if(de)return de.slice(0,me).every(function(G){return G})});if(Ee)return P=Ee,"break"},Te=_e;Te>0;Te--){var J=be(Te);if(J==="break")break}e.placement!==P&&(e.modifiersData[r]._skip=!0,e.placement=P,e.reset=!0)}}const Gve={name:"flip",enabled:!0,phase:"main",fn:Kve,requiresIfExists:["offset"],data:{_skip:!1}};function $H(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function PH(t){return[Is,Pl,$l,Ms].some(function(e){return t[e]>=0})}function Zve(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,a=e.modifiersData.preventOverflow,o=L0(e,{elementContext:"reference"}),s=L0(e,{altBoundary:!0}),l=$H(o,r),c=$H(s,i,a),f=PH(l),h=PH(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const Qve={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Zve};function Xve(t,e,n){var r=Yc(t),i=[Ms,Is].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[Ms,Pl].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function Jve(t){var e=t.state,n=t.options,r=t.name,i=n.offset,a=i===void 0?[0,0]:i,o=wH.reduce(function(f,h){return f[h]=Xve(h,e.rects,a),f},{}),s=o[e.placement],l=s.x,c=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=o}const eye={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Jve};function tye(t){var e=t.state,n=t.name;e.modifiersData[n]=RH({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const nye={name:"popperOffsets",enabled:!0,phase:"read",fn:tye,data:{}};function rye(t){return t==="x"?"y":"x"}function iye(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!1:o,l=n.boundary,c=n.rootBoundary,f=n.altBoundary,h=n.padding,p=n.tether,g=p===void 0?!0:p,y=n.tetherOffset,v=y===void 0?0:y,b=L0(e,{boundary:l,rootBoundary:c,padding:h,altBoundary:f}),w=Yc(e.placement),S=Dy(e.placement),T=!S,_=P2(w),E=rye(_),D=e.modifiersData.popperOffsets,O=e.rects.reference,V=e.rects.popper,P=typeof v=="function"?v(Object.assign({},e.rects,{placement:e.placement})):v,M=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),C=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,F={x:0,y:0};if(D){if(a){var W,H=_==="y"?Is:Ms,j=_==="y"?$l:Pl,N=_==="y"?"height":"width",U=D[_],ee=U+b[H],le=U-b[j],_e=g?-V[N]/2:0,be=S===ky?O[N]:V[N],Te=S===ky?-V[N]:-O[N],J=e.elements.arrow,me=g&&J?$2(J):{width:0,height:0},Ee=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:EH(),Ce=Ee[H],de=Ee[j],G=$0(0,O[N],me[N]),ve=T?O[N]/2-_e-G-Ce-M.mainAxis:be-G-Ce-M.mainAxis,Ue=T?-O[N]/2+_e+G+de+M.mainAxis:Te+G+de+M.mainAxis,ce=e.elements.arrow&&R0(e.elements.arrow),Ye=ce?_==="y"?ce.clientTop||0:ce.clientLeft||0:0,te=(W=C==null?void 0:C[_])!=null?W:0,ae=U+ve-te-Ye,ne=U+Ue-te,Ne=$0(g?eE(ee,ae):ee,U,g?km(le,ne):le);D[_]=Ne,F[_]=Ne-U}if(s){var Me,Ve=_==="x"?Is:Ms,at=_==="x"?$l:Pl,Ie=D[E],Ze=E==="y"?"height":"width",tt=Ie+b[Ve],Oe=Ie-b[at],Be=[Is,Ms].indexOf(w)!==-1,gt=(Me=C==null?void 0:C[E])!=null?Me:0,Bt=Be?tt:Ie-O[Ze]-V[Ze]-gt+M.altAxis,qt=Be?Ie+O[Ze]+V[Ze]-gt-M.altAxis:Oe,yt=g&&Be?Dve(Bt,Ie,qt):$0(g?Bt:tt,Ie,g?qt:Oe);D[E]=yt,F[E]=yt-Ie}e.modifiersData[r]=F}}const aye={name:"preventOverflow",enabled:!0,phase:"main",fn:iye,requiresIfExists:["offset"]};function oye(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function sye(t){return t===nl(t)||!Ll(t)?L2(t):oye(t)}function lye(t){var e=t.getBoundingClientRect(),n=Ey(e.width)/t.offsetWidth||1,r=Ey(e.height)/t.offsetHeight||1;return n!==1||r!==1}function uye(t,e,n){n===void 0&&(n=!1);var r=Ll(e),i=Ll(e)&&lye(e),a=qh(e),o=Ty(t,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Hc(e)!=="body"||F2(a))&&(s=sye(e)),Ll(e)?(l=Ty(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):a&&(l.x=N2(a))),{x:o.left+s.scrollLeft-l.x,y:o.top+s.scrollTop-l.y,width:o.width,height:o.height}}function cye(t){var e=new Map,n=new Set,r=[];t.forEach(function(a){e.set(a.name,a)});function i(a){n.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!n.has(s)){var l=e.get(s);l&&i(l)}}),r.push(a)}return t.forEach(function(a){n.has(a.name)||i(a)}),r}function dye(t){var e=cye(t);return Sve.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function fye(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function hye(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var LH={placement:"bottom",modifiers:[],strategy:"absolute"};function NH(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function pye(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,i=e.defaultOptions,a=i===void 0?LH:i;return function(o,s,l){l===void 0&&(l=a);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},LH,a),modifiersData:{},elements:{reference:o,popper:s},attributes:{},styles:{}},f=[],h=!1,p={state:c,setOptions:function(v){var b=typeof v=="function"?v(c.options):v;y(),c.options=Object.assign({},a,c.options,b),c.scrollParents={reference:Am(o)?P0(o):o.contextElement?P0(o.contextElement):[],popper:P0(s)};var w=dye(hye([].concat(r,c.options.modifiers)));return c.orderedModifiers=w.filter(function(S){return S.enabled}),g(),p.update()},forceUpdate:function(){if(!h){var v=c.elements,b=v.reference,w=v.popper;if(NH(b,w)){c.rects={reference:uye(b,R0(w),c.options.strategy==="fixed"),popper:$2(w)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(V){return c.modifiersData[V.name]=Object.assign({},V.data)});for(var S=0;S<c.orderedModifiers.length;S++){if(c.reset===!0){c.reset=!1,S=-1;continue}var T=c.orderedModifiers[S],_=T.fn,E=T.options,D=E===void 0?{}:E,O=T.name;typeof _=="function"&&(c=_({state:c,options:D,name:O,instance:p})||c)}}}},update:fye(function(){return new Promise(function(v){p.forceUpdate(),v(c)})}),destroy:function(){y(),h=!0}};if(!NH(o,s))return p;p.setOptions(l).then(function(v){!h&&l.onFirstUpdate&&l.onFirstUpdate(v)});function g(){c.orderedModifiers.forEach(function(v){var b=v.name,w=v.options,S=w===void 0?{}:w,T=v.effect;if(typeof T=="function"){var _=T({state:c,name:b,instance:p,options:S}),E=function(){};f.push(_||E)}})}function y(){f.forEach(function(v){return v()}),f=[]}return p}}var mye=[Fve,nye,Lve,xH,eye,Gve,aye,Mve,Qve],gye=pye({defaultModifiers:mye}),vye="tippy-box",FH="tippy-content",yye="tippy-backdrop",VH="tippy-arrow",BH="tippy-svg-arrow",Em={passive:!0,capture:!0},UH=function(){return document.body};function bye(t,e){return{}.hasOwnProperty.call(t,e)}function B2(t,e,n){if(Array.isArray(t)){var r=t[e];return r??(Array.isArray(n)?n[e]:n)}return t}function U2(t,e){var n={}.toString.call(t);return n.indexOf("[object")===0&&n.indexOf(e+"]")>-1}function WH(t,e){return typeof t=="function"?t.apply(void 0,e):t}function zH(t,e){if(e===0)return t;var n;return function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)}}function _ye(t,e){var n=Object.assign({},t);return e.forEach(function(r){delete n[r]}),n}function wye(t){return t.split(/\s+/).filter(Boolean)}function Oy(t){return[].concat(t)}function jH(t,e){t.indexOf(e)===-1&&t.push(e)}function xye(t){return t.filter(function(e,n){return t.indexOf(e)===n})}function Sye(t){return t.split("-")[0]}function iE(t){return[].slice.call(t)}function HH(t){return Object.keys(t).reduce(function(e,n){return t[n]!==void 0&&(e[n]=t[n]),e},{})}function N0(){return document.createElement("div")}function F0(t){return["Element","Fragment"].some(function(e){return U2(t,e)})}function Aye(t){return U2(t,"NodeList")}function kye(t){return U2(t,"MouseEvent")}function Eye(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function Tye(t){return F0(t)?[t]:Aye(t)?iE(t):Array.isArray(t)?t:iE(document.querySelectorAll(t))}function W2(t,e){t.forEach(function(n){n&&(n.style.transitionDuration=e+"ms")})}function YH(t,e){t.forEach(function(n){n&&n.setAttribute("data-state",e)})}function Dye(t){var e,n=Oy(t),r=n[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function Oye(t,e){var n=e.clientX,r=e.clientY;return t.every(function(i){var a=i.popperRect,o=i.popperState,s=i.props,l=s.interactiveBorder,c=Sye(o.placement),f=o.modifiersData.offset;if(!f)return!0;var h=c==="bottom"?f.top.y:0,p=c==="top"?f.bottom.y:0,g=c==="right"?f.left.x:0,y=c==="left"?f.right.x:0,v=a.top-r+h>l,b=r-a.bottom-p>l,w=a.left-n+g>l,S=n-a.right-y>l;return v||b||w||S})}function z2(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){t[r](i,n)})}function qH(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var qc={isTouch:!1},KH=0;function Cye(){qc.isTouch||(qc.isTouch=!0,window.performance&&document.addEventListener("mousemove",GH))}function GH(){var t=performance.now();t-KH<20&&(qc.isTouch=!1,document.removeEventListener("mousemove",GH)),KH=t}function Iye(){var t=document.activeElement;if(Eye(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function Mye(){document.addEventListener("touchstart",Cye,Em),window.addEventListener("blur",Iye)}var Rye=typeof window<"u"&&typeof document<"u",$ye=Rye?!!window.msCrypto:!1;function Cy(t){var e=t==="destroy"?"n already-":" ";return[t+"() was called on a"+e+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function ZH(t){var e=/[ \t]{2,}/g,n=/^[ \t]*/gm;return t.replace(e," ").replace(n,"").trim()}function Pye(t){return ZH(`
|
|
30
30
|
%ctippy.js
|
|
31
31
|
|
|
32
32
|
%c`+ZH(t)+`
|
|
@@ -103,7 +103,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
103
103
|
`)}function Ne(A,k,L,z){this.failures=k,this.failedKeys=z,this.successCount=L,this.message=ne(A,k)}b(Ne).from(ae);function Me(A,k){this.name="BulkError",this.failures=Object.keys(k).map(function(L){return k[L]}),this.failuresByPos=k,this.message=ne(A,this.failures)}b(Me).from(ae);var Ve=Ye.reduce(function(A,k){return A[k]=k+"Error",A},{}),at=ae,Ie=Ye.reduce(function(A,k){var L=k+"Error";function z(K,oe){this.name=L,K?typeof K=="string"?(this.message="".concat(K).concat(oe?`
|
|
104
104
|
`+oe:""),this.inner=oe||null):typeof K=="object"&&(this.message="".concat(K.name," ").concat(K.message),this.inner=K):(this.message=te[k]||L,this.inner=null)}return b(z).from(at),A[k]=z,A},{});Ie.Syntax=SyntaxError,Ie.Type=TypeError,Ie.Range=RangeError;var Ze=ce.reduce(function(A,k){return A[k+"Error"]=Ie[k],A},{});function tt(A,k){if(!A||A instanceof ae||A instanceof TypeError||A instanceof SyntaxError||!A.name||!Ze[A.name])return A;var L=new Ze[A.name](k||A.message,A);return"stack"in A&&v(L,"stack",{get:function(){return this.inner.stack}}),L}var Oe=Ye.reduce(function(A,k){return["Syntax","Type","Range"].indexOf(k)===-1&&(A[k+"Error"]=Ie[k]),A},{});Oe.ModifyError=Ne,Oe.DexieError=ae,Oe.BulkError=Me;function Be(){}function gt(A){return A}function Bt(A,k){return A==null||A===gt?k:function(L){return k(A(L))}}function qt(A,k){return function(){A.apply(this,arguments),k.apply(this,arguments)}}function yt(A,k){return A===Be?k:function(){var L=A.apply(this,arguments);L!==void 0&&(arguments[0]=L);var z=this.onsuccess,K=this.onerror;this.onsuccess=null,this.onerror=null;var oe=k.apply(this,arguments);return z&&(this.onsuccess=this.onsuccess?qt(z,this.onsuccess):z),K&&(this.onerror=this.onerror?qt(K,this.onerror):K),oe!==void 0?oe:L}}function hn(A,k){return A===Be?k:function(){A.apply(this,arguments);var L=this.onsuccess,z=this.onerror;this.onsuccess=this.onerror=null,k.apply(this,arguments),L&&(this.onsuccess=this.onsuccess?qt(L,this.onsuccess):L),z&&(this.onerror=this.onerror?qt(z,this.onerror):z)}}function rr(A,k){return A===Be?k:function(L){var z=A.apply(this,arguments);c(L,z);var K=this.onsuccess,oe=this.onerror;this.onsuccess=null,this.onerror=null;var ye=k.apply(this,arguments);return K&&(this.onsuccess=this.onsuccess?qt(K,this.onsuccess):K),oe&&(this.onerror=this.onerror?qt(oe,this.onerror):oe),z===void 0?ye===void 0?void 0:ye:c(z,ye)}}function Er(A,k){return A===Be?k:function(){return k.apply(this,arguments)===!1?!1:A.apply(this,arguments)}}function Dr(A,k){return A===Be?k:function(){var L=A.apply(this,arguments);if(L&&typeof L.then=="function"){for(var z=this,K=arguments.length,oe=new Array(K);K--;)oe[K]=arguments[K];return L.then(function(){return k.apply(z,oe)})}return k.apply(this,arguments)}}var sr=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function se(A,k){sr=A}var je={},Xe=100,bt=typeof Promise>"u"?[]:function(){var A=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[A,f(A),A];var k=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[k,f(k),A]}(),Ae=bt[0],ot=bt[1],Mt=bt[2],an=ot&&ot.then,st=Ae&&Ae.constructor,xt=!!Mt;function Gt(){queueMicrotask(jx)}var or=function(A,k){_l.push([A,k]),Hr&&(Gt(),Hr=!1)},ji=!0,Hr=!0,yr=[],lu=[],jf=gt,Jo={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Be,pgp:!1,env:{},finalize:Be},pn=Jo,_l=[],fc=0,qp=[];function Qt(A){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var k=this._PSD=pn;if(typeof A!="function"){if(A!==je)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&Kg(this,this._value);return}this._state=null,this._value=null,++k.ref,U_(this,A)}var qg={get:function(){var A=pn,k=Cd;function L(z,K){var oe=this,ye=!A.global&&(A!==pn||k!==Cd),xe=ye&&!cu(),Se=new Qt(function(Le,Ke){Hf(oe,new B_(du(z,A,ye,xe),du(K,A,ye,xe),Le,Ke,A))});return this._consoleTask&&(Se._consoleTask=this._consoleTask),Se}return L.prototype=je,L},set:function(A){v(this,"then",A&&A.prototype===je?qg:{get:function(){return A},set:qg.set})}};g(Qt.prototype,{then:qg,_then:function(A,k){Hf(this,new B_(null,null,A,k,pn))},catch:function(A){if(arguments.length===1)return this.then(null,A);var k=arguments[0],L=arguments[1];return typeof k=="function"?this.then(null,function(z){return z instanceof k?L(z):qs(z)}):this.then(null,function(z){return z&&z.name===k?L(z):qs(z)})},finally:function(A){return this.then(function(k){return Qt.resolve(A()).then(function(){return k})},function(k){return Qt.resolve(A()).then(function(){return qs(k)})})},timeout:function(A,k){var L=this;return A<1/0?new Qt(function(z,K){var oe=setTimeout(function(){return K(new Ie.Timeout(k))},A);L.then(z,K).finally(clearTimeout.bind(null,oe))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&v(Qt.prototype,Symbol.toStringTag,"Dexie.Promise"),Jo.env=z_();function B_(A,k,L,z,K){this.onFulfilled=typeof A=="function"?A:null,this.onRejected=typeof k=="function"?k:null,this.resolve=L,this.reject=z,this.psd=K}g(Qt,{all:function(){var A=G.apply(null,arguments).map(Md);return new Qt(function(k,L){A.length===0&&k([]);var z=A.length;A.forEach(function(K,oe){return Qt.resolve(K).then(function(ye){A[oe]=ye,--z||k(A)},L)})})},resolve:function(A){if(A instanceof Qt)return A;if(A&&typeof A.then=="function")return new Qt(function(L,z){A.then(L,z)});var k=new Qt(je,!0,A);return k},reject:qs,race:function(){var A=G.apply(null,arguments).map(Md);return new Qt(function(k,L){A.map(function(z){return Qt.resolve(z).then(k,L)})})},PSD:{get:function(){return pn},set:function(A){return pn=A}},totalEchoes:{get:function(){return Cd}},newPSD:uu,usePSD:wl,scheduler:{get:function(){return or},set:function(A){or=A}},rejectionMapper:{get:function(){return jf},set:function(A){jf=A}},follow:function(A,k){return new Qt(function(L,z){return uu(function(K,oe){var ye=pn;ye.unhandleds=[],ye.onunhandled=oe,ye.finalize=qt(function(){var xe=this;Hx(function(){xe.unhandleds.length===0?K():oe(xe.unhandleds[0])})},ye.finalize),A()},k,L,z)})}}),st&&(st.allSettled&&v(Qt,"allSettled",function(){var A=G.apply(null,arguments).map(Md);return new Qt(function(k){A.length===0&&k([]);var L=A.length,z=new Array(L);A.forEach(function(K,oe){return Qt.resolve(K).then(function(ye){return z[oe]={status:"fulfilled",value:ye}},function(ye){return z[oe]={status:"rejected",reason:ye}}).then(function(){return--L||k(z)})})})}),st.any&&typeof AggregateError<"u"&&v(Qt,"any",function(){var A=G.apply(null,arguments).map(Md);return new Qt(function(k,L){A.length===0&&L(new AggregateError([]));var z=A.length,K=new Array(z);A.forEach(function(oe,ye){return Qt.resolve(oe).then(function(xe){return k(xe)},function(xe){K[ye]=xe,--z||L(new AggregateError(K))})})})}),st.withResolvers&&(Qt.withResolvers=st.withResolvers));function U_(A,k){try{k(function(L){if(A._state===null){if(L===A)throw new TypeError("A promise cannot be resolved with itself.");var z=A._lib&&Ed();L&&typeof L.then=="function"?U_(A,function(K,oe){L instanceof Qt?L._then(K,oe):L.then(K,oe)}):(A._state=!0,A._value=L,W_(A)),z&&Td()}},Kg.bind(null,A))}catch(L){Kg(A,L)}}function Kg(A,k){if(lu.push(k),A._state===null){var L=A._lib&&Ed();k=jf(k),A._state=!1,A._value=k,hc(A),W_(A),L&&Td()}}function W_(A){var k=A._listeners;A._listeners=[];for(var L=0,z=k.length;L<z;++L)Hf(A,k[L]);var K=A._PSD;--K.ref||K.finalize(),fc===0&&(++fc,or(function(){--fc===0&&Gg()},[]))}function Hf(A,k){if(A._state===null){A._listeners.push(k);return}var L=A._state?k.onFulfilled:k.onRejected;if(L===null)return(A._state?k.resolve:k.reject)(A._value);++k.psd.ref,++fc,or(zx,[L,A,k])}function zx(A,k,L){try{var z,K=k._value;!k._state&&lu.length&&(lu=[]),z=sr&&k._consoleTask?k._consoleTask.run(function(){return A(K)}):A(K),!k._state&&lu.indexOf(K)===-1&&Yx(k),L.resolve(z)}catch(oe){L.reject(oe)}finally{--fc===0&&Gg(),--L.psd.ref||L.psd.finalize()}}function jx(){wl(Jo,function(){Ed()&&Td()})}function Ed(){var A=ji;return ji=!1,Hr=!1,A}function Td(){var A,k,L;do for(;_l.length>0;)for(A=_l,_l=[],L=A.length,k=0;k<L;++k){var z=A[k];z[0].apply(null,z[1])}while(_l.length>0);ji=!0,Hr=!0}function Gg(){var A=yr;yr=[],A.forEach(function(z){z._PSD.onunhandled.call(null,z._value,z)});for(var k=qp.slice(0),L=k.length;L;)k[--L]()}function Hx(A){function k(){A(),qp.splice(qp.indexOf(k),1)}qp.push(k),++fc,or(function(){--fc===0&&Gg()},[])}function hc(A){yr.some(function(k){return k._value===A._value})||yr.push(A)}function Yx(A){for(var k=yr.length;k;)if(yr[--k]._value===A._value){yr.splice(k,1);return}}function qs(A){return new Qt(je,!1,A)}function ii(A,k){var L=pn;return function(){var z=Ed(),K=pn;try{return es(L,!0),A.apply(this,arguments)}catch(oe){k&&k(oe)}finally{es(K,!1),z&&Td()}}}var da={awaits:0,echoes:0,id:0},qx=0,Dd=[],Od=0,Cd=0,Kx=0;function uu(A,k,L,z){var K=pn,oe=Object.create(K);oe.parent=K,oe.ref=0,oe.global=!1,oe.id=++Kx,Jo.env,oe.env=xt?{Promise:Qt,PromiseProp:{value:Qt,configurable:!0,writable:!0},all:Qt.all,race:Qt.race,allSettled:Qt.allSettled,any:Qt.any,resolve:Qt.resolve,reject:Qt.reject}:{},k&&c(oe,k),++K.ref,oe.finalize=function(){--this.parent.ref||this.parent.finalize()};var ye=wl(oe,A,L,z);return oe.ref===0&&oe.finalize(),ye}function Id(){return da.id||(da.id=++qx),++da.awaits,da.echoes+=Xe,da.id}function cu(){return da.awaits?(--da.awaits===0&&(da.id=0),da.echoes=da.awaits*Xe,!0):!1}(""+an).indexOf("[native code]")===-1&&(Id=cu=Be);function Md(A){return da.echoes&&A&&A.constructor===st?(Id(),A.then(function(k){return cu(),k},function(k){return cu(),Oi(k)})):A}function Zg(A){++Cd,(!da.echoes||--da.echoes===0)&&(da.echoes=da.awaits=da.id=0),Dd.push(pn),es(A,!0)}function Qg(){var A=Dd[Dd.length-1];Dd.pop(),es(A,!1)}function es(A,k){var L=pn;if((k?da.echoes&&(!Od++||A!==pn):Od&&(!--Od||A!==pn))&&queueMicrotask(k?Zg.bind(null,A):Qg),A!==pn&&(pn=A,L===Jo&&(Jo.env=z_()),xt)){var z=Jo.env.Promise,K=A.env;(L.global||A.global)&&(Object.defineProperty(o,"Promise",K.PromiseProp),z.all=K.all,z.race=K.race,z.resolve=K.resolve,z.reject=K.reject,K.allSettled&&(z.allSettled=K.allSettled),K.any&&(z.any=K.any))}}function z_(){var A=o.Promise;return xt?{Promise:A,PromiseProp:Object.getOwnPropertyDescriptor(o,"Promise"),all:A.all,race:A.race,allSettled:A.allSettled,any:A.any,resolve:A.resolve,reject:A.reject}:{}}function wl(A,k,L,z,K){var oe=pn;try{return es(A,!0),k(L,z,K)}finally{es(oe,!1)}}function du(A,k,L,z){return typeof A!="function"?A:function(){var K=pn;L&&Id(),es(k,!0);try{return A.apply(this,arguments)}finally{es(K,!1),z&&queueMicrotask(cu)}}}function Yf(A){Promise===st&&da.echoes===0?Od===0?A():enqueueNativeMicroTask(A):setTimeout(A,0)}var Oi=Qt.reject;function qf(A,k,L,z){if(!A.idbdb||!A._state.openComplete&&!pn.letThrough&&!A._vip){if(A._state.openComplete)return Oi(new Ie.DatabaseClosed(A._state.dbOpenError));if(!A._state.isBeingOpened){if(!A._state.autoOpen)return Oi(new Ie.DatabaseClosed);A.open().catch(Be)}return A._state.dbReadyPromise.then(function(){return qf(A,k,L,z)})}else{var K=A._createTransaction(k,L,A._dbSchema);try{K.create(),A._state.PR1398_maxLoop=3}catch(oe){return oe.name===Ve.InvalidState&&A.isOpen()&&--A._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),A.close({disableAutoOpen:!1}),A.open().then(function(){return qf(A,k,L,z)})):Oi(oe)}return K._promise(k,function(oe,ye){return uu(function(){return pn.trans=K,z(oe,ye,K)})}).then(function(oe){if(k==="readwrite")try{K.idbtrans.commit()}catch{}return k==="readonly"?oe:K._completion.then(function(){return oe})})}}var Kp="4.0.10",ys="",Xg=-1/0,bs="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Rd="String expected.",Ks=[],fo="__dbnames",Kf="readonly",Gf="readwrite";function pc(A,k){return A?k?function(){return A.apply(this,arguments)&&k.apply(this,arguments)}:A:k}var Gp={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function $d(A){return typeof A=="string"&&!/\./.test(A)?function(k){return k[A]===void 0&&A in k&&(k=_e(k),delete k[A]),k}:function(k){return k}}function Zp(){throw Ie.Type()}function ir(A,k){try{var L=j_(A),z=j_(k);if(L!==z)return L==="Array"?1:z==="Array"?-1:L==="binary"?1:z==="binary"?-1:L==="string"?1:z==="string"?-1:L==="Date"?1:z!=="Date"?NaN:-1;switch(L){case"number":case"Date":case"string":return A>k?1:A<k?-1:0;case"binary":return Zx(Qp(A),Qp(k));case"Array":return Gx(A,k)}}catch{}return NaN}function Gx(A,k){for(var L=A.length,z=k.length,K=L<z?L:z,oe=0;oe<K;++oe){var ye=ir(A[oe],k[oe]);if(ye!==0)return ye}return L===z?0:L<z?-1:1}function Zx(A,k){for(var L=A.length,z=k.length,K=L<z?L:z,oe=0;oe<K;++oe)if(A[oe]!==k[oe])return A[oe]<k[oe]?-1:1;return L===z?0:L<z?-1:1}function j_(A){var k=typeof A;if(k!=="object")return k;if(ArrayBuffer.isView(A))return"binary";var L=J(A);return L==="ArrayBuffer"?"binary":L}function Qp(A){return A instanceof Uint8Array?A:ArrayBuffer.isView(A)?new Uint8Array(A.buffer,A.byteOffset,A.byteLength):new Uint8Array(A)}var H_=function(){function A(){}return A.prototype._trans=function(k,L,z){var K=this._tx||pn.trans,oe=this.name,ye=sr&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(k==="readonly"?"read":"write"," ").concat(this.name));function xe(Ke,He,ht){if(!ht.schema[oe])throw new Ie.NotFound("Table "+oe+" not part of transaction");return L(ht.idbtrans,ht)}var Se=Ed();try{var Le=K&&K.db._novip===this.db._novip?K===pn.trans?K._promise(k,xe,z):uu(function(){return K._promise(k,xe,z)},{trans:K,transless:pn.transless||pn}):qf(this.db,k,[this.name],xe);return ye&&(Le._consoleTask=ye,Le=Le.catch(function(Ke){return console.trace(Ke),Oi(Ke)})),Le}finally{Se&&Td()}},A.prototype.get=function(k,L){var z=this;return k&&k.constructor===Object?this.where(k).first(L):k==null?Oi(new Ie.Type("Invalid argument to Table.get()")):this._trans("readonly",function(K){return z.core.get({trans:K,key:k}).then(function(oe){return z.hook.reading.fire(oe)})}).then(L)},A.prototype.where=function(k){if(typeof k=="string")return new this.db.WhereClause(this,k);if(l(k))return new this.db.WhereClause(this,"[".concat(k.join("+"),"]"));var L=s(k);if(L.length===1)return this.where(L[0]).equals(k[L[0]]);var z=this.schema.indexes.concat(this.schema.primKey).filter(function(Ke){if(Ke.compound&&L.every(function(ht){return Ke.keyPath.indexOf(ht)>=0})){for(var He=0;He<L.length;++He)if(L.indexOf(Ke.keyPath[He])===-1)return!1;return!0}return!1}).sort(function(Ke,He){return Ke.keyPath.length-He.keyPath.length})[0];if(z&&this.db._maxKey!==ys){var K=z.keyPath.slice(0,L.length);return this.where(K).equals(K.map(function(Ke){return k[Ke]}))}!z&&sr&&console.warn("The query ".concat(JSON.stringify(k)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(L.join("+"),"]"));var oe=this.schema.idxByName;function ye(Ke,He){return ir(Ke,He)===0}var xe=L.reduce(function(Ke,He){var ht=Ke[0],Ot=Ke[1],qe=oe[He],Je=k[He];return[ht||qe,ht||!qe?pc(Ot,qe&&qe.multi?function(ct){var pt=P(ct,He);return l(pt)&&pt.some(function(ft){return ye(Je,ft)})}:function(ct){return ye(Je,P(ct,He))}):Ot]},[null,null]),Se=xe[0],Le=xe[1];return Se?this.where(Se.name).equals(k[Se.keyPath]).filter(Le):z?this.filter(Le):this.where(L).equals("")},A.prototype.filter=function(k){return this.toCollection().and(k)},A.prototype.count=function(k){return this.toCollection().count(k)},A.prototype.offset=function(k){return this.toCollection().offset(k)},A.prototype.limit=function(k){return this.toCollection().limit(k)},A.prototype.each=function(k){return this.toCollection().each(k)},A.prototype.toArray=function(k){return this.toCollection().toArray(k)},A.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},A.prototype.orderBy=function(k){return new this.db.Collection(new this.db.WhereClause(this,l(k)?"[".concat(k.join("+"),"]"):k))},A.prototype.reverse=function(){return this.toCollection().reverse()},A.prototype.mapToClass=function(k){var L=this,z=L.db,K=L.name;this.schema.mappedClass=k,k.prototype instanceof Zp&&(k=function(Se){r(Le,Se);function Le(){return Se!==null&&Se.apply(this,arguments)||this}return Object.defineProperty(Le.prototype,"db",{get:function(){return z},enumerable:!1,configurable:!0}),Le.prototype.table=function(){return K},Le}(k));for(var oe=new Set,ye=k.prototype;ye;ye=f(ye))Object.getOwnPropertyNames(ye).forEach(function(Se){return oe.add(Se)});var xe=function(Se){if(!Se)return Se;var Le=Object.create(k.prototype);for(var Ke in Se)if(!oe.has(Ke))try{Le[Ke]=Se[Ke]}catch{}return Le};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=xe,this.hook("reading",xe),k},A.prototype.defineClass=function(){function k(L){c(this,L)}return this.mapToClass(k)},A.prototype.add=function(k,L){var z=this,K=this.schema.primKey,oe=K.auto,ye=K.keyPath,xe=k;return ye&&oe&&(xe=$d(ye)(k)),this._trans("readwrite",function(Se){return z.core.mutate({trans:Se,type:"add",keys:L!=null?[L]:null,values:[xe]})}).then(function(Se){return Se.numFailures?Qt.reject(Se.failures[0]):Se.lastResult}).then(function(Se){if(ye)try{M(k,ye,Se)}catch{}return Se})},A.prototype.update=function(k,L){if(typeof k=="object"&&!l(k)){var z=P(k,this.schema.primKey.keyPath);return z===void 0?Oi(new Ie.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(z).modify(L)}else return this.where(":id").equals(k).modify(L)},A.prototype.put=function(k,L){var z=this,K=this.schema.primKey,oe=K.auto,ye=K.keyPath,xe=k;return ye&&oe&&(xe=$d(ye)(k)),this._trans("readwrite",function(Se){return z.core.mutate({trans:Se,type:"put",values:[xe],keys:L!=null?[L]:null})}).then(function(Se){return Se.numFailures?Qt.reject(Se.failures[0]):Se.lastResult}).then(function(Se){if(ye)try{M(k,ye,Se)}catch{}return Se})},A.prototype.delete=function(k){var L=this;return this._trans("readwrite",function(z){return L.core.mutate({trans:z,type:"delete",keys:[k]})}).then(function(z){return z.numFailures?Qt.reject(z.failures[0]):void 0})},A.prototype.clear=function(){var k=this;return this._trans("readwrite",function(L){return k.core.mutate({trans:L,type:"deleteRange",range:Gp})}).then(function(L){return L.numFailures?Qt.reject(L.failures[0]):void 0})},A.prototype.bulkGet=function(k){var L=this;return this._trans("readonly",function(z){return L.core.getMany({keys:k,trans:z}).then(function(K){return K.map(function(oe){return L.hook.reading.fire(oe)})})})},A.prototype.bulkAdd=function(k,L,z){var K=this,oe=Array.isArray(L)?L:void 0;z=z||(oe?void 0:L);var ye=z?z.allKeys:void 0;return this._trans("readwrite",function(xe){var Se=K.schema.primKey,Le=Se.auto,Ke=Se.keyPath;if(Ke&&oe)throw new Ie.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(oe&&oe.length!==k.length)throw new Ie.InvalidArgument("Arguments objects and keys must have the same length");var He=k.length,ht=Ke&&Le?k.map($d(Ke)):k;return K.core.mutate({trans:xe,type:"add",keys:oe,values:ht,wantResults:ye}).then(function(Ot){var qe=Ot.numFailures,Je=Ot.results,ct=Ot.lastResult,pt=Ot.failures,ft=ye?Je:ct;if(qe===0)return ft;throw new Me("".concat(K.name,".bulkAdd(): ").concat(qe," of ").concat(He," operations failed"),pt)})})},A.prototype.bulkPut=function(k,L,z){var K=this,oe=Array.isArray(L)?L:void 0;z=z||(oe?void 0:L);var ye=z?z.allKeys:void 0;return this._trans("readwrite",function(xe){var Se=K.schema.primKey,Le=Se.auto,Ke=Se.keyPath;if(Ke&&oe)throw new Ie.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(oe&&oe.length!==k.length)throw new Ie.InvalidArgument("Arguments objects and keys must have the same length");var He=k.length,ht=Ke&&Le?k.map($d(Ke)):k;return K.core.mutate({trans:xe,type:"put",keys:oe,values:ht,wantResults:ye}).then(function(Ot){var qe=Ot.numFailures,Je=Ot.results,ct=Ot.lastResult,pt=Ot.failures,ft=ye?Je:ct;if(qe===0)return ft;throw new Me("".concat(K.name,".bulkPut(): ").concat(qe," of ").concat(He," operations failed"),pt)})})},A.prototype.bulkUpdate=function(k){var L=this,z=this.core,K=k.map(function(xe){return xe.key}),oe=k.map(function(xe){return xe.changes}),ye=[];return this._trans("readwrite",function(xe){return z.getMany({trans:xe,keys:K,cache:"clone"}).then(function(Se){var Le=[],Ke=[];k.forEach(function(ht,Ot){var qe=ht.key,Je=ht.changes,ct=Se[Ot];if(ct){for(var pt=0,ft=Object.keys(Je);pt<ft.length;pt++){var mt=ft[pt],$=Je[mt];if(mt===L.schema.primKey.keyPath){if(ir($,qe)!==0)throw new Ie.Constraint("Cannot update primary key in bulkUpdate()")}else M(ct,mt,$)}ye.push(Ot),Le.push(qe),Ke.push(ct)}});var He=Le.length;return z.mutate({trans:xe,type:"put",keys:Le,values:Ke,updates:{keys:K,changeSpecs:oe}}).then(function(ht){var Ot=ht.numFailures,qe=ht.failures;if(Ot===0)return He;for(var Je=0,ct=Object.keys(qe);Je<ct.length;Je++){var pt=ct[Je],ft=ye[Number(pt)];if(ft!=null){var mt=qe[pt];delete qe[pt],qe[ft]=mt}}throw new Me("".concat(L.name,".bulkUpdate(): ").concat(Ot," of ").concat(He," operations failed"),qe)})})})},A.prototype.bulkDelete=function(k){var L=this,z=k.length;return this._trans("readwrite",function(K){return L.core.mutate({trans:K,type:"delete",keys:k})}).then(function(K){var oe=K.numFailures,ye=K.lastResult,xe=K.failures;if(oe===0)return ye;throw new Me("".concat(L.name,".bulkDelete(): ").concat(oe," of ").concat(z," operations failed"),xe)})},A}();function Zf(A){var k={},L=function(xe,Se){if(Se){for(var Le=arguments.length,Ke=new Array(Le-1);--Le;)Ke[Le-1]=arguments[Le];return k[xe].subscribe.apply(null,Ke),A}else if(typeof xe=="string")return k[xe]};L.addEventType=oe;for(var z=1,K=arguments.length;z<K;++z)oe(arguments[z]);return L;function oe(xe,Se,Le){if(typeof xe=="object")return ye(xe);Se||(Se=Er),Le||(Le=Be);var Ke={subscribers:[],fire:Le,subscribe:function(He){Ke.subscribers.indexOf(He)===-1&&(Ke.subscribers.push(He),Ke.fire=Se(Ke.fire,He))},unsubscribe:function(He){Ke.subscribers=Ke.subscribers.filter(function(ht){return ht!==He}),Ke.fire=Ke.subscribers.reduce(Se,Le)}};return k[xe]=L[xe]=Ke,Ke}function ye(xe){s(xe).forEach(function(Se){var Le=xe[Se];if(l(Le))oe(Se,xe[Se][0],xe[Se][1]);else if(Le==="asap")var Ke=oe(Se,gt,function(){for(var ht=arguments.length,Ot=new Array(ht);ht--;)Ot[ht]=arguments[ht];Ke.subscribers.forEach(function(qe){O(function(){qe.apply(null,Ot)})})});else throw new Ie.InvalidArgument("Invalid event config")})}}function Qf(A,k){return b(k).from({prototype:A}),k}function Qx(A){return Qf(H_.prototype,function(L,z,K){this.db=A,this._tx=K,this.name=L,this.schema=z,this.hook=A._allTables[L]?A._allTables[L].hook:Zf(null,{creating:[yt,Be],reading:[Bt,gt],updating:[rr,Be],deleting:[hn,Be]})})}function Gs(A,k){return!(A.filter||A.algorithm||A.or)&&(k?A.justLimit:!A.replayFilter)}function Jg(A,k){A.filter=pc(A.filter,k)}function ev(A,k,L){var z=A.replayFilter;A.replayFilter=z?function(){return pc(z(),k())}:k,A.justLimit=L&&!z}function Xx(A,k){A.isMatch=pc(A.isMatch,k)}function Xp(A,k){if(A.isPrimKey)return k.primaryKey;var L=k.getIndexByKeyPath(A.index);if(!L)throw new Ie.Schema("KeyPath "+A.index+" on object store "+k.name+" is not indexed");return L}function Y_(A,k,L){var z=Xp(A,k.schema);return k.openCursor({trans:L,values:!A.keysOnly,reverse:A.dir==="prev",unique:!!A.unique,query:{index:z,range:A.range}})}function kn(A,k,L,z){var K=A.replayFilter?pc(A.filter,A.replayFilter()):A.filter;if(A.or){var oe={},ye=function(xe,Se,Le){if(!K||K(Se,Le,function(ht){return Se.stop(ht)},function(ht){return Se.fail(ht)})){var Ke=Se.primaryKey,He=""+Ke;He==="[object ArrayBuffer]"&&(He=""+new Uint8Array(Ke)),p(oe,He)||(oe[He]=!0,k(xe,Se,Le))}};return Promise.all([A.or._iterate(ye,L),En(Y_(A,z,L),A.algorithm,ye,!A.keysOnly&&A.valueMapper)])}else return En(Y_(A,z,L),pc(A.algorithm,K),k,!A.keysOnly&&A.valueMapper)}function En(A,k,L,z){var K=z?function(ye,xe,Se){return L(z(ye),xe,Se)}:L,oe=ii(K);return A.then(function(ye){if(ye)return ye.start(function(){var xe=function(){return ye.continue()};(!k||k(ye,function(Se){return xe=Se},function(Se){ye.stop(Se),xe=Be},function(Se){ye.fail(Se),xe=Be}))&&oe(ye.value,ye,function(Se){return xe=Se}),xe()})})}var Jx=Symbol(),Xf=function(){function A(k){Object.assign(this,k)}return A.prototype.execute=function(k){var L;if(this.add!==void 0){var z=this.add;if(l(z))return a(a([],l(k)?k:[],!0),z).sort();if(typeof z=="number")return(Number(k)||0)+z;if(typeof z=="bigint")try{return BigInt(k)+z}catch{return BigInt(0)+z}throw new TypeError("Invalid term ".concat(z))}if(this.remove!==void 0){var K=this.remove;if(l(K))return l(k)?k.filter(function(ye){return!K.includes(ye)}).sort():[];if(typeof K=="number")return Number(k)-K;if(typeof K=="bigint")try{return BigInt(k)-K}catch{return BigInt(0)-K}throw new TypeError("Invalid subtrahend ".concat(K))}var oe=(L=this.replacePrefix)===null||L===void 0?void 0:L[0];return oe&&typeof k=="string"&&k.startsWith(oe)?this.replacePrefix[1]+k.substring(oe.length):k},A}(),eS=function(){function A(){}return A.prototype._read=function(k,L){var z=this._ctx;return z.error?z.table._trans(null,Oi.bind(null,z.error)):z.table._trans("readonly",k).then(L)},A.prototype._write=function(k){var L=this._ctx;return L.error?L.table._trans(null,Oi.bind(null,L.error)):L.table._trans("readwrite",k,"locked")},A.prototype._addAlgorithm=function(k){var L=this._ctx;L.algorithm=pc(L.algorithm,k)},A.prototype._iterate=function(k,L){return kn(this._ctx,k,L,this._ctx.table.core)},A.prototype.clone=function(k){var L=Object.create(this.constructor.prototype),z=Object.create(this._ctx);return k&&c(z,k),L._ctx=z,L},A.prototype.raw=function(){return this._ctx.valueMapper=null,this},A.prototype.each=function(k){var L=this._ctx;return this._read(function(z){return kn(L,k,z,L.table.core)})},A.prototype.count=function(k){var L=this;return this._read(function(z){var K=L._ctx,oe=K.table.core;if(Gs(K,!0))return oe.count({trans:z,query:{index:Xp(K,oe.schema),range:K.range}}).then(function(xe){return Math.min(xe,K.limit)});var ye=0;return kn(K,function(){return++ye,!1},z,oe).then(function(){return ye})}).then(k)},A.prototype.sortBy=function(k,L){var z=k.split(".").reverse(),K=z[0],oe=z.length-1;function ye(Le,Ke){return Ke?ye(Le[z[Ke]],Ke-1):Le[K]}var xe=this._ctx.dir==="next"?1:-1;function Se(Le,Ke){var He=ye(Le,oe),ht=ye(Ke,oe);return ir(He,ht)*xe}return this.toArray(function(Le){return Le.sort(Se)}).then(L)},A.prototype.toArray=function(k){var L=this;return this._read(function(z){var K=L._ctx;if(K.dir==="next"&&Gs(K,!0)&&K.limit>0){var oe=K.valueMapper,ye=Xp(K,K.table.core.schema);return K.table.core.query({trans:z,limit:K.limit,values:!0,query:{index:ye,range:K.range}}).then(function(Se){var Le=Se.result;return oe?Le.map(oe):Le})}else{var xe=[];return kn(K,function(Se){return xe.push(Se)},z,K.table.core).then(function(){return xe})}},k)},A.prototype.offset=function(k){var L=this._ctx;return k<=0?this:(L.offset+=k,Gs(L)?ev(L,function(){var z=k;return function(K,oe){return z===0?!0:z===1?(--z,!1):(oe(function(){K.advance(z),z=0}),!1)}}):ev(L,function(){var z=k;return function(){return--z<0}}),this)},A.prototype.limit=function(k){return this._ctx.limit=Math.min(this._ctx.limit,k),ev(this._ctx,function(){var L=k;return function(z,K,oe){return--L<=0&&K(oe),L>=0}},!0),this},A.prototype.until=function(k,L){return Jg(this._ctx,function(z,K,oe){return k(z.value)?(K(oe),L):!0}),this},A.prototype.first=function(k){return this.limit(1).toArray(function(L){return L[0]}).then(k)},A.prototype.last=function(k){return this.reverse().first(k)},A.prototype.filter=function(k){return Jg(this._ctx,function(L){return k(L.value)}),Xx(this._ctx,k),this},A.prototype.and=function(k){return this.filter(k)},A.prototype.or=function(k){return new this.db.WhereClause(this._ctx.table,k,this)},A.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},A.prototype.desc=function(){return this.reverse()},A.prototype.eachKey=function(k){var L=this._ctx;return L.keysOnly=!L.isMatch,this.each(function(z,K){k(K.key,K)})},A.prototype.eachUniqueKey=function(k){return this._ctx.unique="unique",this.eachKey(k)},A.prototype.eachPrimaryKey=function(k){var L=this._ctx;return L.keysOnly=!L.isMatch,this.each(function(z,K){k(K.primaryKey,K)})},A.prototype.keys=function(k){var L=this._ctx;L.keysOnly=!L.isMatch;var z=[];return this.each(function(K,oe){z.push(oe.key)}).then(function(){return z}).then(k)},A.prototype.primaryKeys=function(k){var L=this._ctx;if(L.dir==="next"&&Gs(L,!0)&&L.limit>0)return this._read(function(K){var oe=Xp(L,L.table.core.schema);return L.table.core.query({trans:K,values:!1,limit:L.limit,query:{index:oe,range:L.range}})}).then(function(K){var oe=K.result;return oe}).then(k);L.keysOnly=!L.isMatch;var z=[];return this.each(function(K,oe){z.push(oe.primaryKey)}).then(function(){return z}).then(k)},A.prototype.uniqueKeys=function(k){return this._ctx.unique="unique",this.keys(k)},A.prototype.firstKey=function(k){return this.limit(1).keys(function(L){return L[0]}).then(k)},A.prototype.lastKey=function(k){return this.reverse().firstKey(k)},A.prototype.distinct=function(){var k=this._ctx,L=k.index&&k.table.schema.idxByName[k.index];if(!L||!L.multi)return this;var z={};return Jg(this._ctx,function(K){var oe=K.primaryKey.toString(),ye=p(z,oe);return z[oe]=!0,!ye}),this},A.prototype.modify=function(k){var L=this,z=this._ctx;return this._write(function(K){var oe;if(typeof k=="function")oe=k;else{var ye=s(k),xe=ye.length;oe=function(ft){for(var mt=!1,$=0;$<xe;++$){var ut=ye[$],$t=k[ut],It=P(ft,ut);$t instanceof Xf?(M(ft,ut,$t.execute(It)),mt=!0):It!==$t&&(M(ft,ut,$t),mt=!0)}return mt}}var Se=z.table.core,Le=Se.schema.primaryKey,Ke=Le.outbound,He=Le.extractKey,ht=200,Ot=L.db._options.modifyChunkSize;Ot&&(typeof Ot=="object"?ht=Ot[Se.name]||Ot["*"]||200:ht=Ot);var qe=[],Je=0,ct=[],pt=function(ft,mt){var $=mt.failures,ut=mt.numFailures;Je+=ft-ut;for(var $t=0,It=s($);$t<It.length;$t++){var rt=It[$t];qe.push($[rt])}};return L.clone().primaryKeys().then(function(ft){var mt=Gs(z)&&z.limit===1/0&&(typeof k!="function"||k===tv)&&{index:z.index,range:z.range},$=function(ut){var $t=Math.min(ht,ft.length-ut);return Se.getMany({trans:K,keys:ft.slice(ut,ut+$t),cache:"immutable"}).then(function(It){for(var rt=[],xn=[],Gn=Ke?[]:null,nn=[],Sn=0;Sn<$t;++Sn){var In=It[Sn],lr={value:_e(In),primKey:ft[ut+Sn]};oe.call(lr,lr.value,lr)!==!1&&(lr.value==null?nn.push(ft[ut+Sn]):!Ke&&ir(He(In),He(lr.value))!==0?(nn.push(ft[ut+Sn]),rt.push(lr.value)):(xn.push(lr.value),Ke&&Gn.push(ft[ut+Sn])))}return Promise.resolve(rt.length>0&&Se.mutate({trans:K,type:"add",values:rt}).then(function(yn){for(var yi in yn.failures)nn.splice(parseInt(yi),1);pt(rt.length,yn)})).then(function(){return(xn.length>0||mt&&typeof k=="object")&&Se.mutate({trans:K,type:"put",keys:Gn,values:xn,criteria:mt,changeSpec:typeof k!="function"&&k,isAdditionalChunk:ut>0}).then(function(yn){return pt(xn.length,yn)})}).then(function(){return(nn.length>0||mt&&k===tv)&&Se.mutate({trans:K,type:"delete",keys:nn,criteria:mt,isAdditionalChunk:ut>0}).then(function(yn){return pt(nn.length,yn)})}).then(function(){return ft.length>ut+$t&&$(ut+ht)})})};return $(0).then(function(){if(qe.length>0)throw new Ne("Error modifying one or more objects",qe,Je,ct);return ft.length})})})},A.prototype.delete=function(){var k=this._ctx,L=k.range;return Gs(k)&&(k.isPrimKey||L.type===3)?this._write(function(z){var K=k.table.core.schema.primaryKey,oe=L;return k.table.core.count({trans:z,query:{index:K,range:oe}}).then(function(ye){return k.table.core.mutate({trans:z,type:"deleteRange",range:oe}).then(function(xe){var Se=xe.failures;xe.lastResult,xe.results;var Le=xe.numFailures;if(Le)throw new Ne("Could not delete some values",Object.keys(Se).map(function(Ke){return Se[Ke]}),ye-Le);return ye-Le})})}):this.modify(tv)},A}(),tv=function(A,k){return k.value=null};function tS(A){return Qf(eS.prototype,function(L,z){this.db=A;var K=Gp,oe=null;if(z)try{K=z()}catch(Le){oe=Le}var ye=L._ctx,xe=ye.table,Se=xe.hook.reading.fire;this._ctx={table:xe,index:ye.index,isPrimKey:!ye.index||xe.schema.primKey.keyPath&&ye.index===xe.schema.primKey.name,range:K,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:oe,or:ye.or,valueMapper:Se!==gt?Se:null}})}function nS(A,k){return A<k?-1:A===k?0:1}function nv(A,k){return A>k?-1:A===k?0:1}function xo(A,k,L){var z=A instanceof em?new A.Collection(A):A;return z._ctx.error=L?new L(k):new TypeError(k),z}function tr(A){return new A.Collection(A,function(){return Jp("")}).limit(0)}function Jf(A){return A==="next"?function(k){return k.toUpperCase()}:function(k){return k.toLowerCase()}}function So(A){return A==="next"?function(k){return k.toLowerCase()}:function(k){return k.toUpperCase()}}function rv(A,k,L,z,K,oe){for(var ye=Math.min(A.length,z.length),xe=-1,Se=0;Se<ye;++Se){var Le=k[Se];if(Le!==z[Se])return K(A[Se],L[Se])<0?A.substr(0,Se)+L[Se]+L.substr(Se+1):K(A[Se],z[Se])<0?A.substr(0,Se)+z[Se]+L.substr(Se+1):xe>=0?A.substr(0,xe)+k[xe]+L.substr(xe+1):null;K(A[Se],Le)<0&&(xe=Se)}return ye<z.length&&oe==="next"?A+L.substr(A.length):ye<A.length&&oe==="prev"?A.substr(0,L.length):xe<0?null:A.substr(0,xe)+z[xe]+L.substr(xe+1)}function fu(A,k,L,z){var K,oe,ye,xe,Se,Le,Ke,He=L.length;if(!L.every(function(Je){return typeof Je=="string"}))return xo(A,Rd);function ht(Je){K=Jf(Je),oe=So(Je),ye=Je==="next"?nS:nv;var ct=L.map(function(pt){return{lower:oe(pt),upper:K(pt)}}).sort(function(pt,ft){return ye(pt.lower,ft.lower)});xe=ct.map(function(pt){return pt.upper}),Se=ct.map(function(pt){return pt.lower}),Le=Je,Ke=Je==="next"?"":z}ht("next");var Ot=new A.Collection(A,function(){return Tr(xe[0],Se[He-1]+z)});Ot._ondirectionchange=function(Je){ht(Je)};var qe=0;return Ot._addAlgorithm(function(Je,ct,pt){var ft=Je.key;if(typeof ft!="string")return!1;var mt=oe(ft);if(k(mt,Se,qe))return!0;for(var $=null,ut=qe;ut<He;++ut){var $t=rv(ft,mt,xe[ut],Se[ut],ye,Le);$t===null&&$===null?qe=ut+1:($===null||ye($,$t)>0)&&($=$t)}return ct($!==null?function(){Je.continue($+Ke)}:pt),!1}),Ot}function Tr(A,k,L,z){return{type:2,lower:A,upper:k,lowerOpen:L,upperOpen:z}}function Jp(A){return{type:1,lower:A,upper:A}}var em=function(){function A(){}return Object.defineProperty(A.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),A.prototype.between=function(k,L,z,K){z=z!==!1,K=K===!0;try{return this._cmp(k,L)>0||this._cmp(k,L)===0&&(z||K)&&!(z&&K)?tr(this):new this.Collection(this,function(){return Tr(k,L,!z,!K)})}catch{return xo(this,bs)}},A.prototype.equals=function(k){return k==null?xo(this,bs):new this.Collection(this,function(){return Jp(k)})},A.prototype.above=function(k){return k==null?xo(this,bs):new this.Collection(this,function(){return Tr(k,void 0,!0)})},A.prototype.aboveOrEqual=function(k){return k==null?xo(this,bs):new this.Collection(this,function(){return Tr(k,void 0,!1)})},A.prototype.below=function(k){return k==null?xo(this,bs):new this.Collection(this,function(){return Tr(void 0,k,!1,!0)})},A.prototype.belowOrEqual=function(k){return k==null?xo(this,bs):new this.Collection(this,function(){return Tr(void 0,k)})},A.prototype.startsWith=function(k){return typeof k!="string"?xo(this,Rd):this.between(k,k+ys,!0,!0)},A.prototype.startsWithIgnoreCase=function(k){return k===""?this.startsWith(k):fu(this,function(L,z){return L.indexOf(z[0])===0},[k],ys)},A.prototype.equalsIgnoreCase=function(k){return fu(this,function(L,z){return L===z[0]},[k],"")},A.prototype.anyOfIgnoreCase=function(){var k=G.apply(de,arguments);return k.length===0?tr(this):fu(this,function(L,z){return z.indexOf(L)!==-1},k,"")},A.prototype.startsWithAnyOfIgnoreCase=function(){var k=G.apply(de,arguments);return k.length===0?tr(this):fu(this,function(L,z){return z.some(function(K){return L.indexOf(K)===0})},k,ys)},A.prototype.anyOf=function(){var k=this,L=G.apply(de,arguments),z=this._cmp;try{L.sort(z)}catch{return xo(this,bs)}if(L.length===0)return tr(this);var K=new this.Collection(this,function(){return Tr(L[0],L[L.length-1])});K._ondirectionchange=function(ye){z=ye==="next"?k._ascending:k._descending,L.sort(z)};var oe=0;return K._addAlgorithm(function(ye,xe,Se){for(var Le=ye.key;z(Le,L[oe])>0;)if(++oe,oe===L.length)return xe(Se),!1;return z(Le,L[oe])===0?!0:(xe(function(){ye.continue(L[oe])}),!1)}),K},A.prototype.notEqual=function(k){return this.inAnyRange([[Xg,k],[k,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},A.prototype.noneOf=function(){var k=G.apply(de,arguments);if(k.length===0)return new this.Collection(this);try{k.sort(this._ascending)}catch{return xo(this,bs)}var L=k.reduce(function(z,K){return z?z.concat([[z[z.length-1][1],K]]):[[Xg,K]]},null);return L.push([k[k.length-1],this.db._maxKey]),this.inAnyRange(L,{includeLowers:!1,includeUppers:!1})},A.prototype.inAnyRange=function(k,L){var z=this,K=this._cmp,oe=this._ascending,ye=this._descending,xe=this._min,Se=this._max;if(k.length===0)return tr(this);if(!k.every(function(ut){return ut[0]!==void 0&&ut[1]!==void 0&&oe(ut[0],ut[1])<=0}))return xo(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Ie.InvalidArgument);var Le=!L||L.includeLowers!==!1,Ke=L&&L.includeUppers===!0;function He(ut,$t){for(var It=0,rt=ut.length;It<rt;++It){var xn=ut[It];if(K($t[0],xn[1])<0&&K($t[1],xn[0])>0){xn[0]=xe(xn[0],$t[0]),xn[1]=Se(xn[1],$t[1]);break}}return It===rt&&ut.push($t),ut}var ht=oe;function Ot(ut,$t){return ht(ut[0],$t[0])}var qe;try{qe=k.reduce(He,[]),qe.sort(Ot)}catch{return xo(this,bs)}var Je=0,ct=Ke?function(ut){return oe(ut,qe[Je][1])>0}:function(ut){return oe(ut,qe[Je][1])>=0},pt=Le?function(ut){return ye(ut,qe[Je][0])>0}:function(ut){return ye(ut,qe[Je][0])>=0};function ft(ut){return!ct(ut)&&!pt(ut)}var mt=ct,$=new this.Collection(this,function(){return Tr(qe[0][0],qe[qe.length-1][1],!Le,!Ke)});return $._ondirectionchange=function(ut){ut==="next"?(mt=ct,ht=oe):(mt=pt,ht=ye),qe.sort(Ot)},$._addAlgorithm(function(ut,$t,It){for(var rt=ut.key;mt(rt);)if(++Je,Je===qe.length)return $t(It),!1;return ft(rt)?!0:(z._cmp(rt,qe[Je][1])===0||z._cmp(rt,qe[Je][0])===0||$t(function(){ht===oe?ut.continue(qe[Je][0]):ut.continue(qe[Je][1])}),!1)}),$},A.prototype.startsWithAnyOf=function(){var k=G.apply(de,arguments);return k.every(function(L){return typeof L=="string"})?k.length===0?tr(this):this.inAnyRange(k.map(function(L){return[L,L+ys]})):xo(this,"startsWithAnyOf() only works with strings")},A}();function iv(A){return Qf(em.prototype,function(L,z,K){if(this.db=A,this._ctx={table:L,index:z===":id"?null:z,or:K},this._cmp=this._ascending=ir,this._descending=function(oe,ye){return ir(ye,oe)},this._max=function(oe,ye){return ir(oe,ye)>0?oe:ye},this._min=function(oe,ye){return ir(oe,ye)<0?oe:ye},this._IDBKeyRange=A._deps.IDBKeyRange,!this._IDBKeyRange)throw new Ie.MissingAPI})}function ts(A){return ii(function(k){return mc(k),A(k.target.error),!1})}function mc(A){A.stopPropagation&&A.stopPropagation(),A.preventDefault&&A.preventDefault()}var gc="storagemutated",Fr="x-storagemutated-1",hu=Zf(null,gc),li=function(){function A(){}return A.prototype._lock=function(){return D(!pn.global),++this._reculock,this._reculock===1&&!pn.global&&(pn.lockOwnerFor=this),this},A.prototype._unlock=function(){if(D(!pn.global),--this._reculock===0)for(pn.global||(pn.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var k=this._blockedFuncs.shift();try{wl(k[1],k[0])}catch{}}return this},A.prototype._locked=function(){return this._reculock&&pn.lockOwnerFor!==this},A.prototype.create=function(k){var L=this;if(!this.mode)return this;var z=this.db.idbdb,K=this.db._state.dbOpenError;if(D(!this.idbtrans),!k&&!z)switch(K&&K.name){case"DatabaseClosedError":throw new Ie.DatabaseClosed(K);case"MissingAPIError":throw new Ie.MissingAPI(K.message,K);default:throw new Ie.OpenFailed(K)}if(!this.active)throw new Ie.TransactionInactive;return D(this._completion._state===null),k=this.idbtrans=k||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):z.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})),k.onerror=ii(function(oe){mc(oe),L._reject(k.error)}),k.onabort=ii(function(oe){mc(oe),L.active&&L._reject(new Ie.Abort(k.error)),L.active=!1,L.on("abort").fire(oe)}),k.oncomplete=ii(function(){L.active=!1,L._resolve(),"mutatedParts"in k&&hu.storagemutated.fire(k.mutatedParts)}),this},A.prototype._promise=function(k,L,z){var K=this;if(k==="readwrite"&&this.mode!=="readwrite")return Oi(new Ie.ReadOnly("Transaction is readonly"));if(!this.active)return Oi(new Ie.TransactionInactive);if(this._locked())return new Qt(function(ye,xe){K._blockedFuncs.push([function(){K._promise(k,L,z).then(ye,xe)},pn])});if(z)return uu(function(){var ye=new Qt(function(xe,Se){K._lock();var Le=L(xe,Se,K);Le&&Le.then&&Le.then(xe,Se)});return ye.finally(function(){return K._unlock()}),ye._lib=!0,ye});var oe=new Qt(function(ye,xe){var Se=L(ye,xe,K);Se&&Se.then&&Se.then(ye,xe)});return oe._lib=!0,oe},A.prototype._root=function(){return this.parent?this.parent._root():this},A.prototype.waitFor=function(k){var L=this._root(),z=Qt.resolve(k);if(L._waitingFor)L._waitingFor=L._waitingFor.then(function(){return z});else{L._waitingFor=z,L._waitingQueue=[];var K=L.idbtrans.objectStore(L.storeNames[0]);(function ye(){for(++L._spinCount;L._waitingQueue.length;)L._waitingQueue.shift()();L._waitingFor&&(K.get(-1/0).onsuccess=ye)})()}var oe=L._waitingFor;return new Qt(function(ye,xe){z.then(function(Se){return L._waitingQueue.push(ii(ye.bind(null,Se)))},function(Se){return L._waitingQueue.push(ii(xe.bind(null,Se)))}).finally(function(){L._waitingFor===oe&&(L._waitingFor=null)})})},A.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Ie.Abort))},A.prototype.table=function(k){var L=this._memoizedTables||(this._memoizedTables={});if(p(L,k))return L[k];var z=this.schema[k];if(!z)throw new Ie.NotFound("Table "+k+" not part of transaction");var K=new this.db.Table(k,z,this);return K.core=this.db.core.table(k),L[k]=K,K},A}();function rS(A){return Qf(li.prototype,function(L,z,K,oe,ye){var xe=this;this.db=A,this.mode=L,this.storeNames=z,this.schema=K,this.chromeTransactionDurability=oe,this.idbtrans=null,this.on=Zf(this,"complete","error","abort"),this.parent=ye||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new Qt(function(Se,Le){xe._resolve=Se,xe._reject=Le}),this._completion.then(function(){xe.active=!1,xe.on.complete.fire()},function(Se){var Le=xe.active;return xe.active=!1,xe.on.error.fire(Se),xe.parent?xe.parent._reject(Se):Le&&xe.idbtrans&&xe.idbtrans.abort(),Oi(Se)})})}function eh(A,k,L,z,K,oe,ye){return{name:A,keyPath:k,unique:L,multi:z,auto:K,compound:oe,src:(L&&!ye?"&":"")+(z?"*":"")+(K?"++":"")+Ma(k)}}function Ma(A){return typeof A=="string"?A:A?"["+[].join.call(A,"+")+"]":""}function xl(A,k,L){return{name:A,primKey:k,indexes:L,mappedClass:null,idxByName:V(L,function(z){return[z.name,z]})}}function th(A){return A.length===1?A[0]:A}var Cn=function(A){try{return A.only([[]]),Cn=function(){return[[]]},[[]]}catch{return Cn=function(){return ys},ys}};function wa(A){return A==null?function(){}:typeof A=="string"?nh(A):function(k){return P(k,A)}}function nh(A){var k=A.split(".");return k.length===1?function(L){return L[A]}:function(L){return P(L,A)}}function q_(A){return[].slice.call(A)}var rh=0;function ih(A){return A==null?":id":typeof A=="string"?A:"[".concat(A.join("+"),"]")}function iS(A,k,L){function z(He,ht){var Ot=q_(He.objectStoreNames);return{schema:{name:He.name,tables:Ot.map(function(qe){return ht.objectStore(qe)}).map(function(qe){var Je=qe.keyPath,ct=qe.autoIncrement,pt=l(Je),ft=Je==null,mt={},$={name:qe.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:ft,compound:pt,keyPath:Je,autoIncrement:ct,unique:!0,extractKey:wa(Je)},indexes:q_(qe.indexNames).map(function(ut){return qe.index(ut)}).map(function(ut){var $t=ut.name,It=ut.unique,rt=ut.multiEntry,xn=ut.keyPath,Gn=l(xn),nn={name:$t,compound:Gn,keyPath:xn,unique:It,multiEntry:rt,extractKey:wa(xn)};return mt[ih(xn)]=nn,nn}),getIndexByKeyPath:function(ut){return mt[ih(ut)]}};return mt[":id"]=$.primaryKey,Je!=null&&(mt[ih(Je)]=$.primaryKey),$})},hasGetAll:Ot.length>0&&"getAll"in ht.objectStore(Ot[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}function K(He){if(He.type===3)return null;if(He.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var ht=He.lower,Ot=He.upper,qe=He.lowerOpen,Je=He.upperOpen,ct=ht===void 0?Ot===void 0?null:k.upperBound(Ot,!!Je):Ot===void 0?k.lowerBound(ht,!!qe):k.bound(ht,Ot,!!qe,!!Je);return ct}function oe(He){var ht=He.name;function Ot(ct){var pt=ct.trans,ft=ct.type,mt=ct.keys,$=ct.values,ut=ct.range;return new Promise(function($t,It){$t=ii($t);var rt=pt.objectStore(ht),xn=rt.keyPath==null,Gn=ft==="put"||ft==="add";if(!Gn&&ft!=="delete"&&ft!=="deleteRange")throw new Error("Invalid operation type: "+ft);var nn=(mt||$||{length:1}).length;if(mt&&$&&mt.length!==$.length)throw new Error("Given keys array must have same length as given values array.");if(nn===0)return $t({numFailures:0,failures:{},results:[],lastResult:void 0});var Sn,In=[],lr=[],yn=0,yi=function(Qs){++yn,mc(Qs)};if(ft==="deleteRange"){if(ut.type===4)return $t({numFailures:yn,failures:lr,results:[],lastResult:void 0});ut.type===3?In.push(Sn=rt.clear()):In.push(Sn=rt.delete(K(ut)))}else{var $a=Gn?xn?[$,mt]:[$,null]:[mt,null],Yr=$a[0],go=$a[1];if(Gn)for(var as=0;as<nn;++as)In.push(Sn=go&&go[as]!==void 0?rt[ft](Yr[as],go[as]):rt[ft](Yr[as])),Sn.onerror=yi;else for(var as=0;as<nn;++as)In.push(Sn=rt[ft](Yr[as])),Sn.onerror=yi}var yu=function(Qs){var ph=Qs.target.result;In.forEach(function(Vr,am){return Vr.error!=null&&(lr[am]=Vr.error)}),$t({numFailures:yn,failures:lr,results:ft==="delete"?mt:In.map(function(Vr){return Vr.result}),lastResult:ph})};Sn.onerror=function(Qs){yi(Qs),yu(Qs)},Sn.onsuccess=yu})}function qe(ct){var pt=ct.trans,ft=ct.values,mt=ct.query,$=ct.reverse,ut=ct.unique;return new Promise(function($t,It){$t=ii($t);var rt=mt.index,xn=mt.range,Gn=pt.objectStore(ht),nn=rt.isPrimaryKey?Gn:Gn.index(rt.name),Sn=$?ut?"prevunique":"prev":ut?"nextunique":"next",In=ft||!("openKeyCursor"in nn)?nn.openCursor(K(xn),Sn):nn.openKeyCursor(K(xn),Sn);In.onerror=ts(It),In.onsuccess=ii(function(lr){var yn=In.result;if(!yn){$t(null);return}yn.___id=++rh,yn.done=!1;var yi=yn.continue.bind(yn),$a=yn.continuePrimaryKey;$a&&($a=$a.bind(yn));var Yr=yn.advance.bind(yn),go=function(){throw new Error("Cursor not started")},as=function(){throw new Error("Cursor not stopped")};yn.trans=pt,yn.stop=yn.continue=yn.continuePrimaryKey=yn.advance=go,yn.fail=ii(It),yn.next=function(){var yu=this,Qs=1;return this.start(function(){return Qs--?yu.continue():yu.stop()}).then(function(){return yu})},yn.start=function(yu){var Qs=new Promise(function(Vr,am){Vr=ii(Vr),In.onerror=ts(am),yn.fail=am,yn.stop=function(yS){yn.stop=yn.continue=yn.continuePrimaryKey=yn.advance=as,Vr(yS)}}),ph=function(){if(In.result)try{yu()}catch(Vr){yn.fail(Vr)}else yn.done=!0,yn.start=function(){throw new Error("Cursor behind last entry")},yn.stop()};return In.onsuccess=ii(function(Vr){In.onsuccess=ph,ph()}),yn.continue=yi,yn.continuePrimaryKey=$a,yn.advance=Yr,ph(),Qs},$t(yn)},It)})}function Je(ct){return function(pt){return new Promise(function(ft,mt){ft=ii(ft);var $=pt.trans,ut=pt.values,$t=pt.limit,It=pt.query,rt=$t===1/0?void 0:$t,xn=It.index,Gn=It.range,nn=$.objectStore(ht),Sn=xn.isPrimaryKey?nn:nn.index(xn.name),In=K(Gn);if($t===0)return ft({result:[]});if(ct){var lr=ut?Sn.getAll(In,rt):Sn.getAllKeys(In,rt);lr.onsuccess=function(Yr){return ft({result:Yr.target.result})},lr.onerror=ts(mt)}else{var yn=0,yi=ut||!("openKeyCursor"in Sn)?Sn.openCursor(In):Sn.openKeyCursor(In),$a=[];yi.onsuccess=function(Yr){var go=yi.result;if(!go)return ft({result:$a});if($a.push(ut?go.value:go.primaryKey),++yn===$t)return ft({result:$a});go.continue()},yi.onerror=ts(mt)}})}}return{name:ht,schema:He,mutate:Ot,getMany:function(ct){var pt=ct.trans,ft=ct.keys;return new Promise(function(mt,$){mt=ii(mt);for(var ut=pt.objectStore(ht),$t=ft.length,It=new Array($t),rt=0,xn=0,Gn,nn=function(yn){var yi=yn.target;(It[yi._pos]=yi.result)!=null,++xn===rt&&mt(It)},Sn=ts($),In=0;In<$t;++In){var lr=ft[In];lr!=null&&(Gn=ut.get(ft[In]),Gn._pos=In,Gn.onsuccess=nn,Gn.onerror=Sn,++rt)}rt===0&&mt(It)})},get:function(ct){var pt=ct.trans,ft=ct.key;return new Promise(function(mt,$){mt=ii(mt);var ut=pt.objectStore(ht),$t=ut.get(ft);$t.onsuccess=function(It){return mt(It.target.result)},$t.onerror=ts($)})},query:Je(Se),openCursor:qe,count:function(ct){var pt=ct.query,ft=ct.trans,mt=pt.index,$=pt.range;return new Promise(function(ut,$t){var It=ft.objectStore(ht),rt=mt.isPrimaryKey?It:It.index(mt.name),xn=K($),Gn=xn?rt.count(xn):rt.count();Gn.onsuccess=ii(function(nn){return ut(nn.target.result)}),Gn.onerror=ts($t)})}}}var ye=z(A,L),xe=ye.schema,Se=ye.hasGetAll,Le=xe.tables.map(function(He){return oe(He)}),Ke={};return Le.forEach(function(He){return Ke[He.name]=He}),{stack:"dbcore",transaction:A.transaction.bind(A),table:function(He){var ht=Ke[He];if(!ht)throw new Error("Table '".concat(He,"' not found"));return Ke[He]},MIN_KEY:-1/0,MAX_KEY:Cn(k),schema:xe}}function aS(A,k){return k.reduce(function(L,z){var K=z.create;return i(i({},L),K(L))},A)}function av(A,k,L,z){var K=L.IDBKeyRange;L.indexedDB;var oe=aS(iS(k,K,z),A.dbcore);return{dbcore:oe}}function Zs(A,k){var L=k.db,z=av(A._middlewares,L,A._deps,k);A.core=z.dbcore,A.tables.forEach(function(K){var oe=K.name;A.core.schema.tables.some(function(ye){return ye.name===oe})&&(K.core=A.core.table(oe),A[oe]instanceof A.Table&&(A[oe].core=K.core))})}function ho(A,k,L,z){L.forEach(function(K){var oe=z[K];k.forEach(function(ye){var xe=S(ye,K);(!xe||"value"in xe&&xe.value===void 0)&&(ye===A.Transaction.prototype||ye instanceof A.Transaction?v(ye,K,{get:function(){return this.table(K)},set:function(Se){y(this,K,{value:Se,writable:!0,configurable:!0,enumerable:!0})}}):ye[K]=new A.Table(K,oe))})})}function ov(A,k){k.forEach(function(L){for(var z in L)L[z]instanceof A.Table&&delete L[z]})}function sv(A,k){return A._cfg.version-k._cfg.version}function lv(A,k,L,z){var K=A._dbSchema;L.objectStoreNames.contains("$meta")&&!K.$meta&&(K.$meta=xl("$meta",tm("")[0],[]),A._storeNames.push("$meta"));var oe=A._createTransaction("readwrite",A._storeNames,K);oe.create(L),oe._completion.catch(z);var ye=oe._reject.bind(oe),xe=pn.transless||pn;uu(function(){if(pn.trans=oe,pn.transless=xe,k===0)s(K).forEach(function(Se){vc(L,Se,K[Se].primKey,K[Se].indexes)}),Zs(A,L),Qt.follow(function(){return A.on.populate.fire(oe)}).catch(ye);else return Zs(A,L),oh(A,oe,k).then(function(Se){return uv(A,Se,oe,L)}).catch(ye)})}function ah(A,k){Pd(A._dbSchema,k),k.db.version%10===0&&!k.objectStoreNames.contains("$meta")&&k.db.createObjectStore("$meta").add(Math.ceil(k.db.version/10-1),"version");var L=Mr(A,A.idbdb,k);Nd(A,A._dbSchema,k);for(var z=cv(L,A._dbSchema),K=function(Le){if(Le.change.length||Le.recreate)return console.warn("Unable to patch indexes of table ".concat(Le.name," because it has changes on the type of index or primary key.")),{value:void 0};var Ke=k.objectStore(Le.name);Le.add.forEach(function(He){sr&&console.debug("Dexie upgrade patch: Creating missing index ".concat(Le.name,".").concat(He.src)),Ld(Ke,He)})},oe=0,ye=z.change;oe<ye.length;oe++){var xe=ye[oe],Se=K(xe);if(typeof Se=="object")return Se.value}}function oh(A,k,L){return k.storeNames.includes("$meta")?k.table("$meta").get("version").then(function(z){return z??L}):Qt.resolve(L)}function uv(A,k,L,z){var K=[],oe=A._versions,ye=A._dbSchema=Mr(A,A.idbdb,z),xe=oe.filter(function(Le){return Le._cfg.version>=k});if(xe.length===0)return Qt.resolve();xe.forEach(function(Le){K.push(function(){var Ke=ye,He=Le._cfg.dbschema;Nd(A,Ke,z),Nd(A,He,z),ye=A._dbSchema=He;var ht=cv(Ke,He);ht.add.forEach(function(ft){vc(z,ft[0],ft[1].primKey,ft[1].indexes)}),ht.change.forEach(function(ft){if(ft.recreate)throw new Ie.Upgrade("Not yet support for changing primary key");var mt=z.objectStore(ft.name);ft.add.forEach(function($){return Ld(mt,$)}),ft.change.forEach(function($){mt.deleteIndex($.name),Ld(mt,$)}),ft.del.forEach(function($){return mt.deleteIndex($)})});var Ot=Le._cfg.contentUpgrade;if(Ot&&Le._cfg.version>k){Zs(A,z),L._memoizedTables={};var qe=F(He);ht.del.forEach(function(ft){qe[ft]=Ke[ft]}),ov(A,[A.Transaction.prototype]),ho(A,[A.Transaction.prototype],s(qe),qe),L.schema=qe;var Je=ve(Ot);Je&&Id();var ct,pt=Qt.follow(function(){if(ct=Ot(L),ct&&Je){var ft=cu.bind(null,null);ct.then(ft,ft)}});return ct&&typeof ct.then=="function"?Qt.resolve(ct):pt.then(function(){return ct})}}),K.push(function(Ke){var He=Le._cfg.dbschema;oS(He,Ke),ov(A,[A.Transaction.prototype]),ho(A,[A.Transaction.prototype],A._storeNames,A._dbSchema),L.schema=A._dbSchema}),K.push(function(Ke){A.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(A.idbdb.version/10)===Le._cfg.version?(A.idbdb.deleteObjectStore("$meta"),delete A._dbSchema.$meta,A._storeNames=A._storeNames.filter(function(He){return He!=="$meta"})):Ke.objectStore("$meta").put(Le._cfg.version,"version"))})});function Se(){return K.length?Qt.resolve(K.shift()(L.idbtrans)).then(Se):Qt.resolve()}return Se().then(function(){Pd(ye,z)})}function cv(A,k){var L={del:[],add:[],change:[]},z;for(z in A)k[z]||L.del.push(z);for(z in k){var K=A[z],oe=k[z];if(!K)L.add.push([z,oe]);else{var ye={name:z,def:oe,recreate:!1,del:[],add:[],change:[]};if(""+(K.primKey.keyPath||"")!=""+(oe.primKey.keyPath||"")||K.primKey.auto!==oe.primKey.auto)ye.recreate=!0,L.change.push(ye);else{var xe=K.idxByName,Se=oe.idxByName,Le=void 0;for(Le in xe)Se[Le]||ye.del.push(Le);for(Le in Se){var Ke=xe[Le],He=Se[Le];Ke?Ke.src!==He.src&&ye.change.push(He):ye.add.push(He)}(ye.del.length>0||ye.add.length>0||ye.change.length>0)&&L.change.push(ye)}}}return L}function vc(A,k,L,z){var K=A.db.createObjectStore(k,L.keyPath?{keyPath:L.keyPath,autoIncrement:L.auto}:{autoIncrement:L.auto});return z.forEach(function(oe){return Ld(K,oe)}),K}function Pd(A,k){s(A).forEach(function(L){k.db.objectStoreNames.contains(L)||(sr&&console.debug("Dexie: Creating missing table",L),vc(k,L,A[L].primKey,A[L].indexes))})}function oS(A,k){[].slice.call(k.db.objectStoreNames).forEach(function(L){return A[L]==null&&k.db.deleteObjectStore(L)})}function Ld(A,k){A.createIndex(k.name,k.keyPath,{unique:k.unique,multiEntry:k.multi})}function Mr(A,k,L){var z={},K=_(k.objectStoreNames,0);return K.forEach(function(oe){for(var ye=L.objectStore(oe),xe=ye.keyPath,Se=eh(Ma(xe),xe||"",!0,!1,!!ye.autoIncrement,xe&&typeof xe!="string",!0),Le=[],Ke=0;Ke<ye.indexNames.length;++Ke){var He=ye.index(ye.indexNames[Ke]);xe=He.keyPath;var ht=eh(He.name,xe,!!He.unique,!!He.multiEntry,!1,xe&&typeof xe!="string",!1);Le.push(ht)}z[oe]=xl(oe,Se,Le)}),z}function sh(A,k,L){A.verno=k.version/10;var z=A._dbSchema=Mr(A,k,L);A._storeNames=_(k.objectStoreNames,0),ho(A,[A._allTables],s(z),z)}function Sl(A,k){var L=Mr(A,A.idbdb,k),z=cv(L,A._dbSchema);return!(z.add.length||z.change.some(function(K){return K.add.length||K.change.length}))}function Nd(A,k,L){for(var z=L.db.objectStoreNames,K=0;K<z.length;++K){var oe=z[K],ye=L.objectStore(oe);A._hasGetAll="getAll"in ye;for(var xe=0;xe<ye.indexNames.length;++xe){var Se=ye.indexNames[xe],Le=ye.index(Se).keyPath,Ke=typeof Le=="string"?Le:"["+_(Le).join("+")+"]";if(k[oe]){var He=k[oe].idxByName[Ke];He&&(He.name=Se,delete k[oe].idxByName[Ke],k[oe].idxByName[Se]=He)}}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&o.WorkerGlobalScope&&o instanceof o.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(A._hasGetAll=!1)}function tm(A){return A.split(",").map(function(k,L){k=k.trim();var z=k.replace(/([&*]|\+\+)/g,""),K=/^\[/.test(z)?z.match(/^\[(.*)\]$/)[1].split("+"):z;return eh(z,K||null,/\&/.test(k),/\*/.test(k),/\+\+/.test(k),l(K),L===0)})}var sS=function(){function A(){}return A.prototype._parseStoresSpec=function(k,L){s(k).forEach(function(z){if(k[z]!==null){var K=tm(k[z]),oe=K.shift();if(oe.unique=!0,oe.multi)throw new Ie.Schema("Primary key cannot be multi-valued");K.forEach(function(ye){if(ye.auto)throw new Ie.Schema("Only primary key can be marked as autoIncrement (++)");if(!ye.keyPath)throw new Ie.Schema("Index must have a name and cannot be an empty string")}),L[z]=xl(z,oe,K)}})},A.prototype.stores=function(k){var L=this.db;this._cfg.storesSource=this._cfg.storesSource?c(this._cfg.storesSource,k):k;var z=L._versions,K={},oe={};return z.forEach(function(ye){c(K,ye._cfg.storesSource),oe=ye._cfg.dbschema={},ye._parseStoresSpec(K,oe)}),L._dbSchema=oe,ov(L,[L._allTables,L,L.Transaction.prototype]),ho(L,[L._allTables,L,L.Transaction.prototype,this._cfg.tables],s(oe),oe),L._storeNames=s(oe),this},A.prototype.upgrade=function(k){return this._cfg.contentUpgrade=Dr(this._cfg.contentUpgrade||Be,k),this},A}();function lS(A){return Qf(sS.prototype,function(L){this.db=A,this._cfg={version:L,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}function dv(A,k){var L=A._dbNamesDB;return L||(L=A._dbNamesDB=new Ci(fo,{addons:[],indexedDB:A,IDBKeyRange:k}),L.version(1).stores({dbnames:"name"})),L.table("dbnames")}function fv(A){return A&&typeof A.databases=="function"}function uS(A){var k=A.indexedDB,L=A.IDBKeyRange;return fv(k)?Promise.resolve(k.databases()).then(function(z){return z.map(function(K){return K.name}).filter(function(K){return K!==fo})}):dv(k,L).toCollection().primaryKeys()}function _s(A,k){var L=A.indexedDB,z=A.IDBKeyRange;!fv(L)&&k!==fo&&dv(L,z).put({name:k}).catch(Be)}function cS(A,k){var L=A.indexedDB,z=A.IDBKeyRange;!fv(L)&&k!==fo&&dv(L,z).delete(k).catch(Be)}function hv(A){return uu(function(){return pn.letThrough=!0,A()})}function lh(){var A=!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent);if(!A||!indexedDB.databases)return Promise.resolve();var k;return new Promise(function(L){var z=function(){return indexedDB.databases().finally(L)};k=setInterval(z,100),z()}).finally(function(){return clearInterval(k)})}var uh;function xa(A){return!("from"in A)}var gi=function(A,k){if(this)c(this,arguments.length?{d:1,from:A,to:arguments.length>1?k:A}:{d:0});else{var L=new gi;return A&&"d"in A&&c(L,A),L}};g(gi.prototype,(uh={add:function(A){return dh(this,A),this},addKey:function(A){return ch(this,A,A),this},addKeys:function(A){var k=this;return A.forEach(function(L){return ch(k,L,L)}),this},hasKey:function(A){var k=po(this).next(A).value;return k&&ir(k.from,A)<=0&&ir(k.to,A)>=0}},uh[me]=function(){return po(this)},uh));function ch(A,k,L){var z=ir(k,L);if(!isNaN(z)){if(z>0)throw RangeError();if(xa(A))return c(A,{from:k,to:L,d:1});var K=A.l,oe=A.r;if(ir(L,A.from)<0)return K?ch(K,k,L):A.l={from:k,to:L,d:1,l:null,r:null},vi(A);if(ir(k,A.to)>0)return oe?ch(oe,k,L):A.r={from:k,to:L,d:1,l:null,r:null},vi(A);ir(k,A.from)<0&&(A.from=k,A.l=null,A.d=oe?oe.d+1:1),ir(L,A.to)>0&&(A.to=L,A.r=null,A.d=A.l?A.l.d+1:1);var ye=!A.r;K&&!A.l&&dh(A,K),oe&&ye&&dh(A,oe)}}function dh(A,k){function L(z,K){var oe=K.from,ye=K.to,xe=K.l,Se=K.r;ch(z,oe,ye),xe&&L(z,xe),Se&&L(z,Se)}xa(k)||L(A,k)}function K_(A,k){var L=po(k),z=L.next();if(z.done)return!1;for(var K=z.value,oe=po(A),ye=oe.next(K.from),xe=ye.value;!z.done&&!ye.done;){if(ir(xe.from,K.to)<=0&&ir(xe.to,K.from)>=0)return!0;ir(K.from,xe.from)<0?K=(z=L.next(xe.from)).value:xe=(ye=oe.next(K.from)).value}return!1}function po(A){var k=xa(A)?null:{s:0,n:A};return{next:function(L){for(var z=arguments.length>0;k;)switch(k.s){case 0:if(k.s=1,z)for(;k.n.l&&ir(L,k.n.from)<0;)k={up:k,n:k.n.l,s:1};else for(;k.n.l;)k={up:k,n:k.n.l,s:1};case 1:if(k.s=2,!z||ir(L,k.n.to)<=0)return{value:k.n,done:!1};case 2:if(k.n.r){k.s=3,k={up:k,n:k.n.r,s:0};continue}case 3:k=k.up}return{done:!0}}}}function vi(A){var k,L,z=(((k=A.r)===null||k===void 0?void 0:k.d)||0)-(((L=A.l)===null||L===void 0?void 0:L.d)||0),K=z>1?"r":z<-1?"l":"";if(K){var oe=K==="r"?"l":"r",ye=i({},A),xe=A[K];A.from=xe.from,A.to=xe.to,A[K]=xe[K],ye[K]=xe[oe],A[oe]=ye,ye.d=nm(ye)}A.d=nm(A)}function nm(A){var k=A.r,L=A.l;return(k?L?Math.max(k.d,L.d):k.d:L?L.d:0)+1}function rm(A,k){return s(k).forEach(function(L){A[L]?dh(A[L],k[L]):A[L]=U(k[L])}),A}function pv(A,k){return A.all||k.all||Object.keys(A).some(function(L){return k[L]&&K_(k[L],A[L])})}var yc={},mv={},gv=!1;function mo(A,k){rm(mv,A),gv||(gv=!0,setTimeout(function(){gv=!1;var L=mv;mv={},ue(L,!1)},0))}function ue(A,k){k===void 0&&(k=!1);var L=new Set;if(A.all)for(var z=0,K=Object.values(yc);z<K.length;z++){var oe=K[z];De(oe,A,L,k)}else for(var ye in A){var xe=/^idb\:\/\/(.*)\/(.*)\//.exec(ye);if(xe){var Se=xe[1],Le=xe[2],oe=yc["idb://".concat(Se,"/").concat(Le)];oe&&De(oe,A,L,k)}}L.forEach(function(Ke){return Ke()})}function De(A,k,L,z){for(var K=[],oe=0,ye=Object.entries(A.queries.query);oe<ye.length;oe++){for(var xe=ye[oe],Se=xe[0],Le=xe[1],Ke=[],He=0,ht=Le;He<ht.length;He++){var Ot=ht[He];pv(k,Ot.obsSet)?Ot.subscribers.forEach(function(pt){return L.add(pt)}):z&&Ke.push(Ot)}z&&K.push([Se,Ke])}if(z)for(var qe=0,Je=K;qe<Je.length;qe++){var ct=Je[qe],Se=ct[0],Ke=ct[1];A.queries.query[Se]=Ke}}function we(A){var k=A._state,L=A._deps.indexedDB;if(k.isBeingOpened||A.idbdb)return k.dbReadyPromise.then(function(){return k.dbOpenError?Oi(k.dbOpenError):A});k.isBeingOpened=!0,k.dbOpenError=null,k.openComplete=!1;var z=k.openCanceller,K=Math.round(A.verno*10),oe=!1;function ye(){if(k.openCanceller!==z)throw new Ie.DatabaseClosed("db.open() was cancelled")}var xe=k.dbReadyResolve,Se=null,Le=!1,Ke=function(){return new Qt(function(He,ht){if(ye(),!L)throw new Ie.MissingAPI;var Ot=A.name,qe=k.autoSchema||!K?L.open(Ot):L.open(Ot,K);if(!qe)throw new Ie.MissingAPI;qe.onerror=ts(ht),qe.onblocked=ii(A._fireOnBlocked),qe.onupgradeneeded=ii(function(Je){if(Se=qe.transaction,k.autoSchema&&!A._options.allowEmptyDB){qe.onerror=mc,Se.abort(),qe.result.close();var ct=L.deleteDatabase(Ot);ct.onsuccess=ct.onerror=ii(function(){ht(new Ie.NoSuchDatabase("Database ".concat(Ot," doesnt exist")))})}else{Se.onerror=ts(ht);var pt=Je.oldVersion>Math.pow(2,62)?0:Je.oldVersion;Le=pt<1,A.idbdb=qe.result,oe&&ah(A,Se),lv(A,pt/10,Se,ht)}},ht),qe.onsuccess=ii(function(){Se=null;var Je=A.idbdb=qe.result,ct=_(Je.objectStoreNames);if(ct.length>0)try{var pt=Je.transaction(th(ct),"readonly");if(k.autoSchema)sh(A,Je,pt);else if(Nd(A,A._dbSchema,pt),!Sl(A,pt)&&!oe)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),Je.close(),K=Je.version+1,oe=!0,He(Ke());Zs(A,pt)}catch{}Ks.push(A),Je.onversionchange=ii(function(ft){k.vcFired=!0,A.on("versionchange").fire(ft)}),Je.onclose=ii(function(ft){A.on("close").fire(ft)}),Le&&_s(A._deps,Ot),He()},ht)}).catch(function(He){switch(He==null?void 0:He.name){case"UnknownError":if(k.PR1398_maxLoop>0)return k.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),Ke();break;case"VersionError":if(K>0)return K=0,Ke();break}return Qt.reject(He)})};return Qt.race([z,(typeof navigator>"u"?Qt.resolve():lh()).then(Ke)]).then(function(){return ye(),k.onReadyBeingFired=[],Qt.resolve(hv(function(){return A.on.ready.fire(A.vip)})).then(function He(){if(k.onReadyBeingFired.length>0){var ht=k.onReadyBeingFired.reduce(Dr,Be);return k.onReadyBeingFired=[],Qt.resolve(hv(function(){return ht(A.vip)})).then(He)}})}).finally(function(){k.openCanceller===z&&(k.onReadyBeingFired=null,k.isBeingOpened=!1)}).catch(function(He){k.dbOpenError=He;try{Se&&Se.abort()}catch{}return z===k.openCanceller&&A._close(),Oi(He)}).finally(function(){k.openComplete=!0,xe()}).then(function(){if(Le){var He={};A.tables.forEach(function(ht){ht.schema.indexes.forEach(function(Ot){Ot.name&&(He["idb://".concat(A.name,"/").concat(ht.name,"/").concat(Ot.name)]=new gi(-1/0,[[[]]]))}),He["idb://".concat(A.name,"/").concat(ht.name,"/")]=He["idb://".concat(A.name,"/").concat(ht.name,"/:dels")]=new gi(-1/0,[[[]]])}),hu(gc).fire(He),ue(He,!0)}return A})}function lt(A){var k=function(ye){return A.next(ye)},L=function(ye){return A.throw(ye)},z=oe(k),K=oe(L);function oe(ye){return function(xe){var Se=ye(xe),Le=Se.value;return Se.done?Le:!Le||typeof Le.then!="function"?l(Le)?Promise.all(Le).then(z,K):z(Le):Le.then(z,K)}}return oe(k)()}function Lt(A,k,L){var z=arguments.length;if(z<2)throw new Ie.InvalidArgument("Too few arguments");for(var K=new Array(z-1);--z;)K[z-1]=arguments[z];L=K.pop();var oe=H(K);return[A,oe,L]}function un(A,k,L,z,K){return Qt.resolve().then(function(){var oe=pn.transless||pn,ye=A._createTransaction(k,L,A._dbSchema,z);ye.explicit=!0;var xe={trans:ye,transless:oe};if(z)ye.idbtrans=z.idbtrans;else try{ye.create(),ye.idbtrans._explicit=!0,A._state.PR1398_maxLoop=3}catch(He){return He.name===Ve.InvalidState&&A.isOpen()&&--A._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),A.close({disableAutoOpen:!1}),A.open().then(function(){return un(A,k,L,null,K)})):Oi(He)}var Se=ve(K);Se&&Id();var Le,Ke=Qt.follow(function(){if(Le=K.call(ye,ye),Le)if(Se){var He=cu.bind(null,null);Le.then(He,He)}else typeof Le.next=="function"&&typeof Le.throw=="function"&&(Le=lt(Le))},xe);return(Le&&typeof Le.then=="function"?Qt.resolve(Le).then(function(He){return ye.active?He:Oi(new Ie.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):Ke.then(function(){return Le})).then(function(He){return z&&ye._resolve(),ye._completion.then(function(){return He})}).catch(function(He){return ye._reject(He),Oi(He)})})}function Kn(A,k,L){for(var z=l(A)?A.slice():[A],K=0;K<L;++K)z.push(k);return z}function wn(A){return i(i({},A),{table:function(k){var L=A.table(k),z=L.schema,K={},oe=[];function ye(Je,ct,pt){var ft=ih(Je),mt=K[ft]=K[ft]||[],$=Je==null?0:typeof Je=="string"?1:Je.length,ut=ct>0,$t=i(i({},pt),{name:ut?"".concat(ft,"(virtual-from:").concat(pt.name,")"):pt.name,lowLevelIndex:pt,isVirtual:ut,keyTail:ct,keyLength:$,extractKey:wa(Je),unique:!ut&&pt.unique});if(mt.push($t),$t.isPrimaryKey||oe.push($t),$>1){var It=$===2?Je[0]:Je.slice(0,$-1);ye(It,ct+1,pt)}return mt.sort(function(rt,xn){return rt.keyTail-xn.keyTail}),$t}var xe=ye(z.primaryKey.keyPath,0,z.primaryKey);K[":id"]=[xe];for(var Se=0,Le=z.indexes;Se<Le.length;Se++){var Ke=Le[Se];ye(Ke.keyPath,0,Ke)}function He(Je){var ct=K[ih(Je)];return ct&&ct[0]}function ht(Je,ct){return{type:Je.type===1?2:Je.type,lower:Kn(Je.lower,Je.lowerOpen?A.MAX_KEY:A.MIN_KEY,ct),lowerOpen:!0,upper:Kn(Je.upper,Je.upperOpen?A.MIN_KEY:A.MAX_KEY,ct),upperOpen:!0}}function Ot(Je){var ct=Je.query.index;return ct.isVirtual?i(i({},Je),{query:{index:ct.lowLevelIndex,range:ht(Je.query.range,ct.keyTail)}}):Je}var qe=i(i({},L),{schema:i(i({},z),{primaryKey:xe,indexes:oe,getIndexByKeyPath:He}),count:function(Je){return L.count(Ot(Je))},query:function(Je){return L.query(Ot(Je))},openCursor:function(Je){var ct=Je.query.index,pt=ct.keyTail,ft=ct.isVirtual,mt=ct.keyLength;if(!ft)return L.openCursor(Je);function $(ut){function $t(rt){rt!=null?ut.continue(Kn(rt,Je.reverse?A.MAX_KEY:A.MIN_KEY,pt)):Je.unique?ut.continue(ut.key.slice(0,mt).concat(Je.reverse?A.MIN_KEY:A.MAX_KEY,pt)):ut.continue()}var It=Object.create(ut,{continue:{value:$t},continuePrimaryKey:{value:function(rt,xn){ut.continuePrimaryKey(Kn(rt,A.MAX_KEY,pt),xn)}},primaryKey:{get:function(){return ut.primaryKey}},key:{get:function(){var rt=ut.key;return mt===1?rt[0]:rt.slice(0,mt)}},value:{get:function(){return ut.value}}});return It}return L.openCursor(Ot(Je)).then(function(ut){return ut&&$(ut)})}});return qe}})}var fh={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:wn};function vv(A,k,L,z){return L=L||{},z=z||"",s(A).forEach(function(K){if(!p(k,K))L[z+K]=void 0;else{var oe=A[K],ye=k[K];if(typeof oe=="object"&&typeof ye=="object"&&oe&&ye){var xe=J(oe),Se=J(ye);xe!==Se?L[z+K]=k[K]:xe==="Object"?vv(oe,ye,L,z+K+"."):oe!==ye&&(L[z+K]=k[K])}else oe!==ye&&(L[z+K]=k[K])}}),s(k).forEach(function(K){p(A,K)||(L[z+K]=k[K])}),L}function Zr(A,k){return k.type==="delete"?k.keys:k.keys||k.values.map(A.extractKey)}var bc={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(A){return i(i({},A),{table:function(k){var L=A.table(k),z=L.schema.primaryKey,K=i(i({},L),{mutate:function(oe){var ye=pn.trans,xe=ye.table(k).hook,Se=xe.deleting,Le=xe.creating,Ke=xe.updating;switch(oe.type){case"add":if(Le.fire===Be)break;return ye._promise("readwrite",function(){return He(oe)},!0);case"put":if(Le.fire===Be&&Ke.fire===Be)break;return ye._promise("readwrite",function(){return He(oe)},!0);case"delete":if(Se.fire===Be)break;return ye._promise("readwrite",function(){return He(oe)},!0);case"deleteRange":if(Se.fire===Be)break;return ye._promise("readwrite",function(){return ht(oe)},!0)}return L.mutate(oe);function He(qe){var Je=pn.trans,ct=qe.keys||Zr(z,qe);if(!ct)throw new Error("Keys missing");return qe=qe.type==="add"||qe.type==="put"?i(i({},qe),{keys:ct}):i({},qe),qe.type!=="delete"&&(qe.values=a([],qe.values)),qe.keys&&(qe.keys=a([],qe.keys)),dS(L,qe,ct).then(function(pt){var ft=ct.map(function(mt,$){var ut=pt[$],$t={onerror:null,onsuccess:null};if(qe.type==="delete")Se.fire.call($t,mt,ut,Je);else if(qe.type==="add"||ut===void 0){var It=Le.fire.call($t,mt,qe.values[$],Je);mt==null&&It!=null&&(mt=It,qe.keys[$]=mt,z.outbound||M(qe.values[$],z.keyPath,mt))}else{var rt=vv(ut,qe.values[$]),xn=Ke.fire.call($t,rt,mt,ut,Je);if(xn){var Gn=qe.values[$];Object.keys(xn).forEach(function(nn){p(Gn,nn)?Gn[nn]=xn[nn]:M(Gn,nn,xn[nn])})}}return $t});return L.mutate(qe).then(function(mt){for(var $=mt.failures,ut=mt.results,$t=mt.numFailures,It=mt.lastResult,rt=0;rt<ct.length;++rt){var xn=ut?ut[rt]:ct[rt],Gn=ft[rt];xn==null?Gn.onerror&&Gn.onerror($[rt]):Gn.onsuccess&&Gn.onsuccess(qe.type==="put"&&pt[rt]?qe.values[rt]:xn)}return{failures:$,results:ut,numFailures:$t,lastResult:It}}).catch(function(mt){return ft.forEach(function($){return $.onerror&&$.onerror(mt)}),Promise.reject(mt)})})}function ht(qe){return Ot(qe.trans,qe.range,1e4)}function Ot(qe,Je,ct){return L.query({trans:qe,values:!1,query:{index:z,range:Je},limit:ct}).then(function(pt){var ft=pt.result;return He({type:"delete",keys:ft,trans:qe}).then(function(mt){return mt.numFailures>0?Promise.reject(mt.failures[0]):ft.length<ct?{failures:[],numFailures:0,lastResult:void 0}:Ot(qe,i(i({},Je),{lower:ft[ft.length-1],lowerOpen:!0}),ct)})})}}});return K}})}};function dS(A,k,L){return k.type==="add"?Promise.resolve([]):A.getMany({trans:k.trans,keys:L,cache:"immutable"})}function ns(A,k,L){try{if(!k||k.keys.length<A.length)return null;for(var z=[],K=0,oe=0;K<k.keys.length&&oe<A.length;++K)ir(k.keys[K],A[oe])===0&&(z.push(L?_e(k.values[K]):k.values[K]),++oe);return z.length===A.length?z:null}catch{return null}}var _c={stack:"dbcore",level:-1,create:function(A){return{table:function(k){var L=A.table(k);return i(i({},L),{getMany:function(z){if(!z.cache)return L.getMany(z);var K=ns(z.keys,z.trans._cache,z.cache==="clone");return K?Qt.resolve(K):L.getMany(z).then(function(oe){return z.trans._cache={keys:z.keys,values:z.cache==="clone"?_e(oe):oe},oe})},mutate:function(z){return z.type!=="add"&&(z.trans._cache=null),L.mutate(z)}})}}}};function pu(A,k){return A.trans.mode==="readonly"&&!!A.subscr&&!A.trans.explicit&&A.trans.db._options.cache!=="disabled"&&!k.schema.primaryKey.outbound}function mn(A,k){switch(A){case"query":return k.values&&!k.unique;case"get":return!1;case"getMany":return!1;case"count":return!1;case"openCursor":return!1}}var fS={stack:"dbcore",level:0,name:"Observability",create:function(A){var k=A.schema.name,L=new gi(A.MIN_KEY,A.MAX_KEY);return i(i({},A),{transaction:function(z,K,oe){if(pn.subscr&&K!=="readonly")throw new Ie.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(pn.querier));return A.transaction(z,K,oe)},table:function(z){var K=A.table(z),oe=K.schema,ye=oe.primaryKey,xe=oe.indexes,Se=ye.extractKey,Le=ye.outbound,Ke=ye.autoIncrement&&xe.filter(function(qe){return qe.compound&&qe.keyPath.includes(ye.keyPath)}),He=i(i({},K),{mutate:function(qe){var Je,ct,pt=qe.trans,ft=qe.mutatedParts||(qe.mutatedParts={}),mt=function(In){var lr="idb://".concat(k,"/").concat(z,"/").concat(In);return ft[lr]||(ft[lr]=new gi)},$=mt(""),ut=mt(":dels"),$t=qe.type,It=qe.type==="deleteRange"?[qe.range]:qe.type==="delete"?[qe.keys]:qe.values.length<50?[Zr(ye,qe).filter(function(In){return In}),qe.values]:[],rt=It[0],xn=It[1],Gn=qe.trans._cache;if(l(rt)){$.addKeys(rt);var nn=$t==="delete"||rt.length===xn.length?ns(rt,Gn):null;nn||ut.addKeys(rt),(nn||xn)&&yv(mt,oe,nn,xn)}else if(rt){var Sn={from:(Je=rt.lower)!==null&&Je!==void 0?Je:A.MIN_KEY,to:(ct=rt.upper)!==null&&ct!==void 0?ct:A.MAX_KEY};ut.add(Sn),$.add(Sn)}else $.add(L),ut.add(L),oe.indexes.forEach(function(In){return mt(In.name).add(L)});return K.mutate(qe).then(function(In){return rt&&(qe.type==="add"||qe.type==="put")&&($.addKeys(In.results),Ke&&Ke.forEach(function(lr){for(var yn=qe.values.map(function(go){return lr.extractKey(go)}),yi=lr.keyPath.findIndex(function(go){return go===ye.keyPath}),$a=0,Yr=In.results.length;$a<Yr;++$a)yn[$a][yi]=In.results[$a];mt(lr.name).addKeys(yn)})),pt.mutatedParts=rm(pt.mutatedParts||{},ft),In})}}),ht=function(qe){var Je,ct,pt=qe.query,ft=pt.index,mt=pt.range;return[ft,new gi((Je=mt.lower)!==null&&Je!==void 0?Je:A.MIN_KEY,(ct=mt.upper)!==null&&ct!==void 0?ct:A.MAX_KEY)]},Ot={get:function(qe){return[ye,new gi(qe.key)]},getMany:function(qe){return[ye,new gi().addKeys(qe.keys)]},count:ht,query:ht,openCursor:ht};return s(Ot).forEach(function(qe){He[qe]=function(Je){var ct=pn.subscr,pt=!!ct,ft=pu(pn,K)&&mn(qe,Je),mt=ft?Je.obsSet={}:ct;if(pt){var $=function(nn){var Sn="idb://".concat(k,"/").concat(z,"/").concat(nn);return mt[Sn]||(mt[Sn]=new gi)},ut=$(""),$t=$(":dels"),It=Ot[qe](Je),rt=It[0],xn=It[1];if(qe==="query"&&rt.isPrimaryKey&&!Je.values?$t.add(xn):$(rt.name||"").add(xn),!rt.isPrimaryKey)if(qe==="count")$t.add(L);else{var Gn=qe==="query"&&Le&&Je.values&&K.query(i(i({},Je),{values:!1}));return K[qe].apply(this,arguments).then(function(nn){if(qe==="query"){if(Le&&Je.values)return Gn.then(function(yn){var yi=yn.result;return ut.addKeys(yi),nn});var Sn=Je.values?nn.result.map(Se):nn.result;Je.values?ut.addKeys(Sn):$t.addKeys(Sn)}else if(qe==="openCursor"){var In=nn,lr=Je.values;return In&&Object.create(In,{key:{get:function(){return $t.addKey(In.primaryKey),In.key}},primaryKey:{get:function(){var yn=In.primaryKey;return $t.addKey(yn),yn}},value:{get:function(){return lr&&ut.addKey(In.primaryKey),In.value}}})}return nn})}}return K[qe].apply(this,arguments)}}),He}})}};function yv(A,k,L,z){function K(oe){var ye=A(oe.name||"");function xe(Le){return Le!=null?oe.extractKey(Le):null}var Se=function(Le){return oe.multiEntry&&l(Le)?Le.forEach(function(Ke){return ye.addKey(Ke)}):ye.addKey(Le)};(L||z).forEach(function(Le,Ke){var He=L&&xe(L[Ke]),ht=z&&xe(z[Ke]);ir(He,ht)!==0&&(He!=null&&Se(He),ht!=null&&Se(ht))})}k.indexes.forEach(K)}function mu(A,k,L){if(L.numFailures===0)return k;if(k.type==="deleteRange")return null;var z=k.keys?k.keys.length:"values"in k&&k.values?k.values.length:1;if(L.numFailures===z)return null;var K=i({},k);return l(K.keys)&&(K.keys=K.keys.filter(function(oe,ye){return!(ye in L.failures)})),"values"in K&&l(K.values)&&(K.values=K.values.filter(function(oe,ye){return!(ye in L.failures)})),K}function hS(A,k){return k.lower===void 0?!0:k.lowerOpen?ir(A,k.lower)>0:ir(A,k.lower)>=0}function pS(A,k){return k.upper===void 0?!0:k.upperOpen?ir(A,k.upper)<0:ir(A,k.upper)<=0}function bv(A,k){return hS(A,k)&&pS(A,k)}function gu(A,k,L,z,K,oe){if(!L||L.length===0)return A;var ye=k.query.index,xe=ye.multiEntry,Se=k.query.range,Le=z.schema.primaryKey,Ke=Le.extractKey,He=ye.extractKey,ht=(ye.lowLevelIndex||ye).extractKey,Ot=L.reduce(function(qe,Je){var ct=qe,pt=[];if(Je.type==="add"||Je.type==="put")for(var ft=new gi,mt=Je.values.length-1;mt>=0;--mt){var $=Je.values[mt],ut=Ke($);if(!ft.hasKey(ut)){var $t=He($);(xe&&l($t)?$t.some(function(nn){return bv(nn,Se)}):bv($t,Se))&&(ft.addKey(ut),pt.push($))}}switch(Je.type){case"add":{var It=new gi().addKeys(k.values?qe.map(function(nn){return Ke(nn)}):qe);ct=qe.concat(k.values?pt.filter(function(nn){var Sn=Ke(nn);return It.hasKey(Sn)?!1:(It.addKey(Sn),!0)}):pt.map(function(nn){return Ke(nn)}).filter(function(nn){return It.hasKey(nn)?!1:(It.addKey(nn),!0)}));break}case"put":{var rt=new gi().addKeys(Je.values.map(function(nn){return Ke(nn)}));ct=qe.filter(function(nn){return!rt.hasKey(k.values?Ke(nn):nn)}).concat(k.values?pt:pt.map(function(nn){return Ke(nn)}));break}case"delete":var xn=new gi().addKeys(Je.keys);ct=qe.filter(function(nn){return!xn.hasKey(k.values?Ke(nn):nn)});break;case"deleteRange":var Gn=Je.range;ct=qe.filter(function(nn){return!bv(Ke(nn),Gn)});break}return ct},A);return Ot===A?A:(Ot.sort(function(qe,Je){return ir(ht(qe),ht(Je))||ir(Ke(qe),Ke(Je))}),k.limit&&k.limit<1/0&&(Ot.length>k.limit?Ot.length=k.limit:A.length===k.limit&&Ot.length<k.limit&&(K.dirty=!0)),oe?Object.freeze(Ot):Ot)}function Ra(A,k){return ir(A.lower,k.lower)===0&&ir(A.upper,k.upper)===0&&!!A.lowerOpen==!!k.lowerOpen&&!!A.upperOpen==!!k.upperOpen}function wc(A,k,L,z){if(A===void 0)return k!==void 0?-1:0;if(k===void 0)return 1;var K=ir(A,k);if(K===0){if(L&&z)return 0;if(L)return 1;if(z)return-1}return K}function _v(A,k,L,z){if(A===void 0)return k!==void 0?1:0;if(k===void 0)return-1;var K=ir(A,k);if(K===0){if(L&&z)return 0;if(L)return-1;if(z)return 1}return K}function xc(A,k){return wc(A.lower,k.lower,A.lowerOpen,k.lowerOpen)<=0&&_v(A.upper,k.upper,A.upperOpen,k.upperOpen)>=0}function wv(A,k,L,z){var K=yc["idb://".concat(A,"/").concat(k)];if(!K)return[];var oe=K.queries[L];if(!oe)return[null,!1,K,null];var ye=z.query?z.query.index.name:null,xe=oe[ye||""];if(!xe)return[null,!1,K,null];switch(L){case"query":var Se=xe.find(function(He){return He.req.limit===z.limit&&He.req.values===z.values&&Ra(He.req.query.range,z.query.range)});if(Se)return[Se,!0,K,xe];var Le=xe.find(function(He){var ht="limit"in He.req?He.req.limit:1/0;return ht>=z.limit&&(z.values?He.req.values:!0)&&xc(He.req.query.range,z.query.range)});return[Le,!1,K,xe];case"count":var Ke=xe.find(function(He){return Ra(He.req.query.range,z.query.range)});return[Ke,!!Ke,K,xe]}}function xv(A,k,L,z){A.subscribers.add(L),z.addEventListener("abort",function(){A.subscribers.delete(L),A.subscribers.size===0&&Sc(A,k)})}function Sc(A,k){setTimeout(function(){A.subscribers.size===0&&Ce(k,A)},3e3)}var Sv={stack:"dbcore",level:0,name:"Cache",create:function(A){var k=A.schema.name,L=i(i({},A),{transaction:function(z,K,oe){var ye=A.transaction(z,K,oe);if(K==="readwrite"){var xe=new AbortController,Se=xe.signal,Le=function(Ke){return function(){if(xe.abort(),K==="readwrite"){for(var He=new Set,ht=0,Ot=z;ht<Ot.length;ht++){var qe=Ot[ht],Je=yc["idb://".concat(k,"/").concat(qe)];if(Je){var ct=A.table(qe),pt=Je.optimisticOps.filter(function(lr){return lr.trans===ye});if(ye._explicit&&Ke&&ye.mutatedParts)for(var ft=0,mt=Object.values(Je.queries.query);ft<mt.length;ft++)for(var $=mt[ft],ut=0,$t=$.slice();ut<$t.length;ut++){var It=$t[ut];pv(It.obsSet,ye.mutatedParts)&&(Ce($,It),It.subscribers.forEach(function(lr){return He.add(lr)}))}else if(pt.length>0){Je.optimisticOps=Je.optimisticOps.filter(function(lr){return lr.trans!==ye});for(var rt=0,xn=Object.values(Je.queries.query);rt<xn.length;rt++)for(var $=xn[rt],Gn=0,nn=$.slice();Gn<nn.length;Gn++){var It=nn[Gn];if(It.res!=null&&ye.mutatedParts)if(Ke&&!It.dirty){var Sn=Object.isFrozen(It.res),In=gu(It.res,It.req,pt,ct,It,Sn);It.dirty?(Ce($,It),It.subscribers.forEach(function(yi){return He.add(yi)})):In!==It.res&&(It.res=In,It.promise=Qt.resolve({result:In}))}else It.dirty&&Ce($,It),It.subscribers.forEach(function(yi){return He.add(yi)})}}}}He.forEach(function(lr){return lr()})}}};ye.addEventListener("abort",Le(!1),{signal:Se}),ye.addEventListener("error",Le(!1),{signal:Se}),ye.addEventListener("complete",Le(!0),{signal:Se})}return ye},table:function(z){var K=A.table(z),oe=K.schema.primaryKey,ye=i(i({},K),{mutate:function(xe){var Se=pn.trans;if(oe.outbound||Se.db._options.cache==="disabled"||Se.explicit||Se.idbtrans.mode!=="readwrite")return K.mutate(xe);var Le=yc["idb://".concat(k,"/").concat(z)];if(!Le)return K.mutate(xe);var Ke=K.mutate(xe);return(xe.type==="add"||xe.type==="put")&&(xe.values.length>=50||Zr(oe,xe).some(function(He){return He==null}))?Ke.then(function(He){var ht=i(i({},xe),{values:xe.values.map(function(qe,Je){var ct;if(He.failures[Je])return qe;var pt=!((ct=oe.keyPath)===null||ct===void 0)&&ct.includes(".")?_e(qe):i({},qe);return M(pt,oe.keyPath,He.results[Je]),pt})}),Ot=mu(Le,ht,He);Le.optimisticOps.push(Ot),queueMicrotask(function(){return xe.mutatedParts&&mo(xe.mutatedParts)})}):(Le.optimisticOps.push(xe),xe.mutatedParts&&mo(xe.mutatedParts),Ke.then(function(He){if(He.numFailures>0){Ce(Le.optimisticOps,xe);var ht=mu(Le,xe,He);ht&&Le.optimisticOps.push(ht),xe.mutatedParts&&mo(xe.mutatedParts)}}),Ke.catch(function(){Ce(Le.optimisticOps,xe),xe.mutatedParts&&mo(xe.mutatedParts)})),Ke},query:function(xe){var Se;if(!pu(pn,K)||!mn("query",xe))return K.query(xe);var Le=((Se=pn.trans)===null||Se===void 0?void 0:Se.db._options.cache)==="immutable",Ke=pn,He=Ke.requery,ht=Ke.signal,Ot=wv(k,z,"query",xe),qe=Ot[0],Je=Ot[1],ct=Ot[2],pt=Ot[3];if(qe&&Je)qe.obsSet=xe.obsSet;else{var ft=K.query(xe).then(function(mt){var $=mt.result;if(qe&&(qe.res=$),Le){for(var ut=0,$t=$.length;ut<$t;++ut)Object.freeze($[ut]);Object.freeze($)}else mt.result=_e($);return mt}).catch(function(mt){return pt&&qe&&Ce(pt,qe),Promise.reject(mt)});qe={obsSet:xe.obsSet,promise:ft,subscribers:new Set,type:"query",req:xe,dirty:!1},pt?pt.push(qe):(pt=[qe],ct||(ct=yc["idb://".concat(k,"/").concat(z)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}}),ct.queries.query[xe.query.index.name||""]=pt)}return xv(qe,pt,He,ht),qe.promise.then(function(mt){return{result:gu(mt.result,xe,ct==null?void 0:ct.optimisticOps,K,qe,Le)}})}});return ye}});return L}};function rs(A,k){return new Proxy(A,{get:function(L,z,K){return z==="db"?k:Reflect.get(L,z,K)}})}var Ci=function(){function A(k,L){var z=this;this._middlewares={},this.verno=0;var K=A.dependencies;this._options=L=i({addons:A.addons,autoOpen:!0,indexedDB:K.indexedDB,IDBKeyRange:K.IDBKeyRange,cache:"cloned"},L),this._deps={indexedDB:L.indexedDB,IDBKeyRange:L.IDBKeyRange};var oe=L.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var ye={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Be,dbReadyPromise:null,cancelOpen:Be,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:L.autoOpen};ye.dbReadyPromise=new Qt(function(Se){ye.dbReadyResolve=Se}),ye.openCanceller=new Qt(function(Se,Le){ye.cancelOpen=Le}),this._state=ye,this.name=k,this.on=Zf(this,"populate","blocked","versionchange","close",{ready:[Dr,Be]}),this.on.ready.subscribe=E(this.on.ready.subscribe,function(Se){return function(Le,Ke){A.vip(function(){var He=z._state;if(He.openComplete)He.dbOpenError||Qt.resolve().then(Le),Ke&&Se(Le);else if(He.onReadyBeingFired)He.onReadyBeingFired.push(Le),Ke&&Se(Le);else{Se(Le);var ht=z;Ke||Se(function Ot(){ht.on.ready.unsubscribe(Le),ht.on.ready.unsubscribe(Ot)})}})}}),this.Collection=tS(this),this.Table=Qx(this),this.Transaction=rS(this),this.Version=lS(this),this.WhereClause=iv(this),this.on("versionchange",function(Se){Se.newVersion>0?console.warn("Another connection wants to upgrade database '".concat(z.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(z.name,"'. Closing db now to resume the delete request.")),z.close({disableAutoOpen:!1})}),this.on("blocked",function(Se){!Se.newVersion||Se.newVersion<Se.oldVersion?console.warn("Dexie.delete('".concat(z.name,"') was blocked")):console.warn("Upgrade '".concat(z.name,"' blocked by other connection holding version ").concat(Se.oldVersion/10))}),this._maxKey=Cn(L.IDBKeyRange),this._createTransaction=function(Se,Le,Ke,He){return new z.Transaction(Se,Le,Ke,z._options.chromeTransactionDurability,He)},this._fireOnBlocked=function(Se){z.on("blocked").fire(Se),Ks.filter(function(Le){return Le.name===z.name&&Le!==z&&!Le._state.vcFired}).map(function(Le){return Le.on("versionchange").fire(Se)})},this.use(_c),this.use(Sv),this.use(fS),this.use(fh),this.use(bc);var xe=new Proxy(this,{get:function(Se,Le,Ke){if(Le==="_vip")return!0;if(Le==="table")return function(ht){return rs(z.table(ht),xe)};var He=Reflect.get(Se,Le,Ke);return He instanceof H_?rs(He,xe):Le==="tables"?He.map(function(ht){return rs(ht,xe)}):Le==="_createTransaction"?function(){var ht=He.apply(this,arguments);return rs(ht,xe)}:He}});this.vip=xe,oe.forEach(function(Se){return Se(z)})}return A.prototype.version=function(k){if(isNaN(k)||k<.1)throw new Ie.Type("Given version is not a positive number");if(k=Math.round(k*10)/10,this.idbdb||this._state.isBeingOpened)throw new Ie.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,k);var L=this._versions,z=L.filter(function(K){return K._cfg.version===k})[0];return z||(z=new this.Version(k),L.push(z),L.sort(sv),z.stores({}),this._state.autoSchema=!1,z)},A.prototype._whenReady=function(k){var L=this;return this.idbdb&&(this._state.openComplete||pn.letThrough||this._vip)?k():new Qt(function(z,K){if(L._state.openComplete)return K(new Ie.DatabaseClosed(L._state.dbOpenError));if(!L._state.isBeingOpened){if(!L._state.autoOpen){K(new Ie.DatabaseClosed);return}L.open().catch(Be)}L._state.dbReadyPromise.then(z,K)}).then(k)},A.prototype.use=function(k){var L=k.stack,z=k.create,K=k.level,oe=k.name;oe&&this.unuse({stack:L,name:oe});var ye=this._middlewares[L]||(this._middlewares[L]=[]);return ye.push({stack:L,create:z,level:K??10,name:oe}),ye.sort(function(xe,Se){return xe.level-Se.level}),this},A.prototype.unuse=function(k){var L=k.stack,z=k.name,K=k.create;return L&&this._middlewares[L]&&(this._middlewares[L]=this._middlewares[L].filter(function(oe){return K?oe.create!==K:z?oe.name!==z:!1})),this},A.prototype.open=function(){var k=this;return wl(Jo,function(){return we(k)})},A.prototype._close=function(){var k=this._state,L=Ks.indexOf(this);if(L>=0&&Ks.splice(L,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}k.isBeingOpened||(k.dbReadyPromise=new Qt(function(z){k.dbReadyResolve=z}),k.openCanceller=new Qt(function(z,K){k.cancelOpen=K}))},A.prototype.close=function(k){var L=k===void 0?{disableAutoOpen:!0}:k,z=L.disableAutoOpen,K=this._state;z?(K.isBeingOpened&&K.cancelOpen(new Ie.DatabaseClosed),this._close(),K.autoOpen=!1,K.dbOpenError=new Ie.DatabaseClosed):(this._close(),K.autoOpen=this._options.autoOpen||K.isBeingOpened,K.openComplete=!1,K.dbOpenError=null)},A.prototype.delete=function(k){var L=this;k===void 0&&(k={disableAutoOpen:!0});var z=arguments.length>0&&typeof arguments[0]!="object",K=this._state;return new Qt(function(oe,ye){var xe=function(){L.close(k);var Se=L._deps.indexedDB.deleteDatabase(L.name);Se.onsuccess=ii(function(){cS(L._deps,L.name),oe()}),Se.onerror=ts(ye),Se.onblocked=L._fireOnBlocked};if(z)throw new Ie.InvalidArgument("Invalid closeOptions argument to db.delete()");K.isBeingOpened?K.dbReadyPromise.then(xe):xe()})},A.prototype.backendDB=function(){return this.idbdb},A.prototype.isOpen=function(){return this.idbdb!==null},A.prototype.hasBeenClosed=function(){var k=this._state.dbOpenError;return k&&k.name==="DatabaseClosed"},A.prototype.hasFailed=function(){return this._state.dbOpenError!==null},A.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(A.prototype,"tables",{get:function(){var k=this;return s(this._allTables).map(function(L){return k._allTables[L]})},enumerable:!1,configurable:!0}),A.prototype.transaction=function(){var k=Lt.apply(this,arguments);return this._transaction.apply(this,k)},A.prototype._transaction=function(k,L,z){var K=this,oe=pn.trans;(!oe||oe.db!==this||k.indexOf("!")!==-1)&&(oe=null);var ye=k.indexOf("?")!==-1;k=k.replace("!","").replace("?","");var xe,Se;try{if(Se=L.map(function(Ke){var He=Ke instanceof K.Table?Ke.name:Ke;if(typeof He!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return He}),k=="r"||k===Kf)xe=Kf;else if(k=="rw"||k==Gf)xe=Gf;else throw new Ie.InvalidArgument("Invalid transaction mode: "+k);if(oe){if(oe.mode===Kf&&xe===Gf)if(ye)oe=null;else throw new Ie.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");oe&&Se.forEach(function(Ke){if(oe&&oe.storeNames.indexOf(Ke)===-1)if(ye)oe=null;else throw new Ie.SubTransaction("Table "+Ke+" not included in parent transaction.")}),ye&&oe&&!oe.active&&(oe=null)}}catch(Ke){return oe?oe._promise(null,function(He,ht){ht(Ke)}):Oi(Ke)}var Le=un.bind(null,this,xe,Se,oe,z);return oe?oe._promise(xe,Le,"lock"):pn.trans?wl(pn.transless,function(){return K._whenReady(Le)}):this._whenReady(Le)},A.prototype.table=function(k){if(!p(this._allTables,k))throw new Ie.InvalidTable("Table ".concat(k," does not exist"));return this._allTables[k]},A}(),Ac=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",mS=function(){function A(k){this._subscribe=k}return A.prototype.subscribe=function(k,L,z){return this._subscribe(!k||typeof k=="function"?{next:k,error:L,complete:z}:k)},A.prototype[Ac]=function(){return this},A}(),im;try{im={indexedDB:o.indexedDB||o.mozIndexedDB||o.webkitIndexedDB||o.msIndexedDB,IDBKeyRange:o.IDBKeyRange||o.webkitIDBKeyRange}}catch{im={indexedDB:null,IDBKeyRange:null}}function G_(A){var k=!1,L,z=new mS(function(K){var oe=ve(A);function ye(pt){var ft=Ed();try{oe&&Id();var mt=uu(A,pt);return oe&&(mt=mt.finally(cu)),mt}finally{ft&&Td()}}var xe=!1,Se,Le={},Ke={},He={get closed(){return xe},unsubscribe:function(){xe||(xe=!0,Se&&Se.abort(),ht&&hu.storagemutated.unsubscribe(Je))}};K.start&&K.start(He);var ht=!1,Ot=function(){return Yf(ct)};function qe(){return pv(Ke,Le)}var Je=function(pt){rm(Le,pt),qe()&&Ot()},ct=function(){if(!(xe||!im.indexedDB)){Le={};var pt={};Se&&Se.abort(),Se=new AbortController;var ft={subscr:pt,signal:Se.signal,requery:Ot,querier:A,trans:null},mt=ye(ft);Promise.resolve(mt).then(function($){k=!0,L=$,!(xe||ft.signal.aborted)&&(Le={},Ke=pt,!ee(Ke)&&!ht&&(hu(gc,Je),ht=!0),Yf(function(){return!xe&&K.next&&K.next($)}))},function($){k=!1,["DatabaseClosedError","AbortError"].includes($==null?void 0:$.name)||xe||Yf(function(){xe||K.error&&K.error($)})})}};return setTimeout(Ot,0),He});return z.hasValue=function(){return k},z.getValue=function(){return L},z}var Ao=Ci;g(Ao,i(i({},Oe),{delete:function(A){var k=new Ao(A,{addons:[]});return k.delete()},exists:function(A){return new Ao(A,{addons:[]}).open().then(function(k){return k.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(A){try{return uS(Ao.dependencies).then(A)}catch{return Oi(new Ie.MissingAPI)}},defineClass:function(){function A(k){c(this,k)}return A},ignoreTransaction:function(A){return pn.trans?wl(pn.transless,A):A()},vip:hv,async:function(A){return function(){try{var k=lt(A.apply(this,arguments));return!k||typeof k.then!="function"?Qt.resolve(k):k}catch(L){return Oi(L)}}},spawn:function(A,k,L){try{var z=lt(A.apply(L,k||[]));return!z||typeof z.then!="function"?Qt.resolve(z):z}catch(K){return Oi(K)}},currentTransaction:{get:function(){return pn.trans||null}},waitFor:function(A,k){var L=Qt.resolve(typeof A=="function"?Ao.ignoreTransaction(A):A).timeout(k||6e4);return pn.trans?pn.trans.waitFor(L):L},Promise:Qt,debug:{get:function(){return sr},set:function(A){se(A)}},derive:b,extend:c,props:g,override:E,Events:Zf,on:hu,liveQuery:G_,extendObservabilitySet:rm,getByKeyPath:P,setByKeyPath:M,delByKeyPath:C,shallowClone:F,deepClone:_e,getObjectDiff:vv,cmp:ir,asap:O,minKey:Xg,addons:[],connections:Ks,errnames:Ve,dependencies:im,cache:yc,semVer:Kp,version:Kp.split(".").map(function(A){return parseInt(A)}).reduce(function(A,k,L){return A+k/Math.pow(10,L*2)})})),Ao.maxKey=Cn(Ao.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(hu(gc,function(A){if(!is){var k;k=new CustomEvent(Fr,{detail:A}),is=!0,dispatchEvent(k),is=!1}}),addEventListener(Fr,function(A){var k=A.detail;is||Al(k)}));function Al(A){var k=is;try{is=!0,hu.storagemutated.fire(A),ue(A,!0)}finally{is=k}}var is=!1,vu,hh=function(){};typeof BroadcastChannel<"u"&&(hh=function(){vu=new BroadcastChannel(Fr),vu.onmessage=function(A){return A.data&&Al(A.data)}},hh(),typeof vu.unref=="function"&&vu.unref(),hu(gc,function(A){is||vu.postMessage(A)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(A){if(!Ci.disableBfCache&&A.persisted){sr&&console.debug("Dexie: handling persisted pagehide"),vu==null||vu.close();for(var k=0,L=Ks;k<L.length;k++){var z=L[k];z.close({disableAutoOpen:!1})}}}),addEventListener("pageshow",function(A){!Ci.disableBfCache&&A.persisted&&(sr&&console.debug("Dexie: handling persisted pageshow"),hh(),Al({all:new gi(-1/0,[[]])}))}));function gS(A){return new Xf({add:A})}function vS(A){return new Xf({remove:A})}function ar(A,k){return new Xf({replacePrefix:[A,k]})}Qt.rejectionMapper=tt,se(sr);var br=Object.freeze({__proto__:null,Dexie:Ci,liveQuery:G_,Entity:Zp,cmp:ir,PropModSymbol:Jx,PropModification:Xf,replacePrefix:ar,add:gS,remove:vS,default:Ci,RangeSet:gi,mergeRanges:dh,rangesOverlap:K_});return i(Ci,br,{default:Ci}),Ci})}(tT)),tT.exports}var zDe=WDe();const zR=WR(zDe),TG=Symbol.for("Dexie"),Aw=globalThis[TG]||(globalThis[TG]=zR);if(zR.semVer!==Aw.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${zR.semVer} and ${Aw.semVer}`);const{liveQuery:Wdt,mergeRanges:zdt,rangesOverlap:jdt,RangeSet:Hdt,cmp:Ydt,Entity:qdt,PropModSymbol:Kdt,PropModification:Gdt,replacePrefix:Zdt,add:Qdt,remove:Xdt}=Aw,jDe={loading:"Play",playing:"Pause",paused:"Play",ready:"Play",finished:"RotateRight",error:"ArrowRotate"},HDe={loading:"Loading",playing:"Pause",paused:"Play",ready:"Play",finished:"Replay",error:"Reload"},YDe=5,qDe=15e3,KDe=t=>{const e=l0(null),n=re(!1),r=jt({currentTime:0,duration:0,isPlaying:!1,playingState:Oa.loading,seekingTime:!1}),i=re(0);let a=null;const o=re(0),s=()=>{dn(()=>{var D;i.value++,r.playingState=Oa.loading,r.currentTime=0,r.duration=0,(D=e.value)==null||D.load()})};Ge(t.resourceURL,()=>{s()},{immediate:!0}),Ge(()=>r.playingState,()=>{o.value++});const l=()=>{if(e.value){if(r.playingState===Oa.error){s();return}switch(o.value++,n.value=!n.value,r.playingState){case Oa.playing:e.value.pause(),r.playingState=Oa.paused;break;case Oa.paused:e.value.play(),r.playingState=Oa.playing;break;case Oa.ready:e.value.play(),r.playingState=Oa.playing;break;case Oa.finished:e.value.play(),r.playingState=Oa.playing;break}}},c=Z(()=>jDe[r.playingState]),f=Z(()=>({label:"",type:"tertiary",size:"small"})),h=async D=>{if(typeof document>"u")return 0;const O=document.createElement("video"),V=()=>new Promise((M,C)=>{const F=()=>{O.duration===1/0?(O.currentTime=Number.MAX_SAFE_INTEGER,O.ontimeupdate=()=>{O.ontimeupdate=null,M(O.duration),O.currentTime=0}):M(O.duration)},W=()=>C(O.error);O.addEventListener("loadedmetadata",F,{once:!0}),O.addEventListener("error",W,{once:!0})});let P=null;try{return O.src=typeof D=="string"?D:P=URL.createObjectURL(D),await V()}finally{P&&URL.revokeObjectURL(P)}},p=async()=>{if(e.value)try{const D=t.resourceURL.value;if(D){const O=e.value.duration===1/0?await h(D):e.value.duration;r.duration=Math.ceil(O)}r.playingState=Oa.ready}catch(D){console.error("Error loading metadata:",D),r.playingState=Oa.error}};let g=null,y=0;const v=D=>{y=D.target.currentTime,g==null&&(g=(typeof window<"u"?window.requestAnimationFrame:O=>setTimeout(()=>O(performance.now()),16))(()=>{r.currentTime=y,typeof window<"u"&&g&&window.cancelAnimationFrame(g),g=null}))},b=()=>{r.playingState=Oa.finished,r.currentTime=Math.ceil(r.duration)},w=()=>{i.value<YDe?(r.playingState=Oa.loading,a&&clearTimeout(a),a=window.setTimeout(()=>{s()},qDe)):r.playingState=Oa.error},S=D=>`${String(Math.floor(D/60)).padStart(2,"0")}:${String(Math.floor(D%60)).padStart(2,"0")}`,T=()=>{var D,O;r.seekingTime=!0,n.value?((D=e.value)==null||D.play(),r.playingState=Oa.playing):((O=e.value)==null||O.pause(),r.playingState=Oa.paused)},_=()=>{if(!e.value){r.seekingTime=!1;return}e.value.currentTime=r.currentTime,r.seekingTime=!1},E=Z(()=>HDe[r.playingState]);return Cs(()=>{a&&(clearTimeout(a),a=null),typeof window<"u"&&g&&(window.cancelAnimationFrame(g),g=null)}),{audioPlayerRef:e,isPlayingAudio:n,audioState:r,togglePlay:l,initAudio:s,icon:c,buttonConfig:f,handleLoadedMetadata:p,updatePlayingTime:v,handleAudioReset:b,formatValue:S,handleOnMouseDownProgressTime:T,handleOnMouseUpProgressTime:_,renderKey:o,handleError:w,iconTooltip:E}},GDe={class:"preview-audio-ce",part:"audio-preview"},ZDe={key:0,class:"audio-loading-indicator"},QDe={class:"seeker"},XDe=["src"],JDe=["max"],eOe={class:"audio-duration"},tOe=Qe({__name:"AudioPlayback.ce",props:{resourceURL:{default:"",type:String}},setup(t,{expose:e}){const n=qi,r=t,i=re(r.resourceURL),a=re(0);Ge(()=>r.resourceURL,T=>{i.value=T,a.value=Math.random()},{immediate:!0});const{audioPlayerRef:o,audioState:s,togglePlay:l,iconTooltip:c,icon:f,handleLoadedMetadata:h,updatePlayingTime:p,handleError:g,handleAudioReset:y,formatValue:v,handleOnMouseDownProgressTime:b,handleOnMouseUpProgressTime:w,initAudio:S}=KDe({resourceURL:i});return e({load:()=>{S()}}),(T,_)=>(R(),Y("div",GDe,[q(s).playingState==q(Oa).loading?Ct((R(),Y("div",ZDe,[..._[11]||(_[11]=[X("div",{class:"loader"},null,-1)])])),[[q(n),{content:q(c),delay:[300,0]}]]):Ct((R(),Y("button",{key:1,class:"button-icon-preview",part:"audio-control",onClick:_[0]||(_[0]=(...E)=>q(l)&&q(l)(...E))},[he(Sw,{name:q(f)},null,8,["name"])])),[[q(n),{content:q(c),delay:[300,0]}]]),X("div",QDe,[X("audio",{ref_key:"audioPlayerRef",ref:o,hidden:"",preload:"auto",onPlay:_[2]||(_[2]=E=>q(s).isPlaying=!0),onPause:_[3]||(_[3]=E=>q(s).isPlaying=!1),onEnded:_[4]||(_[4]=(...E)=>q(y)&&q(y)(...E)),onLoadedmetadata:_[5]||(_[5]=(...E)=>q(h)&&q(h)(...E)),onTimeupdate:_[6]||(_[6]=(...E)=>q(p)&&q(p)(...E))},[X("source",{src:i.value,onError:_[1]||(_[1]=(...E)=>q(g)&&q(g)(...E))},null,40,XDe)],544),Ct(X("input",{"onUpdate:modelValue":_[7]||(_[7]=E=>q(s).currentTime=E),class:"slider",type:"range",min:"0",max:Math.ceil(q(s).duration),onClick:_[8]||(_[8]=Rt(()=>{},["stop"])),onMousedown:_[9]||(_[9]=Rt((...E)=>q(b)&&q(b)(...E),["stop"])),onMouseup:_[10]||(_[10]=Rt((...E)=>q(w)&&q(w)(...E),["stop"]))},null,40,JDe),[[tl,q(s).currentTime]])]),X("span",eOe,nt(q(v)(q(s).currentTime))+" | "+nt(q(v)(q(s).duration)),1)]))}}),nOe=`.preview-audio-ce{display:grid;grid-template-columns:24px auto 100px;gap:4px;max-height:24px;min-height:24px;height:24px;box-sizing:border-box;max-width:250px}.preview-audio-ce .arbo-btn{height:24px!important}.preview-audio-ce .seeker{display:flex;align-items:center}.preview-audio-ce .seeker .slider{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:2px;background:#d3d3d3;outline:none;opacity:.7;-webkit-transition:.2s;transition:opacity .2s}.preview-audio-ce .seeker .slider:hover{opacity:1}.preview-audio-ce .seeker .slider::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:2px;height:12px;background:#3c9bfa;cursor:pointer}.preview-audio-ce .seeker .slider::-moz-range-thumb{width:2px;height:12px;background:#3c9bfa;cursor:pointer}.preview-audio-ce .audio-duration{height:100%;display:inline-flex;align-items:center;justify-content:center}
|
|
105
105
|
`,rOe=Ht(tOe,[["styles",[nOe]]]),jR=new Aw("CommentFile");jR.version(1).stores({files:"++id, files "});const iOe={[An.pending]:"Stop the upload",[An.uploading]:"Stop the uploading",[An.uploadSucceed]:"Upload has been succeeded",[An.uploadFailed]:"Upload failed",[An.loading]:"Delete the file",[An.loadSucceed]:"Delete the file",[An.loadFailed]:"Delete the file",[An.default]:"Delete the file"},aOe={[An.pending]:"Xmark",[An.uploading]:"Xmark",[An.uploadSucceed]:"Check",[An.uploadFailed]:"Xmark",[An.loading]:"TrashCan",[An.loadSucceed]:"TrashCan",[An.loadFailed]:"TrashCan",[An.default]:"TrashCan"},oOe=3,sOe={name:"CommentUploadFile",components:{ImageSkeletonCe:JE,ArboButton:Nt,SvgRenderCe:Sw,AudioPlaybackCe:rOe},directives:{arboTooltip:qi},props:{fileid:{type:String,required:!0},path:{type:String,default:""},mimetype:{type:String,default:"application/octet-stream"},name:{type:String,default:"Untitled"},thumbnail:{type:String,default:""}},data(){return{fileStorage:XE(),resourceURL:"",thumbnailUrl:this.thumbnail||"",renderKey:0,bc:null,FileStatus:An,retryCount:0}},computed:{uploadStatus(){var t,e;const n=(e=(t=this.fileStorage)==null?void 0:t.uploadingStatus)==null?void 0:e.value;return(n==null?void 0:n[this.fileid])||An.loading},displayType(){return kG(this.mimetype)},iconName(){return aOe[this.uploadStatus]},fileUploadTooltip(){return iOe[this.uploadStatus]}},mounted(){var t;try{const e=((t=document.querySelector("main"))==null?void 0:t.getAttribute("id"))||"default";this.bc=new BroadcastChannel(`file-upload-channel-${e}`),this.loadResourceLink()}catch(e){console.error("[CommentUploadFile] BroadcastChannel error",e)}},beforeUnmount(){var t;(t=this.bc)==null||t.close()},methods:{updateStatus(t){var e,n;const r=(n=(e=this.fileStorage)==null?void 0:e.uploadingStatus)==null?void 0:n.value;r&&typeof r=="object"&&(r[this.fileid]=t)},async getTemporaryResourceLink(){try{const t=await this.fileStorage.fetchResourceURL({path:this.path});if(!(t!=null&&t.url))throw new Error("Resource URL is missing");return this.applyFetchedResource(t.url),this.updateStatus(An.loadSucceed),t}catch(t){return console.error("[CommentUploadFile] temp resource error",t),this.updateStatus(An.loadFailed),null}},getDataCommentId(t){var e;if(t!=null)return t.attributes.getNamedItem("data-comment-id")?(e=t.attributes.getNamedItem("data-comment-id"))==null?void 0:e.value.toString():this.getDataCommentId((t==null?void 0:t.offsetParent)||null)},loadResourceLink(){try{this.updateStatus(An.loading);const t=this.$refs.rootCommentFile,e=this.getDataCommentId(t);e?this.getPermanentResourceLink(e):this.getTemporaryResourceLink()}catch(t){console.error("loadResourceLink",t),this.retryCount++,this.retryCount<oOe&&(this.updateStatus(An.loading),setTimeout(()=>{this.loadResourceLink()},15e3))}},async getPermanentResourceLink(t){const e=`${t}_${this.name}`;try{const n=await jR.files.where("id").equals(e).first();if(!n)throw this.updateStatus(An.loadFailed),new Error("Permanent resource not found");this.displayType==="audio"?this.applyFetchedResource(n.url):["image","video"].includes(this.displayType)&&(this.thumbnailUrl=this.displayType==="image"?n.path:n.thumbnail),this.renderKey++,this.updateStatus(An.loadSucceed)}catch(n){throw console.error("[CommentUploadFile] permanent link error",{error:n,_fileid:e}),this.updateStatus(An.loadFailed),new Error("Permanent resource not found")}},applyFetchedResource(t){this.displayType==="audio"?(this.resourceURL=t,dn(()=>{var e;const n=this.$refs.audioPlayerRef;(e=n==null?void 0:n.load)==null||e.call(n)})):this.thumbnailUrl=t},async getURL(){try{const t=this.$refs.rootCommentFile,e=this.getDataCommentId(t);if(!e)return{data:null,commentId:null};const n=`${e}_${this.name}`;return{data:await jR.files.where("id").equals(n).first(),commentId:e}}catch(t){return console.error("getURL from IDB",t),{data:null,commentId:null}}},async handleOpenCommentFile(t){var e;if(this.displayType==="audio"){t.preventDefault();return}const n=await this.getURL(),r={mimeType:this.mimetype??null,name:this.name??null,data:n.data,commenttype:n.commentId?"saved":"temporary",timestamp:fn.now().toFormat("HH:mm:ss"),path:this.path};(e=this.bc)==null||e.postMessage(r)},onLoadSuccess(){this.updateStatus(An.loadSucceed)},retryUpload(){var t,e;(e=(t=this.fileStorage)==null?void 0:t.retryUpload)==null||e.call(t,this.fileid)},handleClick(t){var e,n,r,i,a,o,s,l;if(t==="delete")return(n=(e=this.fileStorage)==null?void 0:e.removeFile)==null?void 0:n.call(e,this.fileid);const c=this.uploadStatus;return c<=An.uploading?(i=(r=this.fileStorage)==null?void 0:r.stopUploading)==null?void 0:i.call(r,this.fileid):c===An.uploadFailed?(o=(a=this.fileStorage)==null?void 0:a.retryUpload)==null?void 0:o.call(a,this.fileid):(l=(s=this.fileStorage)==null?void 0:s.removeFile)==null?void 0:l.call(s,this.fileid)}}},lOe={key:0,class:"arbo-label__prefix arbo__icon-btn"},uOe={key:0,class:"arbo-label__main"},cOe={key:0,class:"arbo-label__suffix arbo__icon-btn"},dOe=Qe({__name:"Label.ce",props:{...il,prefixIcon:{type:String,default:""},suffixIcon:{type:String,default:""},label:{type:String,default:"Here is label"},tooltipLabel:{type:String,default:""}},setup(t){const e=t;return(n,r)=>(R(),Re(ur,{class:"arbo-label",content:e.tooltipLabel,delay:[300,0]},{default:ze(()=>[ke(n.$slots,"prefix",{prefixIcon:e.prefixIcon},()=>[e.prefixIcon?(R(),Y("div",lOe,[he(Yn,{class:"arbo-label__prefix--icon",name:e.prefixIcon},null,8,["name"])])):pe("",!0)],!0),ke(n.$slots,"default",{},()=>[e.label?(R(),Y("div",uOe,nt(e.label),1)):pe("",!0)],!0),ke(n.$slots,"suffix",{suffixIcon:e.suffixIcon},()=>[e.suffixIcon?(R(),Y("div",cOe,[he(Yn,{class:"arbo-label__prefix--icon",name:e.suffixIcon},null,8,["name"])])):pe("",!0)],!0)]),_:3},8,["content"]))}}),fOe=`.arbo-label[data-v-755e58f1]{display:flex;align-items:center}.arbo-label__main[data-v-755e58f1]{font-weight:inherit;font-size:inherit;color:inherit;line-height:inherit}.arbo-label__prefix[data-v-755e58f1],.arbo-label__suffix[data-v-755e58f1]{max-width:32px;max-height:32px;object-fit:contain;display:flex;align-items:center;color:#000}
|
|
106
|
-
`,Gi=Ht(dOe,[["styles",[fOe]],["__scopeId","data-v-755e58f1"]]),si={isValid:(t,e)=>!t||typeof t=="string"?!1:fn.fromMillis(t,{zone:e}).isValid,format:(t,e,n)=>si.isValid(t,n)?fn.fromMillis(t,{zone:n}).toFormat(e):"",standardize:(t,e,n)=>{const r=typeof t=="number"?t:t.getTime(),i=fn.fromMillis(r,{zone:n});if(!i.isValid)throw new Error(`Invalid date: ${t}`);return e==="start"?i.startOf("day").toMillis():i.endOf("day").toMillis()},isSameDay:(t,e,n)=>{if(!t&&!e)return!0;if(!t||!e)return!1;const r=fn.fromMillis(t,{zone:n}),i=fn.fromMillis(e,{zone:n});return!r.isValid&&!i.isValid?!0:!r.isValid||!i.isValid?!1:r.hasSame(i,"day")},toStructuredDate:(t,e)=>{if(t==null||t==="")return null;const n=fn.fromMillis(t,{zone:e});return n.isValid?{date:n.day,months:n.month,years:n.year,dateString:n.toISO()||"",timezone:e,value:n.toJSDate(),toMillis:n.toMillis()??null}:null},getInitialRangeValue:(t,e,n)=>{const r=t?new Date(t).getTime():"",i=e?new Date(e).getTime():"";return r&&i?[r,i]:!r&&!i?["",""]:r&&!i?[r,""]:!r&&i?["",i]:["",""]}},nT=(t,e)=>{try{return t()}catch(n){const r=n instanceof Error?n:new Error(String(n));return console.error("Date operation failed:",r),e==null||e(r),null}},Pr={log:(t,...e)=>{ge.env.NODE_ENV==="development"&&console.log(`%c[DateRange] ${t}`,"color: white; font-weight: bold; font-size:24px",...e)},warn:(t,...e)=>{ge.env.NODE_ENV==="development"&&console.warn(`%c[DateRange] ${t}`,"color: orange; font-weight: bold;",...e)},error:(t,...e)=>{console.error(`%c[DateRange] ${t}`,"color: red; font-weight: bold;",...e)}},rT={DEFAULT_TIMEZONE:fn.local().zoneName,CLEANUP_DELAY:100,WATCH_OPTIONS:{immediate:!0,deep:!1},SELECTION_WATCH_OPTIONS:{deep:!0,immediate:!0}},hOe=(t,e,n,r,i)=>{try{const[a,o]=t,s=n===Vm.START&&r,l=n===Vm.END&&r,c=()=>{const p=si.isValid(a,i),g=si.isValid(o,i);return p&&g?"filled":!p&&!g?"both_empty":!p&&g?"empty_start":"empty_end"};if(!r)return"none";const f={openStartOnStart:s&&e==="start",openStartOnEnd:s&&e==="end",openEndOnStart:l&&e==="start",openEndOnEnd:l&&e==="end"},h=c();switch(!0){case(h==="both_empty"&&f.openStartOnStart):return"initiate";case(h==="both_empty"&&f.openStartOnEnd):return"update";case(h==="both_empty"&&f.openEndOnStart):return"initiate";case(h==="both_empty"&&f.openEndOnEnd):return"strictUpdate";case(h==="empty_start"&&f.openStartOnStart):return"initiate";case(h==="empty_start"&&f.openStartOnEnd):return"update";case(h==="empty_start"&&f.openEndOnStart):return"initiate";case(h==="empty_start"&&f.openEndOnEnd):return"update";case(h==="empty_end"&&f.openStartOnStart):return"initiate";case(h==="empty_end"&&f.openStartOnEnd):return"update";case(h==="empty_end"&&f.openEndOnStart):return"initiate";case(h==="empty_end"&&f.openEndOnEnd):return"update";case(h==="filled"&&f.openStartOnStart):return"strictUpdate";case(h==="filled"&&f.openStartOnEnd):return"strictUpdate"}return"none"}catch(a){return Pr.error("Error calculating date picker mode:",a),"update"}},pOe=(t,e)=>{const n=re(),r=re(),i=re(["",""]),a=re(["",""]),o=re({start:"",end:""}),s=re(0),l=re(!1),c=re(!1),f=Z(()=>t.timezone||rT.DEFAULT_TIMEZONE),h=jt({focusingPosition:"none",openingCalendar:!1}),p=re({start:i.value[0],end:i.value[1]}),g=Z(()=>h.focusingPosition!=="none"),y=Z(()=>hOe([p.value.start,p.value.end],h.focusingPosition,n.value,g.value,f.value)),v=Z(()=>({start:si.toStructuredDate(i.value[0],f.value),end:si.toStructuredDate(i.value[1],f.value)})),b=()=>{try{if(c.value)return;i.value=si.getInitialRangeValue(t.startDate,t.dueDate,f.value),o.value={start:i.value[0],end:i.value[1]},p.value={start:i.value[0],end:i.value[1]},w()}catch(G){Pr.error("Error in setupDatePicker:",G)}},w=()=>{try{if(c.value)return;a.value=JSON.parse(JSON.stringify(i.value)),h.focusingPosition="none",n.value=void 0,s.value++}catch(G){Pr.error("Error in cleanUp:",G)}},S=()=>{var G;try{if(c.value)return;(G=r.value)==null||G.closeMenu()}catch(ve){Pr.error("Failed to close calendar",ve)}finally{w()}},T=G=>{try{if(c.value)return;(G()||y.value==="strictUpdate"||y.value==="update")&&(_(),S())}catch(ve){Pr.error("Error in handleClickOutside:",ve)}},_=()=>{var G,ve;try{if(c.value)return;const Ue=[p.value.start?new Date(p.value.start):null,p.value.end?new Date(p.value.end):null];(G=r.value)==null||G.selectDate(Ue),(ve=r.value)==null||ve.updateInternalModelValue(Ue),C(),w(),dn(()=>{S()})}catch(Ue){Pr.error("confirmSelect failed",Ue)}},E=(G,ve,Ue)=>{try{if(c.value)return;G.stopPropagation(),h.focusingPosition===ve?S():Ue()}catch(ce){Pr.error("Error in toggleCalendar:",ce)}},D=G=>{n.value||(n.value=G),g.value||ee(),h.focusingPosition=G},O=G=>{try{G?E(G,"start",()=>D(Vm.START)):D(Vm.START)}catch(ve){Pr.error("Error in selectStartField:",ve)}},V=G=>{try{G?E(G,"end",()=>D(Vm.END)):D(Vm.END)}catch(ve){Pr.error("Error in selectEndField:",ve)}},P=()=>{try{if(c.value)return;i.value[0]="",p.value.start="",o.value.start="",C()}catch(G){Pr.error("Failed to clear start date",G)}},M=()=>{try{if(c.value)return;i.value[1]="",p.value.end="",o.value.end="",C()}catch(G){Pr.error("Failed to clear end date",G)}},C=()=>{try{if(c.value)return;const[G,ve]=[t.startDate?new Date(t.startDate||"").getTime():"",t.dueDate?new Date(t.dueDate||"").getTime():""],[Ue,ce]=[si.isSameDay(i.value[0],G,f.value),si.isSameDay(i.value[1],ve,f.value)];if(!(Ue&&ce))e("update",v.value);else throw Pr.warn("No changes detected for sync",{selectedRange:i.value,oldStart:G,oldEnd:ve,sameStart:Ue,sameEnd:ce}),new Error("no change")}catch(G){Pr.warn("Sync action failed",G)}},F=G=>{try{if(c.value)return;const ve=nT(()=>si.standardize(G,"end",f.value),Ue=>Pr.error("Failed to update strict end",Ue));ve&&(i.value[1]=ve,h.focusingPosition="none",C(),S(),w())}catch(ve){Pr.error("updatestrictUpdate failed",ve)}},W=G=>{N.value=G},H=re(!0),j=G=>{H.value=!0;try{const ve=Number(G.getTime()),{end:Ue,start:ce}={end:()=>si.standardize(ve,"end",f.value),start:()=>si.standardize(ve,"start",f.value)};switch(!0){case y.value==="initiate":if(!i.value[0]&&!i.value[1]&&h.focusingPosition==="start"){o.value.start=ce(),i.value[0]=ce(),h.focusingPosition="end";return}else if(i.value[1]&&ve>Number(i.value[1])&&h.focusingPosition==="start"){o.value.start=ce(),o.value.end=Ue(),i.value[0]=ce(),i.value[1]=Ue(),h.focusingPosition="end";return}else o.value.start=ce(),i.value[0]=ce(),h.focusingPosition="end";break;case y.value==="strictUpdate":F(ve);break;case y.value==="update":h.focusingPosition==="end"?(ve<Number(o.value.start)?(o.value.start=ce(),o.value.end=Ue(),i.value[0]=ce(),i.value[1]=Ue()):(i.value[1]=Ue()||"",o.value.end=Ue()||""),h.focusingPosition="end"):(i.value[0]=ce()||"",o.value.start=ce()||""),h.focusingPosition="end";break;case y.value==="none":console.error("No date selected");break}}catch(ve){Pr.error("Error in selectStartDate:",ve)}},N=re(["",""]),U=G=>{H.value=!0;try{const ve=G.getTime(),Ue=si.standardize(ve,"end",f.value);y.value==="strictUpdate"?F(ve):(i.value[1]=Ue,h.focusingPosition="end")}catch(ve){Pr.error("Error in selectEndDate:",ve)}},ee=()=>{var G;try{if(c.value)return;a.value=JSON.parse(JSON.stringify(i.value)),(G=r.value)==null||G.openMenu()}catch(ve){Pr.error("Error in handleOpenMenu:",ve)}},le=()=>{try{if(c.value)return;w()}catch(G){Pr.error("Error in callbackClosed:",G)}},_e=G=>{try{if(c.value)return;V(),dn(()=>{var ve;(ve=r.value)==null||ve.updateInternalModelValue([G,G])})}catch(ve){Pr.error("Error in handleInvalidRange:",ve)}},be=()=>{try{if(c.value)return;i.value=JSON.parse(JSON.stringify(a.value)),S()}catch(G){Pr.error("Error in cancelSelect:",G)}},Te=G=>{try{if(c.value)return;const ve=Array.isArray(G)&&G.length===1,Ue=Array.isArray(G)&&G.length===2,ce=G instanceof Date,Ye=G==null||Array.isArray(G)&&G.length===0,te=(ve||Ue)&&nT(()=>si.standardize(G[0],"start",f.value))||"",ae=Ue&&nT(()=>si.standardize(G[1],"end",f.value))||"",ne=ce&&nT(()=>si.standardize(G,"start",f.value))||"";switch(!0){case(ce&&G instanceof Date):H.value&&(i.value=[ne,""]);break;case(ve&&h.focusingPosition==="start"):H.value&&(i.value=[te,""]);break;case(ve&&h.focusingPosition==="end"):H.value&&(i.value=["",te]);break;case Ue:H.value&&(i.value=[te,ae]);break;case Ye:i.value=["",""];break}}catch(ve){Pr.error("Error in handleUpdateModelValue:",ve)}},J=G=>{try{if(c.value||!G||G.length<=1)return;p.value={start:G[0].getTime(),end:G[1].getTime()}}catch(ve){Pr.error("Error in handleInternalModelChange:",ve)}},me=()=>{try{if(c.value)return;T(()=>si.isValid(p.value.start)&&si.isValid(p.value.end))}catch(G){Pr.error("Error in focusOut:",G)}},Ee=Z(()=>{try{if(c.value)return{partialRange:!0,hasStart:!1,hasEnd:!1,case:"initial",showLastInRange:!1};const G=h.focusingPosition,ve=si.isValid(i.value[0],f.value),Ue=si.isValid(i.value[1],f.value),ce={partialRange:!0,hasStart:ve,hasEnd:Ue,case:"initial",showLastInRange:h.focusingPosition==="end"};let Ye={};switch(!0){case(G==="end"&&!ve&&!Ue):Ye={fixedStart:!1,fixedEnd:!1,case:"no start"};break;case(G==="start"&&ve&&Ue):Ye={fixedStart:!1,fixedEnd:!0,case:"block end"};break;case(G==="end"&&Ue&&ve):Ye={fixedStart:!0,fixedEnd:!1,case:"block start"};break}return{...ce,...Ye}}catch(G){return Pr.error("Error in rangeConfig computed:",G),{partialRange:!0,hasStart:!1,hasEnd:!1,case:"initial",showLastInRange:!1}}}),Ce=Z(()=>{try{const G=i.value[0]?new Date(i.value[0]):"",ve=i.value[1]?new Date(i.value[1]):"",Ue=si.isValid(i.value[0],f.value),ce=si.isValid(i.value[1],f.value),Ye=si.isValid(p.value.start,f.value),te=si.isValid(p.value.end,f.value);let ae=[];return te&&Ye?ae=[]:Ue&&G&&!ce?ae=[fn.fromJSDate(G,{zone:f.value}).startOf("day").toJSDate()]:!Ue&&ve&&ce&&(ae=[fn.fromJSDate(ve,{zone:f.value}).endOf("day").toJSDate()]),{dates:ae}}catch(G){return Pr.error("Error in highlightedDate computed:",G),{dates:[]}}}),de=Z(()=>({teleport:t.teleport,disabled:t.disabled,format:t.shortFormat,timezone:f.value,enableTimePicker:!1,multiCalendars:t.multipleCalendar,modelAuto:!0,onClickOutside:T}));return Ge([()=>t.startDate,()=>t.dueDate],()=>{try{if(c.value)return;i.value=si.getInitialRangeValue(t.startDate,t.dueDate,f.value),w()}catch(G){Pr.error("Watch error",{error:G,start:t.startDate,due:t.dueDate})}},rT.WATCH_OPTIONS),Ge(()=>t.timezone,()=>{var G;try{if(c.value)return;i.value=si.getInitialRangeValue(t.startDate,t.dueDate,t.timezone||rT.DEFAULT_TIMEZONE),(G=r.value)==null||G.handleFlow()}catch(ve){Pr.error("Error in timezone watcher:",ve)}}),Ge(()=>i.value,()=>{try{if(c.value)return;p.value={start:i.value[0],end:i.value[1]}}catch(G){Pr.error("Error in selectedRange watcher:",G)}},rT.SELECTION_WATCH_OPTIONS),Os(()=>{try{l.value=!0,b()}catch(G){Pr.error("Error in onBeforeMount:",G)}}),Na(()=>{try{c.value=!0,w(),r.value=null,i.value=["",""],a.value=["",""],o.value={start:"",end:""},p.value={start:"",end:""}}catch(G){Pr.error("Error in onUnmounted:",G)}}),{dateRangePickerRef:r,selectedRange:i,renderKey:s,isDestroyed:c,states:h,previewingDate:p,selectingRange:o,vueDatepickerConfiguration:de,rangeConfig:Ee,highlightedDate:Ce,datePickerMode:y,selectStartField:O,selectEndField:V,clearStartDate:P,clearEndDate:M,selectStartDate:j,selectEndDate:U,callbackClosed:le,handleInvalidRange:_e,cancelSelect:be,confirmSelect:_,handleUpdateModelValue:Te,handleInternalModelChange:J,cleanUp:w,handleClickOutside:T,focusOut:me,handleUpdateModelValueTz:W,drValue:N}},mOe={class:"rc__header flex flex-col items-center justify-center"},gOe={class:"rc__logo"},vOe={class:"rc__title text-center"},yOe={class:"rc__content"},bOe=["innerHTML"],_Oe={class:"rc__hovered"},wOe={class:"rc__hovered__main"},xOe={class:"rc__content"},SOe={class:"rc__actions flex items-center"},DG=Ht(Qe({__name:"ReportCard",props:{name:{type:String,default:"Completed Scenes Report"},subTitle:{type:String,default:"Download a report that includes the completed scenes."},logo:{type:String,default:"ReportCompletedScenes"},isShowBackFlipTile:{type:Boolean,default:!1},minHeight:{type:String,default:"224px"},downloadBtnLabel:{type:String,default:"Download report"},description:{type:String,default:"Download a report that includes the completed scenes."}},emits:["update-state-flip","clicked-download-btn"],setup(t,{emit:e}){const n=t,r=e;function i(){r("clicked-download-btn")}function a(){r("update-state-flip",!n.isShowBackFlipTile)}function o(){n.isShowBackFlipTile||a()}const s=Z(()=>({"--report-card__min-height":n.minHeight}));return(l,c)=>(R(),Y("div",{class:"report-card rc",style:_t(s.value)},[X("div",{class:"rc__body w-full",onClick:o},[X("div",{class:Fe(["rc__wrapper",{hovering:t.isShowBackFlipTile}])},[X("div",mOe,[X("div",gOe,[he(Yn,{class:"rc__logo--img",name:t.logo,type:"visual"},null,8,["name"])]),X("h3",vOe,nt(t.name),1),he(ur,{class:"rc__header--flip",content:"Flip",delay:[300,0]},{default:ze(()=>[he(Nt,{class:"rc__header--btn-flip",type:"secondary",label:"","suffix-icon":t.isShowBackFlipTile?"CustomFlipBack":"CustomFlipFront",onClick:Rt(a,["stop"])},null,8,["suffix-icon"])]),_:1})]),Ct(X("div",yOe,[X("div",{class:"rc__sub-title",innerHTML:t.subTitle},null,8,bOe)],512),[[Ln,!t.isShowBackFlipTile]]),Ct(X("div",_Oe,[X("div",wOe,[ke(l.$slots,"content",{isShowBackFlipTile:t.isShowBackFlipTile},()=>[X("div",xOe,nt(n.description),1)],!0)]),ke(l.$slots,"actions",{},()=>[X("div",SOe,[he(Nt,{class:"rc__actions--download-btn w-full",type:"primary",onClick:Rt(i,["stop"]),label:n.downloadBtnLabel},null,8,["label"])])],!0)],512),[[Ln,t.isShowBackFlipTile]])],2)])],4))}}),[["__scopeId","data-v-c4f48e45"]]),AOe=(t,e,n)=>{const r={truncate:"End date cleared because it was before start. Please pick an end date.",swap:"Dates auto-swapped because start was after end.",...t.messages},i=jt({startDate:null,endDate:null,timezone:t.timezone||"UTC",format:t.format||"",isSelectingStart:!1,isSelectingEnd:!1,rangeFeedback:{status:"idle",action:null,message:""},cacheStartDate:null,cacheEndDate:null,isDirty:!1});Os(()=>{var E;((E=t.modelValue)==null?void 0:E.length)===2&&(i.startDate=t.modelValue[0],i.endDate=t.modelValue[1]),i.cacheStartDate=i.startDate,i.cacheEndDate=i.endDate,i.isSelectingStart=!1,i.isSelectingEnd=!1,t.timezone&&(i.timezone=t.timezone)});const a=()=>{var E,D,O,V,P,M,C,F,W,H;e("tracing",JSON.parse(JSON.stringify(n.value))),e("update:start",i.startDate),e("update:end",i.endDate);const j={start:si.toStructuredDate(((E=i.startDate)==null?void 0:E.getTime())||"",i.timezone),end:si.toStructuredDate(((D=i.endDate)==null?void 0:D.getTime())||"",i.timezone)};(i.startDate||i.endDate)&&(e("legacyUpdate",j),e("update",[i.startDate,i.endDate])),i.isDirty=!(((V=(O=i.startDate)==null?void 0:O.getTime)==null?void 0:V.call(O))===((M=(P=i.cacheStartDate)==null?void 0:P.getTime)==null?void 0:M.call(P))&&((F=(C=i.endDate)==null?void 0:C.getTime)==null?void 0:F.call(C))===((H=(W=i.cacheEndDate)==null?void 0:W.getTime)==null?void 0:H.call(W)))},o=(E,D)=>{const O=fn.fromObject({year:E.year,month:E.month,day:E.day},{zone:i.timezone});return(D==="start"?O.startOf("day"):O.endOf("day")).toJSDate()},s=()=>{i.rangeFeedback.status="idle",i.rangeFeedback.action=null,i.rangeFeedback.message=""},l=E=>{t.enableRangeFeedback&&(i.rangeFeedback.status="corrected",i.rangeFeedback.action=E,i.rangeFeedback.message=E==="swap"?r.swap:r.truncate)},c=E=>{if(!(!i.startDate||!i.endDate)){if(i.startDate.getTime()<=i.endDate.getTime()){t.enableRangeFeedback&&s();return}if(E==="select-start"){const D={start:i.startDate,end:i.endDate};i.endDate=null,e("range:invalid",D),e("range:corrected",{start:i.startDate,end:i.endDate,action:"truncate"}),i.isSelectingEnd=!0,l("truncate"),t.enableRangeFeedback&&!i.rangeFeedback.message&&(i.rangeFeedback.message=r.truncate)}else{const D={start:i.startDate,end:i.endDate},O=i.startDate;i.startDate=i.endDate,i.endDate=O,e("range:invalid",D),e("range:corrected",{start:i.startDate,end:i.endDate,action:"swap"}),l("swap")}}},f=(E,D=!0)=>{t.disabled||t.readonly||(i.startDate=o(E,"start"),D?(i.isSelectingStart=!1,i.isSelectingEnd=!0):(i.isSelectingStart=!0,i.isSelectingEnd=!1),c("select-start"))},h=E=>{t.disabled||t.readonly||(i.endDate=o(E,"end"),c("select-end"))},p=()=>{t.disabled||t.readonly||(i.startDate=null,e("clearStart"),s(),a())},g=()=>{t.disabled||t.readonly||(i.endDate=null,e("clearDue"),s(),a())},y=()=>{t.disabled||t.readonly||i.isDirty||(i.cacheStartDate=i.startDate,i.cacheEndDate=i.endDate)},v=()=>{t.disabled||t.readonly||(i.cacheStartDate=i.startDate,i.cacheEndDate=i.endDate,i.isDirty=!1,a())},b=()=>{t.disabled||t.readonly||(i.startDate=i.cacheStartDate,i.endDate=i.cacheEndDate,s(),a(),i.isDirty=!1)},w=Z(()=>i.startDate?fn.fromJSDate(i.startDate,{zone:i.timezone}).toFormat(i.format):t.startPlaceholder),S=Z(()=>i.endDate?fn.fromJSDate(i.endDate,{zone:i.timezone}).toFormat(i.format):t.duePlaceholder),T=Z(()=>!i.startDate&&!t.disabled?t.startTooltip:!i.startDate&&(t.disabled||t.readonly)?t.startPlaceholder:i.startDate?fn.fromJSDate(i.startDate,{zone:i.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):t.startTooltip),_=Z(()=>!i.endDate&&!t.disabled?t.dueTooltip:!i.endDate&&(t.disabled||t.readonly)?t.startPlaceholder:i.endDate?fn.fromJSDate(i.endDate,{zone:i.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):t.dueTooltip);return{states:i,displayStartDate:w,displayEndDate:S,tooltipStartDate:T,tooltipEndDate:_,selectEndDate:h,selectStartDate:f,clearDue:g,clearStart:p,beginInteraction:y,confirmSelection:v,cancelSelection:b}},kOe=["aria-disabled","aria-readonly"],EOe=["disabled","aria-expanded","aria-label"],TOe={key:1,class:"adpb-icon","aria-hidden":"true"},DOe=["aria-readonly"],OOe={key:0,class:"adpb-icon","aria-hidden":"true"},OG=Ht(Qe({__name:"ArboDatePickerButton",props:{modelValue:{},format:{default:"LLL dd"},placeholder:{default:"Select date"},timezone:{default:"UTC"},active:{type:Boolean,default:!1},tooltip:{default:""},type:{},actual:{type:Boolean},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},showIcon:{type:Boolean,default:!0},size:{default:"medium"}},emits:["clear","open"],setup(t,{emit:e}){const n=qi,r=t,i=Z(()=>r.disabled),a=Z(()=>r.readonly),o=e,s=Z(()=>{if(!r.modelValue)return"empty";const v=fn.fromJSDate(r.modelValue,{zone:r.timezone}),b=fn.now().setZone(r.timezone).startOf("day"),w=v.startOf("day").toISODate();return w===b.toISODate()?"today":w===b.plus({days:1}).toISODate()?"tomorrow":w===b.minus({days:1}).toISODate()?"yesterday":v<b?"past":v>b?"future":"actual"}),l=Z(()=>r.modelValue?s.value==="today"?"Today":s.value==="tomorrow"?"Tomorrow":s.value==="yesterday"?"Yesterday":fn.fromJSDate(r.modelValue,{zone:r.timezone}).toFormat(r.format):r.placeholder),c=Z(()=>!!r.showIcon),f=Z(()=>!!r.modelValue&&!r.disabled&&!r.readonly),h=Z(()=>{let v=0;return f.value&&v++,c.value&&v++,v}),p=Z(()=>({"--adp-icon-count":h.value}));function g(){r.disabled||r.readonly||o("clear")}function y(){r.disabled||r.readonly||o("open")}return(v,b)=>!i.value&&!a.value?(R(),Y("div",{key:0,class:Fe(["arbo-date-picker-button",{"has-value":!!t.modelValue,active:t.active,disabled:i.value,readonly:a.value,"has-clear":f.value,"has-icon":c.value,small:r.size==="small"}]),style:_t(p.value),"aria-disabled":i.value?"true":"false","aria-readonly":a.value?"true":"false",role:"group",onClick:y},[Ct((R(),Y("button",{class:Fe(["adpb-main",{"is-empty":!t.modelValue}]),type:"button",disabled:i.value||a.value,"aria-haspopup":"dialog","aria-expanded":t.active?"true":"false","aria-label":`${t.type==="start"?"Start date":"End date"} picker`,onFocus:y},[X("span",{class:Fe(["adpb-label",[`${t.type}-${s.value}`,t.actual?"actual":""]])},nt(l.value),3)],42,EOe)),[[q(n),{content:r.tooltip||l.value}]]),f.value?(R(),Re(q(Nt),{key:0,size:"small",label:"","prefix-icon":"Xmark",type:"primary",disabled:r.disabled,"prefix-tooltip":"Clear",class:"adpb-clear","aria-haspopup":"dialog","aria-expanded":t.active?"true":"false","aria-label":`${t.type==="start"?"Start date":"End date"} picker`,onClick:Rt(g,["stop"])},null,8,["disabled","aria-expanded","aria-label"])):pe("",!0),c.value?(R(),Y("span",TOe,[he(q(Yn),{name:"Calendar"})])):pe("",!0)],14,kOe)):(R(),Y("div",{key:1,class:Fe(["arbo-date-picker-button view-only",{"has-value":!!t.modelValue,active:t.active,disabled:i.value,readonly:a.value,"has-clear":!1,"has-icon":c.value,small:r.size==="small"}]),style:_t(p.value),"aria-disabled":"true","aria-readonly":a.value?"true":"false",role:"group"},[Ct((R(),Y("button",{class:Fe(["adpb-main",{"is-empty":!t.modelValue}]),type:"button",disabled:""},[X("span",{class:Fe(["adpb-label",[`${t.type}-${s.value}`,t.actual?"actual":""]])},nt(l.value),3)],2)),[[q(n),{content:r.tooltip||l.value}]]),c.value?(R(),Y("span",OOe,[he(q(Yn),{name:"Calendar"})])):pe("",!0)],14,DOe))}}),[["__scopeId","data-v-ddb3d668"]]);/*!
|
|
106
|
+
`,Gi=Ht(dOe,[["styles",[fOe]],["__scopeId","data-v-755e58f1"]]),si={isValid:(t,e)=>!t||typeof t=="string"?!1:fn.fromMillis(t,{zone:e}).isValid,format:(t,e,n)=>si.isValid(t,n)?fn.fromMillis(t,{zone:n}).toFormat(e):"",standardize:(t,e,n)=>{const r=typeof t=="number"?t:t.getTime(),i=fn.fromMillis(r,{zone:n});if(!i.isValid)throw new Error(`Invalid date: ${t}`);return e==="start"?i.startOf("day").toMillis():i.endOf("day").toMillis()},isSameDay:(t,e,n)=>{if(!t&&!e)return!0;if(!t||!e)return!1;const r=fn.fromMillis(t,{zone:n}),i=fn.fromMillis(e,{zone:n});return!r.isValid&&!i.isValid?!0:!r.isValid||!i.isValid?!1:r.hasSame(i,"day")},toStructuredDate:(t,e)=>{if(t==null||t==="")return null;const n=fn.fromMillis(t,{zone:e});return n.isValid?{date:n.day,months:n.month,years:n.year,dateString:n.toISO()||"",timezone:e,value:n.toJSDate(),toMillis:n.toMillis()??null}:null},getInitialRangeValue:(t,e,n)=>{const r=t?new Date(t).getTime():"",i=e?new Date(e).getTime():"";return r&&i?[r,i]:!r&&!i?["",""]:r&&!i?[r,""]:!r&&i?["",i]:["",""]}},nT=(t,e)=>{try{return t()}catch(n){const r=n instanceof Error?n:new Error(String(n));return console.error("Date operation failed:",r),e==null||e(r),null}},Pr={log:(t,...e)=>{ge.env.NODE_ENV==="development"&&console.log(`%c[DateRange] ${t}`,"color: white; font-weight: bold; font-size:24px",...e)},warn:(t,...e)=>{ge.env.NODE_ENV==="development"&&console.warn(`%c[DateRange] ${t}`,"color: orange; font-weight: bold;",...e)},error:(t,...e)=>{console.error(`%c[DateRange] ${t}`,"color: red; font-weight: bold;",...e)}},rT={DEFAULT_TIMEZONE:fn.local().zoneName,CLEANUP_DELAY:100,WATCH_OPTIONS:{immediate:!0,deep:!1},SELECTION_WATCH_OPTIONS:{deep:!0,immediate:!0}},hOe=(t,e,n,r,i)=>{try{const[a,o]=t,s=n===Vm.START&&r,l=n===Vm.END&&r,c=()=>{const p=si.isValid(a,i),g=si.isValid(o,i);return p&&g?"filled":!p&&!g?"both_empty":!p&&g?"empty_start":"empty_end"};if(!r)return"none";const f={openStartOnStart:s&&e==="start",openStartOnEnd:s&&e==="end",openEndOnStart:l&&e==="start",openEndOnEnd:l&&e==="end"},h=c();switch(!0){case(h==="both_empty"&&f.openStartOnStart):return"initiate";case(h==="both_empty"&&f.openStartOnEnd):return"update";case(h==="both_empty"&&f.openEndOnStart):return"initiate";case(h==="both_empty"&&f.openEndOnEnd):return"strictUpdate";case(h==="empty_start"&&f.openStartOnStart):return"initiate";case(h==="empty_start"&&f.openStartOnEnd):return"update";case(h==="empty_start"&&f.openEndOnStart):return"initiate";case(h==="empty_start"&&f.openEndOnEnd):return"update";case(h==="empty_end"&&f.openStartOnStart):return"initiate";case(h==="empty_end"&&f.openStartOnEnd):return"update";case(h==="empty_end"&&f.openEndOnStart):return"initiate";case(h==="empty_end"&&f.openEndOnEnd):return"update";case(h==="filled"&&f.openStartOnStart):return"strictUpdate";case(h==="filled"&&f.openStartOnEnd):return"strictUpdate"}return"none"}catch(a){return Pr.error("Error calculating date picker mode:",a),"update"}},pOe=(t,e)=>{const n=re(),r=re(),i=re(["",""]),a=re(["",""]),o=re({start:"",end:""}),s=re(0),l=re(!1),c=re(!1),f=Z(()=>t.timezone||rT.DEFAULT_TIMEZONE),h=jt({focusingPosition:"none",openingCalendar:!1}),p=re({start:i.value[0],end:i.value[1]}),g=Z(()=>h.focusingPosition!=="none"),y=Z(()=>hOe([p.value.start,p.value.end],h.focusingPosition,n.value,g.value,f.value)),v=Z(()=>({start:si.toStructuredDate(i.value[0],f.value),end:si.toStructuredDate(i.value[1],f.value)})),b=()=>{try{if(c.value)return;i.value=si.getInitialRangeValue(t.startDate,t.dueDate,f.value),o.value={start:i.value[0],end:i.value[1]},p.value={start:i.value[0],end:i.value[1]},w()}catch(G){Pr.error("Error in setupDatePicker:",G)}},w=()=>{try{if(c.value)return;a.value=JSON.parse(JSON.stringify(i.value)),h.focusingPosition="none",n.value=void 0,s.value++}catch(G){Pr.error("Error in cleanUp:",G)}},S=()=>{var G;try{if(c.value)return;(G=r.value)==null||G.closeMenu()}catch(ve){Pr.error("Failed to close calendar",ve)}finally{w()}},T=G=>{try{if(c.value)return;(G()||y.value==="strictUpdate"||y.value==="update")&&(_(),S())}catch(ve){Pr.error("Error in handleClickOutside:",ve)}},_=()=>{var G,ve;try{if(c.value)return;const Ue=[p.value.start?new Date(p.value.start):null,p.value.end?new Date(p.value.end):null];(G=r.value)==null||G.selectDate(Ue),(ve=r.value)==null||ve.updateInternalModelValue(Ue),C(),w(),dn(()=>{S()})}catch(Ue){Pr.error("confirmSelect failed",Ue)}},E=(G,ve,Ue)=>{try{if(c.value)return;G.stopPropagation(),h.focusingPosition===ve?S():Ue()}catch(ce){Pr.error("Error in toggleCalendar:",ce)}},D=G=>{n.value||(n.value=G),g.value||ee(),h.focusingPosition=G},O=G=>{try{G?E(G,"start",()=>D(Vm.START)):D(Vm.START)}catch(ve){Pr.error("Error in selectStartField:",ve)}},V=G=>{try{G?E(G,"end",()=>D(Vm.END)):D(Vm.END)}catch(ve){Pr.error("Error in selectEndField:",ve)}},P=()=>{try{if(c.value)return;i.value[0]="",p.value.start="",o.value.start="",C()}catch(G){Pr.error("Failed to clear start date",G)}},M=()=>{try{if(c.value)return;i.value[1]="",p.value.end="",o.value.end="",C()}catch(G){Pr.error("Failed to clear end date",G)}},C=()=>{try{if(c.value)return;const[G,ve]=[t.startDate?new Date(t.startDate||"").getTime():"",t.dueDate?new Date(t.dueDate||"").getTime():""],[Ue,ce]=[si.isSameDay(i.value[0],G,f.value),si.isSameDay(i.value[1],ve,f.value)];if(!(Ue&&ce))e("update",v.value);else throw Pr.warn("No changes detected for sync",{selectedRange:i.value,oldStart:G,oldEnd:ve,sameStart:Ue,sameEnd:ce}),new Error("no change")}catch(G){Pr.warn("Sync action failed",G)}},F=G=>{try{if(c.value)return;const ve=nT(()=>si.standardize(G,"end",f.value),Ue=>Pr.error("Failed to update strict end",Ue));ve&&(i.value[1]=ve,h.focusingPosition="none",C(),S(),w())}catch(ve){Pr.error("updatestrictUpdate failed",ve)}},W=G=>{N.value=G},H=re(!0),j=G=>{H.value=!0;try{const ve=Number(G.getTime()),{end:Ue,start:ce}={end:()=>si.standardize(ve,"end",f.value),start:()=>si.standardize(ve,"start",f.value)};switch(!0){case y.value==="initiate":if(!i.value[0]&&!i.value[1]&&h.focusingPosition==="start"){o.value.start=ce(),i.value[0]=ce(),h.focusingPosition="end";return}else if(i.value[1]&&ve>Number(i.value[1])&&h.focusingPosition==="start"){o.value.start=ce(),o.value.end=Ue(),i.value[0]=ce(),i.value[1]=Ue(),h.focusingPosition="end";return}else o.value.start=ce(),i.value[0]=ce(),h.focusingPosition="end";break;case y.value==="strictUpdate":F(ve);break;case y.value==="update":h.focusingPosition==="end"?(ve<Number(o.value.start)?(o.value.start=ce(),o.value.end=Ue(),i.value[0]=ce(),i.value[1]=Ue()):(i.value[1]=Ue()||"",o.value.end=Ue()||""),h.focusingPosition="end"):(i.value[0]=ce()||"",o.value.start=ce()||""),h.focusingPosition="end";break;case y.value==="none":console.error("No date selected");break}}catch(ve){Pr.error("Error in selectStartDate:",ve)}},N=re(["",""]),U=G=>{H.value=!0;try{const ve=G.getTime(),Ue=si.standardize(ve,"end",f.value);y.value==="strictUpdate"?F(ve):(i.value[1]=Ue,h.focusingPosition="end")}catch(ve){Pr.error("Error in selectEndDate:",ve)}},ee=()=>{var G;try{if(c.value)return;a.value=JSON.parse(JSON.stringify(i.value)),(G=r.value)==null||G.openMenu()}catch(ve){Pr.error("Error in handleOpenMenu:",ve)}},le=()=>{try{if(c.value)return;w()}catch(G){Pr.error("Error in callbackClosed:",G)}},_e=G=>{try{if(c.value)return;V(),dn(()=>{var ve;(ve=r.value)==null||ve.updateInternalModelValue([G,G])})}catch(ve){Pr.error("Error in handleInvalidRange:",ve)}},be=()=>{try{if(c.value)return;i.value=JSON.parse(JSON.stringify(a.value)),S()}catch(G){Pr.error("Error in cancelSelect:",G)}},Te=G=>{try{if(c.value)return;const ve=Array.isArray(G)&&G.length===1,Ue=Array.isArray(G)&&G.length===2,ce=G instanceof Date,Ye=G==null||Array.isArray(G)&&G.length===0,te=(ve||Ue)&&nT(()=>si.standardize(G[0],"start",f.value))||"",ae=Ue&&nT(()=>si.standardize(G[1],"end",f.value))||"",ne=ce&&nT(()=>si.standardize(G,"start",f.value))||"";switch(!0){case(ce&&G instanceof Date):H.value&&(i.value=[ne,""]);break;case(ve&&h.focusingPosition==="start"):H.value&&(i.value=[te,""]);break;case(ve&&h.focusingPosition==="end"):H.value&&(i.value=["",te]);break;case Ue:H.value&&(i.value=[te,ae]);break;case Ye:i.value=["",""];break}}catch(ve){Pr.error("Error in handleUpdateModelValue:",ve)}},J=G=>{try{if(c.value||!G||G.length<=1)return;p.value={start:G[0].getTime(),end:G[1].getTime()}}catch(ve){Pr.error("Error in handleInternalModelChange:",ve)}},me=()=>{try{if(c.value)return;T(()=>si.isValid(p.value.start)&&si.isValid(p.value.end))}catch(G){Pr.error("Error in focusOut:",G)}},Ee=Z(()=>{try{if(c.value)return{partialRange:!0,hasStart:!1,hasEnd:!1,case:"initial",showLastInRange:!1};const G=h.focusingPosition,ve=si.isValid(i.value[0],f.value),Ue=si.isValid(i.value[1],f.value),ce={partialRange:!0,hasStart:ve,hasEnd:Ue,case:"initial",showLastInRange:h.focusingPosition==="end"};let Ye={};switch(!0){case(G==="end"&&!ve&&!Ue):Ye={fixedStart:!1,fixedEnd:!1,case:"no start"};break;case(G==="start"&&ve&&Ue):Ye={fixedStart:!1,fixedEnd:!0,case:"block end"};break;case(G==="end"&&Ue&&ve):Ye={fixedStart:!0,fixedEnd:!1,case:"block start"};break}return{...ce,...Ye}}catch(G){return Pr.error("Error in rangeConfig computed:",G),{partialRange:!0,hasStart:!1,hasEnd:!1,case:"initial",showLastInRange:!1}}}),Ce=Z(()=>{try{const G=i.value[0]?new Date(i.value[0]):"",ve=i.value[1]?new Date(i.value[1]):"",Ue=si.isValid(i.value[0],f.value),ce=si.isValid(i.value[1],f.value),Ye=si.isValid(p.value.start,f.value),te=si.isValid(p.value.end,f.value);let ae=[];return te&&Ye?ae=[]:Ue&&G&&!ce?ae=[fn.fromJSDate(G,{zone:f.value}).startOf("day").toJSDate()]:!Ue&&ve&&ce&&(ae=[fn.fromJSDate(ve,{zone:f.value}).endOf("day").toJSDate()]),{dates:ae}}catch(G){return Pr.error("Error in highlightedDate computed:",G),{dates:[]}}}),de=Z(()=>({teleport:t.teleport,disabled:t.disabled,format:t.shortFormat,timezone:f.value,enableTimePicker:!1,multiCalendars:t.multipleCalendar,modelAuto:!0,onClickOutside:T}));return Ge([()=>t.startDate,()=>t.dueDate],()=>{try{if(c.value)return;i.value=si.getInitialRangeValue(t.startDate,t.dueDate,f.value),w()}catch(G){Pr.error("Watch error",{error:G,start:t.startDate,due:t.dueDate})}},rT.WATCH_OPTIONS),Ge(()=>t.timezone,()=>{var G;try{if(c.value)return;i.value=si.getInitialRangeValue(t.startDate,t.dueDate,t.timezone||rT.DEFAULT_TIMEZONE),(G=r.value)==null||G.handleFlow()}catch(ve){Pr.error("Error in timezone watcher:",ve)}}),Ge(()=>i.value,()=>{try{if(c.value)return;p.value={start:i.value[0],end:i.value[1]}}catch(G){Pr.error("Error in selectedRange watcher:",G)}},rT.SELECTION_WATCH_OPTIONS),Os(()=>{try{l.value=!0,b()}catch(G){Pr.error("Error in onBeforeMount:",G)}}),Na(()=>{try{c.value=!0,w(),r.value=null,i.value=["",""],a.value=["",""],o.value={start:"",end:""},p.value={start:"",end:""}}catch(G){Pr.error("Error in onUnmounted:",G)}}),{dateRangePickerRef:r,selectedRange:i,renderKey:s,isDestroyed:c,states:h,previewingDate:p,selectingRange:o,vueDatepickerConfiguration:de,rangeConfig:Ee,highlightedDate:Ce,datePickerMode:y,selectStartField:O,selectEndField:V,clearStartDate:P,clearEndDate:M,selectStartDate:j,selectEndDate:U,callbackClosed:le,handleInvalidRange:_e,cancelSelect:be,confirmSelect:_,handleUpdateModelValue:Te,handleInternalModelChange:J,cleanUp:w,handleClickOutside:T,focusOut:me,handleUpdateModelValueTz:W,drValue:N}},mOe={class:"rc__header flex flex-col items-center justify-center"},gOe={class:"rc__logo"},vOe={class:"rc__title text-center"},yOe={class:"rc__content"},bOe=["innerHTML"],_Oe={class:"rc__hovered"},wOe={class:"rc__hovered__main"},xOe={class:"rc__content"},SOe={class:"rc__actions flex items-center"},DG=Ht(Qe({__name:"ReportCard",props:{name:{type:String,default:"Completed Scenes Report"},subTitle:{type:String,default:"Download a report that includes the completed scenes."},logo:{type:String,default:"ReportCompletedScenes"},isShowBackFlipTile:{type:Boolean,default:!1},minHeight:{type:String,default:"224px"},downloadBtnLabel:{type:String,default:"Download report"},description:{type:String,default:"Download a report that includes the completed scenes."}},emits:["update-state-flip","clicked-download-btn"],setup(t,{emit:e}){const n=t,r=e;function i(){r("clicked-download-btn")}function a(){r("update-state-flip",!n.isShowBackFlipTile)}function o(){n.isShowBackFlipTile||a()}const s=Z(()=>({"--report-card__min-height":n.minHeight}));return(l,c)=>(R(),Y("div",{class:"report-card rc",style:_t(s.value)},[X("div",{class:"rc__body w-full",onClick:o},[X("div",{class:Fe(["rc__wrapper",{hovering:t.isShowBackFlipTile}])},[X("div",mOe,[X("div",gOe,[he(Yn,{class:"rc__logo--img",name:t.logo,type:"visual"},null,8,["name"])]),X("h3",vOe,nt(t.name),1),he(ur,{class:"rc__header--flip",content:"Flip",delay:[300,0]},{default:ze(()=>[he(Nt,{class:"rc__header--btn-flip",type:"secondary",label:"","suffix-icon":t.isShowBackFlipTile?"CustomFlipBack":"CustomFlipFront",onClick:Rt(a,["stop"])},null,8,["suffix-icon"])]),_:1})]),Ct(X("div",yOe,[X("div",{class:"rc__sub-title",innerHTML:t.subTitle},null,8,bOe)],512),[[Ln,!t.isShowBackFlipTile]]),Ct(X("div",_Oe,[X("div",wOe,[ke(l.$slots,"content",{isShowBackFlipTile:t.isShowBackFlipTile},()=>[X("div",xOe,nt(n.description),1)],!0)]),ke(l.$slots,"actions",{},()=>[X("div",SOe,[he(Nt,{class:"rc__actions--download-btn w-full",type:"primary",onClick:Rt(i,["stop"]),label:n.downloadBtnLabel},null,8,["label"])])],!0)],512),[[Ln,t.isShowBackFlipTile]])],2)])],4))}}),[["__scopeId","data-v-c4f48e45"]]),AOe=(t,e,n)=>{const r={truncate:"End date cleared because it was before start. Please pick an end date.",swap:"Dates auto-swapped because start was after end.",...t.messages},i=jt({startDate:null,endDate:null,timezone:t.timezone||"UTC",format:t.format||"",isSelectingStart:!1,isSelectingEnd:!1,rangeFeedback:{status:"idle",action:null,message:""},cacheStartDate:null,cacheEndDate:null,isDirty:!1});Os(()=>{var E;((E=t.modelValue)==null?void 0:E.length)===2&&(i.startDate=t.modelValue[0],i.endDate=t.modelValue[1]),i.cacheStartDate=i.startDate,i.cacheEndDate=i.endDate,i.isSelectingStart=!1,i.isSelectingEnd=!1,t.timezone&&(i.timezone=t.timezone)});const a=()=>{var E,D,O,V,P,M,C,F,W,H;e("tracing",JSON.parse(JSON.stringify(n.value))),e("update:start",i.startDate),e("update:end",i.endDate);const j={start:si.toStructuredDate(((E=i.startDate)==null?void 0:E.getTime())||"",i.timezone),end:si.toStructuredDate(((D=i.endDate)==null?void 0:D.getTime())||"",i.timezone)};(i.startDate||i.endDate)&&(e("legacyUpdate",j),e("update",[i.startDate,i.endDate])),i.isDirty=!(((V=(O=i.startDate)==null?void 0:O.getTime)==null?void 0:V.call(O))===((M=(P=i.cacheStartDate)==null?void 0:P.getTime)==null?void 0:M.call(P))&&((F=(C=i.endDate)==null?void 0:C.getTime)==null?void 0:F.call(C))===((H=(W=i.cacheEndDate)==null?void 0:W.getTime)==null?void 0:H.call(W)))},o=(E,D)=>{const O=fn.fromObject({year:E.year,month:E.month,day:E.day},{zone:i.timezone});return(D==="start"?O.startOf("day"):O.endOf("day")).toJSDate()},s=()=>{i.rangeFeedback.status="idle",i.rangeFeedback.action=null,i.rangeFeedback.message=""},l=E=>{t.enableRangeFeedback&&(i.rangeFeedback.status="corrected",i.rangeFeedback.action=E,i.rangeFeedback.message=E==="swap"?r.swap:r.truncate)},c=E=>{if(!(!i.startDate||!i.endDate)){if(i.startDate.getTime()<=i.endDate.getTime()){t.enableRangeFeedback&&s();return}if(E==="select-start"){const D={start:i.startDate,end:i.endDate};i.endDate=null,e("range:invalid",D),e("range:corrected",{start:i.startDate,end:i.endDate,action:"truncate"}),i.isSelectingEnd=!0,l("truncate"),t.enableRangeFeedback&&!i.rangeFeedback.message&&(i.rangeFeedback.message=r.truncate)}else{const D={start:i.startDate,end:i.endDate},O=i.startDate;i.startDate=i.endDate,i.endDate=O,e("range:invalid",D),e("range:corrected",{start:i.startDate,end:i.endDate,action:"swap"}),l("swap")}}},f=(E,D=!0)=>{t.disabled||t.readonly||(i.startDate=o(E,"start"),D?(i.isSelectingStart=!1,i.isSelectingEnd=!0):(i.isSelectingStart=!0,i.isSelectingEnd=!1),c("select-start"))},h=E=>{t.disabled||t.readonly||(i.endDate=o(E,"end"),c("select-end"))},p=()=>{t.disabled||t.readonly||(i.startDate=null,e("clearStart"),s(),a())},g=()=>{t.disabled||t.readonly||(i.endDate=null,e("clearDue"),s(),a())},y=()=>{t.disabled||t.readonly||i.isDirty||(i.cacheStartDate=i.startDate,i.cacheEndDate=i.endDate)},v=()=>{t.disabled||t.readonly||(i.cacheStartDate=i.startDate,i.cacheEndDate=i.endDate,i.isDirty=!1,a())},b=()=>{t.disabled||t.readonly||(i.startDate=i.cacheStartDate,i.endDate=i.cacheEndDate,s(),a(),i.isDirty=!1)},w=Z(()=>i.startDate?fn.fromJSDate(i.startDate,{zone:i.timezone}).toFormat(i.format):t.startPlaceholder),S=Z(()=>i.endDate?fn.fromJSDate(i.endDate,{zone:i.timezone}).toFormat(i.format):t.duePlaceholder),T=Z(()=>!i.startDate&&!t.disabled?t.startTooltip:!i.startDate&&(t.disabled||t.readonly)?t.startPlaceholder:i.startDate?fn.fromJSDate(i.startDate,{zone:i.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):t.startTooltip),_=Z(()=>!i.endDate&&!t.disabled?t.dueTooltip:!i.endDate&&(t.disabled||t.readonly)?t.startPlaceholder:i.endDate?fn.fromJSDate(i.endDate,{zone:i.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):t.dueTooltip);return{states:i,displayStartDate:w,displayEndDate:S,tooltipStartDate:T,tooltipEndDate:_,selectEndDate:h,selectStartDate:f,clearDue:g,clearStart:p,beginInteraction:y,confirmSelection:v,cancelSelection:b}},kOe=["aria-disabled","aria-readonly"],EOe=["disabled","aria-expanded","aria-label"],TOe={key:1,class:"adpb-icon","aria-hidden":"true"},DOe=["aria-readonly"],OOe={key:0,class:"adpb-icon","aria-hidden":"true"},OG=Ht(Qe({__name:"ArboDatePickerButton",props:{modelValue:{},format:{default:"LLL dd"},placeholder:{default:"Select date"},timezone:{default:"UTC"},active:{type:Boolean,default:!1},tooltip:{default:""},type:{},actual:{type:Boolean},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},showIcon:{type:Boolean,default:!0},size:{default:"medium"}},emits:["clear","open"],setup(t,{emit:e}){const n=qi,r=t,i=Z(()=>r.disabled),a=Z(()=>r.readonly),o=e,s=Z(()=>{if(!r.modelValue)return"empty";const v=fn.fromJSDate(r.modelValue,{zone:r.timezone}),b=fn.now().setZone(r.timezone).startOf("day"),w=v.startOf("day").toISODate();return w===b.toISODate()?"today":w===b.plus({days:1}).toISODate()?"tomorrow":w===b.minus({days:1}).toISODate()?"yesterday":v<b?"past":v>b?"future":"actual"}),l=Z(()=>r.modelValue?s.value==="today"?"Today":s.value==="tomorrow"?"Tomorrow":s.value==="yesterday"?"Yesterday":fn.fromJSDate(r.modelValue,{zone:r.timezone}).toFormat(r.format):r.placeholder),c=Z(()=>!!r.showIcon),f=Z(()=>!!r.modelValue&&!r.disabled&&!r.readonly),h=Z(()=>{let v=0;return f.value&&v++,c.value&&v++,v}),p=Z(()=>({"--adp-icon-count":h.value}));function g(){r.disabled||r.readonly||o("clear")}function y(){r.disabled||r.readonly||o("open")}return(v,b)=>!i.value&&!a.value?(R(),Y("div",{key:0,class:Fe(["arbo-date-picker-button",{"has-value":!!t.modelValue,active:t.active,disabled:i.value,readonly:a.value,"has-clear":f.value,"has-icon":c.value,small:r.size==="small"}]),style:_t(p.value),"aria-disabled":i.value?"true":"false","aria-readonly":a.value?"true":"false",role:"group",onClick:y},[Ct((R(),Y("button",{class:Fe(["adpb-main",{"is-empty":!t.modelValue}]),type:"button",disabled:i.value||a.value,"aria-haspopup":"dialog","aria-expanded":t.active?"true":"false","aria-label":`${t.type==="start"?"Start date":"End date"} picker`,onFocus:y},[X("span",{class:Fe(["adpb-label",[`${t.type}-${s.value}`,t.actual?"actual":""]])},nt(l.value),3)],42,EOe)),[[q(n),{content:r.tooltip||l.value}]]),f.value?(R(),Re(q(Nt),{key:0,size:"small",label:"","prefix-icon":"Xmark",type:"primary",disabled:r.disabled,"prefix-tooltip":"Clear",class:"adpb-clear","aria-haspopup":"dialog","aria-expanded":t.active?"true":"false","aria-label":`${t.type==="start"?"Start date":"End date"} picker`,onClick:Rt(g,["stop"])},null,8,["disabled","aria-expanded","aria-label"])):pe("",!0),c.value?(R(),Y("span",TOe,[he(q(Yn),{name:"Calendar"})])):pe("",!0)],14,kOe)):(R(),Y("div",{key:1,class:Fe(["arbo-date-picker-button view-only",{"has-value":!!t.modelValue,active:t.active,disabled:i.value,readonly:a.value,"has-clear":!1,"has-icon":c.value,small:r.size==="small"}]),style:_t(p.value),"aria-disabled":"true","aria-readonly":a.value?"true":"false",role:"group"},[Ct((R(),Y("button",{class:Fe(["adpb-main",{"is-empty":!t.modelValue}]),type:"button",disabled:""},[X("span",{class:Fe(["adpb-label",[`${t.type}-${s.value}`,t.actual?"actual":""]])},nt(l.value),3)],2)),[[q(n),{content:r.tooltip||l.value}]]),c.value?(R(),Y("span",OOe,[he(q(Yn),{name:"Calendar"})])):pe("",!0)],14,DOe))}}),[["__scopeId","data-v-8c0ff777"]]);/*!
|
|
107
107
|
* vue-tippy v6.7.1
|
|
108
108
|
* (c) 2025
|
|
109
109
|
* @license MIT
|