qrdx 0.0.57 → 0.0.58

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.
Files changed (257) hide show
  1. package/README.md +22 -6
  2. package/dist/angular.js +33 -3
  3. package/dist/angular.js.map +1 -1
  4. package/dist/angular.mjs +33 -3
  5. package/dist/angular.mjs.map +1 -1
  6. package/dist/core.js +7 -7
  7. package/dist/core.js.map +1 -1
  8. package/dist/core.mjs +7 -7
  9. package/dist/core.mjs.map +1 -1
  10. package/dist/element.browser.mjs +6 -6
  11. package/dist/element.browser.mjs.map +1 -1
  12. package/dist/element.js +1 -1
  13. package/dist/element.js.map +1 -1
  14. package/dist/element.mjs +1 -1
  15. package/dist/element.mjs.map +1 -1
  16. package/dist/frames-index.js +1 -1
  17. package/dist/frames-index.js.map +1 -1
  18. package/dist/frames-index.mjs +1 -1
  19. package/dist/frames-index.mjs.map +1 -1
  20. package/dist/frames-official.js +1 -1
  21. package/dist/frames-official.js.map +1 -1
  22. package/dist/frames-official.mjs +1 -1
  23. package/dist/frames-official.mjs.map +1 -1
  24. package/dist/index.js +7 -7
  25. package/dist/index.js.map +1 -1
  26. package/dist/index.mjs +7 -7
  27. package/dist/index.mjs.map +1 -1
  28. package/dist/qr-code-canvas.js +1 -1
  29. package/dist/qr-code-canvas.js.map +1 -1
  30. package/dist/qr-code-canvas.mjs +1 -1
  31. package/dist/qr-code-canvas.mjs.map +1 -1
  32. package/dist/schemas.js +1 -1
  33. package/dist/schemas.js.map +1 -1
  34. package/dist/schemas.mjs +1 -1
  35. package/dist/schemas.mjs.map +1 -1
  36. package/dist/src/angular.d.ts +9 -3
  37. package/dist/src/download.d.ts +32 -6
  38. package/dist/src/download.d.ts.map +1 -1
  39. package/dist/src/element.d.ts +10 -1
  40. package/dist/src/element.d.ts.map +1 -1
  41. package/dist/src/engine.d.ts +5 -2
  42. package/dist/src/engine.d.ts.map +1 -1
  43. package/dist/src/eps.d.ts.map +1 -1
  44. package/dist/src/export.d.ts.map +1 -1
  45. package/dist/src/frame.d.ts +24 -0
  46. package/dist/src/frame.d.ts.map +1 -1
  47. package/dist/src/frames/catalogue/all.d.ts.map +1 -1
  48. package/dist/src/frames/catalogue/batches.d.ts +6 -0
  49. package/dist/src/frames/catalogue/batches.d.ts.map +1 -0
  50. package/dist/src/frames/catalogue/call-to-action.d.ts.map +1 -1
  51. package/dist/src/frames/catalogue/counts.d.ts +4 -2
  52. package/dist/src/frames/catalogue/counts.d.ts.map +1 -1
  53. package/dist/src/frames/catalogue/index.d.ts.map +1 -1
  54. package/dist/src/frames/catalogue/objects.d.ts +5 -0
  55. package/dist/src/frames/catalogue/objects.d.ts.map +1 -0
  56. package/dist/src/frames/catalogue/playful.d.ts +5 -0
  57. package/dist/src/frames/catalogue/playful.d.ts.map +1 -0
  58. package/dist/src/frames/catalogue/tags.d.ts.map +1 -1
  59. package/dist/src/frames/collections.d.ts.map +1 -1
  60. package/dist/src/frames/official-types.d.ts +1 -1
  61. package/dist/src/frames/official-types.d.ts.map +1 -1
  62. package/dist/src/frames/official.d.ts.map +1 -1
  63. package/dist/src/gif.d.ts +40 -0
  64. package/dist/src/gif.d.ts.map +1 -0
  65. package/dist/src/helpers.d.ts +1 -1
  66. package/dist/src/helpers.d.ts.map +1 -1
  67. package/dist/src/ico.d.ts +11 -0
  68. package/dist/src/ico.d.ts.map +1 -0
  69. package/dist/src/index.d.ts +2 -1
  70. package/dist/src/index.d.ts.map +1 -1
  71. package/dist/src/looks.d.ts +101 -0
  72. package/dist/src/looks.d.ts.map +1 -0
  73. package/dist/src/plain.d.ts.map +1 -1
  74. package/dist/src/print.d.ts.map +1 -1
  75. package/dist/src/qr-code-canvas.d.ts.map +1 -1
  76. package/dist/src/qr-code-props.d.ts.map +1 -1
  77. package/dist/src/qr-frame-svg.d.ts +10 -0
  78. package/dist/src/qr-frame-svg.d.ts.map +1 -0
  79. package/dist/src/scan-score.d.ts.map +1 -1
  80. package/dist/src/utils/gif.d.ts +61 -0
  81. package/dist/src/utils/gif.d.ts.map +1 -0
  82. package/dist/src/utils/ico.d.ts +30 -0
  83. package/dist/src/utils/ico.d.ts.map +1 -0
  84. package/dist/src/utils/parse-color.d.ts +1 -1
  85. package/dist/src/utils/parse-color.d.ts.map +1 -1
  86. package/dist/src/utils/print-shared.d.ts.map +1 -1
  87. package/dist/src/utils/svg-painter.d.ts +13 -0
  88. package/dist/src/utils/svg-painter.d.ts.map +1 -1
  89. package/dist/src/utils.d.ts.map +1 -1
  90. package/dist/src/vanilla-api.d.ts +2 -2
  91. package/dist/src/vanilla-api.d.ts.map +1 -1
  92. package/dist/src/vue.d.ts +1 -1
  93. package/dist/src/vue.d.ts.map +1 -1
  94. package/dist/types/constants.d.ts +41 -0
  95. package/dist/types/constants.d.ts.map +1 -1
  96. package/dist/types/index.js +2 -2
  97. package/dist/types/index.js.map +1 -1
  98. package/dist/types/index.mjs +2 -2
  99. package/dist/types/index.mjs.map +1 -1
  100. package/dist/types/plain.d.ts +2 -2
  101. package/dist/types/plain.d.ts.map +1 -1
  102. package/dist/types/qr.d.ts +399 -1
  103. package/dist/types/qr.d.ts.map +1 -1
  104. package/dist/types/react.d.ts +10 -1
  105. package/dist/types/react.d.ts.map +1 -1
  106. package/dist/types/schemas.d.ts +1 -1
  107. package/dist/types/schemas.d.ts.map +1 -1
  108. package/dist/vanilla.browser.mjs +34 -34
  109. package/dist/vanilla.browser.mjs.map +1 -1
  110. package/dist/vue.js +1 -1
  111. package/dist/vue.js.map +1 -1
  112. package/dist/vue.mjs +1 -1
  113. package/dist/vue.mjs.map +1 -1
  114. package/package.json +6 -2
  115. package/src/angular.ts +14 -2
  116. package/src/download.tsx +92 -7
  117. package/src/element.ts +16 -1
  118. package/src/engine.ts +22 -0
  119. package/src/eps.ts +8 -1
  120. package/src/export.ts +16 -0
  121. package/src/frame.tsx +51 -0
  122. package/src/frames/catalogue/all.ts +202 -0
  123. package/src/frames/catalogue/batches.ts +114 -0
  124. package/src/frames/catalogue/call-to-action.ts +58 -0
  125. package/src/frames/catalogue/counts.ts +4 -2
  126. package/src/frames/catalogue/index.ts +808 -0
  127. package/src/frames/catalogue/objects.ts +65 -0
  128. package/src/frames/catalogue/playful.ts +97 -0
  129. package/src/frames/catalogue/tags.ts +137 -0
  130. package/src/frames/collections.ts +2 -0
  131. package/src/frames/official/badge-bottom-light.json +91 -0
  132. package/src/frames/official/badge-bottom.json +79 -0
  133. package/src/frames/official/billboard-campaign.json +274 -0
  134. package/src/frames/official/billboard-light.json +287 -0
  135. package/src/frames/official/bookmark-light.json +88 -0
  136. package/src/frames/official/bookmark-strip.json +83 -0
  137. package/src/frames/official/border-medium.json +71 -0
  138. package/src/frames/official/border-thick.json +71 -0
  139. package/src/frames/official/border-thin.json +71 -0
  140. package/src/frames/official/bottle-label.json +136 -0
  141. package/src/frames/official/bottle-light.json +133 -0
  142. package/src/frames/official/camera-viewfinder.json +174 -0
  143. package/src/frames/official/cassette-tape.json +236 -0
  144. package/src/frames/official/cat-with-card-light.json +246 -0
  145. package/src/frames/official/cat-with-card.json +234 -0
  146. package/src/frames/official/cinema-marquee.json +537 -0
  147. package/src/frames/official/circle-viewfinder.json +87 -0
  148. package/src/frames/official/clapperboard-light.json +163 -0
  149. package/src/frames/official/clapperboard-scene.json +151 -0
  150. package/src/frames/official/comic-panel.json +386 -0
  151. package/src/frames/official/corner-tab-light.json +101 -0
  152. package/src/frames/official/corner-tab.json +89 -0
  153. package/src/frames/official/crystal-ball.json +105 -0
  154. package/src/frames/official/delivery-box-light.json +132 -0
  155. package/src/frames/official/delivery-box-track.json +132 -0
  156. package/src/frames/official/fish-tank.json +276 -0
  157. package/src/frames/official/flag-light.json +136 -0
  158. package/src/frames/official/flag-team.json +127 -0
  159. package/src/frames/official/floppy-disk.json +106 -0
  160. package/src/frames/official/flying-saucer.json +128 -0
  161. package/src/frames/official/gallery-frame.json +195 -0
  162. package/src/frames/official/globe-stand.json +136 -0
  163. package/src/frames/official/gumball-machine.json +451 -0
  164. package/src/frames/official/heart-light.json +59 -0
  165. package/src/frames/official/heart-scan.json +51 -0
  166. package/src/frames/official/hexagon-light.json +87 -0
  167. package/src/frames/official/hexagon-scan.json +72 -0
  168. package/src/frames/official/hot-air-balloon.json +132 -0
  169. package/src/frames/official/jigsaw-piece-light.json +68 -0
  170. package/src/frames/official/jigsaw-piece.json +60 -0
  171. package/src/frames/official/laptop-screen.json +137 -0
  172. package/src/frames/official/lighthouse-tower.json +132 -0
  173. package/src/frames/official/magnifying-glass.json +85 -0
  174. package/src/frames/official/mailbox-flag.json +112 -0
  175. package/src/frames/official/mailbox-light.json +120 -0
  176. package/src/frames/official/map-pin-light.json +76 -0
  177. package/src/frames/official/map-pin.json +58 -0
  178. package/src/frames/official/matchbox-drawer.json +170 -0
  179. package/src/frames/official/microwave-door.json +220 -0
  180. package/src/frames/official/milk-carton.json +129 -0
  181. package/src/frames/official/monitor-screen.json +111 -0
  182. package/src/frames/official/monster-mouth.json +180 -0
  183. package/src/frames/official/mug-light.json +138 -0
  184. package/src/frames/official/mug-refill.json +125 -0
  185. package/src/frames/official/museum-plaque-light.json +187 -0
  186. package/src/frames/official/museum-plaque.json +187 -0
  187. package/src/frames/official/music-player-light.json +151 -0
  188. package/src/frames/official/music-player.json +136 -0
  189. package/src/frames/official/octagon-light.json +126 -0
  190. package/src/frames/official/octagon-sign.json +120 -0
  191. package/src/frames/official/open-book.json +156 -0
  192. package/src/frames/official/parking-meter.json +107 -0
  193. package/src/frames/official/passport-stamp.json +132 -0
  194. package/src/frames/official/pizza-box.json +122 -0
  195. package/src/frames/official/polka-dot-border.json +502 -0
  196. package/src/frames/official/popcorn-bucket.json +305 -0
  197. package/src/frames/official/porthole.json +264 -0
  198. package/src/frames/official/raised-card-thin.json +111 -0
  199. package/src/frames/official/raised-card.json +99 -0
  200. package/src/frames/official/retro-radio.json +180 -0
  201. package/src/frames/official/ribbon-top-light.json +125 -0
  202. package/src/frames/official/ribbon-top.json +113 -0
  203. package/src/frames/official/robot-chest.json +197 -0
  204. package/src/frames/official/roll-up-banner-light.json +137 -0
  205. package/src/frames/official/roll-up-banner.json +125 -0
  206. package/src/frames/official/round-tag-light.json +86 -0
  207. package/src/frames/official/round-tag.json +79 -0
  208. package/src/frames/official/sailboat-sail.json +99 -0
  209. package/src/frames/official/scroll-story.json +184 -0
  210. package/src/frames/official/sketch-border.json +92 -0
  211. package/src/frames/official/sketch-circle.json +57 -0
  212. package/src/frames/official/snow-globe.json +170 -0
  213. package/src/frames/official/soda-can.json +160 -0
  214. package/src/frames/official/spin-rays.json +126 -0
  215. package/src/frames/official/spiral-notebook.json +476 -0
  216. package/src/frames/official/stage-curtains.json +303 -0
  217. package/src/frames/official/starburst-light.json +128 -0
  218. package/src/frames/official/starburst.json +118 -0
  219. package/src/frames/official/swirl-border.json +122 -0
  220. package/src/frames/official/tablet-screen.json +130 -0
  221. package/src/frames/official/text-frame.json +79 -0
  222. package/src/frames/official/toaster-toast.json +114 -0
  223. package/src/frames/official/train-window.json +176 -0
  224. package/src/frames/official/treasure-map.json +207 -0
  225. package/src/frames/official/tv-set.json +256 -0
  226. package/src/frames/official/vending-machine.json +218 -0
  227. package/src/frames/official/video-player.json +118 -0
  228. package/src/frames/official/video-tape.json +137 -0
  229. package/src/frames/official/vinyl-sleeve-light.json +139 -0
  230. package/src/frames/official/vinyl-sleeve.json +127 -0
  231. package/src/frames/official/washing-machine.json +146 -0
  232. package/src/frames/official-types.ts +3 -1
  233. package/src/frames/official.ts +4 -3
  234. package/src/gif.ts +188 -0
  235. package/src/helpers.ts +12 -0
  236. package/src/ico.ts +55 -0
  237. package/src/index.tsx +2 -0
  238. package/src/looks.ts +467 -0
  239. package/src/plain.tsx +6 -0
  240. package/src/print.ts +12 -0
  241. package/src/qr-code-canvas.tsx +23 -2
  242. package/src/qr-code-props.ts +22 -0
  243. package/src/qr-frame-svg.tsx +26 -0
  244. package/src/scan-score.ts +38 -6
  245. package/src/utils/gif.ts +632 -0
  246. package/src/utils/ico.ts +150 -0
  247. package/src/utils/parse-color.ts +163 -23
  248. package/src/utils/print-shared.ts +25 -1
  249. package/src/utils/svg-painter.ts +18 -0
  250. package/src/utils.tsx +136 -17
  251. package/src/vanilla-api.ts +2 -2
  252. package/src/vue.ts +7 -1
  253. package/types/constants.ts +47 -0
  254. package/types/plain.ts +19 -0
  255. package/types/qr.ts +98 -0
  256. package/types/react.ts +11 -1
  257. package/types/schemas.ts +5 -0
@@ -1,5 +1,5 @@
1
- var be;(o=>{class t{constructor(l,s,c,m){this.version=l;this.errorCorrectionLevel=s;if(l<t.MIN_VERSION||l>t.MAX_VERSION)throw new RangeError("Version value out of range");if(m<-1||m>7)throw new RangeError("Mask value out of range");this.size=l*4+17;let u=[];for(let p=0;p<this.size;p++)u.push(false);for(let p=0;p<this.size;p++)this.modules.push(u.slice()),this.isFunction.push(u.slice());this.drawFunctionPatterns();let f=this.addEccAndInterleave(c);if(this.drawCodewords(f),m==-1){let p=1e9;for(let g=0;g<8;g++){this.applyMask(g),this.drawFormatBits(g);let d=this.getPenaltyScore();d<p&&(m=g,p=d),this.applyMask(g);}}i(0<=m&&m<=7),this.mask=m,this.applyMask(m),this.drawFormatBits(m),this.isFunction=[];}version;errorCorrectionLevel;static encodeText(l,s){let c=o.QrSegment.makeSegments(l);return t.encodeSegments(c,s)}static encodeBinary(l,s){let c=o.QrSegment.makeBytes(l);return t.encodeSegments([c],s)}static encodeSegments(l,s,c=1,m=40,u=-1,f=true){if(!(t.MIN_VERSION<=c&&c<=m&&m<=t.MAX_VERSION)||u<-1||u>7)throw new RangeError("Invalid value");let p,g;for(p=c;;p++){let y=t.getNumDataCodewords(p,s)*8,$=r.getTotalBits(l,p);if($<=y){g=$;break}if(p>=m)throw new RangeError("Data too long")}for(let y of [t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])f&&g<=t.getNumDataCodewords(p,y)*8&&(s=y);let d=[];for(let y of l){e(y.mode.modeBits,4,d),e(y.numChars,y.mode.numCharCountBits(p),d);for(let $ of y.getData())d.push($);}i(d.length==g);let h=t.getNumDataCodewords(p,s)*8;i(d.length<=h),e(0,Math.min(4,h-d.length),d),e(0,(8-d.length%8)%8,d),i(d.length%8==0);for(let y=236;d.length<h;y^=253)e(y,8,d);let _=[];for(;_.length*8<d.length;)_.push(0);return d.forEach((y,$)=>_[$>>>3]|=y<<7-($&7)),new t(p,s,_,u)}size;mask;modules=[];isFunction=[];getModule(l,s){return 0<=l&&l<this.size&&0<=s&&s<this.size&&this.modules[s][l]}getModules(){return this.modules}drawFunctionPatterns(){for(let c=0;c<this.size;c++)this.setFunctionModule(6,c,c%2==0),this.setFunctionModule(c,6,c%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let l=this.getAlignmentPatternPositions(),s=l.length;for(let c=0;c<s;c++)for(let m=0;m<s;m++)c==0&&m==0||c==0&&m==s-1||c==s-1&&m==0||this.drawAlignmentPattern(l[c],l[m]);this.drawFormatBits(0),this.drawVersion();}drawFormatBits(l){let s=this.errorCorrectionLevel.formatBits<<3|l,c=s;for(let u=0;u<10;u++)c=c<<1^(c>>>9)*1335;let m=(s<<10|c)^21522;i(m>>>15==0);for(let u=0;u<=5;u++)this.setFunctionModule(8,u,n(m,u));this.setFunctionModule(8,7,n(m,6)),this.setFunctionModule(8,8,n(m,7)),this.setFunctionModule(7,8,n(m,8));for(let u=9;u<15;u++)this.setFunctionModule(14-u,8,n(m,u));for(let u=0;u<8;u++)this.setFunctionModule(this.size-1-u,8,n(m,u));for(let u=8;u<15;u++)this.setFunctionModule(8,this.size-15+u,n(m,u));this.setFunctionModule(8,this.size-8,true);}drawVersion(){if(this.version<7)return;let l=this.version;for(let c=0;c<12;c++)l=l<<1^(l>>>11)*7973;let s=this.version<<12|l;i(s>>>18==0);for(let c=0;c<18;c++){let m=n(s,c),u=this.size-11+c%3,f=Math.floor(c/3);this.setFunctionModule(u,f,m),this.setFunctionModule(f,u,m);}}drawFinderPattern(l,s){for(let c=-4;c<=4;c++)for(let m=-4;m<=4;m++){let u=Math.max(Math.abs(m),Math.abs(c)),f=l+m,p=s+c;0<=f&&f<this.size&&0<=p&&p<this.size&&this.setFunctionModule(f,p,u!=2&&u!=4);}}drawAlignmentPattern(l,s){for(let c=-2;c<=2;c++)for(let m=-2;m<=2;m++)this.setFunctionModule(l+m,s+c,Math.max(Math.abs(m),Math.abs(c))!=1);}setFunctionModule(l,s,c){this.modules[s][l]=c,this.isFunction[s][l]=true;}addEccAndInterleave(l){let s=this.version,c=this.errorCorrectionLevel;if(l.length!=t.getNumDataCodewords(s,c))throw new RangeError("Invalid argument");let m=t.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][s],u=t.ECC_CODEWORDS_PER_BLOCK[c.ordinal][s],f=Math.floor(t.getNumRawDataModules(s)/8),p=m-f%m,g=Math.floor(f/m),d=[],h=t.reedSolomonComputeDivisor(u);for(let y=0,$=0;y<m;y++){let C=l.slice($,$+g-u+(y<p?0:1));$+=C.length;let M=t.reedSolomonComputeRemainder(C,h);y<p&&C.push(0),d.push(C.concat(M));}let _=[];for(let y=0;y<d[0].length;y++)d.forEach(($,C)=>{(y!=g-u||C>=p)&&_.push($[y]);});return i(_.length==f),_}drawCodewords(l){if(l.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let s=0;for(let c=this.size-1;c>=1;c-=2){c==6&&(c=5);for(let m=0;m<this.size;m++)for(let u=0;u<2;u++){let f=c-u,g=(c+1&2)==0?this.size-1-m:m;!this.isFunction[g][f]&&s<l.length*8&&(this.modules[g][f]=n(l[s>>>3],7-(s&7)),s++);}}i(s==l.length*8);}applyMask(l){if(l<0||l>7)throw new RangeError("Mask value out of range");for(let s=0;s<this.size;s++)for(let c=0;c<this.size;c++){let m;switch(l){case 0:m=(c+s)%2==0;break;case 1:m=s%2==0;break;case 2:m=c%3==0;break;case 3:m=(c+s)%3==0;break;case 4:m=(Math.floor(c/3)+Math.floor(s/2))%2==0;break;case 5:m=c*s%2+c*s%3==0;break;case 6:m=(c*s%2+c*s%3)%2==0;break;case 7:m=((c+s)%2+c*s%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[s][c]&&m&&(this.modules[s][c]=!this.modules[s][c]);}}getPenaltyScore(){let l=0;for(let u=0;u<this.size;u++){let f=false,p=0,g=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[u][d]==f?(p++,p==5?l+=t.PENALTY_N1:p>5&&l++):(this.finderPenaltyAddHistory(p,g),f||(l+=this.finderPenaltyCountPatterns(g)*t.PENALTY_N3),f=this.modules[u][d],p=1);l+=this.finderPenaltyTerminateAndCount(f,p,g)*t.PENALTY_N3;}for(let u=0;u<this.size;u++){let f=false,p=0,g=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[d][u]==f?(p++,p==5?l+=t.PENALTY_N1:p>5&&l++):(this.finderPenaltyAddHistory(p,g),f||(l+=this.finderPenaltyCountPatterns(g)*t.PENALTY_N3),f=this.modules[d][u],p=1);l+=this.finderPenaltyTerminateAndCount(f,p,g)*t.PENALTY_N3;}for(let u=0;u<this.size-1;u++)for(let f=0;f<this.size-1;f++){let p=this.modules[u][f];p==this.modules[u][f+1]&&p==this.modules[u+1][f]&&p==this.modules[u+1][f+1]&&(l+=t.PENALTY_N2);}let s=0;for(let u of this.modules)s=u.reduce((f,p)=>f+(p?1:0),s);let c=this.size*this.size,m=Math.ceil(Math.abs(s*20-c*10)/c)-1;return i(0<=m&&m<=9),l+=m*t.PENALTY_N4,i(0<=l&&l<=2568888),l}getAlignmentPatternPositions(){if(this.version==1)return [];{let l=Math.floor(this.version/7)+2,s=this.version==32?26:Math.ceil((this.version*4+4)/(l*2-2))*2,c=[6];for(let m=this.size-7;c.length<l;m-=s)c.splice(1,0,m);return c}}static getNumRawDataModules(l){if(l<t.MIN_VERSION||l>t.MAX_VERSION)throw new RangeError("Version number out of range");let s=(16*l+128)*l+64;if(l>=2){let c=Math.floor(l/7)+2;s-=(25*c-10)*c-55,l>=7&&(s-=36);}return i(208<=s&&s<=29648),s}static getNumDataCodewords(l,s){return Math.floor(t.getNumRawDataModules(l)/8)-t.ECC_CODEWORDS_PER_BLOCK[s.ordinal][l]*t.NUM_ERROR_CORRECTION_BLOCKS[s.ordinal][l]}static reedSolomonComputeDivisor(l){if(l<1||l>255)throw new RangeError("Degree out of range");let s=[];for(let m=0;m<l-1;m++)s.push(0);s.push(1);let c=1;for(let m=0;m<l;m++){for(let u=0;u<s.length;u++)s[u]=t.reedSolomonMultiply(s[u],c),u+1<s.length&&(s[u]^=s[u+1]);c=t.reedSolomonMultiply(c,2);}return s}static reedSolomonComputeRemainder(l,s){let c=s.map(m=>0);for(let m of l){let u=m^c.shift();c.push(0),s.forEach((f,p)=>c[p]^=t.reedSolomonMultiply(f,u));}return c}static reedSolomonMultiply(l,s){if(l>>>8||s>>>8)throw new RangeError("Byte out of range");let c=0;for(let m=7;m>=0;m--)c=c<<1^(c>>>7)*285,c^=(s>>>m&1)*l;return i(c>>>8==0),c}finderPenaltyCountPatterns(l){let s=l[1];i(s<=this.size*3);let c=s>0&&l[2]==s&&l[3]==s*3&&l[4]==s&&l[5]==s;return (c&&l[0]>=s*4&&l[6]>=s?1:0)+(c&&l[6]>=s*4&&l[0]>=s?1:0)}finderPenaltyTerminateAndCount(l,s,c){return l&&(this.finderPenaltyAddHistory(s,c),s=0),s+=this.size,this.finderPenaltyAddHistory(s,c),this.finderPenaltyCountPatterns(c)}finderPenaltyAddHistory(l,s){s[0]==0&&(l+=this.size),s.pop(),s.unshift(l);}static MIN_VERSION=1;static MAX_VERSION=40;static PENALTY_N1=3;static PENALTY_N2=3;static PENALTY_N3=40;static PENALTY_N4=10;static ECC_CODEWORDS_PER_BLOCK=[[-1,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],[-1,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],[-1,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],[-1,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]];static NUM_ERROR_CORRECTION_BLOCKS=[[-1,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],[-1,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],[-1,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],[-1,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]]}o.QrCode=t;function e(a,l,s){if(l<0||l>31||a>>>l)throw new RangeError("Value out of range");for(let c=l-1;c>=0;c--)s.push(a>>>c&1);}function n(a,l){return (a>>>l&1)!=0}function i(a){if(!a)throw new Error("Assertion error")}class r{constructor(l,s,c){this.mode=l;this.numChars=s;this.bitData=c;if(s<0)throw new RangeError("Invalid argument");this.bitData=c.slice();}mode;numChars;bitData;static makeBytes(l){let s=[];for(let c of l)e(c,8,s);return new r(r.Mode.BYTE,l.length,s)}static makeNumeric(l){if(!r.isNumeric(l))throw new RangeError("String contains non-numeric characters");let s=[];for(let c=0;c<l.length;){let m=Math.min(l.length-c,3);e(parseInt(l.substr(c,m),10),m*3+1,s),c+=m;}return new r(r.Mode.NUMERIC,l.length,s)}static makeAlphanumeric(l){if(!r.isAlphanumeric(l))throw new RangeError("String contains unencodable characters in alphanumeric mode");let s=[],c;for(c=0;c+2<=l.length;c+=2){let m=r.ALPHANUMERIC_CHARSET.indexOf(l.charAt(c))*45;m+=r.ALPHANUMERIC_CHARSET.indexOf(l.charAt(c+1)),e(m,11,s);}return c<l.length&&e(r.ALPHANUMERIC_CHARSET.indexOf(l.charAt(c)),6,s),new r(r.Mode.ALPHANUMERIC,l.length,s)}static makeSegments(l){return l==""?[]:r.isNumeric(l)?[r.makeNumeric(l)]:r.isAlphanumeric(l)?[r.makeAlphanumeric(l)]:[r.makeBytes(r.toUtf8ByteArray(l))]}static makeEci(l){let s=[];if(l<0)throw new RangeError("ECI assignment value out of range");if(l<128)e(l,8,s);else if(l<16384)e(2,2,s),e(l,14,s);else if(l<1e6)e(6,3,s),e(l,21,s);else throw new RangeError("ECI assignment value out of range");return new r(r.Mode.ECI,0,s)}static isNumeric(l){return r.NUMERIC_REGEX.test(l)}static isAlphanumeric(l){return r.ALPHANUMERIC_REGEX.test(l)}getData(){return this.bitData.slice()}static getTotalBits(l,s){let c=0;for(let m of l){let u=m.mode.numCharCountBits(s);if(m.numChars>=1<<u)return 1/0;c+=4+u+m.bitData.length;}return c}static toUtf8ByteArray(l){l=encodeURI(l);let s=[];for(let c=0;c<l.length;c++)l.charAt(c)!="%"?s.push(l.charCodeAt(c)):(s.push(parseInt(l.substr(c+1,2),16)),c+=2);return s}static NUMERIC_REGEX=/^[0-9]*$/;static ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/;static ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"}o.QrSegment=r;})(be||={});(e=>{(i=>{class n{constructor(o,a){this.ordinal=o;this.formatBits=a;}ordinal;formatBits;static LOW=new n(0,1);static MEDIUM=new n(1,0);static QUARTILE=new n(2,3);static HIGH=new n(3,2)}i.Ecc=n;})(e.QrCode||={});})(be||={});(e=>{(i=>{class n{constructor(o,a){this.modeBits=o;this.numBitsCharCount=a;}modeBits;numBitsCharCount;static NUMERIC=new n(1,[10,12,14]);static ALPHANUMERIC=new n(2,[9,11,13]);static BYTE=new n(4,[8,16,16]);static KANJI=new n(8,[8,10,12]);static ECI=new n(7,[0,0,0]);numCharCountBits(o){return this.numBitsCharCount[Math.floor((o+7)/17)]}}i.Mode=n;})(e.QrSegment||={});})(be||={});var bt=be;var At={L:bt.QrCode.Ecc.LOW,M:bt.QrCode.Ecc.MEDIUM,Q:bt.QrCode.Ecc.QUARTILE,H:bt.QrCode.Ecc.HIGH},yt=128,Qe="Q",dt="#FFFFFF",ye="#000000";var Ge=0;var bn=.1;function st(t,e="#000000"){return t?typeof t=="string"?t:t.type==="solid"?t.color:t.type==="image"?t.underlay||e:(t.type==="linear"||t.type==="radial"||t.type==="angular")&&t.stops[0]?.color||e:e}function Wt(t,e="#000000"){return t?typeof t=="string"?{type:"solid",color:t}:t:{type:"solid",color:e}}function Ue(t){return !t||typeof t=="string"?false:t.type==="linear"||t.type==="radial"||t.type==="angular"}function ii(t){return typeof t=="object"&&t!==null&&t.type==="image"}var br=["logo","halftone"],ai={logo:["blend","badge"],halftone:["color","mono"]},yr=192;var ze=24;var yn=.5,qe=1.5;var $r=.5,si=1,li=.07;var ci=3,xr=64,Sr=8,ui=.42;function U(t,e=3){let n=10**e;return Math.round(t*n)/n+0}function b(t,e=3){return String(U(t,e))}function E(t,...e){let n=t[0]??"";for(let i=0;i<e.length;i++){let r=e[i];n+=(typeof r=="number"?b(r):r)+(t[i+1]??"");}return n}var Sc={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Cc=/^[MmLlHhVvCcSsQqTtAaZz0-9.,+\-\s]*$/,Cr=/[+-]?(?:\d+\.?\d*|\.\d+)/y;function He(t,e=Number.POSITIVE_INFINITY){if(!Cc.test(t))return null;let n=[],i=0,r=()=>{for(;i<t.length&&/[\s,]/.test(t[i]);)i++;},o=()=>{r(),Cr.lastIndex=i;let s=Cr.exec(t);if(!s)return null;let c=s[0],m=c.indexOf(".");if(m>=0&&c.length-m-1>e)return null;i=Cr.lastIndex;let u=Number(c);return Number.isFinite(u)?u:null},a=()=>{r();let s=t[i];return s==="0"||s==="1"?(i++,s==="1"?1:0):null},l=()=>(r(),i<t.length&&/[0-9.+-]/.test(t[i]));for(r();i<t.length;){let s=t[i],c=s.toUpperCase(),m=Sc[c];if(m===void 0||n.length===0&&c!=="M")return null;if(i++,m===0){n.push({command:s,values:[]}),r();continue}let u=s,f=true;for(;f||l();){let p=[];for(let g=0;g<m;g++){let d=c==="A"&&(g===3||g===4)?a():o();if(d===null)return null;p.push(d);}n.push({command:u,values:p}),c==="M"&&(u=s==="M"?"L":"l"),f=false;}r();}return n}function mi(t){let e=0;for(let{command:n}of t)e+=n.toUpperCase()==="A"?4:1;return e}function Mr(t,e=1,n=0,i=0){let r="";for(let{command:o,values:a}of t){let l=o.toUpperCase(),s=o===l,c=s?n:0,m=s?i:0,u;switch(l){case "Z":u=[];break;case "H":u=[b(a[0]*e+c)];break;case "V":u=[b(a[0]*e+m)];break;case "A":u=[b(Math.abs(a[0])*e),b(Math.abs(a[1])*e),b(a[2]),String(a[3]),String(a[4]),b(a[5]*e+c),b(a[6]*e+m)];break;default:u=a.map((f,p)=>b(f*e+(p%2===0?c:m)));}r+=o+u.join(" ");}return r}function fi(t,e=.25){let n=[],i=[],r=[0,0],o=[0,0],a=()=>{i.length>2&&n.push(i),i=[];};for(let l of t)if(l.op==="M")a(),r=[l.x,l.y],o=r,i.push(r);else if(l.op==="L")o=[l.x,l.y],i.push(o);else if(l.op==="C"){let s=o,c=[l.x1,l.y1],m=[l.x2,l.y2],u=[l.x,l.y],f=Math.hypot(c[0]-s[0],c[1]-s[1])+Math.hypot(m[0]-c[0],m[1]-c[1])+Math.hypot(u[0]-m[0],u[1]-m[1]),p=Math.max(2,Math.min(64,Math.ceil(Math.sqrt(f/(4*e)))));for(let g=1;g<=p;g++){let d=g/p,h=1-d;i.push([h*h*h*s[0]+3*h*h*d*c[0]+3*h*d*d*m[0]+d*d*d*u[0],h*h*h*s[1]+3*h*h*d*c[1]+3*h*d*d*m[1]+d*d*d*u[1]]);}o=u;}else a(),o=r;return a(),n}function $n(t,e){let n=[r=>r[0]-e.x0,r=>e.x1-r[0],r=>r[1]-e.y0,r=>e.y1-r[1]],i=t;for(let r of n){if(i.length===0)break;let o=i;i=[];for(let a=0;a<o.length;a++){let l=o[a],s=o[(a+o.length-1)%o.length],c=r(l),m=r(s);c>=0?(m<0&&i.push(di(s,l,m,c)),i.push(l)):m>=0&&i.push(di(s,l,m,c));}}return i.length>2?i:[]}function di(t,e,n,i){let r=n/(n-i);return [t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function hi(t){return t.filter(e=>e.length>2).map(e=>`M${e.map(([n,i])=>`${b(n)} ${b(i)}`).join("L")}Z`).join("")}function pi(t){let e=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY,o=(a,l)=>{e=Math.min(e,a),n=Math.min(n,l),i=Math.max(i,a),r=Math.max(r,l);};for(let a of t)a.op==="C"?(o(a.x1,a.y1),o(a.x2,a.y2),o(a.x,a.y)):a.op!=="Z"&&o(a.x,a.y);return Number.isFinite(e)?{x0:e,y0:n,x1:i,y1:r}:null}var Mc={amp:"&",lt:"<",gt:">",quot:'"',apos:"'"};function bi(t){return t.replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi,(e,n)=>{if(n[0]==="#"){let i=n[1].toLowerCase()==="x"?Number.parseInt(n.slice(2),16):Number.parseInt(n.slice(1),10);return Number.isInteger(i)&&i>0&&i<=1114111&&!(i>=55296&&i<=57343)?String.fromCodePoint(i):e}return Mc[n.toLowerCase()]??e})}var wc=60,wr=62,Rr=47,Rc=61,gi=34,_i=39,Ar=/\s*/y,Ec=/[^\s/>]*/y,Ac=/[^\s>]*/y,Pc=/[^\s=]*/y;function $e(t,e,n){return t.lastIndex=n,t.test(e)?t.lastIndex:n}function vc(t,e){let n=t.length,i=x=>{let S=Number.POSITIVE_INFINITY,R=-1;return w=>((w<S||R>=0&&R<w)&&(S=w,R=t.indexOf(x,w)),R)},r=i("-->"),o=i("?>"),a=i("]]>"),l=i(">"),s,c=x=>{let S=t.charCodeAt(x);if(S!==gi&&S!==_i)return x+1;let R=t.indexOf(t[x],x+1);return R<0?n:R+1},m=x=>{for(let S=x;S<n&&!s?.[S];S=c(S)){let R=t.charCodeAt(S);if(R===wr||R===Rr&&t.charCodeAt(S+1)===wr)return S}s??=new Uint8Array(n);for(let S=x;S<n&&!s[S];S=c(S))s[S]=1;return -1},u=-1,f=-1,p=-1,g=-1,d=x=>{let S=x+1;if(S<u||S>=f){u=S,f=$e(Ec,t,S),p=-1;for(let w=f;w>S;w--){let A=t.charCodeAt(w);if((w===f||A===gi||A===_i)&&(g=m(w),g>=0)){p=w;break}}}if(p<=S)return -1;let R=t.charCodeAt(g)===Rr;return e.open(t.slice(S,p),t.slice(p,g),R),g+(R?2:1)},h=-1,_=-1,y=-1,$=x=>{let S=x+2;if(S<h||S>=_){h=S,_=$e(Ac,t,S);let R=$e(Ar,t,_);y=_>S&&t.charCodeAt(R)===wr?R:-1;}return y},C=x=>{if(t.startsWith("<!--",x)){let S=r(x+4);if(S>=0)return S+3}if(t.startsWith("<?",x)){let S=o(x+2);if(S>=0)return S+2}if(t.startsWith("<![CDATA[",x)){let S=a(x+9);if(S>=0)return e.cdata(t.slice(x+9,S)),S+3}if(t.startsWith("<!",x)){let S=l(x+2);if(S>=0)return S+1}if(t.charCodeAt(x+1)===Rr){let S=$(x);return S<0?-1:(e.close(),S+1)}return d(x)},M=0;for(;M<n;)if(t.charCodeAt(M)===wc){let x=C(M);M=x<0?M+1:x;}else {let x=t.indexOf("<",M),S=x<0?n:x;e.text(t.slice(M,S)),M=S;}}function Fc(t){let e={},n=0;for(;n<t.length;){let i=$e(Pc,t,n);if(i===n){n++;continue}let r=$e(Ar,t,i);if(t.charCodeAt(r)===Rc){let o=$e(Ar,t,r+1),a=t[o],l=a==='"'||a==="'"?t.indexOf(a,o+1):-1;if(l>=0){e[t.slice(n,i)]=bi(t.slice(o+1,l)),n=l+1;continue}}n=i;}return e}function Cn(t){let e={name:"#root",attrs:{},children:[],text:""},n=[e],i=()=>n.at(-1);vc(t,{open(o,a,l){let s=Fc(a),c={name:o,attrs:s,children:[],text:""};i().children.push(c),l||n.push(c);},close(){n.length>1&&n.pop();},text(o){i().text+=bi(o);},cdata(o){i().text+=o;}});let r=o=>{for(let a of o.children){if(a.name==="svg")return a;let l=r(a);if(l)return l}return null};return r(e)}var xn=[1,0,0,1,0,0];function ft(t,e){let[n,i,r,o,a,l]=t,[s,c,m,u,f,p]=e;return [n*s+r*c,i*s+o*c,n*m+r*u,i*m+o*u,n*f+r*p+a,i*f+o*p+l]}function J(t,e,n){return [t[0]*e+t[2]*n+t[4],t[1]*e+t[3]*n+t[5]]}function Pr(t){return Math.sqrt(Math.abs(t[0]*t[3]-t[1]*t[2]))}function Mn(t){return t?(t.match(/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi)??[]).map(Number):[]}function Vt(t){let e=xn;if(!t)return e;for(let[,n,i]of t.matchAll(/(matrix|translate|scale|rotate|skewX|skewY)\s*\(([^)]*)\)/g)){let r=Mn(i),o=xn;switch(n){case "matrix":r.length===6&&(o=r);break;case "translate":o=[1,0,0,1,r[0]??0,r[1]??0];break;case "scale":o=[r[0]??1,0,0,r[1]??r[0]??1,0,0];break;case "rotate":{let a=(r[0]??0)*Math.PI/180,l=Math.cos(a),s=Math.sin(a),[c,m]=[r[1]??0,r[2]??0];o=ft(ft([1,0,0,1,c,m],[l,s,-s,l,0,0]),[1,0,0,1,-c,-m]);break}case "skewX":o=[1,0,Math.tan((r[0]??0)*Math.PI/180),1,0,0];break;case "skewY":o=[1,Math.tan((r[0]??0)*Math.PI/180),0,1,0,0];break;}e=ft(e,o);}return e}var Er=/[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?/y;function Lc(t,e,n,i,r,o,a,l,s){if(t===l&&e===s)return [];let c=Math.abs(n),m=Math.abs(i);if(c===0||m===0)return [{op:"L",x:l,y:s}];let u=r*Math.PI/180,f=Math.cos(u),p=Math.sin(u),g=(t-l)/2,d=(e-s)/2,h=f*g+p*d,_=-p*g+f*d,y=h*h/(c*c)+_*_/(m*m);y>1&&(c*=Math.sqrt(y),m*=Math.sqrt(y));let $=c*c*m*m-c*c*_*_-m*m*h*h,C=c*c*_*_+m*m*h*h,M=(o===a?-1:1)*Math.sqrt(Math.max(0,$/C)),x=M*c*_/m,S=-M*m*h/c,R=f*x-p*S+(t+l)/2,w=p*x+f*S+(e+s)/2,A=(B,T,G,ot)=>Math.atan2(B*ot-T*G,B*G+T*ot),v=A(1,0,(h-x)/c,(_-S)/m),F=A((h-x)/c,(_-S)/m,(-h-x)/c,(-_-S)/m);!a&&F>0?F-=2*Math.PI:a&&F<0&&(F+=2*Math.PI);let L=Math.max(1,Math.ceil(Math.abs(F)/(Math.PI/2)-1e-9)),O=F/L,N=4/3*Math.tan(O/4),I=(B,T)=>[R+c*f*B-m*p*T,w+c*p*B+m*f*T],D=[];for(let B=0;B<L;B++){let T=v+B*O,G=T+O,[ot,mt]=I(Math.cos(T)-N*Math.sin(T),Math.sin(T)+N*Math.cos(T)),[K,X]=I(Math.cos(G)+N*Math.sin(G),Math.sin(G)-N*Math.cos(G)),[at,Q]=B===L-1?[l,s]:I(Math.cos(G),Math.sin(G));D.push({op:"C",x1:ot,y1:mt,x2:K,y2:X,x:at,y:Q});}return D}function jt(t){let e=[],n=0,i=0,r=0,o=0,a=0,l="",s=null,c=null,m=()=>{for(;n<t.length&&/[\s,]/.test(t[n]);)n++;},u=()=>{m(),Er.lastIndex=n;let g=Er.exec(t);return g?(n=Er.lastIndex,Number(g[0])):null},f=()=>{m();let g=t[n];return g==="0"||g==="1"?(n++,g==="1"):null},p=g=>{let d=[];for(let h=0;h<g;h++){let _=u();if(_===null)return null;d.push(_);}return d};for(;m(),!(n>=t.length);){let g=t[n];if(/[MmLlHhVvCcSsQqTtAaZz]/.test(g))l=g,n++;else if(!l||l==="Z"||l==="z")break;let d=l===l.toLowerCase(),h=d?i:0,_=d?r:0,y=l.toUpperCase();if(y==="Z"){e.push({op:"Z"}),i=o,r=a,s=null,c=null;continue}if(y==="A"){let x=p(3),S=f(),R=f(),w=p(2);if(!(x&&w)||S===null||R===null)break;let[A,v,F]=x,L=w[0]+h,O=w[1]+_;e.push(...Lc(i,r,A,v,F,S,R,L,O)),i=L,r=O,s=null,c=null;continue}let $={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2}[y]??0,C=p($);if(!C)break;let M=C;switch(y){case "M":i=M[0]+h,r=M[1]+_,o=i,a=r,e.push({op:"M",x:i,y:r}),l=d?"l":"L",s=null,c=null;break;case "L":case "H":case "V":y!=="V"&&(i=M[0]+h),y==="V"?r=M[0]+_:y==="L"&&(r=M[1]+_),e.push({op:"L",x:i,y:r}),s=null,c=null;break;case "C":case "S":{let x,S;y==="C"?(x=[M[0]+h,M[1]+_],S=M.slice(2)):(x=s?[2*i-s[0],2*r-s[1]]:[i,r],S=M);let R=[S[0]+h,S[1]+_],w=[S[2]+h,S[3]+_];e.push({op:"C",x1:x[0],y1:x[1],x2:R[0],y2:R[1],x:w[0],y:w[1]}),[i,r]=w,s=R,c=null;break}case "Q":case "T":{let x,S;y==="Q"?(x=[M[0]+h,M[1]+_],S=[M[2]+h,M[3]+_]):(x=c?[2*i-c[0],2*r-c[1]]:[i,r],S=[M[0]+h,M[1]+_]),e.push({op:"C",x1:i+2/3*(x[0]-i),y1:r+2/3*(x[1]-r),x2:S[0]+2/3*(x[0]-S[0]),y2:S[1]+2/3*(x[1]-S[1]),x:S[0],y:S[1]}),[i,r]=S,c=x,s=null;break}}}return e}var Sn=.5522847498;function We(t,e,n,i){if(n<=0||i<=0)return [];let r=n*Sn,o=i*Sn;return [{op:"M",x:t+n,y:e},{op:"C",x1:t+n,y1:e+o,x2:t+r,y2:e+i,x:t,y:e+i},{op:"C",x1:t-r,y1:e+i,x2:t-n,y2:e+o,x:t-n,y:e},{op:"C",x1:t-n,y1:e-o,x2:t-r,y2:e-i,x:t,y:e-i},{op:"C",x1:t+r,y1:e-i,x2:t+n,y2:e-o,x:t+n,y:e},{op:"Z"}]}function xe(t,e,n,i,r=0,o=0){if(n<=0||i<=0)return [];let a=Math.min(Math.max(r,0),n/2),l=Math.min(Math.max(o,0),i/2);if(a===0||l===0)return [{op:"M",x:t,y:e},{op:"L",x:t+n,y:e},{op:"L",x:t+n,y:e+i},{op:"L",x:t,y:e+i},{op:"Z"}];let s=a*Sn,c=l*Sn,m=t+n,u=e+i;return [{op:"M",x:t+a,y:e},{op:"L",x:m-a,y:e},{op:"C",x1:m-a+s,y1:e,x2:m,y2:e+l-c,x:m,y:e+l},{op:"L",x:m,y:u-l},{op:"C",x1:m,y1:u-l+c,x2:m-a+s,y2:u,x:m-a,y:u},{op:"L",x:t+a,y:u},{op:"C",x1:t+a-s,y1:u,x2:t,y2:u-l+c,x:t,y:u-l},{op:"L",x:t,y:e+l},{op:"C",x1:t,y1:e+l-c,x2:t+a-s,y2:e,x:t+a,y:e},{op:"Z"}]}var $i="qrdx.frame",xi=1,Si="custom",tt={minArtboard:50,maxArtboard:2e3,maxCoordinate:4e3,maxDecimals:3,maxShapes:64,maxLabels:8,maxPolygonPoints:256,maxPathLength:16e3,maxSegments:2e3,maxGradientSteps:64,maxGradientWork:16e3,maxBytes:32768,minQrShare:.5,minPadding:.04,defaultPadding:.08,maxTextLength:ze},Ci=["wifi","star","heart","phone","headphones","calendar","user","chat","bag","bell","cup","card","check","info","home","pin","share","download","clock","snowflake","pumpkin","tree","sparkle","gift"],wn=.95,Ic=200,Mi=["frame","text","accent","background"],kc=/[\t\n\v\f\r\u0085\u2028\u2029]/g,Tc=/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u115f\u1160\u17b4\u17b5\u180b-\u180f\u200b-\u200f\u202a-\u202e\u2060-\u206f\u3164\ufe00-\ufe0f\ufeff\uffa0\ufff0-\ufffb]|\udb40[\udc00-\udcff]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/g;function Ve(t,e=ze){let n=t.slice(0,1e3).normalize("NFC").replace(kc," ").replace(Tc,"").replace(/\s+/g," ").trim();return Array.from(n).slice(0,Math.max(0,e)).join("").trim()}var Rn=t=>Math.abs(t*1e3-Math.round(t*1e3))<1e-6;function Fr(t){let e=En(t);return {x0:t.qr.x-e,y0:t.qr.y-e,x1:t.qr.x+t.qr.size+e,y1:t.qr.y+t.qr.size+e}}function Nc(t){return {x0:t.qr.x,y0:t.qr.y,x1:t.qr.x+t.qr.size,y1:t.qr.y+t.qr.size}}function En(t){return t.qr.padding??t.qr.size*tt.defaultPadding}var Lr=.52,Oc=.35;function Dc(t){let e=t.fontSize??t.box.height*Lr;return Math.min(e*qe,t.box.height*wn)}var vr=(t,e)=>Math.min(t.x1,e.x1)-Math.max(t.x0,e.x0)>1e-6&&Math.min(t.y1,e.y1)-Math.max(t.y0,e.y0)>1e-6;function yi(t){let e=Fr(t),n=Math.min(t.qr.radius??0,(e.x1-e.x0)/2,(e.y1-e.y0)/2),i=[[e.x0+n,e.y0+n,Math.PI],[e.x1-n,e.y0+n,-Math.PI/2],[e.x1-n,e.y1-n,0],[e.x0+n,e.y1-n,Math.PI/2]],r=[];for(let[o,a,l]of i)for(let s=0;s<=8;s++){let c=l+Math.PI/2*(s/8);r.push([o+n*Math.cos(c),a+n*Math.sin(c)]);}return r}function Bc([t,e],n,i){if(t<n.x-.01||e<n.y-.01||t>n.x+n.width+.01||e>n.y+n.height+.01)return false;let o=Math.min(i,n.width/2,n.height/2),a=Math.min(Math.max(t,n.x+o),n.x+n.width-o),l=Math.min(Math.max(e,n.y+o),n.y+n.height-o);return Math.hypot(t-a,e-l)<=o+.01}function Qc(t){let e=0;return t.forEach(([n,i],r)=>{let[o,a]=t[(r+1)%t.length];e+=n*a-o*i;}),Math.abs(e)/2}function Gc(t,e,n){let i=Fr(e);if(!vr(n,i))return false;if("stroke"in t&&t.stroke)return true;if(t.fill==="background")return false;if(t.type==="rect"&&t.hole){let{hole:r}=t;return !yi(e).every(o=>Bc(o,r,r.radius??0))}if(t.type==="circle"&&t.hole){let r=t.hole;return !yi(e).every(([o,a])=>Math.hypot(o-t.cx,a-t.cy)<=r+.01)}if(t.type==="polygon"){let r=$n(t.points,i);return r.length>2&&Qc(r)>1e-6}return true}function Ir(t){let e=Uc(t),n="stroke"in t?t.stroke:void 0;if(!(n&&e.bounds))return e;let i=t.type==="circle"||t.type==="ellipse"?n.width/2:t.type==="rect"?n.width*Math.SQRT2/2:n.width*2,{x0:r,y0:o,x1:a,y1:l}=e.bounds;return {bounds:{x0:r-i,y0:o-i,x1:a+i,y1:l+i},segments:e.segments*2}}function Uc(t){switch(t.type){case "rect":return {bounds:{x0:t.x,y0:t.y,x1:t.x+t.width,y1:t.y+t.height},segments:t.hole?18:9};case "circle":return {bounds:{x0:t.cx-t.r,y0:t.cy-t.r,x1:t.cx+t.r,y1:t.cy+t.r},segments:t.hole?10:5};case "ellipse":return {bounds:{x0:t.cx-t.rx,y0:t.cy-t.ry,x1:t.cx+t.rx,y1:t.cy+t.ry},segments:5};case "polygon":{let e=t.points.map(([i])=>i),n=t.points.map(([,i])=>i);return {bounds:{x0:Math.min(...e),y0:Math.min(...n),x1:Math.max(...e),y1:Math.max(...n)},segments:t.points.length}}case "path":{let e=He(t.d,tt.maxDecimals);return e?{bounds:pi(jt(t.d)),segments:mi(e)}:{bounds:null,segments:0}}case "line":{let e=t.width/2,n=Math.hypot(t.x2-t.x1,t.y2-t.y1),i=t.dash?Math.ceil(n/(t.dash[0]+t.dash[1])):1;return {bounds:{x0:Math.min(t.x1,t.x2)-e,y0:Math.min(t.y1,t.y2)-e,x1:Math.max(t.x1,t.x2)+e,y1:Math.max(t.y1,t.y2)+e},segments:i*(t.cap==="round"?4:5)}}default:return {bounds:{x0:t.x,y0:t.y,x1:t.x+t.size,y1:t.y+t.size},segments:Ic}}}function wi(t,e){let n=tt,i=new TextEncoder().encode(JSON.stringify(t)).length;if(i>n.maxBytes){e(`The spec is ${i} bytes; the limit is ${n.maxBytes}`);return}let{width:r,height:o}=t.artboard,a=Math.max(r,o)*.005,l={x0:-a,y0:-a,x1:r+a,y1:o+a},s=_=>_.x0>=l.x0&&_.y0>=l.y0&&_.x1<=l.x1&&_.y1<=l.y1,{qr:c}=t,m=En(t);c.plate!=="none"&&m<c.size*n.minPadding-1e-9&&e(`qr.padding must be at least ${n.minPadding*100}% of qr.size`,["qr","padding"]),c.size<Math.min(r,o)*n.minQrShare-1e-9&&e(`qr.size must be at least ${n.minQrShare*100}% of the artboard's shorter side`,["qr","size"]);let u=Fr(t);(u.x0<-1e-9||u.y0<-1e-9||u.x1>r+1e-9||u.y1>o+1e-9)&&e("The code and its padding must sit inside the artboard",["qr"]),(c.radius??0)>(c.size+2*m)/2&&e("qr.radius is larger than half the plate",["qr","radius"]);let f=0,p=0;t.shapes.forEach((_,y)=>{let $=["shapes",y],{bounds:C,segments:M}=Ir(_);if(!C){e("Path data must use only M L H V C S Q T A Z, plain numbers (up to 3 decimals) and start with M",[...$,"d"]);return}if(s(C)||e("The shape extends outside the artboard",$),_.type==="rect"&&_.hole){let{hole:x}=_;(x.x<_.x||x.y<_.y||x.x+x.width>_.x+_.width+1e-9||x.y+x.height>_.y+_.height+1e-9)&&e("The hole must sit inside its rect",[...$,"hole"]);}_.type==="circle"&&_.hole&&_.hole>=_.r&&e("The hole must be smaller than the circle",[...$,"hole"]),"stroke"in _&&_.stroke&&_.stroke.width>Math.min(r,o)*.1+1e-9&&e("A stroke may be at most 10% of the artboard's shorter side",[...$,"stroke","width"]),c.plate==="background"&&Gc(_,t,C)&&e('With qr.plate "background", only background fills (or a ring whose hole holds the plate) may lie under the plate',$),f+=M,typeof _.fill=="object"&&"gradient"in _.fill&&(p+=(_.fill.gradient.steps??32)*M);}),f>n.maxSegments&&e(`The shapes have ${f} segments; the limit is ${n.maxSegments}`,["shapes"]),p>n.maxGradientWork&&e("Gradient fills are too detailed (fewer steps or simpler shapes)",["shapes"]);let g=[],d=new Set,h=new Set;t.labels.forEach((_,y)=>{let $=["labels",y];d.has(_.id)&&e(`Label id "${_.id}" is used twice`,[...$,"id"]),d.add(_.id),_.slot!=="fixed"&&(h.has(_.slot)&&e(`Only one label may use the ${_.slot} slot`,[...$,"slot"]),h.add(_.slot));let C=_.maxLength??n.maxTextLength;_.text!==Ve(_.text,C)&&e(`Label text must be at most ${C} characters, trimmed, with no control or invisible characters (see sanitizeFrameText)`,[...$,"text"]);let M;if(_.type==="text"){M={x0:_.box.x,y0:_.box.y,x1:_.box.x+_.box.width,y1:_.box.y+_.box.height},_.fontSize!==void 0&&_.fontSize>_.box.height*wn+1e-9&&e("fontSize may be at most 95% of the label's row height",[...$,"fontSize"]);let x=_.box.y+_.box.height/2,S=Dc(_)*Oc,R={x0:M.x0,x1:M.x1,y0:x-S,y1:x+S};(vr(M,Nc(t))||vr(R,u))&&e("The label overlaps the code or its padding",[...$,"box"]);}else {let{cx:x,cy:S,radius:R}=_.curve,w=_.fontSize*qe*.6;M={x0:x-R-w,y0:S-R-w,x1:x+R+w,y1:S+R+w};let A=Math.hypot(Math.max(u.x0-x,0,x-u.x1),Math.max(u.y0-S,0,S-u.y1));Math.hypot(Math.max(Math.abs(u.x0-x),Math.abs(u.x1-x)),Math.max(Math.abs(u.y0-S),Math.abs(u.y1-S)))<=R-w||A>=R+w||e("The curved label crosses the code or its padding",[...$,"curve"]);}if(s(M)||e("The label extends outside the artboard",$),_.collapse){let x=_.collapse,S=x.y+x.height;(x.y<-1e-9||S>o+1e-9)&&e("The collapse band must sit inside the artboard",[...$,"collapse"]),S>u.y0+1e-6&&x.y<u.y1-1e-6&&e("The collapse band crosses the code or its padding",[...$,"collapse"]);for(let R of g)S>R.y+1e-6&&x.y<R.y+R.height-1e-6&&e("Collapse bands may not overlap",[...$,"collapse"]);g.push(x);}});}var ht=t=>t/255,je=(t,e)=>(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2,H=t=>.2126*t[0]+.7152*t[1]+.0722*t[2];function zc(t){let{width:e,height:n,data:i}=t,r=[0,e-1,(n-1)*e,n*e-1].map(a=>{let l=a*4;return {color:[ht(i[l]),ht(i[l+1]),ht(i[l+2])],alpha:i[l+3]/255}});if(r.some(a=>a.alpha<.9))return null;let o=r[0].color;return r.every(({color:a})=>je(a,o)<.006)?o:null}function qc(t){let{width:e,height:n,data:i}=t,r=zc(t),o=new Float32Array(e*n);for(let a=0;a<o.length;a++){let l=a*4,s=i[l+3]/255;if(r&&s>0){let c=Math.sqrt(je([ht(i[l]),ht(i[l+1]),ht(i[l+2])],r));s*=Math.min(1,Math.max(0,(c-.06)/.1));}o[a]=s;}return o}var Hc=8,Wc=.14,Ri=.006;function Vc(t,e){let{width:n,height:i,data:r}=t,o=new Float64Array(4096),a=new Float64Array(4096*3),l=0;for(let p=0;p<e.length;p++){if(e[p]<.9)continue;let g=p*4,d=Math.floor(r[g]/16)*256+Math.floor(r[g+1]/16)*16+Math.floor(r[g+2]/16);o[d]+=1,a[d*3]+=ht(r[g]),a[d*3+1]+=ht(r[g+1]),a[d*3+2]+=ht(r[g+2]),l++;}if(l===0)return {palette:[],error:0};let s=[...o.keys()].filter(p=>o[p]>0).sort((p,g)=>o[g]-o[p]),c=[];for(let p of s){if(o[p]/l<Ri/2||c.length>=Hc)break;let g=[a[p*3]/o[p],a[p*3+1]/o[p],a[p*3+2]/o[p]];c.every(d=>je(d,g)>=Wc**2)&&c.push(g);}let m=[],u=0;for(let p=0;p<3;p++){m=c.map(()=>({n:0,r:0,g:0,b:0,x:0,y:0})),u=0;for(let g=0;g<e.length;g++){if(e[g]<.9)continue;let d=g*4,h=[ht(r[d]),ht(r[d+1]),ht(r[d+2])],_=0,y=Number.POSITIVE_INFINITY;for(let[C,M]of c.entries()){let x=je(h,M);x<y&&(y=x,_=C);}let $=m[_];$.n++,$.r+=h[0],$.g+=h[1],$.b+=h[2],$.x+=g%n,$.y+=Math.floor(g/n),u+=Math.sqrt(y);}for(let[g,d]of m.entries())d.n>0&&(c[g]=[d.r/d.n,d.g/d.n,d.b/d.n]);}return {palette:c.map((p,g)=>({color:p,area:m[g].n/l,cx:m[g].n?m[g].x/m[g].n+.5:n/2,cy:m[g].n?m[g].y/m[g].n+.5:i/2})).filter(p=>p.area>=Ri).sort((p,g)=>g.area-p.area),error:u/l}}function jc(t,e,n){let i=e+2,r=n+2,o=(u,f)=>u<=0||f<=0||u>e||f>n?0:t[(f-1)*e+(u-1)],a=new Map,l=new Map,s=u=>{let f=l.get(u);if(f)return f;let p=Math.floor(u/2),g=p%i,d=Math.floor(p/i),h=o(g,d),_=u%2===1,y=_?o(g,d+1):o(g+1,d),$=h===y?.5:Math.min(1,Math.max(0,(.5-h)/(y-h))),C=_?[g-.5,d-.5+$]:[g-.5+$,d-.5];return l.set(u,C),C},c=(u,f)=>{a.set(u,f);};for(let u=0;u<r-1;u++)for(let f=0;f<i-1;f++){let p=o(f,u)>=.5,g=o(f+1,u)>=.5,d=o(f+1,u+1)>=.5,h=o(f,u+1)>=.5,_=2*(u*i+f),y=2*((u+1)*i+f),$=2*(u*i+f)+1,C=2*(u*i+f+1)+1;switch((p?8:0)+(g?4:0)+(d?2:0)+(h?1:0)){case 1:c(y,$);break;case 2:c(C,y);break;case 3:c(C,$);break;case 4:c(_,C);break;case 5:{(o(f,u)+o(f+1,u)+o(f+1,u+1)+o(f,u+1))/4>=.5?(c(_,$),c(y,C)):(c(_,C),c(y,$));break}case 6:c(_,y);break;case 7:c(_,$);break;case 8:c($,_);break;case 9:c(y,_);break;case 10:{(o(f,u)+o(f+1,u)+o(f+1,u+1)+o(f,u+1))/4>=.5?(c($,y),c(C,_)):(c($,_),c(C,y));break}case 11:c(C,_);break;case 12:c($,C);break;case 13:c(y,C);break;case 14:c($,y);break;}}let m=[];for(let u of a.keys()){if(!a.has(u))continue;let f=[],p=u;for(;p!==void 0&&a.has(p);){f.push(s(p));let g=a.get(p);a.delete(p),p=g;}f.length>=3&&m.push(f);}return m}function Zc(t){let e=0;for(let n=0;n<t.length;n++){let i=t[n],r=t[(n+1)%t.length];e+=i[0]*r[1]-r[0]*i[1];}return e/2}function Ei(t,e){if(t.length<=2)return t;let n=new Uint8Array(t.length);n[0]=1,n[t.length-1]=1;let i=[[0,t.length-1]];for(;i.length>0;){let[r,o]=i.pop(),a=t[r],l=t[o],s=l[0]-a[0],c=l[1]-a[1],m=Math.hypot(s,c)||1,u=-1,f=e;for(let p=r+1;p<o;p++){let g=t[p],d=Math.abs(c*(g[0]-a[0])-s*(g[1]-a[1]))/m;d>f&&(f=d,u=p);}u>=0&&(n[u]=1,i.push([r,u],[u,o]));}return t.filter((r,o)=>n[o]===1)}function Xc(t,e){let n=0,i=-1;for(let[a,l]of t.entries()){let s=(l[0]-t[0][0])**2+(l[1]-t[0][1])**2;s>i&&(i=s,n=a);}let r=Ei(t.slice(0,n+1),e),o=Ei([...t.slice(n),t[0]],e);return [...r.slice(0,-1),...o.slice(0,-1)]}var Ot=t=>U(t,2);function Yc(t,e){let n=t.length,i=(o,a)=>{let l=Math.hypot(a[0]-o[0],a[1]-o[1])||1,s=Math.min(.5,e/l);return [o[0]+(a[0]-o[0])*s,o[1]+(a[1]-o[1])*s]},r="";for(let o=0;o<n;o++){let a=t[o],l=i(a,t[(o-1+n)%n]),s=i(a,t[(o+1)%n]);r+=o===0?`M${Ot(l[0])} ${Ot(l[1])}`:`L${Ot(l[0])} ${Ot(l[1])}`,r+=`Q${Ot(a[0])} ${Ot(a[1])} ${Ot(s[0])} ${Ot(s[1])}`;}return `${r}Z`}function Kc(t,e,n){let i="";for(let r of jc(t,e,n)){if(Math.abs(Zc(r))<.8)continue;let o=Xc(r,.18);o.length>=3&&(i+=Yc(o,.9));}return i}var Jc=.075;function Ai(t){let{width:e,height:n,data:i}=t,r=qc(t),o=0;for(let d of r)o+=d;let{palette:a,error:l}=Vc(t,r),s={width:e,height:n,palette:a,alpha:r,coverage:o/(e*n)};if(a.length===0||l>Jc)return {...s,layers:[],photographic:a.length>0};let c=a.length,m=Array.from({length:c},()=>new Float32Array(e*n)),u=a.map(d=>d.color);for(let d=0;d<r.length;d++){let h=r[d];if(h<=0)continue;let _=d*4,y=[ht(i[_]),ht(i[_+1]),ht(i[_+2])],$=0,C=-1,M=Number.POSITIVE_INFINITY,x=Number.POSITIVE_INFINITY;for(let v=0;v<c;v++){let F=je(y,u[v]);F<M?(C=$,x=M,$=v,M=F):F<x&&(C=v,x=F);}if(C<0||M<1e-6){m[$][d]=h;continue}let S=u[$],R=u[C],w=[R[0]-S[0],R[1]-S[1],R[2]-S[2]],A=Math.min(1,Math.max(0,((y[0]-S[0])*w[0]+(y[1]-S[1])*w[1]+(y[2]-S[2])*w[2])/(w[0]**2+w[1]**2+w[2]**2)));m[$][d]=h*(1-A),m[C][d]=h*A;}let f=[],p=new Float32Array(e*n),g=new Array(c);for(let d=c-1;d>=0;d--){let h=m[d];for(let _=0;_<p.length;_++)p[_]+=h[_];g[d]=p.slice();}for(let d=0;d<c;d++){let h=Kc(g[d],e,n);h&&f.push({color:u[d],d:h});}return {...s,layers:f,photographic:false}}var{QrCode:kr}=bt,t0={"1L":3,"1M":2,"1Q":1,"1H":1,"2L":2,"3L":1};function e0(t){let e=t*4+17,n=new Uint8Array(e*e),i=(a,l)=>{a>=0&&l>=0&&a<e&&l<e&&(n[l*e+a]=1);};for(let a=0;a<e;a++)i(6,a),i(a,6);for(let[a,l]of [[3,3],[e-4,3],[3,e-4]])for(let s=-4;s<=4;s++)for(let c=-4;c<=4;c++)i(a+c,l+s);let r=[];if(t>1){let a=Math.floor(t/7)+2,l=t===32?26:Math.ceil((t*4+4)/(a*2-2))*2;r.push(6);for(let s=e-7;r.length<a;s-=l)r.splice(1,0,s);}let o=r.length-1;for(let[a,l]of r.entries())for(let[s,c]of r.entries())if(!(a===0&&s===0||a===0&&s===o||a===o&&s===0))for(let m=-2;m<=2;m++)for(let u=-2;u<=2;u++)i(l+u,c+m);for(let a=0;a<=8;a++)i(8,a),i(a,8);for(let a=0;a<8;a++)i(e-1-a,8),i(8,e-1-a);if(t>=7)for(let a=0;a<18;a++){let l=e-11+a%3,s=Math.floor(a/3);i(l,s),i(s,l);}return n}function n0(t,e){let n=t*4+17,i=At[e].ordinal,r=kr.NUM_ERROR_CORRECTION_BLOCKS[i]?.[t]??0,o=kr.ECC_CODEWORDS_PER_BLOCK[i]?.[t]??0,a=Math.floor(kr.getNumRawDataModules(t)/8),l=r-a%r,s=Math.floor(a/r),c=Array.from({length:r},(C,M)=>s+(M<l?0:1)),m=[],u=[],f=s-o;for(let C=0;C<=s;C++)for(let M=0;M<r;M++)if(M<l){if(C===f)continue;m.push(M),u.push(C<f?C:C-1);}else m.push(M),u.push(C);if(m.length!==a)throw new Error(`Codeword map: interleave mismatch at version ${t}`);let p=e0(t),g=new Int16Array(n*n).fill(-1),d=new Int16Array(n*n).fill(-1),h=new Int8Array(n*n).fill(-1),_=a*8,y=0;for(let C=n-1;C>=1;C-=2){C===6&&(C=5);let M=(C+1&2)===0;for(let x=0;x<n;x++)for(let S=0;S<2;S++){let R=C-S,A=(M?n-1-x:x)*n+R;if(!p[A]&&y<_){let v=y>>>3;g[A]=m[v],d[A]=u[v],h[A]=7-(y&7),y++;}}}if(y!==_)throw new Error(`Codeword map: placement mismatch at version ${t}`);let $=t0[`${t}${e}`]??0;return {version:t,level:e,size:n,blocks:r,eccPerBlock:o,blockLengths:c,correctable:Math.floor((o-$)/2),block:g,codeword:d,bit:h}}var r0=8,Zt=new Map;function An(t,e){if(!(Number.isInteger(t)&&t>=1&&t<=40))throw new RangeError(`QR version must be 1\u201340, got ${t}`);let n=`${t}${e}`,i=Zt.get(n);if(i)return Zt.delete(n),Zt.set(n,i),i;let r=n0(t,e);if(Zt.size>=r0){let o=Zt.keys().next().value;o!==void 0&&Zt.delete(o);}return Zt.set(n,r),r}function Pn(t,e){let n=new Array(t.blocks).fill(0),i=new Set;for(let r of e){let o=t.block[r]??-1;if(o<0)continue;let a=o*4096+t.codeword[r];i.has(a)||(i.add(a),n[o]=n[o]+1);}return n}var o0={black:[0,0,0],white:[255,255,255],red:[255,0,0],green:[0,128,0],lime:[0,255,0],blue:[0,0,255],navy:[0,0,128],yellow:[255,255,0],orange:[255,165,0],purple:[128,0,128],pink:[255,192,203],gray:[128,128,128],grey:[128,128,128],silver:[192,192,192],maroon:[128,0,0],olive:[128,128,0],teal:[0,128,128],aqua:[0,255,255],cyan:[0,255,255],fuchsia:[255,0,255],magenta:[255,0,255]};function Pi(t,e){let n=t.trim(),i=Number.parseFloat(n);return Number.isNaN(i)?Number.NaN:n.endsWith("%")?i/100*e:i}function lt(t){if(!t)return null;let e=t.trim().toLowerCase();if(e==="transparent")return {r:0,g:0,b:0,a:0};let n=o0[e];if(n)return {r:n[0],g:n[1],b:n[2],a:1};if(e.startsWith("#")){let r=e.slice(1);return (r.length===3||r.length===4)&&(r=r.split("").map(o=>o+o).join("")),/^[0-9a-f]{6}([0-9a-f]{2})?$/.test(r)?{r:Number.parseInt(r.slice(0,2),16),g:Number.parseInt(r.slice(2,4),16),b:Number.parseInt(r.slice(4,6),16),a:r.length===8?Number.parseInt(r.slice(6,8),16)/255:1}:null}let i=/^rgba?\(([^)]*)\)$/.exec(e);if(i){let[r,o]=i[1].split("/"),a=r.split(/[\s,]+/).filter(Boolean);if(a.length!==(o===void 0&&a.length===4?4:3))return null;let l=o??a[3],[s,c,m]=a.slice(0,3).map(p=>Pi(p,255)),u=l===void 0?1:Pi(l,1);if([s,c,m,u].some(p=>Number.isNaN(p)))return null;let f=(p,g)=>Math.min(Math.max(p,0),g);return {r:f(s,255),g:f(c,255),b:f(m,255),a:f(u,1)}}return null}function Ze(t,e,n){let i=t/255,r=e/255,o=n/255,a=1-Math.max(i,r,o);return a>=1?[0,0,0,1]:[U((1-i-a)/(1-a)),U((1-r-a)/(1-a)),U((1-o-a)/(1-a)),U(a)]}function Xt(t){return t.children}var i0=t=>t==null?null:`${t}`;function Tr(t,e,n){let i=e??{},r=n;if("key"in i){let{key:o,...a}=i;o!==void 0&&(r=o),i=a;}return {type:t,props:i,key:i0(r)}}function a0(t,e){let n=t;return {type:n.type,props:{...n.props,...e},key:n.key??null}}function s0(t,e,...n){let i={...e};return n.length>0&&(i.children=n.length===1?n[0]:n),Tr(t,i)}var l0={jsx:Tr,jsxs:Tr,createElement:s0,cloneElement:a0,Fragment:Xt},Xe=l0;var Nr=t=>t===Xt?Xe.Fragment:t;function P(t,e,n){return Xe.jsx(Nr(t),e,n)}function ct(t,e,n){return Xe.jsxs(Nr(t),e,n)}function Or(t,e,...n){return Xe.createElement(Nr(t),e??null,...n)}function Se(t,e){return Xe.cloneElement(t,e)}var c0=new Set([Symbol.for("react.element"),Symbol.for("react.transitional.element")]),vi=Symbol.for("react.fragment");function vn(t){if(typeof t!="object"||t===null||Array.isArray(t))return false;let e=t;return e.$$typeof!==void 0&&!c0.has(e.$$typeof)?false:(typeof e.type=="string"||typeof e.type=="function"||e.type===vi)&&typeof e.props=="object"&&e.props!==null}var Fn=t=>t===Xt||t===vi;var u0=.6;var Ce=class{entries=new Map;limit;constructor(e){this.limit=e;}get(e,n){let i=this.entries.get(e);if(i!==void 0)return this.entries.delete(e),this.entries.set(e,i),i;let r=n();if(this.entries.size>=this.limit){let o=this.entries.keys().next().value;o!==void 0&&this.entries.delete(o);}return this.entries.set(e,r),r}},m0=new Ce(8);function d0(t){return m0.get(t,()=>{let e=atob(t),n=new Uint8Array(e.length);for(let i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return n})}function Qr(t){let{width:e,height:n,data:i}=t;if(!(Number.isInteger(e)&&Number.isInteger(n))||e<1||n<1||e>yr||n>yr||typeof i!="string")return null;try{let r=d0(i);return r.length===e*n*4?{width:e,height:n,data:r}:null}catch{return null}}function Ni(t){return !!(t&&br.includes(t.mode)&&t.image&&Qr(t.image))}function Gr(t){let e=ai[t.mode];return t.variant&&e.includes(t.variant)?t.variant:e[0]}function f0(t,e){if(t===1)return [];let n=Math.floor(t/7)+2,i=t===32?26:Math.ceil((t*4+4)/(n*2-2))*2,r=[6];for(let o=e-7;r.length<n;o-=i)r.splice(1,0,o);return r}function Ye(t,e){let n=f0(t,e),i=n.length-1,r=[];for(let[o,a]of n.entries())for(let[l,s]of n.entries())o===0&&l===0||o===0&&l===i||o===i&&l===0||r.push([a,s]);return r}var $t=1,Ct=2,Dt=3,Fi=4,Li=new Map;function h0(t){let e=Li.get(t);if(e)return e;let n=t*4+17,i=new Uint8Array(n*n),r=(o,a,l,s,c)=>{for(let m=Math.max(0,a);m<Math.min(n,a+s);m++)for(let u=Math.max(0,o);u<Math.min(n,o+l);u++)i[m*n+u]=c;};r(6,0,1,n,Fi),r(0,6,n,1,Fi),r(0,8,9,1,Dt),r(8,0,1,9,Dt),r(n-8,8,8,1,Dt),r(8,n-8,1,8,Dt),t>=7&&(r(n-11,0,3,6,Dt),r(0,n-11,6,3,Dt));for(let[o,a]of Ye(t,n))r(o-2,a-2,5,5,Ct);return r(0,0,8,8,$t),r(n-8,0,8,8,$t),r(0,n-8,8,8,$t),Li.set(t,i),i}function p0(t){let e=t[8],n=e?.[0]?1:0,i=e?.[1]?1:0,r=(1-n)*2+i;return ["M","L","H","Q"][r]??"M"}function In(t,e){let n=lt(t);return !n||n.a===0?e:[n.r/255,n.g/255,n.b/255]}var Kt=(t,e,n)=>[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n,t[2]+(e[2]-t[2])*n];function Bt(t,e,n,i){let r=H(t);if(i?r<=n:r>=n)return t;let o=H(e);return Math.abs(r-o)<1e-6?e:Kt(t,e,Math.min(1,Math.max(0,(r-n)/(r-o))))}var Oi=t=>Math.max(...t)-Math.min(...t),g0=(t,e)=>(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2,Dr=t=>t.toString(16).padStart(2,"0");function pt(t,e=1){let n=i=>Math.min(255,Math.round(Math.round(Math.min(Math.max(i,0),1)*255)/e)*e);return `#${Dr(n(t[0]))}${Dr(n(t[1]))}${Dr(n(t[2]))}`}function _0(t){let e=t<0?-1:1,n=Math.abs(t),i=1/(1+.3275911*n),r=1-((((1.061405429*i-1.453152027)*i+1.421413741)*i-.284496736)*i+.254829592)*i*Math.exp(-n*n);return e*r}var Ur=.3,Ii=t=>1-Math.exp(-((t/2)**2)/(2*Ur**2)),b0=t=>_0(t/(2*Ur*Math.SQRT2))**2,y0=(t,e,n)=>{let i=Math.min(1,Math.max(0,(n-t)/(e-t)));return i*i*(3-2*i)};function zr(t,e,n,i){let r=i==="cover"?Math.max(n/t,n/e):Math.min(n/t,n/e);return {scale:r,offsetX:(n-t*r)/2,offsetY:(n-e*r)/2}}function Di(t,e){let{width:n,height:i,data:r}=t,o=new Float32Array(n*i*3),a=e??new Float32Array(n*i);for(let l=0;l<n*i;l++)o[l*3]=r[l*4]/255,o[l*3+1]=r[l*4+1]/255,o[l*3+2]=r[l*4+2]/255,e||(a[l]=r[l*4+3]/255);return {width:n,height:i,rgb:o,alpha:a}}function $0(t){let e=Di(t),{rgb:n,alpha:i}=e,r=new Float64Array(256),o=0;for(let u=0;u<i.length;u++){if(i[u]<.5)continue;let f=H([n[u*3],n[u*3+1],n[u*3+2]]);r[Math.min(255,Math.floor(f*256))]+=1,o++;}let a=u=>{let f=0;for(let p=0;p<256;p++)if(f+=r[p],f>=u*o)return p/255;return 1},l=o?a(.01):0,s=o?a(.99):1;s-l<.15&&(l=0,s=1);let c=Math.min(1.6,1/(s-l)),m=(l+s)/2;for(let u=0;u<i.length;u++){let f=[n[u*3],n[u*3+1],n[u*3+2]],p=H(f),g=.5+(p-m)*c;for(let d=0;d<3;d++)n[u*3+d]=Math.min(1,Math.max(0,g+(f[d]-p)*1.12));}return e}function Bi(t,e,n,i,r=1){let{width:o,height:a,rgb:l,alpha:s}=t,c=Math.min(Math.max(e-.5,0),o-1),m=Math.min(Math.max(n-.5,0),a-1),u=Math.floor(c),f=Math.floor(m),p=Math.min(u+1,o-1),g=Math.min(f+1,a-1),d=c-u,h=m-f,_=0,y=0,$=0,C=0,M=(S,R,w)=>{let A=R*o+S,v=s[A]*w;_+=l[A*3]*v,y+=l[A*3+1]*v,$+=l[A*3+2]*v,C+=v;};if(M(u,f,(1-d)*(1-h)),M(p,f,d*(1-h)),M(u,g,(1-d)*h),M(p,g,d*h),C<=0)return i;let x=C*r;return [i[0]+(_/C-i[0])*x,i[1]+(y/C-i[1])*x,i[2]+($/C-i[2])*x]}var x0=new Ce(4),S0=new Ce(6),C0=new Ce(6);function qr(t,e){return S0.get(t.image.data,()=>Ai(e))}function Qi(t,e,n){return C0.get(t.image.data,()=>Di(e,n.alpha))}var et=t=>U(t,2),Gi=t=>U(t,4),Jt=class{groups=new Map;add(e,n){let i=this.groups.get(e);i?i.push(n):this.groups.set(e,[n]);}cellRun(e,n,i,r){this.add(e,`M${n} ${i}h${r}.04v1.04h-${r}.04z`);}circle(e,n,i,r){this.add(e,M0(n,i,r));}toElements(e){return [...this.groups].map(([n,i],r)=>P("path",{d:i.join(""),fill:n},`${e}-${r}`))}};function M0(t,e,n){let i=et(n*2),r=et(n);return `M${et(t-n)} ${et(e)}a${r} ${r} 0 1 0 ${i} 0a${r} ${r} 0 1 0 ${-i} 0z`}function Yt(t,e,n,i,r){let o=Math.min(r,n/2,i/2);if(o<=0)return `M${et(t)} ${et(e)}h${et(n)}v${et(i)}h${et(-n)}z`;let a=et(o);return `M${et(t+o)} ${et(e)}h${et(n-2*o)}a${a} ${a} 0 0 1 ${a} ${a}v${et(i-2*o)}a${a} ${a} 0 0 1 ${-a} ${a}h${et(-(n-2*o))}a${a} ${a} 0 0 1 ${-a} ${-a}v${et(-(i-2*o))}a${a} ${a} 0 0 1 ${a} ${-a}z`}function Ui(t,e,n){let i="";for(let[r,o]of t){let a=(r-2+e)*n,l=(o-2+e)*n;i+=Yt(a,l,5*n,5*n,n*.35),i+=Yt(a+n,l+n,3*n,3*n,n*.15),i+=Yt(a+2*n,l+2*n,n,n,n*.12);}return i}var w0={blend:1,badge:1,color:.9,mono:.7},R0=.35;function zi(t,e,n){let i=Math.min(Math.max(t.intensity??u0,0),w0[Gr(t)]);return H(n)-H(e)>=R0?i:0}function E0(t){let{art:e,modules:n,version:i}=t,r=e.image&&Qr(e.image);if(!(r&&br.includes(e.mode)))return null;let o=n.length;if(o!==i*4+17)return null;let a=In(t.fgColor,[0,0,0]),l=In(t.bgColor,[1,1,1]),s=zi(e,a,l);return s<=0?null:{art:e,image:r,modules:n,size:o,version:i,kinds:h0(i),margin:t.margin,pixelSize:t.pixelSize,t:s,fg:a,bg:l,variant:Gr(e),body:t.body}}function qi(t){let e=E0(t);if(!e)return null;let n;return e.art.mode==="halftone"?n=e.variant==="mono"?I0(e):L0(e):n=e.variant==="badge"?U0(e):k0(e),P("g",{"data-qrdx-art":e.art.mode,"data-qrdx-art-variant":e.variant,children:n})}function A0(t,e){return {margin:.42-.17*t+(e===3?.04:0),darkCap:.4+.3*t}}var Hi=8.5,ki=new Map;function Hr(t){let e=t*4+17,n=ki.get(t);if(!n){let o=e*2,a=new Uint8Array(o*o),l=Hi*2;for(let s=0;s<o;s++)for(let c=0;c<o;c++){let m=c<l||c>=o-l,u=s<l||s>=o-l;m&&u&&!(c>=o-l&&s>=o-l)&&(a[s*o+c]=1);}for(let[s,c]of Ye(t,e))for(let m=(c-2)*2-1;m<(c+3)*2+1;m++)for(let u=(s-2)*2-1;u<(s+3)*2+1;u++)u>=0&&m>=0&&u<o&&m<o&&(a[m*o+u]=1);ki.set(t,a),n=a;}let i=n,r=e*2;return (o,a)=>{let l=Math.floor(o*2),s=Math.floor(a*2);return l>=0&&s>=0&&l<r&&s<r&&i[s*r+l]===1}}function Wi(t,e,n=false){let{image:i,size:r,kinds:o,fg:a,bg:l}=t,s=x0.get(t.art.image.data,()=>$0(i)),c=zr(i.width,i.height,r,"cover"),m=r*e,u=new Float32Array(m*m*3).fill(Number.NaN),p=1/(e*c.scale)>1.3?2:1,g=H(l)-.1*(H(l)-H(a)),d=Hr(t.version);for(let h=0;h<r;h++)for(let _=0;_<r;_++){let y=o[h*r+_],$=y===$t||y===Ct;if(!($&&!n))for(let C=0;C<e;C++)for(let M=0;M<e;M++){let x=0,S=0,R=0;for(let N=0;N<p;N++)for(let I=0;I<p;I++){let D=_+(M+(I+.5)/p)/e,B=h+(C+(N+.5)/p)/e,T=Bi(s,(D-c.offsetX)/c.scale,(B-c.offsetY)/c.scale,l);x+=T[0],S+=T[1],R+=T[2];}let w=p*p,A=[x/w,S/w,R/w],v=_+(M+.5)/e,F=h+(C+.5)/e,L=Math.min(v,F,r-v,r-F);L<1.5&&(A=Kt(A,l,.35*(1-L/1.5))),n&&($||d(v,F))&&(A=Bt(A,l,g,false));let O=((h*e+C)*m+_*e+M)*3;u[O]=A[0],u[O+1]=A[1],u[O+2]=A[2];}}return {n:e,count:m,rgb:u}}function P0(t,e,n){let{size:i,kinds:r,modules:o,fg:a,bg:l,t:s}=t,{n:c,count:m,rgb:u}=e,f=H(a),p=H(l),g=p-f,d=A0(s,c),h=R=>.2126*u[R]+.7152*u[R+1]+.0722*u[R+2],_=new Float32Array(i*i),y=new Float32Array(i*i);for(let R=0;R<i;R++)for(let w=0;w<i;w++){let A=r[R*i+w];if(A===$t){_[R*i+w]=p;continue}if(A===Ct){_[R*i+w]=o[R]?.[w]?f:p;continue}let v=0,F=0,L=0;for(let O=0;O<c;O++)for(let N=0;N<c;N++){let I=h(((R*c+O)*m+w*c+N)*3);v+=I,n.under[O*c+N]||(F+=I,L++);}_[R*i+w]=v/(c*c),y[R*i+w]=L?F/L:v/(c*c);}let $=i+1,C=new Float64Array($*$);for(let R=0;R<i;R++)for(let w=0;w<i;w++)C[(R+1)*$+w+1]=_[R*i+w]+C[R*$+w+1]+C[(R+1)*$+w]-C[R*$+w];let M=2,x=(R,w)=>{let A=Math.max(0,R-M),v=Math.max(0,w-M),F=Math.min(i,R+M+1),L=Math.min(i,w+M+1);return (C[L*$+F]-C[v*$+F]-C[L*$+A]+C[v*$+A])/((F-A)*(L-v))},S=n.weight;for(let R=0;R<i;R++)for(let w=0;w<i;w++){let A=r[R*i+w];if(A===$t||A===Ct)continue;let v=A===Dt,F=(d.margin+(v?.08:0))*g,L=(d.darkCap-(v?.12:0))*g,O=(S*((n.light-n.dark)/2)-F)/(1-S),N=x(w,R),I=y[R*i+w],D=!!o[R]?.[w],B=0,T=l;if(D){let G=Math.min(N+O,f+L);I>G&&(B=(I-G)/Math.max(I-f,1e-6),T=a);}else {let G=Math.max(N-O,p-L);I<G&&(B=(G-I)/Math.max(p-I,1e-6));}if(!(B<=0)){B=Math.min(1,B);for(let G=0;G<c;G++)for(let ot=0;ot<c;ot++){let mt=((R*c+G)*m+w*c+ot)*3;for(let K=0;K<3;K++)u[mt+K]+=(T[K]-u[mt+K])*B;}}}}function Vi(t,e,n,i){let{count:r}=e,o=new Jt;for(let s=0;s<r;s++){let c=0,m=n(s*r);for(let u=1;u<=r;u++){let f=u<r?n(s*r+u):null;(u===r||f!==m)&&(m&&o.cellRun(m,c,s,u-c),c=u,m=f);}}let a=t.pixelSize/e.n,l=et(t.margin*t.pixelSize);return P("g",{transform:`translate(${l} ${l}) scale(${Gi(a)})`,children:o.toElements(i)},i)}function Wr(t,e){let n=Ye(t.version,t.size);return n.length===0?[]:[P("path",{d:Ui(n,t.margin,t.pixelSize),fill:e,fillRule:"evenodd"},"art-alignment")]}function ji(t){let{image:e,size:n}=t;return Math.floor(Math.min(e.width,e.height)/n)>=4&&n<=45?4:3}var v0=t=>2*Ur*Math.sqrt(-2*Math.log(1-Math.min(t,.95)));function F0(t,e,n){let i=e+1,r=new Float64Array(i*i);for(let a=0;a<e;a++)for(let l=0;l<e;l++)r[(a+1)*i+l+1]=t[a*e+l]+r[a*i+l+1]+r[(a+1)*i+l]-r[a*i+l];let o=new Float32Array(e*e);for(let a=0;a<e;a++)for(let l=0;l<e;l++){let s=Math.max(0,l-n),c=Math.max(0,a-n),m=Math.min(e,l+n+1),u=Math.min(e,a+n+1);o[a*e+l]=(r[u*i+m]-r[c*i+m]-r[u*i+s]+r[c*i+s])/((m-s)*(u-c));}return o}function Zi(t,e,n,i){let{size:r,kinds:o,modules:a,fg:l,bg:s}=t,c=H(l),m=H(s),u=m-c,f=F0(e,r,2),p=new Float32Array(r*r),g=new Float32Array(r*r).fill(Number.NaN);for(let d=0;d<r;d++)for(let h=0;h<r;h++){let _=d*r+h,y=o[_];if(y===$t||y===Ct)continue;let $=y===Dt,C=i.base+($?.08:0),M=(i.margin+($?.03:0))*u,x=(i.cap-($?.04:0))*u,S=Ii(C),R=Ii($?Math.max(i.max,.94):i.max),w=S*((i.dark+i.light)/2)+(1-S)*f[_],A=n[_],v=!!a[d]?.[h],F=v?i.dark:i.light,L=v?Math.min(w-M,c+x):Math.max(w+M,m-x),N=(v?A<=L:A>=L)?0:(A-L)/(A-F);N>R&&(N=R,g[_]=Math.min(m,Math.max(c,(L-R*F)/(1-R))));let I=v?A<=L-.06:A>=L+.06;i.skip&&I&&!$||(N=Math.max(N,S)),p[_]=N>0?v0(N):0;}return {diameter:p,surround:g}}function L0(t){let{size:e,kinds:n,modules:i,fg:r,bg:o,t:a,margin:l,pixelSize:s}=t,c=ji(t),m=Wi(t,c,true),u=H(r),f=H(o),p=u+.1*(f-u),g=f-.05*(f-u),{count:d,rgb:h}=m,_=(x,S,R,w)=>((S*c+w)*d+x*c+R)*3,y=new Float32Array(e*e);for(let x=0;x<e;x++)for(let S=0;S<e;S++){let R=n[x*e+S];if(R===$t||R===Ct){y[x*e+S]=R===Ct&&i[x]?.[S]?u:f;continue}let w=0;for(let A=0;A<c;A++)for(let v=0;v<c;v++){let F=_(S,x,v,A);w+=.2126*h[F]+.7152*h[F+1]+.0722*h[F+2];}y[x*e+S]=w/(c*c);}let $=Zi(t,y,y,{base:.6-.28*a,max:.86,dark:p,light:g,margin:.2-.1*a,cap:.4+.14*a,skip:false});for(let x=0;x<e;x++)for(let S=0;S<e;S++){let R=$.surround[x*e+S];if(Number.isNaN(R))continue;let w=y[x*e+S],v=R<w?r:o,F=Math.min(1,Math.abs(w-R)/Math.max(Math.abs(w-H(v)),1e-6));for(let L=0;L<c;L++)for(let O=0;O<c;O++){let N=_(S,x,O,L);for(let I=0;I<3;I++)h[N+I]+=(v[I]-h[N+I])*F;}}let C=[Vi(t,m,x=>{let S=x*3;return Number.isNaN(h[S])?null:pt([h[S],h[S+1],h[S+2]],8)},"art-photo")],M=new Jt;for(let x=0;x<e;x++)for(let S=0;S<e;S++){let R=$.diameter[x*e+S];if(!(R>0))continue;let w=0,A=0,v=0;for(let O=0;O<c;O++)for(let N=0;N<c;N++){let I=_(S,x,N,O);w+=h[I],A+=h[I+1],v+=h[I+2];}let F=[w/(c*c),A/(c*c),v/(c*c)],L=i[x]?.[S]?Bt(F,r,p,true):Bt(F,o,g,false);M.circle(pt(L,10),(S+l+.5)*s,(x+l+.5)*s,R/2*s);}return C.push(...M.toElements("art-dot"),...Wr(t,pt(r))),C}function I0(t){let{size:e,kinds:n,modules:i,fg:r,bg:o}=t,a=ji(t),l=Wi(t,a),s=H(r),c=H(o),m=a%2===1?1:2,u=(a-m)/2,f=w=>w>=u&&w<u+m,p=[];for(let w=0;w<a;w++)for(let A=0;A<a;A++)p.push(f(A)&&f(w));P0(t,l,{weight:b0(m/a),dark:s,light:c,under:p});let{count:g,rgb:d}=l,h=new Float32Array(g*g),_=new Int8Array(g*g).fill(-1);for(let w=0;w<g*g;w++){let A=w*3;if(Number.isNaN(d[A])){h[w]=Number.NaN;continue}let v=(.2126*d[A]+.7152*d[A+1]+.0722*d[A+2]-s)/(c-s);h[w]=.5+(y0(0,1,v)-.5)*1.15;}for(let w=0;w<e;w++)for(let A=0;A<e;A++){let v=n[w*e+A];if(!(v===$t||v===Ct))for(let F=u;F<u+m;F++)for(let L=u;L<u+m;L++)_[(w*a+F)*g+A*a+L]=i[w]?.[A]?0:1;}let y=Hr(t.version);for(let w=0;w<g;w++)for(let A=0;A<g;A++){let v=w*g+A;_[v]<0&&y((A+.5)/a,(w+.5)/a)&&(_[v]=1);}let $=new Uint8Array(g*g),C=.3,M=0,x=0,S=(w,A,v)=>{if(w<0||w>=g||A>=g)return;let F=A*g+w;if(!Number.isNaN(h[F])){let L=Math.floor(w/a)===Math.floor(M/a)&&Math.floor(A/a)===Math.floor(x/a);h[F]+=L?v:v*C;}};for(let w=0;w<g;w++){let A=w%2===0?1:-1;for(let v=0;v<g;v++){let F=A===1?v:g-1-v,L=w*g+F,O=h[L];if(Number.isNaN(O))continue;let N=_[L]>=0?_[L]:O>=.5?1:0;$[L]=N===0?1:0;let I=Math.min(.75,Math.max(-0.75,O-N));M=F,x=w,S(F+A,w,I*7/16),S(F-A,w+1,I*3/16),S(F,w+1,I*5/16),S(F+A,w+1,I/16);}}let R=pt(r);return [Vi(t,l,w=>$[w]?R:null,"art-halftone"),...Wr(t,R)]}function Ti(t,e){let n=null,i=0;for(let r of t.palette){if(e&&g0(r.color,e)<.02)continue;let o=r.area*(.35+Oi(r.color))*(H(r.color)>.86?.05:1);o>i&&(i=o,n=r.color);}return n}function Xi(t,e,n,i,r){let o;if(t.photographic){let a=new Jt,{width:l,height:s,rgb:c,alpha:m}=e;for(let u=0;u<s;u++){let f=0,p=null;for(let g=0;g<=l;g++){let d=u*l+g,h=g<l&&m[d]>=.5?pt(i([c[d*3],c[d*3+1],c[d*3+2]]),6):null;(g===l||h!==p)&&(p&&a.cellRun(p,f,u,g-f),f=g,p=h);}}o=a.toElements(`${r}-px`);}else o=t.layers.map((a,l)=>P("path",{d:a.d,fill:pt(i(a.color)),fillRule:"evenodd"},`${r}-${l}`));return P("g",{transform:`translate(${et(n.x)} ${et(n.y)}) scale(${Gi(n.scale)})`,children:o},r)}function k0(t){let{art:e,image:n,size:i,kinds:r,modules:o,fg:a,bg:l,t:s,margin:c,pixelSize:m}=t,u=qr(e,n),f=Qi(e,n,u),p=zr(u.width,u.height,i,"contain"),g=Math.min(1,.3+1.4*s),d=I=>Kt(l,I,g),h=pt(l),_=pt(a),y=[Xi(u,f,{x:(c+p.offsetX)*m,y:(c+p.offsetY)*m,scale:p.scale*m},d,"art-logo")],$=Hi,C=(I,D)=>Yt((I+c)*m,(D+c)*m,($+.4)*m,($+.4)*m,1.2*m),M=Ye(t.version,i).map(([I,D])=>Yt((I-2.5+c)*m,(D-2.5+c)*m,6*m,6*m,m*.8)).join("");y.push(P("path",{d:C(-0.4,-0.4)+C(i-$,-0.4)+C(-0.4,i-$)+M,fill:h},"art-plates"));let x=Hr(t.version),S=H(l),R=H(a),w=new Float32Array(i*i),A=new Float32Array(i*i),v=new Array(i*i);for(let I=0;I<i;I++)for(let D=0;D<i;D++){let B=I*i+D,T=r[B];if(T===$t||T===Ct){w[B]=T===Ct&&o[I]?.[D]?R:S;continue}let G=1,ot=0,mt=0,K=0,X=0;for(let at=0;at<4;at++)for(let Q=0;Q<4;Q++){let Nt=D+(Q+.5)/4,De=I+(at+.5)/4,wt=x(Nt,De)?l:Bi(f,(Nt-p.offsetX)/p.scale,(De-p.offsetY)/p.scale,l,g),Be=H(wt);G=Math.min(G,Be),ot+=Be,mt+=wt[0],K+=wt[1],X+=wt[2];}w[B]=ot/16,A[B]=G,v[B]=[mt/16,K/16,X/16];}let F=R+.08*(S-R),L=S-.04*(S-R),O=Zi(t,w,w,{base:.74-.26*s,max:.9,dark:F,light:L,margin:.23-.1*s,cap:.4+.1*s,skip:s>=.7}),N=new Jt;for(let I=0;I<i;I++)for(let D=0;D<i;D++){let B=I*i+D,T=O.diameter[B],G=!!o[I]?.[D];if(!(T>0)||!G&&A[B]>=S-.02)continue;let ot=G?Bt(v[B],a,F,true):Bt(v[B],l,L,false);N.circle(pt(ot,8),(D+c+.5)*m,(I+c+.5)*m,T/2*m);}return y.push(...N.toElements("art-dot")),y.push(...Wr(t,_)),y}var T0={L:.5,M:.72,Q:.88,H:1},Yi=.32,Ki=.55,N0=.6,O0=2;function Ji(t,e,n){let i=e>=1?t:t*e,r=e>=1?t/e:t,o=Math.max(.7,t*.09),a=i+2*o,l=r+2*o;return {logoW:i,logoH:r,plateW:a,plateH:l,radius:Math.min(a,l)*.26,cx:n/2,cy:n/2}}var ta=t=>({cx:t.cx,cy:t.cy,w:t.plateW,h:t.plateH,r:t.radius});function ea(t,e,n){return ra(e+.5,n+.5,t)<Ki}function D0(t,e){let n=ta(t),i=Ki+1,r=Math.max(0,Math.floor(t.cx-t.plateW/2-i)),o=Math.min(e-1,Math.ceil(t.cx+t.plateW/2+i)),a=Math.max(0,Math.floor(t.cy-t.plateH/2-i)),l=Math.min(e-1,Math.ceil(t.cy+t.plateH/2+i)),s=[];for(let c=a;c<=l;c++)for(let m=r;m<=o;m++)ea(n,m,c)&&s.push(c*e+m);return s}var B0=t=>Math.floor(t.correctable*N0);function Br(t,e,n){let i=Ji(t,e,n.size),r=B0(n);return Pn(n,D0(i,n.size)).every(o=>o<=r)}function na(t,e,n){if(Br(n,e,t))return n;let i=0,r=n;if(!Br(i,e,t))return -1;for(;r-i>1/64;){let o=(i+r)/2;Br(o,e,t)?i=o:r=o;}return i}var Ln=new Map;function Q0(t,e){let n=`${t.version}${t.level}:${e.toFixed(3)}`,i=Ln.get(n);return i===void 0&&(i=na(t,e,Yi*t.size),Ln.size>=64&&Ln.clear(),Ln.set(n,i)),i}function G0(t,e){let{size:n,t:i,modules:r,version:o}=t,a=p0(r),l=(.18+.15*i)*T0[a],s=e.width/e.height,c=Math.min(Yi,l)*n,m=An(o,a),u=Math.max(0,Q0(m,s));if(u<O0)return {wantedBox:c,maxBox:u,box:0,plate:null};let f=na(m,s,Math.min(c,u));return f<0?{wantedBox:c,maxBox:u,box:0,plate:null}:{wantedBox:c,maxBox:u,box:f,plate:Ji(f,s,n)}}function ra(t,e,n){let i=Math.abs(t-n.cx)-(n.w/2-n.r),r=Math.abs(e-n.cy)-(n.h/2-n.r);return Math.hypot(Math.max(i,0),Math.max(r,0))+Math.min(Math.max(i,r),0)-n.r}function oa(t,e){let{fg:n,bg:i,t:r}=t,o=H(n),a=H(i),l=Ti(e),s=Math.min(1,r/.6),c=l?Bt(l,n,o+.3*(a-o),true):n,m=Kt(n,c,s),u=l?Ti(e,l):null,f=o+.42*(a-o),p=u&&H(u)<=f+.22?Kt(n,Bt(u,n,f,true),s):m;return {body:m,inner:p}}function U0(t){let{art:e,image:n,size:i,kinds:r,modules:o,bg:a,margin:l,pixelSize:s,version:c}=t,m=qr(e,n),u=G0(t,m).plate,{body:f}=oa(t,m),p=pt(f),g=u&&ta(u),d=o.map(v=>[...v]);for(let v=0;v<i;v++)for(let F=0;F<i;F++){let L=r[v*i+F];(L===Ct||g&&L!==$t&&ea(g,F,v))&&(d[v][F]=false);}let h=[],_=t.body?.(d);if(_)h.push(P("g",{fill:p,children:_},"art-body"));else {let v=new Jt;for(let F=0;F<i;F++)for(let L=0;L<i;L++)d[F]?.[L]&&r[F*i+L]!==$t&&v.circle(p,(L+l+.5)*s,(F+l+.5)*s,.45*s);h.push(...v.toElements("art-body"));}let y=Ye(c,i).filter(([v,F])=>!g||ra(v+.5,F+.5,g)>3.2);if(y.length>0&&h.push(P("path",{d:Ui(y,l,s),fill:p,fillRule:"evenodd"},"art-alignment")),!u)return h;let $=Qi(e,n,m),C=(u.cx-u.plateW/2+l)*s,M=(u.cy-u.plateH/2+l)*s,x=u.plateW*s,S=u.plateH*s,R=u.radius*s,w=.1*s,A=Yt(C,M,x,S,R);return h.push(P("path",{d:A,fill:pt(a)},"art-plate"),P("path",{d:A+Yt(C+w,M+w,x-2*w,S-2*w,R-w),fill:pt(Kt(a,f,.16)),fillRule:"evenodd"},"art-plate-ring"),Xi(m,$,{x:(u.cx-u.logoW/2+l)*s,y:(u.cy-u.logoH/2+l)*s,scale:u.logoW/m.width*s},v=>v,"art-logo")),h}function ia(t){let{art:e}=t;if(e.mode!=="logo"||e.matchEyes===false)return null;let n=e.image&&Qr(e.image);if(!n)return null;let i=In(t.fgColor,[0,0,0]),r=In(t.bgColor,[1,1,1]),o=zi(e,i,r);if(o<=0)return null;let a=qr(e,n);if(a.palette.length===0)return null;if(Gr(e)==="badge"){let{body:g,inner:d}=oa({fg:i,bg:r,t:o},a),h={outer:pt(g),inner:pt(d)};return {topLeft:h,topRight:h,bottomLeft:h}}let l=H(i),s=H(r),c=Math.min(1,o/.6),m=t.version*4+17,u=zr(a.width,a.height,m,"contain"),f=.45*Math.max(a.width,a.height),p=(g,d)=>{let h=(g-u.offsetX)/u.scale,_=(d-u.offsetY)/u.scale,y=null,$=0;for(let M of a.palette){if(H(M.color)>.86)continue;let x=(M.cx-h)**2+(M.cy-_)**2,S=M.area*(.35+Oi(M.color))*Math.exp(-x/(2*f**2));S>$&&($=S,y=M.color);}if(!y)return {};let C=Bt(y,i,l+.42*(s-l),true);return {inner:pt(Kt(i,C,c))}};return {topLeft:p(3.5,3.5),topRight:p(m-3.5,3.5),bottomLeft:p(3.5,m-3.5)}}var aa=t=>t*3+3&-4,Vr=(t,e)=>Math.floor((t*e+255*(255-e)+127)/255);function sa(t,e,n){if(!(Number.isInteger(e)&&Number.isInteger(n))||e<1||n<1||e>16384||n>16384)throw new RangeError(`BMP width and height must be whole numbers from 1 to 16384, got ${e} x ${n}`);if(t.length!==e*n*4)throw new RangeError(`Expected ${e*n*4} RGBA bytes for ${e} x ${n}, got ${t.length}`);let i=aa(e),r=i*n,o=new Uint8Array(54+r),a=new DataView(o.buffer);o[0]=66,o[1]=77,a.setUint32(2,o.length,true),a.setUint32(10,54,true),a.setUint32(14,40,true),a.setInt32(18,e,true),a.setInt32(22,n,true),a.setUint16(26,1,true),a.setUint16(28,24,true),a.setUint32(30,0,true),a.setUint32(34,r,true),a.setInt32(38,2835,true),a.setInt32(42,2835,true);for(let l=0;l<n;l++){let s=l*e*4,c=54+(n-1-l)*i;for(let m=0;m<e;m++){let u=t[s+3],f=t[s],p=t[s+1],g=t[s+2];u===255?(o[c]=g,o[c+1]=p,o[c+2]=f):(o[c]=Vr(g,u),o[c+1]=Vr(p,u),o[c+2]=Vr(f,u)),s+=4,c+=3;}}return o}function la(t){if(t.length<54||t[0]!==66||t[1]!==77)return false;let e=new DataView(t.buffer,t.byteOffset,t.byteLength),n=e.getInt32(18,true),i=e.getInt32(22,true);return e.getUint32(2,true)===t.length&&e.getUint32(10,true)===54&&e.getUint32(14,true)===40&&n>0&&i>0&&e.getUint16(26,true)===1&&e.getUint16(28,true)===24&&e.getUint32(30,true)===0&&t.length===54+aa(n)*i}function kn(t){let e=t.getContext("2d");if(!e)throw new Error("Could not get canvas context");let{data:n}=e.getImageData(0,0,t.width,t.height),i=sa(n,t.width,t.height);if(!la(i))throw new Error("Could not write a BMP file");return new Blob([i],{type:"image/bmp"})}function z(t){if(t.length===0)return "";let[e,...n]=t;return `M${b(e[0])} ${b(e[1])}${n.map(([i,r])=>`L${b(i)} ${b(r)}`).join("")}Z`}function q(t,e,n){return `M${b(t-n)} ${b(e)}A${b(n)} ${b(n)} 0 1 1 ${b(t+n)} ${b(e)}A${b(n)} ${b(n)} 0 1 1 ${b(t-n)} ${b(e)}Z`}function k(t,e,n,i,r=0){let o=Math.min(n,i)/2,[a,l,s,c]=(typeof r=="number"?[r,r,r,r]:r).map(u=>Math.max(0,Math.min(u,o))),m=(u,f,p)=>u>0?`A${b(u)} ${b(u)} 0 0 1 ${b(f)} ${b(p)}`:"";return `M${b(t+a)} ${b(e)}H${b(t+n-l)}${m(l,t+n,e+l)}V${b(e+i-s)}${m(s,t+n-s,e+i)}H${b(t+c)}${m(c,t,e+i-c)}V${b(e+a)}${m(a,t+a,e)}Z`}function Me(t,e,n,i,r=-90){return Array.from({length:i},(o,a)=>{let l=(r+360/i*a)*Math.PI/180;return [t+n*Math.cos(l),e+n*Math.sin(l)]})}function we(t,e,n,i,r=5){return Array.from({length:r*2},(o,a)=>{let l=a%2===0?n:i,s=-Math.PI/2+Math.PI/r*a;return [t+l*Math.cos(s),e+l*Math.sin(s)]})}function Ke(t,e,n,i,r=4,o=64){return Array.from({length:o},(a,l)=>{let s=2*Math.PI*l/o,c=Math.cos(s),m=Math.sin(s);return [t+n*Math.sign(c)*Math.abs(c)**(2/r),e+i*Math.sign(m)*Math.abs(m)**(2/r)]})}function Re(t,e,n){let i=n/2,r=(o,a)=>`${b(t+o*i)} ${b(e+a*i)}`;return `M${r(0,-0.52)}C${r(.18,-0.92)} ${r(.98,-0.94)} ${r(1,-0.34)}C${r(1,.12)} ${r(.5,.48)} ${r(0,.92)}C${r(-0.5,.48)} ${r(-1,.12)} ${r(-1,-0.34)}C${r(-0.98,-0.94)} ${r(-0.18,-0.92)} ${r(0,-0.52)}Z`}function ca(t,e,n,i){if(i===0)return t;let r=i*Math.PI/180,o=Math.cos(r),a=Math.sin(r);return t.map(([l,s])=>[e+(l-e)*o-(s-n)*a,n+(l-e)*a+(s-n)*o])}function Tn(t,e,n=0){let i=Math.imul(t+2654435769,2246822507)^Math.imul(e+n,3266489909);return i=Math.imul(i^i>>>15,739982445),i=Math.imul(i^i>>>12,695872825),i^=i>>>15,(i>>>0)/4294967296}function te(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=Math.imul(e,16777619);return (e>>>0).toString(36)}var z0=["horizontal-line","liquid","liquid-horizontal","liquid-vertical","classy","classy-rounded","leaf","plus","hexagon","star","heart","random-dots","mosaic","octagon"];function ua(t){return z0.includes(t)}var q0={circle:.95,"circle-large":.85,square:.75,diamond:.95,pacman:.9,rounded:.75,"vertical-line":.8,liquid:.75,"liquid-horizontal":.85,"liquid-vertical":.85,classy:.7,"classy-rounded":.7,leaf:.75,plus:.8,hexagon:.75,star:.85,heart:.85,"random-dots":.85,mosaic:.8,octagon:.8};function jr(t,e){if(t===void 0||!Number.isFinite(t))return 1;let n=e?q0[e]??1:$r;return Math.min(si,Math.max($r,n,t))}function H0(t,e,n){return t<7&&e<7||t>=n-7&&e<7||t<7&&e>=n-7}function W0(t,e){if(t===1)return [];let n=Math.floor(t/7)+2,i=t===32?26:Math.ceil((t*4+4)/(n*2-2))*2,r=[6];for(let o=e-7;r.length<n;o-=i)r.splice(1,0,o);return r}function Zr(t){let e=(t-17)/4,n=Number.isInteger(e)?W0(e,t):[],i=n.length-1,r=[];for(let[o,a]of n.entries())for(let[l,s]of n.entries())o===0&&l===0||o===0&&l===i||o===i&&l===0||r.push([a,s]);return (o,a)=>r.some(([l,s])=>Math.abs(o-l)<=2&&Math.abs(a-s)<=2)}var V0={liquid:{horizontal:true,vertical:true,thickness:1,radius:()=>1,fillets:true},"liquid-horizontal":{horizontal:true,vertical:false,thickness:.86,radius:()=>1,fillets:false},"liquid-vertical":{horizontal:false,vertical:true,thickness:.86,radius:()=>1,fillets:false},classy:{horizontal:true,vertical:true,thickness:1,radius:t=>t===0||t===2?1:0,fillets:false},"classy-rounded":{horizontal:true,vertical:true,thickness:1,radius:t=>t===0||t===2?1:.4,fillets:false}};function j0(t,e,n,i,r,o){switch(t){case "horizontal-line":{let a=i*.43;return k(e-i/2,n-a,i,2*a)}case "leaf":{let a=i*.5;return k(e-a,n-a,2*a,2*a,[i*.4,i*.05,i*.4,i*.05])}case "plus":{let a=i*.22,l=i*.5;return z([[e-a,n-l],[e+a,n-l],[e+a,n-a],[e+l,n-a],[e+l,n+a],[e+a,n+a],[e+a,n+l],[e-a,n+l],[e-a,n+a],[e-l,n+a],[e-l,n-a],[e-a,n-a]])}case "hexagon":return z(Me(e,n,i*.54,6));case "star":return z(we(e,n+i*.04,i*.62,i*.34));case "heart":return Re(e,n+i*.02,i*1.08);case "random-dots":return q(e,n,i*(.38+.15*Tn(r,o)));case "mosaic":{let a=i*(.8+.14*Tn(r,o,1))/2,l=[[e-a,n-a],[e+a,n-a],[e+a,n+a],[e-a,n+a]];return z(ca(l,e,n,(Tn(r,o,2)-.5)*16))}case "octagon":return z(Me(e,n,i*.48/Math.cos(Math.PI/8),8,22.5));default:return q(e,n,i*.45)}}function ma(t,e){let{margin:n,pixelSize:i,pattern:r}=e,o=jr(e.scale,r),a=t.length,l=e.plain?()=>false:Zr(a),s=(d,h)=>!e.plain&&H0(d,h,a),c=(d,h)=>d>=0&&h>=0&&d<a&&h<a&&!!t[h]?.[d]&&!s(d,h),m=d=>(d+.5+n)*i,u=[],f=[],p=V0[r];for(let d=0;d<a;d++)for(let h=0;h<a;h++){if(!c(h,d))continue;let _=m(h),y=m(d);if(l(h,d)){u.push(E`M${_-i/2} ${y-i/2}h${i}v${i}h${-i}z`);continue}if(!p){f.push(j0(r,_,y,i*o,h,d));continue}let $=i*p.thickness*o/2,C=p.horizontal&&c(h+1,d),M=p.horizontal&&c(h-1,d),x=p.vertical&&c(h,d-1),S=p.vertical&&c(h,d+1),w=[!(x||M),!(x||C),!(S||C),!(S||M)].map((A,v)=>A?$*p.radius(v):0);f.push(k(_-$,y-$,2*$,2*$,w)),2*$<i&&(C&&f.push(k(_,y-$,i,2*$)),S&&f.push(k(_-$,y,2*$,i)));}if(p?.fillets&&o===1){let d=i*.3;for(let h=0;h<a;h++)for(let _=0;_<a;_++){if(c(_,h)||s(_,h))continue;let y=m(_)-i/2,$=m(h)-i/2,C=y+i,M=$+i;c(_-1,h)&&c(_,h-1)&&c(_-1,h-1)&&f.push(E`M${y} ${$}h${d}A${d} ${d} 0 0 0 ${y} ${$+d}Z`),c(_+1,h)&&c(_,h-1)&&c(_+1,h-1)&&f.push(E`M${C} ${$}v${d}A${d} ${d} 0 0 0 ${C-d} ${$}Z`),c(_+1,h)&&c(_,h+1)&&c(_+1,h+1)&&f.push(E`M${C} ${M}h${-d}A${d} ${d} 0 0 0 ${C} ${M-d}Z`),c(_-1,h)&&c(_,h+1)&&c(_-1,h+1)&&f.push(E`M${y} ${M}v${-d}A${d} ${d} 0 0 0 ${y+d} ${M}Z`);}}let g=[];return f.length>0&&g.push(P("path",{d:f.join("")},"modules")),u.length>0&&g.push(P("path",{d:u.join("")},"alignment")),g}var Xr=(t,e=0)=>{for(let n=e;n<t.length;n++)if(t[n]?.continue!==true)return true;return false};function Qt(t,e=[],n={}){return {...n,run(i){let r=t({value:i,issues:[]}),o=Xr(r.issues);for(let a of e){if(a.hasLength){let s=r.value;if(r.issues.some(c=>c.continue===false)||s===null||s===void 0||s.length===void 0)continue}else if(o)continue;let l=r.issues.length;a.run(r),!o&&r.issues.length>l&&(o=Xr(r.issues,l));}return r}}}function Z0(t){if(typeof t=="number")return Number.isNaN(t)?"NaN":Number.isFinite(t)?"number":String(t);if(t===null)return "null";if(Array.isArray(t))return "array";if(typeof t=="object"){let e=t.constructor;if(Object.getPrototypeOf(t)!==Object.prototype&&"constructor"in t&&e)return e.name}return typeof t}var ne=(t,e)=>({path:[],message:`Invalid input: expected ${t}, received ${Z0(e)}`}),X0={string:"characters",array:"items"};function Pt(t,e,n,i){let r=X0[e],o=t?"Too big":"Too small",a=`${t?"<=":">="}${n}`;return {path:[],message:r?`${o}: expected ${e} to have ${a} ${r}`:`${o}: expected ${e} to be ${a}`,continue:i}}var Yr=t=>typeof t=="string"?`"${t}"`:`${t}`,pa=t=>typeof t=="object"&&t!==null&&!Array.isArray(t);function eo(t,e,n){for(let i of n)i.path.unshift(e),t.push(i);}var Y0=t=>t>=55296&&t<=56319,K0=t=>t>=56320&&t<=57343;function J0(t){let e=t.length;for(let n=0;n<t.length-1;n++)Y0(t.charCodeAt(n))&&K0(t.charCodeAt(n+1))&&(e--,n++);return e}var ga=t=>Array.isArray(t)?"array":typeof t=="string"?"string":"unknown",en=t=>({run(e){e.value<t&&e.issues.push(Pt(false,"number",t,true));}}),nn=t=>({run(e){e.value>t&&e.issues.push(Pt(true,"number",t,true));}}),Pe=(t,e="Invalid input")=>({run(n){t(n.value)||n.issues.push({path:[],message:e,continue:true});}}),_a=t=>typeof t=="string"?J0(t):t.length,ba=t=>({hasLength:true,run(e){let n=e.value;_a(n)<t&&e.issues.push(Pt(false,ga(n),t,true));}}),no=t=>({hasLength:true,run(e){let n=e.value;_a(n)>t&&e.issues.push(Pt(true,ga(n),t,true));}}),ya=(t,e)=>({run(n){t.lastIndex=0,t.test(n.value)||n.issues.push({path:[],message:e??`Invalid string: must match pattern ${t}`,continue:true});}}),tu={run(t){let e=t.value;Number.isInteger(e)?Number.isSafeInteger(e)||t.issues.push(e>0?Pt(true,"int",Number.MAX_SAFE_INTEGER,true):Pt(false,"int",Number.MIN_SAFE_INTEGER,true)):t.issues.push({...ne("int",e),continue:false});}},re=(...t)=>Qt(e=>{let n=e.value;return typeof n=="number"&&Number.isFinite(n)||e.issues.push(ne("number",n)),e},t),$a=(...t)=>re(tu,...t),Nn=(...t)=>Qt(e=>(typeof e.value!="string"&&e.issues.push(ne("string",e.value)),e),t);function St(t){let e=t.length===1?`Invalid input: expected ${Yr(t[0])}`:`Invalid option: expected one of ${t.map(Yr).join("|")}`;return Qt(n=>(t.includes(n.value)||n.issues.push({path:[],message:e}),n),[],{values:t})}var xt=t=>St([t]),j=t=>({optional:true,run:e=>e===void 0?{value:e,issues:[]}:t.run(e)});function Y(t,e=[]){let n=Object.keys(t),i=new Set(n);return Qt(r=>{let o=r.value;if(!pa(o))return r.issues.push(ne("object",o)),r;let a={};for(let s of n){let c=t[s],m=c.run(o[s]),u=s in o;eo(r.issues,s,m.issues),u||c.optional||m.issues.length>0||r.issues.push({path:[s],message:"Invalid input: expected nonoptional, received undefined"}),u&&(a[s]=m.value);}r.value=a;let l=[];for(let s in o)i.has(s)||l.push(s);return l.length>0&&r.issues.push({path:[],message:`Unrecognized key${l.length>1?"s":""}: ${l.map(Yr).join(", ")}`,continue:true}),r},e,{shape:t})}function Kr(t,e,n){let i=[];return e!==void 0&&i.push(ba(e)),n!==void 0&&i.push(no(n)),Qt(r=>{let o=r.value;if(Array.isArray(o)&&n!==void 0&&o.length>n)return r.issues.push(Pt(true,"array",n,false)),r;if(!Array.isArray(o))return r.issues.push(ne("array",o)),r;let a=new Array(o.length);for(let l=0;l<o.length;l++){let s=t.run(o[l]);eo(r.issues,l,s.issues),a[l]=s.value;}return r.value=a,r},i)}function Jr(t){return Qt(e=>{let n=e.value;if(!Array.isArray(n))return e.issues.push(ne("tuple",n)),e;if(n.length<t.length)return e.issues.push(Pt(false,"array",t.length,void 0)),e;n.length>t.length&&e.issues.push(Pt(true,"array",t.length,void 0));let i=[];return t.forEach((r,o)=>{let a=r.run(n[o]);eo(e.issues,o,a.issues),i[o]=a.value;}),e.value=i,e})}function Ae(t){return Qt(e=>{let n=[];for(let r of t){let o=r.run(e.value);if(o.issues.length===0)return o;n.push(o);}let i=n.filter(r=>!Xr(r.issues));return i.length===1?i[0]:(e.issues.push({path:[],message:"Invalid input"}),e)})}function xa(t,e){let n=new Map;for(let r of e)for(let o of r.shape?.[t]?.values??[])n.set(o,r);let i=`Invalid discriminator value. Expected ${[...n.keys()].map(r=>`'${r}'`).join(" | ")}`;return Qt(r=>{let o=r.value;if(!pa(o))return r.issues.push(ne("object",o)),r;let a=n.get(o[t]);return a?a.run(o):(r.issues.push({path:[t],message:i}),r)})}var eu=Pe(Rn,`Numbers may have at most ${tt.maxDecimals} decimals`),Dn=[en(-4e3),nn(tt.maxCoordinate),eu],nt=re(...Dn),ut=re(...Dn,Pe(t=>t>0,"Must be greater than 0")),On=re(...Dn,Pe(t=>t>=0,"Must not be negative")),tn=Nn(ya(/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/,"Use a #rgb or #rrggbb color")),da=Ae([St(Mi),tn]),Sa=t=>Y({mix:Jr([t,t]),amount:re(en(0),nn(1),Pe(Rn))}),Ee=Ae([da,Sa(da)]),nu=Ae([tn,Sa(Ae([St(["frame","accent","background"]),tn]))]),ee=Ae([Ee,Y({gradient:Y({from:Ee,to:Ee,direction:j(St(["horizontal","vertical"])),steps:j($a(en(2),nn(tt.maxGradientSteps)))})})]),to=()=>({x:nt,y:nt,width:ut,height:ut}),Je=Y({color:Ee,width:ut}),ru=xa("type",[Y({type:xt("rect"),...to(),radius:j(On),fill:ee,hole:j(Y({...to(),radius:j(On)})),stroke:j(Je)}),Y({type:xt("circle"),cx:nt,cy:nt,r:ut,hole:j(ut),fill:ee,stroke:j(Je)}),Y({type:xt("ellipse"),cx:nt,cy:nt,rx:ut,ry:ut,fill:ee,stroke:j(Je)}),Y({type:xt("polygon"),points:Kr(Jr([nt,nt]),3,tt.maxPolygonPoints),fill:ee,stroke:j(Je)}),Y({type:xt("path"),d:Nn(ba(2),no(tt.maxPathLength)),fill:ee,fillRule:j(St(["nonzero","evenodd"])),stroke:j(Je)}),Y({type:xt("line"),x1:nt,y1:nt,x2:nt,y2:nt,width:ut,cap:j(St(["butt","round"])),dash:j(Jr([ut,ut])),fill:ee}),Y({type:xt("icon"),icon:St(Ci),x:nt,y:nt,size:ut,fill:ee})]),fa=()=>({id:Nn(ya(/^[a-z][a-z0-9-]{0,31}$/)),slot:St(["primary","secondary","fixed"]),text:Nn(no(200)),maxLength:j($a(en(1),nn(ze))),color:Ee,weight:j(St(["bold","regular"])),collapse:j(Y({y:nt,height:ut}))}),ou=xa("type",[Y({type:xt("text"),...fa(),box:Y(to()),align:j(St(["start","middle","end"])),fontSize:j(ut)}),Y({type:xt("curved"),...fa(),curve:Y({cx:nt,cy:nt,radius:ut,side:St(["top","bottom"]),spread:j(re(en(20),nn(300),Pe(Rn)))}),fontSize:ut})]),ha=re(...Dn,Pe(t=>t>=tt.minArtboard&&t<=tt.maxArtboard,`Artboard sides must be ${tt.minArtboard} to ${tt.maxArtboard} units`)),iu=Y({kind:xt($i),version:xt(xi),artboard:Y({width:ha,height:ha}),qr:Y({x:nt,y:nt,size:ut,padding:j(On),radius:j(On),plate:j(St(["opaque","background","none"]))}),colors:Y({frame:tn,text:j(nu),accent:j(tn)}),shapes:Kr(ru,void 0,tt.maxShapes),labels:Kr(ou,void 0,tt.maxLabels),bleed:j(Ae([xt("none"),Ee]))},[{run(t){wi(t.value,(e,n=[])=>{t.issues.push({path:[...n],message:e,continue:true});});}}]);function Ca(t){let e=iu.run(t);return e.issues.length===0?{success:true,data:e.value}:{success:false,issues:e.issues.map(({path:n,message:i})=>({path:n,message:i}))}}var Ma=({path:t,message:e})=>t.length>0?`${t.join(".")}: ${e}`:e;var wa=24,Gt=(t,e,n,i)=>{let r=i*Math.PI/180;return [t+n*Math.cos(r),e+n*Math.sin(r)]},Bn=([t,e])=>`${b(t)} ${b(e)}`;function ve(t,e,n,i,r,o){let a=o-r>180?1:0;return `M${Bn(Gt(t,e,i,r))}A${b(i)} ${b(i)} 0 ${a} 1 ${Bn(Gt(t,e,i,o))}L${Bn(Gt(t,e,n,o))}A${b(n)} ${b(n)} 0 ${a} 0 ${Bn(Gt(t,e,n,r))}Z`}function rn(t,e,n,i){return `M${b(t-n)} ${b(e)}A${b(n)} ${b(i)} 0 1 1 ${b(t+n)} ${b(e)}A${b(n)} ${b(i)} 0 1 1 ${b(t-n)} ${b(e)}Z`}function au(t){let e=0;return t.forEach(([n,i],r)=>{let[o,a]=t[(r+1)%t.length];e+=n*a-o*i;}),e/2}function Ra(t){return z(au(t)<0?[...t].reverse():t)}function Qn(t,e,n,i,r){let o=Math.hypot(n-t,i-e)||1,a=-(i-e)/o*(r/2),l=(n-t)/o*(r/2);return Ra([[t+a,e+l],[n+a,i+l],[n-a,i-l],[t-a,e-l]])}var gt=(...t)=>({d:t.join(""),fillRule:"nonzero"}),vt=(...t)=>({d:t.join(""),fillRule:"evenodd"});function su(){let t=[];for(let e of [0,60,120]){let[n,i]=Gt(12,12,10.5,e+180),[r,o]=Gt(12,12,10.5,e);t.push(Qn(n,i,r,o,2));}for(let e=0;e<6;e++){let n=e*60,[i,r]=Gt(12,12,6.2,n);for(let o of [-45,45]){let[a,l]=Gt(i,r,3.6,n+o);t.push(Qn(i,r,a,l,1.7));}}return gt(...t)}var lu={wifi:()=>gt(ve(12,20,4.6,7.2,-135,-45),ve(12,20,9.2,11.8,-135,-45),ve(12,20,13.8,16.4,-135,-45),q(12,20,2.2)),star:()=>gt(z(we(12,12.8,11.6,4.8))),heart:()=>gt(Re(12,12.4,22)),phone:()=>vt(k(6,1.5,12,21,2.6),k(7.8,4.2,8.4,13.4,.6),q(12,19.8,1.1)),headphones:()=>gt(ve(12,13,7.6,9.8,-180,0),k(2,12,5,9.5,2),k(17,12,5,9.5,2)),calendar:()=>vt(k(2.5,4,19,17.5,2.5),k(4.6,9,14.8,10.6,.8),k(7,11.4,2.6,2.6,.4),k(10.7,11.4,2.6,2.6,.4),k(14.4,11.4,2.6,2.6,.4),k(7,15.1,2.6,2.6,.4),k(10.7,15.1,2.6,2.6,.4),k(6.5,1.4,2.4,2.6,[1.2,1.2,0,0]),k(15.1,1.4,2.4,2.6,[1.2,1.2,0,0])),user:()=>gt(q(12,7.5,4.6),"M3 21.5C3 16.2 7 13.6 12 13.6C17 13.6 21 16.2 21 21.5Z"),chat:()=>vt(k(2,3,20,14,4),z([[6.5,17],[11.5,17],[5.8,21.8]]),q(7.5,10,1.5),q(12,10,1.5),q(16.5,10,1.5)),bag:()=>gt(k(3.5,7.5,17,14.5,2),ve(12,7.5,3.1,4.8,-180,0)),bell:()=>gt("M3.5 17.2A8.5 8.5 0 0 1 20.5 17.2Z",k(1.5,18.2,21,2.6,1.3),k(11.2,6.6,1.6,2.6,0),k(9.8,4.6,4.4,2.4,1.2)),cup:()=>gt("M4 6.5H17V13.5A6.5 6.5 0 0 1 4 13.5Z",ve(17,10.2,1.7,3.6,-90,90),k(2,20.6,17,2,1),k(7,1.6,1.6,3.4,.8),k(11.6,1.6,1.6,3.4,.8)),card:()=>vt(k(1.5,4.5,21,15,2.5),k(1.5,8,21,3,0),k(4.5,13.6,4.6,3.2,.6)),check:()=>vt(q(12,12,10.5),z([[6.6,12.4],[8.4,10.6],[10.6,12.8],[15.8,7.6],[17.6,9.4],[10.6,16.4]])),info:()=>vt(q(12,12,10.5),q(12,7.2,1.6),k(10.6,10,2.8,8,.8)),home:()=>vt(z([[12,2.5],[22.5,11.5],[19.5,11.5],[19.5,21.5],[4.5,21.5],[4.5,11.5],[1.5,11.5]]),k(10,14.5,4,7,[.6,.6,0,0])),pin:()=>vt("M12 22.5C8.5 17.6 4.5 14 4.5 9.5A7.5 7.5 0 0 1 19.5 9.5C19.5 14 15.5 17.6 12 22.5Z",q(12,9.5,3)),share:()=>gt(Qn(6,12,18,5,1.8),Qn(6,12,18,19,1.8),q(18,5,3.2),q(6,12,3.2),q(18,19,3.2)),download:()=>gt(k(10.6,2,2.8,9.5,0),z([[6,10],[18,10],[12,16.5]]),z([[2.5,15],[5.3,15],[5.3,19],[18.7,19],[18.7,15],[21.5,15],[21.5,21.8],[2.5,21.8]])),clock:()=>vt(q(12,12,10.5),q(12,12,8.4),z([[11,5.4],[13,5.4],[13,11.3],[16.9,13.5],[15.9,15.2],[11,12.5]])),snowflake:su,pumpkin:()=>gt(rn(7.8,14.6,5.8,6.9),rn(16.2,14.6,5.8,6.9),rn(12,14.6,4.8,7.4),k(10.9,3.4,2.2,4.6,.8),Ra([[13,4.2],[17.2,3],[16.2,5.4],[13,6]])),tree:()=>gt(z([[12,1.5],[16.8,8.2],[7.2,8.2]]),z([[12,5.2],[19,13.6],[5,13.6]]),z([[12,9.4],[21.2,19.2],[2.8,19.2]]),k(10.4,18.6,3.2,3.9,.4)),sparkle:()=>gt(z(we(9.5,13.5,9,2.4,4)),z(we(19,5,4,1.1,4))),gift:()=>gt(k(3,11.2,7.8,10.6,1),k(13.2,11.2,7.8,10.6,1),k(2,7.4,8.8,3.2,1),k(13.2,7.4,8.8,3.2,1),rn(8.8,4.8,2.9,1.9),rn(15.2,4.8,2.9,1.9))};function Ea(t){return lu[t]()}function Aa(t){return t===" "?.3:/[MWmw@%]/.test(t)?.92:/[A-Z0-9#&]/.test(t)?.72:/[il.,:;!'|1]/.test(t)?.32:.6}function oo(t){let e=0;for(let n of t)e+=Aa(n);return Math.max(e,1)}var ro=t=>Math.round(Math.min(255,Math.max(0,t))).toString(16).padStart(2,"0");function Gn(t,e,n){let i=lt(t)??{r:0,g:0,b:0},r=lt(e)??{r:255,g:255,b:255},o=Math.min(1,Math.max(0,n));return `#${ro(i.r+(r.r-i.r)*o)}${ro(i.g+(r.g-i.g)*o)}${ro(i.b+(r.b-i.b)*o)}`}function Pa(t,e,n,i,r,o,a,l){let s=[...t],c=r*.08,m=s.map(d=>Aa(d)*r),u=m.reduce((d,h)=>d+h,0)+c*Math.max(0,s.length-1),f=o==="top"?i-r*.35:i+r*.35,p=[],g=0;return s.forEach((d,h)=>{let _=m[h],y=(g+_/2)/f;if(g+=_+c,d.trim()==="")return;let $=o==="top"?-Math.PI/2-u/2/f+y:Math.PI/2+u/2/f-y;p.push({text:d,x:e+f*Math.cos($),y:n+f*Math.sin($),fontSize:r,maxWidth:r*2,color:a,rotate:$*180/Math.PI+(o==="top"?90:-90),field:l});}),p}var Un=class extends Error{issues;constructor(e){super(`Invalid frame spec: ${e.slice(0,5).join("; ")}`),this.name="FrameSpecError",this.issues=e;}},va=new WeakMap;function on(t){if(t&&typeof t=="object"){let n=va.get(t);if(n)return n}if(t==null)throw new Un(['A "custom" frame needs a spec']);let e=Ca(t);if(!e.success)throw new Un(e.issues.map(Ma));return typeof t=="object"&&va.set(t,e.data),e.data}var cu=t=>{let e=lt(t);return !!(e&&e.a>=1)};function uu(t,e){let n=st(e,dt);return t.qr.plate==="none"?{color:n,plate:false}:cu(n)?{color:n,plate:true}:t.qr.plate==="background"?{color:n,plate:false}:{color:dt,plate:true}}function La(t,e,n=dt){let i=e.color||t.colors.frame,r=e.secondaryColor||t.colors.accent||i,o=s=>s==="frame"?i:s==="accent"?r:s==="background"?n:s,a=t.colors.text,l=e.textColor||(a===void 0?i:typeof a=="string"?a:Gn(o(a.mix[0]),o(a.mix[1]),a.amount));return {frame:i,text:l,accent:r}}function mu(t,e,n){let i=La(e,t,n),r=o=>{switch(o){case "frame":return i.frame;case "text":return i.text;case "accent":return i.accent;case "background":return n;default:return o}};return o=>typeof o=="string"?r(o):Gn(r(o.mix[0]),r(o.mix[1]),o.amount)}function Fa(t,e,n=0,i=0){let r=He(t);return r?Mr(r,e,n,i):""}function du(t,e,n,i){return `M${b(t-n)} ${b(e)}A${b(n)} ${b(i)} 0 1 1 ${b(t+n)} ${b(e)}A${b(n)} ${b(i)} 0 1 1 ${b(t-n)} ${b(e)}Z`}function fu(t,e){let[n,i,r,o]=[t.x1*e,t.y1*e,t.x2*e,t.y2*e],a=Math.hypot(r-n,o-i),l=t.width*e/2,s=a>0?(r-n)/a:1,c=a>0?(o-i)/a:0,m=-c*l,u=s*l,f=(h,_)=>{let y=[n+s*h,i+c*h],$=[n+s*_,i+c*_];if(t.cap==="round"&&_-h>2*l){let C=[y[0]+s*l,y[1]+c*l],M=[$[0]-s*l,$[1]-c*l];return `M${b(C[0]-m)} ${b(C[1]-u)}L${b(M[0]-m)} ${b(M[1]-u)}A${b(l)} ${b(l)} 0 0 1 ${b(M[0]+m)} ${b(M[1]+u)}L${b(C[0]+m)} ${b(C[1]+u)}A${b(l)} ${b(l)} 0 0 1 ${b(C[0]-m)} ${b(C[1]-u)}Z`}return `M${b(y[0]-m)} ${b(y[1]-u)}L${b($[0]-m)} ${b($[1]-u)}L${b($[0]+m)} ${b($[1]+u)}L${b(y[0]+m)} ${b(y[1]+u)}Z`};if(!t.dash)return {type:"path",d:f(0,a),fillRule:"nonzero"};let p=t.dash[0]*e,g=p+t.dash[1]*e,d=[];for(let h=0;h+p<=a+1e-6;h+=g)d.push(f(h,h+p));return {type:"path",d:d.join(""),fillRule:"nonzero"}}function hu(t,e){switch(t.type){case "rect":return {type:"rect",x:t.x*e,y:t.y*e,width:t.width*e,height:t.height*e,radius:(t.radius??0)*e,...t.hole&&{hole:{x:t.hole.x*e,y:t.hole.y*e,width:t.hole.width*e,height:t.hole.height*e,radius:(t.hole.radius??0)*e}}};case "circle":return {type:"path",d:q(t.cx*e,t.cy*e,t.r*e)+(t.hole?q(t.cx*e,t.cy*e,t.hole*e):""),fillRule:t.hole?"evenodd":"nonzero"};case "ellipse":return {type:"path",d:du(t.cx*e,t.cy*e,t.rx*e,t.ry*e),fillRule:"nonzero"};case "polygon":return {type:"polygon",points:t.points.map(([n,i])=>[n*e,i*e])};case "path":return {type:"path",d:Fa(t.d,e),fillRule:t.fillRule??"nonzero"};case "line":return fu(t,e);default:{let n=Ea(t.icon);return {type:"path",d:Fa(n.d,t.size*e/wa,t.x*e,t.y*e),fillRule:n.fillRule}}}}function pu(t){if(t.type==="rect"){let{x:e,y:n,width:i,height:r,radius:o,hole:a}=t;return [...xe(e,n,i,r,o,o),...a?xe(a.x,a.y,a.width,a.height,a.radius,a.radius):[]]}return t.type==="polygon"?[...t.points.map(([e,n],i)=>i===0?{op:"M",x:e,y:n}:{op:"L",x:e,y:n}),{op:"Z"}]:jt(t.d)}function gu(t,e,n){let i=pu(t),r=fi(i,.2),o=t.type==="rect"?t.hole?"evenodd":"nonzero":t.type==="path"?t.fillRule??"nonzero":"nonzero",a=e.direction==="vertical",l=h=>a?h[1]:h[0],s=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY;for(let h of r)for(let _ of h)s=Math.min(s,l(_)),c=Math.max(c,l(_));if(!(c>s))return [];let m=e.steps??32,u=n(e.from),f=n(e.to),p=c-s,g=p*.002,d=[];for(let h=0;h<m;h++){let _=s+p*h/m,y=Math.min(c,s+p*(h+1)/m+(h+1<m?g:0)),$=a?{x0:Number.NEGATIVE_INFINITY,x1:Number.POSITIVE_INFINITY,y0:_,y1:y}:{x0:_,x1:y,y0:Number.NEGATIVE_INFINITY,y1:Number.POSITIVE_INFINITY},C=r.map(M=>$n(M,$)).filter(M=>M.length>2);C.length!==0&&d.push({type:"path",d:hi(C),fill:Gn(u,f,(h+.5)/m),fillRule:o});}return d}function _u(t,e,n){let i=hu(t,e),r="stroke"in t&&t.stroke?{stroke:n(t.stroke.color),strokeWidth:t.stroke.width*e}:void 0;if(typeof t.fill=="object"&&"gradient"in t.fill){let o=gu(i,t.fill.gradient,n);return r?[...o,{...i,fill:"none",...r}]:o}return [{...i,fill:n(t.fill),...r}]}function bu(t,e){let n=Math.min(t.maxLength??tt.maxTextLength,tt.maxTextLength),i=t.slot==="primary"?e.text??t.text:t.slot==="secondary"?e.secondaryText??t.text:t.text;return Ve(i,n)}function yu(t){return t===void 0||!Number.isFinite(t)?1:Math.min(qe,Math.max(yn,t))}function $u(t,e,n,i,r,o){let a=r(t.color),l=t.weight==="regular"?{fontWeight:400}:{};if(t.type==="curved"){let{cx:d,cy:h,radius:_,side:y,spread:$=140}=t.curve,C=_*i*($*Math.PI/180),M=Math.min(t.fontSize*i*n,C/(oo(e)+.08*e.length));return Pa(e,d*i,h*i,_*i,M,y,a,o).map(x=>({...x,...l}))}let s=t.box.x*i,c=t.box.y*i,m=t.box.width*i,u=t.box.height*i;if(!(u>0))return [];let f=(t.fontSize??t.box.height*Lr)*i,p=Math.min(f*n,u*wn,m/oo(e)),g=t.align??"middle";return [{text:e,x:g==="start"?s:g==="end"?s+m:s+m/2,y:c+u/2+p*.35,fontSize:p,maxWidth:m,color:a,...g!=="middle"&&{align:g},...l,field:o}]}function xu(t){let e=0,n=0,i=0,r=0;return t.map(({command:o,values:a})=>{let l=o.toUpperCase(),s=o!==l;switch(l){case "Z":return e=i,n=r,{command:"Z",values:[]};case "H":return e=(s?e:0)+a[0],{command:"H",values:[e]};case "V":return n=(s?n:0)+a[0],{command:"V",values:[n]};case "A":return e=(s?e:0)+a[5],n=(s?n:0)+a[6],{command:"A",values:[...a.slice(0,5),e,n]};default:{let c=a.map((m,u)=>s?m+(u%2===0?e:n):m);return e=c.at(-2),n=c.at(-1),l==="M"&&(i=e,r=n),{command:l,values:c}}}})}function Su(t,e){let n=He(t);return n?Mr(xu(n).map(({command:i,values:r})=>i==="V"?{command:i,values:[e(r[0])]}:i==="H"||i==="Z"?{command:i,values:r}:i==="A"?{command:i,values:[...r.slice(0,6),e(r[6])]}:{command:i,values:r.map((o,a)=>a%2===1?e(o):o)})):t}function Cu(t,e){let n=(i,r)=>{let o=e(i);return {y:o,height:e(i+r)-o}};switch(t.type){case "rect":return {...t,...n(t.y,t.height),...t.hole&&{hole:{...t.hole,...n(t.hole.y,t.hole.height)}}};case "circle":case "ellipse":return {...t,cy:e(t.cy)};case "polygon":return {...t,points:t.points.map(([i,r])=>[i,e(r)])};case "path":return {...t,d:Su(t.d,e)};case "line":return {...t,y1:e(t.y1),y2:e(t.y2)};default:return {...t,y:e(t.y)}}}function Mu(t,e){if(e.length===0)return t;let n=r=>{let o=r;for(let a of e)o-=Math.min(Math.max(r-a.y,0),a.height);return o},i=(r,o)=>e.some(a=>r>=a.y-1e-6&&o<=a.y+a.height+1e-6);return {...t,artboard:{...t.artboard,height:n(t.artboard.height)},qr:{...t.qr,y:n(t.qr.y)},shapes:t.shapes.filter(r=>{let{bounds:o}=Ir(r);return !(o&&i(o.y0,o.y1))}).map(r=>Cu(r,n)),labels:t.labels.map(r=>{if(r.type==="curved")return {...r,curve:{...r.curve,cy:n(r.curve.cy)}};let o=n(r.box.y);return {...r,box:{...r.box,y:o,height:n(r.box.y+r.box.height)-o}}})}}function an(t,e,n,i,r={}){let o=new Map(e.labels.map(h=>[h.id,bu(h,n)])),a=Mu(e,e.labels.flatMap(h=>h.collapse&&!o.get(h.id)?[h.collapse]:[])),l=t/a.qr.size,s=uu(a,i),c=mu(n,a,s.color),m=a.shapes.flatMap(h=>_u(h,l,c));if(s.plate){let h=En(a)*l;m.push({type:"rect",x:a.qr.x*l-h,y:a.qr.y*l-h,width:t+2*h,height:t+2*h,radius:(a.qr.radius??0)*l,fill:s.color});}let u=yu(n.fontScale),f=a.labels.flatMap(h=>{let _=o.get(h.id);if(!_)return [];let y=(h.slot==="fixed"?void 0:r[h.slot])??h.id;return $u(h,_,u,l,c,y)}),p=f[0],g=p&&p.rotate===void 0?p:null,d=a.bleed??"none";return {width:a.artboard.width*l,height:a.artboard.height*l,qrX:a.qr.x*l,qrY:a.qr.y*l,qrSize:t,shapes:m,label:g,extraLabels:g?f.slice(1):f,squareEdges:d!=="none",color:c(d==="none"?"frame":d)}}function Ia(t,e,n){return an(t,on(e.spec),e,n)}var ka={kind:"qrdx.frame",version:1,artboard:{width:1600,height:1470},qr:{x:300,y:120,size:1e3,padding:70,radius:10,plate:"background"},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"polygon",points:[[0,1250],[190,1250],[190,1470],[0,1470],[50.4,1360]],fill:{mix:["frame","#000000"],amount:.28}},{type:"polygon",points:[[1600,1250],[1549.6,1360],[1600,1470],[1410,1470],[1410,1250]],fill:{mix:["frame","#000000"],amount:.28}},{type:"polygon",points:[[90,1420],[170,1470],[90,1470]],fill:{mix:["frame","#000000"],amount:.5}},{type:"polygon",points:[[1510,1420],[1510,1470],[1430,1470]],fill:{mix:["frame","#000000"],amount:.5}},{type:"rect",x:220,y:40,width:1160,height:1160,radius:20,fill:"background"},{type:"rect",x:180,y:0,width:1240,height:1240,radius:60,fill:"frame",hole:{x:220,y:40,width:1160,height:1160,radius:20}},{type:"rect",x:90,y:1200,width:1420,height:220,fill:"frame"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:170,y:1200,width:1260,height:220}}]};var io={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1420},qr:{x:120,y:120,size:1e3,padding:70,plate:"background"},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:40,y:40,width:1160,height:1160,fill:"background"},{type:"rect",x:0,y:0,width:1240,height:1420,fill:"frame",hole:{x:40,y:40,width:1160,height:1160}}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:1200,width:1e3,height:220}}],bleed:"frame"};var Ta={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1420},qr:{x:120,y:300,size:1e3,padding:70,plate:"background"},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:40,y:220,width:1160,height:1160,fill:"background"},{type:"rect",x:0,y:0,width:1240,height:1420,fill:"frame",hole:{x:40,y:220,width:1160,height:1160}}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:0,width:1e3,height:220}}],bleed:"frame"};var Na={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1600},qr:{x:120,y:300,size:1e3,padding:70,plate:"background"},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:40,y:220,width:1160,height:1160,fill:"background"},{type:"rect",x:0,y:0,width:1240,height:1600,fill:"frame",hole:{x:40,y:220,width:1160,height:1160}}],labels:[{type:"text",id:"top",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:0,width:1e3,height:220}},{type:"text",id:"bottom",slot:"secondary",text:"",color:"text",box:{x:120,y:1380,width:1e3,height:220}}],bleed:"frame"};var Oa={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1340},qr:{x:120,y:120,size:1e3,padding:40,plate:"background"},colors:{frame:"#000000"},shapes:[{type:"rect",x:40,y:40,width:1160,height:1260,fill:"background"},{type:"rect",x:0,y:0,width:1240,height:1340,fill:"frame",hole:{x:40,y:40,width:1160,height:1260}}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:1120,width:1e3,height:180},collapse:{y:1200,height:100}}],bleed:"frame"};var Da={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1530},qr:{x:120,y:120,size:1e3,padding:80,radius:80},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:0,y:0,width:1240,height:1400,radius:120,fill:"frame"},{type:"path",d:"M161.2 1380L62 1530Q198.4 1458.5 396.8 1380Z",fill:"frame"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:1200,width:1e3,height:200},collapse:{y:1220,height:160}}]};var Ba={kind:"qrdx.frame",version:1,artboard:{width:1978.214,height:1978.214},qr:{x:489.107,y:489.107,size:1e3,padding:50,plate:"background"},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"circle",cx:989.107,cy:989.107,r:779.107,fill:"background"},{type:"circle",cx:989.107,cy:989.107,r:989.107,hole:779.107,fill:"frame"},{type:"circle",cx:105,cy:989.107,r:14.7,fill:"text"},{type:"circle",cx:1873.214,cy:989.107,r:14.7,fill:"text"}],labels:[{type:"curved",id:"top",slot:"primary",text:"Scan me",color:"text",curve:{cx:989.107,cy:989.107,radius:884.107,side:"top",spread:140},fontSize:105},{type:"curved",id:"bottom",slot:"secondary",text:"",color:"text",curve:{cx:989.107,cy:989.107,radius:884.107,side:"bottom",spread:140},fontSize:105}]};var Qa={kind:"qrdx.frame",version:1,artboard:{width:1320,height:1558},qr:{x:160,y:130,size:1e3,padding:60},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:0,y:370,width:1320,height:1188,fill:{mix:["frame","#FFFFFF"],amount:.45}},{type:"polygon",points:[[0,370],[660,0],[1320,370]],fill:{mix:["frame","#FFFFFF"],amount:.25}},{type:"rect",x:80,y:50,width:1160,height:1268,fill:"background"},{type:"rect",x:68,y:38,width:1184,height:1280,fill:"frame",hole:{x:80,y:50,width:1160,height:1268}},{type:"polygon",points:[[0,1178],[660,1318],[1320,1178],[1320,1558],[0,1558]],fill:"frame"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:160,y:1318,width:1e3,height:220}}]};var Ga={kind:"qrdx.frame",version:1,artboard:{width:1230,height:1430},qr:{x:115,y:115,size:1e3,padding:70,plate:"background"},colors:{frame:"#000000"},shapes:[{type:"rect",x:0,y:0,width:1230,height:1430,fill:"background"},{type:"polygon",points:[[0,0],[200,0],[200,35],[35,35],[35,200],[0,200]],fill:"frame"},{type:"polygon",points:[[1230,0],[1030,0],[1030,35],[1195,35],[1195,200],[1230,200]],fill:"frame"},{type:"polygon",points:[[1230,1230],[1030,1230],[1030,1195],[1195,1195],[1195,1030],[1230,1030]],fill:"frame"},{type:"polygon",points:[[0,1230],[200,1230],[200,1195],[35,1195],[35,1030],[0,1030]],fill:"frame"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:80,y:1210,width:1070,height:200},collapse:{y:1230,height:200}}]};var zn={kind:"qrdx.frame",version:1,artboard:{width:1260,height:1360},qr:{x:130,y:130,size:1e3,padding:40,plate:"background"},colors:{frame:"#7c3aed",text:{mix:["frame","accent"],amount:.5},accent:"#db2777"},shapes:[{type:"rect",x:50,y:50,width:1160,height:1260,radius:50,fill:"background"},{type:"rect",x:0,y:0,width:1260,height:1360,radius:100,fill:{gradient:{from:"frame",to:"accent",direction:"horizontal",steps:48}},hole:{x:50,y:50,width:1160,height:1260,radius:50}}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:130,y:1130,width:1e3,height:180},collapse:{y:1210,height:100}}]};var Ua={kind:"qrdx.frame",version:1,artboard:{width:1260,height:1460},qr:{x:130,y:260,size:1e3,padding:46,plate:"background"},colors:{frame:"#000000"},shapes:[{type:"rect",x:0,y:0,width:1260,height:1460,radius:30,fill:"background"},{type:"rect",x:0,y:0,width:1260,height:1460,radius:30,fill:"frame",hole:{x:22,y:22,width:1216,height:1416,radius:8}},{type:"rect",x:45,y:45,width:1170,height:1370,fill:"frame",hole:{x:53,y:53,width:1154,height:1354}},{type:"rect",x:378,y:181,width:504,height:8,fill:"frame"},{type:"polygon",points:[[630,163],[652,185],[630,207],[608,185]],fill:"frame"}],labels:[{type:"text",id:"title",slot:"primary",text:"Scan me",color:"text",box:{x:130,y:30,width:1e3,height:170},collapse:{y:84,height:130}},{type:"text",id:"footer",slot:"secondary",text:"",color:"text",box:{x:130,y:1270,width:1e3,height:160},collapse:{y:1306,height:70}}]};var za={kind:"qrdx.frame",version:1,artboard:{width:1260,height:1610},qr:{x:130,y:250,size:1e3,padding:75,radius:55},colors:{frame:"#000000"},shapes:[{type:"rect",x:0,y:0,width:1260,height:1610,radius:170,fill:"frame"},{type:"rect",x:50,y:170,width:1160,height:1290,radius:60,fill:"background"},{type:"rect",x:520,y:67,width:220,height:36,radius:18,fill:"background"},{type:"rect",x:480,y:1520,width:300,height:30,radius:15,fill:"background"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:130,y:1290,width:1e3,height:170},collapse:{y:1330,height:130}}]};var qa={kind:"qrdx.frame",version:1,artboard:{width:1325,height:1555},qr:{x:150,y:150,size:1e3,padding:80},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:25,y:25,width:1300,height:1530,radius:15,fill:{mix:["frame","#FFFFFF"],amount:.72}},{type:"rect",x:0,y:0,width:1300,height:1530,radius:15,fill:"frame"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:150,y:1260,width:1e3,height:240}}]};var Ha={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1340},qr:{x:120,y:120,size:1e3,padding:40,plate:"background"},colors:{frame:"#000000"},shapes:[{type:"rect",x:40,y:40,width:1160,height:1260,radius:60,fill:"background"},{type:"rect",x:0,y:0,width:1240,height:1340,radius:100,fill:"frame",hole:{x:40,y:40,width:1160,height:1260,radius:60}}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:1120,width:1e3,height:180},collapse:{y:1200,height:100}}]};var Wa={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1565},qr:{x:120,y:120,size:1e3,padding:70,radius:20,plate:"background"},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:40,y:40,width:1160,height:1160,radius:30,fill:"background"},{type:"rect",x:0,y:0,width:1240,height:1240,radius:70,fill:"frame",hole:{x:40,y:40,width:1160,height:1160,radius:30}},{type:"polygon",points:[[540,1385],[620,1265],[700,1385]],fill:"frame"},{type:"rect",x:0,y:1345,width:1240,height:220,radius:110,fill:"frame"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:1345,width:1e3,height:220}}]};var Va={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1565},qr:{x:120,y:445,size:1e3,padding:70,radius:20,plate:"background"},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:0,y:0,width:1240,height:220,radius:110,fill:"frame"},{type:"polygon",points:[[540,180],[700,180],[620,300]],fill:"frame"},{type:"rect",x:40,y:365,width:1160,height:1160,radius:30,fill:"background"},{type:"rect",x:0,y:325,width:1240,height:1240,radius:70,fill:"frame",hole:{x:40,y:365,width:1160,height:1160,radius:30}}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:0,width:1e3,height:220}}]};var ja={kind:"qrdx.frame",version:1,artboard:{width:1420,height:1590},qr:{x:195,y:195,size:1e3,padding:80},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:30,y:30,width:1390,height:1560,radius:155,fill:{mix:["frame","#FFFFFF"],amount:.7}},{type:"rect",x:0,y:0,width:1390,height:1560,radius:155,fill:"#FFFFFF"},{type:"rect",x:25,y:25,width:1340,height:1510,radius:130,fill:"frame"},{type:"rect",x:95,y:95,width:1200,height:1200,radius:40,fill:"background"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:175,y:1295,width:1040,height:240},collapse:{y:1365,height:170}}]};var Za={kind:"qrdx.frame",version:1,artboard:{width:1280,height:1620},qr:{x:140,y:320,size:1e3,padding:80,radius:20},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"path",d:"M140 0H1140L1280 140V1580A40 40 0 0 1 1240 1620H40A40 40 0 0 1 0 1580V140ZM600 115.2A40 40 0 1 1 680 115.2A40 40 0 1 1 600 115.2Z",fill:"frame",fillRule:"evenodd"},{type:"path",d:"M572 115.2A68 68 0 1 1 708 115.2A68 68 0 1 1 572 115.2ZM600 115.2A40 40 0 1 1 680 115.2A40 40 0 1 1 600 115.2Z",fill:{mix:["frame","#FFFFFF"],amount:.35},fillRule:"evenodd"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:140,y:1400,width:1e3,height:220},collapse:{y:1420,height:160}}]};var Xa={kind:"qrdx.frame",version:1,artboard:{width:1260,height:1490},qr:{x:130,y:130,size:1e3,padding:80,radius:20},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"path",d:"M40 0H1220A40 40 0 0 1 1260 40V1215A55 55 0 0 0 1260 1325V1450A40 40 0 0 1 1220 1490H40A40 40 0 0 1 0 1450V1325A55 55 0 0 0 0 1215V40A40 40 0 0 1 40 0Z",fill:"frame"},{type:"line",x1:77,y1:1270,x2:1147,y2:1270,width:12,dash:[30,22],fill:"background"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:130,y:1270,width:1e3,height:220}}]};var rt=(t,e,n,i,r)=>({style:t,name:e,tags:r,labelOn:i,spec:n}),Ya=[rt("banner-bottom","Banner",io,"frame",["bottom","band"]),rt("banner-top","Top banner",Ta,"frame",["top","band"]),rt("banner-top-bottom","Two banners",Na,"frame",["top","bottom","band"]),rt("border","Border",Oa,"background",["square","outline"]),rt("rounded-border","Rounded",Ha,"background",["border","outline"]),rt("gradient-border","Gradient",zn,"background",["border","colorful"]),rt("focus","Focus",Ga,"background",["corners","brackets"]),rt("speech-bubble","Bubble",Wa,"frame",["speech"]),rt("speech-bubble-top","Bubble top",Va,"frame",["speech"]),rt("chat-bubble","Chat",Da,"frame",["message","bubble"]),rt("circle","Circle",Ba,"frame",["round","ring","curved"]),rt("badge","Ribbon",ka,"frame",["badge","banner"]),rt("sticker","Sticker",ja,"frame",["label"]),rt("polaroid","Polaroid",qa,"frame",["photo","picture"]),rt("phone","Phone",za,"background",["mobile","screen"]),rt("ticket","Ticket",Xa,"frame",["event","pass"]),rt("tag","Tag",Za,"frame",["price","label"]),rt("envelope","Envelope",Qa,"frame",["mail","letter"]),rt("menu-card","Menu card",Ua,"background",["menu","restaurant"])],qu=new Map(Ya.map(t=>[t.style,t]));function Hu(t){return qu.get(t)}Object.fromEntries(Ya.map(t=>[t.style,t.spec]));({from:zn.colors.frame,to:zn.colors.accent});var Wu={primary:"text",secondary:"secondaryText"};function Ka(t,e,n){let i=Hu(e.style)?.spec??io;return an(t,on(i),e,n,Wu)}var ao="system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif";var Vu="data-qrdx-frame-label";function Ut(t){return !!(t?.style&&t.style!=="none")}function Fe(t,e,n){return e.style===Si?Ia(t,e,n):Ka(t,e,n)}function sn(t,e){if(!Ut(e))return {width:t,height:t};let{width:n,height:i}=Fe(t,e);return {width:n,height:i}}var W=t=>U(t,2);function Ja({x:t,y:e,width:n,height:i,radius:r}){let o=W(Math.min(r,n/2,i/2)),[a,l,s,c]=[W(t),W(e),W(n),W(i)];return o<=0?E`M${a} ${l}h${s}v${c}h${-s}z`:E`M${a+o} ${l}h${W(s-2*o)}a${o} ${o} 0 0 1 ${o} ${o}`+E`v${W(c-2*o)}a${o} ${o} 0 0 1 ${-o} ${o}`+E`h${W(-(s-2*o))}a${o} ${o} 0 0 1 ${-o} ${-o}`+E`v${W(-(c-2*o))}a${o} ${o} 0 0 1 ${o} ${-o}z`}function qn(t){return t.stroke&&t.strokeWidth?{stroke:t.stroke,strokeWidth:W(t.strokeWidth)}:{}}function ts(t,e){return t.type==="rect"&&t.hole?P("path",{d:Ja(t)+Ja(t.hole),fill:t.fill,fillRule:"evenodd",...qn(t)},e):t.type==="polygon"?P("polygon",{fill:t.fill,points:t.points.map(([n,i])=>`${W(n)},${W(i)}`).join(" "),...qn(t)},e):t.type==="path"?P("path",{d:t.d,fill:t.fill,...t.fillRule==="evenodd"&&{fillRule:"evenodd"},...qn(t)},e):Or("rect",{...qn(t),fill:t.fill,height:W(t.height),key:e,width:W(t.width),x:W(t.x),y:W(t.y),...t.radius>0&&{rx:W(t.radius),ry:W(t.radius)}})}function es(t){return t.shapes.map((e,n)=>ts(e,n))}function ns(t,e){let{size:n,frame:i,bgColor:r,svgProps:o,markLabels:a}=e,l=Fe(n,i,r),s=ju(l),c=W(l.width),m=W(l.height);return ct("svg",{height:m,viewBox:`0 0 ${c} ${m}`,width:c,xmlns:"http://www.w3.org/2000/svg",...o,children:[P("g",{"data-qrdx-frame":i.style,children:l.shapes.map((u,f)=>ts(u,f))}),Se(t,{x:W(l.qrX),y:W(l.qrY),width:n,height:n}),s.map((u,f)=>P("text",{"data-max-width":W(u.maxWidth),fill:u.color,fontFamily:ao,fontSize:W(u.fontSize),fontWeight:u.fontWeight??700,textAnchor:u.align??"middle",x:W(u.x),y:W(u.y),...u.rotate&&{transform:`rotate(${W(u.rotate)} ${W(u.x)} ${W(u.y)})`},...a&&u.field&&{[Vu]:u.field},children:u.text},f))]})}function ju(t){return [...t.label?[t.label]:[],...t.extraLabels??[]]}var Zu={2:6,3:12};function rs(t){let e=[t.start],n=t.start;for(let i of t.segments){let r=i.at(-1);if(i.length===1)e.push(r);else {let o=Zu[i.length];for(let a=1;a<=o;a++){let l=a/o,s=1-l;if(i.length===2){let[c]=i;e.push([s*s*n[0]+2*s*l*c[0]+l*l*r[0],s*s*n[1]+2*s*l*c[1]+l*l*r[1]]);}else {let[c,m]=i;e.push([s*s*s*n[0]+3*s*s*l*c[0]+3*s*l*l*m[0]+l*l*l*r[0],s*s*s*n[1]+3*s*s*l*c[1]+3*s*l*l*m[1]+l*l*l*r[1]]);}}}n=r;}return e}function is(t,e){let n=[];for(let i of t)for(let r=0;r<i.length;r++){let[o,a]=i[r],[l,s]=i[(r+1)%i.length];a<=e!=s<=e&&n.push(o+(e-a)/(s-a)*(l-o));}return n.sort((i,r)=>i-r)}function as(t,e){let n=0;for(let i of t)if(i<e)n++;else break;return n%2===1}function Xu(t,e,n){return as(is(t,n),e)}function ss(t){let e=new Map;return (n,i)=>{let r=e.get(i);return r||(r=is(t,i),e.set(i,r)),as(r,n)}}function Yu(t,e,n,i){let r=n[0]-t,o=n[1]-e,a=i[0]-n[0],l=i[1]-n[1],s=m=>Math.max(Math.abs(r+m*a),Math.abs(o+m*l)),c=Math.min(s(0),s(1));for(let[m,u]of [[o-r,a-l],[-(r+o),a+l]])if(u!==0){let f=m/u;f>0&&f<1&&(c=Math.min(c,s(f)));}return c}function Ku(t,e,n){if(!Xu(t,e,n))return 0;let i=Number.POSITIVE_INFINITY;for(let r of t)for(let o=0;o<r.length;o++)i=Math.min(i,Yu(e,n,r[o],r[(o+1)%r.length]));return Number.isFinite(i)?i:0}function Ju(t){let e=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(let o of t)for(let[a,l]of o)e=Math.min(e,a),n=Math.min(n,l),i=Math.max(i,a),r=Math.max(r,l);return {x0:e,y0:n,x1:i,y1:r}}function ls(t){let e=t.map(rs),n=Ju(e),i=n.x1-n.x0,r=n.y1-n.y0;if(!(i>0&&r>0))return null;let o=(g,d)=>{let h=Math.max(g-n.x0,n.x1-g,d-n.y0,n.y1-d);return h>0?Ku(e,g,d)/(2*h):0},a={cx:n.x0+i/2,cy:n.y0+r/2,value:0};a.value=o(a.cx,a.cy);let l=32;for(let g=1;g<l;g++)for(let d=1;d<l;d++){let h=n.x0+i*d/l,_=n.y0+r*g/l,y=o(h,_);y>a.value&&(a={cx:h,cy:_,value:y});}let s=i/l,c=r/l;for(let g=0;g<6;g++){let d=a;for(let h=-2;h<=2;h++)for(let _=-2;_<=2;_++){let y=d.cx+s*_/2,$=d.cy+c*h/2,C=o(y,$);C>a.value&&(a={cx:y,cy:$,value:C});}s/=2,c/=2;}if(a.value<=0)return null;let u=.5/Math.max(a.cx-n.x0,n.x1-a.cx,a.cy-n.y0,n.y1-a.cy),f=([g,d])=>[.5+(g-a.cx)*u,.5+(d-a.cy)*u],p=t.map(g=>({start:f(g.start),segments:g.segments.map(d=>d.map(f))}));return {rings:p,polygons:p.map(rs),half:a.value}}function cs(t,e){let n=([r,o])=>`${b(r*e)} ${b(o*e)}`,i="";for(let r of t.rings){i+=`M${n(r.start)}`;for(let o of r.segments){let a=o.length===1?"L":o.length===2?"Q":"C";i+=a+o.map(n).join(" ");}i+="Z";}return i}var t1={start:[0,-0.58],segments:[[[.2,-0.92],[1,-0.97],[1,-0.3]],[[1,.3],[.62,.6],[0,.92]],[[-0.62,.6],[-1,.3],[-1,-0.3]],[[-1,-0.97],[-0.2,-0.92],[0,-0.58]]]},os;function us(){return os??=ls([t1]),os}function e1(t){let{width:e,height:n,cells:i}=t;return Number.isInteger(e)&&Number.isInteger(n)&&e>=Sr&&n>=Sr&&e<=xr&&n<=xr&&typeof i=="string"&&i.length===e*n&&/^[01]*$/.test(i)?(r,o)=>r>=0&&o>=0&&r<e&&o<n&&i[o*e+r]==="1":null}var Ft=([t,e])=>`${t},${e}`;function n1(t,e,n){let i=(s,c)=>t(s-1,c-1),r=new Map,o=(s,c)=>{for(let[m,u]of [[s,c],[c,s]]){let f=r.get(Ft(m))??[];f.push(u),r.set(Ft(m),f);}};for(let s=0;s<=n;s++)for(let c=0;c<=e;c++){let m=i(c,s),u=i(c+1,s),f=i(c+1,s+1),p=i(c,s+1),g=[c,s-.5],d=[c+.5,s],h=[c,s+.5],_=[c-.5,s];switch((m?8:0)+(u?4:0)+(f?2:0)+(p?1:0)){case 1:case 14:o(_,h);break;case 2:case 13:o(h,d);break;case 3:case 12:o(_,d);break;case 4:case 11:o(g,d);break;case 6:case 9:o(g,h);break;case 7:case 8:o(_,g);break;case 5:o(g,d),o(_,h);break;case 10:o(_,g),o(h,d);break;}}let a=[],l=new Set;for(let[s,c]of r){if(l.has(s)||c.length===0)continue;let[m,u]=s.split(",").map(Number),f=[[m,u]];l.add(s);let p=[m,u],g=c[0];for(;!l.has(Ft(g));){l.add(Ft(g)),f.push(g);let d=r1(r.get(Ft(g))??[],p,l);if(!d)break;p=g,g=d;}f.length>=3&&a.push(o1(f));}return a}function r1(t,e,n){let i=Ft(e);return t.find(r=>Ft(r)!==i&&!n.has(Ft(r)))??t.find(r=>Ft(r)!==i)}function o1(t){let e=[];for(let n=0;n<t.length;n++){let i=t[(n-1+t.length)%t.length],r=t[n],o=t[(n+1)%t.length],a=(r[0]-i[0])*(o[1]-r[1])-(r[1]-i[1])*(o[0]-r[0]);Math.abs(a)>1e-9&&e.push(r);}return e.length>=3?e:t}function i1(t){let e=(o,a)=>[(o[0]+a[0])/2,(o[1]+a[1])/2],n=t.length,i=e(t[n-1],t[0]),r=t.map((o,a)=>[o,e(o,t[(a+1)%n])]);return {start:i,segments:r}}var ln=new Map;function ms(t){let e=`${t.width}x${t.height}:${t.cells}`,n=ln.get(e);if(n)return n;let i=e1(t),r;if(!i)r={outline:null,problem:"invalid"};else if(t.cells.includes("1")){let o=n1(i,t.width,t.height),a=o.length>0?ls(o.map(i1)):null;r=a&&2*a.half>=ui?{outline:a,problem:null}:{outline:null,problem:a?"thin":"empty"};}else r={outline:null,problem:"empty"};return ln.size>16&&ln.delete(ln.keys().next().value),ln.set(e,r),r}var a1=1,ds=.5,fs=.5,s1=.5;function Hn(t){return Math.max(t,ci)}function so(t){return t==="heart"?us():typeof t=="object"&&t?.type==="silhouette"?ms(t).outline:null}function Lt(t,e,n){if(n==="circle"){let a=Hn(e),l=(t/2+a)*Math.SQRT2+a1;return Math.ceil(l-t/2)}let i=so(n);if(!i)return e;let r=Hn(e),o=(t+2*(r+s1))/(2*i.half);return Math.ceil((o-t)/2-1e-9)}function hs(t){let e=t>>>0;return ()=>{e=e+1831565813>>>0;let n=e;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}}function l1(t,e,n){let i=Lt(e,n,"circle"),r=Hn(n),o=e+2*i,a=o/2,l=a-ds-.5,s=hs(Number.parseInt(te(t),36)||1),c=i-r,m=i+e+r;return Array.from({length:o},(u,f)=>Array.from({length:o},(p,g)=>{let d=s()<fs;return g>=c&&g<m&&f>=c&&f<m?false:d&&Math.hypot(g+.5-a,f+.5-a)<=l}))}var c1=Array.from({length:8},(t,e)=>{let n=e*Math.PI/4;return [Math.cos(n),Math.sin(n)]});function ps(t,e,n,i){if(i==="circle")return l1(t,e,n);let r=so(i);if(!r)return null;let o=Lt(e,n,i),a=Hn(n),l=e+2*o,s=ss(r.polygons),c=.5+ds,m=(g,d)=>{let h=g+.5,_=d+.5;return s(h/l,_/l)?c1.every(([y,$])=>s((h+y*c)/l,(_+$*c)/l)):false},u=hs(Number.parseInt(te(t),36)||1),f=o-a,p=o+e+a;return Array.from({length:l},(g,d)=>Array.from({length:l},(h,_)=>{let y=u()<fs;return _>=f&&_<p&&d>=f&&d<p?false:y&&m(_,d)}))}function gs(t,e){if(t==="circle")return {circle:e/2};let n=so(t);return n?{path:cs(n,e)}:null}function u1(t){return t==="top-left"?0:t==="top-right"?1:3}function Wn(t,e,n,i="circle",r="top-left"){let o=n*2,a=n,l=o/3;switch(i){case "leaf":case "leaf-reverse":case "drop":case "drop-reverse":{let s=u1(r),c=(s+2)%4,m=1.3*l,u=.7*l,f=g=>{switch(i){case "leaf":return g===s||g===c;case "leaf-reverse":return !(g===s||g===c);case "drop":return g===s;default:return g===c}},p=[0,1,2,3].map(g=>f(g)?u:m);return P("path",{d:k(t-n,e-n,o,o,p)})}case "extra-rounded":return P("path",{d:k(t-n,e-n,o,o,1.15*l)});case "plus":{let s=1.15*l,c=n;return P("path",{d:z([[t-s,e-c],[t+s,e-c],[t+s,e-s],[t+c,e-s],[t+c,e+s],[t+s,e+s],[t+s,e+c],[t-s,e+c],[t-s,e+s],[t-c,e+s],[t-c,e-s],[t-s,e-s]])})}case "cross-rounded":{let s=1.15*l,c=.5*l;return P("path",{d:k(t-n,e-s,o,2*s,c)+k(t-s,e-n,2*s,o,c)})}case "hexagon":return P("path",{d:z(Me(t,e,1.72*l,6))});case "octagon":return P("path",{d:z(Me(t,e,n/Math.cos(Math.PI/8),8,22.5))});case "flower":{let s=.6*l,c=.9*l;return P("path",{d:q(t-s,e-s,c)+q(t+s,e-s,c)+q(t+s,e+s,c)+q(t-s,e+s,c)+q(t,e,1.2*l)})}case "heart":return P("path",{d:Re(t,e+.12*l,3.5*l)});case "squircle":return P("path",{d:z(Ke(t,e,n,n,4,64))});case "dots":{let s=[];for(let c of [-1,0,1])for(let m of [-1,0,1])s.push(q(t+m*l*.82,e+c*l*.82,.58*l));return P("path",{d:s.join("")})}case "square":return P("rect",{height:b(o),transform:E`rotate(0,${t},${e})`,width:b(o),x:b(t-a),y:b(e-a)});case "rounded":return P("rect",{height:b(o),rx:b(n*.5),ry:b(n*.5),transform:E`rotate(0,${t},${e})`,width:b(o),x:b(t-a),y:b(e-a)});case "diamond":return P("path",{d:E`M ${t-a*.714286} ${e-a*.714286}v ${o*.714286}h ${o*.714286}v -${o*.714286}z`,transform:E`rotate(45,${t},${e})`});case "message":{let s=o/30,c=f=>(f-40)*s+t,m=f=>(f-40)*s+e,u=E`M ${c(25)} ${m(35.714285714285715)}v ${8.571428571428571*s}a ${10.714285714285714*s} ${10.714285714285714*s}, 0, 0, 0, ${10.714285714285714*s} ${10.714285714285714*s}h ${19.285714285714285*s}v -${19.285714285714285*s}a ${10.714285714285714*s} ${10.714285714285714*s}, 0, 0, 0, -${10.714285714285714*s} -${10.714285714285714*s}h -${8.571428571428571*s}a ${10.714285714285714*s} ${10.714285714285714*s}, 0, 0, 0, -${10.714285714285714*s} ${10.714285714285714*s}`;return P("path",{clipRule:"evenodd",d:u,transform:E`rotate(0,${t},${e})`})}case "message-reverse":{let s=o/30,c=f=>(f-40)*s+t,m=f=>(f-40)*s+e,u=E`M ${c(25)} ${m(35.714285714285715)}v ${8.571428571428571*s}a ${10.714285714285714*s} ${10.714285714285714*s}, 0, 0, 0, ${10.714285714285714*s} ${10.714285714285714*s}h ${19.285714285714285*s}v -${19.285714285714285*s}a ${10.714285714285714*s} ${10.714285714285714*s}, 0, 0, 0, -${10.714285714285714*s} -${10.714285714285714*s}h -${8.571428571428571*s}a ${10.714285714285714*s} ${10.714285714285714*s}, 0, 0, 0, -${10.714285714285714*s} ${10.714285714285714*s}`;return P("path",{clipRule:"evenodd",d:u,transform:E`rotate(-180,${t},${e})`})}case "diya":{let s=o/30,c=f=>(f-40)*s+t,m=f=>(f-40)*s+e,u=E`M ${c(25)} ${m(35.714285714285715)}v ${8.571428571428571*s}a ${10.714285714285714*s} ${10.714285714285714*s}, 0, 0, 0, ${10.714285714285714*s} ${10.714285714285714*s}h ${19.285714285714285*s}v -${19.285714285714285*s}a ${10.714285714285714*s} ${10.714285714285714*s}, 0, 0, 0, -${10.714285714285714*s} -${10.714285714285714*s}h -${8.571428571428571*s}H ${c(25)}z`;return P("path",{clipRule:"evenodd",d:u,transform:E`rotate(0,${t},${e})`})}case "diya-reverse":{let s=o/30,c=f=>(f-40)*s+t,m=f=>(f-40)*s+e,u=E`M ${c(25)} ${m(35.714285714285715)}v ${19.285714285714285*s}h ${19.285714285714285*s}a ${10.714285714285714*s} ${10.714285714285714*s}, 0, 0, 0, ${10.714285714285714*s} -${10.714285714285714*s}v -${19.285714285714285*s}h -${19.285714285714285*s}a ${10.714285714285714*s} ${10.714285714285714*s}, 0, 0, 0, -${10.714285714285714*s} ${10.714285714285714*s}z`;return P("path",{clipRule:"evenodd",d:u,transform:E`rotate(0,${t},${e})`})}case "rounded-triangle":{let s=o/21,c=f=>(f-40)*s+t,m=f=>(f-40)*s+e,u=E`M ${c(33.57142857142857)} ${m(29.285714285714285)}h ${12.857142857142856*s}c ${4.285714285714286*s} 0 ${4.285714285714286*s} ${4.285714285714286*s} ${4.285714285714286*s} ${4.285714285714286*s}v ${12.857142857142856*s}c 0 ${4.285714285714286*s} -${4.285714285714286*s} ${4.285714285714286*s} -${4.285714285714286*s} ${4.285714285714286*s}h -${12.857142857142856*s}c -${4.285714285714286*s} 0 -${4.285714285714286*s} -${4.285714285714286*s} -${4.285714285714286*s} -${4.285714285714286*s}v -${12.857142857142856*s}c 0 -${4.285714285714286*s} ${4.285714285714286*s} -${4.285714285714286*s} ${4.285714285714286*s} -${4.285714285714286*s}z`;return P("path",{d:u,transform:E`rotate(45,${t},${e})`})}case "star":{let s=o/27,c=f=>(f-40)*s+t,m=f=>(f-40)*s+e,u=E`M ${c(38.84615384615385)},${m(26.546153846153846)}c${.6692307692307691*s},-${1.0153846153846153*s},${2.215384615384615*s},-${1.0153846153846153*s},${2.884615384615384*s},0l${4.038461538461538*s},${6.069230769230768*s}c${.23076923076923075*s},${.3461538461538461*s},${.6*s},${.6*s},${1.0153846153846153*s},${.7153846153846153*s}l${7.223076923076922*s},${1.823076923076923*s}c${1.2*s},${.3*s},${1.6846153846153844*s},${1.7076923076923076*s},${.8999999999999999*s},${2.6538461538461533*s}l-${4.73076923076923*s},${5.584615384615384*s}c-${.2769230769230769*s},${.3230769230769231*s},-${.41538461538461535*s},${.7384615384615384*s},-${.3923076923076923*s},${1.1307692307692307*s}l${.4384615384615384*s},${7.199999999999999*s}c${.06923076923076922*s},${1.2*s},-${1.1769230769230767*s},${2.0769230769230766*s},-${2.3307692307692305*s},${1.6384615384615382*s}l-${6.9692307692307685*s},-${2.6076923076923073*s}c-${.3923076923076923*s},-${.16153846153846155*s},-${.8538461538461538*s},-${.16153846153846155*s},-${1.2461538461538462*s},0l-${6.9692307692307685*s},${2.6076923076923073*s}c-${1.1538461538461537*s},${.4384615384615384*s},-${2.4*s},-${.4384615384615384*s},-${2.3307692307692305*s},-${1.6384615384615382*s}l${.4384615384615384*s},-${7.199999999999999*s}c${.023076923076923075*s},-${.41538461538461535*s},-${.11538461538461538*s},-${.8307692307692307*s},-${.3923076923076923*s},-${1.1307692307692307*s}l-${4.73076923076923*s},-${5.584615384615384*s}c-${.7846153846153846*s},-${.923076923076923*s},-${.3230769230769231*s},-${2.3307692307692305*s},${.8999999999999999*s},-${2.6538461538461533*s}l${7.223076923076922*s},-${1.823076923076923*s}c${.41538461538461535*s},-${.11538461538461538*s},${.7846153846153846*s},-${.3461538461538461*s},${1.0153846153846153*s},-${.7153846153846153*s}l${4.038461538461538*s},-${6.069230769230768*s}z`;return P("path",{clipRule:"evenodd",d:u,transform:E`rotate(0,${t},${e})`})}case "banner":{let s=o/28;return P("g",{transform:E`translate(${t-40*s},${e-40*s}) scale(${b(s,6)})`,children:P("path",{clipRule:"evenodd",d:"M38.235 26.104C38.759 25.677, 39.51 25.677, 40.034 26.104L41.776 27.52C42.091 27.777, 42.501 27.887, 42.902 27.822L45.118 27.466C45.785 27.359, 46.436 27.735, 46.677 28.366L47.477 30.464C47.621 30.843, 47.921 31.143, 48.301 31.288L50.399 32.088C51.03 32.328, 51.406 32.979, 51.298 33.646L50.942 35.863C50.878 36.264, 50.988 36.674, 51.244 36.989L52.661 38.73C53.087 39.254, 53.087 40.006, 52.661 40.53L51.244 42.271C50.988 42.587, 50.878 42.996, 50.942 43.397L51.298 45.614C51.406 46.281, 51.03 46.932, 50.399 47.173L48.301 47.972C47.921 48.117, 47.621 48.417, 47.477 48.797L46.677 50.894C46.436 51.526, 45.785 51.901, 45.118 51.794L42.902 51.438C42.501 51.374, 42.091 51.483, 41.776 51.74L40.034 53.157C39.51 53.583, 38.759 53.583, 38.235 53.157L36.493 51.74C36.178 51.483, 35.768 51.374, 35.367 51.438L33.15 51.794C32.483 51.901, 31.833 51.526, 31.592 50.894L30.792 48.797C30.647 48.417, 30.347 48.117, 29.968 47.972L27.87 47.173C27.239 46.932, 26.863 46.281, 26.97 45.614L27.326 43.397C27.391 42.996, 27.281 42.587, 27.025 42.271L25.608 40.53C25.182 40.006, 25.182 39.254, 25.608 38.73L27.025 36.989C27.281 36.674, 27.391 36.264, 27.326 35.863L26.97 33.646C26.863 32.979, 27.239 32.328, 27.87 32.088L29.968 31.288C30.347 31.143, 30.647 30.843, 30.792 30.464L31.592 28.366C31.833 27.735, 32.483 27.359, 33.15 27.466L35.367 27.822C35.768 27.887, 36.178 27.777, 36.493 27.52L38.235 26.104Z"})})}default:return P("circle",{cx:b(t),cy:b(e),r:b(n),transform:E`rotate(0,${t},${e})`})}}function Le(t,e,n,i){let r=t==="top-left"?0:t==="top-right"?1:3,o=(r+2)%4;return [0,1,2,3].map(a=>a===r||i&&a===o?n:e)}function _s(t,e,n,i){return [[t+i,e],[t+n-i,e],[t+n,e+i],[t+n,e+n-i],[t+n-i,e+n],[t+i,e+n],[t,e+n-i],[t,e+i]]}function bs(t,e,n,i){let r=n/7,o=Math.max(0,(i+Math.SQRT2-2)*r);return z(_s(t,e,n,i*r))+z(_s(t+r,e+r,5*r,o))}function ys(t,e,n,i,r=false){let o=n/7,a=l=>r?Le(i,0,l,true):Le(i,l,0,true);return k(t,e,n,n,a(2.5*o))+k(t+o,e+o,5*o,5*o,a(1.5*o))}function m1(t,e,n,i){let r=n/7;return k(t,e,n,n,Le(i,2.6*r,0,false))+k(t+r,e+r,5*r,5*r,Le(i,1.6*r,0,false))}function d1(t,e,n){let i=n/7,r=t+n/2,o=e+n/2;return z(Ke(r,o,3.5*i,3.5*i,4,96))+z(Ke(r,o,2.5*i,2.5*i,4,96))}function $s(t,e,n,i,r){let o=i,a=n/2,l=(a-o)*.55,s=(c,m)=>E`${t+c} ${e+m}`;return E`M${s(o,0)}`+E`C${s(o+l,0)} ${s(a-l,r)} ${s(a,r)}`+E`C${s(a+l,r)} ${s(n-o-l,0)} ${s(n-o,0)}`+E`A${o} ${o} 0 0 1 ${s(n,o)}`+E`C${s(n,o+l)} ${s(n-r,a-l)} ${s(n-r,a)}`+E`C${s(n-r,a+l)} ${s(n,n-o-l)} ${s(n,n-o)}`+E`A${o} ${o} 0 0 1 ${s(n-o,n)}`+E`C${s(n-o-l,n)} ${s(a+l,n-r)} ${s(a,n-r)}`+E`C${s(a-l,n-r)} ${s(o+l,n)} ${s(o,n)}`+E`A${o} ${o} 0 0 1 ${s(0,n-o)}`+E`C${s(0,n-o-l)} ${s(r,a+l)} ${s(r,a)}`+E`C${s(r,a-l)} ${s(0,o+l)} ${s(0,o)}`+E`A${o} ${o} 0 0 1 ${s(o,0)}Z`}function f1(t,e,n){let i=n/7,r=.12*i;return $s(t,e,n,1.4*i,r)+$s(t+i,e+i,5*i,.7*i,r)}function xs(t,e,n,i,r,o){let a=n/2,l=(s,c)=>E`${t+s} ${e+c}`;return E`M${l(i,0)}H${t+n-i}`+E`A${i} ${i} 0 0 1 ${l(n,i)}`+E`V${e+r}`+E`C${l(n,r+1.55*o)} ${l(a+1.6*o,n)} ${l(a,n)}`+E`C${l(a-1.6*o,n)} ${l(0,r+1.55*o)} ${l(0,r)}`+E`V${e+i}A${i} ${i} 0 0 1 ${l(i,0)}Z`}function h1(t,e,n){let i=n/7;return xs(t,e,n,.7*i,3.9*i,i)+xs(t+i,e+i,5*i,.35*i,2.7*i,.8*i)}function p1(t,e,n,i){let r=n/7;return k(t,e,n,n,Le(i,.5*r,2.5*r,false))+k(t+r,e+r,5*r,5*r,Le(i,.25*r,1.5*r,false))}function g1(t,e,n){let i=n/7;return E`M ${t} ${e}v ${n}h ${n}v -${n}z`+E`M ${t+i} ${e+i}h ${5*i}v ${5*i}h -${5*i}z`}function _1(t,e,n){let i=n/7,r=i*.875,o=i*.4375,a=E`M ${t+r} ${e}`+E`h ${n-2*r}`+E`a ${r} ${r} 0 0 1 ${r} ${r}`+E`v ${n-2*r}`+E`a ${r} ${r} 0 0 1 ${-r} ${r}`+E`h ${-(n-2*r)}`+E`a ${r} ${r} 0 0 1 ${-r} ${-r}`+E`v ${-(n-2*r)}`+E`a ${r} ${r} 0 0 1 ${r} ${-r}z`,l=E`M ${t+i+o} ${e+i}`+E`h ${5*i-2*o}`+E`a ${o} ${o} 0 0 1 ${o} ${o}`+E`v ${5*i-2*o}`+E`a ${o} ${o} 0 0 1 ${-o} ${o}`+E`h ${-(5*i-2*o)}`+E`a ${o} ${o} 0 0 1 ${-o} ${-o}`+E`v ${-(5*i-2*o)}`+E`a ${o} ${o} 0 0 1 ${o} ${-o}z`;return a+l}function b1(t,e,n){let i=t+n/2,r=e+n/2,o=U(n/2),a=U(n*(2.5/7));return E`M ${i-o} ${r}`+E`a ${o} ${o} 0 1 0 ${o*2} 0`+E`a ${o} ${o} 0 1 0 ${-o*2} 0z`+E`M ${i-a} ${r}`+E`a ${a} ${a} 0 1 1 ${a*2} 0`+E`a ${a} ${a} 0 1 1 ${-a*2} 0z`}function y1(t,e,n){let i=n/74.7002,r=l=>l*i+t,o=l=>l*i+e;return E`M${r(37.3496)} ${o(0)}C${r(39.2939)} ${o(0)} ${r(40.9948)} ${o(1.03842)} ${r(41.9287)} ${o(2.59082)}C${r(43.2293)} ${o(1.34013)} ${r(45.1347)} ${o(.780267)} ${r(47.0098)} ${o(1.28027)}C${r(48.8871)} ${o(1.78928)} ${r(50.261)} ${o(3.23767)} ${r(50.7578)} ${o(4.98438)}C${r(52.3454)} ${o(4.0996)} ${r(54.3432)} ${o(4.047)} ${r(56.0303)} ${o(5.01953)}C${r(57.7094)} ${o(5.98752)} ${r(58.6586)} ${o(7.73647)} ${r(58.6924)} ${o(9.5459)}C${r(60.4517)} ${o(9.10661)} ${r(62.3883)} ${o(9.57215)} ${r(63.7598)} ${o(10.9502)}C${r(65.1282)} ${o(12.3253)} ${r(65.5963)} ${o(14.2585)} ${r(65.1641)} ${o(16.0127)}C${r(66.974)} ${o(16.044)} ${r(68.7242)} ${o(16.9982)} ${r(69.7002)} ${o(18.6797)}C${r(70.6781)} ${o(20.3647)} ${r(70.6241)} ${o(22.3635)} ${r(69.7402)} ${o(23.9502)}C${r(71.4776)} ${o(24.4496)} ${r(72.9194)} ${o(25.8232)} ${r(73.4199)} ${o(27.7002)}C${r(73.927)} ${o(29.5707)} ${r(73.3661)} ${o(31.4794)} ${r(72.1104)} ${o(32.7822)}C${r(73.6621)} ${o(33.7163)} ${r(74.7002)} ${o(35.4166)} ${r(74.7002)} ${o(37.3604)}C${r(74.7001)} ${o(39.307)} ${r(73.6582)} ${o(41.0084)} ${r(72.1025)} ${o(41.9414)}C${r(73.357)} ${o(43.245)} ${r(73.9207)} ${o(45.1525)} ${r(73.4199)} ${o(47.0303)}C${r(72.9187)} ${o(48.9027)} ${r(71.4782)} ${o(50.2735)} ${r(69.7383)} ${o(50.7734)}C${r(70.6201)} ${o(52.3601)} ${r(70.6716)} ${o(54.3549)} ${r(69.7002)} ${o(56.04)}C${r(68.7237)} ${o(57.7225)} ${r(66.9721)} ${o(58.6729)} ${r(65.1611)} ${o(58.7031)}C${r(65.598)} ${o(60.4623)} ${r(65.131)} ${o(62.3982)} ${r(63.7598)} ${o(63.7695)}C${r(62.3847)} ${o(65.138)} ${r(60.4515)} ${o(65.6061)} ${r(58.6973)} ${o(65.1738)}C${r(58.6635)} ${o(66.9833)} ${r(57.7094)} ${o(68.7322)} ${r(56.0303)} ${o(69.7002)}C${r(54.3461)} ${o(70.6777)} ${r(52.348)} ${o(70.6248)} ${r(50.7617)} ${o(69.7422)}C${r(50.2643)} ${o(71.4831)} ${r(48.8896)} ${o(72.9284)} ${r(47.0098)} ${o(73.4297)}C${r(45.1389)} ${o(73.9368)} ${r(43.2296)} ${o(73.3763)} ${r(41.9268)} ${o(72.1201)}C${r(40.9927)} ${o(73.6717)} ${r(39.2932)} ${o(74.71)} ${r(37.3496)} ${o(74.71)}C${r(35.4051)} ${o(74.7098)} ${r(33.7042)} ${o(73.6711)} ${r(32.7705)} ${o(72.1182)}C${r(31.4697)} ${o(73.3758)} ${r(29.5597)} ${o(73.9418)} ${r(27.6797)} ${o(73.4404)}V${o(73.4502)}C${r(25.8065)} ${o(72.9422)} ${r(24.434)} ${o(71.4985)} ${r(23.9346)} ${o(69.7568)}C${r(22.3504)} ${o(70.6301)} ${r(20.3591)} ${o(70.6781)} ${r(18.6797)} ${o(69.71)}C${r(16.9957)} ${o(68.7391)} ${r(16.045)} ${o(66.9831)} ${r(16.0166)} ${o(65.168)}C${r(14.2547)} ${o(65.6091)} ${r(12.3134)} ${o(65.1435)} ${r(10.9395)} ${o(63.7695)}C${r(9.5687)} ${o(62.3919)} ${r(9.10168)} ${o(60.454)} ${r(9.53809)} ${o(58.6973)}C${r(7.72791)} ${o(58.6641)} ${r(5.97815)} ${o(57.71)} ${r(5.00977)} ${o(56.0303)}C${r(4.03552)} ${o(54.3517)} ${r(4.08377)} ${o(52.3649)} ${r(4.95801)} ${o(50.7812)}C${r(3.21705)} ${o(50.2839)} ${r(1.77087)} ${o(48.9101)} ${r(1.26953)} ${o(47.0303)}V${o(47.0205)}C${r(.762081)} ${o(45.1489)} ${r(1.32758)} ${o(43.2375)} ${r(2.58496)} ${o(41.9346)}C${r(1.03604)} ${o(41)} ${r(108484e-9)} ${o(39.3019)} ${r(0)} ${o(37.3604)}C${r(0)} ${o(35.4159)} ${r(1.03815)} ${o(33.7141)} ${r(2.59082)} ${o(32.7803)}C${r(1.34044)} ${o(31.4797)} ${r(.780389)} ${o(29.575)} ${r(1.28027)} ${o(27.7002)}C${r(1.78258)} ${o(25.8232)} ${r(3.22806)} ${o(24.4482)} ${r(4.97363)} ${o(23.9512)}C${r(4.08938)} ${o(22.3638)} ${r(4.03743)} ${o(20.3664)} ${r(5.00977)} ${o(18.6797)}C${r(5.97815)} ${o(16.9999)} ${r(7.72788)} ${o(16.0496)} ${r(9.53809)} ${o(16.0166)}C${r(9.10139)} ${o(14.2576)} ${r(9.56846)} ${o(12.3214)} ${r(10.9395)} ${o(10.9502)}C${r(12.3171)} ${o(9.57911)} ${r(14.2558)} ${o(9.11137)} ${r(16.0127)} ${o(9.54785)}C${r(16.0426)} ${o(7.73421)} ${r(16.9969)} ${o(5.97989)} ${r(18.6797)} ${o(5.00977)}C${r(20.3596)} ${o(4.03474)} ${r(22.3521)} ${o(4.08468)} ${r(23.9365)} ${o(4.96094)}C${r(24.4378)} ${o(3.22749)} ${r(25.8059)} ${o(1.7898)} ${r(27.6797)} ${o(1.29004)}C${r(29.5511)} ${o(.78264)} ${r(31.4617)} ${o(1.34357)} ${r(32.7646)} ${o(2.60059)}C${r(33.6971)} ${o(1.04268)} ${r(35.4013)} ${o(152405e-9)} ${r(37.3496)} ${o(0)}ZM${r(41.0615)} ${o(9.17578)}C${r(40.1006)} ${o(10.1057)} ${r(38.793)} ${o(10.6797)} ${r(37.3496)} ${o(10.6797)}C${r(35.9064)} ${o(10.6796)} ${r(34.5985)} ${o(10.1066)} ${r(33.6377)} ${o(9.17676)}C${r(32.9511)} ${o(10.3241)} ${r(31.8358)} ${o(11.2176)} ${r(30.4404)} ${o(11.5898)}C${r(29.0527)} ${o(11.9661)} ${r(27.6436)} ${o(11.7542)} ${r(26.4766)} ${o(11.1074)}C${r(26.1072)} ${o(12.3879)} ${r(25.2629)} ${o(13.5333)} ${r(24.0195)} ${o(14.25)}C${r(22.7695)} ${o(14.9754)} ${r(21.347)} ${o(15.1322)} ${r(20.0479)} ${o(14.8047)}C${r(20.0289)} ${o(16.1454)} ${r(19.5108)} ${o(17.4793)} ${r(18.4902)} ${o(18.5)}C${r(17.4696)} ${o(19.5158)} ${r(16.1409)} ${o(20.033)} ${r(14.8066)} ${o(20.0566)}C${r(15.1312)} ${o(21.3534)} ${r(14.9738)} ${o(22.7723)} ${r(14.25)} ${o(24.0195)}C${r(13.5243)} ${o(25.2699)} ${r(12.3701)} ${o(26.1148)} ${r(11.082)} ${o(26.4795)}C${r(11.7347)} ${o(27.6479)} ${r(11.9529)} ${o(29.062)} ${r(11.5801)} ${o(30.46)}C${r(11.2085)} ${o(31.8485)} ${r(10.3194)} ${o(32.9607)} ${r(9.17578)} ${o(33.6475)}C${r(10.106)} ${o(34.6084)} ${r(10.6797)} ${o(35.9167)} ${r(10.6797)} ${o(37.3604)}C${r(10.6796)} ${o(38.805)} ${r(10.1053)} ${o(40.1141)} ${r(9.17383)} ${o(41.0752)}C${r(10.3132)} ${o(41.7614)} ${r(11.1999)} ${o(42.871)} ${r(11.5703)} ${o(44.2598)}C${r(11.946)} ${o(45.6504)} ${r(11.7335)} ${o(47.0592)} ${r(11.0889)} ${o(48.2266)}C${r(12.377)} ${o(48.593)} ${r(13.5297)} ${o(49.441)} ${r(14.25)} ${o(50.6904)}C${r(14.9754)} ${o(51.9405)} ${r(15.1322)} ${o(53.3629)} ${r(14.8047)} ${o(54.6621)}C${r(16.142)} ${o(54.6835)} ${r(17.4721)} ${o(55.2016)} ${r(18.4902)} ${o(56.2197)}C${r(19.5097)} ${o(57.2441)} ${r(20.0278)} ${o(58.5787)} ${r(20.0479)} ${o(59.918)}C${r(21.3469)} ${o(59.5917)} ${r(22.7696)} ${o(59.7493)} ${r(24.0195)} ${o(60.4697)}C${r(25.2676)} ${o(61.1892)} ${r(26.1117)} ${o(62.3406)} ${r(26.4775)} ${o(63.627)}C${r(27.6424)} ${o(62.9822)} ${r(29.0498)} ${o(62.7688)} ${r(30.4404)} ${o(63.1396)}C${r(31.8284)} ${o(63.5112)} ${r(32.9402)} ${o(64.3999)} ${r(33.627)} ${o(65.543)}C${r(34.5887)} ${o(64.6072)} ${r(35.9012)} ${o(64.0304)} ${r(37.3496)} ${o(64.0303)}C${r(38.7912)} ${o(64.0303)} ${r(40.098)} ${o(64.6023)} ${r(41.0586)} ${o(65.5303)}C${r(41.7458)} ${o(64.3887)} ${r(42.8594)} ${o(63.5007)} ${r(44.25)} ${o(63.1299)}C${r(45.643)} ${o(62.7522)} ${r(47.057)} ${o(62.9676)} ${r(48.2266)} ${o(63.6201)}C${r(48.5931)} ${o(62.3323)} ${r(49.4413)} ${o(61.1801)} ${r(50.6904)} ${o(60.46)}C${r(51.9373)} ${o(59.7364)} ${r(53.3558)} ${o(59.5781)} ${r(54.6523)} ${o(59.9023)}C${r(54.6744)} ${o(58.5659)} ${r(55.1925)} ${o(57.2372)} ${r(56.21)} ${o(56.2197)}C${r(57.2339)} ${o(55.2007)} ${r(58.5676)} ${o(54.6816)} ${r(59.9062)} ${o(54.6611)}C${r(59.5835)} ${o(53.3649)} ${r(59.7414)} ${o(51.9468)} ${r(60.46)} ${o(50.7002)}C${r(61.1797)} ${o(49.4517)} ${r(62.3312)} ${o(48.6068)} ${r(63.6182)} ${o(48.2412)}C${r(62.9651)} ${o(47.0726)} ${r(62.7473)} ${o(45.658)} ${r(63.1201)} ${o(44.2598)}C${r(63.4916)} ${o(42.8718)} ${r(64.3794)} ${o(41.7591)} ${r(65.5225)} ${o(41.0723)}C${r(64.5929)} ${o(40.1115)} ${r(64.0206)} ${o(38.8033)} ${r(64.0205)} ${o(37.3604)}C${r(64.0205)} ${o(35.9186)} ${r(64.5915)} ${o(34.611)} ${r(65.5195)} ${o(33.6504)}C${r(64.3785)} ${o(32.9631)} ${r(63.4908)} ${o(31.8501)} ${r(63.1201)} ${o(30.46)}C${r(62.7421)} ${o(29.0656)} ${r(62.9572)} ${o(27.6498)} ${r(63.6113)} ${o(26.4795)}C${r(62.3272)} ${o(26.1115)} ${r(61.1784)} ${o(25.2657)} ${r(60.46)} ${o(24.0195)}C${r(59.7364)} ${o(22.7727)} ${r(59.5781)} ${o(21.3541)} ${r(59.9023)} ${o(20.0576)}C${r(58.5626)} ${o(20.038)} ${r(57.23)} ${o(19.52)} ${r(56.21)} ${o(18.5)}C${r(55.1931)} ${o(17.4783)} ${r(54.675)} ${o(16.1482)} ${r(54.6523)} ${o(14.8125)}C${r(53.3557)} ${o(15.1357)} ${r(51.9374)} ${o(14.9785)} ${r(50.6904)} ${o(14.2598)}C${r(49.4399)} ${o(13.5339)} ${r(48.5931)} ${o(12.3801)} ${r(48.2285)} ${o(11.0918)}C${r(47.0603)} ${o(11.7439)} ${r(45.6474)} ${o(11.9624)} ${r(44.25)} ${o(11.5898)}V${o(11.5801)}C${r(42.8613)} ${o(11.2085)} ${r(41.7483)} ${o(10.3196)} ${r(41.0615)} ${o(9.17578)}Z`}function lo(t){let e=t/70;return {scale:e,transform:(i,r)=>(i-5)*e+r}}function $1(t,e,n){let{scale:i,transform:r}=lo(n);return E`M ${r(5,t)} ${r(30,e)}v ${20*i}a ${25*i} ${25*i}, 0, 0, 0, ${25*i} ${25*i}h ${45*i}v -${45*i}a ${25*i} ${25*i}, 0, 0, 0, -${25*i} -${25*i}h -${20*i}H ${r(5,t)}zM ${r(30,t)} ${r(15,e)}h ${20*i}a ${15*i} ${15*i}, 0, 0, 1, ${15*i} ${15*i}v ${35*i}h -${35*i}a ${15*i} ${15*i}, 0, 0, 1, -${15*i} -${15*i}v -${35*i}z`}function x1(t,e,n){let i=n/7,r=i*1.5,o=i*.75,a=E`M ${t+r} ${e}`+E`h ${n-2*r}`+E`a ${r} ${r} 0 0 1 ${r} ${r}`+E`v ${n-2*r}`+E`a ${r} ${r} 0 0 1 ${-r} ${r}`+E`h ${-(n-2*r)}`+E`a ${r} ${r} 0 0 1 ${-r} ${-r}`+E`v ${-(n-2*r)}`+E`a ${r} ${r} 0 0 1 ${r} ${-r}z`,l=E`M ${t+i+o} ${e+i}`+E`h ${5*i-2*o}`+E`a ${o} ${o} 0 0 1 ${o} ${o}`+E`v ${5*i-2*o}`+E`a ${o} ${o} 0 0 1 ${-o} ${o}`+E`h ${-(5*i-2*o)}`+E`a ${o} ${o} 0 0 1 ${-o} ${-o}`+E`v ${-(5*i-2*o)}`+E`a ${o} ${o} 0 0 1 ${o} ${-o}z`;return a+l}function S1(t,e,n){let{scale:i,transform:r}=lo(n);return E`M ${r(5,t)} ${r(40,e)}a ${35*i} ${35*i}, 0, 0, 0, ${35*i} ${35*i}h ${30*i}a ${5*i} ${5*i}, 0, 0, 0, ${5*i} -${5*i}v -${30*i}a ${35*i} ${35*i}, 0, 0, 0, -${35*i} -${35*i}a ${35*i} ${35*i}, 0, 0, 0, -${35*i} ${35*i}zM ${r(40,t)} ${r(15,e)}a ${25*i} ${25*i}, 0, 0, 1, ${25*i} ${25*i}v ${25*i}h -${25*i}a ${25*i} ${25*i}, 0, 0, 1, -${25*i} -${25*i}a ${25*i} ${25*i}, 0, 0, 1, ${25*i} -${25*i}z`}function C1(t,e,n){let{scale:i,transform:r}=lo(n);return E`M ${r(5,t)} ${r(30,e)}v ${20*i}a ${25*i} ${25*i}, 0, 0, 0, ${25*i} ${25*i}h ${45*i}v -${45*i}a ${25*i} ${25*i}, 0, 0, 0, -${25*i} -${25*i}h -${20*i}a ${25*i} ${25*i}, 0, 0, 0, -${25*i} ${25*i}M ${r(30,t)} ${r(15,e)}h ${20*i}a ${15*i} ${15*i}, 0, 0, 1, ${15*i} ${15*i}v ${35*i}h -${35*i}a ${15*i} ${15*i}, 0, 0, 1, -${15*i} -${15*i}v -${20*i}a ${15*i} ${15*i}, 0, 0, 1, ${15*i} -${15*i}z`}function M1(t,e,n){let i=n/70,r=t+n/2-40*i,o=e+n/2-40*i,a=(s,c)=>s*i+c;return E`M${a(35.19239999999999,r)} ${a(5.837547376725838,o)}C${a(37.69667692307692,r)} ${a(3.8737070690335305,o)}, ${a(41.218430769230764,r)} ${a(3.8737092228796843,o)}, ${a(43.722707692307694,r)} ${a(5.837547376725838,o)}L${a(46.62781538461539,r)} ${a(8.115648915187375,o)}L${a(50.23356923076923,r)} ${a(7.32361506903353,o)}C${a(53.342,r)} ${a(6.640824299802762,o)}, ${a(56.51483076923077,r)} ${a(8.168784299802759,o)}, ${a(57.91892307692308,r)} ${a(11.024719684418145,o)}L${a(59.54787692307692,r)} ${a(14.337679684418145,o)}L${a(63.14027692307692,r)} ${a(15.188578145956608,o)}C${a(66.23707692307693,r)} ${a(15.922091992110452,o)}, ${a(68.43270769230769,r)} ${a(18.675396607495067,o)}, ${a(68.45876923076924,r)} ${a(21.857768915187375,o)}L${a(68.48892307692307,r)} ${a(25.54931045364891,o)}L${a(71.35633846153846,r)} ${a(27.874602761341222,o)}C${a(73.82830769230769,r)} ${a(29.879187376725838,o)}, ${a(74.61187692307692,r)} ${a(33.312418145956606,o)}, ${a(73.25452307692306,r)} ${a(36.19103353057199,o)}L${a(71.68006153846153,r)} ${a(39.530141222879685,o)}L${a(73.25452307692306,r)} ${a(42.86924891518738,o)}C${a(74.61187692307692,r)} ${a(45.747864299802764,o)}, ${a(73.82830769230769,r)} ${a(49.18109506903353,o)}, ${a(71.35633846153846,r)} ${a(51.18567968441815,o)}L${a(68.48892307692307,r)} ${a(53.510971992110456,o)}L${a(68.45876923076924,r)} ${a(57.202664299802755,o)}C${a(68.43270769230769,r)} ${a(60.38497199211046,o)}, ${a(66.23707692307693,r)} ${a(63.13823353057199,o)}, ${a(63.14027692307692,r)} ${a(63.871833530572,o)}L${a(59.54787692307692,r)} ${a(64.72260276134121,o)}L${a(57.91892307692308,r)} ${a(68.03564891518737,o)}C${a(56.51483076923077,r)} ${a(70.89164891518737,o)}, ${a(53.342,r)} ${a(72.41958737672583,o)}, ${a(50.23356923076923,r)} ${a(71.7368181459566,o)}L${a(46.62781538461539,r)} ${a(70.94463353057199,o)}L${a(43.722707692307694,r)} ${a(73.22275660749506,o)}C${a(41.218430769230764,r)} ${a(75.18663353057198,o)}, ${a(37.69667692307692,r)} ${a(75.18663353057198,o)}, ${a(35.19239999999999,r)} ${a(73.22275660749506,o)}L${a(32.28729230769231,r)} ${a(70.94463353057199,o)}L${a(28.68153846153846,r)} ${a(71.7368181459566,o)}C${a(25.573215384615384,r)} ${a(72.41958737672583,o)}, ${a(22.400384615384613,r)} ${a(70.89164891518737,o)}, ${a(20.996141538461536,r)} ${a(68.03564891518737,o)}L${a(19.36720923076923,r)} ${a(64.72260276134121,o)}L${a(15.774852307692306,r)} ${a(63.871833530572,o)}C${a(12.67803076923077,r)} ${a(63.13823353057199,o)}, ${a(10.48237846153846,r)} ${a(60.38497199211046,o)}, ${a(10.45636,r)} ${a(57.202664299802755,o)}L${a(10.426163076923077,r)} ${a(53.510971992110456,o)}L${a(7.558747692307692,r)} ${a(51.18567968441815,o)}C${a(5.086880338461539,r)} ${a(49.18109506903353,o)}, ${a(4.303258769230769,r)} ${a(45.747864299802764,o)}, ${a(5.660599692307692,r)} ${a(42.86924891518738,o)}L${a(7.235153846153846,r)} ${a(39.530141222879685,o)}L${a(5.660599692307692,r)} ${a(36.19103353057199,o)}C${a(4.3032566153846155,r)} ${a(33.312418145956606,o)}, ${a(5.086885938461538,r)} ${a(29.879187376725838,o)}, ${a(7.558747692307692,r)} ${a(27.874602761341222,o)}L${a(10.426163076923077,r)} ${a(25.54931045364891,o)}L${a(10.45636,r)} ${a(21.857768915187375,o)}C${a(10.48237846153846,r)} ${a(18.67537506903353,o)}, ${a(12.678052307692308,r)} ${a(15.922091992110452,o)}, ${a(15.774852307692306,r)} ${a(15.188578145956608,o)}L${a(19.36720923076923,r)} ${a(14.337679684418145,o)}L${a(20.996141538461536,r)} ${a(11.024719684418145,o)}C${a(22.400384615384613,r)} ${a(8.168784299802759,o)}, ${a(25.573215384615384,r)} ${a(6.640824299802762,o)}, ${a(28.68153846153846,r)} ${a(7.32361506903353,o)}L${a(32.28729230769231,r)} ${a(8.115648915187375,o)}L${a(35.19239999999999,r)} ${a(5.837547376725838,o)}M${a(39.45766153846154,r)} ${a(13.665055069033532,o)}L${a(37.01498461538461,r)} ${a(15.58053506903353,o)}C${a(35.39098461538461,r)} ${a(16.854061222879682,o)}, ${a(33.282799999999995,r)} ${a(17.335251992110454,o)}, ${a(31.26701538461538,r)} ${a(16.892464299802757,o)}L${a(28.235046153846152,r)} ${a(16.22649506903353,o)}L${a(26.865415384615382,r)} ${a(19.012107376725837,o)}C${a(25.954812307692308,r)} ${a(20.864178145956608,o)}, ${a(24.264193846153844,r)} ${a(22.212399684418145,o)}, ${a(22.255926153846154,r)} ${a(22.688076607495066,o)}L${a(19.235393846153844,r)} ${a(23.40354122287968,o)}L${a(19.21,r)} ${a(26.507556607495065,o)}C${a(19.19313538461538,r)} ${a(28.57137199211045,o)}, ${a(18.25492,r)} ${a(30.519525838264297,o)}, ${a(16.651919999999997,r)} ${a(31.81937199211045,o)}L${a(14.240926153846154,r)} ${a(33.774633530572,o)}L${a(15.564830769230769,r)} ${a(36.58238737672584,o)}C${a(16.445064615384617,r)} ${a(38.44891045364892,o)}, ${a(16.445064615384617,r)} ${a(40.611371992110456,o)}, ${a(15.564830769230769,r)} ${a(42.47811045364892,o)}L${a(14.240926153846154,r)} ${a(45.28564891518738,o)}L${a(16.651919999999997,r)} ${a(47.240910453648915,o)}L${a(13.883236923076923,r)} ${a(50.654971992110454,o)}L${a(16.651919999999997,r)} ${a(47.240910453648915,o)}C${a(18.25492,r)} ${a(48.54075660749507,o)}, ${a(19.19313538461538,r)} ${a(50.4891258382643,o)}, ${a(19.21,r)} ${a(52.5527258382643,o)}L${a(19.235393846153844,r)} ${a(55.65684891518738,o)}L${a(22.255926153846154,r)} ${a(56.37235660749507,o)}C${a(24.264193846153844,r)} ${a(56.847925838264295,o)}, ${a(25.954812307692308,r)} ${a(58.196233530571995,o)}, ${a(26.865415384615382,r)} ${a(60.0483258382643,o)}L${a(28.235046153846152,r)} ${a(62.833895069033524,o)}L${a(31.26701538461538,r)} ${a(62.1679258382643,o)}C${a(33.282799999999995,r)} ${a(61.72509506903353,o)}, ${a(35.39098461538461,r)} ${a(62.20626429980276,o)}, ${a(37.01498461538461,r)} ${a(63.47983353057199,o)}L${a(39.45766153846154,r)} ${a(65.39524891518737,o)}L${a(41.90012307692308,r)} ${a(63.47983353057199,o)}C${a(43.524123076923075,r)} ${a(62.20626429980276,o)}, ${a(45.632307692307684,r)} ${a(61.72509506903353,o)}, ${a(47.6480923076923,r)} ${a(62.1679258382643,o)}L${a(50.68006153846154,r)} ${a(62.833895069033524,o)}L${a(52.049692307692304,r)} ${a(60.0483258382643,o)}C${a(52.960338461538456,r)} ${a(58.196233530571995,o)}, ${a(54.6508923076923,r)} ${a(56.847925838264295,o)}, ${a(56.65913846153846,r)} ${a(56.37235660749507,o)}L${a(59.67969230769231,r)} ${a(55.65684891518738,o)}L${a(59.70510769230769,r)} ${a(52.5527258382643,o)}C${a(59.72190769230769,r)} ${a(50.4891258382643,o)}, ${a(60.66012307692307,r)} ${a(48.54075660749507,o)}, ${a(62.263230769230766,r)} ${a(47.240910453648915,o)}L${a(64.67424615384616,r)} ${a(45.28564891518738,o)}L${a(63.35027692307692,r)} ${a(42.47811045364892,o)}C${a(62.47,r)} ${a(40.611371992110456,o)}, ${a(62.47,r)} ${a(38.44891045364892,o)}, ${a(63.35027692307692,r)} ${a(36.58238737672584,o)}L${a(64.67424615384616,r)} ${a(33.774633530572,o)}L${a(62.263230769230766,r)} ${a(31.81958737672584,o)}C${a(60.66012307692307,r)} ${a(30.519525838264297,o)}, ${a(59.72190769230769,r)} ${a(28.57137199211045,o)}, ${a(59.70510769230769,r)} ${a(26.507556607495065,o)}L${a(59.67969230769231,r)} ${a(23.40354122287968,o)}L${a(56.65913846153846,r)} ${a(22.688076607495066,o)}C${a(54.6508923076923,r)} ${a(22.212399684418145,o)}, ${a(52.960338461538456,r)} ${a(20.864178145956608,o)}, ${a(52.049692307692304,r)} ${a(19.012128915187375,o)}L${a(50.68006153846154,r)} ${a(16.22649506903353,o)}L${a(47.6480923076923,r)} ${a(16.892464299802757,o)}C${a(45.632307692307684,r)} ${a(17.335251992110454,o)}, ${a(43.524338461538456,r)} ${a(16.85408276134122,o)}, ${a(41.90012307692308,r)} ${a(15.58053506903353,o)}L${a(39.45766153846154,r)} ${a(13.665055069033532,o)}Z`}function Vn(t,e,n,i,r="top-left"){switch(i){case "leaf":return ys(t,e,n,r);case "leaf-reverse":return ys(t,e,n,r,true);case "drop":return m1(t,e,n,r);case "octagon":return bs(t,e,n,1.6);case "bevel":return bs(t,e,n,1.1);case "squircle":return d1(t,e,n);case "cushion":return f1(t,e,n);case "shield":return h1(t,e,n);case "petal":return p1(t,e,n,r);case "gear":return y1(t,e,n);case "rounded":return _1(t,e,n);case "circle":return b1(t,e,n);case "diya":return $1(t,e,n);case "extra-rounded":return x1(t,e,n);case "message":return S1(t,e,n);case "pointy":return C1(t,e,n);case "curly":return M1(t,e,n);default:return g1(t,e,n)}}var co=.22,uo=.14;function Ss(t,e,n={}){if(t==="circle")return P("circle",{cx:b(e.x+e.w/2),cy:b(e.y+e.h/2),r:b(Math.min(e.w,e.h)/2),...n});let i=t==="rounded"?Math.min(e.w,e.h)*co:0;return P("rect",{height:b(e.h),width:b(e.w),x:b(e.x),y:b(e.y),...i>0&&{rx:b(i),ry:b(i)},...n})}function w1(t,e){let n=t.w*e,i=t.h*e;return {x:t.x+n,y:t.y+i,w:t.w-2*n,h:t.h-2*i}}function Cs(t,e){let n=t.shape??"square",i=t.plate,r=i?w1(e,uo):e,o=l=>P("image",{height:b(r.h),href:t.src,preserveAspectRatio:"none",width:b(r.w),x:b(r.x),y:b(r.y),...l&&{clipPath:`url(#${l})`}});if(n==="square"&&!i)return o();let a=n==="square"?void 0:`qrdx-logo-${te(`${n}|${b(r.x)}|${b(r.y)}|${b(r.w)}|${b(r.h)}`)}`;return ct("g",{children:[i&&Ss(n,e,{fill:i}),a&&P("clipPath",{id:a,children:Ss(n,r)}),o(a)]})}var R1=.6,E1=["L","M","Q","H"];function A1(t){let e=bt.QrCode.encodeText(t.value,At[t.level]),n=E1[e.errorCorrectionLevel.ordinal]??t.level;return {code:t,cells:e.getModules(),layoutMargin:Lt(e.size,t.margin,t.shape),map:An(e.version,n),level:n,version:e.version}}function P1(t,e){let{cells:n,map:i}=t,r=n.length,o=jn(n,t.code.size,t.layoutMargin,e);if(!o)return null;let a=o.excavation??{x:Math.floor(o.x),y:Math.floor(o.y),w:Math.ceil(o.x+o.w)-Math.floor(o.x),h:Math.ceil(o.y+o.h)-Math.floor(o.y)},l=[];for(let c=Math.max(0,a.y);c<Math.min(r,a.y+a.h);c++)for(let m=Math.max(0,a.x);m<Math.min(r,a.x+a.w);m++)l.push(c*r+m);let s=Pn(i,l);return {worst:Math.max(0,...s),correctable:i.correctable,budget:Math.floor(i.correctable*R1),level:t.level,version:t.version}}var v1=t=>!t||t.worst<=t.budget;function F1(t,e,n,i){let r=e.map(l=>A1({...t,level:l})),o=l=>{let s=i(l);return r.every(c=>v1(P1(c,s)))};if(o(n))return n;let a=t.size*.005;for(let l=n-a;l>0;l-=a)if(o(l))return l;return 0}function Ms(t,e){if(!e)return;let n=Math.floor(t.size*bn),i=e.width||n,r=e.height||n,o=f=>{if(f===i)return e;let p=r*f/i;return {...e,width:f,height:p,...e.x!=null&&{x:e.x+(i-f)/2},...e.y!=null&&{y:e.y+(r-p)/2}}},a=t.level??Qe,l={value:t.value,size:t.size,margin:t.margin,shape:t.shape},s=f=>cn({...t,level:a,imageSettings:f}),c=f=>{let p=F1(l,[f],i,o);return p>0?o(p):void 0},m=s(e);if(m===a)return c(a);let u=c(m);return u&&s(u)===m?u:c(a)}var ws="data-qrdx-part",L1="data-qrdx-eye";function Rs(t,e,n){if(t)return n?{[ws]:e,[L1]:n}:{[ws]:e}}var un=300;function Et(t){return {id:t.id,name:t.name,description:t.description,spec:t.spec,wrapper:(e,n)=>{let i=on(t.spec),r=n?.fgColor,o=(typeof r=="string"?r:st(r,""))||"black",a=an(i.qr.size,i,{color:o}),{x:l,y:s,scale:c}=t.at;return P("svg",{height:un,id:"svgQrWrapper",style:{width:"100%",height:"100%"},viewBox:`0 0 ${un} ${un}`,width:un,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:ct("g",{"data-qrdx-template":t.id,transform:`translate(${b(l)} ${b(s)})${c===1?"":` scale(${c})`}`,children:[es(a),P("g",{fill:"none",transform:`translate(${b(a.qrX)} ${b(a.qrY)}) scale(${a.qrSize/un})`,children:e})]})})}}}var Es={kind:"qrdx.frame",version:1,artboard:{width:185,height:178},qr:{x:35,y:0,size:150,padding:0,plate:"none"},colors:{frame:"#000000"},shapes:[{type:"path",d:"M26.57 80.23h0c0.12 -2.06 0.31 -4.19 0.49 -6.25s0.48 -4.13 0.85 -6.13s0.79 -4 1.27 -5.95a30.21 30.21 0 0 1 1.94 -5.28h0c0.06 -0.18 0.13 -0.43 0.19 -0.67a3.55 3.55 0 0 0 -2.8 -4.19l-0.18 -0.06a1.85 1.85 0 0 0 -0.54 -0.06c-0.19 0 -0.31 -0.06 -0.49 -0.06s-0.61 -0.06 -0.91 -0.06c-0.61 0 -1.21 0.06 -1.82 0.06c-1.21 0.12 -2.37 0.25 -3.52 0.43a62.08 62.08 0 0 0 -6.8 1.45a58.45 58.45 0 0 0 -6.43 2.31c-1 0.42 -2.07 1 -3.1 1.4s-2 1.09 -3 1.57a0.76 0.76 0 0 0 0.54 1.4h0.07c1.09 -0.24 2.12 -0.55 3.15 -0.79s2.13 -0.48 3.16 -0.61A46 46 0 0 1 15 58c1.34 -0.06 2.73 -0.06 4.07 -0.06a62.58 62.58 0 0 0 -7.23 10.43a85.58 85.58 0 0 0 -6.55 15.36a107.86 107.86 0 0 0 -5 32.53a104.06 104.06 0 0 0 5 32.29a90.47 90.47 0 0 0 15.54 28.52a0.94 0.94 0 0 0 1.27 0.19a0.89 0.89 0 0 0 0.18 -1.28h0a87.24 87.24 0 0 1 -13.89 -28.28A102.85 102.85 0 0 1 11 85.87a82.15 82.15 0 0 1 6.68 -14a51.58 51.58 0 0 1 5.71 -7.76c0 1.21 0 2.36 0.06 3.58c0.12 2.18 0.24 4.31 0.48 6.43s0.49 4.25 0.85 6.37a1 1 0 0 0 0.91 0.85A1.37 1.37 0 0 0 26.57 80.23Z",fill:"frame"}],labels:[]};var As=Et({id:"Arrow",name:"Arrow",description:"QR code with arrow",spec:Es,at:{x:47,y:95,scale:1}});var Ps={id:"default",name:"Default",description:"Simple QR code without decorative elements",wrapper:t=>P("svg",{height:"300",id:"svgQrWrapper",style:{width:"100%",height:"100%"},viewBox:"0 0 300 300",width:"300",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:P("g",{fill:"none",transform:"translate(9, 9) scale(0.95)",children:t})})};var dn=593,zt=296.5,mn=146.5,Ts=294.5,Ns=231.228,Os="M296.5 0C460.252 -7.15782e-06 593 132.748 593 296.5C593 460.252 460.253 593 296.5 593C132.748 593 7.15782e-06 460.252 0 296.5C-7.15788e-06 132.748 132.748 7.15788e-06 296.5 0ZM296.5 527.728C424.204 527.728 527.728 424.204 527.728 296.5C527.728 168.796 424.204 65.2713 296.5 65.2713C168.796 65.2713 65.2714 168.796 65.2714 296.5C65.2714 424.204 168.796 527.728 296.5 527.728Z",k1="iaa2 1z3g 1z0y 1z18 1z18 1we8 2mq 1uta 47y 1rx4 73u 1rx4 73u 1rxe 73u 1rx4 73u 1rxe 73u 1rx4 73u 1rxe 73u 1rx4 73u 1rzm 71m 1rzm 71m 1rzc 73u okq 13ce 744 1rx4 744 1rwu 744 1rx4 744 1rx4 73u 1rx4 744 1rx4 73u 1rx4 73u 1rx4 744 1rx4 73u 1rxe 73u 1rx4 73u 1rx4 744 1rzm 71c 1rzm 73u 1rxe 73u 1rx4 744 1rx4 73u 1rx4 73u 1rxe 73u 1rx4 618 12m 1rxe 73u 1z0y 1z18 1z0y 1z18 1z0y 1z18 1z18",T1="hqpr 5 1z36 1z0y 1z18 1z18 1z0y 1z0y 1a7w otc 1z0y 1z18 1z0y 1z18 1z0y 1z1i 1z0o 1z18 1z0y 1z3q 1z0y 1z18 1z0y 1z18 1z0y 1z18 1z0y 1z18 1z0y 1z18 1z0y 1lk8 dgq 1z18 1z18 1z3g 1z0y 1z0y 1z18 1z18 1z0y 1z0y 1z18 1yx2 3w 1z18 60o 1t0a 1z18 1z0y 1z18 1z0y",vs="3cf27f17c00j3ch21n1ek00l1el3cj1vv1kd00n3cl3cn1q31q500p3cp1vx00r1kb3cs3aw1ej21p00t3ax3ay17b27h00w3b02g20yq01w2d611m01x3b52aa14i01y24i1bq0203bd3be1q21q60253bf39e39f39h14e2ae02d39j11i2da02e39l0ym02f39n2lt0sz03a39p2ix0vv03b39r2d511n39t03d27d17f03f39x39y21l1en03h3a03a11vt1kf03j37w37x1q11q703l37z1k903n1vz3821eh03p21r38714d03t11h03u2db38a0vp2j303w2lz38g03x0st2rk0n804o38l2oo0q404p38n2iw0vw04r36f36h2a814k04u36k36l1vs1kg04z36o36p1n41t405236q36x36y0ss2m005d3720n02rs05f3742uf0kd0633763772on0q506537834y2fz0yt06834z2d311p06935235424f1bt06c35621j1ep06d3581yn1hl06e35a1sv1nd06g35b1pz1q906h35d35e35g1ef21t06l35h1bj24p06m35k35l11f2dd06q35n0vn2j506s35p35q0pv2ox06u35s0mz2rt06v35t33h0k32up06w2x90hi08y2ud0ke08z33r2lp0t20922fx0yu0942a514m09624d1bu0983441yl1hm09a1vp1ki09b1px1qa09d34e1n11t609e1h91yy09g1ed21u09h1a227m0831492ai09l0yh2ga09n0sp2m209p0pt2oy09q0k12uq09s2xo0h52z209t31k0en0bt2780c319z0az0e831z0cq",Fs=52,N1=240;function Ls(t){let e=0;return t.split(" ").map(n=>(e+=Number.parseInt(n,36),e/1e4))}var mo;function O1(){if(!mo){let t=Ls(k1),e=Ls(T1),n=[];for(let i=0;i<vs.length;i+=3){let r=Number.parseInt(vs.slice(i,i+3),36);n.push({cx:t[Math.floor(r/Fs)],cy:e[r%Fs]});}mo=n;}return mo}function D1(t){let e=0;for(let n=0;n<t.length;n++)e=e*32-e+t.charCodeAt(n),e%=2147483647;return Math.abs(e)}function Ds(t){let e=O1(),n=D1(t),i=()=>(n=(n*9301+49297)%233280,n/233280),r=e.map((o,a)=>a);for(let o=r.length-1;o>0;o--){let a=Math.floor(i()*(o+1));[r[o],r[a]]=[r[a],r[o]];}return r.slice(0,N1).sort((o,a)=>o-a).map(o=>e[o])}var Is=300,B1=49,Q1=6;function Bs(t,e){if(Is/e<=B1+.5)return t;let n=mn,i=mn+Is,r=Q1*e+e/2;return t.filter(({cx:o,cy:a})=>Math.max(n-o,o-i,n-a,a-i)>=r)}var Qs="Scan the QR code * Scan the QR code * Scan the QR code * Scan the QR code *",fn=32,Gs=3.5,G1=fn*yn,Us=246.5,It=2*Math.PI*Us,po=.36,ks=Us+po*fn,fo=400;function Ie(t,e){return t===" "||/[il1|!']/.test(t)?e*.3:/[mwMW@%&]/.test(t)?e*.8:e*.6}function U1(t){let e=t.slice(0,fo).split(" ").map(n=>Ve(n,fo)).join(" ");return Array.from(e).slice(0,fo)}var z1="\u2026",zs=1;function qs(t,e,n,i=false){return i&&e===t.length-1?zs*n:Ie(t[e],n)}function go(t,e,n=false){let i=0;for(let r=0;r<t.length;r++)i+=qs(t,r,e,n);return i}function ho(t,e,n,i=false){return go(t,e,i)+n*Math.max(0,t.length-1)+Ie(" ",e)+2*n<=It}var Hs=t=>t.join("").split(" ").filter(Boolean),q1=(t,e)=>Array.from(Array.from({length:e},()=>t.join(" ")).join(" "));function Ws(t,e,n){if(ho(t,e,n))return {chars:t,fontSize:e,letterSpacing:n};let i=Math.min(n,0),r=Math.min(e,G1),o=(d,h=false)=>{let _=go(d,e,h)+Ie(" ",e),y=d.length+1,$=(It-_)/y;if($>=i)return {chars:d,fontSize:e,letterSpacing:$,cut:h};let C=(It-i*y)/_*e;return C>=r?{chars:d,fontSize:C,letterSpacing:i,cut:h}:null},a=o(t);if(a)return a;let l=Hs(t),s=Vs(l);for(let d=l.length/s.length-1;d>=1;d--){let h=q1(s,d);if(ho(h,r,i))return o(h)??{chars:h,fontSize:r,letterSpacing:i}}let c=It-Ie(" ",r)-zs*r-2*i,m=0,u=0,f=0;for(let[d,h]of t.entries()){if(m+=Ie(h,r)+i,m>c)break;f=d+1,(f===t.length||t[f]===" ")&&(u=f);}let p=[...H1(t.slice(0,u>0?u:f)),z1];return (ho(p,e,n,true)?{chars:p,fontSize:e,letterSpacing:n,cut:true}:null)??o(p,true)??{chars:p,fontSize:r,letterSpacing:i,cut:true}}function H1(t){let e=t.length;for(;e>0&&/[\s.,;:!?*·•\-–—]/u.test(t[e-1]);)e--;return t.slice(0,e)}function Vs(t){for(let e=1;e<t.length;e++)if(t.length%e===0&&t.every((n,i)=>n===t[i%e]))return t.slice(0,e);return t}function W1(t,e,n){let i=Hs(t);if(i.length===0)return {chars:[],fontSize:e,letterSpacing:n};let r=Array.from(Vs(i).join(" ")),o=go(r,e)+Ie(" ",e),a=o+(r.length+1)*n,l=Math.min(n,0),s=null;for(let c of new Set([Math.floor(It/a),Math.ceil(It/a)])){if(c<1)continue;let m=(It-c*o)/(c*(r.length+1));if(m>=l&&(!s||Math.abs(m-n)<Math.abs(s.letterSpacing-n))){let u=Array.from({length:c},()=>r.join(""));s={chars:Array.from(u.join(" ")),fontSize:e,letterSpacing:m};}}return s??Ws(r,e,n)}function js(t,e){let{position:n,rotation:i}=e,r=U1(t),o=e.fill==="repeat"?W1(r,e.fontSize,e.letterSpacing):Ws(r,e.fontSize,e.letterSpacing),{fontSize:a,letterSpacing:l}=o,s=[],c=0;for(let[d,h]of o.chars.entries()){let _=qs(o.chars,d,a,o.cut);s.push({char:h,along:c+_/2}),c+=_+l;}let m=c-(s.length>0?l:0),u=n!=="bottom",f=u?ks-po*a:ks+po*a,p=m/It*180,g=[];for(let{char:d,along:h}of s){if(d.trim()==="")continue;let _=h/It*360,y=u?i-p+_:i+180+p-_,$=y*Math.PI/180;g.push({char:d,x:U(zt+f*Math.sin($)),y:U(zt-f*Math.cos($)),rotate:U(u?y:y-180)});}return {text:o.chars.join(""),letters:g,fontSize:a===e.fontSize?a:U(a),letterSpacing:l}}var ke=(t,e)=>typeof t=="number"&&Number.isFinite(t)?t:e,Zs={id:"DotRing",name:"Dot Ring",description:"A round code in a ring of dots of its own for every link, with text along the ring",wrapper:(t,e,n)=>{let i=st(e?.fgColor,"#000000"),r=st(e?.bgColor,"#ffffff"),o=n?.pixelSize??9,a=U(o/2),l=Bs(Ds(n?.url??""),o),s=ke(e?.fontSize,fn),c=s>0?s:fn,m=typeof e?.customText=="string"?e.customText:Qs,u=js(m,{fontSize:c,letterSpacing:ke(e?.fontLetterSpacing,Gs),position:e?.textPosition==="bottom"?"bottom":"top",rotation:ke(e?.textRotation,0),fill:e?.textFill==="repeat"?"repeat":"none"}),f=e?.textColor||"#ffffff",p=e?.fontFamily||ao,g=e?.fontWeight??900,d=ke(e?.strokeWidth,0),h=e?.strokeColor||"#000000",_=[{radius:zt,width:ke(e?.outerStrokeWidth,d),color:e?.outerStrokeColor||h},{radius:Ns,width:ke(e?.innerStrokeWidth,d),color:e?.innerStrokeColor||h}].filter(y=>y.width>0);return ct("svg",{height:dn,id:"svgQrWrapper",style:{width:"100%",height:"100%"},viewBox:`0 0 ${dn} ${dn}`,width:dn,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[P("circle",{cx:zt,cy:zt,fill:r,r:Ts}),P("g",{fill:i,children:l.map((y,$)=>P("circle",{cx:y.cx,cy:y.cy,r:a},$))}),P("path",{d:Os,fill:e?.outerCircleColor||i}),_.map((y,$)=>P("circle",{cx:zt,cy:zt,fill:"none",r:y.radius,stroke:y.color,strokeWidth:y.width},$)),P("g",{"aria-hidden":"true",children:u.letters.map((y,$)=>P("text",{fill:f,fontFamily:p,fontSize:u.fontSize,fontWeight:g,textAnchor:"middle",transform:`rotate(${y.rotate} ${y.x} ${y.y})`,x:y.x,y:y.y,children:y.char},$))}),P("g",{transform:`translate(${mn} ${mn})`,children:t})]})}};var Xs={kind:"qrdx.frame",version:1,artboard:{width:220,height:277},qr:{x:52,y:122,size:114,padding:0,plate:"none"},colors:{frame:"#000000"},shapes:[{type:"circle",cx:110,cy:167.682,r:99.318,fill:"#FFFFFF",stroke:{color:"#F89941",width:20}},{type:"ellipse",cx:139.989,cy:67.895,rx:35.445,ry:48.442,fill:"#F89941"},{type:"path",d:"M159.937 69.076C159.937 82.657 156.092 94.845 150.005 103.57C143.912 112.304 135.736 117.381 126.992 117.381C118.247 117.381 110.072 112.304 103.979 103.57C97.891 94.845 94.047 82.657 94.047 69.076C94.047 55.495 97.891 43.308 103.979 34.582C110.072 25.849 118.247 20.771 126.992 20.771C135.736 20.771 143.912 25.849 150.005 34.582C156.092 43.308 159.937 55.495 159.937 69.076Z",fill:"#F89941",stroke:{color:"#E78249",width:5}},{type:"ellipse",cx:126.072,cy:69.487,rx:34.051,ry:50.662,fill:"#F89941"},{type:"path",d:"M143.396 69.667C143.396 82.739 139.562 94.472 133.488 102.874C127.412 111.279 119.235 116.2 110.451 116.2C101.666 116.2 93.489 111.279 87.413 102.874C81.34 94.472 77.506 82.739 77.506 69.667C77.506 56.595 81.34 44.862 87.413 36.46C93.489 28.055 101.666 23.134 110.451 23.134C119.235 23.134 127.412 28.055 133.488 36.46C139.562 44.862 143.396 56.595 143.396 69.667Z",fill:"#F89941",stroke:{color:"#E78249",width:5}},{type:"ellipse",cx:106.316,cy:70.849,rx:33.673,ry:47.851,fill:"#F89941"},{type:"ellipse",cx:78.743,cy:68.448,rx:35.445,ry:48.442,fill:"#F89941"},{type:"path",d:"M58.794 69.63C58.794 83.211 62.639 95.399 68.726 104.124C74.819 112.858 82.995 117.935 91.739 117.935C100.484 117.935 108.659 112.858 114.753 104.124C120.84 95.399 124.685 83.211 124.685 69.63C124.685 56.049 120.84 43.861 114.753 35.136C108.659 26.402 100.484 21.325 91.739 21.325C82.995 21.325 74.819 26.402 68.726 35.136C62.639 43.861 58.794 56.049 58.794 69.63Z",fill:"#F89941",stroke:{color:"#E78249",width:5}},{type:"ellipse",cx:91.744,cy:69.763,rx:32.944,ry:50.385,fill:"#F89941"},{type:"path",d:"M75.335 70.221C75.335 83.293 79.169 95.025 85.243 103.427C91.319 111.833 99.496 116.753 108.281 116.753C117.065 116.753 125.242 111.833 131.318 103.427C137.392 95.025 141.226 83.293 141.226 70.221C141.226 57.148 137.392 45.416 131.318 37.014C125.242 28.609 117.065 23.688 108.281 23.688C99.496 23.688 91.319 28.609 85.243 37.014C79.169 45.416 75.335 57.148 75.335 70.221Z",fill:"#F89941",stroke:{color:"#E78249",width:5}},{type:"ellipse",cx:111.677,cy:70.871,rx:32.39,ry:47.616,fill:"#F89941"},{type:"ellipse",cx:106.971,cy:71.425,rx:33.221,ry:47.616,fill:"#F89941"},{type:"path",d:"M130.85 46.678C137.21 42.252 138.538 40.633 139.867 39.014C139.867 39.014 141.806 43.824 141.88 46.357C141.954 48.89 141.712 50.147 139.248 51.647C136.783 53.146 127.406 53.045 122.083 52.975C121.31 52.5 122.72 52.337 130.85 46.678Z",fill:"#000000"},{type:"path",d:"M87.765 46.512C81.392 42.141 80.058 40.548 78.724 38.954C78.724 38.954 76.783 45.836 76.758 46.822C76.733 47.808 76.657 50.805 80.247 52C83.837 53.194 91.234 52.772 96.551 52.727C97.322 52.265 95.912 52.099 87.765 46.512Z",fill:"#000000"},{type:"path",d:"M132 90.5C139.156 83.16 141.5 78.283 143.351 72.935C144.24 70.367 134.909 72.043 130 72.935C129.276 73.066 127.751 76.915 127 77C126.182 77.093 123.841 73.076 123 73.086C121.725 73.101 119.727 73.086 117.875 73.429C117.345 74.365 118.367 77.575 117.875 78.283C117.321 78.283 113.796 77.26 113.242 76.43C112.689 74.492 112.949 73.363 112.118 72.532C109.555 72.908 110.023 72.657 107.412 73.086C106.768 73.192 105.09 77.721 104.441 77.82C103.615 77.945 100.644 74.009 99.809 74.114C98.747 74.248 96.821 74.468 95.64 74.577C95.126 74.624 95.554 77.502 95.177 78.283C94.898 78.862 91.426 77.892 90.5 77.5C90.037 76.502 89.844 74.558 89 74.577C83 74.114 81.4 73.843 75.575 70.871C75.575 70.871 74.5 80 83 89C91.5 98 119.127 103.706 132 90.5Z",fill:"#000000"},{type:"path",d:"M107.238 7.252C109.192 1.731 114.678 0.363 117.935 0L120.377 1.816C121.158 2.397 121.842 2.409 122.331 3.257C122.331 4.225 118.337 5.42 114.429 6.582C109.545 8.035 111.482 17.053 114.429 19.281C115.401 20.015 115.524 19.964 117.966 19.964C120.029 19.964 122.387 18.247 123.566 17.353C123.566 17.353 123.861 20.257 121.798 21.478C119.735 22.698 115.578 21.858 115.608 21.966C116.493 23.918 118.89 22.489 120.029 23.336C119.346 23.336 118.556 24.289 116.198 24.533C114.672 24.58 114.135 24.533 112.956 23.918C111.777 23.304 111.482 22.87 110.893 22.14C108.83 23.36 110.893 25.431 110.893 25.431C110.893 25.431 106.472 25.851 105.587 23.918C105.264 23.212 105.882 22.14 105.587 21.966C103.819 22.454 102.935 23.481 99.373 22.87C96.312 22.344 97.102 18.321 96.451 17.353C99.381 18.079 97.131 20.039 101.327 19.964C112.838 19.758 104.796 14.153 107.238 7.252Z",fill:"#5D725F"}],labels:[]};var Ys=Et({id:"Halloween",name:"Halloween",description:"QR code with Halloween theme",spec:Xs,at:{x:38,y:10,scale:1}});var Ks={kind:"qrdx.frame",version:1,artboard:{width:316,height:316},qr:{x:20,y:20,size:276,padding:0,plate:"none"},colors:{frame:"#000000"},shapes:[{type:"path",d:"M308 8H8v300h300V8ZM0 0v316h316V0H0Z",fill:"frame",fillRule:"evenodd"}],labels:[]};var Js=Et({id:"SquareBorder",name:"Square Border",description:"QR code with square decorative border",spec:Ks,at:{x:0,y:0,scale:300/316}});var tl={kind:"qrdx.frame",version:1,artboard:{width:208,height:298},qr:{x:14,y:14,size:180,padding:0,plate:"none"},colors:{frame:"#000000"},shapes:[{type:"path",d:"M197 0.7h-186a10.25 10.25 0 0 0 -10.2 10.12v186A10.13 10.13 0 0 0 11 207H197a10.13 10.13 0 0 0 10.12 -10.12v-186A10.13 10.13 0 0 0 197 0.7Zm2.36 193.05a5.46 5.46 0 0 1 -5.47 5.47H14.16a5.46 5.46 0 0 1 -5.47 -5.47V13.93a5.46 5.46 0 0 1 5.47 -5.47H193.91a5.46 5.46 0 0 1 5.47 5.47Z",fill:"frame"},{type:"path",d:"M197.54 237.81H127.61a2.29 2.29 0 0 1 -1.62 -0.67l-20.55 -20.55a2.33 2.33 0 0 0 -3.25 0l-20.55 20.55a2.29 2.29 0 0 1 -1.62 0.67H10.09A9.15 9.15 0 0 0 0.93 247v41.17a9.16 9.16 0 0 0 9.16 9.16H197.61a9.09 9.09 0 0 0 9.09 -9.16V247A9.16 9.16 0 0 0 197.54 237.81Z",fill:"frame"}],labels:[]};var el=Et({id:"StandardBox",name:"Standard Box",description:"QR code with standard box",spec:tl,at:{x:46,y:1,scale:1}});var nl={kind:"qrdx.frame",version:1,artboard:{width:252,height:300},qr:{x:40,y:38,size:174,padding:0,plate:"none"},colors:{frame:"#000000"},shapes:[{type:"path",d:"M171.11 290.77l-7.28 4.88a2.16 2.16 0 0 0 -0.57 3a2.21 2.21 0 0 0 1.77 0.92a2.4 2.4 0 0 0 1.2 -0.35l7.28 -4.88a2.14 2.14 0 0 0 -2.4 -3.54Z",fill:"#22071b"},{type:"path",d:"M242.85 227.52l-7.28 4.87a2.16 2.16 0 0 0 -0.57 3a2.21 2.21 0 0 0 1.77 0.92a1.86 1.86 0 0 0 1.2 -0.35l7.28 -4.88a2.13 2.13 0 1 0 -2.4 -3.53Z",fill:"#22071b"},{type:"path",d:"M17 176.34l-9.11 6.08a2.15 2.15 0 0 0 -0.57 3a2.19 2.19 0 0 0 1.77 0.92a2.14 2.14 0 0 0 1.2 -0.35l9.12 -6.08A2.14 2.14 0 0 0 17 176.34Z",fill:"#22071b"},{type:"path",d:"M17 269.08l-9.11 6.07a2.15 2.15 0 0 0 -0.57 3a2.19 2.19 0 0 0 1.77 0.92a2.92 2.92 0 0 0 1.2 -0.35l9.12 -6.08A2.14 2.14 0 0 0 17 269.08Z",fill:"#22071b"},{type:"path",d:"M123 10.1a2.4 2.4 0 0 0 1.14 -0.35l7.7 -5.16a2.13 2.13 0 0 0 -2.4 -3.53l-7.64 5.15a2.15 2.15 0 0 0 -0.56 3A2.19 2.19 0 0 0 123 10.1Z",fill:"#22071b"},{type:"path",d:"M251.54 54.77a2.14 2.14 0 0 0 -3 -0.56l-17.1 11.45V31.31a10.18 10.18 0 0 0 -10.18 -10.18H113.22l-10.39 7a2.4 2.4 0 0 1 -1.2 0.35a2.21 2.21 0 0 1 -1.77 -0.92a2.15 2.15 0 0 1 0.57 -3l1.41 -0.92l13.64 -8.76a2.1 2.1 0 1 0 -2.26 -3.54L98 21.2h-8.13l-10.39 7a2.37 2.37 0 0 1 -1.2 0.35a2.19 2.19 0 0 1 -1.76 -0.92a2.15 2.15 0 0 1 0.56 -3L100 9.25a2.13 2.13 0 1 0 -2.4 -3.53l-23 15.48H34.2A10.18 10.18 0 0 0 24 31.38v28L7.34 70.46a2.09 2.09 0 0 0 -0.57 3a2 2 0 0 0 1.77 0.92a2.58 2.58 0 0 0 1.2 -0.35l14.35 -9.54l3.18 -2.12a2.14 2.14 0 1 1 2.41 3.53l-5.52 3.67V76.9l-7 4.66a2.15 2.15 0 0 0 -0.56 3a2 2 0 0 0 1.77 0.92a2.34 2.34 0 0 0 1.2 -0.36l7.35 -4.94A2.13 2.13 0 0 1 28.69 84l-4.46 3v65.66L1.05 168.07a2.15 2.15 0 0 0 -0.57 3a2 2 0 0 0 1.77 0.92a2.37 2.37 0 0 0 1.2 -0.35l25 -16.75a2 2 0 0 1 2.62 0.77a2.16 2.16 0 0 1 -0.57 3l-6.36 4.24V275a10.09 10.09 0 0 0 9.83 10.11l-5.87 4a2.15 2.15 0 0 0 -0.57 3a2.06 2.06 0 0 0 1.77 0.92a2.38 2.38 0 0 0 1.2 -0.36l23 -15.41a2.14 2.14 0 0 1 2.41 3.54l-6.58 4.45h52l-5.58 3.75a2.14 2.14 0 0 0 -0.56 3a2 2 0 0 0 1.76 0.91a2.37 2.37 0 0 0 1.2 -0.35l30.54 -20.28a2.15 2.15 0 0 1 3 0.56a2.1 2.1 0 0 1 -0.57 3l-14.21 9.54H193l-4.6 3a2.16 2.16 0 0 0 -0.63 3a2.11 2.11 0 0 0 1.76 1a2 2 0 0 0 1.13 -0.36L213 277.35a2.14 2.14 0 1 1 2.33 3.6l-6.78 4.38h13a10.18 10.18 0 0 0 10.18 -10.18v-91.1l-4.38 3a2.43 2.43 0 0 1 -1.2 0.35a2.19 2.19 0 0 1 -1.77 -0.92a2.15 2.15 0 0 1 0.57 -3l24.38 -16.33a2.13 2.13 0 1 0 -2.4 -3.53l-15.48 10.25V91.53l-4.38 3a2.34 2.34 0 0 1 -1.21 0.36a2.22 2.22 0 0 1 -1.76 -0.92a2.15 2.15 0 0 1 0.56 -3l6.72 -4.52l13.71 -9.19a2.14 2.14 0 0 0 -2.4 -3.54l-11.24 7.57V75.84l-4.38 3a2.34 2.34 0 0 1 -1.21 0.36a2.22 2.22 0 0 1 -1.76 -0.92a2.15 2.15 0 0 1 0.56 -3l6.72 -4.52l19.43 -13.08A2.05 2.05 0 0 0 251.54 54.77ZM213 216.07h-172a5.23 5.23 0 0 1 -5.23 -5.24V38.94a5.22 5.22 0 0 1 5.23 -5.23H213a5.22 5.22 0 0 1 5.23 5.23V210.83h0.07A5.22 5.22 0 0 1 213 216.07Z",fill:"#22071b"},{type:"path",d:"M246.45 139.8l-7.28 4.88a2.15 2.15 0 0 0 -0.56 3a2.22 2.22 0 0 0 1.76 0.92a2.44 2.44 0 0 0 1.21 -0.36l7.28 -4.87a2.14 2.14 0 0 0 -2.41 -3.54Z",fill:"#22071b"}],labels:[]};var rl=Et({id:"StrikedBox",name:"Striked Box",description:"QR code with striked box",spec:nl,at:{x:24,y:0,scale:1}});var _o={default:Ps,Arrow:As,StandardBox:el,SquareBorder:Js,StrikedBox:rl,Halloween:Ys,DotRing:Zs},ol={FlamQR:"DotRing"},il=t=>{if(Object.hasOwn(_o,t))return _o[t];let e=Object.hasOwn(ol,t)?ol[t]:void 0;return e?_o[e]:void 0};var bo=t=>Math.round(Math.min(Math.max(t,0),255)).toString(16).padStart(2,"0");function cl(t){return `#${bo(t.r)}${bo(t.g)}${bo(t.b)}`}function Zn(t){let e=lt(t);return !e||e.a>=1||e.a<=0?{color:t}:{color:cl(e),opacity:U(e.a,3)}}function Xn(t,e){let n=Math.min(Math.max(t.a,0),1);return {r:t.r*n+e.r*(1-n),g:t.g*n+e.g*(1-n),b:t.b*n+e.b*(1-n),a:1}}var ul={r:0,g:0,b:0,a:1};function Y1(t){return [...t].map(e=>({offset:Math.min(Math.max(e.offset/100,0),1),color:lt(e.color)??ul})).sort((e,n)=>e.offset-n.offset)}function yo(t,e){let n=t[0],i=t.at(-1);if(!(n&&i))return ul;if(e<=n.offset)return n.color;if(e>=i.offset)return i.color;for(let r=0;r+1<t.length;r++){let o=t[r],a=t[r+1];if(e>=o.offset&&e<=a.offset){let l=a.offset-o.offset,s=l>0?(e-o.offset)/l:1,c=o.color.a+(a.color.a-o.color.a)*s,m=(u,f)=>{let p=u*o.color.a+(f*a.color.a-u*o.color.a)*s;return c>0?p/c:u+(f-u)*s};return {r:m(o.color.r,a.color.r),g:m(o.color.g,a.color.g),b:m(o.color.b,a.color.b),a:c}}}return i.color}var al=4,sl=720,K1=2;function ml(t,e,n,i,r){let o=Y1(t);if(o.length===0)return {wedges:[]};let a=o[0].color.a,l=o.every(y=>Math.abs(y.color.a-a)<.002),s=[...new Set([0,...o.map(y=>y.offset),1])].sort((y,$)=>y-$),c=[];for(let y=0;y+1<s.length;y++){let $=s[y],C=s[y+1];if(C<=$)continue;let M=yo(o,$+1e-9),x=yo(o,C-1e-9),S=Math.max(Math.abs(M.r*M.a-x.r*x.a),Math.abs(M.g*M.a-x.g*x.a),Math.abs(M.b*M.a-x.b*x.a),Math.abs(M.a-x.a)*255),R=Math.ceil(S/K1),w=Math.ceil((C-$)*360/al),A=Math.max(1,R,w);for(let v=0;v<A;v++)c.push([$+(C-$)*v/A,$+(C-$)*(v+1)/A]);}let m=c;if(c.length>sl){let y=Math.ceil(c.length/sl);m=[];for(let $=0;$<c.length;$+=y){let C=c.slice($,$+y);m.push([C[0][0],C.at(-1)[1]]);}}let u=e-90,f=r/Math.cos(2*al/2*(Math.PI/180)),p=y=>{let $=y*Math.PI/180;return [b(n+f*Math.cos($)),b(i+f*Math.sin($))]},g=`${b(n)} ${b(i)}`,d=y=>U((y%360+360)%360,4),h=m.length-1,_=m.map(([y,$],C)=>{let M=yo(o,(y+$)/2),x=($-y)*360,S=l&&C===0&&h>0?x:0,R=l&&C<h?x:0,w=u+y*360-S,A=u+$*360+R,[v,F]=p(w),[L,O]=p(A);return {d:`M${g}L${v} ${F}L${L} ${O}Z`,color:cl(M),...l||M.a>=1?{}:{opacity:U(M.a,3)},from:d(w),sweep:U(A-w,4)}});return l&&a<1?{wedges:_,opacity:U(a,3)}:{wedges:_}}function ll(t,e,n,i){return (Math.atan2(i-e,n-t)*180/Math.PI%360+360)%360}function dl(t,e,n){if(t>=n.x-1e-6&&t<=n.x+n.width+1e-6&&e>=n.y-1e-6&&e<=n.y+n.height+1e-6)return null;let r=[[n.x,n.y],[n.x+n.width,n.y],[n.x,n.y+n.height],[n.x+n.width,n.y+n.height]],o=ll(t,e,n.x+n.width/2,n.y+n.height/2),a=0,l=0;for(let[s,c]of r){let m=ll(t,e,s,c)-o;m>180?m-=360:m<=-180&&(m+=360),a=Math.min(a,m),l=Math.max(l,m);}return [o+a,o+l]}function fl(t,e){let n=t[1]-t[0],i=e[1]-e[0];if(n>=360||i>=360)return true;let r=((e[0]-t[0])%360+360)%360;return r<=n||r+i>=360}function J1(t,e){return t.slice().map((n,i)=>i<e.y||i>=e.y+e.h?n:n.map((r,o)=>o<e.x||o>=e.x+e.w?r:false))}function tm(t,e,n){return t<7&&e<7||t>=n-7&&e<7||t<7&&e>=n-7}var em=.9;function $o(t,e){let{margin:n,pixelSize:i,pattern:r="circle",plain:o=false}=e;if(ua(r))return ma(t,{margin:n,pixelSize:i,pattern:r,scale:e.scale,plain:o});let a=jr(e.scale,r),l=[],s=t.length,c=i*.45,m=o?()=>false:Zr(s);return t.forEach((u,f)=>{u.forEach((p,g)=>{if(p&&(o||!tm(g,f,s))){let d=(g+.5+n)*i,h=(f+.5+n)*i,_=`${g}-${f}`,y=l.length;if(m(g,f)){l.push(P("rect",{height:b(i),width:b(i),x:b(d-i/2),y:b(h-i/2)},_));return}switch(r){case "circle":l.push(P("circle",{cx:b(d),cy:b(h),r:b(c),transform:E`rotate(0,${d},${h})`},_));break;case "circle-large":{let $=i*.5;l.push(P("circle",{cx:b(d),cy:b(h),r:b($),transform:E`rotate(0,${d},${h})`},_));}break;case "small-square":{let $=i*.357143;l.push(P("path",{d:E`M ${d-$} ${h-$}v ${i*.714286}h ${i*.714286}v -${i*.714286}z`,transform:E`rotate(0,${d},${h})`},_));}break;case "diamond":{let $=i*.357143;l.push(P("path",{d:E`M ${d-$} ${h-$}v ${i*.714286}h ${i*.714286}v -${i*.714286}z`,transform:E`rotate(45,${d},${h})`},_));}break;case "circle-mixed":{let $=(g+f)%3===0?em:(g+f)%2===0?1:1.25,C=c*$;l.push(P("circle",{cx:b(d),cy:b(h),r:b(C),transform:E`rotate(0,${d},${h})`},_));}break;case "pacman":{let $=i*.5,C=i*.357143;l.push(P("path",{d:E`M ${d-$} ${h-C}v ${i*.714286}h ${$}a ${$*.5} ${$*.5}, 0, 0, 0, 0 -${i*.714286}h -${$}v -${i*.714286}z`,transform:E`rotate(${(g+f)%2===0?0:90},${d},${h})`},_));}break;case "rounded":{let $=i*.5,C=i*.2;l.push(P("rect",{height:b(i),rx:b(C),ry:b(C),transform:E`rotate(0,${d},${h})`,width:b(i),x:b(d-$),y:b(h-$)},_));}break;case "square":{let $=i*.5;l.push(P("rect",{height:b(i),transform:E`rotate(0,${d},${h})`,width:b(i),x:b(d-$),y:b(h-$)},_));}break;case "vertical-line":{let $=i*.714286,C=i;l.push(P("path",{d:E`M ${d-i*.5} ${h-$*.5}v ${$}h ${C}v -${$}z`,transform:E`rotate(90,${d},${h})`},_));}break;default:l.push(P("circle",{cx:b(d),cy:b(h),r:b(c),transform:E`rotate(0,${d},${h})`},_));}if(a!==1&&l.length>y){let $=l.pop();l.push(P("g",{transform:E`translate(${d},${h}) scale(${b(a,6)}) translate(${-d},${-h})`,children:$},_));}}});}),l}function nm(t,e){let n=t*Math.PI/180,i=e/2,r=e/2,o=Math.sqrt(e*e+e*e)/2,a=i-o*Math.cos(n),l=r-o*Math.sin(n),s=i+o*Math.cos(n),c=r+o*Math.sin(n);return {x1:a,y1:l,x2:s,y2:c}}function So(t,e){return `${t}-${te(JSON.stringify(e))}`}function rm(t,e,n,i,r){let o=t;if(t===0)switch(r){case "top-left":o=0;break;case "top-right":o=90;break;case "bottom-left":o=270;break;default:o=0;}let a=o*Math.PI/180,l=e+i/2,s=n+i/2,c=Math.sqrt(i*i+i*i)/2,m=l-c*Math.cos(a),u=s-c*Math.sin(a),f=l+c*Math.cos(a),p=s+c*Math.sin(a);return {x1:m,y1:u,x2:f,y2:p}}function Kn(t,e){return e.map((n,i)=>{let{color:r,opacity:o}=Zn(n.color);return P("stop",{offset:`${n.offset}%`,stopColor:r,stopOpacity:o},`${t}-stop-${i}`)})}function pl(t,e,n,i,r,o){let a=ml(e.stops,e.angle??0,n,i,r),l=a.wedges.map((s,c)=>P("path",{d:s.d,"data-arc":`${s.from} ${s.sweep}`,fill:s.color,fillOpacity:s.opacity,shapeRendering:s.opacity===void 0?void 0:"crispEdges"},`${t}-w-${c}`));return P("pattern",{"data-qrdx-conic":`${b(n)} ${b(i)}`,height:b(o),id:t,patternUnits:"userSpaceOnUse",width:b(o),x:0,y:0,children:a.opacity===void 0?l:P("g",{opacity:a.opacity,children:l})},t)}function om(t="center"){let[e,n]=t.split("-"),i=t==="center"?"center":e,r=n??(e==="left"||e==="right"?e:"center");return {x:r==="left"?0:r==="right"?1:.5,y:i==="top"?0:i==="bottom"?1:.5}}var im=["xMin","xMid","xMax"],am=["YMin","YMid","YMax"];function gl(t,e,n){let i=e.scale??1,r=e.fit==="tile",o=r?n/4*i:n,a=e.underlay?Zn(e.underlay):null,l=r?o:n*i,s=om(e.position),c=r?0:s.x*(n-l),m=r?0:s.y*(n-l),u=r?"xMidYMid slice":`${im[s.x*2]??"xMid"}${am[s.y*2]??"YMid"} ${e.fit==="contain"?"meet":"slice"}`;return ct("pattern",{height:b(o),id:t,patternUnits:"userSpaceOnUse",width:b(o),x:0,y:0,children:[a&&P("rect",{fill:a.color,fillOpacity:a.opacity,height:b(o),width:b(o),x:0,y:0}),P("image",{height:b(l),href:e.src,opacity:(e.opacity??1)<1?e.opacity:void 0,preserveAspectRatio:u,width:b(l),x:b(c),y:b(m)})]},t)}var _l=(t,e)=>So("img",[t,e]);function sm(t,e,n,i,r,o,a){let l=Wt(t);if(l.type==="solid")return null;if(l.type==="image"){let c=_l(l,a);return {id:c,element:gl(c,l,a)}}let s=So(o,[l,e,n,i,r,...l.type==="angular"?[a]:[]]);if(l.type==="linear"){let c=l,m=c.angle??0,{x1:u,y1:f,x2:p,y2:g}=rm(m,e,n,i,r);return {id:s,element:P("linearGradient",{gradientUnits:"userSpaceOnUse",id:s,x1:b(u),x2:b(p),y1:b(f),y2:b(g),children:Kn(s,c.stops)},s)}}if(l.type==="radial"){let c=l,m=e+i/2,u=n+i/2,f=i/2*.97;return {id:s,element:P("radialGradient",{cx:b(m),cy:b(u),fx:b(m),fy:b(u),gradientUnits:"userSpaceOnUse",id:s,r:b(f),children:Kn(s,c.stops)},s)}}return l.type==="angular"?{id:s,element:pl(s,l,e+i/2,n+i/2,i*.75,a)}:null}function xo(t,e,n){let i=Wt(t);if(i.type==="solid")return null;if(i.type==="image"){let o=_l(i,e);return {id:o,element:gl(o,i,e)}}let r=So(n,[i,e]);if(i.type==="linear"){let o=i,a=o.angle??0,{x1:l,y1:s,x2:c,y2:m}=nm(a,e);return {id:r,element:P("linearGradient",{gradientUnits:"userSpaceOnUse",id:r,x1:b(l),x2:b(c),y1:b(s),y2:b(m),children:Kn(r,o.stops)},r)}}if(i.type==="radial"){let o=i,a=e/2,l=e/2,s=e/2*.97;return {id:r,element:P("radialGradient",{cx:b(a),cy:b(l),fx:b(a),fy:b(l),gradientUnits:"userSpaceOnUse",id:r,r:b(s),children:Kn(r,o.stops)},r)}}return i.type==="angular"?{id:r,element:pl(r,i,e/2,e/2,e*.75,e)}:null}var Yn=t=>Ue(t)||ii(t);function hl(t){let e=new Set,n=[];for(let i of t)i&&!e.has(i.id)&&(e.add(i.id),n.push(i.element));return n}function kt(t,e,n){if(e)return {fill:`url(#${e})`};let i=Wt(t,n),r=i.type==="solid"?i.color:i.type==="image"?i.underlay??n:n,{color:o,opacity:a}=Zn(r);return a===void 0?{fill:o}:{fill:o,fillOpacity:a}}function jn(t,e,n,i){if(i==null)return null;let r=t.length,o=Math.floor(e*bn),a=(r+2*n)/e,l=(i.width||o)*a,s=(i.height||o)*a,c=i.x==null?r/2-l/2:i.x*a,m=i.y==null?r/2-s/2:i.y*a,u=null;if(i.excavate){let f=Math.max(0,i.padding??0)*a,p=Math.floor(c-f),g=Math.floor(m-f),d=Math.ceil(l+c+f-p),h=Math.ceil(s+m+f-g);u={x:p,y:g,w:d,h};}return {x:c,y:m,h:s,w:l,excavation:u}}function cn(t){let e=t.level??Qe,{imageSettings:n}=t,i=t.isOGContext&&n?.excavate&&(e==="L"||e==="M")?"Q":e;if(t.autoLevel&&n&&i!=="H"){let r=bt.QrCode.encodeText(t.value,At[i]).getModules(),o=jn(r,t.size??yt,Lt(r.length,t.margin??Ge,t.shape),n);o&&(o.excavation?o.excavation.w*o.excavation.h:o.w*o.h)/(r.length*r.length)>li&&(i="H");}return i}function lm(t,e,n,i){let r=e/n,o=t.w*r,a=t.h*r,l=(t.x+i)*r,s=(t.y+i)*r;return {imgWidth:o,imgHeight:a,imgLeft:l,imgTop:s}}function Te(t){let{value:e,size:n=yt,level:i=Qe,bgColor:r=dt,fgColor:o=ye,eyeColor:a,dotColor:l,bodyPattern:s="circle",cornerEyePattern:c="gear",cornerEyeDotPattern:m="circle",margin:u=Ge,isOGContext:f=false,imageSettings:p,templateId:g,customTemplate:d,customProps:h,frame:_,art:y,eyeColors:$,moduleScale:C,autoLevel:M,shape:x,frameLabelMarkers:S,partMarkers:R,...w}=t,A=Ms({value:e,size:n,margin:u,level:i,shape:x,autoLevel:M,isOGContext:f},p),v=Ut(_),F=v?{}:w,L=V=>v?ns(V,{size:n,frame:_,bgColor:r,svgProps:w,markLabels:S}):V,O=cn({value:e,size:n,level:i,margin:u,imageSettings:A,isOGContext:f,autoLevel:M,shape:x}),N=bt.QrCode.encodeText(e,At[O]),I=N.getModules(),D=Lt(I.length,u,x),B=ps(e,I.length,u,x),T=(V,_t)=>Rs(R,V,_t),G=(V,_t)=>{let Rt=gs(x,V);return Rt?"circle"in Rt?P("circle",{cx:b(V/2),cy:b(V/2),..._t,r:b(V/2),...T("background")}):P("path",{d:Rt.path,..._t,...T("background")}):P("rect",{..._t,height:V,width:V,x:0,y:0,...T("background")})},ot=I.length+D*2,mt=jn(I,n,D,A),K=null;if(A!=null&&mt!=null){mt.excavation!=null&&(I=J1(I,mt.excavation));let{imgWidth:V,imgHeight:_t,imgLeft:Rt,imgTop:ge}=lm(mt,n,ot,D);if(f){let _e=A.shape??"square";K=P("img",{alt:"Logo",src:A.src,style:{position:"absolute",left:`${b(Rt)}px`,top:`${b(ge)}px`,width:`${b(V)}px`,height:`${b(_t)}px`,..._e!=="square"&&{borderRadius:_e==="circle"?"50%":`${b(Math.min(V,_t)*co)}px`},...A.plate&&{backgroundColor:A.plate,padding:`${b(V*uo)}px`,boxSizing:"border-box"}}});}else K=Cs(A,{x:Rt,y:ge,w:V,h:_t}),R&&(K=Se(K,T("logo")));}let X=n/ot,at=I.length,Q=7*X,Nt=1.5*X,De={fgColor:st(o,ye),bgColor:st(r,dt)},wt=Ni(y)?qi({art:y,modules:I,version:N.version,margin:D,pixelSize:X,...De,body:V=>$o(V,{margin:D,pixelSize:X,pattern:s,scale:C})}):null,Be=wt&&R?Se(wt,T("body")):wt,Qo=wt&&y?ia({art:y,version:N.version,...De}):null,_c=wt?null:$o(I,{margin:D,pixelSize:X,pattern:s,scale:C}),cr=B?$o(B,{margin:0,pixelSize:X,pattern:s,scale:C,plain:true}):null,_n=Wt(r,dt),Go=Wt(o,ye),Uo=Yn(_n)?xo(_n,n,"bg-color"):null,ur=Yn(Go)?xo(Go,n,"fg-color"):null,bc=kt(r,Uo?.id??null,dt),zo=kt(o,ur?.id??null,ye),qo=Be?ct(Xt,{children:[Be,cr&&P("g",{...zo,...T("body"),children:cr})]}):ct("g",{...zo,...T("body"),children:[_c,cr]}),se=D*X,le=D*X,ce=(at-7+D)*X,ue=D*X,me=D*X,de=(at-7+D)*X,Ht=st(o,ye),fe=V=>$?.[V]?.outer??Qo?.[V]?.outer??a,he=V=>$?.[V]?.inner??Qo?.[V]?.inner??l,pe=(V,_t,Rt,ge,_e)=>{let _r=Wt(V,Ht);return Yn(_r)?sm(_r,_t,Rt,Q,ge,_e,n):null},mr=pe(fe("topLeft"),se,le,"top-left","corners-square-color-0-0"),dr=pe(fe("topRight"),ce,ue,"top-right","corners-square-color-1-0"),fr=pe(fe("bottomLeft"),me,de,"bottom-left","corners-square-color-0-1"),hr=pe(he("topLeft"),se,le,"top-left","corners-dot-color-0-0"),pr=pe(he("topRight"),ce,ue,"top-right","corners-dot-color-1-0"),gr=pe(he("bottomLeft"),me,de,"bottom-left","corners-dot-color-0-1"),Ho=kt(fe("topLeft"),mr?.id??null,Ht),Wo=kt(fe("topRight"),dr?.id??null,Ht),Vo=kt(fe("bottomLeft"),fr?.id??null,Ht),jo=kt(he("topLeft"),hr?.id??null,Ht),Zo=kt(he("topRight"),pr?.id??null,Ht),Xo=kt(he("bottomLeft"),gr?.id??null,Ht),Yo=Vn(se,le,Q,c,"top-left"),Ko=Wn(se+Q/2,le+Q/2,Nt,m,"top-left"),Jo=Vn(ce,ue,Q,c,"top-right"),ti=Wn(ce+Q/2,ue+Q/2,Nt,m,"top-right"),ei=Vn(me,de,Q,c,"bottom-left"),ni=Wn(me+Q/2,de+Q/2,Nt,m,"bottom-left"),yc=ct(Xt,{children:[P("defs",{children:hl([Uo,ur,mr,dr,fr,hr,pr,gr])}),G(n,bc),qo,P("g",{...Ho,...T("eye-outer","top-left"),children:P("path",{d:Yo,fillRule:"evenodd",transform:E`rotate(0,${se+Q/2},${le+Q/2})`})}),P("g",{...jo,...T("eye-centre","top-left"),children:Ko}),P("g",{...Wo,...T("eye-outer","top-right"),children:P("path",{d:Jo,fillRule:"evenodd",transform:E`rotate(0,${ce+Q/2},${ue+Q/2})`})}),P("g",{...Zo,...T("eye-centre","top-right"),children:ti}),P("g",{...Vo,...T("eye-outer","bottom-left"),children:P("path",{d:ei,fillRule:"evenodd",transform:E`rotate(0,${me+Q/2},${de+Q/2})`})}),P("g",{...Xo,...T("eye-centre","bottom-left"),children:ni}),K]}),ri=d||(g?il(g):void 0);if(ri){let _t=Yn(_n)?xo(_n,300,"bg-color-template"):null,Rt=kt(r,_t?.id??null,dt),ge=ct("svg",{height:300,viewBox:"0 0 300 300",width:300,xmlns:"http://www.w3.org/2000/svg",children:[P("defs",{children:hl([_t,ur,mr,dr,fr,hr,pr,gr])}),G(300,Rt),ct("g",{transform:`scale(${b(300/n,6)})`,children:[qo,P("g",{...Ho,...T("eye-outer","top-left"),children:P("path",{d:Yo,fillRule:"evenodd",transform:E`rotate(0,${se+Q/2},${le+Q/2})`})}),P("g",{...jo,...T("eye-centre","top-left"),children:Ko}),P("g",{...Wo,...T("eye-outer","top-right"),children:P("path",{d:Jo,fillRule:"evenodd",transform:E`rotate(0,${ce+Q/2},${ue+Q/2})`})}),P("g",{...Zo,...T("eye-centre","top-right"),children:ti}),P("g",{...Vo,...T("eye-outer","bottom-left"),children:P("path",{d:ei,fillRule:"evenodd",transform:E`rotate(0,${me+Q/2},${de+Q/2})`})}),P("g",{...Xo,...T("eye-centre","bottom-left"),children:ni}),K]})]}),_e=300/n,$c={pixelSize:X*_e,url:e},oi=ri.wrapper(ge,{fgColor:o,bgColor:r,...h||{},...w},$c),xc={...oi?.props?.style||{},width:void 0,height:void 0,...F.style};return L(Se(oi,{...F,width:n,height:n,style:xc}))}return L(P("svg",{height:n,viewBox:`0 0 ${n} ${n}`,width:n,xmlns:"http://www.w3.org/2000/svg",...F,children:yc}))}(()=>{try{new Path2D().addPath(new Path2D);}catch{return false}return true})();var cm=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),um=new Map([["className","class"],["tabIndex","tabindex"],["dir","dir"],["role","role"],["viewBox","viewBox"],["width","width"],["height","height"],["xlinkActuate","xlink:actuate"],["xlinkArcrole","xlink:arcrole"],["xlinkRole","xlink:role"],["xlinkShow","xlink:show"],["xlinkTitle","xlink:title"],["xlinkType","xlink:type"],["xmlBase","xml:base"],["xmlLang","xml:lang"],["xmlSpace","xml:space"]]),mm=new Set(["children","dangerouslySetInnerHTML","key","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","ref"]),dm=new Set(["inert","allowFullScreen","async","autoPlay","controls","credentialless","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"]),fm=new Set(["autoFocus","multiple","muted"]),hm=new Set(["contentEditable","spellCheck","draggable","value","autoReverse","externalResourcesRequired","focusable","preserveAlpha"]),pm=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")),bl=":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",gm=new RegExp(`^[${bl}][${bl}\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Jn=/^[a-zA-Z][a-zA-Z:_.\-\d]*$/,_m=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i,bm="javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')",ym=t=>_m.test(t)?bm:t,$l=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),$m=/["'&<>]/;function Co(t){if(!$m.test(t))return t;let e="",n=0;for(let i=0;i<t.length;i++){let r;switch(t.charCodeAt(i)){case 34:r="&quot;";break;case 38:r="&amp;";break;case 39:r="&#x27;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;default:continue}e+=t.slice(n,i)+r,n=i+1;}return e+t.slice(n)}var Tt=t=>typeof t=="function"||typeof t=="symbol",yl=new Map,xm=t=>{let e=yl.get(t);return e===void 0&&(e=t.replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^ms-/,"-ms-"),yl.set(t,e)),e};function Sm(t){if(typeof t=="string")return t;if(typeof t!="object"||t===null)return "";let e="";for(let n of Object.keys(t)){let i=t[n];if(i==null||typeof i=="boolean"||i==="")continue;let r;if(n.startsWith("--"))r=`${n}:${`${i}`.trim()}`;else {let o=typeof i=="number"?i===0||pm.has(n)?`${i}`:`${i}px`:`${i}`.trim();r=`${xm(n)}:${o}`;}e=e?`${e};${r}`:r;}return e}function tr(t,e){if(e==null||mm.has(t))return null;let n=um.get(t);if(n!==void 0)return Tt(e)||typeof e=="boolean"?null:{name:n,value:`${e}`};switch(t){case "style":{let r=Sm(e);return r?{name:"style",value:r}:null}case "src":case "href":case "action":case "formAction":case "xlinkHref":return (t==="src"||t==="href")&&e===""||Tt(e)||typeof e=="boolean"?null:{name:t==="xlinkHref"?"xlink:href":t,value:ym(`${e}`)};case "capture":case "download":return e===true?{name:t,value:""}:e===false||Tt(e)?null:{name:t,value:`${e}`};case "cols":case "rows":case "size":case "span":return Tt(e)||Number.isNaN(Number(e))||!(e>=1)?null:{name:t,value:`${e}`};case "rowSpan":case "start":return Tt(e)||Number.isNaN(Number(e))?null:{name:t,value:`${e}`};}if(fm.has(t))return e&&!Tt(e)?{name:t.toLowerCase(),value:""}:null;if(hm.has(t))return Tt(e)?null:{name:t,value:`${e}`};if(dm.has(t))return e&&!Tt(e)?{name:t,value:""}:null;if(t.length>2&&(t[0]==="o"||t[0]==="O")&&(t[1]==="n"||t[1]==="N"))return null;let i=cm.get(t)??t;if(!gm.test(i)||Tt(e))return null;if(typeof e=="boolean"){let r=i.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-")return null}return {name:i,value:`${e}`}}var xl="http://www.w3.org/2000/svg",Sl="http://www.w3.org/1999/xhtml",Cm="http://www.w3.org/1999/xlink",Mm="http://www.w3.org/XML/1998/namespace",wm="http://www.w3.org/2000/xmlns/";function Rm(t,e,n){e==="xmlns"||e.startsWith("xmlns:")?t.setAttributeNS(wm,e,n):e.startsWith("xlink:")?t.setAttributeNS(Cm,e,n):e.startsWith("xml:")?t.setAttributeNS(Mm,e,n):t.setAttribute(e,n);}function hn(t,e,n,i){if(e==null||typeof e=="boolean")return;if(typeof e=="string"||typeof e=="number"||typeof e=="bigint"){t.appendChild(i.createTextNode(`${e}`));return}if(Array.isArray(e)){for(let s of e)hn(t,s,n,i);return}if(!vn(e))throw new TypeError("qrdx: can't render this value as DOM nodes");let{type:r,props:o}=e;if(Fn(r)){hn(t,o.children,n,i);return}if(typeof r=="function"){hn(t,r(o),n,i);return}if(!Jn.test(r))throw new TypeError(`qrdx: invalid element name: ${r}`);let a=r==="svg"?xl:n,l=i.createElementNS(a,r);for(let s of Object.keys(o)){let c=tr(s,o[s]);c&&Rm(l,c.name,c.value);}hn(l,o.children,a===xl&&r==="foreignObject"?Sl:a,i),t.appendChild(l);}function Mo(t,e=document){let n=e.createDocumentFragment();return hn(n,t,Sl,e),n}function Mt(t){if(t==null||typeof t=="boolean")return "";if(typeof t=="string")return Co(t);if(typeof t=="number"||typeof t=="bigint")return `${t}`;if(Array.isArray(t)){let e="";for(let n of t)e+=Mt(n);return e}if(!vn(t))throw new TypeError("qrdx: can't render this value as SVG markup");return Em(t)}function Em(t){let{type:e,props:n}=t;if(Fn(e))return Mt(n.children);if(typeof e=="function")return Mt(e(n));if(!Jn.test(e))throw new TypeError(`qrdx: invalid element name: ${e}`);let i=`<${e}`;for(let a of Object.keys(n)){let l=tr(a,n[a]);l&&(i+=` ${l.name}="${Co(l.value)}"`);}if($l.has(e))return `${i}/>`;let r=n.dangerouslySetInnerHTML?.__html,o=r==null?Mt(n.children):`${r}`;return `${i}>${o}</${e}>`}function Cl(t){return Mt(Te(t))}var wo=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Am=8,Ro=class{buffer;position=0;bits=0;used=0;constructor(e){this.buffer=new Uint8Array(Math.max(e,64));}write(e,n){if(n!==0)for(this.bits|=e<<this.used,this.used+=n;this.used>=8;){if(this.position===this.buffer.length){let i=new Uint8Array(this.buffer.length*2);i.set(this.buffer),this.buffer=i;}this.buffer[this.position++]=this.bits&255,this.bits>>>=8,this.used-=8;}}finish(){return this.used>0&&this.write(0,8-this.used),this.buffer.subarray(0,this.position)}};function Pl(t,e){let n=new Uint8Array(t.length),i=[];for(let c=0;c<t.length;c++)(t[c]??0)>0&&i.push(c);if(i.length===0)return n;if(i.length===1)return n[i[0]]=1,n;let r=i.length,o=2*r-1,a=new Float64Array(o),l=new Int32Array(o),s=new Uint8Array(o);for(let c=1;;c*=2){for(let d=0;d<r;d++)a[d]=Math.max(t[i[d]]??0,c);let m=Array.from({length:r},(d,h)=>h).sort((d,h)=>a[d]-a[h]||d-h),u=0,f=r,p=d=>u<r&&(f>=d||a[m[u]]<=a[f])?m[u++]:f++;for(let d=r;d<o;d++){let h=p(d),_=p(d);a[d]=a[h]+a[_],l[h]=d,l[_]=d;}s[o-1]=0;let g=0;for(let d=o-2;d>=0;d--){let h=s[l[d]]+1;s[d]=h,d<r&&h>g&&(g=h);}if(g<=e){for(let d=0;d<r;d++)n[i[d]]=s[d];return n}}}function Pm(t,e){let n=0;for(let i=0;i<e;i++)n=n<<1|t>>i&1;return n}function vl(t){let e=new Uint16Array(16),n=0;for(let l of t)l>0&&(e[l]=e[l]+1,n++);let i=new Uint16Array(16),r=0;for(let l=1;l<=15;l++)r=r+e[l-1]<<1,i[l]=r;let o=new Uint16Array(t.length),a=new Uint8Array(t.length);return t.forEach((l,s)=>{if(l===0)return;let c=i[l];i[l]=c+1,o[s]=Pm(c,l),a[s]=n===1?0:l;}),{lengths:t,codes:o,emitted:a}}function ie(t,e,n){t.write(e.codes[n],e.emitted[n]);}function vm(t){let e=[],n=o=>e.push({code:o,extra:0,extraBits:0}),i=Am,r=0;for(;r<t.length;){let o=t[r],a=1;for(;r+a<t.length&&t[r+a]===o;)a++;r+=a;let l=a;if(o===0){for(;l>0;)if(l<3)for(;l>0;l--)n(0);else if(l<=10)e.push({code:17,extra:l-3,extraBits:3}),l=0;else {let s=Math.min(l,138);e.push({code:18,extra:s-11,extraBits:7}),l-=s;}continue}for(o!==i&&(n(o),i=o,l--);l>0;)if(l<3)for(;l>0;l--)n(o);else {let s=Math.min(l,6);e.push({code:16,extra:s-3,extraBits:2}),l-=s;}}return e}function Fm(t,e){let n=[];if(e.forEach((l,s)=>{l>0&&n.push(s);}),n.length<=2&&n.every(l=>l<256)){let[l=0,s]=n;t.write(1,1),t.write(n.length===2?1:0,1),l<2?(t.write(0,1),t.write(l,1)):(t.write(1,1),t.write(l,8)),s!==void 0&&t.write(s,8);return}let i=vm(e),r=new Uint32Array(19);for(let l of i)r[l.code]=r[l.code]+1;let o=vl(Pl(r,7)),a=wo.length;for(;a>4&&o.lengths[wo[a-1]]===0;)a--;t.write(0,1),t.write(a-4,4);for(let l=0;l<a;l++)t.write(o.lengths[wo[l]],3);t.write(0,1);for(let l of i)ie(t,o,l.code),t.write(l.extra,l.extraBits);}function er(t){let e=t-1;if(e<4)return {symbol:e,extra:0,extraBits:0};let n=31-Math.clz32(e),i=e>>n-1&1,r=n-1;return {symbol:2*n+i,extra:e&(1<<r)-1,extraBits:r}}function Ml(t,e,n,i){let r=0;for(;r<i&&t[e+r]===t[e+r-n];)r++;return r}function wl(t,e,n){let i=t.length,r=0;for(;r<i;){let o=Math.min(4096,i-r),a=r>=1?Ml(t,r,1,o):0,l=r>=e?Ml(t,r,e,o):0;if(Math.max(a,l)>=3){l>=a?(n.copy(l,e===1?2:1),r+=l):(n.copy(a,2),r+=a);continue}n.literal(t[r]),r++;}}var Rl=20;function El(t,e,n){for(let i=0;i<n.length;i++)t[e+i]=n.charCodeAt(i);}function Al(t,e,n){t[e]=n&255,t[e+1]=n>>>8&255,t[e+2]=n>>>16&255,t[e+3]=n>>>24&255;}function Fl(t,e,n){if(!(Number.isInteger(e)&&Number.isInteger(n))||e<1||n<1||e>16384||n>16384)throw new RangeError(`WebP images are 1 to 16384 pixels wide and high (got ${e} \xD7 ${n})`);let i=e*n;if(t.length<i*4)throw new RangeError(`Expected ${i*4} bytes of RGBA for ${e} \xD7 ${n}, got ${t.length}`);let r=new Uint32Array(i),o=false;for(let M=0;M<i;M++){let x=M*4,S=t[x],R=t[x+1],w=t[x+2],A=t[x+3];A!==255&&(o=true),r[M]=(A<<24|(S-R&255)<<16|R<<8|w-R&255)>>>0;}let a=new Uint32Array(280),l=new Uint32Array(256),s=new Uint32Array(256),c=new Uint32Array(256),m=new Uint32Array(40);wl(r,e,{literal(M){a[M>>>8&255]++,l[M>>>16&255]++,s[M&255]++,c[M>>>24]++;},copy(M,x){a[256+er(M).symbol]++,m[er(x).symbol]++;}});let u=[a,l,s,c,m].map(M=>Pl(M,15)),[f,p,g,d,h]=u.map(vl),_=new Ro(Math.ceil(i/4)+1024);_.write(47,8),_.write(e-1,14),_.write(n-1,14),_.write(o?1:0,1),_.write(0,3),_.write(1,1),_.write(2,2),_.write(0,1),_.write(0,1),_.write(0,1);for(let M of u)Fm(_,M);wl(r,e,{literal(M){ie(_,f,M>>>8&255),ie(_,p,M>>>16&255),ie(_,g,M&255),ie(_,d,M>>>24);},copy(M,x){let S=er(M);ie(_,f,256+S.symbol),_.write(S.extra,S.extraBits);let R=er(x);ie(_,h,R.symbol),_.write(R.extra,R.extraBits);}});let y=_.finish(),$=y.length+(y.length&1),C=new Uint8Array(Rl+$);return El(C,0,"RIFF"),Al(C,4,C.length-8),El(C,8,"WEBPVP8L"),Al(C,16,y.length),C.set(y,Rl),C}function Eo(t,e,n){return String.fromCharCode(...t.subarray(e,e+n))}function Lm(t){return t.length>=12&&Eo(t,0,4)==="RIFF"&&Eo(t,8,4)==="WEBP"}function Ll(t){if(!Lm(t))return null;let e=12;for(;e+8<=t.length;){let n=Eo(t,e,4);if(n==="VP8L")return "lossless";if(n==="VP8 ")return "lossy";let i=(t[e+4]|t[e+5]<<8|t[e+6]<<16|t[e+7]<<24)>>>0;e+=8+i+(i&1);}return null}function Im(t,e,n){return typeof t.toBlob!="function"?Promise.resolve(null):new Promise(i=>{try{t.toBlob(i,e,n);}catch{i(null);}})}async function nr(t,e={}){let n=e.quality!==void 0,i=n?Math.min(1,Math.max(0,Number(e.quality))):1,r=await Im(t,"image/webp",i);if(r){let s=new Uint8Array(await r.arrayBuffer()),c=Ll(s);if(c==="lossless"||n&&c==="lossy")return new Blob([s],{type:"image/webp"})}let o=t.getContext("2d");if(!o)throw new Error("Could not get canvas context");let{data:a}=o.getImageData(0,0,t.width,t.height),l=Fl(a,t.width,t.height);return new Blob([l],{type:"image/webp"})}var Il=32768;async function qt(t){let e=new Uint8Array(await t.arrayBuffer()),n="";for(let i=0;i<e.length;i+=Il)n+=String.fromCharCode(...e.subarray(i,i+Il));return `data:${t.type||"application/octet-stream"};base64,${btoa(n)}`}async function ae(t){let e={...t};if(t.imageSettings?.src)try{let m=await km(t.imageSettings.src);e={...t,imageSettings:{...t.imageSettings,src:m}};}catch{let{imageSettings:m,...u}=t;e=u;}let{hideLogo:n,url:i,logo:r,scale:o,frameLabelMarkers:a,partMarkers:l,...s}=e,c=Cl({...s,templateId:e.templateId,customTemplate:e.customTemplate});return `data:image/svg+xml,${encodeURIComponent(c)}`}var km=t=>new Promise((e,n)=>{if(t.startsWith("data:")){e(t);return}let i=new Image;i.crossOrigin="anonymous",i.onload=()=>{try{let r=document.createElement("canvas");r.width=i.naturalWidth||i.width,r.height=i.naturalHeight||i.height;let o=r.getContext("2d");if(!o){n(new Error("Could not get canvas context"));return}o.drawImage(i,0,0);let a=r.toDataURL("image/png");r.remove(),e(a);}catch(r){n(new Error(`Failed to convert image to base64: ${r}`));}},i.onerror=()=>{n(new Error(`Could not load image from ${t.slice(0,100)}... Check CORS settings or use a data URL.`));},i.src=t;});async function pn(t,e,n){let i=await ae(t),r=decodeURIComponent(i.replace("data:image/svg+xml,","")),o;try{let a=new TextEncoder().encode(r),l=Array.from(a,c=>String.fromCharCode(c)).join("");o=`data:image/svg+xml;base64,${btoa(l)}`;}catch(a){throw new Error(`Failed to encode SVG for canvas conversion: ${a}`)}return new Promise((a,l)=>{let s=document.createElement("canvas"),c=s.getContext("2d");if(!c){l(new Error("Could not get canvas context"));return}let m=new Image,{width:u,height:f}=sn(t.size||yt,t.frame);s.width=Math.round(u),s.height=Math.round(f);let p=setTimeout(()=>{s.remove(),l(new Error("SVG load timeout - image may be too large or contain invalid data"));},3e4);m.onload=()=>{clearTimeout(p);try{if(e==="image/jpeg"&&(c.fillStyle="white",c.fillRect(0,0,s.width,s.height)),c.drawImage(m,0,0,s.width,s.height),n)a(s);else if(e==="image/webp")nr(s).then(qt).then(a,l).finally(()=>s.remove());else if(e==="image/bmp")qt(kn(s)).then(a,l).finally(()=>s.remove());else {let g=s.toDataURL(e,1);s.remove(),a(g);}}catch(g){clearTimeout(p),s.remove(),l(new Error(`Failed to draw SVG to canvas: ${g}`));}},m.onerror=()=>{clearTimeout(p),s.remove(),l(new Error("Could not load SVG"));},m.src=o;})}var kl=["gradientUnits","gradientTransform","spreadMethod"],Tm={linear:["x1","y1","x2","y2"],radial:["cx","cy","r","fx","fy","fr"]},Nm={r:0,g:0,b:0,a:1};function Tl(t,e){for(let n of (t.attrs.style??"").split(";")){let[i,...r]=n.split(":");if(i?.trim()===e)return r.join(":").trim()}return t.attrs[e]}function Ao(t){return t.name==="linearGradient"?"linear":t.name==="radialGradient"?"radial":null}function Om(t){let e=[],n=0;for(let i of t.children){if(i.name!=="stop")continue;let r=(i.attrs.offset??"0").trim(),o=Number.parseFloat(r),a=Number.isFinite(o)?r.endsWith("%")?o/100:o:0;n=Math.max(n,Math.min(Math.max(a,0),1));let l=Tl(i,"stop-color")??"#000000",s=lt(l==="currentColor"?"#000000":l)??Nm,c=Number.parseFloat(Tl(i,"stop-opacity")??"1");e.push({offset:n,color:Number.isFinite(c)?{...s,a:s.a*Math.min(Math.max(c,0),1)}:s});}return e}function Ol(t){let e=new Map,n=r=>{let o=r.attrs.id;Ao(r)&&o&&!e.has(o)&&e.set(o,r);for(let a of r.children)n(a);};n(t);let i=new Map;for(let[r,o]of e){let a=Ao(o),l={},s=[],c=new Set,m=o;for(;m&&!c.has(m);){c.add(m);let u=Ao(m)===a?[...kl,...Tm[a]]:kl;for(let p of u){let g=m.attrs[p];l[p]===void 0&&g!==void 0&&(l[p]=g);}s.length===0&&(s=Om(m));let f=m.attrs.href??m.attrs["xlink:href"];m=f?.startsWith("#")?e.get(f.slice(1)):void 0;}i.set(r,{kind:a,attrs:l,stops:s});}return i}function Po(t){let e=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY,o=(u,f)=>{e=Math.min(e,u),i=Math.max(i,u),n=Math.min(n,f),r=Math.max(r,f);},a=(u,f,p,g)=>{let d=-u+3*f-3*p+g,h=2*(u-2*f+p),_=f-u;if(Math.abs(d)<1e-12)return Math.abs(h)<1e-12?[]:[-_/h];let y=h*h-4*d*_;if(y<0)return [];let $=Math.sqrt(y);return [(-h+$)/(2*d),(-h-$)/(2*d)]},l=(u,f,p,g,d)=>{let h=1-u;return h*h*h*f+3*h*h*u*p+3*h*u*u*g+u**3*d},s=0,c=0,m=[0,0];for(let u of t)if(u.op==="M"&&(m=[u.x,u.y]),u.op==="M"||u.op==="L")o(u.x,u.y),s=u.x,c=u.y;else if(u.op==="C"){o(u.x,u.y);for(let f of [...a(s,u.x1,u.x2,u.x),...a(c,u.y1,u.y2,u.y)])f>0&&f<1&&o(l(f,s,u.x1,u.x2,u.x),l(f,c,u.y1,u.y2,u.y));s=u.x,c=u.y;}else [s,c]=m;return Number.isFinite(e)?{x:e,y:n,width:i-e,height:r-n}:null}var Dm=t=>t[0]*t[3]-t[1]*t[2];function Ne(t){let e=Dm(t);if(!Number.isFinite(e)||Math.abs(e)<1e-12)return null;let[n,i,r,o,a,l]=t;return [o/e,-i/e,-r/e,n/e,(r*l-o*a)/e,(i*a-n*l)/e]}function Dl(t,e,n){let{kind:i,attrs:r,stops:o}=t,a=o[0],l=o.at(-1);if(!(a&&l)||o.every(x=>x.color.a===0))return null;if(o.length===1)return a.color;let s=r.gradientUnits==="userSpaceOnUse",c=xn;if(!s){let x=Po(e);if(!x||x.width<=0||x.height<=0)return null;c=[x.width,0,0,x.height,x.x,x.y];}let m=ft(c,Vt(r.gradientTransform));if(!Ne(m))return l.color;let[u,f]=n,p=Math.sqrt((u*u+f*f)/2),g=(x,S)=>{let R=Number.parseFloat(x);return Number.isFinite(R)?x.trim().endsWith("%")?R/100*(s?S:1):R:null},d=(x,S,R)=>g(r[x]??S,R)??g(S,R)??0;if(i==="linear"){let x=[d("x1","0%",u),d("y1","0%",f),d("x2","100%",u),d("y2","0%",f)],[S,R,w,A]=x;return S===w&&R===A?l.color:{kind:i,coords:x,matrix:m,stops:o}}let h=d("cx","50%",u),_=d("cy","50%",f),y=d("r","50%",p),$=r.fx===void 0?h:d("fx","50%",u),C=r.fy===void 0?_:d("fy","50%",f),M=Math.max(0,d("fr","0%",p));return y<0?null:y===0?l.color:{kind:i,coords:[$,C,M,h,_,y],matrix:m,stops:o}}function Bl(t){return t.map(e=>b(e,6)).join(" ")}function Bm(t,e){return (e==="cmyk"?Ze(t.r,t.g,t.b):[t.r/255,t.g/255,t.b/255]).map(i=>b(i,4)).join(" ")}var Nl=(t,e)=>`<< /FunctionType 2 /Domain [0 1] /C0 [${t}] /C1 [${e}] /N 1 >>`;function Qm(t,e){let n=[],i=t.map(l=>U(l.offset,4)),r=t.map(l=>Bm(l.color,e)),o=i[0],a=i.at(-1);if(o>0){let l=r[0];n.push({from:0,to:o,c0:l,c1:l});}for(let l=0;l+1<t.length;l++){let s=i[l],c=i[l+1];c>s&&n.push({from:s,to:c,c0:r[l],c1:r[l+1]});}if(a<1){let l=r.at(-1);n.push({from:a,to:1,c0:l,c1:l});}if(n.length===1){let[l]=n;return Nl(l.c0,l.c1)}return ["<< /FunctionType 3 /Domain [0 1]",`/Functions [${n.map(l=>Nl(l.c0,l.c1)).join(" ")}]`,`/Bounds [${n.slice(1).map(l=>b(l.from,4)).join(" ")}]`,`/Encode [${n.map(()=>"0 1").join(" ")}] >>`].join(" ")}function Ql(t,e){return [`<< /ShadingType ${t.kind==="linear"?2:3}`,`/ColorSpace /Device${e==="cmyk"?"CMYK":"RGB"}`,`/Coords [${t.coords.map(n=>b(n,6)).join(" ")}]`,`/Function ${Qm(t.stops,e)}`,"/Extend [true true] >>"].join(" ")}function Gm(t,e){if(t.op==="Z")return t;if(t.op==="C"){let[r,o]=J(e,t.x1,t.y1),[a,l]=J(e,t.x2,t.y2),[s,c]=J(e,t.x,t.y);return {op:"C",x1:r,y1:o,x2:a,y2:l,x:s,y:c}}let[n,i]=J(e,t.x,t.y);return {op:t.op,x:n,y:i}}var Gl={r:255,g:255,b:255,a:1},Um=/^url\(\s*#bg-color-/,rr=/^url\(\s*#([^)\s]+)\s*\)/,zm=new Set(["defs","clipPath","mask","pattern","linearGradient","radialGradient","symbol","title","desc","metadata","style","script","use","foreignObject"]);function it(t,e){let n=t.attrs.style;if(n)for(let i of n.split(";")){let[r,...o]=i.split(":");if(r?.trim()===e)return o.join(":").trim()}return t.attrs[e]}function Z(t,e,n=0){if(t===void 0||t==="")return n;let i=Number.parseFloat(t);return Number.isNaN(i)?n:t.trim().endsWith("%")?i/100*e:i}function vo(t,e){if((t.name==="linearGradient"||t.name==="radialGradient")&&t.attrs.id){let n=t.children.find(r=>r.name==="stop"),i=n&&(it(n,"stop-color")??"#000000");i&&e.set(t.attrs.id,i);}for(let n of t.children)vo(n,e);return e}function Fo(t,e){if(t.name==="image"){let n=t.attrs.href??t.attrs["xlink:href"];n&&e.add(n);}for(let n of t.children)Fo(n,e);return e}async function Ul(t){return typeof document>"u"||typeof Image>"u"?null:await new Promise(e=>{let n=new Image;n.crossOrigin="anonymous",n.onload=()=>{let i=document.createElement("canvas"),r=Math.max(n.naturalWidth||512,n.naturalHeight||512),o=Math.min(1024/r,4);i.width=Math.round((n.naturalWidth||512)*o),i.height=Math.round((n.naturalHeight||512)*o);let a=i.getContext("2d");if(!a){e(null);return}a.drawImage(n,0,0,i.width,i.height);try{e(i.toDataURL("image/png"));}catch{e(null);}},n.onerror=()=>e(null),n.src=t;})}function zl(t,e){t.name==="clipPath"&&t.attrs.id&&e.set(t.attrs.id,t);for(let n of t.children)zl(n,e);return e}function ql(t,e){t.name==="pattern"&&t.attrs.id&&e.set(t.attrs.id,t);for(let n of t.children)ql(n,e);return e}function qm(t,e){let[n,i]=e,r=(o,a)=>Z(t.attrs[o],a);switch(t.name){case "path":return jt(t.attrs.d??"");case "rect":{let o=t.attrs.rx??t.attrs.ry,a=t.attrs.ry??t.attrs.rx;return xe(r("x",n),r("y",i),r("width",n),r("height",i),Z(o,n),Z(a,i))}case "circle":{let o=r("r",Math.hypot(n,i)/Math.SQRT2);return We(r("cx",n),r("cy",i),o,o)}case "ellipse":return We(r("cx",n),r("cy",i),r("rx",n),r("ry",i));default:return []}}var or=class{gradients;shadings;clipPaths=new Map;patterns=new Map;backdrop=Gl;paper=Gl;background=null;onPaper=false;inConic=false;constructor(e,n=null){this.gradients=e,this.shadings=n;}resolveColor(e){if(!e||e==="none")return null;let n=rr.exec(e);if(n)return this.resolveColor(this.gradients.get(n[1]));let i=lt(e==="currentColor"?"#000000":e);return i&&i.a>0?i:null}shadedGradient(e){let n=e?rr.exec(e)?.[1]:void 0;return n?this.shadings?.get(n):void 0}resolveFill(e,n,i,r=1){if(r<=0)return null;let o=this.patternOf(e);if(o)return {pattern:o,alpha:r};let a=this.shadedGradient(e);if(a){let c=Dl(a,n,i);if(!c)return null;if("coords"in c)return {gradient:c,alpha:r};let m={...c,a:c.a*r};return m.a>0?{color:m}:null}let l=this.resolveColor(e);if(!l)return null;let s={...l,a:l.a*r};return s.a>0?{color:s}:null}patternOf(e){let n=e?rr.exec(e)?.[1]:void 0,i=n?this.patterns.get(n):void 0;if(!(i?.attrs.patternUnits!=="userSpaceOnUse"||(i.attrs.patternContentUnits??"userSpaceOnUse")!=="userSpaceOnUse"||i.attrs.viewBox))return i}flatten(e){if(e.a>=1)return e;let n=this.background,i=n!==null&&Math.abs(n.r-e.r)<.5&&Math.abs(n.g-e.g)<.5&&Math.abs(n.b-e.b)<.5&&Math.abs(n.a-e.a)<.002;return Xn(e,this.onPaper||i?this.paper:this.backdrop)}paintPattern(e,n,i,r){let o=Po(e);if(!o||o.width<=0||o.height<=0)return true;let[a,l]=n.viewport,s=Z(i.attrs.x,a),c=Z(i.attrs.y,l),m=Z(i.attrs.width,a),u=Z(i.attrs.height,l);if(!(m>0&&u>0))return true;let f=Vt(i.attrs.patternTransform),p=Ne(f);if(!p)return true;if(!this.beginClip(e,n.matrix,n.fillRule==="evenodd"))return false;let g=this.inConic;this.inConic=i.attrs["data-qrdx-conic"]!==void 0;try{let d=[J(p,o.x,o.y),J(p,o.x+o.width,o.y),J(p,o.x,o.y+o.height),J(p,o.x+o.width,o.y+o.height)],h=d.map(([L])=>L),_=d.map(([,L])=>L),y=Math.min(...h),$=Math.max(...h),C=Math.min(..._),M=Math.max(..._),x=Math.floor((y-s)/m),S=Math.ceil(($-s)/m)-1,R=Math.floor((C-c)/u),w=Math.ceil((M-c)/u)-1,A=(S-x+1)*(w-R+1);if(A>4096)return !0;let v=(i.attrs["data-qrdx-conic"]??"").trim().split(/\s+/).map(Number),F=ft(n.matrix,f);for(let L=R;L<=w;L++)for(let O=x;O<=S;O++){let N=s+O*m,I=c+L*u,D=ft(F,[1,0,0,1,N,I]),B={x:y-N,y:C-I,width:$-y,height:M-C},T=v.length===2&&v.every(Number.isFinite)?dl(v[0],v[1],B):null,G=A>1&&this.beginClip([{op:"M",x:0,y:0},{op:"L",x:m,y:0},{op:"L",x:m,y:u},{op:"L",x:0,y:u},{op:"Z"}],D,!1);try{let ot={matrix:D,viewport:n.viewport,fill:"#000000",fillRule:"nonzero",stroke:"none",strokeWidth:1,fontSize:16,fontWeight:"normal",textAnchor:"start",fillOpacity:1,opacity:r},mt=(K,X)=>{for(let at of K){if(at.name==="g"&&!at.attrs.transform){let Q=Number.parseFloat(at.attrs.opacity??"1");mt(at.children,{...X,opacity:(X.opacity??1)*(Number.isFinite(Q)?Q:1)});continue}if(T&&at.attrs["data-arc"]){let[Q,Nt]=at.attrs["data-arc"].split(/\s+/).map(Number);if(!fl([Q,Q+Nt],T))continue}this.walk(at,X);}};mt(i.children,ot);}finally{G&&this.endClip();}}}finally{this.inConic=g,this.endClip();}return true}paintBleed(e,n,i,r){if(!this.shadedGradient(i))return false;let[o,a]=this.viewportMatrix({...e,attrs:{...e.attrs,x:"0",y:"0"}},{...n,matrix:ft(n.matrix,Vt(e.attrs.transform))}),l=Ne(o);if(!l)return false;let[s,c,m,u]=r,p=[[s,c],[m,c],[m,u],[s,u]].map(([g,d])=>J(l,g,d)).map(([g,d],h)=>({op:h===0?"M":"L",x:g,y:d}));return p.push({op:"Z"}),this.paint(p,{name:"rect",attrs:{},children:[],text:""},{...n,matrix:o,viewport:a,fill:i,fillRule:"nonzero",stroke:"none"}),true}beginClip(e,n,i){return false}endClip(){}clipOf(e,n){let i=it(e,"clip-path"),r=i?rr.exec(i)?.[1]:void 0,o=r?this.clipPaths.get(r):void 0;if(!o)return null;let a=[],l=false;for(let s of o.children){let c=qm(s,n.viewport);if(c.length===0)continue;let m=Vt(s.attrs.transform),u=m[0]===1&&m[1]===0&&m[2]===0&&m[3]===1&&m[4]===0&&m[5]===0;a.push(...u?c:c.map(f=>Gm(f,m))),l||=it(s,"clip-rule")==="evenodd";}return a.length>0?{segments:a,matrix:n.matrix,evenOdd:l}:null}viewportMatrix(e,n){let i=Z(e.attrs.x,n.viewport[0]),r=Z(e.attrs.y,n.viewport[1]),o=Z(e.attrs.width,n.viewport[0],n.viewport[0]),a=Z(e.attrs.height,n.viewport[1],n.viewport[1]),l=Mn(e.attrs.viewBox);if(l.length!==4||!(l[2]&&l[3]))return [ft(n.matrix,[1,0,0,1,i,r]),[o,a]];let[s,c,m,u]=l,f=o/m,p=a/u,g=i,d=r;if((e.attrs.preserveAspectRatio??"").trim()!=="none"){let h=e.attrs.preserveAspectRatio?.includes("slice")?Math.max(f,p):Math.min(f,p);g+=(o-m*h)/2,d+=(a-u*h)/2,f=h,p=h;}return [ft(n.matrix,[f,0,0,p,g-s*f,d-c*p]),[m,u]]}walk(e,n,i=false){if(i&&(this.clipPaths=zl(e,new Map),this.patterns=ql(e,new Map)),zm.has(e.name)||it(e,"display")==="none"||it(e,"visibility")==="hidden")return;let r=ft(n.matrix,Vt(e.attrs.transform)),o=n.viewport;if(e.name==="svg"){let[f,p]=this.viewportMatrix(i?{...e,attrs:{...e.attrs,x:"0",y:"0"}}:e,{...n,matrix:r});r=f,o=p;}let a=it(e,"font-size"),l=Number.parseFloat(it(e,"opacity")??"1"),s=it(e,"fill-opacity"),c=s===void 0?n.fillOpacity??1:Number.parseFloat(s),m={fillOpacity:Number.isFinite(c)?Math.min(Math.max(c,0),1):1,opacity:(n.opacity??1)*(Number.isFinite(l)?Math.min(Math.max(l,0),1):1),matrix:r,viewport:o,fill:it(e,"fill")??n.fill,fillRule:it(e,"fill-rule")??n.fillRule,stroke:it(e,"stroke")??n.stroke,strokeWidth:it(e,"stroke-width")===void 0?n.strokeWidth:Z(it(e,"stroke-width"),o[0],1),fontSize:a===void 0?n.fontSize:Z(a,16,16),fontWeight:it(e,"font-weight")??n.fontWeight,textAnchor:it(e,"text-anchor")??n.textAnchor},u=this.onPaper;(e.name==="rect"||e.name==="circle"||e.name==="path")&&Um.test(it(e,"fill")??"")&&(this.onPaper=true);try{let f=e.attrs["clip-path"]?this.clipOf(e,m):null;if(f&&this.beginClip(f.segments,f.matrix,f.evenOdd)){try{this.paintNode(e,m);}finally{this.endClip();}return}this.paintNode(e,m);}finally{this.onPaper=u;}}paintNode(e,n){let[i,r]=n.viewport,o=(a,l)=>Z(e.attrs[a],l);switch(e.name){case "path":this.paint(jt(e.attrs.d??""),e,n);return;case "rect":{let a=e.attrs.rx??e.attrs.ry,l=e.attrs.ry??e.attrs.rx;this.paint(xe(o("x",i),o("y",r),o("width",i),o("height",r),Z(a,i),Z(l,r)),e,n);return}case "circle":{let a=o("r",Math.hypot(i,r)/Math.SQRT2);this.paint(We(o("cx",i),o("cy",r),a,a),e,n);return}case "ellipse":this.paint(We(o("cx",i),o("cy",r),o("rx",i),o("ry",r)),e,n);return;case "line":this.paint([{op:"M",x:o("x1",i),y:o("y1",r)},{op:"L",x:o("x2",i),y:o("y2",r)}],e,{...n,fill:"none"});return;case "polygon":case "polyline":{let a=Mn(e.attrs.points),l=[];for(let s=0;s+1<a.length;s+=2)l.push({op:s===0?"M":"L",x:a[s],y:a[s+1]});e.name==="polygon"&&l.length>0&&l.push({op:"Z"}),this.paint(l,e,n);return}case "text":this.text(e,n);return;case "image":this.image(e,n);return;default:for(let a of e.children)this.walk(a,n);}}};var ir=1e3;async function Lo(t){let e=await ae(ar({...t,size:t.size??yt},ir));return decodeURIComponent(e.replace("data:image/svg+xml,",""))}function Io(t){if(Ut(t.frame)){let e=Fe(ir,t.frame);return e.squareEdges?e.color:null}return st(t.bgColor,dt)}function ko(t,e){let n=Io(t);if(!(n&&Ue(t.bgColor))||Ut(t.frame)||t.templateId||t.customTemplate)return n;let i=Cn(e)?.children.find(o=>o.name==="rect"),r=i&&it(i,"fill");return r?.startsWith("url(")?r:n}function To(t,e){let n={r:255,g:255,b:255,a:1},i=lt(st(e.bgColor,dt));t.paper=n,t.background=i&&!Ue(e.bgColor)?i:null,t.backdrop=i?Xn(i,n):n;}var Vl=25.4,Hl=5,Wl=2e3,sr=ir,Hm=5,Wm=2;function Vm(t,e="mm"){return e==="in"?t*Vl:t}function jm(t){let e=cn(t),n=bt.QrCode.encodeText(t.value,At[e]).size;return n+Lt(n,t.margin??Ge,t.shape)*2}function jl(t,e){let n=Vm(e.size,e.unit);if(!Number.isFinite(n)||n<Hl||n>Wl)throw new Error(`Print size must be between ${Hl} mm and ${Wl/1e3} m`);let i=Math.min(Math.max(e.bleed??0,0),20),r=n/sr,o=Ut(t.frame)?Fe(sr,t.frame):null,a=(o?.width??sr)*r,l=(o?.height??sr)*r,s=e.cropMarks?i+Wm+Hm+1:i,c=jm(t);return {codeWidth:n,trimWidth:a,trimHeight:l,bleed:i,pageWidth:a+2*s,pageHeight:l+2*s,trimX:s,trimY:s,moduleSize:n/c,moduleCount:c,maxScanDistance:n*10}}var Zm=[137,80,78,71,13,10,26,10];async function Xl(t,e){let n=new Blob([t]).stream().pipeThrough(e);return new Uint8Array(await new Response(n).arrayBuffer())}async function Yl(t){return typeof CompressionStream>"u"?null:await Xl(t,new CompressionStream("deflate"))}async function Xm(t){if(typeof DecompressionStream>"u")return null;try{return await Xl(t,new DecompressionStream("deflate"))}catch{return null}}var No=(t,e)=>t[e]*2**24+(t[e+1]<<16)+(t[e+2]<<8)+t[e+3]>>>0,Zl={0:1,2:3,3:1,4:2,6:4};function Ym(t,e,n){let i=t+e-n,r=Math.abs(i-t),o=Math.abs(i-e),a=Math.abs(i-n);return r<=o&&r<=a?t:o<=a?e:n}async function Kl(t){if(Zm.some((d,h)=>t[h]!==d))return null;let e=8,n=0,i=0,r=-1,o=null,a=null,l=[];for(;e+8<=t.length;){let d=No(t,e),h=String.fromCharCode(...t.subarray(e+4,e+8)),_=t.subarray(e+8,e+8+d);if(e+=12+d,h==="IHDR"){n=No(_,0),i=No(_,4);let y=_[8];r=_[9];let $=_[12];if(y!==8||$!==0||!(r in Zl))return null}else if(h==="PLTE")o=_;else if(h==="tRNS")a=_;else if(h==="IDAT")l.push(_);else if(h==="IEND")break}if(!(n&&i)||n*i>4096*4096)return null;let s=new Uint8Array(l.reduce((d,h)=>d+h.length,0)),c=0;for(let d of l)s.set(d,c),c+=d.length;let m=await Xm(s),u=Zl[r],f=n*u;if(!m||m.length<i*(f+1))return null;let p=new Uint8Array(i*f);for(let d=0;d<i;d++){let h=m[d*(f+1)],_=m.subarray(d*(f+1)+1,(d+1)*(f+1)),y=d*f;for(let $=0;$<f;$++){let C=$>=u?p[y+$-u]:0,M=d>0?p[y-f+$]:0,x=d>0&&$>=u?p[y-f+$-u]:0,S=_[$],R=0;h===1?R=C:h===2?R=M:h===3?R=C+M>>1:h===4&&(R=Ym(C,M,x)),p[y+$]=S+R&255;}}let g=new Uint8Array(n*i*4);for(let d=0;d<n*i;d++){let h=d*4,_=d*u;if(r===3){let y=p[_];g[h]=o?.[y*3]??0,g[h+1]=o?.[y*3+1]??0,g[h+2]=o?.[y*3+2]??0,g[h+3]=a?.[y]??255;}else if(r===0||r===4){let y=p[_];g[h]=y,g[h+1]=y,g[h+2]=y,g[h+3]=r===4?p[_+1]:255;}else g[h]=p[_],g[h+1]=p[_+1],g[h+2]=p[_+2],g[h+3]=r===6?p[_+3]:255;}return {width:n,height:i,data:g}}var Km=25.4,Jl=72/Km,Jm=50;function td(t){let e=/^data:[^,]*?(;base64)?,(.*)$/s.exec(t);if(!e)return null;try{let n=e[1]?atob(e[2]):decodeURIComponent(e[2]),i=new Uint8Array(n.length);for(let r=0;r<n.length;r++)i[r]=n.charCodeAt(r)&255;return i}catch{return null}}function ed(t){if(t[0]!==255||t[1]!==216)return null;let e=2;for(;e+9<t.length;){if(t[e]!==255)return null;let n=t[e+1];if(n===216||n>=208&&n<=215){e+=2;continue}let i=t[e+2]<<8|t[e+3];if(n===192||n===193||n===194){let r=t[e+5]<<8|t[e+6],o=t[e+7]<<8|t[e+8],a=t[e+9];return {width:o,height:r,components:a,progressive:n===194}}e+=2+i;}return null}async function nd(t,e){let{width:n,height:i,data:r}=t,o=e?4:3,a=new Uint8Array(n*i*o);for(let s=0;s<n*i;s++){let c=r[s*4+3]/255,m=r[s*4]*c+255*(1-c),u=r[s*4+1]*c+255*(1-c),f=r[s*4+2]*c+255*(1-c);if(e){let[p,g,d,h]=Ze(m,u,f);a.set([p*255,g*255,d*255,h*255].map(Math.round),s*o);}else a.set([Math.round(m),Math.round(u),Math.round(f)],s*o);}let l=await Yl(a);return {kind:"raw",width:n,height:i,components:o,bytes:l??a,compressed:!!l}}async function rd(t,e){let n=t;if(!/^data:image\/(png|jpe?g)[;,]/i.test(n)){let a=await Ul(n);if(!a)return null;n=a;}let i=td(n);if(!i)return null;let r=ed(i);if(r)return r.components===1||r.components===3?{kind:"jpeg",width:r.width,height:r.height,components:r.components,bytes:i,progressive:r.progressive}:null;let o=await Kl(i);return o?await nd(o,e):null}function od(t){let e="",n=0,i=r=>{e+=r,n+=r.length,n>=76&&(e+=`
2
- `,n=0);};for(let r=0;r<t.length;r+=4){let o=Math.min(4,t.length-r),a=0;for(let s=0;s<4;s++)a=a*256+(s<o?t[r+s]:0);if(a===0&&o===4){i("z");continue}let l=[];for(let s=0;s<5;s++)l.unshift(String.fromCharCode(a%85+33)),a=Math.floor(a/85);i(l.slice(0,o+1).join(""));}return `${e}~>`}var id=`/qrdxdict 40 dict def
1
+ var Fe;(o=>{class t{constructor(l,s,c,u){this.version=l;this.errorCorrectionLevel=s;if(l<t.MIN_VERSION||l>t.MAX_VERSION)throw new RangeError("Version value out of range");if(u<-1||u>7)throw new RangeError("Mask value out of range");this.size=l*4+17;let m=[];for(let p=0;p<this.size;p++)m.push(false);for(let p=0;p<this.size;p++)this.modules.push(m.slice()),this.isFunction.push(m.slice());this.drawFunctionPatterns();let d=this.addEccAndInterleave(c);if(this.drawCodewords(d),u==-1){let p=1e9;for(let b=0;b<8;b++){this.applyMask(b),this.drawFormatBits(b);let f=this.getPenaltyScore();f<p&&(u=b,p=f),this.applyMask(b);}}i(0<=u&&u<=7),this.mask=u,this.applyMask(u),this.drawFormatBits(u),this.isFunction=[];}version;errorCorrectionLevel;static encodeText(l,s){let c=o.QrSegment.makeSegments(l);return t.encodeSegments(c,s)}static encodeBinary(l,s){let c=o.QrSegment.makeBytes(l);return t.encodeSegments([c],s)}static encodeSegments(l,s,c=1,u=40,m=-1,d=true){if(!(t.MIN_VERSION<=c&&c<=u&&u<=t.MAX_VERSION)||m<-1||m>7)throw new RangeError("Invalid value");let p,b;for(p=c;;p++){let _=t.getNumDataCodewords(p,s)*8,y=r.getTotalBits(l,p);if(y<=_){b=y;break}if(p>=u)throw new RangeError("Data too long")}for(let _ of [t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])d&&b<=t.getNumDataCodewords(p,_)*8&&(s=_);let f=[];for(let _ of l){e(_.mode.modeBits,4,f),e(_.numChars,_.mode.numCharCountBits(p),f);for(let y of _.getData())f.push(y);}i(f.length==b);let h=t.getNumDataCodewords(p,s)*8;i(f.length<=h),e(0,Math.min(4,h-f.length),f),e(0,(8-f.length%8)%8,f),i(f.length%8==0);for(let _=236;f.length<h;_^=253)e(_,8,f);let g=[];for(;g.length*8<f.length;)g.push(0);return f.forEach((_,y)=>g[y>>>3]|=_<<7-(y&7)),new t(p,s,g,m)}size;mask;modules=[];isFunction=[];getModule(l,s){return 0<=l&&l<this.size&&0<=s&&s<this.size&&this.modules[s][l]}getModules(){return this.modules}drawFunctionPatterns(){for(let c=0;c<this.size;c++)this.setFunctionModule(6,c,c%2==0),this.setFunctionModule(c,6,c%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let l=this.getAlignmentPatternPositions(),s=l.length;for(let c=0;c<s;c++)for(let u=0;u<s;u++)c==0&&u==0||c==0&&u==s-1||c==s-1&&u==0||this.drawAlignmentPattern(l[c],l[u]);this.drawFormatBits(0),this.drawVersion();}drawFormatBits(l){let s=this.errorCorrectionLevel.formatBits<<3|l,c=s;for(let m=0;m<10;m++)c=c<<1^(c>>>9)*1335;let u=(s<<10|c)^21522;i(u>>>15==0);for(let m=0;m<=5;m++)this.setFunctionModule(8,m,n(u,m));this.setFunctionModule(8,7,n(u,6)),this.setFunctionModule(8,8,n(u,7)),this.setFunctionModule(7,8,n(u,8));for(let m=9;m<15;m++)this.setFunctionModule(14-m,8,n(u,m));for(let m=0;m<8;m++)this.setFunctionModule(this.size-1-m,8,n(u,m));for(let m=8;m<15;m++)this.setFunctionModule(8,this.size-15+m,n(u,m));this.setFunctionModule(8,this.size-8,true);}drawVersion(){if(this.version<7)return;let l=this.version;for(let c=0;c<12;c++)l=l<<1^(l>>>11)*7973;let s=this.version<<12|l;i(s>>>18==0);for(let c=0;c<18;c++){let u=n(s,c),m=this.size-11+c%3,d=Math.floor(c/3);this.setFunctionModule(m,d,u),this.setFunctionModule(d,m,u);}}drawFinderPattern(l,s){for(let c=-4;c<=4;c++)for(let u=-4;u<=4;u++){let m=Math.max(Math.abs(u),Math.abs(c)),d=l+u,p=s+c;0<=d&&d<this.size&&0<=p&&p<this.size&&this.setFunctionModule(d,p,m!=2&&m!=4);}}drawAlignmentPattern(l,s){for(let c=-2;c<=2;c++)for(let u=-2;u<=2;u++)this.setFunctionModule(l+u,s+c,Math.max(Math.abs(u),Math.abs(c))!=1);}setFunctionModule(l,s,c){this.modules[s][l]=c,this.isFunction[s][l]=true;}addEccAndInterleave(l){let s=this.version,c=this.errorCorrectionLevel;if(l.length!=t.getNumDataCodewords(s,c))throw new RangeError("Invalid argument");let u=t.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][s],m=t.ECC_CODEWORDS_PER_BLOCK[c.ordinal][s],d=Math.floor(t.getNumRawDataModules(s)/8),p=u-d%u,b=Math.floor(d/u),f=[],h=t.reedSolomonComputeDivisor(m);for(let _=0,y=0;_<u;_++){let w=l.slice(y,y+b-m+(_<p?0:1));y+=w.length;let C=t.reedSolomonComputeRemainder(w,h);_<p&&w.push(0),f.push(w.concat(C));}let g=[];for(let _=0;_<f[0].length;_++)f.forEach((y,w)=>{(_!=b-m||w>=p)&&g.push(y[_]);});return i(g.length==d),g}drawCodewords(l){if(l.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let s=0;for(let c=this.size-1;c>=1;c-=2){c==6&&(c=5);for(let u=0;u<this.size;u++)for(let m=0;m<2;m++){let d=c-m,b=(c+1&2)==0?this.size-1-u:u;!this.isFunction[b][d]&&s<l.length*8&&(this.modules[b][d]=n(l[s>>>3],7-(s&7)),s++);}}i(s==l.length*8);}applyMask(l){if(l<0||l>7)throw new RangeError("Mask value out of range");for(let s=0;s<this.size;s++)for(let c=0;c<this.size;c++){let u;switch(l){case 0:u=(c+s)%2==0;break;case 1:u=s%2==0;break;case 2:u=c%3==0;break;case 3:u=(c+s)%3==0;break;case 4:u=(Math.floor(c/3)+Math.floor(s/2))%2==0;break;case 5:u=c*s%2+c*s%3==0;break;case 6:u=(c*s%2+c*s%3)%2==0;break;case 7:u=((c+s)%2+c*s%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[s][c]&&u&&(this.modules[s][c]=!this.modules[s][c]);}}getPenaltyScore(){let l=0;for(let m=0;m<this.size;m++){let d=false,p=0,b=[0,0,0,0,0,0,0];for(let f=0;f<this.size;f++)this.modules[m][f]==d?(p++,p==5?l+=t.PENALTY_N1:p>5&&l++):(this.finderPenaltyAddHistory(p,b),d||(l+=this.finderPenaltyCountPatterns(b)*t.PENALTY_N3),d=this.modules[m][f],p=1);l+=this.finderPenaltyTerminateAndCount(d,p,b)*t.PENALTY_N3;}for(let m=0;m<this.size;m++){let d=false,p=0,b=[0,0,0,0,0,0,0];for(let f=0;f<this.size;f++)this.modules[f][m]==d?(p++,p==5?l+=t.PENALTY_N1:p>5&&l++):(this.finderPenaltyAddHistory(p,b),d||(l+=this.finderPenaltyCountPatterns(b)*t.PENALTY_N3),d=this.modules[f][m],p=1);l+=this.finderPenaltyTerminateAndCount(d,p,b)*t.PENALTY_N3;}for(let m=0;m<this.size-1;m++)for(let d=0;d<this.size-1;d++){let p=this.modules[m][d];p==this.modules[m][d+1]&&p==this.modules[m+1][d]&&p==this.modules[m+1][d+1]&&(l+=t.PENALTY_N2);}let s=0;for(let m of this.modules)s=m.reduce((d,p)=>d+(p?1:0),s);let c=this.size*this.size,u=Math.ceil(Math.abs(s*20-c*10)/c)-1;return i(0<=u&&u<=9),l+=u*t.PENALTY_N4,i(0<=l&&l<=2568888),l}getAlignmentPatternPositions(){if(this.version==1)return [];{let l=Math.floor(this.version/7)+2,s=this.version==32?26:Math.ceil((this.version*4+4)/(l*2-2))*2,c=[6];for(let u=this.size-7;c.length<l;u-=s)c.splice(1,0,u);return c}}static getNumRawDataModules(l){if(l<t.MIN_VERSION||l>t.MAX_VERSION)throw new RangeError("Version number out of range");let s=(16*l+128)*l+64;if(l>=2){let c=Math.floor(l/7)+2;s-=(25*c-10)*c-55,l>=7&&(s-=36);}return i(208<=s&&s<=29648),s}static getNumDataCodewords(l,s){return Math.floor(t.getNumRawDataModules(l)/8)-t.ECC_CODEWORDS_PER_BLOCK[s.ordinal][l]*t.NUM_ERROR_CORRECTION_BLOCKS[s.ordinal][l]}static reedSolomonComputeDivisor(l){if(l<1||l>255)throw new RangeError("Degree out of range");let s=[];for(let u=0;u<l-1;u++)s.push(0);s.push(1);let c=1;for(let u=0;u<l;u++){for(let m=0;m<s.length;m++)s[m]=t.reedSolomonMultiply(s[m],c),m+1<s.length&&(s[m]^=s[m+1]);c=t.reedSolomonMultiply(c,2);}return s}static reedSolomonComputeRemainder(l,s){let c=s.map(u=>0);for(let u of l){let m=u^c.shift();c.push(0),s.forEach((d,p)=>c[p]^=t.reedSolomonMultiply(d,m));}return c}static reedSolomonMultiply(l,s){if(l>>>8||s>>>8)throw new RangeError("Byte out of range");let c=0;for(let u=7;u>=0;u--)c=c<<1^(c>>>7)*285,c^=(s>>>u&1)*l;return i(c>>>8==0),c}finderPenaltyCountPatterns(l){let s=l[1];i(s<=this.size*3);let c=s>0&&l[2]==s&&l[3]==s*3&&l[4]==s&&l[5]==s;return (c&&l[0]>=s*4&&l[6]>=s?1:0)+(c&&l[6]>=s*4&&l[0]>=s?1:0)}finderPenaltyTerminateAndCount(l,s,c){return l&&(this.finderPenaltyAddHistory(s,c),s=0),s+=this.size,this.finderPenaltyAddHistory(s,c),this.finderPenaltyCountPatterns(c)}finderPenaltyAddHistory(l,s){s[0]==0&&(l+=this.size),s.pop(),s.unshift(l);}static MIN_VERSION=1;static MAX_VERSION=40;static PENALTY_N1=3;static PENALTY_N2=3;static PENALTY_N3=40;static PENALTY_N4=10;static ECC_CODEWORDS_PER_BLOCK=[[-1,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],[-1,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],[-1,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],[-1,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]];static NUM_ERROR_CORRECTION_BLOCKS=[[-1,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],[-1,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],[-1,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],[-1,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]]}o.QrCode=t;function e(a,l,s){if(l<0||l>31||a>>>l)throw new RangeError("Value out of range");for(let c=l-1;c>=0;c--)s.push(a>>>c&1);}function n(a,l){return (a>>>l&1)!=0}function i(a){if(!a)throw new Error("Assertion error")}class r{constructor(l,s,c){this.mode=l;this.numChars=s;this.bitData=c;if(s<0)throw new RangeError("Invalid argument");this.bitData=c.slice();}mode;numChars;bitData;static makeBytes(l){let s=[];for(let c of l)e(c,8,s);return new r(r.Mode.BYTE,l.length,s)}static makeNumeric(l){if(!r.isNumeric(l))throw new RangeError("String contains non-numeric characters");let s=[];for(let c=0;c<l.length;){let u=Math.min(l.length-c,3);e(parseInt(l.substr(c,u),10),u*3+1,s),c+=u;}return new r(r.Mode.NUMERIC,l.length,s)}static makeAlphanumeric(l){if(!r.isAlphanumeric(l))throw new RangeError("String contains unencodable characters in alphanumeric mode");let s=[],c;for(c=0;c+2<=l.length;c+=2){let u=r.ALPHANUMERIC_CHARSET.indexOf(l.charAt(c))*45;u+=r.ALPHANUMERIC_CHARSET.indexOf(l.charAt(c+1)),e(u,11,s);}return c<l.length&&e(r.ALPHANUMERIC_CHARSET.indexOf(l.charAt(c)),6,s),new r(r.Mode.ALPHANUMERIC,l.length,s)}static makeSegments(l){return l==""?[]:r.isNumeric(l)?[r.makeNumeric(l)]:r.isAlphanumeric(l)?[r.makeAlphanumeric(l)]:[r.makeBytes(r.toUtf8ByteArray(l))]}static makeEci(l){let s=[];if(l<0)throw new RangeError("ECI assignment value out of range");if(l<128)e(l,8,s);else if(l<16384)e(2,2,s),e(l,14,s);else if(l<1e6)e(6,3,s),e(l,21,s);else throw new RangeError("ECI assignment value out of range");return new r(r.Mode.ECI,0,s)}static isNumeric(l){return r.NUMERIC_REGEX.test(l)}static isAlphanumeric(l){return r.ALPHANUMERIC_REGEX.test(l)}getData(){return this.bitData.slice()}static getTotalBits(l,s){let c=0;for(let u of l){let m=u.mode.numCharCountBits(s);if(u.numChars>=1<<m)return 1/0;c+=4+m+u.bitData.length;}return c}static toUtf8ByteArray(l){l=encodeURI(l);let s=[];for(let c=0;c<l.length;c++)l.charAt(c)!="%"?s.push(l.charCodeAt(c)):(s.push(parseInt(l.substr(c+1,2),16)),c+=2);return s}static NUMERIC_REGEX=/^[0-9]*$/;static ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/;static ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"}o.QrSegment=r;})(Fe||={});(e=>{(i=>{class n{constructor(o,a){this.ordinal=o;this.formatBits=a;}ordinal;formatBits;static LOW=new n(0,1);static MEDIUM=new n(1,0);static QUARTILE=new n(2,3);static HIGH=new n(3,2)}i.Ecc=n;})(e.QrCode||={});})(Fe||={});(e=>{(i=>{class n{constructor(o,a){this.modeBits=o;this.numBitsCharCount=a;}modeBits;numBitsCharCount;static NUMERIC=new n(1,[10,12,14]);static ALPHANUMERIC=new n(2,[9,11,13]);static BYTE=new n(4,[8,16,16]);static KANJI=new n(8,[8,10,12]);static ECI=new n(7,[0,0,0]);numCharCountBits(o){return this.numBitsCharCount[Math.floor((o+7)/17)]}}i.Mode=n;})(e.QrSegment||={});})(Fe||={});var dt=Fe;var St={L:dt.QrCode.Ecc.LOW,M:dt.QrCode.Ecc.MEDIUM,Q:dt.QrCode.Ecc.QUARTILE,H:dt.QrCode.Ecc.HIGH},xt=128,en="Q",nt="#FFFFFF",Le="#000000";var Ht=0;var kn=.1;function ut(t,e="#000000"){return t?typeof t=="string"?t:t.type==="solid"?t.color:t.type==="image"?t.underlay||e:(t.type==="linear"||t.type==="radial"||t.type==="angular")&&t.stops[0]?.color||e:e}function Ft(t,e="#000000"){return t?typeof t=="string"?{type:"solid",color:t}:t:{type:"solid",color:e}}function ke(t){return !t||typeof t=="string"?false:t.type==="linear"||t.type==="radial"||t.type==="angular"}function Hi(t){return typeof t=="object"&&t!==null&&t.type==="image"}var Zr=["logo","halftone"],qi={logo:["blend","badge"],halftone:["color","mono"]},Yr=192;var nn=24;var Tn=.5,rn=1.5;var Kr=.5,Wi=1,Vi=.07;var ji=3,Jr=64,to=8,Xi=.42;var Zi=.5,Yi=2,Ki=.1,Ji=.5,ta=.25,eo="#e5e7eb",ee="#d1d5db",no=.3,ea=.2,na=.1,ra=.4,oa=.3,ia="#000000";function Q(t,e=3){let n=10**e;return Math.round(t*n)/n+0}function x(t,e=3){return String(Q(t,e))}function E(t,...e){let n=t[0]??"";for(let i=0;i<e.length;i++){let r=e[i];n+=(typeof r=="number"?x(r):r)+(t[i+1]??"");}return n}var Du={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Bu=/^[MmLlHhVvCcSsQqTtAaZz0-9.,+\-\s]*$/,ro=/[+-]?(?:\d+\.?\d*|\.\d+)/y;function on(t,e=Number.POSITIVE_INFINITY){if(!Bu.test(t))return null;let n=[],i=0,r=()=>{for(;i<t.length&&/[\s,]/.test(t[i]);)i++;},o=()=>{r(),ro.lastIndex=i;let s=ro.exec(t);if(!s)return null;let c=s[0],u=c.indexOf(".");if(u>=0&&c.length-u-1>e)return null;i=ro.lastIndex;let m=Number(c);return Number.isFinite(m)?m:null},a=()=>{r();let s=t[i];return s==="0"||s==="1"?(i++,s==="1"?1:0):null},l=()=>(r(),i<t.length&&/[0-9.+-]/.test(t[i]));for(r();i<t.length;){let s=t[i],c=s.toUpperCase(),u=Du[c];if(u===void 0||n.length===0&&c!=="M")return null;if(i++,u===0){n.push({command:s,values:[]}),r();continue}let m=s,d=true;for(;d||l();){let p=[];for(let b=0;b<u;b++){let f=c==="A"&&(b===3||b===4)?a():o();if(f===null)return null;p.push(f);}n.push({command:m,values:p}),c==="M"&&(m=s==="M"?"L":"l"),d=false;}r();}return n}function aa(t){let e=0;for(let{command:n}of t)e+=n.toUpperCase()==="A"?4:1;return e}function oo(t,e=1,n=0,i=0){let r="";for(let{command:o,values:a}of t){let l=o.toUpperCase(),s=o===l,c=s?n:0,u=s?i:0,m;switch(l){case "Z":m=[];break;case "H":m=[x(a[0]*e+c)];break;case "V":m=[x(a[0]*e+u)];break;case "A":m=[x(Math.abs(a[0])*e),x(Math.abs(a[1])*e),x(a[2]),String(a[3]),String(a[4]),x(a[5]*e+c),x(a[6]*e+u)];break;default:m=a.map((d,p)=>x(d*e+(p%2===0?c:u)));}r+=o+m.join(" ");}return r}function la(t,e=.25){let n=[],i=[],r=[0,0],o=[0,0],a=()=>{i.length>2&&n.push(i),i=[];};for(let l of t)if(l.op==="M")a(),r=[l.x,l.y],o=r,i.push(r);else if(l.op==="L")o=[l.x,l.y],i.push(o);else if(l.op==="C"){let s=o,c=[l.x1,l.y1],u=[l.x2,l.y2],m=[l.x,l.y],d=Math.hypot(c[0]-s[0],c[1]-s[1])+Math.hypot(u[0]-c[0],u[1]-c[1])+Math.hypot(m[0]-u[0],m[1]-u[1]),p=Math.max(2,Math.min(64,Math.ceil(Math.sqrt(d/(4*e)))));for(let b=1;b<=p;b++){let f=b/p,h=1-f;i.push([h*h*h*s[0]+3*h*h*f*c[0]+3*h*f*f*u[0]+f*f*f*m[0],h*h*h*s[1]+3*h*h*f*c[1]+3*h*f*f*u[1]+f*f*f*m[1]]);}o=m;}else a(),o=r;return a(),n}function Nn(t,e){let n=[r=>r[0]-e.x0,r=>e.x1-r[0],r=>r[1]-e.y0,r=>e.y1-r[1]],i=t;for(let r of n){if(i.length===0)break;let o=i;i=[];for(let a=0;a<o.length;a++){let l=o[a],s=o[(a+o.length-1)%o.length],c=r(l),u=r(s);c>=0?(u<0&&i.push(sa(s,l,u,c)),i.push(l)):u>=0&&i.push(sa(s,l,u,c));}}return i.length>2?i:[]}function sa(t,e,n,i){let r=n/(n-i);return [t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function ca(t){return t.filter(e=>e.length>2).map(e=>`M${e.map(([n,i])=>`${x(n)} ${x(i)}`).join("L")}Z`).join("")}function ua(t){let e=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY,o=(a,l)=>{e=Math.min(e,a),n=Math.min(n,l),i=Math.max(i,a),r=Math.max(r,l);};for(let a of t)a.op==="C"?(o(a.x1,a.y1),o(a.x2,a.y2),o(a.x,a.y)):a.op!=="Z"&&o(a.x,a.y);return Number.isFinite(e)?{x0:e,y0:n,x1:i,y1:r}:null}var Gu={amp:"&",lt:"<",gt:">",quot:'"',apos:"'"};function fa(t){return t.replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi,(e,n)=>{if(n[0]==="#"){let i=n[1].toLowerCase()==="x"?Number.parseInt(n.slice(2),16):Number.parseInt(n.slice(1),10);return Number.isInteger(i)&&i>0&&i<=1114111&&!(i>=55296&&i<=57343)?String.fromCodePoint(i):e}return Gu[n.toLowerCase()]??e})}var Qu=60,io=62,ao=47,Uu=61,ma=34,da=39,lo=/\s*/y,zu=/[^\s/>]*/y,Hu=/[^\s>]*/y,qu=/[^\s=]*/y;function Te(t,e,n){return t.lastIndex=n,t.test(e)?t.lastIndex:n}function Wu(t,e){let n=t.length,i=S=>{let $=Number.POSITIVE_INFINITY,R=-1;return M=>((M<$||R>=0&&R<M)&&($=M,R=t.indexOf(S,M)),R)},r=i("-->"),o=i("?>"),a=i("]]>"),l=i(">"),s,c=S=>{let $=t.charCodeAt(S);if($!==ma&&$!==da)return S+1;let R=t.indexOf(t[S],S+1);return R<0?n:R+1},u=S=>{for(let $=S;$<n&&!s?.[$];$=c($)){let R=t.charCodeAt($);if(R===io||R===ao&&t.charCodeAt($+1)===io)return $}s??=new Uint8Array(n);for(let $=S;$<n&&!s[$];$=c($))s[$]=1;return -1},m=-1,d=-1,p=-1,b=-1,f=S=>{let $=S+1;if($<m||$>=d){m=$,d=Te(zu,t,$),p=-1;for(let M=d;M>$;M--){let P=t.charCodeAt(M);if((M===d||P===ma||P===da)&&(b=u(M),b>=0)){p=M;break}}}if(p<=$)return -1;let R=t.charCodeAt(b)===ao;return e.open(t.slice($,p),t.slice(p,b),R),b+(R?2:1)},h=-1,g=-1,_=-1,y=S=>{let $=S+2;if($<h||$>=g){h=$,g=Te(Hu,t,$);let R=Te(lo,t,g);_=g>$&&t.charCodeAt(R)===io?R:-1;}return _},w=S=>{if(t.startsWith("<!--",S)){let $=r(S+4);if($>=0)return $+3}if(t.startsWith("<?",S)){let $=o(S+2);if($>=0)return $+2}if(t.startsWith("<![CDATA[",S)){let $=a(S+9);if($>=0)return e.cdata(t.slice(S+9,$)),$+3}if(t.startsWith("<!",S)){let $=l(S+2);if($>=0)return $+1}if(t.charCodeAt(S+1)===ao){let $=y(S);return $<0?-1:(e.close(),$+1)}return f(S)},C=0;for(;C<n;)if(t.charCodeAt(C)===Qu){let S=w(C);C=S<0?C+1:S;}else {let S=t.indexOf("<",C),$=S<0?n:S;e.text(t.slice(C,$)),C=$;}}function Vu(t){let e={},n=0;for(;n<t.length;){let i=Te(qu,t,n);if(i===n){n++;continue}let r=Te(lo,t,i);if(t.charCodeAt(r)===Uu){let o=Te(lo,t,r+1),a=t[o],l=a==='"'||a==="'"?t.indexOf(a,o+1):-1;if(l>=0){e[t.slice(n,i)]=fa(t.slice(o+1,l)),n=l+1;continue}}n=i;}return e}function Bn(t){let e={name:"#root",attrs:{},children:[],text:""},n=[e],i=()=>n.at(-1);Wu(t,{open(o,a,l){let s=Vu(a),c={name:o,attrs:s,children:[],text:""};i().children.push(c),l||n.push(c);},close(){n.length>1&&n.pop();},text(o){i().text+=fa(o);},cdata(o){i().text+=o;}});let r=o=>{for(let a of o.children){if(a.name==="svg")return a;let l=r(a);if(l)return l}return null};return r(e)}var On=[1,0,0,1,0,0];function pt(t,e){let[n,i,r,o,a,l]=t,[s,c,u,m,d,p]=e;return [n*s+r*c,i*s+o*c,n*u+r*m,i*u+o*m,n*d+r*p+a,i*d+o*p+l]}function rt(t,e,n){return [t[0]*e+t[2]*n+t[4],t[1]*e+t[3]*n+t[5]]}function co(t){return Math.sqrt(Math.abs(t[0]*t[3]-t[1]*t[2]))}function Gn(t){return t?(t.match(/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi)??[]).map(Number):[]}function ne(t){let e=On;if(!t)return e;for(let[,n,i]of t.matchAll(/(matrix|translate|scale|rotate|skewX|skewY)\s*\(([^)]*)\)/g)){let r=Gn(i),o=On;switch(n){case "matrix":r.length===6&&(o=r);break;case "translate":o=[1,0,0,1,r[0]??0,r[1]??0];break;case "scale":o=[r[0]??1,0,0,r[1]??r[0]??1,0,0];break;case "rotate":{let a=(r[0]??0)*Math.PI/180,l=Math.cos(a),s=Math.sin(a),[c,u]=[r[1]??0,r[2]??0];o=pt(pt([1,0,0,1,c,u],[l,s,-s,l,0,0]),[1,0,0,1,-c,-u]);break}case "skewX":o=[1,0,Math.tan((r[0]??0)*Math.PI/180),1,0,0];break;case "skewY":o=[1,Math.tan((r[0]??0)*Math.PI/180),0,1,0,0];break;}e=pt(e,o);}return e}var so=/[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?/y;function ju(t,e,n,i,r,o,a,l,s){if(t===l&&e===s)return [];let c=Math.abs(n),u=Math.abs(i);if(c===0||u===0)return [{op:"L",x:l,y:s}];let m=r*Math.PI/180,d=Math.cos(m),p=Math.sin(m),b=(t-l)/2,f=(e-s)/2,h=d*b+p*f,g=-p*b+d*f,_=h*h/(c*c)+g*g/(u*u);_>1&&(c*=Math.sqrt(_),u*=Math.sqrt(_));let y=c*c*u*u-c*c*g*g-u*u*h*h,w=c*c*g*g+u*u*h*h,C=(o===a?-1:1)*Math.sqrt(Math.max(0,y/w)),S=C*c*g/u,$=-C*u*h/c,R=d*S-p*$+(t+l)/2,M=p*S+d*$+(e+s)/2,P=(D,G,U,et)=>Math.atan2(D*et-G*U,D*U+G*et),v=P(1,0,(h-S)/c,(g-$)/u),I=P((h-S)/c,(g-$)/u,(-h-S)/c,(-g-$)/u);!a&&I>0?I-=2*Math.PI:a&&I<0&&(I+=2*Math.PI);let F=Math.max(1,Math.ceil(Math.abs(I)/(Math.PI/2)-1e-9)),T=I/F,N=4/3*Math.tan(T/4),L=(D,G)=>[R+c*d*D-u*p*G,M+c*p*D+u*d*G],V=[];for(let D=0;D<F;D++){let G=v+D*T,U=G+T,[et,K]=L(Math.cos(G)-N*Math.sin(G),Math.sin(G)+N*Math.cos(G)),[j,Rt]=L(Math.cos(U)+N*Math.sin(U),Math.sin(U)-N*Math.cos(U)),[B,yt]=D===F-1?[l,s]:L(Math.cos(U),Math.sin(U));V.push({op:"C",x1:et,y1:K,x2:j,y2:Rt,x:B,y:yt});}return V}function re(t){let e=[],n=0,i=0,r=0,o=0,a=0,l="",s=null,c=null,u=()=>{for(;n<t.length&&/[\s,]/.test(t[n]);)n++;},m=()=>{u(),so.lastIndex=n;let b=so.exec(t);return b?(n=so.lastIndex,Number(b[0])):null},d=()=>{u();let b=t[n];return b==="0"||b==="1"?(n++,b==="1"):null},p=b=>{let f=[];for(let h=0;h<b;h++){let g=m();if(g===null)return null;f.push(g);}return f};for(;u(),!(n>=t.length);){let b=t[n];if(/[MmLlHhVvCcSsQqTtAaZz]/.test(b))l=b,n++;else if(!l||l==="Z"||l==="z")break;let f=l===l.toLowerCase(),h=f?i:0,g=f?r:0,_=l.toUpperCase();if(_==="Z"){e.push({op:"Z"}),i=o,r=a,s=null,c=null;continue}if(_==="A"){let S=p(3),$=d(),R=d(),M=p(2);if(!(S&&M)||$===null||R===null)break;let[P,v,I]=S,F=M[0]+h,T=M[1]+g;e.push(...ju(i,r,P,v,I,$,R,F,T)),i=F,r=T,s=null,c=null;continue}let y={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2}[_]??0,w=p(y);if(!w)break;let C=w;switch(_){case "M":i=C[0]+h,r=C[1]+g,o=i,a=r,e.push({op:"M",x:i,y:r}),l=f?"l":"L",s=null,c=null;break;case "L":case "H":case "V":_!=="V"&&(i=C[0]+h),_==="V"?r=C[0]+g:_==="L"&&(r=C[1]+g),e.push({op:"L",x:i,y:r}),s=null,c=null;break;case "C":case "S":{let S,$;_==="C"?(S=[C[0]+h,C[1]+g],$=C.slice(2)):(S=s?[2*i-s[0],2*r-s[1]]:[i,r],$=C);let R=[$[0]+h,$[1]+g],M=[$[2]+h,$[3]+g];e.push({op:"C",x1:S[0],y1:S[1],x2:R[0],y2:R[1],x:M[0],y:M[1]}),[i,r]=M,s=R,c=null;break}case "Q":case "T":{let S,$;_==="Q"?(S=[C[0]+h,C[1]+g],$=[C[2]+h,C[3]+g]):(S=c?[2*i-c[0],2*r-c[1]]:[i,r],$=[C[0]+h,C[1]+g]),e.push({op:"C",x1:i+2/3*(S[0]-i),y1:r+2/3*(S[1]-r),x2:$[0]+2/3*(S[0]-$[0]),y2:$[1]+2/3*(S[1]-$[1]),x:$[0],y:$[1]}),[i,r]=$,c=S,s=null;break}}}return e}var Dn=.5522847498;function an(t,e,n,i){if(n<=0||i<=0)return [];let r=n*Dn,o=i*Dn;return [{op:"M",x:t+n,y:e},{op:"C",x1:t+n,y1:e+o,x2:t+r,y2:e+i,x:t,y:e+i},{op:"C",x1:t-r,y1:e+i,x2:t-n,y2:e+o,x:t-n,y:e},{op:"C",x1:t-n,y1:e-o,x2:t-r,y2:e-i,x:t,y:e-i},{op:"C",x1:t+r,y1:e-i,x2:t+n,y2:e-o,x:t+n,y:e},{op:"Z"}]}function Ne(t,e,n,i,r=0,o=0){if(n<=0||i<=0)return [];let a=Math.min(Math.max(r,0),n/2),l=Math.min(Math.max(o,0),i/2);if(a===0||l===0)return [{op:"M",x:t,y:e},{op:"L",x:t+n,y:e},{op:"L",x:t+n,y:e+i},{op:"L",x:t,y:e+i},{op:"Z"}];let s=a*Dn,c=l*Dn,u=t+n,m=e+i;return [{op:"M",x:t+a,y:e},{op:"L",x:u-a,y:e},{op:"C",x1:u-a+s,y1:e,x2:u,y2:e+l-c,x:u,y:e+l},{op:"L",x:u,y:m-l},{op:"C",x1:u,y1:m-l+c,x2:u-a+s,y2:m,x:u-a,y:m},{op:"L",x:t+a,y:m},{op:"C",x1:t+a-s,y1:m,x2:t,y2:m-l+c,x:t,y:m-l},{op:"L",x:t,y:e+l},{op:"C",x1:t,y1:e+l-c,x2:t+a-s,y2:e,x:t+a,y:e},{op:"Z"}]}var pa="qrdx.frame",ga=1,ba="custom",ot={minArtboard:50,maxArtboard:2e3,maxCoordinate:4e3,maxDecimals:3,maxShapes:64,maxLabels:8,maxPolygonPoints:256,maxPathLength:16e3,maxSegments:2e3,maxGradientSteps:64,maxGradientWork:16e3,maxBytes:32768,minQrShare:.5,minPadding:.04,defaultPadding:.08,maxTextLength:nn},_a=["wifi","star","heart","phone","headphones","calendar","user","chat","bag","bell","cup","card","check","info","home","pin","share","download","clock","snowflake","pumpkin","tree","sparkle","gift"],Qn=.95,Xu=200,ya=["frame","text","accent","background"],Zu=/[\t\n\v\f\r\u0085\u2028\u2029]/g,Yu=/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u115f\u1160\u17b4\u17b5\u180b-\u180f\u200b-\u200f\u202a-\u202e\u2060-\u206f\u3164\ufe00-\ufe0f\ufeff\uffa0\ufff0-\ufffb]|\udb40[\udc00-\udcff]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/g;function sn(t,e=nn){let n=t.slice(0,1e3).normalize("NFC").replace(Zu," ").replace(Yu,"").replace(/\s+/g," ").trim();return Array.from(n).slice(0,Math.max(0,e)).join("").trim()}var Un=t=>Math.abs(t*1e3-Math.round(t*1e3))<1e-6;function mo(t){let e=zn(t);return {x0:t.qr.x-e,y0:t.qr.y-e,x1:t.qr.x+t.qr.size+e,y1:t.qr.y+t.qr.size+e}}function Ku(t){return {x0:t.qr.x,y0:t.qr.y,x1:t.qr.x+t.qr.size,y1:t.qr.y+t.qr.size}}function zn(t){return t.qr.padding??t.qr.size*ot.defaultPadding}var fo=.52,Ju=.35;function t0(t){let e=t.fontSize??t.box.height*fo;return Math.min(e*rn,t.box.height*Qn)}var uo=(t,e)=>Math.min(t.x1,e.x1)-Math.max(t.x0,e.x0)>1e-6&&Math.min(t.y1,e.y1)-Math.max(t.y0,e.y0)>1e-6;function ha(t){let e=mo(t),n=Math.min(t.qr.radius??0,(e.x1-e.x0)/2,(e.y1-e.y0)/2),i=[[e.x0+n,e.y0+n,Math.PI],[e.x1-n,e.y0+n,-Math.PI/2],[e.x1-n,e.y1-n,0],[e.x0+n,e.y1-n,Math.PI/2]],r=[];for(let[o,a,l]of i)for(let s=0;s<=8;s++){let c=l+Math.PI/2*(s/8);r.push([o+n*Math.cos(c),a+n*Math.sin(c)]);}return r}function e0([t,e],n,i){if(t<n.x-.01||e<n.y-.01||t>n.x+n.width+.01||e>n.y+n.height+.01)return false;let o=Math.min(i,n.width/2,n.height/2),a=Math.min(Math.max(t,n.x+o),n.x+n.width-o),l=Math.min(Math.max(e,n.y+o),n.y+n.height-o);return Math.hypot(t-a,e-l)<=o+.01}function n0(t){let e=0;return t.forEach(([n,i],r)=>{let[o,a]=t[(r+1)%t.length];e+=n*a-o*i;}),Math.abs(e)/2}function r0(t,e,n){let i=mo(e);if(!uo(n,i))return false;if("stroke"in t&&t.stroke)return true;if(t.fill==="background")return false;if(t.type==="rect"&&t.hole){let{hole:r}=t;return !ha(e).every(o=>e0(o,r,r.radius??0))}if(t.type==="circle"&&t.hole){let r=t.hole;return !ha(e).every(([o,a])=>Math.hypot(o-t.cx,a-t.cy)<=r+.01)}if(t.type==="polygon"){let r=Nn(t.points,i);return r.length>2&&n0(r)>1e-6}return true}function ho(t){let e=o0(t),n="stroke"in t?t.stroke:void 0;if(!(n&&e.bounds))return e;let i=t.type==="circle"||t.type==="ellipse"?n.width/2:t.type==="rect"?n.width*Math.SQRT2/2:n.width*2,{x0:r,y0:o,x1:a,y1:l}=e.bounds;return {bounds:{x0:r-i,y0:o-i,x1:a+i,y1:l+i},segments:e.segments*2}}function o0(t){switch(t.type){case "rect":return {bounds:{x0:t.x,y0:t.y,x1:t.x+t.width,y1:t.y+t.height},segments:t.hole?18:9};case "circle":return {bounds:{x0:t.cx-t.r,y0:t.cy-t.r,x1:t.cx+t.r,y1:t.cy+t.r},segments:t.hole?10:5};case "ellipse":return {bounds:{x0:t.cx-t.rx,y0:t.cy-t.ry,x1:t.cx+t.rx,y1:t.cy+t.ry},segments:5};case "polygon":{let e=t.points.map(([i])=>i),n=t.points.map(([,i])=>i);return {bounds:{x0:Math.min(...e),y0:Math.min(...n),x1:Math.max(...e),y1:Math.max(...n)},segments:t.points.length}}case "path":{let e=on(t.d,ot.maxDecimals);return e?{bounds:ua(re(t.d)),segments:aa(e)}:{bounds:null,segments:0}}case "line":{let e=t.width/2,n=Math.hypot(t.x2-t.x1,t.y2-t.y1),i=t.dash?Math.ceil(n/(t.dash[0]+t.dash[1])):1;return {bounds:{x0:Math.min(t.x1,t.x2)-e,y0:Math.min(t.y1,t.y2)-e,x1:Math.max(t.x1,t.x2)+e,y1:Math.max(t.y1,t.y2)+e},segments:i*(t.cap==="round"?4:5)}}default:return {bounds:{x0:t.x,y0:t.y,x1:t.x+t.size,y1:t.y+t.size},segments:Xu}}}function xa(t,e){let n=ot,i=new TextEncoder().encode(JSON.stringify(t)).length;if(i>n.maxBytes){e(`The spec is ${i} bytes; the limit is ${n.maxBytes}`);return}let{width:r,height:o}=t.artboard,a=Math.max(r,o)*.005,l={x0:-a,y0:-a,x1:r+a,y1:o+a},s=g=>g.x0>=l.x0&&g.y0>=l.y0&&g.x1<=l.x1&&g.y1<=l.y1,{qr:c}=t,u=zn(t);c.plate!=="none"&&u<c.size*n.minPadding-1e-9&&e(`qr.padding must be at least ${n.minPadding*100}% of qr.size`,["qr","padding"]),c.size<Math.min(r,o)*n.minQrShare-1e-9&&e(`qr.size must be at least ${n.minQrShare*100}% of the artboard's shorter side`,["qr","size"]);let m=mo(t);(m.x0<-1e-9||m.y0<-1e-9||m.x1>r+1e-9||m.y1>o+1e-9)&&e("The code and its padding must sit inside the artboard",["qr"]),(c.radius??0)>(c.size+2*u)/2&&e("qr.radius is larger than half the plate",["qr","radius"]);let d=0,p=0;t.shapes.forEach((g,_)=>{let y=["shapes",_],{bounds:w,segments:C}=ho(g);if(!w){e("Path data must use only M L H V C S Q T A Z, plain numbers (up to 3 decimals) and start with M",[...y,"d"]);return}if(s(w)||e("The shape extends outside the artboard",y),g.type==="rect"&&g.hole){let{hole:S}=g;(S.x<g.x||S.y<g.y||S.x+S.width>g.x+g.width+1e-9||S.y+S.height>g.y+g.height+1e-9)&&e("The hole must sit inside its rect",[...y,"hole"]);}g.type==="circle"&&g.hole&&g.hole>=g.r&&e("The hole must be smaller than the circle",[...y,"hole"]),"stroke"in g&&g.stroke&&g.stroke.width>Math.min(r,o)*.1+1e-9&&e("A stroke may be at most 10% of the artboard's shorter side",[...y,"stroke","width"]),c.plate==="background"&&r0(g,t,w)&&e('With qr.plate "background", only background fills (or a ring whose hole holds the plate) may lie under the plate',y),d+=C,typeof g.fill=="object"&&"gradient"in g.fill&&(p+=(g.fill.gradient.steps??32)*C);}),d>n.maxSegments&&e(`The shapes have ${d} segments; the limit is ${n.maxSegments}`,["shapes"]),p>n.maxGradientWork&&e("Gradient fills are too detailed (fewer steps or simpler shapes)",["shapes"]);let b=[],f=new Set,h=new Set;t.labels.forEach((g,_)=>{let y=["labels",_];f.has(g.id)&&e(`Label id "${g.id}" is used twice`,[...y,"id"]),f.add(g.id),g.slot!=="fixed"&&(h.has(g.slot)&&e(`Only one label may use the ${g.slot} slot`,[...y,"slot"]),h.add(g.slot));let w=g.maxLength??n.maxTextLength;g.text!==sn(g.text,w)&&e(`Label text must be at most ${w} characters, trimmed, with no control or invisible characters (see sanitizeFrameText)`,[...y,"text"]);let C;if(g.type==="text"){C={x0:g.box.x,y0:g.box.y,x1:g.box.x+g.box.width,y1:g.box.y+g.box.height},g.fontSize!==void 0&&g.fontSize>g.box.height*Qn+1e-9&&e("fontSize may be at most 95% of the label's row height",[...y,"fontSize"]);let S=g.box.y+g.box.height/2,$=t0(g)*Ju,R={x0:C.x0,x1:C.x1,y0:S-$,y1:S+$};(uo(C,Ku(t))||uo(R,m))&&e("The label overlaps the code or its padding",[...y,"box"]);}else {let{cx:S,cy:$,radius:R}=g.curve,M=g.fontSize*rn*.6;C={x0:S-R-M,y0:$-R-M,x1:S+R+M,y1:$+R+M};let P=Math.hypot(Math.max(m.x0-S,0,S-m.x1),Math.max(m.y0-$,0,$-m.y1));Math.hypot(Math.max(Math.abs(m.x0-S),Math.abs(m.x1-S)),Math.max(Math.abs(m.y0-$),Math.abs(m.y1-$)))<=R-M||P>=R+M||e("The curved label crosses the code or its padding",[...y,"curve"]);}if(s(C)||e("The label extends outside the artboard",y),g.collapse){let S=g.collapse,$=S.y+S.height;(S.y<-1e-9||$>o+1e-9)&&e("The collapse band must sit inside the artboard",[...y,"collapse"]),$>m.y0+1e-6&&S.y<m.y1-1e-6&&e("The collapse band crosses the code or its padding",[...y,"collapse"]);for(let R of b)$>R.y+1e-6&&S.y<R.y+R.height-1e-6&&e("Collapse bands may not overlap",[...y,"collapse"]);b.push(S);}});}var gt=t=>t/255,ln=(t,e)=>(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2,q=t=>.2126*t[0]+.7152*t[1]+.0722*t[2];function i0(t){let{width:e,height:n,data:i}=t,r=[0,e-1,(n-1)*e,n*e-1].map(a=>{let l=a*4;return {color:[gt(i[l]),gt(i[l+1]),gt(i[l+2])],alpha:i[l+3]/255}});if(r.some(a=>a.alpha<.9))return null;let o=r[0].color;return r.every(({color:a})=>ln(a,o)<.006)?o:null}function a0(t){let{width:e,height:n,data:i}=t,r=i0(t),o=new Float32Array(e*n);for(let a=0;a<o.length;a++){let l=a*4,s=i[l+3]/255;if(r&&s>0){let c=Math.sqrt(ln([gt(i[l]),gt(i[l+1]),gt(i[l+2])],r));s*=Math.min(1,Math.max(0,(c-.06)/.1));}o[a]=s;}return o}var s0=8,l0=.14,$a=.006;function c0(t,e){let{width:n,height:i,data:r}=t,o=new Float64Array(4096),a=new Float64Array(4096*3),l=0;for(let p=0;p<e.length;p++){if(e[p]<.9)continue;let b=p*4,f=Math.floor(r[b]/16)*256+Math.floor(r[b+1]/16)*16+Math.floor(r[b+2]/16);o[f]+=1,a[f*3]+=gt(r[b]),a[f*3+1]+=gt(r[b+1]),a[f*3+2]+=gt(r[b+2]),l++;}if(l===0)return {palette:[],error:0};let s=[...o.keys()].filter(p=>o[p]>0).sort((p,b)=>o[b]-o[p]),c=[];for(let p of s){if(o[p]/l<$a/2||c.length>=s0)break;let b=[a[p*3]/o[p],a[p*3+1]/o[p],a[p*3+2]/o[p]];c.every(f=>ln(f,b)>=l0**2)&&c.push(b);}let u=[],m=0;for(let p=0;p<3;p++){u=c.map(()=>({n:0,r:0,g:0,b:0,x:0,y:0})),m=0;for(let b=0;b<e.length;b++){if(e[b]<.9)continue;let f=b*4,h=[gt(r[f]),gt(r[f+1]),gt(r[f+2])],g=0,_=Number.POSITIVE_INFINITY;for(let[w,C]of c.entries()){let S=ln(h,C);S<_&&(_=S,g=w);}let y=u[g];y.n++,y.r+=h[0],y.g+=h[1],y.b+=h[2],y.x+=b%n,y.y+=Math.floor(b/n),m+=Math.sqrt(_);}for(let[b,f]of u.entries())f.n>0&&(c[b]=[f.r/f.n,f.g/f.n,f.b/f.n]);}return {palette:c.map((p,b)=>({color:p,area:u[b].n/l,cx:u[b].n?u[b].x/u[b].n+.5:n/2,cy:u[b].n?u[b].y/u[b].n+.5:i/2})).filter(p=>p.area>=$a).sort((p,b)=>b.area-p.area),error:m/l}}function u0(t,e,n){let i=e+2,r=n+2,o=(m,d)=>m<=0||d<=0||m>e||d>n?0:t[(d-1)*e+(m-1)],a=new Map,l=new Map,s=m=>{let d=l.get(m);if(d)return d;let p=Math.floor(m/2),b=p%i,f=Math.floor(p/i),h=o(b,f),g=m%2===1,_=g?o(b,f+1):o(b+1,f),y=h===_?.5:Math.min(1,Math.max(0,(.5-h)/(_-h))),w=g?[b-.5,f-.5+y]:[b-.5+y,f-.5];return l.set(m,w),w},c=(m,d)=>{a.set(m,d);};for(let m=0;m<r-1;m++)for(let d=0;d<i-1;d++){let p=o(d,m)>=.5,b=o(d+1,m)>=.5,f=o(d+1,m+1)>=.5,h=o(d,m+1)>=.5,g=2*(m*i+d),_=2*((m+1)*i+d),y=2*(m*i+d)+1,w=2*(m*i+d+1)+1;switch((p?8:0)+(b?4:0)+(f?2:0)+(h?1:0)){case 1:c(_,y);break;case 2:c(w,_);break;case 3:c(w,y);break;case 4:c(g,w);break;case 5:{(o(d,m)+o(d+1,m)+o(d+1,m+1)+o(d,m+1))/4>=.5?(c(g,y),c(_,w)):(c(g,w),c(_,y));break}case 6:c(g,_);break;case 7:c(g,y);break;case 8:c(y,g);break;case 9:c(_,g);break;case 10:{(o(d,m)+o(d+1,m)+o(d+1,m+1)+o(d,m+1))/4>=.5?(c(y,_),c(w,g)):(c(y,g),c(w,_));break}case 11:c(w,g);break;case 12:c(y,w);break;case 13:c(_,w);break;case 14:c(y,_);break;}}let u=[];for(let m of a.keys()){if(!a.has(m))continue;let d=[],p=m;for(;p!==void 0&&a.has(p);){d.push(s(p));let b=a.get(p);a.delete(p),p=b;}d.length>=3&&u.push(d);}return u}function m0(t){let e=0;for(let n=0;n<t.length;n++){let i=t[n],r=t[(n+1)%t.length];e+=i[0]*r[1]-r[0]*i[1];}return e/2}function Sa(t,e){if(t.length<=2)return t;let n=new Uint8Array(t.length);n[0]=1,n[t.length-1]=1;let i=[[0,t.length-1]];for(;i.length>0;){let[r,o]=i.pop(),a=t[r],l=t[o],s=l[0]-a[0],c=l[1]-a[1],u=Math.hypot(s,c)||1,m=-1,d=e;for(let p=r+1;p<o;p++){let b=t[p],f=Math.abs(c*(b[0]-a[0])-s*(b[1]-a[1]))/u;f>d&&(d=f,m=p);}m>=0&&(n[m]=1,i.push([r,m],[m,o]));}return t.filter((r,o)=>n[o]===1)}function d0(t,e){let n=0,i=-1;for(let[a,l]of t.entries()){let s=(l[0]-t[0][0])**2+(l[1]-t[0][1])**2;s>i&&(i=s,n=a);}let r=Sa(t.slice(0,n+1),e),o=Sa([...t.slice(n),t[0]],e);return [...r.slice(0,-1),...o.slice(0,-1)]}var qt=t=>Q(t,2);function f0(t,e){let n=t.length,i=(o,a)=>{let l=Math.hypot(a[0]-o[0],a[1]-o[1])||1,s=Math.min(.5,e/l);return [o[0]+(a[0]-o[0])*s,o[1]+(a[1]-o[1])*s]},r="";for(let o=0;o<n;o++){let a=t[o],l=i(a,t[(o-1+n)%n]),s=i(a,t[(o+1)%n]);r+=o===0?`M${qt(l[0])} ${qt(l[1])}`:`L${qt(l[0])} ${qt(l[1])}`,r+=`Q${qt(a[0])} ${qt(a[1])} ${qt(s[0])} ${qt(s[1])}`;}return `${r}Z`}function h0(t,e,n){let i="";for(let r of u0(t,e,n)){if(Math.abs(m0(r))<.8)continue;let o=d0(r,.18);o.length>=3&&(i+=f0(o,.9));}return i}var p0=.075;function wa(t){let{width:e,height:n,data:i}=t,r=a0(t),o=0;for(let f of r)o+=f;let{palette:a,error:l}=c0(t,r),s={width:e,height:n,palette:a,alpha:r,coverage:o/(e*n)};if(a.length===0||l>p0)return {...s,layers:[],photographic:a.length>0};let c=a.length,u=Array.from({length:c},()=>new Float32Array(e*n)),m=a.map(f=>f.color);for(let f=0;f<r.length;f++){let h=r[f];if(h<=0)continue;let g=f*4,_=[gt(i[g]),gt(i[g+1]),gt(i[g+2])],y=0,w=-1,C=Number.POSITIVE_INFINITY,S=Number.POSITIVE_INFINITY;for(let v=0;v<c;v++){let I=ln(_,m[v]);I<C?(w=y,S=C,y=v,C=I):I<S&&(w=v,S=I);}if(w<0||C<1e-6){u[y][f]=h;continue}let $=m[y],R=m[w],M=[R[0]-$[0],R[1]-$[1],R[2]-$[2]],P=Math.min(1,Math.max(0,((_[0]-$[0])*M[0]+(_[1]-$[1])*M[1]+(_[2]-$[2])*M[2])/(M[0]**2+M[1]**2+M[2]**2)));u[y][f]=h*(1-P),u[w][f]=h*P;}let d=[],p=new Float32Array(e*n),b=new Array(c);for(let f=c-1;f>=0;f--){let h=u[f];for(let g=0;g<p.length;g++)p[g]+=h[g];b[f]=p.slice();}for(let f=0;f<c;f++){let h=h0(b[f],e,n);h&&d.push({color:m[f],d:h});}return {...s,layers:d,photographic:false}}var{QrCode:po}=dt,g0={"1L":3,"1M":2,"1Q":1,"1H":1,"2L":2,"3L":1};function b0(t){let e=t*4+17,n=new Uint8Array(e*e),i=(a,l)=>{a>=0&&l>=0&&a<e&&l<e&&(n[l*e+a]=1);};for(let a=0;a<e;a++)i(6,a),i(a,6);for(let[a,l]of [[3,3],[e-4,3],[3,e-4]])for(let s=-4;s<=4;s++)for(let c=-4;c<=4;c++)i(a+c,l+s);let r=[];if(t>1){let a=Math.floor(t/7)+2,l=t===32?26:Math.ceil((t*4+4)/(a*2-2))*2;r.push(6);for(let s=e-7;r.length<a;s-=l)r.splice(1,0,s);}let o=r.length-1;for(let[a,l]of r.entries())for(let[s,c]of r.entries())if(!(a===0&&s===0||a===0&&s===o||a===o&&s===0))for(let u=-2;u<=2;u++)for(let m=-2;m<=2;m++)i(l+m,c+u);for(let a=0;a<=8;a++)i(8,a),i(a,8);for(let a=0;a<8;a++)i(e-1-a,8),i(8,e-1-a);if(t>=7)for(let a=0;a<18;a++){let l=e-11+a%3,s=Math.floor(a/3);i(l,s),i(s,l);}return n}function _0(t,e){let n=t*4+17,i=St[e].ordinal,r=po.NUM_ERROR_CORRECTION_BLOCKS[i]?.[t]??0,o=po.ECC_CODEWORDS_PER_BLOCK[i]?.[t]??0,a=Math.floor(po.getNumRawDataModules(t)/8),l=r-a%r,s=Math.floor(a/r),c=Array.from({length:r},(w,C)=>s+(C<l?0:1)),u=[],m=[],d=s-o;for(let w=0;w<=s;w++)for(let C=0;C<r;C++)if(C<l){if(w===d)continue;u.push(C),m.push(w<d?w:w-1);}else u.push(C),m.push(w);if(u.length!==a)throw new Error(`Codeword map: interleave mismatch at version ${t}`);let p=b0(t),b=new Int16Array(n*n).fill(-1),f=new Int16Array(n*n).fill(-1),h=new Int8Array(n*n).fill(-1),g=a*8,_=0;for(let w=n-1;w>=1;w-=2){w===6&&(w=5);let C=(w+1&2)===0;for(let S=0;S<n;S++)for(let $=0;$<2;$++){let R=w-$,P=(C?n-1-S:S)*n+R;if(!p[P]&&_<g){let v=_>>>3;b[P]=u[v],f[P]=m[v],h[P]=7-(_&7),_++;}}}if(_!==g)throw new Error(`Codeword map: placement mismatch at version ${t}`);let y=g0[`${t}${e}`]??0;return {version:t,level:e,size:n,blocks:r,eccPerBlock:o,blockLengths:c,correctable:Math.floor((o-y)/2),block:b,codeword:f,bit:h}}var y0=8,oe=new Map;function Hn(t,e){if(!(Number.isInteger(t)&&t>=1&&t<=40))throw new RangeError(`QR version must be 1\u201340, got ${t}`);let n=`${t}${e}`,i=oe.get(n);if(i)return oe.delete(n),oe.set(n,i),i;let r=_0(t,e);if(oe.size>=y0){let o=oe.keys().next().value;o!==void 0&&oe.delete(o);}return oe.set(n,r),r}function qn(t,e){let n=new Array(t.blocks).fill(0),i=new Set;for(let r of e){let o=t.block[r]??-1;if(o<0)continue;let a=o*4096+t.codeword[r];i.has(a)||(i.add(a),n[o]=n[o]+1);}return n}var x0={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},$0=Object.fromEntries(Object.entries(x0).map(([t,e])=>[t,[Number.parseInt(e.slice(0,2),16),Number.parseInt(e.slice(2,4),16),Number.parseInt(e.slice(4,6),16)]]));function Ca(t,e){let n=t.trim(),i=Number.parseFloat(n);return Number.isNaN(i)?Number.NaN:n.endsWith("%")?i/100*e:i}function it(t){if(!t)return null;let e=t.trim().toLowerCase();if(e==="transparent")return {r:0,g:0,b:0,a:0};let n=$0[e];if(n)return {r:n[0],g:n[1],b:n[2],a:1};if(e.startsWith("#")){let r=e.slice(1);return (r.length===3||r.length===4)&&(r=r.split("").map(o=>o+o).join("")),/^[0-9a-f]{6}([0-9a-f]{2})?$/.test(r)?{r:Number.parseInt(r.slice(0,2),16),g:Number.parseInt(r.slice(2,4),16),b:Number.parseInt(r.slice(4,6),16),a:r.length===8?Number.parseInt(r.slice(6,8),16)/255:1}:null}let i=/^rgba?\(([^)]*)\)$/.exec(e);if(i){let[r,o]=i[1].split("/"),a=r.split(/[\s,]+/).filter(Boolean);if(a.length!==(o===void 0&&a.length===4?4:3))return null;let l=o??a[3],[s,c,u]=a.slice(0,3).map(p=>Ca(p,255)),m=l===void 0?1:Ca(l,1);if([s,c,u,m].some(p=>Number.isNaN(p)))return null;let d=(p,b)=>Math.min(Math.max(p,0),b);return {r:d(s,255),g:d(c,255),b:d(u,255),a:d(m,1)}}return null}function cn(t,e,n){let i=t/255,r=e/255,o=n/255,a=1-Math.max(i,r,o);return a>=1?[0,0,0,1]:[Q((1-i-a)/(1-a)),Q((1-r-a)/(1-a)),Q((1-o-a)/(1-a)),Q(a)]}function Ot(t){return t.children}var S0=t=>t==null?null:`${t}`;function go(t,e,n){let i=e??{},r=n;if("key"in i){let{key:o,...a}=i;o!==void 0&&(r=o),i=a;}return {type:t,props:i,key:S0(r)}}function w0(t,e){let n=t;return {type:n.type,props:{...n.props,...e},key:n.key??null}}function C0(t,e,...n){let i={...e};return n.length>0&&(i.children=n.length===1?n[0]:n),go(t,i)}var M0={jsx:go,jsxs:go,createElement:C0,cloneElement:w0,Fragment:Ot},un=M0;var bo=t=>t===Ot?un.Fragment:t;function A(t,e,n){return un.jsx(bo(t),e,n)}function ct(t,e,n){return un.jsxs(bo(t),e,n)}function _o(t,e,...n){return un.createElement(bo(t),e??null,...n)}function Oe(t,e){return un.cloneElement(t,e)}var R0=new Set([Symbol.for("react.element"),Symbol.for("react.transitional.element")]),Ma=Symbol.for("react.fragment");function Wn(t){if(typeof t!="object"||t===null||Array.isArray(t))return false;let e=t;return e.$$typeof!==void 0&&!R0.has(e.$$typeof)?false:(typeof e.type=="string"||typeof e.type=="function"||e.type===Ma)&&typeof e.props=="object"&&e.props!==null}var Vn=t=>t===Ot||t===Ma;var E0=.6;var De=class{entries=new Map;limit;constructor(e){this.limit=e;}get(e,n){let i=this.entries.get(e);if(i!==void 0)return this.entries.delete(e),this.entries.set(e,i),i;let r=n();if(this.entries.size>=this.limit){let o=this.entries.keys().next().value;o!==void 0&&this.entries.delete(o);}return this.entries.set(e,r),r}},A0=new De(8);function P0(t){return A0.get(t,()=>{let e=atob(t),n=new Uint8Array(e.length);for(let i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return n})}function $o(t){let{width:e,height:n,data:i}=t;if(!(Number.isInteger(e)&&Number.isInteger(n))||e<1||n<1||e>Yr||n>Yr||typeof i!="string")return null;try{let r=P0(i);return r.length===e*n*4?{width:e,height:n,data:r}:null}catch{return null}}function Ia(t){return !!(t&&Zr.includes(t.mode)&&t.image&&$o(t.image))}function So(t){let e=qi[t.mode];return t.variant&&e.includes(t.variant)?t.variant:e[0]}function v0(t,e){if(t===1)return [];let n=Math.floor(t/7)+2,i=t===32?26:Math.ceil((t*4+4)/(n*2-2))*2,r=[6];for(let o=e-7;r.length<n;o-=i)r.splice(1,0,o);return r}function mn(t,e){let n=v0(t,e),i=n.length-1,r=[];for(let[o,a]of n.entries())for(let[l,s]of n.entries())o===0&&l===0||o===0&&l===i||o===i&&l===0||r.push([a,s]);return r}var wt=1,At=2,Wt=3,Ra=4,Ea=new Map;function I0(t){let e=Ea.get(t);if(e)return e;let n=t*4+17,i=new Uint8Array(n*n),r=(o,a,l,s,c)=>{for(let u=Math.max(0,a);u<Math.min(n,a+s);u++)for(let m=Math.max(0,o);m<Math.min(n,o+l);m++)i[u*n+m]=c;};r(6,0,1,n,Ra),r(0,6,n,1,Ra),r(0,8,9,1,Wt),r(8,0,1,9,Wt),r(n-8,8,8,1,Wt),r(8,n-8,1,8,Wt),t>=7&&(r(n-11,0,3,6,Wt),r(0,n-11,6,3,Wt));for(let[o,a]of mn(t,n))r(o-2,a-2,5,5,At);return r(0,0,8,8,wt),r(n-8,0,8,8,wt),r(0,n-8,8,8,wt),Ea.set(t,i),i}function F0(t){let e=t[8],n=e?.[0]?1:0,i=e?.[1]?1:0,r=(1-n)*2+i;return ["M","L","H","Q"][r]??"M"}function Xn(t,e){let n=it(t);return !n||n.a===0?e:[n.r/255,n.g/255,n.b/255]}var ae=(t,e,n)=>[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n,t[2]+(e[2]-t[2])*n];function Vt(t,e,n,i){let r=q(t);if(i?r<=n:r>=n)return t;let o=q(e);return Math.abs(r-o)<1e-6?e:ae(t,e,Math.min(1,Math.max(0,(r-n)/(r-o))))}var Fa=t=>Math.max(...t)-Math.min(...t),L0=(t,e)=>(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2,yo=t=>t.toString(16).padStart(2,"0");function bt(t,e=1){let n=i=>Math.min(255,Math.round(Math.round(Math.min(Math.max(i,0),1)*255)/e)*e);return `#${yo(n(t[0]))}${yo(n(t[1]))}${yo(n(t[2]))}`}function k0(t){let e=t<0?-1:1,n=Math.abs(t),i=1/(1+.3275911*n),r=1-((((1.061405429*i-1.453152027)*i+1.421413741)*i-.284496736)*i+.254829592)*i*Math.exp(-n*n);return e*r}var wo=.3,Aa=t=>1-Math.exp(-((t/2)**2)/(2*wo**2)),T0=t=>k0(t/(2*wo*Math.SQRT2))**2,N0=(t,e,n)=>{let i=Math.min(1,Math.max(0,(n-t)/(e-t)));return i*i*(3-2*i)};function Co(t,e,n,i){let r=i==="cover"?Math.max(n/t,n/e):Math.min(n/t,n/e);return {scale:r,offsetX:(n-t*r)/2,offsetY:(n-e*r)/2}}function La(t,e){let{width:n,height:i,data:r}=t,o=new Float32Array(n*i*3),a=e??new Float32Array(n*i);for(let l=0;l<n*i;l++)o[l*3]=r[l*4]/255,o[l*3+1]=r[l*4+1]/255,o[l*3+2]=r[l*4+2]/255,e||(a[l]=r[l*4+3]/255);return {width:n,height:i,rgb:o,alpha:a}}function O0(t){let e=La(t),{rgb:n,alpha:i}=e,r=new Float64Array(256),o=0;for(let m=0;m<i.length;m++){if(i[m]<.5)continue;let d=q([n[m*3],n[m*3+1],n[m*3+2]]);r[Math.min(255,Math.floor(d*256))]+=1,o++;}let a=m=>{let d=0;for(let p=0;p<256;p++)if(d+=r[p],d>=m*o)return p/255;return 1},l=o?a(.01):0,s=o?a(.99):1;s-l<.15&&(l=0,s=1);let c=Math.min(1.6,1/(s-l)),u=(l+s)/2;for(let m=0;m<i.length;m++){let d=[n[m*3],n[m*3+1],n[m*3+2]],p=q(d),b=.5+(p-u)*c;for(let f=0;f<3;f++)n[m*3+f]=Math.min(1,Math.max(0,b+(d[f]-p)*1.12));}return e}function ka(t,e,n,i,r=1){let{width:o,height:a,rgb:l,alpha:s}=t,c=Math.min(Math.max(e-.5,0),o-1),u=Math.min(Math.max(n-.5,0),a-1),m=Math.floor(c),d=Math.floor(u),p=Math.min(m+1,o-1),b=Math.min(d+1,a-1),f=c-m,h=u-d,g=0,_=0,y=0,w=0,C=($,R,M)=>{let P=R*o+$,v=s[P]*M;g+=l[P*3]*v,_+=l[P*3+1]*v,y+=l[P*3+2]*v,w+=v;};if(C(m,d,(1-f)*(1-h)),C(p,d,f*(1-h)),C(m,b,(1-f)*h),C(p,b,f*h),w<=0)return i;let S=w*r;return [i[0]+(g/w-i[0])*S,i[1]+(_/w-i[1])*S,i[2]+(y/w-i[2])*S]}var D0=new De(4),B0=new De(6),G0=new De(6);function Mo(t,e){return B0.get(t.image.data,()=>wa(e))}function Ta(t,e,n){return G0.get(t.image.data,()=>La(e,n.alpha))}var at=t=>Q(t,2),Na=t=>Q(t,4),se=class{groups=new Map;add(e,n){let i=this.groups.get(e);i?i.push(n):this.groups.set(e,[n]);}cellRun(e,n,i,r){this.add(e,`M${n} ${i}h${r}.04v1.04h-${r}.04z`);}circle(e,n,i,r){this.add(e,Q0(n,i,r));}toElements(e){return [...this.groups].map(([n,i],r)=>A("path",{d:i.join(""),fill:n},`${e}-${r}`))}};function Q0(t,e,n){let i=at(n*2),r=at(n);return `M${at(t-n)} ${at(e)}a${r} ${r} 0 1 0 ${i} 0a${r} ${r} 0 1 0 ${-i} 0z`}function ie(t,e,n,i,r){let o=Math.min(r,n/2,i/2);if(o<=0)return `M${at(t)} ${at(e)}h${at(n)}v${at(i)}h${at(-n)}z`;let a=at(o);return `M${at(t+o)} ${at(e)}h${at(n-2*o)}a${a} ${a} 0 0 1 ${a} ${a}v${at(i-2*o)}a${a} ${a} 0 0 1 ${-a} ${a}h${at(-(n-2*o))}a${a} ${a} 0 0 1 ${-a} ${-a}v${at(-(i-2*o))}a${a} ${a} 0 0 1 ${a} ${-a}z`}function Oa(t,e,n){let i="";for(let[r,o]of t){let a=(r-2+e)*n,l=(o-2+e)*n;i+=ie(a,l,5*n,5*n,n*.35),i+=ie(a+n,l+n,3*n,3*n,n*.15),i+=ie(a+2*n,l+2*n,n,n,n*.12);}return i}var U0={blend:1,badge:1,color:.9,mono:.7},z0=.35;function Da(t,e,n){let i=Math.min(Math.max(t.intensity??E0,0),U0[So(t)]);return q(n)-q(e)>=z0?i:0}function H0(t){let{art:e,modules:n,version:i}=t,r=e.image&&$o(e.image);if(!(r&&Zr.includes(e.mode)))return null;let o=n.length;if(o!==i*4+17)return null;let a=Xn(t.fgColor,[0,0,0]),l=Xn(t.bgColor,[1,1,1]),s=Da(e,a,l);return s<=0?null:{art:e,image:r,modules:n,size:o,version:i,kinds:I0(i),margin:t.margin,pixelSize:t.pixelSize,t:s,fg:a,bg:l,variant:So(e),body:t.body}}function Ba(t){let e=H0(t);if(!e)return null;let n;return e.art.mode==="halftone"?n=e.variant==="mono"?Z0(e):X0(e):n=e.variant==="badge"?im(e):Y0(e),A("g",{"data-qrdx-art":e.art.mode,"data-qrdx-art-variant":e.variant,children:n})}function q0(t,e){return {margin:.42-.17*t+(e===3?.04:0),darkCap:.4+.3*t}}var Ga=8.5,Pa=new Map;function Ro(t){let e=t*4+17,n=Pa.get(t);if(!n){let o=e*2,a=new Uint8Array(o*o),l=Ga*2;for(let s=0;s<o;s++)for(let c=0;c<o;c++){let u=c<l||c>=o-l,m=s<l||s>=o-l;u&&m&&!(c>=o-l&&s>=o-l)&&(a[s*o+c]=1);}for(let[s,c]of mn(t,e))for(let u=(c-2)*2-1;u<(c+3)*2+1;u++)for(let m=(s-2)*2-1;m<(s+3)*2+1;m++)m>=0&&u>=0&&m<o&&u<o&&(a[u*o+m]=1);Pa.set(t,a),n=a;}let i=n,r=e*2;return (o,a)=>{let l=Math.floor(o*2),s=Math.floor(a*2);return l>=0&&s>=0&&l<r&&s<r&&i[s*r+l]===1}}function Qa(t,e,n=false){let{image:i,size:r,kinds:o,fg:a,bg:l}=t,s=D0.get(t.art.image.data,()=>O0(i)),c=Co(i.width,i.height,r,"cover"),u=r*e,m=new Float32Array(u*u*3).fill(Number.NaN),p=1/(e*c.scale)>1.3?2:1,b=q(l)-.1*(q(l)-q(a)),f=Ro(t.version);for(let h=0;h<r;h++)for(let g=0;g<r;g++){let _=o[h*r+g],y=_===wt||_===At;if(!(y&&!n))for(let w=0;w<e;w++)for(let C=0;C<e;C++){let S=0,$=0,R=0;for(let N=0;N<p;N++)for(let L=0;L<p;L++){let V=g+(C+(L+.5)/p)/e,D=h+(w+(N+.5)/p)/e,G=ka(s,(V-c.offsetX)/c.scale,(D-c.offsetY)/c.scale,l);S+=G[0],$+=G[1],R+=G[2];}let M=p*p,P=[S/M,$/M,R/M],v=g+(C+.5)/e,I=h+(w+.5)/e,F=Math.min(v,I,r-v,r-I);F<1.5&&(P=ae(P,l,.35*(1-F/1.5))),n&&(y||f(v,I))&&(P=Vt(P,l,b,false));let T=((h*e+w)*u+g*e+C)*3;m[T]=P[0],m[T+1]=P[1],m[T+2]=P[2];}}return {n:e,count:u,rgb:m}}function W0(t,e,n){let{size:i,kinds:r,modules:o,fg:a,bg:l,t:s}=t,{n:c,count:u,rgb:m}=e,d=q(a),p=q(l),b=p-d,f=q0(s,c),h=R=>.2126*m[R]+.7152*m[R+1]+.0722*m[R+2],g=new Float32Array(i*i),_=new Float32Array(i*i);for(let R=0;R<i;R++)for(let M=0;M<i;M++){let P=r[R*i+M];if(P===wt){g[R*i+M]=p;continue}if(P===At){g[R*i+M]=o[R]?.[M]?d:p;continue}let v=0,I=0,F=0;for(let T=0;T<c;T++)for(let N=0;N<c;N++){let L=h(((R*c+T)*u+M*c+N)*3);v+=L,n.under[T*c+N]||(I+=L,F++);}g[R*i+M]=v/(c*c),_[R*i+M]=F?I/F:v/(c*c);}let y=i+1,w=new Float64Array(y*y);for(let R=0;R<i;R++)for(let M=0;M<i;M++)w[(R+1)*y+M+1]=g[R*i+M]+w[R*y+M+1]+w[(R+1)*y+M]-w[R*y+M];let C=2,S=(R,M)=>{let P=Math.max(0,R-C),v=Math.max(0,M-C),I=Math.min(i,R+C+1),F=Math.min(i,M+C+1);return (w[F*y+I]-w[v*y+I]-w[F*y+P]+w[v*y+P])/((I-P)*(F-v))},$=n.weight;for(let R=0;R<i;R++)for(let M=0;M<i;M++){let P=r[R*i+M];if(P===wt||P===At)continue;let v=P===Wt,I=(f.margin+(v?.08:0))*b,F=(f.darkCap-(v?.12:0))*b,T=($*((n.light-n.dark)/2)-I)/(1-$),N=S(M,R),L=_[R*i+M],V=!!o[R]?.[M],D=0,G=l;if(V){let U=Math.min(N+T,d+F);L>U&&(D=(L-U)/Math.max(L-d,1e-6),G=a);}else {let U=Math.max(N-T,p-F);L<U&&(D=(U-L)/Math.max(p-L,1e-6));}if(!(D<=0)){D=Math.min(1,D);for(let U=0;U<c;U++)for(let et=0;et<c;et++){let K=((R*c+U)*u+M*c+et)*3;for(let j=0;j<3;j++)m[K+j]+=(G[j]-m[K+j])*D;}}}}function Ua(t,e,n,i){let{count:r}=e,o=new se;for(let s=0;s<r;s++){let c=0,u=n(s*r);for(let m=1;m<=r;m++){let d=m<r?n(s*r+m):null;(m===r||d!==u)&&(u&&o.cellRun(u,c,s,m-c),c=m,u=d);}}let a=t.pixelSize/e.n,l=at(t.margin*t.pixelSize);return A("g",{transform:`translate(${l} ${l}) scale(${Na(a)})`,children:o.toElements(i)},i)}function Eo(t,e){let n=mn(t.version,t.size);return n.length===0?[]:[A("path",{d:Oa(n,t.margin,t.pixelSize),fill:e,fillRule:"evenodd"},"art-alignment")]}function za(t){let{image:e,size:n}=t;return Math.floor(Math.min(e.width,e.height)/n)>=4&&n<=45?4:3}var V0=t=>2*wo*Math.sqrt(-2*Math.log(1-Math.min(t,.95)));function j0(t,e,n){let i=e+1,r=new Float64Array(i*i);for(let a=0;a<e;a++)for(let l=0;l<e;l++)r[(a+1)*i+l+1]=t[a*e+l]+r[a*i+l+1]+r[(a+1)*i+l]-r[a*i+l];let o=new Float32Array(e*e);for(let a=0;a<e;a++)for(let l=0;l<e;l++){let s=Math.max(0,l-n),c=Math.max(0,a-n),u=Math.min(e,l+n+1),m=Math.min(e,a+n+1);o[a*e+l]=(r[m*i+u]-r[c*i+u]-r[m*i+s]+r[c*i+s])/((u-s)*(m-c));}return o}function Ha(t,e,n,i){let{size:r,kinds:o,modules:a,fg:l,bg:s}=t,c=q(l),u=q(s),m=u-c,d=j0(e,r,2),p=new Float32Array(r*r),b=new Float32Array(r*r).fill(Number.NaN);for(let f=0;f<r;f++)for(let h=0;h<r;h++){let g=f*r+h,_=o[g];if(_===wt||_===At)continue;let y=_===Wt,w=i.base+(y?.08:0),C=(i.margin+(y?.03:0))*m,S=(i.cap-(y?.04:0))*m,$=Aa(w),R=Aa(y?Math.max(i.max,.94):i.max),M=$*((i.dark+i.light)/2)+(1-$)*d[g],P=n[g],v=!!a[f]?.[h],I=v?i.dark:i.light,F=v?Math.min(M-C,c+S):Math.max(M+C,u-S),N=(v?P<=F:P>=F)?0:(P-F)/(P-I);N>R&&(N=R,b[g]=Math.min(u,Math.max(c,(F-R*I)/(1-R))));let L=v?P<=F-.06:P>=F+.06;i.skip&&L&&!y||(N=Math.max(N,$)),p[g]=N>0?V0(N):0;}return {diameter:p,surround:b}}function X0(t){let{size:e,kinds:n,modules:i,fg:r,bg:o,t:a,margin:l,pixelSize:s}=t,c=za(t),u=Qa(t,c,true),m=q(r),d=q(o),p=m+.1*(d-m),b=d-.05*(d-m),{count:f,rgb:h}=u,g=(S,$,R,M)=>(($*c+M)*f+S*c+R)*3,_=new Float32Array(e*e);for(let S=0;S<e;S++)for(let $=0;$<e;$++){let R=n[S*e+$];if(R===wt||R===At){_[S*e+$]=R===At&&i[S]?.[$]?m:d;continue}let M=0;for(let P=0;P<c;P++)for(let v=0;v<c;v++){let I=g($,S,v,P);M+=.2126*h[I]+.7152*h[I+1]+.0722*h[I+2];}_[S*e+$]=M/(c*c);}let y=Ha(t,_,_,{base:.6-.28*a,max:.86,dark:p,light:b,margin:.2-.1*a,cap:.4+.14*a,skip:false});for(let S=0;S<e;S++)for(let $=0;$<e;$++){let R=y.surround[S*e+$];if(Number.isNaN(R))continue;let M=_[S*e+$],v=R<M?r:o,I=Math.min(1,Math.abs(M-R)/Math.max(Math.abs(M-q(v)),1e-6));for(let F=0;F<c;F++)for(let T=0;T<c;T++){let N=g($,S,T,F);for(let L=0;L<3;L++)h[N+L]+=(v[L]-h[N+L])*I;}}let w=[Ua(t,u,S=>{let $=S*3;return Number.isNaN(h[$])?null:bt([h[$],h[$+1],h[$+2]],8)},"art-photo")],C=new se;for(let S=0;S<e;S++)for(let $=0;$<e;$++){let R=y.diameter[S*e+$];if(!(R>0))continue;let M=0,P=0,v=0;for(let T=0;T<c;T++)for(let N=0;N<c;N++){let L=g($,S,N,T);M+=h[L],P+=h[L+1],v+=h[L+2];}let I=[M/(c*c),P/(c*c),v/(c*c)],F=i[S]?.[$]?Vt(I,r,p,true):Vt(I,o,b,false);C.circle(bt(F,10),($+l+.5)*s,(S+l+.5)*s,R/2*s);}return w.push(...C.toElements("art-dot"),...Eo(t,bt(r))),w}function Z0(t){let{size:e,kinds:n,modules:i,fg:r,bg:o}=t,a=za(t),l=Qa(t,a),s=q(r),c=q(o),u=a%2===1?1:2,m=(a-u)/2,d=M=>M>=m&&M<m+u,p=[];for(let M=0;M<a;M++)for(let P=0;P<a;P++)p.push(d(P)&&d(M));W0(t,l,{weight:T0(u/a),dark:s,light:c,under:p});let{count:b,rgb:f}=l,h=new Float32Array(b*b),g=new Int8Array(b*b).fill(-1);for(let M=0;M<b*b;M++){let P=M*3;if(Number.isNaN(f[P])){h[M]=Number.NaN;continue}let v=(.2126*f[P]+.7152*f[P+1]+.0722*f[P+2]-s)/(c-s);h[M]=.5+(N0(0,1,v)-.5)*1.15;}for(let M=0;M<e;M++)for(let P=0;P<e;P++){let v=n[M*e+P];if(!(v===wt||v===At))for(let I=m;I<m+u;I++)for(let F=m;F<m+u;F++)g[(M*a+I)*b+P*a+F]=i[M]?.[P]?0:1;}let _=Ro(t.version);for(let M=0;M<b;M++)for(let P=0;P<b;P++){let v=M*b+P;g[v]<0&&_((P+.5)/a,(M+.5)/a)&&(g[v]=1);}let y=new Uint8Array(b*b),w=.3,C=0,S=0,$=(M,P,v)=>{if(M<0||M>=b||P>=b)return;let I=P*b+M;if(!Number.isNaN(h[I])){let F=Math.floor(M/a)===Math.floor(C/a)&&Math.floor(P/a)===Math.floor(S/a);h[I]+=F?v:v*w;}};for(let M=0;M<b;M++){let P=M%2===0?1:-1;for(let v=0;v<b;v++){let I=P===1?v:b-1-v,F=M*b+I,T=h[F];if(Number.isNaN(T))continue;let N=g[F]>=0?g[F]:T>=.5?1:0;y[F]=N===0?1:0;let L=Math.min(.75,Math.max(-0.75,T-N));C=I,S=M,$(I+P,M,L*7/16),$(I-P,M+1,L*3/16),$(I,M+1,L*5/16),$(I+P,M+1,L/16);}}let R=bt(r);return [Ua(t,l,M=>y[M]?R:null,"art-halftone"),...Eo(t,R)]}function va(t,e){let n=null,i=0;for(let r of t.palette){if(e&&L0(r.color,e)<.02)continue;let o=r.area*(.35+Fa(r.color))*(q(r.color)>.86?.05:1);o>i&&(i=o,n=r.color);}return n}function qa(t,e,n,i,r){let o;if(t.photographic){let a=new se,{width:l,height:s,rgb:c,alpha:u}=e;for(let m=0;m<s;m++){let d=0,p=null;for(let b=0;b<=l;b++){let f=m*l+b,h=b<l&&u[f]>=.5?bt(i([c[f*3],c[f*3+1],c[f*3+2]]),6):null;(b===l||h!==p)&&(p&&a.cellRun(p,d,m,b-d),d=b,p=h);}}o=a.toElements(`${r}-px`);}else o=t.layers.map((a,l)=>A("path",{d:a.d,fill:bt(i(a.color)),fillRule:"evenodd"},`${r}-${l}`));return A("g",{transform:`translate(${at(n.x)} ${at(n.y)}) scale(${Na(n.scale)})`,children:o},r)}function Y0(t){let{art:e,image:n,size:i,kinds:r,modules:o,fg:a,bg:l,t:s,margin:c,pixelSize:u}=t,m=Mo(e,n),d=Ta(e,n,m),p=Co(m.width,m.height,i,"contain"),b=Math.min(1,.3+1.4*s),f=L=>ae(l,L,b),h=bt(l),g=bt(a),_=[qa(m,d,{x:(c+p.offsetX)*u,y:(c+p.offsetY)*u,scale:p.scale*u},f,"art-logo")],y=Ga,w=(L,V)=>ie((L+c)*u,(V+c)*u,(y+.4)*u,(y+.4)*u,1.2*u),C=mn(t.version,i).map(([L,V])=>ie((L-2.5+c)*u,(V-2.5+c)*u,6*u,6*u,u*.8)).join("");_.push(A("path",{d:w(-0.4,-0.4)+w(i-y,-0.4)+w(-0.4,i-y)+C,fill:h},"art-plates"));let S=Ro(t.version),$=q(l),R=q(a),M=new Float32Array(i*i),P=new Float32Array(i*i),v=new Array(i*i);for(let L=0;L<i;L++)for(let V=0;V<i;V++){let D=L*i+V,G=r[D];if(G===wt||G===At){M[D]=G===At&&o[L]?.[V]?R:$;continue}let U=1,et=0,K=0,j=0,Rt=0;for(let B=0;B<4;B++)for(let yt=0;yt<4;yt++){let Jt=V+(yt+.5)/4,Je=L+(B+.5)/4,kt=S(Jt,Je)?l:ka(d,(Jt-p.offsetX)/p.scale,(Je-p.offsetY)/p.scale,l,b),Tt=q(kt);U=Math.min(U,Tt),et+=Tt,K+=kt[0],j+=kt[1],Rt+=kt[2];}M[D]=et/16,P[D]=U,v[D]=[K/16,j/16,Rt/16];}let I=R+.08*($-R),F=$-.04*($-R),T=Ha(t,M,M,{base:.74-.26*s,max:.9,dark:I,light:F,margin:.23-.1*s,cap:.4+.1*s,skip:s>=.7}),N=new se;for(let L=0;L<i;L++)for(let V=0;V<i;V++){let D=L*i+V,G=T.diameter[D],U=!!o[L]?.[V];if(!(G>0)||!U&&P[D]>=$-.02)continue;let et=U?Vt(v[D],a,I,true):Vt(v[D],l,F,false);N.circle(bt(et,8),(V+c+.5)*u,(L+c+.5)*u,G/2*u);}return _.push(...N.toElements("art-dot")),_.push(...Eo(t,g)),_}var K0={L:.5,M:.72,Q:.88,H:1},Wa=.32,Va=.55,J0=.6,tm=2;function ja(t,e,n){let i=e>=1?t:t*e,r=e>=1?t/e:t,o=Math.max(.7,t*.09),a=i+2*o,l=r+2*o;return {logoW:i,logoH:r,plateW:a,plateH:l,radius:Math.min(a,l)*.26,cx:n/2,cy:n/2}}var Xa=t=>({cx:t.cx,cy:t.cy,w:t.plateW,h:t.plateH,r:t.radius});function Za(t,e,n){return Ka(e+.5,n+.5,t)<Va}function em(t,e){let n=Xa(t),i=Va+1,r=Math.max(0,Math.floor(t.cx-t.plateW/2-i)),o=Math.min(e-1,Math.ceil(t.cx+t.plateW/2+i)),a=Math.max(0,Math.floor(t.cy-t.plateH/2-i)),l=Math.min(e-1,Math.ceil(t.cy+t.plateH/2+i)),s=[];for(let c=a;c<=l;c++)for(let u=r;u<=o;u++)Za(n,u,c)&&s.push(c*e+u);return s}var nm=t=>Math.floor(t.correctable*J0);function xo(t,e,n){let i=ja(t,e,n.size),r=nm(n);return qn(n,em(i,n.size)).every(o=>o<=r)}function Ya(t,e,n){if(xo(n,e,t))return n;let i=0,r=n;if(!xo(i,e,t))return -1;for(;r-i>1/64;){let o=(i+r)/2;xo(o,e,t)?i=o:r=o;}return i}var jn=new Map;function rm(t,e){let n=`${t.version}${t.level}:${e.toFixed(3)}`,i=jn.get(n);return i===void 0&&(i=Ya(t,e,Wa*t.size),jn.size>=64&&jn.clear(),jn.set(n,i)),i}function om(t,e){let{size:n,t:i,modules:r,version:o}=t,a=F0(r),l=(.18+.15*i)*K0[a],s=e.width/e.height,c=Math.min(Wa,l)*n,u=Hn(o,a),m=Math.max(0,rm(u,s));if(m<tm)return {wantedBox:c,maxBox:m,box:0,plate:null};let d=Ya(u,s,Math.min(c,m));return d<0?{wantedBox:c,maxBox:m,box:0,plate:null}:{wantedBox:c,maxBox:m,box:d,plate:ja(d,s,n)}}function Ka(t,e,n){let i=Math.abs(t-n.cx)-(n.w/2-n.r),r=Math.abs(e-n.cy)-(n.h/2-n.r);return Math.hypot(Math.max(i,0),Math.max(r,0))+Math.min(Math.max(i,r),0)-n.r}function Ja(t,e){let{fg:n,bg:i,t:r}=t,o=q(n),a=q(i),l=va(e),s=Math.min(1,r/.6),c=l?Vt(l,n,o+.3*(a-o),true):n,u=ae(n,c,s),m=l?va(e,l):null,d=o+.42*(a-o),p=m&&q(m)<=d+.22?ae(n,Vt(m,n,d,true),s):u;return {body:u,inner:p}}function im(t){let{art:e,image:n,size:i,kinds:r,modules:o,bg:a,margin:l,pixelSize:s,version:c}=t,u=Mo(e,n),m=om(t,u).plate,{body:d}=Ja(t,u),p=bt(d),b=m&&Xa(m),f=o.map(v=>[...v]);for(let v=0;v<i;v++)for(let I=0;I<i;I++){let F=r[v*i+I];(F===At||b&&F!==wt&&Za(b,I,v))&&(f[v][I]=false);}let h=[],g=t.body?.(f);if(g)h.push(A("g",{fill:p,children:g},"art-body"));else {let v=new se;for(let I=0;I<i;I++)for(let F=0;F<i;F++)f[I]?.[F]&&r[I*i+F]!==wt&&v.circle(p,(F+l+.5)*s,(I+l+.5)*s,.45*s);h.push(...v.toElements("art-body"));}let _=mn(c,i).filter(([v,I])=>!b||Ka(v+.5,I+.5,b)>3.2);if(_.length>0&&h.push(A("path",{d:Oa(_,l,s),fill:p,fillRule:"evenodd"},"art-alignment")),!m)return h;let y=Ta(e,n,u),w=(m.cx-m.plateW/2+l)*s,C=(m.cy-m.plateH/2+l)*s,S=m.plateW*s,$=m.plateH*s,R=m.radius*s,M=.1*s,P=ie(w,C,S,$,R);return h.push(A("path",{d:P,fill:bt(a)},"art-plate"),A("path",{d:P+ie(w+M,C+M,S-2*M,$-2*M,R-M),fill:bt(ae(a,d,.16)),fillRule:"evenodd"},"art-plate-ring"),qa(u,y,{x:(m.cx-m.logoW/2+l)*s,y:(m.cy-m.logoH/2+l)*s,scale:m.logoW/u.width*s},v=>v,"art-logo")),h}function ts(t){let{art:e}=t;if(e.mode!=="logo"||e.matchEyes===false)return null;let n=e.image&&$o(e.image);if(!n)return null;let i=Xn(t.fgColor,[0,0,0]),r=Xn(t.bgColor,[1,1,1]),o=Da(e,i,r);if(o<=0)return null;let a=Mo(e,n);if(a.palette.length===0)return null;if(So(e)==="badge"){let{body:b,inner:f}=Ja({fg:i,bg:r,t:o},a),h={outer:bt(b),inner:bt(f)};return {topLeft:h,topRight:h,bottomLeft:h}}let l=q(i),s=q(r),c=Math.min(1,o/.6),u=t.version*4+17,m=Co(a.width,a.height,u,"contain"),d=.45*Math.max(a.width,a.height),p=(b,f)=>{let h=(b-m.offsetX)/m.scale,g=(f-m.offsetY)/m.scale,_=null,y=0;for(let C of a.palette){if(q(C.color)>.86)continue;let S=(C.cx-h)**2+(C.cy-g)**2,$=C.area*(.35+Fa(C.color))*Math.exp(-S/(2*d**2));$>y&&(y=$,_=C.color);}if(!_)return {};let w=Vt(_,i,l+.42*(s-l),true);return {inner:bt(ae(i,w,c))}};return {topLeft:p(3.5,3.5),topRight:p(u-3.5,3.5),bottomLeft:p(3.5,u-3.5)}}var es=t=>t*3+3&-4,Ao=(t,e)=>Math.floor((t*e+255*(255-e)+127)/255);function ns(t,e,n){if(!(Number.isInteger(e)&&Number.isInteger(n))||e<1||n<1||e>16384||n>16384)throw new RangeError(`BMP width and height must be whole numbers from 1 to 16384, got ${e} x ${n}`);if(t.length!==e*n*4)throw new RangeError(`Expected ${e*n*4} RGBA bytes for ${e} x ${n}, got ${t.length}`);let i=es(e),r=i*n,o=new Uint8Array(54+r),a=new DataView(o.buffer);o[0]=66,o[1]=77,a.setUint32(2,o.length,true),a.setUint32(10,54,true),a.setUint32(14,40,true),a.setInt32(18,e,true),a.setInt32(22,n,true),a.setUint16(26,1,true),a.setUint16(28,24,true),a.setUint32(30,0,true),a.setUint32(34,r,true),a.setInt32(38,2835,true),a.setInt32(42,2835,true);for(let l=0;l<n;l++){let s=l*e*4,c=54+(n-1-l)*i;for(let u=0;u<e;u++){let m=t[s+3],d=t[s],p=t[s+1],b=t[s+2];m===255?(o[c]=b,o[c+1]=p,o[c+2]=d):(o[c]=Ao(b,m),o[c+1]=Ao(p,m),o[c+2]=Ao(d,m)),s+=4,c+=3;}}return o}function rs(t){if(t.length<54||t[0]!==66||t[1]!==77)return false;let e=new DataView(t.buffer,t.byteOffset,t.byteLength),n=e.getInt32(18,true),i=e.getInt32(22,true);return e.getUint32(2,true)===t.length&&e.getUint32(10,true)===54&&e.getUint32(14,true)===40&&n>0&&i>0&&e.getUint16(26,true)===1&&e.getUint16(28,true)===24&&e.getUint32(30,true)===0&&t.length===54+es(n)*i}function Zn(t){let e=t.getContext("2d");if(!e)throw new Error("Could not get canvas context");let{data:n}=e.getImageData(0,0,t.width,t.height),i=ns(n,t.width,t.height);if(!rs(i))throw new Error("Could not write a BMP file");return new Blob([i],{type:"image/bmp"})}function z(t){if(t.length===0)return "";let[e,...n]=t;return `M${x(e[0])} ${x(e[1])}${n.map(([i,r])=>`L${x(i)} ${x(r)}`).join("")}Z`}function H(t,e,n){return `M${x(t-n)} ${x(e)}A${x(n)} ${x(n)} 0 1 1 ${x(t+n)} ${x(e)}A${x(n)} ${x(n)} 0 1 1 ${x(t-n)} ${x(e)}Z`}function k(t,e,n,i,r=0){let o=Math.min(n,i)/2,[a,l,s,c]=(typeof r=="number"?[r,r,r,r]:r).map(m=>Math.max(0,Math.min(m,o))),u=(m,d,p)=>m>0?`A${x(m)} ${x(m)} 0 0 1 ${x(d)} ${x(p)}`:"";return `M${x(t+a)} ${x(e)}H${x(t+n-l)}${u(l,t+n,e+l)}V${x(e+i-s)}${u(s,t+n-s,e+i)}H${x(t+c)}${u(c,t,e+i-c)}V${x(e+a)}${u(a,t+a,e)}Z`}function Be(t,e,n,i,r=-90){return Array.from({length:i},(o,a)=>{let l=(r+360/i*a)*Math.PI/180;return [t+n*Math.cos(l),e+n*Math.sin(l)]})}function Ge(t,e,n,i,r=5){return Array.from({length:r*2},(o,a)=>{let l=a%2===0?n:i,s=-Math.PI/2+Math.PI/r*a;return [t+l*Math.cos(s),e+l*Math.sin(s)]})}function dn(t,e,n,i,r=4,o=64){return Array.from({length:o},(a,l)=>{let s=2*Math.PI*l/o,c=Math.cos(s),u=Math.sin(s);return [t+n*Math.sign(c)*Math.abs(c)**(2/r),e+i*Math.sign(u)*Math.abs(u)**(2/r)]})}function Qe(t,e,n){let i=n/2,r=(o,a)=>`${x(t+o*i)} ${x(e+a*i)}`;return `M${r(0,-0.52)}C${r(.18,-0.92)} ${r(.98,-0.94)} ${r(1,-0.34)}C${r(1,.12)} ${r(.5,.48)} ${r(0,.92)}C${r(-0.5,.48)} ${r(-1,.12)} ${r(-1,-0.34)}C${r(-0.98,-0.94)} ${r(-0.18,-0.92)} ${r(0,-0.52)}Z`}function os(t,e,n,i){if(i===0)return t;let r=i*Math.PI/180,o=Math.cos(r),a=Math.sin(r);return t.map(([l,s])=>[e+(l-e)*o-(s-n)*a,n+(l-e)*a+(s-n)*o])}function Yn(t,e,n=0){let i=Math.imul(t+2654435769,2246822507)^Math.imul(e+n,3266489909);return i=Math.imul(i^i>>>15,739982445),i=Math.imul(i^i>>>12,695872825),i^=i>>>15,(i>>>0)/4294967296}function le(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=Math.imul(e,16777619);return (e>>>0).toString(36)}var am=["horizontal-line","liquid","liquid-horizontal","liquid-vertical","classy","classy-rounded","leaf","plus","hexagon","star","heart","random-dots","mosaic","octagon"];function is(t){return am.includes(t)}var sm={circle:.95,"circle-large":.85,square:.75,diamond:.95,pacman:.9,rounded:.75,"vertical-line":.8,liquid:.75,"liquid-horizontal":.85,"liquid-vertical":.85,classy:.7,"classy-rounded":.7,leaf:.75,plus:.8,hexagon:.75,star:.85,heart:.85,"random-dots":.85,mosaic:.8,octagon:.8};function Po(t,e){if(t===void 0||!Number.isFinite(t))return 1;let n=e?sm[e]??1:Kr;return Math.min(Wi,Math.max(Kr,n,t))}function lm(t,e,n){return t<7&&e<7||t>=n-7&&e<7||t<7&&e>=n-7}function cm(t,e){if(t===1)return [];let n=Math.floor(t/7)+2,i=t===32?26:Math.ceil((t*4+4)/(n*2-2))*2,r=[6];for(let o=e-7;r.length<n;o-=i)r.splice(1,0,o);return r}function vo(t){let e=(t-17)/4,n=Number.isInteger(e)?cm(e,t):[],i=n.length-1,r=[];for(let[o,a]of n.entries())for(let[l,s]of n.entries())o===0&&l===0||o===0&&l===i||o===i&&l===0||r.push([a,s]);return (o,a)=>r.some(([l,s])=>Math.abs(o-l)<=2&&Math.abs(a-s)<=2)}var um={liquid:{horizontal:true,vertical:true,thickness:1,radius:()=>1,fillets:true},"liquid-horizontal":{horizontal:true,vertical:false,thickness:.86,radius:()=>1,fillets:false},"liquid-vertical":{horizontal:false,vertical:true,thickness:.86,radius:()=>1,fillets:false},classy:{horizontal:true,vertical:true,thickness:1,radius:t=>t===0||t===2?1:0,fillets:false},"classy-rounded":{horizontal:true,vertical:true,thickness:1,radius:t=>t===0||t===2?1:.4,fillets:false}};function mm(t,e,n,i,r,o){switch(t){case "horizontal-line":{let a=i*.43;return k(e-i/2,n-a,i,2*a)}case "leaf":{let a=i*.5;return k(e-a,n-a,2*a,2*a,[i*.4,i*.05,i*.4,i*.05])}case "plus":{let a=i*.22,l=i*.5;return z([[e-a,n-l],[e+a,n-l],[e+a,n-a],[e+l,n-a],[e+l,n+a],[e+a,n+a],[e+a,n+l],[e-a,n+l],[e-a,n+a],[e-l,n+a],[e-l,n-a],[e-a,n-a]])}case "hexagon":return z(Be(e,n,i*.54,6));case "star":return z(Ge(e,n+i*.04,i*.62,i*.34));case "heart":return Qe(e,n+i*.02,i*1.08);case "random-dots":return H(e,n,i*(.38+.15*Yn(r,o)));case "mosaic":{let a=i*(.8+.14*Yn(r,o,1))/2,l=[[e-a,n-a],[e+a,n-a],[e+a,n+a],[e-a,n+a]];return z(os(l,e,n,(Yn(r,o,2)-.5)*16))}case "octagon":return z(Be(e,n,i*.48/Math.cos(Math.PI/8),8,22.5));default:return H(e,n,i*.45)}}function as(t,e){let{margin:n,pixelSize:i,pattern:r}=e,o=Po(e.scale,r),a=t.length,l=e.plain?()=>false:vo(a),s=(f,h)=>!e.plain&&lm(f,h,a),c=(f,h)=>f>=0&&h>=0&&f<a&&h<a&&!!t[h]?.[f]&&!s(f,h),u=f=>(f+.5+n)*i,m=[],d=[],p=um[r];for(let f=0;f<a;f++)for(let h=0;h<a;h++){if(!c(h,f))continue;let g=u(h),_=u(f);if(l(h,f)){m.push(E`M${g-i/2} ${_-i/2}h${i}v${i}h${-i}z`);continue}if(!p){d.push(mm(r,g,_,i*o,h,f));continue}let y=i*p.thickness*o/2,w=p.horizontal&&c(h+1,f),C=p.horizontal&&c(h-1,f),S=p.vertical&&c(h,f-1),$=p.vertical&&c(h,f+1),M=[!(S||C),!(S||w),!($||w),!($||C)].map((P,v)=>P?y*p.radius(v):0);d.push(k(g-y,_-y,2*y,2*y,M)),2*y<i&&(w&&d.push(k(g,_-y,i,2*y)),$&&d.push(k(g-y,_,2*y,i)));}if(p?.fillets&&o===1){let f=i*.3;for(let h=0;h<a;h++)for(let g=0;g<a;g++){if(c(g,h)||s(g,h))continue;let _=u(g)-i/2,y=u(h)-i/2,w=_+i,C=y+i;c(g-1,h)&&c(g,h-1)&&c(g-1,h-1)&&d.push(E`M${_} ${y}h${f}A${f} ${f} 0 0 0 ${_} ${y+f}Z`),c(g+1,h)&&c(g,h-1)&&c(g+1,h-1)&&d.push(E`M${w} ${y}v${f}A${f} ${f} 0 0 0 ${w-f} ${y}Z`),c(g+1,h)&&c(g,h+1)&&c(g+1,h+1)&&d.push(E`M${w} ${C}h${-f}A${f} ${f} 0 0 0 ${w} ${C-f}Z`),c(g-1,h)&&c(g,h+1)&&c(g-1,h+1)&&d.push(E`M${_} ${C}v${-f}A${f} ${f} 0 0 0 ${_+f} ${C}Z`);}}let b=[];return d.length>0&&b.push(A("path",{d:d.join("")},"modules")),m.length>0&&b.push(A("path",{d:m.join("")},"alignment")),b}var Io=(t,e=0)=>{for(let n=e;n<t.length;n++)if(t[n]?.continue!==true)return true;return false};function jt(t,e=[],n={}){return {...n,run(i){let r=t({value:i,issues:[]}),o=Io(r.issues);for(let a of e){if(a.hasLength){let s=r.value;if(r.issues.some(c=>c.continue===false)||s===null||s===void 0||s.length===void 0)continue}else if(o)continue;let l=r.issues.length;a.run(r),!o&&r.issues.length>l&&(o=Io(r.issues,l));}return r}}}function dm(t){if(typeof t=="number")return Number.isNaN(t)?"NaN":Number.isFinite(t)?"number":String(t);if(t===null)return "null";if(Array.isArray(t))return "array";if(typeof t=="object"){let e=t.constructor;if(Object.getPrototypeOf(t)!==Object.prototype&&"constructor"in t&&e)return e.name}return typeof t}var ue=(t,e)=>({path:[],message:`Invalid input: expected ${t}, received ${dm(e)}`}),fm={string:"characters",array:"items"};function Dt(t,e,n,i){let r=fm[e],o=t?"Too big":"Too small",a=`${t?"<=":">="}${n}`;return {path:[],message:r?`${o}: expected ${e} to have ${a} ${r}`:`${o}: expected ${e} to be ${a}`,continue:i}}var Fo=t=>typeof t=="string"?`"${t}"`:`${t}`,us=t=>typeof t=="object"&&t!==null&&!Array.isArray(t);function No(t,e,n){for(let i of n)i.path.unshift(e),t.push(i);}var hm=t=>t>=55296&&t<=56319,pm=t=>t>=56320&&t<=57343;function gm(t){let e=t.length;for(let n=0;n<t.length-1;n++)hm(t.charCodeAt(n))&&pm(t.charCodeAt(n+1))&&(e--,n++);return e}var ms=t=>Array.isArray(t)?"array":typeof t=="string"?"string":"unknown",pn=t=>({run(e){e.value<t&&e.issues.push(Dt(false,"number",t,true));}}),gn=t=>({run(e){e.value>t&&e.issues.push(Dt(true,"number",t,true));}}),He=(t,e="Invalid input")=>({run(n){t(n.value)||n.issues.push({path:[],message:e,continue:true});}}),ds=t=>typeof t=="string"?gm(t):t.length,fs=t=>({hasLength:true,run(e){let n=e.value;ds(n)<t&&e.issues.push(Dt(false,ms(n),t,true));}}),Oo=t=>({hasLength:true,run(e){let n=e.value;ds(n)>t&&e.issues.push(Dt(true,ms(n),t,true));}}),hs=(t,e)=>({run(n){t.lastIndex=0,t.test(n.value)||n.issues.push({path:[],message:e??`Invalid string: must match pattern ${t}`,continue:true});}}),bm={run(t){let e=t.value;Number.isInteger(e)?Number.isSafeInteger(e)||t.issues.push(e>0?Dt(true,"int",Number.MAX_SAFE_INTEGER,true):Dt(false,"int",Number.MIN_SAFE_INTEGER,true)):t.issues.push({...ue("int",e),continue:false});}},me=(...t)=>jt(e=>{let n=e.value;return typeof n=="number"&&Number.isFinite(n)||e.issues.push(ue("number",n)),e},t),ps=(...t)=>me(bm,...t),Kn=(...t)=>jt(e=>(typeof e.value!="string"&&e.issues.push(ue("string",e.value)),e),t);function Mt(t){let e=t.length===1?`Invalid input: expected ${Fo(t[0])}`:`Invalid option: expected one of ${t.map(Fo).join("|")}`;return jt(n=>(t.includes(n.value)||n.issues.push({path:[],message:e}),n),[],{values:t})}var Ct=t=>Mt([t]),X=t=>({optional:true,run:e=>e===void 0?{value:e,issues:[]}:t.run(e)});function J(t,e=[]){let n=Object.keys(t),i=new Set(n);return jt(r=>{let o=r.value;if(!us(o))return r.issues.push(ue("object",o)),r;let a={};for(let s of n){let c=t[s],u=c.run(o[s]),m=s in o;No(r.issues,s,u.issues),m||c.optional||u.issues.length>0||r.issues.push({path:[s],message:"Invalid input: expected nonoptional, received undefined"}),m&&(a[s]=u.value);}r.value=a;let l=[];for(let s in o)i.has(s)||l.push(s);return l.length>0&&r.issues.push({path:[],message:`Unrecognized key${l.length>1?"s":""}: ${l.map(Fo).join(", ")}`,continue:true}),r},e,{shape:t})}function Lo(t,e,n){let i=[];return e!==void 0&&i.push(fs(e)),n!==void 0&&i.push(Oo(n)),jt(r=>{let o=r.value;if(Array.isArray(o)&&n!==void 0&&o.length>n)return r.issues.push(Dt(true,"array",n,false)),r;if(!Array.isArray(o))return r.issues.push(ue("array",o)),r;let a=new Array(o.length);for(let l=0;l<o.length;l++){let s=t.run(o[l]);No(r.issues,l,s.issues),a[l]=s.value;}return r.value=a,r},i)}function ko(t){return jt(e=>{let n=e.value;if(!Array.isArray(n))return e.issues.push(ue("tuple",n)),e;if(n.length<t.length)return e.issues.push(Dt(false,"array",t.length,void 0)),e;n.length>t.length&&e.issues.push(Dt(true,"array",t.length,void 0));let i=[];return t.forEach((r,o)=>{let a=r.run(n[o]);No(e.issues,o,a.issues),i[o]=a.value;}),e.value=i,e})}function ze(t){return jt(e=>{let n=[];for(let r of t){let o=r.run(e.value);if(o.issues.length===0)return o;n.push(o);}let i=n.filter(r=>!Io(r.issues));return i.length===1?i[0]:(e.issues.push({path:[],message:"Invalid input"}),e)})}function gs(t,e){let n=new Map;for(let r of e)for(let o of r.shape?.[t]?.values??[])n.set(o,r);let i=`Invalid discriminator value. Expected ${[...n.keys()].map(r=>`'${r}'`).join(" | ")}`;return jt(r=>{let o=r.value;if(!us(o))return r.issues.push(ue("object",o)),r;let a=n.get(o[t]);return a?a.run(o):(r.issues.push({path:[t],message:i}),r)})}var _m=He(Un,`Numbers may have at most ${ot.maxDecimals} decimals`),tr=[pn(-4e3),gn(ot.maxCoordinate),_m],st=me(...tr),ft=me(...tr,He(t=>t>0,"Must be greater than 0")),Jn=me(...tr,He(t=>t>=0,"Must not be negative")),hn=Kn(hs(/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/,"Use a #rgb or #rrggbb color")),ss=ze([Mt(ya),hn]),bs=t=>J({mix:ko([t,t]),amount:me(pn(0),gn(1),He(Un))}),Ue=ze([ss,bs(ss)]),ym=ze([hn,bs(ze([Mt(["frame","accent","background"]),hn]))]),ce=ze([Ue,J({gradient:J({from:Ue,to:Ue,direction:X(Mt(["horizontal","vertical"])),steps:X(ps(pn(2),gn(ot.maxGradientSteps)))})})]),To=()=>({x:st,y:st,width:ft,height:ft}),fn=J({color:Ue,width:ft}),xm=gs("type",[J({type:Ct("rect"),...To(),radius:X(Jn),fill:ce,hole:X(J({...To(),radius:X(Jn)})),stroke:X(fn)}),J({type:Ct("circle"),cx:st,cy:st,r:ft,hole:X(ft),fill:ce,stroke:X(fn)}),J({type:Ct("ellipse"),cx:st,cy:st,rx:ft,ry:ft,fill:ce,stroke:X(fn)}),J({type:Ct("polygon"),points:Lo(ko([st,st]),3,ot.maxPolygonPoints),fill:ce,stroke:X(fn)}),J({type:Ct("path"),d:Kn(fs(2),Oo(ot.maxPathLength)),fill:ce,fillRule:X(Mt(["nonzero","evenodd"])),stroke:X(fn)}),J({type:Ct("line"),x1:st,y1:st,x2:st,y2:st,width:ft,cap:X(Mt(["butt","round"])),dash:X(ko([ft,ft])),fill:ce}),J({type:Ct("icon"),icon:Mt(_a),x:st,y:st,size:ft,fill:ce})]),ls=()=>({id:Kn(hs(/^[a-z][a-z0-9-]{0,31}$/)),slot:Mt(["primary","secondary","fixed"]),text:Kn(Oo(200)),maxLength:X(ps(pn(1),gn(nn))),color:Ue,weight:X(Mt(["bold","regular"])),collapse:X(J({y:st,height:ft}))}),$m=gs("type",[J({type:Ct("text"),...ls(),box:J(To()),align:X(Mt(["start","middle","end"])),fontSize:X(ft)}),J({type:Ct("curved"),...ls(),curve:J({cx:st,cy:st,radius:ft,side:Mt(["top","bottom"]),spread:X(me(pn(20),gn(300),He(Un)))}),fontSize:ft})]),cs=me(...tr,He(t=>t>=ot.minArtboard&&t<=ot.maxArtboard,`Artboard sides must be ${ot.minArtboard} to ${ot.maxArtboard} units`)),Sm=J({kind:Ct(pa),version:Ct(ga),artboard:J({width:cs,height:cs}),qr:J({x:st,y:st,size:ft,padding:X(Jn),radius:X(Jn),plate:X(Mt(["opaque","background","none"]))}),colors:J({frame:hn,text:X(ym),accent:X(hn)}),shapes:Lo(xm,void 0,ot.maxShapes),labels:Lo($m,void 0,ot.maxLabels),bleed:X(ze([Ct("none"),Ue]))},[{run(t){xa(t.value,(e,n=[])=>{t.issues.push({path:[...n],message:e,continue:true});});}}]);function _s(t){let e=Sm.run(t);return e.issues.length===0?{success:true,data:e.value}:{success:false,issues:e.issues.map(({path:n,message:i})=>({path:n,message:i}))}}var ys=({path:t,message:e})=>t.length>0?`${t.join(".")}: ${e}`:e;var xs=24,Xt=(t,e,n,i)=>{let r=i*Math.PI/180;return [t+n*Math.cos(r),e+n*Math.sin(r)]},er=([t,e])=>`${x(t)} ${x(e)}`;function qe(t,e,n,i,r,o){let a=o-r>180?1:0;return `M${er(Xt(t,e,i,r))}A${x(i)} ${x(i)} 0 ${a} 1 ${er(Xt(t,e,i,o))}L${er(Xt(t,e,n,o))}A${x(n)} ${x(n)} 0 ${a} 0 ${er(Xt(t,e,n,r))}Z`}function bn(t,e,n,i){return `M${x(t-n)} ${x(e)}A${x(n)} ${x(i)} 0 1 1 ${x(t+n)} ${x(e)}A${x(n)} ${x(i)} 0 1 1 ${x(t-n)} ${x(e)}Z`}function wm(t){let e=0;return t.forEach(([n,i],r)=>{let[o,a]=t[(r+1)%t.length];e+=n*a-o*i;}),e/2}function $s(t){return z(wm(t)<0?[...t].reverse():t)}function nr(t,e,n,i,r){let o=Math.hypot(n-t,i-e)||1,a=-(i-e)/o*(r/2),l=(n-t)/o*(r/2);return $s([[t+a,e+l],[n+a,i+l],[n-a,i-l],[t-a,e-l]])}var _t=(...t)=>({d:t.join(""),fillRule:"nonzero"}),Bt=(...t)=>({d:t.join(""),fillRule:"evenodd"});function Cm(){let t=[];for(let e of [0,60,120]){let[n,i]=Xt(12,12,10.5,e+180),[r,o]=Xt(12,12,10.5,e);t.push(nr(n,i,r,o,2));}for(let e=0;e<6;e++){let n=e*60,[i,r]=Xt(12,12,6.2,n);for(let o of [-45,45]){let[a,l]=Xt(i,r,3.6,n+o);t.push(nr(i,r,a,l,1.7));}}return _t(...t)}var Mm={wifi:()=>_t(qe(12,20,4.6,7.2,-135,-45),qe(12,20,9.2,11.8,-135,-45),qe(12,20,13.8,16.4,-135,-45),H(12,20,2.2)),star:()=>_t(z(Ge(12,12.8,11.6,4.8))),heart:()=>_t(Qe(12,12.4,22)),phone:()=>Bt(k(6,1.5,12,21,2.6),k(7.8,4.2,8.4,13.4,.6),H(12,19.8,1.1)),headphones:()=>_t(qe(12,13,7.6,9.8,-180,0),k(2,12,5,9.5,2),k(17,12,5,9.5,2)),calendar:()=>Bt(k(2.5,4,19,17.5,2.5),k(4.6,9,14.8,10.6,.8),k(7,11.4,2.6,2.6,.4),k(10.7,11.4,2.6,2.6,.4),k(14.4,11.4,2.6,2.6,.4),k(7,15.1,2.6,2.6,.4),k(10.7,15.1,2.6,2.6,.4),k(6.5,1.4,2.4,2.6,[1.2,1.2,0,0]),k(15.1,1.4,2.4,2.6,[1.2,1.2,0,0])),user:()=>_t(H(12,7.5,4.6),"M3 21.5C3 16.2 7 13.6 12 13.6C17 13.6 21 16.2 21 21.5Z"),chat:()=>Bt(k(2,3,20,14,4),z([[6.5,17],[11.5,17],[5.8,21.8]]),H(7.5,10,1.5),H(12,10,1.5),H(16.5,10,1.5)),bag:()=>_t(k(3.5,7.5,17,14.5,2),qe(12,7.5,3.1,4.8,-180,0)),bell:()=>_t("M3.5 17.2A8.5 8.5 0 0 1 20.5 17.2Z",k(1.5,18.2,21,2.6,1.3),k(11.2,6.6,1.6,2.6,0),k(9.8,4.6,4.4,2.4,1.2)),cup:()=>_t("M4 6.5H17V13.5A6.5 6.5 0 0 1 4 13.5Z",qe(17,10.2,1.7,3.6,-90,90),k(2,20.6,17,2,1),k(7,1.6,1.6,3.4,.8),k(11.6,1.6,1.6,3.4,.8)),card:()=>Bt(k(1.5,4.5,21,15,2.5),k(1.5,8,21,3,0),k(4.5,13.6,4.6,3.2,.6)),check:()=>Bt(H(12,12,10.5),z([[6.6,12.4],[8.4,10.6],[10.6,12.8],[15.8,7.6],[17.6,9.4],[10.6,16.4]])),info:()=>Bt(H(12,12,10.5),H(12,7.2,1.6),k(10.6,10,2.8,8,.8)),home:()=>Bt(z([[12,2.5],[22.5,11.5],[19.5,11.5],[19.5,21.5],[4.5,21.5],[4.5,11.5],[1.5,11.5]]),k(10,14.5,4,7,[.6,.6,0,0])),pin:()=>Bt("M12 22.5C8.5 17.6 4.5 14 4.5 9.5A7.5 7.5 0 0 1 19.5 9.5C19.5 14 15.5 17.6 12 22.5Z",H(12,9.5,3)),share:()=>_t(nr(6,12,18,5,1.8),nr(6,12,18,19,1.8),H(18,5,3.2),H(6,12,3.2),H(18,19,3.2)),download:()=>_t(k(10.6,2,2.8,9.5,0),z([[6,10],[18,10],[12,16.5]]),z([[2.5,15],[5.3,15],[5.3,19],[18.7,19],[18.7,15],[21.5,15],[21.5,21.8],[2.5,21.8]])),clock:()=>Bt(H(12,12,10.5),H(12,12,8.4),z([[11,5.4],[13,5.4],[13,11.3],[16.9,13.5],[15.9,15.2],[11,12.5]])),snowflake:Cm,pumpkin:()=>_t(bn(7.8,14.6,5.8,6.9),bn(16.2,14.6,5.8,6.9),bn(12,14.6,4.8,7.4),k(10.9,3.4,2.2,4.6,.8),$s([[13,4.2],[17.2,3],[16.2,5.4],[13,6]])),tree:()=>_t(z([[12,1.5],[16.8,8.2],[7.2,8.2]]),z([[12,5.2],[19,13.6],[5,13.6]]),z([[12,9.4],[21.2,19.2],[2.8,19.2]]),k(10.4,18.6,3.2,3.9,.4)),sparkle:()=>_t(z(Ge(9.5,13.5,9,2.4,4)),z(Ge(19,5,4,1.1,4))),gift:()=>_t(k(3,11.2,7.8,10.6,1),k(13.2,11.2,7.8,10.6,1),k(2,7.4,8.8,3.2,1),k(13.2,7.4,8.8,3.2,1),bn(8.8,4.8,2.9,1.9),bn(15.2,4.8,2.9,1.9))};function Ss(t){return Mm[t]()}function ws(t){return t===" "?.3:/[MWmw@%]/.test(t)?.92:/[A-Z0-9#&]/.test(t)?.72:/[il.,:;!'|1]/.test(t)?.32:.6}function Bo(t){let e=0;for(let n of t)e+=ws(n);return Math.max(e,1)}var Do=t=>Math.round(Math.min(255,Math.max(0,t))).toString(16).padStart(2,"0");function rr(t,e,n){let i=it(t)??{r:0,g:0,b:0},r=it(e)??{r:255,g:255,b:255},o=Math.min(1,Math.max(0,n));return `#${Do(i.r+(r.r-i.r)*o)}${Do(i.g+(r.g-i.g)*o)}${Do(i.b+(r.b-i.b)*o)}`}function Cs(t,e,n,i,r,o,a,l){let s=[...t],c=r*.08,u=s.map(f=>ws(f)*r),m=u.reduce((f,h)=>f+h,0)+c*Math.max(0,s.length-1),d=o==="top"?i-r*.35:i+r*.35,p=[],b=0;return s.forEach((f,h)=>{let g=u[h],_=(b+g/2)/d;if(b+=g+c,f.trim()==="")return;let y=o==="top"?-Math.PI/2-m/2/d+_:Math.PI/2+m/2/d-_;p.push({text:f,x:e+d*Math.cos(y),y:n+d*Math.sin(y),fontSize:r,maxWidth:r*2,color:a,rotate:y*180/Math.PI+(o==="top"?90:-90),field:l});}),p}var or=class extends Error{issues;constructor(e){super(`Invalid frame spec: ${e.slice(0,5).join("; ")}`),this.name="FrameSpecError",this.issues=e;}},Ms=new WeakMap;function _n(t){if(t&&typeof t=="object"){let n=Ms.get(t);if(n)return n}if(t==null)throw new or(['A "custom" frame needs a spec']);let e=_s(t);if(!e.success)throw new or(e.issues.map(ys));return typeof t=="object"&&Ms.set(t,e.data),e.data}var Rm=t=>{let e=it(t);return !!(e&&e.a>=1)};function Em(t,e){let n=ut(e,nt);return t.qr.plate==="none"?{color:n,plate:false}:Rm(n)?{color:n,plate:true}:t.qr.plate==="background"?{color:n,plate:false}:{color:nt,plate:true}}function Es(t,e,n=nt){let i=e.color||t.colors.frame,r=e.secondaryColor||t.colors.accent||i,o=s=>s==="frame"?i:s==="accent"?r:s==="background"?n:s,a=t.colors.text,l=e.textColor||(a===void 0?i:typeof a=="string"?a:rr(o(a.mix[0]),o(a.mix[1]),a.amount));return {frame:i,text:l,accent:r}}function Am(t,e,n){let i=Es(e,t,n),r=o=>{switch(o){case "frame":return i.frame;case "text":return i.text;case "accent":return i.accent;case "background":return n;default:return o}};return o=>typeof o=="string"?r(o):rr(r(o.mix[0]),r(o.mix[1]),o.amount)}function Rs(t,e,n=0,i=0){let r=on(t);return r?oo(r,e,n,i):""}function Pm(t,e,n,i){return `M${x(t-n)} ${x(e)}A${x(n)} ${x(i)} 0 1 1 ${x(t+n)} ${x(e)}A${x(n)} ${x(i)} 0 1 1 ${x(t-n)} ${x(e)}Z`}function vm(t,e){let[n,i,r,o]=[t.x1*e,t.y1*e,t.x2*e,t.y2*e],a=Math.hypot(r-n,o-i),l=t.width*e/2,s=a>0?(r-n)/a:1,c=a>0?(o-i)/a:0,u=-c*l,m=s*l,d=(h,g)=>{let _=[n+s*h,i+c*h],y=[n+s*g,i+c*g];if(t.cap==="round"&&g-h>2*l){let w=[_[0]+s*l,_[1]+c*l],C=[y[0]-s*l,y[1]-c*l];return `M${x(w[0]-u)} ${x(w[1]-m)}L${x(C[0]-u)} ${x(C[1]-m)}A${x(l)} ${x(l)} 0 0 1 ${x(C[0]+u)} ${x(C[1]+m)}L${x(w[0]+u)} ${x(w[1]+m)}A${x(l)} ${x(l)} 0 0 1 ${x(w[0]-u)} ${x(w[1]-m)}Z`}return `M${x(_[0]-u)} ${x(_[1]-m)}L${x(y[0]-u)} ${x(y[1]-m)}L${x(y[0]+u)} ${x(y[1]+m)}L${x(_[0]+u)} ${x(_[1]+m)}Z`};if(!t.dash)return {type:"path",d:d(0,a),fillRule:"nonzero"};let p=t.dash[0]*e,b=p+t.dash[1]*e,f=[];for(let h=0;h+p<=a+1e-6;h+=b)f.push(d(h,h+p));return {type:"path",d:f.join(""),fillRule:"nonzero"}}function Im(t,e){switch(t.type){case "rect":return {type:"rect",x:t.x*e,y:t.y*e,width:t.width*e,height:t.height*e,radius:(t.radius??0)*e,...t.hole&&{hole:{x:t.hole.x*e,y:t.hole.y*e,width:t.hole.width*e,height:t.hole.height*e,radius:(t.hole.radius??0)*e}}};case "circle":return {type:"path",d:H(t.cx*e,t.cy*e,t.r*e)+(t.hole?H(t.cx*e,t.cy*e,t.hole*e):""),fillRule:t.hole?"evenodd":"nonzero"};case "ellipse":return {type:"path",d:Pm(t.cx*e,t.cy*e,t.rx*e,t.ry*e),fillRule:"nonzero"};case "polygon":return {type:"polygon",points:t.points.map(([n,i])=>[n*e,i*e])};case "path":return {type:"path",d:Rs(t.d,e),fillRule:t.fillRule??"nonzero"};case "line":return vm(t,e);default:{let n=Ss(t.icon);return {type:"path",d:Rs(n.d,t.size*e/xs,t.x*e,t.y*e),fillRule:n.fillRule}}}}function Fm(t){if(t.type==="rect"){let{x:e,y:n,width:i,height:r,radius:o,hole:a}=t;return [...Ne(e,n,i,r,o,o),...a?Ne(a.x,a.y,a.width,a.height,a.radius,a.radius):[]]}return t.type==="polygon"?[...t.points.map(([e,n],i)=>i===0?{op:"M",x:e,y:n}:{op:"L",x:e,y:n}),{op:"Z"}]:re(t.d)}function Lm(t,e,n){let i=Fm(t),r=la(i,.2),o=t.type==="rect"?t.hole?"evenodd":"nonzero":t.type==="path"?t.fillRule??"nonzero":"nonzero",a=e.direction==="vertical",l=h=>a?h[1]:h[0],s=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY;for(let h of r)for(let g of h)s=Math.min(s,l(g)),c=Math.max(c,l(g));if(!(c>s))return [];let u=e.steps??32,m=n(e.from),d=n(e.to),p=c-s,b=p*.002,f=[];for(let h=0;h<u;h++){let g=s+p*h/u,_=Math.min(c,s+p*(h+1)/u+(h+1<u?b:0)),y=a?{x0:Number.NEGATIVE_INFINITY,x1:Number.POSITIVE_INFINITY,y0:g,y1:_}:{x0:g,x1:_,y0:Number.NEGATIVE_INFINITY,y1:Number.POSITIVE_INFINITY},w=r.map(C=>Nn(C,y)).filter(C=>C.length>2);w.length!==0&&f.push({type:"path",d:ca(w),fill:rr(m,d,(h+.5)/u),fillRule:o});}return f}function km(t,e,n){let i=Im(t,e),r="stroke"in t&&t.stroke?{stroke:n(t.stroke.color),strokeWidth:t.stroke.width*e}:void 0;if(typeof t.fill=="object"&&"gradient"in t.fill){let o=Lm(i,t.fill.gradient,n);return r?[...o,{...i,fill:"none",...r}]:o}return [{...i,fill:n(t.fill),...r}]}function Tm(t,e){let n=Math.min(t.maxLength??ot.maxTextLength,ot.maxTextLength),i=t.slot==="primary"?e.text??t.text:t.slot==="secondary"?e.secondaryText??t.text:t.text;return sn(i,n)}function Nm(t){return t===void 0||!Number.isFinite(t)?1:Math.min(rn,Math.max(Tn,t))}function Om(t,e,n,i,r,o){let a=r(t.color),l=t.weight==="regular"?{fontWeight:400}:{};if(t.type==="curved"){let{cx:f,cy:h,radius:g,side:_,spread:y=140}=t.curve,w=g*i*(y*Math.PI/180),C=Math.min(t.fontSize*i*n,w/(Bo(e)+.08*e.length));return Cs(e,f*i,h*i,g*i,C,_,a,o).map(S=>({...S,...l}))}let s=t.box.x*i,c=t.box.y*i,u=t.box.width*i,m=t.box.height*i;if(!(m>0))return [];let d=(t.fontSize??t.box.height*fo)*i,p=Math.min(d*n,m*Qn,u/Bo(e)),b=t.align??"middle";return [{text:e,x:b==="start"?s:b==="end"?s+u:s+u/2,y:c+m/2+p*.35,fontSize:p,maxWidth:u,color:a,...b!=="middle"&&{align:b},...l,field:o}]}function Dm(t){let e=0,n=0,i=0,r=0;return t.map(({command:o,values:a})=>{let l=o.toUpperCase(),s=o!==l;switch(l){case "Z":return e=i,n=r,{command:"Z",values:[]};case "H":return e=(s?e:0)+a[0],{command:"H",values:[e]};case "V":return n=(s?n:0)+a[0],{command:"V",values:[n]};case "A":return e=(s?e:0)+a[5],n=(s?n:0)+a[6],{command:"A",values:[...a.slice(0,5),e,n]};default:{let c=a.map((u,m)=>s?u+(m%2===0?e:n):u);return e=c.at(-2),n=c.at(-1),l==="M"&&(i=e,r=n),{command:l,values:c}}}})}function Bm(t,e){let n=on(t);return n?oo(Dm(n).map(({command:i,values:r})=>i==="V"?{command:i,values:[e(r[0])]}:i==="H"||i==="Z"?{command:i,values:r}:i==="A"?{command:i,values:[...r.slice(0,6),e(r[6])]}:{command:i,values:r.map((o,a)=>a%2===1?e(o):o)})):t}function Gm(t,e){let n=(i,r)=>{let o=e(i);return {y:o,height:e(i+r)-o}};switch(t.type){case "rect":return {...t,...n(t.y,t.height),...t.hole&&{hole:{...t.hole,...n(t.hole.y,t.hole.height)}}};case "circle":case "ellipse":return {...t,cy:e(t.cy)};case "polygon":return {...t,points:t.points.map(([i,r])=>[i,e(r)])};case "path":return {...t,d:Bm(t.d,e)};case "line":return {...t,y1:e(t.y1),y2:e(t.y2)};default:return {...t,y:e(t.y)}}}function Qm(t,e){if(e.length===0)return t;let n=r=>{let o=r;for(let a of e)o-=Math.min(Math.max(r-a.y,0),a.height);return o},i=(r,o)=>e.some(a=>r>=a.y-1e-6&&o<=a.y+a.height+1e-6);return {...t,artboard:{...t.artboard,height:n(t.artboard.height)},qr:{...t.qr,y:n(t.qr.y)},shapes:t.shapes.filter(r=>{let{bounds:o}=ho(r);return !(o&&i(o.y0,o.y1))}).map(r=>Gm(r,n)),labels:t.labels.map(r=>{if(r.type==="curved")return {...r,curve:{...r.curve,cy:n(r.curve.cy)}};let o=n(r.box.y);return {...r,box:{...r.box,y:o,height:n(r.box.y+r.box.height)-o}}})}}function yn(t,e,n,i,r={}){let o=new Map(e.labels.map(h=>[h.id,Tm(h,n)])),a=Qm(e,e.labels.flatMap(h=>h.collapse&&!o.get(h.id)?[h.collapse]:[])),l=t/a.qr.size,s=Em(a,i),c=Am(n,a,s.color),u=a.shapes.flatMap(h=>km(h,l,c));if(s.plate){let h=zn(a)*l;u.push({type:"rect",x:a.qr.x*l-h,y:a.qr.y*l-h,width:t+2*h,height:t+2*h,radius:(a.qr.radius??0)*l,fill:s.color});}let m=Nm(n.fontScale),d=a.labels.flatMap(h=>{let g=o.get(h.id);if(!g)return [];let _=(h.slot==="fixed"?void 0:r[h.slot])??h.id;return Om(h,g,m,l,c,_)}),p=d[0],b=p&&p.rotate===void 0?p:null,f=a.bleed??"none";return {width:a.artboard.width*l,height:a.artboard.height*l,qrX:a.qr.x*l,qrY:a.qr.y*l,qrSize:t,shapes:u,label:b,extraLabels:b?d.slice(1):d,squareEdges:f!=="none",color:c(f==="none"?"frame":f)}}function As(t,e,n){return yn(t,_n(e.spec),e,n)}var Ps={kind:"qrdx.frame",version:1,artboard:{width:1600,height:1470},qr:{x:300,y:120,size:1e3,padding:70,radius:10,plate:"background"},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"polygon",points:[[0,1250],[190,1250],[190,1470],[0,1470],[50.4,1360]],fill:{mix:["frame","#000000"],amount:.28}},{type:"polygon",points:[[1600,1250],[1549.6,1360],[1600,1470],[1410,1470],[1410,1250]],fill:{mix:["frame","#000000"],amount:.28}},{type:"polygon",points:[[90,1420],[170,1470],[90,1470]],fill:{mix:["frame","#000000"],amount:.5}},{type:"polygon",points:[[1510,1420],[1510,1470],[1430,1470]],fill:{mix:["frame","#000000"],amount:.5}},{type:"rect",x:220,y:40,width:1160,height:1160,radius:20,fill:"background"},{type:"rect",x:180,y:0,width:1240,height:1240,radius:60,fill:"frame",hole:{x:220,y:40,width:1160,height:1160,radius:20}},{type:"rect",x:90,y:1200,width:1420,height:220,fill:"frame"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:170,y:1200,width:1260,height:220}}]};var Go={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1420},qr:{x:120,y:120,size:1e3,padding:70,plate:"background"},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:40,y:40,width:1160,height:1160,fill:"background"},{type:"rect",x:0,y:0,width:1240,height:1420,fill:"frame",hole:{x:40,y:40,width:1160,height:1160}}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:1200,width:1e3,height:220}}],bleed:"frame"};var vs={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1420},qr:{x:120,y:300,size:1e3,padding:70,plate:"background"},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:40,y:220,width:1160,height:1160,fill:"background"},{type:"rect",x:0,y:0,width:1240,height:1420,fill:"frame",hole:{x:40,y:220,width:1160,height:1160}}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:0,width:1e3,height:220}}],bleed:"frame"};var Is={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1600},qr:{x:120,y:300,size:1e3,padding:70,plate:"background"},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:40,y:220,width:1160,height:1160,fill:"background"},{type:"rect",x:0,y:0,width:1240,height:1600,fill:"frame",hole:{x:40,y:220,width:1160,height:1160}}],labels:[{type:"text",id:"top",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:0,width:1e3,height:220}},{type:"text",id:"bottom",slot:"secondary",text:"",color:"text",box:{x:120,y:1380,width:1e3,height:220}}],bleed:"frame"};var Fs={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1340},qr:{x:120,y:120,size:1e3,padding:40,plate:"background"},colors:{frame:"#000000"},shapes:[{type:"rect",x:40,y:40,width:1160,height:1260,fill:"background"},{type:"rect",x:0,y:0,width:1240,height:1340,fill:"frame",hole:{x:40,y:40,width:1160,height:1260}}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:1120,width:1e3,height:180},collapse:{y:1200,height:100}}],bleed:"frame"};var Ls={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1530},qr:{x:120,y:120,size:1e3,padding:80,radius:80},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:0,y:0,width:1240,height:1400,radius:120,fill:"frame"},{type:"path",d:"M161.2 1380L62 1530Q198.4 1458.5 396.8 1380Z",fill:"frame"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:1200,width:1e3,height:200},collapse:{y:1220,height:160}}]};var ks={kind:"qrdx.frame",version:1,artboard:{width:1978.214,height:1978.214},qr:{x:489.107,y:489.107,size:1e3,padding:50,plate:"background"},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"circle",cx:989.107,cy:989.107,r:779.107,fill:"background"},{type:"circle",cx:989.107,cy:989.107,r:989.107,hole:779.107,fill:"frame"},{type:"circle",cx:105,cy:989.107,r:14.7,fill:"text"},{type:"circle",cx:1873.214,cy:989.107,r:14.7,fill:"text"}],labels:[{type:"curved",id:"top",slot:"primary",text:"Scan me",color:"text",curve:{cx:989.107,cy:989.107,radius:884.107,side:"top",spread:140},fontSize:105},{type:"curved",id:"bottom",slot:"secondary",text:"",color:"text",curve:{cx:989.107,cy:989.107,radius:884.107,side:"bottom",spread:140},fontSize:105}]};var Ts={kind:"qrdx.frame",version:1,artboard:{width:1320,height:1558},qr:{x:160,y:130,size:1e3,padding:60},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:0,y:370,width:1320,height:1188,fill:{mix:["frame","#FFFFFF"],amount:.45}},{type:"polygon",points:[[0,370],[660,0],[1320,370]],fill:{mix:["frame","#FFFFFF"],amount:.25}},{type:"rect",x:80,y:50,width:1160,height:1268,fill:"background"},{type:"rect",x:68,y:38,width:1184,height:1280,fill:"frame",hole:{x:80,y:50,width:1160,height:1268}},{type:"polygon",points:[[0,1178],[660,1318],[1320,1178],[1320,1558],[0,1558]],fill:"frame"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:160,y:1318,width:1e3,height:220}}]};var Ns={kind:"qrdx.frame",version:1,artboard:{width:1230,height:1430},qr:{x:115,y:115,size:1e3,padding:70,plate:"background"},colors:{frame:"#000000"},shapes:[{type:"rect",x:0,y:0,width:1230,height:1430,fill:"background"},{type:"polygon",points:[[0,0],[200,0],[200,35],[35,35],[35,200],[0,200]],fill:"frame"},{type:"polygon",points:[[1230,0],[1030,0],[1030,35],[1195,35],[1195,200],[1230,200]],fill:"frame"},{type:"polygon",points:[[1230,1230],[1030,1230],[1030,1195],[1195,1195],[1195,1030],[1230,1030]],fill:"frame"},{type:"polygon",points:[[0,1230],[200,1230],[200,1195],[35,1195],[35,1030],[0,1030]],fill:"frame"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:80,y:1210,width:1070,height:200},collapse:{y:1230,height:200}}]};var ir={kind:"qrdx.frame",version:1,artboard:{width:1260,height:1360},qr:{x:130,y:130,size:1e3,padding:40,plate:"background"},colors:{frame:"#7c3aed",text:{mix:["frame","accent"],amount:.5},accent:"#db2777"},shapes:[{type:"rect",x:50,y:50,width:1160,height:1260,radius:50,fill:"background"},{type:"rect",x:0,y:0,width:1260,height:1360,radius:100,fill:{gradient:{from:"frame",to:"accent",direction:"horizontal",steps:48}},hole:{x:50,y:50,width:1160,height:1260,radius:50}}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:130,y:1130,width:1e3,height:180},collapse:{y:1210,height:100}}]};var Os={kind:"qrdx.frame",version:1,artboard:{width:1260,height:1460},qr:{x:130,y:260,size:1e3,padding:46,plate:"background"},colors:{frame:"#000000"},shapes:[{type:"rect",x:0,y:0,width:1260,height:1460,radius:30,fill:"background"},{type:"rect",x:0,y:0,width:1260,height:1460,radius:30,fill:"frame",hole:{x:22,y:22,width:1216,height:1416,radius:8}},{type:"rect",x:45,y:45,width:1170,height:1370,fill:"frame",hole:{x:53,y:53,width:1154,height:1354}},{type:"rect",x:378,y:181,width:504,height:8,fill:"frame"},{type:"polygon",points:[[630,163],[652,185],[630,207],[608,185]],fill:"frame"}],labels:[{type:"text",id:"title",slot:"primary",text:"Scan me",color:"text",box:{x:130,y:30,width:1e3,height:170},collapse:{y:84,height:130}},{type:"text",id:"footer",slot:"secondary",text:"",color:"text",box:{x:130,y:1270,width:1e3,height:160},collapse:{y:1306,height:70}}]};var Ds={kind:"qrdx.frame",version:1,artboard:{width:1260,height:1610},qr:{x:130,y:250,size:1e3,padding:75,radius:55},colors:{frame:"#000000"},shapes:[{type:"rect",x:0,y:0,width:1260,height:1610,radius:170,fill:"frame"},{type:"rect",x:50,y:170,width:1160,height:1290,radius:60,fill:"background"},{type:"rect",x:520,y:67,width:220,height:36,radius:18,fill:"background"},{type:"rect",x:480,y:1520,width:300,height:30,radius:15,fill:"background"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:130,y:1290,width:1e3,height:170},collapse:{y:1330,height:130}}]};var Bs={kind:"qrdx.frame",version:1,artboard:{width:1325,height:1555},qr:{x:150,y:150,size:1e3,padding:80},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:25,y:25,width:1300,height:1530,radius:15,fill:{mix:["frame","#FFFFFF"],amount:.72}},{type:"rect",x:0,y:0,width:1300,height:1530,radius:15,fill:"frame"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:150,y:1260,width:1e3,height:240}}]};var Gs={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1340},qr:{x:120,y:120,size:1e3,padding:40,plate:"background"},colors:{frame:"#000000"},shapes:[{type:"rect",x:40,y:40,width:1160,height:1260,radius:60,fill:"background"},{type:"rect",x:0,y:0,width:1240,height:1340,radius:100,fill:"frame",hole:{x:40,y:40,width:1160,height:1260,radius:60}}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:1120,width:1e3,height:180},collapse:{y:1200,height:100}}]};var Qs={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1565},qr:{x:120,y:120,size:1e3,padding:70,radius:20,plate:"background"},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:40,y:40,width:1160,height:1160,radius:30,fill:"background"},{type:"rect",x:0,y:0,width:1240,height:1240,radius:70,fill:"frame",hole:{x:40,y:40,width:1160,height:1160,radius:30}},{type:"polygon",points:[[540,1385],[620,1265],[700,1385]],fill:"frame"},{type:"rect",x:0,y:1345,width:1240,height:220,radius:110,fill:"frame"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:1345,width:1e3,height:220}}]};var Us={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1565},qr:{x:120,y:445,size:1e3,padding:70,radius:20,plate:"background"},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:0,y:0,width:1240,height:220,radius:110,fill:"frame"},{type:"polygon",points:[[540,180],[700,180],[620,300]],fill:"frame"},{type:"rect",x:40,y:365,width:1160,height:1160,radius:30,fill:"background"},{type:"rect",x:0,y:325,width:1240,height:1240,radius:70,fill:"frame",hole:{x:40,y:365,width:1160,height:1160,radius:30}}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:0,width:1e3,height:220}}]};var zs={kind:"qrdx.frame",version:1,artboard:{width:1420,height:1590},qr:{x:195,y:195,size:1e3,padding:80},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:30,y:30,width:1390,height:1560,radius:155,fill:{mix:["frame","#FFFFFF"],amount:.7}},{type:"rect",x:0,y:0,width:1390,height:1560,radius:155,fill:"#FFFFFF"},{type:"rect",x:25,y:25,width:1340,height:1510,radius:130,fill:"frame"},{type:"rect",x:95,y:95,width:1200,height:1200,radius:40,fill:"background"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:175,y:1295,width:1040,height:240},collapse:{y:1365,height:170}}]};var Hs={kind:"qrdx.frame",version:1,artboard:{width:1280,height:1620},qr:{x:140,y:320,size:1e3,padding:80,radius:20},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"path",d:"M140 0H1140L1280 140V1580A40 40 0 0 1 1240 1620H40A40 40 0 0 1 0 1580V140ZM600 115.2A40 40 0 1 1 680 115.2A40 40 0 1 1 600 115.2Z",fill:"frame",fillRule:"evenodd"},{type:"path",d:"M572 115.2A68 68 0 1 1 708 115.2A68 68 0 1 1 572 115.2ZM600 115.2A40 40 0 1 1 680 115.2A40 40 0 1 1 600 115.2Z",fill:{mix:["frame","#FFFFFF"],amount:.35},fillRule:"evenodd"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:140,y:1400,width:1e3,height:220},collapse:{y:1420,height:160}}]};var qs={kind:"qrdx.frame",version:1,artboard:{width:1260,height:1490},qr:{x:130,y:130,size:1e3,padding:80,radius:20},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"path",d:"M40 0H1220A40 40 0 0 1 1260 40V1215A55 55 0 0 0 1260 1325V1450A40 40 0 0 1 1220 1490H40A40 40 0 0 1 0 1450V1325A55 55 0 0 0 0 1215V40A40 40 0 0 1 40 0Z",fill:"frame"},{type:"line",x1:77,y1:1270,x2:1147,y2:1270,width:12,dash:[30,22],fill:"background"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:130,y:1270,width:1e3,height:220}}]};var lt=(t,e,n,i,r)=>({style:t,name:e,tags:r,labelOn:i,spec:n}),Ws=[lt("banner-bottom","Banner",Go,"frame",["bottom","band"]),lt("banner-top","Top banner",vs,"frame",["top","band"]),lt("banner-top-bottom","Two banners",Is,"frame",["top","bottom","band"]),lt("border","Border",Fs,"background",["square","outline"]),lt("rounded-border","Rounded",Gs,"background",["border","outline"]),lt("gradient-border","Gradient",ir,"background",["border","colorful"]),lt("focus","Focus",Ns,"background",["corners","brackets"]),lt("speech-bubble","Bubble",Qs,"frame",["speech"]),lt("speech-bubble-top","Bubble top",Us,"frame",["speech"]),lt("chat-bubble","Chat",Ls,"frame",["message","bubble"]),lt("circle","Circle",ks,"frame",["round","ring","curved"]),lt("badge","Ribbon",Ps,"frame",["badge","banner"]),lt("sticker","Sticker",zs,"frame",["label"]),lt("polaroid","Polaroid",Bs,"frame",["photo","picture"]),lt("phone","Phone",Ds,"background",["mobile","screen"]),lt("ticket","Ticket",qs,"frame",["event","pass"]),lt("tag","Tag",Hs,"frame",["price","label"]),lt("envelope","Envelope",Ts,"frame",["mail","letter"]),lt("menu-card","Menu card",Os,"background",["menu","restaurant"])],s1=new Map(Ws.map(t=>[t.style,t]));function l1(t){return s1.get(t)}Object.fromEntries(Ws.map(t=>[t.style,t.spec]));({from:ir.colors.frame,to:ir.colors.accent});var c1={primary:"text",secondary:"secondaryText"};function Vs(t,e,n){let i=l1(e.style)?.spec??Go;return yn(t,_n(i),e,n,c1)}var Qo="system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif";var u1="data-qrdx-frame-label";function Zt(t){return !!(t?.style&&t.style!=="none")}function We(t,e,n){return e.style===ba?As(t,e,n):Vs(t,e,n)}function xn(t,e){if(!Zt(e))return {width:t,height:t};let{width:n,height:i}=We(t,e);return {width:n,height:i}}var W=t=>Q(t,2);function js({x:t,y:e,width:n,height:i,radius:r}){let o=W(Math.min(r,n/2,i/2)),[a,l,s,c]=[W(t),W(e),W(n),W(i)];return o<=0?E`M${a} ${l}h${s}v${c}h${-s}z`:E`M${a+o} ${l}h${W(s-2*o)}a${o} ${o} 0 0 1 ${o} ${o}`+E`v${W(c-2*o)}a${o} ${o} 0 0 1 ${-o} ${o}`+E`h${W(-(s-2*o))}a${o} ${o} 0 0 1 ${-o} ${-o}`+E`v${W(-(c-2*o))}a${o} ${o} 0 0 1 ${o} ${-o}z`}function ar(t){return t.stroke&&t.strokeWidth?{stroke:t.stroke,strokeWidth:W(t.strokeWidth)}:{}}function Xs(t,e){return t.type==="rect"&&t.hole?A("path",{d:js(t)+js(t.hole),fill:t.fill,fillRule:"evenodd",...ar(t)},e):t.type==="polygon"?A("polygon",{fill:t.fill,points:t.points.map(([n,i])=>`${W(n)},${W(i)}`).join(" "),...ar(t)},e):t.type==="path"?A("path",{d:t.d,fill:t.fill,...t.fillRule==="evenodd"&&{fillRule:"evenodd"},...ar(t)},e):_o("rect",{...ar(t),fill:t.fill,height:W(t.height),key:e,width:W(t.width),x:W(t.x),y:W(t.y),...t.radius>0&&{rx:W(t.radius),ry:W(t.radius)}})}function Zs(t){return t.shapes.map((e,n)=>Xs(e,n))}function Ys(t,e){let{size:n,frame:i,bgColor:r,svgProps:o,markLabels:a}=e,l=We(n,i,r),s=m1(l),c=W(l.width),u=W(l.height);return ct("svg",{height:u,viewBox:`0 0 ${c} ${u}`,width:c,xmlns:"http://www.w3.org/2000/svg",...o,children:[A("g",{"data-qrdx-frame":i.style,children:l.shapes.map((m,d)=>Xs(m,d))}),Oe(t,{x:W(l.qrX),y:W(l.qrY),width:n,height:n}),s.map((m,d)=>A("text",{"data-max-width":W(m.maxWidth),fill:m.color,fontFamily:Qo,fontSize:W(m.fontSize),fontWeight:m.fontWeight??700,textAnchor:m.align??"middle",x:W(m.x),y:W(m.y),...m.rotate&&{transform:`rotate(${W(m.rotate)} ${W(m.x)} ${W(m.y)})`},...a&&m.field&&{[u1]:m.field},children:m.text},d))]})}function m1(t){return [...t.label?[t.label]:[],...t.extraLabels??[]]}var d1={2:6,3:12};function Ks(t){let e=[t.start],n=t.start;for(let i of t.segments){let r=i.at(-1);if(i.length===1)e.push(r);else {let o=d1[i.length];for(let a=1;a<=o;a++){let l=a/o,s=1-l;if(i.length===2){let[c]=i;e.push([s*s*n[0]+2*s*l*c[0]+l*l*r[0],s*s*n[1]+2*s*l*c[1]+l*l*r[1]]);}else {let[c,u]=i;e.push([s*s*s*n[0]+3*s*s*l*c[0]+3*s*l*l*u[0]+l*l*l*r[0],s*s*s*n[1]+3*s*s*l*c[1]+3*s*l*l*u[1]+l*l*l*r[1]]);}}}n=r;}return e}function tl(t,e){let n=[];for(let i of t)for(let r=0;r<i.length;r++){let[o,a]=i[r],[l,s]=i[(r+1)%i.length];a<=e!=s<=e&&n.push(o+(e-a)/(s-a)*(l-o));}return n.sort((i,r)=>i-r)}function el(t,e){let n=0;for(let i of t)if(i<e)n++;else break;return n%2===1}function f1(t,e,n){return el(tl(t,n),e)}function nl(t){let e=new Map;return (n,i)=>{let r=e.get(i);return r||(r=tl(t,i),e.set(i,r)),el(r,n)}}function h1(t,e,n,i){let r=n[0]-t,o=n[1]-e,a=i[0]-n[0],l=i[1]-n[1],s=u=>Math.max(Math.abs(r+u*a),Math.abs(o+u*l)),c=Math.min(s(0),s(1));for(let[u,m]of [[o-r,a-l],[-(r+o),a+l]])if(m!==0){let d=u/m;d>0&&d<1&&(c=Math.min(c,s(d)));}return c}function p1(t,e,n){if(!f1(t,e,n))return 0;let i=Number.POSITIVE_INFINITY;for(let r of t)for(let o=0;o<r.length;o++)i=Math.min(i,h1(e,n,r[o],r[(o+1)%r.length]));return Number.isFinite(i)?i:0}function g1(t){let e=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(let o of t)for(let[a,l]of o)e=Math.min(e,a),n=Math.min(n,l),i=Math.max(i,a),r=Math.max(r,l);return {x0:e,y0:n,x1:i,y1:r}}function rl(t){let e=t.map(Ks),n=g1(e),i=n.x1-n.x0,r=n.y1-n.y0;if(!(i>0&&r>0))return null;let o=(b,f)=>{let h=Math.max(b-n.x0,n.x1-b,f-n.y0,n.y1-f);return h>0?p1(e,b,f)/(2*h):0},a={cx:n.x0+i/2,cy:n.y0+r/2,value:0};a.value=o(a.cx,a.cy);let l=32;for(let b=1;b<l;b++)for(let f=1;f<l;f++){let h=n.x0+i*f/l,g=n.y0+r*b/l,_=o(h,g);_>a.value&&(a={cx:h,cy:g,value:_});}let s=i/l,c=r/l;for(let b=0;b<6;b++){let f=a;for(let h=-2;h<=2;h++)for(let g=-2;g<=2;g++){let _=f.cx+s*g/2,y=f.cy+c*h/2,w=o(_,y);w>a.value&&(a={cx:_,cy:y,value:w});}s/=2,c/=2;}if(a.value<=0)return null;let m=.5/Math.max(a.cx-n.x0,n.x1-a.cx,a.cy-n.y0,n.y1-a.cy),d=([b,f])=>[.5+(b-a.cx)*m,.5+(f-a.cy)*m],p=t.map(b=>({start:d(b.start),segments:b.segments.map(f=>f.map(d))}));return {rings:p,polygons:p.map(Ks),half:a.value}}function ol(t,e){let n=([r,o])=>`${x(r*e)} ${x(o*e)}`,i="";for(let r of t.rings){i+=`M${n(r.start)}`;for(let o of r.segments){let a=o.length===1?"L":o.length===2?"Q":"C";i+=a+o.map(n).join(" ");}i+="Z";}return i}var b1={start:[0,-0.58],segments:[[[.2,-0.92],[1,-0.97],[1,-0.3]],[[1,.3],[.62,.6],[0,.92]],[[-0.62,.6],[-1,.3],[-1,-0.3]],[[-1,-0.97],[-0.2,-0.92],[0,-0.58]]]},Js;function il(){return Js??=rl([b1]),Js}function _1(t){let{width:e,height:n,cells:i}=t;return Number.isInteger(e)&&Number.isInteger(n)&&e>=to&&n>=to&&e<=Jr&&n<=Jr&&typeof i=="string"&&i.length===e*n&&/^[01]*$/.test(i)?(r,o)=>r>=0&&o>=0&&r<e&&o<n&&i[o*e+r]==="1":null}var Gt=([t,e])=>`${t},${e}`;function y1(t,e,n){let i=(s,c)=>t(s-1,c-1),r=new Map,o=(s,c)=>{for(let[u,m]of [[s,c],[c,s]]){let d=r.get(Gt(u))??[];d.push(m),r.set(Gt(u),d);}};for(let s=0;s<=n;s++)for(let c=0;c<=e;c++){let u=i(c,s),m=i(c+1,s),d=i(c+1,s+1),p=i(c,s+1),b=[c,s-.5],f=[c+.5,s],h=[c,s+.5],g=[c-.5,s];switch((u?8:0)+(m?4:0)+(d?2:0)+(p?1:0)){case 1:case 14:o(g,h);break;case 2:case 13:o(h,f);break;case 3:case 12:o(g,f);break;case 4:case 11:o(b,f);break;case 6:case 9:o(b,h);break;case 7:case 8:o(g,b);break;case 5:o(b,f),o(g,h);break;case 10:o(g,b),o(h,f);break;}}let a=[],l=new Set;for(let[s,c]of r){if(l.has(s)||c.length===0)continue;let[u,m]=s.split(",").map(Number),d=[[u,m]];l.add(s);let p=[u,m],b=c[0];for(;!l.has(Gt(b));){l.add(Gt(b)),d.push(b);let f=x1(r.get(Gt(b))??[],p,l);if(!f)break;p=b,b=f;}d.length>=3&&a.push($1(d));}return a}function x1(t,e,n){let i=Gt(e);return t.find(r=>Gt(r)!==i&&!n.has(Gt(r)))??t.find(r=>Gt(r)!==i)}function $1(t){let e=[];for(let n=0;n<t.length;n++){let i=t[(n-1+t.length)%t.length],r=t[n],o=t[(n+1)%t.length],a=(r[0]-i[0])*(o[1]-r[1])-(r[1]-i[1])*(o[0]-r[0]);Math.abs(a)>1e-9&&e.push(r);}return e.length>=3?e:t}function S1(t){let e=(o,a)=>[(o[0]+a[0])/2,(o[1]+a[1])/2],n=t.length,i=e(t[n-1],t[0]),r=t.map((o,a)=>[o,e(o,t[(a+1)%n])]);return {start:i,segments:r}}var $n=new Map;function al(t){let e=`${t.width}x${t.height}:${t.cells}`,n=$n.get(e);if(n)return n;let i=_1(t),r;if(!i)r={outline:null,problem:"invalid"};else if(t.cells.includes("1")){let o=y1(i,t.width,t.height),a=o.length>0?rl(o.map(S1)):null;r=a&&2*a.half>=Xi?{outline:a,problem:null}:{outline:null,problem:a?"thin":"empty"};}else r={outline:null,problem:"empty"};return $n.size>16&&$n.delete($n.keys().next().value),$n.set(e,r),r}var w1=1,sl=.5,ll=.5,C1=.5;function sr(t){return Math.max(t,ji)}function lr(t){return t==="heart"?il():typeof t=="object"&&t?.type==="silhouette"?al(t).outline:null}function cl(t){return t==="circle"||lr(t)!==null}function Pt(t,e,n){if(n==="circle"){let a=sr(e),l=(t/2+a)*Math.SQRT2+w1;return Math.ceil(l-t/2)}let i=lr(n);if(!i)return e;let r=sr(e),o=(t+2*(r+C1))/(2*i.half);return Math.ceil((o-t)/2-1e-9)}function ul(t){let e=t>>>0;return ()=>{e=e+1831565813>>>0;let n=e;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}}function M1(t,e,n){let i=Pt(e,n,"circle"),r=sr(n),o=e+2*i,a=o/2,l=a-sl-.5,s=ul(Number.parseInt(le(t),36)||1),c=i-r,u=i+e+r;return Array.from({length:o},(m,d)=>Array.from({length:o},(p,b)=>{let f=s()<ll;return b>=c&&b<u&&d>=c&&d<u?false:f&&Math.hypot(b+.5-a,d+.5-a)<=l}))}var R1=Array.from({length:8},(t,e)=>{let n=e*Math.PI/4;return [Math.cos(n),Math.sin(n)]});function ml(t,e,n,i){if(i==="circle")return M1(t,e,n);let r=lr(i);if(!r)return null;let o=Pt(e,n,i),a=sr(n),l=e+2*o,s=nl(r.polygons),c=.5+sl,u=(b,f)=>{let h=b+.5,g=f+.5;return s(h/l,g/l)?R1.every(([_,y])=>s((h+_*c)/l,(g+y*c)/l)):false},m=ul(Number.parseInt(le(t),36)||1),d=o-a,p=o+e+a;return Array.from({length:l},(b,f)=>Array.from({length:l},(h,g)=>{let _=m()<ll;return g>=d&&g<p&&f>=d&&f<p?false:_&&u(g,f)}))}function dl(t,e){if(t==="circle")return {circle:e/2};let n=lr(t);return n?{path:ol(n,e)}:null}function E1(t){return t==="top-left"?0:t==="top-right"?1:3}function cr(t,e,n,i="circle",r="top-left"){let o=n*2,a=n,l=o/3;switch(i){case "leaf":case "leaf-reverse":case "drop":case "drop-reverse":{let s=E1(r),c=(s+2)%4,u=1.3*l,m=.7*l,d=b=>{switch(i){case "leaf":return b===s||b===c;case "leaf-reverse":return !(b===s||b===c);case "drop":return b===s;default:return b===c}},p=[0,1,2,3].map(b=>d(b)?m:u);return A("path",{d:k(t-n,e-n,o,o,p)})}case "extra-rounded":return A("path",{d:k(t-n,e-n,o,o,1.15*l)});case "plus":{let s=1.15*l,c=n;return A("path",{d:z([[t-s,e-c],[t+s,e-c],[t+s,e-s],[t+c,e-s],[t+c,e+s],[t+s,e+s],[t+s,e+c],[t-s,e+c],[t-s,e+s],[t-c,e+s],[t-c,e-s],[t-s,e-s]])})}case "cross-rounded":{let s=1.15*l,c=.5*l;return A("path",{d:k(t-n,e-s,o,2*s,c)+k(t-s,e-n,2*s,o,c)})}case "hexagon":return A("path",{d:z(Be(t,e,1.72*l,6))});case "octagon":return A("path",{d:z(Be(t,e,n/Math.cos(Math.PI/8),8,22.5))});case "flower":{let s=.6*l,c=.9*l;return A("path",{d:H(t-s,e-s,c)+H(t+s,e-s,c)+H(t+s,e+s,c)+H(t-s,e+s,c)+H(t,e,1.2*l)})}case "heart":return A("path",{d:Qe(t,e+.12*l,3.5*l)});case "squircle":return A("path",{d:z(dn(t,e,n,n,4,64))});case "dots":{let s=[];for(let c of [-1,0,1])for(let u of [-1,0,1])s.push(H(t+u*l*.82,e+c*l*.82,.58*l));return A("path",{d:s.join("")})}case "square":return A("rect",{height:x(o),transform:E`rotate(0,${t},${e})`,width:x(o),x:x(t-a),y:x(e-a)});case "rounded":return A("rect",{height:x(o),rx:x(n*.5),ry:x(n*.5),transform:E`rotate(0,${t},${e})`,width:x(o),x:x(t-a),y:x(e-a)});case "diamond":return A("path",{d:E`M ${t-a*.714286} ${e-a*.714286}v ${o*.714286}h ${o*.714286}v -${o*.714286}z`,transform:E`rotate(45,${t},${e})`});case "message":{let s=o/30,c=d=>(d-40)*s+t,u=d=>(d-40)*s+e,m=E`M ${c(25)} ${u(35.714285714285715)}v ${8.571428571428571*s}a ${10.714285714285714*s} ${10.714285714285714*s}, 0, 0, 0, ${10.714285714285714*s} ${10.714285714285714*s}h ${19.285714285714285*s}v -${19.285714285714285*s}a ${10.714285714285714*s} ${10.714285714285714*s}, 0, 0, 0, -${10.714285714285714*s} -${10.714285714285714*s}h -${8.571428571428571*s}a ${10.714285714285714*s} ${10.714285714285714*s}, 0, 0, 0, -${10.714285714285714*s} ${10.714285714285714*s}`;return A("path",{clipRule:"evenodd",d:m,transform:E`rotate(0,${t},${e})`})}case "message-reverse":{let s=o/30,c=d=>(d-40)*s+t,u=d=>(d-40)*s+e,m=E`M ${c(25)} ${u(35.714285714285715)}v ${8.571428571428571*s}a ${10.714285714285714*s} ${10.714285714285714*s}, 0, 0, 0, ${10.714285714285714*s} ${10.714285714285714*s}h ${19.285714285714285*s}v -${19.285714285714285*s}a ${10.714285714285714*s} ${10.714285714285714*s}, 0, 0, 0, -${10.714285714285714*s} -${10.714285714285714*s}h -${8.571428571428571*s}a ${10.714285714285714*s} ${10.714285714285714*s}, 0, 0, 0, -${10.714285714285714*s} ${10.714285714285714*s}`;return A("path",{clipRule:"evenodd",d:m,transform:E`rotate(-180,${t},${e})`})}case "diya":{let s=o/30,c=d=>(d-40)*s+t,u=d=>(d-40)*s+e,m=E`M ${c(25)} ${u(35.714285714285715)}v ${8.571428571428571*s}a ${10.714285714285714*s} ${10.714285714285714*s}, 0, 0, 0, ${10.714285714285714*s} ${10.714285714285714*s}h ${19.285714285714285*s}v -${19.285714285714285*s}a ${10.714285714285714*s} ${10.714285714285714*s}, 0, 0, 0, -${10.714285714285714*s} -${10.714285714285714*s}h -${8.571428571428571*s}H ${c(25)}z`;return A("path",{clipRule:"evenodd",d:m,transform:E`rotate(0,${t},${e})`})}case "diya-reverse":{let s=o/30,c=d=>(d-40)*s+t,u=d=>(d-40)*s+e,m=E`M ${c(25)} ${u(35.714285714285715)}v ${19.285714285714285*s}h ${19.285714285714285*s}a ${10.714285714285714*s} ${10.714285714285714*s}, 0, 0, 0, ${10.714285714285714*s} -${10.714285714285714*s}v -${19.285714285714285*s}h -${19.285714285714285*s}a ${10.714285714285714*s} ${10.714285714285714*s}, 0, 0, 0, -${10.714285714285714*s} ${10.714285714285714*s}z`;return A("path",{clipRule:"evenodd",d:m,transform:E`rotate(0,${t},${e})`})}case "rounded-triangle":{let s=o/21,c=d=>(d-40)*s+t,u=d=>(d-40)*s+e,m=E`M ${c(33.57142857142857)} ${u(29.285714285714285)}h ${12.857142857142856*s}c ${4.285714285714286*s} 0 ${4.285714285714286*s} ${4.285714285714286*s} ${4.285714285714286*s} ${4.285714285714286*s}v ${12.857142857142856*s}c 0 ${4.285714285714286*s} -${4.285714285714286*s} ${4.285714285714286*s} -${4.285714285714286*s} ${4.285714285714286*s}h -${12.857142857142856*s}c -${4.285714285714286*s} 0 -${4.285714285714286*s} -${4.285714285714286*s} -${4.285714285714286*s} -${4.285714285714286*s}v -${12.857142857142856*s}c 0 -${4.285714285714286*s} ${4.285714285714286*s} -${4.285714285714286*s} ${4.285714285714286*s} -${4.285714285714286*s}z`;return A("path",{d:m,transform:E`rotate(45,${t},${e})`})}case "star":{let s=o/27,c=d=>(d-40)*s+t,u=d=>(d-40)*s+e,m=E`M ${c(38.84615384615385)},${u(26.546153846153846)}c${.6692307692307691*s},-${1.0153846153846153*s},${2.215384615384615*s},-${1.0153846153846153*s},${2.884615384615384*s},0l${4.038461538461538*s},${6.069230769230768*s}c${.23076923076923075*s},${.3461538461538461*s},${.6*s},${.6*s},${1.0153846153846153*s},${.7153846153846153*s}l${7.223076923076922*s},${1.823076923076923*s}c${1.2*s},${.3*s},${1.6846153846153844*s},${1.7076923076923076*s},${.8999999999999999*s},${2.6538461538461533*s}l-${4.73076923076923*s},${5.584615384615384*s}c-${.2769230769230769*s},${.3230769230769231*s},-${.41538461538461535*s},${.7384615384615384*s},-${.3923076923076923*s},${1.1307692307692307*s}l${.4384615384615384*s},${7.199999999999999*s}c${.06923076923076922*s},${1.2*s},-${1.1769230769230767*s},${2.0769230769230766*s},-${2.3307692307692305*s},${1.6384615384615382*s}l-${6.9692307692307685*s},-${2.6076923076923073*s}c-${.3923076923076923*s},-${.16153846153846155*s},-${.8538461538461538*s},-${.16153846153846155*s},-${1.2461538461538462*s},0l-${6.9692307692307685*s},${2.6076923076923073*s}c-${1.1538461538461537*s},${.4384615384615384*s},-${2.4*s},-${.4384615384615384*s},-${2.3307692307692305*s},-${1.6384615384615382*s}l${.4384615384615384*s},-${7.199999999999999*s}c${.023076923076923075*s},-${.41538461538461535*s},-${.11538461538461538*s},-${.8307692307692307*s},-${.3923076923076923*s},-${1.1307692307692307*s}l-${4.73076923076923*s},-${5.584615384615384*s}c-${.7846153846153846*s},-${.923076923076923*s},-${.3230769230769231*s},-${2.3307692307692305*s},${.8999999999999999*s},-${2.6538461538461533*s}l${7.223076923076922*s},-${1.823076923076923*s}c${.41538461538461535*s},-${.11538461538461538*s},${.7846153846153846*s},-${.3461538461538461*s},${1.0153846153846153*s},-${.7153846153846153*s}l${4.038461538461538*s},-${6.069230769230768*s}z`;return A("path",{clipRule:"evenodd",d:m,transform:E`rotate(0,${t},${e})`})}case "banner":{let s=o/28;return A("g",{transform:E`translate(${t-40*s},${e-40*s}) scale(${x(s,6)})`,children:A("path",{clipRule:"evenodd",d:"M38.235 26.104C38.759 25.677, 39.51 25.677, 40.034 26.104L41.776 27.52C42.091 27.777, 42.501 27.887, 42.902 27.822L45.118 27.466C45.785 27.359, 46.436 27.735, 46.677 28.366L47.477 30.464C47.621 30.843, 47.921 31.143, 48.301 31.288L50.399 32.088C51.03 32.328, 51.406 32.979, 51.298 33.646L50.942 35.863C50.878 36.264, 50.988 36.674, 51.244 36.989L52.661 38.73C53.087 39.254, 53.087 40.006, 52.661 40.53L51.244 42.271C50.988 42.587, 50.878 42.996, 50.942 43.397L51.298 45.614C51.406 46.281, 51.03 46.932, 50.399 47.173L48.301 47.972C47.921 48.117, 47.621 48.417, 47.477 48.797L46.677 50.894C46.436 51.526, 45.785 51.901, 45.118 51.794L42.902 51.438C42.501 51.374, 42.091 51.483, 41.776 51.74L40.034 53.157C39.51 53.583, 38.759 53.583, 38.235 53.157L36.493 51.74C36.178 51.483, 35.768 51.374, 35.367 51.438L33.15 51.794C32.483 51.901, 31.833 51.526, 31.592 50.894L30.792 48.797C30.647 48.417, 30.347 48.117, 29.968 47.972L27.87 47.173C27.239 46.932, 26.863 46.281, 26.97 45.614L27.326 43.397C27.391 42.996, 27.281 42.587, 27.025 42.271L25.608 40.53C25.182 40.006, 25.182 39.254, 25.608 38.73L27.025 36.989C27.281 36.674, 27.391 36.264, 27.326 35.863L26.97 33.646C26.863 32.979, 27.239 32.328, 27.87 32.088L29.968 31.288C30.347 31.143, 30.647 30.843, 30.792 30.464L31.592 28.366C31.833 27.735, 32.483 27.359, 33.15 27.466L35.367 27.822C35.768 27.887, 36.178 27.777, 36.493 27.52L38.235 26.104Z"})})}default:return A("circle",{cx:x(t),cy:x(e),r:x(n),transform:E`rotate(0,${t},${e})`})}}function Ve(t,e,n,i){let r=t==="top-left"?0:t==="top-right"?1:3,o=(r+2)%4;return [0,1,2,3].map(a=>a===r||i&&a===o?n:e)}function fl(t,e,n,i){return [[t+i,e],[t+n-i,e],[t+n,e+i],[t+n,e+n-i],[t+n-i,e+n],[t+i,e+n],[t,e+n-i],[t,e+i]]}function hl(t,e,n,i){let r=n/7,o=Math.max(0,(i+Math.SQRT2-2)*r);return z(fl(t,e,n,i*r))+z(fl(t+r,e+r,5*r,o))}function pl(t,e,n,i,r=false){let o=n/7,a=l=>r?Ve(i,0,l,true):Ve(i,l,0,true);return k(t,e,n,n,a(2.5*o))+k(t+o,e+o,5*o,5*o,a(1.5*o))}function A1(t,e,n,i){let r=n/7;return k(t,e,n,n,Ve(i,2.6*r,0,false))+k(t+r,e+r,5*r,5*r,Ve(i,1.6*r,0,false))}function P1(t,e,n){let i=n/7,r=t+n/2,o=e+n/2;return z(dn(r,o,3.5*i,3.5*i,4,96))+z(dn(r,o,2.5*i,2.5*i,4,96))}function gl(t,e,n,i,r){let o=i,a=n/2,l=(a-o)*.55,s=(c,u)=>E`${t+c} ${e+u}`;return E`M${s(o,0)}`+E`C${s(o+l,0)} ${s(a-l,r)} ${s(a,r)}`+E`C${s(a+l,r)} ${s(n-o-l,0)} ${s(n-o,0)}`+E`A${o} ${o} 0 0 1 ${s(n,o)}`+E`C${s(n,o+l)} ${s(n-r,a-l)} ${s(n-r,a)}`+E`C${s(n-r,a+l)} ${s(n,n-o-l)} ${s(n,n-o)}`+E`A${o} ${o} 0 0 1 ${s(n-o,n)}`+E`C${s(n-o-l,n)} ${s(a+l,n-r)} ${s(a,n-r)}`+E`C${s(a-l,n-r)} ${s(o+l,n)} ${s(o,n)}`+E`A${o} ${o} 0 0 1 ${s(0,n-o)}`+E`C${s(0,n-o-l)} ${s(r,a+l)} ${s(r,a)}`+E`C${s(r,a-l)} ${s(0,o+l)} ${s(0,o)}`+E`A${o} ${o} 0 0 1 ${s(o,0)}Z`}function v1(t,e,n){let i=n/7,r=.12*i;return gl(t,e,n,1.4*i,r)+gl(t+i,e+i,5*i,.7*i,r)}function bl(t,e,n,i,r,o){let a=n/2,l=(s,c)=>E`${t+s} ${e+c}`;return E`M${l(i,0)}H${t+n-i}`+E`A${i} ${i} 0 0 1 ${l(n,i)}`+E`V${e+r}`+E`C${l(n,r+1.55*o)} ${l(a+1.6*o,n)} ${l(a,n)}`+E`C${l(a-1.6*o,n)} ${l(0,r+1.55*o)} ${l(0,r)}`+E`V${e+i}A${i} ${i} 0 0 1 ${l(i,0)}Z`}function I1(t,e,n){let i=n/7;return bl(t,e,n,.7*i,3.9*i,i)+bl(t+i,e+i,5*i,.35*i,2.7*i,.8*i)}function F1(t,e,n,i){let r=n/7;return k(t,e,n,n,Ve(i,.5*r,2.5*r,false))+k(t+r,e+r,5*r,5*r,Ve(i,.25*r,1.5*r,false))}function L1(t,e,n){let i=n/7;return E`M ${t} ${e}v ${n}h ${n}v -${n}z`+E`M ${t+i} ${e+i}h ${5*i}v ${5*i}h -${5*i}z`}function k1(t,e,n){let i=n/7,r=i*.875,o=i*.4375,a=E`M ${t+r} ${e}`+E`h ${n-2*r}`+E`a ${r} ${r} 0 0 1 ${r} ${r}`+E`v ${n-2*r}`+E`a ${r} ${r} 0 0 1 ${-r} ${r}`+E`h ${-(n-2*r)}`+E`a ${r} ${r} 0 0 1 ${-r} ${-r}`+E`v ${-(n-2*r)}`+E`a ${r} ${r} 0 0 1 ${r} ${-r}z`,l=E`M ${t+i+o} ${e+i}`+E`h ${5*i-2*o}`+E`a ${o} ${o} 0 0 1 ${o} ${o}`+E`v ${5*i-2*o}`+E`a ${o} ${o} 0 0 1 ${-o} ${o}`+E`h ${-(5*i-2*o)}`+E`a ${o} ${o} 0 0 1 ${-o} ${-o}`+E`v ${-(5*i-2*o)}`+E`a ${o} ${o} 0 0 1 ${o} ${-o}z`;return a+l}function T1(t,e,n){let i=t+n/2,r=e+n/2,o=Q(n/2),a=Q(n*(2.5/7));return E`M ${i-o} ${r}`+E`a ${o} ${o} 0 1 0 ${o*2} 0`+E`a ${o} ${o} 0 1 0 ${-o*2} 0z`+E`M ${i-a} ${r}`+E`a ${a} ${a} 0 1 1 ${a*2} 0`+E`a ${a} ${a} 0 1 1 ${-a*2} 0z`}function N1(t,e,n){let i=n/74.7002,r=l=>l*i+t,o=l=>l*i+e;return E`M${r(37.3496)} ${o(0)}C${r(39.2939)} ${o(0)} ${r(40.9948)} ${o(1.03842)} ${r(41.9287)} ${o(2.59082)}C${r(43.2293)} ${o(1.34013)} ${r(45.1347)} ${o(.780267)} ${r(47.0098)} ${o(1.28027)}C${r(48.8871)} ${o(1.78928)} ${r(50.261)} ${o(3.23767)} ${r(50.7578)} ${o(4.98438)}C${r(52.3454)} ${o(4.0996)} ${r(54.3432)} ${o(4.047)} ${r(56.0303)} ${o(5.01953)}C${r(57.7094)} ${o(5.98752)} ${r(58.6586)} ${o(7.73647)} ${r(58.6924)} ${o(9.5459)}C${r(60.4517)} ${o(9.10661)} ${r(62.3883)} ${o(9.57215)} ${r(63.7598)} ${o(10.9502)}C${r(65.1282)} ${o(12.3253)} ${r(65.5963)} ${o(14.2585)} ${r(65.1641)} ${o(16.0127)}C${r(66.974)} ${o(16.044)} ${r(68.7242)} ${o(16.9982)} ${r(69.7002)} ${o(18.6797)}C${r(70.6781)} ${o(20.3647)} ${r(70.6241)} ${o(22.3635)} ${r(69.7402)} ${o(23.9502)}C${r(71.4776)} ${o(24.4496)} ${r(72.9194)} ${o(25.8232)} ${r(73.4199)} ${o(27.7002)}C${r(73.927)} ${o(29.5707)} ${r(73.3661)} ${o(31.4794)} ${r(72.1104)} ${o(32.7822)}C${r(73.6621)} ${o(33.7163)} ${r(74.7002)} ${o(35.4166)} ${r(74.7002)} ${o(37.3604)}C${r(74.7001)} ${o(39.307)} ${r(73.6582)} ${o(41.0084)} ${r(72.1025)} ${o(41.9414)}C${r(73.357)} ${o(43.245)} ${r(73.9207)} ${o(45.1525)} ${r(73.4199)} ${o(47.0303)}C${r(72.9187)} ${o(48.9027)} ${r(71.4782)} ${o(50.2735)} ${r(69.7383)} ${o(50.7734)}C${r(70.6201)} ${o(52.3601)} ${r(70.6716)} ${o(54.3549)} ${r(69.7002)} ${o(56.04)}C${r(68.7237)} ${o(57.7225)} ${r(66.9721)} ${o(58.6729)} ${r(65.1611)} ${o(58.7031)}C${r(65.598)} ${o(60.4623)} ${r(65.131)} ${o(62.3982)} ${r(63.7598)} ${o(63.7695)}C${r(62.3847)} ${o(65.138)} ${r(60.4515)} ${o(65.6061)} ${r(58.6973)} ${o(65.1738)}C${r(58.6635)} ${o(66.9833)} ${r(57.7094)} ${o(68.7322)} ${r(56.0303)} ${o(69.7002)}C${r(54.3461)} ${o(70.6777)} ${r(52.348)} ${o(70.6248)} ${r(50.7617)} ${o(69.7422)}C${r(50.2643)} ${o(71.4831)} ${r(48.8896)} ${o(72.9284)} ${r(47.0098)} ${o(73.4297)}C${r(45.1389)} ${o(73.9368)} ${r(43.2296)} ${o(73.3763)} ${r(41.9268)} ${o(72.1201)}C${r(40.9927)} ${o(73.6717)} ${r(39.2932)} ${o(74.71)} ${r(37.3496)} ${o(74.71)}C${r(35.4051)} ${o(74.7098)} ${r(33.7042)} ${o(73.6711)} ${r(32.7705)} ${o(72.1182)}C${r(31.4697)} ${o(73.3758)} ${r(29.5597)} ${o(73.9418)} ${r(27.6797)} ${o(73.4404)}V${o(73.4502)}C${r(25.8065)} ${o(72.9422)} ${r(24.434)} ${o(71.4985)} ${r(23.9346)} ${o(69.7568)}C${r(22.3504)} ${o(70.6301)} ${r(20.3591)} ${o(70.6781)} ${r(18.6797)} ${o(69.71)}C${r(16.9957)} ${o(68.7391)} ${r(16.045)} ${o(66.9831)} ${r(16.0166)} ${o(65.168)}C${r(14.2547)} ${o(65.6091)} ${r(12.3134)} ${o(65.1435)} ${r(10.9395)} ${o(63.7695)}C${r(9.5687)} ${o(62.3919)} ${r(9.10168)} ${o(60.454)} ${r(9.53809)} ${o(58.6973)}C${r(7.72791)} ${o(58.6641)} ${r(5.97815)} ${o(57.71)} ${r(5.00977)} ${o(56.0303)}C${r(4.03552)} ${o(54.3517)} ${r(4.08377)} ${o(52.3649)} ${r(4.95801)} ${o(50.7812)}C${r(3.21705)} ${o(50.2839)} ${r(1.77087)} ${o(48.9101)} ${r(1.26953)} ${o(47.0303)}V${o(47.0205)}C${r(.762081)} ${o(45.1489)} ${r(1.32758)} ${o(43.2375)} ${r(2.58496)} ${o(41.9346)}C${r(1.03604)} ${o(41)} ${r(108484e-9)} ${o(39.3019)} ${r(0)} ${o(37.3604)}C${r(0)} ${o(35.4159)} ${r(1.03815)} ${o(33.7141)} ${r(2.59082)} ${o(32.7803)}C${r(1.34044)} ${o(31.4797)} ${r(.780389)} ${o(29.575)} ${r(1.28027)} ${o(27.7002)}C${r(1.78258)} ${o(25.8232)} ${r(3.22806)} ${o(24.4482)} ${r(4.97363)} ${o(23.9512)}C${r(4.08938)} ${o(22.3638)} ${r(4.03743)} ${o(20.3664)} ${r(5.00977)} ${o(18.6797)}C${r(5.97815)} ${o(16.9999)} ${r(7.72788)} ${o(16.0496)} ${r(9.53809)} ${o(16.0166)}C${r(9.10139)} ${o(14.2576)} ${r(9.56846)} ${o(12.3214)} ${r(10.9395)} ${o(10.9502)}C${r(12.3171)} ${o(9.57911)} ${r(14.2558)} ${o(9.11137)} ${r(16.0127)} ${o(9.54785)}C${r(16.0426)} ${o(7.73421)} ${r(16.9969)} ${o(5.97989)} ${r(18.6797)} ${o(5.00977)}C${r(20.3596)} ${o(4.03474)} ${r(22.3521)} ${o(4.08468)} ${r(23.9365)} ${o(4.96094)}C${r(24.4378)} ${o(3.22749)} ${r(25.8059)} ${o(1.7898)} ${r(27.6797)} ${o(1.29004)}C${r(29.5511)} ${o(.78264)} ${r(31.4617)} ${o(1.34357)} ${r(32.7646)} ${o(2.60059)}C${r(33.6971)} ${o(1.04268)} ${r(35.4013)} ${o(152405e-9)} ${r(37.3496)} ${o(0)}ZM${r(41.0615)} ${o(9.17578)}C${r(40.1006)} ${o(10.1057)} ${r(38.793)} ${o(10.6797)} ${r(37.3496)} ${o(10.6797)}C${r(35.9064)} ${o(10.6796)} ${r(34.5985)} ${o(10.1066)} ${r(33.6377)} ${o(9.17676)}C${r(32.9511)} ${o(10.3241)} ${r(31.8358)} ${o(11.2176)} ${r(30.4404)} ${o(11.5898)}C${r(29.0527)} ${o(11.9661)} ${r(27.6436)} ${o(11.7542)} ${r(26.4766)} ${o(11.1074)}C${r(26.1072)} ${o(12.3879)} ${r(25.2629)} ${o(13.5333)} ${r(24.0195)} ${o(14.25)}C${r(22.7695)} ${o(14.9754)} ${r(21.347)} ${o(15.1322)} ${r(20.0479)} ${o(14.8047)}C${r(20.0289)} ${o(16.1454)} ${r(19.5108)} ${o(17.4793)} ${r(18.4902)} ${o(18.5)}C${r(17.4696)} ${o(19.5158)} ${r(16.1409)} ${o(20.033)} ${r(14.8066)} ${o(20.0566)}C${r(15.1312)} ${o(21.3534)} ${r(14.9738)} ${o(22.7723)} ${r(14.25)} ${o(24.0195)}C${r(13.5243)} ${o(25.2699)} ${r(12.3701)} ${o(26.1148)} ${r(11.082)} ${o(26.4795)}C${r(11.7347)} ${o(27.6479)} ${r(11.9529)} ${o(29.062)} ${r(11.5801)} ${o(30.46)}C${r(11.2085)} ${o(31.8485)} ${r(10.3194)} ${o(32.9607)} ${r(9.17578)} ${o(33.6475)}C${r(10.106)} ${o(34.6084)} ${r(10.6797)} ${o(35.9167)} ${r(10.6797)} ${o(37.3604)}C${r(10.6796)} ${o(38.805)} ${r(10.1053)} ${o(40.1141)} ${r(9.17383)} ${o(41.0752)}C${r(10.3132)} ${o(41.7614)} ${r(11.1999)} ${o(42.871)} ${r(11.5703)} ${o(44.2598)}C${r(11.946)} ${o(45.6504)} ${r(11.7335)} ${o(47.0592)} ${r(11.0889)} ${o(48.2266)}C${r(12.377)} ${o(48.593)} ${r(13.5297)} ${o(49.441)} ${r(14.25)} ${o(50.6904)}C${r(14.9754)} ${o(51.9405)} ${r(15.1322)} ${o(53.3629)} ${r(14.8047)} ${o(54.6621)}C${r(16.142)} ${o(54.6835)} ${r(17.4721)} ${o(55.2016)} ${r(18.4902)} ${o(56.2197)}C${r(19.5097)} ${o(57.2441)} ${r(20.0278)} ${o(58.5787)} ${r(20.0479)} ${o(59.918)}C${r(21.3469)} ${o(59.5917)} ${r(22.7696)} ${o(59.7493)} ${r(24.0195)} ${o(60.4697)}C${r(25.2676)} ${o(61.1892)} ${r(26.1117)} ${o(62.3406)} ${r(26.4775)} ${o(63.627)}C${r(27.6424)} ${o(62.9822)} ${r(29.0498)} ${o(62.7688)} ${r(30.4404)} ${o(63.1396)}C${r(31.8284)} ${o(63.5112)} ${r(32.9402)} ${o(64.3999)} ${r(33.627)} ${o(65.543)}C${r(34.5887)} ${o(64.6072)} ${r(35.9012)} ${o(64.0304)} ${r(37.3496)} ${o(64.0303)}C${r(38.7912)} ${o(64.0303)} ${r(40.098)} ${o(64.6023)} ${r(41.0586)} ${o(65.5303)}C${r(41.7458)} ${o(64.3887)} ${r(42.8594)} ${o(63.5007)} ${r(44.25)} ${o(63.1299)}C${r(45.643)} ${o(62.7522)} ${r(47.057)} ${o(62.9676)} ${r(48.2266)} ${o(63.6201)}C${r(48.5931)} ${o(62.3323)} ${r(49.4413)} ${o(61.1801)} ${r(50.6904)} ${o(60.46)}C${r(51.9373)} ${o(59.7364)} ${r(53.3558)} ${o(59.5781)} ${r(54.6523)} ${o(59.9023)}C${r(54.6744)} ${o(58.5659)} ${r(55.1925)} ${o(57.2372)} ${r(56.21)} ${o(56.2197)}C${r(57.2339)} ${o(55.2007)} ${r(58.5676)} ${o(54.6816)} ${r(59.9062)} ${o(54.6611)}C${r(59.5835)} ${o(53.3649)} ${r(59.7414)} ${o(51.9468)} ${r(60.46)} ${o(50.7002)}C${r(61.1797)} ${o(49.4517)} ${r(62.3312)} ${o(48.6068)} ${r(63.6182)} ${o(48.2412)}C${r(62.9651)} ${o(47.0726)} ${r(62.7473)} ${o(45.658)} ${r(63.1201)} ${o(44.2598)}C${r(63.4916)} ${o(42.8718)} ${r(64.3794)} ${o(41.7591)} ${r(65.5225)} ${o(41.0723)}C${r(64.5929)} ${o(40.1115)} ${r(64.0206)} ${o(38.8033)} ${r(64.0205)} ${o(37.3604)}C${r(64.0205)} ${o(35.9186)} ${r(64.5915)} ${o(34.611)} ${r(65.5195)} ${o(33.6504)}C${r(64.3785)} ${o(32.9631)} ${r(63.4908)} ${o(31.8501)} ${r(63.1201)} ${o(30.46)}C${r(62.7421)} ${o(29.0656)} ${r(62.9572)} ${o(27.6498)} ${r(63.6113)} ${o(26.4795)}C${r(62.3272)} ${o(26.1115)} ${r(61.1784)} ${o(25.2657)} ${r(60.46)} ${o(24.0195)}C${r(59.7364)} ${o(22.7727)} ${r(59.5781)} ${o(21.3541)} ${r(59.9023)} ${o(20.0576)}C${r(58.5626)} ${o(20.038)} ${r(57.23)} ${o(19.52)} ${r(56.21)} ${o(18.5)}C${r(55.1931)} ${o(17.4783)} ${r(54.675)} ${o(16.1482)} ${r(54.6523)} ${o(14.8125)}C${r(53.3557)} ${o(15.1357)} ${r(51.9374)} ${o(14.9785)} ${r(50.6904)} ${o(14.2598)}C${r(49.4399)} ${o(13.5339)} ${r(48.5931)} ${o(12.3801)} ${r(48.2285)} ${o(11.0918)}C${r(47.0603)} ${o(11.7439)} ${r(45.6474)} ${o(11.9624)} ${r(44.25)} ${o(11.5898)}V${o(11.5801)}C${r(42.8613)} ${o(11.2085)} ${r(41.7483)} ${o(10.3196)} ${r(41.0615)} ${o(9.17578)}Z`}function Uo(t){let e=t/70;return {scale:e,transform:(i,r)=>(i-5)*e+r}}function O1(t,e,n){let{scale:i,transform:r}=Uo(n);return E`M ${r(5,t)} ${r(30,e)}v ${20*i}a ${25*i} ${25*i}, 0, 0, 0, ${25*i} ${25*i}h ${45*i}v -${45*i}a ${25*i} ${25*i}, 0, 0, 0, -${25*i} -${25*i}h -${20*i}H ${r(5,t)}zM ${r(30,t)} ${r(15,e)}h ${20*i}a ${15*i} ${15*i}, 0, 0, 1, ${15*i} ${15*i}v ${35*i}h -${35*i}a ${15*i} ${15*i}, 0, 0, 1, -${15*i} -${15*i}v -${35*i}z`}function D1(t,e,n){let i=n/7,r=i*1.5,o=i*.75,a=E`M ${t+r} ${e}`+E`h ${n-2*r}`+E`a ${r} ${r} 0 0 1 ${r} ${r}`+E`v ${n-2*r}`+E`a ${r} ${r} 0 0 1 ${-r} ${r}`+E`h ${-(n-2*r)}`+E`a ${r} ${r} 0 0 1 ${-r} ${-r}`+E`v ${-(n-2*r)}`+E`a ${r} ${r} 0 0 1 ${r} ${-r}z`,l=E`M ${t+i+o} ${e+i}`+E`h ${5*i-2*o}`+E`a ${o} ${o} 0 0 1 ${o} ${o}`+E`v ${5*i-2*o}`+E`a ${o} ${o} 0 0 1 ${-o} ${o}`+E`h ${-(5*i-2*o)}`+E`a ${o} ${o} 0 0 1 ${-o} ${-o}`+E`v ${-(5*i-2*o)}`+E`a ${o} ${o} 0 0 1 ${o} ${-o}z`;return a+l}function B1(t,e,n){let{scale:i,transform:r}=Uo(n);return E`M ${r(5,t)} ${r(40,e)}a ${35*i} ${35*i}, 0, 0, 0, ${35*i} ${35*i}h ${30*i}a ${5*i} ${5*i}, 0, 0, 0, ${5*i} -${5*i}v -${30*i}a ${35*i} ${35*i}, 0, 0, 0, -${35*i} -${35*i}a ${35*i} ${35*i}, 0, 0, 0, -${35*i} ${35*i}zM ${r(40,t)} ${r(15,e)}a ${25*i} ${25*i}, 0, 0, 1, ${25*i} ${25*i}v ${25*i}h -${25*i}a ${25*i} ${25*i}, 0, 0, 1, -${25*i} -${25*i}a ${25*i} ${25*i}, 0, 0, 1, ${25*i} -${25*i}z`}function G1(t,e,n){let{scale:i,transform:r}=Uo(n);return E`M ${r(5,t)} ${r(30,e)}v ${20*i}a ${25*i} ${25*i}, 0, 0, 0, ${25*i} ${25*i}h ${45*i}v -${45*i}a ${25*i} ${25*i}, 0, 0, 0, -${25*i} -${25*i}h -${20*i}a ${25*i} ${25*i}, 0, 0, 0, -${25*i} ${25*i}M ${r(30,t)} ${r(15,e)}h ${20*i}a ${15*i} ${15*i}, 0, 0, 1, ${15*i} ${15*i}v ${35*i}h -${35*i}a ${15*i} ${15*i}, 0, 0, 1, -${15*i} -${15*i}v -${20*i}a ${15*i} ${15*i}, 0, 0, 1, ${15*i} -${15*i}z`}function Q1(t,e,n){let i=n/70,r=t+n/2-40*i,o=e+n/2-40*i,a=(s,c)=>s*i+c;return E`M${a(35.19239999999999,r)} ${a(5.837547376725838,o)}C${a(37.69667692307692,r)} ${a(3.8737070690335305,o)}, ${a(41.218430769230764,r)} ${a(3.8737092228796843,o)}, ${a(43.722707692307694,r)} ${a(5.837547376725838,o)}L${a(46.62781538461539,r)} ${a(8.115648915187375,o)}L${a(50.23356923076923,r)} ${a(7.32361506903353,o)}C${a(53.342,r)} ${a(6.640824299802762,o)}, ${a(56.51483076923077,r)} ${a(8.168784299802759,o)}, ${a(57.91892307692308,r)} ${a(11.024719684418145,o)}L${a(59.54787692307692,r)} ${a(14.337679684418145,o)}L${a(63.14027692307692,r)} ${a(15.188578145956608,o)}C${a(66.23707692307693,r)} ${a(15.922091992110452,o)}, ${a(68.43270769230769,r)} ${a(18.675396607495067,o)}, ${a(68.45876923076924,r)} ${a(21.857768915187375,o)}L${a(68.48892307692307,r)} ${a(25.54931045364891,o)}L${a(71.35633846153846,r)} ${a(27.874602761341222,o)}C${a(73.82830769230769,r)} ${a(29.879187376725838,o)}, ${a(74.61187692307692,r)} ${a(33.312418145956606,o)}, ${a(73.25452307692306,r)} ${a(36.19103353057199,o)}L${a(71.68006153846153,r)} ${a(39.530141222879685,o)}L${a(73.25452307692306,r)} ${a(42.86924891518738,o)}C${a(74.61187692307692,r)} ${a(45.747864299802764,o)}, ${a(73.82830769230769,r)} ${a(49.18109506903353,o)}, ${a(71.35633846153846,r)} ${a(51.18567968441815,o)}L${a(68.48892307692307,r)} ${a(53.510971992110456,o)}L${a(68.45876923076924,r)} ${a(57.202664299802755,o)}C${a(68.43270769230769,r)} ${a(60.38497199211046,o)}, ${a(66.23707692307693,r)} ${a(63.13823353057199,o)}, ${a(63.14027692307692,r)} ${a(63.871833530572,o)}L${a(59.54787692307692,r)} ${a(64.72260276134121,o)}L${a(57.91892307692308,r)} ${a(68.03564891518737,o)}C${a(56.51483076923077,r)} ${a(70.89164891518737,o)}, ${a(53.342,r)} ${a(72.41958737672583,o)}, ${a(50.23356923076923,r)} ${a(71.7368181459566,o)}L${a(46.62781538461539,r)} ${a(70.94463353057199,o)}L${a(43.722707692307694,r)} ${a(73.22275660749506,o)}C${a(41.218430769230764,r)} ${a(75.18663353057198,o)}, ${a(37.69667692307692,r)} ${a(75.18663353057198,o)}, ${a(35.19239999999999,r)} ${a(73.22275660749506,o)}L${a(32.28729230769231,r)} ${a(70.94463353057199,o)}L${a(28.68153846153846,r)} ${a(71.7368181459566,o)}C${a(25.573215384615384,r)} ${a(72.41958737672583,o)}, ${a(22.400384615384613,r)} ${a(70.89164891518737,o)}, ${a(20.996141538461536,r)} ${a(68.03564891518737,o)}L${a(19.36720923076923,r)} ${a(64.72260276134121,o)}L${a(15.774852307692306,r)} ${a(63.871833530572,o)}C${a(12.67803076923077,r)} ${a(63.13823353057199,o)}, ${a(10.48237846153846,r)} ${a(60.38497199211046,o)}, ${a(10.45636,r)} ${a(57.202664299802755,o)}L${a(10.426163076923077,r)} ${a(53.510971992110456,o)}L${a(7.558747692307692,r)} ${a(51.18567968441815,o)}C${a(5.086880338461539,r)} ${a(49.18109506903353,o)}, ${a(4.303258769230769,r)} ${a(45.747864299802764,o)}, ${a(5.660599692307692,r)} ${a(42.86924891518738,o)}L${a(7.235153846153846,r)} ${a(39.530141222879685,o)}L${a(5.660599692307692,r)} ${a(36.19103353057199,o)}C${a(4.3032566153846155,r)} ${a(33.312418145956606,o)}, ${a(5.086885938461538,r)} ${a(29.879187376725838,o)}, ${a(7.558747692307692,r)} ${a(27.874602761341222,o)}L${a(10.426163076923077,r)} ${a(25.54931045364891,o)}L${a(10.45636,r)} ${a(21.857768915187375,o)}C${a(10.48237846153846,r)} ${a(18.67537506903353,o)}, ${a(12.678052307692308,r)} ${a(15.922091992110452,o)}, ${a(15.774852307692306,r)} ${a(15.188578145956608,o)}L${a(19.36720923076923,r)} ${a(14.337679684418145,o)}L${a(20.996141538461536,r)} ${a(11.024719684418145,o)}C${a(22.400384615384613,r)} ${a(8.168784299802759,o)}, ${a(25.573215384615384,r)} ${a(6.640824299802762,o)}, ${a(28.68153846153846,r)} ${a(7.32361506903353,o)}L${a(32.28729230769231,r)} ${a(8.115648915187375,o)}L${a(35.19239999999999,r)} ${a(5.837547376725838,o)}M${a(39.45766153846154,r)} ${a(13.665055069033532,o)}L${a(37.01498461538461,r)} ${a(15.58053506903353,o)}C${a(35.39098461538461,r)} ${a(16.854061222879682,o)}, ${a(33.282799999999995,r)} ${a(17.335251992110454,o)}, ${a(31.26701538461538,r)} ${a(16.892464299802757,o)}L${a(28.235046153846152,r)} ${a(16.22649506903353,o)}L${a(26.865415384615382,r)} ${a(19.012107376725837,o)}C${a(25.954812307692308,r)} ${a(20.864178145956608,o)}, ${a(24.264193846153844,r)} ${a(22.212399684418145,o)}, ${a(22.255926153846154,r)} ${a(22.688076607495066,o)}L${a(19.235393846153844,r)} ${a(23.40354122287968,o)}L${a(19.21,r)} ${a(26.507556607495065,o)}C${a(19.19313538461538,r)} ${a(28.57137199211045,o)}, ${a(18.25492,r)} ${a(30.519525838264297,o)}, ${a(16.651919999999997,r)} ${a(31.81937199211045,o)}L${a(14.240926153846154,r)} ${a(33.774633530572,o)}L${a(15.564830769230769,r)} ${a(36.58238737672584,o)}C${a(16.445064615384617,r)} ${a(38.44891045364892,o)}, ${a(16.445064615384617,r)} ${a(40.611371992110456,o)}, ${a(15.564830769230769,r)} ${a(42.47811045364892,o)}L${a(14.240926153846154,r)} ${a(45.28564891518738,o)}L${a(16.651919999999997,r)} ${a(47.240910453648915,o)}L${a(13.883236923076923,r)} ${a(50.654971992110454,o)}L${a(16.651919999999997,r)} ${a(47.240910453648915,o)}C${a(18.25492,r)} ${a(48.54075660749507,o)}, ${a(19.19313538461538,r)} ${a(50.4891258382643,o)}, ${a(19.21,r)} ${a(52.5527258382643,o)}L${a(19.235393846153844,r)} ${a(55.65684891518738,o)}L${a(22.255926153846154,r)} ${a(56.37235660749507,o)}C${a(24.264193846153844,r)} ${a(56.847925838264295,o)}, ${a(25.954812307692308,r)} ${a(58.196233530571995,o)}, ${a(26.865415384615382,r)} ${a(60.0483258382643,o)}L${a(28.235046153846152,r)} ${a(62.833895069033524,o)}L${a(31.26701538461538,r)} ${a(62.1679258382643,o)}C${a(33.282799999999995,r)} ${a(61.72509506903353,o)}, ${a(35.39098461538461,r)} ${a(62.20626429980276,o)}, ${a(37.01498461538461,r)} ${a(63.47983353057199,o)}L${a(39.45766153846154,r)} ${a(65.39524891518737,o)}L${a(41.90012307692308,r)} ${a(63.47983353057199,o)}C${a(43.524123076923075,r)} ${a(62.20626429980276,o)}, ${a(45.632307692307684,r)} ${a(61.72509506903353,o)}, ${a(47.6480923076923,r)} ${a(62.1679258382643,o)}L${a(50.68006153846154,r)} ${a(62.833895069033524,o)}L${a(52.049692307692304,r)} ${a(60.0483258382643,o)}C${a(52.960338461538456,r)} ${a(58.196233530571995,o)}, ${a(54.6508923076923,r)} ${a(56.847925838264295,o)}, ${a(56.65913846153846,r)} ${a(56.37235660749507,o)}L${a(59.67969230769231,r)} ${a(55.65684891518738,o)}L${a(59.70510769230769,r)} ${a(52.5527258382643,o)}C${a(59.72190769230769,r)} ${a(50.4891258382643,o)}, ${a(60.66012307692307,r)} ${a(48.54075660749507,o)}, ${a(62.263230769230766,r)} ${a(47.240910453648915,o)}L${a(64.67424615384616,r)} ${a(45.28564891518738,o)}L${a(63.35027692307692,r)} ${a(42.47811045364892,o)}C${a(62.47,r)} ${a(40.611371992110456,o)}, ${a(62.47,r)} ${a(38.44891045364892,o)}, ${a(63.35027692307692,r)} ${a(36.58238737672584,o)}L${a(64.67424615384616,r)} ${a(33.774633530572,o)}L${a(62.263230769230766,r)} ${a(31.81958737672584,o)}C${a(60.66012307692307,r)} ${a(30.519525838264297,o)}, ${a(59.72190769230769,r)} ${a(28.57137199211045,o)}, ${a(59.70510769230769,r)} ${a(26.507556607495065,o)}L${a(59.67969230769231,r)} ${a(23.40354122287968,o)}L${a(56.65913846153846,r)} ${a(22.688076607495066,o)}C${a(54.6508923076923,r)} ${a(22.212399684418145,o)}, ${a(52.960338461538456,r)} ${a(20.864178145956608,o)}, ${a(52.049692307692304,r)} ${a(19.012128915187375,o)}L${a(50.68006153846154,r)} ${a(16.22649506903353,o)}L${a(47.6480923076923,r)} ${a(16.892464299802757,o)}C${a(45.632307692307684,r)} ${a(17.335251992110454,o)}, ${a(43.524338461538456,r)} ${a(16.85408276134122,o)}, ${a(41.90012307692308,r)} ${a(15.58053506903353,o)}L${a(39.45766153846154,r)} ${a(13.665055069033532,o)}Z`}function ur(t,e,n,i,r="top-left"){switch(i){case "leaf":return pl(t,e,n,r);case "leaf-reverse":return pl(t,e,n,r,true);case "drop":return A1(t,e,n,r);case "octagon":return hl(t,e,n,1.6);case "bevel":return hl(t,e,n,1.1);case "squircle":return P1(t,e,n);case "cushion":return v1(t,e,n);case "shield":return I1(t,e,n);case "petal":return F1(t,e,n,r);case "gear":return N1(t,e,n);case "rounded":return k1(t,e,n);case "circle":return T1(t,e,n);case "diya":return O1(t,e,n);case "extra-rounded":return D1(t,e,n);case "message":return B1(t,e,n);case "pointy":return G1(t,e,n);case "curly":return Q1(t,e,n);default:return L1(t,e,n)}}var zo=.22,Ho=.14;function _l(t,e,n={}){if(t==="circle")return A("circle",{cx:x(e.x+e.w/2),cy:x(e.y+e.h/2),r:x(Math.min(e.w,e.h)/2),...n});let i=t==="rounded"?Math.min(e.w,e.h)*zo:0;return A("rect",{height:x(e.h),width:x(e.w),x:x(e.x),y:x(e.y),...i>0&&{rx:x(i),ry:x(i)},...n})}function U1(t,e){let n=t.w*e,i=t.h*e;return {x:t.x+n,y:t.y+i,w:t.w-2*n,h:t.h-2*i}}function yl(t,e){let n=t.shape??"square",i=t.plate,r=i?U1(e,Ho):e,o=l=>A("image",{height:x(r.h),href:t.src,preserveAspectRatio:"none",width:x(r.w),x:x(r.x),y:x(r.y),...l&&{clipPath:`url(#${l})`}});if(n==="square"&&!i)return o();let a=n==="square"?void 0:`qrdx-logo-${le(`${n}|${x(r.x)}|${x(r.y)}|${x(r.w)}|${x(r.h)}`)}`;return ct("g",{children:[i&&_l(n,e,{fill:i}),a&&A("clipPath",{id:a,children:_l(n,r)}),o(a)]})}var z1=.6,H1=["L","M","Q","H"];function q1(t){let e=dt.QrCode.encodeText(t.value,St[t.level]),n=H1[e.errorCorrectionLevel.ordinal]??t.level;return {code:t,cells:e.getModules(),layoutMargin:Pt(e.size,t.margin,t.shape),map:Hn(e.version,n),level:n,version:e.version}}function W1(t,e){let{cells:n,map:i}=t,r=n.length,o=mr(n,t.code.size,t.layoutMargin,e);if(!o)return null;let a=o.excavation??{x:Math.floor(o.x),y:Math.floor(o.y),w:Math.ceil(o.x+o.w)-Math.floor(o.x),h:Math.ceil(o.y+o.h)-Math.floor(o.y)},l=[];for(let c=Math.max(0,a.y);c<Math.min(r,a.y+a.h);c++)for(let u=Math.max(0,a.x);u<Math.min(r,a.x+a.w);u++)l.push(c*r+u);let s=qn(i,l);return {worst:Math.max(0,...s),correctable:i.correctable,budget:Math.floor(i.correctable*z1),level:t.level,version:t.version}}var V1=t=>!t||t.worst<=t.budget;function j1(t,e,n,i){let r=e.map(l=>q1({...t,level:l})),o=l=>{let s=i(l);return r.every(c=>V1(W1(c,s)))};if(o(n))return n;let a=t.size*.005;for(let l=n-a;l>0;l-=a)if(o(l))return l;return 0}function xl(t,e){if(!e)return;let n=Math.floor(t.size*kn),i=e.width||n,r=e.height||n,o=d=>{if(d===i)return e;let p=r*d/i;return {...e,width:d,height:p,...e.x!=null&&{x:e.x+(i-d)/2},...e.y!=null&&{y:e.y+(r-p)/2}}},a=t.level??en,l={value:t.value,size:t.size,margin:t.margin,shape:t.shape},s=d=>fe({...t,level:a,imageSettings:d}),c=d=>{let p=j1(l,[d],i,o);return p>0?o(p):void 0},u=s(e);if(u===a)return c(a);let m=c(u);return m&&s(m)===u?m:c(a)}var X1="gear",Z1="circle";function he(t,e){let n=t.eyeShapes?.[e];return {outer:n?.outer??t.cornerEyePattern??X1,inner:n?.inner??t.cornerEyeDotPattern??Z1}}function dr(t,e,n,i){if(!(t&&Number.isFinite(t))||t<=0||cl(i)||n<=0)return 0;let r=Math.min(Zi,Yi*n/(e+2*n));return Math.min(t,r)}var Vo=(t,e,n,i)=>Math.min(i,Math.max(n,typeof t=="number"&&Number.isFinite(t)?t:e)),Y1=/^hsla?\(([^)]*)\)$/,K1=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?$/,J1=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)%?$/;function qo(t,e){let n=t?.trim()??"";if(!J1.test(n))return Number.NaN;let i=Number.parseFloat(n),r=n.endsWith("%")||e?i/100:i;return Math.min(1,Math.max(0,r))}function td(t){let e=Y1.exec(t);if(!e)return null;let[n="",i]=(e[1]??"").split("/"),r=n.split(/[\s,]+/).filter(Boolean);if(r.length!==(i===void 0&&r.length===4?4:3))return null;let[o="",a,l,s]=r,c=qo(a,true),u=qo(l,true),m=qo(i??s??"1",false),d=Number.parseFloat(o);if(!(K1.test(o)&&[c,u,m].every(Number.isFinite)))return null;let p=c*Math.min(u,1-u),b=f=>{let h=(f+d/30)%12,g=h<0?h+12:h;return 255*(u-p*Math.max(-1,Math.min(g-3,9-g,1)))};return {r:b(0),g:b(8),b:b(4),a:m}}function jo(t){let e=t?.trim().toLowerCase()??"";return e==="none"?{r:0,g:0,b:0,a:0}:it(e)??td(e)}function Wo(t){return jo(t)?.a??1}function ed(t){let e=Ft(t,nt);return e.type==="solid"?Wo(e.color)<1:e.type==="image"?Wo(e.underlay??"transparent")<1:e.stops.some(n=>Wo(n.color)<1)}var wl=({r:t,g:e,b:n})=>Math.min(.2126*t+.7152*e+.0722*n,.299*t+.587*e+.114*n),$l=wl(it(ee)),Sl=t=>{let e=jo(t);return e?wl(e):null};function Cl(t){let e=jo(t.color||eo);return e&&e.a>0?`#${[e.r,e.g,e.b].map(n=>Math.round(n).toString(16).padStart(2,"0")).join("")}`:eo}function nd(t){if(!t.halo)return null;let e="or turn the halo off",n=Ft(t.bgColor,nt);if(n.type==="image")return {reason:"picture",message:"A halo isn't drawn on a picture background: on the picture's darker parts the rim makes the code unreadable",fix:`Use a background color, ${e}`};if(ed(t.bgColor))return {reason:"see-through",message:"A halo isn't drawn on a see-through background: on a grey surface under the code the rim makes it unreadable",fix:`Give the code an opaque background, ${e}`};let i=(n.type==="solid"?[n.color]:n.stops.map(a=>a.color)).map(Sl),r=i.includes(null)?null:Math.min(...i);if(r===null||r<$l-1e-9)return {reason:"dark-background",message:`A halo is drawn only on a background at least as light as ${ee}: on a darker one the rim makes the code unreadable`,fix:`Lighten the background to ${ee} or lighter, ${e}`};let o=Sl(Cl(t.halo));return o<$l-1e-9||o>r+1e-9?{reason:"rim",message:`A halo is drawn only in a color between ${ee} and the background's own: a rim lighter than the background, or darker than ${ee}, makes the code unreadable`,fix:`Pick a halo color no lighter than the background and at least as light as ${ee}, ${e}`}:null}function Ml(t,e){if(!t||e&&nd({halo:t,bgColor:e.bgColor}))return null;let n=Vo(t.width,ta,Ki,Ji);return {color:Cl(t),width:n}}function Rl(t){if(!t)return null;let e=r=>Vo(r,ea,-no,no),n=e(t.dx),i=e(t.dy);return n===0&&i===0?null:{color:t.color||ia,opacity:Vo(t.opacity,oa,na,ra),dx:n,dy:i}}var El="data-qrdx-part",rd="data-qrdx-eye";function Al(t,e,n){if(t)return n?{[El]:e,[rd]:n}:{[El]:e}}var Sn=300;function Lt(t){return {id:t.id,name:t.name,description:t.description,spec:t.spec,wrapper:(e,n)=>{let i=_n(t.spec),r=n?.fgColor,o=(typeof r=="string"?r:ut(r,""))||"black",a=yn(i.qr.size,i,{color:o}),{x:l,y:s,scale:c}=t.at;return A("svg",{height:Sn,id:"svgQrWrapper",style:{width:"100%",height:"100%"},viewBox:`0 0 ${Sn} ${Sn}`,width:Sn,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:ct("g",{"data-qrdx-template":t.id,transform:`translate(${x(l)} ${x(s)})${c===1?"":` scale(${c})`}`,children:[Zs(a),A("g",{fill:"none",transform:`translate(${x(a.qrX)} ${x(a.qrY)}) scale(${a.qrSize/Sn})`,children:e})]})})}}}var Pl={kind:"qrdx.frame",version:1,artboard:{width:185,height:178},qr:{x:35,y:0,size:150,padding:0,plate:"none"},colors:{frame:"#000000"},shapes:[{type:"path",d:"M26.57 80.23h0c0.12 -2.06 0.31 -4.19 0.49 -6.25s0.48 -4.13 0.85 -6.13s0.79 -4 1.27 -5.95a30.21 30.21 0 0 1 1.94 -5.28h0c0.06 -0.18 0.13 -0.43 0.19 -0.67a3.55 3.55 0 0 0 -2.8 -4.19l-0.18 -0.06a1.85 1.85 0 0 0 -0.54 -0.06c-0.19 0 -0.31 -0.06 -0.49 -0.06s-0.61 -0.06 -0.91 -0.06c-0.61 0 -1.21 0.06 -1.82 0.06c-1.21 0.12 -2.37 0.25 -3.52 0.43a62.08 62.08 0 0 0 -6.8 1.45a58.45 58.45 0 0 0 -6.43 2.31c-1 0.42 -2.07 1 -3.1 1.4s-2 1.09 -3 1.57a0.76 0.76 0 0 0 0.54 1.4h0.07c1.09 -0.24 2.12 -0.55 3.15 -0.79s2.13 -0.48 3.16 -0.61A46 46 0 0 1 15 58c1.34 -0.06 2.73 -0.06 4.07 -0.06a62.58 62.58 0 0 0 -7.23 10.43a85.58 85.58 0 0 0 -6.55 15.36a107.86 107.86 0 0 0 -5 32.53a104.06 104.06 0 0 0 5 32.29a90.47 90.47 0 0 0 15.54 28.52a0.94 0.94 0 0 0 1.27 0.19a0.89 0.89 0 0 0 0.18 -1.28h0a87.24 87.24 0 0 1 -13.89 -28.28A102.85 102.85 0 0 1 11 85.87a82.15 82.15 0 0 1 6.68 -14a51.58 51.58 0 0 1 5.71 -7.76c0 1.21 0 2.36 0.06 3.58c0.12 2.18 0.24 4.31 0.48 6.43s0.49 4.25 0.85 6.37a1 1 0 0 0 0.91 0.85A1.37 1.37 0 0 0 26.57 80.23Z",fill:"frame"}],labels:[]};var vl=Lt({id:"Arrow",name:"Arrow",description:"QR code with arrow",spec:Pl,at:{x:47,y:95,scale:1}});var Il={id:"default",name:"Default",description:"Simple QR code without decorative elements",wrapper:t=>A("svg",{height:"300",id:"svgQrWrapper",style:{width:"100%",height:"100%"},viewBox:"0 0 300 300",width:"300",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:A("g",{fill:"none",transform:"translate(9, 9) scale(0.95)",children:t})})};var Cn=593,Yt=296.5,wn=146.5,Ol=294.5,Dl=231.228,Bl="M296.5 0C460.252 -7.15782e-06 593 132.748 593 296.5C593 460.252 460.253 593 296.5 593C132.748 593 7.15782e-06 460.252 0 296.5C-7.15788e-06 132.748 132.748 7.15788e-06 296.5 0ZM296.5 527.728C424.204 527.728 527.728 424.204 527.728 296.5C527.728 168.796 424.204 65.2713 296.5 65.2713C168.796 65.2713 65.2714 168.796 65.2714 296.5C65.2714 424.204 168.796 527.728 296.5 527.728Z",id="iaa2 1z3g 1z0y 1z18 1z18 1we8 2mq 1uta 47y 1rx4 73u 1rx4 73u 1rxe 73u 1rx4 73u 1rxe 73u 1rx4 73u 1rxe 73u 1rx4 73u 1rzm 71m 1rzm 71m 1rzc 73u okq 13ce 744 1rx4 744 1rwu 744 1rx4 744 1rx4 73u 1rx4 744 1rx4 73u 1rx4 73u 1rx4 744 1rx4 73u 1rxe 73u 1rx4 73u 1rx4 744 1rzm 71c 1rzm 73u 1rxe 73u 1rx4 744 1rx4 73u 1rx4 73u 1rxe 73u 1rx4 618 12m 1rxe 73u 1z0y 1z18 1z0y 1z18 1z0y 1z18 1z18",ad="hqpr 5 1z36 1z0y 1z18 1z18 1z0y 1z0y 1a7w otc 1z0y 1z18 1z0y 1z18 1z0y 1z1i 1z0o 1z18 1z0y 1z3q 1z0y 1z18 1z0y 1z18 1z0y 1z18 1z0y 1z18 1z0y 1z18 1z0y 1lk8 dgq 1z18 1z18 1z3g 1z0y 1z0y 1z18 1z18 1z0y 1z0y 1z18 1yx2 3w 1z18 60o 1t0a 1z18 1z0y 1z18 1z0y",Fl="3cf27f17c00j3ch21n1ek00l1el3cj1vv1kd00n3cl3cn1q31q500p3cp1vx00r1kb3cs3aw1ej21p00t3ax3ay17b27h00w3b02g20yq01w2d611m01x3b52aa14i01y24i1bq0203bd3be1q21q60253bf39e39f39h14e2ae02d39j11i2da02e39l0ym02f39n2lt0sz03a39p2ix0vv03b39r2d511n39t03d27d17f03f39x39y21l1en03h3a03a11vt1kf03j37w37x1q11q703l37z1k903n1vz3821eh03p21r38714d03t11h03u2db38a0vp2j303w2lz38g03x0st2rk0n804o38l2oo0q404p38n2iw0vw04r36f36h2a814k04u36k36l1vs1kg04z36o36p1n41t405236q36x36y0ss2m005d3720n02rs05f3742uf0kd0633763772on0q506537834y2fz0yt06834z2d311p06935235424f1bt06c35621j1ep06d3581yn1hl06e35a1sv1nd06g35b1pz1q906h35d35e35g1ef21t06l35h1bj24p06m35k35l11f2dd06q35n0vn2j506s35p35q0pv2ox06u35s0mz2rt06v35t33h0k32up06w2x90hi08y2ud0ke08z33r2lp0t20922fx0yu0942a514m09624d1bu0983441yl1hm09a1vp1ki09b1px1qa09d34e1n11t609e1h91yy09g1ed21u09h1a227m0831492ai09l0yh2ga09n0sp2m209p0pt2oy09q0k12uq09s2xo0h52z209t31k0en0bt2780c319z0az0e831z0cq",Ll=52,sd=240;function kl(t){let e=0;return t.split(" ").map(n=>(e+=Number.parseInt(n,36),e/1e4))}var Xo;function ld(){if(!Xo){let t=kl(id),e=kl(ad),n=[];for(let i=0;i<Fl.length;i+=3){let r=Number.parseInt(Fl.slice(i,i+3),36);n.push({cx:t[Math.floor(r/Ll)],cy:e[r%Ll]});}Xo=n;}return Xo}function cd(t){let e=0;for(let n=0;n<t.length;n++)e=e*32-e+t.charCodeAt(n),e%=2147483647;return Math.abs(e)}function Gl(t){let e=ld(),n=cd(t),i=()=>(n=(n*9301+49297)%233280,n/233280),r=e.map((o,a)=>a);for(let o=r.length-1;o>0;o--){let a=Math.floor(i()*(o+1));[r[o],r[a]]=[r[a],r[o]];}return r.slice(0,sd).sort((o,a)=>o-a).map(o=>e[o])}var Tl=300,ud=49,md=6;function Ql(t,e){if(Tl/e<=ud+.5)return t;let n=wn,i=wn+Tl,r=md*e+e/2;return t.filter(({cx:o,cy:a})=>Math.max(n-o,o-i,n-a,a-i)>=r)}var Ul="Scan the QR code * Scan the QR code * Scan the QR code * Scan the QR code *",Mn=32,zl=3.5,dd=Mn*Tn,Hl=246.5,Qt=2*Math.PI*Hl,Ko=.36,Nl=Hl+Ko*Mn,Zo=400;function je(t,e){return t===" "||/[il1|!']/.test(t)?e*.3:/[mwMW@%&]/.test(t)?e*.8:e*.6}function fd(t){let e=t.slice(0,Zo).split(" ").map(n=>sn(n,Zo)).join(" ");return Array.from(e).slice(0,Zo)}var hd="\u2026",ql=1;function Wl(t,e,n,i=false){return i&&e===t.length-1?ql*n:je(t[e],n)}function Jo(t,e,n=false){let i=0;for(let r=0;r<t.length;r++)i+=Wl(t,r,e,n);return i}function Yo(t,e,n,i=false){return Jo(t,e,i)+n*Math.max(0,t.length-1)+je(" ",e)+2*n<=Qt}var Vl=t=>t.join("").split(" ").filter(Boolean),pd=(t,e)=>Array.from(Array.from({length:e},()=>t.join(" ")).join(" "));function jl(t,e,n){if(Yo(t,e,n))return {chars:t,fontSize:e,letterSpacing:n};let i=Math.min(n,0),r=Math.min(e,dd),o=(f,h=false)=>{let g=Jo(f,e,h)+je(" ",e),_=f.length+1,y=(Qt-g)/_;if(y>=i)return {chars:f,fontSize:e,letterSpacing:y,cut:h};let w=(Qt-i*_)/g*e;return w>=r?{chars:f,fontSize:w,letterSpacing:i,cut:h}:null},a=o(t);if(a)return a;let l=Vl(t),s=Xl(l);for(let f=l.length/s.length-1;f>=1;f--){let h=pd(s,f);if(Yo(h,r,i))return o(h)??{chars:h,fontSize:r,letterSpacing:i}}let c=Qt-je(" ",r)-ql*r-2*i,u=0,m=0,d=0;for(let[f,h]of t.entries()){if(u+=je(h,r)+i,u>c)break;d=f+1,(d===t.length||t[d]===" ")&&(m=d);}let p=[...gd(t.slice(0,m>0?m:d)),hd];return (Yo(p,e,n,true)?{chars:p,fontSize:e,letterSpacing:n,cut:true}:null)??o(p,true)??{chars:p,fontSize:r,letterSpacing:i,cut:true}}function gd(t){let e=t.length;for(;e>0&&/[\s.,;:!?*·•\-–—]/u.test(t[e-1]);)e--;return t.slice(0,e)}function Xl(t){for(let e=1;e<t.length;e++)if(t.length%e===0&&t.every((n,i)=>n===t[i%e]))return t.slice(0,e);return t}function bd(t,e,n){let i=Vl(t);if(i.length===0)return {chars:[],fontSize:e,letterSpacing:n};let r=Array.from(Xl(i).join(" ")),o=Jo(r,e)+je(" ",e),a=o+(r.length+1)*n,l=Math.min(n,0),s=null;for(let c of new Set([Math.floor(Qt/a),Math.ceil(Qt/a)])){if(c<1)continue;let u=(Qt-c*o)/(c*(r.length+1));if(u>=l&&(!s||Math.abs(u-n)<Math.abs(s.letterSpacing-n))){let m=Array.from({length:c},()=>r.join(""));s={chars:Array.from(m.join(" ")),fontSize:e,letterSpacing:u};}}return s??jl(r,e,n)}function Zl(t,e){let{position:n,rotation:i}=e,r=fd(t),o=e.fill==="repeat"?bd(r,e.fontSize,e.letterSpacing):jl(r,e.fontSize,e.letterSpacing),{fontSize:a,letterSpacing:l}=o,s=[],c=0;for(let[f,h]of o.chars.entries()){let g=Wl(o.chars,f,a,o.cut);s.push({char:h,along:c+g/2}),c+=g+l;}let u=c-(s.length>0?l:0),m=n!=="bottom",d=m?Nl-Ko*a:Nl+Ko*a,p=u/Qt*180,b=[];for(let{char:f,along:h}of s){if(f.trim()==="")continue;let g=h/Qt*360,_=m?i-p+g:i+180+p-g,y=_*Math.PI/180;b.push({char:f,x:Q(Yt+d*Math.sin(y)),y:Q(Yt-d*Math.cos(y)),rotate:Q(m?_:_-180)});}return {text:o.chars.join(""),letters:b,fontSize:a===e.fontSize?a:Q(a),letterSpacing:l}}var Xe=(t,e)=>typeof t=="number"&&Number.isFinite(t)?t:e,Yl={id:"DotRing",name:"Dot Ring",description:"A round code in a ring of dots of its own for every link, with text along the ring",wrapper:(t,e,n)=>{let i=ut(e?.fgColor,"#000000"),r=ut(e?.bgColor,"#ffffff"),o=n?.pixelSize??9,a=Q(o/2),l=Ql(Gl(n?.url??""),o),s=Xe(e?.fontSize,Mn),c=s>0?s:Mn,u=typeof e?.customText=="string"?e.customText:Ul,m=Zl(u,{fontSize:c,letterSpacing:Xe(e?.fontLetterSpacing,zl),position:e?.textPosition==="bottom"?"bottom":"top",rotation:Xe(e?.textRotation,0),fill:e?.textFill==="repeat"?"repeat":"none"}),d=e?.textColor||"#ffffff",p=e?.fontFamily||Qo,b=e?.fontWeight??900,f=Xe(e?.strokeWidth,0),h=e?.strokeColor||"#000000",g=[{radius:Yt,width:Xe(e?.outerStrokeWidth,f),color:e?.outerStrokeColor||h},{radius:Dl,width:Xe(e?.innerStrokeWidth,f),color:e?.innerStrokeColor||h}].filter(_=>_.width>0);return ct("svg",{height:Cn,id:"svgQrWrapper",style:{width:"100%",height:"100%"},viewBox:`0 0 ${Cn} ${Cn}`,width:Cn,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[A("circle",{cx:Yt,cy:Yt,fill:r,r:Ol}),A("g",{fill:i,children:l.map((_,y)=>A("circle",{cx:_.cx,cy:_.cy,r:a},y))}),A("path",{d:Bl,fill:e?.outerCircleColor||i}),g.map((_,y)=>A("circle",{cx:Yt,cy:Yt,fill:"none",r:_.radius,stroke:_.color,strokeWidth:_.width},y)),A("g",{"aria-hidden":"true",children:m.letters.map((_,y)=>A("text",{fill:d,fontFamily:p,fontSize:m.fontSize,fontWeight:b,textAnchor:"middle",transform:`rotate(${_.rotate} ${_.x} ${_.y})`,x:_.x,y:_.y,children:_.char},y))}),A("g",{transform:`translate(${wn} ${wn})`,children:t})]})}};var Kl={kind:"qrdx.frame",version:1,artboard:{width:220,height:277},qr:{x:52,y:122,size:114,padding:0,plate:"none"},colors:{frame:"#000000"},shapes:[{type:"circle",cx:110,cy:167.682,r:99.318,fill:"#FFFFFF",stroke:{color:"#F89941",width:20}},{type:"ellipse",cx:139.989,cy:67.895,rx:35.445,ry:48.442,fill:"#F89941"},{type:"path",d:"M159.937 69.076C159.937 82.657 156.092 94.845 150.005 103.57C143.912 112.304 135.736 117.381 126.992 117.381C118.247 117.381 110.072 112.304 103.979 103.57C97.891 94.845 94.047 82.657 94.047 69.076C94.047 55.495 97.891 43.308 103.979 34.582C110.072 25.849 118.247 20.771 126.992 20.771C135.736 20.771 143.912 25.849 150.005 34.582C156.092 43.308 159.937 55.495 159.937 69.076Z",fill:"#F89941",stroke:{color:"#E78249",width:5}},{type:"ellipse",cx:126.072,cy:69.487,rx:34.051,ry:50.662,fill:"#F89941"},{type:"path",d:"M143.396 69.667C143.396 82.739 139.562 94.472 133.488 102.874C127.412 111.279 119.235 116.2 110.451 116.2C101.666 116.2 93.489 111.279 87.413 102.874C81.34 94.472 77.506 82.739 77.506 69.667C77.506 56.595 81.34 44.862 87.413 36.46C93.489 28.055 101.666 23.134 110.451 23.134C119.235 23.134 127.412 28.055 133.488 36.46C139.562 44.862 143.396 56.595 143.396 69.667Z",fill:"#F89941",stroke:{color:"#E78249",width:5}},{type:"ellipse",cx:106.316,cy:70.849,rx:33.673,ry:47.851,fill:"#F89941"},{type:"ellipse",cx:78.743,cy:68.448,rx:35.445,ry:48.442,fill:"#F89941"},{type:"path",d:"M58.794 69.63C58.794 83.211 62.639 95.399 68.726 104.124C74.819 112.858 82.995 117.935 91.739 117.935C100.484 117.935 108.659 112.858 114.753 104.124C120.84 95.399 124.685 83.211 124.685 69.63C124.685 56.049 120.84 43.861 114.753 35.136C108.659 26.402 100.484 21.325 91.739 21.325C82.995 21.325 74.819 26.402 68.726 35.136C62.639 43.861 58.794 56.049 58.794 69.63Z",fill:"#F89941",stroke:{color:"#E78249",width:5}},{type:"ellipse",cx:91.744,cy:69.763,rx:32.944,ry:50.385,fill:"#F89941"},{type:"path",d:"M75.335 70.221C75.335 83.293 79.169 95.025 85.243 103.427C91.319 111.833 99.496 116.753 108.281 116.753C117.065 116.753 125.242 111.833 131.318 103.427C137.392 95.025 141.226 83.293 141.226 70.221C141.226 57.148 137.392 45.416 131.318 37.014C125.242 28.609 117.065 23.688 108.281 23.688C99.496 23.688 91.319 28.609 85.243 37.014C79.169 45.416 75.335 57.148 75.335 70.221Z",fill:"#F89941",stroke:{color:"#E78249",width:5}},{type:"ellipse",cx:111.677,cy:70.871,rx:32.39,ry:47.616,fill:"#F89941"},{type:"ellipse",cx:106.971,cy:71.425,rx:33.221,ry:47.616,fill:"#F89941"},{type:"path",d:"M130.85 46.678C137.21 42.252 138.538 40.633 139.867 39.014C139.867 39.014 141.806 43.824 141.88 46.357C141.954 48.89 141.712 50.147 139.248 51.647C136.783 53.146 127.406 53.045 122.083 52.975C121.31 52.5 122.72 52.337 130.85 46.678Z",fill:"#000000"},{type:"path",d:"M87.765 46.512C81.392 42.141 80.058 40.548 78.724 38.954C78.724 38.954 76.783 45.836 76.758 46.822C76.733 47.808 76.657 50.805 80.247 52C83.837 53.194 91.234 52.772 96.551 52.727C97.322 52.265 95.912 52.099 87.765 46.512Z",fill:"#000000"},{type:"path",d:"M132 90.5C139.156 83.16 141.5 78.283 143.351 72.935C144.24 70.367 134.909 72.043 130 72.935C129.276 73.066 127.751 76.915 127 77C126.182 77.093 123.841 73.076 123 73.086C121.725 73.101 119.727 73.086 117.875 73.429C117.345 74.365 118.367 77.575 117.875 78.283C117.321 78.283 113.796 77.26 113.242 76.43C112.689 74.492 112.949 73.363 112.118 72.532C109.555 72.908 110.023 72.657 107.412 73.086C106.768 73.192 105.09 77.721 104.441 77.82C103.615 77.945 100.644 74.009 99.809 74.114C98.747 74.248 96.821 74.468 95.64 74.577C95.126 74.624 95.554 77.502 95.177 78.283C94.898 78.862 91.426 77.892 90.5 77.5C90.037 76.502 89.844 74.558 89 74.577C83 74.114 81.4 73.843 75.575 70.871C75.575 70.871 74.5 80 83 89C91.5 98 119.127 103.706 132 90.5Z",fill:"#000000"},{type:"path",d:"M107.238 7.252C109.192 1.731 114.678 0.363 117.935 0L120.377 1.816C121.158 2.397 121.842 2.409 122.331 3.257C122.331 4.225 118.337 5.42 114.429 6.582C109.545 8.035 111.482 17.053 114.429 19.281C115.401 20.015 115.524 19.964 117.966 19.964C120.029 19.964 122.387 18.247 123.566 17.353C123.566 17.353 123.861 20.257 121.798 21.478C119.735 22.698 115.578 21.858 115.608 21.966C116.493 23.918 118.89 22.489 120.029 23.336C119.346 23.336 118.556 24.289 116.198 24.533C114.672 24.58 114.135 24.533 112.956 23.918C111.777 23.304 111.482 22.87 110.893 22.14C108.83 23.36 110.893 25.431 110.893 25.431C110.893 25.431 106.472 25.851 105.587 23.918C105.264 23.212 105.882 22.14 105.587 21.966C103.819 22.454 102.935 23.481 99.373 22.87C96.312 22.344 97.102 18.321 96.451 17.353C99.381 18.079 97.131 20.039 101.327 19.964C112.838 19.758 104.796 14.153 107.238 7.252Z",fill:"#5D725F"}],labels:[]};var Jl=Lt({id:"Halloween",name:"Halloween",description:"QR code with Halloween theme",spec:Kl,at:{x:38,y:10,scale:1}});var tc={kind:"qrdx.frame",version:1,artboard:{width:316,height:316},qr:{x:20,y:20,size:276,padding:0,plate:"none"},colors:{frame:"#000000"},shapes:[{type:"path",d:"M308 8H8v300h300V8ZM0 0v316h316V0H0Z",fill:"frame",fillRule:"evenodd"}],labels:[]};var ec=Lt({id:"SquareBorder",name:"Square Border",description:"QR code with square decorative border",spec:tc,at:{x:0,y:0,scale:300/316}});var nc={kind:"qrdx.frame",version:1,artboard:{width:208,height:298},qr:{x:14,y:14,size:180,padding:0,plate:"none"},colors:{frame:"#000000"},shapes:[{type:"path",d:"M197 0.7h-186a10.25 10.25 0 0 0 -10.2 10.12v186A10.13 10.13 0 0 0 11 207H197a10.13 10.13 0 0 0 10.12 -10.12v-186A10.13 10.13 0 0 0 197 0.7Zm2.36 193.05a5.46 5.46 0 0 1 -5.47 5.47H14.16a5.46 5.46 0 0 1 -5.47 -5.47V13.93a5.46 5.46 0 0 1 5.47 -5.47H193.91a5.46 5.46 0 0 1 5.47 5.47Z",fill:"frame"},{type:"path",d:"M197.54 237.81H127.61a2.29 2.29 0 0 1 -1.62 -0.67l-20.55 -20.55a2.33 2.33 0 0 0 -3.25 0l-20.55 20.55a2.29 2.29 0 0 1 -1.62 0.67H10.09A9.15 9.15 0 0 0 0.93 247v41.17a9.16 9.16 0 0 0 9.16 9.16H197.61a9.09 9.09 0 0 0 9.09 -9.16V247A9.16 9.16 0 0 0 197.54 237.81Z",fill:"frame"}],labels:[]};var rc=Lt({id:"StandardBox",name:"Standard Box",description:"QR code with standard box",spec:nc,at:{x:46,y:1,scale:1}});var oc={kind:"qrdx.frame",version:1,artboard:{width:252,height:300},qr:{x:40,y:38,size:174,padding:0,plate:"none"},colors:{frame:"#000000"},shapes:[{type:"path",d:"M171.11 290.77l-7.28 4.88a2.16 2.16 0 0 0 -0.57 3a2.21 2.21 0 0 0 1.77 0.92a2.4 2.4 0 0 0 1.2 -0.35l7.28 -4.88a2.14 2.14 0 0 0 -2.4 -3.54Z",fill:"#22071b"},{type:"path",d:"M242.85 227.52l-7.28 4.87a2.16 2.16 0 0 0 -0.57 3a2.21 2.21 0 0 0 1.77 0.92a1.86 1.86 0 0 0 1.2 -0.35l7.28 -4.88a2.13 2.13 0 1 0 -2.4 -3.53Z",fill:"#22071b"},{type:"path",d:"M17 176.34l-9.11 6.08a2.15 2.15 0 0 0 -0.57 3a2.19 2.19 0 0 0 1.77 0.92a2.14 2.14 0 0 0 1.2 -0.35l9.12 -6.08A2.14 2.14 0 0 0 17 176.34Z",fill:"#22071b"},{type:"path",d:"M17 269.08l-9.11 6.07a2.15 2.15 0 0 0 -0.57 3a2.19 2.19 0 0 0 1.77 0.92a2.92 2.92 0 0 0 1.2 -0.35l9.12 -6.08A2.14 2.14 0 0 0 17 269.08Z",fill:"#22071b"},{type:"path",d:"M123 10.1a2.4 2.4 0 0 0 1.14 -0.35l7.7 -5.16a2.13 2.13 0 0 0 -2.4 -3.53l-7.64 5.15a2.15 2.15 0 0 0 -0.56 3A2.19 2.19 0 0 0 123 10.1Z",fill:"#22071b"},{type:"path",d:"M251.54 54.77a2.14 2.14 0 0 0 -3 -0.56l-17.1 11.45V31.31a10.18 10.18 0 0 0 -10.18 -10.18H113.22l-10.39 7a2.4 2.4 0 0 1 -1.2 0.35a2.21 2.21 0 0 1 -1.77 -0.92a2.15 2.15 0 0 1 0.57 -3l1.41 -0.92l13.64 -8.76a2.1 2.1 0 1 0 -2.26 -3.54L98 21.2h-8.13l-10.39 7a2.37 2.37 0 0 1 -1.2 0.35a2.19 2.19 0 0 1 -1.76 -0.92a2.15 2.15 0 0 1 0.56 -3L100 9.25a2.13 2.13 0 1 0 -2.4 -3.53l-23 15.48H34.2A10.18 10.18 0 0 0 24 31.38v28L7.34 70.46a2.09 2.09 0 0 0 -0.57 3a2 2 0 0 0 1.77 0.92a2.58 2.58 0 0 0 1.2 -0.35l14.35 -9.54l3.18 -2.12a2.14 2.14 0 1 1 2.41 3.53l-5.52 3.67V76.9l-7 4.66a2.15 2.15 0 0 0 -0.56 3a2 2 0 0 0 1.77 0.92a2.34 2.34 0 0 0 1.2 -0.36l7.35 -4.94A2.13 2.13 0 0 1 28.69 84l-4.46 3v65.66L1.05 168.07a2.15 2.15 0 0 0 -0.57 3a2 2 0 0 0 1.77 0.92a2.37 2.37 0 0 0 1.2 -0.35l25 -16.75a2 2 0 0 1 2.62 0.77a2.16 2.16 0 0 1 -0.57 3l-6.36 4.24V275a10.09 10.09 0 0 0 9.83 10.11l-5.87 4a2.15 2.15 0 0 0 -0.57 3a2.06 2.06 0 0 0 1.77 0.92a2.38 2.38 0 0 0 1.2 -0.36l23 -15.41a2.14 2.14 0 0 1 2.41 3.54l-6.58 4.45h52l-5.58 3.75a2.14 2.14 0 0 0 -0.56 3a2 2 0 0 0 1.76 0.91a2.37 2.37 0 0 0 1.2 -0.35l30.54 -20.28a2.15 2.15 0 0 1 3 0.56a2.1 2.1 0 0 1 -0.57 3l-14.21 9.54H193l-4.6 3a2.16 2.16 0 0 0 -0.63 3a2.11 2.11 0 0 0 1.76 1a2 2 0 0 0 1.13 -0.36L213 277.35a2.14 2.14 0 1 1 2.33 3.6l-6.78 4.38h13a10.18 10.18 0 0 0 10.18 -10.18v-91.1l-4.38 3a2.43 2.43 0 0 1 -1.2 0.35a2.19 2.19 0 0 1 -1.77 -0.92a2.15 2.15 0 0 1 0.57 -3l24.38 -16.33a2.13 2.13 0 1 0 -2.4 -3.53l-15.48 10.25V91.53l-4.38 3a2.34 2.34 0 0 1 -1.21 0.36a2.22 2.22 0 0 1 -1.76 -0.92a2.15 2.15 0 0 1 0.56 -3l6.72 -4.52l13.71 -9.19a2.14 2.14 0 0 0 -2.4 -3.54l-11.24 7.57V75.84l-4.38 3a2.34 2.34 0 0 1 -1.21 0.36a2.22 2.22 0 0 1 -1.76 -0.92a2.15 2.15 0 0 1 0.56 -3l6.72 -4.52l19.43 -13.08A2.05 2.05 0 0 0 251.54 54.77ZM213 216.07h-172a5.23 5.23 0 0 1 -5.23 -5.24V38.94a5.22 5.22 0 0 1 5.23 -5.23H213a5.22 5.22 0 0 1 5.23 5.23V210.83h0.07A5.22 5.22 0 0 1 213 216.07Z",fill:"#22071b"},{type:"path",d:"M246.45 139.8l-7.28 4.88a2.15 2.15 0 0 0 -0.56 3a2.22 2.22 0 0 0 1.76 0.92a2.44 2.44 0 0 0 1.21 -0.36l7.28 -4.87a2.14 2.14 0 0 0 -2.41 -3.54Z",fill:"#22071b"}],labels:[]};var ic=Lt({id:"StrikedBox",name:"Striked Box",description:"QR code with striked box",spec:oc,at:{x:24,y:0,scale:1}});var ti={default:Il,Arrow:vl,StandardBox:rc,SquareBorder:ec,StrikedBox:ic,Halloween:Jl,DotRing:Yl},ac={FlamQR:"DotRing"},sc=t=>{if(Object.hasOwn(ti,t))return ti[t];let e=Object.hasOwn(ac,t)?ac[t]:void 0;return e?ti[e]:void 0};var ei=t=>Math.round(Math.min(Math.max(t,0),255)).toString(16).padStart(2,"0");function mc(t){return `#${ei(t.r)}${ei(t.g)}${ei(t.b)}`}function Ze(t){let e=it(t);return !e||e.a>=1||e.a<=0?{color:t}:{color:mc(e),opacity:Q(e.a,3)}}function fr(t,e){let n=Math.min(Math.max(t.a,0),1);return {r:t.r*n+e.r*(1-n),g:t.g*n+e.g*(1-n),b:t.b*n+e.b*(1-n),a:1}}var dc={r:0,g:0,b:0,a:1};function Sd(t){return [...t].map(e=>({offset:Math.min(Math.max(e.offset/100,0),1),color:it(e.color)??dc})).sort((e,n)=>e.offset-n.offset)}function ni(t,e){let n=t[0],i=t.at(-1);if(!(n&&i))return dc;if(e<=n.offset)return n.color;if(e>=i.offset)return i.color;for(let r=0;r+1<t.length;r++){let o=t[r],a=t[r+1];if(e>=o.offset&&e<=a.offset){let l=a.offset-o.offset,s=l>0?(e-o.offset)/l:1,c=o.color.a+(a.color.a-o.color.a)*s,u=(m,d)=>{let p=m*o.color.a+(d*a.color.a-m*o.color.a)*s;return c>0?p/c:m+(d-m)*s};return {r:u(o.color.r,a.color.r),g:u(o.color.g,a.color.g),b:u(o.color.b,a.color.b),a:c}}}return i.color}var lc=4,cc=720,wd=2;function fc(t,e,n,i,r){let o=Sd(t);if(o.length===0)return {wedges:[]};let a=o[0].color.a,l=o.every(_=>Math.abs(_.color.a-a)<.002),s=[...new Set([0,...o.map(_=>_.offset),1])].sort((_,y)=>_-y),c=[];for(let _=0;_+1<s.length;_++){let y=s[_],w=s[_+1];if(w<=y)continue;let C=ni(o,y+1e-9),S=ni(o,w-1e-9),$=Math.max(Math.abs(C.r*C.a-S.r*S.a),Math.abs(C.g*C.a-S.g*S.a),Math.abs(C.b*C.a-S.b*S.a),Math.abs(C.a-S.a)*255),R=Math.ceil($/wd),M=Math.ceil((w-y)*360/lc),P=Math.max(1,R,M);for(let v=0;v<P;v++)c.push([y+(w-y)*v/P,y+(w-y)*(v+1)/P]);}let u=c;if(c.length>cc){let _=Math.ceil(c.length/cc);u=[];for(let y=0;y<c.length;y+=_){let w=c.slice(y,y+_);u.push([w[0][0],w.at(-1)[1]]);}}let m=e-90,d=r/Math.cos(2*lc/2*(Math.PI/180)),p=_=>{let y=_*Math.PI/180;return [x(n+d*Math.cos(y)),x(i+d*Math.sin(y))]},b=`${x(n)} ${x(i)}`,f=_=>Q((_%360+360)%360,4),h=u.length-1,g=u.map(([_,y],w)=>{let C=ni(o,(_+y)/2),S=(y-_)*360,$=l&&w===0&&h>0?S:0,R=l&&w<h?S:0,M=m+_*360-$,P=m+y*360+R,[v,I]=p(M),[F,T]=p(P);return {d:`M${b}L${v} ${I}L${F} ${T}Z`,color:mc(C),...l||C.a>=1?{}:{opacity:Q(C.a,3)},from:f(M),sweep:Q(P-M,4)}});return l&&a<1?{wedges:g,opacity:Q(a,3)}:{wedges:g}}function uc(t,e,n,i){return (Math.atan2(i-e,n-t)*180/Math.PI%360+360)%360}function hc(t,e,n){if(t>=n.x-1e-6&&t<=n.x+n.width+1e-6&&e>=n.y-1e-6&&e<=n.y+n.height+1e-6)return null;let r=[[n.x,n.y],[n.x+n.width,n.y],[n.x,n.y+n.height],[n.x+n.width,n.y+n.height]],o=uc(t,e,n.x+n.width/2,n.y+n.height/2),a=0,l=0;for(let[s,c]of r){let u=uc(t,e,s,c)-o;u>180?u-=360:u<=-180&&(u+=360),a=Math.min(a,u),l=Math.max(l,u);}return [o+a,o+l]}function pc(t,e){let n=t[1]-t[0],i=e[1]-e[0];if(n>=360||i>=360)return true;let r=((e[0]-t[0])%360+360)%360;return r<=n||r+i>=360}function Cd(t,e){return t.slice().map((n,i)=>i<e.y||i>=e.y+e.h?n:n.map((r,o)=>o<e.x||o>=e.x+e.w?r:false))}function Md(t,e,n){return t<7&&e<7||t>=n-7&&e<7||t<7&&e>=n-7}var Rd=.9;function ri(t,e){let{margin:n,pixelSize:i,pattern:r="circle",plain:o=false}=e;if(is(r))return as(t,{margin:n,pixelSize:i,pattern:r,scale:e.scale,plain:o});let a=Po(e.scale,r),l=[],s=t.length,c=i*.45,u=o?()=>false:vo(s);return t.forEach((m,d)=>{m.forEach((p,b)=>{if(p&&(o||!Md(b,d,s))){let f=(b+.5+n)*i,h=(d+.5+n)*i,g=`${b}-${d}`,_=l.length;if(u(b,d)){l.push(A("rect",{height:x(i),width:x(i),x:x(f-i/2),y:x(h-i/2)},g));return}switch(r){case "circle":l.push(A("circle",{cx:x(f),cy:x(h),r:x(c),transform:E`rotate(0,${f},${h})`},g));break;case "circle-large":{let y=i*.5;l.push(A("circle",{cx:x(f),cy:x(h),r:x(y),transform:E`rotate(0,${f},${h})`},g));}break;case "small-square":{let y=i*.357143;l.push(A("path",{d:E`M ${f-y} ${h-y}v ${i*.714286}h ${i*.714286}v -${i*.714286}z`,transform:E`rotate(0,${f},${h})`},g));}break;case "diamond":{let y=i*.357143;l.push(A("path",{d:E`M ${f-y} ${h-y}v ${i*.714286}h ${i*.714286}v -${i*.714286}z`,transform:E`rotate(45,${f},${h})`},g));}break;case "circle-mixed":{let y=(b+d)%3===0?Rd:(b+d)%2===0?1:1.25,w=c*y;l.push(A("circle",{cx:x(f),cy:x(h),r:x(w),transform:E`rotate(0,${f},${h})`},g));}break;case "pacman":{let y=i*.5,w=i*.357143;l.push(A("path",{d:E`M ${f-y} ${h-w}v ${i*.714286}h ${y}a ${y*.5} ${y*.5}, 0, 0, 0, 0 -${i*.714286}h -${y}v -${i*.714286}z`,transform:E`rotate(${(b+d)%2===0?0:90},${f},${h})`},g));}break;case "rounded":{let y=i*.5,w=i*.2;l.push(A("rect",{height:x(i),rx:x(w),ry:x(w),transform:E`rotate(0,${f},${h})`,width:x(i),x:x(f-y),y:x(h-y)},g));}break;case "square":{let y=i*.5;l.push(A("rect",{height:x(i),transform:E`rotate(0,${f},${h})`,width:x(i),x:x(f-y),y:x(h-y)},g));}break;case "vertical-line":{let y=i*.714286,w=i;l.push(A("path",{d:E`M ${f-i*.5} ${h-y*.5}v ${y}h ${w}v -${y}z`,transform:E`rotate(90,${f},${h})`},g));}break;default:l.push(A("circle",{cx:x(f),cy:x(h),r:x(c),transform:E`rotate(0,${f},${h})`},g));}if(a!==1&&l.length>_){let y=l.pop();l.push(A("g",{transform:E`translate(${f},${h}) scale(${x(a,6)}) translate(${-f},${-h})`,children:y},g));}}});}),l}function Ed(t,e){let n=t*Math.PI/180,i=e/2,r=e/2,o=Math.sqrt(e*e+e*e)/2,a=i-o*Math.cos(n),l=r-o*Math.sin(n),s=i+o*Math.cos(n),c=r+o*Math.sin(n);return {x1:a,y1:l,x2:s,y2:c}}function oi(t,e){return `${t}-${le(JSON.stringify(e))}`}function Ad(t,e,n,i,r){let o=t;if(t===0)switch(r){case "top-left":o=0;break;case "top-right":o=90;break;case "bottom-left":o=270;break;default:o=0;}let a=o*Math.PI/180,l=e+i/2,s=n+i/2,c=Math.sqrt(i*i+i*i)/2,u=l-c*Math.cos(a),m=s-c*Math.sin(a),d=l+c*Math.cos(a),p=s+c*Math.sin(a);return {x1:u,y1:m,x2:d,y2:p}}function gr(t,e){return e.map((n,i)=>{let{color:r,opacity:o}=Ze(n.color);return A("stop",{offset:`${n.offset}%`,stopColor:r,stopOpacity:o},`${t}-stop-${i}`)})}function bc(t,e,n,i,r,o){let a=fc(e.stops,e.angle??0,n,i,r),l=a.wedges.map((s,c)=>A("path",{d:s.d,"data-arc":`${s.from} ${s.sweep}`,fill:s.color,fillOpacity:s.opacity,shapeRendering:s.opacity===void 0?void 0:"crispEdges"},`${t}-w-${c}`));return A("pattern",{"data-qrdx-conic":`${x(n)} ${x(i)}`,height:x(o),id:t,patternUnits:"userSpaceOnUse",width:x(o),x:0,y:0,children:a.opacity===void 0?l:A("g",{opacity:a.opacity,children:l})},t)}function Pd(t="center"){let[e,n]=t.split("-"),i=t==="center"?"center":e,r=n??(e==="left"||e==="right"?e:"center");return {x:r==="left"?0:r==="right"?1:.5,y:i==="top"?0:i==="bottom"?1:.5}}var vd=["xMin","xMid","xMax"],Id=["YMin","YMid","YMax"];function _c(t,e,n){let i=e.scale??1,r=e.fit==="tile",o=r?n/4*i:n,a=e.underlay?Ze(e.underlay):null,l=r?o:n*i,s=Pd(e.position),c=r?0:s.x*(n-l),u=r?0:s.y*(n-l),m=r?"xMidYMid slice":`${vd[s.x*2]??"xMid"}${Id[s.y*2]??"YMid"} ${e.fit==="contain"?"meet":"slice"}`;return ct("pattern",{height:x(o),id:t,patternUnits:"userSpaceOnUse",width:x(o),x:0,y:0,children:[a&&A("rect",{fill:a.color,fillOpacity:a.opacity,height:x(o),width:x(o),x:0,y:0}),A("image",{height:x(l),href:e.src,opacity:(e.opacity??1)<1?e.opacity:void 0,preserveAspectRatio:m,width:x(l),x:x(c),y:x(u)})]},t)}var yc=(t,e)=>oi("img",[t,e]);function Fd(t,e,n,i,r,o,a){let l=Ft(t);if(l.type==="solid")return null;if(l.type==="image"){let c=yc(l,a);return {id:c,element:_c(c,l,a)}}let s=oi(o,[l,e,n,i,r,...l.type==="angular"?[a]:[]]);if(l.type==="linear"){let c=l,u=c.angle??0,{x1:m,y1:d,x2:p,y2:b}=Ad(u,e,n,i,r);return {id:s,element:A("linearGradient",{gradientUnits:"userSpaceOnUse",id:s,x1:x(m),x2:x(p),y1:x(d),y2:x(b),children:gr(s,c.stops)},s)}}if(l.type==="radial"){let c=l,u=e+i/2,m=n+i/2,d=i/2*.97;return {id:s,element:A("radialGradient",{cx:x(u),cy:x(m),fx:x(u),fy:x(m),gradientUnits:"userSpaceOnUse",id:s,r:x(d),children:gr(s,c.stops)},s)}}return l.type==="angular"?{id:s,element:bc(s,l,e+i/2,n+i/2,i*.75,a)}:null}function hr(t,e,n){let i=Ft(t);if(i.type==="solid")return null;if(i.type==="image"){let o=yc(i,e);return {id:o,element:_c(o,i,e)}}let r=oi(n,[i,e]);if(i.type==="linear"){let o=i,a=o.angle??0,{x1:l,y1:s,x2:c,y2:u}=Ed(a,e);return {id:r,element:A("linearGradient",{gradientUnits:"userSpaceOnUse",id:r,x1:x(l),x2:x(c),y1:x(s),y2:x(u),children:gr(r,o.stops)},r)}}if(i.type==="radial"){let o=i,a=e/2,l=e/2,s=e/2*.97;return {id:r,element:A("radialGradient",{cx:x(a),cy:x(l),fx:x(a),fy:x(l),gradientUnits:"userSpaceOnUse",id:r,r:x(s),children:gr(r,o.stops)},r)}}return i.type==="angular"?{id:r,element:bc(r,i,e/2,e/2,e*.75,e)}:null}var pr=t=>ke(t)||Hi(t);function gc(t){let e=new Set,n=[];for(let i of t)i&&!e.has(i.id)&&(e.add(i.id),n.push(i.element));return n}function Ut(t,e,n){if(e)return {fill:`url(#${e})`};let i=Ft(t,n),r=i.type==="solid"?i.color:i.type==="image"?i.underlay??n:n,{color:o,opacity:a}=Ze(r);return a===void 0?{fill:o}:{fill:o,fillOpacity:a}}function mr(t,e,n,i){if(i==null)return null;let r=t.length,o=Math.floor(e*kn),a=(r+2*n)/e,l=(i.width||o)*a,s=(i.height||o)*a,c=i.x==null?r/2-l/2:i.x*a,u=i.y==null?r/2-s/2:i.y*a,m=null;if(i.excavate){let d=Math.max(0,i.padding??0)*a,p=Math.floor(c-d),b=Math.floor(u-d),f=Math.ceil(l+c+d-p),h=Math.ceil(s+u+d-b);m={x:p,y:b,w:f,h};}return {x:c,y:u,h:s,w:l,excavation:m}}function fe(t){let e=t.level??en,{imageSettings:n}=t,i=t.isOGContext&&n?.excavate&&(e==="L"||e==="M")?"Q":e;if(t.autoLevel&&n&&i!=="H"){let r=dt.QrCode.encodeText(t.value,St[i]).getModules(),o=mr(r,t.size??xt,Pt(r.length,t.margin??Ht,t.shape),n);o&&(o.excavation?o.excavation.w*o.excavation.h:o.w*o.h)/(r.length*r.length)>Vi&&(i="H");}return i}function Ld(t,e,n,i){let r=e/n,o=t.w*r,a=t.h*r,l=(t.x+i)*r,s=(t.y+i)*r;return {imgWidth:o,imgHeight:a,imgLeft:l,imgTop:s}}function Ye(t){let{value:e,size:n=xt,level:i=en,bgColor:r=nt,fgColor:o=Le,eyeColor:a,dotColor:l,bodyPattern:s="circle",cornerEyePattern:c="gear",cornerEyeDotPattern:u="circle",margin:m=Ht,isOGContext:d=false,imageSettings:p,templateId:b,customTemplate:f,customProps:h,frame:g,art:_,eyeColors:y,moduleScale:w,autoLevel:C,shape:S,eyeShapes:$,eyeGradient:R,bgRadius:M,backdrop:P,halo:v,shadow:I,frameLabelMarkers:F,partMarkers:T,...N}=t,L=xl({value:e,size:n,margin:m,level:i,shape:S,autoLevel:C,isOGContext:d},p),V=Zt(g),D=V?{}:N,G=O=>V?Ys(O,{size:n,frame:g,bgColor:r,svgProps:N,markLabels:F}):O,U=fe({value:e,size:n,level:i,margin:m,imageSettings:L,isOGContext:d,autoLevel:C,shape:S}),et=dt.QrCode.encodeText(e,St[U]),K=et.getModules(),j=Pt(K.length,m,S),Rt=ml(e,K.length,m,S),B=(O,ht)=>Al(T,O,ht),yt=dr(M,K.length,j,S),Jt=(O,ht)=>{let It=dl(S,O);if(!It){if(yt>0){let Nt=x(yt*O),Et=P?Ze(P):null;return ct(Ot,{children:[Et&&A("rect",{"data-qrdx-look":"backdrop",fill:Et.color,fillOpacity:Et.opacity,height:O,width:O,x:0,y:0}),A("rect",{...ht,height:O,rx:Nt,ry:Nt,width:O,x:0,y:0,...B("background")})]})}return A("rect",{...ht,height:O,width:O,x:0,y:0,...B("background")})}return "circle"in It?A("circle",{cx:x(O/2),cy:x(O/2),...ht,r:x(O/2),...B("background")}):A("path",{d:It.path,...ht,...B("background")})},Je=K.length+j*2,kt=mr(K,n,j,L),Tt=null;if(L!=null&&kt!=null){kt.excavation!=null&&(K=Cd(K,kt.excavation));let{imgWidth:O,imgHeight:ht,imgLeft:It,imgTop:Nt}=Ld(kt,n,Je,j);if(d){let Et=L.shape??"square";Tt=A("img",{alt:"Logo",src:L.src,style:{position:"absolute",left:`${x(It)}px`,top:`${x(Nt)}px`,width:`${x(O)}px`,height:`${x(ht)}px`,...Et!=="square"&&{borderRadius:Et==="circle"?"50%":`${x(Math.min(O,ht)*zo)}px`},...L.plate&&{backgroundColor:L.plate,padding:`${x(O*Ho)}px`,boxSizing:"border-box"}}});}else Tt=yl(L,{x:It,y:Nt,w:O,h:ht}),T&&(Tt=Oe(Tt,B("logo")));}let mt=n/Je,Ei=K.length,Y=7*mt,Ir=1.5*mt,Ai={fgColor:ut(o,Le),bgColor:ut(r,nt)},xe=Ia(_)?Ba({art:_,modules:K,version:et.version,margin:j,pixelSize:mt,...Ai,body:O=>ri(O,{margin:j,pixelSize:mt,pattern:s,scale:w})}):null,Pi=xe&&T?Oe(xe,B("body")):xe,vi=xe&&_?ts({art:_,version:et.version,...Ai}):null,Ii=xe?null:ri(K,{margin:j,pixelSize:mt,pattern:s,scale:w}),Fn=Rt?ri(Rt,{margin:0,pixelSize:mt,pattern:s,scale:w,plain:true}):null,Ln=Ft(r,nt),Fr=Ft(o,Le),Fi=pr(Ln)?hr(Ln,n,"bg-color"):null,Lr=pr(Fr)?hr(Fr,n,"fg-color"):null,Tu=Ut(r,Fi?.id??null,nt),Li=Ut(o,Lr?.id??null,Le),ki=Pi?ct(Ot,{children:[Pi,Fn&&A("g",{...Li,...B("body"),children:Fn})]}):ct("g",{...Li,...B("body"),children:[Ii,Fn]}),$e=j*mt,Se=j*mt,we=(Ei-7+j)*mt,Ce=j*mt,Me=j*mt,Re=(Ei-7+j)*mt,te=ut(o,Le),Ee=O=>y?.[O]?.outer??vi?.[O]?.outer??a,Ae=O=>y?.[O]?.inner??vi?.[O]?.inner??l,Pe=(O,ht,It,Nt,Et)=>{let Ie=Ft(O,te);if(!pr(Ie))return null;if(R==="code"&&ke(Ie)){let Xr=JSON.stringify(Ie)===JSON.stringify(Fr);return hr(Ie,n,Xr?"fg-color":Et)}return Fd(Ie,ht,It,Y,Nt,Et,n)},kr=Pe(Ee("topLeft"),$e,Se,"top-left","corners-square-color-0-0"),Tr=Pe(Ee("topRight"),we,Ce,"top-right","corners-square-color-1-0"),Nr=Pe(Ee("bottomLeft"),Me,Re,"bottom-left","corners-square-color-0-1"),Or=Pe(Ae("topLeft"),$e,Se,"top-left","corners-dot-color-0-0"),Dr=Pe(Ae("topRight"),we,Ce,"top-right","corners-dot-color-1-0"),Br=Pe(Ae("bottomLeft"),Me,Re,"bottom-left","corners-dot-color-0-1"),Ti=Ut(Ee("topLeft"),kr?.id??null,te),Ni=Ut(Ee("topRight"),Tr?.id??null,te),Oi=Ut(Ee("bottomLeft"),Nr?.id??null,te),Di=Ut(Ae("topLeft"),Or?.id??null,te),Bi=Ut(Ae("topRight"),Dr?.id??null,te),Gi=Ut(Ae("bottomLeft"),Br?.id??null,te),ve={cornerEyePattern:c,cornerEyeDotPattern:u,eyeShapes:$},Gr=ur($e,Se,Y,he(ve,"topLeft").outer,"top-left"),Qr=cr($e+Y/2,Se+Y/2,Ir,he(ve,"topLeft").inner,"top-left"),Ur=ur(we,Ce,Y,he(ve,"topRight").outer,"top-right"),zr=cr(we+Y/2,Ce+Y/2,Ir,he(ve,"topRight").inner,"top-right"),Hr=ur(Me,Re,Y,he(ve,"bottomLeft").outer,"bottom-left"),qr=cr(Me+Y/2,Re+Y/2,Ir,he(ve,"bottomLeft").inner,"bottom-left"),Wr=Ml(v,{bgColor:r}),tn=Rl(I),Qi=O=>ct(Ot,{children:[xe?null:Ii,Fn,A("path",{d:Gr,fillRule:O}),Qr,A("path",{d:Ur,fillRule:O}),zr,A("path",{d:Hr,fillRule:O}),qr]}),Vr=null;if(Wr){let{color:O}=Wr;Vr=A("g",{"data-qrdx-look":"halo",fill:O,stroke:O,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:x(2*Wr.width*mt),children:Qi("nonzero")});}let jr=null;if(tn){let{color:O}=Ze(tn.color);jr=A("g",{"data-qrdx-look":"shadow",fill:O,opacity:x(tn.opacity),transform:E`translate(${tn.dx*mt},${tn.dy*mt})`,children:Qi("evenodd")});}let Nu=ct(Ot,{children:[A("defs",{children:gc([Fi,Lr,kr,Tr,Nr,Or,Dr,Br])}),Jt(n,Tu),Vr,jr,ki,A("g",{...Ti,...B("eye-outer","top-left"),children:A("path",{d:Gr,fillRule:"evenodd",transform:E`rotate(0,${$e+Y/2},${Se+Y/2})`})}),A("g",{...Di,...B("eye-centre","top-left"),children:Qr}),A("g",{...Ni,...B("eye-outer","top-right"),children:A("path",{d:Ur,fillRule:"evenodd",transform:E`rotate(0,${we+Y/2},${Ce+Y/2})`})}),A("g",{...Bi,...B("eye-centre","top-right"),children:zr}),A("g",{...Oi,...B("eye-outer","bottom-left"),children:A("path",{d:Hr,fillRule:"evenodd",transform:E`rotate(0,${Me+Y/2},${Re+Y/2})`})}),A("g",{...Gi,...B("eye-centre","bottom-left"),children:qr}),Tt]}),Ui=f||(b?sc(b):void 0);if(Ui){let ht=pr(Ln)?hr(Ln,300,"bg-color-template"):null,It=Ut(r,ht?.id??null,nt),Nt=ct("svg",{height:300,viewBox:"0 0 300 300",width:300,xmlns:"http://www.w3.org/2000/svg",children:[A("defs",{children:gc([ht,Lr,kr,Tr,Nr,Or,Dr,Br])}),Jt(300,It),ct("g",{transform:`scale(${x(300/n,6)})`,children:[Vr,jr,ki,A("g",{...Ti,...B("eye-outer","top-left"),children:A("path",{d:Gr,fillRule:"evenodd",transform:E`rotate(0,${$e+Y/2},${Se+Y/2})`})}),A("g",{...Di,...B("eye-centre","top-left"),children:Qr}),A("g",{...Ni,...B("eye-outer","top-right"),children:A("path",{d:Ur,fillRule:"evenodd",transform:E`rotate(0,${we+Y/2},${Ce+Y/2})`})}),A("g",{...Bi,...B("eye-centre","top-right"),children:zr}),A("g",{...Oi,...B("eye-outer","bottom-left"),children:A("path",{d:Hr,fillRule:"evenodd",transform:E`rotate(0,${Me+Y/2},${Re+Y/2})`})}),A("g",{...Gi,...B("eye-centre","bottom-left"),children:qr}),Tt]})]}),Et=300/n,Xr={pixelSize:mt*Et,url:e},zi=Ui.wrapper(Nt,{fgColor:o,bgColor:r,...h||{},...N},Xr),Ou={...zi?.props?.style||{},width:void 0,height:void 0,...D.style};return G(Oe(zi,{...D,width:n,height:n,style:Ou}))}return G(A("svg",{height:n,viewBox:`0 0 ${n} ${n}`,width:n,xmlns:"http://www.w3.org/2000/svg",...D,children:Nu}))}(()=>{try{new Path2D().addPath(new Path2D);}catch{return false}return true})();var $c=(t,e)=>{if(!(Number.isInteger(t)&&Number.isInteger(e))||t<1||e<1||t>16384||e>16384)throw new RangeError(`GIF width and height must be whole numbers from 1 to 16384, got ${t} x ${e}`)},ii=(t,e)=>t>>6*(2-e)&63;function kd(t,e,n){$c(e,n);let i=e*n;if(t.length!==i*4)throw new RangeError(`Expected ${i*4} RGBA bytes for ${e} x ${n}, got ${t.length}`);let r=new Map,o=false,a=false,l=false;for(let g=0;g<i;g++){let _=g*4,y=t[_+3];if(y<128){o=true,a||=y>0;continue}if(a||=y<255,!l){let w=t[_]<<16|t[_+1]<<8|t[_+2];r.has(w)||(r.set(w,r.size),l=r.size>256);}}let s=o?255:256,c=!l&&r.size<=s,u=new Uint8Array(i),m,d,p;if(c){d=[];for(let g of r.keys())d.push(g>>16&255,g>>8&255,g&255);m=r.size,p=(g,_,y)=>r.get(g<<16|_<<8|y);}else {let g=Td(t,i,s);d=g.palette,m=g.palette.length/3,p=(_,y,w)=>g.bucketIndex[Sc(_,y,w)];}let b=o?m:null;for(let g=0;g<i;g++){let _=g*4;t[_+3]<128?u[g]=b:u[g]=p(t[_],t[_+1],t[_+2]);}let f=m+(o?1:0),h=new Uint8Array(f*3);return h.set(d),o&&h.fill(255,m*3),{width:e,height:n,palette:h,indices:u,transparentIndex:b,colors:f,lossless:c&&!a}}var Sc=(t,e,n)=>t>>2<<12|e>>2<<6|n>>2;function Td(t,e,n){let i=new Uint32Array(262144),r=new Float64Array(262144),o=new Float64Array(262144),a=new Float64Array(262144);for(let d=0;d<e;d++){let p=d*4;if(t[p+3]<128)continue;let b=t[p],f=t[p+1],h=t[p+2],g=Sc(b,f,h);i[g]=i[g]+1,r[g]=r[g]+b,o[g]=o[g]+f,a[g]=a[g]+h;}let l=[];for(let d=0;d<262144;d++)i[d]>0&&l.push(d);let s=[{keys:l,pixels:l.reduce((d,p)=>d+i[p],0)}];for(;s.length<n;){let d=-1;for(let $=0;$<s.length;$++){let R=s[$];R.keys.length>1&&(d===-1||R.pixels>s[d].pixels)&&(d=$);}if(d===-1)break;let p=s[d],b=0,f=-1;for(let $ of [0,1,2]){let R=255,M=0;for(let P of p.keys){let v=ii(P,$);R=Math.min(R,v),M=Math.max(M,v);}M-R>f&&(f=M-R,b=$);}let h=[...p.keys].sort(($,R)=>ii($,b)-ii(R,b)||$-R),g=p.pixels/2,_=0,y=1;for(let $=0;$<h.length-1&&(_+=i[h[$]],y=$+1,!(_>=g));$++);let w=h.slice(0,y),C=h.slice(y),S=$=>$.reduce((R,M)=>R+i[M],0);s.splice(d,1,{keys:w,pixels:S(w)},{keys:C,pixels:S(C)});}let c=[];for(let d of s){let p=0,b=0,f=0;for(let h of d.keys)p+=r[h],b+=o[h],f+=a[h];c.push(Math.round(p/d.pixels),Math.round(b/d.pixels),Math.round(f/d.pixels));}let u=new Uint8Array(262144),m=c.length/3;for(let d of l){let p=i[d],b=r[d]/p,f=o[d]/p,h=a[d]/p,g=0,_=Number.POSITIVE_INFINITY;for(let y=0;y<m;y++){let w=b-c[y*3],C=f-c[y*3+1],S=h-c[y*3+2],$=w*w+C*C+S*S;$<_&&(_=$,g=y);}u[d]=g;}return {palette:c,bucketIndex:u}}var Nd=t=>Math.max(1,Math.ceil(Math.log2(t))),br=class{buffer=new Uint8Array(1024);length=0;push(...e){this.ensure(e.length);for(let n of e)this.buffer[this.length++]=n;}u16(e){this.push(e&255,e>>8&255);}ascii(e){for(let n=0;n<e.length;n++)this.push(e.charCodeAt(n));}bytes(e){this.ensure(e.length),this.buffer.set(e,this.length),this.length+=e.length;}ensure(e){if(this.length+e<=this.buffer.length)return;let n=this.buffer.length;for(;n<this.length+e;)n*=2;let i=new Uint8Array(n);i.set(this.buffer.subarray(0,this.length)),this.buffer=i;}result(){return this.buffer.slice(0,this.length)}};function Od(t,e){let n=new br,i=1<<e,r=i+1,o=[],a=0,l=0,s=()=>{o.length>0&&(n.push(o.length,...o),o=[]);},c=f=>{o.push(f),o.length===255&&s();},u=(f,h)=>{for(a|=f<<l,l+=h;l>=8;)c(a&255),a>>>=8,l-=8;},m=new Int32Array(1048576),d=e+1,p=r+1;u(i,d);let b=t[0];for(let f=1;f<t.length;f++){let h=t[f],g=b<<8|h,_=m[g];if(_!==0){b=_-1;continue}u(b,d),p===4096?(u(i,d),m=new Int32Array(1048576),p=r+1,d=e+1):(p>=1<<d&&d++,m[g]=p+1,p++),b=h;}return u(b,d),u(r,d),l>0&&c(a&255),s(),n.result()}function Dd(t){let{width:e,height:n,palette:i,indices:r,transparentIndex:o}=t;$c(e,n);let a=i.length/3;if(!Number.isInteger(a)||a<1||a>256)throw new RangeError(`A GIF palette holds 1 to 256 colors, got ${i.length} bytes`);if(r.length!==e*n)throw new RangeError(`Expected ${e*n} palette indices for ${e} x ${n}, got ${r.length}`);if(o!==null&&!(Number.isInteger(o)&&o>=0&&o<a))throw new RangeError(`The transparent index ${o} isn't in a palette of ${a} colors`);for(let m=0;m<r.length;m++)if(r[m]>=a)throw new RangeError(`Pixel ${m} points at color ${r[m]}, past the palette of ${a}`);let l=Nd(a),s=1<<l,c=Math.max(2,l),u=new br;return u.ascii("GIF89a"),u.u16(e),u.u16(n),u.push(240|l-1,0,0),u.bytes(i),u.bytes(new Uint8Array((s-a)*3)),o!==null&&u.push(33,249,4,1,0,0,o,0),u.push(44),u.u16(0),u.u16(0),u.u16(e),u.u16(n),u.push(0),u.push(c),u.bytes(Od(r,c)),u.push(0),u.push(59),u.result()}function wc(t,e,n){let i=kd(t,e,n);return {file:Dd(i),image:i}}function Cc(t){let{palette:e,indices:n,transparentIndex:i}=t,r=new Uint8ClampedArray(n.length*4);for(let o=0;o<n.length;o++){let a=n[o],l=o*4;r[l]=e[a*3],r[l+1]=e[a*3+1],r[l+2]=e[a*3+2],r[l+3]=a===i?0:255;}return r}var xc="GIF89a";function Mc(t){if(t.length<32)return false;for(let s=0;s<xc.length;s++)if(t[s]!==xc.charCodeAt(s))return false;let e=new DataView(t.buffer,t.byteOffset,t.byteLength),n=e.getUint16(6,true),i=e.getUint16(8,true),r=t[10];if(n<1||i<1||!(r&128))return false;let o=13+3*(1<<(r&7)+1);if(t.length<o)return false;let a=s=>{let c=s;for(;c<t.length;){let u=t[c];if(c+=1,u===0)return c;c+=u;}return -1},l=0;for(;o<t.length;){let s=t[o];if(s===59)return l===1&&o===t.length-1;if(s===33)o=a(o+2);else if(s===44){if(o+10>t.length||e.getUint16(o+5,true)!==n||e.getUint16(o+7,true)!==i||t[o+9]&128)return false;let c=t[o+10];if(c<2||c>8)return false;l+=1,o=a(o+11);}else return false;if(o===-1)return false}return false}var Rn="image/gif",yr=class extends Error{constructor(e){super(e),this.name="GIFScanError";}},_r=255;function Rc(t){let e=new Uint8ClampedArray(t.length);for(let n=0;n<t.length;n+=4){let i=t[n+3];for(let r=0;r<3;r++)e[n+r]=Math.round((t[n+r]*i+_r*(_r-i))/_r);e[n+3]=_r;}return e}function Ec(t,e,n){let i=Uint8ClampedArray.from(e.data),r=t(i,e.width,e.height,{inversionAttempts:"dontInvert"});if(!r)return false;if(r.data===n)return true;try{return new TextDecoder().decode(Uint8Array.from(r.binaryData))===n}catch{return false}}async function Bd(t,e,n){let{width:i,height:r}=t,o=Rc(t.data),a=Rc(e.data);if(e.width===i&&e.height===r&&o.every((c,u)=>c===a[u]))return;let l;try{l=(await import('jsqr')).default;}catch{throw new yr("This design uses more colors than a GIF holds (256), and the reduced image could not be checked because jsqr is not available. Download a PNG instead.")}if(!Ec(l,{data:o,width:i,height:r},n))return;if(!Ec(l,{data:a,width:e.width,height:e.height},n))throw new yr("This design uses more colors than a GIF holds (256), and the reduced image would not scan. Download a PNG instead.")}async function Gd(t,e){let{file:n,image:i}=wc(t.data,t.width,t.height);if(!Mc(n))throw new Error("Could not write a GIF file");return e!==void 0&&!i.lossless&&await Bd(t,{data:Cc(i),width:t.width,height:t.height},e),{file:n,colors:i.colors,lossless:i.lossless}}async function xr(t,e){let n=t.getContext("2d");if(!n)throw new Error("Could not get canvas context");let{data:i}=n.getImageData(0,0,t.width,t.height),{file:r}=await Gd({data:i,width:t.width,height:t.height},e);return new Blob([r],{type:Rn})}var $r=[16,32,48,256],ge="image/vnd.microsoft.icon",pe=256,ai=64,En=6,An=16,Qd=[137,80,78,71,13,10,26,10],Ud=16,Ac=20,zd=32,Pc=t=>t.length>=Ac+4&&Qd.every((e,n)=>t[n]===e),vc=t=>{let e=new DataView(t.buffer,t.byteOffset,t.byteLength);return {width:e.getUint32(Ud),height:e.getUint32(Ac)}};function si(t){if(t.length<1||t.length>ai)throw new RangeError(`An ICO holds 1 to ${ai} images, got ${t.length}`);for(let{width:a,height:l,png:s}of t){let c=m=>Number.isInteger(m)&&m>=1&&m<=pe;if(!(c(a)&&c(l)))throw new RangeError(`ICO images must be whole numbers from 1 to ${pe} px, got ${a} x ${l}`);if(!Pc(s))throw new RangeError("Every ICO image must be a PNG file");let u=vc(s);if(u.width!==a||u.height!==l)throw new RangeError(`An ICO image says ${a} x ${l} but its PNG is ${u.width} x ${u.height}`)}let e=En+An*t.length,n=t.reduce((a,l)=>a+l.png.length,0),i=new Uint8Array(e+n),r=new DataView(i.buffer);r.setUint16(0,0,true),r.setUint16(2,1,true),r.setUint16(4,t.length,true);let o=e;return t.forEach(({width:a,height:l,png:s},c)=>{let u=En+An*c;i[u]=a===pe?0:a,i[u+1]=l===pe?0:l,i[u+2]=0,i[u+3]=0,r.setUint16(u+4,1,true),r.setUint16(u+6,zd,true),r.setUint32(u+8,s.length,true),r.setUint32(u+12,o,true),i.set(s,o),o+=s.length;}),i}function li(t){if(t.length<En+An)return false;let e=new DataView(t.buffer,t.byteOffset,t.byteLength),n=e.getUint16(4,true);if(e.getUint16(0,true)!==0||e.getUint16(2,true)!==1||n<1||n>ai||t.length<En+An*n)return false;for(let i=0;i<n;i++){let r=En+An*i,o=t[r]||pe,a=t[r+1]||pe,l=e.getUint32(r+8,true),s=e.getUint32(r+12,true);if(s+l>t.length)return false;let c=t.subarray(s,s+l);if(!Pc(c))return false;let u=vc(c);if(u.width!==o||u.height!==a)return false}return true}var Ic="data:image/png;base64,";function Hd(t){let e=t.toDataURL("image/png");if(!e.startsWith(Ic))throw new Error("This browser can't write a PNG from a canvas");let n=atob(e.slice(Ic.length)),i=new Uint8Array(n.length);for(let r=0;r<n.length;r++)i[r]=n.charCodeAt(r);return i}function ci(t){let e=si(t.map(n=>({width:n.width,height:n.height,png:Hd(n)})));if(!li(e))throw new Error("Could not write an ICO file");return new Blob([e],{type:ge})}function Fc(t){return ci([t])}var qd=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Wd=new Map([["className","class"],["tabIndex","tabindex"],["dir","dir"],["role","role"],["viewBox","viewBox"],["width","width"],["height","height"],["xlinkActuate","xlink:actuate"],["xlinkArcrole","xlink:arcrole"],["xlinkRole","xlink:role"],["xlinkShow","xlink:show"],["xlinkTitle","xlink:title"],["xlinkType","xlink:type"],["xmlBase","xml:base"],["xmlLang","xml:lang"],["xmlSpace","xml:space"]]),Vd=new Set(["children","dangerouslySetInnerHTML","key","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","ref"]),jd=new Set(["inert","allowFullScreen","async","autoPlay","controls","credentialless","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"]),Xd=new Set(["autoFocus","multiple","muted"]),Zd=new Set(["contentEditable","spellCheck","draggable","value","autoReverse","externalResourcesRequired","focusable","preserveAlpha"]),Yd=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")),Lc=":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",Kd=new RegExp(`^[${Lc}][${Lc}\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Sr=/^[a-zA-Z][a-zA-Z:_.\-\d]*$/,Jd=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i,tf="javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')",ef=t=>Jd.test(t)?tf:t,Tc=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),nf=/["'&<>]/;function ui(t){if(!nf.test(t))return t;let e="",n=0;for(let i=0;i<t.length;i++){let r;switch(t.charCodeAt(i)){case 34:r="&quot;";break;case 38:r="&amp;";break;case 39:r="&#x27;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;default:continue}e+=t.slice(n,i)+r,n=i+1;}return e+t.slice(n)}var zt=t=>typeof t=="function"||typeof t=="symbol",kc=new Map,rf=t=>{let e=kc.get(t);return e===void 0&&(e=t.replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^ms-/,"-ms-"),kc.set(t,e)),e};function of(t){if(typeof t=="string")return t;if(typeof t!="object"||t===null)return "";let e="";for(let n of Object.keys(t)){let i=t[n];if(i==null||typeof i=="boolean"||i==="")continue;let r;if(n.startsWith("--"))r=`${n}:${`${i}`.trim()}`;else {let o=typeof i=="number"?i===0||Yd.has(n)?`${i}`:`${i}px`:`${i}`.trim();r=`${rf(n)}:${o}`;}e=e?`${e};${r}`:r;}return e}function wr(t,e){if(e==null||Vd.has(t))return null;let n=Wd.get(t);if(n!==void 0)return zt(e)||typeof e=="boolean"?null:{name:n,value:`${e}`};switch(t){case "style":{let r=of(e);return r?{name:"style",value:r}:null}case "src":case "href":case "action":case "formAction":case "xlinkHref":return (t==="src"||t==="href")&&e===""||zt(e)||typeof e=="boolean"?null:{name:t==="xlinkHref"?"xlink:href":t,value:ef(`${e}`)};case "capture":case "download":return e===true?{name:t,value:""}:e===false||zt(e)?null:{name:t,value:`${e}`};case "cols":case "rows":case "size":case "span":return zt(e)||Number.isNaN(Number(e))||!(e>=1)?null:{name:t,value:`${e}`};case "rowSpan":case "start":return zt(e)||Number.isNaN(Number(e))?null:{name:t,value:`${e}`};}if(Xd.has(t))return e&&!zt(e)?{name:t.toLowerCase(),value:""}:null;if(Zd.has(t))return zt(e)?null:{name:t,value:`${e}`};if(jd.has(t))return e&&!zt(e)?{name:t,value:""}:null;if(t.length>2&&(t[0]==="o"||t[0]==="O")&&(t[1]==="n"||t[1]==="N"))return null;let i=qd.get(t)??t;if(!Kd.test(i)||zt(e))return null;if(typeof e=="boolean"){let r=i.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-")return null}return {name:i,value:`${e}`}}var Nc="http://www.w3.org/2000/svg",Oc="http://www.w3.org/1999/xhtml",af="http://www.w3.org/1999/xlink",sf="http://www.w3.org/XML/1998/namespace",lf="http://www.w3.org/2000/xmlns/";function cf(t,e,n){e==="xmlns"||e.startsWith("xmlns:")?t.setAttributeNS(lf,e,n):e.startsWith("xlink:")?t.setAttributeNS(af,e,n):e.startsWith("xml:")?t.setAttributeNS(sf,e,n):t.setAttribute(e,n);}function Pn(t,e,n,i){if(e==null||typeof e=="boolean")return;if(typeof e=="string"||typeof e=="number"||typeof e=="bigint"){t.appendChild(i.createTextNode(`${e}`));return}if(Array.isArray(e)){for(let s of e)Pn(t,s,n,i);return}if(!Wn(e))throw new TypeError("qrdx: can't render this value as DOM nodes");let{type:r,props:o}=e;if(Vn(r)){Pn(t,o.children,n,i);return}if(typeof r=="function"){Pn(t,r(o),n,i);return}if(!Sr.test(r))throw new TypeError(`qrdx: invalid element name: ${r}`);let a=r==="svg"?Nc:n,l=i.createElementNS(a,r);for(let s of Object.keys(o)){let c=wr(s,o[s]);c&&cf(l,c.name,c.value);}Pn(l,o.children,a===Nc&&r==="foreignObject"?Oc:a,i),t.appendChild(l);}function mi(t,e=document){let n=e.createDocumentFragment();return Pn(n,t,Oc,e),n}function vt(t){if(t==null||typeof t=="boolean")return "";if(typeof t=="string")return ui(t);if(typeof t=="number"||typeof t=="bigint")return `${t}`;if(Array.isArray(t)){let e="";for(let n of t)e+=vt(n);return e}if(!Wn(t))throw new TypeError("qrdx: can't render this value as SVG markup");return uf(t)}function uf(t){let{type:e,props:n}=t;if(Vn(e))return vt(n.children);if(typeof e=="function")return vt(e(n));if(!Sr.test(e))throw new TypeError(`qrdx: invalid element name: ${e}`);let i=`<${e}`;for(let a of Object.keys(n)){let l=wr(a,n[a]);l&&(i+=` ${l.name}="${ui(l.value)}"`);}if(Tc.has(e))return `${i}/>`;let r=n.dangerouslySetInnerHTML?.__html,o=r==null?vt(n.children):`${r}`;return `${i}>${o}</${e}>`}function Dc(t){return vt(Ye(t))}var di=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],mf=8,fi=class{buffer;position=0;bits=0;used=0;constructor(e){this.buffer=new Uint8Array(Math.max(e,64));}write(e,n){if(n!==0)for(this.bits|=e<<this.used,this.used+=n;this.used>=8;){if(this.position===this.buffer.length){let i=new Uint8Array(this.buffer.length*2);i.set(this.buffer),this.buffer=i;}this.buffer[this.position++]=this.bits&255,this.bits>>>=8,this.used-=8;}}finish(){return this.used>0&&this.write(0,8-this.used),this.buffer.subarray(0,this.position)}};function Hc(t,e){let n=new Uint8Array(t.length),i=[];for(let c=0;c<t.length;c++)(t[c]??0)>0&&i.push(c);if(i.length===0)return n;if(i.length===1)return n[i[0]]=1,n;let r=i.length,o=2*r-1,a=new Float64Array(o),l=new Int32Array(o),s=new Uint8Array(o);for(let c=1;;c*=2){for(let f=0;f<r;f++)a[f]=Math.max(t[i[f]]??0,c);let u=Array.from({length:r},(f,h)=>h).sort((f,h)=>a[f]-a[h]||f-h),m=0,d=r,p=f=>m<r&&(d>=f||a[u[m]]<=a[d])?u[m++]:d++;for(let f=r;f<o;f++){let h=p(f),g=p(f);a[f]=a[h]+a[g],l[h]=f,l[g]=f;}s[o-1]=0;let b=0;for(let f=o-2;f>=0;f--){let h=s[l[f]]+1;s[f]=h,f<r&&h>b&&(b=h);}if(b<=e){for(let f=0;f<r;f++)n[i[f]]=s[f];return n}}}function df(t,e){let n=0;for(let i=0;i<e;i++)n=n<<1|t>>i&1;return n}function qc(t){let e=new Uint16Array(16),n=0;for(let l of t)l>0&&(e[l]=e[l]+1,n++);let i=new Uint16Array(16),r=0;for(let l=1;l<=15;l++)r=r+e[l-1]<<1,i[l]=r;let o=new Uint16Array(t.length),a=new Uint8Array(t.length);return t.forEach((l,s)=>{if(l===0)return;let c=i[l];i[l]=c+1,o[s]=df(c,l),a[s]=n===1?0:l;}),{lengths:t,codes:o,emitted:a}}function be(t,e,n){t.write(e.codes[n],e.emitted[n]);}function ff(t){let e=[],n=o=>e.push({code:o,extra:0,extraBits:0}),i=mf,r=0;for(;r<t.length;){let o=t[r],a=1;for(;r+a<t.length&&t[r+a]===o;)a++;r+=a;let l=a;if(o===0){for(;l>0;)if(l<3)for(;l>0;l--)n(0);else if(l<=10)e.push({code:17,extra:l-3,extraBits:3}),l=0;else {let s=Math.min(l,138);e.push({code:18,extra:s-11,extraBits:7}),l-=s;}continue}for(o!==i&&(n(o),i=o,l--);l>0;)if(l<3)for(;l>0;l--)n(o);else {let s=Math.min(l,6);e.push({code:16,extra:s-3,extraBits:2}),l-=s;}}return e}function hf(t,e){let n=[];if(e.forEach((l,s)=>{l>0&&n.push(s);}),n.length<=2&&n.every(l=>l<256)){let[l=0,s]=n;t.write(1,1),t.write(n.length===2?1:0,1),l<2?(t.write(0,1),t.write(l,1)):(t.write(1,1),t.write(l,8)),s!==void 0&&t.write(s,8);return}let i=ff(e),r=new Uint32Array(19);for(let l of i)r[l.code]=r[l.code]+1;let o=qc(Hc(r,7)),a=di.length;for(;a>4&&o.lengths[di[a-1]]===0;)a--;t.write(0,1),t.write(a-4,4);for(let l=0;l<a;l++)t.write(o.lengths[di[l]],3);t.write(0,1);for(let l of i)be(t,o,l.code),t.write(l.extra,l.extraBits);}function Cr(t){let e=t-1;if(e<4)return {symbol:e,extra:0,extraBits:0};let n=31-Math.clz32(e),i=e>>n-1&1,r=n-1;return {symbol:2*n+i,extra:e&(1<<r)-1,extraBits:r}}function Bc(t,e,n,i){let r=0;for(;r<i&&t[e+r]===t[e+r-n];)r++;return r}function Gc(t,e,n){let i=t.length,r=0;for(;r<i;){let o=Math.min(4096,i-r),a=r>=1?Bc(t,r,1,o):0,l=r>=e?Bc(t,r,e,o):0;if(Math.max(a,l)>=3){l>=a?(n.copy(l,e===1?2:1),r+=l):(n.copy(a,2),r+=a);continue}n.literal(t[r]),r++;}}var Qc=20;function Uc(t,e,n){for(let i=0;i<n.length;i++)t[e+i]=n.charCodeAt(i);}function zc(t,e,n){t[e]=n&255,t[e+1]=n>>>8&255,t[e+2]=n>>>16&255,t[e+3]=n>>>24&255;}function Wc(t,e,n){if(!(Number.isInteger(e)&&Number.isInteger(n))||e<1||n<1||e>16384||n>16384)throw new RangeError(`WebP images are 1 to 16384 pixels wide and high (got ${e} \xD7 ${n})`);let i=e*n;if(t.length<i*4)throw new RangeError(`Expected ${i*4} bytes of RGBA for ${e} \xD7 ${n}, got ${t.length}`);let r=new Uint32Array(i),o=false;for(let C=0;C<i;C++){let S=C*4,$=t[S],R=t[S+1],M=t[S+2],P=t[S+3];P!==255&&(o=true),r[C]=(P<<24|($-R&255)<<16|R<<8|M-R&255)>>>0;}let a=new Uint32Array(280),l=new Uint32Array(256),s=new Uint32Array(256),c=new Uint32Array(256),u=new Uint32Array(40);Gc(r,e,{literal(C){a[C>>>8&255]++,l[C>>>16&255]++,s[C&255]++,c[C>>>24]++;},copy(C,S){a[256+Cr(C).symbol]++,u[Cr(S).symbol]++;}});let m=[a,l,s,c,u].map(C=>Hc(C,15)),[d,p,b,f,h]=m.map(qc),g=new fi(Math.ceil(i/4)+1024);g.write(47,8),g.write(e-1,14),g.write(n-1,14),g.write(o?1:0,1),g.write(0,3),g.write(1,1),g.write(2,2),g.write(0,1),g.write(0,1),g.write(0,1);for(let C of m)hf(g,C);Gc(r,e,{literal(C){be(g,d,C>>>8&255),be(g,p,C>>>16&255),be(g,b,C&255),be(g,f,C>>>24);},copy(C,S){let $=Cr(C);be(g,d,256+$.symbol),g.write($.extra,$.extraBits);let R=Cr(S);be(g,h,R.symbol),g.write(R.extra,R.extraBits);}});let _=g.finish(),y=_.length+(_.length&1),w=new Uint8Array(Qc+y);return Uc(w,0,"RIFF"),zc(w,4,w.length-8),Uc(w,8,"WEBPVP8L"),zc(w,16,_.length),w.set(_,Qc),w}function hi(t,e,n){return String.fromCharCode(...t.subarray(e,e+n))}function pf(t){return t.length>=12&&hi(t,0,4)==="RIFF"&&hi(t,8,4)==="WEBP"}function Vc(t){if(!pf(t))return null;let e=12;for(;e+8<=t.length;){let n=hi(t,e,4);if(n==="VP8L")return "lossless";if(n==="VP8 ")return "lossy";let i=(t[e+4]|t[e+5]<<8|t[e+6]<<16|t[e+7]<<24)>>>0;e+=8+i+(i&1);}return null}function gf(t,e,n){return typeof t.toBlob!="function"?Promise.resolve(null):new Promise(i=>{try{t.toBlob(i,e,n);}catch{i(null);}})}async function Mr(t,e={}){let n=e.quality!==void 0,i=n?Math.min(1,Math.max(0,Number(e.quality))):1,r=await gf(t,"image/webp",i);if(r){let s=new Uint8Array(await r.arrayBuffer()),c=Vc(s);if(c==="lossless"||n&&c==="lossy")return new Blob([s],{type:"image/webp"})}let o=t.getContext("2d");if(!o)throw new Error("Could not get canvas context");let{data:a}=o.getImageData(0,0,t.width,t.height),l=Wc(a,t.width,t.height);return new Blob([l],{type:"image/webp"})}var jc=32768;async function $t(t){let e=new Uint8Array(await t.arrayBuffer()),n="";for(let i=0;i<e.length;i+=jc)n+=String.fromCharCode(...e.subarray(i,i+jc));return `data:${t.type||"application/octet-stream"};base64,${btoa(n)}`}async function _e(t){let e={...t};if(t.imageSettings?.src)try{let u=await bf(t.imageSettings.src);e={...t,imageSettings:{...t.imageSettings,src:u}};}catch{let{imageSettings:u,...m}=t;e=m;}let{hideLogo:n,url:i,logo:r,scale:o,frameLabelMarkers:a,partMarkers:l,...s}=e,c=Dc({...s,templateId:e.templateId,customTemplate:e.customTemplate});return `data:image/svg+xml,${encodeURIComponent(c)}`}var bf=t=>new Promise((e,n)=>{if(t.startsWith("data:")){e(t);return}let i=new Image;i.crossOrigin="anonymous",i.onload=()=>{try{let r=document.createElement("canvas");r.width=i.naturalWidth||i.width,r.height=i.naturalHeight||i.height;let o=r.getContext("2d");if(!o){n(new Error("Could not get canvas context"));return}o.drawImage(i,0,0);let a=r.toDataURL("image/png");r.remove(),e(a);}catch(r){n(new Error(`Failed to convert image to base64: ${r}`));}},i.onerror=()=>{n(new Error(`Could not load image from ${t.slice(0,100)}... Check CORS settings or use a data URL.`));},i.src=t;});async function ye(t,e,n){let i=await _e(t),r=decodeURIComponent(i.replace("data:image/svg+xml,","")),o;try{let a=new TextEncoder().encode(r),l=Array.from(a,c=>String.fromCharCode(c)).join("");o=`data:image/svg+xml;base64,${btoa(l)}`;}catch(a){throw new Error(`Failed to encode SVG for canvas conversion: ${a}`)}return new Promise((a,l)=>{let s=document.createElement("canvas"),c=s.getContext("2d");if(!c){l(new Error("Could not get canvas context"));return}let u=new Image,{width:m,height:d}=xn(t.size||xt,t.frame);s.width=Math.round(m),s.height=Math.round(d);let p=setTimeout(()=>{s.remove(),l(new Error("SVG load timeout - image may be too large or contain invalid data"));},3e4);u.onload=()=>{clearTimeout(p);try{if(e==="image/jpeg"&&(c.fillStyle="white",c.fillRect(0,0,s.width,s.height)),c.drawImage(u,0,0,s.width,s.height),n)a(s);else if(e==="image/webp")Mr(s).then($t).then(a,l).finally(()=>s.remove());else if(e==="image/bmp")$t(Zn(s)).then(a,l).finally(()=>s.remove());else if(e===Rn)xr(s,t.value).then($t).then(a,l).finally(()=>s.remove());else if(e===ge||e==="image/x-icon")$t(Fc(s)).then(a,l).finally(()=>s.remove());else {let b=s.toDataURL(e,1);s.remove(),a(b);}}catch(b){clearTimeout(p),s.remove(),l(new Error(`Failed to draw SVG to canvas: ${b}`));}},u.onerror=()=>{clearTimeout(p),s.remove(),l(new Error("Could not load SVG"));},u.src=o;})}var Xc=["gradientUnits","gradientTransform","spreadMethod"],_f={linear:["x1","y1","x2","y2"],radial:["cx","cy","r","fx","fy","fr"]},yf={r:0,g:0,b:0,a:1};function Zc(t,e){for(let n of (t.attrs.style??"").split(";")){let[i,...r]=n.split(":");if(i?.trim()===e)return r.join(":").trim()}return t.attrs[e]}function pi(t){return t.name==="linearGradient"?"linear":t.name==="radialGradient"?"radial":null}function xf(t){let e=[],n=0;for(let i of t.children){if(i.name!=="stop")continue;let r=(i.attrs.offset??"0").trim(),o=Number.parseFloat(r),a=Number.isFinite(o)?r.endsWith("%")?o/100:o:0;n=Math.max(n,Math.min(Math.max(a,0),1));let l=Zc(i,"stop-color")??"#000000",s=it(l==="currentColor"?"#000000":l)??yf,c=Number.parseFloat(Zc(i,"stop-opacity")??"1");e.push({offset:n,color:Number.isFinite(c)?{...s,a:s.a*Math.min(Math.max(c,0),1)}:s});}return e}function Kc(t){let e=new Map,n=r=>{let o=r.attrs.id;pi(r)&&o&&!e.has(o)&&e.set(o,r);for(let a of r.children)n(a);};n(t);let i=new Map;for(let[r,o]of e){let a=pi(o),l={},s=[],c=new Set,u=o;for(;u&&!c.has(u);){c.add(u);let m=pi(u)===a?[...Xc,..._f[a]]:Xc;for(let p of m){let b=u.attrs[p];l[p]===void 0&&b!==void 0&&(l[p]=b);}s.length===0&&(s=xf(u));let d=u.attrs.href??u.attrs["xlink:href"];u=d?.startsWith("#")?e.get(d.slice(1)):void 0;}i.set(r,{kind:a,attrs:l,stops:s});}return i}function gi(t){let e=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY,o=(m,d)=>{e=Math.min(e,m),i=Math.max(i,m),n=Math.min(n,d),r=Math.max(r,d);},a=(m,d,p,b)=>{let f=-m+3*d-3*p+b,h=2*(m-2*d+p),g=d-m;if(Math.abs(f)<1e-12)return Math.abs(h)<1e-12?[]:[-g/h];let _=h*h-4*f*g;if(_<0)return [];let y=Math.sqrt(_);return [(-h+y)/(2*f),(-h-y)/(2*f)]},l=(m,d,p,b,f)=>{let h=1-m;return h*h*h*d+3*h*h*m*p+3*h*m*m*b+m**3*f},s=0,c=0,u=[0,0];for(let m of t)if(m.op==="M"&&(u=[m.x,m.y]),m.op==="M"||m.op==="L")o(m.x,m.y),s=m.x,c=m.y;else if(m.op==="C"){o(m.x,m.y);for(let d of [...a(s,m.x1,m.x2,m.x),...a(c,m.y1,m.y2,m.y)])d>0&&d<1&&o(l(d,s,m.x1,m.x2,m.x),l(d,c,m.y1,m.y2,m.y));s=m.x,c=m.y;}else [s,c]=u;return Number.isFinite(e)?{x:e,y:n,width:i-e,height:r-n}:null}var $f=t=>t[0]*t[3]-t[1]*t[2];function Ke(t){let e=$f(t);if(!Number.isFinite(e)||Math.abs(e)<1e-12)return null;let[n,i,r,o,a,l]=t;return [o/e,-i/e,-r/e,n/e,(r*l-o*a)/e,(i*a-n*l)/e]}function Jc(t,e,n){let{kind:i,attrs:r,stops:o}=t,a=o[0],l=o.at(-1);if(!(a&&l)||o.every(S=>S.color.a===0))return null;if(o.length===1)return a.color;let s=r.gradientUnits==="userSpaceOnUse",c=On;if(!s){let S=gi(e);if(!S||S.width<=0||S.height<=0)return null;c=[S.width,0,0,S.height,S.x,S.y];}let u=pt(c,ne(r.gradientTransform));if(!Ke(u))return l.color;let[m,d]=n,p=Math.sqrt((m*m+d*d)/2),b=(S,$)=>{let R=Number.parseFloat(S);return Number.isFinite(R)?S.trim().endsWith("%")?R/100*(s?$:1):R:null},f=(S,$,R)=>b(r[S]??$,R)??b($,R)??0;if(i==="linear"){let S=[f("x1","0%",m),f("y1","0%",d),f("x2","100%",m),f("y2","0%",d)],[$,R,M,P]=S;return $===M&&R===P?l.color:{kind:i,coords:S,matrix:u,stops:o}}let h=f("cx","50%",m),g=f("cy","50%",d),_=f("r","50%",p),y=r.fx===void 0?h:f("fx","50%",m),w=r.fy===void 0?g:f("fy","50%",d),C=Math.max(0,f("fr","0%",p));return _<0?null:_===0?l.color:{kind:i,coords:[y,w,C,h,g,_],matrix:u,stops:o}}function tu(t){return t.map(e=>x(e,6)).join(" ")}function Sf(t,e){return (e==="cmyk"?cn(t.r,t.g,t.b):[t.r/255,t.g/255,t.b/255]).map(i=>x(i,4)).join(" ")}var Yc=(t,e)=>`<< /FunctionType 2 /Domain [0 1] /C0 [${t}] /C1 [${e}] /N 1 >>`;function wf(t,e){let n=[],i=t.map(l=>Q(l.offset,4)),r=t.map(l=>Sf(l.color,e)),o=i[0],a=i.at(-1);if(o>0){let l=r[0];n.push({from:0,to:o,c0:l,c1:l});}for(let l=0;l+1<t.length;l++){let s=i[l],c=i[l+1];c>s&&n.push({from:s,to:c,c0:r[l],c1:r[l+1]});}if(a<1){let l=r.at(-1);n.push({from:a,to:1,c0:l,c1:l});}if(n.length===1){let[l]=n;return Yc(l.c0,l.c1)}return ["<< /FunctionType 3 /Domain [0 1]",`/Functions [${n.map(l=>Yc(l.c0,l.c1)).join(" ")}]`,`/Bounds [${n.slice(1).map(l=>x(l.from,4)).join(" ")}]`,`/Encode [${n.map(()=>"0 1").join(" ")}] >>`].join(" ")}function eu(t,e){return [`<< /ShadingType ${t.kind==="linear"?2:3}`,`/ColorSpace /Device${e==="cmyk"?"CMYK":"RGB"}`,`/Coords [${t.coords.map(n=>x(n,6)).join(" ")}]`,`/Function ${wf(t.stops,e)}`,"/Extend [true true] >>"].join(" ")}function Cf(t,e){if(t.op==="Z")return t;if(t.op==="C"){let[r,o]=rt(e,t.x1,t.y1),[a,l]=rt(e,t.x2,t.y2),[s,c]=rt(e,t.x,t.y);return {op:"C",x1:r,y1:o,x2:a,y2:l,x:s,y:c}}let[n,i]=rt(e,t.x,t.y);return {op:t.op,x:n,y:i}}function ru(t){let e={round:1,bevel:2}[t.strokeLinejoin?.trim()??""],n={round:1,square:2}[t.strokeLinecap?.trim()??""];return {join:e??0,cap:n??0}}var nu={r:255,g:255,b:255,a:1},Mf=/^url\(\s*#bg-color-/,Rr=/^url\(\s*#([^)\s]+)\s*\)/,Rf=new Set(["defs","clipPath","mask","pattern","linearGradient","radialGradient","symbol","title","desc","metadata","style","script","use","foreignObject"]);function tt(t,e){let n=t.attrs.style;if(n)for(let i of n.split(";")){let[r,...o]=i.split(":");if(r?.trim()===e)return o.join(":").trim()}return t.attrs[e]}function Z(t,e,n=0){if(t===void 0||t==="")return n;let i=Number.parseFloat(t);return Number.isNaN(i)?n:t.trim().endsWith("%")?i/100*e:i}function bi(t,e){if((t.name==="linearGradient"||t.name==="radialGradient")&&t.attrs.id){let n=t.children.find(r=>r.name==="stop"),i=n&&(tt(n,"stop-color")??"#000000");i&&e.set(t.attrs.id,i);}for(let n of t.children)bi(n,e);return e}function _i(t,e){if(t.name==="image"){let n=t.attrs.href??t.attrs["xlink:href"];n&&e.add(n);}for(let n of t.children)_i(n,e);return e}async function ou(t){return typeof document>"u"||typeof Image>"u"?null:await new Promise(e=>{let n=new Image;n.crossOrigin="anonymous",n.onload=()=>{let i=document.createElement("canvas"),r=Math.max(n.naturalWidth||512,n.naturalHeight||512),o=Math.min(1024/r,4);i.width=Math.round((n.naturalWidth||512)*o),i.height=Math.round((n.naturalHeight||512)*o);let a=i.getContext("2d");if(!a){e(null);return}a.drawImage(n,0,0,i.width,i.height);try{e(i.toDataURL("image/png"));}catch{e(null);}},n.onerror=()=>e(null),n.src=t;})}function iu(t,e){t.name==="clipPath"&&t.attrs.id&&e.set(t.attrs.id,t);for(let n of t.children)iu(n,e);return e}function au(t,e){t.name==="pattern"&&t.attrs.id&&e.set(t.attrs.id,t);for(let n of t.children)au(n,e);return e}function Ef(t,e){let[n,i]=e,r=(o,a)=>Z(t.attrs[o],a);switch(t.name){case "path":return re(t.attrs.d??"");case "rect":{let o=t.attrs.rx??t.attrs.ry,a=t.attrs.ry??t.attrs.rx;return Ne(r("x",n),r("y",i),r("width",n),r("height",i),Z(o,n),Z(a,i))}case "circle":{let o=r("r",Math.hypot(n,i)/Math.SQRT2);return an(r("cx",n),r("cy",i),o,o)}case "ellipse":return an(r("cx",n),r("cy",i),r("rx",n),r("ry",i));default:return []}}var Er=class{gradients;shadings;clipPaths=new Map;patterns=new Map;backdrop=nu;paper=nu;background=null;onPaper=false;inConic=false;constructor(e,n=null){this.gradients=e,this.shadings=n;}resolveColor(e){if(!e||e==="none")return null;let n=Rr.exec(e);if(n)return this.resolveColor(this.gradients.get(n[1]));let i=it(e==="currentColor"?"#000000":e);return i&&i.a>0?i:null}shadedGradient(e){let n=e?Rr.exec(e)?.[1]:void 0;return n?this.shadings?.get(n):void 0}resolveFill(e,n,i,r=1){if(r<=0)return null;let o=this.patternOf(e);if(o)return {pattern:o,alpha:r};let a=this.shadedGradient(e);if(a){let c=Jc(a,n,i);if(!c)return null;if("coords"in c)return {gradient:c,alpha:r};let u={...c,a:c.a*r};return u.a>0?{color:u}:null}let l=this.resolveColor(e);if(!l)return null;let s={...l,a:l.a*r};return s.a>0?{color:s}:null}patternOf(e){let n=e?Rr.exec(e)?.[1]:void 0,i=n?this.patterns.get(n):void 0;if(!(i?.attrs.patternUnits!=="userSpaceOnUse"||(i.attrs.patternContentUnits??"userSpaceOnUse")!=="userSpaceOnUse"||i.attrs.viewBox))return i}flatten(e){if(e.a>=1)return e;let n=this.background,i=n!==null&&Math.abs(n.r-e.r)<.5&&Math.abs(n.g-e.g)<.5&&Math.abs(n.b-e.b)<.5&&Math.abs(n.a-e.a)<.002;return fr(e,this.onPaper||i?this.paper:this.backdrop)}paintPattern(e,n,i,r){let o=gi(e);if(!o||o.width<=0||o.height<=0)return true;let[a,l]=n.viewport,s=Z(i.attrs.x,a),c=Z(i.attrs.y,l),u=Z(i.attrs.width,a),m=Z(i.attrs.height,l);if(!(u>0&&m>0))return true;let d=ne(i.attrs.patternTransform),p=Ke(d);if(!p)return true;if(!this.beginClip(e,n.matrix,n.fillRule==="evenodd"))return false;let b=this.inConic;this.inConic=i.attrs["data-qrdx-conic"]!==void 0;try{let f=[rt(p,o.x,o.y),rt(p,o.x+o.width,o.y),rt(p,o.x,o.y+o.height),rt(p,o.x+o.width,o.y+o.height)],h=f.map(([F])=>F),g=f.map(([,F])=>F),_=Math.min(...h),y=Math.max(...h),w=Math.min(...g),C=Math.max(...g),S=Math.floor((_-s)/u),$=Math.ceil((y-s)/u)-1,R=Math.floor((w-c)/m),M=Math.ceil((C-c)/m)-1,P=($-S+1)*(M-R+1);if(P>4096)return !0;let v=(i.attrs["data-qrdx-conic"]??"").trim().split(/\s+/).map(Number),I=pt(n.matrix,d);for(let F=R;F<=M;F++)for(let T=S;T<=$;T++){let N=s+T*u,L=c+F*m,V=pt(I,[1,0,0,1,N,L]),D={x:_-N,y:w-L,width:y-_,height:C-w},G=v.length===2&&v.every(Number.isFinite)?hc(v[0],v[1],D):null,U=P>1&&this.beginClip([{op:"M",x:0,y:0},{op:"L",x:u,y:0},{op:"L",x:u,y:m},{op:"L",x:0,y:m},{op:"Z"}],V,!1);try{let et={matrix:V,viewport:n.viewport,fill:"#000000",fillRule:"nonzero",stroke:"none",strokeWidth:1,fontSize:16,fontWeight:"normal",textAnchor:"start",fillOpacity:1,opacity:r},K=(j,Rt)=>{for(let B of j){if(B.name==="g"&&!B.attrs.transform){let yt=Number.parseFloat(B.attrs.opacity??"1");K(B.children,{...Rt,opacity:(Rt.opacity??1)*(Number.isFinite(yt)?yt:1)});continue}if(G&&B.attrs["data-arc"]){let[yt,Jt]=B.attrs["data-arc"].split(/\s+/).map(Number);if(!pc([yt,yt+Jt],G))continue}this.walk(B,Rt);}};K(i.children,et);}finally{U&&this.endClip();}}}finally{this.inConic=b,this.endClip();}return true}paintBleed(e,n,i,r){if(!this.shadedGradient(i))return false;let[o,a]=this.viewportMatrix({...e,attrs:{...e.attrs,x:"0",y:"0"}},{...n,matrix:pt(n.matrix,ne(e.attrs.transform))}),l=Ke(o);if(!l)return false;let[s,c,u,m]=r,p=[[s,c],[u,c],[u,m],[s,m]].map(([b,f])=>rt(l,b,f)).map(([b,f],h)=>({op:h===0?"M":"L",x:b,y:f}));return p.push({op:"Z"}),this.paint(p,{name:"rect",attrs:{},children:[],text:""},{...n,matrix:o,viewport:a,fill:i,fillRule:"nonzero",stroke:"none"}),true}beginClip(e,n,i){return false}endClip(){}clipOf(e,n){let i=tt(e,"clip-path"),r=i?Rr.exec(i)?.[1]:void 0,o=r?this.clipPaths.get(r):void 0;if(!o)return null;let a=[],l=false;for(let s of o.children){let c=Ef(s,n.viewport);if(c.length===0)continue;let u=ne(s.attrs.transform),m=u[0]===1&&u[1]===0&&u[2]===0&&u[3]===1&&u[4]===0&&u[5]===0;a.push(...m?c:c.map(d=>Cf(d,u))),l||=tt(s,"clip-rule")==="evenodd";}return a.length>0?{segments:a,matrix:n.matrix,evenOdd:l}:null}viewportMatrix(e,n){let i=Z(e.attrs.x,n.viewport[0]),r=Z(e.attrs.y,n.viewport[1]),o=Z(e.attrs.width,n.viewport[0],n.viewport[0]),a=Z(e.attrs.height,n.viewport[1],n.viewport[1]),l=Gn(e.attrs.viewBox);if(l.length!==4||!(l[2]&&l[3]))return [pt(n.matrix,[1,0,0,1,i,r]),[o,a]];let[s,c,u,m]=l,d=o/u,p=a/m,b=i,f=r;if((e.attrs.preserveAspectRatio??"").trim()!=="none"){let h=e.attrs.preserveAspectRatio?.includes("slice")?Math.max(d,p):Math.min(d,p);b+=(o-u*h)/2,f+=(a-m*h)/2,d=h,p=h;}return [pt(n.matrix,[d,0,0,p,b-s*d,f-c*p]),[u,m]]}walk(e,n,i=false){if(i&&(this.clipPaths=iu(e,new Map),this.patterns=au(e,new Map)),Rf.has(e.name)||tt(e,"display")==="none"||tt(e,"visibility")==="hidden")return;let r=pt(n.matrix,ne(e.attrs.transform)),o=n.viewport;if(e.name==="svg"){let[d,p]=this.viewportMatrix(i?{...e,attrs:{...e.attrs,x:"0",y:"0"}}:e,{...n,matrix:r});r=d,o=p;}let a=tt(e,"font-size"),l=Number.parseFloat(tt(e,"opacity")??"1"),s=tt(e,"fill-opacity"),c=s===void 0?n.fillOpacity??1:Number.parseFloat(s),u={fillOpacity:Number.isFinite(c)?Math.min(Math.max(c,0),1):1,opacity:(n.opacity??1)*(Number.isFinite(l)?Math.min(Math.max(l,0),1):1),matrix:r,viewport:o,fill:tt(e,"fill")??n.fill,fillRule:tt(e,"fill-rule")??n.fillRule,stroke:tt(e,"stroke")??n.stroke,strokeWidth:tt(e,"stroke-width")===void 0?n.strokeWidth:Z(tt(e,"stroke-width"),o[0],1),strokeLinejoin:tt(e,"stroke-linejoin")??n.strokeLinejoin,strokeLinecap:tt(e,"stroke-linecap")??n.strokeLinecap,fontSize:a===void 0?n.fontSize:Z(a,16,16),fontWeight:tt(e,"font-weight")??n.fontWeight,textAnchor:tt(e,"text-anchor")??n.textAnchor},m=this.onPaper;(e.name==="rect"||e.name==="circle"||e.name==="path")&&Mf.test(tt(e,"fill")??"")&&(this.onPaper=true);try{let d=e.attrs["clip-path"]?this.clipOf(e,u):null;if(d&&this.beginClip(d.segments,d.matrix,d.evenOdd)){try{this.paintNode(e,u);}finally{this.endClip();}return}this.paintNode(e,u);}finally{this.onPaper=m;}}paintNode(e,n){let[i,r]=n.viewport,o=(a,l)=>Z(e.attrs[a],l);switch(e.name){case "path":this.paint(re(e.attrs.d??""),e,n);return;case "rect":{let a=e.attrs.rx??e.attrs.ry,l=e.attrs.ry??e.attrs.rx;this.paint(Ne(o("x",i),o("y",r),o("width",i),o("height",r),Z(a,i),Z(l,r)),e,n);return}case "circle":{let a=o("r",Math.hypot(i,r)/Math.SQRT2);this.paint(an(o("cx",i),o("cy",r),a,a),e,n);return}case "ellipse":this.paint(an(o("cx",i),o("cy",r),o("rx",i),o("ry",r)),e,n);return;case "line":this.paint([{op:"M",x:o("x1",i),y:o("y1",r)},{op:"L",x:o("x2",i),y:o("y2",r)}],e,{...n,fill:"none"});return;case "polygon":case "polyline":{let a=Gn(e.attrs.points),l=[];for(let s=0;s+1<a.length;s+=2)l.push({op:s===0?"M":"L",x:a[s],y:a[s+1]});e.name==="polygon"&&l.length>0&&l.push({op:"Z"}),this.paint(l,e,n);return}case "text":this.text(e,n);return;case "image":this.image(e,n);return;default:for(let a of e.children)this.walk(a,n);}}};var Ar=1e3;async function yi(t){let e=await _e(vn({...t,size:t.size??xt},Ar));return decodeURIComponent(e.replace("data:image/svg+xml,",""))}function xi(t){if(Zt(t.frame)){let e=We(Ar,t.frame);return e.squareEdges?e.color:null}if(t.backdrop&&t.bgRadius){let e=dt.QrCode.encodeText(t.value,St[fe(t)]).size,n=Pt(e,t.margin??Ht,t.shape);if(dr(t.bgRadius,e,n,t.shape)>0)return ut(t.backdrop,nt)}return ut(t.bgColor,nt)}function $i(t,e){let n=xi(t);if(!(n&&ke(t.bgColor))||Zt(t.frame)||t.templateId||t.customTemplate)return n;let i=Bn(e)?.children.find(o=>o.name==="rect"),r=i&&tt(i,"fill");return r?.startsWith("url(")?r:n}function Si(t,e){let n={r:255,g:255,b:255,a:1},i=it(ut(e.bgColor,nt));t.paper=n,t.background=i&&!ke(e.bgColor)?i:null,t.backdrop=i?fr(i,n):n;}var cu=25.4,su=5,lu=2e3,Pr=Ar,Af=5,Pf=2;function vf(t,e="mm"){return e==="in"?t*cu:t}function If(t){let e=fe(t),n=dt.QrCode.encodeText(t.value,St[e]).size;return n+Pt(n,t.margin??Ht,t.shape)*2}function uu(t,e){let n=vf(e.size,e.unit);if(!Number.isFinite(n)||n<su||n>lu)throw new Error(`Print size must be between ${su} mm and ${lu/1e3} m`);let i=Math.min(Math.max(e.bleed??0,0),20),r=n/Pr,o=Zt(t.frame)?We(Pr,t.frame):null,a=(o?.width??Pr)*r,l=(o?.height??Pr)*r,s=e.cropMarks?i+Pf+Af+1:i,c=If(t);return {codeWidth:n,trimWidth:a,trimHeight:l,bleed:i,pageWidth:a+2*s,pageHeight:l+2*s,trimX:s,trimY:s,moduleSize:n/c,moduleCount:c,maxScanDistance:n*10}}var Ff=[137,80,78,71,13,10,26,10];async function du(t,e){let n=new Blob([t]).stream().pipeThrough(e);return new Uint8Array(await new Response(n).arrayBuffer())}async function fu(t){return typeof CompressionStream>"u"?null:await du(t,new CompressionStream("deflate"))}async function Lf(t){if(typeof DecompressionStream>"u")return null;try{return await du(t,new DecompressionStream("deflate"))}catch{return null}}var wi=(t,e)=>t[e]*2**24+(t[e+1]<<16)+(t[e+2]<<8)+t[e+3]>>>0,mu={0:1,2:3,3:1,4:2,6:4};function kf(t,e,n){let i=t+e-n,r=Math.abs(i-t),o=Math.abs(i-e),a=Math.abs(i-n);return r<=o&&r<=a?t:o<=a?e:n}async function hu(t){if(Ff.some((f,h)=>t[h]!==f))return null;let e=8,n=0,i=0,r=-1,o=null,a=null,l=[];for(;e+8<=t.length;){let f=wi(t,e),h=String.fromCharCode(...t.subarray(e+4,e+8)),g=t.subarray(e+8,e+8+f);if(e+=12+f,h==="IHDR"){n=wi(g,0),i=wi(g,4);let _=g[8];r=g[9];let y=g[12];if(_!==8||y!==0||!(r in mu))return null}else if(h==="PLTE")o=g;else if(h==="tRNS")a=g;else if(h==="IDAT")l.push(g);else if(h==="IEND")break}if(!(n&&i)||n*i>4096*4096)return null;let s=new Uint8Array(l.reduce((f,h)=>f+h.length,0)),c=0;for(let f of l)s.set(f,c),c+=f.length;let u=await Lf(s),m=mu[r],d=n*m;if(!u||u.length<i*(d+1))return null;let p=new Uint8Array(i*d);for(let f=0;f<i;f++){let h=u[f*(d+1)],g=u.subarray(f*(d+1)+1,(f+1)*(d+1)),_=f*d;for(let y=0;y<d;y++){let w=y>=m?p[_+y-m]:0,C=f>0?p[_-d+y]:0,S=f>0&&y>=m?p[_-d+y-m]:0,$=g[y],R=0;h===1?R=w:h===2?R=C:h===3?R=w+C>>1:h===4&&(R=kf(w,C,S)),p[_+y]=$+R&255;}}let b=new Uint8Array(n*i*4);for(let f=0;f<n*i;f++){let h=f*4,g=f*m;if(r===3){let _=p[g];b[h]=o?.[_*3]??0,b[h+1]=o?.[_*3+1]??0,b[h+2]=o?.[_*3+2]??0,b[h+3]=a?.[_]??255;}else if(r===0||r===4){let _=p[g];b[h]=_,b[h+1]=_,b[h+2]=_,b[h+3]=r===4?p[g+1]:255;}else b[h]=p[g],b[h+1]=p[g+1],b[h+2]=p[g+2],b[h+3]=r===6?p[g+3]:255;}return {width:n,height:i,data:b}}var Tf=25.4,pu=72/Tf,Nf=50;function Of(t){let e=/^data:[^,]*?(;base64)?,(.*)$/s.exec(t);if(!e)return null;try{let n=e[1]?atob(e[2]):decodeURIComponent(e[2]),i=new Uint8Array(n.length);for(let r=0;r<n.length;r++)i[r]=n.charCodeAt(r)&255;return i}catch{return null}}function Df(t){if(t[0]!==255||t[1]!==216)return null;let e=2;for(;e+9<t.length;){if(t[e]!==255)return null;let n=t[e+1];if(n===216||n>=208&&n<=215){e+=2;continue}let i=t[e+2]<<8|t[e+3];if(n===192||n===193||n===194){let r=t[e+5]<<8|t[e+6],o=t[e+7]<<8|t[e+8],a=t[e+9];return {width:o,height:r,components:a,progressive:n===194}}e+=2+i;}return null}async function Bf(t,e){let{width:n,height:i,data:r}=t,o=e?4:3,a=new Uint8Array(n*i*o);for(let s=0;s<n*i;s++){let c=r[s*4+3]/255,u=r[s*4]*c+255*(1-c),m=r[s*4+1]*c+255*(1-c),d=r[s*4+2]*c+255*(1-c);if(e){let[p,b,f,h]=cn(u,m,d);a.set([p*255,b*255,f*255,h*255].map(Math.round),s*o);}else a.set([Math.round(u),Math.round(m),Math.round(d)],s*o);}let l=await fu(a);return {kind:"raw",width:n,height:i,components:o,bytes:l??a,compressed:!!l}}async function Gf(t,e){let n=t;if(!/^data:image\/(png|jpe?g)[;,]/i.test(n)){let a=await ou(n);if(!a)return null;n=a;}let i=Of(n);if(!i)return null;let r=Df(i);if(r)return r.components===1||r.components===3?{kind:"jpeg",width:r.width,height:r.height,components:r.components,bytes:i,progressive:r.progressive}:null;let o=await hu(i);return o?await Bf(o,e):null}function Qf(t){let e="",n=0,i=r=>{e+=r,n+=r.length,n>=76&&(e+=`
2
+ `,n=0);};for(let r=0;r<t.length;r+=4){let o=Math.min(4,t.length-r),a=0;for(let s=0;s<4;s++)a=a*256+(s<o?t[r+s]:0);if(a===0&&o===4){i("z");continue}let l=[];for(let s=0;s<5;s++)l.unshift(String.fromCharCode(a%85+33)),a=Math.floor(a/85);i(l.slice(0,o+1).join(""));}return `${e}~>`}var Uf=`/qrdxdict 40 dict def
3
3
  qrdxdict begin
4
4
  /m {moveto} bind def
5
5
  /l {lineto} bind def
@@ -20,11 +20,11 @@ qrdxdict begin
20
20
  } bind def
21
21
  /QRDX-Regular /Helvetica latin1
22
22
  /QRDX-Bold /Helvetica-Bold latin1
23
- end`;function Oo(t){let e="(";for(let n of t){let i=n.codePointAt(0)??63;n==="("||n===")"||n==="\\"?e+=`\\${n}`:n==="\u2026"?e+="...":i>=32&&i<127?e+=n:i>=160&&i<=255?e+=`\\${i.toString(8).padStart(3,"0")}`:e+="?";}return `${e})`}var Do=class extends or{out=[];shadingNames=new Map;cmyk;images;usesLevel3=false;constructor(e,n,i,r){super(n,i),this.cmyk=e,this.images=r;}color(e){if(this.cmyk){let[n,i,r,o]=Ze(e.r,e.g,e.b);return `${b(n)} ${b(i)} ${b(r)} ${b(o)} cmyk`}return `${b(e.r/255)} ${b(e.g/255)} ${b(e.b/255)} rg`}tracePath(e,n){let i=["n"],r=false;for(let o of e)if(o.op==="M"||o.op==="L"&&!r){let[a,l]=J(n,o.x,o.y);i.push(`${b(a)} ${b(l)} m`),r=true;}else if(o.op==="L"){let[a,l]=J(n,o.x,o.y);i.push(`${b(a)} ${b(l)} l`);}else if(o.op==="C"){if(!r)continue;let[a,l]=J(n,o.x1,o.y1),[s,c]=J(n,o.x2,o.y2),[m,u]=J(n,o.x,o.y);i.push(`${b(a)} ${b(l)} ${b(s)} ${b(c)} ${b(m)} ${b(u)} c`);}else r&&i.push("h");return i.join(" ")}beginClip(e,n,i){return this.out.push(`gsave ${this.tracePath(e,n)} ${i?"eoclip":"clip"} n`),true}endClip(){this.out.push("grestore");}rect(e,n,i,r,o){this.out.push(`${this.color(e)} n ${b(n)} ${b(i)} m ${b(n+r)} ${b(i)} l ${b(n+r)} ${b(i+o)} l ${b(n)} ${b(i+o)} l h f`);}shade(e,n,i){let r=ft(n.matrix,i.matrix);if(!Ne(r))return;let o=Ql(i,this.cmyk?"cmyk":"rgb"),a=this.shadingNames.get(o);a||(a=`Sh${this.shadingNames.size}`,this.shadingNames.set(o,a)),this.usesLevel3=true;let l=n.fillRule==="evenodd"?"eoclip":"clip";this.out.push(`gsave ${this.tracePath(e,n.matrix)} ${l} n [${Bl(r)}] concat ${a} shfill grestore`);}paint(e,n,i){if(e.length===0)return;let r=i.opacity??1;if(r<=0)return;let o=this.resolveFill(i.fill,e,i.viewport,(i.fillOpacity??1)*r);o&&"pattern"in o?this.paintPattern(e,i,o.pattern,o.alpha):o&&"gradient"in o&&this.shade(e,i,{...o.gradient,stops:o.gradient.stops.map(u=>({...u,color:this.flatten({...u.color,a:u.color.a*o.alpha})}))});let a=o&&"color"in o?this.flatten(o.color):null,l=i.strokeWidth>0?this.resolveColor(i.stroke):null,s=l&&this.flatten({...l,a:l.a*r});if(!(a||s))return;let c=this.tracePath(e,i.matrix),m=i.fillRule==="evenodd"?"ef":"f";a&&s?this.out.push(`gsave ${this.color(a)} ${c} ${m} grestore`):a&&this.out.push(`${this.color(a)} ${c} ${m}`),s&&this.out.push(`${this.color(s)} ${b(i.strokeWidth*Pr(i.matrix))} w ${c} s`);}text(e,n){let i=e.text.replace(/\s+/g," ").trim(),r=this.resolveColor(n.fill);if(!(i&&r))return;let o=Pr(n.matrix),[a,l]=J(n.matrix,Z(e.attrs.x,n.viewport[0]),Z(e.attrs.y,n.viewport[1])),c=n.fontWeight==="bold"||Number.parseInt(n.fontWeight,10)>=600?"/QRDX-Bold":"/QRDX-Regular",m=b(n.fontSize*o),u=Number.parseFloat(e.attrs["data-max-width"]??""),f=u>0?` dup stringwidth pop dup ${b(u*o)} gt {${b(u*o)} exch div ${m} mul ${c} findfont exch scalefont setfont} {pop} ifelse`:"",p=n.textAnchor==="middle"?" dup stringwidth pop 2 div neg 0 rmoveto":n.textAnchor==="end"?" dup stringwidth pop neg 0 rmoveto":"",g=Math.atan2(n.matrix[1],n.matrix[0])*180/Math.PI;if(Math.abs(g)>.01){this.out.push(`gsave ${this.color(r)} ${c} findfont ${m} scalefont setfont ${b(a)} ${b(l)} translate ${b(g)} rotate ${Oo(i)}${f} 0 0 moveto${p} show grestore`);return}this.out.push(`gsave ${this.color(r)} ${c} findfont ${m} scalefont setfont ${Oo(i)}${f} ${b(a)} ${b(l)} moveto${p} show grestore`);}image(e,n){let i=e.attrs.href??e.attrs["xlink:href"],r=i?this.images.get(i):void 0;if(!r)return;let o=Z(e.attrs.x,n.viewport[0]),a=Z(e.attrs.y,n.viewport[1]),l=Z(e.attrs.width,n.viewport[0]),s=Z(e.attrs.height,n.viewport[1]);if(l<=0||s<=0)return;let[c,m]=J(n.matrix,o,a),[u,f]=J(n.matrix,o+l,a+s),{components:p}=r,g=p===1?"/DeviceGray":p===4?"/DeviceCMYK":"/DeviceRGB",d=Array.from({length:p},()=>"0 1").join(" "),h="/ASCII85Decode filter";r.kind==="jpeg"?(h+=" /DCTDecode filter",r.progressive&&(this.usesLevel3=true)):r.compressed&&(h+=" /FlateDecode filter",this.usesLevel3=true),this.out.push(["gsave",`${b(Math.min(c,u))} ${b(Math.min(m,f))} translate ${b(Math.abs(u-c))} ${b(Math.abs(f-m))} scale`,`${g} setcolorspace`,`<< /ImageType 1 /Width ${r.width} /Height ${r.height} /BitsPerComponent 8 /Decode [${d}] /ImageMatrix [${r.width} 0 0 -${r.height} 0 ${r.height}] /DataSource currentfile ${h} >> image`,od(r.bytes),"grestore"].join(`
24
- `));}};async function ad(t,e={}){let n=Cn(t);if(!n)throw new Error("Could not read the SVG to convert to EPS");let i=Z(n.attrs.width,0,0)||512,r=Z(n.attrs.height,0,0)||i,o=e.width??i;if(!(Number.isFinite(o)&&o>0))throw new Error("EPS width must be a positive number of points");let a=o/i,l=r*a,s=Math.max(0,e.bleed??0),c=o+2*s,m=l+2*s,u=e.colorMode==="cmyk",f=new Map;for(let y of Fo(n,new Set)){let $=await rd(y,u);$&&f.set(y,$);}let p=new Do(u,vo(n,new Map),Ol(n),f);To(p,{bgColor:e.background??"#ffffff"});let d={matrix:ft([1,0,0,-1,s,m-s],[a,0,0,a,0,0]),viewport:[i,r],fill:"#000000",fillRule:"nonzero",stroke:"none",strokeWidth:1,fontSize:16,fontWeight:"normal",textAnchor:"start"},h=s>0?e.bleedColor??void 0:void 0;if(!(h&&p.paintBleed(n,d,h,[0,0,c,m]))){let y=h?p.resolveColor(h):null;y&&p.rect(y,0,0,c,m);}p.walk(n,d,true);let _=(e.title??"QR code").replace(/[^\x20-\x7e]/g,"?");return ["%!PS-Adobe-3.0 EPSF-3.0",`%%BoundingBox: 0 0 ${Math.ceil(c)} ${Math.ceil(m)}`,`%%HiResBoundingBox: 0 0 ${b(c)} ${b(m)}`,`%%Title: ${Oo(_)}`,"%%Creator: qrdx",`%%LanguageLevel: ${p.usesLevel3?3:2}`,"%%DocumentData: Clean7Bit","%%EndComments","%%BeginProlog",id,"%%EndProlog","qrdxdict begin",...Array.from(p.shadingNames,([y,$])=>`/${$} ${y} def`),"gsave",...p.out,"grestore","end","showpage","%%Trailer","%%EOF",""].join(`
25
- `)}var sd="EPS can't carry image fills: PostScript has no transparency and would repeat the picture for every dot. Download PDF, SVG or PNG instead.";function ld(t){return [t.bgColor,t.fgColor,t.eyeColor,t.dotColor,...Object.values(t.eyeColors??{}).flatMap(n=>[n?.outer,n?.inner])].some(n=>typeof n=="object"&&n?.type==="image")}async function tc(t,e={}){if(ld(t))throw new Error(sd);let n=jl(t,{size:e.sizeMm??Jm,unit:"mm",bleed:e.bleedMm}),i=await Lo(t);return await ad(i,{width:n.trimWidth*Jl,bleed:n.bleed*Jl,bleedColor:n.bleed>0?ko(t,i):Io(t),colorMode:e.colorMode,background:st(t.bgColor,dt)})}function ec(t){return `data:application/postscript;base64,${btoa(t)}`}var Bo={png:{mimeType:"image/png",extension:"png",vector:false},jpg:{mimeType:"image/jpeg",extension:"jpg",vector:false},webp:{mimeType:"image/webp",extension:"webp",vector:false},bmp:{mimeType:"image/bmp",extension:"bmp",vector:false},svg:{mimeType:"image/svg+xml",extension:"svg",vector:true},pdf:{mimeType:"application/pdf",extension:"pdf",vector:false},eps:{mimeType:"application/postscript",extension:"eps",vector:true}};function nc(t,e){return t<50||e<50?{isValid:false,error:"Size must be at least 50x50 pixels"}:t>5e3||e>5e3?{isValid:false,error:"Size must not exceed 5000x5000 pixels"}:t!==e?{isValid:false,error:"Width and height must be equal for QR codes"}:{isValid:true}}function ar(t,e){let{imageSettings:n,size:i}=t;if(!(n&&i)||i===e)return {...t,size:e};let r=e/i;return {...t,size:e,imageSettings:{...n,width:n.width*r,height:n.height*r,...n.x!=null&&{x:n.x*r},...n.y!=null&&{y:n.y*r},...n.padding!=null&&{padding:n.padding*r}}}}function Oe(t,e){let n=document.createElement("a");n.href=t,n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n);}var rc=t=>(Bo[t]??Bo.png).mimeType;function cd(t,e,n){let{extension:i,vector:r}=Bo[t];if(r)return `qr-code.${i}`;let{width:o,height:a}=sn(e.width,n);return `qr-code-${Math.round(o)}x${Math.round(a)}.${i}`}async function oc(t,e={}){let n=await pn(t,"image/webp",true);try{return await nr(n,e)}finally{n.remove();}}async function ic(t){let e=await pn(t,"image/png",true);try{return kn(e)}finally{e.remove();}}var ud=25.4/72;async function ac(t){let e=await tc(t,{sizeMm:(t.size??yt)*ud});return ec(e)}async function sc(t){let e;try{({jsPDF:e}=await import('jspdf'));}catch(f){throw new Error(`PDF export needs the optional "jspdf" package. Install it with \`npm install jspdf\`. (${f})`)}let n=await ae(t),i=decodeURIComponent(n.replace("data:image/svg+xml,","")),r;try{let f=new TextEncoder().encode(i),p=Array.from(f,d=>String.fromCharCode(d)).join("");r=`data:image/svg+xml;base64,${btoa(p)}`;}catch(f){throw new Error(`Failed to encode SVG for PDF conversion: ${f}`)}let{width:o,height:a}=sn(t.size||yt,t.frame),l=await new Promise((f,p)=>{let g=new Image,d=document.createElement("canvas");d.width=Math.round(o),d.height=Math.round(a);let h=d.getContext("2d");if(!h){p(new Error("Could not get canvas context"));return}let _=setTimeout(()=>{d.remove(),p(new Error("SVG load timeout - image may be too large or contain invalid data"));},3e4);g.onload=()=>{clearTimeout(_);try{h.drawImage(g,0,0,d.width,d.height),f(d);}catch(y){clearTimeout(_),d.remove(),p(new Error(`Failed to draw image to canvas: ${y}`));}},g.onerror=()=>{clearTimeout(_),d.remove(),p(new Error("Could not load SVG for PDF conversion"));},g.src=r;}),s=l.toDataURL("image/png",1),c=o*.264583,m=a*.264583,u=new e({orientation:c>m?"landscape":"portrait",unit:"mm",format:[c,m]});return u.addImage(s,"PNG",0,0,c,m),l.remove(),u.output("dataurlstring")}async function lc(t,e){let{format:n,size:i,filename:r,quality:o}=e,a=nc(i.width,i.height);if(!a.isValid)throw new Error(a.error);let l=ar(t,i.width),s=r||cd(n,i,t.frame);try{if(n==="svg"){let c=await ae(l);Oe(c,s);}else if(n==="pdf"){let c=await sc(l);Oe(c,s);}else if(n==="eps")Oe(await ac(l),s);else if(n==="webp"){let c=await oc(l,{quality:o});Oe(await qt(c),s);}else if(n==="bmp"){let c=await ic(l);Oe(await qt(c),s);}else {let c=rc(n),m=await pn(l,c);if(typeof m=="string")Oe(m,s);else throw new Error("Failed to generate image data URL")}}catch(c){throw console.error(`Error downloading ${n.toUpperCase()}:`,c),c}}async function cc(t,e,n,i={}){let r=nc(n.width,n.height);if(!r.isValid)throw new Error(r.error);let o=ar(t,n.width);if(e==="svg")return await ae(o);if(e==="pdf")return await sc(o);if(e==="eps")return await ac(o);if(e==="webp")return await qt(await oc(o,i));if(e==="bmp")return await qt(await ic(o));let a=rc(e),l=await pn(o,a);if(typeof l=="string")return l;throw new Error("Failed to generate QR code data URL")}var lr={value:["value","string"],size:["size","number"],level:["level","level"],"fg-color":["fgColor","string"],"bg-color":["bgColor","string"],"eye-color":["eyeColor","string"],"dot-color":["dotColor","string"],"body-pattern":["bodyPattern","string"],"corner-eye-pattern":["cornerEyePattern","string"],"corner-eye-dot-pattern":["cornerEyeDotPattern","string"],margin:["margin","number"],"template-id":["templateId","string"],"module-scale":["moduleScale","number"],"auto-level":["autoLevel","boolean"],shape:["shape","string"]},uc=[...Object.values(lr).map(([t])=>t),"frame","imageSettings","eyeColors","art","customTemplate","customProps"],md=new Set(["L","M","Q","H"]),dd="QR code",fc=Symbol.for("qrdx.code-element"),fd=/^[a-z][a-z0-9._]*(?:-[a-z0-9._]*)+$/,hc=":host{display:inline-block}:host([hidden]){display:none}svg{display:block;max-width:100%;height:auto}";function hd(t,e){switch(t){case "number":{let n=e.trim()===""?Number.NaN:Number(e);return Number.isFinite(n)?n:void 0}case "level":{let n=e.trim().toUpperCase();return md.has(n)?n:void 0}case "boolean":return e!=="false";default:return e}}function pc(t){let e={};for(let n of Object.keys(t))t[n]!==void 0&&t[n]!==null&&(e[n]=t[n]);return e}function pd(t,e){let n=t["aria-label"];return e?.trim()||typeof n=="string"&&n.trim()||dd}function gc(t,e){return {...t,part:"svg",role:"img","aria-label":pd(t,e)}}var mc=(t,e)=>{let n=e??t.size??yt;return {width:n,height:n}},gd=typeof HTMLElement>"u"?class{}:HTMLElement,gn=class t extends gd{static observedAttributes=[...Object.keys(lr),"label","props"];static[fc]=true;#n;#e={};#a;#o;#t=null;#s="";#r=true;#l=false;static{for(let e of uc)Object.defineProperty(t.prototype,e,{configurable:true,enumerable:true,get(){return this.#e[e]},set(n){this.#m(e,n);}});}constructor(){super(),this.#n=this.shadowRoot??this.attachShadow({mode:"open"});let e=null;for(let n of Array.from(this.#n.children))n.localName==="style"?e=n:n.localName==="svg"&&(this.#t=n);e||(e=this.ownerDocument.createElement("style"),e.textContent=hc,this.#n.prepend(e));for(let n of [...uc,"props","label"])if(Object.hasOwn(this,n)){let i=this[n];delete this[n],this[n]=i;}}connectedCallback(){this.#r&&this.#u();}attributeChangedCallback(e,n,i){if(n===i)return;if(e==="label"){this.#o=i??void 0,this.#i();return}if(e==="props"){this.#d(i);return}let r=lr[e];if(r){let[o,a]=r;this.#m(o,i===null?void 0:hd(a,i));}}get props(){return this.#a}set props(e){if(typeof e=="string"){this.#d(e);return}this.#a=e??void 0,this.#i();}get label(){return this.#o}set label(e){this.#o=e??void 0,this.#i();}get options(){return pc({...this.#a,...this.#e})}get svg(){return this.#r&&this.isConnected&&this.#u(),this.#t}toSVGString(){return Mt(Te(this.#c()))}async toDataURL(e="png",n={}){let i=this.#c();return await cc(i,e,mc(i,n.size),{quality:n.quality})}async download(e={}){let n=this.#c();return await lc(n,{format:e.format??"png",size:mc(n,e.size),filename:e.filename,quality:e.quality})}#c(){let e=this.options;if(!e.value)throw new Error(`qrdx: <${this.localName}> has no value`);return e}#m(e,n){if(n==null){if(!(e in this.#e))return;delete this.#e[e];}else {if(this.#e[e]===n)return;this.#e[e]=n;}this.#i();}#d(e){if(e===null||e.trim()===""){this.props=void 0;return}try{let n=JSON.parse(e);if(!n||typeof n!="object"||Array.isArray(n))throw new TypeError("props must be a JSON object");this.props=n;}catch(n){this.#h(n);}}#i(){this.#r=true,!this.#l&&(this.#l=true,queueMicrotask(()=>{this.#l=false,this.#r&&this.isConnected&&this.#u();}));}#u(){this.#r=false;let e=this.options;if(!e.value){this.#f();return}let n,i;try{n=Te(gc(e,this.#o)),i=Mt(n);}catch(o){this.#f(),this.#h(o);return}if(this.#t&&i===this.#s)return;let r=Mo(n,this.ownerDocument).firstChild;this.#t?.parentNode===this.#n?this.#t.replaceWith(r):this.#n.append(r),this.#t=r,this.#s=i;}#f(){this.#t?.remove(),this.#t=null,this.#s="";}#h(e){let n=new CustomEvent("qrdx-error",{cancelable:true,detail:{error:e}});this.dispatchEvent(n)&&console.error(`qrdx: <${this.localName}> could not draw its code`,e);}},dc;function Ug(t="qrdx-code"){let e=globalThis.customElements;if(!e)return gn;let n=e.get(t);if(n){if(fc in n)return n;throw new Error(`qrdx: <${t}> is already defined by another element; pass defineQRdxCode another tag name`)}let i=dc===void 0?gn:class extends gn{};return e.define(t,i),dc??=t,i}var _d=t=>t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;");function bd(t){let e=[],n={...t};for(let[i,[r,o]]of Object.entries(lr)){let a=t[r];(o==="number"&&typeof a=="number"||o==="boolean"&&typeof a=="boolean"||o!=="number"&&o!=="boolean"&&typeof a=="string")&&(delete n[r],o==="boolean"?a&&e.push([i,""]):e.push([i,String(a)]));}return {attributes:e,rest:n}}function zg(t,{tagName:e="qrdx-code",label:n}={}){if(!fd.test(e))throw new Error(`qrdx: ${e} is not a custom element name`);let i=pc(t),{attributes:r,rest:o}=bd(i),{customTemplate:a,...l}=o;n!==void 0&&r.push(["label",n]),Object.keys(l).length>0&&r.push(["props",JSON.stringify(l)]);let s=r.map(([m,u])=>u===""?` ${m}`:` ${m}="${_d(u)}"`).join(""),c=i.value?Mt(Te(gc(i,n))):"";return `<${e}${s}><template shadowrootmode="open"><style>${hc}</style>${c}</template></${e}>`}/**
23
+ end`;function Ci(t){let e="(";for(let n of t){let i=n.codePointAt(0)??63;n==="("||n===")"||n==="\\"?e+=`\\${n}`:n==="\u2026"?e+="...":i>=32&&i<127?e+=n:i>=160&&i<=255?e+=`\\${i.toString(8).padStart(3,"0")}`:e+="?";}return `${e})`}var Mi=class extends Er{out=[];shadingNames=new Map;cmyk;images;usesLevel3=false;constructor(e,n,i,r){super(n,i),this.cmyk=e,this.images=r;}color(e){if(this.cmyk){let[n,i,r,o]=cn(e.r,e.g,e.b);return `${x(n)} ${x(i)} ${x(r)} ${x(o)} cmyk`}return `${x(e.r/255)} ${x(e.g/255)} ${x(e.b/255)} rg`}tracePath(e,n){let i=["n"],r=false;for(let o of e)if(o.op==="M"||o.op==="L"&&!r){let[a,l]=rt(n,o.x,o.y);i.push(`${x(a)} ${x(l)} m`),r=true;}else if(o.op==="L"){let[a,l]=rt(n,o.x,o.y);i.push(`${x(a)} ${x(l)} l`);}else if(o.op==="C"){if(!r)continue;let[a,l]=rt(n,o.x1,o.y1),[s,c]=rt(n,o.x2,o.y2),[u,m]=rt(n,o.x,o.y);i.push(`${x(a)} ${x(l)} ${x(s)} ${x(c)} ${x(u)} ${x(m)} c`);}else r&&i.push("h");return i.join(" ")}beginClip(e,n,i){return this.out.push(`gsave ${this.tracePath(e,n)} ${i?"eoclip":"clip"} n`),true}endClip(){this.out.push("grestore");}rect(e,n,i,r,o){this.out.push(`${this.color(e)} n ${x(n)} ${x(i)} m ${x(n+r)} ${x(i)} l ${x(n+r)} ${x(i+o)} l ${x(n)} ${x(i+o)} l h f`);}shade(e,n,i){let r=pt(n.matrix,i.matrix);if(!Ke(r))return;let o=eu(i,this.cmyk?"cmyk":"rgb"),a=this.shadingNames.get(o);a||(a=`Sh${this.shadingNames.size}`,this.shadingNames.set(o,a)),this.usesLevel3=true;let l=n.fillRule==="evenodd"?"eoclip":"clip";this.out.push(`gsave ${this.tracePath(e,n.matrix)} ${l} n [${tu(r)}] concat ${a} shfill grestore`);}paint(e,n,i){if(e.length===0)return;let r=i.opacity??1;if(r<=0)return;let o=this.resolveFill(i.fill,e,i.viewport,(i.fillOpacity??1)*r);o&&"pattern"in o?this.paintPattern(e,i,o.pattern,o.alpha):o&&"gradient"in o&&this.shade(e,i,{...o.gradient,stops:o.gradient.stops.map(m=>({...m,color:this.flatten({...m.color,a:m.color.a*o.alpha})}))});let a=o&&"color"in o?this.flatten(o.color):null,l=i.strokeWidth>0?this.resolveColor(i.stroke):null,s=l&&this.flatten({...l,a:l.a*r});if(!(a||s))return;let c=this.tracePath(e,i.matrix),u=i.fillRule==="evenodd"?"ef":"f";if(a&&s?this.out.push(`gsave ${this.color(a)} ${c} ${u} grestore`):a&&this.out.push(`${this.color(a)} ${c} ${u}`),s){let m=`${this.color(s)} ${x(i.strokeWidth*co(i.matrix))} w ${c} s`,{join:d,cap:p}=ru(i);this.out.push(d||p?`gsave ${d} setlinejoin ${p} setlinecap ${m} grestore`:m);}}text(e,n){let i=e.text.replace(/\s+/g," ").trim(),r=this.resolveColor(n.fill);if(!(i&&r))return;let o=co(n.matrix),[a,l]=rt(n.matrix,Z(e.attrs.x,n.viewport[0]),Z(e.attrs.y,n.viewport[1])),c=n.fontWeight==="bold"||Number.parseInt(n.fontWeight,10)>=600?"/QRDX-Bold":"/QRDX-Regular",u=x(n.fontSize*o),m=Number.parseFloat(e.attrs["data-max-width"]??""),d=m>0?` dup stringwidth pop dup ${x(m*o)} gt {${x(m*o)} exch div ${u} mul ${c} findfont exch scalefont setfont} {pop} ifelse`:"",p=n.textAnchor==="middle"?" dup stringwidth pop 2 div neg 0 rmoveto":n.textAnchor==="end"?" dup stringwidth pop neg 0 rmoveto":"",b=Math.atan2(n.matrix[1],n.matrix[0])*180/Math.PI;if(Math.abs(b)>.01){this.out.push(`gsave ${this.color(r)} ${c} findfont ${u} scalefont setfont ${x(a)} ${x(l)} translate ${x(b)} rotate ${Ci(i)}${d} 0 0 moveto${p} show grestore`);return}this.out.push(`gsave ${this.color(r)} ${c} findfont ${u} scalefont setfont ${Ci(i)}${d} ${x(a)} ${x(l)} moveto${p} show grestore`);}image(e,n){let i=e.attrs.href??e.attrs["xlink:href"],r=i?this.images.get(i):void 0;if(!r)return;let o=Z(e.attrs.x,n.viewport[0]),a=Z(e.attrs.y,n.viewport[1]),l=Z(e.attrs.width,n.viewport[0]),s=Z(e.attrs.height,n.viewport[1]);if(l<=0||s<=0)return;let[c,u]=rt(n.matrix,o,a),[m,d]=rt(n.matrix,o+l,a+s),{components:p}=r,b=p===1?"/DeviceGray":p===4?"/DeviceCMYK":"/DeviceRGB",f=Array.from({length:p},()=>"0 1").join(" "),h="/ASCII85Decode filter";r.kind==="jpeg"?(h+=" /DCTDecode filter",r.progressive&&(this.usesLevel3=true)):r.compressed&&(h+=" /FlateDecode filter",this.usesLevel3=true),this.out.push(["gsave",`${x(Math.min(c,m))} ${x(Math.min(u,d))} translate ${x(Math.abs(m-c))} ${x(Math.abs(d-u))} scale`,`${b} setcolorspace`,`<< /ImageType 1 /Width ${r.width} /Height ${r.height} /BitsPerComponent 8 /Decode [${f}] /ImageMatrix [${r.width} 0 0 -${r.height} 0 ${r.height}] /DataSource currentfile ${h} >> image`,Qf(r.bytes),"grestore"].join(`
24
+ `));}};async function zf(t,e={}){let n=Bn(t);if(!n)throw new Error("Could not read the SVG to convert to EPS");let i=Z(n.attrs.width,0,0)||512,r=Z(n.attrs.height,0,0)||i,o=e.width??i;if(!(Number.isFinite(o)&&o>0))throw new Error("EPS width must be a positive number of points");let a=o/i,l=r*a,s=Math.max(0,e.bleed??0),c=o+2*s,u=l+2*s,m=e.colorMode==="cmyk",d=new Map;for(let _ of _i(n,new Set)){let y=await Gf(_,m);y&&d.set(_,y);}let p=new Mi(m,bi(n,new Map),Kc(n),d);Si(p,{bgColor:e.background??"#ffffff"});let f={matrix:pt([1,0,0,-1,s,u-s],[a,0,0,a,0,0]),viewport:[i,r],fill:"#000000",fillRule:"nonzero",stroke:"none",strokeWidth:1,fontSize:16,fontWeight:"normal",textAnchor:"start"},h=s>0?e.bleedColor??void 0:void 0;if(!(h&&p.paintBleed(n,f,h,[0,0,c,u]))){let _=h?p.resolveColor(h):null;_&&p.rect(_,0,0,c,u);}p.walk(n,f,true);let g=(e.title??"QR code").replace(/[^\x20-\x7e]/g,"?");return ["%!PS-Adobe-3.0 EPSF-3.0",`%%BoundingBox: 0 0 ${Math.ceil(c)} ${Math.ceil(u)}`,`%%HiResBoundingBox: 0 0 ${x(c)} ${x(u)}`,`%%Title: ${Ci(g)}`,"%%Creator: qrdx",`%%LanguageLevel: ${p.usesLevel3?3:2}`,"%%DocumentData: Clean7Bit","%%EndComments","%%BeginProlog",Uf,"%%EndProlog","qrdxdict begin",...Array.from(p.shadingNames,([_,y])=>`/${y} ${_} def`),"gsave",...p.out,"grestore","end","showpage","%%Trailer","%%EOF",""].join(`
25
+ `)}var Hf="EPS can't carry image fills: PostScript has no transparency and would repeat the picture for every dot. Download PDF, SVG or PNG instead.";function qf(t){return [t.bgColor,t.fgColor,t.eyeColor,t.dotColor,...Object.values(t.eyeColors??{}).flatMap(n=>[n?.outer,n?.inner])].some(n=>typeof n=="object"&&n?.type==="image")}async function gu(t,e={}){if(qf(t))throw new Error(Hf);let n=uu(t,{size:e.sizeMm??Nf,unit:"mm",bleed:e.bleedMm}),i=await yi(t);return await zf(i,{width:n.trimWidth*pu,bleed:n.bleed*pu,bleedColor:n.bleed>0?$i(t,i):xi(t),colorMode:e.colorMode,background:ut(t.bgColor,nt)})}function bu(t){return `data:application/postscript;base64,${btoa(t)}`}var Ri={png:{mimeType:"image/png",extension:"png",vector:false},jpg:{mimeType:"image/jpeg",extension:"jpg",vector:false},webp:{mimeType:"image/webp",extension:"webp",vector:false},bmp:{mimeType:"image/bmp",extension:"bmp",vector:false},gif:{mimeType:Rn,extension:"gif",vector:false},ico:{mimeType:ge,extension:"ico",vector:false,sizes:$r},svg:{mimeType:"image/svg+xml",extension:"svg",vector:true},pdf:{mimeType:"application/pdf",extension:"pdf",vector:false},eps:{mimeType:"application/postscript",extension:"eps",vector:true}};function _u(t,e){return t<50||e<50?{isValid:false,error:"Size must be at least 50x50 pixels"}:t>5e3||e>5e3?{isValid:false,error:"Size must not exceed 5000x5000 pixels"}:t!==e?{isValid:false,error:"Width and height must be equal for QR codes"}:{isValid:true}}function vn(t,e){let{imageSettings:n,size:i}=t;if(!(n&&i)||i===e)return {...t,size:e};let r=e/i;return {...t,size:e,imageSettings:{...n,width:n.width*r,height:n.height*r,...n.x!=null&&{x:n.x*r},...n.y!=null&&{y:n.y*r},...n.padding!=null&&{padding:n.padding*r}}}}function Kt(t,e){let n=document.createElement("a");n.href=t,n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n);}var yu=t=>(Ri[t]??Ri.png).mimeType;function Wf(t,e,n){let{extension:i,vector:r,sizes:o}=Ri[t];if(r||o)return `qr-code.${i}`;let{width:a,height:l}=xn(e.width,n);return `qr-code-${Math.round(a)}x${Math.round(l)}.${i}`}async function xu(t,e={}){let n=await ye(t,"image/webp",true);try{return await Mr(n,e)}finally{n.remove();}}async function $u(t){let e=await ye(t,"image/png",true);try{return Zn(e)}finally{e.remove();}}async function Su(t){let e=await ye(t,"image/png",true);try{return await xr(e,t.value)}finally{e.remove();}}async function wu(t,e=$r){let n=[];try{for(let i of e)n.push(await ye(vn({...t,frame:void 0},i),"image/png",!0));return ci(n)}finally{for(let i of n)i.remove();}}var Vf=25.4/72;async function Cu(t){let e=await gu(t,{sizeMm:(t.size??xt)*Vf});return bu(e)}async function Mu(t){let e;try{({jsPDF:e}=await import('jspdf'));}catch(d){throw new Error(`PDF export needs the optional "jspdf" package. Install it with \`npm install jspdf\`. (${d})`)}let n=await _e(t),i=decodeURIComponent(n.replace("data:image/svg+xml,","")),r;try{let d=new TextEncoder().encode(i),p=Array.from(d,f=>String.fromCharCode(f)).join("");r=`data:image/svg+xml;base64,${btoa(p)}`;}catch(d){throw new Error(`Failed to encode SVG for PDF conversion: ${d}`)}let{width:o,height:a}=xn(t.size||xt,t.frame),l=await new Promise((d,p)=>{let b=new Image,f=document.createElement("canvas");f.width=Math.round(o),f.height=Math.round(a);let h=f.getContext("2d");if(!h){p(new Error("Could not get canvas context"));return}let g=setTimeout(()=>{f.remove(),p(new Error("SVG load timeout - image may be too large or contain invalid data"));},3e4);b.onload=()=>{clearTimeout(g);try{h.drawImage(b,0,0,f.width,f.height),d(f);}catch(_){clearTimeout(g),f.remove(),p(new Error(`Failed to draw image to canvas: ${_}`));}},b.onerror=()=>{clearTimeout(g),f.remove(),p(new Error("Could not load SVG for PDF conversion"));},b.src=r;}),s=l.toDataURL("image/png",1),c=o*.264583,u=a*.264583,m=new e({orientation:c>u?"landscape":"portrait",unit:"mm",format:[c,u]});return m.addImage(s,"PNG",0,0,c,u),l.remove(),m.output("dataurlstring")}async function Ru(t,e){let{format:n,size:i,filename:r,quality:o}=e,a=_u(i.width,i.height);if(!a.isValid)throw new Error(a.error);let l=vn(t,i.width),s=r||Wf(n,i,t.frame);try{if(n==="svg"){let c=await _e(l);Kt(c,s);}else if(n==="pdf"){let c=await Mu(l);Kt(c,s);}else if(n==="eps")Kt(await Cu(l),s);else if(n==="webp"){let c=await xu(l,{quality:o});Kt(await $t(c),s);}else if(n==="bmp"){let c=await $u(l);Kt(await $t(c),s);}else if(n==="gif"){let c=await Su(l);Kt(await $t(c),s);}else if(n==="ico"){let c=await wu(l);Kt(await $t(c),s);}else {let c=yu(n),u=await ye(l,c);if(typeof u=="string")Kt(u,s);else throw new Error("Failed to generate image data URL")}}catch(c){throw console.error(`Error downloading ${n.toUpperCase()}:`,c),c}}async function Eu(t,e,n,i={}){let r=_u(n.width,n.height);if(!r.isValid)throw new Error(r.error);let o=vn(t,n.width);if(e==="svg")return await _e(o);if(e==="pdf")return await Mu(o);if(e==="eps")return await Cu(o);if(e==="webp")return await $t(await xu(o,i));if(e==="bmp")return await $t(await $u(o));if(e==="gif")return await $t(await Su(o));if(e==="ico")return await $t(await wu(o));let a=yu(e),l=await ye(o,a);if(typeof l=="string")return l;throw new Error("Failed to generate QR code data URL")}var vr={value:["value","string"],size:["size","number"],level:["level","level"],"fg-color":["fgColor","string"],"bg-color":["bgColor","string"],"eye-color":["eyeColor","string"],"dot-color":["dotColor","string"],"body-pattern":["bodyPattern","string"],"corner-eye-pattern":["cornerEyePattern","string"],"corner-eye-dot-pattern":["cornerEyeDotPattern","string"],margin:["margin","number"],"template-id":["templateId","string"],"module-scale":["moduleScale","number"],"auto-level":["autoLevel","boolean"],shape:["shape","string"],"eye-gradient":["eyeGradient","string"],"bg-radius":["bgRadius","number"],backdrop:["backdrop","string"]},Au=[...Object.values(vr).map(([t])=>t),"frame","imageSettings","eyeColors","eyeShapes","halo","shadow","art","customTemplate","customProps"],jf=new Set(["L","M","Q","H"]),Xf="QR code",Iu=Symbol.for("qrdx.code-element"),Zf=/^[a-z][a-z0-9._]*(?:-[a-z0-9._]*)+$/,Fu=":host{display:inline-block}:host([hidden]){display:none}svg{display:block;max-width:100%;height:auto}";function Yf(t,e){switch(t){case "number":{let n=e.trim()===""?Number.NaN:Number(e);return Number.isFinite(n)?n:void 0}case "level":{let n=e.trim().toUpperCase();return jf.has(n)?n:void 0}case "boolean":return e!=="false";default:return e}}function Lu(t){let e={};for(let n of Object.keys(t))t[n]!==void 0&&t[n]!==null&&(e[n]=t[n]);return e}function Kf(t,e){let n=t["aria-label"];return e?.trim()||typeof n=="string"&&n.trim()||Xf}function ku(t,e){return {...t,part:"svg",role:"img","aria-label":Kf(t,e)}}var Pu=(t,e)=>{let n=e??t.size??xt;return {width:n,height:n}},Jf=typeof HTMLElement>"u"?class{}:HTMLElement,In=class t extends Jf{static observedAttributes=[...Object.keys(vr),"label","props"];static[Iu]=true;#n;#e={};#a;#o;#t=null;#s="";#r=true;#l=false;static{for(let e of Au)Object.defineProperty(t.prototype,e,{configurable:true,enumerable:true,get(){return this.#e[e]},set(n){this.#m(e,n);}});}constructor(){super(),this.#n=this.shadowRoot??this.attachShadow({mode:"open"});let e=null;for(let n of Array.from(this.#n.children))n.localName==="style"?e=n:n.localName==="svg"&&(this.#t=n);e||(e=this.ownerDocument.createElement("style"),e.textContent=Fu,this.#n.prepend(e));for(let n of [...Au,"props","label"])if(Object.hasOwn(this,n)){let i=this[n];delete this[n],this[n]=i;}}connectedCallback(){this.#r&&this.#u();}attributeChangedCallback(e,n,i){if(n===i)return;if(e==="label"){this.#o=i??void 0,this.#i();return}if(e==="props"){this.#d(i);return}let r=vr[e];if(r){let[o,a]=r;this.#m(o,i===null?void 0:Yf(a,i));}}get props(){return this.#a}set props(e){if(typeof e=="string"){this.#d(e);return}this.#a=e??void 0,this.#i();}get label(){return this.#o}set label(e){this.#o=e??void 0,this.#i();}get options(){return Lu({...this.#a,...this.#e})}get svg(){return this.#r&&this.isConnected&&this.#u(),this.#t}toSVGString(){return vt(Ye(this.#c()))}async toDataURL(e="png",n={}){let i=this.#c();return await Eu(i,e,Pu(i,n.size),{quality:n.quality})}async download(e={}){let n=this.#c();return await Ru(n,{format:e.format??"png",size:Pu(n,e.size),filename:e.filename,quality:e.quality})}#c(){let e=this.options;if(!e.value)throw new Error(`qrdx: <${this.localName}> has no value`);return e}#m(e,n){if(n==null){if(!(e in this.#e))return;delete this.#e[e];}else {if(this.#e[e]===n)return;this.#e[e]=n;}this.#i();}#d(e){if(e===null||e.trim()===""){this.props=void 0;return}try{let n=JSON.parse(e);if(!n||typeof n!="object"||Array.isArray(n))throw new TypeError("props must be a JSON object");this.props=n;}catch(n){this.#h(n);}}#i(){this.#r=true,!this.#l&&(this.#l=true,queueMicrotask(()=>{this.#l=false,this.#r&&this.isConnected&&this.#u();}));}#u(){this.#r=false;let e=this.options;if(!e.value){this.#f();return}let n,i;try{n=Ye(ku(e,this.#o)),i=vt(n);}catch(o){this.#f(),this.#h(o);return}if(this.#t&&i===this.#s)return;let r=mi(n,this.ownerDocument).firstChild;this.#t?.parentNode===this.#n?this.#t.replaceWith(r):this.#n.append(r),this.#t=r,this.#s=i;}#f(){this.#t?.remove(),this.#t=null,this.#s="";}#h(e){let n=new CustomEvent("qrdx-error",{cancelable:true,detail:{error:e}});this.dispatchEvent(n)&&console.error(`qrdx: <${this.localName}> could not draw its code`,e);}},vu;function X_(t="qrdx-code"){let e=globalThis.customElements;if(!e)return In;let n=e.get(t);if(n){if(Iu in n)return n;throw new Error(`qrdx: <${t}> is already defined by another element; pass defineQRdxCode another tag name`)}let i=vu===void 0?In:class extends In{};return e.define(t,i),vu??=t,i}var th=t=>t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;");function eh(t){let e=[],n={...t};for(let[i,[r,o]]of Object.entries(vr)){let a=t[r];(o==="number"&&typeof a=="number"||o==="boolean"&&typeof a=="boolean"||o!=="number"&&o!=="boolean"&&typeof a=="string")&&(delete n[r],o==="boolean"?a&&e.push([i,""]):e.push([i,String(a)]));}return {attributes:e,rest:n}}function Z_(t,{tagName:e="qrdx-code",label:n}={}){if(!Zf.test(e))throw new Error(`qrdx: ${e} is not a custom element name`);let i=Lu(t),{attributes:r,rest:o}=eh(i),{customTemplate:a,...l}=o;n!==void 0&&r.push(["label",n]),Object.keys(l).length>0&&r.push(["props",JSON.stringify(l)]);let s=r.map(([u,m])=>m===""?` ${u}`:` ${u}="${th(m)}"`).join(""),c=i.value?vt(Ye(ku(i,n))):"";return `<${e}${s}><template shadowrootmode="open"><style>${Fu}</style>${c}</template></${e}>`}/**
26
26
  * @license QR Code generator library (TypeScript)
27
27
  * Copyright (c) Project Nayuki.
28
28
  * SPDX-License-Identifier: MIT
29
- */export{hc as QRDX_CODE_STYLES,gn as QRdxCodeElement,Ug as defineQRdxCode,zg as toQRdxCodeHTML};//# sourceMappingURL=element.browser.mjs.map
29
+ */export{Fu as QRDX_CODE_STYLES,In as QRdxCodeElement,X_ as defineQRdxCode,Z_ as toQRdxCodeHTML};//# sourceMappingURL=element.browser.mjs.map
30
30
  //# sourceMappingURL=element.browser.mjs.map