UNPKG

@metamask/sdk-install-modal-web

Version:
18 lines (16 loc) 48.2 kB
import{h as n,r as t,c as e,g as i}from"./p-4739b8e2.js";const o={fontFamily:"Roboto, sans-serif"};const r=({className:t},e)=>n("div",{style:o,class:t},e);const s=({Icon:t,text:e})=>n("div",{class:"flexContainer",style:{padding:"6",flexDirection:"row"}},n("div",{class:"flexItem1"},n(t,null)),n("div",{class:"flexItem11"},n("span",{style:{lineHeight:"2",color:"black"}},e)));const l=()=>n("svg",{width:"20",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n("path",{d:"M20.0002 7.9702V10.0302C20.0002 10.5802 19.5602 11.0302 19.0002 11.0502H17.0402C15.9602 11.0502 14.9702 10.2602 14.8802 9.1802C14.8202 8.5502 15.0602 7.9602 15.4802 7.5502C15.8502 7.1702 16.3602 6.9502 16.9202 6.9502H19.0002C19.5602 6.9702 20.0002 7.4202 20.0002 7.9702Z",fill:"#037DD6"}),n("path",{d:"M18.47 12.55H17.04C15.14 12.55 13.54 11.12 13.38 9.3C13.29 8.26 13.67 7.22 14.43 6.48C15.07 5.82 15.96 5.45 16.92 5.45H18.47C18.76 5.45 19 5.21 18.97 4.92C18.75 2.49 17.14 0.83 14.75 0.55C14.51 0.51 14.26 0.5 14 0.5H5C4.72 0.5 4.45 0.52 4.19 0.56C1.64 0.88 0 2.78 0 5.5V12.5C0 15.26 2.24 17.5 5 17.5H14C16.8 17.5 18.73 15.75 18.97 13.08C19 12.79 18.76 12.55 18.47 12.55ZM11 6.75H5C4.59 6.75 4.25 6.41 4.25 6C4.25 5.59 4.59 5.25 5 5.25H11C11.41 5.25 11.75 5.59 11.75 6C11.75 6.41 11.41 6.75 11 6.75Z",fill:"#037DD6"}));const a=()=>n("svg",{width:"20",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n("path",{d:"M14.44 0.0999756C12.63 0.0999756 11.01 0.979976 10 2.32998C8.99 0.979976 7.37 0.0999756 5.56 0.0999756C2.49 0.0999756 0 2.59998 0 5.68998C0 6.87998 0.19 7.97998 0.52 8.99998C2.1 14 6.97 16.99 9.38 17.81C9.72 17.93 10.28 17.93 10.62 17.81C13.03 16.99 17.9 14 19.48 8.99998C19.81 7.97998 20 6.87998 20 5.68998C20 2.59998 17.51 0.0999756 14.44 0.0999756Z",fill:"#037DD6"}));const c=()=>n("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n("path",{d:"M16.28 7.53V6.28C16.28 3.58 15.63 0 10 0C4.37 0 3.72 3.58 3.72 6.28V7.53C0.92 7.88 0 9.3 0 12.79V14.65C0 18.75 1.25 20 5.35 20H14.65C18.75 20 20 18.75 20 14.65V12.79C20 9.3 19.08 7.88 16.28 7.53ZM10 16.74C8.33 16.74 6.98 15.38 6.98 13.72C6.98 12.05 8.34 10.7 10 10.7C11.66 10.7 13.02 12.06 13.02 13.72C13.02 15.39 11.67 16.74 10 16.74ZM5.35 7.44C5.27 7.44 5.2 7.44 5.12 7.44V6.28C5.12 3.35 5.95 1.4 10 1.4C14.05 1.4 14.88 3.35 14.88 6.28V7.45C14.8 7.45 14.73 7.45 14.65 7.45H5.35V7.44Z",fill:"#037DD6"}));const d=()=>n("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n("path",{d:"M16.4405 8.8999C20.0405 9.2099 21.5105 11.0599 21.5105 15.1099V15.2399C21.5105 19.7099 19.7205 21.4999 15.2505 21.4999H8.74047C4.27047 21.4999 2.48047 19.7099 2.48047 15.2399V15.1099C2.48047 11.0899 3.93047 9.2399 7.47047 8.9099",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M12 2V14.88",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M15.3504 12.6499L12.0004 15.9999L8.65039 12.6499",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}));function h({version:t}){return n("div",{style:{textAlign:"center",color:"#BBC0C5",fontSize:"12"}},"SDK Version ",t?`v${t}`:`unknown`)}const f=()=>n("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n("rect",{width:"16",height:"16",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.40554 2.40554C2.94627 1.86482 3.82296 1.86482 4.36369 2.40554L8 6.04186L11.6363 2.40554C12.177 1.86482 13.0537 1.86482 13.5945 2.40554C14.1352 2.94627 14.1352 3.82296 13.5945 4.36369L9.95814 8L13.5945 11.6363C14.1352 12.177 14.1352 13.0537 13.5945 13.5945C13.0537 14.1352 12.177 14.1352 11.6363 13.5945L8 9.95814L4.36369 13.5945C3.82296 14.1352 2.94627 14.1352 2.40554 13.5945C1.86482 13.0537 1.86482 12.177 2.40554 11.6363L6.04186 8L2.40554 4.36369C1.86482 3.82296 1.86482 2.94627 2.40554 2.40554Z",fill:"#BBC0C5"}));const u=()=>n("svg",{width:"120",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 127 63"},n("path",{fill:"currentColor",d:"M71.554 48.607v13.81h-7.072v-9.568l-8.059.945c-1.77.205-2.548.79-2.548 1.864 0 1.575 1.478 2.239 4.648 2.239 1.932 0 4.073-.29 5.963-.79l-3.66 5.225c-1.479.332-2.92.496-4.44.496-6.414 0-10.074-2.57-10.074-7.132 0-4.023 2.877-6.136 9.416-6.884l8.638-1.012c-.467-2.532-2.362-3.633-6.13-3.633-3.537 0-7.443.912-10.937 2.613l1.111-6.18c3.248-1.369 6.95-2.074 10.69-2.074 8.226 0 12.461 3.444 12.461 10.075l-.008.005ZM7.938 31.315.208 62.416h7.73l3.836-15.628 6.65 8.039h8.06l6.65-8.039 3.836 15.628h7.73l-7.73-31.105-14.518 17.388L7.934 31.311l.004.004ZM36.97.21 22.452 17.598 7.938.21.208 31.315h7.73l3.836-15.628 6.65 8.039h8.06l6.65-8.039 3.836 15.628h7.73L36.97.21Zm53.17 48.107-6.25-.912c-1.562-.247-2.178-.747-2.178-1.617 0-1.41 1.52-2.032 4.647-2.032 3.62 0 6.868.747 10.283 2.364l-.862-6.094c-2.757-.995-5.922-1.491-9.212-1.491-7.688 0-11.886 2.696-11.886 7.547 0 3.776 2.303 5.889 7.196 6.636l6.335.954c1.603.248 2.261.87 2.261 1.865 0 1.41-1.478 2.074-4.481 2.074-3.948 0-8.225-.953-11.72-2.654l.7 6.094c3.003 1.122 6.91 1.785 10.57 1.785 7.896 0 12.007-2.78 12.007-7.715 0-3.94-2.303-6.057-7.4-6.8l-.01-.004ZM100.3 34.09v28.325h7.071V34.091H100.3Zm15.334 15.595 9.833-10.744h-8.8l-9.296 11.114 9.912 12.356h8.925l-10.574-12.73v.004Zm-16.321-25.09c0 4.56 3.66 7.13 10.074 7.13 1.52 0 2.961-.167 4.44-.495l3.66-5.225c-1.89.496-4.031.79-5.963.79-3.166 0-4.648-.664-4.648-2.239 0-1.079.783-1.659 2.549-1.864l8.058-.945v9.567h7.072v-13.81c0-6.635-4.236-10.075-12.461-10.075-3.744 0-7.442.705-10.691 2.075l-1.112 6.178c3.495-1.701 7.401-2.613 10.937-2.613 3.769 0 5.664 1.1 6.13 3.633l-8.637 1.013c-6.539.747-9.417 2.86-9.417 6.883l.009-.004Zm-19.779-1.492c0 5.725 3.29 8.627 9.787 8.627 2.59 0 4.732-.416 6.785-1.37l.903-6.261c-1.974 1.2-3.99 1.822-6.005 1.822-3.044 0-4.402-1.243-4.402-4.023v-8.295h10.732V7.84H86.601V2.948l-13.448 7.174v3.482h6.372V23.1l.008.004Zm-6.95-2.612v1.411H53.47c.862 2.873 3.423 4.187 7.97 4.187 3.62 0 6.993-.747 9.992-2.196l-.862 6.056c-2.757 1.16-6.251 1.785-9.829 1.785-9.5 0-14.68-4.23-14.68-12.066 0-7.838 5.264-12.235 13.406-12.235s13.119 4.771 13.119 13.062l-.005-.004ZM53.378 17.09h12.086c-.637-2.751-2.732-4.188-6.08-4.188-3.349 0-5.335 1.399-6.006 4.188Z"})) /*! Copyright (c) 2023 Paul Miller (paulmillr.com) The library @paulmillr/qr is dual-licensed under the Apache 2.0 OR MIT license. You can select a license of your choice. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */;function p(n){if(!Number.isSafeInteger(n))throw new Error(`Wrong integer: ${n}`)}function g(n){if(!Number.isSafeInteger(n)||n<1||n>40)throw new Error(`Invalid version=${n}. Expected number [1..40]`)}function x(n,t){return n.toString(2).padStart(t,"0")}function m(n,t){const e=n%t;return e>=0?e:t+e}function w(n,t){return new Array(n).fill(t)}function b(...n){let t=0;for(const e of n)t=Math.max(t,e.length);const e=[];for(let i=0;i<t;i++){for(const t of n){if(i>=t.length)continue;e.push(t[i])}}return new Uint8Array(e)}function y(n,t,e){if(e<0||e+t.length>n.length)return false;for(let i=0;i<t.length;i++)if(t[i]!==n[e+i])return false;return true}function C(){let n;let t=Infinity;return{add(e,i){if(e>=t)return;n=i;t=e},get:()=>n,score:()=>t}}function L(n){return{has:t=>n.includes(t),decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!=="string")throw new Error("alphabet.decode input should be array of strings");return t.map((t=>{if(typeof t!=="string")throw new Error(`alphabet.decode: not string element=${t}`);const e=n.indexOf(t);if(e===-1)throw new Error(`Unknown letter: "${t}". Allowed: ${n}`);return e}))},encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!=="number")throw new Error("alphabet.encode input should be an array of numbers");return t.map((t=>{p(t);if(t<0||t>=n.length)throw new Error(`Digit index outside alphabet: ${t} (alphabet: ${n.length})`);return n[t]}))}}}class v{static size(n,t){if(typeof n==="number")n={height:n,width:n};if(!Number.isSafeInteger(n.height)&&n.height!==Infinity)throw new Error(`Bitmap: wrong height=${n.height} (${typeof n.height})`);if(!Number.isSafeInteger(n.width)&&n.width!==Infinity)throw new Error(`Bitmap: wrong width=${n.width} (${typeof n.width})`);if(t!==undefined){n={width:Math.min(n.width,t.width),height:Math.min(n.height,t.height)}}return n}static fromString(n){n=n.replace(/^\n+/g,"").replace(/\n+$/g,"");const t=n.split("\n");const e=t.length;const i=new Array(e);let o;for(const n of t){const t=n.split("").map((n=>{if(n==="X")return true;if(n===" ")return false;if(n==="?")return undefined;throw new Error(`Bitmap.fromString: unknown symbol=${n}`)}));if(o&&t.length!==o)throw new Error(`Bitmap.fromString different row sizes: width=${o} cur=${t.length}`);o=t.length;i.push(t)}if(!o)o=0;return new v({height:e,width:o},i)}constructor(n,t){const{height:e,width:i}=v.size(n);this.data=t||Array.from({length:e},(()=>w(i,undefined)));this.height=e;this.width=i}point(n){return this.data[n.y][n.x]}isInside(n){return 0<=n.x&&n.x<this.width&&0<=n.y&&n.y<this.height}size(n){if(!n)return{height:this.height,width:this.width};const{x:t,y:e}=this.xy(n);return{height:this.height-e,width:this.width-t}}xy(n){if(typeof n==="number")n={x:n,y:n};if(!Number.isSafeInteger(n.x))throw new Error(`Bitmap: wrong x=${n.x}`);if(!Number.isSafeInteger(n.y))throw new Error(`Bitmap: wrong y=${n.y}`);n.x=m(n.x,this.width);n.y=m(n.y,this.height);return n}rect(n,t,e){const{x:i,y:o}=this.xy(n);const{height:r,width:s}=v.size(t,this.size({x:i,y:o}));for(let n=0;n<r;n++){for(let t=0;t<s;t++){this.data[o+n][i+t]=typeof e==="function"?e({x:t,y:n},this.data[o+n][i+t]):e}}return this}rectRead(n,t,e){return this.rect(n,t,((n,t)=>{e(n,t);return t}))}hLine(n,t,e){return this.rect(n,{width:t,height:1},e)}vLine(n,t,e){return this.rect(n,{width:1,height:t},e)}border(n=2,t){const e=this.height+2*n;const i=this.width+2*n;const o=w(n,t);const r=Array.from({length:n},(()=>w(i,t)));return new v({height:e,width:i},[...r,...this.data.map((n=>[...o,...n,...o])),...r])}embed(n,t){return this.rect(n,t.size(),(({x:n,y:e})=>t.data[e][n]))}rectSlice(n,t=this.size()){const e=new v(v.size(t,this.size(this.xy(n))));this.rect(n,t,(({x:n,y:t},i)=>e.data[t][n]=i));return e}inverse(){const{height:n,width:t}=this;const e=new v({height:t,width:n});return e.rect({x:0,y:0},Infinity,(({x:n,y:t})=>this.data[n][t]))}scale(n){if(!Number.isSafeInteger(n)||n>1024)throw new Error(`Wrong scale factor: ${n}`);const{height:t,width:e}=this;const i=new v({height:n*t,width:n*e});return i.rect({x:0,y:0},Infinity,(({x:t,y:e})=>this.data[Math.floor(e/n)][Math.floor(t/n)]))}clone(){const n=new v(this.size());return n.rect({x:0,y:0},this.size(),(({x:n,y:t})=>this.data[t][n]))}assertDrawn(){this.rectRead(0,Infinity,((n,t)=>{if(typeof t!=="boolean")throw new Error(`Invalid color type=${typeof t}`)}))}toString(){return this.data.map((n=>n.map((n=>n===undefined?"?":n?"X":" ")).join(""))).join("\n")}toASCII(){const{height:n,width:t,data:e}=this;let i="";for(let o=0;o<n;o+=2){for(let r=0;r<t;r++){const t=e[o][r];const s=o+1>=n?true:e[o+1][r];if(!t&&!s)i+="█";else if(!t&&s)i+="▀";else if(t&&!s)i+="▄";else if(t&&s)i+=" "}i+="\n"}return i}toTerm(){const n="";const t=` ${n}`;const e=` ${n}`;return this.data.map((n=>n.map((n=>n?e:t)).join(""))).join("\n")}toSVG(){let n=`<svg xmlns:svg="http://www.w3.org/2000/svg" viewBox="0 0 ${this.width} ${this.height}" version="1.1" xmlns="http://www.w3.org/2000/svg">`;this.rectRead(0,Infinity,(({x:t,y:e},i)=>{if(i)n+=`<rect x="${t}" y="${e}" width="1" height="1" />`}));n+="</svg>";return n}toGIF(){const n=n=>[n&255,n>>>8&255];const t=[...n(this.width),...n(this.height)];const e=[];this.rectRead(0,Infinity,((n,t)=>e.push(+(t===true))));const i=126;const o=[71,73,70,56,55,97,...t,246,0,0,255,255,255,...w(3*127,0),44,0,0,0,0,...t,0,7];const r=Math.floor(e.length/i);for(let n=0;n<r;n++)o.push(i+1,128,...e.slice(i*n,i*(n+1)).map((n=>+n)));o.push(e.length%i+1,128,...e.slice(r*i).map((n=>+n)));o.push(1,129,0,59);return new Uint8Array(o)}toImage(n=false){const{height:t,width:e}=this.size();const i=new Uint8Array(t*e*(n?3:4));let o=0;for(let r=0;r<t;r++){for(let t=0;t<e;t++){const e=!!this.data[r][t]?0:255;i[o++]=e;i[o++]=e;i[o++]=e;if(!n)i[o++]=255}}return{height:t,width:e,data:i}}}const E=["low","medium","quartile","high"];const k=["numeric","alphanumeric","byte","kanji","eci"];const M=[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];const T={low:[7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],medium:[10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],quartile:[13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],high:[17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]};const _={low:[1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],medium:[1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],quartile:[1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],high:[1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]};const A={size:{encode:n=>21+4*(n-1),decode:n=>(n-17)/4},sizeType:n=>Math.floor((n+7)/17),alignmentPatterns(n){if(n===1)return[];const t=6;const e=A.size.encode(n)-t-1;const i=e-t;const o=Math.ceil(i/28);let r=Math.floor(i/o);if(r%2)r+=1;else if(i%o*2>=o)r+=2;const s=[t];for(let n=1;n<o;n++)s.push(e-(o-n)*r);s.push(e);return s},ECCode:{low:1,medium:0,quartile:3,high:2},formatMask:21522,formatBits(n,t){const e=A.ECCode[n]<<3|t;let i=e;for(let n=0;n<10;n++)i=i<<1^(i>>9)*1335;return(e<<10|i)^A.formatMask},versionBits(n){let t=n;for(let n=0;n<12;n++)t=t<<1^(t>>11)*7973;return n<<12|t},alphabet:{numeric:L("0123456789"),alphanumerc:L("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:")},lengthBits(n,t){const e={numeric:[10,12,14],alphanumeric:[9,11,13],byte:[8,16,16],kanji:[8,10,12],eci:[0,0,0]};return e[t][A.sizeType(n)]},modeBits:{numeric:"0001",alphanumeric:"0010",byte:"0100",kanji:"1000",eci:"0111"},capacity(n,t){const e=M[n-1];const i=T[t][n-1];const o=_[t][n-1];const r=Math.floor(e/o)-i;const s=o-e%o;return{words:i,numBlocks:o,shortBlocks:s,blockLen:r,capacity:(e-i*o)*8,total:(i+r)*o+o-s}}};const I=[(n,t)=>(n+t)%2==0,(n,t)=>t%2==0,(n,t)=>n%3==0,(n,t)=>(n+t)%3==0,(n,t)=>(Math.floor(t/2)+Math.floor(n/3))%2==0,(n,t)=>n*t%2+n*t%3==0,(n,t)=>(n*t%2+n*t%3)%2==0,(n,t)=>((n+t)%2+n*t%3)%2==0];const N={tables:(n=>{const t=w(256,0);const e=w(256,0);for(let i=0,o=1;i<256;i++){t[i]=o;e[o]=i;o<<=1;if(o&256)o^=n}return{exp:t,log:e}})(285),exp:n=>N.tables.exp[n],log(n){if(n===0)throw new Error(`GF.log: wrong arg=${n}`);return N.tables.log[n]%255},mul(n,t){if(n===0||t===0)return 0;return N.tables.exp[(N.tables.log[n]+N.tables.log[t])%255]},add:(n,t)=>n^t,pow:(n,t)=>N.tables.exp[N.tables.log[n]*t%255],inv(n){if(n===0)throw new Error(`GF.inverse: wrong arg=${n}`);return N.tables.exp[255-N.tables.log[n]]},polynomial(n){if(n.length==0)throw new Error("GF.polymomial: wrong length");if(n[0]!==0)return n;let t=0;for(;t<n.length-1&&n[t]==0;t++);return n.slice(t)},monomial(n,t){if(n<0)throw new Error(`GF.monomial: wrong degree=${n}`);if(t==0)return[0];let e=w(n+1,0);e[0]=t;return N.polynomial(e)},degree:n=>n.length-1,coefficient:(n,t)=>n[N.degree(n)-t],mulPoly(n,t){if(n[0]===0||t[0]===0)return[0];const e=w(n.length+t.length-1,0);for(let i=0;i<n.length;i++){for(let o=0;o<t.length;o++){e[i+o]=N.add(e[i+o],N.mul(n[i],t[o]))}}return N.polynomial(e)},mulPolyScalar(n,t){if(t==0)return[0];if(t==1)return n;const e=w(n.length,0);for(let i=0;i<n.length;i++)e[i]=N.mul(n[i],t);return N.polynomial(e)},mulPolyMonomial(n,t,e){if(t<0)throw new Error("GF.mulPolyMonomial: wrong degree");if(e==0)return[0];const i=w(n.length+t,0);for(let t=0;t<n.length;t++)i[t]=N.mul(n[t],e);return N.polynomial(i)},addPoly(n,t){if(n[0]===0)return t;if(t[0]===0)return n;let e=n;let i=t;if(e.length>i.length)[e,i]=[i,e];let o=w(i.length,0);let r=i.length-e.length;let s=i.slice(0,r);for(let n=0;n<s.length;n++)o[n]=s[n];for(let n=r;n<i.length;n++)o[n]=N.add(e[n-r],i[n]);return N.polynomial(o)},remainderPoly(n,t){const e=Array.from(n);for(let i=0;i<n.length-t.length+1;i++){const n=e[i];if(n===0)continue;for(let o=1;o<t.length;o++){if(t[o]!==0)e[i+o]=N.add(e[i+o],N.mul(t[o],n))}}return e.slice(n.length-t.length+1,e.length)},divisorPoly(n){let t=[1];for(let e=0;e<n;e++)t=N.mulPoly(t,[1,N.pow(2,e)]);return t},evalPoly(n,t){if(t==0)return N.coefficient(n,0);let e=n[0];for(let i=1;i<n.length;i++)e=N.add(N.mul(t,e),n[i]);return e},euclidian(n,t,e){if(N.degree(n)<N.degree(t))[n,t]=[t,n];let i=n;let o=t;let r=[0];let s=[1];while(2*N.degree(o)>=e){let n=i;let t=r;i=o;r=s;if(i[0]===0)throw new Error("rLast[0] === 0");o=n;let e=[0];const l=N.inv(i[0]);while(N.degree(o)>=N.degree(i)&&o[0]!==0){const n=N.degree(o)-N.degree(i);const t=N.mul(o[0],l);e=N.addPoly(e,N.monomial(n,t));o=N.addPoly(o,N.mulPolyMonomial(i,n,t))}e=N.mulPoly(e,r);s=N.addPoly(e,t);if(N.degree(o)>=N.degree(i))throw new Error(`Division failed r: ${o}, rLast: ${i}`)}const l=N.coefficient(s,0);if(l==0)throw new Error("sigmaTilde(0) was zero");const a=N.inv(l);return[N.mulPolyScalar(s,a),N.mulPolyScalar(o,a)]}};function D(n){return{encode(t){const e=N.divisorPoly(n);const i=Array.from(t);i.push(...e.slice(0,-1).fill(0));return Uint8Array.from(N.remainderPoly(i,e))},decode(t){const e=t.slice();const i=N.polynomial(Array.from(t));let o=w(n,0);let r=false;for(let t=0;t<n;t++){const n=N.evalPoly(i,N.exp(t));o[o.length-1-t]=n;if(n!==0)r=true}if(!r)return e;o=N.polynomial(o);const s=N.monomial(n,1);const[l,a]=N.euclidian(s,o,n);const c=w(N.degree(l),0);let d=0;for(let n=1;n<256&&d<c.length;n++){if(N.evalPoly(l,n)===0)c[d++]=N.inv(n)}if(d!==c.length)throw new Error("RS.decode: wrong errors number");for(let n=0;n<c.length;n++){const t=e.length-1-N.log(c[n]);if(t<0)throw new Error("RS.decode: wrong error location");const i=N.inv(c[n]);let o=1;for(let t=0;t<c.length;t++){if(n===t)continue;o=N.mul(o,N.add(1,N.mul(c[t],i)))}e[t]=N.add(e[t],N.mul(N.evalPoly(a,i),N.inv(o)))}return e}}}function O(n,t){const{words:e,shortBlocks:i,numBlocks:o,blockLen:r,total:s}=A.capacity(n,t);const l=D(e);return{encode(n){const t=[];const e=[];for(let s=0;s<o;s++){const o=s<i;const a=r+(o?0:1);t.push(n.subarray(0,a));e.push(l.encode(n.subarray(0,a)));n=n.subarray(a)}const s=b(...t);const a=b(...e);const c=new Uint8Array(s.length+a.length);c.set(s);c.set(a,s.length);return c},decode(n){if(n.length!==s)throw new Error(`interleave.decode: len(data)=${n.length}, total=${s}`);const t=[];for(let n=0;n<o;n++){const o=n<i;t.push(new Uint8Array(e+r+(o?0:1)))}let a=0;for(let e=0;e<r;e++){for(let i=0;i<o;i++)t[i][e]=n[a++]}for(let e=i;e<o;e++)t[e][r]=n[a++];for(let s=r;s<r+e;s++){for(let e=0;e<o;e++){const o=e<i;t[e][s+(o?0:1)]=n[a++]}}const c=[];for(const n of t)c.push(...Array.from(l.decode(n)).slice(0,-e));return Uint8Array.from(c)}}}function S(n,t,e,i=false){const o=A.size.encode(n);let r=new v(o+2);const s=new v(3).rect(0,3,true).border(1,false).border(1,true).border(1,false);r=r.embed(0,s).embed({x:-s.width,y:0},s).embed({x:0,y:-s.height},s);r=r.rectSlice(1,o);const l=new v(1).rect(0,1,true).border(1,false).border(1,true);const a=A.alignmentPatterns(n);for(const n of a){for(const t of a){if(r.data[n][t]!==undefined)continue;r.embed({x:t-2,y:n-2},l)}}r=r.hLine({x:0,y:6},Infinity,(({x:n},t)=>t===undefined?n%2==0:t)).vLine({x:6,y:0},Infinity,(({y:n},t)=>t===undefined?n%2==0:t));{const n=A.formatBits(t,e);const s=t=>!i&&(n>>t&1)==1;for(let n=0;n<6;n++)r.data[n][8]=s(n);for(let n=6;n<8;n++)r.data[n+1][8]=s(n);for(let n=8;n<15;n++)r.data[o-15+n][8]=s(n);for(let n=0;n<8;n++)r.data[8][o-n-1]=s(n);for(let n=8;n<9;n++)r.data[8][15-n-1+1]=s(n);for(let n=9;n<15;n++)r.data[8][15-n-1]=s(n);r.data[o-8][8]=!i}if(n>=7){const t=A.versionBits(n);for(let n=0;n<18;n+=1){const e=!i&&(t>>n&1)==1;const s=Math.floor(n/3);const l=n%3+o-8-3;r.data[s][l]=e;r.data[l][s]=e}}return r}function F(n,t,e){const i=n.height;const o=I[t];let r=-1;let s=i-1;for(let t=i-1;t>0;t-=2){if(t==6)t=5;for(;;s+=r){for(let i=0;i<2;i+=1){const r=t-i;if(n.data[s][r]!==undefined)continue;e(r,s,o(r,s))}if(s+r<0||s+r>=i)break}r=-r}}function B(n){let t="numeric";for(let e of n){if(A.alphabet.numeric.has(e))continue;t="alphanumeric";if(!A.alphabet.alphanumerc.has(e))return"byte"}return t}function $(n){if(typeof n!=="string")throw new Error(`utf8ToBytes expected string, got ${typeof n}`);return new Uint8Array((new TextEncoder).encode(n))}function H(n,t,e,i){let o="";let r=e.length;if(i==="numeric"){const n=A.alphabet.numeric.decode(e.split(""));const t=n.length;for(let e=0;e<t-2;e+=3)o+=x(n[e]*100+n[e+1]*10+n[e+2],10);if(t%3===1){o+=x(n[t-1],4)}else if(t%3===2){o+=x(n[t-2]*10+n[t-1],7)}}else if(i==="alphanumeric"){const n=A.alphabet.alphanumerc.decode(e.split(""));const t=n.length;for(let e=0;e<t-1;e+=2)o+=x(n[e]*45+n[e+1],11);if(t%2==1)o+=x(n[t-1],6)}else if(i==="byte"){const n=$(e);r=n.length;o=Array.from(n).map((n=>x(n,8))).join("")}else{throw new Error("encode: unsupported type")}const{capacity:s}=A.capacity(n,t);const l=x(r,A.lengthBits(n,i));let a=A.modeBits[i]+l+o;if(a.length>s)throw new Error("Capacity overflow");a+="0".repeat(Math.min(4,Math.max(0,s-a.length)));if(a.length%8)a+="0".repeat(8-a.length%8);const c="1110110000010001";for(let n=0;a.length!==s;n++)a+=c[n%c.length];const d=Uint8Array.from(a.match(/(.{8})/g).map((n=>Number(`0b${n}`))));return O(n,t).encode(d)}function P(n,t,e,i,o=false){const r=S(n,t,i,o);let s=0;const l=8*e.length;F(r,i,((n,t,i)=>{let o=false;if(s<l){o=(e[s>>>3]>>(7-s&7)&1)!==0;s++}r.data[t][n]=o!==i}));if(s!==l)throw new Error("QR: bytes left after draw");return r}function Z(n){const t=n.inverse();const e=n=>{let t=0;for(let e=0,i=1,o=undefined;e<n.length;e++){if(o===n[e]){i++;if(e!==n.length-1)continue}if(i>=5)t+=3+(i-5);o=n[e];i=1}return t};let i=0;n.data.forEach((n=>i+=e(n)));t.data.forEach((n=>i+=e(n)));let o=0;let r=n.data;const s=n.width-1;const l=n.height-1;for(let n=0;n<s;n++){for(let t=0;t<l;t++){const e=n+1;const i=t+1;if(r[n][t]===r[e][t]&&r[e][t]===r[n][i]&&r[e][t]===r[e][i]){o+=3}}}const a=n=>{const t=[true,false,true,true,true,false,true];const e=[false,false,false,false];const i=[...t,...e];const o=[...e,...t];let r=0;for(let t=0;t<n.length;t++){if(y(n,i,t))r+=40;if(y(n,o,t))r+=40}return r};let c=0;for(const t of n.data)c+=a(t);for(const n of t.data)c+=a(n);let d=0;n.rectRead(0,Infinity,((n,t)=>d+=t?1:0));const h=d/(n.height*n.width)*100;const f=10*Math.floor(Math.abs(h-50)/5);return i+o+c+f}function V(n,t,e,i){if(i===undefined){const o=C();for(let i=0;i<I.length;i++)o.add(Z(P(n,t,e,i,true)),i);i=o.get()}if(i===undefined)throw new Error("Cannot find mask");return P(n,t,e,i)}function j(n){if(!E.includes(n))throw new Error(`Invalid error correction mode=${n}. Expected: ${E}`)}function z(n){if(!k.includes(n))throw new Error(`Encoding: invalid mode=${n}. Expected: ${k}`);if(n==="kanji"||n==="eci")throw new Error(`Encoding: ${n} is not supported (yet?).`)}function R(n){if(![0,1,2,3,4,5,6,7].includes(n)||!I[n])throw new Error(`Invalid mask=${n}. Expected number [0..7]`)}function U(n,t="raw",e={}){const i=e.ecc!==undefined?e.ecc:"medium";j(i);const o=e.encoding!==undefined?e.encoding:B(n);z(o);if(e.mask!==undefined)R(e.mask);let r=e.version;let s,l=new Error("Unknown error");if(r!==undefined){g(r);s=H(r,i,n,o)}else{for(let t=1;t<=40;t++){try{s=H(t,i,n,o);r=t;break}catch(n){l=n}}}if(!r||!s)throw l;let a=V(r,i,s,e.mask);a.assertDrawn();const c=e.border===undefined?2:e.border;if(!Number.isSafeInteger(c))throw new Error(`Wrong border type=${typeof c}`);a=a.border(c,false);if(e.scale!==undefined)a=a.scale(e.scale);if(t==="raw")return a.data;else if(t==="ascii")return a.toASCII();else if(t==="svg")return a.toSVG();else if(t==="gif")return a.toGIF();else if(t==="term")return a.toTerm();else throw new Error(`Unknown output: ${t}`)}const K={DESKTOP:"Desktop",MOBILE:"Mobile",META_MASK_MOBILE_APP:"MetaMask mobile app",SCAN_TO_CONNECT:"Scan to connect and sign with",CONNECT_WITH_EXTENSION:"Connect With MetaMask Extension",INSTALL_MODAL:{TRUSTED_BY_USERS:"Trusted by over 30 million users to buy, store, send and swap crypto securely",LEADING_CRYPTO_WALLET:"The leading crypto wallet & gateway to blockchain apps built on Ethereum Mainnet, Polygon, Optimism, and many other networks",CONTROL_DIGITAL_INTERACTIONS:"Puts you in control of your digital interactions by making power of cryptography more accessible",INSTALL_META_MASK_EXTENSION:"Install MetaMask Extension"},PENDING_MODAL:{OPEN_META_MASK_SELECT_CODE:"Please open the MetaMask wallet app and select the code on the screen OR disconnect",OPEN_META_MASK_CONTINUE:"Open the MetaMask app to continue with your session.",NUMBER_AFTER_OPEN_NOTICE:"If a number doesn't appear after opening MetaMask, please click disconnect and re-scan the QRCode.",DISCONNECT:"Disconnect"},SELECT_MODAL:{CRYPTO_TAKE_CONTROL_TEXT:"Take control of your crypto and explore the blockchain with the wallet trusted by over 30 million people worldwide"},META_MASK_MODAL:{ADDRESS_COPIED:"Address copied to clipboard!",DISCONNECT:"Disconnect",ACTIVE_NETWORK:"Active Network"}};class G{constructor(n){var t;this.translations=K;this.supportedLocales=["es","fr","he","it","pt","tr"];this.baseUrl=(t=n===null||n===void 0?void 0:n.baseUrl)!==null&&t!==void 0?t:"https://raw.githubusercontent.com/MetaMask/metamask-sdk/refs/heads/gh-pages/locales"}getBrowserLanguage(){const n=navigator.languages||[navigator.language];const t=n.some((n=>n.toLowerCase().startsWith("en")));if(t){return"en"}const e=navigator.language;const i=e.toLowerCase().split("-")[0];if(this.supportedLocales.includes(i)){return i}return"en"}async init(n){const t=this.getBrowserLanguage();const e=t||n.fallbackLng;await this.loadTranslations(e)}async loadTranslations(n){const t=n.split("-")[0];if(t==="en"||!this.supportedLocales.includes(t)){this.translations=K;return}try{const n=`${this.baseUrl}/${t}.json`;const e=await fetch(n);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);this.translations=await e.json()}catch(n){console.warn(`❌ Failed to load ${t} translations, falling back to English:`,n);this.translations=K}}t(n){return this.getNestedTranslation(n,this.translations)||n}getNestedTranslation(n,t){const e=n.split(".");let i=t;for(const n of e){if(typeof i!=="object")return"";i=i[n]}return typeof i==="string"?i:""}}var W;(function(n){n["SDK_MODAL_VIEWED"]="sdk_modal_viewed";n["SDK_MODAL_BUTTON_CLICKED"]="sdk_modal_button_clicked";n["SDK_MODAL_TOGGLE_CHANGED"]="sdk_modal_toggle_changed"})(W||(W={}));const q=".flexContainer {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n}\n\n.flexItem {\n flex: 1;\n justify-content: center;\n align-items: center;\n}\n\n.flexItem11 {\n flex: 11;\n justify-content: center;\n align-items: center;\n}\n\n.flexItem1 {\n flex: 1;\n justify-content: center;\n align-items: center;\n}\n\n.tab {\n padding: 8px;\n cursor: pointer;\n background-color: #F2F4F6;\n font-size: 12px;\n text-align: center;\n color: #24292E;\n}\n\n.tabcontainer {\n padding: 4px;\n background-color: #F2F4F6;\n border-radius: 8px;\n margin-bottom: 30px;\n margin-top: 30px;\n}\n\n.tabactive {\n background-color: white;\n -webkit-transition: background-color 300ms linear;\n -ms-transition: background-color 300ms linear;\n transition: background-color 300ms linear;\n border-radius: 8px;\n}\n\n.item {\n font-size: 12px;\n margin-bottom: 16px;\n border-radius: 8px;\n padding: 10px;\n border: 2px #F2F4F6 solid;\n color: #24292E;\n}\n\n.extensionLabel {\n font-style: normal;\n font-weight: bold;\n font-size: 14px;\n text-align: cetner;\n color: #24272A;\n}\n\n.notice {\n font-size: 12px;\n margin-left: 10px;\n margin-right: 10px;\n color: grey;\n}\n\n.button {\n margin-top: 41.5px;\n margin-bottom: 20px;\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n padding: 12px 20px;\n background: #037DD6;\n border-radius: 32px;\n color: white;\n border: 0;\n font-size: 14px;\n cursor: pointer;\n}\n\n.backdrop {\n visibility: visible;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n width: 100%;\n z-index: 99998;\n background: rgba(0, 0, 0, 0.87);\n opacity: 0.3;\n}\n\n.modal {\n visibility: visible;\n position: fixed;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 99999;\n background: white;\n padding: 20px;\n border-radius: 8px;\n top: 50%;\n max-width: 100%;\n width: 460px;\n min-width: 300px;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 11px 15px -7px, rgba(0, 0, 0, 0.14) 0px 24px 38px 3px, rgba(0, 0, 0, 0.12) 0px 9px 46px 8px;\n -webkit-font-smoothing: antialiased;\n}\n\n.closeButton {\n color: #BBC0C5;\n cursor: pointer;\n}\n\n.logoContainer {\n margin-left: 24px;\n margin-right: 24px;\n margin-top: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.connectMobileText {\n font-size: 14px;\n color: black;\n margin-top: 28px;\n margin-bottom: 28px;\n line-height: 2;\n}\n\n.blue {\n color: #037DD6;\n font-weight: 700;\n}\n\n.installExtensionText {\n margin-left: 10px;\n}\n\n.center {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.right {\n display: flex;\n align-items: center;\n justify-content: right;\n}\n\n#sdk-mm-qrcode {\n svg {\n width: 50%;\n }\n}";const X=q;const Y=class{constructor(n){t(this,n);this.close=e(this,"close",7);this.startDesktopOnboarding=e(this,"startDesktopOnboarding",7);this.trackAnalytics=e(this,"trackAnalytics",7);this.link=undefined;this.sdkVersion=undefined;this.preferDesktop=undefined;this.tab=1;this.isDefaultTab=true;this.translationsLoaded=false;this.onClose=this.onClose.bind(this);this.onStartDesktopOnboardingHandler=this.onStartDesktopOnboardingHandler.bind(this);this.setTab=this.setTab.bind(this);this.render=this.render.bind(this);this.setTab(this.preferDesktop?1:2);this.i18nInstance=new G}componentDidLoad(){this.trackAnalytics.emit({event:W.SDK_MODAL_VIEWED,params:{extensionInstalled:false,tab:this.tab===1?"desktop":"mobile"}})}async connectedCallback(){await this.i18nInstance.init({fallbackLng:"en"});this.translationsLoaded=true}updatePreferDesktop(n){if(n){this.setTab(1)}else{this.setTab(2)}}onClose(n=false){this.close.emit({shouldTerminate:n})}onStartDesktopOnboardingHandler(){this.trackAnalytics.emit({event:W.SDK_MODAL_BUTTON_CLICKED,params:{button_type:"install_extension",tab:"desktop"}});this.startDesktopOnboarding.emit()}setTab(n,t=false){if(t){this.trackAnalytics.emit({event:W.SDK_MODAL_TOGGLE_CHANGED,params:{toggle:this.tab===1?"desktop_to_mobile":"mobile_to_desktop"}})}this.tab=n;this.isDefaultTab=false}render(){if(!this.translationsLoaded){return null}const t=n=>this.i18nInstance.t(n);const e=this.isDefaultTab?this.preferDesktop?1:2:this.tab;const i=U(this.link,"svg",{ecc:"medium",scale:2});return n(r,{className:"install-model"},n("div",{class:"backdrop",onClick:()=>this.onClose(true)}),n("div",{class:"modal"},n("div",{class:"closeButtonContainer"},n("div",{class:"right"},n("span",{class:"closeButton",onClick:()=>this.onClose(true)},n(f,null)))),n("div",{class:"logoContainer"},n(u,null)),n("div",null,n("div",{class:"tabcontainer"},n("div",{class:"flexContainer"},n("div",{onClick:()=>this.setTab(1,true),class:`tab flexItem ${e===1?"tabactive":""}`},t("DESKTOP")),n("div",{onClick:()=>this.setTab(2,true),class:`tab flexItem ${e===2?"tabactive":""}`},t("MOBILE")))),n("div",{style:{display:e===1?"none":"block"}},n("div",{class:"flexContainer"},n("div",{class:"flexItem",style:{textAlign:"center",marginTop:"4"}},i&&n("div",{id:"sdk-mm-qrcode",class:"center",innerHTML:i}),n("div",{class:"connectMobileText"},t("SCAN_TO_CONNECT")," ",n("br",null),n("span",{class:"blue"},n("b",null,t("META_MASK_MOBILE_APP"))))))),n("div",{style:{display:e===2?"none":"block"}},n("div",{class:"item"},n(s,{Icon:a,text:t("INSTALL_MODAL.TRUSTED_BY_USERS")})),n("div",{class:"item"},n(s,{Icon:l,text:t("INSTALL_MODAL.LEADING_CRYPTO_WALLET")})),n("div",{class:"item"},n(s,{Icon:c,text:t("INSTALL_MODAL.CONTROL_DIGITAL_INTERACTIONS")})),n("button",{class:"button",onClick:()=>this.onStartDesktopOnboardingHandler()},n(d,null),n("span",{class:"installExtensionText"},t("INSTALL_MODAL.INSTALL_META_MASK_EXTENSION"))))),n(h,{version:this.sdkVersion})))}get el(){return i(this)}static get watchers(){return{preferDesktop:["updatePreferDesktop"]}}};Y.style=X;const Q=".flexContainer {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n}\n\n.flexItem {\n flex: 1;\n justify-content: center;\n align-items: center;\n}\n\n.flexItem11 {\n flex: 11;\n justify-content: center;\n align-items: center;\n}\n\n.flexItem1 {\n flex: 1;\n justify-content: center;\n align-items: center;\n}\n\n.tab {\n padding: 8px;\n cursor: pointer;\n background-color: #F2F4F6;\n font-size: 12px;\n text-align: center;\n color: #24292E;\n}\n\n.tabcontainer {\n padding: 4px;\n background-color: #F2F4F6;\n border-radius: 8px;\n margin-bottom: 30px;\n margin-top: 30px;\n}\n\n.tabactive {\n background-color: white;\n -webkit-transition: background-color 300ms linear;\n -ms-transition: background-color 300ms linear;\n transition: background-color 300ms linear;\n border-radius: 8px;\n}\n\n.item {\n font-size: 12px;\n margin-bottom: 16px;\n border-radius: 8px;\n padding: 10px;\n border: 2px #F2F4F6 solid;\n color: #24292E;\n}\n\n.extensionLabel {\n font-style: normal;\n font-weight: bold;\n font-size: 14px;\n text-align: cetner;\n color: #24272A;\n}\n\n.notice {\n font-size: 12px;\n margin-left: 10px;\n margin-right: 10px;\n color: grey;\n}\n\n.button {\n margin-top: 41.5px;\n margin-bottom: 20px;\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n padding: 12px 20px;\n background: #037DD6;\n border-radius: 32px;\n color: white;\n border: 0;\n font-size: 14px;\n cursor: pointer;\n}\n\n.backdrop {\n visibility: visible;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n width: 100%;\n z-index: 99998;\n background: rgba(0, 0, 0, 0.87);\n opacity: 0.3;\n}\n\n.modal {\n visibility: visible;\n position: fixed;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 99999;\n background: white;\n padding: 20px;\n border-radius: 8px;\n top: 50%;\n max-width: 100%;\n width: 460px;\n min-width: 300px;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 11px 15px -7px, rgba(0, 0, 0, 0.14) 0px 24px 38px 3px, rgba(0, 0, 0, 0.12) 0px 9px 46px 8px;\n -webkit-font-smoothing: antialiased;\n}\n\n.closeButton {\n color: #BBC0C5;\n cursor: pointer;\n}\n\n.logoContainer {\n margin-left: 24px;\n margin-right: 24px;\n margin-top: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.connectMobileText {\n font-size: 14px;\n color: black;\n margin-top: 28px;\n margin-bottom: 28px;\n line-height: 2;\n}\n\n.blue {\n color: #037DD6;\n font-weight: 700;\n}\n\n.installExtensionText {\n margin-left: 10px;\n}\n\n.center {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.right {\n display: flex;\n align-items: center;\n justify-content: right;\n}\n\n#sdk-mm-qrcode {\n svg {\n width: 50%;\n }\n}";const J=Q;const nn=class{constructor(n){t(this,n);this.close=e(this,"close",7);this.disconnect=e(this,"disconnect",7);this.updateOTPValue=e(this,"updateOTPValue",7);this.displayOTP=undefined;this.sdkVersion=undefined;this.otpCode=undefined;this.translationsLoaded=false;this.i18nInstance=new G}async connectedCallback(){await this.i18nInstance.init({fallbackLng:"en"});this.translationsLoaded=true}onClose(){this.close.emit()}onDisconnect(){this.disconnect.emit()}onUpdateOTPValueHandler(n){this.updateOTPValue.emit({otpValue:n})}disconnectedCallback(){this.onClose()}render(){var t;if(!this.translationsLoaded){return null}const e=(t=this.displayOTP)!==null&&t!==void 0?t:true;const i=this.sdkVersion;const o=n=>this.i18nInstance.t(n);return n(r,{className:"pending-modal"},n("div",{class:"backdrop",onClick:()=>this.onClose()}),n("div",{class:"modal"},n("div",{class:"closeButtonContainer"},n("div",{class:"right"},n("span",{class:"closeButton",onClick:()=>this.onClose()},n(f,null)))),n("div",{class:"logoContainer"},n(u,null)),n("div",null,n("div",{class:"flexContainer",style:{flexDirection:"column",color:"black"}},n("div",{class:"flexItem",style:{textAlign:"center",marginTop:"30px",marginBottom:"30px",fontSize:"16px"}},e?o("PENDING_MODAL.OPEN_META_MASK_SELECT_CODE"):o("PENDING_MODAL.OPEN_META_MASK_CONTINUE")),n("div",{id:"sdk-mm-otp-value",style:{padding:"10px",fontSize:"32px",display:this.otpCode?"block":"none"}},this.otpCode),e&&n("div",{class:"notice"},"* ",o("PENDING_MODAL.NUMBER_AFTER_OPEN_NOTICE"))),n("div",{style:{marginTop:"20px"}},n("button",{class:"button blue",style:{marginTop:"5px",color:"#0376C9",borderColor:"#0376C9",borderWidth:"1px",borderStyle:"solid",backgroundColor:"white"},onClick:()=>this.onDisconnect()},o("PENDING_MODAL.DISCONNECT")))),n(h,{version:i})))}get el(){return i(this)}};nn.style=J;const tn=()=>n("svg",{width:"21",height:"15",viewBox:"0 0 21 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n("path",{d:"M14.1364 14.9851C13.5909 14.9851 13.2273 14.5851 13.2273 13.9851C13.2273 13.3851 13.5909 12.9851 14.1364 12.9851C16.6818 12.9851 18.6818 10.7851 18.6818 7.98508C18.6818 5.18508 16.6818 2.98508 14.1364 2.98508C11.5909 2.98508 9.59091 5.18508 9.59091 7.98508C9.59091 8.58508 9.22727 8.98508 8.68182 8.98508C8.13636 8.98508 7.77273 8.58508 7.77273 7.98508C7.77273 4.08508 10.5909 0.985077 14.1364 0.985077C17.6818 0.985077 20.5 4.08508 20.5 7.98508C20.5 11.8851 17.6818 14.9851 14.1364 14.9851ZM6.68182 14.7851C3.22727 14.7851 0.5 11.6851 0.5 7.98508C0.5 4.28508 3.22727 1.18508 6.68182 1.18508C7.22727 1.18508 7.59091 1.58508 7.59091 2.18508C7.59091 2.78508 7.22727 3.18508 6.68182 3.18508C4.22727 3.18508 2.31818 5.38508 2.31818 7.98508C2.31818 10.5851 4.22727 12.7851 6.68182 12.7851C9.13636 12.7851 11.0455 10.6851 11.0455 7.98508C11.0455 7.38508 11.4091 6.98508 11.9545 6.98508C12.5 6.98508 12.8636 7.38508 12.8636 7.98508C12.7727 11.6851 10.0455 14.7851 6.68182 14.7851Z",fill:"white"}));const en=()=>n("svg",{width:"400",height:"300",viewBox:"0 0 400 300",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n("rect",{width:"400",height:"300",fill:"white"}),n("path",{d:"M300.116 242.46L250.485 227.681L213.057 250.055L186.944 250.045L149.493 227.681L99.8843 242.46L84.7939 191.518L99.8843 134.979L84.7939 87.1777L99.8843 27.9336L177.402 74.2466H222.598L300.116 27.9336L315.206 87.1777L300.116 134.979L315.206 191.518L300.116 242.46Z",fill:"#FF5C16"}),n("path",{d:"M99.8955 27.9336L177.414 74.2792L174.331 106.085L99.8955 27.9336Z",fill:"#FF5C16"}),n("path",{d:"M149.505 191.539L183.612 217.521L149.505 227.681V191.539Z",fill:"#FF5C16"}),n("path",{d:"M180.886 148.585L174.33 106.107L132.369 134.991L132.348 134.98V135.001L132.477 164.732L149.493 148.585H149.504H180.886Z",fill:"#FF5C16"}),n("path",{d:"M300.116 27.9336L222.598 74.2792L225.67 106.085L300.116 27.9336Z",fill:"#FF5C16"}),n("path",{d:"M250.508 191.539L216.4 217.521L250.508 227.681V191.539Z",fill:"#FF5C16"}),n("path",{d:"M267.652 135.001H267.663H267.652V134.98L267.641 134.991L225.68 106.107L219.125 148.585H250.507L267.533 164.732L267.652 135.001Z",fill:"#FF5C16"}),n("path",{d:"M149.493 227.681L99.8843 242.46L84.7939 191.54H149.493V227.681Z",fill:"#E34807"}),n("path",{d:"M180.875 148.574L190.351 209.98L177.219 175.838L132.456 164.732L149.483 148.574H180.864H180.875Z",fill:"#E34807"}),n("path",{d:"M250.507 227.681L300.116 242.46L315.206 191.54H250.507V227.681Z",fill:"#E34807"}),n("path",{d:"M219.126 148.574L209.649 209.98L222.782 175.838L267.545 164.732L250.507 148.574H219.126Z",fill:"#E34807"}),n("path",{d:"M84.7939 191.517L99.8843 134.979H132.337L132.456 164.721L177.219 175.826L190.351 209.969L183.601 217.488L149.493 191.506H84.7939V191.517Z",fill:"#FF8D5D"}),n("path",{d:"M315.206 191.517L300.116 134.979H267.664L267.545 164.721L222.782 175.826L209.649 209.969L216.4 217.488L250.507 191.506H315.206V191.517Z",fill:"#FF8D5D"}),n("path",{d:"M222.598 74.2466H200H177.402L174.33 106.053L190.351 209.936H209.649L225.681 106.053L222.598 74.2466Z",fill:"#FF8D5D"}),n("path",{d:"M99.8843 27.9336L84.7939 87.1777L99.8843 134.979H132.337L174.319 106.085L99.8843 27.9336Z",fill:"#661800"}),n("path",{d:"M171.496 160.906H156.795L148.79 168.752L177.229 175.804L171.496 160.896V160.906Z",fill:"#661800"}),n("path",{d:"M300.116 27.9336L315.206 87.1777L300.116 134.979H267.663L225.681 106.085L300.116 27.9336Z",fill:"#661800"}),n("path",{d:"M228.525 160.906H243.248L251.253 168.763L222.781 175.826L228.525 160.896V160.906Z",fill:"#661800"}),n("path",{d:"M213.046 229.789L216.399 217.51L209.649 209.991H190.34L183.59 217.51L186.943 229.789",fill:"#661800"}),n("path",{d:"M213.047 229.789V250.066H186.944V229.789H213.047Z",fill:"#C0C4CD"}),n("path",{d:"M149.504 227.66L186.965 250.056V229.779L183.611 217.5L149.504 227.66Z",fill:"#E7EBF6"}),n("path",{d:"M250.506 227.66L213.045 250.056V229.779L216.398 217.5L250.506 227.66Z",fill:"#E7EBF6"}));const on=".flexContainer {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n}\n\n.flexItem {\n flex: 1;\n justify-content: center;\n align-items: center;\n}\n\n.flexItem11 {\n flex: 11;\n justify-content: center;\n align-items: center;\n}\n\n.flexItem1 {\n flex: 1;\n justify-content: center;\n align-items: center;\n}\n\n.tab {\n padding: 8px;\n cursor: pointer;\n background-color: #F2F4F6;\n font-size: 12px;\n text-align: center;\n color: #24292E;\n}\n\n.tabcontainer {\n padding: 4px;\n background-color: #F2F4F6;\n border-radius: 8px;\n margin-bottom: 30px;\n margin-top: 30px;\n}\n\n.tabactive {\n background-color: white;\n -webkit-transition: background-color 300ms linear;\n -ms-transition: background-color 300ms linear;\n transition: background-color 300ms linear;\n border-radius: 8px;\n}\n\n.item {\n font-size: 12px;\n margin-bottom: 16px;\n border-radius: 8px;\n padding: 10px;\n border: 2px #F2F4F6 solid;\n color: #24292E;\n}\n\n.extensionLabel {\n font-style: normal;\n font-weight: bold;\n font-size: 14px;\n text-align: cetner;\n color: #24272A;\n}\n\n.notice {\n font-size: 12px;\n margin-left: 10px;\n margin-right: 10px;\n color: grey;\n}\n\n.button {\n margin-top: 41.5px;\n margin-bottom: 20px;\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n padding: 12px 20px;\n background: #037DD6;\n border-radius: 32px;\n color: white;\n border: 0;\n font-size: 14px;\n cursor: pointer;\n}\n\n.backdrop {\n visibility: visible;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n width: 100%;\n z-index: 99998;\n background: rgba(0, 0, 0, 0.87);\n opacity: 0.3;\n}\n\n.modal {\n visibility: visible;\n position: fixed;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 99999;\n background: white;\n padding: 20px;\n border-radius: 8px;\n top: 50%;\n max-width: 100%;\n width: 460px;\n min-width: 300px;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 11px 15px -7px, rgba(0, 0, 0, 0.14) 0px 24px 38px 3px, rgba(0, 0, 0, 0.12) 0px 9px 46px 8px;\n -webkit-font-smoothing: antialiased;\n}\n\n.closeButton {\n color: #BBC0C5;\n cursor: pointer;\n}\n\n.logoContainer {\n margin-left: 24px;\n margin-right: 24px;\n margin-top: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.connectMobileText {\n font-size: 14px;\n color: black;\n margin-top: 28px;\n margin-bottom: 28px;\n line-height: 2;\n}\n\n.blue {\n color: #037DD6;\n font-weight: 700;\n}\n\n.installExtensionText {\n margin-left: 10px;\n}\n\n.center {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.right {\n display: flex;\n align-items: center;\n justify-content: right;\n}\n\n#sdk-mm-qrcode {\n svg {\n width: 50%;\n }\n}";const rn=on;const sn=class{constructor(n){t(this,n);this.close=e(this,"close",7);this.connectWithExtension=e(this,"connectWithExtension",7);this.link=undefined;this.sdkVersion=undefined;this.preferDesktop=undefined;this.tab=1;this.isDefaultTab=true;this.translationsLoaded=false;this.i18nInstance=new G;this.setTab(this.preferDesktop?1:2)}async connectedCallback(){await this.i18nInstance.init({fallbackLng:"en"});this.translationsLoaded=true}onClose(n=false){this.close.emit({shouldTerminate:n})}connectWithExtensionHandler(){this.connectWithExtension.emit()}setTab(n){this.tab=n;this.isDefaultTab=false}disconnectedCallback(){this.onClose()}updatePreferDesktop(n){if(n){this.setTab(1)}else{this.setTab(2)}}render(){if(!this.translationsLoaded){return null}const t=n=>this.i18nInstance.t(n);const e=this.sdkVersion;const i=this.isDefaultTab?this.preferDesktop?1:2:this.tab;const o=U(this.link,"svg",{ecc:"medium",scale:2});return n(r,{className:"select-modal"},n("div",{class:"backdrop",onClick:()=>this.onClose(true)}),n("div",{class:"modal"},n("div",{class:"closeButtonContainer"},n("div",{class:"right"},n("span",{class:"closeButton",onClick:()=>this.onClose(true)},n(f,null)))),n("div",{class:"logoContainer"},n(u,null)),n("div",null,n("div",{class:"tabcontainer"},n("div",{class:"flexContainer"},n("div",{onClick:()=>this.setTab(1),class:`tab flexItem ${i===1?"tabactive":""}`},t("DESKTOP")),n("div",{onClick:()=>this.setTab(2),class:`tab flexItem ${i===2?"tabactive":""}`},t("MOBILE")))),n("div",{style:{display:i===1?"none":"block"}},n("div",{class:"flexContainer"},n("div",{class:"flexItem",style:{textAlign:"center",marginTop:"4"}},n("div",{class:"center",id:"sdk-mm-qrcode",innerHTML:o}),n("div",{class:"connectMobileText"},t("SCAN_TO_CONNECT"),n("br",null),n("span",{class:"blue"},n("b",null,t("META_MASK_MOBILE_APP"))))))),n("div",{style:{display:i===2?"none":"block"}},n("div",{style:{display:"flex",justifyContent:"center",height:"300",marginTop:"-20"}},n(en,null)),n("div",{class:"extensionLabel"},t("SELECT_MODAL.CRYPTO_TAKE_CONTROL_TEXT")),n("button",{class:"button",onClick:()=>this.connectWithExtensionHandler()},n(tn,null),n("span",{class:"installExtensionText"},t("CONNECT_WITH_EXTENSION"))))),n(h,{version:e})))}get el(){return i(this)}static get watchers(){return{preferDesktop:["updatePreferDesktop"]}}};sn.style=rn;export{Y as mm_install_modal,nn as mm_pending_modal,sn as mm_select_modal}; //# sourceMappingURL=p-da7cdd88.entry.js.map