PageSourceSearch

https://media.lordicon.com/assets/js/account-settings.page.D68zUvmB.js

js lordicon.com collected 2026-09-24 08:31:07 UTC 31,557 bytes, 9 lines download raw bytes

1import{m as oe,a as ie,H as se,T as ae,D as ue,an as ce}from"./chunks/ui.NkqJAWMk.js";import{F as le}from"./chunks/use-forms.CvN7xnEc.js";import{F as M}from"./chunks/form.hO27CKo8.js";import{B as fe}from"./chunks/interfaces.rDC8GnQd.js";import{u as de}from"./chunks/use-blocks.BMpCx3em.js";import{g as he}from"./chunks/libs-highlight.ts.-CAykV0i.js";import{s as ge}from"./chunks/sidebar.partial.DfHbBlD5.js";var z={},W,Bt;function we(){return Bt||(Bt=1,W=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),W}var Z={},k={},bt;function U(){if(bt)return k;bt=1;let i;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 k.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17},k.getSymbolTotalCodewords=function(e){return t[e]},k.getBCHDigit=function(o){let e=0;for(;o!==0;)e++,o>>>=1;return e},k.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');i=e},k.isKanjiModeEnabled=function(){return typeof i<"u"},k.toSJIS=function(e){return i(e)},k}var X={},Rt;function pt(){return Rt||(Rt=1,(function(i){i.L={bit:1},i.M={bit:0},i.Q={bit:3},i.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 i.L;case"m":case"medium":return i.M;case"q":case"quartile":return i.Q;case"h":case"high":return i.H;default:throw new Error("Unknown EC Level: "+o)}}i.isValid=function(e){return e&&typeof e.bit<"u"&&e.bit>=0&&e.bit<4},i.from=function(e,n){if(i.isValid(e))return e;try{return t(e)}catch{return n}}})(X)),X}var x,At;function me(){if(At)return x;At=1;function i(){this.buffer=[],this.length=0}return i.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 e=0;e<o;e++)this.putBit((t>>>o-e-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++}},x=i,x}var $,vt;function ye(){if(vt)return $;vt=1;function i(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 i.prototype.set=function(t,o,e,n){const r=t*this.size+o;this.data[r]=e,n&&(this.reservedBit[r]=!0)},i.prototype.get=function(t,o){return this.data[t*this.size+o]},i.prototype.xor=function(t,o,e){this.data[t*this.size+o]^=e},i.prototype.isReserved=function(t,o){return this.reservedBit[t*this.size+o]},$=i,$}var tt={},Pt;function pe(){return Pt||(Pt=1,(function(i){const t=U().getSymbolSize;i.getRowColCoords=function(e){if(e===1)return[];const n=Math.floor(e/7)+2,r=t(e),s=r===145?26:Math.ceil((r-13)/(2*n-2))*2,a=[r-7];for(let u=1;u<n-1;u++)a[u]=a[u-1]-s;return a.push(6),a.reverse()},i.getPositions=function(e){const n=[],r=i.getRowColCoords(e),s=r.length;for(let a=0;a<s;a++)for(let u=0;u<s;u++)a===0&&u===0||a===0&&u===s-1||a===s-1&&u===0||n.push([r[a],r[u]]);return n}})(tt)),tt}var et={},Tt;function Ee(){if(Tt)return et;Tt=1;const i=U().getSymbolSize,t=7;return et.getPositions=function(e){const n=i(e);return[[0,0],[n-t,0],[0,n-t]]},et}var nt={},It;function Ce(){return It||(It=1,(function(i){i.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};i.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},i.from=function(n){return i.isValid(n)?parseInt(n,10):void 0},i.getPenaltyN1=function(n){const r=n.size;let s=0,a=0,u=0,c=null,d=null;for(let C=0;C<r;C++){a=u=0,c=d=null;for(let g=0;g<r;g++){let l=n.get(C,g);l===c?a++:(a>=5&&(s+=t.N1+(a-5)),c=l,a=1),l=n.get(g,C),l===d?u++:(u>=5&&(s+=t.N1+(u-5)),d=l,u=1)}a>=5&&(s+=t.N1+(a-5)),u>=5&&(s+=t.N1+(u-5))}return s},i.getPenaltyN2=function(n){const r=n.size;let s=0;for(let a=0;a<r-1;a++)for(let u=0;u<r-1;u++){const c=n.get(a,u)+n.get(a,u+1)+n.get(a+1,u)+n.get(a+1,u+1);(c===4||c===0)&&s++}return s*t.N2},i.getPenaltyN3=function(n){const r=n.size;let s=0,a=0,u=0;for(let c=0;c<r;c++){a=u=0;for(let d=0;d<r;d++)a=a<<1&2047|n.get(c,d),d>=10&&(a===1488||a===93)&&s++,u=u<<1&2047|n.get(d,c),d>=10&&(u===1488||u===93)&&s++}return s*t.N3},i.getPenaltyN4=function(n){let r=0;const s=n.data.length;for(let u=0;u<s;u++)r+=n.data[u];return Math.abs(Math.ceil(r*100/s/5)-10)*t.N4};function o(e,n,r){switch(e){case i.Patterns.PATTERN000:return(n+r)%2===0;case i.Patterns.PATTERN001:return n%2===0;case i.Patterns.PATTERN010:return r%3===0;case i.Patterns.PATTERN011:return(n+r)%3===0;case i.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2===0;case i.Patterns.PATTERN101:return n*r%2+n*r%3===0;case i.Patterns.PATTERN110:return(n*r%2+n*r%3)%2===0;case i.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}i.applyMask=function(n,r){const s=r.size;
1for(let a=0;a<s;a++)for(let u=0;u<s;u++)r.isReserved(u,a)||r.xor(u,a,o(n,u,a))},i.getBestMask=function(n,r){const s=Object.keys(i.Patterns).length;let a=0,u=1/0;for(let c=0;c<s;c++){r(c),i.applyMask(c,n);const d=i.getPenaltyN1(n)+i.getPenaltyN2(n)+i.getPenaltyN3(n)+i.getPenaltyN4(n);i.applyMask(c,n),d<u&&(u=d,a=c)}return a}})(nt)),nt}var j={},Nt;function Xt(){if(Nt)return j;Nt=1;const i=pt(),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 j.getBlocksCount=function(n,r){switch(r){case i.L:return t[(n-1)*4+0];case i.M:return t[(n-1)*4+1];case i.Q:return t[(n-1)*4+2];case i.H:return t[(n-1)*4+3];default:return}},j.getTotalCodewordsCount=function(n,r){switch(r){case i.L:return o[(n-1)*4+0];case i.M:return o[(n-1)*4+1];case i.Q:return o[(n-1)*4+2];case i.H:return o[(n-1)*4+3];default:return}},j}var rt={},K={},Mt;function Se(){if(Mt)return K;Mt=1;const i=new Uint8Array(512),t=new Uint8Array(256);return(function(){let e=1;for(let n=0;n<255;n++)i[n]=e,t[e]=n,e<<=1,e&256&&(e^=285);for(let n=255;n<512;n++)i[n]=i[n-255]})(),K.log=function(e){if(e<1)throw new Error("log("+e+")");return t[e]},K.exp=function(e){return i[e]},K.mul=function(e,n){return e===0||n===0?0:i[t[e]+t[n]]},K}var Lt;function Be(){return Lt||(Lt=1,(function(i){const t=Se();i.mul=function(e,n){const r=new Uint8Array(e.length+n.length-1);for(let s=0;s<e.length;s++)for(let a=0;a<n.length;a++)r[s+a]^=t.mul(e[s],n[a]);return r},i.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){const s=r[0];for(let u=0;u<n.length;u++)r[u]^=t.mul(n[u],s);let a=0;for(;a<r.length&&r[a]===0;)a++;r=r.slice(a)}return r},i.generateECPolynomial=function(e){let n=new Uint8Array([1]);for(let r=0;r<e;r++)n=i.mul(n,new Uint8Array([1,t.exp(r)]));return n}})(rt)),rt}var ot,Dt;function be(){if(Dt)return ot;Dt=1;const i=Be();function t(o){this.genPoly=void 0,this.degree=o,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(e){this.degree=e,this.genPoly=i.generateECPolynomial(this.degree)},t.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(e.length+this.degree);n.set(e);const r=i.mod(n,this.genPoly),s=this.degree-r.length;if(s>0){const a=new Uint8Array(this.degree);return a.set(r,s),a}return r},ot=t,ot}var it={},st={},at={},Ft;function xt(){return Ft||(Ft=1,at.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),at}var L={},qt;function $t(){if(qt)return L;qt=1;const i="[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 e="(?:(?![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(e,"g"),L.NUMERIC=new RegExp(i,"g"),L.ALPHANUMERIC=new RegExp(t,"g");const n=new RegExp("^"+o+"$"),r=new RegExp("^"+i+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return L.testKanji=function(u){return n.test(u)},L.testNumeric=function(u){return r.test(u)},L.testAlphanumeric=function(u){return s.test(u)},L}var kt;function _(){return kt||(kt=1,(function(i){const t=xt(),o=$t();i.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},i.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},i.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},i.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},i.MIXED={bit:-1},i.getCharCountIndicator=function(r,s){if(!r.ccBits)throw new Error("Invalid mode: "+r);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?r.ccBits[0]:s<27?r.ccBits[1]:r.ccBits[2]},i.getBestModeForData=function(r){return o.testNumeric(r)?i.NUMERIC:o.testAlphanumeric(r)?i.ALPHANUMERIC:o.testKanji(r)?i.KANJI:i.BYTE},i.toString=function(r){if(r&&r.id)return r.id;throw new Error("Invalid mode")},i.isValid=function(r){return r&&r.bit&&r.ccBits};
2function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return i.NUMERIC;case"alphanumeric":return i.ALPHANUMERIC;case"kanji":return i.KANJI;case"byte":return i.BYTE;default:throw new Error("Unknown mode: "+n)}}i.from=function(r,s){if(i.isValid(r))return r;try{return e(r)}catch{return s}}})(st)),st}var Ut;function Re(){return Ut||(Ut=1,(function(i){const t=U(),o=Xt(),e=pt(),n=_(),r=xt(),s=7973,a=t.getBCHDigit(s);function u(g,l,v){for(let P=1;P<=40;P++)if(l<=i.getCapacity(P,v,g))return P}function c(g,l){return n.getCharCountIndicator(g,l)+4}function d(g,l){let v=0;return g.forEach(function(P){const I=c(P.mode,l);v+=I+P.getBitsLength()}),v}function C(g,l){for(let v=1;v<=40;v++)if(d(g,v)<=i.getCapacity(v,l,n.MIXED))return v}i.from=function(l,v){return r.isValid(l)?parseInt(l,10):v},i.getCapacity=function(l,v,P){if(!r.isValid(l))throw new Error("Invalid QR Code version");typeof P>"u"&&(P=n.BYTE);const I=t.getSymbolTotalCodewords(l),b=o.getTotalCodewordsCount(l,v),T=(I-b)*8;if(P===n.MIXED)return T;const R=T-c(P,l);switch(P){case n.NUMERIC:return Math.floor(R/10*3);case n.ALPHANUMERIC:return Math.floor(R/11*2);case n.KANJI:return Math.floor(R/13);case n.BYTE:default:return Math.floor(R/8)}},i.getBestVersionForData=function(l,v){let P;const I=e.from(v,e.M);if(Array.isArray(l)){if(l.length>1)return C(l,I);if(l.length===0)return 1;P=l[0]}else P=l;return u(P.mode,P.getLength(),I)},i.getEncodedBits=function(l){if(!r.isValid(l)||l<7)throw new Error("Invalid QR Code version");let v=l<<12;for(;t.getBCHDigit(v)-a>=0;)v^=s<<t.getBCHDigit(v)-a;return l<<12|v}})(it)),it}var ut={},_t;function Ae(){if(_t)return ut;_t=1;const i=U(),t=1335,o=21522,e=i.getBCHDigit(t);return ut.getEncodedBits=function(r,s){const a=r.bit<<3|s;let u=a<<10;for(;i.getBCHDigit(u)-e>=0;)u^=t<<i.getBCHDigit(u)-e;return(a<<10|u)^o},ut}var ct={},lt,Vt;function ve(){if(Vt)return lt;Vt=1;const i=_();function t(o){this.mode=i.NUMERIC,this.data=o.toString()}return t.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%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(e){let n,r,s;for(n=0;n+3<=this.data.length;n+=3)r=this.data.substr(n,3),s=parseInt(r,10),e.put(s,10);const a=this.data.length-n;a>0&&(r=this.data.substr(n),s=parseInt(r,10),e.put(s,a*3+1))},lt=t,lt}var ft,zt;function Pe(){if(zt)return ft;zt=1;const i=_(),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(e){this.mode=i.ALPHANUMERIC,this.data=e}return o.getBitsLength=function(n){return 11*Math.floor(n/2)+6*(n%2)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(n){let r;for(r=0;r+2<=this.data.length;r+=2){let s=t.indexOf(this.data[r])*45;s+=t.indexOf(this.data[r+1]),n.put(s,11)}this.data.length%2&&n.put(t.indexOf(this.data[r]),6)},ft=o,ft}var dt,Ht;function Te(){if(Ht)return dt;Ht=1;const i=_();function t(o){this.mode=i.BYTE,typeof o=="string"?this.data=new TextEncoder().encode(o):this.data=new Uint8Array(o)}return t.getBitsLength=function(e){return e*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 e=0,n=this.data.length;e<n;e++)o.put(this.data[e],8)},dt=t,dt}var ht,Kt;function Ie(){if(Kt)return ht;Kt=1;const i=_(),t=U();function o(e){this.mode=i.KANJI,this.data=e}return o.getBitsLength=function(n){return n*13},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let n;for(n=0;n<this.data.length;n++){let r=t.toSJIS(this.data[n]);if(r>=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[n]+`
3Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),e.put(r,13)}},ht=o,ht}var gt={exports:{}},Jt;function Ne(){return Jt||(Jt=1,(function(i){var t={single_source_shortest_paths:function(o,e,n){var r={},s={};s[e]=0;var a=t.PriorityQueue.make();a.push(e,0);for(var u,c,d,C,g,l,v,P,I;!a.empty();){u=a.pop(),c=u.value,C=u.cost,g=o[c]||{};for(d in g)g.hasOwnProperty(d)&&(l=g[d],v=C+l,P=s[d],I=typeof s[d]>"u",(I||P>v)&&(s[d]=v,a.push(d,v),r[d]=c))}if(typeof n<"u"&&typeof s[n]>"u"){var b=["Could not find a path from ",e," to ",n,"."].join("");throw new Error(b)}return r},extract_shortest_path_from_predecessor_list:function(o,e){for(var n=[],r=e;r;)n.push(r),o[r],r=o[r];return n.reverse(),n},find_path:function(o,e,n){var r=t.single_source_shortest_paths(o,e,n);return t.extract_shortest_path_from_predecessor_list(r,n)},PriorityQueue:{make:function(o){var e=t.PriorityQueue,n={},r;o=o||{};for(r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);return n.queue=[],n.sorter=o.sorter||e.default_sorter,n},default_sorter:function(o,e){return o.cost-e.cost}
3,push:function(o,e){var n={value:o,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};i.exports=t})(gt)),gt.exports}var jt;function Me(){return jt||(jt=1,(function(i){const t=_(),o=ve(),e=Pe(),n=Te(),r=Ie(),s=$t(),a=U(),u=Ne();function c(b){return unescape(encodeURIComponent(b)).length}function d(b,T,R){const S=[];let N;for(;(N=b.exec(R))!==null;)S.push({data:N[0],index:N.index,mode:T,length:N[0].length});return S}function C(b){const T=d(s.NUMERIC,t.NUMERIC,b),R=d(s.ALPHANUMERIC,t.ALPHANUMERIC,b);let S,N;return a.isKanjiModeEnabled()?(S=d(s.BYTE,t.BYTE,b),N=d(s.KANJI,t.KANJI,b)):(S=d(s.BYTE_KANJI,t.BYTE,b),N=[]),T.concat(R,S,N).sort(function(p,y){return p.index-y.index}).map(function(p){return{data:p.data,mode:p.mode,length:p.length}})}function g(b,T){switch(T){case t.NUMERIC:return o.getBitsLength(b);case t.ALPHANUMERIC:return e.getBitsLength(b);case t.KANJI:return r.getBitsLength(b);case t.BYTE:return n.getBitsLength(b)}}function l(b){return b.reduce(function(T,R){const S=T.length-1>=0?T[T.length-1]:null;return S&&S.mode===R.mode?(T[T.length-1].data+=R.data,T):(T.push(R),T)},[])}function v(b){const T=[];for(let R=0;R<b.length;R++){const S=b[R];switch(S.mode){case t.NUMERIC:T.push([S,{data:S.data,mode:t.ALPHANUMERIC,length:S.length},{data:S.data,mode:t.BYTE,length:S.length}]);break;case t.ALPHANUMERIC:T.push([S,{data:S.data,mode:t.BYTE,length:S.length}]);break;case t.KANJI:T.push([S,{data:S.data,mode:t.BYTE,length:c(S.data)}]);break;case t.BYTE:T.push([{data:S.data,mode:t.BYTE,length:c(S.data)}])}}return T}function P(b,T){const R={},S={start:{}};let N=["start"];for(let h=0;h<b.length;h++){const p=b[h],y=[];for(let f=0;f<p.length;f++){const B=p[f],w=""+h+f;y.push(w),R[w]={node:B,lastCount:0},S[w]={};for(let E=0;E<N.length;E++){const m=N[E];R[m]&&R[m].node.mode===B.mode?(S[m][w]=g(R[m].lastCount+B.length,B.mode)-g(R[m].lastCount,B.mode),R[m].lastCount+=B.length):(R[m]&&(R[m].lastCount=B.length),S[m][w]=g(B.length,B.mode)+4+t.getCharCountIndicator(B.mode,T))}}N=y}for(let h=0;h<N.length;h++)S[N[h]].end=0;return{map:S,table:R}}function I(b,T){let R;const S=t.getBestModeForData(b);if(R=t.from(T,S),R!==t.BYTE&&R.bit<S.bit)throw new Error('"'+b+'" cannot be encoded with mode '+t.toString(R)+`.
4 Suggested mode is: `+t.toString(S));switch(R===t.KANJI&&!a.isKanjiModeEnabled()&&(R=t.BYTE),R){case t.NUMERIC:return new o(b);case t.ALPHANUMERIC:return new e(b);case t.KANJI:return new r(b);case t.BYTE:return new n(b)}}i.fromArray=function(T){return T.reduce(function(R,S){return typeof S=="string"?R.push(I(S,null)):S.data&&R.push(I(S.data,S.mode)),R},[])},i.fromString=function(T,R){const S=C(T,a.isKanjiModeEnabled()),N=v(S),h=P(N,R),p=u.find_path(h.map,"start","end"),y=[];for(let f=1;f<p.length-1;f++)y.push(h.table[p[f]].node);return i.fromArray(l(y))},i.rawSplit=function(T){return i.fromArray(C(T,a.isKanjiModeEnabled()))}})(ct)),ct}var Ot;function Le(){if(Ot)return Z;Ot=1;const i=U(),t=pt(),o=me(),e=ye(),n=pe(),r=Ee(),s=Ce(),a=Xt(),u=be(),c=Re(),d=Ae(),C=_(),g=Me();function l(h,p){const y=h.size,f=r.getPositions(p);for(let B=0;B<f.length;B++){const w=f[B][0],E=f[B][1];for(let m=-1;m<=7;m++)if(!(w+m<=-1||y<=w+m))for(let A=-1;A<=7;A++)E+A<=-1||y<=E+A||(m>=0&&m<=6&&(A===0||A===6)||A>=0&&A<=6&&(m===0||m===6)||m>=2&&m<=4&&A>=2&&A<=4?h.set(w+m,E+A,!0,!0):h.set(w+m,E+A,!1,!0))}}function v(h){const p=h.size;for(let y=8;y<p-8;y++){const f=y%2===0;h.set(y,6,f,!0),h.set(6,y,f,!0)}}function P(h,p){const y=n.getPositions(p);for(let f=0;f<y.length;f++){const B=y[f][0],w=y[f][1];for(let E=-2;E<=2;E++)for(let m=-2;m<=2;m++)E===-2||E===2||m===-2||m===2||E===0&&m===0?h.set(B+E,w+m,!0,!0):h.set(B+E,w+m,!1,!0)}}function I(h,p){const y=h.size,f=c.getEncodedBits(p);let B,w,E;for(let m=0;m<18;m++)B=Math.floor(m/3),w=m%3+y-8-3,E=(f>>m&1)===1,h.set(B,w,E,!0),h.set(w,B,E,!0)}function b(h,p,y){const f=h.size,B=d.getEncodedBits(p,y);let w,E;for(w=0;w<15;w++)E=(B>>w&1)===1,w<6?h.set(w,8,E,!0):w<8?h.set(w+1,8,E,!0):h.set(f-15+w,8,E,!0),w<8?h.set(8,f-w-1,E,!0):w<9?h.set(8,15-w-1+1,E,!0):h.set(8,15-w-1,E,!0);h.set(f-8,8,1,!0)}function T(h,p){const y=h.size;let f=-1,B=y-1,w=7,E=0;for(let m=y-1;m>0;m-=2)for(m===6&&m--;;){for(let A=0;A<2;A++)if(!h.isReserved(B,m-A)){let q=!1;E<p.length&&(q=(p[E]>>>w&1)===1),h.set(B,m-A,q),w--,w===-1&&(E++,w=7)}if(B+=f,B<0||y<=B){B-=f,f=-f;break}}}function R(h,p,y){const f=new o;
4y.forEach(function(A){f.put(A.mode.bit,4),f.put(A.getLength(),C.getCharCountIndicator(A.mode,h)),A.write(f)});const B=i.getSymbolTotalCodewords(h),w=a.getTotalCodewordsCount(h,p),E=(B-w)*8;for(f.getLengthInBits()+4<=E&&f.put(0,4);f.getLengthInBits()%8!==0;)f.putBit(0);const m=(E-f.getLengthInBits())/8;for(let A=0;A<m;A++)f.put(A%2?17:236,8);return S(f,h,p)}function S(h,p,y){const f=i.getSymbolTotalCodewords(p),B=a.getTotalCodewordsCount(p,y),w=f-B,E=a.getBlocksCount(p,y),m=f%E,A=E-m,q=Math.floor(f/E),H=Math.floor(w/E),ee=H+1,Et=q-H,ne=new u(Et);let O=0;const J=new Array(E),Ct=new Array(E);let Y=0;const re=new Uint8Array(h.buffer);for(let V=0;V<E;V++){const G=V<A?H:ee;J[V]=re.slice(O,O+G),Ct[V]=ne.encode(J[V]),O+=G,Y=Math.max(Y,G)}const Q=new Uint8Array(f);let St=0,D,F;for(D=0;D<Y;D++)for(F=0;F<E;F++)D<J[F].length&&(Q[St++]=J[F][D]);for(D=0;D<Et;D++)for(F=0;F<E;F++)Q[St++]=Ct[F][D];return Q}function N(h,p,y,f){let B;if(Array.isArray(h))B=g.fromArray(h);else if(typeof h=="string"){let q=p;if(!q){const H=g.rawSplit(h);q=c.getBestVersionForData(H,y)}B=g.fromString(h,q||40)}else throw new Error("Invalid data");const w=c.getBestVersionForData(B,y);if(!w)throw new Error("The amount of data is too big to be stored in a QR Code");if(!p)p=w;else if(p<w)throw new Error(`
5The chosen QR Code version cannot contain this amount of data.
6Minimum version required to store current data is: `+w+`.
7`);const E=R(p,y,B),m=i.getSymbolSize(p),A=new e(m);return l(A,p),v(A),P(A,p),b(A,y,0),p>=7&&I(A,p),T(A,E),isNaN(f)&&(f=s.getBestMask(A,b.bind(null,A,y))),s.applyMask(f,A),b(A,y,f),{modules:A,version:p,errorCorrectionLevel:y,maskPattern:f,segments:B}}return Z.create=function(p,y){if(typeof p>"u"||p==="")throw new Error("No input text");let f=t.M,B,w;return typeof y<"u"&&(f=t.from(y.errorCorrectionLevel,t.M),B=c.from(y.version),w=s.from(y.maskPattern),y.toSJISFunc&&i.setToSJISFunction(y.toSJISFunc)),N(p,B,f,w)},Z}var wt={},mt={},Yt;function te(){return Yt||(Yt=1,(function(i){function t(o){if(typeof o=="number"&&(o=o.toString()),typeof o!="string")throw new Error("Color should be defined as hex string");let e=o.slice().replace("#","").split("");if(e.length<3||e.length===5||e.length>8)throw new Error("Invalid hex color: "+o);(e.length===3||e.length===4)&&(e=Array.prototype.concat.apply([],e.map(function(r){return[r,r]}))),e.length===6&&e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+e.slice(0,6).join("")}}i.getOptions=function(e){e||(e={}),e.color||(e.color={});const n=typeof e.margin>"u"||e.margin===null||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,s=e.scale||4;return{width:r,scale:r?4:s,margin:n,color:{dark:t(e.color.dark||"#000000ff"),light:t(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},i.getScale=function(e,n){return n.width&&n.width>=e+n.margin*2?n.width/(e+n.margin*2):n.scale},i.getImageWidth=function(e,n){const r=i.getScale(e,n);return Math.floor((e+n.margin*2)*r)},i.qrToImageData=function(e,n,r){const s=n.modules.size,a=n.modules.data,u=i.getScale(s,r),c=Math.floor((s+r.margin*2)*u),d=r.margin*u,C=[r.color.light,r.color.dark];for(let g=0;g<c;g++)for(let l=0;l<c;l++){let v=(g*c+l)*4,P=r.color.light;if(g>=d&&l>=d&&g<c-d&&l<c-d){const I=Math.floor((g-d)/u),b=Math.floor((l-d)/u);P=C[a[I*s+b]?1:0]}e[v++]=P.r,e[v++]=P.g,e[v++]=P.b,e[v]=P.a}}})(mt)),mt}var Qt;function De(){return Qt||(Qt=1,(function(i){const t=te();function o(n,r,s){n.clearRect(0,0,r.width,r.height),r.style||(r.style={}),r.height=s,r.width=s,r.style.height=s+"px",r.style.width=s+"px"}function e(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}i.render=function(r,s,a){let u=a,c=s;typeof u>"u"&&(!s||!s.getContext)&&(u=s,s=void 0),s||(c=e()),u=t.getOptions(u);const d=t.getImageWidth(r.modules.size,u),C=c.getContext("2d"),g=C.createImageData(d,d);return t.qrToImageData(g.data,r,u),o(C,c,d),C.putImageData(g,0,0),c},i.renderToDataURL=function(r,s,a){let u=a;typeof u>"u"&&(!s||!s.getContext)&&(u=s,s=void 0),u||(u={});const c=i.render(r,s,u),d=u.type||"image/png",C=u.rendererOpts||{};return c.toDataURL(d,C.quality)}})(wt)),wt}var yt={},Gt;function Fe(){if(Gt)return yt;Gt=1;const i=te();function t(n,r){const s=n.a/255,a=r+'="'+n.hex+'"';return s<1?a+" "+r+'-opacity="'+s.toFixed(2).slice(1)+'"':a}function o(n,r,s){let a=n+r;return typeof s<"u"&&(a+=" "+s),a}function e(n,r,s){let a="",u=0,c=!1,d=0;for(let C=0;C<n.length;C++){const g=Math.floor(C%r),l=Math.floor(C/r);!g&&!c&&(c=!0),n[C]?(d++,C>0&&g>
70&&n[C-1]||(a+=c?o("M",g+s,.5+l+s):o("m",u,0),u=0,c=!1),g+1<r&&n[C+1]||(a+=o("h",d),d=0)):u++}return a}return yt.render=function(r,s,a){const u=i.getOptions(s),c=r.modules.size,d=r.modules.data,C=c+u.margin*2,g=u.color.light.a?"<path "+t(u.color.light,"fill")+' d="M0 0h'+C+"v"+C+'H0z"/>':"",l="<path "+t(u.color.dark,"stroke")+' d="'+e(d,c,u.margin)+'"/>',v='viewBox="0 0 '+C+" "+C+'"',I='<svg xmlns="http://www.w3.org/2000/svg" '+(u.width?'width="'+u.width+'" height="'+u.width+'" ':"")+v+' shape-rendering="crispEdges">'+g+l+`</svg>
8`;return typeof a=="function"&&a(null,I),I},yt}var Wt;function qe(){if(Wt)return z;Wt=1;const i=we(),t=Le(),o=De(),e=Fe();function n(r,s,a,u,c){const d=[].slice.call(arguments,1),C=d.length,g=typeof d[C-1]=="function";if(!g&&!i())throw new Error("Callback required as last argument");if(g){if(C<2)throw new Error("Too few arguments provided");C===2?(c=a,a=s,s=u=void 0):C===3&&(s.getContext&&typeof c>"u"?(c=u,u=void 0):(c=u,u=a,a=s,s=void 0))}else{if(C<1)throw new Error("Too few arguments provided");return C===1?(a=s,s=u=void 0):C===2&&!s.getContext&&(u=a,a=s,s=void 0),new Promise(function(l,v){try{const P=t.create(a,u);l(r(P,s,u))}catch(P){v(P)}})}try{const l=t.create(a,u);c(null,r(l,s,u))}catch(l){c(l)}}return z.create=t.create,z.toCanvas=n.bind(null,o.render),z.toDataURL=n.bind(null,o.renderToDataURL),z.toString=n.bind(null,function(r,s,a){return e.render(r,a)}),z}var ke=qe();const Ue=he(ke);class Zt{constructor(t){this.http=t}async updateProfile(t){return this.http.patch("/api/account/update-profile",t,{rawResponse:!0})}async verifyEmail(){return this.http.post("/api/account/verify",null,{rawResponse:!0})}async assignPassword(t,o){return this.http.patch("/api/account/assign-password",{password:o,code:t},{rawResponse:!0})}async changePassword(t,o){return this.http.patch("/api/account/password",{currentPassword:t,newPassword:o},{rawResponse:!0})}async changeEmail(t,o){return this.http.patch("/api/account/change-email",{email:t,code:o},{rawResponse:!0})}async deleteAccount(t){return this.http.remove("/api/account",{body:{password:t},rawResponse:!0})}async twoFactorInit(){return this.http.post("/api/account/two-factor",{})}async twoFactorEnable(t,o){return this.http.post("/api/account/two-factor",{token:t,secret:o},{rawResponse:!0})}async twoFactorDisable(){return this.http.remove("/api/account/two-factor",{rawResponse:!0})}async revokeSession(t){return this.http.post("/api/account/revoke",{sessionKey:t},{rawResponse:!0})}}class _e extends le{reset(){this.value=null}init(){this.input=this.element.querySelector("input"),this.input.addEventListener("change",()=>{this.emit("change",this.value),this.refresh()}),this.img=this.element.querySelector("img")}refresh(){const t=this.value;t?(this.element.classList.add("avatar--value"),this.img.src=URL.createObjectURL(t)):this.element.classList.remove("avatar--value")}get name(){return ce(this.element.dataset.name||this.input.name)}get value(){return this.input.files[0]||null}set value(t){this.input.value=t}}class Ve{constructor(t,o,e){this.accountService=t,this.toastService=o,this.dialogService=e,M.registerSupportedField("avatar",_e)}onBlocksReady(t){if(t instanceof HTMLElement)switch(t.id){case"two-factor-auth":this.initTwoFactor(t);break;case"change-password":this.initChangePassword(t);break;case"delete-account":this.initDeleteAccount(t);break;case"assign-password":this.initAssignPassword(t);break;case"change-email":this.initChangeEmail(t);break;case"update-profile":this.initUpdateProfile(t);break;case"sessions":this.initSessions(t);break}}initTwoFactor(t){const o=t.querySelector("#two-factor-auth-enable"),e=t.querySelector("#two-factor-auth-disable"),n=new M(o),r=new M(e);this.twoFactorInit(o).then(s=>{n.on("send",a=>{this.twoFactorEnable(n,r,a.token,s)})}),r.on("send",()=>{this.twoFactorDisable(r,n)})}async twoFactorInit(t){const o=await this.accountService.twoFactorInit(),n=await(async r=>{try{return await Ue.toDataURL(r,{type:"image/jpeg",margin:0,color:{dark:"#121330",light:"#fff"}})}catch{return""}})(o.otpauthUrl);return t.querySelector("img").setAttribute("src",n),o.secret}async twoFactorEnable(t,o,e,n){try{t.busy=!0,await this.accountService.twoFactorEnable(e,n),location.reload()}catch(r){this.toastService.showError(r),t.reset()}
8finally{t.busy=!1,t.focus()}}async twoFactorDisable(t,o){try{t.busy=!0,await this.accountService.twoFactorDisable(),location.reload()}catch(e){this.toastService.showError(e)}finally{t.busy=!1}}initChangePassword(t){const o=new M(t.querySelector("form"));o.on("send",e=>{this.changePassword(o,e.currentPassword,e.newPassword)})}async changePassword(t,o,e){try{t.busy=!0,await this.accountService.changePassword(o,e),location.reload()}catch(n){this.toastService.showError(n)}finally{t.busy=!1}}initDeleteAccount(t){const o=new M(t.querySelector("form"));o.on("send",e=>{this.deleteAccount(o,e.password)})}async deleteAccount(t,o){if(await this.dialogService.confirm({message:t.element.dataset.confirm,warning:!0}))try{t.busy=!0,await this.accountService.deleteAccount(o),location.href="/"}catch(n){this.toastService.showError(n)}finally{t.busy=!1}}initAssignPassword(t){const o=t.querySelector("#verify-email-form"),e=t.querySelector("#assign-password-form");if(!o||!e)return;const n=new M(o);n.on("send",()=>{this.sendVerificationCode(n,e)});const r=new M(e);r.on("send",s=>{this.assignPassword(r,s.code,s.password)})}async sendVerificationCode(t,o){try{t.busy=!0,await this.accountService.verifyEmail(),t.element.classList.add("hidden"),o.classList.remove("hidden"),this.toastService.show(t.element.dataset.message)}catch(e){this.toastService.showError(e)}finally{t.busy=!1}}async assignPassword(t,o,e){try{t.busy=!0,await this.accountService.assignPassword(o,e),location.reload()}catch(n){this.toastService.showError(n)}finally{t.busy=!1}}initChangeEmail(t){const o=t.querySelector("#change-email-verify-form"),e=t.querySelector("#change-email-assign-form");if(!o||!e)return;let n=null;const r=new M(o);r.on("send",a=>{n=a.email,this.sendVerificationCode(r,e)});const s=new M(e);s.on("send",a=>{this.changeEmailAssign(s,n,a.code)})}async changeEmailAssign(t,o,e){try{t.busy=!0,await this.accountService.changeEmail(o,e),location.reload()}catch(n){this.toastService.showError(n)}finally{t.busy=!1}}initUpdateProfile(t){const o=new M(t.querySelector("form"));o.on("send",e=>{this.updateProfile(o,e)})}async updateProfile(t,o){try{t.busy=!0;const e=new FormData;e.append("avatar",o.avatar),e.append("firstName",o.firstName),e.append("lastName",o.lastName),await this.accountService.updateProfile(e),location.reload()}catch(e){this.toastService.showError(e)}finally{t.busy=!1}}initSessions(t){t.querySelectorAll(".sessions__item").forEach(o=>{const e=o.dataset.sessionKey;o.querySelector("a")?.addEventListener("click",async n=>{n.preventDefault(),await this.revokeSession(e,o)})})}async revokeSession(t,o){try{await this.accountService.revokeSession(t),this.toastService.show("Session revoked."),o.parentElement.removeChild(o)}catch(e){this.toastService.showError(e)}}}async function Qe(i){oe(i),ge();const t=new ie(i);t.bindInjectable(Zt,[se]),t.bindInjectable(Ve,[Zt,ae,ue],{tag:fe}),de(t)}export{Qe as default};
9//# sourceMappingURL=account-settings.page.D68zUvmB.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.