diff --git a/dist/assets/index-30a95f3f.js b/dist/assets/index-12761de0.js similarity index 87% rename from dist/assets/index-30a95f3f.js rename to dist/assets/index-12761de0.js index 7e94d8e..f172dee 100644 --- a/dist/assets/index-30a95f3f.js +++ b/dist/assets/index-12761de0.js @@ -1,4 +1,4 @@ -var ts=Object.defineProperty;var es=(o,s,t)=>s in o?ts(o,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[s]=t;var E=(o,s,t)=>(es(o,typeof s!="symbol"?s+"":s,t),t),Dn=(o,s,t)=>{if(!s.has(o))throw TypeError("Cannot "+t)};var n=(o,s,t)=>(Dn(o,s,"read from private field"),t?t.call(o):s.get(o)),h=(o,s,t)=>{if(s.has(o))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(o):s.set(o,t)},u=(o,s,t,i)=>(Dn(o,s,"write to private field"),i?i.call(o,t):s.set(o,t),t);var cn=(o,s,t,i)=>({set _(e){u(o,s,e,t)},get _(){return n(o,s,i)}}),p=(o,s,t)=>(Dn(o,s,"access private method"),t);(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function t(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(e){if(e.ep)return;e.ep=!0;const r=t(e);fetch(e.href,r)}})();const ns="modulepreload",is=function(o,s){return new URL(o,s).href},Ei={},Ji=function(s,t,i){if(!t||t.length===0)return s();const e=document.getElementsByTagName("link");return Promise.all(t.map(r=>{if(r=is(r,i),r in Ei)return;Ei[r]=!0;const a=r.endsWith(".css"),l=a?'[rel="stylesheet"]':"";if(!!i)for(let f=e.length-1;f>=0;f--){const g=e[f];if(g.href===r&&(!a||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${r}"]${l}`))return;const d=document.createElement("link");if(d.rel=a?"stylesheet":ns,a||(d.as="script",d.crossOrigin=""),d.href=r,document.head.appendChild(d),a)return new Promise((f,g)=>{d.addEventListener("load",f),d.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>s()).catch(r=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=r,window.dispatchEvent(a),!a.defaultPrevented)throw r})};function os(o={}){const{immediate:s=!1,onNeedRefresh:t,onOfflineReady:i,onRegistered:e,onRegisteredSW:r,onRegisterError:a}=o;let l,c;const d=async(g=!0)=>{await c};async function f(){if("serviceWorker"in navigator){const{Workbox:g}=await Ji(()=>import("./workbox-window.prod.es5-a7b12eab.js"),[],import.meta.url);l=new g("./service-worker.js",{scope:"./",type:"classic"}),l.addEventListener("activated",m=>{(m.isUpdate||m.isExternal)&&window.location.reload()}),l.addEventListener("installed",m=>{m.isUpdate||i==null||i()}),l.register({immediate:s}).then(m=>{r?r("./service-worker.js",m):e==null||e(m)}).catch(m=>{a==null||a(m)})}}return c=f(),d}os();/** +var ts=Object.defineProperty;var es=(o,s,t)=>s in o?ts(o,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[s]=t;var E=(o,s,t)=>(es(o,typeof s!="symbol"?s+"":s,t),t),Dn=(o,s,t)=>{if(!s.has(o))throw TypeError("Cannot "+t)};var n=(o,s,t)=>(Dn(o,s,"read from private field"),t?t.call(o):s.get(o)),h=(o,s,t)=>{if(s.has(o))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(o):s.set(o,t)},u=(o,s,t,i)=>(Dn(o,s,"write to private field"),i?i.call(o,t):s.set(o,t),t);var cn=(o,s,t,i)=>({set _(e){u(o,s,e,t)},get _(){return n(o,s,i)}}),p=(o,s,t)=>(Dn(o,s,"access private method"),t);(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function t(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(e){if(e.ep)return;e.ep=!0;const r=t(e);fetch(e.href,r)}})();const ns="modulepreload",is=function(o,s){return new URL(o,s).href},Ei={},Ji=function(s,t,i){if(!t||t.length===0)return s();const e=document.getElementsByTagName("link");return Promise.all(t.map(r=>{if(r=is(r,i),r in Ei)return;Ei[r]=!0;const a=r.endsWith(".css"),l=a?'[rel="stylesheet"]':"";if(!!i)for(let f=e.length-1;f>=0;f--){const g=e[f];if(g.href===r&&(!a||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${r}"]${l}`))return;const d=document.createElement("link");if(d.rel=a?"stylesheet":ns,a||(d.as="script",d.crossOrigin=""),d.href=r,document.head.appendChild(d),a)return new Promise((f,g)=>{d.addEventListener("load",f),d.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>s()).catch(r=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=r,window.dispatchEvent(a),!a.defaultPrevented)throw r})};function os(o={}){const{immediate:s=!1,onNeedRefresh:t,onOfflineReady:i,onRegistered:e,onRegisteredSW:r,onRegisterError:a}=o;let l,c;const d=async(g=!0)=>{await c};async function f(){if("serviceWorker"in navigator){const{Workbox:g}=await Ji(()=>import("./workbox-window.prod.es5-c46a1faa.js"),[],import.meta.url);l=new g("./service-worker.js",{scope:"./",type:"classic"}),l.addEventListener("activated",m=>{(m.isUpdate||m.isExternal)&&window.location.reload()}),l.addEventListener("installed",m=>{m.isUpdate||i==null||i()}),l.register({immediate:s}).then(m=>{r?r("./service-worker.js",m):e==null||e(m)}).catch(m=>{a==null||a(m)})}}return c=f(),d}os();/** * (c) Iconify * * For the full copyright and license information, please view the license.txt @@ -8,16 +8,16 @@ var ts=Object.defineProperty;var es=(o,s,t)=>s in o?ts(o,s,{enumerable:!0,config * * @license MIT * @version 1.0.8 -*/const Zi=Object.freeze({left:0,top:0,width:16,height:16}),fn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),sn=Object.freeze({...Zi,...fn}),Jn=Object.freeze({...sn,body:"",hidden:!1}),ss=Object.freeze({width:null,height:null}),to=Object.freeze({...ss,...fn});function rs(o,s=0){const t=o.replace(/^-?[0-9.]*/,"");function i(e){for(;e<0;)e+=4;return e%4}if(t===""){const e=parseInt(o);return isNaN(e)?0:i(e)}else if(t!==o){let e=0;switch(t){case"%":e=25;break;case"deg":e=90}if(e){let r=parseFloat(o.slice(0,o.length-t.length));return isNaN(r)?0:(r=r/e,r%1===0?i(r):0)}}return s}const as=/[\s,]+/;function cs(o,s){s.split(as).forEach(t=>{switch(t.trim()){case"horizontal":o.hFlip=!0;break;case"vertical":o.vFlip=!0;break}})}const eo={...to,preserveAspectRatio:""};function Li(o){const s={...eo},t=(i,e)=>o.getAttribute(i)||e;return s.width=t("width",null),s.height=t("height",null),s.rotate=rs(t("rotate","")),cs(s,t("flip","")),s.preserveAspectRatio=t("preserveAspectRatio",t("preserveaspectratio","")),s}function ls(o,s){for(const t in eo)if(o[t]!==s[t])return!0;return!1}const ue=/^[a-z0-9]+(-[a-z0-9]+)*$/,rn=(o,s,t,i="")=>{const e=o.split(":");if(o.slice(0,1)==="@"){if(e.length<2||e.length>3)return null;i=e.shift().slice(1)}if(e.length>3||!e.length)return null;if(e.length>1){const l=e.pop(),c=e.pop(),d={provider:e.length>0?e[0]:i,prefix:c,name:l};return s&&!dn(d)?null:d}const r=e[0],a=r.split("-");if(a.length>1){const l={provider:i,prefix:a.shift(),name:a.join("-")};return s&&!dn(l)?null:l}if(t&&i===""){const l={provider:i,prefix:"",name:r};return s&&!dn(l,t)?null:l}return null},dn=(o,s)=>o?!!((o.provider===""||o.provider.match(ue))&&(s&&o.prefix===""||o.prefix.match(ue))&&o.name.match(ue)):!1;function hs(o,s){const t={};!o.hFlip!=!s.hFlip&&(t.hFlip=!0),!o.vFlip!=!s.vFlip&&(t.vFlip=!0);const i=((o.rotate||0)+(s.rotate||0))%4;return i&&(t.rotate=i),t}function Ti(o,s){const t=hs(o,s);for(const i in Jn)i in fn?i in o&&!(i in t)&&(t[i]=fn[i]):i in s?t[i]=s[i]:i in o&&(t[i]=o[i]);return t}function ds(o,s){const t=o.icons,i=o.aliases||Object.create(null),e=Object.create(null);function r(a){if(t[a])return e[a]=[];if(!(a in e)){e[a]=null;const l=i[a]&&i[a].parent,c=l&&r(l);c&&(e[a]=[l].concat(c))}return e[a]}return(s||Object.keys(t).concat(Object.keys(i))).forEach(r),e}function us(o,s,t){const i=o.icons,e=o.aliases||Object.create(null);let r={};function a(l){r=Ti(i[l]||e[l],r)}return a(s),t.forEach(a),Ti(o,r)}function no(o,s){const t=[];if(typeof o!="object"||typeof o.icons!="object")return t;o.not_found instanceof Array&&o.not_found.forEach(e=>{s(e,null),t.push(e)});const i=ds(o);for(const e in i){const r=i[e];r&&(s(e,us(o,e,r)),t.push(e))}return t}const fs={provider:"",aliases:{},not_found:{},...Zi};function Gn(o,s){for(const t in s)if(t in o&&typeof o[t]!=typeof s[t])return!1;return!0}function io(o){if(typeof o!="object"||o===null)return null;const s=o;if(typeof s.prefix!="string"||!o.icons||typeof o.icons!="object"||!Gn(o,fs))return null;const t=s.icons;for(const e in t){const r=t[e];if(!e.match(ue)||typeof r.body!="string"||!Gn(r,Jn))return null}const i=s.aliases||Object.create(null);for(const e in i){const r=i[e],a=r.parent;if(!e.match(ue)||typeof a!="string"||!t[a]&&!i[a]||!Gn(r,Jn))return null}return s}const pn=Object.create(null);function ps(o,s){return{provider:o,prefix:s,icons:Object.create(null),missing:new Set}}function Ft(o,s){const t=pn[o]||(pn[o]=Object.create(null));return t[s]||(t[s]=ps(o,s))}function yi(o,s){return io(s)?no(s,(t,i)=>{i?o.icons[t]=i:o.missing.add(t)}):[]}function gs(o,s,t){try{if(typeof t.body=="string")return o.icons[s]={...t},!0}catch{}return!1}function ms(o,s){let t=[];return(typeof o=="string"?[o]:Object.keys(pn)).forEach(e=>{(typeof e=="string"&&typeof s=="string"?[s]:Object.keys(pn[e]||{})).forEach(a=>{const l=Ft(e,a);t=t.concat(Object.keys(l.icons).map(c=>(e!==""?"@"+e+":":"")+a+":"+c))})}),t}let pe=!1;function oo(o){return typeof o=="boolean"&&(pe=o),pe}function ge(o){const s=typeof o=="string"?rn(o,!0,pe):o;if(s){const t=Ft(s.provider,s.prefix),i=s.name;return t.icons[i]||(t.missing.has(i)?null:void 0)}}function so(o,s){const t=rn(o,!0,pe);if(!t)return!1;const i=Ft(t.provider,t.prefix);return gs(i,t.name,s)}function Ci(o,s){if(typeof o!="object")return!1;if(typeof s!="string"&&(s=o.provider||""),pe&&!s&&!o.prefix){let e=!1;return io(o)&&(o.prefix="",no(o,(r,a)=>{a&&so(r,a)&&(e=!0)})),e}const t=o.prefix;if(!dn({provider:s,prefix:t,name:"a"}))return!1;const i=Ft(s,t);return!!yi(i,o)}function bs(o){return!!ge(o)}function ys(o){const s=ge(o);return s?{...sn,...s}:null}function ws(o){const s={loaded:[],missing:[],pending:[]},t=Object.create(null);o.sort((e,r)=>e.provider!==r.provider?e.provider.localeCompare(r.provider):e.prefix!==r.prefix?e.prefix.localeCompare(r.prefix):e.name.localeCompare(r.name));let i={provider:"",prefix:"",name:""};return o.forEach(e=>{if(i.name===e.name&&i.prefix===e.prefix&&i.provider===e.provider)return;i=e;const r=e.provider,a=e.prefix,l=e.name,c=t[r]||(t[r]=Object.create(null)),d=c[a]||(c[a]=Ft(r,a));let f;l in d.icons?f=s.loaded:a===""||d.missing.has(l)?f=s.missing:f=s.pending;const g={provider:r,prefix:a,name:l};f.push(g)}),s}function ro(o,s){o.forEach(t=>{const i=t.loaderCallbacks;i&&(t.loaderCallbacks=i.filter(e=>e.id!==s))})}function vs(o){o.pendingCallbacksFlag||(o.pendingCallbacksFlag=!0,setTimeout(()=>{o.pendingCallbacksFlag=!1;const s=o.loaderCallbacks?o.loaderCallbacks.slice(0):[];if(!s.length)return;let t=!1;const i=o.provider,e=o.prefix;s.forEach(r=>{const a=r.icons,l=a.pending.length;a.pending=a.pending.filter(c=>{if(c.prefix!==e)return!0;const d=c.name;if(o.icons[d])a.loaded.push({provider:i,prefix:e,name:d});else if(o.missing.has(d))a.missing.push({provider:i,prefix:e,name:d});else return t=!0,!0;return!1}),a.pending.length!==l&&(t||ro([o],r.id),r.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),r.abort))})}))}let xs=0;function Ss(o,s,t){const i=xs++,e=ro.bind(null,t,i);if(!s.pending.length)return e;const r={id:i,icons:s,callback:o,abort:e};return t.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(r)}),e}const Zn=Object.create(null);function Ai(o,s){Zn[o]=s}function ti(o){return Zn[o]||Zn[""]}function ks(o,s=!0,t=!1){const i=[];return o.forEach(e=>{const r=typeof e=="string"?rn(e,s,t):e;r&&i.push(r)}),i}var Is={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Es(o,s,t,i){const e=o.resources.length,r=o.random?Math.floor(Math.random()*e):o.index;let a;if(o.random){let w=o.resources.slice(0);for(a=[];w.length>1;){const j=Math.floor(Math.random()*w.length);a.push(w[j]),w=w.slice(0,j).concat(w.slice(j+1))}a=a.concat(w)}else a=o.resources.slice(r).concat(o.resources.slice(0,r));const l=Date.now();let c="pending",d=0,f,g=null,m=[],x=[];typeof i=="function"&&x.push(i);function S(){g&&(clearTimeout(g),g=null)}function k(){c==="pending"&&(c="aborted"),S(),m.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),m=[]}function Rt(w,j){j&&(x=[]),typeof w=="function"&&x.push(w)}function et(){return{startTime:l,payload:s,status:c,queriesSent:d,queriesPending:m.length,subscribe:Rt,abort:k}}function L(){c="failed",x.forEach(w=>{w(void 0,f)})}function R(){m.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),m=[]}function Hn(w,j,le){const an=j!=="success";switch(m=m.filter(Pt=>Pt!==w),c){case"pending":break;case"failed":if(an||!o.dataAfterTimeout)return;break;default:return}if(j==="abort"){f=le,L();return}if(an){f=le,m.length||(a.length?ce():L());return}if(S(),R(),!o.random){const Pt=o.resources.indexOf(w.resource);Pt!==-1&&Pt!==o.index&&(o.index=Pt)}c="completed",x.forEach(Pt=>{Pt(le)})}function ce(){if(c!=="pending")return;S();const w=a.shift();if(w===void 0){if(m.length){g=setTimeout(()=>{S(),c==="pending"&&(R(),L())},o.timeout);return}L();return}const j={status:"pending",resource:w,callback:(le,an)=>{Hn(j,le,an)}};m.push(j),d++,g=setTimeout(ce,o.rotate),t(w,s,j.callback)}return setTimeout(ce),et}function ao(o){const s={...Is,...o};let t=[];function i(){t=t.filter(l=>l().status==="pending")}function e(l,c,d){const f=Es(s,l,c,(g,m)=>{i(),d&&d(g,m)});return t.push(f),f}function r(l){return t.find(c=>l(c))||null}return{query:e,find:r,setIndex:l=>{s.index=l},getIndex:()=>s.index,cleanup:i}}function wi(o){let s;if(typeof o.resources=="string")s=[o.resources];else if(s=o.resources,!(s instanceof Array)||!s.length)return null;return{resources:s,path:o.path||"/",maxURL:o.maxURL||500,rotate:o.rotate||750,timeout:o.timeout||5e3,random:o.random===!0,index:o.index||0,dataAfterTimeout:o.dataAfterTimeout!==!1}}const $n=Object.create(null),he=["https://api.simplesvg.com","https://api.unisvg.com"],un=[];for(;he.length>0;)he.length===1||Math.random()>.5?un.push(he.shift()):un.push(he.pop());$n[""]=wi({resources:["https://api.iconify.design"].concat(un)});function Fi(o,s){const t=wi(s);return t===null?!1:($n[o]=t,!0)}function Wn(o){return $n[o]}function Ls(){return Object.keys($n)}function Ri(){}const Qn=Object.create(null);function Ts(o){if(!Qn[o]){const s=Wn(o);if(!s)return;const t=ao(s),i={config:s,redundancy:t};Qn[o]=i}return Qn[o]}function co(o,s,t){let i,e;if(typeof o=="string"){const r=ti(o);if(!r)return t(void 0,424),Ri;e=r.send;const a=Ts(o);a&&(i=a.redundancy)}else{const r=wi(o);if(r){i=ao(r);const a=o.resources?o.resources[0]:"",l=ti(a);l&&(e=l.send)}}return!i||!e?(t(void 0,424),Ri):i.query(s,e,t)().abort}const Pi="iconify2",me="iconify",lo=me+"-count",zi=me+"-version",ho=36e5,Cs=168;function ei(o,s){try{return o.getItem(s)}catch{}}function vi(o,s,t){try{return o.setItem(s,t),!0}catch{}}function Oi(o,s){try{o.removeItem(s)}catch{}}function ni(o,s){return vi(o,lo,s.toString())}function ii(o){return parseInt(ei(o,lo))||0}const Vt={local:!0,session:!0},uo={local:new Set,session:new Set};let xi=!1;function As(o){xi=o}let ln=typeof window>"u"?{}:window;function fo(o){const s=o+"Storage";try{if(ln&&ln[s]&&typeof ln[s].length=="number")return ln[s]}catch{}Vt[o]=!1}function po(o,s){const t=fo(o);if(!t)return;const i=ei(t,zi);if(i!==Pi){if(i){const l=ii(t);for(let c=0;c{const c=me+l.toString(),d=ei(t,c);if(typeof d=="string"){try{const f=JSON.parse(d);if(typeof f=="object"&&typeof f.cached=="number"&&f.cached>e&&typeof f.provider=="string"&&typeof f.data=="object"&&typeof f.data.prefix=="string"&&s(f,l))return!0}catch{}Oi(t,c)}};let a=ii(t);for(let l=a-1;l>=0;l--)r(l)||(l===a-1?(a--,ni(t,a)):uo[o].add(l))}function go(){if(!xi){As(!0);for(const o in Vt)po(o,s=>{const t=s.data,i=s.provider,e=t.prefix,r=Ft(i,e);if(!yi(r,t).length)return!1;const a=t.lastModified||-1;return r.lastModifiedCached=r.lastModifiedCached?Math.min(r.lastModifiedCached,a):a,!0})}}function Fs(o,s){const t=o.lastModifiedCached;if(t&&t>=s)return t===s;if(o.lastModifiedCached=s,t)for(const i in Vt)po(i,e=>{const r=e.data;return e.provider!==o.provider||r.prefix!==o.prefix||r.lastModified===s});return!0}function Rs(o,s){xi||go();function t(i){let e;if(!Vt[i]||!(e=fo(i)))return;const r=uo[i];let a;if(r.size)r.delete(a=Array.from(r).shift());else if(a=ii(e),!ni(e,a+1))return;const l={cached:Math.floor(Date.now()/ho),provider:o.provider,data:s};return vi(e,me+a.toString(),JSON.stringify(l))}s.lastModified&&!Fs(o,s.lastModified)||Object.keys(s.icons).length&&(s.not_found&&(s=Object.assign({},s),delete s.not_found),t("local")||t("session"))}function Bi(){}function Ps(o){o.iconsLoaderFlag||(o.iconsLoaderFlag=!0,setTimeout(()=>{o.iconsLoaderFlag=!1,vs(o)}))}function zs(o,s){o.iconsToLoad?o.iconsToLoad=o.iconsToLoad.concat(s).sort():o.iconsToLoad=s,o.iconsQueueFlag||(o.iconsQueueFlag=!0,setTimeout(()=>{o.iconsQueueFlag=!1;const{provider:t,prefix:i}=o,e=o.iconsToLoad;delete o.iconsToLoad;let r;if(!e||!(r=ti(t)))return;r.prepare(t,i,e).forEach(l=>{co(t,l,c=>{if(typeof c!="object")l.icons.forEach(d=>{o.missing.add(d)});else try{const d=yi(o,c);if(!d.length)return;const f=o.pendingIcons;f&&d.forEach(g=>{f.delete(g)}),Rs(o,c)}catch(d){console.error(d)}Ps(o)})})}))}const Si=(o,s)=>{const t=ks(o,!0,oo()),i=ws(t);if(!i.pending.length){let c=!0;return s&&setTimeout(()=>{c&&s(i.loaded,i.missing,i.pending,Bi)}),()=>{c=!1}}const e=Object.create(null),r=[];let a,l;return i.pending.forEach(c=>{const{provider:d,prefix:f}=c;if(f===l&&d===a)return;a=d,l=f,r.push(Ft(d,f));const g=e[d]||(e[d]=Object.create(null));g[f]||(g[f]=[])}),i.pending.forEach(c=>{const{provider:d,prefix:f,name:g}=c,m=Ft(d,f),x=m.pendingIcons||(m.pendingIcons=new Set);x.has(g)||(x.add(g),e[d][f].push(g))}),r.forEach(c=>{const{provider:d,prefix:f}=c;e[d][f].length&&zs(c,e[d][f])}),s?Ss(s,i,r):Bi},Os=o=>new Promise((s,t)=>{const i=typeof o=="string"?rn(o,!0):o;if(!i){t(o);return}Si([i||o],e=>{if(e.length&&i){const r=ge(i);if(r){s({...sn,...r});return}}t(o)})});function Bs(o){try{const s=typeof o=="string"?JSON.parse(o):o;if(typeof s.body=="string")return{...s}}catch{}}function Ms(o,s){const t=typeof o=="string"?rn(o,!0,!0):null;if(!t){const r=Bs(o);return{value:o,data:r}}const i=ge(t);if(i!==void 0||!t.prefix)return{value:o,name:t,data:i};const e=Si([t],()=>s(o,t,ge(t)));return{value:o,name:t,loading:e}}function Yn(o){return o.hasAttribute("inline")}let mo=!1;try{mo=navigator.vendor.indexOf("Apple")===0}catch{}function Ns(o,s){switch(s){case"svg":case"bg":case"mask":return s}return s!=="style"&&(mo||o.indexOf("o==="unset"||o==="undefined"||o==="none";function bo(o,s){const t={...sn,...o},i={...to,...s},e={left:t.left,top:t.top,width:t.width,height:t.height};let r=t.body;[t,i].forEach(S=>{const k=[],Rt=S.hFlip,et=S.vFlip;let L=S.rotate;Rt?et?L+=2:(k.push("translate("+(e.width+e.left).toString()+" "+(0-e.top).toString()+")"),k.push("scale(-1 1)"),e.top=e.left=0):et&&(k.push("translate("+(0-e.left).toString()+" "+(e.height+e.top).toString()+")"),k.push("scale(1 -1)"),e.top=e.left=0);let R;switch(L<0&&(L-=Math.floor(L/4)*4),L=L%4,L){case 1:R=e.height/2+e.top,k.unshift("rotate(90 "+R.toString()+" "+R.toString()+")");break;case 2:k.unshift("rotate(180 "+(e.width/2+e.left).toString()+" "+(e.height/2+e.top).toString()+")");break;case 3:R=e.width/2+e.left,k.unshift("rotate(-90 "+R.toString()+" "+R.toString()+")");break}L%2===1&&(e.left!==e.top&&(R=e.left,e.left=e.top,e.top=R),e.width!==e.height&&(R=e.width,e.width=e.height,e.height=R)),k.length&&(r=''+r+"")});const a=i.width,l=i.height,c=e.width,d=e.height;let f,g;a===null?(g=l===null?"1em":l==="auto"?d:l,f=oi(g,c/d)):(f=a==="auto"?c:a,g=l===null?oi(f,d/c):l==="auto"?d:l);const m={},x=(S,k)=>{_s(k)||(m[S]=k.toString())};return x("width",f),x("height",g),m.viewBox=e.left.toString()+" "+e.top.toString()+" "+c.toString()+" "+d.toString(),{attributes:m,body:r}}const qs=()=>{let o;try{if(o=fetch,typeof o=="function")return o}catch{}};let gn=qs();function $s(o){gn=o}function Ws(){return gn}function Hs(o,s){const t=Wn(o);if(!t)return 0;let i;if(!t.maxURL)i=0;else{let e=0;t.resources.forEach(a=>{e=Math.max(e,a.length)});const r=s+".json?icons=";i=t.maxURL-e-t.path.length-r.length}return i}function Ds(o){return o===404}const Gs=(o,s,t)=>{const i=[],e=Hs(o,s),r="icons";let a={type:r,provider:o,prefix:s,icons:[]},l=0;return t.forEach((c,d)=>{l+=c.length+1,l>=e&&d>0&&(i.push(a),a={type:r,provider:o,prefix:s,icons:[]},l=c.length),a.icons.push(c)}),i.push(a),i};function Qs(o){if(typeof o=="string"){const s=Wn(o);if(s)return s.path}return"/"}const Ys=(o,s,t)=>{if(!gn){t("abort",424);return}let i=Qs(s.provider);switch(s.type){case"icons":{const r=s.prefix,l=s.icons.join(","),c=new URLSearchParams({icons:l});i+=r+".json?"+c.toString();break}case"custom":{const r=s.uri;i+=r.slice(0,1)==="/"?r.slice(1):r;break}default:t("abort",400);return}let e=503;gn(o+i).then(r=>{const a=r.status;if(a!==200){setTimeout(()=>{t(Ds(a)?"abort":"next",a)});return}return e=501,r.json()}).then(r=>{if(typeof r!="object"||r===null){setTimeout(()=>{r===404?t("abort",r):t("next",e)});return}setTimeout(()=>{t("success",r)})}).catch(()=>{t("next",e)})},Xs={prepare:Gs,send:Ys};function Mi(o,s){switch(o){case"local":case"session":Vt[o]=s;break;case"all":for(const t in Vt)Vt[t]=s;break}}const Xn="data-style";let yo="";function Vs(o){yo=o}function Ni(o,s){let t=Array.from(o.childNodes).find(i=>i.hasAttribute&&i.hasAttribute(Xn));t||(t=document.createElement("style"),t.setAttribute(Xn,Xn),o.appendChild(t)),t.textContent=":host{display:inline-block;vertical-align:"+(s?"-0.125em":"0")+"}span,svg{display:block}"+yo}function wo(){Ai("",Xs),oo(!0);let o;try{o=window}catch{}if(o){if(go(),o.IconifyPreload!==void 0){const t=o.IconifyPreload,i="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!="object"||e===null||e instanceof Array||typeof e.icons!="object"||typeof e.prefix!="string"||!Ci(e))&&console.error(i)}catch{console.error(i)}})}if(o.IconifyProviders!==void 0){const t=o.IconifyProviders;if(typeof t=="object"&&t!==null)for(const i in t){const e="IconifyProviders["+i+"] is invalid.";try{const r=t[i];if(typeof r!="object"||!r||r.resources===void 0)continue;Fi(i,r)||console.error(e)}catch{console.error(e)}}}}return{enableCache:t=>Mi(t,!0),disableCache:t=>Mi(t,!1),iconExists:bs,getIcon:ys,listIcons:ms,addIcon:so,addCollection:Ci,calculateSize:oi,buildIcon:bo,loadIcons:Si,loadIcon:Os,addAPIProvider:Fi,appendCustomStyle:Vs,_api:{getAPIConfig:Wn,setAPIModule:Ai,sendAPIQuery:co,setFetch:$s,getFetch:Ws,listAPIProviders:Ls}}}function vo(o,s){let t=o.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in s)t+=" "+i+'="'+s[i]+'"';return'"+o+""}function Ks(o){return o.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function Js(o){return"data:image/svg+xml,"+Ks(o)}function Zs(o){return'url("'+Js(o)+'")'}const si={"background-color":"currentColor"},xo={"background-color":"transparent"},Ui={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},ji={"-webkit-mask":si,mask:si,background:xo};for(const o in ji){const s=ji[o];for(const t in Ui)s[o+"-"+t]=Ui[t]}function _i(o){return o?o+(o.match(/^[-0-9.]+$/)?"px":""):"inherit"}function tr(o,s,t){const i=document.createElement("span");let e=o.body;e.indexOf("");const r=o.attributes,a=vo(e,{...r,width:s.width+"",height:s.height+""}),l=Zs(a),c=i.style,d={"--svg":l,width:_i(r.width),height:_i(r.height),...t?si:xo};for(const f in d)c.setProperty(f,d[f]);return i}let fe;function er(){try{fe=window.trustedTypes.createPolicy("iconify",{createHTML:o=>o})}catch{fe=null}}function nr(o){return fe===void 0&&er(),fe?fe.createHTML(o):o}function ir(o){const s=document.createElement("span"),t=o.attributes;let i="";t.width||(i="width: inherit;"),t.height||(i+="height: inherit;"),i&&(t.style=i);const e=vo(o.body,t);return s.innerHTML=nr(e),s.firstChild}function qi(o,s){const t=s.icon.data,i=s.customisations,e=bo(t,i);i.preserveAspectRatio&&(e.attributes.preserveAspectRatio=i.preserveAspectRatio);const r=s.renderedMode;let a;switch(r){case"svg":a=ir(e);break;default:a=tr(e,{...sn,...t},r==="mask")}const l=Array.from(o.childNodes).find(c=>{const d=c.tagName&&c.tagName.toUpperCase();return d==="SPAN"||d==="SVG"});l?a.tagName==="SPAN"&&l.tagName===a.tagName?l.setAttribute("style",a.getAttribute("style")):o.replaceChild(a,l):o.appendChild(a)}function $i(o,s,t){const i=t&&(t.rendered?t:t.lastRender);return{rendered:!1,inline:s,icon:o,lastRender:i}}function or(o="iconify-icon"){let s,t;try{s=window.customElements,t=window.HTMLElement}catch{return}if(!s||!t)return;const i=s.get(o);if(i)return i;const e=["icon","mode","inline","width","height","rotate","flip"],r=class extends t{constructor(){super();E(this,"_shadowRoot");E(this,"_state");E(this,"_checkQueued",!1);const c=this._shadowRoot=this.attachShadow({mode:"open"}),d=Yn(this);Ni(c,d),this._state=$i({value:""},d),this._queueCheck()}static get observedAttributes(){return e.slice(0)}attributeChangedCallback(c){if(c==="inline"){const d=Yn(this),f=this._state;d!==f.inline&&(f.inline=d,Ni(this._shadowRoot,d))}else this._queueCheck()}get icon(){const c=this.getAttribute("icon");if(c&&c.slice(0,1)==="{")try{return JSON.parse(c)}catch{}return c}set icon(c){typeof c=="object"&&(c=JSON.stringify(c)),this.setAttribute("icon",c)}get inline(){return Yn(this)}set inline(c){c?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const c=this._state;if(c.rendered){const d=this._shadowRoot;if(c.renderedMode==="svg")try{d.lastChild.setCurrentTime(0);return}catch{}qi(d,c)}}get status(){const c=this._state;return c.rendered?"rendered":c.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const c=this._state,d=this.getAttribute("icon");if(d!==c.icon.value){this._iconChanged(d);return}if(!c.rendered)return;const f=this.getAttribute("mode"),g=Li(this);(c.attrMode!==f||ls(c.customisations,g))&&this._renderIcon(c.icon,g,f)}_iconChanged(c){const d=Ms(c,(f,g,m)=>{const x=this._state;if(x.rendered||this.getAttribute("icon")!==f)return;const S={value:f,name:g,data:m};S.data?this._gotIconData(S):x.icon=S});d.data?this._gotIconData(d):this._state=$i(d,this._state.inline,this._state)}_gotIconData(c){this._checkQueued=!1,this._renderIcon(c,Li(this),this.getAttribute("mode"))}_renderIcon(c,d,f){const g=Ns(c.data.body,f),m=this._state.inline;qi(this._shadowRoot,this._state={rendered:!0,icon:c,inline:m,customisations:d,attrMode:f,renderedMode:g})}};e.forEach(l=>{l in r.prototype||Object.defineProperty(r.prototype,l,{get:function(){return this.getAttribute(l)},set:function(c){c!==null?this.setAttribute(l,c):this.removeAttribute(l)}})});const a=wo();for(const l in a)r[l]=r.prototype[l]=a[l];return s.define(o,r),r}or()||wo();const sr=`:host{display:flex;position:relative;justify-content:center;align-items:stretch}.bottom-img{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain}.top-img{position:absolute;-webkit-mask-image:linear-gradient(90deg,rgb(0 0 0 / 0%) 35%,rgb(255 255 255 / 100%) 50%,rgb(0 0 0 / 0%) 65%);mask-image:linear-gradient(90deg,rgb(0 0 0 / 0%) 35%,rgb(255 255 255 / 100%) 50%,rgb(0 0 0 / 0%) 65%);-webkit-mask-size:300% 100%;mask-size:300% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;filter:brightness(1.8);animation-duration:4s;animation-timing-function:linear;animation-iteration-count:infinite;animation-name:flicker;max-width:100%;max-height:100%}@keyframes flicker{0%{-webkit-mask-position:150% 0%;mask-position:150% 0%}30%{-webkit-mask-position:-150% 0%;mask-position:-150% 0%}to{-webkit-mask-position:-150% 0%;mask-position:-150% 0%}} +*/const Zi=Object.freeze({left:0,top:0,width:16,height:16}),fn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),sn=Object.freeze({...Zi,...fn}),Jn=Object.freeze({...sn,body:"",hidden:!1}),ss=Object.freeze({width:null,height:null}),to=Object.freeze({...ss,...fn});function rs(o,s=0){const t=o.replace(/^-?[0-9.]*/,"");function i(e){for(;e<0;)e+=4;return e%4}if(t===""){const e=parseInt(o);return isNaN(e)?0:i(e)}else if(t!==o){let e=0;switch(t){case"%":e=25;break;case"deg":e=90}if(e){let r=parseFloat(o.slice(0,o.length-t.length));return isNaN(r)?0:(r=r/e,r%1===0?i(r):0)}}return s}const as=/[\s,]+/;function cs(o,s){s.split(as).forEach(t=>{switch(t.trim()){case"horizontal":o.hFlip=!0;break;case"vertical":o.vFlip=!0;break}})}const eo={...to,preserveAspectRatio:""};function Li(o){const s={...eo},t=(i,e)=>o.getAttribute(i)||e;return s.width=t("width",null),s.height=t("height",null),s.rotate=rs(t("rotate","")),cs(s,t("flip","")),s.preserveAspectRatio=t("preserveAspectRatio",t("preserveaspectratio","")),s}function ls(o,s){for(const t in eo)if(o[t]!==s[t])return!0;return!1}const ue=/^[a-z0-9]+(-[a-z0-9]+)*$/,rn=(o,s,t,i="")=>{const e=o.split(":");if(o.slice(0,1)==="@"){if(e.length<2||e.length>3)return null;i=e.shift().slice(1)}if(e.length>3||!e.length)return null;if(e.length>1){const l=e.pop(),c=e.pop(),d={provider:e.length>0?e[0]:i,prefix:c,name:l};return s&&!dn(d)?null:d}const r=e[0],a=r.split("-");if(a.length>1){const l={provider:i,prefix:a.shift(),name:a.join("-")};return s&&!dn(l)?null:l}if(t&&i===""){const l={provider:i,prefix:"",name:r};return s&&!dn(l,t)?null:l}return null},dn=(o,s)=>o?!!((o.provider===""||o.provider.match(ue))&&(s&&o.prefix===""||o.prefix.match(ue))&&o.name.match(ue)):!1;function hs(o,s){const t={};!o.hFlip!=!s.hFlip&&(t.hFlip=!0),!o.vFlip!=!s.vFlip&&(t.vFlip=!0);const i=((o.rotate||0)+(s.rotate||0))%4;return i&&(t.rotate=i),t}function Ti(o,s){const t=hs(o,s);for(const i in Jn)i in fn?i in o&&!(i in t)&&(t[i]=fn[i]):i in s?t[i]=s[i]:i in o&&(t[i]=o[i]);return t}function ds(o,s){const t=o.icons,i=o.aliases||Object.create(null),e=Object.create(null);function r(a){if(t[a])return e[a]=[];if(!(a in e)){e[a]=null;const l=i[a]&&i[a].parent,c=l&&r(l);c&&(e[a]=[l].concat(c))}return e[a]}return(s||Object.keys(t).concat(Object.keys(i))).forEach(r),e}function us(o,s,t){const i=o.icons,e=o.aliases||Object.create(null);let r={};function a(l){r=Ti(i[l]||e[l],r)}return a(s),t.forEach(a),Ti(o,r)}function no(o,s){const t=[];if(typeof o!="object"||typeof o.icons!="object")return t;o.not_found instanceof Array&&o.not_found.forEach(e=>{s(e,null),t.push(e)});const i=ds(o);for(const e in i){const r=i[e];r&&(s(e,us(o,e,r)),t.push(e))}return t}const fs={provider:"",aliases:{},not_found:{},...Zi};function Gn(o,s){for(const t in s)if(t in o&&typeof o[t]!=typeof s[t])return!1;return!0}function io(o){if(typeof o!="object"||o===null)return null;const s=o;if(typeof s.prefix!="string"||!o.icons||typeof o.icons!="object"||!Gn(o,fs))return null;const t=s.icons;for(const e in t){const r=t[e];if(!e.match(ue)||typeof r.body!="string"||!Gn(r,Jn))return null}const i=s.aliases||Object.create(null);for(const e in i){const r=i[e],a=r.parent;if(!e.match(ue)||typeof a!="string"||!t[a]&&!i[a]||!Gn(r,Jn))return null}return s}const pn=Object.create(null);function ps(o,s){return{provider:o,prefix:s,icons:Object.create(null),missing:new Set}}function Rt(o,s){const t=pn[o]||(pn[o]=Object.create(null));return t[s]||(t[s]=ps(o,s))}function yi(o,s){return io(s)?no(s,(t,i)=>{i?o.icons[t]=i:o.missing.add(t)}):[]}function gs(o,s,t){try{if(typeof t.body=="string")return o.icons[s]={...t},!0}catch{}return!1}function ms(o,s){let t=[];return(typeof o=="string"?[o]:Object.keys(pn)).forEach(e=>{(typeof e=="string"&&typeof s=="string"?[s]:Object.keys(pn[e]||{})).forEach(a=>{const l=Rt(e,a);t=t.concat(Object.keys(l.icons).map(c=>(e!==""?"@"+e+":":"")+a+":"+c))})}),t}let pe=!1;function oo(o){return typeof o=="boolean"&&(pe=o),pe}function ge(o){const s=typeof o=="string"?rn(o,!0,pe):o;if(s){const t=Rt(s.provider,s.prefix),i=s.name;return t.icons[i]||(t.missing.has(i)?null:void 0)}}function so(o,s){const t=rn(o,!0,pe);if(!t)return!1;const i=Rt(t.provider,t.prefix);return gs(i,t.name,s)}function Ci(o,s){if(typeof o!="object")return!1;if(typeof s!="string"&&(s=o.provider||""),pe&&!s&&!o.prefix){let e=!1;return io(o)&&(o.prefix="",no(o,(r,a)=>{a&&so(r,a)&&(e=!0)})),e}const t=o.prefix;if(!dn({provider:s,prefix:t,name:"a"}))return!1;const i=Rt(s,t);return!!yi(i,o)}function bs(o){return!!ge(o)}function ys(o){const s=ge(o);return s?{...sn,...s}:null}function ws(o){const s={loaded:[],missing:[],pending:[]},t=Object.create(null);o.sort((e,r)=>e.provider!==r.provider?e.provider.localeCompare(r.provider):e.prefix!==r.prefix?e.prefix.localeCompare(r.prefix):e.name.localeCompare(r.name));let i={provider:"",prefix:"",name:""};return o.forEach(e=>{if(i.name===e.name&&i.prefix===e.prefix&&i.provider===e.provider)return;i=e;const r=e.provider,a=e.prefix,l=e.name,c=t[r]||(t[r]=Object.create(null)),d=c[a]||(c[a]=Rt(r,a));let f;l in d.icons?f=s.loaded:a===""||d.missing.has(l)?f=s.missing:f=s.pending;const g={provider:r,prefix:a,name:l};f.push(g)}),s}function ro(o,s){o.forEach(t=>{const i=t.loaderCallbacks;i&&(t.loaderCallbacks=i.filter(e=>e.id!==s))})}function vs(o){o.pendingCallbacksFlag||(o.pendingCallbacksFlag=!0,setTimeout(()=>{o.pendingCallbacksFlag=!1;const s=o.loaderCallbacks?o.loaderCallbacks.slice(0):[];if(!s.length)return;let t=!1;const i=o.provider,e=o.prefix;s.forEach(r=>{const a=r.icons,l=a.pending.length;a.pending=a.pending.filter(c=>{if(c.prefix!==e)return!0;const d=c.name;if(o.icons[d])a.loaded.push({provider:i,prefix:e,name:d});else if(o.missing.has(d))a.missing.push({provider:i,prefix:e,name:d});else return t=!0,!0;return!1}),a.pending.length!==l&&(t||ro([o],r.id),r.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),r.abort))})}))}let xs=0;function Ss(o,s,t){const i=xs++,e=ro.bind(null,t,i);if(!s.pending.length)return e;const r={id:i,icons:s,callback:o,abort:e};return t.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(r)}),e}const Zn=Object.create(null);function Ai(o,s){Zn[o]=s}function ti(o){return Zn[o]||Zn[""]}function ks(o,s=!0,t=!1){const i=[];return o.forEach(e=>{const r=typeof e=="string"?rn(e,s,t):e;r&&i.push(r)}),i}var Is={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Es(o,s,t,i){const e=o.resources.length,r=o.random?Math.floor(Math.random()*e):o.index;let a;if(o.random){let w=o.resources.slice(0);for(a=[];w.length>1;){const j=Math.floor(Math.random()*w.length);a.push(w[j]),w=w.slice(0,j).concat(w.slice(j+1))}a=a.concat(w)}else a=o.resources.slice(r).concat(o.resources.slice(0,r));const l=Date.now();let c="pending",d=0,f,g=null,m=[],x=[];typeof i=="function"&&x.push(i);function S(){g&&(clearTimeout(g),g=null)}function k(){c==="pending"&&(c="aborted"),S(),m.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),m=[]}function Ft(w,j){j&&(x=[]),typeof w=="function"&&x.push(w)}function et(){return{startTime:l,payload:s,status:c,queriesSent:d,queriesPending:m.length,subscribe:Ft,abort:k}}function L(){c="failed",x.forEach(w=>{w(void 0,f)})}function F(){m.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),m=[]}function Hn(w,j,le){const an=j!=="success";switch(m=m.filter(Pt=>Pt!==w),c){case"pending":break;case"failed":if(an||!o.dataAfterTimeout)return;break;default:return}if(j==="abort"){f=le,L();return}if(an){f=le,m.length||(a.length?ce():L());return}if(S(),F(),!o.random){const Pt=o.resources.indexOf(w.resource);Pt!==-1&&Pt!==o.index&&(o.index=Pt)}c="completed",x.forEach(Pt=>{Pt(le)})}function ce(){if(c!=="pending")return;S();const w=a.shift();if(w===void 0){if(m.length){g=setTimeout(()=>{S(),c==="pending"&&(F(),L())},o.timeout);return}L();return}const j={status:"pending",resource:w,callback:(le,an)=>{Hn(j,le,an)}};m.push(j),d++,g=setTimeout(ce,o.rotate),t(w,s,j.callback)}return setTimeout(ce),et}function ao(o){const s={...Is,...o};let t=[];function i(){t=t.filter(l=>l().status==="pending")}function e(l,c,d){const f=Es(s,l,c,(g,m)=>{i(),d&&d(g,m)});return t.push(f),f}function r(l){return t.find(c=>l(c))||null}return{query:e,find:r,setIndex:l=>{s.index=l},getIndex:()=>s.index,cleanup:i}}function wi(o){let s;if(typeof o.resources=="string")s=[o.resources];else if(s=o.resources,!(s instanceof Array)||!s.length)return null;return{resources:s,path:o.path||"/",maxURL:o.maxURL||500,rotate:o.rotate||750,timeout:o.timeout||5e3,random:o.random===!0,index:o.index||0,dataAfterTimeout:o.dataAfterTimeout!==!1}}const $n=Object.create(null),he=["https://api.simplesvg.com","https://api.unisvg.com"],un=[];for(;he.length>0;)he.length===1||Math.random()>.5?un.push(he.shift()):un.push(he.pop());$n[""]=wi({resources:["https://api.iconify.design"].concat(un)});function Ri(o,s){const t=wi(s);return t===null?!1:($n[o]=t,!0)}function Wn(o){return $n[o]}function Ls(){return Object.keys($n)}function Fi(){}const Qn=Object.create(null);function Ts(o){if(!Qn[o]){const s=Wn(o);if(!s)return;const t=ao(s),i={config:s,redundancy:t};Qn[o]=i}return Qn[o]}function co(o,s,t){let i,e;if(typeof o=="string"){const r=ti(o);if(!r)return t(void 0,424),Fi;e=r.send;const a=Ts(o);a&&(i=a.redundancy)}else{const r=wi(o);if(r){i=ao(r);const a=o.resources?o.resources[0]:"",l=ti(a);l&&(e=l.send)}}return!i||!e?(t(void 0,424),Fi):i.query(s,e,t)().abort}const Pi="iconify2",me="iconify",lo=me+"-count",zi=me+"-version",ho=36e5,Cs=168;function ei(o,s){try{return o.getItem(s)}catch{}}function vi(o,s,t){try{return o.setItem(s,t),!0}catch{}}function Mi(o,s){try{o.removeItem(s)}catch{}}function ni(o,s){return vi(o,lo,s.toString())}function ii(o){return parseInt(ei(o,lo))||0}const Vt={local:!0,session:!0},uo={local:new Set,session:new Set};let xi=!1;function As(o){xi=o}let ln=typeof window>"u"?{}:window;function fo(o){const s=o+"Storage";try{if(ln&&ln[s]&&typeof ln[s].length=="number")return ln[s]}catch{}Vt[o]=!1}function po(o,s){const t=fo(o);if(!t)return;const i=ei(t,zi);if(i!==Pi){if(i){const l=ii(t);for(let c=0;c{const c=me+l.toString(),d=ei(t,c);if(typeof d=="string"){try{const f=JSON.parse(d);if(typeof f=="object"&&typeof f.cached=="number"&&f.cached>e&&typeof f.provider=="string"&&typeof f.data=="object"&&typeof f.data.prefix=="string"&&s(f,l))return!0}catch{}Mi(t,c)}};let a=ii(t);for(let l=a-1;l>=0;l--)r(l)||(l===a-1?(a--,ni(t,a)):uo[o].add(l))}function go(){if(!xi){As(!0);for(const o in Vt)po(o,s=>{const t=s.data,i=s.provider,e=t.prefix,r=Rt(i,e);if(!yi(r,t).length)return!1;const a=t.lastModified||-1;return r.lastModifiedCached=r.lastModifiedCached?Math.min(r.lastModifiedCached,a):a,!0})}}function Rs(o,s){const t=o.lastModifiedCached;if(t&&t>=s)return t===s;if(o.lastModifiedCached=s,t)for(const i in Vt)po(i,e=>{const r=e.data;return e.provider!==o.provider||r.prefix!==o.prefix||r.lastModified===s});return!0}function Fs(o,s){xi||go();function t(i){let e;if(!Vt[i]||!(e=fo(i)))return;const r=uo[i];let a;if(r.size)r.delete(a=Array.from(r).shift());else if(a=ii(e),!ni(e,a+1))return;const l={cached:Math.floor(Date.now()/ho),provider:o.provider,data:s};return vi(e,me+a.toString(),JSON.stringify(l))}s.lastModified&&!Rs(o,s.lastModified)||Object.keys(s.icons).length&&(s.not_found&&(s=Object.assign({},s),delete s.not_found),t("local")||t("session"))}function Oi(){}function Ps(o){o.iconsLoaderFlag||(o.iconsLoaderFlag=!0,setTimeout(()=>{o.iconsLoaderFlag=!1,vs(o)}))}function zs(o,s){o.iconsToLoad?o.iconsToLoad=o.iconsToLoad.concat(s).sort():o.iconsToLoad=s,o.iconsQueueFlag||(o.iconsQueueFlag=!0,setTimeout(()=>{o.iconsQueueFlag=!1;const{provider:t,prefix:i}=o,e=o.iconsToLoad;delete o.iconsToLoad;let r;if(!e||!(r=ti(t)))return;r.prepare(t,i,e).forEach(l=>{co(t,l,c=>{if(typeof c!="object")l.icons.forEach(d=>{o.missing.add(d)});else try{const d=yi(o,c);if(!d.length)return;const f=o.pendingIcons;f&&d.forEach(g=>{f.delete(g)}),Fs(o,c)}catch(d){console.error(d)}Ps(o)})})}))}const Si=(o,s)=>{const t=ks(o,!0,oo()),i=ws(t);if(!i.pending.length){let c=!0;return s&&setTimeout(()=>{c&&s(i.loaded,i.missing,i.pending,Oi)}),()=>{c=!1}}const e=Object.create(null),r=[];let a,l;return i.pending.forEach(c=>{const{provider:d,prefix:f}=c;if(f===l&&d===a)return;a=d,l=f,r.push(Rt(d,f));const g=e[d]||(e[d]=Object.create(null));g[f]||(g[f]=[])}),i.pending.forEach(c=>{const{provider:d,prefix:f,name:g}=c,m=Rt(d,f),x=m.pendingIcons||(m.pendingIcons=new Set);x.has(g)||(x.add(g),e[d][f].push(g))}),r.forEach(c=>{const{provider:d,prefix:f}=c;e[d][f].length&&zs(c,e[d][f])}),s?Ss(s,i,r):Oi},Ms=o=>new Promise((s,t)=>{const i=typeof o=="string"?rn(o,!0):o;if(!i){t(o);return}Si([i||o],e=>{if(e.length&&i){const r=ge(i);if(r){s({...sn,...r});return}}t(o)})});function Os(o){try{const s=typeof o=="string"?JSON.parse(o):o;if(typeof s.body=="string")return{...s}}catch{}}function Bs(o,s){const t=typeof o=="string"?rn(o,!0,!0):null;if(!t){const r=Os(o);return{value:o,data:r}}const i=ge(t);if(i!==void 0||!t.prefix)return{value:o,name:t,data:i};const e=Si([t],()=>s(o,t,ge(t)));return{value:o,name:t,loading:e}}function Yn(o){return o.hasAttribute("inline")}let mo=!1;try{mo=navigator.vendor.indexOf("Apple")===0}catch{}function Ns(o,s){switch(s){case"svg":case"bg":case"mask":return s}return s!=="style"&&(mo||o.indexOf("o==="unset"||o==="undefined"||o==="none";function bo(o,s){const t={...sn,...o},i={...to,...s},e={left:t.left,top:t.top,width:t.width,height:t.height};let r=t.body;[t,i].forEach(S=>{const k=[],Ft=S.hFlip,et=S.vFlip;let L=S.rotate;Ft?et?L+=2:(k.push("translate("+(e.width+e.left).toString()+" "+(0-e.top).toString()+")"),k.push("scale(-1 1)"),e.top=e.left=0):et&&(k.push("translate("+(0-e.left).toString()+" "+(e.height+e.top).toString()+")"),k.push("scale(1 -1)"),e.top=e.left=0);let F;switch(L<0&&(L-=Math.floor(L/4)*4),L=L%4,L){case 1:F=e.height/2+e.top,k.unshift("rotate(90 "+F.toString()+" "+F.toString()+")");break;case 2:k.unshift("rotate(180 "+(e.width/2+e.left).toString()+" "+(e.height/2+e.top).toString()+")");break;case 3:F=e.width/2+e.left,k.unshift("rotate(-90 "+F.toString()+" "+F.toString()+")");break}L%2===1&&(e.left!==e.top&&(F=e.left,e.left=e.top,e.top=F),e.width!==e.height&&(F=e.width,e.width=e.height,e.height=F)),k.length&&(r=''+r+"")});const a=i.width,l=i.height,c=e.width,d=e.height;let f,g;a===null?(g=l===null?"1em":l==="auto"?d:l,f=oi(g,c/d)):(f=a==="auto"?c:a,g=l===null?oi(f,d/c):l==="auto"?d:l);const m={},x=(S,k)=>{_s(k)||(m[S]=k.toString())};return x("width",f),x("height",g),m.viewBox=e.left.toString()+" "+e.top.toString()+" "+c.toString()+" "+d.toString(),{attributes:m,body:r}}const qs=()=>{let o;try{if(o=fetch,typeof o=="function")return o}catch{}};let gn=qs();function $s(o){gn=o}function Ws(){return gn}function Hs(o,s){const t=Wn(o);if(!t)return 0;let i;if(!t.maxURL)i=0;else{let e=0;t.resources.forEach(a=>{e=Math.max(e,a.length)});const r=s+".json?icons=";i=t.maxURL-e-t.path.length-r.length}return i}function Ds(o){return o===404}const Gs=(o,s,t)=>{const i=[],e=Hs(o,s),r="icons";let a={type:r,provider:o,prefix:s,icons:[]},l=0;return t.forEach((c,d)=>{l+=c.length+1,l>=e&&d>0&&(i.push(a),a={type:r,provider:o,prefix:s,icons:[]},l=c.length),a.icons.push(c)}),i.push(a),i};function Qs(o){if(typeof o=="string"){const s=Wn(o);if(s)return s.path}return"/"}const Ys=(o,s,t)=>{if(!gn){t("abort",424);return}let i=Qs(s.provider);switch(s.type){case"icons":{const r=s.prefix,l=s.icons.join(","),c=new URLSearchParams({icons:l});i+=r+".json?"+c.toString();break}case"custom":{const r=s.uri;i+=r.slice(0,1)==="/"?r.slice(1):r;break}default:t("abort",400);return}let e=503;gn(o+i).then(r=>{const a=r.status;if(a!==200){setTimeout(()=>{t(Ds(a)?"abort":"next",a)});return}return e=501,r.json()}).then(r=>{if(typeof r!="object"||r===null){setTimeout(()=>{r===404?t("abort",r):t("next",e)});return}setTimeout(()=>{t("success",r)})}).catch(()=>{t("next",e)})},Xs={prepare:Gs,send:Ys};function Bi(o,s){switch(o){case"local":case"session":Vt[o]=s;break;case"all":for(const t in Vt)Vt[t]=s;break}}const Xn="data-style";let yo="";function Vs(o){yo=o}function Ni(o,s){let t=Array.from(o.childNodes).find(i=>i.hasAttribute&&i.hasAttribute(Xn));t||(t=document.createElement("style"),t.setAttribute(Xn,Xn),o.appendChild(t)),t.textContent=":host{display:inline-block;vertical-align:"+(s?"-0.125em":"0")+"}span,svg{display:block}"+yo}function wo(){Ai("",Xs),oo(!0);let o;try{o=window}catch{}if(o){if(go(),o.IconifyPreload!==void 0){const t=o.IconifyPreload,i="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!="object"||e===null||e instanceof Array||typeof e.icons!="object"||typeof e.prefix!="string"||!Ci(e))&&console.error(i)}catch{console.error(i)}})}if(o.IconifyProviders!==void 0){const t=o.IconifyProviders;if(typeof t=="object"&&t!==null)for(const i in t){const e="IconifyProviders["+i+"] is invalid.";try{const r=t[i];if(typeof r!="object"||!r||r.resources===void 0)continue;Ri(i,r)||console.error(e)}catch{console.error(e)}}}}return{enableCache:t=>Bi(t,!0),disableCache:t=>Bi(t,!1),iconExists:bs,getIcon:ys,listIcons:ms,addIcon:so,addCollection:Ci,calculateSize:oi,buildIcon:bo,loadIcons:Si,loadIcon:Ms,addAPIProvider:Ri,appendCustomStyle:Vs,_api:{getAPIConfig:Wn,setAPIModule:Ai,sendAPIQuery:co,setFetch:$s,getFetch:Ws,listAPIProviders:Ls}}}function vo(o,s){let t=o.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in s)t+=" "+i+'="'+s[i]+'"';return'"+o+""}function Ks(o){return o.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function Js(o){return"data:image/svg+xml,"+Ks(o)}function Zs(o){return'url("'+Js(o)+'")'}const si={"background-color":"currentColor"},xo={"background-color":"transparent"},Ui={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},ji={"-webkit-mask":si,mask:si,background:xo};for(const o in ji){const s=ji[o];for(const t in Ui)s[o+"-"+t]=Ui[t]}function _i(o){return o?o+(o.match(/^[-0-9.]+$/)?"px":""):"inherit"}function tr(o,s,t){const i=document.createElement("span");let e=o.body;e.indexOf("");const r=o.attributes,a=vo(e,{...r,width:s.width+"",height:s.height+""}),l=Zs(a),c=i.style,d={"--svg":l,width:_i(r.width),height:_i(r.height),...t?si:xo};for(const f in d)c.setProperty(f,d[f]);return i}let fe;function er(){try{fe=window.trustedTypes.createPolicy("iconify",{createHTML:o=>o})}catch{fe=null}}function nr(o){return fe===void 0&&er(),fe?fe.createHTML(o):o}function ir(o){const s=document.createElement("span"),t=o.attributes;let i="";t.width||(i="width: inherit;"),t.height||(i+="height: inherit;"),i&&(t.style=i);const e=vo(o.body,t);return s.innerHTML=nr(e),s.firstChild}function qi(o,s){const t=s.icon.data,i=s.customisations,e=bo(t,i);i.preserveAspectRatio&&(e.attributes.preserveAspectRatio=i.preserveAspectRatio);const r=s.renderedMode;let a;switch(r){case"svg":a=ir(e);break;default:a=tr(e,{...sn,...t},r==="mask")}const l=Array.from(o.childNodes).find(c=>{const d=c.tagName&&c.tagName.toUpperCase();return d==="SPAN"||d==="SVG"});l?a.tagName==="SPAN"&&l.tagName===a.tagName?l.setAttribute("style",a.getAttribute("style")):o.replaceChild(a,l):o.appendChild(a)}function $i(o,s,t){const i=t&&(t.rendered?t:t.lastRender);return{rendered:!1,inline:s,icon:o,lastRender:i}}function or(o="iconify-icon"){let s,t;try{s=window.customElements,t=window.HTMLElement}catch{return}if(!s||!t)return;const i=s.get(o);if(i)return i;const e=["icon","mode","inline","width","height","rotate","flip"],r=class extends t{constructor(){super();E(this,"_shadowRoot");E(this,"_state");E(this,"_checkQueued",!1);const c=this._shadowRoot=this.attachShadow({mode:"open"}),d=Yn(this);Ni(c,d),this._state=$i({value:""},d),this._queueCheck()}static get observedAttributes(){return e.slice(0)}attributeChangedCallback(c){if(c==="inline"){const d=Yn(this),f=this._state;d!==f.inline&&(f.inline=d,Ni(this._shadowRoot,d))}else this._queueCheck()}get icon(){const c=this.getAttribute("icon");if(c&&c.slice(0,1)==="{")try{return JSON.parse(c)}catch{}return c}set icon(c){typeof c=="object"&&(c=JSON.stringify(c)),this.setAttribute("icon",c)}get inline(){return Yn(this)}set inline(c){c?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const c=this._state;if(c.rendered){const d=this._shadowRoot;if(c.renderedMode==="svg")try{d.lastChild.setCurrentTime(0);return}catch{}qi(d,c)}}get status(){const c=this._state;return c.rendered?"rendered":c.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const c=this._state,d=this.getAttribute("icon");if(d!==c.icon.value){this._iconChanged(d);return}if(!c.rendered)return;const f=this.getAttribute("mode"),g=Li(this);(c.attrMode!==f||ls(c.customisations,g))&&this._renderIcon(c.icon,g,f)}_iconChanged(c){const d=Bs(c,(f,g,m)=>{const x=this._state;if(x.rendered||this.getAttribute("icon")!==f)return;const S={value:f,name:g,data:m};S.data?this._gotIconData(S):x.icon=S});d.data?this._gotIconData(d):this._state=$i(d,this._state.inline,this._state)}_gotIconData(c){this._checkQueued=!1,this._renderIcon(c,Li(this),this.getAttribute("mode"))}_renderIcon(c,d,f){const g=Ns(c.data.body,f),m=this._state.inline;qi(this._shadowRoot,this._state={rendered:!0,icon:c,inline:m,customisations:d,attrMode:f,renderedMode:g})}};e.forEach(l=>{l in r.prototype||Object.defineProperty(r.prototype,l,{get:function(){return this.getAttribute(l)},set:function(c){c!==null?this.setAttribute(l,c):this.removeAttribute(l)}})});const a=wo();for(const l in a)r[l]=r.prototype[l]=a[l];return s.define(o,r),r}or()||wo();const sr=`:host{display:flex;position:relative;justify-content:center;align-items:stretch}.bottom-img{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain}.top-img{position:absolute;-webkit-mask-image:linear-gradient(90deg,rgb(0 0 0 / 0%) 35%,rgb(255 255 255 / 100%) 50%,rgb(0 0 0 / 0%) 65%);mask-image:linear-gradient(90deg,rgb(0 0 0 / 0%) 35%,rgb(255 255 255 / 100%) 50%,rgb(0 0 0 / 0%) 65%);-webkit-mask-size:300% 100%;mask-size:300% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;filter:brightness(1.8);animation-duration:4s;animation-timing-function:linear;animation-iteration-count:infinite;animation-name:flicker;max-width:100%;max-height:100%}@keyframes flicker{0%{-webkit-mask-position:150% 0%;mask-position:150% 0%}30%{-webkit-mask-position:-150% 0%;mask-position:-150% 0%}to{-webkit-mask-position:-150% 0%;mask-position:-150% 0%}} `,rr=`luffy avatar\r luffy avatar`,ar="luffy-logo",So=document.createElement("template");So.innerHTML=rr;class cr extends HTMLElement{constructor(){super();const s=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=sr,s.append(t,So.content.cloneNode(!0))}}customElements.define(ar,cr);const lr=":host{--slider-thumb-size: 2em;display:flex;position:relative}.slider{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;background:transparent;width:100%;height:2.5em;font-size:inherit}.slider::-webkit-slider-runnable-track{box-shadow:0 0 .125em .0625em #000c;border:.0625em solid rgb(0 0 0 / 50%);border-radius:.1em;background-color:var(--theme-color);height:.75em}.slider::-moz-range-track{box-shadow:0 0 .125em .0625em #000c;border:.0625em solid rgb(0 0 0 / 50%);border-radius:.1em;background-color:var(--theme-color);height:.75em}.slider::-webkit-slider-thumb{position:relative;top:-.75em;-webkit-appearance:none;-moz-appearance:none;appearance:none;filter:var(--element-filter);-webkit-transition:filter .05s;transition:filter .05s;cursor:pointer;border:0;background:url("+new URL("../images/slider-thumb.png",import.meta.url).href+");background-position:center;background-size:cover;background-repeat:no-repeat;background-color:transparent;width:var(--slider-thumb-size);height:var(--slider-thumb-size)}.slider::-moz-range-thumb{position:relative;top:-.75em;filter:var(--element-filter);cursor:pointer;border:0;background:url("+new URL("../images/slider-thumb.png",import.meta.url).href+`);background-position:center;background-size:cover;background-repeat:no-repeat;background-color:transparent;width:var(--slider-thumb-size);height:var(--slider-thumb-size)}.slider::-webkit-slider-thumb:hover{filter:var(--element-hover-filter)}.thumb-text-wrapper{display:flex;position:absolute;top:31%;justify-content:center;align-items:center;width:var(--slider-thumb-size);pointer-events:none;color:#fff}.thumb-text-wrapper span{font-size:.75em} `,hr=`\r
\r \r -
`,dr="range-slider",ur=["value","max","min","step"],ko=document.createElement("template");ko.innerHTML=hr;const fr=6.5,pr=13;var H,Ot,ye,ri;class gr extends HTMLElement{constructor(){super();h(this,ye);h(this,H,void 0);h(this,Ot,void 0);const t=this.attachShadow({mode:"open"}),i=document.createElement("style");i.textContent=lr,t.append(i,ko.content.cloneNode(!0)),u(this,H,t.querySelector("input")),u(this,Ot,t.querySelector("#thumbText")),n(this,H).addEventListener("input",()=>p(this,ye,ri).call(this))}get value(){return n(this,H).value}set value(t){n(this,H).value=t,n(this,Ot).innerText=t,p(this,ye,ri).call(this)}static get observedAttributes(){return ur}attributeChangedCallback(t,i,e){switch(t){case"value":this.value=e;break;default:n(this,H).setAttribute(t,e);break}}}H=new WeakMap,Ot=new WeakMap,ye=new WeakSet,ri=function(){const t=parseFloat(n(this,H).max),i=parseFloat(n(this,H).min),r=(parseFloat(n(this,H).value)-i)/(t-i)*100;n(this,Ot).innerText=this.value;const a=-r+(fr-pr*r/100),l=n(this,Ot).parentElement;l.style.left=r+"%",l.style.transform=`translateX(${a}%)`};customElements.define(dr,gr);const mr=`:host{display:grid;grid-template-columns:1fr auto;align-items:center;gap:1rem}select{flex-grow:1;box-shadow:0 0 .25em #0000007f;border:0;border:1px solid #3b230e;background:linear-gradient(120deg,rgb(245 198 95),rgb(245 218 158),rgb(245 198 96));padding:.25em;width:100%;color:#3b230e;font-size:1rem;text-overflow:ellipsis;white-space:nowrap}select:focus-visible{outline:none}option{background-color:#f5da9e}#fileInput{display:none}::-webkit-scrollbar{width:.2rem}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.1rem;background:#3b230e}::-webkit-scrollbar-corner{background:transparent} +`,dr="range-slider",ur=["value","max","min","step"],ko=document.createElement("template");ko.innerHTML=hr;const fr=6.5,pr=13;var H,Mt,ye,ri;class gr extends HTMLElement{constructor(){super();h(this,ye);h(this,H,void 0);h(this,Mt,void 0);const t=this.attachShadow({mode:"open"}),i=document.createElement("style");i.textContent=lr,t.append(i,ko.content.cloneNode(!0)),u(this,H,t.querySelector("input")),u(this,Mt,t.querySelector("#thumbText")),n(this,H).addEventListener("input",()=>p(this,ye,ri).call(this))}get value(){return n(this,H).value}set value(t){n(this,H).value=t,n(this,Mt).innerText=t,p(this,ye,ri).call(this)}static get observedAttributes(){return ur}attributeChangedCallback(t,i,e){switch(t){case"value":this.value=e;break;default:n(this,H).setAttribute(t,e);break}}}H=new WeakMap,Mt=new WeakMap,ye=new WeakSet,ri=function(){const t=parseFloat(n(this,H).max),i=parseFloat(n(this,H).min),r=(parseFloat(n(this,H).value)-i)/(t-i)*100;n(this,Mt).innerText=this.value;const a=-r+(fr-pr*r/100),l=n(this,Mt).parentElement;l.style.left=r+"%",l.style.transform=`translateX(${a}%)`};customElements.define(dr,gr);const mr=`:host{display:grid;grid-template-columns:1fr auto;align-items:center;gap:1rem}select{flex-grow:1;box-shadow:0 0 .25em #0000007f;border:0;border:1px solid #3b230e;background:linear-gradient(120deg,rgb(245 198 95),rgb(245 218 158),rgb(245 198 96));padding:.25em;width:100%;color:#3b230e;font-size:1rem;text-overflow:ellipsis;white-space:nowrap}select:focus-visible{outline:none}option{background-color:#f5da9e}#fileInput{display:none}::-webkit-scrollbar{width:.2rem}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.1rem;background:#3b230e}::-webkit-scrollbar-corner{background:transparent} `,br=`\r \r -`,yr="font-select",wr=["value"],Io=document.createElement("template");Io.innerHTML=br;var B,we,nt,it,Bt,ve,yn,Eo,xe,ai,Se,ci,ke,li;class vr extends HTMLElement{constructor(){super();h(this,yn);h(this,xe);h(this,Se);h(this,ke);h(this,B,void 0);h(this,we,void 0);h(this,nt,void 0);h(this,it,new Set);h(this,Bt,null);h(this,ve,!1);const t=this.attachShadow({mode:"open"}),i=document.createElement("style");i.textContent=mr,t.append(i,Io.content.cloneNode(!0)),u(this,B,t.querySelector("select")),n(this,B).addEventListener("input",()=>{n(this,B).style.fontFamily=n(this,B).value}),n(this,B).addEventListener("click",()=>{p(this,yn,Eo).call(this)}),u(this,we,t.querySelector("icon-button")),u(this,nt,t.querySelector("#fileInput")),n(this,we).addEventListener("click",()=>{n(this,nt).click()}),n(this,nt).addEventListener("input",async r=>{r.stopImmediatePropagation();const a=n(this,nt).files?n(this,nt).files[0]:null;if(!a)return;const l=URL.createObjectURL(a),c=a.name.split(".")[0],d=new FontFace(c,`url(${l})`);try{await d.load(),document.fonts.add(d),p(this,xe,ai).call(this,c),this.value=c,this.dispatchEvent(new CustomEvent("input"))}catch{}});const e=new Set;Array.from(document.fonts).forEach(r=>e.add(r.family)),p(this,Se,ci).call(this,e),document.fonts.addEventListener("loadingdone",()=>{document.fonts.forEach(r=>{n(this,it).has(r.family)||(p(this,xe,ai).call(this,r.family),r.family===n(this,Bt)&&(this.value=n(this,Bt),u(this,Bt,null)))})})}get value(){return n(this,B).value}set value(t){n(this,B).style.fontFamily=t,n(this,B).value=t,u(this,Bt,n(this,it).has(t)?null:t)}static get observedAttributes(){return wr}attributeChangedCallback(t,i,e){switch(t){case"value":this.value=e;break}}}B=new WeakMap,we=new WeakMap,nt=new WeakMap,it=new WeakMap,Bt=new WeakMap,ve=new WeakMap,yn=new WeakSet,Eo=async function(){if(!(!window.queryLocalFonts||n(this,ve)))try{const t=await window.queryLocalFonts(),i=new Set;for(const e of t)i.add(e.family);p(this,Se,ci).call(this,i),u(this,ve,!0)}catch(t){console.error(t)}},xe=new WeakSet,ai=function(t){n(this,it).add(t);const i=p(this,ke,li).call(this,t);n(this,B).appendChild(i)},Se=new WeakSet,ci=function(t){const i=new DocumentFragment;Array.from(t).forEach(e=>{if(n(this,it).has(e))return;n(this,it).add(e);const r=p(this,ke,li).call(this,e);i.appendChild(r)}),n(this,B).appendChild(i)},ke=new WeakSet,li=function(t){const i=document.createElement("option");return i.value=t,i.innerText=t,i.style.fontFamily=t,i};customElements.define(yr,vr);const xr=`:host{display:inline-flex;position:relative;justify-content:center;filter:contrast(100%) brightness(100%) drop-shadow(1px 1px 1px rgb(0 0 0 / 50%)) drop-shadow(-1px -1px 1px rgb(0 0 0 / 50%));transition:.05s;cursor:pointer;outline:none;background-color:transparent;width:4.25rem;height:5rem}:host(:hover:not([loading])){filter:contrast(105%) brightness(105%) drop-shadow(1px 4px 3px rgb(0 0 0 / 50%)) drop-shadow(-1px 0 3px rgb(0 0 0 / 50%))}:host(:active:not([loading])){transform:translateY(1px);filter:contrast(105%) brightness(105%) drop-shadow(1px 2px 1px rgb(0 0 0 / 60%)) drop-shadow(-1px 0 1px rgb(0 0 0 / 60%))}.img{position:absolute;max-width:100%;max-height:100%}.icon{display:flex;position:absolute;top:21%;justify-content:center;align-items:center;box-sizing:border-box;width:82%;height:44%;color:#513721;font-size:1.5rem}iconify-icon{display:none}:host([loading]){cursor:wait}:host([loading]) iconify-icon{display:inline}.text{display:flex;position:absolute;bottom:12%;justify-content:center;align-items:center;box-sizing:border-box;width:85%;height:20%;overflow:hidden;color:#513721;font-weight:900;font-size:.9rem;font-family:Scheherazade New,serif;text-align:justify;white-space:nowrap} +`,yr="font-select",wr=["value"],Io=document.createElement("template");Io.innerHTML=br;var O,we,nt,it,Ot,ve,yn,Eo,xe,ai,Se,ci,ke,li;class vr extends HTMLElement{constructor(){super();h(this,yn);h(this,xe);h(this,Se);h(this,ke);h(this,O,void 0);h(this,we,void 0);h(this,nt,void 0);h(this,it,new Set);h(this,Ot,null);h(this,ve,!1);const t=this.attachShadow({mode:"open"}),i=document.createElement("style");i.textContent=mr,t.append(i,Io.content.cloneNode(!0)),u(this,O,t.querySelector("select")),n(this,O).addEventListener("input",()=>{n(this,O).style.fontFamily=n(this,O).value}),n(this,O).addEventListener("click",()=>{p(this,yn,Eo).call(this)}),u(this,we,t.querySelector("icon-button")),u(this,nt,t.querySelector("#fileInput")),n(this,we).addEventListener("click",()=>{n(this,nt).click()}),n(this,nt).addEventListener("input",async r=>{r.stopImmediatePropagation();const a=n(this,nt).files?n(this,nt).files[0]:null;if(!a)return;const l=URL.createObjectURL(a),c=a.name.split(".")[0],d=new FontFace(c,`url(${l})`);try{await d.load(),document.fonts.add(d),p(this,xe,ai).call(this,c),this.value=c,this.dispatchEvent(new CustomEvent("input"))}catch{}});const e=new Set;Array.from(document.fonts).forEach(r=>e.add(r.family)),p(this,Se,ci).call(this,e),document.fonts.addEventListener("loadingdone",()=>{document.fonts.forEach(r=>{n(this,it).has(r.family)||(p(this,xe,ai).call(this,r.family),r.family===n(this,Ot)&&(this.value=n(this,Ot),u(this,Ot,null)))})})}get value(){return n(this,O).value}set value(t){n(this,O).style.fontFamily=t,n(this,O).value=t,u(this,Ot,n(this,it).has(t)?null:t)}static get observedAttributes(){return wr}attributeChangedCallback(t,i,e){switch(t){case"value":this.value=e;break}}}O=new WeakMap,we=new WeakMap,nt=new WeakMap,it=new WeakMap,Ot=new WeakMap,ve=new WeakMap,yn=new WeakSet,Eo=async function(){if(!(!window.queryLocalFonts||n(this,ve)))try{const t=await window.queryLocalFonts(),i=new Set;for(const e of t)i.add(e.family);await p(this,Se,ci).call(this,i),u(this,ve,!0)}catch(t){console.error(t)}},xe=new WeakSet,ai=function(t){n(this,it).add(t);const i=p(this,ke,li).call(this,t);n(this,O).appendChild(i)},Se=new WeakSet,ci=async function(t){const i=Array.from(t),e=5,r=Math.ceil(i.length/e);for(let a=0;a{setTimeout(()=>f(),20)})}},ke=new WeakSet,li=function(t){const i=document.createElement("option");return i.value=t,i.innerText=t,i.style.fontFamily=t,i};customElements.define(yr,vr);const xr=`:host{display:inline-flex;position:relative;justify-content:center;filter:contrast(100%) brightness(100%) drop-shadow(1px 1px 1px rgb(0 0 0 / 50%)) drop-shadow(-1px -1px 1px rgb(0 0 0 / 50%));transition:.05s;cursor:pointer;outline:none;background-color:transparent;width:4.25rem;height:5rem}:host(:hover:not([loading])){filter:contrast(105%) brightness(105%) drop-shadow(1px 4px 3px rgb(0 0 0 / 50%)) drop-shadow(-1px 0 3px rgb(0 0 0 / 50%))}:host(:active:not([loading])){transform:translateY(1px);filter:contrast(105%) brightness(105%) drop-shadow(1px 2px 1px rgb(0 0 0 / 60%)) drop-shadow(-1px 0 1px rgb(0 0 0 / 60%))}.img{position:absolute;max-width:100%;max-height:100%}.icon{display:flex;position:absolute;top:21%;justify-content:center;align-items:center;box-sizing:border-box;width:82%;height:44%;color:#513721;font-size:1.5rem}iconify-icon{display:none}:host([loading]){cursor:wait}:host([loading]) iconify-icon{display:inline}.text{display:flex;position:absolute;bottom:12%;justify-content:center;align-items:center;box-sizing:border-box;width:85%;height:20%;overflow:hidden;color:#513721;font-weight:900;font-size:.9rem;font-family:Scheherazade New,serif;text-align:justify;white-space:nowrap} `,Sr=`button image\r
\r \r @@ -26,7 +26,7 @@ var ts=Object.defineProperty;var es=(o,s,t)=>s in o?ts(o,s,{enumerable:!0,config \r \r `,kr=""+new URL("wanted-c2a6dd7a.png",import.meta.url).href,Ir="wanted-button",Er=["font-size"],Lo=document.createElement("template");Lo.innerHTML=Sr;var Ie,Ee;class Lr extends HTMLElement{constructor(){var e;super();h(this,Ie,void 0);h(this,Ee,void 0);const t=this.attachShadow({mode:"open"});u(this,Ie,t);const i=document.createElement("style");i.textContent=xr,t.append(i,Lo.content.cloneNode(!0)),(e=t.querySelector("img"))==null||e.setAttribute("src",kr),u(this,Ee,t.querySelector("span.text"))}static get observedAttributes(){return Er}set loading(t){const i=n(this,Ie).querySelector("slot[name=icon]");i&&(i.style.display=t?"none":"contents"),t?this.setAttribute("loading",""):this.removeAttribute("loading")}get loading(){return this.hasAttribute("loading")}attributeChangedCallback(t,i,e){switch(t){case"font-size":n(this,Ee).style.fontSize=e;break}}}Ie=new WeakMap,Ee=new WeakMap;customElements.define(Ir,Lr);const Wi=""+new URL("circle-button-78c4b94b.png",import.meta.url).href,Tr=`:host{--filter: drop-shadow(.125em 0 .125em rgb(0 0 0 / 40%)) drop-shadow(-.125em 0 .125em rgb(0 0 0 / 40%)) contrast(100%) brightness(100%);--hover-filter: drop-shadow(.1875em 0 .1875em rgb(0 0 0 / 40%)) drop-shadow(-.1875em 0 .1875em rgb(0 0 0 / 50%)) contrast(105%) brightness(105%);--active-filter: drop-shadow(.0625em 0 .125em rgb(0 0 0 / 60%)) drop-shadow(-.0625em 0 .125em rgb(0 0 0 / 70%)) contrast(105%) brightness(105%);display:flex;justify-content:center;align-items:center;filter:var(--filter);transition:.1s;cursor:pointer;outline:none;border:0;background-position:center;background-size:cover;background-repeat:no-repeat;background-color:transparent;padding-bottom:.05em;width:2em;height:2em;color:#fff}:host(:hover){filter:var(--hover-filter)}:host(:active){transform:translateY(.0625em);filter:var(--active-filter)}iconify-icon{pointer-events:none} -`,Cr='',Ar="icon-button",Fr=["icon","mode","flip","height","width","inline","preserveAspectRatio","rotate"],To=document.createElement("template");To.innerHTML=Cr;var Le;class Rr extends HTMLElement{constructor(){var e;super();h(this,Le,void 0);const t=this.attachShadow({mode:"open"}),i=document.createElement("style");i.textContent=Tr,t.append(i,To.content.cloneNode(!0)),(e=t.querySelector("img"))==null||e.setAttribute("src",Wi),u(this,Le,t.querySelector("iconify-icon"))}static get observedAttributes(){return Fr}connectedCallback(){this.style.backgroundImage=`url(${Wi})`}attributeChangedCallback(t,i,e){n(this,Le).setAttribute(t,e)}}Le=new WeakMap;customElements.define(Ar,Rr);const Pr=":host{display:block;position:fixed;top:0;left:0;visibility:hidden;opacity:0;filter:drop-shadow(0 0 5px rgb(0 0 0 / 60%));transition:.2s;box-sizing:border-box;margin-top:3rem;margin-left:.5rem;background-image:url("+new URL("../images/tips-paper.png",import.meta.url).href+`);background-size:contain;background-repeat:no-repeat;padding:1rem .8rem 1rem 1rem;width:17.62rem;max-width:100vw;height:26.33rem;color:var(--dark-text-color);font-size:.8rem}:host([open]){visibility:visible;opacity:1}.content{height:100%;overflow:auto}.content h3{border-bottom:1px solid var(--dark-text-color)}.content *{margin-block-start:.5em;margin-block-end:1em}a{position:relative;outline:none;text-decoration:none}a:after{position:absolute;bottom:0;left:0;border-bottom:.2rem solid rgb(211 255 77 / 50%);width:100%;height:1px;content:" "}a:link{color:#009637}a:visited{color:#558f6a}::-webkit-scrollbar{width:.1rem}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.1rem;background:var(--dark-text-color)}::-webkit-scrollbar-corner{background:transparent} +`,Cr='',Ar="icon-button",Rr=["icon","mode","flip","height","width","inline","preserveAspectRatio","rotate"],To=document.createElement("template");To.innerHTML=Cr;var Le;class Fr extends HTMLElement{constructor(){var e;super();h(this,Le,void 0);const t=this.attachShadow({mode:"open"}),i=document.createElement("style");i.textContent=Tr,t.append(i,To.content.cloneNode(!0)),(e=t.querySelector("img"))==null||e.setAttribute("src",Wi),u(this,Le,t.querySelector("iconify-icon"))}static get observedAttributes(){return Rr}connectedCallback(){this.style.backgroundImage=`url(${Wi})`}attributeChangedCallback(t,i,e){n(this,Le).setAttribute(t,e)}}Le=new WeakMap;customElements.define(Ar,Fr);const Pr=":host{display:block;position:fixed;top:0;left:0;visibility:hidden;opacity:0;filter:drop-shadow(0 0 5px rgb(0 0 0 / 60%));transition:.2s;box-sizing:border-box;margin-top:3rem;margin-left:.5rem;background-image:url("+new URL("../images/tips-paper.png",import.meta.url).href+`);background-size:contain;background-repeat:no-repeat;padding:1rem .8rem 1rem 1rem;width:17.62rem;max-width:100vw;height:26.33rem;color:var(--dark-text-color);font-size:.8rem}:host([open]){visibility:visible;opacity:1}.content{height:100%;overflow:auto}.content h3{border-bottom:1px solid var(--dark-text-color)}.content *{margin-block-start:.5em;margin-block-end:1em}a{position:relative;outline:none;text-decoration:none}a:after{position:absolute;bottom:0;left:0;border-bottom:.2rem solid rgb(211 255 77 / 50%);width:100%;height:1px;content:" "}a:link{color:#009637}a:visited{color:#558f6a}::-webkit-scrollbar{width:.1rem}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.1rem;background:var(--dark-text-color)}::-webkit-scrollbar-corner{background:transparent} `,zr=`
\r \r

Import image as the wanted photo

\r @@ -79,8 +79,8 @@ var ts=Object.defineProperty;var es=(o,s,t)=>s in o?ts(o,s,{enumerable:!0,config Check out the installation guide.

\r \r -
`,Or="tips-dialog",Co=document.createElement("template");Co.innerHTML=zr;class Br extends HTMLElement{constructor(){super();const s=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=Pr,s.append(t,Co.content.cloneNode(!0))}toggle(){this.hasAttribute("open")?this.removeAttribute("open"):this.setAttribute("open","")}}customElements.define(Or,Br);const Mr=""+new URL("belly-af8e0dab.png",import.meta.url).href,Nr=""+new URL("one-piece-wanted-ed269d97.png",import.meta.url).href,Vn={imageUrl:Nr,bellyImageUrl:Mr,photoPosition:{x:74,y:252,width:638,height:484},namePosition:{x:87,y:826,width:586,height:114},bountyInfo:{x:82,y:958,width:592,height:85,bellyMarginRight:18,fontSize:52.5},boundaryOffset:{left:10,right:10,top:10,bottom:10}},Ur=`:host{display:block;width:100%;height:100%;touch-action:none}.container{display:flex;position:relative;justify-content:center;align-items:center;box-sizing:border-box;width:100%;height:100%} -`;function mn(o){return new Promise((s,t)=>{const i=new Image;i.setAttribute("crossorigin","anonymous"),i.onload=()=>s(i),i.onerror=t,i.src=o})}function ki(o,s,t,i){const e=o/t,r=s/i;return Math.min(r,e)}class Ii{constructor(s){E(this,"x",0);E(this,"y",0);E(this,"width",0);E(this,"height",0);E(this,"ctx");this.ctx=s}scale(s){this.x=this.x*s,this.y=this.y*s,this.width=this.width*s,this.height=this.height*s}}var Kt,Jt,wn,Fo;class Ao extends Ii{constructor(){super(...arguments);h(this,wn);h(this,Kt,"");h(this,Jt,0);E(this,"formattedText","");E(this,"align","center");E(this,"baseline","top");E(this,"fontSize",0);E(this,"fontWeight",400);E(this,"fontFamily","serif")}set text(t){u(this,Kt,t),this.formattedText=this.formatText(t,n(this,Jt))}get text(){return n(this,Kt)}set spacing(t){u(this,Jt,t),this.formattedText=this.formatText(n(this,Kt),t)}get spacing(){return n(this,Jt)}formatSpacing(t,i){let e="";for(let r=0;re())}catch(e){throw console.error(e),new Error("Failed to load photo image.")}}scale(t){super.scale(t),this.updateRenderPosition()}setBoundary(t,i){u(this,M,{...t}),u(this,Ut,{...i})}updateRenderPosition(){if(!n(this,D))return;const t=ki(this.width,this.height,n(this,D).width,n(this,D).height),i=n(this,D).width*t,e=n(this,D).height*t,r=this.x+(this.width-i)/2,a=this.y+(this.height-e)/2;u(this,Ae,{x:r,y:a,width:i,height:e}),u(this,Ce,t)}on(t,i){var e;n(this,st).has(t)||n(this,st).set(t,[]),(e=n(this,st).get(t))==null||e.push(i)}off(t,i){const e=n(this,st).get(t);if(!e)return;const r=e.findIndex(a=>a===i);e.splice(r,1)}render(){if(this.ctx.save(),this.ctx.shadowColor="rgba(0, 0, 0, 1)",this.ctx.shadowBlur=this.shadow*n(this,Ce),this.ctx.fillStyle=n(this,Zt)?n(this,Zt):"none",this.ctx.fillRect(n(this,M).x,n(this,M).y,n(this,M).width,n(this,M).height),!n(this,D)){this.ctx.restore();return}const{x:t,y:i,width:e,height:r}=n(this,Ae);this.ctx.filter=this.filter,this.ctx.drawImage(n(this,D),t,i,e,r);const{left:a,right:l,top:c,bottom:d}=n(this,Ut);t<=a&&this.ctx.clearRect(0,i,a,r),i<=c&&this.ctx.clearRect(t,0,e,c),t+e>this.ctx.canvas.domWidth-l&&this.ctx.clearRect(this.ctx.canvas.domWidth-l,i,l,r),i+r>this.ctx.canvas.domHeight-d&&this.ctx.clearRect(t,this.ctx.canvas.domHeight-d,e,d),this.ctx.restore()}}Ce=new WeakMap,st=new WeakMap,D=new WeakMap,Zt=new WeakMap,M=new WeakMap,Ae=new WeakMap,Ut=new WeakMap,Sn=new WeakSet,Ro=function(){this.x=n(this,M).x,this.y=n(this,M).y,this.width=n(this,M).width,this.height=n(this,M).height,u(this,Ut,{...n(this,Ut)}),u(this,M,{x:this.x,y:this.y,width:this.width,height:this.height}),this.updateRenderPosition()};const Yi=4,Xi=[10,5];var v,jt,N,rt,X,at,_t,qt,Fe,Re,q,$t,Pe,ze,kn,Po,In,zo,En,Oo,Ln,Bo,Tn,Mo,Cn,No,An,Uo,Fn,jo,Rn,_o,Oe,hi,Be,di,Me,ui,Ne,fi,Pn,qo,zn,$o,On,Wo;class _r extends Ii{constructor(t,i){super(t);h(this,kn);h(this,In);h(this,En);h(this,Ln);h(this,Tn);h(this,Cn);h(this,An);h(this,Fn);h(this,Rn);h(this,Oe);h(this,Be);h(this,Me);h(this,Ne);h(this,Pn);h(this,zn);h(this,On);h(this,v,void 0);h(this,jt,!1);h(this,N,!1);h(this,rt,!1);h(this,X,!1);h(this,at,Yi);h(this,_t,Xi);h(this,qt,null);h(this,Fe,0);h(this,Re,0);h(this,q,new Map);h(this,$t,0);h(this,Pe,0);h(this,ze,0);u(this,v,i),i.on("imageloaded",()=>this.reset()),t.canvas.addEventListener("mouseover",p(this,In,zo).bind(this),{passive:!0}),t.canvas.addEventListener("mouseout",p(this,En,Oo).bind(this),{passive:!0}),t.canvas.addEventListener("wheel",p(this,kn,Po).bind(this),{passive:!0}),t.canvas.addEventListener("pointerdown",p(this,Tn,Mo).bind(this),{passive:!0}),t.canvas.addEventListener("pointerup",p(this,Cn,No).bind(this),{passive:!0}),t.canvas.addEventListener("pointercancel",p(this,An,Uo).bind(this),{passive:!0}),t.canvas.addEventListener("pointermove",p(this,Fn,jo).bind(this),{passive:!0}),t.canvas.addEventListener("pointerout",p(this,Rn,_o).bind(this),{passive:!0})}set borderScale(t){u(this,at,Yi*t),u(this,_t,Xi.map(i=>i*t))}set highlight(t){u(this,jt,t)}scale(t){super.scale(t),n(this,v).scale(t)}reset(){this.x=n(this,v).x,this.y=n(this,v).y,this.width=n(this,v).width,this.height=n(this,v).height,u(this,N,!1),u(this,rt,!1),u(this,X,!1)}render(){!n(this,N)&&!n(this,X)&&!n(this,jt)||(this.ctx.save(),cn(this,$t)._++,n(this,$t)>=n(this,_t)[0]+n(this,_t)[1]&&u(this,$t,0),this.ctx.lineDashOffset=-n(this,$t),this.ctx.fillStyle="rgba(255,255,255,0.5)",this.ctx.strokeStyle="red",this.ctx.lineWidth=n(this,at),this.ctx.setLineDash(n(this,_t)),this.ctx.fillRect(this.x,this.y,this.width,this.height),this.ctx.strokeRect(this.x,this.y,this.width,this.height),this.ctx.restore())}}v=new WeakMap,jt=new WeakMap,N=new WeakMap,rt=new WeakMap,X=new WeakMap,at=new WeakMap,_t=new WeakMap,qt=new WeakMap,Fe=new WeakMap,Re=new WeakMap,q=new WeakMap,$t=new WeakMap,Pe=new WeakMap,ze=new WeakMap,kn=new WeakSet,Po=function(t){const i=t.deltaY>0?.95:1.05;p(this,Ne,fi).call(this,i)},In=new WeakSet,zo=function(){const{left:t,top:i}=this.ctx.canvas.getBoundingClientRect();u(this,Fe,i),u(this,Re,t)},En=new WeakSet,Oo=function(){u(this,N,!1)},Ln=new WeakSet,Bo=function(t){const i=t.clientX-n(this,Re),e=t.clientY-n(this,Fe);if(n(this,rt)){const r=t.clientX-n(this,Pe),a=t.clientY-n(this,ze);p(this,On,Wo).call(this,r,a)}n(this,X)||p(this,Pn,qo).call(this,i,e),p(this,Oe,hi).call(this,i,e,this.x,this.y,this.width,this.height,n(this,at))?(u(this,N,!0),u(this,jt,!1)):u(this,N,!1),u(this,Pe,t.clientX),u(this,ze,t.clientY)},Tn=new WeakSet,Mo=function(t){if(u(this,jt,!1),t.pointerType==="mouse"&&t.button===0){u(this,rt,!0);return}n(this,q).set(t.pointerId,t);const{left:i,top:e}=this.ctx.canvas.getBoundingClientRect();let r=!1;for(const a of n(this,q).values()){const l=a.clientX-i,c=a.clientY-e;if(p(this,Oe,hi).call(this,l,c,this.x,this.y,this.width,this.height,n(this,at))){r=!0;break}}u(this,N,r)},Cn=new WeakSet,No=function(t){if(t.pointerType==="mouse"&&t.button===0){u(this,rt,!1),u(this,X,!1);return}p(this,Be,di).call(this,t)},An=new WeakSet,Uo=function(t){p(this,Be,di).call(this,t)},Fn=new WeakSet,jo=function(t){if(t.pointerType==="mouse"){p(this,Ln,Bo).call(this,t);return}const i=Array.from(n(this,q).values());if(i.length===1&&n(this,N)){const e=i[0],{clientX:r,clientY:a}=t,l=n(this,q).get(e.pointerId);if(l){const c=r-l.clientX,d=a-l.clientY;this.x+=c,this.y+=d,n(this,v).x+=c,n(this,v).y+=d,n(this,v).updateRenderPosition()}}if(i.length===2&&n(this,N)){const e=n(this,q).get(i[0].pointerId),r=n(this,q).get(i[1].pointerId);if(e&&r){const a=i[0].pointerId===t.pointerId?i[1]:i[0],l=p(this,Me,ui).call(this,a,t),c=p(this,Me,ui).call(this,e,r),d=l>c?1.02:.98;p(this,Ne,fi).call(this,d)}}n(this,q).set(t.pointerId,t)},Rn=new WeakSet,_o=function(t){t.pointerType==="mouse"&&(u(this,rt,!1),u(this,X,!1))},Oe=new WeakSet,hi=function(t,i,e,r,a,l,c=0){const d=c/2,f=e-d,g=r-d,m=e+a+d,x=r+l+d,S=t>=f&&t<=m,k=i>=g&&i<=x;return S&&k},Be=new WeakSet,di=function(t){n(this,q).delete(t.pointerId),n(this,q).size||u(this,N,!1)},Me=new WeakSet,ui=function(t,i){const e=Math.abs(t.clientX-i.clientX),r=Math.abs(t.clientY-i.clientY);return Math.pow(e,2)+Math.pow(r,2)},Ne=new WeakSet,fi=function(t){const i=this.width*t-this.width,e=this.height*t-this.height;this.x=this.x-i/2,this.width=this.width+i,this.y=this.y-e/2,this.height=this.height+e,n(this,v).x=this.x,n(this,v).y=this.y,n(this,v).width=this.width,n(this,v).height=this.height,n(this,v).updateRenderPosition()},Pn=new WeakSet,qo=function(t,i){const e=p(this,zn,$o).call(this,t,i,this.x,this.y,this.width,this.height,n(this,at));e.left||e.right?(this.ctx.canvas.style.cursor="ew-resize",u(this,qt,e.left?"left":"right")):e.top||e.bottom?(this.ctx.canvas.style.cursor="ns-resize",u(this,qt,e.top?"top":"bottom")):n(this,N)?this.ctx.canvas.style.cursor="move":this.ctx.canvas.style.cursor="default"},zn=new WeakSet,$o=function(t,i,e,r,a,l,c=0){const d=c/2,f=e-d,g=r-d,m=e+a+d,x=r+l+d,S=e+d,k=r+d,Rt=e+a-d,et=r+l-d;return{left:t>=f&&t<=S,right:t>=Rt&&t<=m,top:i>=g&&i<=k,bottom:i>=et&&i<=x}},On=new WeakSet,Wo=function(t,i){switch(this.ctx.canvas.style.cursor){case"move":this.x+=t,this.y+=i,n(this,v).x+=t,n(this,v).y+=i,n(this,v).updateRenderPosition();break;case"ew-resize":{if(u(this,X,!0),n(this,qt)==="right"){const e=Math.max(this.width+t,1);this.width=e,n(this,v).width=e}else{const e=this.x+t;if(e>=this.x+this.width)break;const r=this.width-t;this.x=e,n(this,v).x=e,this.width=r,n(this,v).width=r}n(this,v).updateRenderPosition();break}case"ns-resize":{if(u(this,X,!0),n(this,qt)==="bottom"){const e=Math.max(this.height+i,1);this.height=e,n(this,v).height=e}else{const e=this.y+i;if(e>=this.y+this.height)break;const r=this.height-i;this.y=e,n(this,v).y=e,this.height=r,n(this,v).height=r}n(this,v).updateRenderPosition()}}};var $,T,K,Ue,V,Wt,Bn,Ho;class Vi{constructor(s,t){h(this,Bn);h(this,$,void 0);h(this,T,void 0);h(this,K,0);h(this,Ue,1);h(this,V,null);h(this,Wt,void 0);u(this,$,s),u(this,T,s.canvas),u(this,Wt,t)}async loadImage(){let s;try{s=await mn(n(this,Wt).imageUrl),u(this,V,s)}catch(t){throw console.error(t),new Error("Failed to load wanted image.")}return s}get imageScale(){return n(this,Ue)}setSize({width:s,height:t,shadowSize:i,quality:e}){if(!n(this,V))throw new Error("Failed to set size: wanted image is null");const r=n(this,V).width+i*2,a=n(this,V).height+i*2,l=ki(s,t,r,a);u(this,Ue,l);const c=r*l,d=a*l;switch(u(this,K,i*l),n(this,T).style.width=c+"px",n(this,T).style.height=d+"px",n(this,T).domWidth=c,n(this,T).domHeight=d,e){case"original":n(this,T).width=r,n(this,T).height=a,n(this,$).scale(1/l,1/l);break;case"high":{const g=window.devicePixelRatio;n(this,T).width=c*g,n(this,T).height=d*g,n(this,$).scale(g,g);break}case"half":{const g=n(this,V).height/d/2;n(this,T).width=c*g,n(this,T).height=d*g,n(this,$).scale(g,g);break}}return p(this,Bn,Ho).call(this,l,i)}render(){n(this,V)&&(n(this,$).save(),n(this,$).shadowColor="rgba(0, 0, 0, 1)",n(this,$).shadowBlur=n(this,K)*(n(this,T).width/n(this,T).domWidth),n(this,$).drawImage(n(this,V),n(this,K),n(this,K),n(this,T).domWidth-n(this,K)*2,n(this,T).domHeight-n(this,K)*2),n(this,$).restore())}}$=new WeakMap,T=new WeakMap,K=new WeakMap,Ue=new WeakMap,V=new WeakMap,Wt=new WeakMap,Bn=new WeakSet,Ho=function(s,t){if(!n(this,Wt))throw new Error("Failed to calculate wanted image info: WantedImageInfo object is null");t*=s;const{imageUrl:i,bellyImageUrl:e,photoPosition:r,namePosition:a,bountyInfo:l,boundaryOffset:c}=n(this,Wt),d=g=>{const{x:m,y:x,width:S,height:k}=g;return{x:m*s+t,y:x*s+t,width:S*s,height:k*s}},f={...d(l),bellyMarginRight:l.bellyMarginRight*s,fontSize:l.fontSize*s};return{imageUrl:i,bellyImageUrl:e,photoPosition:d(r),namePosition:d(a),bountyInfo:f,boundaryOffset:{left:c.left*s+t,right:c.right*s+t,top:c.top*s+t,bottom:c.bottom*s+t}}};const qr="wanted-poster",$r=["name","bounty","name-spacing","bounty-spacing","bounty-font-family","bounty-font-scale","bounty-font-weight","bounty-vertical-offset","photo-url","filter","poster-shadow","photo-shadow"];var Ht,ct,je,U,lt,J,z,P,ht,te,_e,W,Y,Mn,Do,qe,pi,$e,gi;class Wr extends HTMLElement{constructor(){super();h(this,W);h(this,Mn);h(this,qe);h(this,$e);h(this,Ht,void 0);h(this,ct,void 0);h(this,je,void 0);h(this,U,void 0);h(this,lt,void 0);h(this,J,void 0);h(this,z,void 0);h(this,P,void 0);h(this,ht,void 0);h(this,te,void 0);h(this,_e,void 0);u(this,ht,"init");const t=this.attachShadow({mode:"open"}),i=document.createElement("canvas");i.domWidth=0,i.domHeight=0;const e=document.createElement("div");e.className="container";const r=document.createElement("style");r.textContent=Ur,t.append(r,e);const a=i.getContext("2d");u(this,Ht,e),u(this,ct,i),u(this,je,a),u(this,P,new Vi(a,Vn)),u(this,U,new Qi(a)),u(this,J,new Di(a)),u(this,z,new Hi(a)),u(this,lt,new _r(a,n(this,U))),u(this,te,new ResizeObserver(()=>{clearTimeout(n(this,_e)),u(this,_e,window.setTimeout(()=>p(this,qe,pi).call(this),200))})),n(this,te).observe(e)}static get observedAttributes(){return $r}async connectedCallback(){console.log("[connected]"),await new Promise(e=>{setTimeout(()=>e(""))}),u(this,ht,"loading");const t=p(this,W,Y).call(this,"poster-shadow"),i=n(this,Ht).getBoundingClientRect();try{await n(this,P).loadImage();const e=n(this,P).setSize({width:i.width,height:i.height,shadowSize:t,quality:"half"});n(this,J).setPosition(e.namePosition),n(this,z).setBountyInfo(e.bountyInfo,n(this,P).imageScale),await n(this,z).loadBellyImage(Vn.bellyImageUrl),await n(this,U).init(e.photoPosition,e.boundaryOffset),await n(this,U).loadImage(this.getAttribute("photo-url"))}catch(e){u(this,ht,"error"),console.error("Failed to init wanted poster.",e);return}u(this,ht,"success"),p(this,$e,gi).call(this),n(this,Ht).appendChild(n(this,ct)),this.dispatchEvent(new CustomEvent("WantedPosterLoaded",{bubbles:!0}))}disconnectedCallback(){console.log("[disconnected]"),n(this,te).disconnect()}adoptedCallback(){console.log("[adopted]")}async attributeChangedCallback(t,i,e){switch(t){case"name":n(this,J).text=e;break;case"bounty":n(this,z).text=e;break;case"name-spacing":n(this,J).spacing=parseFloat(e)||0;break;case"bounty-spacing":n(this,z).spacing=parseFloat(e)||0;break;case"bounty-font-family":n(this,z).fontFamily=e;break;case"bounty-font-scale":n(this,z).fontScale=parseFloat(e)||1;break;case"bounty-font-weight":n(this,z).fontWeight=parseFloat(e)||600;break;case"bounty-vertical-offset":n(this,z).verticalOffset=parseFloat(e)||0;break;case"photo-url":{await n(this,U).loadImage(e),n(this,lt).highlight=!e.endsWith("#nohighlight");break}case"filter":{n(this,U).filter=e;break}case"poster-shadow":{p(this,qe,pi).call(this);break}case"photo-shadow":n(this,U).shadow=parseFloat(e)||0}}async export(){const t=document.createElement("canvas");t.domWidth=0,t.domHeight=0,t.style.display="none";const i=t.getContext("2d"),e=p(this,W,Y).call(this,"poster-shadow"),r=new Vi(i,Vn),a=new Qi(i),l=new Di(i),c=new Hi(i),d=await r.loadImage(),f=d.width+e*2,g=d.height+e*2,m=r.setSize({width:f,height:g,shadowSize:e,quality:"original"});await c.loadBellyImage(m.bellyImageUrl),l.setPosition(m.namePosition),c.setBountyInfo(m.bountyInfo,1),l.text=this.getAttribute("name")??"",c.text=this.getAttribute("bounty")??"",l.spacing=p(this,W,Y).call(this,"name-spacing"),c.spacing=p(this,W,Y).call(this,"bounty-spacing"),c.fontFamily=this.getAttribute("bounty-font-family")??"",c.fontScale=p(this,W,Y).call(this,"bounty-font-scale",1),c.fontWeight=p(this,W,Y).call(this,"bounty-font-weight"),c.verticalOffset=p(this,W,Y).call(this,"bounty-vertical-offset"),await a.init(m.photoPosition,m.boundaryOffset),await a.loadImage(this.getAttribute("photo-url")),a.shadow=p(this,W,Y).call(this,"photo-shadow");const{x,y:S,width:k,height:Rt,filter:et}=n(this,U);a.x=x/n(this,P).imageScale,a.y=S/n(this,P).imageScale,a.width=k/n(this,P).imageScale,a.height=Rt/n(this,P).imageScale,a.filter=et,a.updateRenderPosition(),a.render(),r.render(),c.render(),l.render();let L="";try{const R=await new Promise((Hn,ce)=>{t.toBlob(w=>{w?Hn(w):ce("Failed to create blob object.")},"image/png",1)});L=URL.createObjectURL(R),p(this,Mn,Do).call(this,L,"wanted-poster.png")}finally{L&&URL.revokeObjectURL(L)}}}Ht=new WeakMap,ct=new WeakMap,je=new WeakMap,U=new WeakMap,lt=new WeakMap,J=new WeakMap,z=new WeakMap,P=new WeakMap,ht=new WeakMap,te=new WeakMap,_e=new WeakMap,W=new WeakSet,Y=function(t,i=0){const e=this.getAttribute(t)||"";return parseFloat(e)||i},Mn=new WeakSet,Do=function(t,i){const e=document.createElement("a");e.setAttribute("href",t),e.setAttribute("download",i),e.style.display="none",document.body.appendChild(e),e.click(),e.remove()},qe=new WeakSet,pi=function(){if(n(this,ht)!=="success")return;const t=p(this,W,Y).call(this,"poster-shadow"),i=n(this,Ht).getBoundingClientRect(),e=n(this,ct).getBoundingClientRect(),r=ki(i.width,i.height,e.width,e.height),a=n(this,P).setSize({width:i.width,height:i.height,shadowSize:t,quality:"half"});n(this,J).setPosition(a.namePosition),n(this,z).setBountyInfo(a.bountyInfo,n(this,P).imageScale),n(this,U).setBoundary(a.photoPosition,a.boundaryOffset),n(this,lt).scale(r),n(this,lt).borderScale=n(this,P).imageScale},$e=new WeakSet,gi=function(){n(this,je).clearRect(0,0,n(this,ct).domWidth,n(this,ct).domHeight),n(this,U).render(),n(this,P).render(),n(this,z).render(),n(this,J).render(),n(this,lt).render(),requestAnimationFrame(p(this,$e,gi).bind(this))};customElements.define(qr,Wr);const bn=new Map,be={photoUrl:"",name:"",bounty:"",nameSpacing:0,bountySpacing:1,bountyFontFamily:"Vertiky",bountyFontScale:1,bountyFontWeight:600,bountyVerticalOffset:-4,filter:"",posterShadow:0,photoShadow:0,blur:0,brightness:100,contrast:100,grayscale:0,hueRotate:0,saturate:100,sepia:0};function Hr(o){return o in be}function mi({blur:o,brightness:s,contrast:t,grayscale:i,hueRotate:e,saturate:r,sepia:a}){return`blur(${o}px) brightness(${s}%) contrast(${t}%) grayscale(${i}%) hue-rotate(${e}deg) saturate(${r}%) sepia(${a}%)`}const b=new Proxy({...be,filter:mi(be)},{set(o,s,t,i){if(!Hr(s))return!0;switch(s){case"blur":case"brightness":case"contrast":case"grayscale":case"hueRotate":case"saturate":case"sepia":{const e=mi({...o,[s]:t});if(e===o.filter)break;o.filter=e,setTimeout(()=>{(bn.get("filter")??[]).forEach(a=>a("filter",e,o))})}}return setTimeout(()=>{(bn.get(s)??[]).forEach(r=>r(s,t,o))}),Reflect.set(o,s,t,i)}});function y(o,s){let t=bn.get(o);t||(t=[],bn.set(o,t)),t.push(s)}function Kn(o={}){Object.assign(b,{...b,filter:mi(be),...o})}function Dr(o={}){Object.assign(b,{...be,...o})}const Gr=":host{--slider-thumb-size: 2rem;display:block;position:fixed;top:0;left:0;transform:translate(-105%);transition:transform .2s;box-sizing:border-box;box-shadow:.1rem 0 .3rem #0000007f;border:1px solid #3b230e;background:linear-gradient(120deg,rgb(245 198 95),rgb(245 218 158),rgb(245 198 96));padding:.125rem;width:18.75rem;max-width:80%;height:100%}:host(.open){transform:translate(0)}.container{display:flex;flex-direction:column;box-sizing:border-box;box-shadow:inset 0 0 .2rem .2rem #0000007f;border:.0625rem solid rgb(180 150 81);background:url("+new URL("../images/wood-bg.png",import.meta.url).href+") repeat-y center top;background-size:100% auto;width:100%;height:100%}.field-container{display:flex;flex:1 0;flex-direction:column;gap:2.5rem;padding:1rem;overflow-x:hidden;overflow-y:auto}.action-container{display:flex;justify-content:space-around;align-items:center;padding:0 1rem;height:4rem}.wood-button{display:flex;justify-content:center;align-items:center;filter:var(--element-filter);transition:.05s;cursor:pointer;outline:none;border:0;background-image:url("+new URL("../images/wood-button.png",import.meta.url).href+");background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-color:transparent;width:6rem;height:2rem;color:#fff;font-size:1rem;font-family:serif;text-shadow:var(--text-shadow)}.wood-button:hover{filter:var(--element-hover-filter)}.close-button{filter:var(--element-filter);transition:.1s;cursor:pointer;outline:none;border:0;background-image:url("+new URL("../images/close-button.png",import.meta.url).href+");background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-color:transparent;width:2rem;height:2rem}.close-button:hover{filter:var(--element-hover-filter)}.wood-button:active,.close-button:active{transform:translateY(1px);filter:var(--element-active-filter)}.text-input{filter:var(--element-filter);box-sizing:border-box;outline:none;border:0;background-image:url("+new URL("../images/input-frame.png",import.meta.url).href+");background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-color:transparent;padding:0 .8rem 0 .75rem;width:100%;color:var(--dark-text-color);font-size:1rem;line-height:2rem;font-family:serif;text-align:center}.text-input::-moz-placeholder{color:#0000004d;font-size:1rem;text-shadow:none}.text-input::placeholder{color:#0000004d;font-size:1rem;text-shadow:none}.header{display:flex;position:relative;flex-shrink:0;justify-content:center;align-items:center;box-sizing:border-box;margin:0 auto 1.5em;background-image:url("+new URL("../images/scroll-paper.png",import.meta.url).href+`);background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-color:transparent;padding-bottom:.1rem;padding-left:.5rem;width:14rem;height:2.75rem;color:var(--dark-text-color);font-size:1rem}.field-group{display:grid;grid-template-columns:auto 1fr;-moz-column-gap:1rem;column-gap:1rem;row-gap:.5rem;align-items:center;color:#fff;text-align:right}.field-group label{font-size:.8rem;text-shadow:0 0 .25rem black,0 0 .5rem rgb(57 42 34)}::-moz-selection{filter:brightness(120%);background:rgb(88 64 52 / 80%);color:#fff}::selection{filter:brightness(120%);background:rgb(88 64 52 / 80%);color:#fff}::-webkit-scrollbar{width:.2rem}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.1rem;background:#f5d58d}::-webkit-scrollbar-corner{background:transparent} +
`,Mr="tips-dialog",Co=document.createElement("template");Co.innerHTML=zr;class Or extends HTMLElement{constructor(){super();const s=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=Pr,s.append(t,Co.content.cloneNode(!0))}toggle(){this.hasAttribute("open")?this.removeAttribute("open"):this.setAttribute("open","")}}customElements.define(Mr,Or);const Br=""+new URL("belly-af8e0dab.png",import.meta.url).href,Nr=""+new URL("one-piece-wanted-ed269d97.png",import.meta.url).href,Vn={imageUrl:Nr,bellyImageUrl:Br,photoPosition:{x:74,y:252,width:638,height:484},namePosition:{x:87,y:826,width:586,height:114},bountyInfo:{x:82,y:958,width:592,height:85,bellyMarginRight:18,fontSize:52.5},boundaryOffset:{left:10,right:10,top:10,bottom:10}},Ur=`:host{display:block;width:100%;height:100%;touch-action:none}.container{display:flex;position:relative;justify-content:center;align-items:center;box-sizing:border-box;width:100%;height:100%} +`;function mn(o){return new Promise((s,t)=>{const i=new Image;i.setAttribute("crossorigin","anonymous"),i.onload=()=>s(i),i.onerror=t,i.src=o})}function ki(o,s,t,i){const e=o/t,r=s/i;return Math.min(r,e)}class Ii{constructor(s){E(this,"x",0);E(this,"y",0);E(this,"width",0);E(this,"height",0);E(this,"ctx");this.ctx=s}scale(s){this.x=this.x*s,this.y=this.y*s,this.width=this.width*s,this.height=this.height*s}}var Kt,Jt,wn,Ro;class Ao extends Ii{constructor(){super(...arguments);h(this,wn);h(this,Kt,"");h(this,Jt,0);E(this,"formattedText","");E(this,"align","center");E(this,"baseline","top");E(this,"fontSize",0);E(this,"fontWeight",400);E(this,"fontFamily","serif")}set text(t){u(this,Kt,t),this.formattedText=this.formatText(t,n(this,Jt))}get text(){return n(this,Kt)}set spacing(t){u(this,Jt,t),this.formattedText=this.formatText(n(this,Kt),t)}get spacing(){return n(this,Jt)}formatSpacing(t,i){let e="";for(let r=0;re())}catch(e){throw console.error(e),new Error("Failed to load photo image.")}}scale(t){super.scale(t),this.updateRenderPosition()}setBoundary(t,i){u(this,B,{...t}),u(this,Ut,{...i})}updateRenderPosition(){if(!n(this,D))return;const t=ki(this.width,this.height,n(this,D).width,n(this,D).height),i=n(this,D).width*t,e=n(this,D).height*t,r=this.x+(this.width-i)/2,a=this.y+(this.height-e)/2;u(this,Ae,{x:r,y:a,width:i,height:e}),u(this,Ce,t)}on(t,i){var e;n(this,st).has(t)||n(this,st).set(t,[]),(e=n(this,st).get(t))==null||e.push(i)}off(t,i){const e=n(this,st).get(t);if(!e)return;const r=e.findIndex(a=>a===i);e.splice(r,1)}render(){if(this.ctx.save(),this.ctx.shadowColor="rgba(0, 0, 0, 1)",this.ctx.shadowBlur=this.shadow*n(this,Ce),this.ctx.fillStyle=n(this,Zt)?n(this,Zt):"none",this.ctx.fillRect(n(this,B).x,n(this,B).y,n(this,B).width,n(this,B).height),!n(this,D)){this.ctx.restore();return}const{x:t,y:i,width:e,height:r}=n(this,Ae);this.ctx.filter=this.filter,this.ctx.drawImage(n(this,D),t,i,e,r);const{left:a,right:l,top:c,bottom:d}=n(this,Ut);t<=a&&this.ctx.clearRect(0,i,a,r),i<=c&&this.ctx.clearRect(t,0,e,c),t+e>this.ctx.canvas.domWidth-l&&this.ctx.clearRect(this.ctx.canvas.domWidth-l,i,l,r),i+r>this.ctx.canvas.domHeight-d&&this.ctx.clearRect(t,this.ctx.canvas.domHeight-d,e,d),this.ctx.restore()}}Ce=new WeakMap,st=new WeakMap,D=new WeakMap,Zt=new WeakMap,B=new WeakMap,Ae=new WeakMap,Ut=new WeakMap,Sn=new WeakSet,Fo=function(){this.x=n(this,B).x,this.y=n(this,B).y,this.width=n(this,B).width,this.height=n(this,B).height,u(this,Ut,{...n(this,Ut)}),u(this,B,{x:this.x,y:this.y,width:this.width,height:this.height}),this.updateRenderPosition()};const Yi=4,Xi=[10,5];var v,jt,N,rt,X,at,_t,qt,Re,Fe,q,$t,Pe,ze,kn,Po,In,zo,En,Mo,Ln,Oo,Tn,Bo,Cn,No,An,Uo,Rn,jo,Fn,_o,Me,hi,Oe,di,Be,ui,Ne,fi,Pn,qo,zn,$o,Mn,Wo;class _r extends Ii{constructor(t,i){super(t);h(this,kn);h(this,In);h(this,En);h(this,Ln);h(this,Tn);h(this,Cn);h(this,An);h(this,Rn);h(this,Fn);h(this,Me);h(this,Oe);h(this,Be);h(this,Ne);h(this,Pn);h(this,zn);h(this,Mn);h(this,v,void 0);h(this,jt,!1);h(this,N,!1);h(this,rt,!1);h(this,X,!1);h(this,at,Yi);h(this,_t,Xi);h(this,qt,null);h(this,Re,0);h(this,Fe,0);h(this,q,new Map);h(this,$t,0);h(this,Pe,0);h(this,ze,0);u(this,v,i),i.on("imageloaded",()=>this.reset()),t.canvas.addEventListener("mouseover",p(this,In,zo).bind(this),{passive:!0}),t.canvas.addEventListener("mouseout",p(this,En,Mo).bind(this),{passive:!0}),t.canvas.addEventListener("wheel",p(this,kn,Po).bind(this),{passive:!0}),t.canvas.addEventListener("pointerdown",p(this,Tn,Bo).bind(this),{passive:!0}),t.canvas.addEventListener("pointerup",p(this,Cn,No).bind(this),{passive:!0}),t.canvas.addEventListener("pointercancel",p(this,An,Uo).bind(this),{passive:!0}),t.canvas.addEventListener("pointermove",p(this,Rn,jo).bind(this),{passive:!0}),t.canvas.addEventListener("pointerout",p(this,Fn,_o).bind(this),{passive:!0})}set borderScale(t){u(this,at,Yi*t),u(this,_t,Xi.map(i=>i*t))}set highlight(t){u(this,jt,t)}scale(t){super.scale(t),n(this,v).scale(t)}reset(){this.x=n(this,v).x,this.y=n(this,v).y,this.width=n(this,v).width,this.height=n(this,v).height,u(this,N,!1),u(this,rt,!1),u(this,X,!1)}render(){!n(this,N)&&!n(this,X)&&!n(this,jt)||(this.ctx.save(),cn(this,$t)._++,n(this,$t)>=n(this,_t)[0]+n(this,_t)[1]&&u(this,$t,0),this.ctx.lineDashOffset=-n(this,$t),this.ctx.fillStyle="rgba(255,255,255,0.5)",this.ctx.strokeStyle="red",this.ctx.lineWidth=n(this,at),this.ctx.setLineDash(n(this,_t)),this.ctx.fillRect(this.x,this.y,this.width,this.height),this.ctx.strokeRect(this.x,this.y,this.width,this.height),this.ctx.restore())}}v=new WeakMap,jt=new WeakMap,N=new WeakMap,rt=new WeakMap,X=new WeakMap,at=new WeakMap,_t=new WeakMap,qt=new WeakMap,Re=new WeakMap,Fe=new WeakMap,q=new WeakMap,$t=new WeakMap,Pe=new WeakMap,ze=new WeakMap,kn=new WeakSet,Po=function(t){const i=t.deltaY>0?.95:1.05;p(this,Ne,fi).call(this,i)},In=new WeakSet,zo=function(){const{left:t,top:i}=this.ctx.canvas.getBoundingClientRect();u(this,Re,i),u(this,Fe,t)},En=new WeakSet,Mo=function(){u(this,N,!1)},Ln=new WeakSet,Oo=function(t){const i=t.clientX-n(this,Fe),e=t.clientY-n(this,Re);if(n(this,rt)){const r=t.clientX-n(this,Pe),a=t.clientY-n(this,ze);p(this,Mn,Wo).call(this,r,a)}n(this,X)||p(this,Pn,qo).call(this,i,e),p(this,Me,hi).call(this,i,e,this.x,this.y,this.width,this.height,n(this,at))?(u(this,N,!0),u(this,jt,!1)):u(this,N,!1),u(this,Pe,t.clientX),u(this,ze,t.clientY)},Tn=new WeakSet,Bo=function(t){if(u(this,jt,!1),t.pointerType==="mouse"&&t.button===0){u(this,rt,!0);return}n(this,q).set(t.pointerId,t);const{left:i,top:e}=this.ctx.canvas.getBoundingClientRect();let r=!1;for(const a of n(this,q).values()){const l=a.clientX-i,c=a.clientY-e;if(p(this,Me,hi).call(this,l,c,this.x,this.y,this.width,this.height,n(this,at))){r=!0;break}}u(this,N,r)},Cn=new WeakSet,No=function(t){if(t.pointerType==="mouse"&&t.button===0){u(this,rt,!1),u(this,X,!1);return}p(this,Oe,di).call(this,t)},An=new WeakSet,Uo=function(t){p(this,Oe,di).call(this,t)},Rn=new WeakSet,jo=function(t){if(t.pointerType==="mouse"){p(this,Ln,Oo).call(this,t);return}const i=Array.from(n(this,q).values());if(i.length===1&&n(this,N)){const e=i[0],{clientX:r,clientY:a}=t,l=n(this,q).get(e.pointerId);if(l){const c=r-l.clientX,d=a-l.clientY;this.x+=c,this.y+=d,n(this,v).x+=c,n(this,v).y+=d,n(this,v).updateRenderPosition()}}if(i.length===2&&n(this,N)){const e=n(this,q).get(i[0].pointerId),r=n(this,q).get(i[1].pointerId);if(e&&r){const a=i[0].pointerId===t.pointerId?i[1]:i[0],l=p(this,Be,ui).call(this,a,t),c=p(this,Be,ui).call(this,e,r),d=l>c?1.02:.98;p(this,Ne,fi).call(this,d)}}n(this,q).set(t.pointerId,t)},Fn=new WeakSet,_o=function(t){t.pointerType==="mouse"&&(u(this,rt,!1),u(this,X,!1))},Me=new WeakSet,hi=function(t,i,e,r,a,l,c=0){const d=c/2,f=e-d,g=r-d,m=e+a+d,x=r+l+d,S=t>=f&&t<=m,k=i>=g&&i<=x;return S&&k},Oe=new WeakSet,di=function(t){n(this,q).delete(t.pointerId),n(this,q).size||u(this,N,!1)},Be=new WeakSet,ui=function(t,i){const e=Math.abs(t.clientX-i.clientX),r=Math.abs(t.clientY-i.clientY);return Math.pow(e,2)+Math.pow(r,2)},Ne=new WeakSet,fi=function(t){const i=this.width*t-this.width,e=this.height*t-this.height;this.x=this.x-i/2,this.width=this.width+i,this.y=this.y-e/2,this.height=this.height+e,n(this,v).x=this.x,n(this,v).y=this.y,n(this,v).width=this.width,n(this,v).height=this.height,n(this,v).updateRenderPosition()},Pn=new WeakSet,qo=function(t,i){const e=p(this,zn,$o).call(this,t,i,this.x,this.y,this.width,this.height,n(this,at));e.left||e.right?(this.ctx.canvas.style.cursor="ew-resize",u(this,qt,e.left?"left":"right")):e.top||e.bottom?(this.ctx.canvas.style.cursor="ns-resize",u(this,qt,e.top?"top":"bottom")):n(this,N)?this.ctx.canvas.style.cursor="move":this.ctx.canvas.style.cursor="default"},zn=new WeakSet,$o=function(t,i,e,r,a,l,c=0){const d=c/2,f=e-d,g=r-d,m=e+a+d,x=r+l+d,S=e+d,k=r+d,Ft=e+a-d,et=r+l-d;return{left:t>=f&&t<=S,right:t>=Ft&&t<=m,top:i>=g&&i<=k,bottom:i>=et&&i<=x}},Mn=new WeakSet,Wo=function(t,i){switch(this.ctx.canvas.style.cursor){case"move":this.x+=t,this.y+=i,n(this,v).x+=t,n(this,v).y+=i,n(this,v).updateRenderPosition();break;case"ew-resize":{if(u(this,X,!0),n(this,qt)==="right"){const e=Math.max(this.width+t,1);this.width=e,n(this,v).width=e}else{const e=this.x+t;if(e>=this.x+this.width)break;const r=this.width-t;this.x=e,n(this,v).x=e,this.width=r,n(this,v).width=r}n(this,v).updateRenderPosition();break}case"ns-resize":{if(u(this,X,!0),n(this,qt)==="bottom"){const e=Math.max(this.height+i,1);this.height=e,n(this,v).height=e}else{const e=this.y+i;if(e>=this.y+this.height)break;const r=this.height-i;this.y=e,n(this,v).y=e,this.height=r,n(this,v).height=r}n(this,v).updateRenderPosition()}}};var $,T,K,Ue,V,Wt,On,Ho;class Vi{constructor(s,t){h(this,On);h(this,$,void 0);h(this,T,void 0);h(this,K,0);h(this,Ue,1);h(this,V,null);h(this,Wt,void 0);u(this,$,s),u(this,T,s.canvas),u(this,Wt,t)}async loadImage(){let s;try{s=await mn(n(this,Wt).imageUrl),u(this,V,s)}catch(t){throw console.error(t),new Error("Failed to load wanted image.")}return s}get imageScale(){return n(this,Ue)}setSize({width:s,height:t,shadowSize:i,quality:e}){if(!n(this,V))throw new Error("Failed to set size: wanted image is null");const r=n(this,V).width+i*2,a=n(this,V).height+i*2,l=ki(s,t,r,a);u(this,Ue,l);const c=r*l,d=a*l;switch(u(this,K,i*l),n(this,T).style.width=c+"px",n(this,T).style.height=d+"px",n(this,T).domWidth=c,n(this,T).domHeight=d,e){case"original":n(this,T).width=r,n(this,T).height=a,n(this,$).scale(1/l,1/l);break;case"high":{const g=window.devicePixelRatio;n(this,T).width=c*g,n(this,T).height=d*g,n(this,$).scale(g,g);break}case"half":{const g=n(this,V).height/d/2;n(this,T).width=c*g,n(this,T).height=d*g,n(this,$).scale(g,g);break}}return p(this,On,Ho).call(this,l,i)}render(){n(this,V)&&(n(this,$).save(),n(this,$).shadowColor="rgba(0, 0, 0, 1)",n(this,$).shadowBlur=n(this,K)*(n(this,T).width/n(this,T).domWidth),n(this,$).drawImage(n(this,V),n(this,K),n(this,K),n(this,T).domWidth-n(this,K)*2,n(this,T).domHeight-n(this,K)*2),n(this,$).restore())}}$=new WeakMap,T=new WeakMap,K=new WeakMap,Ue=new WeakMap,V=new WeakMap,Wt=new WeakMap,On=new WeakSet,Ho=function(s,t){if(!n(this,Wt))throw new Error("Failed to calculate wanted image info: WantedImageInfo object is null");t*=s;const{imageUrl:i,bellyImageUrl:e,photoPosition:r,namePosition:a,bountyInfo:l,boundaryOffset:c}=n(this,Wt),d=g=>{const{x:m,y:x,width:S,height:k}=g;return{x:m*s+t,y:x*s+t,width:S*s,height:k*s}},f={...d(l),bellyMarginRight:l.bellyMarginRight*s,fontSize:l.fontSize*s};return{imageUrl:i,bellyImageUrl:e,photoPosition:d(r),namePosition:d(a),bountyInfo:f,boundaryOffset:{left:c.left*s+t,right:c.right*s+t,top:c.top*s+t,bottom:c.bottom*s+t}}};const qr="wanted-poster",$r=["name","bounty","name-spacing","bounty-spacing","bounty-font-family","bounty-font-scale","bounty-font-weight","bounty-vertical-offset","photo-url","filter","poster-shadow","photo-shadow"];var Ht,ct,je,U,lt,J,z,P,ht,te,_e,W,Y,Bn,Do,qe,pi,$e,gi;class Wr extends HTMLElement{constructor(){super();h(this,W);h(this,Bn);h(this,qe);h(this,$e);h(this,Ht,void 0);h(this,ct,void 0);h(this,je,void 0);h(this,U,void 0);h(this,lt,void 0);h(this,J,void 0);h(this,z,void 0);h(this,P,void 0);h(this,ht,void 0);h(this,te,void 0);h(this,_e,void 0);u(this,ht,"init");const t=this.attachShadow({mode:"open"}),i=document.createElement("canvas");i.domWidth=0,i.domHeight=0;const e=document.createElement("div");e.className="container";const r=document.createElement("style");r.textContent=Ur,t.append(r,e);const a=i.getContext("2d");u(this,Ht,e),u(this,ct,i),u(this,je,a),u(this,P,new Vi(a,Vn)),u(this,U,new Qi(a)),u(this,J,new Di(a)),u(this,z,new Hi(a)),u(this,lt,new _r(a,n(this,U))),u(this,te,new ResizeObserver(()=>{clearTimeout(n(this,_e)),u(this,_e,window.setTimeout(()=>p(this,qe,pi).call(this),200))})),n(this,te).observe(e)}static get observedAttributes(){return $r}async connectedCallback(){console.log("[connected]"),await new Promise(e=>{setTimeout(()=>e(""))}),u(this,ht,"loading");const t=p(this,W,Y).call(this,"poster-shadow"),i=n(this,Ht).getBoundingClientRect();try{await n(this,P).loadImage();const e=n(this,P).setSize({width:i.width,height:i.height,shadowSize:t,quality:"half"});n(this,J).setPosition(e.namePosition),n(this,z).setBountyInfo(e.bountyInfo,n(this,P).imageScale),await n(this,z).loadBellyImage(Vn.bellyImageUrl),await n(this,U).init(e.photoPosition,e.boundaryOffset),await n(this,U).loadImage(this.getAttribute("photo-url"))}catch(e){u(this,ht,"error"),console.error("Failed to init wanted poster.",e);return}u(this,ht,"success"),p(this,$e,gi).call(this),n(this,Ht).appendChild(n(this,ct)),this.dispatchEvent(new CustomEvent("WantedPosterLoaded",{bubbles:!0}))}disconnectedCallback(){console.log("[disconnected]"),n(this,te).disconnect()}adoptedCallback(){console.log("[adopted]")}async attributeChangedCallback(t,i,e){switch(t){case"name":n(this,J).text=e;break;case"bounty":n(this,z).text=e;break;case"name-spacing":n(this,J).spacing=parseFloat(e)||0;break;case"bounty-spacing":n(this,z).spacing=parseFloat(e)||0;break;case"bounty-font-family":n(this,z).fontFamily=e;break;case"bounty-font-scale":n(this,z).fontScale=parseFloat(e)||1;break;case"bounty-font-weight":n(this,z).fontWeight=parseFloat(e)||600;break;case"bounty-vertical-offset":n(this,z).verticalOffset=parseFloat(e)||0;break;case"photo-url":{await n(this,U).loadImage(e),n(this,lt).highlight=!e.endsWith("#nohighlight");break}case"filter":{n(this,U).filter=e;break}case"poster-shadow":{p(this,qe,pi).call(this);break}case"photo-shadow":n(this,U).shadow=parseFloat(e)||0}}async export(){const t=document.createElement("canvas");t.domWidth=0,t.domHeight=0,t.style.display="none";const i=t.getContext("2d"),e=p(this,W,Y).call(this,"poster-shadow"),r=new Vi(i,Vn),a=new Qi(i),l=new Di(i),c=new Hi(i),d=await r.loadImage(),f=d.width+e*2,g=d.height+e*2,m=r.setSize({width:f,height:g,shadowSize:e,quality:"original"});await c.loadBellyImage(m.bellyImageUrl),l.setPosition(m.namePosition),c.setBountyInfo(m.bountyInfo,1),l.text=this.getAttribute("name")??"",c.text=this.getAttribute("bounty")??"",l.spacing=p(this,W,Y).call(this,"name-spacing"),c.spacing=p(this,W,Y).call(this,"bounty-spacing"),c.fontFamily=this.getAttribute("bounty-font-family")??"",c.fontScale=p(this,W,Y).call(this,"bounty-font-scale",1),c.fontWeight=p(this,W,Y).call(this,"bounty-font-weight"),c.verticalOffset=p(this,W,Y).call(this,"bounty-vertical-offset"),await a.init(m.photoPosition,m.boundaryOffset),await a.loadImage(this.getAttribute("photo-url")),a.shadow=p(this,W,Y).call(this,"photo-shadow");const{x,y:S,width:k,height:Ft,filter:et}=n(this,U);a.x=x/n(this,P).imageScale,a.y=S/n(this,P).imageScale,a.width=k/n(this,P).imageScale,a.height=Ft/n(this,P).imageScale,a.filter=et,a.updateRenderPosition(),a.render(),r.render(),c.render(),l.render();let L="";try{const F=await new Promise((Hn,ce)=>{t.toBlob(w=>{w?Hn(w):ce("Failed to create blob object.")},"image/png",1)});L=URL.createObjectURL(F),p(this,Bn,Do).call(this,L,"wanted-poster.png")}finally{L&&URL.revokeObjectURL(L)}}}Ht=new WeakMap,ct=new WeakMap,je=new WeakMap,U=new WeakMap,lt=new WeakMap,J=new WeakMap,z=new WeakMap,P=new WeakMap,ht=new WeakMap,te=new WeakMap,_e=new WeakMap,W=new WeakSet,Y=function(t,i=0){const e=this.getAttribute(t)||"";return parseFloat(e)||i},Bn=new WeakSet,Do=function(t,i){const e=document.createElement("a");e.setAttribute("href",t),e.setAttribute("download",i),e.style.display="none",document.body.appendChild(e),e.click(),e.remove()},qe=new WeakSet,pi=function(){if(n(this,ht)!=="success")return;const t=p(this,W,Y).call(this,"poster-shadow"),i=n(this,Ht).getBoundingClientRect(),e=n(this,ct).getBoundingClientRect(),r=ki(i.width,i.height,e.width,e.height),a=n(this,P).setSize({width:i.width,height:i.height,shadowSize:t,quality:"half"});n(this,J).setPosition(a.namePosition),n(this,z).setBountyInfo(a.bountyInfo,n(this,P).imageScale),n(this,U).setBoundary(a.photoPosition,a.boundaryOffset),n(this,lt).scale(r),n(this,lt).borderScale=n(this,P).imageScale},$e=new WeakSet,gi=function(){n(this,je).clearRect(0,0,n(this,ct).domWidth,n(this,ct).domHeight),n(this,U).render(),n(this,P).render(),n(this,z).render(),n(this,J).render(),n(this,lt).render(),requestAnimationFrame(p(this,$e,gi).bind(this))};customElements.define(qr,Wr);const bn=new Map,be={photoUrl:"",name:"",bounty:"",nameSpacing:0,bountySpacing:1,bountyFontFamily:"Vertiky",bountyFontScale:1,bountyFontWeight:600,bountyVerticalOffset:-4,filter:"",posterShadow:0,photoShadow:0,blur:0,brightness:100,contrast:100,grayscale:0,hueRotate:0,saturate:100,sepia:0};function Hr(o){return o in be}function mi({blur:o,brightness:s,contrast:t,grayscale:i,hueRotate:e,saturate:r,sepia:a}){return`blur(${o}px) brightness(${s}%) contrast(${t}%) grayscale(${i}%) hue-rotate(${e}deg) saturate(${r}%) sepia(${a}%)`}const b=new Proxy({...be,filter:mi(be)},{set(o,s,t,i){if(!Hr(s))return!0;switch(s){case"blur":case"brightness":case"contrast":case"grayscale":case"hueRotate":case"saturate":case"sepia":{const e=mi({...o,[s]:t});if(e===o.filter)break;o.filter=e,setTimeout(()=>{(bn.get("filter")??[]).forEach(a=>a("filter",e,o))})}}return setTimeout(()=>{(bn.get(s)??[]).forEach(r=>r(s,t,o))}),Reflect.set(o,s,t,i)}});function y(o,s){let t=bn.get(o);t||(t=[],bn.set(o,t)),t.push(s)}function Kn(o={}){Object.assign(b,{...b,filter:mi(be),...o})}function Dr(o={}){Object.assign(b,{...be,...o})}const Gr=":host{--slider-thumb-size: 2rem;display:block;position:fixed;top:0;left:0;transform:translate(-105%);transition:transform .2s;box-sizing:border-box;box-shadow:.1rem 0 .3rem #0000007f;border:1px solid #3b230e;background:linear-gradient(120deg,rgb(245 198 95),rgb(245 218 158),rgb(245 198 96));padding:.125rem;width:18.75rem;max-width:80%;height:100%}:host(.open){transform:translate(0)}.container{display:flex;flex-direction:column;box-sizing:border-box;box-shadow:inset 0 0 .2rem .2rem #0000007f;border:.0625rem solid rgb(180 150 81);background:url("+new URL("../images/wood-bg.png",import.meta.url).href+") repeat-y center top;background-size:100% auto;width:100%;height:100%}.field-container{display:flex;flex:1 0;flex-direction:column;gap:2.5rem;padding:1rem;overflow-x:hidden;overflow-y:auto}.action-container{display:flex;justify-content:space-around;align-items:center;padding:0 1rem;height:4rem}.wood-button{display:flex;justify-content:center;align-items:center;filter:var(--element-filter);transition:.05s;cursor:pointer;outline:none;border:0;background-image:url("+new URL("../images/wood-button.png",import.meta.url).href+");background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-color:transparent;width:6rem;height:2rem;color:#fff;font-size:1rem;font-family:serif;text-shadow:var(--text-shadow)}.wood-button:hover{filter:var(--element-hover-filter)}.close-button{filter:var(--element-filter);transition:.1s;cursor:pointer;outline:none;border:0;background-image:url("+new URL("../images/close-button.png",import.meta.url).href+");background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-color:transparent;width:2rem;height:2rem}.close-button:hover{filter:var(--element-hover-filter)}.wood-button:active,.close-button:active{transform:translateY(1px);filter:var(--element-active-filter)}.text-input{filter:var(--element-filter);box-sizing:border-box;outline:none;border:0;background-image:url("+new URL("../images/input-frame.png",import.meta.url).href+");background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-color:transparent;padding:0 .8rem 0 .75rem;width:100%;color:var(--dark-text-color);font-size:1rem;line-height:2rem;font-family:serif;text-align:center}.text-input::-moz-placeholder{color:#0000004d;font-size:1rem;text-shadow:none}.text-input::placeholder{color:#0000004d;font-size:1rem;text-shadow:none}.header{display:flex;position:relative;flex-shrink:0;justify-content:center;align-items:center;box-sizing:border-box;margin:0 auto 1.5em;background-image:url("+new URL("../images/scroll-paper.png",import.meta.url).href+`);background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-color:transparent;padding-bottom:.1rem;padding-left:.5rem;width:14rem;height:2.75rem;color:var(--dark-text-color);font-size:1rem}.field-group{display:grid;grid-template-columns:auto 1fr;-moz-column-gap:1rem;column-gap:1rem;row-gap:.5rem;align-items:center;color:#fff;text-align:right}.field-group label{font-size:.8rem;text-shadow:0 0 .25rem black,0 0 .5rem rgb(57 42 34)}::-moz-selection{filter:brightness(120%);background:rgb(88 64 52 / 80%);color:#fff}::selection{filter:brightness(120%);background:rgb(88 64 52 / 80%);color:#fff}::-webkit-scrollbar{width:.2rem}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.1rem;background:#f5d58d}::-webkit-scrollbar-corner{background:transparent} `,Qr=`
\r
\r
\r @@ -235,5 +235,5 @@ var ts=Object.defineProperty;var es=(o,s,t)=>s in o?ts(o,s,{enumerable:!0,config \r
\r \r -
`,oa="app-container",de="#warcriminal",Vo=document.createElement("template");Vo.innerHTML=ia;var Xe,Ve,Ke,se,tt,Je,Ze,Ct,At,re,ae,tn,en,C,nn,F,jn,Ko,_n,Jo,on,bi,qn,Zo,O,_;class sa extends HTMLElement{constructor(){super();h(this,jn);h(this,_n);h(this,on);h(this,qn);h(this,O);h(this,Xe,void 0);h(this,Ve,void 0);h(this,Ke,void 0);h(this,se,void 0);h(this,tt,void 0);h(this,Je,void 0);h(this,Ze,void 0);h(this,Ct,void 0);h(this,At,void 0);h(this,re,void 0);h(this,ae,void 0);h(this,tn,0);h(this,en,0);h(this,C,void 0);h(this,nn,void 0);h(this,F,void 0);const t=this.attachShadow({mode:"open"});u(this,C,t);const i=document.createElement("style");i.textContent=na,t.append(i,Vo.content.cloneNode(!0)),t.addEventListener("WantedPosterLoaded",()=>{p(this,jn,Ko).call(this)});const e=n(this,C).querySelector("slot[name=poster]");u(this,se,e==null?void 0:e.assignedNodes()[0]),u(this,Xe,n(this,C).querySelector("edit-panel")),u(this,Ve,n(this,C).querySelector("optc-gallery-panel")),u(this,Ke,n(this,C).querySelector("tips-dialog")),u(this,tt,n(this,C).querySelector("#uploadInput")),u(this,Je,n(this,C).querySelector("#editButton")),u(this,Ze,n(this,C).querySelector("#importButton")),u(this,Ct,n(this,C).querySelector("#exportButton")),u(this,At,n(this,C).querySelector("#criminalButton")),u(this,re,n(this,C).querySelector("#tipsButton")),u(this,ae,n(this,C).querySelector("#optcButton")),u(this,nn,p(this,_n,Jo).bind(this)),u(this,F,(r,a)=>{switch(r){case"photoUrl":p(this,O,_).call(this,{"photo-url":a.toString()});break;case"nameSpacing":p(this,O,_).call(this,{"name-spacing":a.toString()});break;case"bountySpacing":p(this,O,_).call(this,{"bounty-spacing":a.toString()});break;case"bountyFontFamily":p(this,O,_).call(this,{"bounty-font-family":a.toString()});break;case"bountyFontScale":p(this,O,_).call(this,{"bounty-font-scale":a.toString()});break;case"bountyFontWeight":p(this,O,_).call(this,{"bounty-font-weight":a.toString()});break;case"bountyVerticalOffset":p(this,O,_).call(this,{"bounty-vertical-offset":a.toString()});break;case"posterShadow":p(this,O,_).call(this,{"poster-shadow":a.toString()});break;case"photoShadow":p(this,O,_).call(this,{"photo-shadow":a.toString()});break;case"name":case"bounty":case"filter":p(this,O,_).call(this,{[r]:a.toString()})}}),window.addEventListener("hashchange",n(this,nn))}connectedCallback(){u(this,en,new Date().getTime()),p(this,O,_).call(this,{name:b.name,bounty:b.bounty.toString(),"name-spacing":b.nameSpacing.toString(),"bounty-spacing":b.bountySpacing.toString(),"poster-shadow":b.posterShadow.toString(),"bounty-font-family":b.bountyFontFamily,"bounty-font-weight":b.bountyFontWeight.toString(),"bounty-vertical-offset":b.bountyVerticalOffset.toString(),filter:b.filter}),y("photoUrl",n(this,F)),y("name",n(this,F)),y("bounty",n(this,F)),y("nameSpacing",n(this,F)),y("bountyFontFamily",n(this,F)),y("bountySpacing",n(this,F)),y("bountyFontScale",n(this,F)),y("bountyFontWeight",n(this,F)),y("bountyVerticalOffset",n(this,F)),y("posterShadow",n(this,F)),y("photoShadow",n(this,F)),y("filter",n(this,F)),location.hash===de&&p(this,on,bi).call(this,!0),this.addEventListener("dragover",t=>{t.preventDefault()}),this.addEventListener("dragenter",()=>{this.classList.add("dragin")}),this.addEventListener("dragleave",t=>{t.relatedTarget===null&&this.classList.remove("dragin")}),this.addEventListener("drop",t=>{var r;t.preventDefault(),this.classList.remove("dragin");const i=(r=t.dataTransfer)==null?void 0:r.files[0];if(!i||!i.type.startsWith("image"))return;const e=URL.createObjectURL(i);b.photoUrl=e}),n(this,tt).addEventListener("input",()=>{const t=n(this,tt).files?n(this,tt).files[0]:null;if(!t||!t.type.startsWith("image"))return;const i=URL.createObjectURL(t);b.photoUrl=i}),n(this,Je).addEventListener("click",()=>{n(this,Xe).toggle()}),n(this,Ze).addEventListener("click",()=>{n(this,tt).value="",n(this,tt).click()}),n(this,Ct).addEventListener("click",async()=>{if(!n(this,Ct).loading){n(this,Ct).loading=!0;try{await n(this,se).export()}catch(t){console.error(t);let i="";t instanceof Error&&(i=t.message),alert(`Oops! something went wrong. 😢 - ${i}`)}finally{n(this,Ct).loading=!1}}}),n(this,At).addEventListener("click",()=>{const t=location.hash===de;location.hash=t?"":de}),n(this,re).addEventListener("click",()=>{n(this,Ke).toggle()}),n(this,ae).addEventListener("click",()=>{n(this,Ve).toggle()}),Ki.setConsumer(async t=>{const i=t[0];if(!Ki.isFileHandle(i))return;const e=await i.getFile(),r=URL.createObjectURL(e);b.photoUrl=r})}}Xe=new WeakMap,Ve=new WeakMap,Ke=new WeakMap,se=new WeakMap,tt=new WeakMap,Je=new WeakMap,Ze=new WeakMap,Ct=new WeakMap,At=new WeakMap,re=new WeakMap,ae=new WeakMap,tn=new WeakMap,en=new WeakMap,C=new WeakMap,nn=new WeakMap,F=new WeakMap,jn=new WeakSet,Ko=function(){const t=n(this,C).querySelector(".loading-overlay"),i=1e3,e=setInterval(()=>{if(!(new Date().getTime()-n(this,en)t.remove(),1e3),location.hash===de){n(this,At).classList.add("criminal--visible");return}setTimeout(()=>n(this,At).classList.add("criminal--visible"),1e4)}},200)},_n=new WeakSet,Jo=function(){p(this,on,bi).call(this,location.hash===de)},on=new WeakSet,bi=function(t){var a;const i=n(this,C).querySelector(".blood-overlay");if(!i)return;const e=t?"https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md":"https://github.com/YuskaWu/one-piece-wanted-poster",r=document.querySelector("github-corner");r.classList.toggle("gc-ua",t),r.setAttribute("href",e),this.classList.toggle("warcriminal"),i.classList.toggle("blood-overlay--visible"),n(this,At).classList.toggle("criminal--stamp"),n(this,re).classList.toggle("tips-button--hidden"),n(this,ae).classList.toggle("optc-button--hidden"),(a=n(this,C).querySelector(".button-container"))==null||a.classList.toggle("button-container--hidden"),t&&Kn({...hn}),p(this,qn,Zo).call(this,t)},qn=new WeakSet,Zo=function(t){if(!t){clearInterval(n(this,tn));return}const i=hn.photoUrls.length;let e=Math.floor(i*Math.random());Kn({photoUrl:hn.photoUrls[e]+"#nohighlight"}),u(this,tn,window.setInterval(()=>{e=(e+1)%i,Kn({photoUrl:hn.photoUrls[e]+"#nohighlight"})},5e3))},O=new WeakSet,_=function(t){const i=Object.keys(t);for(const e of i){const r=t[e]??"";n(this,se).setAttribute(e,r)}};customElements.define(oa,sa); +
`,oa="app-container",de="#warcriminal",Vo=document.createElement("template");Vo.innerHTML=ia;var Xe,Ve,Ke,se,tt,Je,Ze,Ct,At,re,ae,tn,en,C,nn,R,jn,Ko,_n,Jo,on,bi,qn,Zo,M,_;class sa extends HTMLElement{constructor(){super();h(this,jn);h(this,_n);h(this,on);h(this,qn);h(this,M);h(this,Xe,void 0);h(this,Ve,void 0);h(this,Ke,void 0);h(this,se,void 0);h(this,tt,void 0);h(this,Je,void 0);h(this,Ze,void 0);h(this,Ct,void 0);h(this,At,void 0);h(this,re,void 0);h(this,ae,void 0);h(this,tn,0);h(this,en,0);h(this,C,void 0);h(this,nn,void 0);h(this,R,void 0);const t=this.attachShadow({mode:"open"});u(this,C,t);const i=document.createElement("style");i.textContent=na,t.append(i,Vo.content.cloneNode(!0)),t.addEventListener("WantedPosterLoaded",()=>{p(this,jn,Ko).call(this)});const e=n(this,C).querySelector("slot[name=poster]");u(this,se,e==null?void 0:e.assignedNodes()[0]),u(this,Xe,n(this,C).querySelector("edit-panel")),u(this,Ve,n(this,C).querySelector("optc-gallery-panel")),u(this,Ke,n(this,C).querySelector("tips-dialog")),u(this,tt,n(this,C).querySelector("#uploadInput")),u(this,Je,n(this,C).querySelector("#editButton")),u(this,Ze,n(this,C).querySelector("#importButton")),u(this,Ct,n(this,C).querySelector("#exportButton")),u(this,At,n(this,C).querySelector("#criminalButton")),u(this,re,n(this,C).querySelector("#tipsButton")),u(this,ae,n(this,C).querySelector("#optcButton")),u(this,nn,p(this,_n,Jo).bind(this)),u(this,R,(r,a)=>{switch(r){case"photoUrl":p(this,M,_).call(this,{"photo-url":a.toString()});break;case"nameSpacing":p(this,M,_).call(this,{"name-spacing":a.toString()});break;case"bountySpacing":p(this,M,_).call(this,{"bounty-spacing":a.toString()});break;case"bountyFontFamily":p(this,M,_).call(this,{"bounty-font-family":a.toString()});break;case"bountyFontScale":p(this,M,_).call(this,{"bounty-font-scale":a.toString()});break;case"bountyFontWeight":p(this,M,_).call(this,{"bounty-font-weight":a.toString()});break;case"bountyVerticalOffset":p(this,M,_).call(this,{"bounty-vertical-offset":a.toString()});break;case"posterShadow":p(this,M,_).call(this,{"poster-shadow":a.toString()});break;case"photoShadow":p(this,M,_).call(this,{"photo-shadow":a.toString()});break;case"name":case"bounty":case"filter":p(this,M,_).call(this,{[r]:a.toString()})}}),window.addEventListener("hashchange",n(this,nn))}connectedCallback(){u(this,en,new Date().getTime()),p(this,M,_).call(this,{name:b.name,bounty:b.bounty.toString(),"name-spacing":b.nameSpacing.toString(),"bounty-spacing":b.bountySpacing.toString(),"poster-shadow":b.posterShadow.toString(),"bounty-font-family":b.bountyFontFamily,"bounty-font-weight":b.bountyFontWeight.toString(),"bounty-vertical-offset":b.bountyVerticalOffset.toString(),filter:b.filter}),y("photoUrl",n(this,R)),y("name",n(this,R)),y("bounty",n(this,R)),y("nameSpacing",n(this,R)),y("bountyFontFamily",n(this,R)),y("bountySpacing",n(this,R)),y("bountyFontScale",n(this,R)),y("bountyFontWeight",n(this,R)),y("bountyVerticalOffset",n(this,R)),y("posterShadow",n(this,R)),y("photoShadow",n(this,R)),y("filter",n(this,R)),location.hash===de&&p(this,on,bi).call(this,!0),this.addEventListener("dragover",t=>{t.preventDefault()}),this.addEventListener("dragenter",()=>{this.classList.add("dragin")}),this.addEventListener("dragleave",t=>{t.relatedTarget===null&&this.classList.remove("dragin")}),this.addEventListener("drop",t=>{var r;t.preventDefault(),this.classList.remove("dragin");const i=(r=t.dataTransfer)==null?void 0:r.files[0];if(!i||!i.type.startsWith("image"))return;const e=URL.createObjectURL(i);b.photoUrl=e}),n(this,tt).addEventListener("input",()=>{const t=n(this,tt).files?n(this,tt).files[0]:null;if(!t||!t.type.startsWith("image"))return;const i=URL.createObjectURL(t);b.photoUrl=i}),n(this,Je).addEventListener("click",()=>{n(this,Xe).toggle()}),n(this,Ze).addEventListener("click",()=>{n(this,tt).value="",n(this,tt).click()}),n(this,Ct).addEventListener("click",async()=>{if(!n(this,Ct).loading){n(this,Ct).loading=!0;try{await n(this,se).export()}catch(t){console.error(t);let i="";t instanceof Error&&(i=t.message),alert(`Oops! something went wrong. 😢 + ${i}`)}finally{n(this,Ct).loading=!1}}}),n(this,At).addEventListener("click",()=>{const t=location.hash===de;location.hash=t?"":de}),n(this,re).addEventListener("click",()=>{n(this,Ke).toggle()}),n(this,ae).addEventListener("click",()=>{n(this,Ve).toggle()}),Ki.setConsumer(async t=>{const i=t[0];if(!Ki.isFileHandle(i))return;const e=await i.getFile(),r=URL.createObjectURL(e);b.photoUrl=r})}}Xe=new WeakMap,Ve=new WeakMap,Ke=new WeakMap,se=new WeakMap,tt=new WeakMap,Je=new WeakMap,Ze=new WeakMap,Ct=new WeakMap,At=new WeakMap,re=new WeakMap,ae=new WeakMap,tn=new WeakMap,en=new WeakMap,C=new WeakMap,nn=new WeakMap,R=new WeakMap,jn=new WeakSet,Ko=function(){const t=n(this,C).querySelector(".loading-overlay"),i=1e3,e=setInterval(()=>{if(!(new Date().getTime()-n(this,en)t.remove(),1e3),location.hash===de){n(this,At).classList.add("criminal--visible");return}setTimeout(()=>n(this,At).classList.add("criminal--visible"),1e4)}},200)},_n=new WeakSet,Jo=function(){p(this,on,bi).call(this,location.hash===de)},on=new WeakSet,bi=function(t){var a;const i=n(this,C).querySelector(".blood-overlay");if(!i)return;const e=t?"https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md":"https://github.com/YuskaWu/one-piece-wanted-poster",r=document.querySelector("github-corner");r.classList.toggle("gc-ua",t),r.setAttribute("href",e),this.classList.toggle("warcriminal"),i.classList.toggle("blood-overlay--visible"),n(this,At).classList.toggle("criminal--stamp"),n(this,re).classList.toggle("tips-button--hidden"),n(this,ae).classList.toggle("optc-button--hidden"),(a=n(this,C).querySelector(".button-container"))==null||a.classList.toggle("button-container--hidden"),t&&Kn({...hn}),p(this,qn,Zo).call(this,t)},qn=new WeakSet,Zo=function(t){if(!t){clearInterval(n(this,tn));return}const i=hn.photoUrls.length;let e=Math.floor(i*Math.random());Kn({photoUrl:hn.photoUrls[e]+"#nohighlight"}),u(this,tn,window.setInterval(()=>{e=(e+1)%i,Kn({photoUrl:hn.photoUrls[e]+"#nohighlight"})},5e3))},M=new WeakSet,_=function(t){const i=Object.keys(t);for(const e of i){const r=t[e]??"";n(this,se).setAttribute(e,r)}};customElements.define(oa,sa); diff --git a/dist/assets/workbox-window.prod.es5-a7b12eab.js b/dist/assets/workbox-window.prod.es5-a7b12eab.js deleted file mode 100644 index 6822d18..0000000 --- a/dist/assets/workbox-window.prod.es5-a7b12eab.js +++ /dev/null @@ -1,2 +0,0 @@ -try{self["workbox:window:7.0.0"]&&_()}catch{}function S(t,r){return new Promise(function(e){var i=new MessageChannel;i.port1.onmessage=function(f){e(f.data)},t.postMessage(r,[i.port2])})}function W(t,r){for(var e=0;et.length)&&(r=t.length);for(var e=0,i=new Array(r);e"u"||t[Symbol.iterator]==null){if(Array.isArray(t)||(e=function(f,d){if(f){if(typeof f=="string")return E(f,d);var h=Object.prototype.toString.call(f).slice(8,-1);return h==="Object"&&f.constructor&&(h=f.constructor.name),h==="Map"||h==="Set"?Array.from(f):h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h)?E(f,d):void 0}}(t))||r&&t&&typeof t.length=="number"){e&&(t=e);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return(e=t[Symbol.iterator]()).next.bind(e)}try{self["workbox:core:7.0.0"]&&_()}catch{}var y=function(){var t=this;this.promise=new Promise(function(r,e){t.resolve=r,t.reject=e})};function b(t,r){var e=location.href;return new URL(t,e).href===new URL(r,e).href}var g=function(t,r){this.type=t,Object.assign(this,r)};function p(t,r,e){return e?r?r(t):t:(t&&t.then||(t=Promise.resolve(t)),r?t.then(r):t)}function L(){}var j={type:"SKIP_WAITING"};function P(t,r){if(!r)return t&&t.then?t.then(L):Promise.resolve()}var x=function(t){var r,e;function i(v,c){var n,o;return c===void 0&&(c={}),(n=t.call(this)||this).nn={},n.tn=0,n.rn=new y,n.en=new y,n.on=new y,n.un=0,n.an=new Set,n.cn=function(){var s=n.fn,a=s.installing;n.tn>0||!b(a.scriptURL,n.sn.toString())||performance.now()>n.un+6e4?(n.vn=a,s.removeEventListener("updatefound",n.cn)):(n.hn=a,n.an.add(a),n.rn.resolve(a)),++n.tn,a.addEventListener("statechange",n.ln)},n.ln=function(s){var a=n.fn,u=s.target,l=u.state,m=u===n.vn,w={sw:u,isExternal:m,originalEvent:s};!m&&n.mn&&(w.isUpdate=!0),n.dispatchEvent(new g(l,w)),l==="installed"?n.wn=self.setTimeout(function(){l==="installed"&&a.waiting===u&&n.dispatchEvent(new g("waiting",w))},200):l==="activating"&&(clearTimeout(n.wn),m||n.en.resolve(u))},n.dn=function(s){var a=n.hn,u=a!==navigator.serviceWorker.controller;n.dispatchEvent(new g("controlling",{isExternal:u,originalEvent:s,sw:a,isUpdate:n.mn})),u||n.on.resolve(a)},n.gn=(o=function(s){var a=s.data,u=s.ports,l=s.source;return p(n.getSW(),function(){n.an.has(l)&&n.dispatchEvent(new g("message",{data:a,originalEvent:s,ports:u,sw:l}))})},function(){for(var s=[],a=0;an.length)&&(r=n.length);for(var t=0,i=new Array(r);t=n.length?{done:!0}:{done:!1,value:n[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}try{self["workbox:core:7.0.0"]&&_()}catch{}var w=function(){var n=this;this.promise=new Promise(function(r,t){n.resolve=r,n.reject=t})};function b(n,r){var t=location.href;return new URL(n,t).href===new URL(r,t).href}var g=function(n,r){this.type=n,Object.assign(this,r)};function d(n,r,t){return t?r?r(n):n:(n&&n.then||(n=Promise.resolve(n)),r?n.then(r):n)}function O(){}var x={type:"SKIP_WAITING"};function S(n,r){if(!r)return n&&n.then?n.then(O):Promise.resolve()}var U=function(n){function r(v,u){var e,o;return u===void 0&&(u={}),(e=n.call(this)||this).nn={},e.tn=0,e.rn=new w,e.en=new w,e.on=new w,e.un=0,e.an=new Set,e.cn=function(){var s=e.fn,a=s.installing;e.tn>0||!b(a.scriptURL,e.sn.toString())||performance.now()>e.un+6e4?(e.vn=a,s.removeEventListener("updatefound",e.cn)):(e.hn=a,e.an.add(a),e.rn.resolve(a)),++e.tn,a.addEventListener("statechange",e.ln)},e.ln=function(s){var a=e.fn,f=s.target,p=f.state,m=f===e.vn,y={sw:f,isExternal:m,originalEvent:s};!m&&e.mn&&(y.isUpdate=!0),e.dispatchEvent(new g(p,y)),p==="installed"?e.wn=self.setTimeout(function(){p==="installed"&&a.waiting===f&&e.dispatchEvent(new g("waiting",y))},200):p==="activating"&&(clearTimeout(e.wn),m||e.en.resolve(f))},e.yn=function(s){var a=e.hn,f=a!==navigator.serviceWorker.controller;e.dispatchEvent(new g("controlling",{isExternal:f,originalEvent:s,sw:a,isUpdate:e.mn})),f||e.on.resolve(a)},e.gn=(o=function(s){var a=s.data,f=s.ports,p=s.source;return d(e.getSW(),function(){e.an.has(p)&&e.dispatchEvent(new g("message",{data:a,originalEvent:s,ports:f,sw:p}))})},function(){for(var s=[],a=0;a - + diff --git a/dist/service-worker.js b/dist/service-worker.js index a850e52..2d20639 100644 --- a/dist/service-worker.js +++ b/dist/service-worker.js @@ -1445,7 +1445,7 @@ function Pe(s = {}) { function Ue(s) { E().setDefaultHandler(s); } -const Le = [{"revision":null,"url":"assets/index-30a95f3f.js"},{"revision":null,"url":"assets/index-4c91dc97.css"},{"revision":null,"url":"assets/workbox-window.prod.es5-a7b12eab.js"},{"revision":"a5bccecb2953d89821e8c46f623d86af","url":"index.html"},{"revision":"b5a23c5265868c4408a6c00464006bd9","url":"offline.html"},{"revision":"d714963bdcfbf8146489804fa260be01","url":"./images/pwa/icon-maskable.png"},{"revision":"786eaaba55a6b62ecaf32cde1bf26873","url":"./images/pwa/icon-72x72.png"},{"revision":"a5437727776908ffc3d7936b1b28161a","url":"./images/pwa/icon-96x96.png"},{"revision":"abb293e81af9411c28587b747a3e76aa","url":"./images/pwa/icon-128x128.png"},{"revision":"9024e4ee398281b05e092bffd80c9642","url":"./images/pwa/icon-144x144.png"},{"revision":"a67f953bad219821ed6ef2eef8df5ca1","url":"./images/pwa/icon-152x152.png"},{"revision":"18d9668e052ec0ccdb5c53ebf6c30f9a","url":"./images/pwa/icon-192x192.png"},{"revision":"48527e6afb57c06834b4c9ca575f9180","url":"./images/pwa/icon-384x384.png"},{"revision":"d714963bdcfbf8146489804fa260be01","url":"./images/pwa/icon-512x512.png"},{"revision":"282be12ad648c51d4d4bab4363491ea5","url":"manifest.webmanifest"}]; +const Le = [{"revision":null,"url":"assets/index-12761de0.js"},{"revision":null,"url":"assets/index-4c91dc97.css"},{"revision":null,"url":"assets/workbox-window.prod.es5-c46a1faa.js"},{"revision":"0d191cf6270a8f6e8b0aee47b52edcfa","url":"index.html"},{"revision":"b5a23c5265868c4408a6c00464006bd9","url":"offline.html"},{"revision":"d714963bdcfbf8146489804fa260be01","url":"./images/pwa/icon-maskable.png"},{"revision":"786eaaba55a6b62ecaf32cde1bf26873","url":"./images/pwa/icon-72x72.png"},{"revision":"a5437727776908ffc3d7936b1b28161a","url":"./images/pwa/icon-96x96.png"},{"revision":"abb293e81af9411c28587b747a3e76aa","url":"./images/pwa/icon-128x128.png"},{"revision":"9024e4ee398281b05e092bffd80c9642","url":"./images/pwa/icon-144x144.png"},{"revision":"a67f953bad219821ed6ef2eef8df5ca1","url":"./images/pwa/icon-152x152.png"},{"revision":"18d9668e052ec0ccdb5c53ebf6c30f9a","url":"./images/pwa/icon-192x192.png"},{"revision":"48527e6afb57c06834b4c9ca575f9180","url":"./images/pwa/icon-384x384.png"},{"revision":"d714963bdcfbf8146489804fa260be01","url":"./images/pwa/icon-512x512.png"},{"revision":"282be12ad648c51d4d4bab4363491ea5","url":"manifest.webmanifest"}]; console.log(Le); Ue(new ne()); z(({ url: s }) => s.host === "optc-db.github.io", new pe());