12 |
- (()=>{var e,r,n,o={17816:function(t){t.exports=function(){"use strict";function t(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}var e=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(e,r){var n;n=function(){return function e(r,n,o){function i(s,u){if(!n[s]){if(!r[s]){if(!u&&t)return t();if(a)return a(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var c=n[s]={exports:{}};r[s][0].call(c.exports,(function(t){return i(r[s][1][t]||t)}),c,c.exports,e,r,n,o)}return n[s].exports}for(var a=t,s=0;s<o.length;s++)i(o[s]);return i}({1:[function(t,e,r){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},{}],2:[function(t,e,r){var n=t("./utils").getSymbolSize;r.getRowColCoords=function(t){if(1===t)return[];for(var e=Math.floor(t/7)+2,r=n(t),o=145===r?26:2*Math.ceil((r-13)/(2*e-2)),i=[r-7],a=1;a<e-1;a++)i[a]=i[a-1]-o;return i.push(6),i.reverse()},r.getPositions=function(t){for(var e=[],n=r.getRowColCoords(t),o=n.length,i=0;i<o;i++)for(var a=0;a<o;a++)0===i&&0===a||0===i&&a===o-1||i===o-1&&0===a||e.push([n[i],n[a]]);return e}},{"./utils":21}],3:[function(t,e,r){var n=t("./mode"),o=["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 i(t){this.mode=n.ALPHANUMERIC,this.data=t}i.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){var e;for(e=0;e+2<=this.data.length;e+=2){var r=45*o.indexOf(this.data[e]);r+=o.indexOf(this.data[e+1]),t.put(r,11)}this.data.length%2&&t.put(o.indexOf(this.data[e]),6)},e.exports=i},{"./mode":14}],4:[function(t,e,r){function n(){this.buffer=[],this.length=0}n.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var r=0;r<e;r++)this.putBit(1==(t>>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},e.exports=n},{}],5:[function(t,e,r){var n=t("../utils/buffer");function o(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=n.alloc(t*t),this.reservedBit=n.alloc(t*t)}o.prototype.set=function(t,e,r,n){var o=t*this.size+e;this.data[o]=r,n&&(this.reservedBit[o]=!0)},o.prototype.get=function(t,e){return this.data[t*this.size+e]},o.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r},o.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},e.exports=o},{"../utils/buffer":28}],6:[function(t,e,r){var n=t("../utils/buffer"),o=t("./mode");function i(t){this.mode=o.BYTE,this.data=n.from(t)}i.getBitsLength=function(t){return 8*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){for(var e=0,r=this.data.length;e<r;e++)t.put(this.data[e],8)},e.exports=i},{"../utils/buffer":28,"./mode":14}],7:[function(t,e,r){var n=t("./error-correction-level"),o=[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],i=[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];r.getBlocksCount=function(t,e){switch(e){case n.L:return o[4*(t-1)+0];case n.M:return o[4*(t-1)+1];case n.Q:return o[4*(t-1)+2];case n.H:return o[4*(t-1)+3];default:return}},r.getTotalCodewordsCount=function(t,e){switch(e){case n.L:return i[4*(t-1)+0];case n.M:return i[4*(t-1)+1];case n.Q:return i[4*(t-1)+2];case n.H:return i[4*(t-1)+3];default:return}}},{"./error-correction-level":8}],8:[function(t,e,r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2},r.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},r.from=function(t,e){if(r.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return e}}},{}],9:[function(t,e,r){var n=t("./utils").getSymbolSize;r.getPositions=function(t){var e=n(t);return[[0,0],[e-7,0],[0,e-7]]}},{"./utils":21}],10:[function(t,e,r){var n=t("./utils"),o=n.getBCHDigit(1335);r.getEncodedBits=function(t,e){for(var r=t.bit<<3|e,i=r<<10;n.getBCHDigit(i)-o>=0;)i^=1335<<n.getBCHDigit(i)-o;return 21522^(r<<10|i)}},{"./utils":21}],11:[function(t,e,r){var n=t("../utils/buffer"),o=n.alloc(512),i=n.alloc(256);!function(){for(var t=1,e=0;e<255;e++)o[e]=t,i[t]=e,256&(t<<=1)&&(t^=285);for(e=255;e<512;e++)o[e]=o[e-255]}(),r.log=function(t){if(t<1)throw new Error("log("+t+")");return i[t]},r.exp=function(t){return o[t]},r.mul=function(t,e){return 0===t||0===e?0:o[i[t]+i[e]]}},{"../utils/buffer":28}],12:[function(t,e,r){var n=t("./mode"),o=t("./utils");function i(t){this.mode=n.KANJI,this.data=t}i.getBitsLength=function(t){return 13*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){var e;for(e=0;e<this.data.length;e++){var r=o.toSJIS(this.data[e]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),t.put(r,13)}},e.exports=i},{"./mode":14,"./utils":21}],13:[function(t,e,r){r.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var n=3,o=3,i=40,a=10;function s(t,e,n){switch(t){case r.Patterns.PATTERN000:return(e+n)%2==0;case r.Patterns.PATTERN001:return e%2==0;case r.Patterns.PATTERN010:return n%3==0;case r.Patterns.PATTERN011:return(e+n)%3==0;case r.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(n/3))%2==0;case r.Patterns.PATTERN101:return e*n%2+e*n%3==0;case r.Patterns.PATTERN110:return(e*n%2+e*n%3)%2==0;case r.Patterns.PATTERN111:return(e*n%3+(e+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}r.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},r.from=function(t){return r.isValid(t)?parseInt(t,10):void 0},r.getPenaltyN1=function(t){for(var e=t.size,r=0,o=0,i=0,a=null,s=null,u=0;u<e;u++){o=i=0,a=s=null;for(var f=0;f<e;f++){var c=t.get(u,f);c===a?o++:(o>=5&&(r+=n+(o-5)),a=c,o=1),(c=t.get(f,u))===s?i++:(i>=5&&(r+=n+(i-5)),s=c,i=1)}o>=5&&(r+=n+(o-5)),i>=5&&(r+=n+(i-5))}return r},r.getPenaltyN2=function(t){for(var e=t.size,r=0,n=0;n<e-1;n++)for(var i=0;i<e-1;i++){var a=t.get(n,i)+t.get(n,i+1)+t.get(n+1,i)+t.get(n+1,i+1);4!==a&&0!==a||r++}return r*o},r.getPenaltyN3=function(t){for(var e=t.size,r=0,n=0,o=0,a=0;a<e;a++){n=o=0;for(var s=0;s<e;s++)n=n<<1&2047|t.get(a,s),s>=10&&(1488===n||93===n)&&r++,o=o<<1&2047|t.get(s,a),s>=10&&(1488===o||93===o)&&r++}return r*i},r.getPenaltyN4=function(t){for(var e=0,r=t.data.length,n=0;n<r;n++)e+=t.data[n];return Math.abs(Math.ceil(100*e/r/5)-10)*a},r.applyMask=function(t,e){for(var r=e.size,n=0;n<r;n++)for(var o=0;o<r;o++)e.isReserved(o,n)||e.xor(o,n,s(t,o,n))},r.getBestMask=function(t,e){for(var n=Object.keys(r.Patterns).length,o=0,i=1/0,a=0;a<n;a++){e(a),r.applyMask(a,t);var s=r.getPenaltyN1(t)+r.getPenaltyN2(t)+r.getPenaltyN3(t)+r.getPenaltyN4(t);r.applyMask(a,t),s<i&&(i=s,o=a)}return o}},{}],14:[function(t,e,r){var n=t("./version-check"),o=t("./regex");r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!n.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},r.getBestModeForData=function(t){return o.testNumeric(t)?r.NUMERIC:o.testAlphanumeric(t)?r.ALPHANUMERIC:o.testKanji(t)?r.KANJI:r.BYTE},r.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},r.isValid=function(t){return t&&t.bit&&t.ccBits},r.from=function(t,e){if(r.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return e}}},{"./regex":19,"./version-check":22}],15:[function(t,e,r){var n=t("./mode");function o(t){this.mode=n.NUMERIC,this.data=t.toString()}o.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var e,r,n;for(e=0;e+3<=this.data.length;e+=3)r=this.data.substr(e,3),n=parseInt(r,10),t.put(n,10);var o=this.data.length-e;o>0&&(r=this.data.substr(e),n=parseInt(r,10),t.put(n,3*o+1))},e.exports=o},{"./mode":14}],16:[function(t,e,r){var n=t("../utils/buffer"),o=t("./galois-field");r.mul=function(t,e){for(var r=n.alloc(t.length+e.length-1),i=0;i<t.length;i++)for(var a=0;a<e.length;a++)r[i+a]^=o.mul(t[i],e[a]);return r},r.mod=function(t,e){for(var r=n.from(t);r.length-e.length>=0;){for(var i=r[0],a=0;a<e.length;a++)r[a]^=o.mul(e[a],i);for(var s=0;s<r.length&&0===r[s];)s++;r=r.slice(s)}return r},r.generateECPolynomial=function(t){for(var e=n.from([1]),i=0;i<t;i++)e=r.mul(e,[1,o.exp(i)]);return e}},{"../utils/buffer":28,"./galois-field":11}],17:[function(t,e,r){var n=t("../utils/buffer"),o=t("./utils"),i=t("./error-correction-level"),a=t("./bit-buffer"),s=t("./bit-matrix"),u=t("./alignment-pattern"),f=t("./finder-pattern"),c=t("./mask-pattern"),l=t("./error-correction-code"),h=t("./reed-solomon-encoder"),p=t("./version"),d=t("./format-info"),g=t("./mode"),v=t("./segments"),y=t("isarray");function A(t,e,r){var n,o,i=t.size,a=d.getEncodedBits(e,r);for(n=0;n<15;n++)o=1==(a>>n&1),n<6?t.set(n,8,o,!0):n<8?t.set(n+1,8,o,!0):t.set(i-15+n,8,o,!0),n<8?t.set(8,i-n-1,o,!0):n<9?t.set(8,15-n-1+1,o,!0):t.set(8,15-n-1,o,!0);t.set(i-8,8,1,!0)}function m(t,e,r){var i=new a;r.forEach((function(e){i.put(e.mode.bit,4),i.put(e.getLength(),g.getCharCountIndicator(e.mode,t)),e.write(i)}));var s=8*(o.getSymbolTotalCodewords(t)-l.getTotalCodewordsCount(t,e));for(i.getLengthInBits()+4<=s&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);for(var u=(s-i.getLengthInBits())/8,f=0;f<u;f++)i.put(f%2?17:236,8);return function(t,e,r){for(var i=o.getSymbolTotalCodewords(e),a=i-l.getTotalCodewordsCount(e,r),s=l.getBlocksCount(e,r),u=s-i%s,f=Math.floor(i/s),c=Math.floor(a/s),p=c+1,d=f-c,g=new h(d),v=0,y=new Array(s),A=new Array(s),m=0,C=n.from(t.buffer),w=0;w<s;w++){var b=w<u?c:p;y[w]=C.slice(v,v+b),A[w]=g.encode(y[w]),v+=b,m=Math.max(m,b)}var k,E,T=n.alloc(i),_=0;for(k=0;k<m;k++)for(E=0;E<s;E++)k<y[E].length&&(T[_++]=y[E][k]);for(k=0;k<d;k++)for(E=0;E<s;E++)T[_++]=A[E][k];return T}(i,t,e)}function C(t,e,r,n){var i;if(y(t))i=v.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");var a=e;if(!a){var l=v.rawSplit(t);a=p.getBestVersionForData(l,r)}i=v.fromString(t,a||40)}var h=p.getBestVersionForData(i,r);if(!h)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<h)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+h+".\n")}else e=h;var d=m(e,r,i),g=o.getSymbolSize(e),C=new s(g);return function(t,e){for(var r=t.size,n=f.getPositions(e),o=0;o<n.length;o++)for(var i=n[o][0],a=n[o][1],s=-1;s<=7;s++)if(!(i+s<=-1||r<=i+s))for(var u=-1;u<=7;u++)a+u<=-1||r<=a+u||(s>=0&&s<=6&&(0===u||6===u)||u>=0&&u<=6&&(0===s||6===s)||s>=2&&s<=4&&u>=2&&u<=4?t.set(i+s,a+u,!0,!0):t.set(i+s,a+u,!1,!0))}(C,e),function(t){for(var e=t.size,r=8;r<e-8;r++){var n=r%2==0;t.set(r,6,n,!0),t.set(6,r,n,!0)}}(C),function(t,e){for(var r=u.getPositions(e),n=0;n<r.length;n++)for(var o=r[n][0],i=r[n][1],a=-2;a<=2;a++)for(var s=-2;s<=2;s++)-2===a||2===a||-2===s||2===s||0===a&&0===s?t.set(o+a,i+s,!0,!0):t.set(o+a,i+s,!1,!0)}(C,e),A(C,r,0),e>=7&&function(t,e){for(var r,n,o,i=t.size,a=p.getEncodedBits(e),s=0;s<18;s++)r=Math.floor(s/3),n=s%3+i-8-3,o=1==(a>>s&1),t.set(r,n,o,!0),t.set(n,r,o,!0)}(C,e),function(t,e){for(var r=t.size,n=-1,o=r-1,i=7,a=0,s=r-1;s>0;s-=2)for(6===s&&s--;;){for(var u=0;u<2;u++)if(!t.isReserved(o,s-u)){var f=!1;a<e.length&&(f=1==(e[a]>>>i&1)),t.set(o,s-u,f),-1==--i&&(a++,i=7)}if((o+=n)<0||r<=o){o-=n,n=-n;break}}}(C,d),isNaN(n)&&(n=c.getBestMask(C,A.bind(null,C,r))),c.applyMask(n,C),A(C,r,n),{modules:C,version:e,errorCorrectionLevel:r,maskPattern:n,segments:i}}r.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");var r,n,a=i.M;return void 0!==e&&(a=i.from(e.errorCorrectionLevel,i.M),r=p.from(e.version),n=c.from(e.maskPattern),e.toSJISFunc&&o.setToSJISFunction(e.toSJISFunc)),C(t,r,a,n)}},{"../utils/buffer":28,"./alignment-pattern":2,"./bit-buffer":4,"./bit-matrix":5,"./error-correction-code":7,"./error-correction-level":8,"./finder-pattern":9,"./format-info":10,"./mask-pattern":13,"./mode":14,"./reed-solomon-encoder":18,"./segments":20,"./utils":21,"./version":23,isarray:33}],18:[function(t,e,r){var n=t("../utils/buffer"),o=t("./polynomial"),i=t("buffer").Buffer;function a(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}a.prototype.initialize=function(t){this.degree=t,this.genPoly=o.generateECPolynomial(this.degree)},a.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var e=n.alloc(this.degree),r=i.concat([t,e],t.length+this.degree),a=o.mod(r,this.genPoly),s=this.degree-a.length;if(s>0){var u=n.alloc(this.degree);return a.copy(u,s),u}return a},e.exports=a},{"../utils/buffer":28,"./polynomial":16,buffer:30}],19:[function(t,e,r){var n="[0-9]+",o="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",i="(?:(?![A-Z0-9 $%*+\\-./:]|"+(o=o.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";r.KANJI=new RegExp(o,"g"),r.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),r.BYTE=new RegExp(i,"g"),r.NUMERIC=new RegExp(n,"g"),r.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var a=new RegExp("^"+o+"$"),s=new RegExp("^"+n+"$"),u=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");r.testKanji=function(t){return a.test(t)},r.testNumeric=function(t){return s.test(t)},r.testAlphanumeric=function(t){return u.test(t)}},{}],20:[function(t,e,r){var n=t("./mode"),o=t("./numeric-data"),i=t("./alphanumeric-data"),a=t("./byte-data"),s=t("./kanji-data"),u=t("./regex"),f=t("./utils"),c=t("dijkstrajs");function l(t){return unescape(encodeURIComponent(t)).length}function h(t,e,r){for(var n,o=[];null!==(n=t.exec(r));)o.push({data:n[0],index:n.index,mode:e,length:n[0].length});return o}function p(t){var e,r,o=h(u.NUMERIC,n.NUMERIC,t),i=h(u.ALPHANUMERIC,n.ALPHANUMERIC,t);return f.isKanjiModeEnabled()?(e=h(u.BYTE,n.BYTE,t),r=h(u.KANJI,n.KANJI,t)):(e=h(u.BYTE_KANJI,n.BYTE,t),r=[]),o.concat(i,e,r).sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function d(t,e){switch(e){case n.NUMERIC:return o.getBitsLength(t);case n.ALPHANUMERIC:return i.getBitsLength(t);case n.KANJI:return s.getBitsLength(t);case n.BYTE:return a.getBitsLength(t)}}function g(t,e){var r,u=n.getBestModeForData(t);if((r=n.from(e,u))!==n.BYTE&&r.bit<u.bit)throw new Error('"'+t+'" cannot be encoded with mode '+n.toString(r)+".\n Suggested mode is: "+n.toString(u));switch(r!==n.KANJI||f.isKanjiModeEnabled()||(r=n.BYTE),r){case n.NUMERIC:return new o(t);case n.ALPHANUMERIC:return new i(t);case n.KANJI:return new s(t);case n.BYTE:return new a(t)}}r.fromArray=function(t){return t.reduce((function(t,e){return"string"==typeof e?t.push(g(e,null)):e.data&&t.push(g(e.data,e.mode)),t}),[])},r.fromString=function(t,e){for(var o=function(t,e){for(var r={},o={start:{}},i=["start"],a=0;a<t.length;a++){for(var s=t[a],u=[],f=0;f<s.length;f++){var c=s[f],l=""+a+f;u.push(l),r[l]={node:c,lastCount:0},o[l]={};for(var h=0;h<i.length;h++){var p=i[h];r[p]&&r[p].node.mode===c.mode?(o[p][l]=d(r[p].lastCount+c.length,c.mode)-d(r[p].lastCount,c.mode),r[p].lastCount+=c.length):(r[p]&&(r[p].lastCount=c.length),o[p][l]=d(c.length,c.mode)+4+n.getCharCountIndicator(c.mode,e))}}i=u}for(h=0;h<i.length;h++)o[i[h]].end=0;return{map:o,table:r}}(function(t){for(var e=[],r=0;r<t.length;r++){var o=t[r];switch(o.mode){case n.NUMERIC:e.push([o,{data:o.data,mode:n.ALPHANUMERIC,length:o.length},{data:o.data,mode:n.BYTE,length:o.length}]);break;case n.ALPHANUMERIC:e.push([o,{data:o.data,mode:n.BYTE,length:o.length}]);break;case n.KANJI:e.push([o,{data:o.data,mode:n.BYTE,length:l(o.data)}]);break;case n.BYTE:e.push([{data:o.data,mode:n.BYTE,length:l(o.data)}])}}return e}(p(t,f.isKanjiModeEnabled())),e),i=c.find_path(o.map,"start","end"),a=[],s=1;s<i.length-1;s++)a.push(o.table[i[s]].node);return r.fromArray(a.reduce((function(t,e){var r=t.length-1>=0?t[t.length-1]:null;return r&&r.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[]))},r.rawSplit=function(t){return r.fromArray(p(t,f.isKanjiModeEnabled()))}},{"./alphanumeric-data":3,"./byte-data":6,"./kanji-data":12,"./mode":14,"./numeric-data":15,"./regex":19,"./utils":21,dijkstrajs:31}],21:[function(t,e,r){var n,o=[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];r.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},r.getSymbolTotalCodewords=function(t){return o[t]},r.getBCHDigit=function(t){for(var e=0;0!==t;)e++,t>>>=1;return e},r.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');n=t},r.isKanjiModeEnabled=function(){return void 0!==n},r.toSJIS=function(t){return n(t)}},{}],22:[function(t,e,r){r.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},{}],23:[function(t,e,r){var n=t("./utils"),o=t("./error-correction-code"),i=t("./error-correction-level"),a=t("./mode"),s=t("./version-check"),u=t("isarray"),f=n.getBCHDigit(7973);function c(t,e){return a.getCharCountIndicator(t,e)+4}function l(t,e){var r=0;return t.forEach((function(t){var n=c(t.mode,e);r+=n+t.getBitsLength()})),r}r.from=function(t,e){return s.isValid(t)?parseInt(t,10):e},r.getCapacity=function(t,e,r){if(!s.isValid(t))throw new Error("Invalid QR Code version");void 0===r&&(r=a.BYTE);var i=8*(n.getSymbolTotalCodewords(t)-o.getTotalCodewordsCount(t,e));if(r===a.MIXED)return i;var u=i-c(r,t);switch(r){case a.NUMERIC:return Math.floor(u/10*3);case a.ALPHANUMERIC:return Math.floor(u/11*2);case a.KANJI:return Math.floor(u/13);case a.BYTE:default:return Math.floor(u/8)}},r.getBestVersionForData=function(t,e){var n,o=i.from(e,i.M);if(u(t)){if(t.length>1)return function(t,e){for(var n=1;n<=40;n++)if(l(t,n)<=r.getCapacity(n,e,a.MIXED))return n}(t,o);if(0===t.length)return 1;n=t[0]}else n=t;return function(t,e,n){for(var o=1;o<=40;o++)if(e<=r.getCapacity(o,n,t))return o}(n.mode,n.getLength(),o)},r.getEncodedBits=function(t){if(!s.isValid(t)||t<7)throw new Error("Invalid QR Code version");for(var e=t<<12;n.getBCHDigit(e)-f>=0;)e^=7973<<n.getBCHDigit(e)-f;return t<<12|e}},{"./error-correction-code":7,"./error-correction-level":8,"./mode":14,"./utils":21,"./version-check":22,isarray:33}],24:[function(t,e,r){var n=t("./can-promise"),o=t("./core/qrcode"),i=t("./renderer/canvas"),a=t("./renderer/svg-tag.js");function s(t,e,r,i,a){var s=[].slice.call(arguments,1),u=s.length,f="function"==typeof s[u-1];if(!f&&!n())throw new Error("Callback required as last argument");if(!f){if(u<1)throw new Error("Too few arguments provided");return 1===u?(r=e,e=i=void 0):2!==u||e.getContext||(i=r,r=e,e=void 0),new Promise((function(n,a){try{var s=o.create(r,i);n(t(s,e,i))}catch(t){a(t)}}))}if(u<2)throw new Error("Too few arguments provided");2===u?(a=r,r=e,e=i=void 0):3===u&&(e.getContext&&void 0===a?(a=i,i=void 0):(a=i,i=r,r=e,e=void 0));try{var c=o.create(r,i);a(null,t(c,e,i))}catch(t){a(t)}}r.create=o.create,r.toCanvas=s.bind(null,i.render),r.toDataURL=s.bind(null,i.renderToDataURL),r.toString=s.bind(null,(function(t,e,r){return a.render(t,r)}))},{"./can-promise":1,"./core/qrcode":17,"./renderer/canvas":25,"./renderer/svg-tag.js":26}],25:[function(t,e,r){var n=t("./utils");r.render=function(t,e,r){var o=r,i=e;void 0!==o||e&&e.getContext||(o=e,e=void 0),e||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=n.getOptions(o);var a=n.getImageWidth(t.modules.size,o),s=i.getContext("2d"),u=s.createImageData(a,a);return n.qrToImageData(u.data,t,o),function(t,e,r){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=r,e.width=r,e.style.height=r+"px",e.style.width=r+"px"}(s,i,a),s.putImageData(u,0,0),i},r.renderToDataURL=function(t,e,n){var o=n;void 0!==o||e&&e.getContext||(o=e,e=void 0),o||(o={});var i=r.render(t,e,o),a=o.type||"image/png",s=o.rendererOpts||{};return i.toDataURL(a,s.quality)}},{"./utils":27}],26:[function(t,e,r){var n=t("./utils");function o(t,e){var r=t.a/255,n=e+'="'+t.hex+'"';return r<1?n+" "+e+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function i(t,e,r){var n=t+e;return void 0!==r&&(n+=" "+r),n}r.render=function(t,e,r){var a=n.getOptions(e),s=t.modules.size,u=t.modules.data,f=s+2*a.margin,c=a.color.light.a?"<path "+o(a.color.light,"fill")+' d="M0 0h'+f+"v"+f+'H0z"/>':"",l="<path "+o(a.color.dark,"stroke")+' d="'+function(t,e,r){for(var n="",o=0,a=!1,s=0,u=0;u<t.length;u++){var f=Math.floor(u%e),c=Math.floor(u/e);f||a||(a=!0),t[u]?(s++,u>0&&f>0&&t[u-1]||(n+=a?i("M",f+r,.5+c+r):i("m",o,0),o=0,a=!1),f+1<e&&t[u+1]||(n+=i("h",s),s=0)):o++}return n}(u,s,a.margin)+'"/>',h='viewBox="0 0 '+f+" "+f+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+h+' shape-rendering="crispEdges">'+c+l+"</svg>\n";return"function"==typeof r&&r(null,p),p}},{"./utils":27}],27:[function(t,e,r){function n(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");var e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");var r=parseInt(e.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+e.slice(0,6).join("")}}r.getOptions=function(t){t||(t={}),t.color||(t.color={});var e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:r,scale:r?4:o,margin:e,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},r.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},r.getImageWidth=function(t,e){var n=r.getScale(t,e);return Math.floor((t+2*e.margin)*n)},r.qrToImageData=function(t,e,n){for(var o=e.modules.size,i=e.modules.data,a=r.getScale(o,n),s=Math.floor((o+2*n.margin)*a),u=n.margin*a,f=[n.color.light,n.color.dark],c=0;c<s;c++)for(var l=0;l<s;l++){var h=4*(c*s+l),p=n.color.light;c>=u&&l>=u&&c<s-u&&l<s-u&&(p=f[i[Math.floor((c-u)/a)*o+Math.floor((l-u)/a)]?1:0]),t[h++]=p.r,t[h++]=p.g,t[h++]=p.b,t[h]=p.a}}},{}],28:[function(t,e,r){var n=t("isarray");i.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}();var o=i.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function i(t,e,r){return i.TYPED_ARRAY_SUPPORT||this instanceof i?"number"==typeof t?u(this,t):function(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");var o;return o=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),i.TYPED_ARRAY_SUPPORT?o.__proto__=i.prototype:o=f(t,o),o}(t,e,r,n):"string"==typeof e?function(t,e){var r=0|l(e),n=s(t,r),o=n.write(e);return o!==r&&(n=n.slice(0,o)),n}(t,e):function(t,e){if(i.isBuffer(e)){var r=0|a(e.length),n=s(t,r);return 0===n.length||e.copy(n,0,0,r),n}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(o=e.length)!=o?s(t,0):f(t,e);if("Buffer"===e.type&&Array.isArray(e.data))return f(t,e.data)}var o;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}(this,t,e,r):new i(t,e,r)}function a(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function s(t,e){var r;return i.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e)).__proto__=i.prototype:(null===(r=t)&&(r=new i(e)),r.length=e),r}function u(t,e){var r=s(t,e<0?0:0|a(e));if(!i.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)r[n]=0;return r}function f(t,e){for(var r=e.length<0?0:0|a(e.length),n=s(t,r),o=0;o<r;o+=1)n[o]=255&e[o];return n}function c(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function l(t){return i.isBuffer(t)?t.length:"undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer)?t.byteLength:("string"!=typeof t&&(t=""+t),0===t.length?0:c(t).length)}i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),i.prototype.write=function(t,e,r){void 0===e||void 0===r&&"string"==typeof e?(r=this.length,e=0):isFinite(e)&&(e|=0,isFinite(r)?r|=0:r=void 0);var n=this.length-e;if((void 0===r||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(t,e,r,n){return function(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}(c(e,t.length-r),t,r,n)}(this,t,e,r)},i.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),i.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=i.prototype;else{var o=e-t;r=new i(o,void 0);for(var a=0;a<o;++a)r[a]=this[a+t]}return r},i.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var o,a=n-r;if(this===t&&r<e&&e<n)for(o=a-1;o>=0;--o)t[o+e]=this[o+r];else if(a<1e3||!i.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+a),e);return a},i.prototype.fill=function(t,e,r){if("string"==typeof t){if("string"==typeof e?(e=0,r=this.length):"string"==typeof r&&(r=this.length),1===t.length){var n=t.charCodeAt(0);n<256&&(t=n)}}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var a=i.isBuffer(t)?t:new i(t),s=a.length;for(o=0;o<r-e;++o)this[o+e]=a[o%s]}return this},i.concat=function(t,e){if(!n(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s(null,0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var o=u(null,e),a=0;for(r=0;r<t.length;++r){var f=t[r];if(!i.isBuffer(f))throw new TypeError('"list" argument must be an Array of Buffers');f.copy(o,a),a+=f.length}return o},i.byteLength=l,i.prototype._isBuffer=!0,i.isBuffer=function(t){return!(null==t||!t._isBuffer)},e.exports.alloc=function(t){var e=new i(t);return e.fill(0),e},e.exports.from=function(t){return new i(t)}},{isarray:33}],29:[function(t,e,r){r.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},r.toByteArray=function(t){var e,r,n=u(t),a=n[0],s=n[1],f=new i(function(t,e,r){return 3*(e+r)/4-r}(0,a,s)),c=0,l=s>0?a-4:a;for(r=0;r<l;r+=4)e=o[t.charCodeAt(r)]<<18|o[t.charCodeAt(r+1)]<<12|o[t.charCodeAt(r+2)]<<6|o[t.charCodeAt(r+3)],f[c++]=e>>16&255,f[c++]=e>>8&255,f[c++]=255&e;return 2===s&&(e=o[t.charCodeAt(r)]<<2|o[t.charCodeAt(r+1)]>>4,f[c++]=255&e),1===s&&(e=o[t.charCodeAt(r)]<<10|o[t.charCodeAt(r+1)]<<4|o[t.charCodeAt(r+2)]>>2,f[c++]=e>>8&255,f[c++]=255&e),f},r.fromByteArray=function(t){for(var e,r=t.length,o=r%3,i=[],a=16383,s=0,u=r-o;s<u;s+=a)i.push(f(t,s,s+a>u?u:s+a));return 1===o?(e=t[r-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===o&&(e=(t[r-2]<<8)+t[r-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=a[s],o[a.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function f(t,e,r){for(var o,i=[],a=e;a<r;a+=3)o=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),i.push(n[(s=o)>>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);var s;return i.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},{}],30:[function(t,e,r){var n=t("base64-js"),o=t("ieee754"),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=u,r.SlowBuffer=function(t){return+t!=t&&(t=0),u.alloc(+t)},r.INSPECT_MAX_BYTES=50;var a=2147483647;function s(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return f(t,e,r)}function f(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|d(t,e),n=s(r),o=n.write(t,e);return o!==r&&(n=n.slice(0,o)),n}(t,e);if(ArrayBuffer.isView(t))return h(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Y(t,ArrayBuffer)||t&&Y(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,u.prototype),n}(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);var o=function(t){if(u.isBuffer(t)){var e=0|p(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||F(t.length)?s(0):h(t):"Buffer"===t.type&&Array.isArray(t.data)?h(t.data):void 0}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return c(t),s(t<0?0:0|p(t))}function h(t){for(var e=t.length<0?0:0|p(t.length),r=s(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function p(t){if(t>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Y(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D(t).length;default:if(o)return n?-1:H(t).length;e=(""+e).toLowerCase(),o=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,e,r);case"utf8":case"utf-8":return _(this,e,r);case"ascii":return N(this,e,r);case"latin1":case"binary":return M(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),F(r=+r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:A(t,e,r,n,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):A(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function A(t,e,r,n,o){var i,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function f(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var c=-1;for(i=r;i<s;i++)if(f(t,i)===f(e,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===u)return c*a}else-1!==c&&(i-=i-c),c=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){for(var l=!0,h=0;h<u;h++)if(f(t,i+h)!==f(e,h)){l=!1;break}if(l)return i}return-1}function m(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=e.length;n>i/2&&(n=i/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(F(s))return a;t[r+a]=s}return a}function C(t,e,r,n){return j(H(e,t.length-r),t,r,n)}function w(t,e,r,n){return j(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function b(t,e,r,n){return w(t,e,r,n)}function k(t,e,r,n){return j(D(e),t,r,n)}function E(t,e,r,n){return j(function(t,e){for(var r,n,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)n=(r=t.charCodeAt(a))>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function _(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,a,s,u,f=t[o],c=null,l=f>239?4:f>223?3:f>191?2:1;if(o+l<=r)switch(l){case 1:f<128&&(c=f);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&f)<<6|63&i)>127&&(c=u);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(u=(15&f)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:i=t[o+1],a=t[o+2],s=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&f)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,l=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),o+=l}return function(t){var e=t.length;if(e<=B)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=B));return r}(n)}r.kMaxLength=a,u.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),u.poolSize=8192,u.from=function(t,e,r){return f(t,e,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,r){return function(t,e,r){return c(t),t<=0?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)}(t,e,r)},u.allocUnsafe=function(t){return l(t)},u.allocUnsafeSlow=function(t){return l(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(Y(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),Y(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var i=t[r];if(Y(i,Uint8Array)&&(i=u.from(i)),!u.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},u.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?_(this,0,t):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,o){if(Y(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(i,a),f=this.slice(n,o),c=t.slice(e,r),l=0;l<s;++l)if(f[l]!==c[l]){i=f[l],a=c[l];break}return i<a?-1:a<i?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return y(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return y(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return C(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return b(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var B=4096;function N(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function M(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function x(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=V[t[i]];return o}function P(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function L(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function S(t,e,r,n,o,i){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function R(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function I(t,e,r,n,i){return e=+e,r>>>=0,i||R(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function O(t,e,r,n,i){return e=+e,r>>>=0,i||R(t,0,r,8),o.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},u.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},u.prototype.readUInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},u.prototype.readInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||L(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||L(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return t>>>=0,e||L(t,4,this.length),o.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||L(t,4,this.length),o.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||L(t,8,this.length),o.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||L(t,8,this.length),o.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||S(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||S(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);S(this,t,e,r,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++i<r&&(a*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/a|0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);S(this,t,e,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a|0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeFloatLE=function(t,e,r){return I(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return I(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return O(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return O(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var o=n-r;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var i=o-1;i>=0;--i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return o},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var o=t.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(t=o)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var a=u.isBuffer(t)?t:u.from(t,n),s=a.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=a[i%s]}return this};var U=/[^+/0-9A-Za-z-_]/g;function H(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function D(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function j(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function Y(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function F(t){return t!=t}var V=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,o=0;o<16;++o)e[n+o]=t[r]+t[o];return e}()},{"base64-js":29,ieee754:32}],31:[function(t,e,r){var n={single_source_shortest_paths:function(t,e,r){var o={},i={};i[e]=0;var a,s,u,f,c,l,h,p=n.PriorityQueue.make();for(p.push(e,0);!p.empty();)for(u in s=(a=p.pop()).value,f=a.cost,c=t[s]||{})c.hasOwnProperty(u)&&(l=f+c[u],h=i[u],(void 0===i[u]||h>l)&&(i[u]=l,p.push(u,l),o[u]=s));if(void 0!==r&&void 0===i[r]){var d=["Could not find a path from ",e," to ",r,"."].join("");throw new Error(d)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var r=[],n=e;n;)r.push(n),t[n],n=t[n];return r.reverse(),r},find_path:function(t,e,r){var o=n.single_source_shortest_paths(t,e,r);return n.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(t){var e,r=n.PriorityQueue,o={};for(e in t=t||{},r)r.hasOwnProperty(e)&&(o[e]=r[e]);return o.queue=[],o.sorter=t.sorter||r.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var r={value:t,cost:e};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};void 0!==e&&(e.exports=n)},{}],32:[function(t,e,r){r.read=function(t,e,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,f=u>>1,c=-7,l=r?o-1:0,h=r?-1:1,p=t[e+l];for(l+=h,i=p&(1<<-c)-1,p>>=-c,c+=s;c>0;i=256*i+t[e+l],l+=h,c-=8);for(a=i&(1<<-c)-1,i>>=-c,c+=n;c>0;a=256*a+t[e+l],l+=h,c-=8);if(0===i)i=1-f;else{if(i===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),i-=f}return(p?-1:1)*a*Math.pow(2,i-n)},r.write=function(t,e,r,n,o,i){var a,s,u,f=8*i-o-1,c=(1<<f)-1,l=c>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=c?(s=0,a=c):a+l>=1?(s=(e*u-1)*Math.pow(2,o),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;t[r+p]=255&s,p+=d,s/=256,o-=8);for(a=a<<o|s,f+=o;f>0;t[r+p]=255&a,p+=d,a/=256,f-=8);t[r+p-d]|=128*g}},{}],33:[function(t,e,r){var n={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},{}]},{},[24])(24)},e.exports=n()}));return{name:"qrcode",props:{value:null,options:Object,tag:{type:String,default:"canvas"}},render:function(t){return t(this.tag,this.$slots.default)},watch:{$props:{deep:!0,immediate:!0,handler:function(){this.$el&&this.generate()}}},methods:{generate:function(){var t=this,r=this.options,n=this.tag,o=String(this.value);"canvas"===n?e.toCanvas(this.$el,o,r,(function(t){if(t)throw t})):"img"===n?e.toDataURL(o,r,(function(e,r){if(e)throw e;t.$el.src=r})):e.toString(o,r,(function(e,r){if(e)throw e;t.$el.innerHTML=r}))}},mounted:function(){this.generate()}}}()},9165:(t,e,r)=>{"use strict";r.d(e,{$BT:()=>f,Ckb:()=>c,EYN:()=>p,F5c:()=>g,Fzw:()=>y,KR_:()=>h,MXC:()=>d,NZC:()=>u,Tfj:()=>s,ZL5:()=>v,fEr:()=>l,lWO:()=>i,mbi:()=>n,qFD:()=>o,vrq:()=>a,zY6:()=>A});var n="M16.61 15.15C16.15 15.15 15.77 14.78 15.77 14.32S16.15 13.5 16.61 13.5H16.61C17.07 13.5 17.45 13.86 17.45 14.32C17.45 14.78 17.07 15.15 16.61 15.15M7.41 15.15C6.95 15.15 6.57 14.78 6.57 14.32C6.57 13.86 6.95 13.5 7.41 13.5H7.41C7.87 13.5 8.24 13.86 8.24 14.32C8.24 14.78 7.87 15.15 7.41 15.15M16.91 10.14L18.58 7.26C18.67 7.09 18.61 6.88 18.45 6.79C18.28 6.69 18.07 6.75 18 6.92L16.29 9.83C14.95 9.22 13.5 8.9 12 8.91C10.47 8.91 9 9.24 7.73 9.82L6.04 6.91C5.95 6.74 5.74 6.68 5.57 6.78C5.4 6.87 5.35 7.08 5.44 7.25L7.1 10.13C4.25 11.69 2.29 14.58 2 18H22C21.72 14.59 19.77 11.7 16.91 10.14H16.91Z",o="M2.09 16.8H3.75V9.76H2.09M2.92 8.84C3.44 8.84 3.84 8.44 3.84 7.94C3.84 7.44 3.44 7.04 2.92 7.04C2.4 7.04 2 7.44 2 7.94C2 8.44 2.4 8.84 2.92 8.84M9.25 7.06C6.46 7.06 4.7 8.96 4.7 12C4.7 15.06 6.46 16.96 9.25 16.96C12.04 16.96 13.8 15.06 13.8 12C13.8 8.96 12.04 7.06 9.25 7.06M9.25 8.5C10.96 8.5 12.05 9.87 12.05 12C12.05 14.15 10.96 15.5 9.25 15.5C7.54 15.5 6.46 14.15 6.46 12C6.46 9.87 7.54 8.5 9.25 8.5M14.5 14.11C14.57 15.87 16 16.96 18.22 16.96C20.54 16.96 22 15.82 22 14C22 12.57 21.18 11.77 19.23 11.32L18.13 11.07C16.95 10.79 16.47 10.42 16.47 9.78C16.47 9 17.2 8.45 18.28 8.45C19.38 8.45 20.13 9 20.21 9.89H21.84C21.8 8.2 20.41 7.06 18.29 7.06C16.21 7.06 14.73 8.21 14.73 9.91C14.73 11.28 15.56 12.13 17.33 12.53L18.57 12.82C19.78 13.11 20.27 13.5 20.27 14.2C20.27 15 19.47 15.57 18.31 15.57C17.15 15.57 16.26 15 16.16 14.11H14.5Z",i="M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12C4,14.09 4.8,16 6.11,17.41L9.88,9.88L17.41,6.11C16,4.8 14.09,4 12,4M12,20A8,8 0 0,0 20,12C20,9.91 19.2,8 17.89,6.59L14.12,14.12L6.59,17.89C8,19.2 9.91,20 12,20M12,12L11.23,11.23L9.7,14.3L12.77,12.77L12,12M12,17.5H13V19H12V17.5M15.88,15.89L16.59,15.18L17.65,16.24L16.94,16.95L15.88,15.89M17.5,12V11H19V12H17.5M12,6.5H11V5H12V6.5M8.12,8.11L7.41,8.82L6.35,7.76L7.06,7.05L8.12,8.11M6.5,12V13H5V12H6.5Z",a="M17,19H7V5H17M17,1H7C5.89,1 5,1.89 5,3V21A2,2 0 0,0 7,23H17A2,2 0 0,0 19,21V3C19,1.89 18.1,1 17,1Z",s="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",u="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M16.2,16.2L11,13V7H12.5V12.2L17,14.9L16.2,16.2Z",f="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z",c="M9.27 7.94C9.27 7.94 9.27 7.94 9.27 7.94M6.85 6.74C6.86 6.74 6.86 6.74 6.85 6.74M21.28 8.6C20.85 7.55 19.96 6.42 19.27 6.06C19.83 7.17 20.16 8.28 20.29 9.1L20.29 9.12C19.16 6.3 17.24 5.16 15.67 2.68C15.59 2.56 15.5 2.43 15.43 2.3C15.39 2.23 15.36 2.16 15.32 2.09C15.26 1.96 15.2 1.83 15.17 1.69C15.17 1.68 15.16 1.67 15.15 1.67H15.13L15.12 1.67L15.12 1.67L15.12 1.67C12.9 2.97 11.97 5.26 11.74 6.71C11.05 6.75 10.37 6.92 9.75 7.22C9.63 7.27 9.58 7.41 9.62 7.53C9.67 7.67 9.83 7.74 9.96 7.68C10.5 7.42 11.1 7.27 11.7 7.23L11.75 7.23C11.83 7.22 11.92 7.22 12 7.22C12.5 7.21 12.97 7.28 13.44 7.42L13.5 7.44C13.6 7.46 13.67 7.5 13.75 7.5C13.8 7.54 13.86 7.56 13.91 7.58L14.05 7.64C14.12 7.67 14.19 7.7 14.25 7.73C14.28 7.75 14.31 7.76 14.34 7.78C14.41 7.82 14.5 7.85 14.54 7.89C14.58 7.91 14.62 7.94 14.66 7.96C15.39 8.41 16 9.03 16.41 9.77C15.88 9.4 14.92 9.03 14 9.19C17.6 11 16.63 17.19 11.64 16.95C11.2 16.94 10.76 16.85 10.34 16.7C10.24 16.67 10.14 16.63 10.05 16.58C10 16.56 9.93 16.53 9.88 16.5C8.65 15.87 7.64 14.68 7.5 13.23C7.5 13.23 8 11.5 10.83 11.5C11.14 11.5 12 10.64 12.03 10.4C12.03 10.31 10.29 9.62 9.61 8.95C9.24 8.59 9.07 8.42 8.92 8.29C8.84 8.22 8.75 8.16 8.66 8.1C8.43 7.3 8.42 6.45 8.63 5.65C7.6 6.12 6.8 6.86 6.22 7.5H6.22C5.82 7 5.85 5.35 5.87 5C5.86 5 5.57 5.16 5.54 5.18C5.19 5.43 4.86 5.71 4.56 6C4.21 6.37 3.9 6.74 3.62 7.14C3 8.05 2.5 9.09 2.28 10.18C2.28 10.19 2.18 10.59 2.11 11.1L2.08 11.33C2.06 11.5 2.04 11.65 2 11.91L2 11.94L2 12.27L2 12.32C2 17.85 6.5 22.33 12 22.33C16.97 22.33 21.08 18.74 21.88 14C21.9 13.89 21.91 13.76 21.93 13.63C22.13 11.91 21.91 10.11 21.28 8.6Z",l="M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z",h="M12,20L15.46,14H15.45C15.79,13.4 16,12.73 16,12C16,10.8 15.46,9.73 14.62,9H19.41C19.79,9.93 20,10.94 20,12A8,8 0 0,1 12,20M4,12C4,10.54 4.39,9.18 5.07,8L8.54,14H8.55C9.24,15.19 10.5,16 12,16C12.45,16 12.88,15.91 13.29,15.77L10.89,19.91C7,19.37 4,16.04 4,12M15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9A3,3 0 0,1 15,12M12,4C14.96,4 17.54,5.61 18.92,8H12C10.06,8 8.45,9.38 8.08,11.21L5.7,7.08C7.16,5.21 9.44,4 12,4M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z",p="M7 14C5.9 14 5 13.1 5 12S5.9 10 7 10 9 10.9 9 12 8.1 14 7 14M12.6 10C11.8 7.7 9.6 6 7 6C3.7 6 1 8.7 1 12S3.7 18 7 18C9.6 18 11.8 16.3 12.6 14H16V18H20V14H23V10H12.6Z",d="M10.86 15.37C10.17 14.6 9.7 13.68 9.55 12.65C9.25 13.11 9 13.61 8.82 14.15C7.9 16.9 9.5 20.33 12.22 21.33C14.56 22.11 17.19 20.72 18.92 19.2C19.18 18.85 21.23 17.04 20.21 16.84C17.19 18.39 13.19 17.95 10.86 15.37M11.46 9.56C12.5 9.55 11.5 9.13 11.07 8.81C10.03 8.24 8.81 7.96 7.63 7.96C3.78 8 .995 10.41 2.3 14.4C3.24 18.28 6.61 21.4 10.59 21.9C8.54 20.61 7.3 18.19 7.3 15.78C7.38 13.25 8.94 10.28 11.46 9.56M2.78 8.24C5.82 6 10.66 6.18 13.28 9C14.3 10.11 15 12 14.07 13.37C12.33 15.25 17.15 15.5 18.18 15.22C21.92 14.5 22.91 10.15 21.13 7.15C19.43 3.75 15.66 1.97 11.96 2C7.9 1.93 4.25 4.5 2.78 8.24Z",g="M21,16H3V4H21M21,2H3C1.89,2 1,2.89 1,4V16A2,2 0 0,0 3,18H10V20H8V22H16V20H14V18H21A2,2 0 0,0 23,16V4C23,2.89 22.1,2 21,2Z",v="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z",y="M19,18H5V6H19M21,4H3C1.89,4 1,4.89 1,6V18A2,2 0 0,0 3,20H21A2,2 0 0,0 23,18V6C23,4.89 22.1,4 21,4Z",A="M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},42057:(e,r,n)=>{"use strict";var o=n(21777),i=n(65899),a=n(80284),s=n(85471),u=n(32981),f=n(53334),c=n(85168),l=n(56760),h=n(63814),p=n(65043);const d=(0,n(35947).YK)().setApp("settings").detectUser().build();n(51257);const g=(0,h.Jv)("/settings/personal/authtokens");var v;!function(t){t[t.TEMPORARY_TOKEN=0]="TEMPORARY_TOKEN",t[t.PERMANENT_TOKEN=1]="PERMANENT_TOKEN",t[t.WIPING_TOKEN=2]="WIPING_TOKEN"}(v||(v={}));const y=(0,i.nY)("auth-token",{state:()=>({tokens:(0,u.C)("settings","app_tokens",[])}),actions:{async updateToken(t){const{data:e}=await p.Ay.put(`${g}/${t.id}`,t);return e},async addToken(t){d.debug("Creating a new app token");try{await(0,l.C5)();const{data:e}=await p.Ay.post(g,{name:t});return this.tokens.push(e.deviceToken),d.debug("App token created"),e}catch(t){return null}},async deleteToken(t){d.debug("Deleting app token",{token:t}),this.tokens=this.tokens.filter((e=>{let{id:r}=e;return r!==t.id}));try{return await p.Ay.delete(`${g}/${t.id}`),d.debug("App token deleted"),!0}catch(e){d.error("Could not delete app token",{error:e}),(0,c.Qg)((0,f.Tl)("settings","Could not delete the app token")),this.tokens.push(t)}return!1},async wipeToken(t){d.debug("Wiping app token",{token:t});try{return await(0,l.C5)(),await new Promise((t=>{window.OC.dialogs.confirm((0,f.Tl)("settings","Do you really want to wipe your data from this device?"),(0,f.Tl)("settings","Confirm wipe"),t,!0)}))?(await p.Ay.post(`${g}/wipe/${t.id}`),d.debug("App token marked for wipe",{token:t}),t.type=v.WIPING_TOKEN,t.canRename=!1,!0):void d.debug("Wipe aborted by user")}catch(t){d.error("Could not wipe app token",{error:t}),(0,c.Qg)((0,f.Tl)("settings","Error while wiping the device with the token"))}return!1},async renameToken(t,e){d.debug(`renaming app token ${t.id} from ${t.name} to '${e}'`);const r=t.name;t.name=e;try{return await this.updateToken(t),d.debug("App token name updated"),!0}catch(e){d.error("Could not update app token name",{error:e}),(0,c.Qg)((0,f.Tl)("settings","Error while updating device token name")),t.name=r}return!1},async setTokenScope(t,e,r){d.debug("Updating app token scope",{token:t,scope:e,value:r});const n=t.scope[e];t.scope[e]=r;try{return await this.updateToken(t),d.debug("app token scope updated"),!0}catch(r){d.error("could not update app token scope",{error:r}),(0,c.Qg)((0,f.Tl)("settings","Error while updating device token scope")),t.scope[e]=n}return!1}}});var A=n(9165),m=n(24764),C=n(18503),w=n(14681),b=n(70995),k=n(4604),E=n(6695),T=n(82182);const _={ie:/(?:MSIE|Trident|Trident\/7.0; rv)[ :](\d+)/,edge:/^Mozilla\/5\.0 \([^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\) Chrome\/[0-9.]+ (?:Mobile Safari|Safari)\/[0-9.]+ Edge\/[0-9.]+$/,firefox:/^Mozilla\/5\.0 \([^)]*(Windows|OS X|Linux)[^)]+\) Gecko\/[0-9.]+ Firefox\/(\d+)(?:\.\d)?$/,chrome:/^Mozilla\/5\.0 \([^)]*(Windows|OS X|Linux)[^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\) Chrome\/(\d+)[0-9.]+ (?:Mobile Safari|Safari)\/[0-9.]+$/,safari:/^Mozilla\/5\.0 \([^)]*(Windows|OS X)[^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\)(?: Version\/([0-9]+)[0-9.]+)? Safari\/[0-9.A-Z]+$/,androidChrome:/Android.*(?:; (.*) Build\/).*Chrome\/(\d+)[0-9.]+/,iphone:/ *CPU +iPhone +OS +([0-9]+)_(?:[0-9_])+ +like +Mac +OS +X */,ipad:/\(iPad; *CPU +OS +([0-9]+)_(?:[0-9_])+ +like +Mac +OS +X */,iosClient:/^Mozilla\/5\.0 \(iOS\) (?:ownCloud|Nextcloud)-iOS.*$/,androidClient:/^Mozilla\/5\.0 \(Android\) (?:ownCloud|Nextcloud)-android.*$/,iosTalkClient:/^Mozilla\/5\.0 \(iOS\) Nextcloud-Talk.*$/,androidTalkClient:/^Mozilla\/5\.0 \(Android\) Nextcloud-Talk.*$/,davx5:/DAV(?:droid|x5)\/([^ ]+)/,webPirate:/(Sailfish).*WebPirate\/(\d+)/,sailfishBrowser:/(Sailfish).*SailfishBrowser\/(\d+)/,neon:/Neon \d+\.\d+\.\d+\+\d+/},B={edge:"Microsoft Edge",firefox:"Firefox",chrome:"Google Chrome",safari:"Safari",androidChrome:(0,f.Tl)("settings","Google Chrome for Android"),iphone:"iPhone",ipad:"iPad",iosClient:(0,f.Tl)("settings","{productName} iOS app",{productName:window.oc_defaults.productName}),androidClient:(0,f.Tl)("settings","{productName} Android app",{productName:window.oc_defaults.productName}),iosTalkClient:(0,f.Tl)("settings","{productName} Talk for iOS",{productName:window.oc_defaults.productName}),androidTalkClient:(0,f.Tl)("settings","{productName} Talk for Android",{productName:window.oc_defaults.productName}),syncClient:(0,f.Tl)("settings","Sync client"),davx5:"DAVx5",webPirate:"WebPirate",sailfishBrowser:"SailfishBrowser",neon:"Neon"},N=(0,s.pM)({name:"AuthToken",components:{NcActions:m.A,NcActionButton:C.A,NcActionCheckbox:w.N,NcButton:b.A,NcDateTime:k.A,NcIconSvgWrapper:E.A,NcTextField:T.A},props:{token:{type:Object,required:!0}},setup:()=>({authTokenStore:y()}),data:()=>({actionOpen:!1,renaming:!1,newName:"",oldName:"",mdiCheck:A.Tfj}),computed:{canChangeScope(){return this.token.type===v.PERMANENT_TOKEN},client(){const t=this.token.name.match(/Mozilla\/5\.0 \((\w+)\) (?:mirall|csyncoC)\/(\d+\.\d+\.\d+)/);if(t)return{id:"syncClient",os:t[1],version:t[2]};for(const t in _){const e=this.token.name.match(_[t]);if(e)return{id:t,os:e[2]&&e[1],version:e[2]??e[1]}}return null},tokenLastActivity(){return 1e3*this.token.lastActivity},tokenIcon(){if(this.token.type===v.PERMANENT_TOKEN)return A.EYN;switch(this.client?.id){case"edge":return A.MXC;case"firefox":return A.Ckb;case"chrome":return A.KR_;case"safari":return A.lWO;case"androidChrome":case"androidClient":case"androidTalkClient":return A.mbi;case"iphone":case"iosClient":case"iosTalkClient":return A.qFD;case"ipad":return A.Fzw;case"davx5":return A.vrq;case"syncClient":return A.F5c;default:return A.zY6}},tokenLabel(){if(this.token.current)return(0,f.Tl)("settings","This session");if(null===this.client)return this.token.name;const t=B[this.client.id];return this.client.os?(0,f.Tl)("settings","{client} - {version} ({system})",{client:t,system:this.client.os,version:this.client.version}):this.client.version?(0,f.Tl)("settings","{client} - {version}",{client:t,version:this.client.version}):t},wiping(){return this.token.type===v.WIPING_TOKEN}},methods:{t:f.Tl,updateFileSystemScope(t){this.authTokenStore.setTokenScope(this.token,"filesystem",t)},startRename(){this.actionOpen=!1,this.oldName=this.token.name,this.newName=this.token.name,this.renaming=!0,this.$nextTick((()=>{this.$refs.input.select()}))},cancelRename(){this.renaming=!1},revoke(){this.actionOpen=!1,this.authTokenStore.deleteToken(this.token)},rename(){this.renaming=!1,this.authTokenStore.renameToken(this.token,this.newName)},wipe(){this.actionOpen=!1,this.authTokenStore.wipeToken(this.token)}}});var M=n(85072),x=n.n(M),P=n(97825),L=n.n(P),S=n(77659),R=n.n(S),I=n(55056),O=n.n(I),U=n(10540),H=n.n(U),D=n(41113),j=n.n(D),Y=n(75896),F={};F.styleTagTransform=j(),F.setAttributes=O(),F.insert=R().bind(null,"head"),F.domAPI=L(),F.insertStyleElement=H(),x()(Y.A,F),Y.A&&Y.A.locals&&Y.A.locals;var V=n(14486);const z=(0,V.A)(N,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("tr",{class:["auth-token",{"auth-token--wiping":t.wiping}],attrs:{"data-id":t.token.id}},[e("td",{staticClass:"auth-token__name"},[e("NcIconSvgWrapper",{attrs:{path:t.tokenIcon}}),t._v(" "),e("div",{staticClass:"auth-token__name-wrapper"},[t.token.canRename&&t.renaming?e("form",{staticClass:"auth-token__name-form",on:{submit:function(e){return e.preventDefault(),e.stopPropagation(),t.rename.apply(null,arguments)}}},[e("NcTextField",{ref:"input",attrs:{value:t.newName,label:t.t("settings","Device name"),"show-trailing-button":!0,"trailing-button-label":t.t("settings","Cancel renaming")},on:{"update:value":function(e){t.newName=e},"trailing-button-click":t.cancelRename,keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.cancelRename.apply(null,arguments)}}}),t._v(" "),e("NcButton",{attrs:{"aria-label":t.t("settings","Save new name"),type:"tertiary","native-type":"submit"},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{path:t.mdiCheck}})]},proxy:!0}],null,!1,1018299955)})],1):e("span",[t._v(t._s(t.tokenLabel))]),t._v(" "),t.wiping?e("span",{staticClass:"wiping-warning"},[t._v("("+t._s(t.t("settings","Marked for remote wipe"))+")")]):t._e()])],1),t._v(" "),e("td",[e("NcDateTime",{staticClass:"auth-token__last-activity",attrs:{"ignore-seconds":!0,timestamp:t.tokenLastActivity}})],1),t._v(" "),e("td",{staticClass:"auth-token__actions"},[t.token.current?t._e():e("NcActions",{attrs:{title:t.t("settings","Device settings"),"aria-label":t.t("settings","Device settings"),open:t.actionOpen},on:{"update:open":function(e){t.actionOpen=e}}},[t.canChangeScope?e("NcActionCheckbox",{attrs:{checked:t.token.scope.filesystem},on:{"update:checked":t.updateFileSystemScope}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Allow filesystem access"))+"\n\t\t\t")]):t._e(),t._v(" "),t.token.canRename?e("NcActionButton",{attrs:{icon:"icon-rename"},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.startRename.apply(null,arguments)}}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Rename"))+"\n\t\t\t")]):t._e(),t._v(" "),t.token.canDelete?[2!==t.token.type?[e("NcActionButton",{attrs:{icon:"icon-delete"},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.revoke.apply(null,arguments)}}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("settings","Revoke"))+"\n\t\t\t\t\t")]),t._v(" "),e("NcActionButton",{attrs:{icon:"icon-delete"},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.wipe.apply(null,arguments)}}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("settings","Wipe device"))+"\n\t\t\t\t\t")])]:2===t.token.type?e("NcActionButton",{attrs:{icon:"icon-delete",name:t.t("settings","Revoke")},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.revoke.apply(null,arguments)}}},[t._v("\n\t\t\t\t\t"+t._s(t.t("settings","Revoking this token might prevent the wiping of your device if it has not started the wipe yet."))+"\n\t\t\t\t")]):t._e()]:t._e()],2)],1)])}),[],!1,null,"687333ac",null).exports,$=(0,s.pM)({name:"AuthTokenList",components:{AuthToken:z},setup:()=>({authTokenStore:y()}),computed:{sortedTokens(){return[...this.authTokenStore.tokens].sort(((t,e)=>e.lastActivity-t.lastActivity))}},methods:{t:f.Tl}});var K=n(26895),q={};q.styleTagTransform=j(),q.setAttributes=O(),q.insert=R().bind(null,"head"),q.domAPI=L(),q.insertStyleElement=H(),x()(K.A,q),K.A&&K.A.locals&&K.A.locals;const W=(0,V.A)($,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("table",{staticClass:"token-list",attrs:{id:"app-tokens-table"}},[e("thead",[e("tr",[e("th",{staticClass:"token-list__header-device"},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Device"))+"\n\t\t\t")]),t._v(" "),e("th",{staticClass:"toke-list__header-activity"},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Last activity"))+"\n\t\t\t")]),t._v(" "),e("th",[e("span",{staticClass:"hidden-visually"},[t._v("\n\t\t\t\t\t"+t._s(t.t("settings","Actions"))+"\n\t\t\t\t")])])])]),t._v(" "),e("tbody",{staticClass:"token-list__body"},t._l(t.sortedTokens,(function(t){return e("AuthToken",{key:t.id,attrs:{token:t}})})),1)])}),[],!1,null,"aa293ed2",null).exports;var Q=n(17816),J=n.n(Q),Z=n(94219);const G=(0,s.pM)({name:"AuthTokenSetupDialog",components:{NcButton:b.A,NcDialog:Z.A,NcIconSvgWrapper:E.A,NcTextField:T.A,QR:J()},props:{token:{type:Object,required:!1,default:null}},data:()=>({isNameCopied:!1,isPasswordCopied:!1,showQRCode:!1}),computed:{open:{get(){return null!==this.token},set(t){t||this.$emit("close")}},copyPasswordIcon(){return this.isPasswordCopied?A.Tfj:A.$BT},copyNameIcon(){return this.isNameCopied?A.Tfj:A.$BT},appPassword(){return this.token?.token??""},loginName(){return this.token?.loginName??""},qrUrl(){const t=window.location.protocol+"//"+window.location.host+(0,h.aU)();return`nc://login/user:${this.loginName}&password:${this.appPassword}&server:${t}`},copyPasswordLabel(){return this.isPasswordCopied?(0,f.Tl)("settings","App password copied!"):(0,f.Tl)("settings","Copy app password")},copyLoginNameLabel(){return this.isNameCopied?(0,f.Tl)("settings","Login name copied!"):(0,f.Tl)("settings","Copy login name")}},watch:{token(){this.showQRCode=!1},open(){this.open&&this.$nextTick((()=>{this.$refs.appPassword.select()}))}},methods:{t:f.Tl,async copyPassword(){try{await navigator.clipboard.writeText(this.appPassword),this.isPasswordCopied=!0}catch(t){this.isPasswordCopied=!1,d.error(t),(0,c.Qg)((0,f.Tl)("settings","Could not copy app password. Please copy it manually."))}finally{setTimeout((()=>{this.isPasswordCopied=!1}),4e3)}},async copyLoginName(){try{await navigator.clipboard.writeText(this.loginName),this.isNameCopied=!0}catch(t){this.isNameCopied=!1,d.error(t),(0,c.Qg)((0,f.Tl)("settings","Could not copy login name. Please copy it manually."))}finally{setTimeout((()=>{this.isNameCopied=!1}),4e3)}}}});var X=n(73058),tt={};tt.styleTagTransform=j(),tt.setAttributes=O(),tt.insert=R().bind(null,"head"),tt.domAPI=L(),tt.insertStyleElement=H(),x()(X.A,tt),X.A&&X.A.locals&&X.A.locals;const et=(0,V.A)(G,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcDialog",{attrs:{open:t.open,name:t.t("settings","New app password"),"content-classes":"token-dialog"},on:{"update:open":function(e){t.open=e}}},[e("p",[t._v("\n\t\t"+t._s(t.t("settings","Use the credentials below to configure your app or device. For security reasons this password will only be shown once."))+"\n\t")]),t._v(" "),e("div",{staticClass:"token-dialog__name"},[e("NcTextField",{attrs:{label:t.t("settings","Login"),value:t.loginName,readonly:""}}),t._v(" "),e("NcButton",{attrs:{type:"tertiary",title:t.copyLoginNameLabel,"aria-label":t.copyLoginNameLabel},on:{click:t.copyLoginName},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{path:t.copyNameIcon}})]},proxy:!0}])})],1),t._v(" "),e("div",{staticClass:"token-dialog__password"},[e("NcTextField",{ref:"appPassword",attrs:{label:t.t("settings","Password"),value:t.appPassword,readonly:""}}),t._v(" "),e("NcButton",{attrs:{type:"tertiary",title:t.copyPasswordLabel,"aria-label":t.copyPasswordLabel},on:{click:t.copyPassword},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{path:t.copyPasswordIcon}})]},proxy:!0}])})],1),t._v(" "),e("div",{staticClass:"token-dialog__qrcode"},[t.showQRCode?e("QR",{attrs:{value:t.qrUrl}}):e("NcButton",{on:{click:function(e){t.showQRCode=!0}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Show QR code for mobile apps"))+"\n\t\t")])],1)])}),[],!1,null,"e930f266",null).exports,rt=(0,s.pM)({name:"AuthTokenSetup",components:{NcButton:b.A,NcTextField:T.A,AuthTokenSetupDialog:et},setup:()=>({authTokenStore:y()}),data:()=>({deviceName:"",loading:!1,newToken:null}),methods:{t:f.Tl,reset(){this.loading=!1,this.deviceName="",this.newToken=null},async submit(){try{this.loading=!0,this.newToken=await this.authTokenStore.addToken(this.deviceName)}catch(t){d.error(t),(0,c.Qg)((0,f.Tl)("settings","Error while creating device token")),this.reset()}finally{this.loading=!1}}}});var nt=n(29536),ot={};ot.styleTagTransform=j(),ot.setAttributes=O(),ot.insert=R().bind(null,"head"),ot.domAPI=L(),ot.insertStyleElement=H(),x()(nt.A,ot),nt.A&&nt.A.locals&&nt.A.locals;const it=(0,V.A)(rt,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("form",{staticClass:"row spacing",attrs:{id:"generate-app-token-section"},on:{submit:function(e){return e.preventDefault(),t.submit.apply(null,arguments)}}},[e("NcTextField",{staticClass:"app-name-text-field",attrs:{value:t.deviceName,type:"text",maxlength:120,disabled:t.loading,label:t.t("settings","App name"),placeholder:t.t("settings","App name")},on:{"update:value":function(e){t.deviceName=e}}}),t._v(" "),e("NcButton",{attrs:{type:"primary",disabled:t.loading||0===t.deviceName.length,"native-type":"submit"}},[t._v("\n\t\t"+t._s(t.t("settings","Create new app password"))+"\n\t")]),t._v(" "),e("AuthTokenSetupDialog",{attrs:{token:t.newToken},on:{close:function(e){t.newToken=null}}})],1)}),[],!1,null,"5c2b68c6",null).exports,at=(0,s.pM)({name:"AuthTokenSection",components:{AuthTokenList:W,AuthTokenSetup:it},data:()=>({canCreateToken:(0,u.C)("settings","can_create_app_token")}),methods:{t:f.Tl}}),st=(0,V.A)(at,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("div",{staticClass:"section",attrs:{id:"security"}},[e("h2",[t._v(t._s(t.t("settings","Devices & sessions",{},void 0,{sanitize:!1})))]),t._v(" "),e("p",{staticClass:"settings-hint hidden-when-empty"},[t._v("\n\t\t"+t._s(t.t("settings","Web, desktop and mobile clients currently logged in to your account."))+"\n\t")]),t._v(" "),e("AuthTokenList"),t._v(" "),t.canCreateToken?e("AuthTokenSetup"):t._e()],1)}),[],!1,null,null,null).exports;n.nc=(0,o.aV)();const ut=(0,i.Ey)();s.Ay.use(i.R2),s.Ay.use(a.Ay,{defaultHtml:!1}),s.Ay.prototype.t=t,new(s.Ay.extend(st))({pinia:ut}).$mount("#security-authtokens")},75896:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(71354),o=r.n(n),i=r(76314),a=r.n(i)()(o());a.push([t.id,".auth-token[data-v-687333ac]{border-top:2px solid var(--color-border);max-width:200px;white-space:normal;vertical-align:middle;position:relative}.auth-token--wiping[data-v-687333ac]{background-color:var(--color-background-dark)}.auth-token__name[data-v-687333ac]{padding-block:10px;display:flex;align-items:center;gap:6px;min-width:355px}.auth-token__name-wrapper[data-v-687333ac]{display:flex;flex-direction:column}.auth-token__name-form[data-v-687333ac]{align-items:end;display:flex;gap:4px}.auth-token__actions[data-v-687333ac]{padding:0 10px}.auth-token__last-activity[data-v-687333ac]{padding-inline-start:10px}.auth-token .wiping-warning[data-v-687333ac]{color:var(--color-text-maxcontrast)}","",{version:3,sources:["webpack://./apps/settings/src/components/AuthToken.vue"],names:[],mappings:"AACA,6BACC,wCAAA,CACA,eAAA,CACA,kBAAA,CACA,qBAAA,CACA,iBAAA,CAEA,qCACC,6CAAA,CAGD,mCACC,kBAAA,CACA,YAAA,CACA,kBAAA,CACA,OAAA,CACA,eAAA,CAGD,2CACC,YAAA,CACA,qBAAA,CAGD,wCACC,eAAA,CACA,YAAA,CACA,OAAA,CAGD,sCACC,cAAA,CAGD,4CACC,yBAAA,CAGD,6CACC,mCAAA",sourceRoot:""}]);const s=a},26895:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(71354),o=r.n(n),i=r(76314),a=r.n(i)()(o());a.push([t.id,".token-list[data-v-aa293ed2]{width:100%;min-height:50px;padding-top:5px;max-width:fit-content}.token-list th[data-v-aa293ed2]{padding-block:10px;padding-inline-start:10px}.token-list .token-list__header-device[data-v-aa293ed2]{padding-inline-start:50px}.token-list__header-activity[data-v-aa293ed2]{text-align:end}","",{version:3,sources:["webpack://./apps/settings/src/components/AuthTokenList.vue"],names:[],mappings:"AACA,6BACC,UAAA,CACA,eAAA,CACA,eAAA,CACA,qBAAA,CAEA,gCACC,kBAAA,CACA,yBAAA,CAGD,wDACC,yBAAA,CAED,8CACC,cAAA",sourceRoot:""}]);const s=a},29536:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(71354),o=r.n(n),i=r(76314),a=r.n(i)()(o());a.push([t.id,".app-name-text-field[data-v-5c2b68c6]{height:44px !important;padding-inline-start:12px;margin-inline-end:12px;width:200px}.row[data-v-5c2b68c6]{display:flex;align-items:center}.spacing[data-v-5c2b68c6]{padding-top:16px}","",{version:3,sources:["webpack://./apps/settings/src/components/AuthTokenSetup.vue"],names:[],mappings:"AACA,sCACC,sBAAA,CACA,yBAAA,CACA,sBAAA,CACA,WAAA,CAGD,sBACC,YAAA,CACA,kBAAA,CAGD,0BACC,gBAAA",sourceRoot:""}]);const s=a},73058:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(71354),o=r.n(n),i=r(76314),a=r.n(i)()(o());a.push([t.id,"[data-v-e930f266] .token-dialog{display:flex;flex-direction:column;gap:12px;padding-inline:22px;padding-block-end:20px}[data-v-e930f266] .token-dialog>*{box-sizing:border-box}.token-dialog__name[data-v-e930f266],.token-dialog__password[data-v-e930f266]{align-items:end;display:flex;gap:10px}.token-dialog__name[data-v-e930f266] input,.token-dialog__password[data-v-e930f266] input{font-family:monospace}.token-dialog__qrcode[data-v-e930f266]{display:flex;justify-content:center}","",{version:3,sources:["webpack://./apps/settings/src/components/AuthTokenSetupDialog.vue"],names:[],mappings:"AACA,gCACC,YAAA,CACA,qBAAA,CACA,QAAA,CAEA,mBAAA,CACA,sBAAA,CAEA,kCACC,qBAAA,CAKD,8EACC,eAAA,CACA,YAAA,CACA,QAAA,CAEA,0FACC,qBAAA,CAIF,uCACC,YAAA,CACA,sBAAA",sourceRoot:""}]);const s=a}},i={};function a(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={id:t,loaded:!1,exports:{}};return o[t].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.m=o,e=[],a.O=(t,r,n,o)=>{if(!r){var i=1/0;for(c=0;c<e.length;c++){r=e[c][0],n=e[c][1],o=e[c][2];for(var s=!0,u=0;u<r.length;u++)(!1&o||i>=o)&&Object.keys(a.O).every((t=>a.O[t](r[u])))?r.splice(u--,1):(s=!1,o<i&&(i=o));if(s){e.splice(c--,1);var f=n();void 0!==f&&(t=f)}}return t}o=o||0;for(var c=e.length;c>0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[r,n,o]},a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var r in e)a.o(e,r)&&!a.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},a.f={},a.e=t=>Promise.all(Object.keys(a.f).reduce(((e,r)=>(a.f[r](t,e),e)),[])),a.u=t=>t+"-"+t+".js?v="+{5706:"3153330af47fc26a725a",6127:"40fbb3532bb7846b7035"}[t],a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r={},n="nextcloud:",a.l=(t,e,o,i)=>{if(r[t])r[t].push(e);else{var s,u;if(void 0!==o)for(var f=document.getElementsByTagName("script"),c=0;c<f.length;c++){var l=f[c];if(l.getAttribute("src")==t||l.getAttribute("data-webpack")==n+o){s=l;break}}s||(u=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",n+o),s.src=t),r[t]=[e];var h=(e,n)=>{s.onerror=s.onload=null,clearTimeout(p);var o=r[t];if(delete r[t],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((t=>t(n))),e)return e(n)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),u&&document.head.appendChild(s)}},a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),a.j=2131,(()=>{var t;a.g.importScripts&&(t=a.g.location+"");var e=a.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=r[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=t})(),(()=>{a.b=document.baseURI||self.location.href;var t={2131:0};a.f.j=(e,r)=>{var n=a.o(t,e)?t[e]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise(((r,o)=>n=t[e]=[r,o]));r.push(n[2]=o);var i=a.p+a.u(e),s=new Error;a.l(i,(r=>{if(a.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;s.message="Loading chunk "+e+" failed.\n("+o+": "+i+")",s.name="ChunkLoadError",s.type=o,s.request=i,n[1](s)}}),"chunk-"+e,e)}},a.O.j=e=>0===t[e];var e=(e,r)=>{var n,o,i=r[0],s=r[1],u=r[2],f=0;if(i.some((e=>0!==t[e]))){for(n in s)a.o(s,n)&&(a.m[n]=s[n]);if(u)var c=u(a)}for(e&&e(r);f<i.length;f++)o=i[f],a.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return a.O(c)},r=self.webpackChunknextcloud=self.webpackChunknextcloud||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))})(),a.nc=void 0;var s=a.O(void 0,[4208],(()=>a(42057)));s=a.O(s)})();
- //# sourceMappingURL=settings-vue-settings-personal-security.js.map?v=a8589db8d42ceb3ca54f
|