@imgly/plugin-qr-code-web 0.1.2 → 1.69.0-nightly.20260130
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -1
- package/README.md +5 -46
- package/dist/.tsbuildinfo +1 -0
- package/dist/index.d.ts +1 -3
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +4 -4
- package/dist/plugin.d.ts +1 -1
- package/package.json +25 -30
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,50 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @imgly/plugin-qr-code-web
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
QR code generation plugin for the CE.SDK editor
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
For documentation, visit: https://img.ly/docs/cesdk
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## License
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
yarn add @imgly/plugin-qr-code-web
|
|
11
|
-
npm install @imgly/plugin-qr-code-web
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
## Usage
|
|
15
|
-
|
|
16
|
-
Adding the plugin to CE.SDK will register panels and components that can be used inside the editor.
|
|
17
|
-
|
|
18
|
-
```typescript
|
|
19
|
-
import CreativeEditorSDK from '@cesdk/cesdk-js';
|
|
20
|
-
import QrCodePlugin from '@imgly/plugin-qr-code-web';
|
|
21
|
-
|
|
22
|
-
const config = {
|
|
23
|
-
license: '<your-license-here>'
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const cesdk = await CreativeEditorSDK.create(container, config);
|
|
27
|
-
await cesdk.addDefaultAssetSources(),
|
|
28
|
-
await cesdk.addDemoAssetSources({ sceneMode: 'Design' }),
|
|
29
|
-
|
|
30
|
-
await cesdk.addPlugin(QrCodePlugin());
|
|
31
|
-
|
|
32
|
-
await cesdk.createDesignScene();
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Configuration
|
|
36
|
-
|
|
37
|
-
### Adding Dock Component
|
|
38
|
-
|
|
39
|
-
After adding the plugin to CE.SDK, it will register a component that can be
|
|
40
|
-
used inside the dock to create a QR code.
|
|
41
|
-
|
|
42
|
-
```typescript
|
|
43
|
-
cesdk.ui.setDockOrder([
|
|
44
|
-
...cesdk.ui.getDockOrder(),
|
|
45
|
-
// The spacer is optional and pushes the QR code generator to the bottom
|
|
46
|
-
'ly.img.spacer',
|
|
47
|
-
// This will add a button to the dock that opens the QR code generator panel
|
|
48
|
-
'ly.img.generate-qr.dock'
|
|
49
|
-
]);
|
|
50
|
-
```
|
|
9
|
+
This plugin is part of the IMG.LY plugin ecosystem for CreativeEditor SDK.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/@cesdk+engine@1.69.0-nightly.20260130_react@18.3.1/node_modules/@cesdk/engine/index.d.ts","../../../node_modules/.pnpm/@types+react@18.3.27/node_modules/@types/react/global.d.ts","../../../node_modules/.pnpm/csstype@3.2.3/node_modules/csstype/index.d.ts","../../../node_modules/.pnpm/@types+prop-types@15.7.15/node_modules/@types/prop-types/index.d.ts","../../../node_modules/.pnpm/@types+react@18.3.27/node_modules/@types/react/index.d.ts","../../../node_modules/.pnpm/@types+react-dom@18.3.7_@types+react@18.3.27/node_modules/@types/react-dom/client.d.ts","../../../node_modules/.pnpm/@cesdk+cesdk-js@1.69.0-nightly.20260130_react@18.3.1/node_modules/@cesdk/cesdk-js/index.d.ts","../../../internal/plugin-utils/dist/assetSources/CustomAssetSource.d.ts","../../../internal/plugin-utils/dist/assetSources/IndexedDBAssetSource.d.ts","../../../internal/plugin-utils/dist/assetSources/AggregatedAssetSource.d.ts","../../../internal/plugin-utils/dist/metadata/Metadata.d.ts","../../../internal/plugin-utils/dist/metadata/types.d.ts","../../../internal/plugin-utils/dist/metadata/FillProcessingMetadata.d.ts","../../../internal/plugin-utils/dist/processing/fillProcessing.d.ts","../../../internal/plugin-utils/dist/processing/initializeFillProcessing.d.ts","../../../internal/plugin-utils/dist/processing/registerFillProcessingComponents.d.ts","../../../internal/plugin-utils/dist/types/Optional.d.ts","../../../internal/plugin-utils/dist/types/UserInterfaceConfiguration.d.ts","../../../internal/plugin-utils/dist/utils/colors.d.ts","../../../internal/plugin-utils/dist/utils/upload.d.ts","../../../internal/plugin-utils/dist/utils/uuid.d.ts","../../../internal/plugin-utils/dist/utils/images.d.ts","../../../internal/plugin-utils/dist/utils/isDefined.d.ts","../../../internal/plugin-utils/dist/utils/toArray.d.ts","../../../internal/plugin-utils/dist/translationHelpers.d.ts","../../../internal/plugin-utils/dist/index.d.ts","../src/lib/qrcodegen.ts","../src/qr.ts","../src/plugin.ts","../src/index.ts","../src/types.ts","../esbuild/global.d.ts","../../../node_modules/.pnpm/@types+ndarray@1.0.14/node_modules/@types/ndarray/index.d.ts"],"fileIdsList":[[38],[32],[39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56],[42,43],[38,43,57],[38,57],[32,36,37],[36],[33,34,35],[60],[32,38,57,59],[58]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"402036bd3e6a3484eabb7896fbc1474d6e50ea1d71b6fc9d5644869e9e8913b7","impliedFormat":99},{"version":"eb5b19b86227ace1d29ea4cf81387279d04bb34051e944bc53df69f58914b788","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"87d9d29dbc745f182683f63187bf3d53fd8673e5fca38ad5eaab69798ed29fbc","impliedFormat":1},{"version":"7a3aa194cfd5919c4da251ef04ea051077e22702638d4edcb9579e9101653519","affectsGlobalScope":true,"impliedFormat":1},{"version":"05321b823dd3781d0b6aac8700bfdc0c9181d56479fe52ba6a40c9196fd661a8","impliedFormat":1},{"version":"d8fdfe8bd0fd0d4c985d6beaa02a36918de12059c3401a164a928d77da5b384d","impliedFormat":99},"395930038878d2820bae19148bfbbfea0dc4d6a5f0937081d1f818aa1a5344c8","bb310394bed87e0518177d56d03ed9302644d7c6131f0065610c89159d785a53","48d1d8068fdbf3a80f65bfddc6833009bb73522a85ac66ba01cbe88431869a7b","9792a6ceb95a9b12a06bf77dafa60773111aebd3676e74d9f015a01b2ce9ad4e","3b66b77dc1c65e79292b24ca485ab9f224c57d59c9b1483dd4142040aaf3ab10","cb022fa0053b67ba57a4e61d2f655757b35fbaaf6bbab1f8e7d8e71c595e77ce","3c364501427d75086144822fdff35f9d12fc46d30a15589d4bf1ec58604e5d81","a711cc0a1b5635ad802047cc72ce5bbfedb3ee4166e1c58f6b67eae79d41b690","9925441ad64712f91750f97a35026857ef85bcbb673ce5232f814eee749a4932","67110113d27335e8fb7a32087a5cce2316627867b67b2df252d9cfbc3826ab34","0a8f2dbe1118ebc2070fec7bb921bb86cc48fa6e62a172a300e525e291e64488","8a501b3e5592be6d51ef04c1dbdf625c5c8d242612c8365b43ba2b6ea0a8dc18","8c0e8ac147427276b9977392caa11e35402b6a29460cf1bfa486e7fd8ab55850","da2cff8595faeb98d2246fbe5c2a96efdc04525b7868e258ad06a24b298ba648","2e6a7c89b4fb214da5440bf4fe04dfea899a6e9052f0c8493f8fb08c74e94a55","2eda1174ba5d7df48620e859dc6dd04e0abae33ae1b1bca7571ba3b33874ace0","1708d1f9960568c3d158a5d70d7837520a0a09bc1a9462e65468910397afba44","3ee86f1c530b1603f3dd9b377a778a44bbe1ecb0539cf7793d3967afd47c8f9b","a4927ed9cbea5c7fedcae6344c70b88d9026525545a6d48748071233b929ae33",{"version":"a34e609b123e592c453d82d23a97bc1a1773162919e8a5ebe61c0e2b5f332370","signature":"e3eed1477a2d2424e54602d871e92b9991f36c50479493ac9e28c41b6a311237"},{"version":"c3f7cf44598eec9c593a1aa386773f2da5bbc86007bd88b6896a18727c8b8f09","signature":"295575918649b896e61d1e278cd4a8f0c51f04157949490478be9edd392a088d"},{"version":"965d8f31afa6c8f6c0a16bf4787846fbadd67f4218cc095e54d389bdd3751e4e","signature":"f890f80c67a430560b1025ff5252963db52e35767e88d4345e9a162f4603dc3d"},{"version":"88d0533b03e062d398a7a12483f059b55aa62dec1a1d01910669cef95bd52f2d","signature":"c5f44b10ddc44d6aed9bfe8917e0519e7f008a9207ebdd95a38cb1f436a3eee2"},{"version":"64c10a4e32bc17cd9a26a683b7b3fcfe6722740a33a2cda157539917a9e164a8","signature":"6ba3cf0ee1e6e2f182413dc0e232e2138ce75747227f53f95db614dc774c9dee"},{"version":"9180dee655300a81a1ba84d945901d773f54b6e535a5730c56722c052ddddc33","affectsGlobalScope":true},{"version":"08c5f8a855984aaf4b7df847c53ac7e87c32350d4ab151370f262a822fa96d8d","impliedFormat":1}],"root":[[58,63]],"options":{"declaration":true,"declarationDir":"./","emitDeclarationOnly":true,"esModuleInterop":true,"module":6,"skipLibCheck":true,"strict":true,"target":4,"tsBuildInfoFile":"./.tsbuildinfo"},"referencedMap":[[41,1],[39,2],[40,1],[57,3],[44,4],[42,1],[43,1],[45,5],[46,6],[47,1],[50,1],[53,1],[51,1],[38,7],[37,8],[36,9],[61,10],[60,11],[59,12]],"version":"5.9.3"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { type PluginConfiguration } from './plugin';
|
|
2
2
|
declare const Plugin: (pluginConfiguration?: PluginConfiguration) => {
|
|
3
|
-
initialize: (context: import("@cesdk/
|
|
4
|
-
cesdk?: import("@cesdk/cesdk-js").default | undefined;
|
|
5
|
-
}) => void;
|
|
3
|
+
initialize: (context: import("@cesdk/cesdk-js").EditorPluginContext) => void | Promise<void>;
|
|
6
4
|
name: string;
|
|
7
5
|
version: string;
|
|
8
6
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var Pe=class{constructor(e,i){this.engine=e,this.key=i}hasData(e){return this.engine.block.isValid(e)&&this.engine.block.hasMetadata(e,this.key)}get(e){if(this.hasData(e))return JSON.parse(this.engine.block.getMetadata(e,this.key))}set(e,i){this.engine.block.setMetadata(e,this.key,JSON.stringify(i))}clear(e){this.engine.block.hasMetadata(e,this.key)&&this.engine.block.removeMetadata(e,this.key)}},de=Pe,Me=typeof global=="object"&&global&&global.Object===Object&&global,ge=Me,ke=typeof self=="object"&&self&&self.Object===Object&&self,_e=ge||ke||Function("return this")(),A=_e,Fe=A.Symbol,I=Fe,be=Object.prototype,Ne=be.hasOwnProperty,Oe=be.toString,O=I?I.toStringTag:void 0;function je(e){var i=Ne.call(e,O),o=e[O];try{e[O]=void 0;var s=!0}catch{}var c=Oe.call(e);return s&&(i?e[O]=o:delete e[O]),c}var De=je,Be=Object.prototype,xe=Be.toString;function Te(e){return xe.call(e)}var ze=Te,Ue="[object Null]",Le="[object Undefined]",ee=I?I.toStringTag:void 0;function $e(e){return e==null?e===void 0?Le:Ue:ee&&ee in Object(e)?De(e):ze(e)}var x=$e;function Ve(e){return e!=null&&typeof e=="object"}var X=Ve,Nn=Array.isArray;function He(e){var i=typeof e;return e!=null&&(i=="object"||i=="function")}var ye=He,qe="[object AsyncFunction]",Ge="[object Function]",Ye="[object GeneratorFunction]",Ke="[object Proxy]";function Xe(e){if(!ye(e))return!1;var i=x(e);return i==Ge||i==Ye||i==qe||i==Ke}var Ze=Xe,We=A["__core-js_shared__"],$=We,te=function(){var e=/[^.]+$/.exec($&&$.keys&&$.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Je(e){return!!te&&te in e}var Qe=Je,et=Function.prototype,tt=et.toString;function rt(e){if(e!=null){try{return tt.call(e)}catch{}try{return e+""}catch{}}return""}var R=rt,nt=/[\\^$.*+?()[\]{}|]/g,it=/^\[object .+?Constructor\]$/,at=Function.prototype,ot=Object.prototype,lt=at.toString,st=ot.hasOwnProperty,ct=RegExp("^"+lt.call(st).replace(nt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ut(e){if(!ye(e)||Qe(e))return!1;var i=Ze(e)?ct:it;return i.test(R(e))}var ft=ut;function pt(e,i){return e?.[i]}var ht=pt;function dt(e,i){var o=ht(e,i);return ft(o)?o:void 0}var P=dt,gt=P(A,"WeakMap"),H=gt;function bt(e,i){return e===i||e!==e&&i!==i}var yt=bt,vt=9007199254740991;function mt(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=vt}var Et=mt;var On=Object.prototype;var At="[object Arguments]";function wt(e){return X(e)&&x(e)==At}var re=wt,ve=Object.prototype,Rt=ve.hasOwnProperty,St=ve.propertyIsEnumerable,jn=re(function(){return arguments}())?re:function(e){return X(e)&&Rt.call(e,"callee")&&!St.call(e,"callee")};var me=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ne=me&&typeof module=="object"&&module&&!module.nodeType&&module,Ct=ne&&ne.exports===me,ie=Ct?A.Buffer:void 0,Dn=ie?ie.isBuffer:void 0;var It="[object Arguments]",Pt="[object Array]",Mt="[object Boolean]",kt="[object Date]",_t="[object Error]",Ft="[object Function]",Nt="[object Map]",Ot="[object Number]",jt="[object Object]",Dt="[object RegExp]",Bt="[object Set]",xt="[object String]",Tt="[object WeakMap]",zt="[object ArrayBuffer]",Ut="[object DataView]",Lt="[object Float32Array]",$t="[object Float64Array]",Vt="[object Int8Array]",Ht="[object Int16Array]",qt="[object Int32Array]",Gt="[object Uint8Array]",Yt="[object Uint8ClampedArray]",Kt="[object Uint16Array]",Xt="[object Uint32Array]",g={};g[Lt]=g[$t]=g[Vt]=g[Ht]=g[qt]=g[Gt]=g[Yt]=g[Kt]=g[Xt]=!0;g[It]=g[Pt]=g[zt]=g[Mt]=g[Ut]=g[kt]=g[_t]=g[Ft]=g[Nt]=g[Ot]=g[jt]=g[Dt]=g[Bt]=g[xt]=g[Tt]=!1;function Zt(e){return X(e)&&Et(e.length)&&!!g[x(e)]}var Wt=Zt;function Jt(e){return function(i){return e(i)}}var Qt=Jt,Ee=typeof exports=="object"&&exports&&!exports.nodeType&&exports,j=Ee&&typeof module=="object"&&module&&!module.nodeType&&module,er=j&&j.exports===Ee,V=er&&ge.process,tr=function(){try{var e=j&&j.require&&j.require("util").types;return e||V&&V.binding&&V.binding("util")}catch{}}(),ae=tr,oe=ae&&ae.isTypedArray,Bn=oe?Qt(oe):Wt;var rr=Object.prototype,xn=rr.hasOwnProperty;function nr(e,i){return function(o){return e(i(o))}}var ir=nr,Tn=ir(Object.keys,Object);var ar=Object.prototype,zn=ar.hasOwnProperty;var or=P(Object,"create"),D=or;function lr(){this.__data__=D?D(null):{},this.size=0}var sr=lr;function cr(e){var i=this.has(e)&&delete this.__data__[e];return this.size-=i?1:0,i}var ur=cr,fr="__lodash_hash_undefined__",pr=Object.prototype,hr=pr.hasOwnProperty;function dr(e){var i=this.__data__;if(D){var o=i[e];return o===fr?void 0:o}return hr.call(i,e)?i[e]:void 0}var gr=dr,br=Object.prototype,yr=br.hasOwnProperty;function vr(e){var i=this.__data__;return D?i[e]!==void 0:yr.call(i,e)}var mr=vr,Er="__lodash_hash_undefined__";function Ar(e,i){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=D&&i===void 0?Er:i,this}var wr=Ar;function M(e){var i=-1,o=e==null?0:e.length;for(this.clear();++i<o;){var s=e[i];this.set(s[0],s[1])}}M.prototype.clear=sr;M.prototype.delete=ur;M.prototype.get=gr;M.prototype.has=mr;M.prototype.set=wr;var le=M;function Rr(){this.__data__=[],this.size=0}var Sr=Rr;function Cr(e,i){for(var o=e.length;o--;)if(yt(e[o][0],i))return o;return-1}var z=Cr,Ir=Array.prototype,Pr=Ir.splice;function Mr(e){var i=this.__data__,o=z(i,e);if(o<0)return!1;var s=i.length-1;return o==s?i.pop():Pr.call(i,o,1),--this.size,!0}var kr=Mr;function _r(e){var i=this.__data__,o=z(i,e);return o<0?void 0:i[o][1]}var Fr=_r;function Nr(e){return z(this.__data__,e)>-1}var Or=Nr;function jr(e,i){var o=this.__data__,s=z(o,e);return s<0?(++this.size,o.push([e,i])):o[s][1]=i,this}var Dr=jr;function k(e){var i=-1,o=e==null?0:e.length;for(this.clear();++i<o;){var s=e[i];this.set(s[0],s[1])}}k.prototype.clear=Sr;k.prototype.delete=kr;k.prototype.get=Fr;k.prototype.has=Or;k.prototype.set=Dr;var U=k,Br=P(A,"Map"),B=Br;function xr(){this.size=0,this.__data__={hash:new le,map:new(B||U),string:new le}}var Tr=xr;function zr(e){var i=typeof e;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?e!=="__proto__":e===null}var Ur=zr;function Lr(e,i){var o=e.__data__;return Ur(i)?o[typeof i=="string"?"string":"hash"]:o.map}var L=Lr;function $r(e){var i=L(this,e).delete(e);return this.size-=i?1:0,i}var Vr=$r;function Hr(e){return L(this,e).get(e)}var qr=Hr;function Gr(e){return L(this,e).has(e)}var Yr=Gr;function Kr(e,i){var o=L(this,e),s=o.size;return o.set(e,i),this.size+=o.size==s?0:1,this}var Xr=Kr;function _(e){var i=-1,o=e==null?0:e.length;for(this.clear();++i<o;){var s=e[i];this.set(s[0],s[1])}}_.prototype.clear=Tr;_.prototype.delete=Vr;_.prototype.get=qr;_.prototype.has=Yr;_.prototype.set=Xr;var Ae=_;function Zr(){this.__data__=new U,this.size=0}var Wr=Zr;function Jr(e){var i=this.__data__,o=i.delete(e);return this.size=i.size,o}var Qr=Jr;function en(e){return this.__data__.get(e)}var tn=en;function rn(e){return this.__data__.has(e)}var nn=rn,an=200;function on(e,i){var o=this.__data__;if(o instanceof U){var s=o.__data__;if(!B||s.length<an-1)return s.push([e,i]),this.size=++o.size,this;o=this.__data__=new Ae(s)}return o.set(e,i),this.size=o.size,this}var ln=on;function T(e){var i=this.__data__=new U(e);this.size=i.size}T.prototype.clear=Wr;T.prototype.delete=Qr;T.prototype.get=tn;T.prototype.has=nn;T.prototype.set=ln;var sn=Object.prototype,Un=sn.propertyIsEnumerable;var cn=P(A,"DataView"),q=cn,un=P(A,"Promise"),G=un,fn=P(A,"Set"),Y=fn,se="[object Map]",pn="[object Object]",ce="[object Promise]",ue="[object Set]",fe="[object WeakMap]",pe="[object DataView]",hn=R(q),dn=R(B),gn=R(G),bn=R(Y),yn=R(H),C=x;(q&&C(new q(new ArrayBuffer(1)))!=pe||B&&C(new B)!=se||G&&C(G.resolve())!=ce||Y&&C(new Y)!=ue||H&&C(new H)!=fe)&&(C=function(e){var i=x(e),o=i==pn?e.constructor:void 0,s=o?R(o):"";if(s)switch(s){case hn:return pe;case dn:return se;case gn:return ce;case bn:return ue;case yn:return fe}return i});var Ln=A.Uint8Array;var vn="__lodash_hash_undefined__";function mn(e){return this.__data__.set(e,vn),this}var En=mn;function An(e){return this.__data__.has(e)}var wn=An;function K(e){var i=-1,o=e==null?0:e.length;for(this.__data__=new Ae;++i<o;)this.add(e[i])}K.prototype.add=K.prototype.push=En;K.prototype.has=wn;var he=I?I.prototype:void 0,$n=he?he.valueOf:void 0;var Rn=Object.prototype,Vn=Rn.hasOwnProperty;var Sn=Object.prototype,Hn=Sn.hasOwnProperty;var qn=new RegExp(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,"i"),Cn=new RegExp(/[A-Fa-f0-9]{1}/,"g"),In=new RegExp(/[A-Fa-f0-9]{2}/,"g"),Z=(e,i=!1)=>{let{r:o,g:s,b:c,a:f}=e,h=Math.round(255*o),t=Math.round(255*s),n=Math.round(255*c),r=Math.round(255*f),a=l=>l.toString(16).padStart(2,"0");return`#${a(h)}${a(t)}${a(n)}${i?a(r):""}`},we=e=>{let i=(o,s,c,f,h)=>({r:parseInt(o,16)/h,g:parseInt(s,16)/h,b:parseInt(c,16)/h,a:f===void 0?1:parseInt(f,16)/h});if(e.startsWith("#")){if(e.length===4||e.length===5){let o=e.match(Cn);if(o){let[s,c,f,h]=o;return i(s,c,f,h,15)}}if(e.length===7||e.length===8){let o=e.match(In);if(o){let[s,c,f,h]=o;return i(s,c,f,h,255)}}}throw new Error('Invalid hex string! Allowed RGB formats are "#FFF" and "#FFFFFF". Allowed RGBA formats are "#FFFF" and "#FFFFFFFF')};var F;(f=>{class e{constructor(t,n,r,a){this.version=t;this.errorCorrectionLevel=n;this.modules=[];this.isFunction=[];if(t<e.MIN_VERSION||t>e.MAX_VERSION)throw new RangeError("Version value out of range");if(a<-1||a>7)throw new RangeError("Mask value out of range");this.size=t*4+17;let l=[];for(let u=0;u<this.size;u++)l.push(!1);for(let u=0;u<this.size;u++)this.modules.push(l.slice()),this.isFunction.push(l.slice());this.drawFunctionPatterns();let p=this.addEccAndInterleave(r);if(this.drawCodewords(p),a==-1){let u=1e9;for(let b=0;b<8;b++){this.applyMask(b),this.drawFormatBits(b);let d=this.getPenaltyScore();d<u&&(a=b,u=d),this.applyMask(b)}}s(0<=a&&a<=7),this.mask=a,this.applyMask(a),this.drawFormatBits(a),this.isFunction=[]}static encodeText(t,n){let r=f.QrSegment.makeSegments(t);return e.encodeSegments(r,n)}static encodeBinary(t,n){let r=f.QrSegment.makeBytes(t);return e.encodeSegments([r],n)}static encodeSegments(t,n,r=1,a=40,l=-1,p=!0){if(!(e.MIN_VERSION<=r&&r<=a&&a<=e.MAX_VERSION)||l<-1||l>7)throw new RangeError("Invalid value");let u,b;for(u=r;;u++){let y=e.getNumDataCodewords(u,n)*8,E=c.getTotalBits(t,u);if(E<=y){b=E;break}if(u>=a)throw new RangeError("Data too long")}for(let y of[e.Ecc.MEDIUM,e.Ecc.QUARTILE,e.Ecc.HIGH])p&&b<=e.getNumDataCodewords(u,y)*8&&(n=y);let d=[];for(let y of t){i(y.mode.modeBits,4,d),i(y.numChars,y.mode.numCharCountBits(u),d);for(let E of y.getData())d.push(E)}s(d.length==b);let N=e.getNumDataCodewords(u,n)*8;s(d.length<=N),i(0,Math.min(4,N-d.length),d),i(0,(8-d.length%8)%8,d),s(d.length%8==0);for(let y=236;d.length<N;y^=253)i(y,8,d);let w=[];for(;w.length*8<d.length;)w.push(0);return d.forEach((y,E)=>w[E>>>3]|=y<<7-(E&7)),new e(u,n,w,l)}getModule(t,n){return 0<=t&&t<this.size&&0<=n&&n<this.size&&this.modules[n][t]}getModules(){return this.modules}drawFunctionPatterns(){for(let r=0;r<this.size;r++)this.setFunctionModule(6,r,r%2==0),this.setFunctionModule(r,6,r%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let t=this.getAlignmentPatternPositions(),n=t.length;for(let r=0;r<n;r++)for(let a=0;a<n;a++)r==0&&a==0||r==0&&a==n-1||r==n-1&&a==0||this.drawAlignmentPattern(t[r],t[a]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){let n=this.errorCorrectionLevel.formatBits<<3|t,r=n;for(let l=0;l<10;l++)r=r<<1^(r>>>9)*1335;let a=(n<<10|r)^21522;s(a>>>15==0);for(let l=0;l<=5;l++)this.setFunctionModule(8,l,o(a,l));this.setFunctionModule(8,7,o(a,6)),this.setFunctionModule(8,8,o(a,7)),this.setFunctionModule(7,8,o(a,8));for(let l=9;l<15;l++)this.setFunctionModule(14-l,8,o(a,l));for(let l=0;l<8;l++)this.setFunctionModule(this.size-1-l,8,o(a,l));for(let l=8;l<15;l++)this.setFunctionModule(8,this.size-15+l,o(a,l));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let r=0;r<12;r++)t=t<<1^(t>>>11)*7973;let n=this.version<<12|t;s(n>>>18==0);for(let r=0;r<18;r++){let a=o(n,r),l=this.size-11+r%3,p=Math.floor(r/3);this.setFunctionModule(l,p,a),this.setFunctionModule(p,l,a)}}drawFinderPattern(t,n){for(let r=-4;r<=4;r++)for(let a=-4;a<=4;a++){let l=Math.max(Math.abs(a),Math.abs(r)),p=t+a,u=n+r;0<=p&&p<this.size&&0<=u&&u<this.size&&this.setFunctionModule(p,u,l!=2&&l!=4)}}drawAlignmentPattern(t,n){for(let r=-2;r<=2;r++)for(let a=-2;a<=2;a++)this.setFunctionModule(t+a,n+r,Math.max(Math.abs(a),Math.abs(r))!=1)}setFunctionModule(t,n,r){this.modules[n][t]=r,this.isFunction[n][t]=!0}addEccAndInterleave(t){let n=this.version,r=this.errorCorrectionLevel;if(t.length!=e.getNumDataCodewords(n,r))throw new RangeError("Invalid argument");let a=e.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n],l=e.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n],p=Math.floor(e.getNumRawDataModules(n)/8),u=a-p%a,b=Math.floor(p/a),d=[],N=e.reedSolomonComputeDivisor(l);for(let y=0,E=0;y<a;y++){let S=t.slice(E,E+b-l+(y<u?0:1));E+=S.length;let Ie=e.reedSolomonComputeRemainder(S,N);y<u&&S.push(0),d.push(S.concat(Ie))}let w=[];for(let y=0;y<d[0].length;y++)d.forEach((E,S)=>{(y!=b-l||S>=u)&&w.push(E[y])});return s(w.length==p),w}drawCodewords(t){if(t.length!=Math.floor(e.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let r=this.size-1;r>=1;r-=2){r==6&&(r=5);for(let a=0;a<this.size;a++)for(let l=0;l<2;l++){let p=r-l,b=(r+1&2)==0?this.size-1-a:a;!this.isFunction[b][p]&&n<t.length*8&&(this.modules[b][p]=o(t[n>>>3],7-(n&7)),n++)}}s(n==t.length*8)}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let r=0;r<this.size;r++){let a;switch(t){case 0:a=(r+n)%2==0;break;case 1:a=n%2==0;break;case 2:a=r%3==0;break;case 3:a=(r+n)%3==0;break;case 4:a=(Math.floor(r/3)+Math.floor(n/2))%2==0;break;case 5:a=r*n%2+r*n%3==0;break;case 6:a=(r*n%2+r*n%3)%2==0;break;case 7:a=((r+n)%2+r*n%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[n][r]&&a&&(this.modules[n][r]=!this.modules[n][r])}}getPenaltyScore(){let t=0;for(let l=0;l<this.size;l++){let p=!1,u=0,b=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[l][d]==p?(u++,u==5?t+=e.PENALTY_N1:u>5&&t++):(this.finderPenaltyAddHistory(u,b),p||(t+=this.finderPenaltyCountPatterns(b)*e.PENALTY_N3),p=this.modules[l][d],u=1);t+=this.finderPenaltyTerminateAndCount(p,u,b)*e.PENALTY_N3}for(let l=0;l<this.size;l++){let p=!1,u=0,b=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[d][l]==p?(u++,u==5?t+=e.PENALTY_N1:u>5&&t++):(this.finderPenaltyAddHistory(u,b),p||(t+=this.finderPenaltyCountPatterns(b)*e.PENALTY_N3),p=this.modules[d][l],u=1);t+=this.finderPenaltyTerminateAndCount(p,u,b)*e.PENALTY_N3}for(let l=0;l<this.size-1;l++)for(let p=0;p<this.size-1;p++){let u=this.modules[l][p];u==this.modules[l][p+1]&&u==this.modules[l+1][p]&&u==this.modules[l+1][p+1]&&(t+=e.PENALTY_N2)}let n=0;for(let l of this.modules)n=l.reduce((p,u)=>p+(u?1:0),n);let r=this.size*this.size,a=Math.ceil(Math.abs(n*20-r*10)/r)-1;return s(0<=a&&a<=9),t+=a*e.PENALTY_N4,s(0<=t&&t<=2568888),t}getAlignmentPatternPositions(){if(this.version==1)return[];{let t=Math.floor(this.version/7)+2,n=this.version==32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,r=[6];for(let a=this.size-7;r.length<t;a-=n)r.splice(1,0,a);return r}}static getNumRawDataModules(t){if(t<e.MIN_VERSION||t>e.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*t+128)*t+64;if(t>=2){let r=Math.floor(t/7)+2;n-=(25*r-10)*r-55,t>=7&&(n-=36)}return s(208<=n&&n<=29648),n}static getNumDataCodewords(t,n){return Math.floor(e.getNumRawDataModules(t)/8)-e.ECC_CODEWORDS_PER_BLOCK[n.ordinal][t]*e.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][t]}static reedSolomonComputeDivisor(t){if(t<1||t>255)throw new RangeError("Degree out of range");let n=[];for(let a=0;a<t-1;a++)n.push(0);n.push(1);let r=1;for(let a=0;a<t;a++){for(let l=0;l<n.length;l++)n[l]=e.reedSolomonMultiply(n[l],r),l+1<n.length&&(n[l]^=n[l+1]);r=e.reedSolomonMultiply(r,2)}return n}static reedSolomonComputeRemainder(t,n){let r=n.map(a=>0);for(let a of t){let l=a^r.shift();r.push(0),n.forEach((p,u)=>r[u]^=e.reedSolomonMultiply(p,l))}return r}static reedSolomonMultiply(t,n){if(t>>>8||n>>>8)throw new RangeError("Byte out of range");let r=0;for(let a=7;a>=0;a--)r=r<<1^(r>>>7)*285,r^=(n>>>a&1)*t;return s(r>>>8==0),r}finderPenaltyCountPatterns(t){let n=t[1];s(n<=this.size*3);let r=n>0&&t[2]==n&&t[3]==n*3&&t[4]==n&&t[5]==n;return(r&&t[0]>=n*4&&t[6]>=n?1:0)+(r&&t[6]>=n*4&&t[0]>=n?1:0)}finderPenaltyTerminateAndCount(t,n,r){return t&&(this.finderPenaltyAddHistory(n,r),n=0),n+=this.size,this.finderPenaltyAddHistory(n,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(t,n){n[0]==0&&(t+=this.size),n.pop(),n.unshift(t)}static{this.MIN_VERSION=1}static{this.MAX_VERSION=40}static{this.PENALTY_N1=3}static{this.PENALTY_N2=3}static{this.PENALTY_N3=40}static{this.PENALTY_N4=10}static{this.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{this.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]]}}f.QrCode=e;function i(h,t,n){if(t<0||t>31||h>>>t)throw new RangeError("Value out of range");for(let r=t-1;r>=0;r--)n.push(h>>>r&1)}function o(h,t){return(h>>>t&1)!=0}function s(h){if(!h)throw new Error("Assertion error")}class c{constructor(t,n,r){this.mode=t;this.numChars=n;this.bitData=r;if(n<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(t){let n=[];for(let r of t)i(r,8,n);return new c(c.Mode.BYTE,t.length,n)}static makeNumeric(t){if(!c.isNumeric(t))throw new RangeError("String contains non-numeric characters");let n=[];for(let r=0;r<t.length;){let a=Math.min(t.length-r,3);i(parseInt(t.substring(r,r+a),10),a*3+1,n),r+=a}return new c(c.Mode.NUMERIC,t.length,n)}static makeAlphanumeric(t){if(!c.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");let n=[],r;for(r=0;r+2<=t.length;r+=2){let a=c.ALPHANUMERIC_CHARSET.indexOf(t.charAt(r))*45;a+=c.ALPHANUMERIC_CHARSET.indexOf(t.charAt(r+1)),i(a,11,n)}return r<t.length&&i(c.ALPHANUMERIC_CHARSET.indexOf(t.charAt(r)),6,n),new c(c.Mode.ALPHANUMERIC,t.length,n)}static makeSegments(t){return t==""?[]:c.isNumeric(t)?[c.makeNumeric(t)]:c.isAlphanumeric(t)?[c.makeAlphanumeric(t)]:[c.makeBytes(c.toUtf8ByteArray(t))]}static makeEci(t){let n=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)i(t,8,n);else if(t<16384)i(2,2,n),i(t,14,n);else if(t<1e6)i(6,3,n),i(t,21,n);else throw new RangeError("ECI assignment value out of range");return new c(c.Mode.ECI,0,n)}static isNumeric(t){return c.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return c.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(t,n){let r=0;for(let a of t){let l=a.mode.numCharCountBits(n);if(a.numChars>=1<<l)return 1/0;r+=4+l+a.bitData.length}return r}static toUtf8ByteArray(t){t=encodeURI(t);let n=[];for(let r=0;r<t.length;r++)t.charAt(r)!="%"?n.push(t.charCodeAt(r)):(n.push(parseInt(t.substring(r+1,r+3),16)),r+=2);return n}static{this.NUMERIC_REGEX=/^[0-9]*$/}static{this.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/}static{this.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"}}f.QrSegment=c})(F||={});(i=>{let e;(s=>{class o{constructor(f,h){this.ordinal=f;this.formatBits=h}static{this.LOW=new o(0,1)}static{this.MEDIUM=new o(1,0)}static{this.QUARTILE=new o(2,3)}static{this.HIGH=new o(3,2)}}s.Ecc=o})(e=i.QrCode||={})})(F||={});(i=>{let e;(s=>{class o{constructor(f,h){this.modeBits=f;this.numBitsCharCount=h}static{this.NUMERIC=new o(1,[10,12,14])}static{this.ALPHANUMERIC=new o(2,[9,11,13])}static{this.BYTE=new o(4,[8,16,16])}static{this.KANJI=new o(8,[8,10,12])}static{this.ECI=new o(7,[0,0,0])}numCharCountBits(f){return this.numBitsCharCount[Math.floor((f+7)/17)]}}s.Mode=o})(e=i.QrSegment||={})})(F||={});var W=F;function J(e,i){let o=W.QrCode.encodeText(e,W.QrCode.Ecc.HIGH),s=Pn(o);return{svg:Mn(s,i,o.size),path:s,size:o.size}}function Pn(e){let i=[];for(let o=0;o<e.size;o++)for(let s=0;s<e.size;s++)e.getModule(s,o)&&i.push(`M${s},${o}h1v1h-1z`);return i.join(" ")}function Mn(e,i,o){return`<?xml version="1.0" encoding="UTF-8"?>
|
|
1
|
+
var Rt=class{constructor(t,n){this.engine=t,this.key=n}hasData(t){return this.engine.block.isValid(t)&&this.engine.block.hasMetadata(t,this.key)}get(t){if(this.hasData(t))return JSON.parse(this.engine.block.getMetadata(t,this.key))}set(t,n){this.engine.block.setMetadata(t,this.key,JSON.stringify(n))}clear(t){this.engine.block.hasMetadata(t,this.key)&&this.engine.block.removeMetadata(t,this.key)}},pt=Rt,Mt=typeof global=="object"&&global&&global.Object===Object&&global,gt=Mt,kt=typeof self=="object"&&self&&self.Object===Object&&self,Nt=gt||kt||Function("return this")(),A=Nt,Ft=A.Symbol,P=Ft,bt=Object.prototype,xt=bt.hasOwnProperty,Ot=bt.toString,O=P?P.toStringTag:void 0;function Bt(t){var n=xt.call(t,O),o=t[O];try{t[O]=void 0;var l=!0}catch{}var c=Ot.call(t);return l&&(n?t[O]=o:delete t[O]),c}var _t=Bt,jt=Object.prototype,Vt=jt.toString;function Dt(t){return Vt.call(t)}var Lt=Dt,Ht="[object Null]",$t="[object Undefined]",tt=P?P.toStringTag:void 0;function Ut(t){return t==null?t===void 0?$t:Ht:tt&&tt in Object(t)?_t(t):Lt(t)}var V=Ut;function zt(t){return t!=null&&typeof t=="object"}var W=zt,Fi=Array.isArray;function Tt(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}var yt=Tt,Gt="[object AsyncFunction]",qt="[object Function]",Zt="[object GeneratorFunction]",Yt="[object Proxy]";function Wt(t){if(!yt(t))return!1;var n=V(t);return n==qt||n==Zt||n==Gt||n==Yt}var Kt=Wt,Xt=A["__core-js_shared__"],U=Xt,et=function(){var t=/[^.]+$/.exec(U&&U.keys&&U.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Jt(t){return!!et&&et in t}var Qt=Jt,te=Function.prototype,ee=te.toString;function re(t){if(t!=null){try{return ee.call(t)}catch{}try{return t+""}catch{}}return""}var S=re,ie=/[\\^$.*+?()[\]{}|]/g,ne=/^\[object .+?Constructor\]$/,ae=Function.prototype,oe=Object.prototype,se=ae.toString,le=oe.hasOwnProperty,ce=RegExp("^"+se.call(le).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ue(t){if(!yt(t)||Qt(t))return!1;var n=Kt(t)?ce:ne;return n.test(S(t))}var de=ue;function he(t,n){return t?.[n]}var fe=he;function pe(t,n){var o=fe(t,n);return de(o)?o:void 0}var R=pe,ge=R(A,"WeakMap"),T=ge;function be(t,n){return t===n||t!==t&&n!==n}var ye=be,ve=9007199254740991;function me(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ve}var we=me;var xi=Object.prototype;var Ae="[object Arguments]";function Ce(t){return W(t)&&V(t)==Ae}var rt=Ce,vt=Object.prototype,Se=vt.hasOwnProperty,Ee=vt.propertyIsEnumerable,Oi=rt(function(){return arguments}())?rt:function(t){return W(t)&&Se.call(t,"callee")&&!Ee.call(t,"callee")};var mt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,it=mt&&typeof module=="object"&&module&&!module.nodeType&&module,Ie=it&&it.exports===mt,nt=Ie?A.Buffer:void 0,Bi=nt?nt.isBuffer:void 0;var Pe="[object Arguments]",Re="[object Array]",Me="[object Boolean]",ke="[object Date]",Ne="[object Error]",Fe="[object Function]",xe="[object Map]",Oe="[object Number]",Be="[object Object]",_e="[object RegExp]",je="[object Set]",Ve="[object String]",De="[object WeakMap]",Le="[object ArrayBuffer]",He="[object DataView]",$e="[object Float32Array]",Ue="[object Float64Array]",ze="[object Int8Array]",Te="[object Int16Array]",Ge="[object Int32Array]",qe="[object Uint8Array]",Ze="[object Uint8ClampedArray]",Ye="[object Uint16Array]",We="[object Uint32Array]",g={};g[$e]=g[Ue]=g[ze]=g[Te]=g[Ge]=g[qe]=g[Ze]=g[Ye]=g[We]=!0;g[Pe]=g[Re]=g[Le]=g[Me]=g[He]=g[ke]=g[Ne]=g[Fe]=g[xe]=g[Oe]=g[Be]=g[_e]=g[je]=g[Ve]=g[De]=!1;function Ke(t){return W(t)&&we(t.length)&&!!g[V(t)]}var Xe=Ke;function Je(t){return function(n){return t(n)}}var Qe=Je,wt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,B=wt&&typeof module=="object"&&module&&!module.nodeType&&module,tr=B&&B.exports===wt,z=tr&>.process,er=function(){try{var t=B&&B.require&&B.require("util").types;return t||z&&z.binding&&z.binding("util")}catch{}}(),at=er,ot=at&&at.isTypedArray,_i=ot?Qe(ot):Xe;var rr=Object.prototype,ji=rr.hasOwnProperty;function ir(t,n){return function(o){return t(n(o))}}var nr=ir,Vi=nr(Object.keys,Object);var ar=Object.prototype,Di=ar.hasOwnProperty;var or=R(Object,"create"),_=or;function sr(){this.__data__=_?_(null):{},this.size=0}var lr=sr;function cr(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}var ur=cr,dr="__lodash_hash_undefined__",hr=Object.prototype,fr=hr.hasOwnProperty;function pr(t){var n=this.__data__;if(_){var o=n[t];return o===dr?void 0:o}return fr.call(n,t)?n[t]:void 0}var gr=pr,br=Object.prototype,yr=br.hasOwnProperty;function vr(t){var n=this.__data__;return _?n[t]!==void 0:yr.call(n,t)}var mr=vr,wr="__lodash_hash_undefined__";function Ar(t,n){var o=this.__data__;return this.size+=this.has(t)?0:1,o[t]=_&&n===void 0?wr:n,this}var Cr=Ar;function M(t){var n=-1,o=t==null?0:t.length;for(this.clear();++n<o;){var l=t[n];this.set(l[0],l[1])}}M.prototype.clear=lr;M.prototype.delete=ur;M.prototype.get=gr;M.prototype.has=mr;M.prototype.set=Cr;var st=M;function Sr(){this.__data__=[],this.size=0}var Er=Sr;function Ir(t,n){for(var o=t.length;o--;)if(ye(t[o][0],n))return o;return-1}var L=Ir,Pr=Array.prototype,Rr=Pr.splice;function Mr(t){var n=this.__data__,o=L(n,t);if(o<0)return!1;var l=n.length-1;return o==l?n.pop():Rr.call(n,o,1),--this.size,!0}var kr=Mr;function Nr(t){var n=this.__data__,o=L(n,t);return o<0?void 0:n[o][1]}var Fr=Nr;function xr(t){return L(this.__data__,t)>-1}var Or=xr;function Br(t,n){var o=this.__data__,l=L(o,t);return l<0?(++this.size,o.push([t,n])):o[l][1]=n,this}var _r=Br;function k(t){var n=-1,o=t==null?0:t.length;for(this.clear();++n<o;){var l=t[n];this.set(l[0],l[1])}}k.prototype.clear=Er;k.prototype.delete=kr;k.prototype.get=Fr;k.prototype.has=Or;k.prototype.set=_r;var H=k,jr=R(A,"Map"),j=jr;function Vr(){this.size=0,this.__data__={hash:new st,map:new(j||H),string:new st}}var Dr=Vr;function Lr(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}var Hr=Lr;function $r(t,n){var o=t.__data__;return Hr(n)?o[typeof n=="string"?"string":"hash"]:o.map}var $=$r;function Ur(t){var n=$(this,t).delete(t);return this.size-=n?1:0,n}var zr=Ur;function Tr(t){return $(this,t).get(t)}var Gr=Tr;function qr(t){return $(this,t).has(t)}var Zr=qr;function Yr(t,n){var o=$(this,t),l=o.size;return o.set(t,n),this.size+=o.size==l?0:1,this}var Wr=Yr;function N(t){var n=-1,o=t==null?0:t.length;for(this.clear();++n<o;){var l=t[n];this.set(l[0],l[1])}}N.prototype.clear=Dr;N.prototype.delete=zr;N.prototype.get=Gr;N.prototype.has=Zr;N.prototype.set=Wr;var At=N;function Kr(){this.__data__=new H,this.size=0}var Xr=Kr;function Jr(t){var n=this.__data__,o=n.delete(t);return this.size=n.size,o}var Qr=Jr;function ti(t){return this.__data__.get(t)}var ei=ti;function ri(t){return this.__data__.has(t)}var ii=ri,ni=200;function ai(t,n){var o=this.__data__;if(o instanceof H){var l=o.__data__;if(!j||l.length<ni-1)return l.push([t,n]),this.size=++o.size,this;o=this.__data__=new At(l)}return o.set(t,n),this.size=o.size,this}var oi=ai;function D(t){var n=this.__data__=new H(t);this.size=n.size}D.prototype.clear=Xr;D.prototype.delete=Qr;D.prototype.get=ei;D.prototype.has=ii;D.prototype.set=oi;var si=Object.prototype,Li=si.propertyIsEnumerable;var li=R(A,"DataView"),G=li,ci=R(A,"Promise"),q=ci,ui=R(A,"Set"),Z=ui,lt="[object Map]",di="[object Object]",ct="[object Promise]",ut="[object Set]",dt="[object WeakMap]",ht="[object DataView]",hi=S(G),fi=S(j),pi=S(q),gi=S(Z),bi=S(T),I=V;(G&&I(new G(new ArrayBuffer(1)))!=ht||j&&I(new j)!=lt||q&&I(q.resolve())!=ct||Z&&I(new Z)!=ut||T&&I(new T)!=dt)&&(I=function(t){var n=V(t),o=n==di?t.constructor:void 0,l=o?S(o):"";if(l)switch(l){case hi:return ht;case fi:return lt;case pi:return ct;case gi:return ut;case bi:return dt}return n});var Hi=A.Uint8Array;var yi="__lodash_hash_undefined__";function vi(t){return this.__data__.set(t,yi),this}var mi=vi;function wi(t){return this.__data__.has(t)}var Ai=wi;function Y(t){var n=-1,o=t==null?0:t.length;for(this.__data__=new At;++n<o;)this.add(t[n])}Y.prototype.add=Y.prototype.push=mi;Y.prototype.has=Ai;var ft=P?P.prototype:void 0,$i=ft?ft.valueOf:void 0;var Ci=Object.prototype,Ui=Ci.hasOwnProperty;var Si=Object.prototype,zi=Si.hasOwnProperty;var Ti=new RegExp(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,"i"),Ei=new RegExp(/[A-Fa-f0-9]{1}/,"g"),Ii=new RegExp(/[A-Fa-f0-9]{2}/,"g"),K=(t,n=!1)=>{let{r:o,g:l,b:c,a:d}=t,f=Math.round(255*o),e=Math.round(255*l),i=Math.round(255*c),r=Math.round(255*d),a=s=>s.toString(16).padStart(2,"0");return`#${a(f)}${a(e)}${a(i)}${n?a(r):""}`},Ct=t=>{let n=(o,l,c,d,f)=>({r:parseInt(o,16)/f,g:parseInt(l,16)/f,b:parseInt(c,16)/f,a:d===void 0?1:parseInt(d,16)/f});if(t.startsWith("#")){if(t.length===4||t.length===5){let o=t.match(Ei);if(o){let[l,c,d,f]=o;return n(l,c,d,f,15)}}if(t.length===7||t.length===8){let o=t.match(Ii);if(o){let[l,c,d,f]=o;return n(l,c,d,f,255)}}}throw new Error('Invalid hex string! Allowed RGB formats are "#FFF" and "#FFFFFF". Allowed RGBA formats are "#FFFF" and "#FFFFFFFF')};var F;(d=>{class t{constructor(e,i,r,a){this.version=e;this.errorCorrectionLevel=i;this.modules=[];this.isFunction=[];if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(a<-1||a>7)throw new RangeError("Mask value out of range");this.size=e*4+17;let s=[];for(let u=0;u<this.size;u++)s.push(!1);for(let u=0;u<this.size;u++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();let h=this.addEccAndInterleave(r);if(this.drawCodewords(h),a==-1){let u=1e9;for(let b=0;b<8;b++){this.applyMask(b),this.drawFormatBits(b);let p=this.getPenaltyScore();p<u&&(a=b,u=p),this.applyMask(b)}}l(0<=a&&a<=7),this.mask=a,this.applyMask(a),this.drawFormatBits(a),this.isFunction=[]}static encodeText(e,i){let r=d.QrSegment.makeSegments(e);return t.encodeSegments(r,i)}static encodeBinary(e,i){let r=d.QrSegment.makeBytes(e);return t.encodeSegments([r],i)}static encodeSegments(e,i,r=1,a=40,s=-1,h=!0){if(!(t.MIN_VERSION<=r&&r<=a&&a<=t.MAX_VERSION)||s<-1||s>7)throw new RangeError("Invalid value");let u,b;for(u=r;;u++){let y=t.getNumDataCodewords(u,i)*8,w=c.getTotalBits(e,u);if(w<=y){b=w;break}if(u>=a)throw new RangeError("Data too long")}for(let y of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])h&&b<=t.getNumDataCodewords(u,y)*8&&(i=y);let p=[];for(let y of e){n(y.mode.modeBits,4,p),n(y.numChars,y.mode.numCharCountBits(u),p);for(let w of y.getData())p.push(w)}l(p.length==b);let x=t.getNumDataCodewords(u,i)*8;l(p.length<=x),n(0,Math.min(4,x-p.length),p),n(0,(8-p.length%8)%8,p),l(p.length%8==0);for(let y=236;p.length<x;y^=253)n(y,8,p);let C=[];for(;C.length*8<p.length;)C.push(0);return p.forEach((y,w)=>C[w>>>3]|=y<<7-(w&7)),new t(u,i,C,s)}getModule(e,i){return 0<=e&&e<this.size&&0<=i&&i<this.size&&this.modules[i][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let r=0;r<this.size;r++)this.setFunctionModule(6,r,r%2==0),this.setFunctionModule(r,6,r%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),i=e.length;for(let r=0;r<i;r++)for(let a=0;a<i;a++)r==0&&a==0||r==0&&a==i-1||r==i-1&&a==0||this.drawAlignmentPattern(e[r],e[a]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let i=this.errorCorrectionLevel.formatBits<<3|e,r=i;for(let s=0;s<10;s++)r=r<<1^(r>>>9)*1335;let a=(i<<10|r)^21522;l(a>>>15==0);for(let s=0;s<=5;s++)this.setFunctionModule(8,s,o(a,s));this.setFunctionModule(8,7,o(a,6)),this.setFunctionModule(8,8,o(a,7)),this.setFunctionModule(7,8,o(a,8));for(let s=9;s<15;s++)this.setFunctionModule(14-s,8,o(a,s));for(let s=0;s<8;s++)this.setFunctionModule(this.size-1-s,8,o(a,s));for(let s=8;s<15;s++)this.setFunctionModule(8,this.size-15+s,o(a,s));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let r=0;r<12;r++)e=e<<1^(e>>>11)*7973;let i=this.version<<12|e;l(i>>>18==0);for(let r=0;r<18;r++){let a=o(i,r),s=this.size-11+r%3,h=Math.floor(r/3);this.setFunctionModule(s,h,a),this.setFunctionModule(h,s,a)}}drawFinderPattern(e,i){for(let r=-4;r<=4;r++)for(let a=-4;a<=4;a++){let s=Math.max(Math.abs(a),Math.abs(r)),h=e+a,u=i+r;0<=h&&h<this.size&&0<=u&&u<this.size&&this.setFunctionModule(h,u,s!=2&&s!=4)}}drawAlignmentPattern(e,i){for(let r=-2;r<=2;r++)for(let a=-2;a<=2;a++)this.setFunctionModule(e+a,i+r,Math.max(Math.abs(a),Math.abs(r))!=1)}setFunctionModule(e,i,r){this.modules[i][e]=r,this.isFunction[i][e]=!0}addEccAndInterleave(e){let i=this.version,r=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(i,r))throw new RangeError("Invalid argument");let a=t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][i],s=t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][i],h=Math.floor(t.getNumRawDataModules(i)/8),u=a-h%a,b=Math.floor(h/a),p=[],x=t.reedSolomonComputeDivisor(s);for(let y=0,w=0;y<a;y++){let E=e.slice(w,w+b-s+(y<u?0:1));w+=E.length;let Pt=t.reedSolomonComputeRemainder(E,x);y<u&&E.push(0),p.push(E.concat(Pt))}let C=[];for(let y=0;y<p[0].length;y++)p.forEach((w,E)=>{(y!=b-s||E>=u)&&C.push(w[y])});return l(C.length==h),C}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let i=0;for(let r=this.size-1;r>=1;r-=2){r==6&&(r=5);for(let a=0;a<this.size;a++)for(let s=0;s<2;s++){let h=r-s,b=(r+1&2)==0?this.size-1-a:a;!this.isFunction[b][h]&&i<e.length*8&&(this.modules[b][h]=o(e[i>>>3],7-(i&7)),i++)}}l(i==e.length*8)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let i=0;i<this.size;i++)for(let r=0;r<this.size;r++){let a;switch(e){case 0:a=(r+i)%2==0;break;case 1:a=i%2==0;break;case 2:a=r%3==0;break;case 3:a=(r+i)%3==0;break;case 4:a=(Math.floor(r/3)+Math.floor(i/2))%2==0;break;case 5:a=r*i%2+r*i%3==0;break;case 6:a=(r*i%2+r*i%3)%2==0;break;case 7:a=((r+i)%2+r*i%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[i][r]&&a&&(this.modules[i][r]=!this.modules[i][r])}}getPenaltyScore(){let e=0;for(let s=0;s<this.size;s++){let h=!1,u=0,b=[0,0,0,0,0,0,0];for(let p=0;p<this.size;p++)this.modules[s][p]==h?(u++,u==5?e+=t.PENALTY_N1:u>5&&e++):(this.finderPenaltyAddHistory(u,b),h||(e+=this.finderPenaltyCountPatterns(b)*t.PENALTY_N3),h=this.modules[s][p],u=1);e+=this.finderPenaltyTerminateAndCount(h,u,b)*t.PENALTY_N3}for(let s=0;s<this.size;s++){let h=!1,u=0,b=[0,0,0,0,0,0,0];for(let p=0;p<this.size;p++)this.modules[p][s]==h?(u++,u==5?e+=t.PENALTY_N1:u>5&&e++):(this.finderPenaltyAddHistory(u,b),h||(e+=this.finderPenaltyCountPatterns(b)*t.PENALTY_N3),h=this.modules[p][s],u=1);e+=this.finderPenaltyTerminateAndCount(h,u,b)*t.PENALTY_N3}for(let s=0;s<this.size-1;s++)for(let h=0;h<this.size-1;h++){let u=this.modules[s][h];u==this.modules[s][h+1]&&u==this.modules[s+1][h]&&u==this.modules[s+1][h+1]&&(e+=t.PENALTY_N2)}let i=0;for(let s of this.modules)i=s.reduce((h,u)=>h+(u?1:0),i);let r=this.size*this.size,a=Math.ceil(Math.abs(i*20-r*10)/r)-1;return l(0<=a&&a<=9),e+=a*t.PENALTY_N4,l(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(this.version==1)return[];{let e=Math.floor(this.version/7)+2,i=this.version==32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,r=[6];for(let a=this.size-7;r.length<e;a-=i)r.splice(1,0,a);return r}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let i=(16*e+128)*e+64;if(e>=2){let r=Math.floor(e/7)+2;i-=(25*r-10)*r-55,e>=7&&(i-=36)}return l(208<=i&&i<=29648),i}static getNumDataCodewords(e,i){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[i.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[i.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let i=[];for(let a=0;a<e-1;a++)i.push(0);i.push(1);let r=1;for(let a=0;a<e;a++){for(let s=0;s<i.length;s++)i[s]=t.reedSolomonMultiply(i[s],r),s+1<i.length&&(i[s]^=i[s+1]);r=t.reedSolomonMultiply(r,2)}return i}static reedSolomonComputeRemainder(e,i){let r=i.map(a=>0);for(let a of e){let s=a^r.shift();r.push(0),i.forEach((h,u)=>r[u]^=t.reedSolomonMultiply(h,s))}return r}static reedSolomonMultiply(e,i){if(e>>>8||i>>>8)throw new RangeError("Byte out of range");let r=0;for(let a=7;a>=0;a--)r=r<<1^(r>>>7)*285,r^=(i>>>a&1)*e;return l(r>>>8==0),r}finderPenaltyCountPatterns(e){let i=e[1];l(i<=this.size*3);let r=i>0&&e[2]==i&&e[3]==i*3&&e[4]==i&&e[5]==i;return(r&&e[0]>=i*4&&e[6]>=i?1:0)+(r&&e[6]>=i*4&&e[0]>=i?1:0)}finderPenaltyTerminateAndCount(e,i,r){return e&&(this.finderPenaltyAddHistory(i,r),i=0),i+=this.size,this.finderPenaltyAddHistory(i,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,i){i[0]==0&&(e+=this.size),i.pop(),i.unshift(e)}static{this.MIN_VERSION=1}static{this.MAX_VERSION=40}static{this.PENALTY_N1=3}static{this.PENALTY_N2=3}static{this.PENALTY_N3=40}static{this.PENALTY_N4=10}static{this.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{this.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]]}}d.QrCode=t;function n(f,e,i){if(e<0||e>31||f>>>e)throw new RangeError("Value out of range");for(let r=e-1;r>=0;r--)i.push(f>>>r&1)}function o(f,e){return(f>>>e&1)!=0}function l(f){if(!f)throw new Error("Assertion error")}class c{constructor(e,i,r){this.mode=e;this.numChars=i;this.bitData=r;if(i<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(e){let i=[];for(let r of e)n(r,8,i);return new c(c.Mode.BYTE,e.length,i)}static makeNumeric(e){if(!c.isNumeric(e))throw new RangeError("String contains non-numeric characters");let i=[];for(let r=0;r<e.length;){let a=Math.min(e.length-r,3);n(parseInt(e.substring(r,r+a),10),a*3+1,i),r+=a}return new c(c.Mode.NUMERIC,e.length,i)}static makeAlphanumeric(e){if(!c.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let i=[],r;for(r=0;r+2<=e.length;r+=2){let a=c.ALPHANUMERIC_CHARSET.indexOf(e.charAt(r))*45;a+=c.ALPHANUMERIC_CHARSET.indexOf(e.charAt(r+1)),n(a,11,i)}return r<e.length&&n(c.ALPHANUMERIC_CHARSET.indexOf(e.charAt(r)),6,i),new c(c.Mode.ALPHANUMERIC,e.length,i)}static makeSegments(e){return e==""?[]:c.isNumeric(e)?[c.makeNumeric(e)]:c.isAlphanumeric(e)?[c.makeAlphanumeric(e)]:[c.makeBytes(c.toUtf8ByteArray(e))]}static makeEci(e){let i=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)n(e,8,i);else if(e<16384)n(2,2,i),n(e,14,i);else if(e<1e6)n(6,3,i),n(e,21,i);else throw new RangeError("ECI assignment value out of range");return new c(c.Mode.ECI,0,i)}static isNumeric(e){return c.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return c.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,i){let r=0;for(let a of e){let s=a.mode.numCharCountBits(i);if(a.numChars>=1<<s)return 1/0;r+=4+s+a.bitData.length}return r}static toUtf8ByteArray(e){e=encodeURI(e);let i=[];for(let r=0;r<e.length;r++)e.charAt(r)!="%"?i.push(e.charCodeAt(r)):(i.push(parseInt(e.substring(r+1,r+3),16)),r+=2);return i}static{this.NUMERIC_REGEX=/^[0-9]*$/}static{this.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/}static{this.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"}}d.QrSegment=c})(F||={});(n=>{let t;(l=>{class o{constructor(d,f){this.ordinal=d;this.formatBits=f}static{this.LOW=new o(0,1)}static{this.MEDIUM=new o(1,0)}static{this.QUARTILE=new o(2,3)}static{this.HIGH=new o(3,2)}}l.Ecc=o})(t=n.QrCode||={})})(F||={});(n=>{let t;(l=>{class o{constructor(d,f){this.modeBits=d;this.numBitsCharCount=f}static{this.NUMERIC=new o(1,[10,12,14])}static{this.ALPHANUMERIC=new o(2,[9,11,13])}static{this.BYTE=new o(4,[8,16,16])}static{this.KANJI=new o(8,[8,10,12])}static{this.ECI=new o(7,[0,0,0])}numCharCountBits(d){return this.numBitsCharCount[Math.floor((d+7)/17)]}}l.Mode=o})(t=n.QrSegment||={})})(F||={});var X=F;function J(t,n){let o=X.QrCode.encodeText(t,X.QrCode.Ecc.HIGH),l=Pi(o);return{svg:Ri(l,n,o.size),path:l,size:o.size}}function Pi(t){let n=[];for(let o=0;o<t.size;o++)for(let l=0;l<t.size;l++)t.getModule(l,o)&&n.push(`M${l},${o}h1v1h-1z`);return n.join(" ")}function Ri(t,n,o){return`<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
3
3
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 ${o} ${o}" stroke="none">
|
|
4
|
-
<path d="${
|
|
4
|
+
<path d="${t}" fill="${n}"/>
|
|
5
5
|
</svg>
|
|
6
|
-
`}var Q="@imgly/plugin-qr-code-web",m="//ly.img.panel/generate-qr",v="//ly.img.panel/update-qr",
|
|
6
|
+
`}var Q="@imgly/plugin-qr-code-web",m="//ly.img.panel/generate-qr",v="//ly.img.panel/update-qr",Et=(t={})=>{let{createdBlockType:n="shape",addCheckboxForCreatedBlockType:o=!1}=t||{};return{initialize({cesdk:l}){if(l==null)return;let c=new pt(l.engine,Q);l.ui.addIconSet("@imgly/plugin/qr",`
|
|
7
7
|
<svg>
|
|
8
8
|
<symbol
|
|
9
9
|
fill="none"
|
|
@@ -17,7 +17,7 @@ var Pe=class{constructor(e,i){this.engine=e,this.key=i}hasData(e){return this.en
|
|
|
17
17
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 13H13V15H15V17H13V21H17V19H19V21H21V19H19V17H21V13H17V15H15V13ZM17 17H15V19H17V17ZM17 17V15H19V17H17Z" fill="currentColor"/>
|
|
18
18
|
</symbol>
|
|
19
19
|
</svg>
|
|
20
|
-
`),
|
|
20
|
+
`),l.setTranslations({en:{"ly.img.generate-qr.dock.label":"QR Code",[`panel.${m}`]:"Generate QR Code",[`panel.${m}.description`]:"Enter a URL to automatically generate a QR code for you to embed it in your design.",[`panel.${m}.submit`]:"Generate QR Code",[`panel.${m}.url`]:"URL",[`panel.${m}.foregroundColor`]:"Foreground Color",[`panel.${m}.error`]:"Failed to create QR code block.",[`panel.${v}`]:"Update QR Code",[`panel.${v}.description`]:"Update the URL to automatically refresh the QR code within your design.",[`panel.${v}.asShape`]:"As Shape?",[`panel.${v}.onlyOneBlock`]:"Please select only one block to update the QR code.",[`panel.${v}.noMetadata`]:"Invalid QR code block selected. Missing metadata.",[`panel.${v}.invalidStateShape`]:"Invalid state with no shape found.",[`panel.${v}.invalidStateFill`]:"Invalid state with no fill found.",[`panel.${v}.url`]:"URL",[`panel.${v}.foregroundColor`]:"Foreground Color","ly.img.generate-qr.canvasMenu.edit":"Edit"}}),["ly.img.replace","ly.img.crop","ly.img.fill","ly.img.adjustment","ly.img.shape.options"].forEach(d=>{l.feature.enable(d,({isPreviousEnable:f,engine:e})=>e.block.findAllSelected().every(r=>c.hasData(r)?c.get(r)?.type==="fill":!1)?!1:f())}),l.ui.registerComponent("ly.img.generate-qr.dock",({builder:d})=>{let f=l.ui.isPanelOpen(m);d.Button("ly.img.generate-qr.dock",{label:"ly.img.generate-qr.dock.label",icon:"@imgly/plugin/qr",isSelected:f,onClick:()=>{f?l.ui.closePanel(m):l.ui.openPanel(m)}})}),l.ui.registerComponent("ly.img.update-qr.canvasMenu",({builder:d,engine:f})=>{let e=f.block.findAllSelected();if(e.length!==1)return;let i=e[0];f.block.isAllowedByScope(i,"fill/change")&&c.hasData(i)&&d.Button("ly.img.update-qr.dock",{label:"ly.img.generate-qr.canvasMenu.edit",icon:"@imgly/plugin/qr",onClick:()=>{l.ui.openPanel(v)}})}),l.ui.setCanvasMenuOrder(["ly.img.update-qr.canvasMenu",...l.ui.getCanvasMenuOrder()]),l.ui.registerPanel(m,({builder:d,engine:f,state:e})=>{let i=e("url",""),r=e("color",{r:0,g:0,b:0,a:1}),a=e("asShape",n==="shape");d.Section("ly.img.generate-qr.text.section",{children:()=>{d.Text("ly.img.generate-qr.text",{content:`panel.${m}.description`})}}),d.Section("ly.img.generate-qr.inputs.section",{children:()=>{d.TextInput("ly.img.generate-qr.url",{inputLabel:`panel.${m}.url`,...i}),d.ColorInput("ly.img.generate-qr.foregroundColor",{label:`panel.${m}.foregroundColor`,inputLabel:`panel.${m}.foregroundColor`,...r})}}),d.Section("ly.img.generate-qr.button.section",{children:()=>{d.Button("ly.img.generate-qr.generate",{label:`panel.${m}.submit`,isDisabled:i.value==="",color:"accent",onClick:async()=>{await ki(l,f,i.value,r.value,c,a.value)!=null&&l.ui.closePanel(m)}}),o&&d.Checkbox("ly.img.generate-qr.asShape",{inputLabel:`panel.${v}.asShape`,...a})}})}),l.engine.block.onSelectionChanged(()=>{let d=l.engine.block.findAllSelected();if(d.length!==1){l.ui.isPanelOpen(v)&&l.ui.closePanel(v);return}let f=d[0];c.hasData(f)||l.ui.isPanelOpen(v)&&l.ui.closePanel(v)}),l.ui.registerPanel(v,({builder:d,engine:f})=>{let e=f.block.findAllSelected();if(e.length!==1){d.Section("ly.img.update-qr.only-one-block.section",{children:()=>{d.Text("ly.img.update-qr.only-one-block",{content:`panel.${v}.onlyOneBlock`})}});return}let i=e[0];if(!c.hasData(i)){d.Section("ly.img.update-qr.no-metadata.section",{children:()=>{d.Text("ly.img.update-qr.no-metadata",{content:`panel.${v}.noMetadata`})}});return}let{url:r,color:a,type:s}=c.get(i);d.Section("ly.img.update-qr.section",{children:()=>{d.Text("ly.img.update-qr.text",{content:`panel.${v}.description`}),d.TextInput("ly.img.update-qr.url",{inputLabel:`panel.${v}.url`,value:r,setValue:h=>{c.set(i,{url:h,color:a,type:s}),St(l,f,i,h,a,s)}}),s==="fill"&&d.ColorInput("ly.img.update-qr.foregroundColor",{inputLabel:`panel.${v}.foregroundColor`,inputLabelPosition:"top",value:Ct(a),setValue:h=>{let u=Mi(f,h);c.set(i,{url:r,color:u,type:s}),St(l,f,i,r,u,s)}})}})})}}};function Mi(t,n){let o=typeof n=="string",l;if(o)l=n;else{let c=t.editor.convertColorToColorSpace(n,"sRGB");l=K(c)}return l}async function ki(t,n,o,l,c,d){let f=n.editor.convertColorToColorSpace(l,"sRGB"),e=K(f),{path:i,svg:r,size:a}=J(o,e),s;if(d){if(s=await n.asset.defaultApplyAsset({id:"qr-code",meta:{kind:"shape",vectorPath:i,height:a,width:a,shapeType:"//ly.img.ubq/shape/vector_path"},payload:{}}),s!=null){if(n.block.supportsFill(s)){let h=n.block.getFill(s);n.block.getType(h)==="//ly.img.ubq/fill/color"&&n.block.setColor(h,"fill/color/value",f)}It(n,s)}}else{let h=`data:text/plain;base64,${btoa(r)}`;s=await n.asset.defaultApplyAsset({id:"qr-code",meta:{fillType:"//ly.img.ubq/fill/image",width:a,height:a},payload:{sourceSet:[{uri:h,width:a,height:a}]}})}return s==null?t.ui.showNotification({type:"error",message:`panel.${m}.error`}):c.set(s,{url:o,color:e,type:d?"shape":"fill"}),s}function St(t,n,o,l,c,d){let{path:f,svg:e,size:i}=J(l,c);if(d==="shape"){if(!n.block.supportsShape(o)){t.ui.showNotification({type:"error",message:`panel.${v}.invalidStateShape`});return}let r=n.block.getShape(o);n.block.setString(r,"shape/vector_path/path",f),n.block.setFloat(r,"shape/vector_path/height",i),n.block.setFloat(r,"shape/vector_path/width",i),It(n,o)}else if(d==="fill"){if(!n.block.supportsFill(o)){t.ui.showNotification({type:"error",message:`panel.${v}.invalidStateFill`});return}let r=n.block.getFill(o),a=`data:text/plain;base64,${btoa(e)}`;n.block.setSourceSet(r,"fill/image/sourceSet",[{uri:a,width:i,height:i}])}}function It(t,n){let o=t.block.duplicate(n),l=t.block.getParent(n);if(l!=null){let c=t.block.create("graphic");t.block.setShape(c,t.block.createShape("//ly.img.ubq/shape/rect")),t.block.appendChild(l,c),t.block.setPositionX(c,t.block.getPositionX(n)),t.block.setPositionY(c,t.block.getPositionY(n)),t.block.setWidth(c,t.block.getWidth(n)),t.block.setHeight(c,t.block.getHeight(n));let d=t.block.combine([o,c],"Intersection");t.block.setShape(n,t.block.getShape(d)),t.block.destroy(d)}return n}var Ni=t=>({name:Q,version:"1.69.0-nightly.20260130",...Et(t)}),tn=Ni;export{tn as default};
|
|
21
21
|
/*! Bundled license information:
|
|
22
22
|
|
|
23
23
|
lodash-es/lodash.js:
|