9remote 0.1.52 → 0.1.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +0,0 @@
1
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const n of r)if(n.type==="childList")for(const s of n.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function o(r){const n={};return r.integrity&&(n.integrity=r.integrity),r.referrerPolicy&&(n.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?n.credentials="include":r.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function i(r){if(r.ep)return;r.ep=!0;const n=o(r);fetch(r.href,n)}})();var ae,R,Vt,O,et,jt,zt,Kt,ze,He,Oe,oe={},ie=[],un=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ce=Array.isArray;function q(e,t){for(var o in t)e[o]=t[o];return e}function Ke(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function fn(e,t,o){var i,r,n,s={};for(n in t)n=="key"?i=t[n]:n=="ref"?r=t[n]:s[n]=t[n];if(arguments.length>2&&(s.children=arguments.length>3?ae.call(arguments,2):o),typeof e=="function"&&e.defaultProps!=null)for(n in e.defaultProps)s[n]===void 0&&(s[n]=e.defaultProps[n]);return te(e,s,i,r,null)}function te(e,t,o,i,r){var n={type:e,props:t,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:r??++Vt,__i:-1,__u:0};return r==null&&R.vnode!=null&&R.vnode(n),n}function X(e){return e.children}function ne(e,t){this.props=e,this.context=t}function Y(e,t){if(t==null)return e.__?Y(e.__,e.__i+1):null;for(var o;t<e.__k.length;t++)if((o=e.__k[t])!=null&&o.__e!=null)return o.__e;return typeof e.type=="function"?Y(e):null}function dn(e){if(e.__P&&e.__d){var t=e.__v,o=t.__e,i=[],r=[],n=q({},t);n.__v=t.__v+1,R.vnode&&R.vnode(n),Je(e.__P,n,t,e.__n,e.__P.namespaceURI,32&t.__u?[o]:null,i,o??Y(t),!!(32&t.__u),r),n.__v=t.__v,n.__.__k[n.__i]=n,Qt(i,n,r),t.__e=t.__=null,n.__e!=o&&Jt(n)}}function Jt(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),Jt(e)}function tt(e){(!e.__d&&(e.__d=!0)&&O.push(e)&&!se.__r++||et!=R.debounceRendering)&&((et=R.debounceRendering)||jt)(se)}function se(){try{for(var e,t=1;O.length;)O.length>t&&O.sort(zt),e=O.shift(),t=O.length,dn(e)}finally{O.length=se.__r=0}}function Yt(e,t,o,i,r,n,s,l,a,u,d){var c,_,f,p,v,T,g,y=i&&i.__k||ie,E=t.length;for(a=_n(o,t,y,a,E),c=0;c<E;c++)(f=o.__k[c])!=null&&(_=f.__i!=-1&&y[f.__i]||oe,f.__i=c,T=Je(e,f,_,r,n,s,l,a,u,d),p=f.__e,f.ref&&_.ref!=f.ref&&(_.ref&&Ye(_.ref,null,f),d.push(f.ref,f.__c||p,f)),v==null&&p!=null&&(v=p),(g=!!(4&f.__u))||_.__k===f.__k?a=Gt(f,a,e,g):typeof f.type=="function"&&T!==void 0?a=T:p&&(a=p.nextSibling),f.__u&=-7);return o.__e=v,a}function _n(e,t,o,i,r){var n,s,l,a,u,d=o.length,c=d,_=0;for(e.__k=new Array(r),n=0;n<r;n++)(s=t[n])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[n]=te(null,s,null,null,null):ce(s)?s=e.__k[n]=te(X,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[n]=te(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[n]=s,a=n+_,s.__=e,s.__b=e.__b+1,l=null,(u=s.__i=hn(s,o,a,c))!=-1&&(c--,(l=o[u])&&(l.__u|=2)),l==null||l.__v==null?(u==-1&&(r>d?_--:r<d&&_++),typeof s.type!="function"&&(s.__u|=4)):u!=a&&(u==a-1?_--:u==a+1?_++:(u>a?_--:_++,s.__u|=4))):e.__k[n]=null;if(c)for(n=0;n<d;n++)(l=o[n])!=null&&(2&l.__u)==0&&(l.__e==i&&(i=Y(l)),Xt(l,l));return i}function Gt(e,t,o,i){var r,n;if(typeof e.type=="function"){for(r=e.__k,n=0;r&&n<r.length;n++)r[n]&&(r[n].__=e,t=Gt(r[n],t,o,i));return t}e.__e!=t&&(i&&(t&&e.type&&!t.parentNode&&(t=Y(e)),o.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function hn(e,t,o,i){var r,n,s,l=e.key,a=e.type,u=t[o],d=u!=null&&(2&u.__u)==0;if(u===null&&l==null||d&&l==u.key&&a==u.type)return o;if(i>(d?1:0)){for(r=o-1,n=o+1;r>=0||n<t.length;)if((u=t[s=r>=0?r--:n++])!=null&&(2&u.__u)==0&&l==u.key&&a==u.type)return s}return-1}function nt(e,t,o){t[0]=="-"?e.setProperty(t,o??""):e[t]=o==null?"":typeof o!="number"||un.test(t)?o:o+"px"}function $(e,t,o,i,r){var n,s;e:if(t=="style")if(typeof o=="string")e.style.cssText=o;else{if(typeof i=="string"&&(e.style.cssText=i=""),i)for(t in i)o&&t in o||nt(e.style,t,"");if(o)for(t in o)i&&o[t]==i[t]||nt(e.style,t,o[t])}else if(t[0]=="o"&&t[1]=="n")n=t!=(t=t.replace(Kt,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+n]=o,o?i?o.u=i.u:(o.u=ze,e.addEventListener(t,n?Oe:He,n)):e.removeEventListener(t,n?Oe:He,n);else{if(r=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=o??"";break e}catch{}typeof o=="function"||(o==null||o===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&o==1?"":o))}}function rt(e){return function(t){if(this.l){var o=this.l[t.type+e];if(t.t==null)t.t=ze++;else if(t.t<o.u)return;return o(R.event?R.event(t):t)}}}function Je(e,t,o,i,r,n,s,l,a,u){var d,c,_,f,p,v,T,g,y,E,b,k,w,C,N,m=t.type;if(t.constructor!==void 0)return null;128&o.__u&&(a=!!(32&o.__u),n=[l=t.__e=o.__e]),(d=R.__b)&&d(t);e:if(typeof m=="function")try{if(g=t.props,y=m.prototype&&m.prototype.render,E=(d=m.contextType)&&i[d.__c],b=d?E?E.props.value:d.__:i,o.__c?T=(c=t.__c=o.__c).__=c.__E:(y?t.__c=c=new m(g,b):(t.__c=c=new ne(g,b),c.constructor=m,c.render=mn),E&&E.sub(c),c.state||(c.state={}),c.__n=i,_=c.__d=!0,c.__h=[],c._sb=[]),y&&c.__s==null&&(c.__s=c.state),y&&m.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=q({},c.__s)),q(c.__s,m.getDerivedStateFromProps(g,c.__s))),f=c.props,p=c.state,c.__v=t,_)y&&m.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),y&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(y&&m.getDerivedStateFromProps==null&&g!==f&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(g,b),t.__v==o.__v||!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(g,c.__s,b)===!1){t.__v!=o.__v&&(c.props=g,c.state=c.__s,c.__d=!1),t.__e=o.__e,t.__k=o.__k,t.__k.some(function(x){x&&(x.__=t)}),ie.push.apply(c.__h,c._sb),c._sb=[],c.__h.length&&s.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(g,c.__s,b),y&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(f,p,v)})}if(c.context=b,c.props=g,c.__P=e,c.__e=!1,k=R.__r,w=0,y)c.state=c.__s,c.__d=!1,k&&k(t),d=c.render(c.props,c.state,c.context),ie.push.apply(c.__h,c._sb),c._sb=[];else do c.__d=!1,k&&k(t),d=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++w<25);c.state=c.__s,c.getChildContext!=null&&(i=q(q({},i),c.getChildContext())),y&&!_&&c.getSnapshotBeforeUpdate!=null&&(v=c.getSnapshotBeforeUpdate(f,p)),C=d!=null&&d.type===X&&d.key==null?Wt(d.props.children):d,l=Yt(e,ce(C)?C:[C],t,o,i,r,n,s,l,a,u),c.base=t.__e,t.__u&=-161,c.__h.length&&s.push(c),T&&(c.__E=c.__=null)}catch(x){if(t.__v=null,a||n!=null)if(x.then){for(t.__u|=a?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;n[n.indexOf(l)]=null,t.__e=l}else{for(N=n.length;N--;)Ke(n[N]);Ve(t)}else t.__e=o.__e,t.__k=o.__k,x.then||Ve(t);R.__e(x,t,o)}else n==null&&t.__v==o.__v?(t.__k=o.__k,t.__e=o.__e):l=t.__e=gn(o.__e,t,o,i,r,n,s,a,u);return(d=R.diffed)&&d(t),128&t.__u?void 0:l}function Ve(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Ve))}function Qt(e,t,o){for(var i=0;i<o.length;i++)Ye(o[i],o[++i],o[++i]);R.__c&&R.__c(t,e),e.some(function(r){try{e=r.__h,r.__h=[],e.some(function(n){n.call(r)})}catch(n){R.__e(n,r.__v)}})}function Wt(e){return typeof e!="object"||e==null||e.__b>0?e:ce(e)?e.map(Wt):q({},e)}function gn(e,t,o,i,r,n,s,l,a){var u,d,c,_,f,p,v,T=o.props||oe,g=t.props,y=t.type;if(y=="svg"?r="http://www.w3.org/2000/svg":y=="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),n!=null){for(u=0;u<n.length;u++)if((f=n[u])&&"setAttribute"in f==!!y&&(y?f.localName==y:f.nodeType==3)){e=f,n[u]=null;break}}if(e==null){if(y==null)return document.createTextNode(g);e=document.createElementNS(r,y,g.is&&g),l&&(R.__m&&R.__m(t,n),l=!1),n=null}if(y==null)T===g||l&&e.data==g||(e.data=g);else{if(n=n&&ae.call(e.childNodes),!l&&n!=null)for(T={},u=0;u<e.attributes.length;u++)T[(f=e.attributes[u]).name]=f.value;for(u in T)f=T[u],u=="dangerouslySetInnerHTML"?c=f:u=="children"||u in g||u=="value"&&"defaultValue"in g||u=="checked"&&"defaultChecked"in g||$(e,u,null,f,r);for(u in g)f=g[u],u=="children"?_=f:u=="dangerouslySetInnerHTML"?d=f:u=="value"?p=f:u=="checked"?v=f:l&&typeof f!="function"||T[u]===f||$(e,u,f,T[u],r);if(d)l||c&&(d.__html==c.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(c&&(e.innerHTML=""),Yt(t.type=="template"?e.content:e,ce(_)?_:[_],t,o,i,y=="foreignObject"?"http://www.w3.org/1999/xhtml":r,n,s,n?n[0]:o.__k&&Y(o,0),l,a),n!=null)for(u=n.length;u--;)Ke(n[u]);l||(u="value",y=="progress"&&p==null?e.removeAttribute("value"):p!=null&&(p!==e[u]||y=="progress"&&!p||y=="option"&&p!=T[u])&&$(e,u,p,T[u],r),u="checked",v!=null&&v!=e[u]&&$(e,u,v,T[u],r))}return e}function Ye(e,t,o){try{if(typeof e=="function"){var i=typeof e.__u=="function";i&&e.__u(),i&&t==null||(e.__u=e(t))}else e.current=t}catch(r){R.__e(r,o)}}function Xt(e,t,o){var i,r;if(R.unmount&&R.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||Ye(i,null,t)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){R.__e(n,t)}i.base=i.__P=null}if(i=e.__k)for(r=0;r<i.length;r++)i[r]&&Xt(i[r],t,o||typeof e.type!="function");o||Ke(e.__e),e.__c=e.__=e.__e=void 0}function mn(e,t,o){return this.constructor(e,o)}function pn(e,t,o){var i,r,n,s;t==document&&(t=document.documentElement),R.__&&R.__(e,t),r=(i=!1)?null:t.__k,n=[],s=[],Je(t,e=t.__k=fn(X,null,[e]),r||oe,oe,t.namespaceURI,r?null:t.firstChild?ae.call(t.childNodes):null,n,r?r.__e:t.firstChild,i,s),Qt(n,e,s)}ae=ie.slice,R={__e:function(e,t,o,i){for(var r,n,s;t=t.__;)if((r=t.__c)&&!r.__)try{if((n=r.constructor)&&n.getDerivedStateFromError!=null&&(r.setState(n.getDerivedStateFromError(e)),s=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(e,i||{}),s=r.__d),s)return r.__E=r}catch(l){e=l}throw e}},Vt=0,ne.prototype.setState=function(e,t){var o;o=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=q({},this.state),typeof e=="function"&&(e=e(q({},o),this.props)),e&&q(o,e),e!=null&&this.__v&&(t&&this._sb.push(t),tt(this))},ne.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),tt(this))},ne.prototype.render=X,O=[],jt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,zt=function(e,t){return e.__v.__b-t.__v.__b},se.__r=0,Kt=/(PointerCapture)$|Capture$/i,ze=0,He=rt(!1),Oe=rt(!0);var yn=0;function h(e,t,o,i,r,n){t||(t={});var s,l,a=t;if("ref"in a)for(l in a={},t)l=="ref"?s=t[l]:a[l]=t[l];var u={type:e,props:a,key:o,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--yn,__i:-1,__u:0,__source:r,__self:n};if(typeof e=="function"&&(s=e.defaultProps))for(l in s)a[l]===void 0&&(a[l]=s[l]);return R.vnode&&R.vnode(u),u}var W,M,he,ot,le=0,Zt=[],I=R,it=I.__b,st=I.__r,lt=I.diffed,at=I.__c,ct=I.unmount,ut=I.__;function Ge(e,t){I.__h&&I.__h(M,e,le||t),le=0;var o=M.__H||(M.__H={__:[],__h:[]});return e>=o.__.length&&o.__.push({}),o.__[e]}function J(e){return le=1,wn(tn,e)}function wn(e,t,o){var i=Ge(W++,2);if(i.t=e,!i.__c&&(i.__=[tn(void 0,t),function(l){var a=i.__N?i.__N[0]:i.__[0],u=i.t(a,l);a!==u&&(i.__N=[u,i.__[1]],i.__c.setState({}))}],i.__c=M,!M.__f)){var r=function(l,a,u){if(!i.__c.__H)return!0;var d=i.__c.__H.__.filter(function(_){return _.__c});if(d.every(function(_){return!_.__N}))return!n||n.call(this,l,a,u);var c=i.__c.props!==l;return d.some(function(_){if(_.__N){var f=_.__[0];_.__=_.__N,_.__N=void 0,f!==_.__[0]&&(c=!0)}}),n&&n.call(this,l,a,u)||c};M.__f=!0;var n=M.shouldComponentUpdate,s=M.componentWillUpdate;M.componentWillUpdate=function(l,a,u){if(this.__e){var d=n;n=void 0,r(l,a,u),n=d}s&&s.call(this,l,a,u)},M.shouldComponentUpdate=r}return i.__N||i.__}function Qe(e,t){var o=Ge(W++,3);!I.__s&&en(o.__H,t)&&(o.__=e,o.u=t,M.__H.__h.push(o))}function $t(e){return le=5,vn(function(){return{current:e}},[])}function vn(e,t){var o=Ge(W++,7);return en(o.__H,t)&&(o.__=e(),o.__H=t,o.__h=e),o.__}function bn(){for(var e;e=Zt.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(re),t.__h.some(je),t.__h=[]}catch(o){t.__h=[],I.__e(o,e.__v)}}}I.__b=function(e){M=null,it&&it(e)},I.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ut&&ut(e,t)},I.__r=function(e){st&&st(e),W=0;var t=(M=e.__c).__H;t&&(he===M?(t.__h=[],M.__h=[],t.__.some(function(o){o.__N&&(o.__=o.__N),o.u=o.__N=void 0})):(t.__h.some(re),t.__h.some(je),t.__h=[],W=0)),he=M},I.diffed=function(e){lt&&lt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Zt.push(t)!==1&&ot===I.requestAnimationFrame||((ot=I.requestAnimationFrame)||Cn)(bn)),t.__H.__.some(function(o){o.u&&(o.__H=o.u),o.u=void 0})),he=M=null},I.__c=function(e,t){t.some(function(o){try{o.__h.some(re),o.__h=o.__h.filter(function(i){return!i.__||je(i)})}catch(i){t.some(function(r){r.__h&&(r.__h=[])}),t=[],I.__e(i,o.__v)}}),at&&at(e,t)},I.unmount=function(e){ct&&ct(e);var t,o=e.__c;o&&o.__H&&(o.__H.__.some(function(i){try{re(i)}catch(r){t=r}}),o.__H=void 0,t&&I.__e(t,o.__v))};var ft=typeof requestAnimationFrame=="function";function Cn(e){var t,o=function(){clearTimeout(i),ft&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(o,35);ft&&(t=requestAnimationFrame(o))}function re(e){var t=M,o=e.__c;typeof o=="function"&&(e.__c=void 0,o()),M=t}function je(e){var t=M;e.__c=e.__(),M=t}function en(e,t){return!e||e.length!==t.length||t.some(function(o,i){return o!==e[i]})}function tn(e,t){return typeof t=="function"?t(e):t}const dt=["play_arrow","lan","verified_user","check_circle"];function Nn({currentStep:e,steps:t}){const o=Math.round(e/(t.length-1)*100);return h("div",{className:"glass-card p-4",children:[h("div",{className:"flex items-center justify-between mb-3",children:[h("span",{className:"text-xs text-white/50 font-medium uppercase tracking-wider",children:"Progress"}),h("span",{className:"text-xs font-semibold",style:{color:"var(--brand-500)"},children:[o,"%"]})]}),h("div",{className:"relative flex items-center justify-between",children:[h("div",{className:"absolute left-0 right-0 top-1/2 -translate-y-1/2 h-px bg-white/10 mx-5"}),h("div",{className:"absolute left-5 top-1/2 -translate-y-1/2 h-px transition-all duration-700",style:{background:"var(--brand-500)",width:`calc(${o}% - 40px)`}}),t.map((i,r)=>{const n=r<e,s=r===e;return h("div",{className:"relative flex flex-col items-center gap-1.5 z-10",children:[h("div",{className:"relative flex items-center justify-center w-8 h-8 rounded-full",children:[s&&h("div",{className:"absolute inset-0 rounded-full pulse-ring",style:{background:"rgba(255,87,10,0.3)"}}),h("div",{className:`w-8 h-8 rounded-full flex items-center justify-center ${n||s?"":"bg-white/10"}`,style:n||s?{background:"var(--brand-500)"}:{},children:n?h("span",{className:"material-symbols-outlined text-white text-sm",children:"check"}):s?h("span",{className:"material-symbols-outlined text-white text-sm spin",children:dt[r]}):h("span",{className:"material-symbols-outlined text-white/30 text-sm",children:dt[r]})})]}),h("span",{className:`text-xs font-medium whitespace-nowrap ${s?"text-white":"text-white/30"}`,style:n?{color:"var(--brand-400)"}:{},children:i})]},r)})]})]})}function En(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var K={},ge,_t;function xn(){return _t||(_t=1,ge=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),ge}var me={},H={},ht;function V(){if(ht)return H;ht=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return H.getSymbolSize=function(i){if(!i)throw new Error('"version" cannot be null or undefined');if(i<1||i>40)throw new Error('"version" should be in range from 1 to 40');return i*4+17},H.getSymbolTotalCodewords=function(i){return t[i]},H.getBCHDigit=function(o){let i=0;for(;o!==0;)i++,o>>>=1;return i},H.setToSJISFunction=function(i){if(typeof i!="function")throw new Error('"toSJISFunc" is not a valid function.');e=i},H.isKanjiModeEnabled=function(){return typeof e<"u"},H.toSJIS=function(i){return e(i)},H}var pe={},gt;function We(){return gt||(gt=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+o)}}e.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},e.from=function(i,r){if(e.isValid(i))return i;try{return t(i)}catch{return r}}})(pe)),pe}var ye,mt;function Bn(){if(mt)return ye;mt=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const o=Math.floor(t/8);return(this.buffer[o]>>>7-t%8&1)===1},put:function(t,o){for(let i=0;i<o;i++)this.putBit((t>>>o-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const o=Math.floor(this.length/8);this.buffer.length<=o&&this.buffer.push(0),t&&(this.buffer[o]|=128>>>this.length%8),this.length++}},ye=e,ye}var we,pt;function Sn(){if(pt)return we;pt=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,o,i,r){const n=t*this.size+o;this.data[n]=i,r&&(this.reservedBit[n]=!0)},e.prototype.get=function(t,o){return this.data[t*this.size+o]},e.prototype.xor=function(t,o,i){this.data[t*this.size+o]^=i},e.prototype.isReserved=function(t,o){return this.reservedBit[t*this.size+o]},we=e,we}var ve={},yt;function Pn(){return yt||(yt=1,(function(e){const t=V().getSymbolSize;e.getRowColCoords=function(i){if(i===1)return[];const r=Math.floor(i/7)+2,n=t(i),s=n===145?26:Math.ceil((n-13)/(2*r-2))*2,l=[n-7];for(let a=1;a<r-1;a++)l[a]=l[a-1]-s;return l.push(6),l.reverse()},e.getPositions=function(i){const r=[],n=e.getRowColCoords(i),s=n.length;for(let l=0;l<s;l++)for(let a=0;a<s;a++)l===0&&a===0||l===0&&a===s-1||l===s-1&&a===0||r.push([n[l],n[a]]);return r}})(ve)),ve}var be={},wt;function Tn(){if(wt)return be;wt=1;const e=V().getSymbolSize,t=7;return be.getPositions=function(i){const r=e(i);return[[0,0],[r-t,0],[0,r-t]]},be}var Ce={},vt;function An(){return vt||(vt=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(r){return r!=null&&r!==""&&!isNaN(r)&&r>=0&&r<=7},e.from=function(r){return e.isValid(r)?parseInt(r,10):void 0},e.getPenaltyN1=function(r){const n=r.size;let s=0,l=0,a=0,u=null,d=null;for(let c=0;c<n;c++){l=a=0,u=d=null;for(let _=0;_<n;_++){let f=r.get(c,_);f===u?l++:(l>=5&&(s+=t.N1+(l-5)),u=f,l=1),f=r.get(_,c),f===d?a++:(a>=5&&(s+=t.N1+(a-5)),d=f,a=1)}l>=5&&(s+=t.N1+(l-5)),a>=5&&(s+=t.N1+(a-5))}return s},e.getPenaltyN2=function(r){const n=r.size;let s=0;for(let l=0;l<n-1;l++)for(let a=0;a<n-1;a++){const u=r.get(l,a)+r.get(l,a+1)+r.get(l+1,a)+r.get(l+1,a+1);(u===4||u===0)&&s++}return s*t.N2},e.getPenaltyN3=function(r){const n=r.size;let s=0,l=0,a=0;for(let u=0;u<n;u++){l=a=0;for(let d=0;d<n;d++)l=l<<1&2047|r.get(u,d),d>=10&&(l===1488||l===93)&&s++,a=a<<1&2047|r.get(d,u),d>=10&&(a===1488||a===93)&&s++}return s*t.N3},e.getPenaltyN4=function(r){let n=0;const s=r.data.length;for(let a=0;a<s;a++)n+=r.data[a];return Math.abs(Math.ceil(n*100/s/5)-10)*t.N4};function o(i,r,n){switch(i){case e.Patterns.PATTERN000:return(r+n)%2===0;case e.Patterns.PATTERN001:return r%2===0;case e.Patterns.PATTERN010:return n%3===0;case e.Patterns.PATTERN011:return(r+n)%3===0;case e.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(n/3))%2===0;case e.Patterns.PATTERN101:return r*n%2+r*n%3===0;case e.Patterns.PATTERN110:return(r*n%2+r*n%3)%2===0;case e.Patterns.PATTERN111:return(r*n%3+(r+n)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}e.applyMask=function(r,n){const s=n.size;for(let l=0;l<s;l++)for(let a=0;a<s;a++)n.isReserved(a,l)||n.xor(a,l,o(r,a,l))},e.getBestMask=function(r,n){const s=Object.keys(e.Patterns).length;let l=0,a=1/0;for(let u=0;u<s;u++){n(u),e.applyMask(u,r);const d=e.getPenaltyN1(r)+e.getPenaltyN2(r)+e.getPenaltyN3(r)+e.getPenaltyN4(r);e.applyMask(u,r),d<a&&(a=d,l=u)}return l}})(Ce)),Ce}var ee={},bt;function nn(){if(bt)return ee;bt=1;const e=We(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return ee.getBlocksCount=function(r,n){switch(n){case e.L:return t[(r-1)*4+0];case e.M:return t[(r-1)*4+1];case e.Q:return t[(r-1)*4+2];case e.H:return t[(r-1)*4+3];default:return}},ee.getTotalCodewordsCount=function(r,n){switch(n){case e.L:return o[(r-1)*4+0];case e.M:return o[(r-1)*4+1];case e.Q:return o[(r-1)*4+2];case e.H:return o[(r-1)*4+3];default:return}},ee}var Ne={},Q={},Ct;function Rn(){if(Ct)return Q;Ct=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let i=1;for(let r=0;r<255;r++)e[r]=i,t[i]=r,i<<=1,i&256&&(i^=285);for(let r=255;r<512;r++)e[r]=e[r-255]})(),Q.log=function(i){if(i<1)throw new Error("log("+i+")");return t[i]},Q.exp=function(i){return e[i]},Q.mul=function(i,r){return i===0||r===0?0:e[t[i]+t[r]]},Q}var Nt;function kn(){return Nt||(Nt=1,(function(e){const t=Rn();e.mul=function(i,r){const n=new Uint8Array(i.length+r.length-1);for(let s=0;s<i.length;s++)for(let l=0;l<r.length;l++)n[s+l]^=t.mul(i[s],r[l]);return n},e.mod=function(i,r){let n=new Uint8Array(i);for(;n.length-r.length>=0;){const s=n[0];for(let a=0;a<r.length;a++)n[a]^=t.mul(r[a],s);let l=0;for(;l<n.length&&n[l]===0;)l++;n=n.slice(l)}return n},e.generateECPolynomial=function(i){let r=new Uint8Array([1]);for(let n=0;n<i;n++)r=e.mul(r,new Uint8Array([1,t.exp(n)]));return r}})(Ne)),Ne}var Ee,Et;function Mn(){if(Et)return Ee;Et=1;const e=kn();function t(o){this.genPoly=void 0,this.degree=o,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(i){this.degree=i,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(i){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(i.length+this.degree);r.set(i);const n=e.mod(r,this.genPoly),s=this.degree-n.length;if(s>0){const l=new Uint8Array(this.degree);return l.set(n,s),l}return n},Ee=t,Ee}var xe={},Be={},Se={},xt;function rn(){return xt||(xt=1,Se.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Se}var L={},Bt;function on(){if(Bt)return L;Bt=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let o="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";o=o.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+o+`)(?:.|[\r
2
- ]))+`;L.KANJI=new RegExp(o,"g"),L.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),L.BYTE=new RegExp(i,"g"),L.NUMERIC=new RegExp(e,"g"),L.ALPHANUMERIC=new RegExp(t,"g");const r=new RegExp("^"+o+"$"),n=new RegExp("^"+e+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return L.testKanji=function(a){return r.test(a)},L.testNumeric=function(a){return n.test(a)},L.testAlphanumeric=function(a){return s.test(a)},L}var St;function j(){return St||(St=1,(function(e){const t=rn(),o=on();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(n,s){if(!n.ccBits)throw new Error("Invalid mode: "+n);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?n.ccBits[0]:s<27?n.ccBits[1]:n.ccBits[2]},e.getBestModeForData=function(n){return o.testNumeric(n)?e.NUMERIC:o.testAlphanumeric(n)?e.ALPHANUMERIC:o.testKanji(n)?e.KANJI:e.BYTE},e.toString=function(n){if(n&&n.id)return n.id;throw new Error("Invalid mode")},e.isValid=function(n){return n&&n.bit&&n.ccBits};function i(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+r)}}e.from=function(n,s){if(e.isValid(n))return n;try{return i(n)}catch{return s}}})(Be)),Be}var Pt;function In(){return Pt||(Pt=1,(function(e){const t=V(),o=nn(),i=We(),r=j(),n=rn(),s=7973,l=t.getBCHDigit(s);function a(_,f,p){for(let v=1;v<=40;v++)if(f<=e.getCapacity(v,p,_))return v}function u(_,f){return r.getCharCountIndicator(_,f)+4}function d(_,f){let p=0;return _.forEach(function(v){const T=u(v.mode,f);p+=T+v.getBitsLength()}),p}function c(_,f){for(let p=1;p<=40;p++)if(d(_,p)<=e.getCapacity(p,f,r.MIXED))return p}e.from=function(f,p){return n.isValid(f)?parseInt(f,10):p},e.getCapacity=function(f,p,v){if(!n.isValid(f))throw new Error("Invalid QR Code version");typeof v>"u"&&(v=r.BYTE);const T=t.getSymbolTotalCodewords(f),g=o.getTotalCodewordsCount(f,p),y=(T-g)*8;if(v===r.MIXED)return y;const E=y-u(v,f);switch(v){case r.NUMERIC:return Math.floor(E/10*3);case r.ALPHANUMERIC:return Math.floor(E/11*2);case r.KANJI:return Math.floor(E/13);case r.BYTE:default:return Math.floor(E/8)}},e.getBestVersionForData=function(f,p){let v;const T=i.from(p,i.M);if(Array.isArray(f)){if(f.length>1)return c(f,T);if(f.length===0)return 1;v=f[0]}else v=f;return a(v.mode,v.getLength(),T)},e.getEncodedBits=function(f){if(!n.isValid(f)||f<7)throw new Error("Invalid QR Code version");let p=f<<12;for(;t.getBCHDigit(p)-l>=0;)p^=s<<t.getBCHDigit(p)-l;return f<<12|p}})(xe)),xe}var Pe={},Tt;function Ln(){if(Tt)return Pe;Tt=1;const e=V(),t=1335,o=21522,i=e.getBCHDigit(t);return Pe.getEncodedBits=function(n,s){const l=n.bit<<3|s;let a=l<<10;for(;e.getBCHDigit(a)-i>=0;)a^=t<<e.getBCHDigit(a)-i;return(l<<10|a)^o},Pe}var Te={},Ae,At;function Un(){if(At)return Ae;At=1;const e=j();function t(o){this.mode=e.NUMERIC,this.data=o.toString()}return t.getBitsLength=function(i){return 10*Math.floor(i/3)+(i%3?i%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(i){let r,n,s;for(r=0;r+3<=this.data.length;r+=3)n=this.data.substr(r,3),s=parseInt(n,10),i.put(s,10);const l=this.data.length-r;l>0&&(n=this.data.substr(r),s=parseInt(n,10),i.put(s,l*3+1))},Ae=t,Ae}var Re,Rt;function Dn(){if(Rt)return Re;Rt=1;const e=j(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(i){this.mode=e.ALPHANUMERIC,this.data=i}return o.getBitsLength=function(r){return 11*Math.floor(r/2)+6*(r%2)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(r){let n;for(n=0;n+2<=this.data.length;n+=2){let s=t.indexOf(this.data[n])*45;s+=t.indexOf(this.data[n+1]),r.put(s,11)}this.data.length%2&&r.put(t.indexOf(this.data[n]),6)},Re=o,Re}var ke,kt;function qn(){if(kt)return ke;kt=1;const e=j();function t(o){this.mode=e.BYTE,typeof o=="string"?this.data=new TextEncoder().encode(o):this.data=new Uint8Array(o)}return t.getBitsLength=function(i){return i*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(o){for(let i=0,r=this.data.length;i<r;i++)o.put(this.data[i],8)},ke=t,ke}var Me,Mt;function Fn(){if(Mt)return Me;Mt=1;const e=j(),t=V();function o(i){this.mode=e.KANJI,this.data=i}return o.getBitsLength=function(r){return r*13},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(i){let r;for(r=0;r<this.data.length;r++){let n=t.toSJIS(this.data[r]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[r]+`
3
- Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),i.put(n,13)}},Me=o,Me}var Ie={exports:{}},It;function Hn(){return It||(It=1,(function(e){var t={single_source_shortest_paths:function(o,i,r){var n={},s={};s[i]=0;var l=t.PriorityQueue.make();l.push(i,0);for(var a,u,d,c,_,f,p,v,T;!l.empty();){a=l.pop(),u=a.value,c=a.cost,_=o[u]||{};for(d in _)_.hasOwnProperty(d)&&(f=_[d],p=c+f,v=s[d],T=typeof s[d]>"u",(T||v>p)&&(s[d]=p,l.push(d,p),n[d]=u))}if(typeof r<"u"&&typeof s[r]>"u"){var g=["Could not find a path from ",i," to ",r,"."].join("");throw new Error(g)}return n},extract_shortest_path_from_predecessor_list:function(o,i){for(var r=[],n=i;n;)r.push(n),o[n],n=o[n];return r.reverse(),r},find_path:function(o,i,r){var n=t.single_source_shortest_paths(o,i,r);return t.extract_shortest_path_from_predecessor_list(n,r)},PriorityQueue:{make:function(o){var i=t.PriorityQueue,r={},n;o=o||{};for(n in i)i.hasOwnProperty(n)&&(r[n]=i[n]);return r.queue=[],r.sorter=o.sorter||i.default_sorter,r},default_sorter:function(o,i){return o.cost-i.cost},push:function(o,i){var r={value:o,cost:i};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Ie)),Ie.exports}var Lt;function On(){return Lt||(Lt=1,(function(e){const t=j(),o=Un(),i=Dn(),r=qn(),n=Fn(),s=on(),l=V(),a=Hn();function u(g){return unescape(encodeURIComponent(g)).length}function d(g,y,E){const b=[];let k;for(;(k=g.exec(E))!==null;)b.push({data:k[0],index:k.index,mode:y,length:k[0].length});return b}function c(g){const y=d(s.NUMERIC,t.NUMERIC,g),E=d(s.ALPHANUMERIC,t.ALPHANUMERIC,g);let b,k;return l.isKanjiModeEnabled()?(b=d(s.BYTE,t.BYTE,g),k=d(s.KANJI,t.KANJI,g)):(b=d(s.BYTE_KANJI,t.BYTE,g),k=[]),y.concat(E,b,k).sort(function(C,N){return C.index-N.index}).map(function(C){return{data:C.data,mode:C.mode,length:C.length}})}function _(g,y){switch(y){case t.NUMERIC:return o.getBitsLength(g);case t.ALPHANUMERIC:return i.getBitsLength(g);case t.KANJI:return n.getBitsLength(g);case t.BYTE:return r.getBitsLength(g)}}function f(g){return g.reduce(function(y,E){const b=y.length-1>=0?y[y.length-1]:null;return b&&b.mode===E.mode?(y[y.length-1].data+=E.data,y):(y.push(E),y)},[])}function p(g){const y=[];for(let E=0;E<g.length;E++){const b=g[E];switch(b.mode){case t.NUMERIC:y.push([b,{data:b.data,mode:t.ALPHANUMERIC,length:b.length},{data:b.data,mode:t.BYTE,length:b.length}]);break;case t.ALPHANUMERIC:y.push([b,{data:b.data,mode:t.BYTE,length:b.length}]);break;case t.KANJI:y.push([b,{data:b.data,mode:t.BYTE,length:u(b.data)}]);break;case t.BYTE:y.push([{data:b.data,mode:t.BYTE,length:u(b.data)}])}}return y}function v(g,y){const E={},b={start:{}};let k=["start"];for(let w=0;w<g.length;w++){const C=g[w],N=[];for(let m=0;m<C.length;m++){const x=C[m],B=""+w+m;N.push(B),E[B]={node:x,lastCount:0},b[B]={};for(let P=0;P<k.length;P++){const S=k[P];E[S]&&E[S].node.mode===x.mode?(b[S][B]=_(E[S].lastCount+x.length,x.mode)-_(E[S].lastCount,x.mode),E[S].lastCount+=x.length):(E[S]&&(E[S].lastCount=x.length),b[S][B]=_(x.length,x.mode)+4+t.getCharCountIndicator(x.mode,y))}}k=N}for(let w=0;w<k.length;w++)b[k[w]].end=0;return{map:b,table:E}}function T(g,y){let E;const b=t.getBestModeForData(g);if(E=t.from(y,b),E!==t.BYTE&&E.bit<b.bit)throw new Error('"'+g+'" cannot be encoded with mode '+t.toString(E)+`.
4
- Suggested mode is: `+t.toString(b));switch(E===t.KANJI&&!l.isKanjiModeEnabled()&&(E=t.BYTE),E){case t.NUMERIC:return new o(g);case t.ALPHANUMERIC:return new i(g);case t.KANJI:return new n(g);case t.BYTE:return new r(g)}}e.fromArray=function(y){return y.reduce(function(E,b){return typeof b=="string"?E.push(T(b,null)):b.data&&E.push(T(b.data,b.mode)),E},[])},e.fromString=function(y,E){const b=c(y,l.isKanjiModeEnabled()),k=p(b),w=v(k,E),C=a.find_path(w.map,"start","end"),N=[];for(let m=1;m<C.length-1;m++)N.push(w.table[C[m]].node);return e.fromArray(f(N))},e.rawSplit=function(y){return e.fromArray(c(y,l.isKanjiModeEnabled()))}})(Te)),Te}var Ut;function Vn(){if(Ut)return me;Ut=1;const e=V(),t=We(),o=Bn(),i=Sn(),r=Pn(),n=Tn(),s=An(),l=nn(),a=Mn(),u=In(),d=Ln(),c=j(),_=On();function f(w,C){const N=w.size,m=n.getPositions(C);for(let x=0;x<m.length;x++){const B=m[x][0],P=m[x][1];for(let S=-1;S<=7;S++)if(!(B+S<=-1||N<=B+S))for(let A=-1;A<=7;A++)P+A<=-1||N<=P+A||(S>=0&&S<=6&&(A===0||A===6)||A>=0&&A<=6&&(S===0||S===6)||S>=2&&S<=4&&A>=2&&A<=4?w.set(B+S,P+A,!0,!0):w.set(B+S,P+A,!1,!0))}}function p(w){const C=w.size;for(let N=8;N<C-8;N++){const m=N%2===0;w.set(N,6,m,!0),w.set(6,N,m,!0)}}function v(w,C){const N=r.getPositions(C);for(let m=0;m<N.length;m++){const x=N[m][0],B=N[m][1];for(let P=-2;P<=2;P++)for(let S=-2;S<=2;S++)P===-2||P===2||S===-2||S===2||P===0&&S===0?w.set(x+P,B+S,!0,!0):w.set(x+P,B+S,!1,!0)}}function T(w,C){const N=w.size,m=u.getEncodedBits(C);let x,B,P;for(let S=0;S<18;S++)x=Math.floor(S/3),B=S%3+N-8-3,P=(m>>S&1)===1,w.set(x,B,P,!0),w.set(B,x,P,!0)}function g(w,C,N){const m=w.size,x=d.getEncodedBits(C,N);let B,P;for(B=0;B<15;B++)P=(x>>B&1)===1,B<6?w.set(B,8,P,!0):B<8?w.set(B+1,8,P,!0):w.set(m-15+B,8,P,!0),B<8?w.set(8,m-B-1,P,!0):B<9?w.set(8,15-B-1+1,P,!0):w.set(8,15-B-1,P,!0);w.set(m-8,8,1,!0)}function y(w,C){const N=w.size;let m=-1,x=N-1,B=7,P=0;for(let S=N-1;S>0;S-=2)for(S===6&&S--;;){for(let A=0;A<2;A++)if(!w.isReserved(x,S-A)){let F=!1;P<C.length&&(F=(C[P]>>>B&1)===1),w.set(x,S-A,F),B--,B===-1&&(P++,B=7)}if(x+=m,x<0||N<=x){x-=m,m=-m;break}}}function E(w,C,N){const m=new o;N.forEach(function(A){m.put(A.mode.bit,4),m.put(A.getLength(),c.getCharCountIndicator(A.mode,w)),A.write(m)});const x=e.getSymbolTotalCodewords(w),B=l.getTotalCodewordsCount(w,C),P=(x-B)*8;for(m.getLengthInBits()+4<=P&&m.put(0,4);m.getLengthInBits()%8!==0;)m.putBit(0);const S=(P-m.getLengthInBits())/8;for(let A=0;A<S;A++)m.put(A%2?17:236,8);return b(m,w,C)}function b(w,C,N){const m=e.getSymbolTotalCodewords(C),x=l.getTotalCodewordsCount(C,N),B=m-x,P=l.getBlocksCount(C,N),S=m%P,A=P-S,F=Math.floor(m/P),G=Math.floor(B/P),ln=G+1,Xe=F-G,an=new a(Xe);let ue=0;const Z=new Array(P),Ze=new Array(P);let fe=0;const cn=new Uint8Array(w.buffer);for(let z=0;z<P;z++){const _e=z<A?G:ln;Z[z]=cn.slice(ue,ue+_e),Ze[z]=an.encode(Z[z]),ue+=_e,fe=Math.max(fe,_e)}const de=new Uint8Array(m);let $e=0,U,D;for(U=0;U<fe;U++)for(D=0;D<P;D++)U<Z[D].length&&(de[$e++]=Z[D][U]);for(U=0;U<Xe;U++)for(D=0;D<P;D++)de[$e++]=Ze[D][U];return de}function k(w,C,N,m){let x;if(Array.isArray(w))x=_.fromArray(w);else if(typeof w=="string"){let F=C;if(!F){const G=_.rawSplit(w);F=u.getBestVersionForData(G,N)}x=_.fromString(w,F||40)}else throw new Error("Invalid data");const B=u.getBestVersionForData(x,N);if(!B)throw new Error("The amount of data is too big to be stored in a QR Code");if(!C)C=B;else if(C<B)throw new Error(`
5
- The chosen QR Code version cannot contain this amount of data.
6
- Minimum version required to store current data is: `+B+`.
7
- `);const P=E(C,N,x),S=e.getSymbolSize(C),A=new i(S);return f(A,C),p(A),v(A,C),g(A,N,0),C>=7&&T(A,C),y(A,P),isNaN(m)&&(m=s.getBestMask(A,g.bind(null,A,N))),s.applyMask(m,A),g(A,N,m),{modules:A,version:C,errorCorrectionLevel:N,maskPattern:m,segments:x}}return me.create=function(C,N){if(typeof C>"u"||C==="")throw new Error("No input text");let m=t.M,x,B;return typeof N<"u"&&(m=t.from(N.errorCorrectionLevel,t.M),x=u.from(N.version),B=s.from(N.maskPattern),N.toSJISFunc&&e.setToSJISFunction(N.toSJISFunc)),k(C,x,m,B)},me}var Le={},Ue={},Dt;function sn(){return Dt||(Dt=1,(function(e){function t(o){if(typeof o=="number"&&(o=o.toString()),typeof o!="string")throw new Error("Color should be defined as hex string");let i=o.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+o);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(n){return[n,n]}))),i.length===6&&i.push("F","F");const r=parseInt(i.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:"#"+i.slice(0,6).join("")}}e.getOptions=function(i){i||(i={}),i.color||(i.color={});const r=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,n=i.width&&i.width>=21?i.width:void 0,s=i.scale||4;return{width:n,scale:n?4:s,margin:r,color:{dark:t(i.color.dark||"#000000ff"),light:t(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},e.getScale=function(i,r){return r.width&&r.width>=i+r.margin*2?r.width/(i+r.margin*2):r.scale},e.getImageWidth=function(i,r){const n=e.getScale(i,r);return Math.floor((i+r.margin*2)*n)},e.qrToImageData=function(i,r,n){const s=r.modules.size,l=r.modules.data,a=e.getScale(s,n),u=Math.floor((s+n.margin*2)*a),d=n.margin*a,c=[n.color.light,n.color.dark];for(let _=0;_<u;_++)for(let f=0;f<u;f++){let p=(_*u+f)*4,v=n.color.light;if(_>=d&&f>=d&&_<u-d&&f<u-d){const T=Math.floor((_-d)/a),g=Math.floor((f-d)/a);v=c[l[T*s+g]?1:0]}i[p++]=v.r,i[p++]=v.g,i[p++]=v.b,i[p]=v.a}}})(Ue)),Ue}var qt;function jn(){return qt||(qt=1,(function(e){const t=sn();function o(r,n,s){r.clearRect(0,0,n.width,n.height),n.style||(n.style={}),n.height=s,n.width=s,n.style.height=s+"px",n.style.width=s+"px"}function i(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(n,s,l){let a=l,u=s;typeof a>"u"&&(!s||!s.getContext)&&(a=s,s=void 0),s||(u=i()),a=t.getOptions(a);const d=t.getImageWidth(n.modules.size,a),c=u.getContext("2d"),_=c.createImageData(d,d);return t.qrToImageData(_.data,n,a),o(c,u,d),c.putImageData(_,0,0),u},e.renderToDataURL=function(n,s,l){let a=l;typeof a>"u"&&(!s||!s.getContext)&&(a=s,s=void 0),a||(a={});const u=e.render(n,s,a),d=a.type||"image/png",c=a.rendererOpts||{};return u.toDataURL(d,c.quality)}})(Le)),Le}var De={},Ft;function zn(){if(Ft)return De;Ft=1;const e=sn();function t(r,n){const s=r.a/255,l=n+'="'+r.hex+'"';return s<1?l+" "+n+'-opacity="'+s.toFixed(2).slice(1)+'"':l}function o(r,n,s){let l=r+n;return typeof s<"u"&&(l+=" "+s),l}function i(r,n,s){let l="",a=0,u=!1,d=0;for(let c=0;c<r.length;c++){const _=Math.floor(c%n),f=Math.floor(c/n);!_&&!u&&(u=!0),r[c]?(d++,c>0&&_>0&&r[c-1]||(l+=u?o("M",_+s,.5+f+s):o("m",a,0),a=0,u=!1),_+1<n&&r[c+1]||(l+=o("h",d),d=0)):a++}return l}return De.render=function(n,s,l){const a=e.getOptions(s),u=n.modules.size,d=n.modules.data,c=u+a.margin*2,_=a.color.light.a?"<path "+t(a.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",f="<path "+t(a.color.dark,"stroke")+' d="'+i(d,u,a.margin)+'"/>',p='viewBox="0 0 '+c+" "+c+'"',T='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+p+' shape-rendering="crispEdges">'+_+f+`</svg>
8
- `;return typeof l=="function"&&l(null,T),T},De}var Ht;function Kn(){if(Ht)return K;Ht=1;const e=xn(),t=Vn(),o=jn(),i=zn();function r(n,s,l,a,u){const d=[].slice.call(arguments,1),c=d.length,_=typeof d[c-1]=="function";if(!_&&!e())throw new Error("Callback required as last argument");if(_){if(c<2)throw new Error("Too few arguments provided");c===2?(u=l,l=s,s=a=void 0):c===3&&(s.getContext&&typeof u>"u"?(u=a,a=void 0):(u=a,a=l,l=s,s=void 0))}else{if(c<1)throw new Error("Too few arguments provided");return c===1?(l=s,s=a=void 0):c===2&&!s.getContext&&(a=l,l=s,s=void 0),new Promise(function(f,p){try{const v=t.create(l,a);f(n(v,s,a))}catch(v){p(v)}})}try{const f=t.create(l,a);u(null,n(f,s,a))}catch(f){u(f)}}return K.create=t.create,K.toCanvas=r.bind(null,o.render),K.toDataURL=r.bind(null,o.renderToDataURL),K.toString=r.bind(null,function(n,s,l){return i.render(n,l)}),K}var Jn=Kn();const Yn=En(Jn);function Gn({qrUrl:e,oneTimeKey:t,tunnelUrl:o}){const i=$t(null),[r,n]=J(!1);return Qe(()=>{!e||!i.current||Yn.toCanvas(i.current,e,{width:128,margin:1,color:{dark:"#0f1923",light:"#ffffff"}}).catch(()=>{})},[e]),h("div",{className:"glass-card p-5 flex flex-col items-center gap-4",children:[h("div",{className:"w-36 h-36 rounded-xl overflow-hidden bg-white p-2 flex items-center justify-center",children:e?h("canvas",{ref:i}):h("span",{className:"material-symbols-outlined text-gray-400 text-5xl",children:"qr_code_2"})}),h("div",{className:"text-center",children:[h("p",{className:"text-sm font-semibold text-white",children:"QR Connection Code"}),h("p",{className:"text-xs text-white/40 mt-0.5",children:"Scan to connect from your mobile device"})]}),h("div",{className:"w-full glass-card p-3 text-center",children:[h("p",{className:"text-xs text-white/40 mb-1",children:"One-Time Key"}),t?h("p",{className:"font-mono text-lg font-bold tracking-widest",style:{color:"var(--brand-500)"},children:t}):h("p",{className:"font-mono text-lg font-bold text-white/20 tracking-widest",children:"• • • • • • • •"})]}),o&&h("div",{className:"w-full flex items-center gap-2",children:[h("div",{className:"flex-1 glass-card px-3 py-2 min-w-0",children:h("p",{className:"text-xs text-white/50 truncate",children:o})}),h("button",{onClick:()=>{navigator.clipboard.writeText(o).catch(()=>{}),n(!0),setTimeout(()=>n(!1),2e3)},className:"glass-btn px-3 py-2 flex items-center gap-1 text-xs text-white/70 hover:text-white shrink-0",children:[h("span",{className:"material-symbols-outlined text-sm",children:r?"check":"content_copy"}),r?"Copied":"Copy"]})]})]})}const Qn=["Starting","Tunneling","Authenticating","Ready"],Wn="https://9remote.cc/help",Xn={screenRecording:"Screen Recording",accessibility:"Accessibility"};function qe({icon:e,label:t,value:o,accent:i}){return h("div",{className:"dark-card px-3 py-2.5 flex flex-col items-center gap-1 flex-1",children:[h("span",{className:`material-symbols-outlined text-base ${i||"text-white/40"}`,children:e}),h("p",{className:"text-xs text-white/40",children:t}),h("p",{className:"text-sm font-semibold text-white",children:o||"—"})]})}function Zn({permissions:e,onRequestPermission:t}){const o=Object.entries(e||{}).filter(([,i])=>!i);return o.length===0?null:h("div",{className:"px-5 py-2 flex gap-2 bg-amber-500/10 border-b border-amber-500/20",children:o.map(([i])=>h("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[h("span",{className:"material-symbols-outlined text-amber-400 text-sm flex-shrink-0",children:"warning"}),h("span",{className:"text-xs text-amber-300 truncate",children:Xn[i]}),h("button",{onClick:()=>t(i),className:"ml-auto flex-shrink-0 text-xs px-2 py-0.5 rounded bg-amber-500/20 text-amber-300 hover:bg-amber-500/30",children:"Grant"})]},i))})}function $n({version:e}){return e?h("div",{className:"px-5 py-2 flex items-center gap-2 border-b",style:{background:"rgba(255,87,10,0.08)",borderColor:"rgba(255,87,10,0.2)"},children:[h("span",{className:"material-symbols-outlined text-sm flex-shrink-0",style:{color:"var(--brand-400)"},children:"system_update"}),h("span",{className:"text-xs flex-1",style:{color:"var(--brand-400)"},children:["Version ",e," available"]}),h("button",{onClick:()=>{fetch("/api/update",{method:"POST"}).catch(()=>{})},className:"flex-shrink-0 text-xs px-2 py-0.5 rounded font-medium",style:{background:"rgba(255,87,10,0.15)",color:"var(--brand-400)"},children:"Update"})]}):null}function er({step:e,tunnelUrl:t,oneTimeKey:o,qrUrl:i,latency:r,uptime:n,permissions:s,updateVersion:l,onRequestPermission:a,onRefresh:u,onStop:d,logs:c=[]}){const[_,f]=J("connect"),p=$t(null);Qe(()=>{_==="log"&&p.current?.scrollIntoView({behavior:"smooth"})},[c,_]);const v=e===3?"text-green-400":e>=1?"text-orange-400":"text-white/40";return h("div",{className:"h-full flex flex-col dot-grid-bg relative",children:[h("div",{className:"flex items-center justify-between px-5 py-4 border-b border-white/5",children:[h("div",{className:"flex items-center gap-3",children:[h("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:"var(--brand-500)"},children:h("span",{className:"material-symbols-outlined text-white text-base",children:"terminal"})}),h("span",{className:"brand-text text-xs",children:"9Remote"})]}),h("button",{onClick:()=>window.open(Wn,"_blank"),className:"glass-btn w-7 h-7 flex items-center justify-center text-white/40 hover:text-white",children:h("span",{className:"material-symbols-outlined text-sm",children:"help_outline"})})]}),h($n,{version:l}),h(Zn,{permissions:s,onRequestPermission:a}),h("div",{className:"flex px-5 pt-3 gap-3 border-b border-white/5",children:[{id:"connect",label:"Connection"},{id:"log",label:"Logs"}].map(T=>h("button",{onClick:()=>f(T.id),className:"pb-2 text-xs font-medium border-b-2 transition-colors",style:_===T.id?{borderColor:"var(--brand-500)",color:"var(--brand-500)"}:{borderColor:"transparent",color:"rgba(255,255,255,0.4)"},children:T.label},T.id))}),h("div",{className:"flex-1 overflow-y-auto px-5 py-4 flex flex-col gap-4",children:_==="connect"?h(X,{children:[h(Nn,{currentStep:e,steps:Qn}),h(Gn,{qrUrl:i,oneTimeKey:o,tunnelUrl:t}),h("div",{className:"flex gap-2",children:[h(qe,{icon:"wifi",label:"Tunnel",value:e===3?"Online":e>=1?"Connecting":"Offline",accent:v}),h(qe,{icon:"network_ping",label:"Latency",value:r?`${r}ms`:null,accent:"text-orange-400"}),h(qe,{icon:"timer",label:"Uptime",value:n,accent:"text-purple-400"})]})]}):h("div",{className:"flex-1 flex flex-col",children:c.length===0?h("p",{className:"text-xs text-white/30 text-center mt-8",children:"No logs yet"}):h("div",{className:"flex flex-col gap-0.5",children:[c.map((T,g)=>h("p",{className:"text-xs font-mono text-white/50 leading-5 break-all",children:T},g)),h("div",{ref:p})]})})}),h("div",{className:"px-5 pb-5 pt-4 flex gap-2 border-t border-white/5",children:[h("button",{onClick:u,className:"glass-btn flex-1 py-2.5 flex items-center justify-center gap-1.5 text-sm font-medium text-white/70 hover:text-white",children:[h("span",{className:"material-symbols-outlined text-base",children:"refresh"}),"Refresh"]}),h("button",{onClick:d,className:"btn-danger flex-1 py-2.5 flex items-center justify-center gap-1.5 text-sm font-medium",children:[h("span",{className:"material-symbols-outlined text-base",children:"stop_circle"}),"Disconnect"]})]})]})}const Fe={step:0,tunnelUrl:"",oneTimeKey:"",qrUrl:"",latency:null,uptime:null},tr={screenRecording:!1,accessibility:!1},Ot=200;function nr(){const[e,t]=J(Fe),[o,i]=J(tr),[r,n]=J([]),[s,l]=J(null);Qe(()=>{fetch("/api/permissions").then(_=>_.json()).then(_=>i(_)).catch(()=>{});const c=new EventSource("/api/ui/events");return c.onmessage=_=>{try{const f=JSON.parse(_.data);f.type==="state"?t({step:f.step??0,tunnelUrl:f.tunnelUrl??"",oneTimeKey:f.oneTimeKey??"",qrUrl:f.qrUrl??"",latency:f.latency??null,uptime:f.uptime??null}):f.type==="log"?n(p=>{const v=[...p,f.message];return v.length>Ot?v.slice(-Ot):v}):f.type==="updateAvailable"?l(f.version):f.type==="permissions"&&i(f)}catch{}},c.onerror=()=>{},()=>c.close()},[]);const a=async c=>{await fetch("/api/permissions/request",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:c})}).catch(()=>{})},u=()=>{fetch("/api/ui/restart",{method:"POST"}).catch(()=>{}),t(Fe)},d=()=>{fetch("/api/ui/stop",{method:"POST"}).catch(()=>{}),t(Fe)};return h(er,{step:e.step,tunnelUrl:e.tunnelUrl,oneTimeKey:e.oneTimeKey,qrUrl:e.qrUrl,latency:e.latency,uptime:e.uptime,permissions:o,updateVersion:s,onRequestPermission:a,onRefresh:u,onStop:d,logs:r})}pn(h(nr,{}),document.getElementById("root"));