@skip-go/widget-web-component 3.18.6 → 3.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/4150.index.js +1 -1
- package/build/4194.index.js +1 -1
- package/build/4379.index.js +2 -2
- package/build/4549.index.js +1 -0
- package/build/5972.index.js +11 -11
- package/build/6484.index.js +1 -1
- package/build/7201.index.js +18 -18
- package/build/8373.index.js +46 -46
- package/build/913.index.js +1 -1
- package/build/9194.index.js +2 -2
- package/build/index.js +101 -101
- package/build/index.js.LICENSE.txt +12 -2
- package/package.json +1 -1
package/build/4150.index.js
CHANGED
|
@@ -228,7 +228,7 @@ export const __webpack_esm_id__=4150;export const __webpack_esm_ids__=[4150];exp
|
|
|
228
228
|
opacity: 1;
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
`},53459:(e,t,i)=>{var o=i(52788),a=i(86280),r=i(73764),s=i(72397),n=i(
|
|
231
|
+
`},53459:(e,t,i)=>{var o=i(52788),a=i(86280),r=i(73764),s=i(72397),n=i(46362),c=i(98299),l=i(83077),w=i(6262),d=i(1420),p=i(47981),u=i(86454),m=i(42603),h=i(69658),v=(i(85017),i(84708),i(5698),i(5308),i(3389),i(42177)),g=i(53021),y=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const f=["SmartSessionList"];function b(){const e=s.I.state.data?.connector?.name,t=s.I.state.data?.wallet?.name,i=s.I.state.data?.network?.name,o=t??e,a=l.a.getConnectors();return{Connect:`Connect ${1===a.length&&"w3m-email"===a[0]?.id?"Email":""} Wallet`,Create:"Create Wallet",ChooseAccountName:void 0,Account:void 0,AccountSettings:void 0,AllWallets:"All Wallets",ApproveTransaction:"Approve Transaction",BuyInProgress:"Buy",ConnectingExternal:o??"Connect Wallet",ConnectingWalletConnect:o??"WalletConnect",ConnectingWalletConnectBasic:"WalletConnect",ConnectingSiwe:"Sign In",Convert:"Convert",ConvertSelectToken:"Select token",ConvertPreview:"Preview convert",Downloads:o?`Get ${o}`:"Downloads",EmailLogin:"Email Login",EmailVerifyOtp:"Confirm Email",EmailVerifyDevice:"Register Device",GetWallet:"Get a wallet",Networks:"Choose Network",OnRampProviders:"Choose Provider",OnRampActivity:"Activity",OnRampTokenSelect:"Select Token",OnRampFiatSelect:"Select Currency",Pay:"How you pay",Profile:void 0,SwitchNetwork:i??"Switch Network",SwitchAddress:"Switch Address",Transactions:"Activity",UnsupportedChain:"Switch Network",UpgradeEmailWallet:"Upgrade your Wallet",UpdateEmailWallet:"Edit Email",UpdateEmailPrimaryOtp:"Confirm Current Email",UpdateEmailSecondaryOtp:"Confirm New Email",WhatIsABuy:"What is Buy?",RegisterAccountName:"Choose name",RegisterAccountNameSuccess:"",WalletReceive:"Receive",WalletCompatibleNetworks:"Compatible Networks",Swap:"Swap",SwapSelectToken:"Select token",SwapPreview:"Preview swap",WalletSend:"Send",WalletSendPreview:"Review send",WalletSendSelectToken:"Select Token",WhatIsANetwork:"What is a network?",WhatIsAWallet:"What is a wallet?",ConnectWallets:"Connect wallet",ConnectSocials:"All socials",ConnectingSocial:n.U.state.socialProvider?n.U.state.socialProvider:"Connect Social",ConnectingMultiChain:"Select chain",ConnectingFarcaster:"Farcaster",SwitchActiveChain:"Switch chain",SmartSessionCreated:void 0,SmartSessionList:"Smart Sessions",SIWXSignMessage:"Sign In",PayLoading:"Payment in progress"}}let k=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.heading=b()[s.I.state.view],this.network=c.W.state.activeCaipNetwork,this.networkImage=u.$.getNetworkImage(this.network),this.showBack=!1,this.prevHistoryLength=1,this.view=s.I.state.view,this.viewDirection="",this.headerText=b()[s.I.state.view],this.unsubscribe.push(w.j.subscribeNetworkImages(()=>{this.networkImage=u.$.getNetworkImage(this.network)}),s.I.subscribeKey("view",e=>{setTimeout(()=>{this.view=e,this.headerText=b()[e]},v.o.ANIMATION_DURATIONS.HeaderText),this.onViewChange(),this.onHistoryChange()}),c.W.subscribeKey("activeCaipNetwork",e=>{this.network=e,this.networkImage=u.$.getNetworkImage(this.network)}))}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){return o.qy`
|
|
232
232
|
<wui-flex .padding=${this.getPadding()} justifyContent="space-between" alignItems="center">
|
|
233
233
|
${this.leftHeaderTemplate()} ${this.titleTemplate()} ${this.rightHeaderTemplate()}
|
|
234
234
|
</wui-flex>
|
package/build/4194.index.js
CHANGED
|
@@ -73,7 +73,7 @@ export const __webpack_esm_id__=4194;export const __webpack_esm_ids__=[4194];exp
|
|
|
73
73
|
stroke-dashoffset: -125;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
`},14666:(t,e,i)=>{i.d(e,{H:()=>a});var n=i(80181),o=i(16655);const a=(0,o.u$)(class extends o.WL{constructor(t){if(super(t),t.type!==o.OA.ATTRIBUTE||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(t=>""!==t)));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const i=t.element.classList;for(const t of this.st)t in e||(i.remove(t),this.st.delete(t));for(const t in e){const n=!!e[t];n===this.st.has(t)||this.nt?.has(t)||(n?(i.add(t),this.st.add(t)):(i.remove(t),this.st.delete(t)))}return n.c0}})},16655:(t,e,i)=>{i.d(e,{OA:()=>n,WL:()=>a,u$:()=>o});const n={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},o=t=>(...e)=>({_$litDirective$:t,values:e});class a{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}},19306:(t,e,i)=>{i.d(e,{T:()=>n.T});var n=i(81309)},21348:(t,e,i)=>{var n=i(35842),o=i(47214),a=i(19306),r=i(63521),s=i(24210),c=i(27305),l=i(94304),h=function(t,e,i,n){var o,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(e,i,r):o(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};const d={add:async()=>(await i.e(913).then(i.bind(i,
|
|
76
|
+
`},14666:(t,e,i)=>{i.d(e,{H:()=>a});var n=i(80181),o=i(16655);const a=(0,o.u$)(class extends o.WL{constructor(t){if(super(t),t.type!==o.OA.ATTRIBUTE||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(t=>""!==t)));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const i=t.element.classList;for(const t of this.st)t in e||(i.remove(t),this.st.delete(t));for(const t in e){const n=!!e[t];n===this.st.has(t)||this.nt?.has(t)||(n?(i.add(t),this.st.add(t)):(i.remove(t),this.st.delete(t)))}return n.c0}})},16655:(t,e,i)=>{i.d(e,{OA:()=>n,WL:()=>a,u$:()=>o});const n={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},o=t=>(...e)=>({_$litDirective$:t,values:e});class a{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}},19306:(t,e,i)=>{i.d(e,{T:()=>n.T});var n=i(81309)},21348:(t,e,i)=>{var n=i(35842),o=i(47214),a=i(19306),r=i(63521),s=i(24210),c=i(27305),l=i(94304),h=function(t,e,i,n){var o,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(e,i,r):o(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};const d={add:async()=>(await i.e(913).then(i.bind(i,63294))).addSvg,allWallets:async()=>(await i.e(5218).then(i.bind(i,35218))).allWalletsSvg,arrowBottomCircle:async()=>(await i.e(1572).then(i.bind(i,21572))).arrowBottomCircleSvg,appStore:async()=>(await i.e(2557).then(i.bind(i,92557))).appStoreSvg,apple:async()=>(await i.e(6138).then(i.bind(i,6138))).appleSvg,arrowBottom:async()=>(await i.e(1415).then(i.bind(i,61415))).arrowBottomSvg,arrowLeft:async()=>(await i.e(9313).then(i.bind(i,79313))).arrowLeftSvg,arrowRight:async()=>(await i.e(6811).then(i.bind(i,79192))).arrowRightSvg,arrowTop:async()=>(await i.e(2289).then(i.bind(i,52289))).arrowTopSvg,bank:async()=>(await i.e(4226).then(i.bind(i,94226))).bankSvg,browser:async()=>(await i.e(9850).then(i.bind(i,39850))).browserSvg,card:async()=>(await i.e(5206).then(i.bind(i,5206))).cardSvg,checkmark:async()=>(await i.e(7311).then(i.bind(i,17311))).checkmarkSvg,checkmarkBold:async()=>(await i.e(9607).then(i.bind(i,9607))).checkmarkBoldSvg,chevronBottom:async()=>(await i.e(6553).then(i.bind(i,16553))).chevronBottomSvg,chevronLeft:async()=>(await i.e(1211).then(i.bind(i,61211))).chevronLeftSvg,chevronRight:async()=>(await i.e(5330).then(i.bind(i,95330))).chevronRightSvg,chevronTop:async()=>(await i.e(6639).then(i.bind(i,96639))).chevronTopSvg,chromeStore:async()=>(await i.e(2202).then(i.bind(i,52202))).chromeStoreSvg,clock:async()=>(await i.e(7540).then(i.bind(i,45159))).clockSvg,close:async()=>(await i.e(1226).then(i.bind(i,91226))).closeSvg,compass:async()=>(await i.e(5090).then(i.bind(i,55090))).compassSvg,coinPlaceholder:async()=>(await i.e(984).then(i.bind(i,30984))).coinPlaceholderSvg,copy:async()=>(await i.e(9309).then(i.bind(i,89309))).copySvg,cursor:async()=>(await i.e(1426).then(i.bind(i,41426))).cursorSvg,cursorTransparent:async()=>(await i.e(4857).then(i.bind(i,64857))).cursorTransparentSvg,desktop:async()=>(await i.e(602).then(i.bind(i,90602))).desktopSvg,disconnect:async()=>(await i.e(8714).then(i.bind(i,8714))).disconnectSvg,discord:async()=>(await i.e(3874).then(i.bind(i,33874))).discordSvg,etherscan:async()=>(await i.e(3131).then(i.bind(i,13131))).etherscanSvg,extension:async()=>(await i.e(2715).then(i.bind(i,2715))).extensionSvg,externalLink:async()=>(await i.e(1776).then(i.bind(i,51776))).externalLinkSvg,facebook:async()=>(await i.e(8964).then(i.bind(i,48964))).facebookSvg,farcaster:async()=>(await i.e(6715).then(i.bind(i,16715))).farcasterSvg,filters:async()=>(await i.e(1133).then(i.bind(i,71133))).filtersSvg,github:async()=>(await i.e(631).then(i.bind(i,20631))).githubSvg,google:async()=>(await i.e(1139).then(i.bind(i,41139))).googleSvg,helpCircle:async()=>(await i.e(9396).then(i.bind(i,9396))).helpCircleSvg,image:async()=>(await i.e(6175).then(i.bind(i,46175))).imageSvg,id:async()=>(await i.e(6969).then(i.bind(i,16969))).idSvg,infoCircle:async()=>(await i.e(6705).then(i.bind(i,96705))).infoCircleSvg,lightbulb:async()=>(await i.e(1125).then(i.bind(i,31125))).lightbulbSvg,mail:async()=>(await i.e(283).then(i.bind(i,70283))).mailSvg,mobile:async()=>(await i.e(5438).then(i.bind(i,95438))).mobileSvg,more:async()=>(await i.e(897).then(i.bind(i,50897))).moreSvg,networkPlaceholder:async()=>(await i.e(3828).then(i.bind(i,23828))).networkPlaceholderSvg,nftPlaceholder:async()=>(await i.e(8029).then(i.bind(i,88029))).nftPlaceholderSvg,off:async()=>(await i.e(8631).then(i.bind(i,48631))).offSvg,playStore:async()=>(await i.e(3646).then(i.bind(i,63646))).playStoreSvg,plus:async()=>(await i.e(2844).then(i.bind(i,12844))).plusSvg,qrCode:async()=>(await i.e(8717).then(i.bind(i,68717))).qrCodeIcon,recycleHorizontal:async()=>(await i.e(1136).then(i.bind(i,91136))).recycleHorizontalSvg,refresh:async()=>(await i.e(8249).then(i.bind(i,78249))).refreshSvg,search:async()=>(await i.e(9120).then(i.bind(i,29120))).searchSvg,send:async()=>(await i.e(2902).then(i.bind(i,72902))).sendSvg,swapHorizontal:async()=>(await i.e(3099).then(i.bind(i,93099))).swapHorizontalSvg,swapHorizontalMedium:async()=>(await i.e(7176).then(i.bind(i,37176))).swapHorizontalMediumSvg,swapHorizontalBold:async()=>(await i.e(6036).then(i.bind(i,96036))).swapHorizontalBoldSvg,swapHorizontalRoundedBold:async()=>(await i.e(3105).then(i.bind(i,23105))).swapHorizontalRoundedBoldSvg,swapVertical:async()=>(await i.e(4249).then(i.bind(i,34249))).swapVerticalSvg,telegram:async()=>(await i.e(8147).then(i.bind(i,8147))).telegramSvg,threeDots:async()=>(await i.e(967).then(i.bind(i,10967))).threeDotsSvg,twitch:async()=>(await i.e(1951).then(i.bind(i,51951))).twitchSvg,twitter:async()=>(await i.e(362).then(i.bind(i,60362))).xSvg,twitterIcon:async()=>(await i.e(7272).then(i.bind(i,27272))).twitterIconSvg,verify:async()=>(await i.e(9081).then(i.bind(i,99081))).verifySvg,verifyFilled:async()=>(await i.e(3550).then(i.bind(i,3550))).verifyFilledSvg,wallet:async()=>(await i.e(577).then(i.bind(i,30577))).walletSvg,walletConnect:async()=>(await i.e(1979).then(i.bind(i,81979))).walletConnectSvg,walletConnectLightBrown:async()=>(await i.e(1979).then(i.bind(i,81979))).walletConnectLightBrownSvg,walletConnectBrown:async()=>(await i.e(1979).then(i.bind(i,81979))).walletConnectBrownSvg,walletPlaceholder:async()=>(await i.e(3857).then(i.bind(i,43857))).walletPlaceholderSvg,warningCircle:async()=>(await i.e(6611).then(i.bind(i,96611))).warningCircleSvg,x:async()=>(await i.e(362).then(i.bind(i,60362))).xSvg,info:async()=>(await i.e(7780).then(i.bind(i,17780))).infoSvg,exclamationTriangle:async()=>(await i.e(7428).then(i.bind(i,67428))).exclamationTriangleSvg,reown:async()=>(await i.e(4733).then(i.bind(i,44733))).reownSvg};let g=class extends n.WF{constructor(){super(...arguments),this.size="md",this.name="copy",this.color="fg-300",this.aspectRatio="1 / 1"}render(){return this.style.cssText=`\n --local-color: var(--wui-color-${this.color});\n --local-width: var(--wui-icon-size-${this.size});\n --local-aspect-ratio: ${this.aspectRatio}\n `,n.qy`${(0,a.T)(async function(t){if(r.A.has(t))return r.A.get(t);const e=(d[t]??d.copy)();return r.A.set(t,e),e}(this.name),n.qy`<div class="fallback"></div>`)}`}};g.styles=[s.W5,s.ck,l.A],h([(0,o.MZ)()],g.prototype,"size",void 0),h([(0,o.MZ)()],g.prototype,"name",void 0),h([(0,o.MZ)()],g.prototype,"color",void 0),h([(0,o.MZ)()],g.prototype,"aspectRatio",void 0),g=h([(0,c.E)("wui-icon")],g)},21632:(t,e,i)=>{i.d(e,{A:()=>n});const n=i(35842).AH`
|
|
77
77
|
:host {
|
|
78
78
|
display: inline-flex;
|
|
79
79
|
justify-content: center;
|
package/build/4379.index.js
CHANGED
|
@@ -380,7 +380,7 @@ export const __webpack_esm_id__=4379;export const __webpack_esm_ids__=[4379];exp
|
|
|
380
380
|
z-index: 2;
|
|
381
381
|
display: flex;
|
|
382
382
|
}
|
|
383
|
-
`},18689:(t,e,i)=>{var o=i(35842),r=i(47214),a=i(
|
|
383
|
+
`},18689:(t,e,i)=>{var o=i(35842),r=i(47214),a=i(44637),n=i(42831),s=i(99013),l=i(89058),c=i(41430),d=i(16158),u=i(14479),p=i(5813),h=i(94768),w=(i(14208),i(26158),i(12210),i(57448),i(36740),i(58217),i(92536),function(t,e,i,o){var r,a=arguments.length,n=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(n=(a<3?r(n):a>3?r(e,i,n):r(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n});let g=class extends o.WF{constructor(){super(),this.wallet=n.I.state.data?.wallet,this.platform=void 0,this.platforms=[],this.isSiwxEnabled=Boolean(d.H.state.siwx),this.determinePlatforms(),this.initializeConnection()}render(){return o.qy`
|
|
384
384
|
${this.headerTemplate()}
|
|
385
385
|
<div>${this.platformTemplate()}</div>
|
|
386
386
|
<wui-ux-by-reown></wui-ux-by-reown>
|
|
@@ -487,7 +487,7 @@ export const __webpack_esm_id__=4379;export const __webpack_esm_ids__=[4379];exp
|
|
|
487
487
|
</wui-list-wallet>
|
|
488
488
|
`)}
|
|
489
489
|
</wui-flex>
|
|
490
|
-
`:(this.style.cssText="display: none",null)}onConnectWallet(t){n.a.selectWalletConnector(t)}};c([(0,r.MZ)()],d.prototype,"tabIdx",void 0),c([(0,r.MZ)()],d.prototype,"wallets",void 0),d=c([(0,l.EM)("w3m-connect-featured-widget")],d)},26158:(t,e,i)=>{var o=i(
|
|
490
|
+
`:(this.style.cssText="display: none",null)}onConnectWallet(t){n.a.selectWalletConnector(t)}};c([(0,r.MZ)()],d.prototype,"tabIdx",void 0),c([(0,r.MZ)()],d.prototype,"wallets",void 0),d=c([(0,l.EM)("w3m-connect-featured-widget")],d)},26158:(t,e,i)=>{var o=i(44637),r=i(89058),a=i(50731),n=i(14479),s=i(94768),l=i(61896);let c=class extends l.o{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-browser: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),n.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}async onConnectProxy(){try{this.error=!1;const{connectors:t}=a.a.state,e=t.find(t=>"ANNOUNCED"===t.type&&t.info?.rdns===this.wallet?.rdns||"INJECTED"===t.type||t.name===this.wallet?.name);if(!e)throw new Error("w3m-connecting-wc-browser: No connector found");await r.x.connectExternal(e,e.chain),o.W.close(),n.E.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:this.wallet?.name||"Unknown"}})}catch(t){n.E.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:t?.message??"Unknown"}}),this.error=!0}}};c=function(t,e,i,o){var r,a=arguments.length,n=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(n=(a<3?r(n):a>3?r(e,i,n):r(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n}([(0,s.EM)("w3m-connecting-wc-browser")],c)},26173:(t,e,i)=>{i.d(e,{A:()=>o});const o=i(35842).AH`
|
|
491
491
|
wui-grid {
|
|
492
492
|
max-height: clamp(360px, 400px, 80vh);
|
|
493
493
|
overflow: scroll;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const __webpack_esm_id__=4549;export const __webpack_esm_ids__=[4549];export const __webpack_esm_modules__={52661:()=>{},93553:()=>{}};
|
package/build/5972.index.js
CHANGED
|
@@ -200,7 +200,14 @@ export const __webpack_esm_id__=5972;export const __webpack_esm_ids__=[5972];exp
|
|
|
200
200
|
`},35007:(e,t,i)=>{var o=i(35842),a=i(47214),r=i(8235),s=i(94768),n=(i(98191),i(46569),i(96975),i(22241)),c=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let l=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.open=r.I.state.open,this.message=r.I.state.message,this.triggerRect=r.I.state.triggerRect,this.variant=r.I.state.variant,this.unsubscribe.push(r.I.subscribe(e=>{this.open=e.open,this.message=e.message,this.triggerRect=e.triggerRect,this.variant=e.variant}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){this.dataset.variant=this.variant;const e=this.triggerRect.top,t=this.triggerRect.left;return this.style.cssText=`\n --w3m-tooltip-top: ${e}px;\n --w3m-tooltip-left: ${t}px;\n --w3m-tooltip-parent-width: ${this.triggerRect.width/2}px;\n --w3m-tooltip-display: ${this.open?"flex":"none"};\n --w3m-tooltip-opacity: ${this.open?1:0};\n `,o.qy`<wui-flex>
|
|
201
201
|
<wui-icon data-placement="top" color="fg-100" size="inherit" name="cursor"></wui-icon>
|
|
202
202
|
<wui-text color="inherit" variant="small-500">${this.message}</wui-text>
|
|
203
|
-
</wui-flex>`}};l.styles=[n.A],c([(0,a.wk)()],l.prototype,"open",void 0),c([(0,a.wk)()],l.prototype,"message",void 0),c([(0,a.wk)()],l.prototype,"triggerRect",void 0),c([(0,a.wk)()],l.prototype,"variant",void 0),l=c([(0,s.EM)("w3m-tooltip"),(0,s.EM)("w3m-tooltip")],l)},
|
|
203
|
+
</wui-flex>`}};l.styles=[n.A],c([(0,a.wk)()],l.prototype,"open",void 0),c([(0,a.wk)()],l.prototype,"message",void 0),c([(0,a.wk)()],l.prototype,"triggerRect",void 0),c([(0,a.wk)()],l.prototype,"variant",void 0),l=c([(0,s.EM)("w3m-tooltip"),(0,s.EM)("w3m-tooltip")],l)},40267:(e,t,i)=>{var o=i(35842),a=i(47214),r=i(27938),s=i(94768),n=(i(81003),i(56373)),c=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const l={info:{backgroundColor:"fg-350",iconColor:"fg-325",icon:"info"},success:{backgroundColor:"success-glass-reown-020",iconColor:"success-125",icon:"checkmark"},warning:{backgroundColor:"warning-glass-reown-020",iconColor:"warning-100",icon:"warningCircle"},error:{backgroundColor:"error-glass-reown-020",iconColor:"error-125",icon:"exclamationTriangle"}};let w=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.open=r.h.state.open,this.onOpen(!0),this.unsubscribe.push(r.h.subscribeKey("open",e=>{this.open=e,this.onOpen(!1)}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const{message:e,variant:t}=r.h.state,i=l[t];return o.qy`
|
|
204
|
+
<wui-alertbar
|
|
205
|
+
message=${e}
|
|
206
|
+
backgroundColor=${i?.backgroundColor}
|
|
207
|
+
iconColor=${i?.iconColor}
|
|
208
|
+
icon=${i?.icon}
|
|
209
|
+
></wui-alertbar>
|
|
210
|
+
`}onOpen(e){this.open?(this.animate([{opacity:0,transform:"scale(0.85)"},{opacity:1,transform:"scale(1)"}],{duration:150,fill:"forwards",easing:"ease"}),this.style.cssText="pointer-events: auto"):e||(this.animate([{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.85)"}],{duration:150,fill:"forwards",easing:"ease"}),this.style.cssText="pointer-events: none")}};w.styles=n.A,c([(0,a.wk)()],w.prototype,"open",void 0),w=c([(0,s.EM)("w3m-alertbar")],w)},41525:(e,t,i)=>{i.d(t,{A:()=>o});const o=i(35842).AH`
|
|
204
211
|
button {
|
|
205
212
|
border-radius: var(--local-border-radius);
|
|
206
213
|
color: var(--wui-color-fg-100);
|
|
@@ -417,14 +424,7 @@ export const __webpack_esm_id__=5972;export const __webpack_esm_ids__=[5972];exp
|
|
|
417
424
|
button:active {
|
|
418
425
|
background-color: var(--wui-color-gray-glass-005);
|
|
419
426
|
}
|
|
420
|
-
`},
|
|
421
|
-
<wui-alertbar
|
|
422
|
-
message=${e}
|
|
423
|
-
backgroundColor=${i?.backgroundColor}
|
|
424
|
-
iconColor=${i?.iconColor}
|
|
425
|
-
icon=${i?.icon}
|
|
426
|
-
></wui-alertbar>
|
|
427
|
-
`}onOpen(e){this.open?(this.animate([{opacity:0,transform:"scale(0.85)"},{opacity:1,transform:"scale(1)"}],{duration:150,fill:"forwards",easing:"ease"}),this.style.cssText="pointer-events: auto"):e||(this.animate([{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.85)"}],{duration:150,fill:"forwards",easing:"ease"}),this.style.cssText="pointer-events: none")}};w.styles=n.A,c([(0,a.wk)()],w.prototype,"open",void 0),w=c([(0,s.EM)("w3m-alertbar")],w)},65327:(e,t,i)=>{var o=i(35842),a=i(47214),r=i(41430),s=i(94768),n=(i(22187),i(53105)),c=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const l={loading:void 0,success:{backgroundColor:"success-100",iconColor:"success-100",icon:"checkmark"},error:{backgroundColor:"error-100",iconColor:"error-100",icon:"close"}};let w=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.open=r.P.state.open,this.unsubscribe.push(r.P.subscribeKey("open",e=>{this.open=e,this.onOpen()}))}disconnectedCallback(){clearTimeout(this.timeout),this.unsubscribe.forEach(e=>e())}render(){const{message:e,variant:t,svg:i}=r.P.state,a=l[t],{icon:s,iconColor:n}=i??a??{};return o.qy`
|
|
427
|
+
`},65327:(e,t,i)=>{var o=i(35842),a=i(47214),r=i(41430),s=i(94768),n=(i(22187),i(53105)),c=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const l={loading:void 0,success:{backgroundColor:"success-100",iconColor:"success-100",icon:"checkmark"},error:{backgroundColor:"error-100",iconColor:"error-100",icon:"close"}};let w=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.open=r.P.state.open,this.unsubscribe.push(r.P.subscribeKey("open",e=>{this.open=e,this.onOpen()}))}disconnectedCallback(){clearTimeout(this.timeout),this.unsubscribe.forEach(e=>e())}render(){const{message:e,variant:t,svg:i}=r.P.state,a=l[t],{icon:s,iconColor:n}=i??a??{};return o.qy`
|
|
428
428
|
<wui-snackbar
|
|
429
429
|
message=${e}
|
|
430
430
|
backgroundColor=${a?.backgroundColor}
|
|
@@ -432,7 +432,7 @@ export const __webpack_esm_id__=5972;export const __webpack_esm_ids__=[5972];exp
|
|
|
432
432
|
icon=${s}
|
|
433
433
|
.loading=${"loading"===t}
|
|
434
434
|
></wui-snackbar>
|
|
435
|
-
`}onOpen(){clearTimeout(this.timeout),this.open?(this.animate([{opacity:0,transform:"translateX(-50%) scale(0.85)"},{opacity:1,transform:"translateX(-50%) scale(1)"}],{duration:150,fill:"forwards",easing:"ease"}),this.timeout&&clearTimeout(this.timeout),r.P.state.autoClose&&(this.timeout=setTimeout(()=>r.P.hide(),2500))):this.animate([{opacity:1,transform:"translateX(-50%) scale(1)"},{opacity:0,transform:"translateX(-50%) scale(0.85)"}],{duration:150,fill:"forwards",easing:"ease"})}};w.styles=n.A,c([(0,a.wk)()],w.prototype,"open",void 0),w=c([(0,s.EM)("w3m-snackbar")],w)},66229:(e,t,i)=>{var o=i(35842),a=i(47214),r=i(27390),s=i(
|
|
435
|
+
`}onOpen(){clearTimeout(this.timeout),this.open?(this.animate([{opacity:0,transform:"translateX(-50%) scale(0.85)"},{opacity:1,transform:"translateX(-50%) scale(1)"}],{duration:150,fill:"forwards",easing:"ease"}),this.timeout&&clearTimeout(this.timeout),r.P.state.autoClose&&(this.timeout=setTimeout(()=>r.P.hide(),2500))):this.animate([{opacity:1,transform:"translateX(-50%) scale(1)"},{opacity:0,transform:"translateX(-50%) scale(0.85)"}],{duration:150,fill:"forwards",easing:"ease"})}};w.styles=n.A,c([(0,a.wk)()],w.prototype,"open",void 0),w=c([(0,s.EM)("w3m-snackbar")],w)},66229:(e,t,i)=>{var o=i(35842),a=i(47214),r=i(27390),s=i(44637),n=i(42831),c=i(16279),l=i(99013),w=i(89058),d=i(50731),p=i(12472),u=i(16158),h=i(14479),m=i(93224),v=i(24537),g=i(94768),y=(i(98191),i(15934),i(95084),i(13758),i(96975),i(74091)),f=i(82007),b=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const k=["SmartSessionList"];function x(){const e=n.I.state.data?.connector?.name,t=n.I.state.data?.wallet?.name,i=n.I.state.data?.network?.name,o=t??e,a=d.a.getConnectors();return{Connect:`Connect ${1===a.length&&"w3m-email"===a[0]?.id?"Email":""} Wallet`,Create:"Create Wallet",ChooseAccountName:void 0,Account:void 0,AccountSettings:void 0,AllWallets:"All Wallets",ApproveTransaction:"Approve Transaction",BuyInProgress:"Buy",ConnectingExternal:o??"Connect Wallet",ConnectingWalletConnect:o??"WalletConnect",ConnectingWalletConnectBasic:"WalletConnect",ConnectingSiwe:"Sign In",Convert:"Convert",ConvertSelectToken:"Select token",ConvertPreview:"Preview convert",Downloads:o?`Get ${o}`:"Downloads",EmailLogin:"Email Login",EmailVerifyOtp:"Confirm Email",EmailVerifyDevice:"Register Device",GetWallet:"Get a wallet",Networks:"Choose Network",OnRampProviders:"Choose Provider",OnRampActivity:"Activity",OnRampTokenSelect:"Select Token",OnRampFiatSelect:"Select Currency",Profile:void 0,SwitchNetwork:i??"Switch Network",SwitchAddress:"Switch Address",Transactions:"Activity",UnsupportedChain:"Switch Network",UpgradeEmailWallet:"Upgrade your Wallet",UpdateEmailWallet:"Edit Email",UpdateEmailPrimaryOtp:"Confirm Current Email",UpdateEmailSecondaryOtp:"Confirm New Email",WhatIsABuy:"What is Buy?",RegisterAccountName:"Choose name",RegisterAccountNameSuccess:"",WalletReceive:"Receive",WalletCompatibleNetworks:"Compatible Networks",Swap:"Swap",SwapSelectToken:"Select token",SwapPreview:"Preview swap",WalletSend:"Send",WalletSendPreview:"Review send",WalletSendSelectToken:"Select Token",WhatIsANetwork:"What is a network?",WhatIsAWallet:"What is a wallet?",ConnectWallets:"Connect wallet",ConnectSocials:"All socials",ConnectingSocial:c.U.state.socialProvider?c.U.state.socialProvider:"Connect Social",ConnectingMultiChain:"Select chain",ConnectingFarcaster:"Farcaster",SwitchActiveChain:"Switch chain",SmartSessionCreated:void 0,SmartSessionList:"Smart Sessions",SIWXSignMessage:"Sign In"}}let C=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.heading=x()[n.I.state.view],this.network=l.W.state.activeCaipNetwork,this.networkImage=m.$.getNetworkImage(this.network),this.buffering=!1,this.showBack=!1,this.prevHistoryLength=1,this.view=n.I.state.view,this.viewDirection="",this.headerText=x()[n.I.state.view],this.unsubscribe.push(p.j.subscribeNetworkImages(()=>{this.networkImage=m.$.getNetworkImage(this.network)}),n.I.subscribeKey("view",e=>{setTimeout(()=>{this.view=e,this.headerText=x()[e]},y.o.ANIMATION_DURATIONS.HeaderText),this.onViewChange(),this.onHistoryChange()}),w.x.subscribeKey("buffering",e=>this.buffering=e),l.W.subscribeKey("activeCaipNetwork",e=>{this.network=e,this.networkImage=m.$.getNetworkImage(this.network)}))}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){return o.qy`
|
|
436
436
|
<wui-flex .padding=${this.getPadding()} justifyContent="space-between" alignItems="center">
|
|
437
437
|
${this.leftHeaderTemplate()} ${this.titleTemplate()} ${this.rightHeaderTemplate()}
|
|
438
438
|
</wui-flex>
|
|
@@ -479,7 +479,7 @@ export const __webpack_esm_id__=5972;export const __webpack_esm_ids__=[5972];exp
|
|
|
479
479
|
id="dynamic"
|
|
480
480
|
icon="helpCircle"
|
|
481
481
|
@click=${this.onWalletHelp.bind(this)}
|
|
482
|
-
></wui-icon-link>`}onNetworks(){this.isAllowedNetworkSwitch()&&(h.E.sendEvent({type:"track",event:"CLICK_NETWORKS"}),n.I.push("Networks"))}isAllowedNetworkSwitch(){const e=l.W.getAllRequestedCaipNetworks(),t=!!e&&e.length>1,i=e?.find(({id:e})=>e===this.network?.id);return t||!i}getPadding(){return this.heading?["l","2l","l","2l"]:["0","2l","0","2l"]}onViewChange(){const{history:e}=n.I.state;let t=y.o.VIEW_DIRECTION.Next;e.length<this.prevHistoryLength&&(t=y.o.VIEW_DIRECTION.Prev),this.prevHistoryLength=e.length,this.viewDirection=t}async onHistoryChange(){const{history:e}=n.I.state,t=this.shadowRoot?.querySelector("#dynamic");e.length>1&&!this.showBack&&t?(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!0,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})):e.length<=1&&this.showBack&&t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!1,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}onGoBack(){n.I.goBack()}};C.styles=f.A,b([(0,a.wk)()],C.prototype,"heading",void 0),b([(0,a.wk)()],C.prototype,"network",void 0),b([(0,a.wk)()],C.prototype,"networkImage",void 0),b([(0,a.wk)()],C.prototype,"buffering",void 0),b([(0,a.wk)()],C.prototype,"showBack",void 0),b([(0,a.wk)()],C.prototype,"prevHistoryLength",void 0),b([(0,a.wk)()],C.prototype,"view",void 0),b([(0,a.wk)()],C.prototype,"viewDirection",void 0),b([(0,a.wk)()],C.prototype,"headerText",void 0),C=b([(0,g.EM)("w3m-header")],C)},71588:(e,t,i)=>{i.d(t,{t:()=>k});var o=i(35842),a=i(47214),r=i(27390),s=i(95191),n=i(
|
|
482
|
+
></wui-icon-link>`}onNetworks(){this.isAllowedNetworkSwitch()&&(h.E.sendEvent({type:"track",event:"CLICK_NETWORKS"}),n.I.push("Networks"))}isAllowedNetworkSwitch(){const e=l.W.getAllRequestedCaipNetworks(),t=!!e&&e.length>1,i=e?.find(({id:e})=>e===this.network?.id);return t||!i}getPadding(){return this.heading?["l","2l","l","2l"]:["0","2l","0","2l"]}onViewChange(){const{history:e}=n.I.state;let t=y.o.VIEW_DIRECTION.Next;e.length<this.prevHistoryLength&&(t=y.o.VIEW_DIRECTION.Prev),this.prevHistoryLength=e.length,this.viewDirection=t}async onHistoryChange(){const{history:e}=n.I.state,t=this.shadowRoot?.querySelector("#dynamic");e.length>1&&!this.showBack&&t?(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!0,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})):e.length<=1&&this.showBack&&t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!1,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}onGoBack(){n.I.goBack()}};C.styles=f.A,b([(0,a.wk)()],C.prototype,"heading",void 0),b([(0,a.wk)()],C.prototype,"network",void 0),b([(0,a.wk)()],C.prototype,"networkImage",void 0),b([(0,a.wk)()],C.prototype,"buffering",void 0),b([(0,a.wk)()],C.prototype,"showBack",void 0),b([(0,a.wk)()],C.prototype,"prevHistoryLength",void 0),b([(0,a.wk)()],C.prototype,"view",void 0),b([(0,a.wk)()],C.prototype,"viewDirection",void 0),b([(0,a.wk)()],C.prototype,"headerText",void 0),C=b([(0,g.EM)("w3m-header")],C)},71588:(e,t,i)=>{i.d(t,{t:()=>k});var o=i(35842),a=i(47214),r=i(27390),s=i(95191),n=i(44637),c=i(42831),l=i(99013),w=i(50731),d=i(41430),p=i(40868),u=i(26545),h=i(16158),m=i(5813),v=i(24537),g=i(94768),y=(i(43594),i(98191),i(40267),i(66229),i(65327),i(35007),i(6978),i(50656)),f=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const b="scroll-lock";let k=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.abortController=void 0,this.hasPrefetched=!1,this.enableEmbedded=h.H.state.enableEmbedded,this.open=n.W.state.open,this.caipAddress=l.W.state.activeCaipAddress,this.caipNetwork=l.W.state.activeCaipNetwork,this.shake=n.W.state.shake,this.filterByNamespace=w.a.state.filterByNamespace,this.initializeTheming(),p.N.prefetchAnalyticsConfig(),this.unsubscribe.push(n.W.subscribeKey("open",e=>e?this.onOpen():this.onClose()),n.W.subscribeKey("shake",e=>this.shake=e),l.W.subscribeKey("activeCaipNetwork",e=>this.onNewNetwork(e)),l.W.subscribeKey("activeCaipAddress",e=>this.onNewAddress(e)),h.H.subscribeKey("enableEmbedded",e=>this.enableEmbedded=e),w.a.subscribeKey("filterByNamespace",e=>{this.filterByNamespace===e||l.W.getAccountData(e)?.caipAddress||(p.N.fetchRecommendedWallets(),this.filterByNamespace=e)}))}firstUpdated(){if(this.caipAddress){if(this.enableEmbedded)return n.W.close(),void this.prefetch();this.onNewAddress(this.caipAddress)}this.open&&this.onOpen(),this.enableEmbedded&&this.prefetch()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.onRemoveKeyboardListener()}render(){return this.style.cssText=`\n --local-border-bottom-mobile-radius: ${this.enableEmbedded?"clamp(0px, var(--wui-border-radius-l), 44px)":"0px"};\n `,this.enableEmbedded?o.qy`${this.contentTemplate()}
|
|
483
483
|
<w3m-tooltip></w3m-tooltip> `:this.open?o.qy`
|
|
484
484
|
<wui-flex @click=${this.onOverlayClick.bind(this)} data-testid="w3m-modal-overlay">
|
|
485
485
|
${this.contentTemplate()}
|
package/build/6484.index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const __webpack_esm_id__=6484;export const __webpack_esm_ids__=[6484];export const __webpack_esm_modules__={3410:(t,e,n)=>{const r=n(88491);function o(t){this.mode=r.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){let e,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);const o=this.data.length-e;o>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*o+1))},t.exports=o},4675:(t,e)=>{function n(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let 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");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});const 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||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,n){const r=e.getScale(t,n);return Math.floor((t+2*n.margin)*r)},e.qrToImageData=function(t,n,r){const o=n.modules.size,i=n.modules.data,s=e.getScale(o,r),a=Math.floor((o+2*r.margin)*s),u=r.margin*s,c=[r.color.light,r.color.dark];for(let e=0;e<a;e++)for(let n=0;n<a;n++){let l=4*(e*a+n),f=r.color.light;e>=u&&n>=u&&e<a-u&&n<a-u&&(f=c[i[Math.floor((e-u)/s)*o+Math.floor((n-u)/s)]?1:0]),t[l++]=f.r,t[l++]=f.g,t[l++]=f.b,t[l]=f.a}}},17165:(t,e)=>{const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";e.KANJI=new RegExp(r,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(o,"g"),e.NUMERIC=new RegExp(n,"g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const i=new RegExp("^"+r+"$"),s=new RegExp("^"+n+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(t){return i.test(t)},e.testNumeric=function(t){return s.test(t)},e.testAlphanumeric=function(t){return a.test(t)}},17787:(t,e,n)=>{const r=n(35012),o=n(88491);function i(t){this.mode=o.BYTE,"string"==typeof t&&(t=r(t)),this.data=new Uint8Array(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(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},t.exports=i},26068:(t,e,n)=>{const r=n(96667),o=r.getBCHDigit(1335);e.getEncodedBits=function(t,e){const n=t.bit<<3|e;let i=n<<10;for(;r.getBCHDigit(i)-o>=0;)i^=1335<<r.getBCHDigit(i)-o;return 21522^(n<<10|i)}},34339:(t,e,n)=>{const r=n(94470);function o(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(t){this.degree=t,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const e=new Uint8Array(t.length+this.degree);e.set(t);const n=r.mod(e,this.genPoly),o=this.degree-n.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(n,o),t}return n},t.exports=o},35012:t=>{t.exports=function(t){for(var e=[],n=t.length,r=0;r<n;r++){var o=t.charCodeAt(r);if(o>=55296&&o<=56319&&n>r+1){var i=t.charCodeAt(r+1);i>=56320&&i<=57343&&(o=1024*(o-55296)+i-56320+65536,r+=1)}o<128?e.push(o):o<2048?(e.push(o>>6|192),e.push(63&o|128)):o<55296||o>=57344&&o<65536?(e.push(o>>12|224),e.push(o>>6&63|128),e.push(63&o|128)):o>=65536&&o<=1114111?(e.push(o>>18|240),e.push(o>>12&63|128),e.push(o>>6&63|128),e.push(63&o|128)):e.push(239,191,189)}return new Uint8Array(e).buffer}},37958:(t,e,n)=>{const r=n(88491),o=n(3410),i=n(60532),s=n(17787),a=n(44822),u=n(17165),c=n(96667),l=n(53005);function f(t){return unescape(encodeURIComponent(t)).length}function h(t,e,n){const r=[];let o;for(;null!==(o=t.exec(n));)r.push({data:o[0],index:o.index,mode:e,length:o[0].length});return r}function g(t){const e=h(u.NUMERIC,r.NUMERIC,t),n=h(u.ALPHANUMERIC,r.ALPHANUMERIC,t);let o,i;return c.isKanjiModeEnabled()?(o=h(u.BYTE,r.BYTE,t),i=h(u.KANJI,r.KANJI,t)):(o=h(u.BYTE_KANJI,r.BYTE,t),i=[]),e.concat(n,o,i).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 r.NUMERIC:return o.getBitsLength(t);case r.ALPHANUMERIC:return i.getBitsLength(t);case r.KANJI:return a.getBitsLength(t);case r.BYTE:return s.getBitsLength(t)}}function p(t,e){let n;const u=r.getBestModeForData(t);if(n=r.from(e,u),n!==r.BYTE&&n.bit<u.bit)throw new Error('"'+t+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(u));switch(n!==r.KANJI||c.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new o(t);case r.ALPHANUMERIC:return new i(t);case r.KANJI:return new a(t);case r.BYTE:return new s(t)}}e.fromArray=function(t){return t.reduce(function(t,e){return"string"==typeof e?t.push(p(e,null)):e.data&&t.push(p(e.data,e.mode)),t},[])},e.fromString=function(t,n){const o=function(t){const e=[];for(let n=0;n<t.length;n++){const o=t[n];switch(o.mode){case r.NUMERIC:e.push([o,{data:o.data,mode:r.ALPHANUMERIC,length:o.length},{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.ALPHANUMERIC:e.push([o,{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.KANJI:e.push([o,{data:o.data,mode:r.BYTE,length:f(o.data)}]);break;case r.BYTE:e.push([{data:o.data,mode:r.BYTE,length:f(o.data)}])}}return e}(g(t,c.isKanjiModeEnabled())),i=function(t,e){const n={},o={start:{}};let i=["start"];for(let s=0;s<t.length;s++){const a=t[s],u=[];for(let t=0;t<a.length;t++){const c=a[t],l=""+s+t;u.push(l),n[l]={node:c,lastCount:0},o[l]={};for(let t=0;t<i.length;t++){const s=i[t];n[s]&&n[s].node.mode===c.mode?(o[s][l]=d(n[s].lastCount+c.length,c.mode)-d(n[s].lastCount,c.mode),n[s].lastCount+=c.length):(n[s]&&(n[s].lastCount=c.length),o[s][l]=d(c.length,c.mode)+4+r.getCharCountIndicator(c.mode,e))}}i=u}for(let t=0;t<i.length;t++)o[i[t]].end=0;return{map:o,table:n}}(o,n),s=l.find_path(i.map,"start","end"),a=[];for(let t=1;t<s.length-1;t++)a.push(i.table[s[t]].node);return e.fromArray(a.reduce(function(t,e){const n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)},[]))},e.rawSplit=function(t){return e.fromArray(g(t,c.isKanjiModeEnabled()))}},38587:(t,e)=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){const e=t.size;let n=0,r=0,o=0,i=null,s=null;for(let a=0;a<e;a++){r=o=0,i=s=null;for(let u=0;u<e;u++){let e=t.get(a,u);e===i?r++:(r>=5&&(n+=r-5+3),i=e,r=1),e=t.get(u,a),e===s?o++:(o>=5&&(n+=o-5+3),s=e,o=1)}r>=5&&(n+=r-5+3),o>=5&&(n+=o-5+3)}return n},e.getPenaltyN2=function(t){const e=t.size;let n=0;for(let r=0;r<e-1;r++)for(let o=0;o<e-1;o++){const e=t.get(r,o)+t.get(r,o+1)+t.get(r+1,o)+t.get(r+1,o+1);4!==e&&0!==e||n++}return 3*n},e.getPenaltyN3=function(t){const e=t.size;let n=0,r=0,o=0;for(let i=0;i<e;i++){r=o=0;for(let s=0;s<e;s++)r=r<<1&2047|t.get(i,s),s>=10&&(1488===r||93===r)&&n++,o=o<<1&2047|t.get(s,i),s>=10&&(1488===o||93===o)&&n++}return 40*n},e.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let r=0;r<n;r++)e+=t.data[r];return 10*Math.abs(Math.ceil(100*e/n/5)-10)},e.applyMask=function(t,e){const r=e.size;for(let o=0;o<r;o++)for(let i=0;i<r;i++)e.isReserved(i,o)||e.xor(i,o,n(t,i,o))},e.getBestMask=function(t,n){const r=Object.keys(e.Patterns).length;let o=0,i=1/0;for(let s=0;s<r;s++){n(s),e.applyMask(s,t);const r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(s,t),r<i&&(i=r,o=s)}return o}},44822:(t,e,n)=>{const r=n(88491),o=n(96667);function i(t){this.mode=r.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){let e;for(e=0;e<this.data.length;e++){let n=o.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13)}},t.exports=i},45282:(t,e,n)=>{const r=n(96667),o=n(66701),i=n(72100),s=n(82839),a=n(54240),u=n(63827),c=n(38587),l=n(50583),f=n(34339),h=n(84542),g=n(26068),d=n(88491),p=n(37958);function w(t,e,n){const r=t.size,o=g.getEncodedBits(e,n);let i,s;for(i=0;i<15;i++)s=1==(o>>i&1),i<6?t.set(i,8,s,!0):i<8?t.set(i+1,8,s,!0):t.set(r-15+i,8,s,!0),i<8?t.set(8,r-i-1,s,!0):i<9?t.set(8,15-i-1+1,s,!0):t.set(8,15-i-1,s,!0);t.set(r-8,8,1,!0)}function m(t,e,n,o){let g;if(Array.isArray(t))g=p.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let r=e;if(!r){const e=p.rawSplit(t);r=h.getBestVersionForData(e,n)}g=p.fromString(t,r||40)}}const m=h.getBestVersionForData(g,n);if(!m)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<m)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+m+".\n")}else e=m;const E=function(t,e,n){const o=new i;n.forEach(function(e){o.put(e.mode.bit,4),o.put(e.getLength(),d.getCharCountIndicator(e.mode,t)),e.write(o)});const s=8*(r.getSymbolTotalCodewords(t)-l.getTotalCodewordsCount(t,e));for(o.getLengthInBits()+4<=s&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);const a=(s-o.getLengthInBits())/8;for(let t=0;t<a;t++)o.put(t%2?17:236,8);return function(t,e,n){const o=r.getSymbolTotalCodewords(e),i=o-l.getTotalCodewordsCount(e,n),s=l.getBlocksCount(e,n),a=s-o%s,u=Math.floor(o/s),c=Math.floor(i/s),h=c+1,g=u-c,d=new f(g);let p=0;const w=new Array(s),m=new Array(s);let E=0;const y=new Uint8Array(t.buffer);for(let t=0;t<s;t++){const e=t<a?c:h;w[t]=y.slice(p,p+e),m[t]=d.encode(w[t]),p+=e,E=Math.max(E,e)}const A=new Uint8Array(o);let C,B,I=0;for(C=0;C<E;C++)for(B=0;B<s;B++)C<w[B].length&&(A[I++]=w[B][C]);for(C=0;C<g;C++)for(B=0;B<s;B++)A[I++]=m[B][C];return A}(o,t,e)}(e,n,g),y=r.getSymbolSize(e),A=new s(y);return function(t,e){const n=t.size,r=u.getPositions(e);for(let e=0;e<r.length;e++){const o=r[e][0],i=r[e][1];for(let e=-1;e<=7;e++)if(!(o+e<=-1||n<=o+e))for(let r=-1;r<=7;r++)i+r<=-1||n<=i+r||(e>=0&&e<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===e||6===e)||e>=2&&e<=4&&r>=2&&r<=4?t.set(o+e,i+r,!0,!0):t.set(o+e,i+r,!1,!0))}}(A,e),function(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2==0;t.set(n,6,e,!0),t.set(6,n,e,!0)}}(A),function(t,e){const n=a.getPositions(e);for(let e=0;e<n.length;e++){const r=n[e][0],o=n[e][1];for(let e=-2;e<=2;e++)for(let n=-2;n<=2;n++)-2===e||2===e||-2===n||2===n||0===e&&0===n?t.set(r+e,o+n,!0,!0):t.set(r+e,o+n,!1,!0)}}(A,e),w(A,n,0),e>=7&&function(t,e){const n=t.size,r=h.getEncodedBits(e);let o,i,s;for(let e=0;e<18;e++)o=Math.floor(e/3),i=e%3+n-8-3,s=1==(r>>e&1),t.set(o,i,s,!0),t.set(i,o,s,!0)}(A,e),function(t,e){const n=t.size;let r=-1,o=n-1,i=7,s=0;for(let a=n-1;a>0;a-=2)for(6===a&&a--;;){for(let n=0;n<2;n++)if(!t.isReserved(o,a-n)){let r=!1;s<e.length&&(r=1==(e[s]>>>i&1)),t.set(o,a-n,r),i--,-1===i&&(s++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(A,E),isNaN(o)&&(o=c.getBestMask(A,w.bind(null,A,n))),c.applyMask(o,A),w(A,n,o),{modules:A,version:e,errorCorrectionLevel:n,maskPattern:o,segments:g}}e.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");let n,i,s=o.M;return void 0!==e&&(s=o.from(e.errorCorrectionLevel,o.M),n=h.from(e.version),i=c.from(e.maskPattern),e.toSJISFunc&&r.setToSJISFunction(e.toSJISFunc)),m(t,n,s,i)}},46940:(t,e,n)=>{const r=n(4675);e.render=function(t,e,n){let o=n,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=r.getOptions(o);const s=r.getImageWidth(t.modules.size,o),a=i.getContext("2d"),u=a.createImageData(s,s);return r.qrToImageData(u.data,t,o),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(a,i,s),a.putImageData(u,0,0),i},e.renderToDataURL=function(t,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});const i=e.render(t,n,o),s=o.type||"image/png",a=o.rendererOpts||{};return i.toDataURL(s,a.quality)}},50119:(t,e)=>{e.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},50583:(t,e,n)=>{const r=n(66701),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];e.getBlocksCount=function(t,e){switch(e){case r.L:return o[4*(t-1)+0];case r.M:return o[4*(t-1)+1];case r.Q:return o[4*(t-1)+2];case r.H:return o[4*(t-1)+3];default:return}},e.getTotalCodewordsCount=function(t,e){switch(e){case r.L:return i[4*(t-1)+0];case r.M:return i[4*(t-1)+1];case r.Q:return i[4*(t-1)+2];case r.H:return i[4*(t-1)+3];default:return}}},50869:t=>{t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},54240:(t,e,n)=>{const r=n(96667).getSymbolSize;e.getRowColCoords=function(t){if(1===t)return[];const e=Math.floor(t/7)+2,n=r(t),o=145===n?26:2*Math.ceil((n-13)/(2*e-2)),i=[n-7];for(let t=1;t<e-1;t++)i[t]=i[t-1]-o;return i.push(6),i.reverse()},e.getPositions=function(t){const n=[],r=e.getRowColCoords(t),o=r.length;for(let t=0;t<o;t++)for(let e=0;e<o;e++)0===t&&0===e||0===t&&e===o-1||t===o-1&&0===e||n.push([r[t],r[e]]);return n}},60532:(t,e,n)=>{const r=n(88491),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=r.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){let e;for(e=0;e+2<=this.data.length;e+=2){let n=45*o.indexOf(this.data[e]);n+=o.indexOf(this.data[e+1]),t.put(n,11)}this.data.length%2&&t.put(o.indexOf(this.data[e]),6)},t.exports=i},63827:(t,e,n)=>{const r=n(96667).getSymbolSize;e.getPositions=function(t){const e=r(t);return[[0,0],[e-7,0],[0,e-7]]}},66484:(t,e,n)=>{const r=n(50869),o=n(45282),i=n(46940),s=n(81169);function a(t,e,n,i,s){const a=[].slice.call(arguments,1),u=a.length,c="function"==typeof a[u-1];if(!c&&!r())throw new Error("Callback required as last argument");if(!c){if(u<1)throw new Error("Too few arguments provided");return 1===u?(n=e,e=i=void 0):2!==u||e.getContext||(i=n,n=e,e=void 0),new Promise(function(r,s){try{const s=o.create(n,i);r(t(s,e,i))}catch(t){s(t)}})}if(u<2)throw new Error("Too few arguments provided");2===u?(s=n,n=e,e=i=void 0):3===u&&(e.getContext&&void 0===s?(s=i,i=void 0):(s=i,i=n,n=e,e=void 0));try{const r=o.create(n,i);s(null,t(r,e,i))}catch(t){s(t)}}e.create=o.create,e.toCanvas=a.bind(null,i.render),e.toDataURL=a.bind(null,i.renderToDataURL),e.toString=a.bind(null,function(t,e,n){return s.render(t,n)})},66701:(t,e)=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,n){if(e.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 e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return n}}},72100:t=>{function e(){this.buffer=[],this.length=0}e.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=e},81169:(t,e,n)=>{const r=n(4675);function o(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function i(t,e,n){let r=t+e;return void 0!==n&&(r+=" "+n),r}e.render=function(t,e,n){const s=r.getOptions(e),a=t.modules.size,u=t.modules.data,c=a+2*s.margin,l=s.color.light.a?"<path "+o(s.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",f="<path "+o(s.color.dark,"stroke")+' d="'+function(t,e,n){let r="",o=0,s=!1,a=0;for(let u=0;u<t.length;u++){const c=Math.floor(u%e),l=Math.floor(u/e);c||s||(s=!0),t[u]?(a++,u>0&&c>0&&t[u-1]||(r+=s?i("M",c+n,.5+l+n):i("m",o,0),o=0,s=!1),c+1<e&&t[u+1]||(r+=i("h",a),a=0)):o++}return r}(u,a,s.margin)+'"/>',h='viewBox="0 0 '+c+" "+c+'"',g='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+h+' shape-rendering="crispEdges">'+l+f+"</svg>\n";return"function"==typeof n&&n(null,g),g}},82839:t=>{function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}e.prototype.set=function(t,e,n,r){const o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)},e.prototype.get=function(t,e){return this.data[t*this.size+e]},e.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},e.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=e},84542:(t,e,n)=>{const r=n(96667),o=n(50583),i=n(66701),s=n(88491),a=n(50119),u=r.getBCHDigit(7973);function c(t,e){return s.getCharCountIndicator(t,e)+4}function l(t,e){let n=0;return t.forEach(function(t){const r=c(t.mode,e);n+=r+t.getBitsLength()}),n}e.from=function(t,e){return a.isValid(t)?parseInt(t,10):e},e.getCapacity=function(t,e,n){if(!a.isValid(t))throw new Error("Invalid QR Code version");void 0===n&&(n=s.BYTE);const i=8*(r.getSymbolTotalCodewords(t)-o.getTotalCodewordsCount(t,e));if(n===s.MIXED)return i;const u=i-c(n,t);switch(n){case s.NUMERIC:return Math.floor(u/10*3);case s.ALPHANUMERIC:return Math.floor(u/11*2);case s.KANJI:return Math.floor(u/13);case s.BYTE:default:return Math.floor(u/8)}},e.getBestVersionForData=function(t,n){let r;const o=i.from(n,i.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(let r=1;r<=40;r++)if(l(t,r)<=e.getCapacity(r,n,s.MIXED))return r}(t,o);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,r){for(let o=1;o<=40;o++)if(n<=e.getCapacity(o,r,t))return o}(r.mode,r.getLength(),o)},e.getEncodedBits=function(t){if(!a.isValid(t)||t<7)throw new Error("Invalid QR Code version");let e=t<<12;for(;r.getBCHDigit(e)-u>=0;)e^=7973<<r.getBCHDigit(e)-u;return t<<12|e}},88491:(t,e,n)=>{const r=n(50119),o=n(17165);e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!r.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return o.testNumeric(t)?e.NUMERIC:o.testAlphanumeric(t)?e.ALPHANUMERIC:o.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,n){if(e.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 e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return n}}},94470:(t,e,n)=>{const r=n(95072);e.mul=function(t,e){const n=new Uint8Array(t.length+e.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<e.length;i++)n[o+i]^=r.mul(t[o],e[i]);return n},e.mod=function(t,e){let n=new Uint8Array(t);for(;n.length-e.length>=0;){const t=n[0];for(let o=0;o<e.length;o++)n[o]^=r.mul(e[o],t);let o=0;for(;o<n.length&&0===n[o];)o++;n=n.slice(o)}return n},e.generateECPolynomial=function(t){let n=new Uint8Array([1]);for(let o=0;o<t;o++)n=e.mul(n,new Uint8Array([1,r.exp(o)]));return n}},95072:(t,e)=>{const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let t=1;for(let e=0;e<255;e++)n[e]=t,r[t]=e,t<<=1,256&t&&(t^=285);for(let t=255;t<512;t++)n[t]=n[t-255]}(),e.log=function(t){if(t<1)throw new Error("log("+t+")");return r[t]},e.exp=function(t){return n[t]},e.mul=function(t,e){return 0===t||0===e?0:n[r[t]+r[e]]}},96667:(t,e)=>{let n;const r=[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];e.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},e.getSymbolTotalCodewords=function(t){return r[t]},e.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},e.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');n=t},e.isKanjiModeEnabled=function(){return void 0!==n},e.toSJIS=function(t){return n(t)}}};
|
|
1
|
+
export const __webpack_esm_id__=6484;export const __webpack_esm_ids__=[6484];export const __webpack_esm_modules__={3410:(t,e,n)=>{const r=n(88491);function o(t){this.mode=r.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){let e,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);const o=this.data.length-e;o>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*o+1))},t.exports=o},4675:(t,e)=>{function n(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let 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");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});const 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||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,n){const r=e.getScale(t,n);return Math.floor((t+2*n.margin)*r)},e.qrToImageData=function(t,n,r){const o=n.modules.size,i=n.modules.data,s=e.getScale(o,r),a=Math.floor((o+2*r.margin)*s),u=r.margin*s,c=[r.color.light,r.color.dark];for(let e=0;e<a;e++)for(let n=0;n<a;n++){let l=4*(e*a+n),f=r.color.light;e>=u&&n>=u&&e<a-u&&n<a-u&&(f=c[i[Math.floor((e-u)/s)*o+Math.floor((n-u)/s)]?1:0]),t[l++]=f.r,t[l++]=f.g,t[l++]=f.b,t[l]=f.a}}},17165:(t,e)=>{const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";e.KANJI=new RegExp(r,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(o,"g"),e.NUMERIC=new RegExp(n,"g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const i=new RegExp("^"+r+"$"),s=new RegExp("^"+n+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(t){return i.test(t)},e.testNumeric=function(t){return s.test(t)},e.testAlphanumeric=function(t){return a.test(t)}},17787:(t,e,n)=>{const r=n(35012),o=n(88491);function i(t){this.mode=o.BYTE,"string"==typeof t&&(t=r(t)),this.data=new Uint8Array(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(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},t.exports=i},26068:(t,e,n)=>{const r=n(96667),o=r.getBCHDigit(1335);e.getEncodedBits=function(t,e){const n=t.bit<<3|e;let i=n<<10;for(;r.getBCHDigit(i)-o>=0;)i^=1335<<r.getBCHDigit(i)-o;return 21522^(n<<10|i)}},34339:(t,e,n)=>{const r=n(94470);function o(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(t){this.degree=t,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const e=new Uint8Array(t.length+this.degree);e.set(t);const n=r.mod(e,this.genPoly),o=this.degree-n.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(n,o),t}return n},t.exports=o},35012:t=>{t.exports=function(t){for(var e=[],n=t.length,r=0;r<n;r++){var o=t.charCodeAt(r);if(o>=55296&&o<=56319&&n>r+1){var i=t.charCodeAt(r+1);i>=56320&&i<=57343&&(o=1024*(o-55296)+i-56320+65536,r+=1)}o<128?e.push(o):o<2048?(e.push(o>>6|192),e.push(63&o|128)):o<55296||o>=57344&&o<65536?(e.push(o>>12|224),e.push(o>>6&63|128),e.push(63&o|128)):o>=65536&&o<=1114111?(e.push(o>>18|240),e.push(o>>12&63|128),e.push(o>>6&63|128),e.push(63&o|128)):e.push(239,191,189)}return new Uint8Array(e).buffer}},37958:(t,e,n)=>{const r=n(88491),o=n(3410),i=n(60532),s=n(17787),a=n(44822),u=n(17165),c=n(96667),l=n(53005);function f(t){return unescape(encodeURIComponent(t)).length}function h(t,e,n){const r=[];let o;for(;null!==(o=t.exec(n));)r.push({data:o[0],index:o.index,mode:e,length:o[0].length});return r}function g(t){const e=h(u.NUMERIC,r.NUMERIC,t),n=h(u.ALPHANUMERIC,r.ALPHANUMERIC,t);let o,i;return c.isKanjiModeEnabled()?(o=h(u.BYTE,r.BYTE,t),i=h(u.KANJI,r.KANJI,t)):(o=h(u.BYTE_KANJI,r.BYTE,t),i=[]),e.concat(n,o,i).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 r.NUMERIC:return o.getBitsLength(t);case r.ALPHANUMERIC:return i.getBitsLength(t);case r.KANJI:return a.getBitsLength(t);case r.BYTE:return s.getBitsLength(t)}}function p(t,e){let n;const u=r.getBestModeForData(t);if(n=r.from(e,u),n!==r.BYTE&&n.bit<u.bit)throw new Error('"'+t+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(u));switch(n!==r.KANJI||c.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new o(t);case r.ALPHANUMERIC:return new i(t);case r.KANJI:return new a(t);case r.BYTE:return new s(t)}}e.fromArray=function(t){return t.reduce(function(t,e){return"string"==typeof e?t.push(p(e,null)):e.data&&t.push(p(e.data,e.mode)),t},[])},e.fromString=function(t,n){const o=function(t){const e=[];for(let n=0;n<t.length;n++){const o=t[n];switch(o.mode){case r.NUMERIC:e.push([o,{data:o.data,mode:r.ALPHANUMERIC,length:o.length},{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.ALPHANUMERIC:e.push([o,{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.KANJI:e.push([o,{data:o.data,mode:r.BYTE,length:f(o.data)}]);break;case r.BYTE:e.push([{data:o.data,mode:r.BYTE,length:f(o.data)}])}}return e}(g(t,c.isKanjiModeEnabled())),i=function(t,e){const n={},o={start:{}};let i=["start"];for(let s=0;s<t.length;s++){const a=t[s],u=[];for(let t=0;t<a.length;t++){const c=a[t],l=""+s+t;u.push(l),n[l]={node:c,lastCount:0},o[l]={};for(let t=0;t<i.length;t++){const s=i[t];n[s]&&n[s].node.mode===c.mode?(o[s][l]=d(n[s].lastCount+c.length,c.mode)-d(n[s].lastCount,c.mode),n[s].lastCount+=c.length):(n[s]&&(n[s].lastCount=c.length),o[s][l]=d(c.length,c.mode)+4+r.getCharCountIndicator(c.mode,e))}}i=u}for(let t=0;t<i.length;t++)o[i[t]].end=0;return{map:o,table:n}}(o,n),s=l.find_path(i.map,"start","end"),a=[];for(let t=1;t<s.length-1;t++)a.push(i.table[s[t]].node);return e.fromArray(a.reduce(function(t,e){const n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)},[]))},e.rawSplit=function(t){return e.fromArray(g(t,c.isKanjiModeEnabled()))}},38587:(t,e)=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){const e=t.size;let n=0,r=0,o=0,i=null,s=null;for(let a=0;a<e;a++){r=o=0,i=s=null;for(let u=0;u<e;u++){let e=t.get(a,u);e===i?r++:(r>=5&&(n+=r-5+3),i=e,r=1),e=t.get(u,a),e===s?o++:(o>=5&&(n+=o-5+3),s=e,o=1)}r>=5&&(n+=r-5+3),o>=5&&(n+=o-5+3)}return n},e.getPenaltyN2=function(t){const e=t.size;let n=0;for(let r=0;r<e-1;r++)for(let o=0;o<e-1;o++){const e=t.get(r,o)+t.get(r,o+1)+t.get(r+1,o)+t.get(r+1,o+1);4!==e&&0!==e||n++}return 3*n},e.getPenaltyN3=function(t){const e=t.size;let n=0,r=0,o=0;for(let i=0;i<e;i++){r=o=0;for(let s=0;s<e;s++)r=r<<1&2047|t.get(i,s),s>=10&&(1488===r||93===r)&&n++,o=o<<1&2047|t.get(s,i),s>=10&&(1488===o||93===o)&&n++}return 40*n},e.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let r=0;r<n;r++)e+=t.data[r];return 10*Math.abs(Math.ceil(100*e/n/5)-10)},e.applyMask=function(t,e){const r=e.size;for(let o=0;o<r;o++)for(let i=0;i<r;i++)e.isReserved(i,o)||e.xor(i,o,n(t,i,o))},e.getBestMask=function(t,n){const r=Object.keys(e.Patterns).length;let o=0,i=1/0;for(let s=0;s<r;s++){n(s),e.applyMask(s,t);const r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(s,t),r<i&&(i=r,o=s)}return o}},44822:(t,e,n)=>{const r=n(88491),o=n(96667);function i(t){this.mode=r.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){let e;for(e=0;e<this.data.length;e++){let n=o.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13)}},t.exports=i},45282:(t,e,n)=>{const r=n(96667),o=n(66701),i=n(72100),s=n(82839),a=n(54240),u=n(63827),c=n(38587),l=n(50583),f=n(34339),h=n(84542),g=n(26068),d=n(88491),p=n(37958);function w(t,e,n){const r=t.size,o=g.getEncodedBits(e,n);let i,s;for(i=0;i<15;i++)s=1==(o>>i&1),i<6?t.set(i,8,s,!0):i<8?t.set(i+1,8,s,!0):t.set(r-15+i,8,s,!0),i<8?t.set(8,r-i-1,s,!0):i<9?t.set(8,15-i-1+1,s,!0):t.set(8,15-i-1,s,!0);t.set(r-8,8,1,!0)}function m(t,e,n,o){let g;if(Array.isArray(t))g=p.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let r=e;if(!r){const e=p.rawSplit(t);r=h.getBestVersionForData(e,n)}g=p.fromString(t,r||40)}}const m=h.getBestVersionForData(g,n);if(!m)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<m)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+m+".\n")}else e=m;const E=function(t,e,n){const o=new i;n.forEach(function(e){o.put(e.mode.bit,4),o.put(e.getLength(),d.getCharCountIndicator(e.mode,t)),e.write(o)});const s=8*(r.getSymbolTotalCodewords(t)-l.getTotalCodewordsCount(t,e));for(o.getLengthInBits()+4<=s&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);const a=(s-o.getLengthInBits())/8;for(let t=0;t<a;t++)o.put(t%2?17:236,8);return function(t,e,n){const o=r.getSymbolTotalCodewords(e),i=o-l.getTotalCodewordsCount(e,n),s=l.getBlocksCount(e,n),a=s-o%s,u=Math.floor(o/s),c=Math.floor(i/s),h=c+1,g=u-c,d=new f(g);let p=0;const w=new Array(s),m=new Array(s);let E=0;const y=new Uint8Array(t.buffer);for(let t=0;t<s;t++){const e=t<a?c:h;w[t]=y.slice(p,p+e),m[t]=d.encode(w[t]),p+=e,E=Math.max(E,e)}const A=new Uint8Array(o);let C,B,I=0;for(C=0;C<E;C++)for(B=0;B<s;B++)C<w[B].length&&(A[I++]=w[B][C]);for(C=0;C<g;C++)for(B=0;B<s;B++)A[I++]=m[B][C];return A}(o,t,e)}(e,n,g),y=r.getSymbolSize(e),A=new s(y);return function(t,e){const n=t.size,r=u.getPositions(e);for(let e=0;e<r.length;e++){const o=r[e][0],i=r[e][1];for(let e=-1;e<=7;e++)if(!(o+e<=-1||n<=o+e))for(let r=-1;r<=7;r++)i+r<=-1||n<=i+r||(e>=0&&e<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===e||6===e)||e>=2&&e<=4&&r>=2&&r<=4?t.set(o+e,i+r,!0,!0):t.set(o+e,i+r,!1,!0))}}(A,e),function(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2==0;t.set(n,6,e,!0),t.set(6,n,e,!0)}}(A),function(t,e){const n=a.getPositions(e);for(let e=0;e<n.length;e++){const r=n[e][0],o=n[e][1];for(let e=-2;e<=2;e++)for(let n=-2;n<=2;n++)-2===e||2===e||-2===n||2===n||0===e&&0===n?t.set(r+e,o+n,!0,!0):t.set(r+e,o+n,!1,!0)}}(A,e),w(A,n,0),e>=7&&function(t,e){const n=t.size,r=h.getEncodedBits(e);let o,i,s;for(let e=0;e<18;e++)o=Math.floor(e/3),i=e%3+n-8-3,s=1==(r>>e&1),t.set(o,i,s,!0),t.set(i,o,s,!0)}(A,e),function(t,e){const n=t.size;let r=-1,o=n-1,i=7,s=0;for(let a=n-1;a>0;a-=2)for(6===a&&a--;;){for(let n=0;n<2;n++)if(!t.isReserved(o,a-n)){let r=!1;s<e.length&&(r=1==(e[s]>>>i&1)),t.set(o,a-n,r),i--,-1===i&&(s++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(A,E),isNaN(o)&&(o=c.getBestMask(A,w.bind(null,A,n))),c.applyMask(o,A),w(A,n,o),{modules:A,version:e,errorCorrectionLevel:n,maskPattern:o,segments:g}}e.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");let n,i,s=o.M;return void 0!==e&&(s=o.from(e.errorCorrectionLevel,o.M),n=h.from(e.version),i=c.from(e.maskPattern),e.toSJISFunc&&r.setToSJISFunction(e.toSJISFunc)),m(t,n,s,i)}},46940:(t,e,n)=>{const r=n(4675);e.render=function(t,e,n){let o=n,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=r.getOptions(o);const s=r.getImageWidth(t.modules.size,o),a=i.getContext("2d"),u=a.createImageData(s,s);return r.qrToImageData(u.data,t,o),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(a,i,s),a.putImageData(u,0,0),i},e.renderToDataURL=function(t,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});const i=e.render(t,n,o),s=o.type||"image/png",a=o.rendererOpts||{};return i.toDataURL(s,a.quality)}},50119:(t,e)=>{e.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},50583:(t,e,n)=>{const r=n(66701),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];e.getBlocksCount=function(t,e){switch(e){case r.L:return o[4*(t-1)+0];case r.M:return o[4*(t-1)+1];case r.Q:return o[4*(t-1)+2];case r.H:return o[4*(t-1)+3];default:return}},e.getTotalCodewordsCount=function(t,e){switch(e){case r.L:return i[4*(t-1)+0];case r.M:return i[4*(t-1)+1];case r.Q:return i[4*(t-1)+2];case r.H:return i[4*(t-1)+3];default:return}}},54240:(t,e,n)=>{const r=n(96667).getSymbolSize;e.getRowColCoords=function(t){if(1===t)return[];const e=Math.floor(t/7)+2,n=r(t),o=145===n?26:2*Math.ceil((n-13)/(2*e-2)),i=[n-7];for(let t=1;t<e-1;t++)i[t]=i[t-1]-o;return i.push(6),i.reverse()},e.getPositions=function(t){const n=[],r=e.getRowColCoords(t),o=r.length;for(let t=0;t<o;t++)for(let e=0;e<o;e++)0===t&&0===e||0===t&&e===o-1||t===o-1&&0===e||n.push([r[t],r[e]]);return n}},60532:(t,e,n)=>{const r=n(88491),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=r.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){let e;for(e=0;e+2<=this.data.length;e+=2){let n=45*o.indexOf(this.data[e]);n+=o.indexOf(this.data[e+1]),t.put(n,11)}this.data.length%2&&t.put(o.indexOf(this.data[e]),6)},t.exports=i},63827:(t,e,n)=>{const r=n(96667).getSymbolSize;e.getPositions=function(t){const e=r(t);return[[0,0],[e-7,0],[0,e-7]]}},66484:(t,e,n)=>{const r=n(73250),o=n(45282),i=n(46940),s=n(81169);function a(t,e,n,i,s){const a=[].slice.call(arguments,1),u=a.length,c="function"==typeof a[u-1];if(!c&&!r())throw new Error("Callback required as last argument");if(!c){if(u<1)throw new Error("Too few arguments provided");return 1===u?(n=e,e=i=void 0):2!==u||e.getContext||(i=n,n=e,e=void 0),new Promise(function(r,s){try{const s=o.create(n,i);r(t(s,e,i))}catch(t){s(t)}})}if(u<2)throw new Error("Too few arguments provided");2===u?(s=n,n=e,e=i=void 0):3===u&&(e.getContext&&void 0===s?(s=i,i=void 0):(s=i,i=n,n=e,e=void 0));try{const r=o.create(n,i);s(null,t(r,e,i))}catch(t){s(t)}}e.create=o.create,e.toCanvas=a.bind(null,i.render),e.toDataURL=a.bind(null,i.renderToDataURL),e.toString=a.bind(null,function(t,e,n){return s.render(t,n)})},66701:(t,e)=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,n){if(e.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 e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return n}}},72100:t=>{function e(){this.buffer=[],this.length=0}e.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=e},73250:t=>{t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},81169:(t,e,n)=>{const r=n(4675);function o(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function i(t,e,n){let r=t+e;return void 0!==n&&(r+=" "+n),r}e.render=function(t,e,n){const s=r.getOptions(e),a=t.modules.size,u=t.modules.data,c=a+2*s.margin,l=s.color.light.a?"<path "+o(s.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",f="<path "+o(s.color.dark,"stroke")+' d="'+function(t,e,n){let r="",o=0,s=!1,a=0;for(let u=0;u<t.length;u++){const c=Math.floor(u%e),l=Math.floor(u/e);c||s||(s=!0),t[u]?(a++,u>0&&c>0&&t[u-1]||(r+=s?i("M",c+n,.5+l+n):i("m",o,0),o=0,s=!1),c+1<e&&t[u+1]||(r+=i("h",a),a=0)):o++}return r}(u,a,s.margin)+'"/>',h='viewBox="0 0 '+c+" "+c+'"',g='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+h+' shape-rendering="crispEdges">'+l+f+"</svg>\n";return"function"==typeof n&&n(null,g),g}},82839:t=>{function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}e.prototype.set=function(t,e,n,r){const o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)},e.prototype.get=function(t,e){return this.data[t*this.size+e]},e.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},e.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=e},84542:(t,e,n)=>{const r=n(96667),o=n(50583),i=n(66701),s=n(88491),a=n(50119),u=r.getBCHDigit(7973);function c(t,e){return s.getCharCountIndicator(t,e)+4}function l(t,e){let n=0;return t.forEach(function(t){const r=c(t.mode,e);n+=r+t.getBitsLength()}),n}e.from=function(t,e){return a.isValid(t)?parseInt(t,10):e},e.getCapacity=function(t,e,n){if(!a.isValid(t))throw new Error("Invalid QR Code version");void 0===n&&(n=s.BYTE);const i=8*(r.getSymbolTotalCodewords(t)-o.getTotalCodewordsCount(t,e));if(n===s.MIXED)return i;const u=i-c(n,t);switch(n){case s.NUMERIC:return Math.floor(u/10*3);case s.ALPHANUMERIC:return Math.floor(u/11*2);case s.KANJI:return Math.floor(u/13);case s.BYTE:default:return Math.floor(u/8)}},e.getBestVersionForData=function(t,n){let r;const o=i.from(n,i.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(let r=1;r<=40;r++)if(l(t,r)<=e.getCapacity(r,n,s.MIXED))return r}(t,o);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,r){for(let o=1;o<=40;o++)if(n<=e.getCapacity(o,r,t))return o}(r.mode,r.getLength(),o)},e.getEncodedBits=function(t){if(!a.isValid(t)||t<7)throw new Error("Invalid QR Code version");let e=t<<12;for(;r.getBCHDigit(e)-u>=0;)e^=7973<<r.getBCHDigit(e)-u;return t<<12|e}},88491:(t,e,n)=>{const r=n(50119),o=n(17165);e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!r.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return o.testNumeric(t)?e.NUMERIC:o.testAlphanumeric(t)?e.ALPHANUMERIC:o.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,n){if(e.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 e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return n}}},94470:(t,e,n)=>{const r=n(95072);e.mul=function(t,e){const n=new Uint8Array(t.length+e.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<e.length;i++)n[o+i]^=r.mul(t[o],e[i]);return n},e.mod=function(t,e){let n=new Uint8Array(t);for(;n.length-e.length>=0;){const t=n[0];for(let o=0;o<e.length;o++)n[o]^=r.mul(e[o],t);let o=0;for(;o<n.length&&0===n[o];)o++;n=n.slice(o)}return n},e.generateECPolynomial=function(t){let n=new Uint8Array([1]);for(let o=0;o<t;o++)n=e.mul(n,new Uint8Array([1,r.exp(o)]));return n}},95072:(t,e)=>{const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let t=1;for(let e=0;e<255;e++)n[e]=t,r[t]=e,t<<=1,256&t&&(t^=285);for(let t=255;t<512;t++)n[t]=n[t-255]}(),e.log=function(t){if(t<1)throw new Error("log("+t+")");return r[t]},e.exp=function(t){return n[t]},e.mul=function(t,e){return 0===t||0===e?0:n[r[t]+r[e]]}},96667:(t,e)=>{let n;const r=[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];e.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},e.getSymbolTotalCodewords=function(t){return r[t]},e.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},e.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');n=t},e.isKanjiModeEnabled=function(){return void 0!==n},e.toSJIS=function(t){return n(t)}}};
|