diff --git a/android/variables.gradle b/android/variables.gradle index e4a4293a10869f7087ce8da4866f69f2d9aa7679..8ef305d0d2144f29347e5ae39da97abc197e3888 100644 --- a/android/variables.gradle +++ b/android/variables.gradle @@ -1,5 +1,5 @@ ext { - minSdkVersion = 33 + minSdkVersion = 22 compileSdkVersion = 34 targetSdkVersion = 34 androidxActivityVersion = '1.8.0' diff --git a/package-lock.json b/package-lock.json index 8bac988aa02b3de9537863d272fcec1a92fc77e3..df15f518df829fc5ce31560bbd16d843550573ce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,18 +9,22 @@ "version": "1.0.0", "dependencies": { "@capacitor/android": "^6.2.0", + "@capacitor/app": "^6.0.2", "@capacitor/core": "^6.2.0", "@capacitor/filesystem": "^6.0.2", "@capacitor/preferences": "^6.0.3", "@capawesome/capacitor-file-picker": "^6.2.0", "@element-plus/icons-vue": "^2.3.1", + "@vitejs/plugin-legacy": "^5.4.1", "chart.js": "^4.4.7", "chartjs-plugin-annotation": "^3.1.0", + "core-js": "^3.39.0", "element-plus": "^2.9.1", "vue": "^3.4.27", "vue-chartjs": "^5.3.2" }, "devDependencies": { + "@babel/cli": "^7.26.4", "@babel/core": "^7.26.0", "@babel/eslint-parser": "^7.25.9", "@babel/plugin-proposal-logical-assignment-operators": "^7.20.7", @@ -69,7 +73,6 @@ "version": "2.3.0", "resolved": "https://registry.npmmirror.com/@ampproject/remapping/-/remapping-2.3.0.tgz", "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, "license": "Apache-2.0", "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", @@ -79,11 +82,151 @@ "node": ">=6.0.0" } }, + "node_modules/@babel/cli": { + "version": "7.26.4", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.26.4.tgz", + "integrity": "sha512-+mORf3ezU3p3qr+82WvJSnQNE1GAYeoCfEv4fik6B5/2cvKZ75AX8oawWQdXtM9MmndooQj15Jr9kelRFWsuRw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.25", + "commander": "^6.2.0", + "convert-source-map": "^2.0.0", + "fs-readdir-recursive": "^1.1.0", + "glob": "^7.2.0", + "make-dir": "^2.1.0", + "slash": "^2.0.0" + }, + "bin": { + "babel": "bin/babel.js", + "babel-external-helpers": "bin/babel-external-helpers.js" + }, + "engines": { + "node": ">=6.9.0" + }, + "optionalDependencies": { + "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents.3", + "chokidar": "^3.6.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/cli/node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "optional": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/@babel/cli/node_modules/commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@babel/cli/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@babel/cli/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "optional": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@babel/cli/node_modules/make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "dependencies": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@babel/cli/node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "optional": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/@babel/cli/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@babel/cli/node_modules/slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/@babel/code-frame": { "version": "7.26.2", "resolved": "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.26.2.tgz", "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.25.9", @@ -98,7 +241,6 @@ "version": "7.26.3", "resolved": "https://registry.npmmirror.com/@babel/compat-data/-/compat-data-7.26.3.tgz", "integrity": "sha512-nHIxvKPniQXpmQLb0vhY3VaFb3S0YrTAwpOWJZh1wn3oJPjJk9Asva204PsBdmAE8vpzfHudT8DB0scYvy9q0g==", - "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -108,7 +250,6 @@ "version": "7.26.0", "resolved": "https://registry.npmmirror.com/@babel/core/-/core-7.26.0.tgz", "integrity": "sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==", - "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", @@ -158,7 +299,6 @@ "version": "7.26.3", "resolved": "https://registry.npmmirror.com/@babel/generator/-/generator-7.26.3.tgz", "integrity": "sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ==", - "dev": true, "license": "MIT", "dependencies": { "@babel/parser": "^7.26.3", @@ -175,7 +315,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.25.9.tgz", "integrity": "sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==", - "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.25.9" @@ -188,7 +327,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz", "integrity": "sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==", - "dev": true, "license": "MIT", "dependencies": { "@babel/compat-data": "^7.25.9", @@ -205,7 +343,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.9.tgz", "integrity": "sha512-UTZQMvt0d/rSz6KI+qdu7GQze5TIajwTS++GUozlw8VBJDEOAqSXwm1WvmYEZwqdqSGQshRocPDqrt4HBZB3fQ==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.25.9", @@ -227,7 +364,6 @@ "version": "7.26.3", "resolved": "https://registry.npmmirror.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.26.3.tgz", "integrity": "sha512-G7ZRb40uUgdKOQqPLjfD12ZmGA54PzqDFUv2BKImnC9QIfGhIHKvVML0oN8IUiDq4iRqpq74ABpvOaerfWdong==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.25.9", @@ -245,7 +381,6 @@ "version": "0.6.3", "resolved": "https://registry.npmmirror.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.3.tgz", "integrity": "sha512-HK7Bi+Hj6H+VTHA3ZvBis7V/6hu9QuTrnMXNybfUf2iiuU/N97I8VjB+KbhFF8Rld/Lx5MzoCwPCpPjfK+n8Cg==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-compilation-targets": "^7.22.6", @@ -262,7 +397,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.25.9.tgz", "integrity": "sha512-wbfdZ9w5vk0C0oyHqAJbc62+vet5prjj01jjJ8sKn3j9h3MQQlflEdXYvuqRWjHnM12coDEqiC1IRCi0U/EKwQ==", - "dev": true, "license": "MIT", "dependencies": { "@babel/traverse": "^7.25.9", @@ -276,7 +410,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", - "dev": true, "license": "MIT", "dependencies": { "@babel/traverse": "^7.25.9", @@ -290,7 +423,6 @@ "version": "7.26.0", "resolved": "https://registry.npmmirror.com/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-module-imports": "^7.25.9", @@ -308,7 +440,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.25.9.tgz", "integrity": "sha512-FIpuNaz5ow8VyrYcnXQTDRGvV6tTjkNtCK/RYNDXGSLlUD6cBuQTSw43CShGxjvfBTfcUA/r6UhUCbtYqkhcuQ==", - "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.25.9" @@ -321,7 +452,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz", "integrity": "sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==", - "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -331,7 +461,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.25.9.tgz", "integrity": "sha512-IZtukuUeBbhgOcaW2s06OXTzVNJR0ybm4W5xC1opWFFJMZbwRj5LCk+ByYH7WdZPZTt8KnFwA8pvjN2yqcPlgw==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.25.9", @@ -349,7 +478,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/helper-replace-supers/-/helper-replace-supers-7.25.9.tgz", "integrity": "sha512-IiDqTOTBQy0sWyeXyGSC5TBJpGFXBkRynjBeXsvbhQFKj2viwJC76Epz35YLU1fpe/Am6Vppb7W7zM4fPQzLsQ==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-member-expression-to-functions": "^7.25.9", @@ -367,7 +495,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.25.9.tgz", "integrity": "sha512-K4Du3BFa3gvyhzgPcntrkDgZzQaq6uozzcpGbOO1OEJaI+EJdqWIMTLgFgQf6lrfiDFo5FU+BxKepI9RmZqahA==", - "dev": true, "license": "MIT", "dependencies": { "@babel/traverse": "^7.25.9", @@ -399,7 +526,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", - "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -409,7 +535,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/helper-wrap-function/-/helper-wrap-function-7.25.9.tgz", "integrity": "sha512-ETzz9UTjQSTmw39GboatdymDq4XIQbR8ySgVrylRhPOFpsd+JrKHIuF0de7GCWmem+T4uC5z7EZguod7Wj4A4g==", - "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.25.9", @@ -424,7 +549,6 @@ "version": "7.26.0", "resolved": "https://registry.npmmirror.com/@babel/helpers/-/helpers-7.26.0.tgz", "integrity": "sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==", - "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.25.9", @@ -453,7 +577,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.9.tgz", "integrity": "sha512-ZkRyVkThtxQ/J6nv3JFYv1RYY+JT5BvU0y3k5bWrmuG4woXypRa4PXmm9RhOwodRkYFWqC0C0cqcJ4OqR7kW+g==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9", @@ -470,7 +593,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.25.9.tgz", "integrity": "sha512-MrGRLZxLD/Zjj0gdU15dfs+HH/OXvnw/U4jJD8vpcP2CJQapPEv1IWwjc/qMg7ItBlPwSv1hRBbb7LeuANdcnw==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -486,7 +608,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.25.9.tgz", "integrity": "sha512-2qUwwfAFpJLZqxd02YW9btUCZHl+RFvdDkNfZwaIJrvB8Tesjsk8pEQkTvGwZXLqXUx/2oyY3ySRhm6HOXuCug==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -502,7 +623,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.25.9.tgz", "integrity": "sha512-6xWgLZTJXwilVjlnV7ospI3xi+sl8lN8rXXbBD6vYn3UYDlGsag8wrZkKcSI8G6KgqKP7vNFaDgeDnfAABq61g==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9", @@ -520,7 +640,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.25.9.tgz", "integrity": "sha512-aLnMXYPnzwwqhYSCyXfKkIkYgJ8zv9RK+roo9DkTXz38ynIhd9XCbN08s3MGvqL2MYGVUGdRQLL/JqBIeJhJBg==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9", @@ -591,7 +710,6 @@ "version": "7.21.0-placeholder-for-preset-env.2", "resolved": "https://registry.npmmirror.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", - "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -633,7 +751,6 @@ "version": "7.26.0", "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.26.0.tgz", "integrity": "sha512-QCWT5Hh830hK5EQa7XzuqIkQU9tT/whqbDz7kuaZMHFl1inRRg7JnuAEOQ0Ur0QUl0NufCk1msK2BeY79Aj/eg==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -649,7 +766,6 @@ "version": "7.26.0", "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz", "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -724,7 +840,6 @@ "version": "7.18.6", "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.18.6", @@ -741,7 +856,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.25.9.tgz", "integrity": "sha512-6jmooXYIwn9ca5/RylZADJ+EnSxVUS5sjeJ9UPk6RWRzXCmOJCy6dqItPJFpw2cuCangPK4OYr5uhGKcmrm5Qg==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -757,7 +871,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.9.tgz", "integrity": "sha512-RXV6QAzTBbhDMO9fWwOmwwTuYaiPbggWQ9INdZqAYeSHyG7FzQ+nOZaUUjNwKv9pV3aE4WFqFm1Hnbci5tBCAw==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9", @@ -775,7 +888,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.25.9.tgz", "integrity": "sha512-NT7Ejn7Z/LjUH0Gv5KsBCxh7BH3fbLTV0ptHvpeMvrt3cPThHfJfst9Wrb7S8EvJ7vRTFI7z+VAvFVEQn/m5zQ==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-module-imports": "^7.25.9", @@ -793,7 +905,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.25.9.tgz", "integrity": "sha512-toHc9fzab0ZfenFpsyYinOX0J/5dgJVA2fm64xPewu7CoYHWEivIWKxkK2rMi4r3yQqLnVmheMXRdG+k239CgA==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -809,7 +920,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.25.9.tgz", "integrity": "sha512-1F05O7AYjymAtqbsFETboN1NvBdcnzMerO+zlMyJBEz6WkMdejvGWw9p05iTSjC85RLlBseHHQpYaM4gzJkBGg==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -825,7 +935,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.9.tgz", "integrity": "sha512-bbMAII8GRSkcd0h0b4X+36GksxuheLFjP65ul9w6C3KgAamI3JqErNgSrosX6ZPj+Mpim5VvEbawXxJCyEUV3Q==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-create-class-features-plugin": "^7.25.9", @@ -842,7 +951,6 @@ "version": "7.26.0", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.26.0.tgz", "integrity": "sha512-6J2APTs7BDDm+UMqP1useWqhcRAXo0WIoVj26N7kPFB6S73Lgvyka4KTZYIxtgYXiN5HTyRObA72N2iu628iTQ==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-create-class-features-plugin": "^7.25.9", @@ -859,7 +967,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.9.tgz", "integrity": "sha512-mD8APIXmseE7oZvZgGABDyM34GUmK45Um2TXiBUt7PnuAxrgoSVf123qUzPxEr/+/BHrRn5NMZCdE2m/1F8DGg==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.25.9", @@ -880,7 +987,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.25.9.tgz", "integrity": "sha512-HnBegGqXZR12xbcTHlJ9HGxw1OniltT26J5YpfruGqtUHlz/xKf/G2ak9e+t0rVqrjXa9WOhvYPz1ERfMj23AA==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9", @@ -897,7 +1003,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.25.9.tgz", "integrity": "sha512-WkCGb/3ZxXepmMiX101nnGiU+1CAdut8oHyEOHxkKuS1qKpU2SMXE2uSvfz8PBuLd49V6LEsbtyPhWC7fnkgvQ==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -913,7 +1018,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.25.9.tgz", "integrity": "sha512-t7ZQ7g5trIgSRYhI9pIJtRl64KHotutUJsh4Eze5l7olJv+mRSg4/MmbZ0tv1eeqRbdvo/+trvJD/Oc5DmW2cA==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.25.9", @@ -930,7 +1034,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.25.9.tgz", "integrity": "sha512-LZxhJ6dvBb/f3x8xwWIuyiAHy56nrRG3PeYTpBkkzkYRRQ6tJLu68lEF5VIqMUZiAV7a8+Tb78nEoMCMcqjXBw==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -946,7 +1049,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.25.9.tgz", "integrity": "sha512-0UfuJS0EsXbRvKnwcLjFtJy/Sxc5J5jhLHnFhy7u4zih97Hz6tJkLU+O+FMMrNZrosUPxDi6sYxJ/EA8jDiAog==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.25.9", @@ -963,7 +1065,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.25.9.tgz", "integrity": "sha512-GCggjexbmSLaFhqsojeugBpeaRIgWNTcgKVq/0qIteFEqY2A+b9QidYadrWlnbWQUrW5fn+mCvf3tr7OeBFTyg==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -979,7 +1080,6 @@ "version": "7.26.3", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.26.3.tgz", "integrity": "sha512-7CAHcQ58z2chuXPWblnn1K6rLDnDWieghSOEmqQsrBenH0P9InCUtOJYD89pvngljmZlJcz3fcmgYsXFNGa1ZQ==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -995,7 +1095,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.25.9.tgz", "integrity": "sha512-2NsEz+CxzJIVOPx2o9UsW1rXLqtChtLoVnwYHHiB04wS5sgn7mrV45fWMBX0Kk+ub9uXytVYfNP2HjbVbCB3Ww==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -1011,7 +1110,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.25.9.tgz", "integrity": "sha512-LqHxduHoaGELJl2uhImHwRQudhCM50pT46rIBNvtT/Oql3nqiS3wOwP+5ten7NpYSXrrVLgtZU3DZmPtWZo16A==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9", @@ -1028,7 +1126,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.25.9.tgz", "integrity": "sha512-8lP+Yxjv14Vc5MuWBpJsoUCd3hD6V9DgBon2FVYL4jJgbnVQ9fTgYmonchzZJOVNgzEgbxp4OwAf6xz6M/14XA==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-compilation-targets": "^7.25.9", @@ -1046,7 +1143,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.25.9.tgz", "integrity": "sha512-xoTMk0WXceiiIvsaquQQUaLLXSW1KJ159KP87VilruQm0LNNGxWzahxSS6T6i4Zg3ezp4vA4zuwiNUR53qmQAw==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -1062,7 +1158,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.25.9.tgz", "integrity": "sha512-9N7+2lFziW8W9pBl2TzaNht3+pgMIRP74zizeCSrtnSKVdUl8mAjjOP2OOVQAfZ881P2cNjDj1uAMEdeD50nuQ==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -1078,7 +1173,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.25.9.tgz", "integrity": "sha512-wI4wRAzGko551Y8eVf6iOY9EouIDTtPb0ByZx+ktDGHwv6bHFimrgJM/2T021txPZ2s4c7bqvHbd+vXG6K948Q==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -1094,7 +1188,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.25.9.tgz", "integrity": "sha512-PYazBVfofCQkkMzh2P6IdIUaCEWni3iYEerAsRWuVd8+jlM1S9S9cz1dF9hIzyoZ8IA3+OwVYIp9v9e+GbgZhA==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -1110,7 +1203,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.25.9.tgz", "integrity": "sha512-g5T11tnI36jVClQlMlt4qKDLlWnG5pP9CSM4GhdRciTNMRgkfpo5cR6b4rGIOYPgRRuFAvwjPQ/Yk+ql4dyhbw==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-module-transforms": "^7.25.9", @@ -1127,7 +1219,6 @@ "version": "7.26.3", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.26.3.tgz", "integrity": "sha512-MgR55l4q9KddUDITEzEFYn5ZsGDXMSsU9E+kh7fjRXTIC3RHqfCo8RPRbyReYJh44HQ/yomFkqbOFohXvDCiIQ==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-module-transforms": "^7.26.0", @@ -1144,7 +1235,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.25.9.tgz", "integrity": "sha512-hyss7iIlH/zLHaehT+xwiymtPOpsiwIIRlCAOwBB04ta5Tt+lNItADdlXw3jAWZ96VJ2jlhl/c+PNIQPKNfvcA==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-module-transforms": "^7.25.9", @@ -1163,7 +1253,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.25.9.tgz", "integrity": "sha512-bS9MVObUgE7ww36HEfwe6g9WakQ0KF07mQF74uuXdkoziUPfKyu/nIm663kz//e5O1nPInPFx36z7WJmJ4yNEw==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-module-transforms": "^7.25.9", @@ -1180,7 +1269,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.25.9.tgz", "integrity": "sha512-oqB6WHdKTGl3q/ItQhpLSnWWOpjUJLsOCLVyeFgeTktkBSCiurvPOsyt93gibI9CmuKvTUEtWmG5VhZD+5T/KA==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.25.9", @@ -1197,7 +1285,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.25.9.tgz", "integrity": "sha512-U/3p8X1yCSoKyUj2eOBIx3FOn6pElFOKvAAGf8HTtItuPyB+ZeOqfn+mvTtg9ZlOAjsPdK3ayQEjqHjU/yLeVQ==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -1213,7 +1300,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.25.9.tgz", "integrity": "sha512-ENfftpLZw5EItALAD4WsY/KUWvhUlZndm5GC7G3evUsVeSJB6p0pBeLQUnRnBCBx7zV0RKQjR9kCuwrsIrjWog==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -1229,7 +1315,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.25.9.tgz", "integrity": "sha512-TlprrJ1GBZ3r6s96Yq8gEQv82s8/5HnCVHtEJScUj90thHQbwe+E5MLhi2bbNHBEJuzrvltXSru+BUxHDoog7Q==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -1245,7 +1330,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.25.9.tgz", "integrity": "sha512-fSaXafEE9CVHPweLYw4J0emp1t8zYTXyzN3UuG+lylqkvYd7RMrsOQ8TYx5RF231be0vqtFC6jnx3UmpJmKBYg==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-compilation-targets": "^7.25.9", @@ -1263,7 +1347,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.25.9.tgz", "integrity": "sha512-Kj/Gh+Rw2RNLbCK1VAWj2U48yxxqL2x0k10nPtSdRa0O2xnHXalD0s+o1A6a0W43gJ00ANo38jxkQreckOzv5A==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9", @@ -1280,7 +1363,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.25.9.tgz", "integrity": "sha512-qM/6m6hQZzDcZF3onzIhZeDHDO43bkNNlOX0i8n3lR6zLbu0GN2d8qfM/IERJZYauhAHSLHy39NF0Ctdvcid7g==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -1296,7 +1378,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.25.9.tgz", "integrity": "sha512-6AvV0FsLULbpnXeBjrY4dmWF8F7gf8QnvTEoO/wX/5xm/xE1Xo8oPuD3MPS+KS9f9XBEAWN7X1aWr4z9HdOr7A==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9", @@ -1313,7 +1394,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.25.9.tgz", "integrity": "sha512-wzz6MKwpnshBAiRmn4jR8LYz/g8Ksg0o80XmwZDlordjwEk9SxBzTWC7F5ef1jhbrbOW2DJ5J6ayRukrJmnr0g==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -1329,7 +1409,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.9.tgz", "integrity": "sha512-D/JUozNpQLAPUVusvqMxyvjzllRaF8/nSrP1s2YGQT/W4LHK4xxsMcHjhOGTS01mp9Hda8nswb+FblLdJornQw==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-create-class-features-plugin": "^7.25.9", @@ -1346,7 +1425,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.25.9.tgz", "integrity": "sha512-Evf3kcMqzXA3xfYJmZ9Pg1OvKdtqsDMSWBDzZOPLvHiTt36E75jLDQo5w1gtRU95Q4E5PDttrTf25Fw8d/uWLw==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.25.9", @@ -1364,7 +1442,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.25.9.tgz", "integrity": "sha512-IvIUeV5KrS/VPavfSM/Iu+RE6llrHrYIKY1yfCzyO/lMXHQ+p7uGhonmGVisv6tSBSVgWzMBohTcvkC9vQcQFA==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -1380,7 +1457,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.25.9.tgz", "integrity": "sha512-vwDcDNsgMPDGP0nMqzahDWE5/MLcX8sv96+wfX7as7LoF/kr97Bo/7fI00lXY4wUXYfVmwIIyG80fGZ1uvt2qg==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9", @@ -1397,7 +1473,6 @@ "version": "7.26.0", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-regexp-modifiers/-/plugin-transform-regexp-modifiers-7.26.0.tgz", "integrity": "sha512-vN6saax7lrA2yA/Pak3sCxuD6F5InBjn9IcrIKQPjpsLvuHYLVroTxjdlVRHjjBWxKOqIwpTXDkOssYT4BFdRw==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.25.9", @@ -1414,7 +1489,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.25.9.tgz", "integrity": "sha512-7DL7DKYjn5Su++4RXu8puKZm2XBPHyjWLUidaPEkCUBbE7IPcsrkRHggAOOKydH1dASWdcUBxrkOGNxUv5P3Jg==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -1451,7 +1525,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.25.9.tgz", "integrity": "sha512-MUv6t0FhO5qHnS/W8XCbHmiRWOphNufpE1IVxhK5kuN3Td9FT1x4rx4K42s3RYdMXCXpfWkGSbCSd0Z64xA7Ng==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -1467,7 +1540,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.25.9.tgz", "integrity": "sha512-oNknIB0TbURU5pqJFVbOOFspVlrpVwo2H1+HUIsVDvp5VauGGDP1ZEvO8Nn5xyMEs3dakajOxlmkNW7kNgSm6A==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9", @@ -1484,7 +1556,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.25.9.tgz", "integrity": "sha512-WqBUSgeVwucYDP9U/xNRQam7xV8W5Zf+6Eo7T2SRVUFlhRiMNFdFz58u0KZmCVVqs2i7SHgpRnAhzRNmKfi2uA==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -1500,7 +1571,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.25.9.tgz", "integrity": "sha512-o97AE4syN71M/lxrCtQByzphAdlYluKPDBzDVzMmfCobUjjhAryZV0AIpRPrxN0eAkxXO6ZLEScmt+PNhj2OTw==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -1516,7 +1586,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.25.9.tgz", "integrity": "sha512-v61XqUMiueJROUv66BVIOi0Fv/CUuZuZMl5NkRoCVxLAnMexZ0A3kMe7vvZ0nulxMuMp0Mk6S5hNh48yki08ZA==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -1532,7 +1601,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.25.9.tgz", "integrity": "sha512-s5EDrE6bW97LtxOcGj1Khcx5AaXwiMmi4toFWRDP9/y0Woo6pXC+iyPu/KuhKtfSrNFd7jJB+/fkOtZy6aIC6Q==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" @@ -1548,7 +1616,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.25.9.tgz", "integrity": "sha512-Jt2d8Ga+QwRluxRQ307Vlxa6dMrYEMZCgGxoPR8V52rxPyldHu3hdlHspxaqYmE7oID5+kB+UKUB/eWS+DkkWg==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.25.9", @@ -1565,7 +1632,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.25.9.tgz", "integrity": "sha512-yoxstj7Rg9dlNn9UQxzk4fcNivwv4nUYz7fYXBaKxvw/lnmPuOm/ikoELygbYq68Bls3D/D+NBPHiLwZdZZ4HA==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.25.9", @@ -1582,7 +1648,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.25.9.tgz", "integrity": "sha512-8BYqO3GeVNHtx69fdPshN3fnzUNLrWdHhk/icSwigksJGczKSizZ+Z6SBCxTs723Fr5VSNorTIK7a+R2tISvwQ==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.25.9", @@ -1599,7 +1664,6 @@ "version": "7.26.0", "resolved": "https://registry.npmmirror.com/@babel/preset-env/-/preset-env-7.26.0.tgz", "integrity": "sha512-H84Fxq0CQJNdPFT2DrfnylZ3cf5K43rGfWK4LJGPpjKHiZlk0/RzwEus3PDDZZg+/Er7lCA03MVacueUuXdzfw==", - "dev": true, "license": "MIT", "dependencies": { "@babel/compat-data": "^7.26.0", @@ -1683,7 +1747,6 @@ "version": "0.1.6-no-external-plugins", "resolved": "https://registry.npmmirror.com/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", @@ -1698,7 +1761,6 @@ "version": "7.26.0", "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.26.0.tgz", "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", - "dev": true, "license": "MIT", "dependencies": { "regenerator-runtime": "^0.14.0" @@ -1711,7 +1773,6 @@ "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/template/-/template-7.25.9.tgz", "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", - "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.25.9", @@ -1726,7 +1787,6 @@ "version": "7.26.4", "resolved": "https://registry.npmmirror.com/@babel/traverse/-/traverse-7.26.4.tgz", "integrity": "sha512-fH+b7Y4p3yqvApJALCPJcwb0/XaOSgtK4pzV6WVjPR5GLFQBRI7pfoX2V2iM48NXvX07NUxxm1Vw98YjqTcU5w==", - "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.26.2", @@ -1763,6 +1823,14 @@ "@capacitor/core": "^6.2.0" } }, + "node_modules/@capacitor/app": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@capacitor/app/-/app-6.0.2.tgz", + "integrity": "sha512-SiGTGgslK4TbWJVImCUL1odul7/YFkVfkYtAYS9AAEzQpxBECBeRnuN3FFBcfZ9eiN1XxFBFchhiwpxtx/c7yQ==", + "peerDependencies": { + "@capacitor/core": "^6.0.0" + } + }, "node_modules/@capacitor/cli": { "version": "6.2.0", "resolved": "https://registry.npmmirror.com/@capacitor/cli/-/cli-6.2.0.tgz", @@ -1891,7 +1959,6 @@ "cpu": [ "ppc64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1908,7 +1975,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1925,7 +1991,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1942,7 +2007,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1959,7 +2023,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1976,7 +2039,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1993,7 +2055,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2010,7 +2071,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2027,7 +2087,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2044,7 +2103,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2061,7 +2119,6 @@ "cpu": [ "ia32" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2078,7 +2135,6 @@ "cpu": [ "loong64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2095,7 +2151,6 @@ "cpu": [ "mips64el" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2112,7 +2167,6 @@ "cpu": [ "ppc64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2129,7 +2183,6 @@ "cpu": [ "riscv64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2146,7 +2199,6 @@ "cpu": [ "s390x" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2163,7 +2215,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2180,7 +2231,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2197,7 +2247,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2214,7 +2263,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2231,7 +2279,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2248,7 +2295,6 @@ "cpu": [ "ia32" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2265,7 +2311,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2654,7 +2699,6 @@ "version": "0.3.8", "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", - "dev": true, "license": "MIT", "dependencies": { "@jridgewell/set-array": "^1.2.1", @@ -2669,7 +2713,6 @@ "version": "3.1.2", "resolved": "https://registry.npmmirror.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, "license": "MIT", "engines": { "node": ">=6.0.0" @@ -2679,7 +2722,6 @@ "version": "1.2.1", "resolved": "https://registry.npmmirror.com/@jridgewell/set-array/-/set-array-1.2.1.tgz", "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, "license": "MIT", "engines": { "node": ">=6.0.0" @@ -2689,7 +2731,6 @@ "version": "0.3.6", "resolved": "https://registry.npmmirror.com/@jridgewell/source-map/-/source-map-0.3.6.tgz", "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "dev": true, "license": "MIT", "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", @@ -2706,7 +2747,6 @@ "version": "0.3.25", "resolved": "https://registry.npmmirror.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -2727,6 +2767,13 @@ "license": "MIT", "peer": true }, + "node_modules/@nicolo-ribaudo/chokidar-2": { + "version": "2.1.8-no-fsevents.3", + "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz", + "integrity": "sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==", + "dev": true, + "optional": true + }, "node_modules/@nicolo-ribaudo/eslint-scope-5-internals": { "version": "5.1.1-v1", "resolved": "https://registry.npmmirror.com/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz", @@ -2792,7 +2839,6 @@ "version": "2.5.0", "resolved": "https://registry.npmmirror.com/@parcel/watcher/-/watcher-2.5.0.tgz", "integrity": "sha512-i0GV1yJnm2n3Yq1qw6QrUrd/LI9bE8WEBOTtOkpCXHHdyN3TAGgqAK/DAT05z4fq2x04cARXt2pDmjWjL92iTQ==", - "dev": true, "hasInstallScript": true, "license": "MIT", "optional": true, @@ -2832,7 +2878,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2853,7 +2898,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2874,7 +2918,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2895,7 +2938,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2916,7 +2958,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2937,7 +2978,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2958,7 +2998,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2979,7 +3018,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3000,7 +3038,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3021,7 +3058,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3042,7 +3078,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3063,7 +3098,6 @@ "cpu": [ "ia32" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3084,7 +3118,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3137,7 +3170,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3151,7 +3183,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3165,7 +3196,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3179,7 +3209,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3193,7 +3222,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3207,7 +3235,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3221,7 +3248,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3235,7 +3261,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3249,7 +3274,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3263,7 +3287,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3277,7 +3300,6 @@ "cpu": [ "loong64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3291,7 +3313,6 @@ "cpu": [ "ppc64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3305,7 +3326,6 @@ "cpu": [ "riscv64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3319,7 +3339,6 @@ "cpu": [ "s390x" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3333,7 +3352,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3347,7 +3365,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3361,7 +3378,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3375,7 +3391,6 @@ "cpu": [ "ia32" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3389,7 +3404,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3539,7 +3553,6 @@ "version": "1.0.6", "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.6.tgz", "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true, "license": "MIT" }, "node_modules/@types/express": { @@ -3671,7 +3684,7 @@ "version": "22.10.2", "resolved": "https://registry.npmmirror.com/@types/node/-/node-22.10.2.tgz", "integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "undici-types": "~6.20.0" @@ -3805,6 +3818,31 @@ "dev": true, "license": "ISC" }, + "node_modules/@vitejs/plugin-legacy": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-legacy/-/plugin-legacy-5.4.1.tgz", + "integrity": "sha512-kee0l7dVevCNs1l3u2PnihVunvQ0WTJL2UJ/siQGD3Iht546mR9NO16tCv32uCP6lcGO1QDLqlPqInJtV1FE7A==", + "dependencies": { + "@babel/core": "^7.24.6", + "@babel/preset-env": "^7.24.6", + "browserslist": "^4.23.0", + "browserslist-to-esbuild": "^2.1.1", + "core-js": "^3.37.1", + "magic-string": "^0.30.10", + "regenerator-runtime": "^0.14.1", + "systemjs": "^6.15.1" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "peerDependencies": { + "terser": "^5.4.0", + "vite": "^5.0.0" + } + }, "node_modules/@vitejs/plugin-vue": { "version": "5.2.1", "resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-5.2.1.tgz", @@ -4862,7 +4900,6 @@ "version": "8.14.0", "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.14.0.tgz", "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", - "dev": true, "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -5045,7 +5082,6 @@ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "license": "ISC", - "peer": true, "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -5368,7 +5404,6 @@ "version": "0.4.12", "resolved": "https://registry.npmmirror.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.12.tgz", "integrity": "sha512-CPWT6BwvhrTO2d8QVorhTCQw9Y43zOu7G9HigcfxvepOU6b8o3tcWad6oVgZIsZCTt42FFv97aA7ZJsbM4+8og==", - "dev": true, "license": "MIT", "dependencies": { "@babel/compat-data": "^7.22.6", @@ -5383,7 +5418,6 @@ "version": "0.10.6", "resolved": "https://registry.npmmirror.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.6.tgz", "integrity": "sha512-b37+KR2i/khY5sKmWNVQAnitvquQbNdWy6lJdsr0kmquCKEEUgMKK4SboVM3HtfnZilfjr4MMQ7vY58FVWDtIA==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-define-polyfill-provider": "^0.6.2", @@ -5397,7 +5431,6 @@ "version": "0.6.3", "resolved": "https://registry.npmmirror.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.3.tgz", "integrity": "sha512-LiWSbl4CRSIa5x/JAU6jZiG9eit9w6mz+yVMFwDE83LAWvt0AfGBoZ7HS/mkhrKuh2ZlzfVZYKoLjXdqw6Yt7Q==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-define-polyfill-provider": "^0.6.3" @@ -5468,7 +5501,6 @@ "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=8" }, @@ -5588,7 +5620,7 @@ "version": "3.0.3", "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "fill-range": "^7.1.1" @@ -5601,7 +5633,6 @@ "version": "4.24.3", "resolved": "https://registry.npmmirror.com/browserslist/-/browserslist-4.24.3.tgz", "integrity": "sha512-1CPmv8iobE2fyRMV97dAcMVegvvWKxmq94hkLiAkUGwKVTyDLw33K+ZxiFrREKmmps4rIw6grcCFCnTMSZ/YiA==", - "dev": true, "funding": [ { "type": "opencollective", @@ -5630,6 +5661,23 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/browserslist-to-esbuild": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/browserslist-to-esbuild/-/browserslist-to-esbuild-2.1.1.tgz", + "integrity": "sha512-KN+mty6C3e9AN8Z5dI1xeN15ExcRNeISoC3g7V0Kax/MMF9MSoYA2G7lkTTcVUFntiEjkpI0HNgqJC1NjdyNUw==", + "dependencies": { + "meow": "^13.0.0" + }, + "bin": { + "browserslist-to-esbuild": "cli/index.js" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "browserslist": "*" + } + }, "node_modules/buffer": { "version": "5.7.1", "resolved": "https://registry.npmmirror.com/buffer/-/buffer-5.7.1.tgz", @@ -5669,7 +5717,6 @@ "version": "1.1.2", "resolved": "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, "license": "MIT" }, "node_modules/bytes": { @@ -5783,7 +5830,6 @@ "version": "1.0.30001690", "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001690.tgz", "integrity": "sha512-5ExiE3qQN6oF8Clf8ifIDcMRCRE/dMGcETG/XGMD8/XiXm6HXQgQTh1yZYLXXpSOsEUlJm1Xr7kGULZTuGtP/w==", - "dev": true, "funding": [ { "type": "opencollective", @@ -5851,7 +5897,7 @@ "version": "4.0.3", "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-4.0.3.tgz", "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "readdirp": "^4.0.1" @@ -6310,7 +6356,6 @@ "version": "2.0.0", "resolved": "https://registry.npmmirror.com/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true, "license": "MIT" }, "node_modules/cookie": { @@ -6380,11 +6425,9 @@ }, "node_modules/core-js": { "version": "3.39.0", - "resolved": "https://registry.npmmirror.com/core-js/-/core-js-3.39.0.tgz", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.39.0.tgz", "integrity": "sha512-raM0ew0/jJUqkJ0E6e8UDtl+y/7ktFivgWvqw8dNSQeNWoSDLvQ1H/RN3aPXB9tBd4/FhyR4RDPGhsNIMsAn7g==", - "dev": true, "hasInstallScript": true, - "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/core-js" @@ -6394,7 +6437,6 @@ "version": "3.39.0", "resolved": "https://registry.npmmirror.com/core-js-compat/-/core-js-compat-3.39.0.tgz", "integrity": "sha512-VgEUx3VwlExr5no0tXlBt+silBvhTryPwCXRI2Id1PN8WTKu7MreethvddqOubrYxkFdv/RnYrqlv1sFNAUelw==", - "dev": true, "license": "MIT", "dependencies": { "browserslist": "^4.24.2" @@ -6858,7 +6900,6 @@ "version": "4.4.0", "resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.0.tgz", "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", - "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -7074,7 +7115,6 @@ "version": "1.0.3", "resolved": "https://registry.npmmirror.com/detect-libc/-/detect-libc-1.0.3.tgz", "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", - "dev": true, "license": "Apache-2.0", "optional": true, "bin": { @@ -7293,7 +7333,6 @@ "version": "1.5.74", "resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.5.74.tgz", "integrity": "sha512-ck3//9RC+6oss/1Bh9tiAVFy5vfSKbRHAFh7Z3/eTRkEqJeWgymloShB17Vg3Z4nmDNp35vAd1BZ6CMW4Wt6Iw==", - "dev": true, "license": "ISC" }, "node_modules/element-plus": { @@ -7597,7 +7636,6 @@ "version": "0.21.5", "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.21.5.tgz", "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", - "dev": true, "hasInstallScript": true, "license": "MIT", "bin": { @@ -7636,7 +7674,6 @@ "version": "3.2.0", "resolved": "https://registry.npmmirror.com/escalade/-/escalade-3.2.0.tgz", "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -8335,7 +8372,6 @@ "version": "2.0.3", "resolved": "https://registry.npmmirror.com/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" @@ -8679,7 +8715,7 @@ "version": "7.1.1", "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" @@ -8968,6 +9004,12 @@ "license": "Unlicense", "peer": true }, + "node_modules/fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", + "dev": true + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -8979,7 +9021,6 @@ "version": "2.3.3", "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, "hasInstallScript": true, "license": "MIT", "optional": true, @@ -8994,7 +9035,6 @@ "version": "1.1.2", "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -9036,7 +9076,6 @@ "version": "1.0.0-beta.2", "resolved": "https://registry.npmmirror.com/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -9192,7 +9231,6 @@ "version": "11.12.0", "resolved": "https://registry.npmmirror.com/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -9384,7 +9422,6 @@ "version": "2.0.2", "resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -9804,7 +9841,7 @@ "version": "5.0.3", "resolved": "https://registry.npmmirror.com/immutable/-/immutable-5.0.3.tgz", "integrity": "sha512-P8IdPQHq3lA1xVeBRi5VPqUm5HDgKnx0Ru51wZz5mjxHr5n3RWhjIpOFU7ybkUxfB+5IToy+OLaHYDBIWsv+uw==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/import-fresh": { @@ -9966,7 +10003,6 @@ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "binary-extensions": "^2.0.0" }, @@ -10023,7 +10059,6 @@ "version": "2.16.0", "resolved": "https://registry.npmmirror.com/is-core-module/-/is-core-module-2.16.0.tgz", "integrity": "sha512-urTSINYfAYgcbLb0yDQ6egFm6h3Mo1DcF9EkyXSRjjzdHbsulg01qhwWuXdOoUBuTkbQ80KDboXa0vFJ+BDH+g==", - "dev": true, "license": "MIT", "dependencies": { "hasown": "^2.0.2" @@ -10092,7 +10127,7 @@ "version": "2.1.1", "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -10157,7 +10192,7 @@ "version": "4.0.3", "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" @@ -10208,7 +10243,7 @@ "version": "7.0.0", "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=0.12.0" @@ -10552,7 +10587,6 @@ "version": "4.0.0", "resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true, "license": "MIT" }, "node_modules/js-yaml": { @@ -10572,7 +10606,6 @@ "version": "3.1.0", "resolved": "https://registry.npmmirror.com/jsesc/-/jsesc-3.1.0.tgz", "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", - "dev": true, "license": "MIT", "bin": { "jsesc": "bin/jsesc" @@ -10620,7 +10653,6 @@ "version": "2.2.3", "resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, "license": "MIT", "bin": { "json5": "lib/cli.js" @@ -11145,7 +11177,6 @@ "version": "4.0.8", "resolved": "https://registry.npmmirror.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", - "dev": true, "license": "MIT" }, "node_modules/lodash.defaultsdeep": { @@ -11398,7 +11429,6 @@ "version": "5.1.1", "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-5.1.1.tgz", "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, "license": "ISC", "dependencies": { "yallist": "^3.0.2" @@ -11485,6 +11515,17 @@ "dev": true, "license": "MIT" }, + "node_modules/meow": { + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", + "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/merge-descriptors": { "version": "1.0.3", "resolved": "https://registry.npmmirror.com/merge-descriptors/-/merge-descriptors-1.0.3.tgz", @@ -11539,7 +11580,7 @@ "version": "4.0.8", "resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "braces": "^3.0.3", @@ -11816,7 +11857,6 @@ "version": "2.1.3", "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, "license": "MIT" }, "node_modules/multicast-dns": { @@ -11939,7 +11979,6 @@ "version": "7.1.1", "resolved": "https://registry.npmmirror.com/node-addon-api/-/node-addon-api-7.1.1.tgz", "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", - "dev": true, "license": "MIT", "optional": true }, @@ -11979,7 +12018,6 @@ "version": "2.0.19", "resolved": "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.19.tgz", "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", - "dev": true, "license": "MIT" }, "node_modules/normalize-package-data": { @@ -12579,7 +12617,6 @@ "version": "1.0.7", "resolved": "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, "license": "MIT" }, "node_modules/path-scurry": { @@ -12651,7 +12688,7 @@ "version": "2.3.1", "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=8.6" @@ -12673,6 +12710,15 @@ "node": ">=0.10" } }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmmirror.com/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -14028,7 +14074,7 @@ "version": "4.0.2", "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-4.0.2.tgz", "integrity": "sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">= 14.16.0" @@ -14066,14 +14112,12 @@ "version": "1.4.2", "resolved": "https://registry.npmmirror.com/regenerate/-/regenerate-1.4.2.tgz", "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", - "dev": true, "license": "MIT" }, "node_modules/regenerate-unicode-properties": { "version": "10.2.0", "resolved": "https://registry.npmmirror.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.0.tgz", "integrity": "sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA==", - "dev": true, "license": "MIT", "dependencies": { "regenerate": "^1.4.2" @@ -14086,14 +14130,12 @@ "version": "0.14.1", "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "dev": true, "license": "MIT" }, "node_modules/regenerator-transform": { "version": "0.15.2", "resolved": "https://registry.npmmirror.com/regenerator-transform/-/regenerator-transform-0.15.2.tgz", "integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==", - "dev": true, "license": "MIT", "dependencies": { "@babel/runtime": "^7.8.4" @@ -14123,7 +14165,6 @@ "version": "6.2.0", "resolved": "https://registry.npmmirror.com/regexpu-core/-/regexpu-core-6.2.0.tgz", "integrity": "sha512-H66BPQMrv+V16t8xtmq+UC0CBpiTBA60V8ibS1QVReIp8T1z8hwFxqcGzm9K6lgsN7sB5edVH8a+ze6Fqm4weA==", - "dev": true, "license": "MIT", "dependencies": { "regenerate": "^1.4.2", @@ -14141,14 +14182,12 @@ "version": "0.8.0", "resolved": "https://registry.npmmirror.com/regjsgen/-/regjsgen-0.8.0.tgz", "integrity": "sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==", - "dev": true, "license": "MIT" }, "node_modules/regjsparser": { "version": "0.12.0", "resolved": "https://registry.npmmirror.com/regjsparser/-/regjsparser-0.12.0.tgz", "integrity": "sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ==", - "dev": true, "license": "BSD-2-Clause", "dependencies": { "jsesc": "~3.0.2" @@ -14161,7 +14200,6 @@ "version": "3.0.2", "resolved": "https://registry.npmmirror.com/jsesc/-/jsesc-3.0.2.tgz", "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", - "dev": true, "license": "MIT", "bin": { "jsesc": "bin/jsesc" @@ -14229,7 +14267,6 @@ "version": "1.22.9", "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.9.tgz", "integrity": "sha512-QxrmX1DzraFIi9PxdG5VkRfRwIgjwyud+z/iBwfRRrVmHc+P9Q7u2lSSpQ6bjr2gy5lrqIiU9vb6iAeGf2400A==", - "dev": true, "license": "MIT", "dependencies": { "is-core-module": "^2.16.0", @@ -14335,7 +14372,6 @@ "version": "4.28.1", "resolved": "https://registry.npmmirror.com/rollup/-/rollup-4.28.1.tgz", "integrity": "sha512-61fXYl/qNVinKmGSTHAZ6Yy8I3YIJC/r2m9feHo6SwVAVcLT5MPwOUFe7EuURA/4m0NR8lXG4BBXuo/IZEsjMg==", - "dev": true, "license": "MIT", "dependencies": { "@types/estree": "1.0.6" @@ -14467,7 +14503,7 @@ "version": "1.83.0", "resolved": "https://registry.npmmirror.com/sass/-/sass-1.83.0.tgz", "integrity": "sha512-qsSxlayzoOjdvXMVLkzF84DJFc2HZEL/rFyGIKbbilYtAvlCxyuzUeff9LawTn4btVnLKg75Z8MMr1lxU1lfGw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "chokidar": "^4.0.0", @@ -14578,7 +14614,6 @@ "version": "6.3.1", "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -15009,7 +15044,6 @@ "version": "0.6.1", "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -15028,7 +15062,6 @@ "version": "0.5.21", "resolved": "https://registry.npmmirror.com/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", @@ -15429,7 +15462,6 @@ "version": "1.0.0", "resolved": "https://registry.npmmirror.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -15495,6 +15527,11 @@ "url": "https://opencollective.com/unts" } }, + "node_modules/systemjs": { + "version": "6.15.1", + "resolved": "https://registry.npmjs.org/systemjs/-/systemjs-6.15.1.tgz", + "integrity": "sha512-Nk8c4lXvMB98MtbmjX7JwJRgJOL8fluecYCfCeYBznwmpOs8Bf15hLM6z4z71EDAhQVrQrI+wt1aLWSXZq+hXA==" + }, "node_modules/tapable": { "version": "0.1.10", "resolved": "https://registry.npmmirror.com/tapable/-/tapable-0.1.10.tgz", @@ -15557,7 +15594,6 @@ "version": "5.37.0", "resolved": "https://registry.npmmirror.com/terser/-/terser-5.37.0.tgz", "integrity": "sha512-B8wRRkmre4ERucLM/uXx4MOV5cbnOlVAqUst+1+iLKPI0dOgFO28f84ptoQt9HEI537PMzfYa/d+GEPKTRXmYA==", - "dev": true, "license": "BSD-2-Clause", "dependencies": { "@jridgewell/source-map": "^0.3.3", @@ -15668,7 +15704,6 @@ "version": "2.20.3", "resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, "license": "MIT" }, "node_modules/text-table": { @@ -15783,7 +15818,7 @@ "version": "5.0.1", "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "is-number": "^7.0.0" @@ -16009,14 +16044,13 @@ "version": "6.20.0", "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-6.20.0.tgz", "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", "integrity": "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==", - "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -16026,7 +16060,6 @@ "version": "2.0.0", "resolved": "https://registry.npmmirror.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", - "dev": true, "license": "MIT", "dependencies": { "unicode-canonical-property-names-ecmascript": "^2.0.0", @@ -16040,7 +16073,6 @@ "version": "2.2.0", "resolved": "https://registry.npmmirror.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.0.tgz", "integrity": "sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg==", - "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -16050,7 +16082,6 @@ "version": "2.1.0", "resolved": "https://registry.npmmirror.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", - "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -16091,7 +16122,6 @@ "version": "1.1.1", "resolved": "https://registry.npmmirror.com/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", - "dev": true, "funding": [ { "type": "opencollective", @@ -16191,7 +16221,6 @@ "version": "5.4.11", "resolved": "https://registry.npmmirror.com/vite/-/vite-5.4.11.tgz", "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", - "dev": true, "license": "MIT", "dependencies": { "esbuild": "^0.21.3", @@ -17260,7 +17289,6 @@ "version": "3.1.1", "resolved": "https://registry.npmmirror.com/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, "license": "ISC" }, "node_modules/yaml": { diff --git a/package.json b/package.json index 1b5b4d42f46dd60d27ecc8f65d8d92bdd1c252a4..e9e2337f5c9db417901a71cbc6e4987ad83c431a 100644 --- a/package.json +++ b/package.json @@ -2,19 +2,23 @@ "author": "SLeader <erauma@tutanota.com>", "dependencies": { "@capacitor/android": "^6.2.0", + "@capacitor/app": "^6.0.2", "@capacitor/core": "^6.2.0", "@capacitor/filesystem": "^6.0.2", "@capacitor/preferences": "^6.0.3", "@capawesome/capacitor-file-picker": "^6.2.0", "@element-plus/icons-vue": "^2.3.1", + "@vitejs/plugin-legacy": "^5.4.1", "chart.js": "^4.4.7", "chartjs-plugin-annotation": "^3.1.0", + "core-js": "^3.39.0", "element-plus": "^2.9.1", "vue": "^3.4.27", "vue-chartjs": "^5.3.2" }, "description": "ERE on Android", "devDependencies": { + "@babel/cli": "^7.26.4", "@babel/core": "^7.26.0", "@babel/eslint-parser": "^7.25.9", "@babel/plugin-proposal-logical-assignment-operators": "^7.20.7", @@ -44,7 +48,7 @@ "node": ">=20" }, "lint-staged": { - "src/**/*.{js,vue}": [ + "src/!(public)/**/*.{js,vue}": [ "eslint --fix" ] }, diff --git a/src/era/engine.js b/src/era/engine.js index 2ff09bfcc8a91c5f48389c535b0181d1fcd960ce..9f83af6522c03e138090c9c1508e080e8c72623d 100644 --- a/src/era/engine.js +++ b/src/era/engine.js @@ -1,9 +1,11 @@ +import { App } from '@capacitor/app'; import { Capacitor } from '@capacitor/core'; import { Directory, Encoding, Filesystem } from '@capacitor/filesystem'; import { Preferences } from '@capacitor/preferences'; import { FilePicker } from '@capawesome/capacitor-file-picker'; import EraApi from '@/era/model/era-api'; +import { QuitException } from '@/era/model/era-api'; import connector from '@/js/utils/connector'; import { getEmptyConfigForm, getGameVersion } from '@/js/utils/value-utils'; @@ -433,6 +435,10 @@ era .start() .then(() => era.api.print('\n[!ENGINE WARNING!] game ends!')) .catch((e) => { + if (e instanceof QuitException) { + App.exitApp(); + // mild solution: window.location.refresh(); + } if (e.message !== 'quit') { era.error(e.message, e.stack); } diff --git a/src/era/model/era-api.js b/src/era/model/era-api.js index 492436c3f772675056685ceb0bd967411b5b67cc..3adab2a59719435d52b9943d6c11d809384953e4 100644 --- a/src/era/model/era-api.js +++ b/src/era/model/era-api.js @@ -10,6 +10,8 @@ import { toLowerCase, } from '@/js/utils/value-utils'; +export class QuitException extends Error {} + export default class EraApi extends EraApiBase { add(k, v) { if (!v) { @@ -362,7 +364,7 @@ export default class EraApi extends EraApiBase { await this.resetGlobal(); } if (invalid_code) { - throw new Error('quit'); + throw new QuitException(); } } else { await this.resetGlobal(); @@ -544,7 +546,7 @@ export default class EraApi extends EraApiBase { quit() { // this.era.quit(); - throw new Error('quit'); + throw new QuitException(); } replaceInColRows(...objects) { diff --git a/src/index.html b/src/index.html index d8c26df83891dd90c7ce0963f066ac0944a72ca7..cc0ada55cd1ec93e4daeaaa9de888de40d4240ab 100644 --- a/src/index.html +++ b/src/index.html @@ -10,12 +10,12 @@ <meta content="telephone=no" name="format-detection" /> <meta content="no" name="msapplication-tap-highlight" /> <script - src="https://unpkg.com/@ionic/pwa-elements@latest/dist/ionicpwaelements/ionicpwaelements.esm.js" + src="/js/pwa-elements/ionicpwaelements/ionicpwaelements.esm.js" type="module" ></script> <script nomodule - src="https://unpkg.com/@ionic/pwa-elements@latest/dist/ionicpwaelements/ionicpwaelements.js" + src="/js/pwa-elements/ionicpwaelements/ionicpwaelements.js" ></script> <link href="./assets/icon/icon.ico" rel="icon" type="image/x-icon" /> <link href="./manifest.json" rel="manifest" /> diff --git a/src/js/main.js b/src/js/main.js index a1cb2f6bd90b09baeae03a8d613391fcb122338f..655094e621ff20c76ef788a03eacb801daebff58 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -1,7 +1,8 @@ +import 'core-js/actual'; + import 'element-plus/dist/index.css'; import 'element-plus/theme-chalk/dark/css-vars.css'; import '@/assets/fonts/font.css'; - import { HomeFilled } from '@element-plus/icons-vue'; import ElementPlus from 'element-plus'; import { createApp } from 'vue'; @@ -11,3 +12,32 @@ import App from '@/js/app.vue'; const app = createApp(App); app.component(HomeFilled.name, HomeFilled); app.use(ElementPlus).mount('#app'); + +const css = `html { + background-color: var(--el-bg-color); + border-block-color: white; + border-inline-color: white; + border-color: white; + caret-color: white; + color: white; + column-rule-color: white; + fill: black; + flood-color: black; + lighting-color: white; + outline-color: white; + stop-color: black; + text-decoration-color: white; + text-emphasis-color: white; +} + +` +if (!window.getComputedStyle || !window.getComputedStyle(document.querySelector("body"))["color-scheme"]){ + var style = document.createElement("style"); + style.innerHTML = css; + document.querySelector("body").append(style); + + var svg = document.querySelector("svg"); + svg.parentElement.style.fill = "#9e9eff"; + svg.style.fill = "#9e9eff"; + svg.querySelector("path").style.fill = "#9e9eff"; +} \ No newline at end of file diff --git a/src/public/js/pwa-elements/cjs/index-d7f36e37.js b/src/public/js/pwa-elements/cjs/index-d7f36e37.js new file mode 100644 index 0000000000000000000000000000000000000000..6a6a7d5db19858e1d07f8981b69fd7f6fea9a01e --- /dev/null +++ b/src/public/js/pwa-elements/cjs/index-d7f36e37.js @@ -0,0 +1,1798 @@ +'use strict'; + +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } +function _possibleConstructorReturn(t, e) { if (e && ("object" == typeof e || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); } +function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } +function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); } +function _wrapNativeSuper(t) { var r = "function" == typeof Map ? new Map() : void 0; return _wrapNativeSuper = function _wrapNativeSuper(t) { if (null === t || !_isNativeFunction(t)) return t; if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); if (void 0 !== r) { if (r.has(t)) return r.get(t); r.set(t, Wrapper); } function Wrapper() { return _construct(t, arguments, _getPrototypeOf(this).constructor); } return Wrapper.prototype = Object.create(t.prototype, { constructor: { value: Wrapper, enumerable: !1, writable: !0, configurable: !0 } }), _setPrototypeOf(Wrapper, t); }, _wrapNativeSuper(t); } +function _construct(t, e, r) { if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); var o = [null]; o.push.apply(o, e); var p = new (t.bind.apply(t, o))(); return r && _setPrototypeOf(p, r.prototype), p; } +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } +function _isNativeFunction(t) { try { return -1 !== Function.toString.call(t).indexOf("[native code]"); } catch (n) { return "function" == typeof t; } } +function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } +function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); } +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } +function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } +function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } +function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } +function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } +function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } +function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); } +function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); } +function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } +function _interopNamespace(e) { + if (e && e.__esModule) return e; + var n = Object.create(null); + if (e) { + Object.keys(e).forEach(function (k) { + if (k !== 'default') { + var d = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d.get ? d : { + enumerable: true, + get: function get() { + return e[k]; + } + }); + } + }); + } + n['default'] = e; + return Object.freeze(n); +} +var NAMESPACE = 'ionicpwaelements'; + +/** + * Virtual DOM patching algorithm based on Snabbdom by + * Simon Friis Vindum (@paldepind) + * Licensed under the MIT License + * https://github.com/snabbdom/snabbdom/blob/master/LICENSE + * + * Modified for Stencil's renderer and slot projection + */ +var scopeId; +var hostTagName; +var isSvgMode = false; +var queuePending = false; +var createTime = function createTime(fnName) { + var tagName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + { + return function () { + return; + }; + } +}; +var uniqueTime = function uniqueTime(key, measureText) { + { + return function () { + return; + }; + } +}; +var HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}'; +/** + * Default style mode id + */ +/** + * Reusable empty obj/array + * Don't add values to these!! + */ +var EMPTY_OBJ = {}; +/** + * Namespaces + */ +var SVG_NS = 'http://www.w3.org/2000/svg'; +var HTML_NS = 'http://www.w3.org/1999/xhtml'; +var isDef = function isDef(v) { + return v != null; +}; +/** + * Check whether a value is a 'complex type', defined here as an object or a + * function. + * + * @param o the value to check + * @returns whether it's a complex type or not + */ +var isComplexType = function isComplexType(o) { + // https://jsperf.com/typeof-fn-object/5 + o = typeof o; + return o === 'object' || o === 'function'; +}; +/** + * Helper method for querying a `meta` tag that contains a nonce value + * out of a DOM's head. + * + * @param doc The DOM containing the `head` to query against + * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag + * exists or the tag has no content. + */ +function queryNonceMetaTagContent(doc) { + var _a, _b, _c; + return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined; +} +/** + * Production h() function based on Preact by + * Jason Miller (@developit) + * Licensed under the MIT License + * https://github.com/developit/preact/blob/master/LICENSE + * + * Modified for Stencil's compiler and vdom + */ +// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode; +// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode; +var h = function h(nodeName, vnodeData) { + var child = null; + var simple = false; + var lastSimple = false; + var vNodeChildren = []; + var _walk = function walk(c) { + for (var i = 0; i < c.length; i++) { + child = c[i]; + if (Array.isArray(child)) { + _walk(child); + } else if (child != null && typeof child !== 'boolean') { + if (simple = typeof nodeName !== 'function' && !isComplexType(child)) { + child = String(child); + } + if (simple && lastSimple) { + // If the previous child was simple (string), we merge both + vNodeChildren[vNodeChildren.length - 1].$text$ += child; + } else { + // Append a new vNode, if it's text, we create a text vNode + vNodeChildren.push(simple ? newVNode(null, child) : child); + } + lastSimple = simple; + } + } + }; + for (var _len = arguments.length, children = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + children[_key - 2] = arguments[_key]; + } + _walk(children); + if (vnodeData) { + { + var classData = vnodeData.className || vnodeData.class; + if (classData) { + vnodeData.class = typeof classData !== 'object' ? classData : Object.keys(classData).filter(function (k) { + return classData[k]; + }).join(' '); + } + } + } + var vnode = newVNode(nodeName, null); + vnode.$attrs$ = vnodeData; + if (vNodeChildren.length > 0) { + vnode.$children$ = vNodeChildren; + } + return vnode; +}; +/** + * A utility function for creating a virtual DOM node from a tag and some + * possible text content. + * + * @param tag the tag for this element + * @param text possible text content for the node + * @returns a newly-minted virtual DOM node + */ +var newVNode = function newVNode(tag, text) { + var vnode = { + $flags$: 0, + $tag$: tag, + $text$: text, + $elm$: null, + $children$: null + }; + { + vnode.$attrs$ = null; + } + return vnode; +}; +var Host = {}; +/** + * Check whether a given node is a Host node or not + * + * @param node the virtual DOM node to check + * @returns whether it's a Host node or not + */ +var isHost = function isHost(node) { + return node && node.$tag$ === Host; +}; +/** + * Parse a new property value for a given property type. + * + * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned, + * it is not safe to assume that the string returned by evaluating `typeof propValue` matches: + * 1. `any`, the type given to `propValue` in the function signature + * 2. the type stored from `propType`. + * + * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type. + * + * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to + * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is + * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`. + * ```tsx + * <my-cmp prop-val={0}></my-cmp> + * ``` + * + * HTML prop values on the other hand, will always a string + * + * @param propValue the new value to coerce to some type + * @param propType the type of the prop, expressed as a binary number + * @returns the parsed/coerced value + */ +var parsePropertyValue = function parsePropertyValue(propValue, propType) { + // ensure this value is of the correct prop type + if (propValue != null && !isComplexType(propValue)) { + if (propType & 4 /* MEMBER_FLAGS.Boolean */) { + // per the HTML spec, any string value means it is a boolean true value + // but we'll cheat here and say that the string "false" is the boolean false + return propValue === 'false' ? false : propValue === '' || !!propValue; + } + if (propType & 2 /* MEMBER_FLAGS.Number */) { + // force it to be a number + return parseFloat(propValue); + } + if (propType & 1 /* MEMBER_FLAGS.String */) { + // could have been passed as a number or boolean + // but we still want it as a string + return String(propValue); + } + // redundant return here for better minification + return propValue; + } + // not sure exactly what type we want + // so no need to change to a different type + return propValue; +}; +var getElement = function getElement(ref) { + return getHostRef(ref).$hostElement$; +}; +var createEvent = function createEvent(ref, name, flags) { + var elm = getElement(ref); + return { + emit: function emit(detail) { + return emitEvent(elm, name, { + bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */), + composed: !!(flags & 2 /* EVENT_FLAGS.Composed */), + cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */), + detail: detail + }); + } + }; +}; +/** + * Helper function to create & dispatch a custom Event on a provided target + * @param elm the target of the Event + * @param name the name to give the custom Event + * @param opts options for configuring a custom Event + * @returns the custom Event + */ +var emitEvent = function emitEvent(elm, name, opts) { + var ev = plt.ce(name, opts); + elm.dispatchEvent(ev); + return ev; +}; +var rootAppliedStyles = /*@__PURE__*/new WeakMap(); +var registerStyle = function registerStyle(scopeId, cssText, allowCS) { + var style = styles.get(scopeId); + if (supportsConstructableStylesheets && allowCS) { + style = style || new CSSStyleSheet(); + if (typeof style === 'string') { + style = cssText; + } else { + style.replaceSync(cssText); + } + } else { + style = cssText; + } + styles.set(scopeId, style); +}; +var addStyle = function addStyle(styleContainerNode, cmpMeta, mode, hostElm) { + var _a; + var scopeId = getScopeId(cmpMeta); + var style = styles.get(scopeId); + // if an element is NOT connected then getRootNode() will return the wrong root node + // so the fallback is to always use the document for the root node in those cases + styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc; + if (style) { + if (typeof style === 'string') { + styleContainerNode = styleContainerNode.head || styleContainerNode; + var appliedStyles = rootAppliedStyles.get(styleContainerNode); + var styleElm; + if (!appliedStyles) { + rootAppliedStyles.set(styleContainerNode, appliedStyles = new Set()); + } + if (!appliedStyles.has(scopeId)) { + { + // TODO(STENCIL-659): Remove code implementing the CSS variable shim + { + styleElm = doc.createElement('style'); + styleElm.innerHTML = style; + } + // Apply CSP nonce to the style tag if it exists + var nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc); + if (nonce != null) { + styleElm.setAttribute('nonce', nonce); + } + styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link')); + } + if (appliedStyles) { + appliedStyles.add(scopeId); + } + } + } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) { + styleContainerNode.adoptedStyleSheets = [].concat(_toConsumableArray(styleContainerNode.adoptedStyleSheets), [style]); + } + } + return scopeId; +}; +var attachStyles = function attachStyles(hostRef) { + var cmpMeta = hostRef.$cmpMeta$; + var elm = hostRef.$hostElement$; + var flags = cmpMeta.$flags$; + var endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$); + var scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta); + // TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field + if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) { + // only required when we're NOT using native shadow dom (slot) + // or this browser doesn't support native shadow dom + // and this host element was NOT created with SSR + // let's pick out the inner content for slot projection + // create a node to represent where the original + // content was first placed, which is useful later on + // DOM WRITE!! + elm['s-sc'] = scopeId; + elm.classList.add(scopeId + '-h'); + } + endAttachStyles(); +}; +var getScopeId = function getScopeId(cmp, mode) { + return 'sc-' + cmp.$tagName$; +}; +/** + * Production setAccessor() function based on Preact by + * Jason Miller (@developit) + * Licensed under the MIT License + * https://github.com/developit/preact/blob/master/LICENSE + * + * Modified for Stencil's compiler and vdom + */ +var setAccessor = function setAccessor(elm, memberName, oldValue, newValue, isSvg, flags) { + if (oldValue !== newValue) { + var isProp = isMemberInElement(elm, memberName); + var ln = memberName.toLowerCase(); + if (memberName === 'class') { + var classList = elm.classList; + var oldClasses = parseClassList(oldValue); + var newClasses = parseClassList(newValue); + classList.remove.apply(classList, _toConsumableArray(oldClasses.filter(function (c) { + return c && !newClasses.includes(c); + }))); + classList.add.apply(classList, _toConsumableArray(newClasses.filter(function (c) { + return c && !oldClasses.includes(c); + }))); + } else if (memberName === 'style') { + // update style attribute, css properties and values + { + for (var prop in oldValue) { + if (!newValue || newValue[prop] == null) { + if (prop.includes('-')) { + elm.style.removeProperty(prop); + } else { + elm.style[prop] = ''; + } + } + } + } + for (var _prop in newValue) { + if (!oldValue || newValue[_prop] !== oldValue[_prop]) { + if (_prop.includes('-')) { + elm.style.setProperty(_prop, newValue[_prop]); + } else { + elm.style[_prop] = newValue[_prop]; + } + } + } + } else if (memberName === 'ref') { + // minifier will clean this up + if (newValue) { + newValue(elm); + } + } else if (!isProp && memberName[0] === 'o' && memberName[1] === 'n') { + // Event Handlers + // so if the member name starts with "on" and the 3rd characters is + // a capital letter, and it's not already a member on the element, + // then we're assuming it's an event listener + if (memberName[2] === '-') { + // on- prefixed events + // allows to be explicit about the dom event to listen without any magic + // under the hood: + // <my-cmp on-click> // listens for "click" + // <my-cmp on-Click> // listens for "Click" + // <my-cmp on-ionChange> // listens for "ionChange" + // <my-cmp on-EVENTS> // listens for "EVENTS" + memberName = memberName.slice(3); + } else if (isMemberInElement(win, ln)) { + // standard event + // the JSX attribute could have been "onMouseOver" and the + // member name "onmouseover" is on the window's prototype + // so let's add the listener "mouseover", which is all lowercased + memberName = ln.slice(2); + } else { + // custom event + // the JSX attribute could have been "onMyCustomEvent" + // so let's trim off the "on" prefix and lowercase the first character + // and add the listener "myCustomEvent" + // except for the first character, we keep the event name case + memberName = ln[2] + memberName.slice(3); + } + if (oldValue) { + plt.rel(elm, memberName, oldValue, false); + } + if (newValue) { + plt.ael(elm, memberName, newValue, false); + } + } else { + // Set property if it exists and it's not a SVG + var isComplex = isComplexType(newValue); + if ((isProp || isComplex && newValue !== null) && !isSvg) { + try { + if (!elm.tagName.includes('-')) { + var n = newValue == null ? '' : newValue; + // Workaround for Safari, moving the <input> caret when re-assigning the same valued + if (memberName === 'list') { + isProp = false; + } else if (oldValue == null || elm[memberName] != n) { + elm[memberName] = n; + } + } else { + elm[memberName] = newValue; + } + } catch (e) {} + } + if (newValue == null || newValue === false) { + if (newValue !== false || elm.getAttribute(memberName) === '') { + { + elm.removeAttribute(memberName); + } + } + } else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) { + newValue = newValue === true ? '' : newValue; + { + elm.setAttribute(memberName, newValue); + } + } + } + } +}; +var parseClassListRegex = /\s/; +var parseClassList = function parseClassList(value) { + return !value ? [] : value.split(parseClassListRegex); +}; +var updateElement = function updateElement(oldVnode, newVnode, isSvgMode, memberName) { + // if the element passed in is a shadow root, which is a document fragment + // then we want to be adding attrs/props to the shadow root's "host" element + // if it's not a shadow root, then we add attrs/props to the same element + var elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$; + var oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ; + var newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ; + { + // remove attributes no longer present on the vnode by setting them to undefined + for (memberName in oldVnodeAttrs) { + if (!(memberName in newVnodeAttrs)) { + setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$); + } + } + } + // add new & update changed attributes + for (memberName in newVnodeAttrs) { + setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$); + } +}; +/** + * Create a DOM Node corresponding to one of the children of a given VNode. + * + * @param oldParentVNode the parent VNode from the previous render + * @param newParentVNode the parent VNode from the current render + * @param childIndex the index of the VNode, in the _new_ parent node's + * children, for which we will create a new DOM node + * @param parentElm the parent DOM node which our new node will be a child of + * @returns the newly created node + */ +var _createElm = function createElm(oldParentVNode, newParentVNode, childIndex, parentElm) { + // tslint:disable-next-line: prefer-const + var newVNode = newParentVNode.$children$[childIndex]; + var i = 0; + var elm; + var childNode; + if (newVNode.$text$ !== null) { + // create text node + elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$); + } else { + if (!isSvgMode) { + isSvgMode = newVNode.$tag$ === 'svg'; + } + // create element + elm = newVNode.$elm$ = doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$tag$); + if (isSvgMode && newVNode.$tag$ === 'foreignObject') { + isSvgMode = false; + } + // add css classes, attrs, props, listeners, etc. + { + updateElement(null, newVNode, isSvgMode); + } + if (isDef(scopeId) && elm['s-si'] !== scopeId) { + // if there is a scopeId and this is the initial render + // then let's add the scopeId as a css class + elm.classList.add(elm['s-si'] = scopeId); + } + if (newVNode.$children$) { + for (i = 0; i < newVNode.$children$.length; ++i) { + // create the node + childNode = _createElm(oldParentVNode, newVNode, i); + // return node could have been null + if (childNode) { + // append our new node + elm.appendChild(childNode); + } + } + } + { + if (newVNode.$tag$ === 'svg') { + // Only reset the SVG context when we're exiting <svg> element + isSvgMode = false; + } else if (elm.tagName === 'foreignObject') { + // Reenter SVG context when we're exiting <foreignObject> element + isSvgMode = true; + } + } + } + return elm; +}; +/** + * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and + * add them to the DOM in the appropriate place. + * + * @param parentElm the DOM node which should be used as a parent for the new + * DOM nodes + * @param before a child of the `parentElm` which the new children should be + * inserted before (optional) + * @param parentVNode the parent virtual DOM node + * @param vnodes the new child virtual DOM nodes to produce DOM nodes for + * @param startIdx the index in the child virtual DOM nodes at which to start + * creating DOM nodes (inclusive) + * @param endIdx the index in the child virtual DOM nodes at which to stop + * creating DOM nodes (inclusive) + */ +var addVnodes = function addVnodes(parentElm, before, parentVNode, vnodes, startIdx, endIdx) { + var containerElm = parentElm; + var childNode; + if (containerElm.shadowRoot && containerElm.tagName === hostTagName) { + containerElm = containerElm.shadowRoot; + } + for (; startIdx <= endIdx; ++startIdx) { + if (vnodes[startIdx]) { + childNode = _createElm(null, parentVNode, startIdx); + if (childNode) { + vnodes[startIdx].$elm$ = childNode; + containerElm.insertBefore(childNode, before); + } + } + } +}; +/** + * Remove the DOM elements corresponding to a list of {@link d.VNode} objects. + * This can be used to, for instance, clean up after a list of children which + * should no longer be shown. + * + * This function also handles some of Stencil's slot relocation logic. + * + * @param vnodes a list of virtual DOM nodes to remove + * @param startIdx the index at which to start removing nodes (inclusive) + * @param endIdx the index at which to stop removing nodes (inclusive) + */ +var removeVnodes = function removeVnodes(vnodes, startIdx, endIdx) { + for (var index = startIdx; index <= endIdx; ++index) { + var vnode = vnodes[index]; + if (vnode) { + var elm = vnode.$elm$; + _nullifyVNodeRefs(vnode); + if (elm) { + // remove the vnode's element from the dom + elm.remove(); + } + } + } +}; +/** + * Reconcile the children of a new VNode with the children of an old VNode by + * traversing the two collections of children, identifying nodes that are + * conserved or changed, calling out to `patch` to make any necessary + * updates to the DOM, and rearranging DOM nodes as needed. + * + * The algorithm for reconciling children works by analyzing two 'windows' onto + * the two arrays of children (`oldCh` and `newCh`). We keep track of the + * 'windows' by storing start and end indices and references to the + * corresponding array entries. Initially the two 'windows' are basically equal + * to the entire array, but we progressively narrow the windows until there are + * no children left to update by doing the following: + * + * 1. Skip any `null` entries at the beginning or end of the two arrays, so + * that if we have an initial array like the following we'll end up dealing + * only with a window bounded by the highlighted elements: + * + * [null, null, VNode1 , ... , VNode2, null, null] + * ^^^^^^ ^^^^^^ + * + * 2. Check to see if the elements at the head and tail positions are equal + * across the windows. This will basically detect elements which haven't + * been added, removed, or changed position, i.e. if you had the following + * VNode elements (represented as HTML): + * + * oldVNode: `<div><p><span>HEY</span></p></div>` + * newVNode: `<div><p><span>THERE</span></p></div>` + * + * Then when comparing the children of the `<div>` tag we check the equality + * of the VNodes corresponding to the `<p>` tags and, since they are the + * same tag in the same position, we'd be able to avoid completely + * re-rendering the subtree under them with a new DOM element and would just + * call out to `patch` to handle reconciling their children and so on. + * + * 3. Check, for both windows, to see if the element at the beginning of the + * window corresponds to the element at the end of the other window. This is + * a heuristic which will let us identify _some_ situations in which + * elements have changed position, for instance it _should_ detect that the + * children nodes themselves have not changed but merely moved in the + * following example: + * + * oldVNode: `<div><element-one /><element-two /></div>` + * newVNode: `<div><element-two /><element-one /></div>` + * + * If we find cases like this then we also need to move the concrete DOM + * elements corresponding to the moved children to write the re-order to the + * DOM. + * + * 4. Finally, if VNodes have the `key` attribute set on them we check for any + * nodes in the old children which have the same key as the first element in + * our window on the new children. If we find such a node we handle calling + * out to `patch`, moving relevant DOM nodes, and so on, in accordance with + * what we find. + * + * Finally, once we've narrowed our 'windows' to the point that either of them + * collapse (i.e. they have length 0) we then handle any remaining VNode + * insertion or deletion that needs to happen to get a DOM state that correctly + * reflects the new child VNodes. If, for instance, after our window on the old + * children has collapsed we still have more nodes on the new children that + * we haven't dealt with yet then we need to add them, or if the new children + * collapse but we still have unhandled _old_ children then we need to make + * sure the corresponding DOM nodes are removed. + * + * @param parentElm the node into which the parent VNode is rendered + * @param oldCh the old children of the parent node + * @param newVNode the new VNode which will replace the parent + * @param newCh the new children of the parent node + */ +var updateChildren = function updateChildren(parentElm, oldCh, newVNode, newCh) { + var oldStartIdx = 0; + var newStartIdx = 0; + var oldEndIdx = oldCh.length - 1; + var oldStartVnode = oldCh[0]; + var oldEndVnode = oldCh[oldEndIdx]; + var newEndIdx = newCh.length - 1; + var newStartVnode = newCh[0]; + var newEndVnode = newCh[newEndIdx]; + var node; + while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) { + if (oldStartVnode == null) { + // VNode might have been moved left + oldStartVnode = oldCh[++oldStartIdx]; + } else if (oldEndVnode == null) { + oldEndVnode = oldCh[--oldEndIdx]; + } else if (newStartVnode == null) { + newStartVnode = newCh[++newStartIdx]; + } else if (newEndVnode == null) { + newEndVnode = newCh[--newEndIdx]; + } else if (isSameVnode(oldStartVnode, newStartVnode)) { + // if the start nodes are the same then we should patch the new VNode + // onto the old one, and increment our `newStartIdx` and `oldStartIdx` + // indices to reflect that. We don't need to move any DOM Nodes around + // since things are matched up in order. + patch(oldStartVnode, newStartVnode); + oldStartVnode = oldCh[++oldStartIdx]; + newStartVnode = newCh[++newStartIdx]; + } else if (isSameVnode(oldEndVnode, newEndVnode)) { + // likewise, if the end nodes are the same we patch new onto old and + // decrement our end indices, and also likewise in this case we don't + // need to move any DOM Nodes. + patch(oldEndVnode, newEndVnode); + oldEndVnode = oldCh[--oldEndIdx]; + newEndVnode = newCh[--newEndIdx]; + } else if (isSameVnode(oldStartVnode, newEndVnode)) { + patch(oldStartVnode, newEndVnode); + // We need to move the element for `oldStartVnode` into a position which + // will be appropriate for `newEndVnode`. For this we can use + // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a + // sibling for `oldEndVnode.$elm$` then we want to move the DOM node for + // `oldStartVnode` between `oldEndVnode` and it's sibling, like so: + // + // <old-start-node /> + // <some-intervening-node /> + // <old-end-node /> + // <!-- -> <-- `oldStartVnode.$elm$` should be inserted here + // <next-sibling /> + // + // If instead `oldEndVnode.$elm$` has no sibling then we just want to put + // the node for `oldStartVnode` at the end of the children of + // `parentElm`. Luckily, `Node.nextSibling` will return `null` if there + // aren't any siblings, and passing `null` to `Node.insertBefore` will + // append it to the children of the parent element. + parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling); + oldStartVnode = oldCh[++oldStartIdx]; + newEndVnode = newCh[--newEndIdx]; + } else if (isSameVnode(oldEndVnode, newStartVnode)) { + patch(oldEndVnode, newStartVnode); + // We've already checked above if `oldStartVnode` and `newStartVnode` are + // the same node, so since we're here we know that they are not. Thus we + // can move the element for `oldEndVnode` _before_ the element for + // `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the + // future. + parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$); + oldEndVnode = oldCh[--oldEndIdx]; + newStartVnode = newCh[++newStartIdx]; + } else { + { + // We either didn't find an element in the old children that matches + // the key of the first new child OR the build is not using `key` + // attributes at all. In either case we need to create a new element + // for the new node. + node = _createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx); + newStartVnode = newCh[++newStartIdx]; + } + if (node) { + // if we created a new node then handle inserting it to the DOM + { + oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$); + } + } + } + } + if (oldStartIdx > oldEndIdx) { + // we have some more new nodes to add which don't match up with old nodes + addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx); + } else if (newStartIdx > newEndIdx) { + // there are nodes in the `oldCh` array which no longer correspond to nodes + // in the new array, so lets remove them (which entails cleaning up the + // relevant DOM nodes) + removeVnodes(oldCh, oldStartIdx, oldEndIdx); + } +}; +/** + * Compare two VNodes to determine if they are the same + * + * **NB**: This function is an equality _heuristic_ based on the available + * information set on the two VNodes and can be misleading under certain + * circumstances. In particular, if the two nodes do not have `key` attrs + * (available under `$key$` on VNodes) then the function falls back on merely + * checking that they have the same tag. + * + * So, in other words, if `key` attrs are not set on VNodes which may be + * changing order within a `children` array or something along those lines then + * we could obtain a false negative and then have to do needless re-rendering + * (i.e. we'd say two VNodes aren't equal when in fact they should be). + * + * @param leftVNode the first VNode to check + * @param rightVNode the second VNode to check + * @returns whether they're equal or not + */ +var isSameVnode = function isSameVnode(leftVNode, rightVNode) { + // compare if two vnode to see if they're "technically" the same + // need to have the same element tag, and same key to be the same + if (leftVNode.$tag$ === rightVNode.$tag$) { + return true; + } + return false; +}; +/** + * Handle reconciling an outdated VNode with a new one which corresponds to + * it. This function handles flushing updates to the DOM and reconciling the + * children of the two nodes (if any). + * + * @param oldVNode an old VNode whose DOM element and children we want to update + * @param newVNode a new VNode representing an updated version of the old one + */ +var patch = function patch(oldVNode, newVNode) { + var elm = newVNode.$elm$ = oldVNode.$elm$; + var oldChildren = oldVNode.$children$; + var newChildren = newVNode.$children$; + var tag = newVNode.$tag$; + var text = newVNode.$text$; + if (text === null) { + { + // test if we're rendering an svg element, or still rendering nodes inside of one + // only add this to the when the compiler sees we're using an svg somewhere + isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode; + } + { + { + // either this is the first render of an element OR it's an update + // AND we already know it's possible it could have changed + // this updates the element's css classes, attrs, props, listeners, etc. + updateElement(oldVNode, newVNode, isSvgMode); + } + } + if (oldChildren !== null && newChildren !== null) { + // looks like there's child vnodes for both the old and new vnodes + // so we need to call `updateChildren` to reconcile them + updateChildren(elm, oldChildren, newVNode, newChildren); + } else if (newChildren !== null) { + // no old child vnodes, but there are new child vnodes to add + if (oldVNode.$text$ !== null) { + // the old vnode was text, so be sure to clear it out + elm.textContent = ''; + } + // add the new vnode children + addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1); + } else if (oldChildren !== null) { + // no new child vnodes, but there are old child vnodes to remove + removeVnodes(oldChildren, 0, oldChildren.length - 1); + } + if (isSvgMode && tag === 'svg') { + isSvgMode = false; + } + } else if (oldVNode.$text$ !== text) { + // update the text content for the text only vnode + // and also only if the text is different than before + elm.data = text; + } +}; +/** + * 'Nullify' any VDom `ref` callbacks on a VDom node or its children by + * calling them with `null`. This signals that the DOM element corresponding to + * the VDom node has been removed from the DOM. + * + * @param vNode a virtual DOM node + */ +var _nullifyVNodeRefs = function nullifyVNodeRefs(vNode) { + { + vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null); + vNode.$children$ && vNode.$children$.map(_nullifyVNodeRefs); + } +}; +/** + * The main entry point for Stencil's virtual DOM-based rendering engine + * + * Given a {@link d.HostRef} container and some virtual DOM nodes, this + * function will handle creating a virtual DOM tree with a single root, patching + * the current virtual DOM tree onto an old one (if any), dealing with slot + * relocation, and reflecting attributes. + * + * @param hostRef data needed to root and render the virtual DOM tree, such as + * the DOM node into which it should be rendered. + * @param renderFnResults the virtual DOM nodes to be rendered + */ +var renderVdom = function renderVdom(hostRef, renderFnResults) { + var hostElm = hostRef.$hostElement$; + var oldVNode = hostRef.$vnode$ || newVNode(null, null); + var rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults); + hostTagName = hostElm.tagName; + rootVnode.$tag$ = null; + rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */; + hostRef.$vnode$ = rootVnode; + rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm; + { + scopeId = hostElm['s-sc']; + } + // synchronous patch + patch(oldVNode, rootVnode); +}; +var attachToAncestor = function attachToAncestor(hostRef, ancestorComponent) { + if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) { + ancestorComponent['s-p'].push(new Promise(function (r) { + return hostRef.$onRenderResolve$ = r; + })); + } +}; +var scheduleUpdate = function scheduleUpdate(hostRef, isInitialLoad) { + { + hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */; + } + if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) { + hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */; + return; + } + attachToAncestor(hostRef, hostRef.$ancestorComponent$); + // there is no ancestor component or the ancestor component + // has already fired off its lifecycle update then + // fire off the initial update + var dispatch = function dispatch() { + return dispatchHooks(hostRef, isInitialLoad); + }; + return writeTask(dispatch); +}; +/** + * Dispatch initial-render and update lifecycle hooks, enqueuing calls to + * component lifecycle methods like `componentWillLoad` as well as + * {@link updateComponent}, which will kick off the virtual DOM re-render. + * + * @param hostRef a reference to a host DOM node + * @param isInitialLoad whether we're on the initial load or not + * @returns an empty Promise which is used to enqueue a series of operations for + * the component + */ +var dispatchHooks = function dispatchHooks(hostRef, isInitialLoad) { + var endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$); + var instance = hostRef.$lazyInstance$; + // We're going to use this variable together with `enqueue` to implement a + // little promise-based queue. We start out with it `undefined`. When we add + // the first function to the queue we'll set this variable to be that + // function's return value. When we attempt to add subsequent values to the + // queue we'll check that value and, if it was a `Promise`, we'll then chain + // the new function off of that `Promise` using `.then()`. This will give our + // queue two nice properties: + // + // 1. If all functions added to the queue are synchronous they'll be called + // synchronously right away. + // 2. If all functions added to the queue are asynchronous they'll all be + // called in order after `dispatchHooks` exits. + var maybePromise; + if (isInitialLoad) { + { + hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */; + if (hostRef.$queuedListeners$) { + hostRef.$queuedListeners$.map(function (_ref) { + var _ref2 = _slicedToArray(_ref, 2), + methodName = _ref2[0], + event = _ref2[1]; + return safeCall(instance, methodName, event); + }); + hostRef.$queuedListeners$ = undefined; + } + } + } + endSchedule(); + return enqueue(maybePromise, function () { + return updateComponent(hostRef, instance, isInitialLoad); + }); +}; +/** + * This function uses a Promise to implement a simple first-in, first-out queue + * of functions to be called. + * + * The queue is ordered on the basis of the first argument. If it's + * `undefined`, then nothing is on the queue yet, so the provided function can + * be called synchronously (although note that this function may return a + * `Promise`). The idea is that then the return value of that enqueueing + * operation is kept around, so that if it was a `Promise` then subsequent + * functions can be enqueued by calling this function again with that `Promise` + * as the first argument. + * + * @param maybePromise either a `Promise` which should resolve before the next function is called or an 'empty' sentinel + * @param fn a function to enqueue + * @returns either a `Promise` or the return value of the provided function + */ +var enqueue = function enqueue(maybePromise, fn) { + return isPromisey(maybePromise) ? maybePromise.then(fn) : fn(); +}; +/** + * Check that a value is a `Promise`. To check, we first see if the value is an + * instance of the `Promise` global. In a few circumstances, in particular if + * the global has been overwritten, this is could be misleading, so we also do + * a little 'duck typing' check to see if the `.then` property of the value is + * defined and a function. + * + * @param maybePromise it might be a promise! + * @returns whether it is or not + */ +var isPromisey = function isPromisey(maybePromise) { + return maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === 'function'; +}; +var updateComponent = /*#__PURE__*/function () { + var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(hostRef, instance, isInitialLoad) { + var _a, elm, endUpdate, rc, endRender, childrenPromises, postUpdate; + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + elm = hostRef.$hostElement$; + endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$); + rc = elm['s-rc']; + if (isInitialLoad) { + // DOM WRITE! + attachStyles(hostRef); + } + endRender = createTime('render', hostRef.$cmpMeta$.$tagName$); + callRender(hostRef, instance); + if (rc) { + // ok, so turns out there are some child host elements + // waiting on this parent element to load + // let's fire off all update callbacks waiting + rc.map(function (cb) { + return cb(); + }); + elm['s-rc'] = undefined; + } + endRender(); + endUpdate(); + childrenPromises = (_a = elm['s-p']) !== null && _a !== void 0 ? _a : []; + postUpdate = function postUpdate() { + return postUpdateComponent(hostRef); + }; + if (childrenPromises.length === 0) { + postUpdate(); + } else { + Promise.all(childrenPromises).then(postUpdate); + hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */; + childrenPromises.length = 0; + } + case 12: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function updateComponent(_x, _x2, _x3) { + return _ref3.apply(this, arguments); + }; +}(); +var callRender = function callRender(hostRef, instance, elm) { + try { + instance = instance.render(); + { + hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */; + } + { + hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */; + } + { + { + // looks like we've got child nodes to render into this host element + // or we need to update the css class/attrs on the host element + // DOM WRITE! + { + renderVdom(hostRef, instance); + } + } + } + } catch (e) { + consoleError(e, hostRef.$hostElement$); + } + return null; +}; +var postUpdateComponent = function postUpdateComponent(hostRef) { + var tagName = hostRef.$cmpMeta$.$tagName$; + var elm = hostRef.$hostElement$; + var endPostUpdate = createTime('postUpdate', tagName); + var instance = hostRef.$lazyInstance$; + var ancestorComponent = hostRef.$ancestorComponent$; + if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) { + hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */; + { + // DOM WRITE! + addHydratedFlag(elm); + } + { + safeCall(instance, 'componentDidLoad'); + } + endPostUpdate(); + { + hostRef.$onReadyResolve$(elm); + if (!ancestorComponent) { + appDidLoad(); + } + } + } else { + endPostUpdate(); + } + { + hostRef.$onInstanceResolve$(elm); + } + // load events fire from bottom to top + // the deepest elements load first then bubbles up + { + if (hostRef.$onRenderResolve$) { + hostRef.$onRenderResolve$(); + hostRef.$onRenderResolve$ = undefined; + } + if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) { + nextTick(function () { + return scheduleUpdate(hostRef, false); + }); + } + hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */); + } + // ( •_•) + // ( •_•)>âŒâ– -â– + // (âŒâ– _â– ) +}; +var forceUpdate = function forceUpdate(ref) { + { + var hostRef = getHostRef(ref); + var isConnected = hostRef.$hostElement$.isConnected; + if (isConnected && (hostRef.$flags$ & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) { + scheduleUpdate(hostRef, false); + } + // Returns "true" when the forced update was successfully scheduled + return isConnected; + } +}; +var appDidLoad = function appDidLoad(who) { + // on appload + // we have finish the first big initial render + { + addHydratedFlag(doc.documentElement); + } + nextTick(function () { + return emitEvent(win, 'appload', { + detail: { + namespace: NAMESPACE + } + }); + }); +}; +var safeCall = function safeCall(instance, method, arg) { + if (instance && instance[method]) { + try { + return instance[method](arg); + } catch (e) { + consoleError(e); + } + } + return undefined; +}; +var addHydratedFlag = function addHydratedFlag(elm) { + return elm.classList.add('hydrated'); +}; +var getValue = function getValue(ref, propName) { + return getHostRef(ref).$instanceValues$.get(propName); +}; +var setValue = function setValue(ref, propName, newVal, cmpMeta) { + // check our new property value against our internal value + var hostRef = getHostRef(ref); + var oldVal = hostRef.$instanceValues$.get(propName); + var flags = hostRef.$flags$; + var instance = hostRef.$lazyInstance$; + newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]); + // explicitly check for NaN on both sides, as `NaN === NaN` is always false + var areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal); + var didValueChange = newVal !== oldVal && !areBothNaN; + if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) { + // gadzooks! the property's value has changed!! + // set our new value! + hostRef.$instanceValues$.set(propName, newVal); + if (instance) { + if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) { + // looks like this value actually changed, so we've got work to do! + // but only if we've already rendered, otherwise just chill out + // queue that we need to do an update, but don't worry about queuing + // up millions cuz this function ensures it only runs once + scheduleUpdate(hostRef, false); + } + } + } +}; +/** + * Attach a series of runtime constructs to a compiled Stencil component + * constructor, including getters and setters for the `@Prop` and `@State` + * decorators, callbacks for when attributes change, and so on. + * + * @param Cstr the constructor for a component that we need to process + * @param cmpMeta metadata collected previously about the component + * @param flags a number used to store a series of bit flags + * @returns a reference to the same constructor passed in (but now mutated) + */ +var proxyComponent = function proxyComponent(Cstr, cmpMeta, flags) { + if (cmpMeta.$members$) { + // It's better to have a const than two Object.entries() + var members = Object.entries(cmpMeta.$members$); + var prototype = Cstr.prototype; + members.map(function (_ref4) { + var _ref5 = _slicedToArray(_ref4, 2), + memberName = _ref5[0], + _ref5$ = _slicedToArray(_ref5[1], 1), + memberFlags = _ref5$[0]; + if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ || flags & 2 /* PROXY_FLAGS.proxyState */ && memberFlags & 32 /* MEMBER_FLAGS.State */) { + // proxyComponent - prop + Object.defineProperty(prototype, memberName, { + get: function get() { + // proxyComponent, get value + return getValue(this, memberName); + }, + set: function set(newValue) { + // proxyComponent, set value + setValue(this, memberName, newValue, cmpMeta); + }, + configurable: true, + enumerable: true + }); + } else if (flags & 1 /* PROXY_FLAGS.isElementConstructor */ && memberFlags & 64 /* MEMBER_FLAGS.Method */) { + // proxyComponent - method + Object.defineProperty(prototype, memberName, { + value: function value() { + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + var ref = getHostRef(this); + return ref.$onInstancePromise$.then(function () { + var _ref$$lazyInstance$; + return (_ref$$lazyInstance$ = ref.$lazyInstance$)[memberName].apply(_ref$$lazyInstance$, args); + }); + } + }); + } + }); + if (flags & 1 /* PROXY_FLAGS.isElementConstructor */) { + var attrNameToPropName = new Map(); + prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) { + var _this = this; + plt.jmp(function () { + var propName = attrNameToPropName.get(attrName); + // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback + // in the case where an attribute was set inline. + // ```html + // <my-component some-attribute="some-value"></my-component> + // ``` + // + // There is an edge case where a developer sets the attribute inline on a custom element and then + // programmatically changes it before it has been upgraded as shown below: + // + // ```html + // <!-- this component has _not_ been upgraded yet --> + // <my-component id="test" some-attribute="some-value"></my-component> + // <script> + // // grab non-upgraded component + // el = document.querySelector("#test"); + // el.someAttribute = "another-value"; + // // upgrade component + // customElements.define('my-component', MyComponent); + // </script> + // ``` + // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback + // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value") + // to the value that was set inline i.e. "some-value" from above example. When + // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value" + // + // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed + // by connectedCallback as this attributeChangedCallback will not fire. + // + // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties + // + // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to + // properties here given that this goes against best practices outlined here + // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy + if (_this.hasOwnProperty(propName)) { + newValue = _this[propName]; + delete _this[propName]; + } else if (prototype.hasOwnProperty(propName) && typeof _this[propName] === 'number' && _this[propName] == newValue) { + // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native + // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in + // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props. + return; + } + _this[propName] = newValue === null && typeof _this[propName] === 'boolean' ? false : newValue; + }); + }; + // create an array of attributes to observe + // and also create a map of html attribute name to js property name + Cstr.observedAttributes = members.filter(function (_ref6) { + var _ref7 = _slicedToArray(_ref6, 2), + _ = _ref7[0], + m = _ref7[1]; + return m[0] & 15; + } /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes + .map(function (_ref8) { + var _ref9 = _slicedToArray(_ref8, 2), + propName = _ref9[0], + m = _ref9[1]; + var attrName = m[1] || propName; + attrNameToPropName.set(attrName, propName); + return attrName; + }); + } + } + return Cstr; +}; +var initializeComponent = /*#__PURE__*/function () { + var _ref10 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(elm, hostRef, cmpMeta, hmrVersionId, Cstr) { + var endLoad, endNewInstance, style, _scopeId, endRegisterStyles, ancestorComponent, schedule; + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + if (!((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0)) { + _context2.next = 16; + break; + } + // Let the runtime know that the component has been initialized + hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */; + // lazy loaded components + // request the component's implementation to be + // wired up with the host element + Cstr = loadModule(cmpMeta); + if (!Cstr.then) { + _context2.next = 9; + break; + } + // Await creates a micro-task avoid if possible + endLoad = uniqueTime(); + _context2.next = 7; + return Cstr; + case 7: + Cstr = _context2.sent; + endLoad(); + case 9: + if (!Cstr.isProxied) { + proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */); + Cstr.isProxied = true; + } + endNewInstance = createTime('createInstance', cmpMeta.$tagName$); // ok, time to construct the instance + // but let's keep track of when we start and stop + // so that the getters/setters don't incorrectly step on data + hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */; + // construct the lazy-loaded component implementation + // passing the hostRef is very important during + // construction in order to directly wire together the + // host element and the lazy-loaded instance + try { + new Cstr(hostRef); + } catch (e) { + consoleError(e); + } + hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */; + endNewInstance(); + if (Cstr.style) { + // this component has styles but we haven't registered them yet + style = Cstr.style; + _scopeId = getScopeId(cmpMeta); + if (!styles.has(_scopeId)) { + endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$); + registerStyle(_scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */)); + endRegisterStyles(); + } + } + case 16: + // we've successfully created a lazy instance + ancestorComponent = hostRef.$ancestorComponent$; + schedule = function schedule() { + return scheduleUpdate(hostRef, true); + }; + if (ancestorComponent && ancestorComponent['s-rc']) { + // this is the initial load and this component it has an ancestor component + // but the ancestor component has NOT fired its will update lifecycle yet + // so let's just cool our jets and wait for the ancestor to continue first + // this will get fired off when the ancestor component + // finally gets around to rendering its lazy self + // fire off the initial update + ancestorComponent['s-rc'].push(schedule); + } else { + schedule(); + } + case 19: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return function initializeComponent(_x4, _x5, _x6, _x7, _x8) { + return _ref10.apply(this, arguments); + }; +}(); +var _connectedCallback = function connectedCallback(elm) { + if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) { + var hostRef = getHostRef(elm); + var cmpMeta = hostRef.$cmpMeta$; + var endConnected = createTime('connectedCallback', cmpMeta.$tagName$); + if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) { + // first time this component has connected + hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */; + { + // find the first ancestor component (if there is one) and register + // this component as one of the actively loading child components for its ancestor + var ancestorComponent = elm; + while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) { + // climb up the ancestors looking for the first + // component that hasn't finished its lifecycle update yet + if (ancestorComponent['s-p']) { + // we found this components first ancestor component + // keep a reference to this component's ancestor component + attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent); + break; + } + } + } + // Lazy properties + // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties + if (cmpMeta.$members$) { + Object.entries(cmpMeta.$members$).map(function (_ref11) { + var _ref12 = _slicedToArray(_ref11, 2), + memberName = _ref12[0], + _ref12$ = _slicedToArray(_ref12[1], 1), + memberFlags = _ref12$[0]; + if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) { + var value = elm[memberName]; + delete elm[memberName]; + elm[memberName] = value; + } + }); + } + { + initializeComponent(elm, hostRef, cmpMeta); + } + } else { + // not the first time this has connected + // reattach any event listeners to the host + // since they would have been removed when disconnected + addHostEventListeners(elm, hostRef, cmpMeta.$listeners$); + } + endConnected(); + } +}; +var _disconnectedCallback = function disconnectedCallback(elm) { + if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) { + var hostRef = getHostRef(elm); + var instance = hostRef.$lazyInstance$; + { + if (hostRef.$rmListeners$) { + hostRef.$rmListeners$.map(function (rmListener) { + return rmListener(); + }); + hostRef.$rmListeners$ = undefined; + } + } + { + safeCall(instance, 'disconnectedCallback'); + } + } +}; +var bootstrapLazy = function bootstrapLazy(lazyBundles) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var _a; + var endBootstrap = createTime(); + var cmpTags = []; + var exclude = options.exclude || []; + var customElements = win.customElements; + var head = doc.head; + var metaCharset = /*@__PURE__*/head.querySelector('meta[charset]'); + var visibilityStyle = /*@__PURE__*/doc.createElement('style'); + var deferredConnectedCallbacks = []; + var appLoadFallback; + var isBootstrapping = true; + Object.assign(plt, options); + plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href; + lazyBundles.map(function (lazyBundle) { + lazyBundle[1].map(function (compactMeta) { + var cmpMeta = { + $flags$: compactMeta[0], + $tagName$: compactMeta[1], + $members$: compactMeta[2], + $listeners$: compactMeta[3] + }; + { + cmpMeta.$members$ = compactMeta[2]; + } + { + cmpMeta.$listeners$ = compactMeta[3]; + } + var tagName = cmpMeta.$tagName$; + var HostElement = /*#__PURE__*/function (_HTMLElement) { + // StencilLazyHost + function HostElement(self) { + var _this2; + _classCallCheck(this, HostElement); + // @ts-ignore + _this2 = _callSuper(this, HostElement, [self]); + self = _this2; + registerHost(self, cmpMeta); + if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) { + // this component is using shadow dom + // and this browser supports shadow dom + // add the read-only property "shadowRoot" to the host element + // adding the shadow root build conditionals to minimize runtime + { + { + self.attachShadow({ + mode: 'open' + }); + } + } + } + return _this2; + } + _inherits(HostElement, _HTMLElement); + return _createClass(HostElement, [{ + key: "connectedCallback", + value: function connectedCallback() { + var _this3 = this; + if (appLoadFallback) { + clearTimeout(appLoadFallback); + appLoadFallback = null; + } + if (isBootstrapping) { + // connectedCallback will be processed once all components have been registered + deferredConnectedCallbacks.push(this); + } else { + plt.jmp(function () { + return _connectedCallback(_this3); + }); + } + } + }, { + key: "disconnectedCallback", + value: function disconnectedCallback() { + var _this4 = this; + plt.jmp(function () { + return _disconnectedCallback(_this4); + }); + } + }, { + key: "componentOnReady", + value: function componentOnReady() { + return getHostRef(this).$onReadyPromise$; + } + }]); + }(/*#__PURE__*/_wrapNativeSuper(HTMLElement)); + cmpMeta.$lazyBundleId$ = lazyBundle[0]; + if (!exclude.includes(tagName) && !customElements.get(tagName)) { + cmpTags.push(tagName); + customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */)); + } + }); + }); + { + visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS; + visibilityStyle.setAttribute('data-styles', ''); + // Apply CSP nonce to the style tag if it exists + var nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc); + if (nonce != null) { + visibilityStyle.setAttribute('nonce', nonce); + } + head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild); + } + // Process deferred connectedCallbacks now all components have been registered + isBootstrapping = false; + if (deferredConnectedCallbacks.length) { + deferredConnectedCallbacks.map(function (host) { + return host.connectedCallback(); + }); + } else { + { + plt.jmp(function () { + return appLoadFallback = setTimeout(appDidLoad, 30); + }); + } + } + // Fallback appLoad event + endBootstrap(); +}; +var addHostEventListeners = function addHostEventListeners(elm, hostRef, listeners, attachParentListeners) { + if (listeners) { + listeners.map(function (_ref13) { + var _ref14 = _slicedToArray(_ref13, 3), + flags = _ref14[0], + name = _ref14[1], + method = _ref14[2]; + var target = getHostListenerTarget(elm, flags); + var handler = hostListenerProxy(hostRef, method); + var opts = hostListenerOpts(flags); + plt.ael(target, name, handler, opts); + (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(function () { + return plt.rel(target, name, handler, opts); + }); + }); + } +}; +var hostListenerProxy = function hostListenerProxy(hostRef, methodName) { + return function (ev) { + try { + { + if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) { + // instance is ready, let's call it's member method for this event + hostRef.$lazyInstance$[methodName](ev); + } else { + (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]); + } + } + } catch (e) { + consoleError(e); + } + }; +}; +var getHostListenerTarget = function getHostListenerTarget(elm, flags) { + if (flags & 16 /* LISTENER_FLAGS.TargetBody */) return doc.body; + return elm; +}; +// prettier-ignore +var hostListenerOpts = function hostListenerOpts(flags) { + return (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0; +}; +/** + * Assigns the given value to the nonce property on the runtime platform object. + * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags. + * @param nonce The value to be assigned to the platform nonce property. + * @returns void + */ +var setNonce = function setNonce(nonce) { + return plt.$nonce$ = nonce; +}; +var hostRefs = /*@__PURE__*/new WeakMap(); +var getHostRef = function getHostRef(ref) { + return hostRefs.get(ref); +}; +var registerInstance = function registerInstance(lazyInstance, hostRef) { + return hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef); +}; +var registerHost = function registerHost(elm, cmpMeta) { + var hostRef = { + $flags$: 0, + $hostElement$: elm, + $cmpMeta$: cmpMeta, + $instanceValues$: new Map() + }; + { + hostRef.$onInstancePromise$ = new Promise(function (r) { + return hostRef.$onInstanceResolve$ = r; + }); + } + { + hostRef.$onReadyPromise$ = new Promise(function (r) { + return hostRef.$onReadyResolve$ = r; + }); + elm['s-p'] = []; + elm['s-rc'] = []; + } + addHostEventListeners(elm, hostRef, cmpMeta.$listeners$); + return hostRefs.set(elm, hostRef); +}; +var isMemberInElement = function isMemberInElement(elm, memberName) { + return memberName in elm; +}; +var consoleError = function consoleError(e, el) { + return (0, console.error)(e, el); +}; +var cmpModules = /*@__PURE__*/new Map(); +var loadModule = function loadModule(cmpMeta, hostRef, hmrVersionId) { + // loadModuleImport + var exportName = cmpMeta.$tagName$.replace(/-/g, '_'); + var bundleId = cmpMeta.$lazyBundleId$; + var module = cmpModules.get(bundleId); + if (module) { + return module[exportName]; + } + if (!hmrVersionId || !BUILD.hotModuleReplacement) { + var processMod = function processMod(importedModule) { + cmpModules.set(bundleId, importedModule); + return importedModule[exportName]; + }; + switch (bundleId) { + case 'pwa-action-sheet.cjs': + return Promise.resolve().then(function () { + return /*#__PURE__*/_interopNamespace(require(/* webpackMode: "lazy" */ + './pwa-action-sheet.cjs.entry.js')); + }).then(processMod, consoleError); + case 'pwa-camera-modal.cjs': + return Promise.resolve().then(function () { + return /*#__PURE__*/_interopNamespace(require(/* webpackMode: "lazy" */ + './pwa-camera-modal.cjs.entry.js')); + }).then(processMod, consoleError); + case 'pwa-toast.cjs': + return Promise.resolve().then(function () { + return /*#__PURE__*/_interopNamespace(require(/* webpackMode: "lazy" */ + './pwa-toast.cjs.entry.js')); + }).then(processMod, consoleError); + case 'pwa-camera-modal-instance.cjs': + return Promise.resolve().then(function () { + return /*#__PURE__*/_interopNamespace(require(/* webpackMode: "lazy" */ + './pwa-camera-modal-instance.cjs.entry.js')); + }).then(processMod, consoleError); + case 'pwa-camera.cjs': + return Promise.resolve().then(function () { + return /*#__PURE__*/_interopNamespace(require(/* webpackMode: "lazy" */ + './pwa-camera.cjs.entry.js')); + }).then(processMod, consoleError); + } + } + return Promise.resolve().then(function () { + return /*#__PURE__*/_interopNamespace(require( + /* @vite-ignore */ + /* webpackInclude: /\.entry\.js$/ */ + /* webpackExclude: /\.system\.entry\.js$/ */ + /* webpackMode: "lazy" */ + "./".concat(bundleId, ".entry.js"))); + }).then(function (importedModule) { + { + cmpModules.set(bundleId, importedModule); + } + return importedModule[exportName]; + }, consoleError); +}; +var styles = /*@__PURE__*/new Map(); +var win = typeof window !== 'undefined' ? window : {}; +var doc = win.document || { + head: {} +}; +var plt = { + $flags$: 0, + $resourcesUrl$: '', + jmp: function jmp(h) { + return h(); + }, + raf: function raf(h) { + return requestAnimationFrame(h); + }, + ael: function ael(el, eventName, listener, opts) { + return el.addEventListener(eventName, listener, opts); + }, + rel: function rel(el, eventName, listener, opts) { + return el.removeEventListener(eventName, listener, opts); + }, + ce: function ce(eventName, opts) { + return new CustomEvent(eventName, opts); + } +}; +var promiseResolve = function promiseResolve(v) { + return Promise.resolve(v); +}; +var supportsConstructableStylesheets = /*@__PURE__*/function () { + try { + new CSSStyleSheet(); + return typeof new CSSStyleSheet().replaceSync === 'function'; + } catch (e) {} + return false; +}(); +var queueDomReads = []; +var queueDomWrites = []; +var queueTask = function queueTask(queue, write) { + return function (cb) { + queue.push(cb); + if (!queuePending) { + queuePending = true; + if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) { + nextTick(_flush); + } else { + plt.raf(_flush); + } + } + }; +}; +var consume = function consume(queue) { + for (var i = 0; i < queue.length; i++) { + try { + queue[i](performance.now()); + } catch (e) { + consoleError(e); + } + } + queue.length = 0; +}; +var _flush = function flush() { + // always force a bunch of medium callbacks to run, but still have + // a throttle on how many can run in a certain time + // DOM READS!!! + consume(queueDomReads); + // DOM WRITES!!! + { + consume(queueDomWrites); + if (queuePending = queueDomReads.length > 0) { + // still more to do yet, but we've run out of time + // let's let this thing cool off and try again in the next tick + plt.raf(_flush); + } + } +}; +var nextTick = /*@__PURE__*/function nextTick(cb) { + return promiseResolve().then(cb); +}; +var writeTask = /*@__PURE__*/queueTask(queueDomWrites, true); +exports.Host = Host; +exports.bootstrapLazy = bootstrapLazy; +exports.createEvent = createEvent; +exports.forceUpdate = forceUpdate; +exports.getElement = getElement; +exports.h = h; +exports.promiseResolve = promiseResolve; +exports.registerInstance = registerInstance; +exports.setNonce = setNonce; \ No newline at end of file diff --git a/src/public/js/pwa-elements/cjs/index.cjs.js b/src/public/js/pwa-elements/cjs/index.cjs.js new file mode 100644 index 0000000000000000000000000000000000000000..a726efc43fc177e976fd3b236a15756d5522d5e9 --- /dev/null +++ b/src/public/js/pwa-elements/cjs/index.cjs.js @@ -0,0 +1 @@ +'use strict'; \ No newline at end of file diff --git a/src/public/js/pwa-elements/cjs/ionicpwaelements.cjs.js b/src/public/js/pwa-elements/cjs/ionicpwaelements.cjs.js new file mode 100644 index 0000000000000000000000000000000000000000..ea55598a6afb6f23744900d293a833619870a290 --- /dev/null +++ b/src/public/js/pwa-elements/cjs/ionicpwaelements.cjs.js @@ -0,0 +1,58 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); +var index = require('./index-d7f36e37.js'); + +/* + Stencil Client Patch Browser v3.4.0 | MIT Licensed | https://stenciljs.com + */ +var patchBrowser = function patchBrowser() { + var importMeta = typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : document.currentScript && document.currentScript.src || new URL('ionicpwaelements.cjs.js', document.baseURI).href; + var opts = {}; + // TODO(STENCIL-663): Remove code related to deprecated `safari10` field. + if (importMeta !== '') { + opts.resourcesUrl = new URL('.', importMeta).href; + // TODO(STENCIL-661): Remove code related to the dynamic import shim + // TODO(STENCIL-663): Remove code related to deprecated `safari10` field. + } + return index.promiseResolve(opts); +}; +patchBrowser().then(function (options) { + return index.bootstrapLazy([["pwa-camera-modal.cjs", [[1, "pwa-camera-modal", { + "facingMode": [1, "facing-mode"], + "hidePicker": [4, "hide-picker"], + "present": [64], + "dismiss": [64] + }]]], ["pwa-action-sheet.cjs", [[1, "pwa-action-sheet", { + "header": [1], + "cancelable": [4], + "options": [16], + "open": [32] + }]]], ["pwa-toast.cjs", [[1, "pwa-toast", { + "message": [1], + "duration": [2], + "closing": [32] + }]]], ["pwa-camera.cjs", [[1, "pwa-camera", { + "facingMode": [1, "facing-mode"], + "handlePhoto": [16], + "hidePicker": [4, "hide-picker"], + "handleNoDeviceError": [16], + "noDevicesText": [1, "no-devices-text"], + "noDevicesButtonText": [1, "no-devices-button-text"], + "photo": [32], + "photoSrc": [32], + "showShutterOverlay": [32], + "flashIndex": [32], + "hasCamera": [32], + "rotation": [32], + "deviceError": [32] + }]]], ["pwa-camera-modal-instance.cjs", [[1, "pwa-camera-modal-instance", { + "facingMode": [1, "facing-mode"], + "hidePicker": [4, "hide-picker"], + "noDevicesText": [1, "no-devices-text"], + "noDevicesButtonText": [1, "no-devices-button-text"] + }, [[16, "keyup", "handleBackdropKeyUp"]]]]]], options); +}); +exports.setNonce = index.setNonce; \ No newline at end of file diff --git a/src/public/js/pwa-elements/cjs/loader.cjs.js b/src/public/js/pwa-elements/cjs/loader.cjs.js new file mode 100644 index 0000000000000000000000000000000000000000..32aa3051220e71b7b85268d47ac31ebc4a063cd7 --- /dev/null +++ b/src/public/js/pwa-elements/cjs/loader.cjs.js @@ -0,0 +1,54 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); +var index = require('./index-d7f36e37.js'); + +/* + Stencil Client Patch Esm v3.4.0 | MIT Licensed | https://stenciljs.com + */ +var patchEsm = function patchEsm() { + return index.promiseResolve(); +}; +var defineCustomElements = function defineCustomElements(win, options) { + if (typeof window === 'undefined') return Promise.resolve(); + return patchEsm().then(function () { + return index.bootstrapLazy([["pwa-camera-modal.cjs", [[1, "pwa-camera-modal", { + "facingMode": [1, "facing-mode"], + "hidePicker": [4, "hide-picker"], + "present": [64], + "dismiss": [64] + }]]], ["pwa-action-sheet.cjs", [[1, "pwa-action-sheet", { + "header": [1], + "cancelable": [4], + "options": [16], + "open": [32] + }]]], ["pwa-toast.cjs", [[1, "pwa-toast", { + "message": [1], + "duration": [2], + "closing": [32] + }]]], ["pwa-camera.cjs", [[1, "pwa-camera", { + "facingMode": [1, "facing-mode"], + "handlePhoto": [16], + "hidePicker": [4, "hide-picker"], + "handleNoDeviceError": [16], + "noDevicesText": [1, "no-devices-text"], + "noDevicesButtonText": [1, "no-devices-button-text"], + "photo": [32], + "photoSrc": [32], + "showShutterOverlay": [32], + "flashIndex": [32], + "hasCamera": [32], + "rotation": [32], + "deviceError": [32] + }]]], ["pwa-camera-modal-instance.cjs", [[1, "pwa-camera-modal-instance", { + "facingMode": [1, "facing-mode"], + "hidePicker": [4, "hide-picker"], + "noDevicesText": [1, "no-devices-text"], + "noDevicesButtonText": [1, "no-devices-button-text"] + }, [[16, "keyup", "handleBackdropKeyUp"]]]]]], options); + }); +}; +exports.setNonce = index.setNonce; +exports.defineCustomElements = defineCustomElements; \ No newline at end of file diff --git a/src/public/js/pwa-elements/cjs/pwa-action-sheet.cjs.entry.js b/src/public/js/pwa-elements/cjs/pwa-action-sheet.cjs.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..c5a36b0963a75b89db02029ff5ba3a24f47b1127 --- /dev/null +++ b/src/public/js/pwa-elements/cjs/pwa-action-sheet.cjs.entry.js @@ -0,0 +1,86 @@ +'use strict'; + +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +Object.defineProperty(exports, '__esModule', { + value: true +}); +var index = require('./index-d7f36e37.js'); +var actionSheetCss = ":host{z-index:1000;position:fixed;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex;contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:-apple-system, BlinkMacSystemFont, \"Helvetica Neue\", \"Roboto\", sans-serif}.wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:rgba(0, 0, 0, 0);-webkit-transition:400ms background-color cubic-bezier(.36,.66,.04,1);transition:400ms background-color cubic-bezier(.36,.66,.04,1)}.wrapper.open{background-color:rgba(0, 0, 0, 0.32)}.title{color:#999;height:23px;line-height:23px;padding-bottom:17px;-webkit-padding-end:16px;padding-inline-end:16px;-webkit-padding-start:16px;padding-inline-start:16px;padding-left:16px;padding-right:16px;padding-top:20px}.content{width:568px;-ms-flex-item-align:end;align-self:flex-end;background-color:#fff;-webkit-transition:400ms -webkit-transform cubic-bezier(.36,.66,.04,1);transition:400ms -webkit-transform cubic-bezier(.36,.66,.04,1);transition:400ms transform cubic-bezier(.36,.66,.04,1);transition:400ms transform cubic-bezier(.36,.66,.04,1), 400ms -webkit-transform cubic-bezier(.36,.66,.04,1);-webkit-transform:translateY(100%);transform:translateY(100%)}.wrapper.open .content{-webkit-transform:translateY(0%);transform:translateY(0%)}@media only screen and (max-width: 568px){.content{width:100%}}.action-sheet-option{cursor:pointer;height:52px;line-height:52px}.action-sheet-button{color:rgb(38, 38, 38);font-size:16px;-webkit-padding-end:16px;padding-inline-end:16px;-webkit-padding-start:16px;padding-inline-start:16px;padding-left:16px;padding-right:16px;padding-top:0px}.action-sheet-button:hover{background-color:#F6F6F6}"; +var PWAActionSheet = /*#__PURE__*/function () { + function PWAActionSheet(hostRef) { + _classCallCheck(this, PWAActionSheet); + index.registerInstance(this, hostRef); + this.onSelection = index.createEvent(this, "onSelection", 7); + this.header = undefined; + this.cancelable = true; + this.options = []; + this.open = false; + } + return _createClass(PWAActionSheet, [{ + key: "componentDidLoad", + value: function componentDidLoad() { + var _this = this; + requestAnimationFrame(function () { + _this.open = true; + }); + } + }, { + key: "dismiss", + value: function dismiss() { + if (this.cancelable) { + this.close(); + } + } + }, { + key: "close", + value: function close() { + var _this2 = this; + this.open = false; + setTimeout(function () { + _this2.el.parentNode.removeChild(_this2.el); + }, 500); + } + }, { + key: "handleOptionClick", + value: function handleOptionClick(e, i) { + e.stopPropagation(); + this.onSelection.emit(i); + this.close(); + } + }, { + key: "render", + value: function render() { + var _this3 = this; + return index.h("div", { + class: "wrapper".concat(this.open ? ' open' : ''), + onClick: function onClick() { + return _this3.dismiss(); + } + }, index.h("div", { + class: "content" + }, index.h("div", { + class: "title" + }, this.header), this.options.map(function (option, i) { + return index.h("div", { + class: "action-sheet-option", + onClick: function onClick(e) { + return _this3.handleOptionClick(e, i); + } + }, index.h("div", { + class: "action-sheet-button" + }, option.title)); + }))); + } + }, { + key: "el", + get: function get() { + return index.getElement(this); + } + }]); +}(); +PWAActionSheet.style = actionSheetCss; +exports.pwa_action_sheet = PWAActionSheet; \ No newline at end of file diff --git a/src/public/js/pwa-elements/cjs/pwa-camera-modal-instance.cjs.entry.js b/src/public/js/pwa-elements/cjs/pwa-camera-modal-instance.cjs.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..2d8fbd4ef5e1c9852154fd5f1c384afd881a5ab0 --- /dev/null +++ b/src/public/js/pwa-elements/cjs/pwa-camera-modal-instance.cjs.entry.js @@ -0,0 +1,110 @@ +'use strict'; + +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } +function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } +function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +Object.defineProperty(exports, '__esModule', { + value: true +}); +var index = require('./index-d7f36e37.js'); +var cameraModalInstanceCss = ":host{z-index:1000;position:fixed;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex;contain:strict;--inset-width:600px;--inset-height:600px}.wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:rgba(0, 0, 0, 0.15)}.content{-webkit-box-shadow:0px 0px 5px rgba(0, 0, 0, 0.2);box-shadow:0px 0px 5px rgba(0, 0, 0, 0.2);width:var(--inset-width);height:var(--inset-height);max-height:100%}@media only screen and (max-width: 600px){.content{width:100%;height:100%}}"; +var PWACameraModal = /*#__PURE__*/function () { + function PWACameraModal(hostRef) { + var _this = this; + _classCallCheck(this, PWACameraModal); + index.registerInstance(this, hostRef); + this.onPhoto = index.createEvent(this, "onPhoto", 7); + this.noDeviceError = index.createEvent(this, "noDeviceError", 7); + this.handlePhoto = /*#__PURE__*/function () { + var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(photo) { + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _this.onPhoto.emit(photo); + case 1: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function (_x) { + return _ref.apply(this, arguments); + }; + }(); + this.handleNoDeviceError = /*#__PURE__*/function () { + var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(photo) { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _this.noDeviceError.emit(photo); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return function (_x2) { + return _ref2.apply(this, arguments); + }; + }(); + this.facingMode = 'user'; + this.hidePicker = false; + this.noDevicesText = 'No camera found'; + this.noDevicesButtonText = 'Choose image'; + } + return _createClass(PWACameraModal, [{ + key: "handleBackdropClick", + value: function handleBackdropClick(e) { + if (e.target !== this.el) { + this.onPhoto.emit(null); + } + } + }, { + key: "handleComponentClick", + value: function handleComponentClick(e) { + e.stopPropagation(); + } + }, { + key: "handleBackdropKeyUp", + value: function handleBackdropKeyUp(e) { + if (e.key === "Escape") { + this.onPhoto.emit(null); + } + } + }, { + key: "render", + value: function render() { + var _this2 = this; + return index.h("div", { + class: "wrapper", + onClick: function onClick(e) { + return _this2.handleBackdropClick(e); + } + }, index.h("div", { + class: "content" + }, index.h("pwa-camera", { + onClick: function onClick(e) { + return _this2.handleComponentClick(e); + }, + facingMode: this.facingMode, + hidePicker: this.hidePicker, + handlePhoto: this.handlePhoto, + handleNoDeviceError: this.handleNoDeviceError, + noDevicesButtonText: this.noDevicesButtonText, + noDevicesText: this.noDevicesText + }))); + } + }, { + key: "el", + get: function get() { + return index.getElement(this); + } + }]); +}(); +PWACameraModal.style = cameraModalInstanceCss; +exports.pwa_camera_modal_instance = PWACameraModal; \ No newline at end of file diff --git a/src/public/js/pwa-elements/cjs/pwa-camera-modal.cjs.entry.js b/src/public/js/pwa-elements/cjs/pwa-camera-modal.cjs.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..7e7d40942cb860e647438f89aaab402a4658da99 --- /dev/null +++ b/src/public/js/pwa-elements/cjs/pwa-camera-modal.cjs.entry.js @@ -0,0 +1,124 @@ +'use strict'; + +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } +function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } +function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +Object.defineProperty(exports, '__esModule', { + value: true +}); +var index = require('./index-d7f36e37.js'); +var cameraModalCss = ":host{z-index:1000;position:fixed;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex;contain:strict}.wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:rgba(0, 0, 0, 0.15)}.content{-webkit-box-shadow:0px 0px 5px rgba(0, 0, 0, 0.2);box-shadow:0px 0px 5px rgba(0, 0, 0, 0.2);width:600px;height:600px}"; +var PWACameraModal = /*#__PURE__*/function () { + function PWACameraModal(hostRef) { + _classCallCheck(this, PWACameraModal); + index.registerInstance(this, hostRef); + this.onPhoto = index.createEvent(this, "onPhoto", 7); + this.noDeviceError = index.createEvent(this, "noDeviceError", 7); + this.facingMode = 'user'; + this.hidePicker = false; + } + return _createClass(PWACameraModal, [{ + key: "present", + value: function () { + var _present = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() { + var _this = this; + var camera; + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + camera = document.createElement('pwa-camera-modal-instance'); + camera.facingMode = this.facingMode; + camera.hidePicker = this.hidePicker; + camera.addEventListener('onPhoto', /*#__PURE__*/function () { + var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) { + var photo; + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + if (_this._modal) { + _context.next = 2; + break; + } + return _context.abrupt("return"); + case 2: + photo = e.detail; + _this.onPhoto.emit(photo); + case 4: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function (_x) { + return _ref.apply(this, arguments); + }; + }()); + camera.addEventListener('noDeviceError', /*#__PURE__*/function () { + var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _this.noDeviceError.emit(e); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return function (_x2) { + return _ref2.apply(this, arguments); + }; + }()); + document.body.append(camera); + this._modal = camera; + case 7: + case "end": + return _context3.stop(); + } + }, _callee3, this); + })); + function present() { + return _present.apply(this, arguments); + } + return present; + }() + }, { + key: "dismiss", + value: function () { + var _dismiss = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() { + return _regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + if (this._modal) { + _context4.next = 2; + break; + } + return _context4.abrupt("return"); + case 2: + this._modal && this._modal.parentNode.removeChild(this._modal); + this._modal = null; + case 4: + case "end": + return _context4.stop(); + } + }, _callee4, this); + })); + function dismiss() { + return _dismiss.apply(this, arguments); + } + return dismiss; + }() + }, { + key: "render", + value: function render() { + return index.h("div", null); + } + }]); +}(); +PWACameraModal.style = cameraModalCss; +exports.pwa_camera_modal = PWACameraModal; \ No newline at end of file diff --git a/src/public/js/pwa-elements/cjs/pwa-camera.cjs.entry.js b/src/public/js/pwa-elements/cjs/pwa-camera.cjs.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..be72d8332e8df40b85303153842dfd7c0d77da39 --- /dev/null +++ b/src/public/js/pwa-elements/cjs/pwa-camera.cjs.entry.js @@ -0,0 +1,847 @@ +'use strict'; + +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } +function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } +function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +Object.defineProperty(exports, '__esModule', { + value: true +}); +var index = require('./index-d7f36e37.js'); + +/** + * MediaStream ImageCapture polyfill + * + * @license + * Copyright 2018 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +var ImageCapture = window.ImageCapture; +if (typeof ImageCapture === 'undefined') { + ImageCapture = /*#__PURE__*/function () { + /** + * TODO https://www.w3.org/TR/image-capture/#constructors + * + * @param {MediaStreamTrack} videoStreamTrack - A MediaStreamTrack of the 'video' kind + */ + function ImageCapture(videoStreamTrack) { + var _this = this; + _classCallCheck(this, ImageCapture); + if (videoStreamTrack.kind !== 'video') throw new DOMException('NotSupportedError'); + this._videoStreamTrack = videoStreamTrack; + if (!('readyState' in this._videoStreamTrack)) { + // Polyfill for Firefox + this._videoStreamTrack.readyState = 'live'; + } + // MediaStream constructor not available until Chrome 55 - https://www.chromestatus.com/feature/5912172546752512 + this._previewStream = new MediaStream([videoStreamTrack]); + this.videoElement = document.createElement('video'); + this.videoElementPlaying = new Promise(function (resolve) { + _this.videoElement.addEventListener('playing', resolve); + }); + if (HTMLMediaElement) { + this.videoElement.srcObject = this._previewStream; // Safari 11 doesn't allow use of createObjectURL for MediaStream + } else { + this.videoElement.src = URL.createObjectURL(this._previewStream); + } + this.videoElement.muted = true; + this.videoElement.setAttribute('playsinline', ''); // Required by Safari on iOS 11. See https://webkit.org/blog/6784 + this.videoElement.play(); + this.canvasElement = document.createElement('canvas'); + // TODO Firefox has https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas + this.canvas2dContext = this.canvasElement.getContext('2d'); + } + /** + * https://w3c.github.io/mediacapture-image/index.html#dom-imagecapture-videostreamtrack + * @return {MediaStreamTrack} The MediaStreamTrack passed into the constructor + */ + return _createClass(ImageCapture, [{ + key: "videoStreamTrack", + get: function get() { + return this._videoStreamTrack; + } + /** + * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-getphotocapabilities + * @return {Promise<PhotoCapabilities>} Fulfilled promise with + * [PhotoCapabilities](https://www.w3.org/TR/image-capture/#idl-def-photocapabilities) + * object on success, rejected promise on failure + */ + }, { + key: "getPhotoCapabilities", + value: function getPhotoCapabilities() { + return new Promise(function executorGPC(resolve, reject) { + // TODO see https://github.com/w3c/mediacapture-image/issues/97 + var MediaSettingsRange = { + current: 0, + min: 0, + max: 0 + }; + resolve({ + exposureCompensation: MediaSettingsRange, + exposureMode: 'none', + fillLightMode: ['none'], + focusMode: 'none', + imageHeight: MediaSettingsRange, + imageWidth: MediaSettingsRange, + iso: MediaSettingsRange, + redEyeReduction: false, + whiteBalanceMode: 'none', + zoom: MediaSettingsRange + }); + reject(new DOMException('OperationError')); + }); + } + /** + * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-setoptions + * @param {Object} photoSettings - Photo settings dictionary, https://www.w3.org/TR/image-capture/#idl-def-photosettings + * @return {Promise<void>} Fulfilled promise on success, rejected promise on failure + */ + }, { + key: "setOptions", + value: function setOptions() { + var _photoSettings = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return new Promise(function executorSO(_resolve, _reject) { + // TODO + }); + } + /** + * TODO + * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-takephoto + * @return {Promise<Blob>} Fulfilled promise with [Blob](https://www.w3.org/TR/FileAPI/#blob) + * argument on success; rejected promise on failure + */ + }, { + key: "takePhoto", + value: function takePhoto() { + var self = this; + return new Promise(function executorTP(resolve, reject) { + // `If the readyState of the MediaStreamTrack provided in the constructor is not live, + // return a promise rejected with a new DOMException whose name is "InvalidStateError".` + if (self._videoStreamTrack.readyState !== 'live') { + return reject(new DOMException('InvalidStateError')); + } + self.videoElementPlaying.then(function () { + try { + self.canvasElement.width = self.videoElement.videoWidth; + self.canvasElement.height = self.videoElement.videoHeight; + self.canvas2dContext.drawImage(self.videoElement, 0, 0); + self.canvasElement.toBlob(resolve); + } catch (error) { + reject(new DOMException('UnknownError')); + } + }); + }); + } + /** + * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-grabframe + * @return {Promise<ImageBitmap>} Fulfilled promise with + * [ImageBitmap](https://www.w3.org/TR/html51/webappapis.html#webappapis-images) + * argument on success; rejected promise on failure + */ + }, { + key: "grabFrame", + value: function grabFrame() { + var self = this; + return new Promise(function executorGF(resolve, reject) { + // `If the readyState of the MediaStreamTrack provided in the constructor is not live, + // return a promise rejected with a new DOMException whose name is "InvalidStateError".` + if (self._videoStreamTrack.readyState !== 'live') { + return reject(new DOMException('InvalidStateError')); + } + self.videoElementPlaying.then(function () { + try { + self.canvasElement.width = self.videoElement.videoWidth; + self.canvasElement.height = self.videoElement.videoHeight; + self.canvas2dContext.drawImage(self.videoElement, 0, 0); + // TODO polyfill https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmapFactories/createImageBitmap for IE + resolve(window.createImageBitmap(self.canvasElement)); + } catch (error) { + reject(new DOMException('UnknownError')); + } + }); + }); + } + }]); + }(); +} +window.ImageCapture = ImageCapture; +var cameraCss = ":host{--header-height:4em;--footer-height:9em;--header-height-landscape:3em;--footer-height-landscape:6em;--shutter-size:6em;--icon-size-header:1.5em;--icon-size-footer:2.5em;--margin-size-header:1.5em;--margin-size-footer:2.0em;font-family:-apple-system, BlinkMacSystemFont,\n “Segoe UIâ€, “Robotoâ€, “Droid Sansâ€, “Helvetica Neueâ€, sans-serif;display:block;width:100%;height:100%}.items{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;width:100%;height:100%;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.items .item{-ms-flex:1;flex:1;text-align:center}.items .item:first-child{text-align:left}.items .item:last-child{text-align:right}.camera-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100%;height:100%}.camera-header{color:white;background-color:black;height:var(--header-height)}.camera-header .items{padding:var(--margin-size-header)}.camera-footer{position:relative;color:white;background-color:black;height:var(--footer-height)}.camera-footer .items{padding:var(--margin-size-footer)}@media (max-height: 375px){.camera-header{--header-height:var(--header-height-landscape)}.camera-footer{--footer-height:var(--footer-height-landscape)}.camera-footer .shutter{--shutter-size:4em}}.camera-video{position:relative;-ms-flex:1;flex:1;overflow:hidden;background-color:black}video{width:100%;height:100%;max-height:100%;min-height:100%;-o-object-fit:cover;object-fit:cover;background-color:black}.pick-image{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;left:var(--margin-size-footer);top:0;height:100%;width:var(--icon-size-footer);color:white}.pick-image input{visibility:hidden}.pick-image svg{cursor:pointer;fill:white;width:var(--icon-size-footer);height:var(--icon-size-footer)}.shutter{position:absolute;left:50%;top:50%;width:var(--shutter-size);height:var(--shutter-size);margin-top:calc(var(--shutter-size) / -2);margin-left:calc(var(--shutter-size) / -2);border-radius:100%;background-color:#c6cdd8;padding:12px;-webkit-box-sizing:border-box;box-sizing:border-box}.shutter:active .shutter-button{background-color:#9da9bb}.shutter-button{background-color:white;border-radius:100%;width:100%;height:100%}.rotate{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;right:var(--margin-size-footer);top:0;height:100%;width:var(--icon-size-footer);color:white}.rotate img{width:var(--icon-size-footer);height:var(--icon-size-footer)}.shutter-overlay{z-index:5;position:absolute;width:100%;height:100%;background-color:black}.error{width:100%;height:100%;color:white;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.no-device{background-color:black;-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:white}.no-device label{cursor:pointer;background:#fff;border-radius:6px;padding:6px 8px;color:black}.no-device input{visibility:hidden;height:0;margin-top:16px}.accept{background-color:black;-ms-flex:1;flex:1;overflow:hidden}.accept .accept-image{width:100%;height:100%;max-height:100%;background-position:center center;background-size:cover;background-repeat:no-repeat}.close img{cursor:pointer;width:var(--icon-size-header);height:var(--icon-size-header)}.flash img{width:var(--icon-size-header);height:var(--icon-size-header)}.accept-use img{width:var(--icon-size-footer);height:var(--icon-size-footer)}.accept-cancel img{width:var(--icon-size-footer);height:var(--icon-size-footer)}.offscreen-image-render{top:0;left:0;visibility:hidden;pointer-events:none;width:100%;height:100%}"; +var CameraPWA = /*#__PURE__*/function () { + function CameraPWA(hostRef) { + var _this2 = this; + _classCallCheck(this, CameraPWA); + index.registerInstance(this, hostRef); + // Whether the device has multiple cameras (front/back) + this.hasMultipleCameras = false; + // Whether the device has flash support + this.hasFlash = false; + // Flash modes for camera + this.flashModes = []; + // Current flash mode + this.flashMode = 'off'; + this.handlePickFile = function (_e) {}; + this.handleShutterClick = function (_e) { + console.debug('shutter click'); + _this2.capture(); + }; + this.handleRotateClick = function (_e) { + _this2.rotate(); + }; + this.handleClose = function (_e) { + _this2.handlePhoto && _this2.handlePhoto(null); + }; + this.handleFlashClick = function (_e) { + _this2.cycleFlash(); + }; + this.handleCancelPhoto = function (_e) { + var track = _this2.stream && _this2.stream.getTracks()[0]; + var c = track && track.getConstraints(); + _this2.photo = null; + _this2.photoSrc = null; + if (c) { + _this2.initCamera({ + video: { + facingMode: c.facingMode + } + }); + } else { + _this2.initCamera(); + } + }; + this.handleAcceptPhoto = function (_e) { + _this2.handlePhoto && _this2.handlePhoto(_this2.photo); + }; + this.handleFileInputChange = /*#__PURE__*/function () { + var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) { + var input, file, orientation; + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + input = e.target; + file = input.files[0]; + _context.prev = 2; + _context.next = 5; + return _this2.getOrientation(file); + case 5: + orientation = _context.sent; + console.debug('Got orientation', orientation); + _this2.photoOrientation = orientation; + _context.next = 12; + break; + case 10: + _context.prev = 10; + _context.t0 = _context["catch"](2); + case 12: + _this2.handlePhoto && _this2.handlePhoto(file); + case 13: + case "end": + return _context.stop(); + } + }, _callee, null, [[2, 10]]); + })); + return function (_x) { + return _ref.apply(this, arguments); + }; + }(); + this.handleVideoMetadata = function (e) { + console.debug('Video metadata', e); + }; + this.facingMode = 'user'; + this.handlePhoto = undefined; + this.hidePicker = false; + this.handleNoDeviceError = undefined; + this.noDevicesText = 'No camera found'; + this.noDevicesButtonText = 'Choose image'; + this.photo = undefined; + this.photoSrc = undefined; + this.showShutterOverlay = false; + this.flashIndex = 0; + this.hasCamera = null; + this.rotation = 0; + this.deviceError = null; + } + return _createClass(CameraPWA, [{ + key: "componentDidLoad", + value: function () { + var _componentDidLoad = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + this.defaultConstraints = { + video: { + facingMode: this.facingMode + } + }; + // Figure out how many cameras we have + _context2.next = 3; + return this.queryDevices(); + case 3: + _context2.next = 5; + return this.initCamera(); + case 5: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function componentDidLoad() { + return _componentDidLoad.apply(this, arguments); + } + return componentDidLoad; + }() + }, { + key: "disconnectedCallback", + value: function disconnectedCallback() { + this.stopStream(); + this.photoSrc && URL.revokeObjectURL(this.photoSrc); + } + }, { + key: "hasImageCapture", + value: function hasImageCapture() { + return 'ImageCapture' in window; + } + /** + * Query the list of connected devices and figure out how many video inputs we have. + */ + }, { + key: "queryDevices", + value: (function () { + var _queryDevices = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() { + var devices, videoDevices; + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + _context3.prev = 0; + _context3.next = 3; + return navigator.mediaDevices.enumerateDevices(); + case 3: + devices = _context3.sent; + videoDevices = devices.filter(function (d) { + return d.kind == 'videoinput'; + }); + this.hasCamera = !!videoDevices.length; + this.hasMultipleCameras = videoDevices.length > 1; + _context3.next = 12; + break; + case 9: + _context3.prev = 9; + _context3.t0 = _context3["catch"](0); + this.deviceError = _context3.t0; + case 12: + case "end": + return _context3.stop(); + } + }, _callee3, this, [[0, 9]]); + })); + function queryDevices() { + return _queryDevices.apply(this, arguments); + } + return queryDevices; + }()) + }, { + key: "initCamera", + value: function () { + var _initCamera = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(constraints) { + var stream; + return _regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + if (!constraints) { + constraints = this.defaultConstraints; + } + _context4.prev = 1; + _context4.next = 4; + return navigator.mediaDevices.getUserMedia(Object.assign({ + video: true, + audio: false + }, constraints)); + case 4: + stream = _context4.sent; + this.initStream(stream); + _context4.next = 12; + break; + case 8: + _context4.prev = 8; + _context4.t0 = _context4["catch"](1); + this.deviceError = _context4.t0; + this.handleNoDeviceError && this.handleNoDeviceError(_context4.t0); + case 12: + case "end": + return _context4.stop(); + } + }, _callee4, this, [[1, 8]]); + })); + function initCamera(_x2) { + return _initCamera.apply(this, arguments); + } + return initCamera; + }() + }, { + key: "initStream", + value: function () { + var _initStream = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(stream) { + return _regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + this.stream = stream; + this.videoElement.srcObject = stream; + if (!this.hasImageCapture()) { + _context5.next = 8; + break; + } + this.imageCapture = new window.ImageCapture(stream.getVideoTracks()[0]); + _context5.next = 6; + return this.initPhotoCapabilities(this.imageCapture); + case 6: + _context5.next = 10; + break; + case 8: + this.deviceError = 'No image capture'; + this.handleNoDeviceError && this.handleNoDeviceError(); + case 10: + // Always re-render + index.forceUpdate(this.el); + case 11: + case "end": + return _context5.stop(); + } + }, _callee5, this); + })); + function initStream(_x3) { + return _initStream.apply(this, arguments); + } + return initStream; + }() + }, { + key: "initPhotoCapabilities", + value: function () { + var _initPhotoCapabilities = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(imageCapture) { + var c; + return _regeneratorRuntime().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + _context6.next = 2; + return imageCapture.getPhotoCapabilities(); + case 2: + c = _context6.sent; + if (c.fillLightMode && c.fillLightMode.length > 1) { + this.flashModes = c.fillLightMode.map(function (m) { + return m; + }); + // Try to recall the current flash mode + if (this.flashMode) { + this.flashMode = this.flashModes[this.flashModes.indexOf(this.flashMode)] || 'off'; + this.flashIndex = this.flashModes.indexOf(this.flashMode) || 0; + } else { + this.flashIndex = 0; + } + } + case 4: + case "end": + return _context6.stop(); + } + }, _callee6, this); + })); + function initPhotoCapabilities(_x4) { + return _initPhotoCapabilities.apply(this, arguments); + } + return initPhotoCapabilities; + }() + }, { + key: "stopStream", + value: function stopStream() { + if (this.videoElement) { + this.videoElement.srcObject = null; + } + this.stream && this.stream.getTracks().forEach(function (track) { + return track.stop(); + }); + } + }, { + key: "capture", + value: function () { + var _capture = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7() { + var photo; + return _regeneratorRuntime().wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { + case 0: + if (!this.hasImageCapture()) { + _context7.next = 13; + break; + } + _context7.prev = 1; + _context7.next = 4; + return this.imageCapture.takePhoto({ + fillLightMode: this.flashModes.length > 1 ? this.flashMode : undefined + }); + case 4: + photo = _context7.sent; + _context7.next = 7; + return this.flashScreen(); + case 7: + this.promptAccept(photo); + _context7.next = 13; + break; + case 10: + _context7.prev = 10; + _context7.t0 = _context7["catch"](1); + console.error('Unable to take photo!', _context7.t0); + case 13: + this.stopStream(); + case 14: + case "end": + return _context7.stop(); + } + }, _callee7, this, [[1, 10]]); + })); + function capture() { + return _capture.apply(this, arguments); + } + return capture; + }() + }, { + key: "promptAccept", + value: function () { + var _promptAccept = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(photo) { + var orientation; + return _regeneratorRuntime().wrap(function _callee8$(_context8) { + while (1) switch (_context8.prev = _context8.next) { + case 0: + this.photo = photo; + _context8.next = 3; + return this.getOrientation(photo); + case 3: + orientation = _context8.sent; + console.debug('Got orientation', orientation); + this.photoOrientation = orientation; + if (!orientation) { + _context8.next = 18; + break; + } + _context8.t0 = orientation; + _context8.next = _context8.t0 === 1 ? 10 : _context8.t0 === 2 ? 10 : _context8.t0 === 3 ? 12 : _context8.t0 === 4 ? 12 : _context8.t0 === 5 ? 14 : _context8.t0 === 6 ? 14 : _context8.t0 === 7 ? 16 : _context8.t0 === 8 ? 16 : 18; + break; + case 10: + this.rotation = 0; + return _context8.abrupt("break", 18); + case 12: + this.rotation = 180; + return _context8.abrupt("break", 18); + case 14: + this.rotation = 90; + return _context8.abrupt("break", 18); + case 16: + this.rotation = 270; + return _context8.abrupt("break", 18); + case 18: + this.photoSrc = URL.createObjectURL(photo); + case 19: + case "end": + return _context8.stop(); + } + }, _callee8, this); + })); + function promptAccept(_x5) { + return _promptAccept.apply(this, arguments); + } + return promptAccept; + }() + }, { + key: "getOrientation", + value: function getOrientation(file) { + return new Promise(function (resolve) { + var reader = new FileReader(); + reader.onload = function (event) { + var view = new DataView(event.target.result); + if (view.getUint16(0, false) !== 0xFFD8) { + return resolve(-2); + } + var length = view.byteLength; + var offset = 2; + while (offset < length) { + var marker = view.getUint16(offset, false); + offset += 2; + if (marker === 0xFFE1) { + if (view.getUint32(offset += 2, false) !== 0x45786966) { + return resolve(-1); + } + var little = view.getUint16(offset += 6, false) === 0x4949; + offset += view.getUint32(offset + 4, little); + var tags = view.getUint16(offset, little); + offset += 2; + for (var i = 0; i < tags; i++) { + if (view.getUint16(offset + i * 12, little) === 0x0112) { + return resolve(view.getUint16(offset + i * 12 + 8, little)); + } + } + } else if ((marker & 0xFF00) !== 0xFF00) { + break; + } else { + offset += view.getUint16(offset, false); + } + } + return resolve(-1); + }; + reader.readAsArrayBuffer(file.slice(0, 64 * 1024)); + }); + } + }, { + key: "rotate", + value: function rotate() { + this.stopStream(); + var track = this.stream && this.stream.getTracks()[0]; + if (!track) { + return; + } + var c = track.getConstraints(); + var facingMode = c.facingMode; + if (!facingMode) { + var _c = track.getCapabilities(); + if (_c.facingMode) { + facingMode = _c.facingMode[0]; + } + } + if (facingMode === 'environment') { + this.initCamera({ + video: { + facingMode: 'user' + } + }); + } else { + this.initCamera({ + video: { + facingMode: 'environment' + } + }); + } + } + }, { + key: "setFlashMode", + value: function setFlashMode(mode) { + console.debug('New flash mode: ', mode); + this.flashMode = mode; + } + }, { + key: "cycleFlash", + value: function cycleFlash() { + if (this.flashModes.length > 0) { + this.flashIndex = (this.flashIndex + 1) % this.flashModes.length; + this.setFlashMode(this.flashModes[this.flashIndex]); + } + } + }, { + key: "flashScreen", + value: function () { + var _flashScreen = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9() { + var _this3 = this; + return _regeneratorRuntime().wrap(function _callee9$(_context9) { + while (1) switch (_context9.prev = _context9.next) { + case 0: + return _context9.abrupt("return", new Promise(function (resolve, _reject) { + _this3.showShutterOverlay = true; + setTimeout(function () { + _this3.showShutterOverlay = false; + resolve(); + }, 100); + })); + case 1: + case "end": + return _context9.stop(); + } + }, _callee9); + })); + function flashScreen() { + return _flashScreen.apply(this, arguments); + } + return flashScreen; + }() + }, { + key: "iconExit", + value: function iconExit() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Cg id='Icon_5_'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M402.2,134L378,109.8c-1.6-1.6-4.1-1.6-5.7,0L258.8,223.4c-1.6,1.6-4.1,1.6-5.7,0L139.6,109.8 c-1.6-1.6-4.1-1.6-5.7,0L109.8,134c-1.6,1.6-1.6,4.1,0,5.7l113.5,113.5c1.6,1.6,1.6,4.1,0,5.7L109.8,372.4c-1.6,1.6-1.6,4.1,0,5.7 l24.1,24.1c1.6,1.6,4.1,1.6,5.7,0l113.5-113.5c1.6-1.6,4.1-1.6,5.7,0l113.5,113.5c1.6,1.6,4.1,1.6,5.7,0l24.1-24.1 c1.6-1.6,1.6-4.1,0-5.7L288.6,258.8c-1.6-1.6-1.6-4.1,0-5.7l113.5-113.5C403.7,138.1,403.7,135.5,402.2,134z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "iconPhotos", + value: function iconPhotos() { + return index.h("svg", { + xmlns: 'http://www.w3.org/2000/svg', + width: '512', + height: '512', + viewBox: '0 0 512 512' + }, index.h("path", { + d: 'M450.29,112H142c-34,0-62,27.51-62,61.33V418.67C80,452.49,108,480,142,480H450c34,0,62-26.18,62-60V173.33C512,139.51,484.32,112,450.29,112Zm-77.15,61.34a46,46,0,1,1-46.28,46A46.19,46.19,0,0,1,373.14,173.33Zm-231.55,276c-17,0-29.86-13.75-29.86-30.66V353.85l90.46-80.79a46.54,46.54,0,0,1,63.44,1.83L328.27,337l-113,112.33ZM480,418.67a30.67,30.67,0,0,1-30.71,30.66H259L376.08,333a46.24,46.24,0,0,1,59.44-.16L480,370.59Z' + }), index.h("path", { + d: 'M384,32H64A64,64,0,0,0,0,96V352a64.11,64.11,0,0,0,48,62V152a72,72,0,0,1,72-72H446A64.11,64.11,0,0,0,384,32Z' + })); + } + }, { + key: "iconConfirm", + value: function iconConfirm() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Ccircle fill='%232CD865' cx='256' cy='256' r='256'/%3E%3Cg id='Icon_1_'%3E%3Cg%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M208,301.4l-55.4-55.5c-1.5-1.5-4-1.6-5.6-0.1l-23.4,22.3c-1.6,1.6-1.7,4.1-0.1,5.7l81.6,81.4 c3.1,3.1,8.2,3.1,11.3,0l171.8-171.7c1.6-1.6,1.6-4.2-0.1-5.7l-23.4-22.3c-1.6-1.5-4.1-1.5-5.6,0.1L213.7,301.4 C212.1,303,209.6,303,208,301.4z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "iconReverseCamera", + value: function iconReverseCamera() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M352,0H160C72,0,0,72,0,160v192c0,88,72,160,160,160h192c88,0,160-72,160-160V160C512,72,440,0,352,0z M356.7,365.8l-3.7,3.3c-27,23.2-61.4,35.9-96.8,35.9c-72.4,0-135.8-54.7-147-125.6c-0.3-1.9-2-3.3-3.9-3.3H64 c-3.3,0-5.2-3.8-3.2-6.4l61.1-81.4c1.6-2.1,4.7-2.1,6.4-0.1l63.3,81.4c2,2.6,0.2,6.5-3.2,6.5h-40.6c-2.5,0-4.5,2.4-3.9,4.8 c11.5,51.5,59.2,90.6,112.4,90.6c26.4,0,51.8-9.7,73.7-27.9l3.1-2.5c1.6-1.3,3.9-1.1,5.3,0.3l18.5,18.6 C358.5,361.6,358.4,364.3,356.7,365.8z M451.4,245.6l-61,83.5c-1.6,2.2-4.8,2.2-6.4,0.1l-63.3-83.3c-2-2.6-0.1-6.4,3.2-6.4h40.8 c2.5,0,4.4-2.3,3.9-4.8c-5.1-24.2-17.8-46.5-36.5-63.7c-21.2-19.4-48.2-30.1-76-30.1c-26.5,0-52.6,9.7-73.7,27.3l-3.1,2.5 c-1.6,1.3-3.9,1.2-5.4-0.3l-18.5-18.5c-1.6-1.6-1.5-4.3,0.2-5.9l3.5-3.1c27-23.2,61.4-35.9,96.8-35.9c38,0,73.9,13.7,101.2,38.7 c23.2,21.1,40.3,55.2,45.7,90.1c0.3,1.9,1.9,3.4,3.9,3.4h41.3C451.4,239.2,453.3,243,451.4,245.6z'/%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "iconRetake", + value: function iconRetake() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Ccircle fill='%23727A87' cx='256' cy='256' r='256'/%3E%3Cg id='Icon_5_'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M394.2,142L370,117.8c-1.6-1.6-4.1-1.6-5.7,0L258.8,223.4c-1.6,1.6-4.1,1.6-5.7,0L147.6,117.8 c-1.6-1.6-4.1-1.6-5.7,0L117.8,142c-1.6,1.6-1.6,4.1,0,5.7l105.5,105.5c1.6,1.6,1.6,4.1,0,5.7L117.8,364.4c-1.6,1.6-1.6,4.1,0,5.7 l24.1,24.1c1.6,1.6,4.1,1.6,5.7,0l105.5-105.5c1.6-1.6,4.1-1.6,5.7,0l105.5,105.5c1.6,1.6,4.1,1.6,5.7,0l24.1-24.1 c1.6-1.6,1.6-4.1,0-5.7L288.6,258.8c-1.6-1.6-1.6-4.1,0-5.7l105.5-105.5C395.7,146.1,395.7,143.5,394.2,142z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "iconFlashOff", + value: function iconFlashOff() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cg%3E%3Cpath class='st0' d='M498,483.7L42.3,28L14,56.4l149.8,149.8L91,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9c1.6,0,2.7,1.3,2.4,2.7 L197.6,507c-1,4.4,5.8,6.9,8.9,3.2l118.6-142.8L469.6,512L498,483.7z'/%3E%3Cpath class='st0' d='M449,218.2c2.5-3,0.1-7.2-3.9-7.2H301.2c-1.6,0-2.7-1.3-2.4-2.7L342.4,5c1-4.4-5.8-6.9-8.9-3.2L214.9,144.6 l161.3,161.3L449,218.2z'/%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "iconFlashOn", + value: function iconFlashOn() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cpath class='st0' d='M287.2,211c-1.6,0-2.7-1.3-2.4-2.7L328.4,5c1-4.4-5.8-6.9-8.9-3.2L77,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9 c1.6,0,2.7,1.3,2.4,2.7L183.6,507c-1,4.4,5.8,6.9,8.9,3.2l242.5-292c2.5-3,0.1-7.2-3.9-7.2L287.2,211L287.2,211z'/%3E%3C/svg%3E"; + } + }, { + key: "iconFlashAuto", + value: function iconFlashAuto() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cpath class='st0' d='M287.2,211c-1.6,0-2.7-1.3-2.4-2.7L328.4,5c1-4.4-5.8-6.9-8.9-3.2L77,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9 c1.6,0,2.7,1.3,2.4,2.7L183.6,507c-1,4.4,5.8,6.9,8.9,3.2l242.5-292c2.5-3,0.1-7.2-3.9-7.2L287.2,211L287.2,211z'/%3E%3Cg%3E%3Cpath class='st0' d='M321.3,186l74-186H438l74,186h-43.5l-11.9-32.5h-80.9l-12,32.5H321.3z M415.8,47.9l-27.2,70.7h54.9l-27.2-70.7 H415.8z'/%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "render", + value: function render() { + var _this4 = this; + // const acceptStyles = { transform: `rotate(${-this.rotation}deg)` }; + var acceptStyles = {}; + return index.h("div", { + class: "camera-wrapper" + }, index.h("div", { + class: "camera-header" + }, index.h("section", { + class: "items" + }, index.h("div", { + class: "item close", + onClick: function onClick(e) { + return _this4.handleClose(e); + } + }, index.h("img", { + src: this.iconExit() + })), index.h("div", { + class: "item flash", + onClick: function onClick(e) { + return _this4.handleFlashClick(e); + } + }, this.flashModes.length > 0 && index.h("div", null, this.flashMode == 'off' ? index.h("img", { + src: this.iconFlashOff() + }) : '', this.flashMode == 'auto' ? index.h("img", { + src: this.iconFlashAuto() + }) : '', this.flashMode == 'flash' ? index.h("img", { + src: this.iconFlashOn() + }) : '')))), (this.hasCamera === false || !!this.deviceError) && index.h("div", { + class: "no-device" + }, index.h("h2", null, this.noDevicesText), index.h("label", { + htmlFor: "_pwa-elements-camera-input" + }, this.noDevicesButtonText), index.h("input", { + type: "file", + id: "_pwa-elements-camera-input", + onChange: this.handleFileInputChange, + accept: "image/*", + class: "select-file-button" + })), this.photoSrc ? index.h("div", { + class: "accept" + }, index.h("div", { + class: "accept-image", + style: Object.assign({ + backgroundImage: "url(".concat(this.photoSrc, ")") + }, acceptStyles) + })) : index.h("div", { + class: "camera-video" + }, this.showShutterOverlay && index.h("div", { + class: "shutter-overlay" + }), this.hasImageCapture() ? index.h("video", { + ref: function ref(el) { + return _this4.videoElement = el; + }, + onLoadedMetaData: this.handleVideoMetadata, + autoplay: true, + playsinline: true + }) : index.h("canvas", { + ref: function ref(el) { + return _this4.canvasElement = el; + }, + width: "100%", + height: "100%" + }), index.h("canvas", { + class: "offscreen-image-render", + ref: function ref(e) { + return _this4.offscreenCanvas = e; + }, + width: "100%", + height: "100%" + })), this.hasCamera && index.h("div", { + class: "camera-footer" + }, !this.photo ? [!this.hidePicker && index.h("div", { + class: "pick-image", + onClick: this.handlePickFile + }, index.h("label", { + htmlFor: "_pwa-elements-file-pick" + }, this.iconPhotos()), index.h("input", { + type: "file", + id: "_pwa-elements-file-pick", + onChange: this.handleFileInputChange, + accept: "image/*", + class: "pick-image-button" + })), index.h("div", { + class: "shutter", + onClick: this.handleShutterClick + }, index.h("div", { + class: "shutter-button" + })), index.h("div", { + class: "rotate", + onClick: this.handleRotateClick + }, index.h("img", { + src: this.iconReverseCamera() + }))] : index.h("section", { + class: "items" + }, index.h("div", { + class: "item accept-cancel", + onClick: function onClick(e) { + return _this4.handleCancelPhoto(e); + } + }, index.h("img", { + src: this.iconRetake() + })), index.h("div", { + class: "item accept-use", + onClick: function onClick(e) { + return _this4.handleAcceptPhoto(e); + } + }, index.h("img", { + src: this.iconConfirm() + }))))); + } + }, { + key: "el", + get: function get() { + return index.getElement(this); + } + }], [{ + key: "assetsDirs", + get: function get() { + return ["icons"]; + } + }]); +}(); +CameraPWA.style = cameraCss; +exports.pwa_camera = CameraPWA; \ No newline at end of file diff --git a/src/public/js/pwa-elements/cjs/pwa-toast.cjs.entry.js b/src/public/js/pwa-elements/cjs/pwa-toast.cjs.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..383c353842a71359592f07e41656636c0a32815f --- /dev/null +++ b/src/public/js/pwa-elements/cjs/pwa-toast.cjs.entry.js @@ -0,0 +1,76 @@ +'use strict'; + +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +Object.defineProperty(exports, '__esModule', { + value: true +}); +var index = require('./index-d7f36e37.js'); +var toastCss = ":host{position:fixed;bottom:20px;left:0;right:0;display:-ms-flexbox;display:flex;opacity:0}:host(.in){-webkit-transition:opacity 300ms;transition:opacity 300ms;opacity:1}:host(.out){-webkit-transition:opacity 1s;transition:opacity 1s;opacity:0}.wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.toast{font-family:-apple-system, system-ui, \"Helvetica Neue\", Roboto, sans-serif;background-color:#eee;color:black;border-radius:5px;padding:10px 15px;font-size:14px;font-weight:500;-webkit-box-shadow:0px 1px 2px rgba(0, 0, 0, 0.20);box-shadow:0px 1px 2px rgba(0, 0, 0, 0.20)}"; +var PWAToast = /*#__PURE__*/function () { + function PWAToast(hostRef) { + _classCallCheck(this, PWAToast); + index.registerInstance(this, hostRef); + this.message = undefined; + this.duration = 2000; + this.closing = null; + } + return _createClass(PWAToast, [{ + key: "hostData", + value: function hostData() { + var classes = { + out: !!this.closing + }; + if (this.closing !== null) { + classes['in'] = !this.closing; + } + return { + class: classes + }; + } + }, { + key: "componentDidLoad", + value: function componentDidLoad() { + var _this = this; + setTimeout(function () { + _this.closing = false; + }); + setTimeout(function () { + _this.close(); + }, this.duration); + } + }, { + key: "close", + value: function close() { + var _this2 = this; + this.closing = true; + setTimeout(function () { + _this2.el.parentNode.removeChild(_this2.el); + }, 1000); + } + }, { + key: "__stencil_render", + value: function __stencil_render() { + return index.h("div", { + class: "wrapper" + }, index.h("div", { + class: "toast" + }, this.message)); + } + }, { + key: "el", + get: function get() { + return index.getElement(this); + } + }, { + key: "render", + value: function render() { + return index.h(index.Host, this.hostData(), this.__stencil_render()); + } + }]); +}(); +PWAToast.style = toastCss; +exports.pwa_toast = PWAToast; \ No newline at end of file diff --git a/src/public/js/pwa-elements/collection/collection-manifest.json b/src/public/js/pwa-elements/collection/collection-manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..d234bf1f1c072d088dc2d970af06ff109eaf8899 --- /dev/null +++ b/src/public/js/pwa-elements/collection/collection-manifest.json @@ -0,0 +1,16 @@ +{ + "entries": [ + "./components/action-sheet/action-sheet.js", + "./components/camera/camera.js", + "./components/camera-modal/camera-modal-instance.js", + "./components/camera-modal/camera-modal.js", + "./components/toast/toast.js" + ], + "compiler": { + "name": "@stencil/core", + "version": "3.4.0", + "typescriptVersion": "5.0.4" + }, + "collections": [], + "bundles": [] +} \ No newline at end of file diff --git a/src/public/js/pwa-elements/collection/components/action-sheet/action-sheet.css b/src/public/js/pwa-elements/collection/components/action-sheet/action-sheet.css new file mode 100644 index 0000000000000000000000000000000000000000..5b18b975cc7d830c3c3fcac8bd0094040b18b723 --- /dev/null +++ b/src/public/js/pwa-elements/collection/components/action-sheet/action-sheet.css @@ -0,0 +1,79 @@ +:host { + z-index: 1000; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + contain: strict; + + user-select: none; + + font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Roboto", sans-serif; +} + +.wrapper { + flex: 1; + display: flex; + align-items: center; + justify-content: center; + background-color: rgba(0, 0, 0, 0); + transition: 400ms background-color cubic-bezier(.36,.66,.04,1); +} + +.wrapper.open { + background-color: rgba(0, 0, 0, 0.32); +} + +.title { + color: #999; + height: 23px; + line-height: 23px; + padding-bottom: 17px; + padding-inline-end: 16px; + padding-inline-start: 16px; + padding-left: 16px; + padding-right: 16px; + padding-top: 20px; +} + +.content { + width: 568px; + align-self: flex-end; + background-color:#fff; + transition: 400ms transform cubic-bezier(.36,.66,.04,1); + transform: translateY(100%); +} + +.wrapper.open .content { + transform: translateY(0%); +} + +@media only screen and (max-width: 568px) { + .content { + width: 100%; + } +} + +.action-sheet-option { + cursor: pointer; + height: 52px; + line-height: 52px; +} + +.action-sheet-button { + color: rgb(38, 38, 38); + font-size: 16px; + padding-inline-end: 16px; + padding-inline-start: 16px; + padding-left: 16px; + padding-right: 16px; + padding-top: 0px; +} + +.action-sheet-button:hover { + background-color: #F6F6F6; +} + + diff --git a/src/public/js/pwa-elements/collection/components/action-sheet/action-sheet.js b/src/public/js/pwa-elements/collection/components/action-sheet/action-sheet.js new file mode 100644 index 0000000000000000000000000000000000000000..cdb8e0db4290c3cae496241f22f3c6ff6d211d9a --- /dev/null +++ b/src/public/js/pwa-elements/collection/components/action-sheet/action-sheet.js @@ -0,0 +1,189 @@ +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +import { h } from '@stencil/core'; +export var PWAActionSheet = /*#__PURE__*/function () { + function PWAActionSheet() { + _classCallCheck(this, PWAActionSheet); + this.header = undefined; + this.cancelable = true; + this.options = []; + this.open = false; + } + return _createClass(PWAActionSheet, [{ + key: "componentDidLoad", + value: function componentDidLoad() { + var _this = this; + requestAnimationFrame(function () { + _this.open = true; + }); + } + }, { + key: "dismiss", + value: function dismiss() { + if (this.cancelable) { + this.close(); + } + } + }, { + key: "close", + value: function close() { + var _this2 = this; + this.open = false; + setTimeout(function () { + _this2.el.parentNode.removeChild(_this2.el); + }, 500); + } + }, { + key: "handleOptionClick", + value: function handleOptionClick(e, i) { + e.stopPropagation(); + this.onSelection.emit(i); + this.close(); + } + }, { + key: "render", + value: function render() { + var _this3 = this; + return h("div", { + class: "wrapper".concat(this.open ? ' open' : ''), + onClick: function onClick() { + return _this3.dismiss(); + } + }, h("div", { + class: "content" + }, h("div", { + class: "title" + }, this.header), this.options.map(function (option, i) { + return h("div", { + class: "action-sheet-option", + onClick: function onClick(e) { + return _this3.handleOptionClick(e, i); + } + }, h("div", { + class: "action-sheet-button" + }, option.title)); + }))); + } + }], [{ + key: "is", + get: function get() { + return "pwa-action-sheet"; + } + }, { + key: "encapsulation", + get: function get() { + return "shadow"; + } + }, { + key: "originalStyleUrls", + get: function get() { + return { + "$": ["action-sheet.css"] + }; + } + }, { + key: "styleUrls", + get: function get() { + return { + "$": ["action-sheet.css"] + }; + } + }, { + key: "properties", + get: function get() { + return { + "header": { + "type": "string", + "mutable": false, + "complexType": { + "original": "string", + "resolved": "string", + "references": {} + }, + "required": false, + "optional": false, + "docs": { + "tags": [], + "text": "" + }, + "attribute": "header", + "reflect": false + }, + "cancelable": { + "type": "boolean", + "mutable": false, + "complexType": { + "original": "boolean", + "resolved": "boolean", + "references": {} + }, + "required": false, + "optional": false, + "docs": { + "tags": [], + "text": "" + }, + "attribute": "cancelable", + "reflect": false, + "defaultValue": "true" + }, + "options": { + "type": "unknown", + "mutable": false, + "complexType": { + "original": "ActionSheetOption[]", + "resolved": "ActionSheetOption[]", + "references": { + "ActionSheetOption": { + "location": "import", + "path": "../../definitions" + } + } + }, + "required": false, + "optional": false, + "docs": { + "tags": [], + "text": "" + }, + "defaultValue": "[]" + } + }; + } + }, { + key: "states", + get: function get() { + return { + "open": {} + }; + } + }, { + key: "events", + get: function get() { + return [{ + "method": "onSelection", + "name": "onSelection", + "bubbles": true, + "cancelable": true, + "composed": true, + "docs": { + "tags": [], + "text": "" + }, + "complexType": { + "original": "any", + "resolved": "any", + "references": {} + } + }]; + } + }, { + key: "elementRef", + get: function get() { + return "el"; + } + }]); +}(); \ No newline at end of file diff --git a/src/public/js/pwa-elements/collection/components/camera-modal/camera-modal-instance.css b/src/public/js/pwa-elements/collection/components/camera-modal/camera-modal-instance.css new file mode 100644 index 0000000000000000000000000000000000000000..595d43abb4a7ba7b608766fe436a82a1836226d8 --- /dev/null +++ b/src/public/js/pwa-elements/collection/components/camera-modal/camera-modal-instance.css @@ -0,0 +1,35 @@ +:host { + z-index: 1000; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + contain: strict; + + --inset-width: 600px; + --inset-height: 600px; +} + +.wrapper { + flex: 1; + display: flex; + align-items: center; + justify-content: center; + background-color: rgba(0, 0, 0, 0.15); +} + +.content { + box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2); + width: var(--inset-width); + height: var(--inset-height); + max-height: 100%; +} + +@media only screen and (max-width: 600px) { + .content { + width: 100%; + height: 100%; + } +} diff --git a/src/public/js/pwa-elements/collection/components/camera-modal/camera-modal-instance.js b/src/public/js/pwa-elements/collection/components/camera-modal/camera-modal-instance.js new file mode 100644 index 0000000000000000000000000000000000000000..e9388c8ce5b6dc1e10495adbfceec7e2fcf1c64e --- /dev/null +++ b/src/public/js/pwa-elements/collection/components/camera-modal/camera-modal-instance.js @@ -0,0 +1,247 @@ +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } +function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } +function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +import { h } from '@stencil/core'; +export var PWACameraModal = /*#__PURE__*/function () { + function PWACameraModal() { + var _this = this; + _classCallCheck(this, PWACameraModal); + this.handlePhoto = /*#__PURE__*/function () { + var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(photo) { + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _this.onPhoto.emit(photo); + case 1: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function (_x) { + return _ref.apply(this, arguments); + }; + }(); + this.handleNoDeviceError = /*#__PURE__*/function () { + var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(photo) { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _this.noDeviceError.emit(photo); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return function (_x2) { + return _ref2.apply(this, arguments); + }; + }(); + this.facingMode = 'user'; + this.hidePicker = false; + this.noDevicesText = 'No camera found'; + this.noDevicesButtonText = 'Choose image'; + } + return _createClass(PWACameraModal, [{ + key: "handleBackdropClick", + value: function handleBackdropClick(e) { + if (e.target !== this.el) { + this.onPhoto.emit(null); + } + } + }, { + key: "handleComponentClick", + value: function handleComponentClick(e) { + e.stopPropagation(); + } + }, { + key: "handleBackdropKeyUp", + value: function handleBackdropKeyUp(e) { + if (e.key === "Escape") { + this.onPhoto.emit(null); + } + } + }, { + key: "render", + value: function render() { + var _this2 = this; + return h("div", { + class: "wrapper", + onClick: function onClick(e) { + return _this2.handleBackdropClick(e); + } + }, h("div", { + class: "content" + }, h("pwa-camera", { + onClick: function onClick(e) { + return _this2.handleComponentClick(e); + }, + facingMode: this.facingMode, + hidePicker: this.hidePicker, + handlePhoto: this.handlePhoto, + handleNoDeviceError: this.handleNoDeviceError, + noDevicesButtonText: this.noDevicesButtonText, + noDevicesText: this.noDevicesText + }))); + } + }], [{ + key: "is", + get: function get() { + return "pwa-camera-modal-instance"; + } + }, { + key: "encapsulation", + get: function get() { + return "shadow"; + } + }, { + key: "originalStyleUrls", + get: function get() { + return { + "$": ["camera-modal-instance.css"] + }; + } + }, { + key: "styleUrls", + get: function get() { + return { + "$": ["camera-modal-instance.css"] + }; + } + }, { + key: "properties", + get: function get() { + return { + "facingMode": { + "type": "string", + "mutable": false, + "complexType": { + "original": "string", + "resolved": "string", + "references": {} + }, + "required": false, + "optional": false, + "docs": { + "tags": [], + "text": "" + }, + "attribute": "facing-mode", + "reflect": false, + "defaultValue": "'user'" + }, + "hidePicker": { + "type": "boolean", + "mutable": false, + "complexType": { + "original": "boolean", + "resolved": "boolean", + "references": {} + }, + "required": false, + "optional": false, + "docs": { + "tags": [], + "text": "" + }, + "attribute": "hide-picker", + "reflect": false, + "defaultValue": "false" + }, + "noDevicesText": { + "type": "string", + "mutable": false, + "complexType": { + "original": "string", + "resolved": "string", + "references": {} + }, + "required": false, + "optional": false, + "docs": { + "tags": [], + "text": "" + }, + "attribute": "no-devices-text", + "reflect": false, + "defaultValue": "'No camera found'" + }, + "noDevicesButtonText": { + "type": "string", + "mutable": false, + "complexType": { + "original": "string", + "resolved": "string", + "references": {} + }, + "required": false, + "optional": false, + "docs": { + "tags": [], + "text": "" + }, + "attribute": "no-devices-button-text", + "reflect": false, + "defaultValue": "'Choose image'" + } + }; + } + }, { + key: "events", + get: function get() { + return [{ + "method": "onPhoto", + "name": "onPhoto", + "bubbles": true, + "cancelable": true, + "composed": true, + "docs": { + "tags": [], + "text": "" + }, + "complexType": { + "original": "any", + "resolved": "any", + "references": {} + } + }, { + "method": "noDeviceError", + "name": "noDeviceError", + "bubbles": true, + "cancelable": true, + "composed": true, + "docs": { + "tags": [], + "text": "" + }, + "complexType": { + "original": "any", + "resolved": "any", + "references": {} + } + }]; + } + }, { + key: "elementRef", + get: function get() { + return "el"; + } + }, { + key: "listeners", + get: function get() { + return [{ + "name": "keyup", + "method": "handleBackdropKeyUp", + "target": "body", + "capture": false, + "passive": false + }]; + } + }]); +}(); \ No newline at end of file diff --git a/src/public/js/pwa-elements/collection/components/camera-modal/camera-modal.css b/src/public/js/pwa-elements/collection/components/camera-modal/camera-modal.css new file mode 100644 index 0000000000000000000000000000000000000000..7fa443ede8c50a0436f95690a2de6f15414eb0cb --- /dev/null +++ b/src/public/js/pwa-elements/collection/components/camera-modal/camera-modal.css @@ -0,0 +1,24 @@ +:host { + z-index: 1000; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + contain: strict; +} + +.wrapper { + flex: 1; + display: flex; + align-items: center; + justify-content: center; + background-color: rgba(0, 0, 0, 0.15); +} + +.content { + box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2); + width: 600px; + height: 600px; +} diff --git a/src/public/js/pwa-elements/collection/components/camera-modal/camera-modal.js b/src/public/js/pwa-elements/collection/components/camera-modal/camera-modal.js new file mode 100644 index 0000000000000000000000000000000000000000..74ab3df29b85ffef3a48ad89f09a65b877bfce23 --- /dev/null +++ b/src/public/js/pwa-elements/collection/components/camera-modal/camera-modal.js @@ -0,0 +1,252 @@ +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } +function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } +function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +import { h } from '@stencil/core'; +export var PWACameraModal = /*#__PURE__*/function () { + function PWACameraModal() { + _classCallCheck(this, PWACameraModal); + this.facingMode = 'user'; + this.hidePicker = false; + } + return _createClass(PWACameraModal, [{ + key: "present", + value: function () { + var _present = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() { + var _this = this; + var camera; + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + camera = document.createElement('pwa-camera-modal-instance'); + camera.facingMode = this.facingMode; + camera.hidePicker = this.hidePicker; + camera.addEventListener('onPhoto', /*#__PURE__*/function () { + var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) { + var photo; + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + if (_this._modal) { + _context.next = 2; + break; + } + return _context.abrupt("return"); + case 2: + photo = e.detail; + _this.onPhoto.emit(photo); + case 4: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function (_x) { + return _ref.apply(this, arguments); + }; + }()); + camera.addEventListener('noDeviceError', /*#__PURE__*/function () { + var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _this.noDeviceError.emit(e); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return function (_x2) { + return _ref2.apply(this, arguments); + }; + }()); + document.body.append(camera); + this._modal = camera; + case 7: + case "end": + return _context3.stop(); + } + }, _callee3, this); + })); + function present() { + return _present.apply(this, arguments); + } + return present; + }() + }, { + key: "dismiss", + value: function () { + var _dismiss = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() { + return _regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + if (this._modal) { + _context4.next = 2; + break; + } + return _context4.abrupt("return"); + case 2: + this._modal && this._modal.parentNode.removeChild(this._modal); + this._modal = null; + case 4: + case "end": + return _context4.stop(); + } + }, _callee4, this); + })); + function dismiss() { + return _dismiss.apply(this, arguments); + } + return dismiss; + }() + }, { + key: "render", + value: function render() { + return h("div", null); + } + }], [{ + key: "is", + get: function get() { + return "pwa-camera-modal"; + } + }, { + key: "encapsulation", + get: function get() { + return "shadow"; + } + }, { + key: "originalStyleUrls", + get: function get() { + return { + "$": ["camera-modal.css"] + }; + } + }, { + key: "styleUrls", + get: function get() { + return { + "$": ["camera-modal.css"] + }; + } + }, { + key: "properties", + get: function get() { + return { + "facingMode": { + "type": "string", + "mutable": false, + "complexType": { + "original": "string", + "resolved": "string", + "references": {} + }, + "required": false, + "optional": false, + "docs": { + "tags": [], + "text": "" + }, + "attribute": "facing-mode", + "reflect": false, + "defaultValue": "'user'" + }, + "hidePicker": { + "type": "boolean", + "mutable": false, + "complexType": { + "original": "boolean", + "resolved": "boolean", + "references": {} + }, + "required": false, + "optional": false, + "docs": { + "tags": [], + "text": "" + }, + "attribute": "hide-picker", + "reflect": false, + "defaultValue": "false" + } + }; + } + }, { + key: "events", + get: function get() { + return [{ + "method": "onPhoto", + "name": "onPhoto", + "bubbles": true, + "cancelable": true, + "composed": true, + "docs": { + "tags": [], + "text": "" + }, + "complexType": { + "original": "any", + "resolved": "any", + "references": {} + } + }, { + "method": "noDeviceError", + "name": "noDeviceError", + "bubbles": true, + "cancelable": true, + "composed": true, + "docs": { + "tags": [], + "text": "" + }, + "complexType": { + "original": "any", + "resolved": "any", + "references": {} + } + }]; + } + }, { + key: "methods", + get: function get() { + return { + "present": { + "complexType": { + "signature": "() => Promise<void>", + "parameters": [], + "references": { + "Promise": { + "location": "global" + } + }, + "return": "Promise<void>" + }, + "docs": { + "text": "", + "tags": [] + } + }, + "dismiss": { + "complexType": { + "signature": "() => Promise<void>", + "parameters": [], + "references": { + "Promise": { + "location": "global" + } + }, + "return": "Promise<void>" + }, + "docs": { + "text": "", + "tags": [] + } + } + }; + } + }]); +}(); \ No newline at end of file diff --git a/src/public/js/pwa-elements/collection/components/camera/camera.css b/src/public/js/pwa-elements/collection/components/camera/camera.css new file mode 100644 index 0000000000000000000000000000000000000000..b32857918c1717416b78f929c9d381636172e7fd --- /dev/null +++ b/src/public/js/pwa-elements/collection/components/camera/camera.css @@ -0,0 +1,244 @@ +:host { + --header-height: 4em; + --footer-height: 9em; + --header-height-landscape: 3em; + --footer-height-landscape: 6em; + --shutter-size: 6em; + --icon-size-header: 1.5em; + --icon-size-footer: 2.5em; + --margin-size-header: 1.5em; + --margin-size-footer: 2.0em; + + font-family: -apple-system, BlinkMacSystemFont, + “Segoe UIâ€, “Robotoâ€, “Droid Sansâ€, “Helvetica Neueâ€, sans-serif; + + display: block; + width: 100%; + height: 100%; +} + +.items { + box-sizing: border-box; + display: flex; + width: 100%; + height: 100%; + align-items: center; + justify-content: center; +} + +.items .item { + flex: 1; + text-align: center; +} +.items .item:first-child { + text-align: left; +} +.items .item:last-child { + text-align: right; +} + +.camera-wrapper { + position: relative; + display: flex; + flex-direction: column; + width: 100%; + height: 100%; +} + +.camera-header { + color: white; + background-color: black; + height: var(--header-height); +} + +.camera-header .items { + padding: var(--margin-size-header); +} + +.camera-footer { + position: relative; + color: white; + background-color: black; + height: var(--footer-height); +} + +.camera-footer .items { + padding: var(--margin-size-footer); +} + +@media (max-height: 375px) { + .camera-header { + --header-height: var(--header-height-landscape); + } + .camera-footer { + --footer-height: var(--footer-height-landscape); + } + .camera-footer .shutter { + --shutter-size: 4em; + } +} + +.camera-video { + position: relative; + flex: 1; + overflow: hidden; + background-color: black; +} + +video { + width: 100%; + height: 100%; + max-height: 100%; + min-height: 100%; + object-fit: cover; + background-color: black; +} + +.pick-image { + display: flex; + align-items: center; + position: absolute; + left: var(--margin-size-footer); + top: 0; + height: 100%; + width: var(--icon-size-footer); + color: white; +} + +.pick-image input { + visibility: hidden; +} + +.pick-image svg { + cursor: pointer; + fill: white; + width: var(--icon-size-footer); + height: var(--icon-size-footer); +} + +.shutter { + position: absolute; + left: 50%; + top: 50%; + width: var(--shutter-size); + height: var(--shutter-size); + margin-top: calc(var(--shutter-size) / -2); + margin-left: calc(var(--shutter-size) / -2); + border-radius: 100%; + background-color: #c6cdd8; + padding: 12px; + box-sizing: border-box; +} + +.shutter:active .shutter-button { + background-color: #9da9bb; +} + +.shutter-button { + background-color: white; + border-radius: 100%; + width: 100%; + height: 100%; +} + +.rotate { + display: flex; + align-items: center; + position: absolute; + right: var(--margin-size-footer); + top: 0; + height: 100%; + width: var(--icon-size-footer); + color: white; +} + +.rotate img { + width: var(--icon-size-footer); + height: var(--icon-size-footer); +} + +.shutter-overlay { + z-index: 5; + position: absolute; + width: 100%; + height: 100%; + background-color: black; +} + +.error { + width: 100%; + height: 100%; + color: white; + display: flex; + justify-content: center; + align-items: center; +} + +.no-device { + background-color: black; + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + color: white; +} + +.no-device label { + cursor: pointer; + background: #fff; + border-radius: 6px; + padding: 6px 8px; + color: black; +} + +.no-device input { + visibility: hidden; + height: 0; + margin-top: 16px; +} + +.accept { + background-color: black; + flex: 1; + overflow: hidden; +} + +.accept .accept-image { + width: 100%; + height: 100%; + max-height: 100%; + background-position: center center; + background-size: cover; + background-repeat: no-repeat; +} + +.close img { + cursor: pointer; + width: var(--icon-size-header); + height: var(--icon-size-header); +} + +.flash img { + width: var(--icon-size-header); + height: var(--icon-size-header); +} + +.accept-use img { + width: var(--icon-size-footer); + height: var(--icon-size-footer); +} + +.accept-cancel img { + width: var(--icon-size-footer); + height: var(--icon-size-footer); +} + +.offscreen-image-render { + top: 0; + left: 0; + visibility: hidden; + pointer-events: none; + width: 100%; + height: 100%; +} diff --git a/src/public/js/pwa-elements/collection/components/camera/camera.js b/src/public/js/pwa-elements/collection/components/camera/camera.js new file mode 100644 index 0000000000000000000000000000000000000000..95418917a77388d59ee7807f59f0b6ac4c7ab055 --- /dev/null +++ b/src/public/js/pwa-elements/collection/components/camera/camera.js @@ -0,0 +1,826 @@ +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } +function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } +function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +import { h, Build, forceUpdate } from '@stencil/core'; +import './imagecapture'; +export var CameraPWA = /*#__PURE__*/function () { + function CameraPWA() { + var _this = this; + _classCallCheck(this, CameraPWA); + // Whether the device has multiple cameras (front/back) + this.hasMultipleCameras = false; + // Whether the device has flash support + this.hasFlash = false; + // Flash modes for camera + this.flashModes = []; + // Current flash mode + this.flashMode = 'off'; + this.handlePickFile = function (_e) {}; + this.handleShutterClick = function (_e) { + console.debug('shutter click'); + _this.capture(); + }; + this.handleRotateClick = function (_e) { + _this.rotate(); + }; + this.handleClose = function (_e) { + _this.handlePhoto && _this.handlePhoto(null); + }; + this.handleFlashClick = function (_e) { + _this.cycleFlash(); + }; + this.handleCancelPhoto = function (_e) { + var track = _this.stream && _this.stream.getTracks()[0]; + var c = track && track.getConstraints(); + _this.photo = null; + _this.photoSrc = null; + if (c) { + _this.initCamera({ + video: { + facingMode: c.facingMode + } + }); + } else { + _this.initCamera(); + } + }; + this.handleAcceptPhoto = function (_e) { + _this.handlePhoto && _this.handlePhoto(_this.photo); + }; + this.handleFileInputChange = /*#__PURE__*/function () { + var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) { + var input, file, orientation; + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + input = e.target; + file = input.files[0]; + _context.prev = 2; + _context.next = 5; + return _this.getOrientation(file); + case 5: + orientation = _context.sent; + console.debug('Got orientation', orientation); + _this.photoOrientation = orientation; + _context.next = 12; + break; + case 10: + _context.prev = 10; + _context.t0 = _context["catch"](2); + case 12: + _this.handlePhoto && _this.handlePhoto(file); + case 13: + case "end": + return _context.stop(); + } + }, _callee, null, [[2, 10]]); + })); + return function (_x) { + return _ref.apply(this, arguments); + }; + }(); + this.handleVideoMetadata = function (e) { + console.debug('Video metadata', e); + }; + this.facingMode = 'user'; + this.handlePhoto = undefined; + this.hidePicker = false; + this.handleNoDeviceError = undefined; + this.noDevicesText = 'No camera found'; + this.noDevicesButtonText = 'Choose image'; + this.photo = undefined; + this.photoSrc = undefined; + this.showShutterOverlay = false; + this.flashIndex = 0; + this.hasCamera = null; + this.rotation = 0; + this.deviceError = null; + } + return _createClass(CameraPWA, [{ + key: "componentDidLoad", + value: function () { + var _componentDidLoad = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + if (!Build.isServer) { + _context2.next = 2; + break; + } + return _context2.abrupt("return"); + case 2: + this.defaultConstraints = { + video: { + facingMode: this.facingMode + } + }; + // Figure out how many cameras we have + _context2.next = 5; + return this.queryDevices(); + case 5: + _context2.next = 7; + return this.initCamera(); + case 7: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function componentDidLoad() { + return _componentDidLoad.apply(this, arguments); + } + return componentDidLoad; + }() + }, { + key: "disconnectedCallback", + value: function disconnectedCallback() { + this.stopStream(); + this.photoSrc && URL.revokeObjectURL(this.photoSrc); + } + }, { + key: "hasImageCapture", + value: function hasImageCapture() { + return 'ImageCapture' in window; + } + /** + * Query the list of connected devices and figure out how many video inputs we have. + */ + }, { + key: "queryDevices", + value: (function () { + var _queryDevices = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() { + var devices, videoDevices; + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + _context3.prev = 0; + _context3.next = 3; + return navigator.mediaDevices.enumerateDevices(); + case 3: + devices = _context3.sent; + videoDevices = devices.filter(function (d) { + return d.kind == 'videoinput'; + }); + this.hasCamera = !!videoDevices.length; + this.hasMultipleCameras = videoDevices.length > 1; + _context3.next = 12; + break; + case 9: + _context3.prev = 9; + _context3.t0 = _context3["catch"](0); + this.deviceError = _context3.t0; + case 12: + case "end": + return _context3.stop(); + } + }, _callee3, this, [[0, 9]]); + })); + function queryDevices() { + return _queryDevices.apply(this, arguments); + } + return queryDevices; + }()) + }, { + key: "initCamera", + value: function () { + var _initCamera = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(constraints) { + var stream; + return _regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + if (!constraints) { + constraints = this.defaultConstraints; + } + _context4.prev = 1; + _context4.next = 4; + return navigator.mediaDevices.getUserMedia(Object.assign({ + video: true, + audio: false + }, constraints)); + case 4: + stream = _context4.sent; + this.initStream(stream); + _context4.next = 12; + break; + case 8: + _context4.prev = 8; + _context4.t0 = _context4["catch"](1); + this.deviceError = _context4.t0; + this.handleNoDeviceError && this.handleNoDeviceError(_context4.t0); + case 12: + case "end": + return _context4.stop(); + } + }, _callee4, this, [[1, 8]]); + })); + function initCamera(_x2) { + return _initCamera.apply(this, arguments); + } + return initCamera; + }() + }, { + key: "initStream", + value: function () { + var _initStream = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(stream) { + return _regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + this.stream = stream; + this.videoElement.srcObject = stream; + if (!this.hasImageCapture()) { + _context5.next = 8; + break; + } + this.imageCapture = new window.ImageCapture(stream.getVideoTracks()[0]); + _context5.next = 6; + return this.initPhotoCapabilities(this.imageCapture); + case 6: + _context5.next = 10; + break; + case 8: + this.deviceError = 'No image capture'; + this.handleNoDeviceError && this.handleNoDeviceError(); + case 10: + // Always re-render + forceUpdate(this.el); + case 11: + case "end": + return _context5.stop(); + } + }, _callee5, this); + })); + function initStream(_x3) { + return _initStream.apply(this, arguments); + } + return initStream; + }() + }, { + key: "initPhotoCapabilities", + value: function () { + var _initPhotoCapabilities = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(imageCapture) { + var c; + return _regeneratorRuntime().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + _context6.next = 2; + return imageCapture.getPhotoCapabilities(); + case 2: + c = _context6.sent; + if (c.fillLightMode && c.fillLightMode.length > 1) { + this.flashModes = c.fillLightMode.map(function (m) { + return m; + }); + // Try to recall the current flash mode + if (this.flashMode) { + this.flashMode = this.flashModes[this.flashModes.indexOf(this.flashMode)] || 'off'; + this.flashIndex = this.flashModes.indexOf(this.flashMode) || 0; + } else { + this.flashIndex = 0; + } + } + case 4: + case "end": + return _context6.stop(); + } + }, _callee6, this); + })); + function initPhotoCapabilities(_x4) { + return _initPhotoCapabilities.apply(this, arguments); + } + return initPhotoCapabilities; + }() + }, { + key: "stopStream", + value: function stopStream() { + if (this.videoElement) { + this.videoElement.srcObject = null; + } + this.stream && this.stream.getTracks().forEach(function (track) { + return track.stop(); + }); + } + }, { + key: "capture", + value: function () { + var _capture = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7() { + var photo; + return _regeneratorRuntime().wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { + case 0: + if (!this.hasImageCapture()) { + _context7.next = 13; + break; + } + _context7.prev = 1; + _context7.next = 4; + return this.imageCapture.takePhoto({ + fillLightMode: this.flashModes.length > 1 ? this.flashMode : undefined + }); + case 4: + photo = _context7.sent; + _context7.next = 7; + return this.flashScreen(); + case 7: + this.promptAccept(photo); + _context7.next = 13; + break; + case 10: + _context7.prev = 10; + _context7.t0 = _context7["catch"](1); + console.error('Unable to take photo!', _context7.t0); + case 13: + this.stopStream(); + case 14: + case "end": + return _context7.stop(); + } + }, _callee7, this, [[1, 10]]); + })); + function capture() { + return _capture.apply(this, arguments); + } + return capture; + }() + }, { + key: "promptAccept", + value: function () { + var _promptAccept = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(photo) { + var orientation; + return _regeneratorRuntime().wrap(function _callee8$(_context8) { + while (1) switch (_context8.prev = _context8.next) { + case 0: + this.photo = photo; + _context8.next = 3; + return this.getOrientation(photo); + case 3: + orientation = _context8.sent; + console.debug('Got orientation', orientation); + this.photoOrientation = orientation; + if (!orientation) { + _context8.next = 18; + break; + } + _context8.t0 = orientation; + _context8.next = _context8.t0 === 1 ? 10 : _context8.t0 === 2 ? 10 : _context8.t0 === 3 ? 12 : _context8.t0 === 4 ? 12 : _context8.t0 === 5 ? 14 : _context8.t0 === 6 ? 14 : _context8.t0 === 7 ? 16 : _context8.t0 === 8 ? 16 : 18; + break; + case 10: + this.rotation = 0; + return _context8.abrupt("break", 18); + case 12: + this.rotation = 180; + return _context8.abrupt("break", 18); + case 14: + this.rotation = 90; + return _context8.abrupt("break", 18); + case 16: + this.rotation = 270; + return _context8.abrupt("break", 18); + case 18: + this.photoSrc = URL.createObjectURL(photo); + case 19: + case "end": + return _context8.stop(); + } + }, _callee8, this); + })); + function promptAccept(_x5) { + return _promptAccept.apply(this, arguments); + } + return promptAccept; + }() + }, { + key: "getOrientation", + value: function getOrientation(file) { + return new Promise(function (resolve) { + var reader = new FileReader(); + reader.onload = function (event) { + var view = new DataView(event.target.result); + if (view.getUint16(0, false) !== 0xFFD8) { + return resolve(-2); + } + var length = view.byteLength; + var offset = 2; + while (offset < length) { + var marker = view.getUint16(offset, false); + offset += 2; + if (marker === 0xFFE1) { + if (view.getUint32(offset += 2, false) !== 0x45786966) { + return resolve(-1); + } + var little = view.getUint16(offset += 6, false) === 0x4949; + offset += view.getUint32(offset + 4, little); + var tags = view.getUint16(offset, little); + offset += 2; + for (var i = 0; i < tags; i++) { + if (view.getUint16(offset + i * 12, little) === 0x0112) { + return resolve(view.getUint16(offset + i * 12 + 8, little)); + } + } + } else if ((marker & 0xFF00) !== 0xFF00) { + break; + } else { + offset += view.getUint16(offset, false); + } + } + return resolve(-1); + }; + reader.readAsArrayBuffer(file.slice(0, 64 * 1024)); + }); + } + }, { + key: "rotate", + value: function rotate() { + this.stopStream(); + var track = this.stream && this.stream.getTracks()[0]; + if (!track) { + return; + } + var c = track.getConstraints(); + var facingMode = c.facingMode; + if (!facingMode) { + var _c = track.getCapabilities(); + if (_c.facingMode) { + facingMode = _c.facingMode[0]; + } + } + if (facingMode === 'environment') { + this.initCamera({ + video: { + facingMode: 'user' + } + }); + } else { + this.initCamera({ + video: { + facingMode: 'environment' + } + }); + } + } + }, { + key: "setFlashMode", + value: function setFlashMode(mode) { + console.debug('New flash mode: ', mode); + this.flashMode = mode; + } + }, { + key: "cycleFlash", + value: function cycleFlash() { + if (this.flashModes.length > 0) { + this.flashIndex = (this.flashIndex + 1) % this.flashModes.length; + this.setFlashMode(this.flashModes[this.flashIndex]); + } + } + }, { + key: "flashScreen", + value: function () { + var _flashScreen = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9() { + var _this2 = this; + return _regeneratorRuntime().wrap(function _callee9$(_context9) { + while (1) switch (_context9.prev = _context9.next) { + case 0: + return _context9.abrupt("return", new Promise(function (resolve, _reject) { + _this2.showShutterOverlay = true; + setTimeout(function () { + _this2.showShutterOverlay = false; + resolve(); + }, 100); + })); + case 1: + case "end": + return _context9.stop(); + } + }, _callee9); + })); + function flashScreen() { + return _flashScreen.apply(this, arguments); + } + return flashScreen; + }() + }, { + key: "iconExit", + value: function iconExit() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Cg id='Icon_5_'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M402.2,134L378,109.8c-1.6-1.6-4.1-1.6-5.7,0L258.8,223.4c-1.6,1.6-4.1,1.6-5.7,0L139.6,109.8 c-1.6-1.6-4.1-1.6-5.7,0L109.8,134c-1.6,1.6-1.6,4.1,0,5.7l113.5,113.5c1.6,1.6,1.6,4.1,0,5.7L109.8,372.4c-1.6,1.6-1.6,4.1,0,5.7 l24.1,24.1c1.6,1.6,4.1,1.6,5.7,0l113.5-113.5c1.6-1.6,4.1-1.6,5.7,0l113.5,113.5c1.6,1.6,4.1,1.6,5.7,0l24.1-24.1 c1.6-1.6,1.6-4.1,0-5.7L288.6,258.8c-1.6-1.6-1.6-4.1,0-5.7l113.5-113.5C403.7,138.1,403.7,135.5,402.2,134z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "iconPhotos", + value: function iconPhotos() { + return h("svg", { + xmlns: 'http://www.w3.org/2000/svg', + width: '512', + height: '512', + viewBox: '0 0 512 512' + }, h("path", { + d: 'M450.29,112H142c-34,0-62,27.51-62,61.33V418.67C80,452.49,108,480,142,480H450c34,0,62-26.18,62-60V173.33C512,139.51,484.32,112,450.29,112Zm-77.15,61.34a46,46,0,1,1-46.28,46A46.19,46.19,0,0,1,373.14,173.33Zm-231.55,276c-17,0-29.86-13.75-29.86-30.66V353.85l90.46-80.79a46.54,46.54,0,0,1,63.44,1.83L328.27,337l-113,112.33ZM480,418.67a30.67,30.67,0,0,1-30.71,30.66H259L376.08,333a46.24,46.24,0,0,1,59.44-.16L480,370.59Z' + }), h("path", { + d: 'M384,32H64A64,64,0,0,0,0,96V352a64.11,64.11,0,0,0,48,62V152a72,72,0,0,1,72-72H446A64.11,64.11,0,0,0,384,32Z' + })); + } + }, { + key: "iconConfirm", + value: function iconConfirm() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Ccircle fill='%232CD865' cx='256' cy='256' r='256'/%3E%3Cg id='Icon_1_'%3E%3Cg%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M208,301.4l-55.4-55.5c-1.5-1.5-4-1.6-5.6-0.1l-23.4,22.3c-1.6,1.6-1.7,4.1-0.1,5.7l81.6,81.4 c3.1,3.1,8.2,3.1,11.3,0l171.8-171.7c1.6-1.6,1.6-4.2-0.1-5.7l-23.4-22.3c-1.6-1.5-4.1-1.5-5.6,0.1L213.7,301.4 C212.1,303,209.6,303,208,301.4z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "iconReverseCamera", + value: function iconReverseCamera() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M352,0H160C72,0,0,72,0,160v192c0,88,72,160,160,160h192c88,0,160-72,160-160V160C512,72,440,0,352,0z M356.7,365.8l-3.7,3.3c-27,23.2-61.4,35.9-96.8,35.9c-72.4,0-135.8-54.7-147-125.6c-0.3-1.9-2-3.3-3.9-3.3H64 c-3.3,0-5.2-3.8-3.2-6.4l61.1-81.4c1.6-2.1,4.7-2.1,6.4-0.1l63.3,81.4c2,2.6,0.2,6.5-3.2,6.5h-40.6c-2.5,0-4.5,2.4-3.9,4.8 c11.5,51.5,59.2,90.6,112.4,90.6c26.4,0,51.8-9.7,73.7-27.9l3.1-2.5c1.6-1.3,3.9-1.1,5.3,0.3l18.5,18.6 C358.5,361.6,358.4,364.3,356.7,365.8z M451.4,245.6l-61,83.5c-1.6,2.2-4.8,2.2-6.4,0.1l-63.3-83.3c-2-2.6-0.1-6.4,3.2-6.4h40.8 c2.5,0,4.4-2.3,3.9-4.8c-5.1-24.2-17.8-46.5-36.5-63.7c-21.2-19.4-48.2-30.1-76-30.1c-26.5,0-52.6,9.7-73.7,27.3l-3.1,2.5 c-1.6,1.3-3.9,1.2-5.4-0.3l-18.5-18.5c-1.6-1.6-1.5-4.3,0.2-5.9l3.5-3.1c27-23.2,61.4-35.9,96.8-35.9c38,0,73.9,13.7,101.2,38.7 c23.2,21.1,40.3,55.2,45.7,90.1c0.3,1.9,1.9,3.4,3.9,3.4h41.3C451.4,239.2,453.3,243,451.4,245.6z'/%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "iconRetake", + value: function iconRetake() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Ccircle fill='%23727A87' cx='256' cy='256' r='256'/%3E%3Cg id='Icon_5_'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M394.2,142L370,117.8c-1.6-1.6-4.1-1.6-5.7,0L258.8,223.4c-1.6,1.6-4.1,1.6-5.7,0L147.6,117.8 c-1.6-1.6-4.1-1.6-5.7,0L117.8,142c-1.6,1.6-1.6,4.1,0,5.7l105.5,105.5c1.6,1.6,1.6,4.1,0,5.7L117.8,364.4c-1.6,1.6-1.6,4.1,0,5.7 l24.1,24.1c1.6,1.6,4.1,1.6,5.7,0l105.5-105.5c1.6-1.6,4.1-1.6,5.7,0l105.5,105.5c1.6,1.6,4.1,1.6,5.7,0l24.1-24.1 c1.6-1.6,1.6-4.1,0-5.7L288.6,258.8c-1.6-1.6-1.6-4.1,0-5.7l105.5-105.5C395.7,146.1,395.7,143.5,394.2,142z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "iconFlashOff", + value: function iconFlashOff() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cg%3E%3Cpath class='st0' d='M498,483.7L42.3,28L14,56.4l149.8,149.8L91,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9c1.6,0,2.7,1.3,2.4,2.7 L197.6,507c-1,4.4,5.8,6.9,8.9,3.2l118.6-142.8L469.6,512L498,483.7z'/%3E%3Cpath class='st0' d='M449,218.2c2.5-3,0.1-7.2-3.9-7.2H301.2c-1.6,0-2.7-1.3-2.4-2.7L342.4,5c1-4.4-5.8-6.9-8.9-3.2L214.9,144.6 l161.3,161.3L449,218.2z'/%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "iconFlashOn", + value: function iconFlashOn() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cpath class='st0' d='M287.2,211c-1.6,0-2.7-1.3-2.4-2.7L328.4,5c1-4.4-5.8-6.9-8.9-3.2L77,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9 c1.6,0,2.7,1.3,2.4,2.7L183.6,507c-1,4.4,5.8,6.9,8.9,3.2l242.5-292c2.5-3,0.1-7.2-3.9-7.2L287.2,211L287.2,211z'/%3E%3C/svg%3E"; + } + }, { + key: "iconFlashAuto", + value: function iconFlashAuto() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cpath class='st0' d='M287.2,211c-1.6,0-2.7-1.3-2.4-2.7L328.4,5c1-4.4-5.8-6.9-8.9-3.2L77,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9 c1.6,0,2.7,1.3,2.4,2.7L183.6,507c-1,4.4,5.8,6.9,8.9,3.2l242.5-292c2.5-3,0.1-7.2-3.9-7.2L287.2,211L287.2,211z'/%3E%3Cg%3E%3Cpath class='st0' d='M321.3,186l74-186H438l74,186h-43.5l-11.9-32.5h-80.9l-12,32.5H321.3z M415.8,47.9l-27.2,70.7h54.9l-27.2-70.7 H415.8z'/%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "render", + value: function render() { + var _this3 = this; + // const acceptStyles = { transform: `rotate(${-this.rotation}deg)` }; + var acceptStyles = {}; + return h("div", { + class: "camera-wrapper" + }, h("div", { + class: "camera-header" + }, h("section", { + class: "items" + }, h("div", { + class: "item close", + onClick: function onClick(e) { + return _this3.handleClose(e); + } + }, h("img", { + src: this.iconExit() + })), h("div", { + class: "item flash", + onClick: function onClick(e) { + return _this3.handleFlashClick(e); + } + }, this.flashModes.length > 0 && h("div", null, this.flashMode == 'off' ? h("img", { + src: this.iconFlashOff() + }) : '', this.flashMode == 'auto' ? h("img", { + src: this.iconFlashAuto() + }) : '', this.flashMode == 'flash' ? h("img", { + src: this.iconFlashOn() + }) : '')))), (this.hasCamera === false || !!this.deviceError) && h("div", { + class: "no-device" + }, h("h2", null, this.noDevicesText), h("label", { + htmlFor: "_pwa-elements-camera-input" + }, this.noDevicesButtonText), h("input", { + type: "file", + id: "_pwa-elements-camera-input", + onChange: this.handleFileInputChange, + accept: "image/*", + class: "select-file-button" + })), this.photoSrc ? h("div", { + class: "accept" + }, h("div", { + class: "accept-image", + style: Object.assign({ + backgroundImage: "url(".concat(this.photoSrc, ")") + }, acceptStyles) + })) : h("div", { + class: "camera-video" + }, this.showShutterOverlay && h("div", { + class: "shutter-overlay" + }), this.hasImageCapture() ? h("video", { + ref: function ref(el) { + return _this3.videoElement = el; + }, + onLoadedMetaData: this.handleVideoMetadata, + autoplay: true, + playsinline: true + }) : h("canvas", { + ref: function ref(el) { + return _this3.canvasElement = el; + }, + width: "100%", + height: "100%" + }), h("canvas", { + class: "offscreen-image-render", + ref: function ref(e) { + return _this3.offscreenCanvas = e; + }, + width: "100%", + height: "100%" + })), this.hasCamera && h("div", { + class: "camera-footer" + }, !this.photo ? [!this.hidePicker && h("div", { + class: "pick-image", + onClick: this.handlePickFile + }, h("label", { + htmlFor: "_pwa-elements-file-pick" + }, this.iconPhotos()), h("input", { + type: "file", + id: "_pwa-elements-file-pick", + onChange: this.handleFileInputChange, + accept: "image/*", + class: "pick-image-button" + })), h("div", { + class: "shutter", + onClick: this.handleShutterClick + }, h("div", { + class: "shutter-button" + })), h("div", { + class: "rotate", + onClick: this.handleRotateClick + }, h("img", { + src: this.iconReverseCamera() + }))] : h("section", { + class: "items" + }, h("div", { + class: "item accept-cancel", + onClick: function onClick(e) { + return _this3.handleCancelPhoto(e); + } + }, h("img", { + src: this.iconRetake() + })), h("div", { + class: "item accept-use", + onClick: function onClick(e) { + return _this3.handleAcceptPhoto(e); + } + }, h("img", { + src: this.iconConfirm() + }))))); + } + }], [{ + key: "is", + get: function get() { + return "pwa-camera"; + } + }, { + key: "encapsulation", + get: function get() { + return "shadow"; + } + }, { + key: "originalStyleUrls", + get: function get() { + return { + "$": ["camera.css"] + }; + } + }, { + key: "styleUrls", + get: function get() { + return { + "$": ["camera.css"] + }; + } + }, { + key: "assetsDirs", + get: function get() { + return ["icons"]; + } + }, { + key: "properties", + get: function get() { + return { + "facingMode": { + "type": "string", + "mutable": false, + "complexType": { + "original": "string", + "resolved": "string", + "references": {} + }, + "required": false, + "optional": false, + "docs": { + "tags": [], + "text": "" + }, + "attribute": "facing-mode", + "reflect": false, + "defaultValue": "'user'" + }, + "handlePhoto": { + "type": "unknown", + "mutable": false, + "complexType": { + "original": "(photo: Blob) => void", + "resolved": "(photo: Blob) => void", + "references": { + "Blob": { + "location": "global" + } + } + }, + "required": false, + "optional": false, + "docs": { + "tags": [], + "text": "" + } + }, + "hidePicker": { + "type": "boolean", + "mutable": false, + "complexType": { + "original": "boolean", + "resolved": "boolean", + "references": {} + }, + "required": false, + "optional": false, + "docs": { + "tags": [], + "text": "" + }, + "attribute": "hide-picker", + "reflect": false, + "defaultValue": "false" + }, + "handleNoDeviceError": { + "type": "unknown", + "mutable": false, + "complexType": { + "original": "(e?: any) => void", + "resolved": "(e?: any) => void", + "references": {} + }, + "required": false, + "optional": false, + "docs": { + "tags": [], + "text": "" + } + }, + "noDevicesText": { + "type": "string", + "mutable": false, + "complexType": { + "original": "string", + "resolved": "string", + "references": {} + }, + "required": false, + "optional": false, + "docs": { + "tags": [], + "text": "" + }, + "attribute": "no-devices-text", + "reflect": false, + "defaultValue": "'No camera found'" + }, + "noDevicesButtonText": { + "type": "string", + "mutable": false, + "complexType": { + "original": "string", + "resolved": "string", + "references": {} + }, + "required": false, + "optional": false, + "docs": { + "tags": [], + "text": "" + }, + "attribute": "no-devices-button-text", + "reflect": false, + "defaultValue": "'Choose image'" + } + }; + } + }, { + key: "states", + get: function get() { + return { + "photo": {}, + "photoSrc": {}, + "showShutterOverlay": {}, + "flashIndex": {}, + "hasCamera": {}, + "rotation": {}, + "deviceError": {} + }; + } + }, { + key: "elementRef", + get: function get() { + return "el"; + } + }]); +}(); \ No newline at end of file diff --git a/src/public/js/pwa-elements/collection/components/camera/icons/confirm.svg b/src/public/js/pwa-elements/collection/components/camera/icons/confirm.svg new file mode 100644 index 0000000000000000000000000000000000000000..1213fd985488c54d7bf52299d0256052668cfdc6 --- /dev/null +++ b/src/public/js/pwa-elements/collection/components/camera/icons/confirm.svg @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve"> +<circle fill="#2CD865" cx="256" cy="256" r="256"/> +<g id="Icon_1_"> + <g> + <g> + <path fill="#FFFFFF" d="M208,301.4l-55.4-55.5c-1.5-1.5-4-1.6-5.6-0.1l-23.4,22.3c-1.6,1.6-1.7,4.1-0.1,5.7l81.6,81.4 + c3.1,3.1,8.2,3.1,11.3,0l171.8-171.7c1.6-1.6,1.6-4.2-0.1-5.7l-23.4-22.3c-1.6-1.5-4.1-1.5-5.6,0.1L213.7,301.4 + C212.1,303,209.6,303,208,301.4z"/> + </g> + </g> +</g> +</svg> diff --git a/src/public/js/pwa-elements/collection/components/camera/icons/exit.svg b/src/public/js/pwa-elements/collection/components/camera/icons/exit.svg new file mode 100644 index 0000000000000000000000000000000000000000..be96592a15b3597189c7c530ae7038652cbaf1d8 --- /dev/null +++ b/src/public/js/pwa-elements/collection/components/camera/icons/exit.svg @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve"> +<g id="Icon_5_"> + <g> + <path fill="#FFFFFF" d="M402.2,134L378,109.8c-1.6-1.6-4.1-1.6-5.7,0L258.8,223.4c-1.6,1.6-4.1,1.6-5.7,0L139.6,109.8 + c-1.6-1.6-4.1-1.6-5.7,0L109.8,134c-1.6,1.6-1.6,4.1,0,5.7l113.5,113.5c1.6,1.6,1.6,4.1,0,5.7L109.8,372.4c-1.6,1.6-1.6,4.1,0,5.7 + l24.1,24.1c1.6,1.6,4.1,1.6,5.7,0l113.5-113.5c1.6-1.6,4.1-1.6,5.7,0l113.5,113.5c1.6,1.6,4.1,1.6,5.7,0l24.1-24.1 + c1.6-1.6,1.6-4.1,0-5.7L288.6,258.8c-1.6-1.6-1.6-4.1,0-5.7l113.5-113.5C403.7,138.1,403.7,135.5,402.2,134z"/> + </g> +</g> +</svg> diff --git a/src/public/js/pwa-elements/collection/components/camera/icons/flash-auto.svg b/src/public/js/pwa-elements/collection/components/camera/icons/flash-auto.svg new file mode 100644 index 0000000000000000000000000000000000000000..c388e8624431d2fb995587afaecce200054426f3 --- /dev/null +++ b/src/public/js/pwa-elements/collection/components/camera/icons/flash-auto.svg @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve"> +<style type="text/css"> + .st0{fill:#FFFFFF;} +</style> +<path class="st0" d="M287.2,211c-1.6,0-2.7-1.3-2.4-2.7L328.4,5c1-4.4-5.8-6.9-8.9-3.2L77,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9 + c1.6,0,2.7,1.3,2.4,2.7L183.6,507c-1,4.4,5.8,6.9,8.9,3.2l242.5-292c2.5-3,0.1-7.2-3.9-7.2L287.2,211L287.2,211z"/> +<g> + <path class="st0" d="M321.3,186l74-186H438l74,186h-43.5l-11.9-32.5h-80.9l-12,32.5H321.3z M415.8,47.9l-27.2,70.7h54.9l-27.2-70.7 + H415.8z"/> +</g> +</svg> diff --git a/src/public/js/pwa-elements/collection/components/camera/icons/flash-off.svg b/src/public/js/pwa-elements/collection/components/camera/icons/flash-off.svg new file mode 100644 index 0000000000000000000000000000000000000000..98b25994a64831e428d399fec07333de06d5e704 --- /dev/null +++ b/src/public/js/pwa-elements/collection/components/camera/icons/flash-off.svg @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve"> +<style type="text/css"> + .st0{fill:#FFFFFF;} +</style> +<g> + <path class="st0" d="M498,483.7L42.3,28L14,56.4l149.8,149.8L91,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9c1.6,0,2.7,1.3,2.4,2.7 + L197.6,507c-1,4.4,5.8,6.9,8.9,3.2l118.6-142.8L469.6,512L498,483.7z"/> + <path class="st0" d="M449,218.2c2.5-3,0.1-7.2-3.9-7.2H301.2c-1.6,0-2.7-1.3-2.4-2.7L342.4,5c1-4.4-5.8-6.9-8.9-3.2L214.9,144.6 + l161.3,161.3L449,218.2z"/> +</g> +</svg> diff --git a/src/public/js/pwa-elements/collection/components/camera/icons/flash-on.svg b/src/public/js/pwa-elements/collection/components/camera/icons/flash-on.svg new file mode 100644 index 0000000000000000000000000000000000000000..e045c08690026c359bd1432786e27065aaf2640d --- /dev/null +++ b/src/public/js/pwa-elements/collection/components/camera/icons/flash-on.svg @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve"> +<style type="text/css"> + .st0{fill:#FFFFFF;} +</style> +<path class="st0" d="M287.2,211c-1.6,0-2.7-1.3-2.4-2.7L328.4,5c1-4.4-5.8-6.9-8.9-3.2L77,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9 + c1.6,0,2.7,1.3,2.4,2.7L183.6,507c-1,4.4,5.8,6.9,8.9,3.2l242.5-292c2.5-3,0.1-7.2-3.9-7.2L287.2,211L287.2,211z"/> +</svg> diff --git a/src/public/js/pwa-elements/collection/components/camera/icons/retake.svg b/src/public/js/pwa-elements/collection/components/camera/icons/retake.svg new file mode 100644 index 0000000000000000000000000000000000000000..04fc2a099863a42730d5114ad4e75489589e67de --- /dev/null +++ b/src/public/js/pwa-elements/collection/components/camera/icons/retake.svg @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve"> +<circle fill="#727A87" cx="256" cy="256" r="256"/> +<g id="Icon_5_"> + <g> + <path fill="#FFFFFF" d="M394.2,142L370,117.8c-1.6-1.6-4.1-1.6-5.7,0L258.8,223.4c-1.6,1.6-4.1,1.6-5.7,0L147.6,117.8 + c-1.6-1.6-4.1-1.6-5.7,0L117.8,142c-1.6,1.6-1.6,4.1,0,5.7l105.5,105.5c1.6,1.6,1.6,4.1,0,5.7L117.8,364.4c-1.6,1.6-1.6,4.1,0,5.7 + l24.1,24.1c1.6,1.6,4.1,1.6,5.7,0l105.5-105.5c1.6-1.6,4.1-1.6,5.7,0l105.5,105.5c1.6,1.6,4.1,1.6,5.7,0l24.1-24.1 + c1.6-1.6,1.6-4.1,0-5.7L288.6,258.8c-1.6-1.6-1.6-4.1,0-5.7l105.5-105.5C395.7,146.1,395.7,143.5,394.2,142z"/> + </g> +</g> +</svg> diff --git a/src/public/js/pwa-elements/collection/components/camera/icons/reverse-camera.svg b/src/public/js/pwa-elements/collection/components/camera/icons/reverse-camera.svg new file mode 100644 index 0000000000000000000000000000000000000000..ec09076d5c46c9068e1e024170f2a6817e7cd282 --- /dev/null +++ b/src/public/js/pwa-elements/collection/components/camera/icons/reverse-camera.svg @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve"> +<g> + <path fill="#FFFFFF" d="M352,0H160C72,0,0,72,0,160v192c0,88,72,160,160,160h192c88,0,160-72,160-160V160C512,72,440,0,352,0z + M356.7,365.8l-3.7,3.3c-27,23.2-61.4,35.9-96.8,35.9c-72.4,0-135.8-54.7-147-125.6c-0.3-1.9-2-3.3-3.9-3.3H64 + c-3.3,0-5.2-3.8-3.2-6.4l61.1-81.4c1.6-2.1,4.7-2.1,6.4-0.1l63.3,81.4c2,2.6,0.2,6.5-3.2,6.5h-40.6c-2.5,0-4.5,2.4-3.9,4.8 + c11.5,51.5,59.2,90.6,112.4,90.6c26.4,0,51.8-9.7,73.7-27.9l3.1-2.5c1.6-1.3,3.9-1.1,5.3,0.3l18.5,18.6 + C358.5,361.6,358.4,364.3,356.7,365.8z M451.4,245.6l-61,83.5c-1.6,2.2-4.8,2.2-6.4,0.1l-63.3-83.3c-2-2.6-0.1-6.4,3.2-6.4h40.8 + c2.5,0,4.4-2.3,3.9-4.8c-5.1-24.2-17.8-46.5-36.5-63.7c-21.2-19.4-48.2-30.1-76-30.1c-26.5,0-52.6,9.7-73.7,27.3l-3.1,2.5 + c-1.6,1.3-3.9,1.2-5.4-0.3l-18.5-18.5c-1.6-1.6-1.5-4.3,0.2-5.9l3.5-3.1c27-23.2,61.4-35.9,96.8-35.9c38,0,73.9,13.7,101.2,38.7 + c23.2,21.1,40.3,55.2,45.7,90.1c0.3,1.9,1.9,3.4,3.9,3.4h41.3C451.4,239.2,453.3,243,451.4,245.6z"/> +</g> +</svg> diff --git a/src/public/js/pwa-elements/collection/components/camera/imagecapture.js b/src/public/js/pwa-elements/collection/components/camera/imagecapture.js new file mode 100644 index 0000000000000000000000000000000000000000..1b2442e192f314cd2ea7b5bf1dbdfc3d1c113bc8 --- /dev/null +++ b/src/public/js/pwa-elements/collection/components/camera/imagecapture.js @@ -0,0 +1,172 @@ +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +/** + * MediaStream ImageCapture polyfill + * + * @license + * Copyright 2018 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export var ImageCapture = window.ImageCapture; +if (typeof ImageCapture === 'undefined') { + ImageCapture = /*#__PURE__*/function () { + /** + * TODO https://www.w3.org/TR/image-capture/#constructors + * + * @param {MediaStreamTrack} videoStreamTrack - A MediaStreamTrack of the 'video' kind + */ + function ImageCapture(videoStreamTrack) { + var _this = this; + _classCallCheck(this, ImageCapture); + if (videoStreamTrack.kind !== 'video') throw new DOMException('NotSupportedError'); + this._videoStreamTrack = videoStreamTrack; + if (!('readyState' in this._videoStreamTrack)) { + // Polyfill for Firefox + this._videoStreamTrack.readyState = 'live'; + } + // MediaStream constructor not available until Chrome 55 - https://www.chromestatus.com/feature/5912172546752512 + this._previewStream = new MediaStream([videoStreamTrack]); + this.videoElement = document.createElement('video'); + this.videoElementPlaying = new Promise(function (resolve) { + _this.videoElement.addEventListener('playing', resolve); + }); + if (HTMLMediaElement) { + this.videoElement.srcObject = this._previewStream; // Safari 11 doesn't allow use of createObjectURL for MediaStream + } else { + this.videoElement.src = URL.createObjectURL(this._previewStream); + } + this.videoElement.muted = true; + this.videoElement.setAttribute('playsinline', ''); // Required by Safari on iOS 11. See https://webkit.org/blog/6784 + this.videoElement.play(); + this.canvasElement = document.createElement('canvas'); + // TODO Firefox has https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas + this.canvas2dContext = this.canvasElement.getContext('2d'); + } + /** + * https://w3c.github.io/mediacapture-image/index.html#dom-imagecapture-videostreamtrack + * @return {MediaStreamTrack} The MediaStreamTrack passed into the constructor + */ + return _createClass(ImageCapture, [{ + key: "videoStreamTrack", + get: function get() { + return this._videoStreamTrack; + } + /** + * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-getphotocapabilities + * @return {Promise<PhotoCapabilities>} Fulfilled promise with + * [PhotoCapabilities](https://www.w3.org/TR/image-capture/#idl-def-photocapabilities) + * object on success, rejected promise on failure + */ + }, { + key: "getPhotoCapabilities", + value: function getPhotoCapabilities() { + return new Promise(function executorGPC(resolve, reject) { + // TODO see https://github.com/w3c/mediacapture-image/issues/97 + var MediaSettingsRange = { + current: 0, + min: 0, + max: 0 + }; + resolve({ + exposureCompensation: MediaSettingsRange, + exposureMode: 'none', + fillLightMode: ['none'], + focusMode: 'none', + imageHeight: MediaSettingsRange, + imageWidth: MediaSettingsRange, + iso: MediaSettingsRange, + redEyeReduction: false, + whiteBalanceMode: 'none', + zoom: MediaSettingsRange + }); + reject(new DOMException('OperationError')); + }); + } + /** + * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-setoptions + * @param {Object} photoSettings - Photo settings dictionary, https://www.w3.org/TR/image-capture/#idl-def-photosettings + * @return {Promise<void>} Fulfilled promise on success, rejected promise on failure + */ + }, { + key: "setOptions", + value: function setOptions() { + var _photoSettings = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return new Promise(function executorSO(_resolve, _reject) { + // TODO + }); + } + /** + * TODO + * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-takephoto + * @return {Promise<Blob>} Fulfilled promise with [Blob](https://www.w3.org/TR/FileAPI/#blob) + * argument on success; rejected promise on failure + */ + }, { + key: "takePhoto", + value: function takePhoto() { + var self = this; + return new Promise(function executorTP(resolve, reject) { + // `If the readyState of the MediaStreamTrack provided in the constructor is not live, + // return a promise rejected with a new DOMException whose name is "InvalidStateError".` + if (self._videoStreamTrack.readyState !== 'live') { + return reject(new DOMException('InvalidStateError')); + } + self.videoElementPlaying.then(function () { + try { + self.canvasElement.width = self.videoElement.videoWidth; + self.canvasElement.height = self.videoElement.videoHeight; + self.canvas2dContext.drawImage(self.videoElement, 0, 0); + self.canvasElement.toBlob(resolve); + } catch (error) { + reject(new DOMException('UnknownError')); + } + }); + }); + } + /** + * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-grabframe + * @return {Promise<ImageBitmap>} Fulfilled promise with + * [ImageBitmap](https://www.w3.org/TR/html51/webappapis.html#webappapis-images) + * argument on success; rejected promise on failure + */ + }, { + key: "grabFrame", + value: function grabFrame() { + var self = this; + return new Promise(function executorGF(resolve, reject) { + // `If the readyState of the MediaStreamTrack provided in the constructor is not live, + // return a promise rejected with a new DOMException whose name is "InvalidStateError".` + if (self._videoStreamTrack.readyState !== 'live') { + return reject(new DOMException('InvalidStateError')); + } + self.videoElementPlaying.then(function () { + try { + self.canvasElement.width = self.videoElement.videoWidth; + self.canvasElement.height = self.videoElement.videoHeight; + self.canvas2dContext.drawImage(self.videoElement, 0, 0); + // TODO polyfill https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmapFactories/createImageBitmap for IE + resolve(window.createImageBitmap(self.canvasElement)); + } catch (error) { + reject(new DOMException('UnknownError')); + } + }); + }); + } + }]); + }(); +} +window.ImageCapture = ImageCapture; \ No newline at end of file diff --git a/src/public/js/pwa-elements/collection/components/toast/toast.css b/src/public/js/pwa-elements/collection/components/toast/toast.css new file mode 100644 index 0000000000000000000000000000000000000000..180ec879330225241b058300b05e1229c32e8a0a --- /dev/null +++ b/src/public/js/pwa-elements/collection/components/toast/toast.css @@ -0,0 +1,37 @@ +:host { + position: fixed; + bottom: 20px; + left: 0; + right: 0; + display: flex; + + opacity: 0; +} + +:host(.in) { + transition: opacity 300ms; + opacity: 1; +} + +:host(.out) { + transition: opacity 1s; + opacity: 0; +} + +.wrapper { + flex: 1; + display: flex; + align-items: center; + justify-content: center; +} + +.toast { + font-family: -apple-system, system-ui, "Helvetica Neue", Roboto, sans-serif; + background-color: #eee; + color: black; + border-radius: 5px; + padding: 10px 15px; + font-size: 14px; + font-weight: 500; + box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.20); +} \ No newline at end of file diff --git a/src/public/js/pwa-elements/collection/components/toast/toast.js b/src/public/js/pwa-elements/collection/components/toast/toast.js new file mode 100644 index 0000000000000000000000000000000000000000..168fe77938f5030344e96a8a2b1284bc9c3c4db1 --- /dev/null +++ b/src/public/js/pwa-elements/collection/components/toast/toast.js @@ -0,0 +1,134 @@ +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +import { h } from '@stencil/core'; +export var PWAToast = /*#__PURE__*/function () { + function PWAToast() { + _classCallCheck(this, PWAToast); + this.message = undefined; + this.duration = 2000; + this.closing = null; + } + return _createClass(PWAToast, [{ + key: "hostData", + value: function hostData() { + var classes = { + out: !!this.closing + }; + if (this.closing !== null) { + classes['in'] = !this.closing; + } + return { + class: classes + }; + } + }, { + key: "componentDidLoad", + value: function componentDidLoad() { + var _this = this; + setTimeout(function () { + _this.closing = false; + }); + setTimeout(function () { + _this.close(); + }, this.duration); + } + }, { + key: "close", + value: function close() { + var _this2 = this; + this.closing = true; + setTimeout(function () { + _this2.el.parentNode.removeChild(_this2.el); + }, 1000); + } + }, { + key: "render", + value: function render() { + return h("div", { + class: "wrapper" + }, h("div", { + class: "toast" + }, this.message)); + } + }], [{ + key: "is", + get: function get() { + return "pwa-toast"; + } + }, { + key: "encapsulation", + get: function get() { + return "shadow"; + } + }, { + key: "originalStyleUrls", + get: function get() { + return { + "$": ["toast.css"] + }; + } + }, { + key: "styleUrls", + get: function get() { + return { + "$": ["toast.css"] + }; + } + }, { + key: "properties", + get: function get() { + return { + "message": { + "type": "string", + "mutable": false, + "complexType": { + "original": "string", + "resolved": "string", + "references": {} + }, + "required": false, + "optional": false, + "docs": { + "tags": [], + "text": "" + }, + "attribute": "message", + "reflect": false + }, + "duration": { + "type": "number", + "mutable": false, + "complexType": { + "original": "number", + "resolved": "number", + "references": {} + }, + "required": false, + "optional": false, + "docs": { + "tags": [], + "text": "" + }, + "attribute": "duration", + "reflect": false, + "defaultValue": "2000" + } + }; + } + }, { + key: "states", + get: function get() { + return { + "closing": {} + }; + } + }, { + key: "elementRef", + get: function get() { + return "el"; + } + }]); +}(); \ No newline at end of file diff --git a/src/public/js/pwa-elements/collection/definitions.js b/src/public/js/pwa-elements/collection/definitions.js new file mode 100644 index 0000000000000000000000000000000000000000..8cec2e9ced0d3575a0f7b97c7396d5bcefe0ea5e --- /dev/null +++ b/src/public/js/pwa-elements/collection/definitions.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/src/public/js/pwa-elements/collection/index.js b/src/public/js/pwa-elements/collection/index.js new file mode 100644 index 0000000000000000000000000000000000000000..099b463e3b9ee023dda6c3840b137409135a45c6 --- /dev/null +++ b/src/public/js/pwa-elements/collection/index.js @@ -0,0 +1 @@ +export * from './components'; \ No newline at end of file diff --git a/src/public/js/pwa-elements/esm-es5/index-1c5c47b4.js b/src/public/js/pwa-elements/esm-es5/index-1c5c47b4.js new file mode 100644 index 0000000000000000000000000000000000000000..920be60e3ceaaa620af3c464ae3ec60a29ca69bb --- /dev/null +++ b/src/public/js/pwa-elements/esm-es5/index-1c5c47b4.js @@ -0,0 +1,1293 @@ +var __extends = this && this.__extends || function () { + var _e = function e(t, n) { + _e = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (e, t) { + e.__proto__ = t; + } || function (e, t) { + for (var n in t) if (Object.prototype.hasOwnProperty.call(t, n)) e[n] = t[n]; + }; + return _e(t, n); + }; + return function (t, n) { + if (typeof n !== "function" && n !== null) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null"); + _e(t, n); + function r() { + this.constructor = t; + } + t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); + }; +}(); +var __awaiter = this && this.__awaiter || function (e, t, n, r) { + function a(e) { + return e instanceof n ? e : new n(function (t) { + t(e); + }); + } + return new (n || (n = Promise))(function (n, o) { + function s(e) { + try { + l(r.next(e)); + } catch (e) { + o(e); + } + } + function i(e) { + try { + l(r["throw"](e)); + } catch (e) { + o(e); + } + } + function l(e) { + e.done ? n(e.value) : a(e.value).then(s, i); + } + l((r = r.apply(e, t || [])).next()); + }); +}; +var __generator = this && this.__generator || function (e, t) { + var n = { + label: 0, + sent: function sent() { + if (o[0] & 1) throw o[1]; + return o[1]; + }, + trys: [], + ops: [] + }, + r, + a, + o, + s; + return s = { + next: i(0), + throw: i(1), + return: i(2) + }, typeof Symbol === "function" && (s[Symbol.iterator] = function () { + return this; + }), s; + function i(e) { + return function (t) { + return l([e, t]); + }; + } + function l(i) { + if (r) throw new TypeError("Generator is already executing."); + while (s && (s = 0, i[0] && (n = 0)), n) try { + if (r = 1, a && (o = i[0] & 2 ? a["return"] : i[0] ? a["throw"] || ((o = a["return"]) && o.call(a), 0) : a.next) && !(o = o.call(a, i[1])).done) return o; + if (a = 0, o) i = [i[0] & 2, o.value]; + switch (i[0]) { + case 0: + case 1: + o = i; + break; + case 4: + n.label++; + return { + value: i[1], + done: false + }; + case 5: + n.label++; + a = i[1]; + i = [0]; + continue; + case 7: + i = n.ops.pop(); + n.trys.pop(); + continue; + default: + if (!(o = n.trys, o = o.length > 0 && o[o.length - 1]) && (i[0] === 6 || i[0] === 2)) { + n = 0; + continue; + } + if (i[0] === 3 && (!o || i[1] > o[0] && i[1] < o[3])) { + n.label = i[1]; + break; + } + if (i[0] === 6 && n.label < o[1]) { + n.label = o[1]; + o = i; + break; + } + if (o && n.label < o[2]) { + n.label = o[2]; + n.ops.push(i); + break; + } + if (o[2]) n.ops.pop(); + n.trys.pop(); + continue; + } + i = t.call(e, n); + } catch (e) { + i = [6, e]; + a = 0; + } finally { + r = o = 0; + } + if (i[0] & 5) throw i[1]; + return { + value: i[0] ? i[1] : void 0, + done: true + }; + } +}; +var __spreadArray = this && this.__spreadArray || function (e, t, n) { + if (n || arguments.length === 2) for (var r = 0, a = t.length, o; r < a; r++) { + if (o || !(r in t)) { + if (!o) o = Array.prototype.slice.call(t, 0, r); + o[r] = t[r]; + } + } + return e.concat(o || Array.prototype.slice.call(t)); +}; +var NAMESPACE = "ionicpwaelements"; +var scopeId; +var hostTagName; +var isSvgMode = false; +var queuePending = false; +var createTime = function createTime(e, t) { + if (t === void 0) { + t = ""; + } + { + return function () { + return; + }; + } +}; +var uniqueTime = function uniqueTime(e, t) { + { + return function () { + return; + }; + } +}; +var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}"; +var EMPTY_OBJ = {}; +var SVG_NS = "http://www.w3.org/2000/svg"; +var HTML_NS = "http://www.w3.org/1999/xhtml"; +var isDef = function isDef(e) { + return e != null; +}; +var isComplexType = function isComplexType(e) { + e = typeof e; + return e === "object" || e === "function"; +}; +function queryNonceMetaTagContent(e) { + var t, n, r; + return (r = (n = (t = e.head) === null || t === void 0 ? void 0 : t.querySelector('meta[name="csp-nonce"]')) === null || n === void 0 ? void 0 : n.getAttribute("content")) !== null && r !== void 0 ? r : undefined; +} +var h = function h(e, t) { + var n = []; + for (var r = 2; r < arguments.length; r++) { + n[r - 2] = arguments[r]; + } + var a = null; + var o = false; + var s = false; + var i = []; + var _l = function l(t) { + for (var n = 0; n < t.length; n++) { + a = t[n]; + if (Array.isArray(a)) { + _l(a); + } else if (a != null && typeof a !== "boolean") { + if (o = typeof e !== "function" && !isComplexType(a)) { + a = String(a); + } + if (o && s) { + i[i.length - 1].$text$ += a; + } else { + i.push(o ? newVNode(null, a) : a); + } + s = o; + } + } + }; + _l(n); + if (t) { + { + var u = t.className || t.class; + if (u) { + t.class = typeof u !== "object" ? u : Object.keys(u).filter(function (e) { + return u[e]; + }).join(" "); + } + } + } + var c = newVNode(e, null); + c.$attrs$ = t; + if (i.length > 0) { + c.$children$ = i; + } + return c; +}; +var newVNode = function newVNode(e, t) { + var n = { + $flags$: 0, + $tag$: e, + $text$: t, + $elm$: null, + $children$: null + }; + { + n.$attrs$ = null; + } + return n; +}; +var Host = {}; +var isHost = function isHost(e) { + return e && e.$tag$ === Host; +}; +var parsePropertyValue = function parsePropertyValue(e, t) { + if (e != null && !isComplexType(e)) { + if (t & 4) { + return e === "false" ? false : e === "" || !!e; + } + if (t & 2) { + return parseFloat(e); + } + if (t & 1) { + return String(e); + } + return e; + } + return e; +}; +var getElement = function getElement(e) { + return getHostRef(e).$hostElement$; +}; +var createEvent = function createEvent(e, t, n) { + var r = getElement(e); + return { + emit: function emit(e) { + return emitEvent(r, t, { + bubbles: !!(n & 4), + composed: !!(n & 2), + cancelable: !!(n & 1), + detail: e + }); + } + }; +}; +var emitEvent = function emitEvent(e, t, n) { + var r = plt.ce(t, n); + e.dispatchEvent(r); + return r; +}; +var rootAppliedStyles = new WeakMap(); +var registerStyle = function registerStyle(e, t, n) { + var r = styles.get(e); + if (supportsConstructableStylesheets && n) { + r = r || new CSSStyleSheet(); + if (typeof r === "string") { + r = t; + } else { + r.replaceSync(t); + } + } else { + r = t; + } + styles.set(e, r); +}; +var addStyle = function addStyle(e, t, n, r) { + var a; + var o = getScopeId(t); + var s = styles.get(o); + e = e.nodeType === 11 ? e : doc; + if (s) { + if (typeof s === "string") { + e = e.head || e; + var i = rootAppliedStyles.get(e); + var l = void 0; + if (!i) { + rootAppliedStyles.set(e, i = new Set()); + } + if (!i.has(o)) { + { + { + l = doc.createElement("style"); + l.innerHTML = s; + } + var u = (a = plt.$nonce$) !== null && a !== void 0 ? a : queryNonceMetaTagContent(doc); + if (u != null) { + l.setAttribute("nonce", u); + } + e.insertBefore(l, e.querySelector("link")); + } + if (i) { + i.add(o); + } + } + } else if (!e.adoptedStyleSheets.includes(s)) { + e.adoptedStyleSheets = __spreadArray(__spreadArray([], e.adoptedStyleSheets, true), [s], false); + } + } + return o; +}; +var attachStyles = function attachStyles(e) { + var t = e.$cmpMeta$; + var n = e.$hostElement$; + var r = t.$flags$; + var a = createTime("attachStyles", t.$tagName$); + var o = addStyle(n.shadowRoot ? n.shadowRoot : n.getRootNode(), t); + if (r & 10) { + n["s-sc"] = o; + n.classList.add(o + "-h"); + } + a(); +}; +var getScopeId = function getScopeId(e, t) { + return "sc-" + e.$tagName$; +}; +var setAccessor = function setAccessor(e, t, n, r, a, o) { + if (n !== r) { + var s = isMemberInElement(e, t); + var i = t.toLowerCase(); + if (t === "class") { + var l = e.classList; + var u = parseClassList(n); + var c = parseClassList(r); + l.remove.apply(l, u.filter(function (e) { + return e && !c.includes(e); + })); + l.add.apply(l, c.filter(function (e) { + return e && !u.includes(e); + })); + } else if (t === "style") { + { + for (var f in n) { + if (!r || r[f] == null) { + if (f.includes("-")) { + e.style.removeProperty(f); + } else { + e.style[f] = ""; + } + } + } + } + for (var f in r) { + if (!n || r[f] !== n[f]) { + if (f.includes("-")) { + e.style.setProperty(f, r[f]); + } else { + e.style[f] = r[f]; + } + } + } + } else if (t === "ref") { + if (r) { + r(e); + } + } else if (!s && t[0] === "o" && t[1] === "n") { + if (t[2] === "-") { + t = t.slice(3); + } else if (isMemberInElement(win, i)) { + t = i.slice(2); + } else { + t = i[2] + t.slice(3); + } + if (n) { + plt.rel(e, t, n, false); + } + if (r) { + plt.ael(e, t, r, false); + } + } else { + var $ = isComplexType(r); + if ((s || $ && r !== null) && !a) { + try { + if (!e.tagName.includes("-")) { + var d = r == null ? "" : r; + if (t === "list") { + s = false; + } else if (n == null || e[t] != d) { + e[t] = d; + } + } else { + e[t] = r; + } + } catch (e) {} + } + if (r == null || r === false) { + if (r !== false || e.getAttribute(t) === "") { + { + e.removeAttribute(t); + } + } + } else if ((!s || o & 4 || a) && !$) { + r = r === true ? "" : r; + { + e.setAttribute(t, r); + } + } + } + } +}; +var parseClassListRegex = /\s/; +var parseClassList = function parseClassList(e) { + return !e ? [] : e.split(parseClassListRegex); +}; +var updateElement = function updateElement(e, t, n, r) { + var a = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$; + var o = e && e.$attrs$ || EMPTY_OBJ; + var s = t.$attrs$ || EMPTY_OBJ; + { + for (r in o) { + if (!(r in s)) { + setAccessor(a, r, o[r], undefined, n, t.$flags$); + } + } + } + for (r in s) { + setAccessor(a, r, o[r], s[r], n, t.$flags$); + } +}; +var _createElm = function createElm(e, t, n, r) { + var a = t.$children$[n]; + var o = 0; + var s; + var i; + if (a.$text$ !== null) { + s = a.$elm$ = doc.createTextNode(a.$text$); + } else { + if (!isSvgMode) { + isSvgMode = a.$tag$ === "svg"; + } + s = a.$elm$ = doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, a.$tag$); + if (isSvgMode && a.$tag$ === "foreignObject") { + isSvgMode = false; + } + { + updateElement(null, a, isSvgMode); + } + if (isDef(scopeId) && s["s-si"] !== scopeId) { + s.classList.add(s["s-si"] = scopeId); + } + if (a.$children$) { + for (o = 0; o < a.$children$.length; ++o) { + i = _createElm(e, a, o); + if (i) { + s.appendChild(i); + } + } + } + { + if (a.$tag$ === "svg") { + isSvgMode = false; + } else if (s.tagName === "foreignObject") { + isSvgMode = true; + } + } + } + return s; +}; +var addVnodes = function addVnodes(e, t, n, r, a, o) { + var s = e; + var i; + if (s.shadowRoot && s.tagName === hostTagName) { + s = s.shadowRoot; + } + for (; a <= o; ++a) { + if (r[a]) { + i = _createElm(null, n, a); + if (i) { + r[a].$elm$ = i; + s.insertBefore(i, t); + } + } + } +}; +var removeVnodes = function removeVnodes(e, t, n) { + for (var r = t; r <= n; ++r) { + var a = e[r]; + if (a) { + var o = a.$elm$; + _nullifyVNodeRefs(a); + if (o) { + o.remove(); + } + } + } +}; +var updateChildren = function updateChildren(e, t, n, r) { + var a = 0; + var o = 0; + var s = t.length - 1; + var i = t[0]; + var l = t[s]; + var u = r.length - 1; + var c = r[0]; + var f = r[u]; + var $; + while (a <= s && o <= u) { + if (i == null) { + i = t[++a]; + } else if (l == null) { + l = t[--s]; + } else if (c == null) { + c = r[++o]; + } else if (f == null) { + f = r[--u]; + } else if (isSameVnode(i, c)) { + patch(i, c); + i = t[++a]; + c = r[++o]; + } else if (isSameVnode(l, f)) { + patch(l, f); + l = t[--s]; + f = r[--u]; + } else if (isSameVnode(i, f)) { + patch(i, f); + e.insertBefore(i.$elm$, l.$elm$.nextSibling); + i = t[++a]; + f = r[--u]; + } else if (isSameVnode(l, c)) { + patch(l, c); + e.insertBefore(l.$elm$, i.$elm$); + l = t[--s]; + c = r[++o]; + } else { + { + $ = _createElm(t && t[o], n, o); + c = r[++o]; + } + if ($) { + { + i.$elm$.parentNode.insertBefore($, i.$elm$); + } + } + } + } + if (a > s) { + addVnodes(e, r[u + 1] == null ? null : r[u + 1].$elm$, n, r, o, u); + } else if (o > u) { + removeVnodes(t, a, s); + } +}; +var isSameVnode = function isSameVnode(e, t) { + if (e.$tag$ === t.$tag$) { + return true; + } + return false; +}; +var patch = function patch(e, t) { + var n = t.$elm$ = e.$elm$; + var r = e.$children$; + var a = t.$children$; + var o = t.$tag$; + var s = t.$text$; + if (s === null) { + { + isSvgMode = o === "svg" ? true : o === "foreignObject" ? false : isSvgMode; + } + { + { + updateElement(e, t, isSvgMode); + } + } + if (r !== null && a !== null) { + updateChildren(n, r, t, a); + } else if (a !== null) { + if (e.$text$ !== null) { + n.textContent = ""; + } + addVnodes(n, null, t, a, 0, a.length - 1); + } else if (r !== null) { + removeVnodes(r, 0, r.length - 1); + } + if (isSvgMode && o === "svg") { + isSvgMode = false; + } + } else if (e.$text$ !== s) { + n.data = s; + } +}; +var _nullifyVNodeRefs = function nullifyVNodeRefs(e) { + { + e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null); + e.$children$ && e.$children$.map(_nullifyVNodeRefs); + } +}; +var renderVdom = function renderVdom(e, t) { + var n = e.$hostElement$; + var r = e.$vnode$ || newVNode(null, null); + var a = isHost(t) ? t : h(null, null, t); + hostTagName = n.tagName; + a.$tag$ = null; + a.$flags$ |= 4; + e.$vnode$ = a; + a.$elm$ = r.$elm$ = n.shadowRoot || n; + { + scopeId = n["s-sc"]; + } + patch(r, a); +}; +var attachToAncestor = function attachToAncestor(e, t) { + if (t && !e.$onRenderResolve$ && t["s-p"]) { + t["s-p"].push(new Promise(function (t) { + return e.$onRenderResolve$ = t; + })); + } +}; +var scheduleUpdate = function scheduleUpdate(e, t) { + { + e.$flags$ |= 16; + } + if (e.$flags$ & 4) { + e.$flags$ |= 512; + return; + } + attachToAncestor(e, e.$ancestorComponent$); + var n = function n() { + return dispatchHooks(e, t); + }; + return writeTask(n); +}; +var dispatchHooks = function dispatchHooks(e, t) { + var n = createTime("scheduleUpdate", e.$cmpMeta$.$tagName$); + var r = e.$lazyInstance$; + var a; + if (t) { + { + e.$flags$ |= 256; + if (e.$queuedListeners$) { + e.$queuedListeners$.map(function (e) { + var t = e[0], + n = e[1]; + return safeCall(r, t, n); + }); + e.$queuedListeners$ = undefined; + } + } + } + n(); + return enqueue(a, function () { + return updateComponent(e, r, t); + }); +}; +var enqueue = function enqueue(e, t) { + return isPromisey(e) ? e.then(t) : t(); +}; +var isPromisey = function isPromisey(e) { + return e instanceof Promise || e && e.then && typeof e.then === "function"; +}; +var updateComponent = function updateComponent(e, t, n) { + return __awaiter(void 0, void 0, void 0, function () { + var r, a, o, s, i, l, u; + return __generator(this, function (c) { + a = e.$hostElement$; + o = createTime("update", e.$cmpMeta$.$tagName$); + s = a["s-rc"]; + if (n) { + attachStyles(e); + } + i = createTime("render", e.$cmpMeta$.$tagName$); + { + callRender(e, t); + } + if (s) { + s.map(function (e) { + return e(); + }); + a["s-rc"] = undefined; + } + i(); + o(); + { + l = (r = a["s-p"]) !== null && r !== void 0 ? r : []; + u = function u() { + return postUpdateComponent(e); + }; + if (l.length === 0) { + u(); + } else { + Promise.all(l).then(u); + e.$flags$ |= 4; + l.length = 0; + } + } + return [2]; + }); + }); +}; +var callRender = function callRender(e, t, n) { + try { + t = t.render(); + { + e.$flags$ &= ~16; + } + { + e.$flags$ |= 2; + } + { + { + { + renderVdom(e, t); + } + } + } + } catch (t) { + consoleError(t, e.$hostElement$); + } + return null; +}; +var postUpdateComponent = function postUpdateComponent(e) { + var t = e.$cmpMeta$.$tagName$; + var n = e.$hostElement$; + var r = createTime("postUpdate", t); + var a = e.$lazyInstance$; + var o = e.$ancestorComponent$; + if (!(e.$flags$ & 64)) { + e.$flags$ |= 64; + { + addHydratedFlag(n); + } + { + safeCall(a, "componentDidLoad"); + } + r(); + { + e.$onReadyResolve$(n); + if (!o) { + appDidLoad(); + } + } + } else { + r(); + } + { + e.$onInstanceResolve$(n); + } + { + if (e.$onRenderResolve$) { + e.$onRenderResolve$(); + e.$onRenderResolve$ = undefined; + } + if (e.$flags$ & 512) { + nextTick(function () { + return scheduleUpdate(e, false); + }); + } + e.$flags$ &= ~(4 | 512); + } +}; +var forceUpdate = function forceUpdate(e) { + { + var t = getHostRef(e); + var n = t.$hostElement$.isConnected; + if (n && (t.$flags$ & (2 | 16)) === 2) { + scheduleUpdate(t, false); + } + return n; + } +}; +var appDidLoad = function appDidLoad(e) { + { + addHydratedFlag(doc.documentElement); + } + nextTick(function () { + return emitEvent(win, "appload", { + detail: { + namespace: NAMESPACE + } + }); + }); +}; +var safeCall = function safeCall(e, t, n) { + if (e && e[t]) { + try { + return e[t](n); + } catch (e) { + consoleError(e); + } + } + return undefined; +}; +var addHydratedFlag = function addHydratedFlag(e) { + return e.classList.add("hydrated"); +}; +var getValue = function getValue(e, t) { + return getHostRef(e).$instanceValues$.get(t); +}; +var setValue = function setValue(e, t, n, r) { + var a = getHostRef(e); + var o = a.$instanceValues$.get(t); + var s = a.$flags$; + var i = a.$lazyInstance$; + n = parsePropertyValue(n, r.$members$[t][0]); + var l = Number.isNaN(o) && Number.isNaN(n); + var u = n !== o && !l; + if ((!(s & 8) || o === undefined) && u) { + a.$instanceValues$.set(t, n); + if (i) { + if ((s & (2 | 16)) === 2) { + scheduleUpdate(a, false); + } + } + } +}; +var proxyComponent = function proxyComponent(e, t, n) { + if (t.$members$) { + var r = Object.entries(t.$members$); + var a = e.prototype; + r.map(function (e) { + var r = e[0], + o = e[1][0]; + if (o & 31 || n & 2 && o & 32) { + Object.defineProperty(a, r, { + get: function get() { + return getValue(this, r); + }, + set: function set(e) { + setValue(this, r, e, t); + }, + configurable: true, + enumerable: true + }); + } else if (n & 1 && o & 64) { + Object.defineProperty(a, r, { + value: function value() { + var e = []; + for (var t = 0; t < arguments.length; t++) { + e[t] = arguments[t]; + } + var n = getHostRef(this); + return n.$onInstancePromise$.then(function () { + var t; + return (t = n.$lazyInstance$)[r].apply(t, e); + }); + } + }); + } + }); + if (n & 1) { + var o = new Map(); + a.attributeChangedCallback = function (e, t, n) { + var r = this; + plt.jmp(function () { + var t = o.get(e); + if (r.hasOwnProperty(t)) { + n = r[t]; + delete r[t]; + } else if (a.hasOwnProperty(t) && typeof r[t] === "number" && r[t] == n) { + return; + } + r[t] = n === null && typeof r[t] === "boolean" ? false : n; + }); + }; + e.observedAttributes = r.filter(function (e) { + var t = e[0], + n = e[1]; + return n[0] & 15; + }).map(function (e) { + var t = e[0], + n = e[1]; + var r = n[1] || t; + o.set(r, t); + return r; + }); + } + } + return e; +}; +var initializeComponent = function initializeComponent(e, t, n, r, a) { + return __awaiter(void 0, void 0, void 0, function () { + var e, r, o, s, i, l, u; + return __generator(this, function (c) { + switch (c.label) { + case 0: + if (!((t.$flags$ & 32) === 0)) return [3, 3]; + t.$flags$ |= 32; + a = loadModule(n); + if (!a.then) return [3, 2]; + e = uniqueTime(); + return [4, a]; + case 1: + a = c.sent(); + e(); + c.label = 2; + case 2: + if (!a.isProxied) { + proxyComponent(a, n, 2); + a.isProxied = true; + } + r = createTime("createInstance", n.$tagName$); + { + t.$flags$ |= 8; + } + try { + new a(t); + } catch (e) { + consoleError(e); + } + { + t.$flags$ &= ~8; + } + r(); + if (a.style) { + o = a.style; + s = getScopeId(n); + if (!styles.has(s)) { + i = createTime("registerStyles", n.$tagName$); + registerStyle(s, o, !!(n.$flags$ & 1)); + i(); + } + } + c.label = 3; + case 3: + l = t.$ancestorComponent$; + u = function u() { + return scheduleUpdate(t, true); + }; + if (l && l["s-rc"]) { + l["s-rc"].push(u); + } else { + u(); + } + return [2]; + } + }); + }); +}; +var connectedCallback = function connectedCallback(e) { + if ((plt.$flags$ & 1) === 0) { + var t = getHostRef(e); + var n = t.$cmpMeta$; + var r = createTime("connectedCallback", n.$tagName$); + if (!(t.$flags$ & 1)) { + t.$flags$ |= 1; + { + var a = e; + while (a = a.parentNode || a.host) { + if (a["s-p"]) { + attachToAncestor(t, t.$ancestorComponent$ = a); + break; + } + } + } + if (n.$members$) { + Object.entries(n.$members$).map(function (t) { + var n = t[0], + r = t[1][0]; + if (r & 31 && e.hasOwnProperty(n)) { + var a = e[n]; + delete e[n]; + e[n] = a; + } + }); + } + { + initializeComponent(e, t, n); + } + } else { + addHostEventListeners(e, t, n.$listeners$); + } + r(); + } +}; +var disconnectedCallback = function disconnectedCallback(e) { + if ((plt.$flags$ & 1) === 0) { + var t = getHostRef(e); + var n = t.$lazyInstance$; + { + if (t.$rmListeners$) { + t.$rmListeners$.map(function (e) { + return e(); + }); + t.$rmListeners$ = undefined; + } + } + { + safeCall(n, "disconnectedCallback"); + } + } +}; +var bootstrapLazy = function bootstrapLazy(e, t) { + if (t === void 0) { + t = {}; + } + var n; + var r = createTime(); + var a = []; + var o = t.exclude || []; + var s = win.customElements; + var i = doc.head; + var l = i.querySelector("meta[charset]"); + var u = doc.createElement("style"); + var c = []; + var f; + var $ = true; + Object.assign(plt, t); + plt.$resourcesUrl$ = new URL(t.resourcesUrl || "./", doc.baseURI).href; + e.map(function (e) { + e[1].map(function (t) { + var n = { + $flags$: t[0], + $tagName$: t[1], + $members$: t[2], + $listeners$: t[3] + }; + { + n.$members$ = t[2]; + } + { + n.$listeners$ = t[3]; + } + var r = n.$tagName$; + var i = function (e) { + __extends(t, e); + function t(t) { + var r = e.call(this, t) || this; + t = r; + registerHost(t, n); + if (n.$flags$ & 1) { + { + { + t.attachShadow({ + mode: "open" + }); + } + } + } + return r; + } + t.prototype.connectedCallback = function () { + var e = this; + if (f) { + clearTimeout(f); + f = null; + } + if ($) { + c.push(this); + } else { + plt.jmp(function () { + return connectedCallback(e); + }); + } + }; + t.prototype.disconnectedCallback = function () { + var e = this; + plt.jmp(function () { + return disconnectedCallback(e); + }); + }; + t.prototype.componentOnReady = function () { + return getHostRef(this).$onReadyPromise$; + }; + return t; + }(HTMLElement); + n.$lazyBundleId$ = e[0]; + if (!o.includes(r) && !s.get(r)) { + a.push(r); + s.define(r, proxyComponent(i, n, 1)); + } + }); + }); + { + u.innerHTML = a + HYDRATED_CSS; + u.setAttribute("data-styles", ""); + var d = (n = plt.$nonce$) !== null && n !== void 0 ? n : queryNonceMetaTagContent(doc); + if (d != null) { + u.setAttribute("nonce", d); + } + i.insertBefore(u, l ? l.nextSibling : i.firstChild); + } + $ = false; + if (c.length) { + c.map(function (e) { + return e.connectedCallback(); + }); + } else { + { + plt.jmp(function () { + return f = setTimeout(appDidLoad, 30); + }); + } + } + r(); +}; +var addHostEventListeners = function addHostEventListeners(e, t, n, r) { + if (n) { + n.map(function (n) { + var r = n[0], + a = n[1], + o = n[2]; + var s = getHostListenerTarget(e, r); + var i = hostListenerProxy(t, o); + var l = hostListenerOpts(r); + plt.ael(s, a, i, l); + (t.$rmListeners$ = t.$rmListeners$ || []).push(function () { + return plt.rel(s, a, i, l); + }); + }); + } +}; +var hostListenerProxy = function hostListenerProxy(e, t) { + return function (n) { + try { + { + if (e.$flags$ & 256) { + e.$lazyInstance$[t](n); + } else { + (e.$queuedListeners$ = e.$queuedListeners$ || []).push([t, n]); + } + } + } catch (e) { + consoleError(e); + } + }; +}; +var getHostListenerTarget = function getHostListenerTarget(e, t) { + if (t & 16) return doc.body; + return e; +}; +var hostListenerOpts = function hostListenerOpts(e) { + return (e & 2) !== 0; +}; +var setNonce = function setNonce(e) { + return plt.$nonce$ = e; +}; +var hostRefs = new WeakMap(); +var getHostRef = function getHostRef(e) { + return hostRefs.get(e); +}; +var registerInstance = function registerInstance(e, t) { + return hostRefs.set(t.$lazyInstance$ = e, t); +}; +var registerHost = function registerHost(e, t) { + var n = { + $flags$: 0, + $hostElement$: e, + $cmpMeta$: t, + $instanceValues$: new Map() + }; + { + n.$onInstancePromise$ = new Promise(function (e) { + return n.$onInstanceResolve$ = e; + }); + } + { + n.$onReadyPromise$ = new Promise(function (e) { + return n.$onReadyResolve$ = e; + }); + e["s-p"] = []; + e["s-rc"] = []; + } + addHostEventListeners(e, n, t.$listeners$); + return hostRefs.set(e, n); +}; +var isMemberInElement = function isMemberInElement(e, t) { + return t in e; +}; +var consoleError = function consoleError(e, t) { + return (0, console.error)(e, t); +}; +var cmpModules = new Map(); +var loadModule = function loadModule(e, t, n) { + var r = e.$tagName$.replace(/-/g, "_"); + var a = e.$lazyBundleId$; + var o = cmpModules.get(a); + if (o) { + return o[r]; + } + if (!n || !BUILD.hotModuleReplacement) { + var s = function s(e) { + cmpModules.set(a, e); + return e[r]; + }; + switch (a) { + case "pwa-action-sheet": + return import("./pwa-action-sheet.entry.js").then(s, consoleError); + case "pwa-camera-modal": + return import("./pwa-camera-modal.entry.js").then(s, consoleError); + case "pwa-toast": + return import("./pwa-toast.entry.js").then(s, consoleError); + case "pwa-camera-modal-instance": + return import("./pwa-camera-modal-instance.entry.js").then(s, consoleError); + case "pwa-camera": + return import("./pwa-camera.entry.js").then(s, consoleError); + } + } + return import("./".concat(a, ".entry.js").concat("")).then(function (e) { + { + cmpModules.set(a, e); + } + return e[r]; + }, consoleError); +}; +var styles = new Map(); +var win = typeof window !== "undefined" ? window : {}; +var doc = win.document || { + head: {} +}; +var plt = { + $flags$: 0, + $resourcesUrl$: "", + jmp: function jmp(e) { + return e(); + }, + raf: function raf(e) { + return requestAnimationFrame(e); + }, + ael: function ael(e, t, n, r) { + return e.addEventListener(t, n, r); + }, + rel: function rel(e, t, n, r) { + return e.removeEventListener(t, n, r); + }, + ce: function ce(e, t) { + return new CustomEvent(e, t); + } +}; +var promiseResolve = function promiseResolve(e) { + return Promise.resolve(e); +}; +var supportsConstructableStylesheets = function () { + try { + new CSSStyleSheet(); + return typeof new CSSStyleSheet().replaceSync === "function"; + } catch (e) {} + return false; +}(); +var queueDomReads = []; +var queueDomWrites = []; +var queueTask = function queueTask(e, t) { + return function (n) { + e.push(n); + if (!queuePending) { + queuePending = true; + if (t && plt.$flags$ & 4) { + nextTick(_flush); + } else { + plt.raf(_flush); + } + } + }; +}; +var consume = function consume(e) { + for (var t = 0; t < e.length; t++) { + try { + e[t](performance.now()); + } catch (e) { + consoleError(e); + } + } + e.length = 0; +}; +var _flush = function flush() { + consume(queueDomReads); + { + consume(queueDomWrites); + if (queuePending = queueDomReads.length > 0) { + plt.raf(_flush); + } + } +}; +var nextTick = function nextTick(e) { + return promiseResolve().then(e); +}; +var writeTask = queueTask(queueDomWrites, true); +export { Host as H, bootstrapLazy as b, createEvent as c, forceUpdate as f, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s }; \ No newline at end of file diff --git a/src/public/js/pwa-elements/esm-es5/index.js b/src/public/js/pwa-elements/esm-es5/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/public/js/pwa-elements/esm-es5/ionicpwaelements.js b/src/public/js/pwa-elements/esm-es5/ionicpwaelements.js new file mode 100644 index 0000000000000000000000000000000000000000..e802f6431cf5af31fdb6e2a3e78847b7b6cd8712 --- /dev/null +++ b/src/public/js/pwa-elements/esm-es5/ionicpwaelements.js @@ -0,0 +1,46 @@ +import { p as promiseResolve, b as bootstrapLazy } from "./index-1c5c47b4.js"; +export { s as setNonce } from "./index-1c5c47b4.js"; +var patchBrowser = function patchBrowser() { + var e = import.meta.url; + var a = {}; + if (e !== "") { + a.resourcesUrl = new URL(".", e).href; + } + return promiseResolve(a); +}; +patchBrowser().then(function (e) { + return bootstrapLazy([["pwa-camera-modal", [[1, "pwa-camera-modal", { + facingMode: [1, "facing-mode"], + hidePicker: [4, "hide-picker"], + present: [64], + dismiss: [64] + }]]], ["pwa-action-sheet", [[1, "pwa-action-sheet", { + header: [1], + cancelable: [4], + options: [16], + open: [32] + }]]], ["pwa-toast", [[1, "pwa-toast", { + message: [1], + duration: [2], + closing: [32] + }]]], ["pwa-camera", [[1, "pwa-camera", { + facingMode: [1, "facing-mode"], + handlePhoto: [16], + hidePicker: [4, "hide-picker"], + handleNoDeviceError: [16], + noDevicesText: [1, "no-devices-text"], + noDevicesButtonText: [1, "no-devices-button-text"], + photo: [32], + photoSrc: [32], + showShutterOverlay: [32], + flashIndex: [32], + hasCamera: [32], + rotation: [32], + deviceError: [32] + }]]], ["pwa-camera-modal-instance", [[1, "pwa-camera-modal-instance", { + facingMode: [1, "facing-mode"], + hidePicker: [4, "hide-picker"], + noDevicesText: [1, "no-devices-text"], + noDevicesButtonText: [1, "no-devices-button-text"] + }, [[16, "keyup", "handleBackdropKeyUp"]]]]]], e); +}); \ No newline at end of file diff --git a/src/public/js/pwa-elements/esm-es5/loader.js b/src/public/js/pwa-elements/esm-es5/loader.js new file mode 100644 index 0000000000000000000000000000000000000000..c2c66de1b63d6753e4870c79650fef426abac459 --- /dev/null +++ b/src/public/js/pwa-elements/esm-es5/loader.js @@ -0,0 +1,45 @@ +import { p as promiseResolve, b as bootstrapLazy } from "./index-1c5c47b4.js"; +export { s as setNonce } from "./index-1c5c47b4.js"; +var patchEsm = function patchEsm() { + return promiseResolve(); +}; +var defineCustomElements = function defineCustomElements(e, o) { + if (typeof window === "undefined") return Promise.resolve(); + return patchEsm().then(function () { + return bootstrapLazy([["pwa-camera-modal", [[1, "pwa-camera-modal", { + facingMode: [1, "facing-mode"], + hidePicker: [4, "hide-picker"], + present: [64], + dismiss: [64] + }]]], ["pwa-action-sheet", [[1, "pwa-action-sheet", { + header: [1], + cancelable: [4], + options: [16], + open: [32] + }]]], ["pwa-toast", [[1, "pwa-toast", { + message: [1], + duration: [2], + closing: [32] + }]]], ["pwa-camera", [[1, "pwa-camera", { + facingMode: [1, "facing-mode"], + handlePhoto: [16], + hidePicker: [4, "hide-picker"], + handleNoDeviceError: [16], + noDevicesText: [1, "no-devices-text"], + noDevicesButtonText: [1, "no-devices-button-text"], + photo: [32], + photoSrc: [32], + showShutterOverlay: [32], + flashIndex: [32], + hasCamera: [32], + rotation: [32], + deviceError: [32] + }]]], ["pwa-camera-modal-instance", [[1, "pwa-camera-modal-instance", { + facingMode: [1, "facing-mode"], + hidePicker: [4, "hide-picker"], + noDevicesText: [1, "no-devices-text"], + noDevicesButtonText: [1, "no-devices-button-text"] + }, [[16, "keyup", "handleBackdropKeyUp"]]]]]], o); + }); +}; +export { defineCustomElements }; \ No newline at end of file diff --git a/src/public/js/pwa-elements/esm-es5/pwa-action-sheet.entry.js b/src/public/js/pwa-elements/esm-es5/pwa-action-sheet.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..4e0ecac6369ad977e95b59d8c64956c3ba260b57 --- /dev/null +++ b/src/public/js/pwa-elements/esm-es5/pwa-action-sheet.entry.js @@ -0,0 +1,67 @@ +import { r as registerInstance, c as createEvent, h, g as getElement } from "./index-1c5c47b4.js"; +var actionSheetCss = ':host{z-index:1000;position:fixed;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex;contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:-apple-system, BlinkMacSystemFont, "Helvetica Neue", "Roboto", sans-serif}.wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:rgba(0, 0, 0, 0);-webkit-transition:400ms background-color cubic-bezier(.36,.66,.04,1);transition:400ms background-color cubic-bezier(.36,.66,.04,1)}.wrapper.open{background-color:rgba(0, 0, 0, 0.32)}.title{color:#999;height:23px;line-height:23px;padding-bottom:17px;-webkit-padding-end:16px;padding-inline-end:16px;-webkit-padding-start:16px;padding-inline-start:16px;padding-left:16px;padding-right:16px;padding-top:20px}.content{width:568px;-ms-flex-item-align:end;align-self:flex-end;background-color:#fff;-webkit-transition:400ms -webkit-transform cubic-bezier(.36,.66,.04,1);transition:400ms -webkit-transform cubic-bezier(.36,.66,.04,1);transition:400ms transform cubic-bezier(.36,.66,.04,1);transition:400ms transform cubic-bezier(.36,.66,.04,1), 400ms -webkit-transform cubic-bezier(.36,.66,.04,1);-webkit-transform:translateY(100%);transform:translateY(100%)}.wrapper.open .content{-webkit-transform:translateY(0%);transform:translateY(0%)}@media only screen and (max-width: 568px){.content{width:100%}}.action-sheet-option{cursor:pointer;height:52px;line-height:52px}.action-sheet-button{color:rgb(38, 38, 38);font-size:16px;-webkit-padding-end:16px;padding-inline-end:16px;-webkit-padding-start:16px;padding-inline-start:16px;padding-left:16px;padding-right:16px;padding-top:0px}.action-sheet-button:hover{background-color:#F6F6F6}'; +var PWAActionSheet = function () { + function e(e) { + registerInstance(this, e); + this.onSelection = createEvent(this, "onSelection", 7); + this.header = undefined; + this.cancelable = true; + this.options = []; + this.open = false; + } + e.prototype.componentDidLoad = function () { + var e = this; + requestAnimationFrame(function () { + e.open = true; + }); + }; + e.prototype.dismiss = function () { + if (this.cancelable) { + this.close(); + } + }; + e.prototype.close = function () { + var e = this; + this.open = false; + setTimeout(function () { + e.el.parentNode.removeChild(e.el); + }, 500); + }; + e.prototype.handleOptionClick = function (e, t) { + e.stopPropagation(); + this.onSelection.emit(t); + this.close(); + }; + e.prototype.render = function () { + var e = this; + return h("div", { + class: "wrapper".concat(this.open ? " open" : ""), + onClick: function onClick() { + return e.dismiss(); + } + }, h("div", { + class: "content" + }, h("div", { + class: "title" + }, this.header), this.options.map(function (t, n) { + return h("div", { + class: "action-sheet-option", + onClick: function onClick(t) { + return e.handleOptionClick(t, n); + } + }, h("div", { + class: "action-sheet-button" + }, t.title)); + }))); + }; + Object.defineProperty(e.prototype, "el", { + get: function get() { + return getElement(this); + }, + enumerable: false, + configurable: true + }); + return e; +}(); +PWAActionSheet.style = actionSheetCss; +export { PWAActionSheet as pwa_action_sheet }; \ No newline at end of file diff --git a/src/public/js/pwa-elements/esm-es5/pwa-camera-modal-instance.entry.js b/src/public/js/pwa-elements/esm-es5/pwa-camera-modal-instance.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..8d667ff7fa50ea91074313e87bcd0859fac6f8ef --- /dev/null +++ b/src/public/js/pwa-elements/esm-es5/pwa-camera-modal-instance.entry.js @@ -0,0 +1,189 @@ +var __awaiter = this && this.__awaiter || function (e, t, n, o) { + function r(e) { + return e instanceof n ? e : new n(function (t) { + t(e); + }); + } + return new (n || (n = Promise))(function (n, i) { + function a(e) { + try { + s(o.next(e)); + } catch (e) { + i(e); + } + } + function c(e) { + try { + s(o["throw"](e)); + } catch (e) { + i(e); + } + } + function s(e) { + e.done ? n(e.value) : r(e.value).then(a, c); + } + s((o = o.apply(e, t || [])).next()); + }); +}; +var __generator = this && this.__generator || function (e, t) { + var n = { + label: 0, + sent: function sent() { + if (i[0] & 1) throw i[1]; + return i[1]; + }, + trys: [], + ops: [] + }, + o, + r, + i, + a; + return a = { + next: c(0), + throw: c(1), + return: c(2) + }, typeof Symbol === "function" && (a[Symbol.iterator] = function () { + return this; + }), a; + function c(e) { + return function (t) { + return s([e, t]); + }; + } + function s(c) { + if (o) throw new TypeError("Generator is already executing."); + while (a && (a = 0, c[0] && (n = 0)), n) try { + if (o = 1, r && (i = c[0] & 2 ? r["return"] : c[0] ? r["throw"] || ((i = r["return"]) && i.call(r), 0) : r.next) && !(i = i.call(r, c[1])).done) return i; + if (r = 0, i) c = [c[0] & 2, i.value]; + switch (c[0]) { + case 0: + case 1: + i = c; + break; + case 4: + n.label++; + return { + value: c[1], + done: false + }; + case 5: + n.label++; + r = c[1]; + c = [0]; + continue; + case 7: + c = n.ops.pop(); + n.trys.pop(); + continue; + default: + if (!(i = n.trys, i = i.length > 0 && i[i.length - 1]) && (c[0] === 6 || c[0] === 2)) { + n = 0; + continue; + } + if (c[0] === 3 && (!i || c[1] > i[0] && c[1] < i[3])) { + n.label = c[1]; + break; + } + if (c[0] === 6 && n.label < i[1]) { + n.label = i[1]; + i = c; + break; + } + if (i && n.label < i[2]) { + n.label = i[2]; + n.ops.push(c); + break; + } + if (i[2]) n.ops.pop(); + n.trys.pop(); + continue; + } + c = t.call(e, n); + } catch (e) { + c = [6, e]; + r = 0; + } finally { + o = i = 0; + } + if (c[0] & 5) throw c[1]; + return { + value: c[0] ? c[1] : void 0, + done: true + }; + } +}; +import { r as registerInstance, c as createEvent, h, g as getElement } from "./index-1c5c47b4.js"; +var cameraModalInstanceCss = ":host{z-index:1000;position:fixed;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex;contain:strict;--inset-width:600px;--inset-height:600px}.wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:rgba(0, 0, 0, 0.15)}.content{-webkit-box-shadow:0px 0px 5px rgba(0, 0, 0, 0.2);box-shadow:0px 0px 5px rgba(0, 0, 0, 0.2);width:var(--inset-width);height:var(--inset-height);max-height:100%}@media only screen and (max-width: 600px){.content{width:100%;height:100%}}"; +var PWACameraModal = function () { + function e(e) { + var t = this; + registerInstance(this, e); + this.onPhoto = createEvent(this, "onPhoto", 7); + this.noDeviceError = createEvent(this, "noDeviceError", 7); + this.handlePhoto = function (e) { + return __awaiter(t, void 0, void 0, function () { + return __generator(this, function (t) { + this.onPhoto.emit(e); + return [2]; + }); + }); + }; + this.handleNoDeviceError = function (e) { + return __awaiter(t, void 0, void 0, function () { + return __generator(this, function (t) { + this.noDeviceError.emit(e); + return [2]; + }); + }); + }; + this.facingMode = "user"; + this.hidePicker = false; + this.noDevicesText = "No camera found"; + this.noDevicesButtonText = "Choose image"; + } + e.prototype.handleBackdropClick = function (e) { + if (e.target !== this.el) { + this.onPhoto.emit(null); + } + }; + e.prototype.handleComponentClick = function (e) { + e.stopPropagation(); + }; + e.prototype.handleBackdropKeyUp = function (e) { + if (e.key === "Escape") { + this.onPhoto.emit(null); + } + }; + e.prototype.render = function () { + var e = this; + return h("div", { + class: "wrapper", + onClick: function onClick(t) { + return e.handleBackdropClick(t); + } + }, h("div", { + class: "content" + }, h("pwa-camera", { + onClick: function onClick(t) { + return e.handleComponentClick(t); + }, + facingMode: this.facingMode, + hidePicker: this.hidePicker, + handlePhoto: this.handlePhoto, + handleNoDeviceError: this.handleNoDeviceError, + noDevicesButtonText: this.noDevicesButtonText, + noDevicesText: this.noDevicesText + }))); + }; + Object.defineProperty(e.prototype, "el", { + get: function get() { + return getElement(this); + }, + enumerable: false, + configurable: true + }); + return e; +}(); +PWACameraModal.style = cameraModalInstanceCss; +export { PWACameraModal as pwa_camera_modal_instance }; \ No newline at end of file diff --git a/src/public/js/pwa-elements/esm-es5/pwa-camera-modal.entry.js b/src/public/js/pwa-elements/esm-es5/pwa-camera-modal.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..0878a62c76232f44da6586c6b1377962a8e7bc17 --- /dev/null +++ b/src/public/js/pwa-elements/esm-es5/pwa-camera-modal.entry.js @@ -0,0 +1,179 @@ +var __awaiter = this && this.__awaiter || function (e, t, n, r) { + function i(e) { + return e instanceof n ? e : new n(function (t) { + t(e); + }); + } + return new (n || (n = Promise))(function (n, o) { + function a(e) { + try { + c(r.next(e)); + } catch (e) { + o(e); + } + } + function s(e) { + try { + c(r["throw"](e)); + } catch (e) { + o(e); + } + } + function c(e) { + e.done ? n(e.value) : i(e.value).then(a, s); + } + c((r = r.apply(e, t || [])).next()); + }); +}; +var __generator = this && this.__generator || function (e, t) { + var n = { + label: 0, + sent: function sent() { + if (o[0] & 1) throw o[1]; + return o[1]; + }, + trys: [], + ops: [] + }, + r, + i, + o, + a; + return a = { + next: s(0), + throw: s(1), + return: s(2) + }, typeof Symbol === "function" && (a[Symbol.iterator] = function () { + return this; + }), a; + function s(e) { + return function (t) { + return c([e, t]); + }; + } + function c(s) { + if (r) throw new TypeError("Generator is already executing."); + while (a && (a = 0, s[0] && (n = 0)), n) try { + if (r = 1, i && (o = s[0] & 2 ? i["return"] : s[0] ? i["throw"] || ((o = i["return"]) && o.call(i), 0) : i.next) && !(o = o.call(i, s[1])).done) return o; + if (i = 0, o) s = [s[0] & 2, o.value]; + switch (s[0]) { + case 0: + case 1: + o = s; + break; + case 4: + n.label++; + return { + value: s[1], + done: false + }; + case 5: + n.label++; + i = s[1]; + s = [0]; + continue; + case 7: + s = n.ops.pop(); + n.trys.pop(); + continue; + default: + if (!(o = n.trys, o = o.length > 0 && o[o.length - 1]) && (s[0] === 6 || s[0] === 2)) { + n = 0; + continue; + } + if (s[0] === 3 && (!o || s[1] > o[0] && s[1] < o[3])) { + n.label = s[1]; + break; + } + if (s[0] === 6 && n.label < o[1]) { + n.label = o[1]; + o = s; + break; + } + if (o && n.label < o[2]) { + n.label = o[2]; + n.ops.push(s); + break; + } + if (o[2]) n.ops.pop(); + n.trys.pop(); + continue; + } + s = t.call(e, n); + } catch (e) { + s = [6, e]; + i = 0; + } finally { + r = o = 0; + } + if (s[0] & 5) throw s[1]; + return { + value: s[0] ? s[1] : void 0, + done: true + }; + } +}; +import { r as registerInstance, c as createEvent, h } from "./index-1c5c47b4.js"; +var cameraModalCss = ":host{z-index:1000;position:fixed;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex;contain:strict}.wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:rgba(0, 0, 0, 0.15)}.content{-webkit-box-shadow:0px 0px 5px rgba(0, 0, 0, 0.2);box-shadow:0px 0px 5px rgba(0, 0, 0, 0.2);width:600px;height:600px}"; +var PWACameraModal = function () { + function e(e) { + registerInstance(this, e); + this.onPhoto = createEvent(this, "onPhoto", 7); + this.noDeviceError = createEvent(this, "noDeviceError", 7); + this.facingMode = "user"; + this.hidePicker = false; + } + e.prototype.present = function () { + return __awaiter(this, void 0, void 0, function () { + var e; + var t = this; + return __generator(this, function (n) { + e = document.createElement("pwa-camera-modal-instance"); + e.facingMode = this.facingMode; + e.hidePicker = this.hidePicker; + e.addEventListener("onPhoto", function (e) { + return __awaiter(t, void 0, void 0, function () { + var t; + return __generator(this, function (n) { + if (!this._modal) { + return [2]; + } + t = e.detail; + this.onPhoto.emit(t); + return [2]; + }); + }); + }); + e.addEventListener("noDeviceError", function (e) { + return __awaiter(t, void 0, void 0, function () { + return __generator(this, function (t) { + this.noDeviceError.emit(e); + return [2]; + }); + }); + }); + document.body.append(e); + this._modal = e; + return [2]; + }); + }); + }; + e.prototype.dismiss = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (e) { + if (!this._modal) { + return [2]; + } + this._modal && this._modal.parentNode.removeChild(this._modal); + this._modal = null; + return [2]; + }); + }); + }; + e.prototype.render = function () { + return h("div", null); + }; + return e; +}(); +PWACameraModal.style = cameraModalCss; +export { PWACameraModal as pwa_camera_modal }; \ No newline at end of file diff --git a/src/public/js/pwa-elements/esm-es5/pwa-camera.entry.js b/src/public/js/pwa-elements/esm-es5/pwa-camera.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..78afc195667dd644f60d62353c5d4f18b8f70410 --- /dev/null +++ b/src/public/js/pwa-elements/esm-es5/pwa-camera.entry.js @@ -0,0 +1,780 @@ +var __awaiter = this && this.__awaiter || function (e, t, i, n) { + function r(e) { + return e instanceof i ? e : new i(function (t) { + t(e); + }); + } + return new (i || (i = Promise))(function (i, a) { + function o(e) { + try { + c(n.next(e)); + } catch (e) { + a(e); + } + } + function s(e) { + try { + c(n["throw"](e)); + } catch (e) { + a(e); + } + } + function c(e) { + e.done ? i(e.value) : r(e.value).then(o, s); + } + c((n = n.apply(e, t || [])).next()); + }); +}; +var __generator = this && this.__generator || function (e, t) { + var i = { + label: 0, + sent: function sent() { + if (a[0] & 1) throw a[1]; + return a[1]; + }, + trys: [], + ops: [] + }, + n, + r, + a, + o; + return o = { + next: s(0), + throw: s(1), + return: s(2) + }, typeof Symbol === "function" && (o[Symbol.iterator] = function () { + return this; + }), o; + function s(e) { + return function (t) { + return c([e, t]); + }; + } + function c(s) { + if (n) throw new TypeError("Generator is already executing."); + while (o && (o = 0, s[0] && (i = 0)), i) try { + if (n = 1, r && (a = s[0] & 2 ? r["return"] : s[0] ? r["throw"] || ((a = r["return"]) && a.call(r), 0) : r.next) && !(a = a.call(r, s[1])).done) return a; + if (r = 0, a) s = [s[0] & 2, a.value]; + switch (s[0]) { + case 0: + case 1: + a = s; + break; + case 4: + i.label++; + return { + value: s[1], + done: false + }; + case 5: + i.label++; + r = s[1]; + s = [0]; + continue; + case 7: + s = i.ops.pop(); + i.trys.pop(); + continue; + default: + if (!(a = i.trys, a = a.length > 0 && a[a.length - 1]) && (s[0] === 6 || s[0] === 2)) { + i = 0; + continue; + } + if (s[0] === 3 && (!a || s[1] > a[0] && s[1] < a[3])) { + i.label = s[1]; + break; + } + if (s[0] === 6 && i.label < a[1]) { + i.label = a[1]; + a = s; + break; + } + if (a && i.label < a[2]) { + i.label = a[2]; + i.ops.push(s); + break; + } + if (a[2]) i.ops.pop(); + i.trys.pop(); + continue; + } + s = t.call(e, i); + } catch (e) { + s = [6, e]; + r = 0; + } finally { + n = a = 0; + } + if (s[0] & 5) throw s[1]; + return { + value: s[0] ? s[1] : void 0, + done: true + }; + } +}; +import { r as registerInstance, f as forceUpdate, h, g as getElement } from "./index-1c5c47b4.js"; +/** + * MediaStream ImageCapture polyfill + * + * @license + * Copyright 2018 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +var ImageCapture = window.ImageCapture; +if (typeof ImageCapture === "undefined") { + ImageCapture = function () { + function e(e) { + var t = this; + if (e.kind !== "video") throw new DOMException("NotSupportedError"); + this._videoStreamTrack = e; + if (!("readyState" in this._videoStreamTrack)) { + this._videoStreamTrack.readyState = "live"; + } + this._previewStream = new MediaStream([e]); + this.videoElement = document.createElement("video"); + this.videoElementPlaying = new Promise(function (e) { + t.videoElement.addEventListener("playing", e); + }); + if (HTMLMediaElement) { + this.videoElement.srcObject = this._previewStream; + } else { + this.videoElement.src = URL.createObjectURL(this._previewStream); + } + this.videoElement.muted = true; + this.videoElement.setAttribute("playsinline", ""); + this.videoElement.play(); + this.canvasElement = document.createElement("canvas"); + this.canvas2dContext = this.canvasElement.getContext("2d"); + } + Object.defineProperty(e.prototype, "videoStreamTrack", { + get: function get() { + return this._videoStreamTrack; + }, + enumerable: false, + configurable: true + }); + e.prototype.getPhotoCapabilities = function () { + return new Promise(function e(t, i) { + var n = { + current: 0, + min: 0, + max: 0 + }; + t({ + exposureCompensation: n, + exposureMode: "none", + fillLightMode: ["none"], + focusMode: "none", + imageHeight: n, + imageWidth: n, + iso: n, + redEyeReduction: false, + whiteBalanceMode: "none", + zoom: n + }); + i(new DOMException("OperationError")); + }); + }; + e.prototype.setOptions = function (e) { + if (e === void 0) { + e = {}; + } + return new Promise(function e(t, i) {}); + }; + e.prototype.takePhoto = function () { + var e = this; + return new Promise(function t(i, n) { + if (e._videoStreamTrack.readyState !== "live") { + return n(new DOMException("InvalidStateError")); + } + e.videoElementPlaying.then(function () { + try { + e.canvasElement.width = e.videoElement.videoWidth; + e.canvasElement.height = e.videoElement.videoHeight; + e.canvas2dContext.drawImage(e.videoElement, 0, 0); + e.canvasElement.toBlob(i); + } catch (e) { + n(new DOMException("UnknownError")); + } + }); + }); + }; + e.prototype.grabFrame = function () { + var e = this; + return new Promise(function t(i, n) { + if (e._videoStreamTrack.readyState !== "live") { + return n(new DOMException("InvalidStateError")); + } + e.videoElementPlaying.then(function () { + try { + e.canvasElement.width = e.videoElement.videoWidth; + e.canvasElement.height = e.videoElement.videoHeight; + e.canvas2dContext.drawImage(e.videoElement, 0, 0); + i(window.createImageBitmap(e.canvasElement)); + } catch (e) { + n(new DOMException("UnknownError")); + } + }); + }); + }; + return e; + }(); +} +window.ImageCapture = ImageCapture; +var cameraCss = ":host{--header-height:4em;--footer-height:9em;--header-height-landscape:3em;--footer-height-landscape:6em;--shutter-size:6em;--icon-size-header:1.5em;--icon-size-footer:2.5em;--margin-size-header:1.5em;--margin-size-footer:2.0em;font-family:-apple-system, BlinkMacSystemFont,\n “Segoe UIâ€, “Robotoâ€, “Droid Sansâ€, “Helvetica Neueâ€, sans-serif;display:block;width:100%;height:100%}.items{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;width:100%;height:100%;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.items .item{-ms-flex:1;flex:1;text-align:center}.items .item:first-child{text-align:left}.items .item:last-child{text-align:right}.camera-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100%;height:100%}.camera-header{color:white;background-color:black;height:var(--header-height)}.camera-header .items{padding:var(--margin-size-header)}.camera-footer{position:relative;color:white;background-color:black;height:var(--footer-height)}.camera-footer .items{padding:var(--margin-size-footer)}@media (max-height: 375px){.camera-header{--header-height:var(--header-height-landscape)}.camera-footer{--footer-height:var(--footer-height-landscape)}.camera-footer .shutter{--shutter-size:4em}}.camera-video{position:relative;-ms-flex:1;flex:1;overflow:hidden;background-color:black}video{width:100%;height:100%;max-height:100%;min-height:100%;-o-object-fit:cover;object-fit:cover;background-color:black}.pick-image{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;left:var(--margin-size-footer);top:0;height:100%;width:var(--icon-size-footer);color:white}.pick-image input{visibility:hidden}.pick-image svg{cursor:pointer;fill:white;width:var(--icon-size-footer);height:var(--icon-size-footer)}.shutter{position:absolute;left:50%;top:50%;width:var(--shutter-size);height:var(--shutter-size);margin-top:calc(var(--shutter-size) / -2);margin-left:calc(var(--shutter-size) / -2);border-radius:100%;background-color:#c6cdd8;padding:12px;-webkit-box-sizing:border-box;box-sizing:border-box}.shutter:active .shutter-button{background-color:#9da9bb}.shutter-button{background-color:white;border-radius:100%;width:100%;height:100%}.rotate{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;right:var(--margin-size-footer);top:0;height:100%;width:var(--icon-size-footer);color:white}.rotate img{width:var(--icon-size-footer);height:var(--icon-size-footer)}.shutter-overlay{z-index:5;position:absolute;width:100%;height:100%;background-color:black}.error{width:100%;height:100%;color:white;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.no-device{background-color:black;-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:white}.no-device label{cursor:pointer;background:#fff;border-radius:6px;padding:6px 8px;color:black}.no-device input{visibility:hidden;height:0;margin-top:16px}.accept{background-color:black;-ms-flex:1;flex:1;overflow:hidden}.accept .accept-image{width:100%;height:100%;max-height:100%;background-position:center center;background-size:cover;background-repeat:no-repeat}.close img{cursor:pointer;width:var(--icon-size-header);height:var(--icon-size-header)}.flash img{width:var(--icon-size-header);height:var(--icon-size-header)}.accept-use img{width:var(--icon-size-footer);height:var(--icon-size-footer)}.accept-cancel img{width:var(--icon-size-footer);height:var(--icon-size-footer)}.offscreen-image-render{top:0;left:0;visibility:hidden;pointer-events:none;width:100%;height:100%}"; +var CameraPWA = function () { + function e(e) { + var t = this; + registerInstance(this, e); + this.hasMultipleCameras = false; + this.hasFlash = false; + this.flashModes = []; + this.flashMode = "off"; + this.handlePickFile = function (e) {}; + this.handleShutterClick = function (e) { + console.debug("shutter click"); + t.capture(); + }; + this.handleRotateClick = function (e) { + t.rotate(); + }; + this.handleClose = function (e) { + t.handlePhoto && t.handlePhoto(null); + }; + this.handleFlashClick = function (e) { + t.cycleFlash(); + }; + this.handleCancelPhoto = function (e) { + var i = t.stream && t.stream.getTracks()[0]; + var n = i && i.getConstraints(); + t.photo = null; + t.photoSrc = null; + if (n) { + t.initCamera({ + video: { + facingMode: n.facingMode + } + }); + } else { + t.initCamera(); + } + }; + this.handleAcceptPhoto = function (e) { + t.handlePhoto && t.handlePhoto(t.photo); + }; + this.handleFileInputChange = function (e) { + return __awaiter(t, void 0, void 0, function () { + var t, i, n, r; + return __generator(this, function (a) { + switch (a.label) { + case 0: + t = e.target; + i = t.files[0]; + a.label = 1; + case 1: + a.trys.push([1, 3,, 4]); + return [4, this.getOrientation(i)]; + case 2: + n = a.sent(); + console.debug("Got orientation", n); + this.photoOrientation = n; + return [3, 4]; + case 3: + r = a.sent(); + return [3, 4]; + case 4: + this.handlePhoto && this.handlePhoto(i); + return [2]; + } + }); + }); + }; + this.handleVideoMetadata = function (e) { + console.debug("Video metadata", e); + }; + this.facingMode = "user"; + this.handlePhoto = undefined; + this.hidePicker = false; + this.handleNoDeviceError = undefined; + this.noDevicesText = "No camera found"; + this.noDevicesButtonText = "Choose image"; + this.photo = undefined; + this.photoSrc = undefined; + this.showShutterOverlay = false; + this.flashIndex = 0; + this.hasCamera = null; + this.rotation = 0; + this.deviceError = null; + } + e.prototype.componentDidLoad = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (e) { + switch (e.label) { + case 0: + this.defaultConstraints = { + video: { + facingMode: this.facingMode + } + }; + return [4, this.queryDevices()]; + case 1: + e.sent(); + return [4, this.initCamera()]; + case 2: + e.sent(); + return [2]; + } + }); + }); + }; + e.prototype.disconnectedCallback = function () { + this.stopStream(); + this.photoSrc && URL.revokeObjectURL(this.photoSrc); + }; + e.prototype.hasImageCapture = function () { + return "ImageCapture" in window; + }; + e.prototype.queryDevices = function () { + return __awaiter(this, void 0, void 0, function () { + var e, t, i; + return __generator(this, function (n) { + switch (n.label) { + case 0: + n.trys.push([0, 2,, 3]); + return [4, navigator.mediaDevices.enumerateDevices()]; + case 1: + e = n.sent(); + t = e.filter(function (e) { + return e.kind == "videoinput"; + }); + this.hasCamera = !!t.length; + this.hasMultipleCameras = t.length > 1; + return [3, 3]; + case 2: + i = n.sent(); + this.deviceError = i; + return [3, 3]; + case 3: + return [2]; + } + }); + }); + }; + e.prototype.initCamera = function (e) { + return __awaiter(this, void 0, void 0, function () { + var t, i; + return __generator(this, function (n) { + switch (n.label) { + case 0: + if (!e) { + e = this.defaultConstraints; + } + n.label = 1; + case 1: + n.trys.push([1, 3,, 4]); + return [4, navigator.mediaDevices.getUserMedia(Object.assign({ + video: true, + audio: false + }, e))]; + case 2: + t = n.sent(); + this.initStream(t); + return [3, 4]; + case 3: + i = n.sent(); + this.deviceError = i; + this.handleNoDeviceError && this.handleNoDeviceError(i); + return [3, 4]; + case 4: + return [2]; + } + }); + }); + }; + e.prototype.initStream = function (e) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (t) { + switch (t.label) { + case 0: + this.stream = e; + this.videoElement.srcObject = e; + if (!this.hasImageCapture()) return [3, 2]; + this.imageCapture = new window.ImageCapture(e.getVideoTracks()[0]); + return [4, this.initPhotoCapabilities(this.imageCapture)]; + case 1: + t.sent(); + return [3, 3]; + case 2: + this.deviceError = "No image capture"; + this.handleNoDeviceError && this.handleNoDeviceError(); + t.label = 3; + case 3: + forceUpdate(this.el); + return [2]; + } + }); + }); + }; + e.prototype.initPhotoCapabilities = function (e) { + return __awaiter(this, void 0, void 0, function () { + var t; + return __generator(this, function (i) { + switch (i.label) { + case 0: + return [4, e.getPhotoCapabilities()]; + case 1: + t = i.sent(); + if (t.fillLightMode && t.fillLightMode.length > 1) { + this.flashModes = t.fillLightMode.map(function (e) { + return e; + }); + if (this.flashMode) { + this.flashMode = this.flashModes[this.flashModes.indexOf(this.flashMode)] || "off"; + this.flashIndex = this.flashModes.indexOf(this.flashMode) || 0; + } else { + this.flashIndex = 0; + } + } + return [2]; + } + }); + }); + }; + e.prototype.stopStream = function () { + if (this.videoElement) { + this.videoElement.srcObject = null; + } + this.stream && this.stream.getTracks().forEach(function (e) { + return e.stop(); + }); + }; + e.prototype.capture = function () { + return __awaiter(this, void 0, void 0, function () { + var e, t; + return __generator(this, function (i) { + switch (i.label) { + case 0: + if (!this.hasImageCapture()) return [3, 5]; + i.label = 1; + case 1: + i.trys.push([1, 4,, 5]); + return [4, this.imageCapture.takePhoto({ + fillLightMode: this.flashModes.length > 1 ? this.flashMode : undefined + })]; + case 2: + e = i.sent(); + return [4, this.flashScreen()]; + case 3: + i.sent(); + this.promptAccept(e); + return [3, 5]; + case 4: + t = i.sent(); + console.error("Unable to take photo!", t); + return [3, 5]; + case 5: + this.stopStream(); + return [2]; + } + }); + }); + }; + e.prototype.promptAccept = function (e) { + return __awaiter(this, void 0, void 0, function () { + var t; + return __generator(this, function (i) { + switch (i.label) { + case 0: + this.photo = e; + return [4, this.getOrientation(e)]; + case 1: + t = i.sent(); + console.debug("Got orientation", t); + this.photoOrientation = t; + if (t) { + switch (t) { + case 1: + case 2: + this.rotation = 0; + break; + case 3: + case 4: + this.rotation = 180; + break; + case 5: + case 6: + this.rotation = 90; + break; + case 7: + case 8: + this.rotation = 270; + break; + } + } + this.photoSrc = URL.createObjectURL(e); + return [2]; + } + }); + }); + }; + e.prototype.getOrientation = function (e) { + return new Promise(function (t) { + var i = new FileReader(); + i.onload = function (e) { + var i = new DataView(e.target.result); + if (i.getUint16(0, false) !== 65496) { + return t(-2); + } + var n = i.byteLength; + var r = 2; + while (r < n) { + var a = i.getUint16(r, false); + r += 2; + if (a === 65505) { + if (i.getUint32(r += 2, false) !== 1165519206) { + return t(-1); + } + var o = i.getUint16(r += 6, false) === 18761; + r += i.getUint32(r + 4, o); + var s = i.getUint16(r, o); + r += 2; + for (var c = 0; c < s; c++) { + if (i.getUint16(r + c * 12, o) === 274) { + return t(i.getUint16(r + c * 12 + 8, o)); + } + } + } else if ((a & 65280) !== 65280) { + break; + } else { + r += i.getUint16(r, false); + } + } + return t(-1); + }; + i.readAsArrayBuffer(e.slice(0, 64 * 1024)); + }); + }; + e.prototype.rotate = function () { + this.stopStream(); + var e = this.stream && this.stream.getTracks()[0]; + if (!e) { + return; + } + var t = e.getConstraints(); + var i = t.facingMode; + if (!i) { + var n = e.getCapabilities(); + if (n.facingMode) { + i = n.facingMode[0]; + } + } + if (i === "environment") { + this.initCamera({ + video: { + facingMode: "user" + } + }); + } else { + this.initCamera({ + video: { + facingMode: "environment" + } + }); + } + }; + e.prototype.setFlashMode = function (e) { + console.debug("New flash mode: ", e); + this.flashMode = e; + }; + e.prototype.cycleFlash = function () { + if (this.flashModes.length > 0) { + this.flashIndex = (this.flashIndex + 1) % this.flashModes.length; + this.setFlashMode(this.flashModes[this.flashIndex]); + } + }; + e.prototype.flashScreen = function () { + return __awaiter(this, void 0, void 0, function () { + var e = this; + return __generator(this, function (t) { + return [2, new Promise(function (t, i) { + e.showShutterOverlay = true; + setTimeout(function () { + e.showShutterOverlay = false; + t(); + }, 100); + })]; + }); + }); + }; + e.prototype.iconExit = function () { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Cg id='Icon_5_'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M402.2,134L378,109.8c-1.6-1.6-4.1-1.6-5.7,0L258.8,223.4c-1.6,1.6-4.1,1.6-5.7,0L139.6,109.8 c-1.6-1.6-4.1-1.6-5.7,0L109.8,134c-1.6,1.6-1.6,4.1,0,5.7l113.5,113.5c1.6,1.6,1.6,4.1,0,5.7L109.8,372.4c-1.6,1.6-1.6,4.1,0,5.7 l24.1,24.1c1.6,1.6,4.1,1.6,5.7,0l113.5-113.5c1.6-1.6,4.1-1.6,5.7,0l113.5,113.5c1.6,1.6,4.1,1.6,5.7,0l24.1-24.1 c1.6-1.6,1.6-4.1,0-5.7L288.6,258.8c-1.6-1.6-1.6-4.1,0-5.7l113.5-113.5C403.7,138.1,403.7,135.5,402.2,134z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"; + }; + e.prototype.iconPhotos = function () { + return h("svg", { + xmlns: "http://www.w3.org/2000/svg", + width: "512", + height: "512", + viewBox: "0 0 512 512" + }, h("path", { + d: "M450.29,112H142c-34,0-62,27.51-62,61.33V418.67C80,452.49,108,480,142,480H450c34,0,62-26.18,62-60V173.33C512,139.51,484.32,112,450.29,112Zm-77.15,61.34a46,46,0,1,1-46.28,46A46.19,46.19,0,0,1,373.14,173.33Zm-231.55,276c-17,0-29.86-13.75-29.86-30.66V353.85l90.46-80.79a46.54,46.54,0,0,1,63.44,1.83L328.27,337l-113,112.33ZM480,418.67a30.67,30.67,0,0,1-30.71,30.66H259L376.08,333a46.24,46.24,0,0,1,59.44-.16L480,370.59Z" + }), h("path", { + d: "M384,32H64A64,64,0,0,0,0,96V352a64.11,64.11,0,0,0,48,62V152a72,72,0,0,1,72-72H446A64.11,64.11,0,0,0,384,32Z" + })); + }; + e.prototype.iconConfirm = function () { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Ccircle fill='%232CD865' cx='256' cy='256' r='256'/%3E%3Cg id='Icon_1_'%3E%3Cg%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M208,301.4l-55.4-55.5c-1.5-1.5-4-1.6-5.6-0.1l-23.4,22.3c-1.6,1.6-1.7,4.1-0.1,5.7l81.6,81.4 c3.1,3.1,8.2,3.1,11.3,0l171.8-171.7c1.6-1.6,1.6-4.2-0.1-5.7l-23.4-22.3c-1.6-1.5-4.1-1.5-5.6,0.1L213.7,301.4 C212.1,303,209.6,303,208,301.4z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E"; + }; + e.prototype.iconReverseCamera = function () { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M352,0H160C72,0,0,72,0,160v192c0,88,72,160,160,160h192c88,0,160-72,160-160V160C512,72,440,0,352,0z M356.7,365.8l-3.7,3.3c-27,23.2-61.4,35.9-96.8,35.9c-72.4,0-135.8-54.7-147-125.6c-0.3-1.9-2-3.3-3.9-3.3H64 c-3.3,0-5.2-3.8-3.2-6.4l61.1-81.4c1.6-2.1,4.7-2.1,6.4-0.1l63.3,81.4c2,2.6,0.2,6.5-3.2,6.5h-40.6c-2.5,0-4.5,2.4-3.9,4.8 c11.5,51.5,59.2,90.6,112.4,90.6c26.4,0,51.8-9.7,73.7-27.9l3.1-2.5c1.6-1.3,3.9-1.1,5.3,0.3l18.5,18.6 C358.5,361.6,358.4,364.3,356.7,365.8z M451.4,245.6l-61,83.5c-1.6,2.2-4.8,2.2-6.4,0.1l-63.3-83.3c-2-2.6-0.1-6.4,3.2-6.4h40.8 c2.5,0,4.4-2.3,3.9-4.8c-5.1-24.2-17.8-46.5-36.5-63.7c-21.2-19.4-48.2-30.1-76-30.1c-26.5,0-52.6,9.7-73.7,27.3l-3.1,2.5 c-1.6,1.3-3.9,1.2-5.4-0.3l-18.5-18.5c-1.6-1.6-1.5-4.3,0.2-5.9l3.5-3.1c27-23.2,61.4-35.9,96.8-35.9c38,0,73.9,13.7,101.2,38.7 c23.2,21.1,40.3,55.2,45.7,90.1c0.3,1.9,1.9,3.4,3.9,3.4h41.3C451.4,239.2,453.3,243,451.4,245.6z'/%3E%3C/g%3E%3C/svg%3E"; + }; + e.prototype.iconRetake = function () { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Ccircle fill='%23727A87' cx='256' cy='256' r='256'/%3E%3Cg id='Icon_5_'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M394.2,142L370,117.8c-1.6-1.6-4.1-1.6-5.7,0L258.8,223.4c-1.6,1.6-4.1,1.6-5.7,0L147.6,117.8 c-1.6-1.6-4.1-1.6-5.7,0L117.8,142c-1.6,1.6-1.6,4.1,0,5.7l105.5,105.5c1.6,1.6,1.6,4.1,0,5.7L117.8,364.4c-1.6,1.6-1.6,4.1,0,5.7 l24.1,24.1c1.6,1.6,4.1,1.6,5.7,0l105.5-105.5c1.6-1.6,4.1-1.6,5.7,0l105.5,105.5c1.6,1.6,4.1,1.6,5.7,0l24.1-24.1 c1.6-1.6,1.6-4.1,0-5.7L288.6,258.8c-1.6-1.6-1.6-4.1,0-5.7l105.5-105.5C395.7,146.1,395.7,143.5,394.2,142z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"; + }; + e.prototype.iconFlashOff = function () { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cg%3E%3Cpath class='st0' d='M498,483.7L42.3,28L14,56.4l149.8,149.8L91,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9c1.6,0,2.7,1.3,2.4,2.7 L197.6,507c-1,4.4,5.8,6.9,8.9,3.2l118.6-142.8L469.6,512L498,483.7z'/%3E%3Cpath class='st0' d='M449,218.2c2.5-3,0.1-7.2-3.9-7.2H301.2c-1.6,0-2.7-1.3-2.4-2.7L342.4,5c1-4.4-5.8-6.9-8.9-3.2L214.9,144.6 l161.3,161.3L449,218.2z'/%3E%3C/g%3E%3C/svg%3E"; + }; + e.prototype.iconFlashOn = function () { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cpath class='st0' d='M287.2,211c-1.6,0-2.7-1.3-2.4-2.7L328.4,5c1-4.4-5.8-6.9-8.9-3.2L77,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9 c1.6,0,2.7,1.3,2.4,2.7L183.6,507c-1,4.4,5.8,6.9,8.9,3.2l242.5-292c2.5-3,0.1-7.2-3.9-7.2L287.2,211L287.2,211z'/%3E%3C/svg%3E"; + }; + e.prototype.iconFlashAuto = function () { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cpath class='st0' d='M287.2,211c-1.6,0-2.7-1.3-2.4-2.7L328.4,5c1-4.4-5.8-6.9-8.9-3.2L77,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9 c1.6,0,2.7,1.3,2.4,2.7L183.6,507c-1,4.4,5.8,6.9,8.9,3.2l242.5-292c2.5-3,0.1-7.2-3.9-7.2L287.2,211L287.2,211z'/%3E%3Cg%3E%3Cpath class='st0' d='M321.3,186l74-186H438l74,186h-43.5l-11.9-32.5h-80.9l-12,32.5H321.3z M415.8,47.9l-27.2,70.7h54.9l-27.2-70.7 H415.8z'/%3E%3C/g%3E%3C/svg%3E"; + }; + e.prototype.render = function () { + var e = this; + var t = {}; + return h("div", { + class: "camera-wrapper" + }, h("div", { + class: "camera-header" + }, h("section", { + class: "items" + }, h("div", { + class: "item close", + onClick: function onClick(t) { + return e.handleClose(t); + } + }, h("img", { + src: this.iconExit() + })), h("div", { + class: "item flash", + onClick: function onClick(t) { + return e.handleFlashClick(t); + } + }, this.flashModes.length > 0 && h("div", null, this.flashMode == "off" ? h("img", { + src: this.iconFlashOff() + }) : "", this.flashMode == "auto" ? h("img", { + src: this.iconFlashAuto() + }) : "", this.flashMode == "flash" ? h("img", { + src: this.iconFlashOn() + }) : "")))), (this.hasCamera === false || !!this.deviceError) && h("div", { + class: "no-device" + }, h("h2", null, this.noDevicesText), h("label", { + htmlFor: "_pwa-elements-camera-input" + }, this.noDevicesButtonText), h("input", { + type: "file", + id: "_pwa-elements-camera-input", + onChange: this.handleFileInputChange, + accept: "image/*", + class: "select-file-button" + })), this.photoSrc ? h("div", { + class: "accept" + }, h("div", { + class: "accept-image", + style: Object.assign({ + backgroundImage: "url(".concat(this.photoSrc, ")") + }, t) + })) : h("div", { + class: "camera-video" + }, this.showShutterOverlay && h("div", { + class: "shutter-overlay" + }), this.hasImageCapture() ? h("video", { + ref: function ref(t) { + return e.videoElement = t; + }, + onLoadedMetaData: this.handleVideoMetadata, + autoplay: true, + playsinline: true + }) : h("canvas", { + ref: function ref(t) { + return e.canvasElement = t; + }, + width: "100%", + height: "100%" + }), h("canvas", { + class: "offscreen-image-render", + ref: function ref(t) { + return e.offscreenCanvas = t; + }, + width: "100%", + height: "100%" + })), this.hasCamera && h("div", { + class: "camera-footer" + }, !this.photo ? [!this.hidePicker && h("div", { + class: "pick-image", + onClick: this.handlePickFile + }, h("label", { + htmlFor: "_pwa-elements-file-pick" + }, this.iconPhotos()), h("input", { + type: "file", + id: "_pwa-elements-file-pick", + onChange: this.handleFileInputChange, + accept: "image/*", + class: "pick-image-button" + })), h("div", { + class: "shutter", + onClick: this.handleShutterClick + }, h("div", { + class: "shutter-button" + })), h("div", { + class: "rotate", + onClick: this.handleRotateClick + }, h("img", { + src: this.iconReverseCamera() + }))] : h("section", { + class: "items" + }, h("div", { + class: "item accept-cancel", + onClick: function onClick(t) { + return e.handleCancelPhoto(t); + } + }, h("img", { + src: this.iconRetake() + })), h("div", { + class: "item accept-use", + onClick: function onClick(t) { + return e.handleAcceptPhoto(t); + } + }, h("img", { + src: this.iconConfirm() + }))))); + }; + Object.defineProperty(e, "assetsDirs", { + get: function get() { + return ["icons"]; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(e.prototype, "el", { + get: function get() { + return getElement(this); + }, + enumerable: false, + configurable: true + }); + return e; +}(); +CameraPWA.style = cameraCss; +export { CameraPWA as pwa_camera }; \ No newline at end of file diff --git a/src/public/js/pwa-elements/esm-es5/pwa-toast.entry.js b/src/public/js/pwa-elements/esm-es5/pwa-toast.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..3d37f6fa034f046d7632947fa50c62052dcc7e51 --- /dev/null +++ b/src/public/js/pwa-elements/esm-es5/pwa-toast.entry.js @@ -0,0 +1,57 @@ +import { r as registerInstance, h, g as getElement, H as Host } from "./index-1c5c47b4.js"; +var toastCss = ':host{position:fixed;bottom:20px;left:0;right:0;display:-ms-flexbox;display:flex;opacity:0}:host(.in){-webkit-transition:opacity 300ms;transition:opacity 300ms;opacity:1}:host(.out){-webkit-transition:opacity 1s;transition:opacity 1s;opacity:0}.wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.toast{font-family:-apple-system, system-ui, "Helvetica Neue", Roboto, sans-serif;background-color:#eee;color:black;border-radius:5px;padding:10px 15px;font-size:14px;font-weight:500;-webkit-box-shadow:0px 1px 2px rgba(0, 0, 0, 0.20);box-shadow:0px 1px 2px rgba(0, 0, 0, 0.20)}'; +var PWAToast = function () { + function t(t) { + registerInstance(this, t); + this.message = undefined; + this.duration = 2e3; + this.closing = null; + } + t.prototype.hostData = function () { + var t = { + out: !!this.closing + }; + if (this.closing !== null) { + t["in"] = !this.closing; + } + return { + class: t + }; + }; + t.prototype.componentDidLoad = function () { + var t = this; + setTimeout(function () { + t.closing = false; + }); + setTimeout(function () { + t.close(); + }, this.duration); + }; + t.prototype.close = function () { + var t = this; + this.closing = true; + setTimeout(function () { + t.el.parentNode.removeChild(t.el); + }, 1e3); + }; + t.prototype.__stencil_render = function () { + return h("div", { + class: "wrapper" + }, h("div", { + class: "toast" + }, this.message)); + }; + Object.defineProperty(t.prototype, "el", { + get: function get() { + return getElement(this); + }, + enumerable: false, + configurable: true + }); + t.prototype.render = function () { + return h(Host, this.hostData(), this.__stencil_render()); + }; + return t; +}(); +PWAToast.style = toastCss; +export { PWAToast as pwa_toast }; \ No newline at end of file diff --git a/src/public/js/pwa-elements/esm/index-1c5c47b4.js b/src/public/js/pwa-elements/esm/index-1c5c47b4.js new file mode 100644 index 0000000000000000000000000000000000000000..35b2455eebb810d4b6ee2658803815cd7c17593b --- /dev/null +++ b/src/public/js/pwa-elements/esm/index-1c5c47b4.js @@ -0,0 +1,1757 @@ +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } +function _possibleConstructorReturn(t, e) { if (e && ("object" == typeof e || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); } +function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } +function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); } +function _wrapNativeSuper(t) { var r = "function" == typeof Map ? new Map() : void 0; return _wrapNativeSuper = function _wrapNativeSuper(t) { if (null === t || !_isNativeFunction(t)) return t; if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); if (void 0 !== r) { if (r.has(t)) return r.get(t); r.set(t, Wrapper); } function Wrapper() { return _construct(t, arguments, _getPrototypeOf(this).constructor); } return Wrapper.prototype = Object.create(t.prototype, { constructor: { value: Wrapper, enumerable: !1, writable: !0, configurable: !0 } }), _setPrototypeOf(Wrapper, t); }, _wrapNativeSuper(t); } +function _construct(t, e, r) { if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); var o = [null]; o.push.apply(o, e); var p = new (t.bind.apply(t, o))(); return r && _setPrototypeOf(p, r.prototype), p; } +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } +function _isNativeFunction(t) { try { return -1 !== Function.toString.call(t).indexOf("[native code]"); } catch (n) { return "function" == typeof t; } } +function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } +function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); } +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } +function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } +function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } +function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } +function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } +function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } +function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); } +function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); } +function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } +var NAMESPACE = 'ionicpwaelements'; + +/** + * Virtual DOM patching algorithm based on Snabbdom by + * Simon Friis Vindum (@paldepind) + * Licensed under the MIT License + * https://github.com/snabbdom/snabbdom/blob/master/LICENSE + * + * Modified for Stencil's renderer and slot projection + */ +var scopeId; +var hostTagName; +var isSvgMode = false; +var queuePending = false; +var createTime = function createTime(fnName) { + var tagName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + { + return function () { + return; + }; + } +}; +var uniqueTime = function uniqueTime(key, measureText) { + { + return function () { + return; + }; + } +}; +var HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}'; +/** + * Default style mode id + */ +/** + * Reusable empty obj/array + * Don't add values to these!! + */ +var EMPTY_OBJ = {}; +/** + * Namespaces + */ +var SVG_NS = 'http://www.w3.org/2000/svg'; +var HTML_NS = 'http://www.w3.org/1999/xhtml'; +var isDef = function isDef(v) { + return v != null; +}; +/** + * Check whether a value is a 'complex type', defined here as an object or a + * function. + * + * @param o the value to check + * @returns whether it's a complex type or not + */ +var isComplexType = function isComplexType(o) { + // https://jsperf.com/typeof-fn-object/5 + o = typeof o; + return o === 'object' || o === 'function'; +}; +/** + * Helper method for querying a `meta` tag that contains a nonce value + * out of a DOM's head. + * + * @param doc The DOM containing the `head` to query against + * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag + * exists or the tag has no content. + */ +function queryNonceMetaTagContent(doc) { + var _a, _b, _c; + return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined; +} +/** + * Production h() function based on Preact by + * Jason Miller (@developit) + * Licensed under the MIT License + * https://github.com/developit/preact/blob/master/LICENSE + * + * Modified for Stencil's compiler and vdom + */ +// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode; +// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode; +var h = function h(nodeName, vnodeData) { + var child = null; + var simple = false; + var lastSimple = false; + var vNodeChildren = []; + var _walk = function walk(c) { + for (var i = 0; i < c.length; i++) { + child = c[i]; + if (Array.isArray(child)) { + _walk(child); + } else if (child != null && typeof child !== 'boolean') { + if (simple = typeof nodeName !== 'function' && !isComplexType(child)) { + child = String(child); + } + if (simple && lastSimple) { + // If the previous child was simple (string), we merge both + vNodeChildren[vNodeChildren.length - 1].$text$ += child; + } else { + // Append a new vNode, if it's text, we create a text vNode + vNodeChildren.push(simple ? newVNode(null, child) : child); + } + lastSimple = simple; + } + } + }; + for (var _len = arguments.length, children = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + children[_key - 2] = arguments[_key]; + } + _walk(children); + if (vnodeData) { + { + var classData = vnodeData.className || vnodeData.class; + if (classData) { + vnodeData.class = typeof classData !== 'object' ? classData : Object.keys(classData).filter(function (k) { + return classData[k]; + }).join(' '); + } + } + } + var vnode = newVNode(nodeName, null); + vnode.$attrs$ = vnodeData; + if (vNodeChildren.length > 0) { + vnode.$children$ = vNodeChildren; + } + return vnode; +}; +/** + * A utility function for creating a virtual DOM node from a tag and some + * possible text content. + * + * @param tag the tag for this element + * @param text possible text content for the node + * @returns a newly-minted virtual DOM node + */ +var newVNode = function newVNode(tag, text) { + var vnode = { + $flags$: 0, + $tag$: tag, + $text$: text, + $elm$: null, + $children$: null + }; + { + vnode.$attrs$ = null; + } + return vnode; +}; +var Host = {}; +/** + * Check whether a given node is a Host node or not + * + * @param node the virtual DOM node to check + * @returns whether it's a Host node or not + */ +var isHost = function isHost(node) { + return node && node.$tag$ === Host; +}; +/** + * Parse a new property value for a given property type. + * + * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned, + * it is not safe to assume that the string returned by evaluating `typeof propValue` matches: + * 1. `any`, the type given to `propValue` in the function signature + * 2. the type stored from `propType`. + * + * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type. + * + * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to + * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is + * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`. + * ```tsx + * <my-cmp prop-val={0}></my-cmp> + * ``` + * + * HTML prop values on the other hand, will always a string + * + * @param propValue the new value to coerce to some type + * @param propType the type of the prop, expressed as a binary number + * @returns the parsed/coerced value + */ +var parsePropertyValue = function parsePropertyValue(propValue, propType) { + // ensure this value is of the correct prop type + if (propValue != null && !isComplexType(propValue)) { + if (propType & 4 /* MEMBER_FLAGS.Boolean */) { + // per the HTML spec, any string value means it is a boolean true value + // but we'll cheat here and say that the string "false" is the boolean false + return propValue === 'false' ? false : propValue === '' || !!propValue; + } + if (propType & 2 /* MEMBER_FLAGS.Number */) { + // force it to be a number + return parseFloat(propValue); + } + if (propType & 1 /* MEMBER_FLAGS.String */) { + // could have been passed as a number or boolean + // but we still want it as a string + return String(propValue); + } + // redundant return here for better minification + return propValue; + } + // not sure exactly what type we want + // so no need to change to a different type + return propValue; +}; +var getElement = function getElement(ref) { + return getHostRef(ref).$hostElement$; +}; +var createEvent = function createEvent(ref, name, flags) { + var elm = getElement(ref); + return { + emit: function emit(detail) { + return emitEvent(elm, name, { + bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */), + composed: !!(flags & 2 /* EVENT_FLAGS.Composed */), + cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */), + detail: detail + }); + } + }; +}; +/** + * Helper function to create & dispatch a custom Event on a provided target + * @param elm the target of the Event + * @param name the name to give the custom Event + * @param opts options for configuring a custom Event + * @returns the custom Event + */ +var emitEvent = function emitEvent(elm, name, opts) { + var ev = plt.ce(name, opts); + elm.dispatchEvent(ev); + return ev; +}; +var rootAppliedStyles = /*@__PURE__*/new WeakMap(); +var registerStyle = function registerStyle(scopeId, cssText, allowCS) { + var style = styles.get(scopeId); + if (supportsConstructableStylesheets && allowCS) { + style = style || new CSSStyleSheet(); + if (typeof style === 'string') { + style = cssText; + } else { + style.replaceSync(cssText); + } + } else { + style = cssText; + } + styles.set(scopeId, style); +}; +var addStyle = function addStyle(styleContainerNode, cmpMeta, mode, hostElm) { + var _a; + var scopeId = getScopeId(cmpMeta); + var style = styles.get(scopeId); + // if an element is NOT connected then getRootNode() will return the wrong root node + // so the fallback is to always use the document for the root node in those cases + styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc; + if (style) { + if (typeof style === 'string') { + styleContainerNode = styleContainerNode.head || styleContainerNode; + var appliedStyles = rootAppliedStyles.get(styleContainerNode); + var styleElm; + if (!appliedStyles) { + rootAppliedStyles.set(styleContainerNode, appliedStyles = new Set()); + } + if (!appliedStyles.has(scopeId)) { + { + // TODO(STENCIL-659): Remove code implementing the CSS variable shim + { + styleElm = doc.createElement('style'); + styleElm.innerHTML = style; + } + // Apply CSP nonce to the style tag if it exists + var nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc); + if (nonce != null) { + styleElm.setAttribute('nonce', nonce); + } + styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link')); + } + if (appliedStyles) { + appliedStyles.add(scopeId); + } + } + } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) { + styleContainerNode.adoptedStyleSheets = [].concat(_toConsumableArray(styleContainerNode.adoptedStyleSheets), [style]); + } + } + return scopeId; +}; +var attachStyles = function attachStyles(hostRef) { + var cmpMeta = hostRef.$cmpMeta$; + var elm = hostRef.$hostElement$; + var flags = cmpMeta.$flags$; + var endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$); + var scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta); + // TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field + if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) { + // only required when we're NOT using native shadow dom (slot) + // or this browser doesn't support native shadow dom + // and this host element was NOT created with SSR + // let's pick out the inner content for slot projection + // create a node to represent where the original + // content was first placed, which is useful later on + // DOM WRITE!! + elm['s-sc'] = scopeId; + elm.classList.add(scopeId + '-h'); + } + endAttachStyles(); +}; +var getScopeId = function getScopeId(cmp, mode) { + return 'sc-' + cmp.$tagName$; +}; +/** + * Production setAccessor() function based on Preact by + * Jason Miller (@developit) + * Licensed under the MIT License + * https://github.com/developit/preact/blob/master/LICENSE + * + * Modified for Stencil's compiler and vdom + */ +var setAccessor = function setAccessor(elm, memberName, oldValue, newValue, isSvg, flags) { + if (oldValue !== newValue) { + var isProp = isMemberInElement(elm, memberName); + var ln = memberName.toLowerCase(); + if (memberName === 'class') { + var classList = elm.classList; + var oldClasses = parseClassList(oldValue); + var newClasses = parseClassList(newValue); + classList.remove.apply(classList, _toConsumableArray(oldClasses.filter(function (c) { + return c && !newClasses.includes(c); + }))); + classList.add.apply(classList, _toConsumableArray(newClasses.filter(function (c) { + return c && !oldClasses.includes(c); + }))); + } else if (memberName === 'style') { + // update style attribute, css properties and values + { + for (var prop in oldValue) { + if (!newValue || newValue[prop] == null) { + if (prop.includes('-')) { + elm.style.removeProperty(prop); + } else { + elm.style[prop] = ''; + } + } + } + } + for (var _prop in newValue) { + if (!oldValue || newValue[_prop] !== oldValue[_prop]) { + if (_prop.includes('-')) { + elm.style.setProperty(_prop, newValue[_prop]); + } else { + elm.style[_prop] = newValue[_prop]; + } + } + } + } else if (memberName === 'ref') { + // minifier will clean this up + if (newValue) { + newValue(elm); + } + } else if (!isProp && memberName[0] === 'o' && memberName[1] === 'n') { + // Event Handlers + // so if the member name starts with "on" and the 3rd characters is + // a capital letter, and it's not already a member on the element, + // then we're assuming it's an event listener + if (memberName[2] === '-') { + // on- prefixed events + // allows to be explicit about the dom event to listen without any magic + // under the hood: + // <my-cmp on-click> // listens for "click" + // <my-cmp on-Click> // listens for "Click" + // <my-cmp on-ionChange> // listens for "ionChange" + // <my-cmp on-EVENTS> // listens for "EVENTS" + memberName = memberName.slice(3); + } else if (isMemberInElement(win, ln)) { + // standard event + // the JSX attribute could have been "onMouseOver" and the + // member name "onmouseover" is on the window's prototype + // so let's add the listener "mouseover", which is all lowercased + memberName = ln.slice(2); + } else { + // custom event + // the JSX attribute could have been "onMyCustomEvent" + // so let's trim off the "on" prefix and lowercase the first character + // and add the listener "myCustomEvent" + // except for the first character, we keep the event name case + memberName = ln[2] + memberName.slice(3); + } + if (oldValue) { + plt.rel(elm, memberName, oldValue, false); + } + if (newValue) { + plt.ael(elm, memberName, newValue, false); + } + } else { + // Set property if it exists and it's not a SVG + var isComplex = isComplexType(newValue); + if ((isProp || isComplex && newValue !== null) && !isSvg) { + try { + if (!elm.tagName.includes('-')) { + var n = newValue == null ? '' : newValue; + // Workaround for Safari, moving the <input> caret when re-assigning the same valued + if (memberName === 'list') { + isProp = false; + } else if (oldValue == null || elm[memberName] != n) { + elm[memberName] = n; + } + } else { + elm[memberName] = newValue; + } + } catch (e) {} + } + if (newValue == null || newValue === false) { + if (newValue !== false || elm.getAttribute(memberName) === '') { + { + elm.removeAttribute(memberName); + } + } + } else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) { + newValue = newValue === true ? '' : newValue; + { + elm.setAttribute(memberName, newValue); + } + } + } + } +}; +var parseClassListRegex = /\s/; +var parseClassList = function parseClassList(value) { + return !value ? [] : value.split(parseClassListRegex); +}; +var updateElement = function updateElement(oldVnode, newVnode, isSvgMode, memberName) { + // if the element passed in is a shadow root, which is a document fragment + // then we want to be adding attrs/props to the shadow root's "host" element + // if it's not a shadow root, then we add attrs/props to the same element + var elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$; + var oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ; + var newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ; + { + // remove attributes no longer present on the vnode by setting them to undefined + for (memberName in oldVnodeAttrs) { + if (!(memberName in newVnodeAttrs)) { + setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$); + } + } + } + // add new & update changed attributes + for (memberName in newVnodeAttrs) { + setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$); + } +}; +/** + * Create a DOM Node corresponding to one of the children of a given VNode. + * + * @param oldParentVNode the parent VNode from the previous render + * @param newParentVNode the parent VNode from the current render + * @param childIndex the index of the VNode, in the _new_ parent node's + * children, for which we will create a new DOM node + * @param parentElm the parent DOM node which our new node will be a child of + * @returns the newly created node + */ +var _createElm = function createElm(oldParentVNode, newParentVNode, childIndex, parentElm) { + // tslint:disable-next-line: prefer-const + var newVNode = newParentVNode.$children$[childIndex]; + var i = 0; + var elm; + var childNode; + if (newVNode.$text$ !== null) { + // create text node + elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$); + } else { + if (!isSvgMode) { + isSvgMode = newVNode.$tag$ === 'svg'; + } + // create element + elm = newVNode.$elm$ = doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$tag$); + if (isSvgMode && newVNode.$tag$ === 'foreignObject') { + isSvgMode = false; + } + // add css classes, attrs, props, listeners, etc. + { + updateElement(null, newVNode, isSvgMode); + } + if (isDef(scopeId) && elm['s-si'] !== scopeId) { + // if there is a scopeId and this is the initial render + // then let's add the scopeId as a css class + elm.classList.add(elm['s-si'] = scopeId); + } + if (newVNode.$children$) { + for (i = 0; i < newVNode.$children$.length; ++i) { + // create the node + childNode = _createElm(oldParentVNode, newVNode, i); + // return node could have been null + if (childNode) { + // append our new node + elm.appendChild(childNode); + } + } + } + { + if (newVNode.$tag$ === 'svg') { + // Only reset the SVG context when we're exiting <svg> element + isSvgMode = false; + } else if (elm.tagName === 'foreignObject') { + // Reenter SVG context when we're exiting <foreignObject> element + isSvgMode = true; + } + } + } + return elm; +}; +/** + * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and + * add them to the DOM in the appropriate place. + * + * @param parentElm the DOM node which should be used as a parent for the new + * DOM nodes + * @param before a child of the `parentElm` which the new children should be + * inserted before (optional) + * @param parentVNode the parent virtual DOM node + * @param vnodes the new child virtual DOM nodes to produce DOM nodes for + * @param startIdx the index in the child virtual DOM nodes at which to start + * creating DOM nodes (inclusive) + * @param endIdx the index in the child virtual DOM nodes at which to stop + * creating DOM nodes (inclusive) + */ +var addVnodes = function addVnodes(parentElm, before, parentVNode, vnodes, startIdx, endIdx) { + var containerElm = parentElm; + var childNode; + if (containerElm.shadowRoot && containerElm.tagName === hostTagName) { + containerElm = containerElm.shadowRoot; + } + for (; startIdx <= endIdx; ++startIdx) { + if (vnodes[startIdx]) { + childNode = _createElm(null, parentVNode, startIdx); + if (childNode) { + vnodes[startIdx].$elm$ = childNode; + containerElm.insertBefore(childNode, before); + } + } + } +}; +/** + * Remove the DOM elements corresponding to a list of {@link d.VNode} objects. + * This can be used to, for instance, clean up after a list of children which + * should no longer be shown. + * + * This function also handles some of Stencil's slot relocation logic. + * + * @param vnodes a list of virtual DOM nodes to remove + * @param startIdx the index at which to start removing nodes (inclusive) + * @param endIdx the index at which to stop removing nodes (inclusive) + */ +var removeVnodes = function removeVnodes(vnodes, startIdx, endIdx) { + for (var index = startIdx; index <= endIdx; ++index) { + var vnode = vnodes[index]; + if (vnode) { + var elm = vnode.$elm$; + _nullifyVNodeRefs(vnode); + if (elm) { + // remove the vnode's element from the dom + elm.remove(); + } + } + } +}; +/** + * Reconcile the children of a new VNode with the children of an old VNode by + * traversing the two collections of children, identifying nodes that are + * conserved or changed, calling out to `patch` to make any necessary + * updates to the DOM, and rearranging DOM nodes as needed. + * + * The algorithm for reconciling children works by analyzing two 'windows' onto + * the two arrays of children (`oldCh` and `newCh`). We keep track of the + * 'windows' by storing start and end indices and references to the + * corresponding array entries. Initially the two 'windows' are basically equal + * to the entire array, but we progressively narrow the windows until there are + * no children left to update by doing the following: + * + * 1. Skip any `null` entries at the beginning or end of the two arrays, so + * that if we have an initial array like the following we'll end up dealing + * only with a window bounded by the highlighted elements: + * + * [null, null, VNode1 , ... , VNode2, null, null] + * ^^^^^^ ^^^^^^ + * + * 2. Check to see if the elements at the head and tail positions are equal + * across the windows. This will basically detect elements which haven't + * been added, removed, or changed position, i.e. if you had the following + * VNode elements (represented as HTML): + * + * oldVNode: `<div><p><span>HEY</span></p></div>` + * newVNode: `<div><p><span>THERE</span></p></div>` + * + * Then when comparing the children of the `<div>` tag we check the equality + * of the VNodes corresponding to the `<p>` tags and, since they are the + * same tag in the same position, we'd be able to avoid completely + * re-rendering the subtree under them with a new DOM element and would just + * call out to `patch` to handle reconciling their children and so on. + * + * 3. Check, for both windows, to see if the element at the beginning of the + * window corresponds to the element at the end of the other window. This is + * a heuristic which will let us identify _some_ situations in which + * elements have changed position, for instance it _should_ detect that the + * children nodes themselves have not changed but merely moved in the + * following example: + * + * oldVNode: `<div><element-one /><element-two /></div>` + * newVNode: `<div><element-two /><element-one /></div>` + * + * If we find cases like this then we also need to move the concrete DOM + * elements corresponding to the moved children to write the re-order to the + * DOM. + * + * 4. Finally, if VNodes have the `key` attribute set on them we check for any + * nodes in the old children which have the same key as the first element in + * our window on the new children. If we find such a node we handle calling + * out to `patch`, moving relevant DOM nodes, and so on, in accordance with + * what we find. + * + * Finally, once we've narrowed our 'windows' to the point that either of them + * collapse (i.e. they have length 0) we then handle any remaining VNode + * insertion or deletion that needs to happen to get a DOM state that correctly + * reflects the new child VNodes. If, for instance, after our window on the old + * children has collapsed we still have more nodes on the new children that + * we haven't dealt with yet then we need to add them, or if the new children + * collapse but we still have unhandled _old_ children then we need to make + * sure the corresponding DOM nodes are removed. + * + * @param parentElm the node into which the parent VNode is rendered + * @param oldCh the old children of the parent node + * @param newVNode the new VNode which will replace the parent + * @param newCh the new children of the parent node + */ +var updateChildren = function updateChildren(parentElm, oldCh, newVNode, newCh) { + var oldStartIdx = 0; + var newStartIdx = 0; + var oldEndIdx = oldCh.length - 1; + var oldStartVnode = oldCh[0]; + var oldEndVnode = oldCh[oldEndIdx]; + var newEndIdx = newCh.length - 1; + var newStartVnode = newCh[0]; + var newEndVnode = newCh[newEndIdx]; + var node; + while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) { + if (oldStartVnode == null) { + // VNode might have been moved left + oldStartVnode = oldCh[++oldStartIdx]; + } else if (oldEndVnode == null) { + oldEndVnode = oldCh[--oldEndIdx]; + } else if (newStartVnode == null) { + newStartVnode = newCh[++newStartIdx]; + } else if (newEndVnode == null) { + newEndVnode = newCh[--newEndIdx]; + } else if (isSameVnode(oldStartVnode, newStartVnode)) { + // if the start nodes are the same then we should patch the new VNode + // onto the old one, and increment our `newStartIdx` and `oldStartIdx` + // indices to reflect that. We don't need to move any DOM Nodes around + // since things are matched up in order. + patch(oldStartVnode, newStartVnode); + oldStartVnode = oldCh[++oldStartIdx]; + newStartVnode = newCh[++newStartIdx]; + } else if (isSameVnode(oldEndVnode, newEndVnode)) { + // likewise, if the end nodes are the same we patch new onto old and + // decrement our end indices, and also likewise in this case we don't + // need to move any DOM Nodes. + patch(oldEndVnode, newEndVnode); + oldEndVnode = oldCh[--oldEndIdx]; + newEndVnode = newCh[--newEndIdx]; + } else if (isSameVnode(oldStartVnode, newEndVnode)) { + patch(oldStartVnode, newEndVnode); + // We need to move the element for `oldStartVnode` into a position which + // will be appropriate for `newEndVnode`. For this we can use + // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a + // sibling for `oldEndVnode.$elm$` then we want to move the DOM node for + // `oldStartVnode` between `oldEndVnode` and it's sibling, like so: + // + // <old-start-node /> + // <some-intervening-node /> + // <old-end-node /> + // <!-- -> <-- `oldStartVnode.$elm$` should be inserted here + // <next-sibling /> + // + // If instead `oldEndVnode.$elm$` has no sibling then we just want to put + // the node for `oldStartVnode` at the end of the children of + // `parentElm`. Luckily, `Node.nextSibling` will return `null` if there + // aren't any siblings, and passing `null` to `Node.insertBefore` will + // append it to the children of the parent element. + parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling); + oldStartVnode = oldCh[++oldStartIdx]; + newEndVnode = newCh[--newEndIdx]; + } else if (isSameVnode(oldEndVnode, newStartVnode)) { + patch(oldEndVnode, newStartVnode); + // We've already checked above if `oldStartVnode` and `newStartVnode` are + // the same node, so since we're here we know that they are not. Thus we + // can move the element for `oldEndVnode` _before_ the element for + // `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the + // future. + parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$); + oldEndVnode = oldCh[--oldEndIdx]; + newStartVnode = newCh[++newStartIdx]; + } else { + { + // We either didn't find an element in the old children that matches + // the key of the first new child OR the build is not using `key` + // attributes at all. In either case we need to create a new element + // for the new node. + node = _createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx); + newStartVnode = newCh[++newStartIdx]; + } + if (node) { + // if we created a new node then handle inserting it to the DOM + { + oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$); + } + } + } + } + if (oldStartIdx > oldEndIdx) { + // we have some more new nodes to add which don't match up with old nodes + addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx); + } else if (newStartIdx > newEndIdx) { + // there are nodes in the `oldCh` array which no longer correspond to nodes + // in the new array, so lets remove them (which entails cleaning up the + // relevant DOM nodes) + removeVnodes(oldCh, oldStartIdx, oldEndIdx); + } +}; +/** + * Compare two VNodes to determine if they are the same + * + * **NB**: This function is an equality _heuristic_ based on the available + * information set on the two VNodes and can be misleading under certain + * circumstances. In particular, if the two nodes do not have `key` attrs + * (available under `$key$` on VNodes) then the function falls back on merely + * checking that they have the same tag. + * + * So, in other words, if `key` attrs are not set on VNodes which may be + * changing order within a `children` array or something along those lines then + * we could obtain a false negative and then have to do needless re-rendering + * (i.e. we'd say two VNodes aren't equal when in fact they should be). + * + * @param leftVNode the first VNode to check + * @param rightVNode the second VNode to check + * @returns whether they're equal or not + */ +var isSameVnode = function isSameVnode(leftVNode, rightVNode) { + // compare if two vnode to see if they're "technically" the same + // need to have the same element tag, and same key to be the same + if (leftVNode.$tag$ === rightVNode.$tag$) { + return true; + } + return false; +}; +/** + * Handle reconciling an outdated VNode with a new one which corresponds to + * it. This function handles flushing updates to the DOM and reconciling the + * children of the two nodes (if any). + * + * @param oldVNode an old VNode whose DOM element and children we want to update + * @param newVNode a new VNode representing an updated version of the old one + */ +var patch = function patch(oldVNode, newVNode) { + var elm = newVNode.$elm$ = oldVNode.$elm$; + var oldChildren = oldVNode.$children$; + var newChildren = newVNode.$children$; + var tag = newVNode.$tag$; + var text = newVNode.$text$; + if (text === null) { + { + // test if we're rendering an svg element, or still rendering nodes inside of one + // only add this to the when the compiler sees we're using an svg somewhere + isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode; + } + { + { + // either this is the first render of an element OR it's an update + // AND we already know it's possible it could have changed + // this updates the element's css classes, attrs, props, listeners, etc. + updateElement(oldVNode, newVNode, isSvgMode); + } + } + if (oldChildren !== null && newChildren !== null) { + // looks like there's child vnodes for both the old and new vnodes + // so we need to call `updateChildren` to reconcile them + updateChildren(elm, oldChildren, newVNode, newChildren); + } else if (newChildren !== null) { + // no old child vnodes, but there are new child vnodes to add + if (oldVNode.$text$ !== null) { + // the old vnode was text, so be sure to clear it out + elm.textContent = ''; + } + // add the new vnode children + addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1); + } else if (oldChildren !== null) { + // no new child vnodes, but there are old child vnodes to remove + removeVnodes(oldChildren, 0, oldChildren.length - 1); + } + if (isSvgMode && tag === 'svg') { + isSvgMode = false; + } + } else if (oldVNode.$text$ !== text) { + // update the text content for the text only vnode + // and also only if the text is different than before + elm.data = text; + } +}; +/** + * 'Nullify' any VDom `ref` callbacks on a VDom node or its children by + * calling them with `null`. This signals that the DOM element corresponding to + * the VDom node has been removed from the DOM. + * + * @param vNode a virtual DOM node + */ +var _nullifyVNodeRefs = function nullifyVNodeRefs(vNode) { + { + vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null); + vNode.$children$ && vNode.$children$.map(_nullifyVNodeRefs); + } +}; +/** + * The main entry point for Stencil's virtual DOM-based rendering engine + * + * Given a {@link d.HostRef} container and some virtual DOM nodes, this + * function will handle creating a virtual DOM tree with a single root, patching + * the current virtual DOM tree onto an old one (if any), dealing with slot + * relocation, and reflecting attributes. + * + * @param hostRef data needed to root and render the virtual DOM tree, such as + * the DOM node into which it should be rendered. + * @param renderFnResults the virtual DOM nodes to be rendered + */ +var renderVdom = function renderVdom(hostRef, renderFnResults) { + var hostElm = hostRef.$hostElement$; + var oldVNode = hostRef.$vnode$ || newVNode(null, null); + var rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults); + hostTagName = hostElm.tagName; + rootVnode.$tag$ = null; + rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */; + hostRef.$vnode$ = rootVnode; + rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm; + { + scopeId = hostElm['s-sc']; + } + // synchronous patch + patch(oldVNode, rootVnode); +}; +var attachToAncestor = function attachToAncestor(hostRef, ancestorComponent) { + if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) { + ancestorComponent['s-p'].push(new Promise(function (r) { + return hostRef.$onRenderResolve$ = r; + })); + } +}; +var scheduleUpdate = function scheduleUpdate(hostRef, isInitialLoad) { + { + hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */; + } + if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) { + hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */; + return; + } + attachToAncestor(hostRef, hostRef.$ancestorComponent$); + // there is no ancestor component or the ancestor component + // has already fired off its lifecycle update then + // fire off the initial update + var dispatch = function dispatch() { + return dispatchHooks(hostRef, isInitialLoad); + }; + return writeTask(dispatch); +}; +/** + * Dispatch initial-render and update lifecycle hooks, enqueuing calls to + * component lifecycle methods like `componentWillLoad` as well as + * {@link updateComponent}, which will kick off the virtual DOM re-render. + * + * @param hostRef a reference to a host DOM node + * @param isInitialLoad whether we're on the initial load or not + * @returns an empty Promise which is used to enqueue a series of operations for + * the component + */ +var dispatchHooks = function dispatchHooks(hostRef, isInitialLoad) { + var endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$); + var instance = hostRef.$lazyInstance$; + // We're going to use this variable together with `enqueue` to implement a + // little promise-based queue. We start out with it `undefined`. When we add + // the first function to the queue we'll set this variable to be that + // function's return value. When we attempt to add subsequent values to the + // queue we'll check that value and, if it was a `Promise`, we'll then chain + // the new function off of that `Promise` using `.then()`. This will give our + // queue two nice properties: + // + // 1. If all functions added to the queue are synchronous they'll be called + // synchronously right away. + // 2. If all functions added to the queue are asynchronous they'll all be + // called in order after `dispatchHooks` exits. + var maybePromise; + if (isInitialLoad) { + { + hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */; + if (hostRef.$queuedListeners$) { + hostRef.$queuedListeners$.map(function (_ref) { + var _ref2 = _slicedToArray(_ref, 2), + methodName = _ref2[0], + event = _ref2[1]; + return safeCall(instance, methodName, event); + }); + hostRef.$queuedListeners$ = undefined; + } + } + } + endSchedule(); + return enqueue(maybePromise, function () { + return updateComponent(hostRef, instance, isInitialLoad); + }); +}; +/** + * This function uses a Promise to implement a simple first-in, first-out queue + * of functions to be called. + * + * The queue is ordered on the basis of the first argument. If it's + * `undefined`, then nothing is on the queue yet, so the provided function can + * be called synchronously (although note that this function may return a + * `Promise`). The idea is that then the return value of that enqueueing + * operation is kept around, so that if it was a `Promise` then subsequent + * functions can be enqueued by calling this function again with that `Promise` + * as the first argument. + * + * @param maybePromise either a `Promise` which should resolve before the next function is called or an 'empty' sentinel + * @param fn a function to enqueue + * @returns either a `Promise` or the return value of the provided function + */ +var enqueue = function enqueue(maybePromise, fn) { + return isPromisey(maybePromise) ? maybePromise.then(fn) : fn(); +}; +/** + * Check that a value is a `Promise`. To check, we first see if the value is an + * instance of the `Promise` global. In a few circumstances, in particular if + * the global has been overwritten, this is could be misleading, so we also do + * a little 'duck typing' check to see if the `.then` property of the value is + * defined and a function. + * + * @param maybePromise it might be a promise! + * @returns whether it is or not + */ +var isPromisey = function isPromisey(maybePromise) { + return maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === 'function'; +}; +var updateComponent = /*#__PURE__*/function () { + var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(hostRef, instance, isInitialLoad) { + var _a, elm, endUpdate, rc, endRender, childrenPromises, postUpdate; + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + elm = hostRef.$hostElement$; + endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$); + rc = elm['s-rc']; + if (isInitialLoad) { + // DOM WRITE! + attachStyles(hostRef); + } + endRender = createTime('render', hostRef.$cmpMeta$.$tagName$); + callRender(hostRef, instance); + if (rc) { + // ok, so turns out there are some child host elements + // waiting on this parent element to load + // let's fire off all update callbacks waiting + rc.map(function (cb) { + return cb(); + }); + elm['s-rc'] = undefined; + } + endRender(); + endUpdate(); + childrenPromises = (_a = elm['s-p']) !== null && _a !== void 0 ? _a : []; + postUpdate = function postUpdate() { + return postUpdateComponent(hostRef); + }; + if (childrenPromises.length === 0) { + postUpdate(); + } else { + Promise.all(childrenPromises).then(postUpdate); + hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */; + childrenPromises.length = 0; + } + case 12: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function updateComponent(_x, _x2, _x3) { + return _ref3.apply(this, arguments); + }; +}(); +var callRender = function callRender(hostRef, instance, elm) { + try { + instance = instance.render(); + { + hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */; + } + { + hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */; + } + { + { + // looks like we've got child nodes to render into this host element + // or we need to update the css class/attrs on the host element + // DOM WRITE! + { + renderVdom(hostRef, instance); + } + } + } + } catch (e) { + consoleError(e, hostRef.$hostElement$); + } + return null; +}; +var postUpdateComponent = function postUpdateComponent(hostRef) { + var tagName = hostRef.$cmpMeta$.$tagName$; + var elm = hostRef.$hostElement$; + var endPostUpdate = createTime('postUpdate', tagName); + var instance = hostRef.$lazyInstance$; + var ancestorComponent = hostRef.$ancestorComponent$; + if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) { + hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */; + { + // DOM WRITE! + addHydratedFlag(elm); + } + { + safeCall(instance, 'componentDidLoad'); + } + endPostUpdate(); + { + hostRef.$onReadyResolve$(elm); + if (!ancestorComponent) { + appDidLoad(); + } + } + } else { + endPostUpdate(); + } + { + hostRef.$onInstanceResolve$(elm); + } + // load events fire from bottom to top + // the deepest elements load first then bubbles up + { + if (hostRef.$onRenderResolve$) { + hostRef.$onRenderResolve$(); + hostRef.$onRenderResolve$ = undefined; + } + if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) { + nextTick(function () { + return scheduleUpdate(hostRef, false); + }); + } + hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */); + } + // ( •_•) + // ( •_•)>âŒâ– -â– + // (âŒâ– _â– ) +}; +var forceUpdate = function forceUpdate(ref) { + { + var hostRef = getHostRef(ref); + var isConnected = hostRef.$hostElement$.isConnected; + if (isConnected && (hostRef.$flags$ & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) { + scheduleUpdate(hostRef, false); + } + // Returns "true" when the forced update was successfully scheduled + return isConnected; + } +}; +var appDidLoad = function appDidLoad(who) { + // on appload + // we have finish the first big initial render + { + addHydratedFlag(doc.documentElement); + } + nextTick(function () { + return emitEvent(win, 'appload', { + detail: { + namespace: NAMESPACE + } + }); + }); +}; +var safeCall = function safeCall(instance, method, arg) { + if (instance && instance[method]) { + try { + return instance[method](arg); + } catch (e) { + consoleError(e); + } + } + return undefined; +}; +var addHydratedFlag = function addHydratedFlag(elm) { + return elm.classList.add('hydrated'); +}; +var getValue = function getValue(ref, propName) { + return getHostRef(ref).$instanceValues$.get(propName); +}; +var setValue = function setValue(ref, propName, newVal, cmpMeta) { + // check our new property value against our internal value + var hostRef = getHostRef(ref); + var oldVal = hostRef.$instanceValues$.get(propName); + var flags = hostRef.$flags$; + var instance = hostRef.$lazyInstance$; + newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]); + // explicitly check for NaN on both sides, as `NaN === NaN` is always false + var areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal); + var didValueChange = newVal !== oldVal && !areBothNaN; + if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) { + // gadzooks! the property's value has changed!! + // set our new value! + hostRef.$instanceValues$.set(propName, newVal); + if (instance) { + if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) { + // looks like this value actually changed, so we've got work to do! + // but only if we've already rendered, otherwise just chill out + // queue that we need to do an update, but don't worry about queuing + // up millions cuz this function ensures it only runs once + scheduleUpdate(hostRef, false); + } + } + } +}; +/** + * Attach a series of runtime constructs to a compiled Stencil component + * constructor, including getters and setters for the `@Prop` and `@State` + * decorators, callbacks for when attributes change, and so on. + * + * @param Cstr the constructor for a component that we need to process + * @param cmpMeta metadata collected previously about the component + * @param flags a number used to store a series of bit flags + * @returns a reference to the same constructor passed in (but now mutated) + */ +var proxyComponent = function proxyComponent(Cstr, cmpMeta, flags) { + if (cmpMeta.$members$) { + // It's better to have a const than two Object.entries() + var members = Object.entries(cmpMeta.$members$); + var prototype = Cstr.prototype; + members.map(function (_ref4) { + var _ref5 = _slicedToArray(_ref4, 2), + memberName = _ref5[0], + _ref5$ = _slicedToArray(_ref5[1], 1), + memberFlags = _ref5$[0]; + if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ || flags & 2 /* PROXY_FLAGS.proxyState */ && memberFlags & 32 /* MEMBER_FLAGS.State */) { + // proxyComponent - prop + Object.defineProperty(prototype, memberName, { + get: function get() { + // proxyComponent, get value + return getValue(this, memberName); + }, + set: function set(newValue) { + // proxyComponent, set value + setValue(this, memberName, newValue, cmpMeta); + }, + configurable: true, + enumerable: true + }); + } else if (flags & 1 /* PROXY_FLAGS.isElementConstructor */ && memberFlags & 64 /* MEMBER_FLAGS.Method */) { + // proxyComponent - method + Object.defineProperty(prototype, memberName, { + value: function value() { + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + var ref = getHostRef(this); + return ref.$onInstancePromise$.then(function () { + var _ref$$lazyInstance$; + return (_ref$$lazyInstance$ = ref.$lazyInstance$)[memberName].apply(_ref$$lazyInstance$, args); + }); + } + }); + } + }); + if (flags & 1 /* PROXY_FLAGS.isElementConstructor */) { + var attrNameToPropName = new Map(); + prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) { + var _this = this; + plt.jmp(function () { + var propName = attrNameToPropName.get(attrName); + // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback + // in the case where an attribute was set inline. + // ```html + // <my-component some-attribute="some-value"></my-component> + // ``` + // + // There is an edge case where a developer sets the attribute inline on a custom element and then + // programmatically changes it before it has been upgraded as shown below: + // + // ```html + // <!-- this component has _not_ been upgraded yet --> + // <my-component id="test" some-attribute="some-value"></my-component> + // <script> + // // grab non-upgraded component + // el = document.querySelector("#test"); + // el.someAttribute = "another-value"; + // // upgrade component + // customElements.define('my-component', MyComponent); + // </script> + // ``` + // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback + // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value") + // to the value that was set inline i.e. "some-value" from above example. When + // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value" + // + // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed + // by connectedCallback as this attributeChangedCallback will not fire. + // + // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties + // + // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to + // properties here given that this goes against best practices outlined here + // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy + if (_this.hasOwnProperty(propName)) { + newValue = _this[propName]; + delete _this[propName]; + } else if (prototype.hasOwnProperty(propName) && typeof _this[propName] === 'number' && _this[propName] == newValue) { + // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native + // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in + // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props. + return; + } + _this[propName] = newValue === null && typeof _this[propName] === 'boolean' ? false : newValue; + }); + }; + // create an array of attributes to observe + // and also create a map of html attribute name to js property name + Cstr.observedAttributes = members.filter(function (_ref6) { + var _ref7 = _slicedToArray(_ref6, 2), + _ = _ref7[0], + m = _ref7[1]; + return m[0] & 15; + } /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes + .map(function (_ref8) { + var _ref9 = _slicedToArray(_ref8, 2), + propName = _ref9[0], + m = _ref9[1]; + var attrName = m[1] || propName; + attrNameToPropName.set(attrName, propName); + return attrName; + }); + } + } + return Cstr; +}; +var initializeComponent = /*#__PURE__*/function () { + var _ref10 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(elm, hostRef, cmpMeta, hmrVersionId, Cstr) { + var endLoad, endNewInstance, style, _scopeId, endRegisterStyles, ancestorComponent, schedule; + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + if (!((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0)) { + _context2.next = 16; + break; + } + // Let the runtime know that the component has been initialized + hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */; + // lazy loaded components + // request the component's implementation to be + // wired up with the host element + Cstr = loadModule(cmpMeta); + if (!Cstr.then) { + _context2.next = 9; + break; + } + // Await creates a micro-task avoid if possible + endLoad = uniqueTime(); + _context2.next = 7; + return Cstr; + case 7: + Cstr = _context2.sent; + endLoad(); + case 9: + if (!Cstr.isProxied) { + proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */); + Cstr.isProxied = true; + } + endNewInstance = createTime('createInstance', cmpMeta.$tagName$); // ok, time to construct the instance + // but let's keep track of when we start and stop + // so that the getters/setters don't incorrectly step on data + hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */; + // construct the lazy-loaded component implementation + // passing the hostRef is very important during + // construction in order to directly wire together the + // host element and the lazy-loaded instance + try { + new Cstr(hostRef); + } catch (e) { + consoleError(e); + } + hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */; + endNewInstance(); + if (Cstr.style) { + // this component has styles but we haven't registered them yet + style = Cstr.style; + _scopeId = getScopeId(cmpMeta); + if (!styles.has(_scopeId)) { + endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$); + registerStyle(_scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */)); + endRegisterStyles(); + } + } + case 16: + // we've successfully created a lazy instance + ancestorComponent = hostRef.$ancestorComponent$; + schedule = function schedule() { + return scheduleUpdate(hostRef, true); + }; + if (ancestorComponent && ancestorComponent['s-rc']) { + // this is the initial load and this component it has an ancestor component + // but the ancestor component has NOT fired its will update lifecycle yet + // so let's just cool our jets and wait for the ancestor to continue first + // this will get fired off when the ancestor component + // finally gets around to rendering its lazy self + // fire off the initial update + ancestorComponent['s-rc'].push(schedule); + } else { + schedule(); + } + case 19: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return function initializeComponent(_x4, _x5, _x6, _x7, _x8) { + return _ref10.apply(this, arguments); + }; +}(); +var _connectedCallback = function connectedCallback(elm) { + if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) { + var hostRef = getHostRef(elm); + var cmpMeta = hostRef.$cmpMeta$; + var endConnected = createTime('connectedCallback', cmpMeta.$tagName$); + if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) { + // first time this component has connected + hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */; + { + // find the first ancestor component (if there is one) and register + // this component as one of the actively loading child components for its ancestor + var ancestorComponent = elm; + while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) { + // climb up the ancestors looking for the first + // component that hasn't finished its lifecycle update yet + if (ancestorComponent['s-p']) { + // we found this components first ancestor component + // keep a reference to this component's ancestor component + attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent); + break; + } + } + } + // Lazy properties + // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties + if (cmpMeta.$members$) { + Object.entries(cmpMeta.$members$).map(function (_ref11) { + var _ref12 = _slicedToArray(_ref11, 2), + memberName = _ref12[0], + _ref12$ = _slicedToArray(_ref12[1], 1), + memberFlags = _ref12$[0]; + if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) { + var value = elm[memberName]; + delete elm[memberName]; + elm[memberName] = value; + } + }); + } + { + initializeComponent(elm, hostRef, cmpMeta); + } + } else { + // not the first time this has connected + // reattach any event listeners to the host + // since they would have been removed when disconnected + addHostEventListeners(elm, hostRef, cmpMeta.$listeners$); + } + endConnected(); + } +}; +var _disconnectedCallback = function disconnectedCallback(elm) { + if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) { + var hostRef = getHostRef(elm); + var instance = hostRef.$lazyInstance$; + { + if (hostRef.$rmListeners$) { + hostRef.$rmListeners$.map(function (rmListener) { + return rmListener(); + }); + hostRef.$rmListeners$ = undefined; + } + } + { + safeCall(instance, 'disconnectedCallback'); + } + } +}; +var bootstrapLazy = function bootstrapLazy(lazyBundles) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var _a; + var endBootstrap = createTime(); + var cmpTags = []; + var exclude = options.exclude || []; + var customElements = win.customElements; + var head = doc.head; + var metaCharset = /*@__PURE__*/head.querySelector('meta[charset]'); + var visibilityStyle = /*@__PURE__*/doc.createElement('style'); + var deferredConnectedCallbacks = []; + var appLoadFallback; + var isBootstrapping = true; + Object.assign(plt, options); + plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href; + lazyBundles.map(function (lazyBundle) { + lazyBundle[1].map(function (compactMeta) { + var cmpMeta = { + $flags$: compactMeta[0], + $tagName$: compactMeta[1], + $members$: compactMeta[2], + $listeners$: compactMeta[3] + }; + { + cmpMeta.$members$ = compactMeta[2]; + } + { + cmpMeta.$listeners$ = compactMeta[3]; + } + var tagName = cmpMeta.$tagName$; + var HostElement = /*#__PURE__*/function (_HTMLElement) { + // StencilLazyHost + function HostElement(self) { + var _this2; + _classCallCheck(this, HostElement); + // @ts-ignore + _this2 = _callSuper(this, HostElement, [self]); + self = _this2; + registerHost(self, cmpMeta); + if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) { + // this component is using shadow dom + // and this browser supports shadow dom + // add the read-only property "shadowRoot" to the host element + // adding the shadow root build conditionals to minimize runtime + { + { + self.attachShadow({ + mode: 'open' + }); + } + } + } + return _this2; + } + _inherits(HostElement, _HTMLElement); + return _createClass(HostElement, [{ + key: "connectedCallback", + value: function connectedCallback() { + var _this3 = this; + if (appLoadFallback) { + clearTimeout(appLoadFallback); + appLoadFallback = null; + } + if (isBootstrapping) { + // connectedCallback will be processed once all components have been registered + deferredConnectedCallbacks.push(this); + } else { + plt.jmp(function () { + return _connectedCallback(_this3); + }); + } + } + }, { + key: "disconnectedCallback", + value: function disconnectedCallback() { + var _this4 = this; + plt.jmp(function () { + return _disconnectedCallback(_this4); + }); + } + }, { + key: "componentOnReady", + value: function componentOnReady() { + return getHostRef(this).$onReadyPromise$; + } + }]); + }(/*#__PURE__*/_wrapNativeSuper(HTMLElement)); + cmpMeta.$lazyBundleId$ = lazyBundle[0]; + if (!exclude.includes(tagName) && !customElements.get(tagName)) { + cmpTags.push(tagName); + customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */)); + } + }); + }); + { + visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS; + visibilityStyle.setAttribute('data-styles', ''); + // Apply CSP nonce to the style tag if it exists + var nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc); + if (nonce != null) { + visibilityStyle.setAttribute('nonce', nonce); + } + head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild); + } + // Process deferred connectedCallbacks now all components have been registered + isBootstrapping = false; + if (deferredConnectedCallbacks.length) { + deferredConnectedCallbacks.map(function (host) { + return host.connectedCallback(); + }); + } else { + { + plt.jmp(function () { + return appLoadFallback = setTimeout(appDidLoad, 30); + }); + } + } + // Fallback appLoad event + endBootstrap(); +}; +var addHostEventListeners = function addHostEventListeners(elm, hostRef, listeners, attachParentListeners) { + if (listeners) { + listeners.map(function (_ref13) { + var _ref14 = _slicedToArray(_ref13, 3), + flags = _ref14[0], + name = _ref14[1], + method = _ref14[2]; + var target = getHostListenerTarget(elm, flags); + var handler = hostListenerProxy(hostRef, method); + var opts = hostListenerOpts(flags); + plt.ael(target, name, handler, opts); + (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(function () { + return plt.rel(target, name, handler, opts); + }); + }); + } +}; +var hostListenerProxy = function hostListenerProxy(hostRef, methodName) { + return function (ev) { + try { + { + if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) { + // instance is ready, let's call it's member method for this event + hostRef.$lazyInstance$[methodName](ev); + } else { + (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]); + } + } + } catch (e) { + consoleError(e); + } + }; +}; +var getHostListenerTarget = function getHostListenerTarget(elm, flags) { + if (flags & 16 /* LISTENER_FLAGS.TargetBody */) return doc.body; + return elm; +}; +// prettier-ignore +var hostListenerOpts = function hostListenerOpts(flags) { + return (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0; +}; +/** + * Assigns the given value to the nonce property on the runtime platform object. + * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags. + * @param nonce The value to be assigned to the platform nonce property. + * @returns void + */ +var setNonce = function setNonce(nonce) { + return plt.$nonce$ = nonce; +}; +var hostRefs = /*@__PURE__*/new WeakMap(); +var getHostRef = function getHostRef(ref) { + return hostRefs.get(ref); +}; +var registerInstance = function registerInstance(lazyInstance, hostRef) { + return hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef); +}; +var registerHost = function registerHost(elm, cmpMeta) { + var hostRef = { + $flags$: 0, + $hostElement$: elm, + $cmpMeta$: cmpMeta, + $instanceValues$: new Map() + }; + { + hostRef.$onInstancePromise$ = new Promise(function (r) { + return hostRef.$onInstanceResolve$ = r; + }); + } + { + hostRef.$onReadyPromise$ = new Promise(function (r) { + return hostRef.$onReadyResolve$ = r; + }); + elm['s-p'] = []; + elm['s-rc'] = []; + } + addHostEventListeners(elm, hostRef, cmpMeta.$listeners$); + return hostRefs.set(elm, hostRef); +}; +var isMemberInElement = function isMemberInElement(elm, memberName) { + return memberName in elm; +}; +var consoleError = function consoleError(e, el) { + return (0, console.error)(e, el); +}; +var cmpModules = /*@__PURE__*/new Map(); +var loadModule = function loadModule(cmpMeta, hostRef, hmrVersionId) { + // loadModuleImport + var exportName = cmpMeta.$tagName$.replace(/-/g, '_'); + var bundleId = cmpMeta.$lazyBundleId$; + var module = cmpModules.get(bundleId); + if (module) { + return module[exportName]; + } + if (!hmrVersionId || !BUILD.hotModuleReplacement) { + var processMod = function processMod(importedModule) { + cmpModules.set(bundleId, importedModule); + return importedModule[exportName]; + }; + switch (bundleId) { + case 'pwa-action-sheet': + return import(/* webpackMode: "lazy" */ + './pwa-action-sheet.entry.js').then(processMod, consoleError); + case 'pwa-camera-modal': + return import(/* webpackMode: "lazy" */ + './pwa-camera-modal.entry.js').then(processMod, consoleError); + case 'pwa-toast': + return import(/* webpackMode: "lazy" */ + './pwa-toast.entry.js').then(processMod, consoleError); + case 'pwa-camera-modal-instance': + return import(/* webpackMode: "lazy" */ + './pwa-camera-modal-instance.entry.js').then(processMod, consoleError); + case 'pwa-camera': + return import(/* webpackMode: "lazy" */ + './pwa-camera.entry.js').then(processMod, consoleError); + } + } + return import( + /* @vite-ignore */ + /* webpackInclude: /\.entry\.js$/ */ + /* webpackExclude: /\.system\.entry\.js$/ */ + /* webpackMode: "lazy" */ + "./".concat(bundleId, ".entry.js")).then(function (importedModule) { + { + cmpModules.set(bundleId, importedModule); + } + return importedModule[exportName]; + }, consoleError); +}; +var styles = /*@__PURE__*/new Map(); +var win = typeof window !== 'undefined' ? window : {}; +var doc = win.document || { + head: {} +}; +var plt = { + $flags$: 0, + $resourcesUrl$: '', + jmp: function jmp(h) { + return h(); + }, + raf: function raf(h) { + return requestAnimationFrame(h); + }, + ael: function ael(el, eventName, listener, opts) { + return el.addEventListener(eventName, listener, opts); + }, + rel: function rel(el, eventName, listener, opts) { + return el.removeEventListener(eventName, listener, opts); + }, + ce: function ce(eventName, opts) { + return new CustomEvent(eventName, opts); + } +}; +var promiseResolve = function promiseResolve(v) { + return Promise.resolve(v); +}; +var supportsConstructableStylesheets = /*@__PURE__*/function () { + try { + new CSSStyleSheet(); + return typeof new CSSStyleSheet().replaceSync === 'function'; + } catch (e) {} + return false; +}(); +var queueDomReads = []; +var queueDomWrites = []; +var queueTask = function queueTask(queue, write) { + return function (cb) { + queue.push(cb); + if (!queuePending) { + queuePending = true; + if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) { + nextTick(_flush); + } else { + plt.raf(_flush); + } + } + }; +}; +var consume = function consume(queue) { + for (var i = 0; i < queue.length; i++) { + try { + queue[i](performance.now()); + } catch (e) { + consoleError(e); + } + } + queue.length = 0; +}; +var _flush = function flush() { + // always force a bunch of medium callbacks to run, but still have + // a throttle on how many can run in a certain time + // DOM READS!!! + consume(queueDomReads); + // DOM WRITES!!! + { + consume(queueDomWrites); + if (queuePending = queueDomReads.length > 0) { + // still more to do yet, but we've run out of time + // let's let this thing cool off and try again in the next tick + plt.raf(_flush); + } + } +}; +var nextTick = /*@__PURE__*/function nextTick(cb) { + return promiseResolve().then(cb); +}; +var writeTask = /*@__PURE__*/queueTask(queueDomWrites, true); +export { Host as H, bootstrapLazy as b, createEvent as c, forceUpdate as f, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s }; \ No newline at end of file diff --git a/src/public/js/pwa-elements/esm/index.js b/src/public/js/pwa-elements/esm/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/public/js/pwa-elements/esm/ionicpwaelements.js b/src/public/js/pwa-elements/esm/ionicpwaelements.js new file mode 100644 index 0000000000000000000000000000000000000000..deec6d9f55e36e98d24761c99571eabafcd2d0d1 --- /dev/null +++ b/src/public/js/pwa-elements/esm/ionicpwaelements.js @@ -0,0 +1,53 @@ +import { p as promiseResolve, b as bootstrapLazy } from './index-1c5c47b4.js'; +export { s as setNonce } from './index-1c5c47b4.js'; + +/* + Stencil Client Patch Browser v3.4.0 | MIT Licensed | https://stenciljs.com + */ +var patchBrowser = function patchBrowser() { + var importMeta = import.meta.url; + var opts = {}; + // TODO(STENCIL-663): Remove code related to deprecated `safari10` field. + if (importMeta !== '') { + opts.resourcesUrl = new URL('.', importMeta).href; + // TODO(STENCIL-661): Remove code related to the dynamic import shim + // TODO(STENCIL-663): Remove code related to deprecated `safari10` field. + } + return promiseResolve(opts); +}; +patchBrowser().then(function (options) { + return bootstrapLazy([["pwa-camera-modal", [[1, "pwa-camera-modal", { + "facingMode": [1, "facing-mode"], + "hidePicker": [4, "hide-picker"], + "present": [64], + "dismiss": [64] + }]]], ["pwa-action-sheet", [[1, "pwa-action-sheet", { + "header": [1], + "cancelable": [4], + "options": [16], + "open": [32] + }]]], ["pwa-toast", [[1, "pwa-toast", { + "message": [1], + "duration": [2], + "closing": [32] + }]]], ["pwa-camera", [[1, "pwa-camera", { + "facingMode": [1, "facing-mode"], + "handlePhoto": [16], + "hidePicker": [4, "hide-picker"], + "handleNoDeviceError": [16], + "noDevicesText": [1, "no-devices-text"], + "noDevicesButtonText": [1, "no-devices-button-text"], + "photo": [32], + "photoSrc": [32], + "showShutterOverlay": [32], + "flashIndex": [32], + "hasCamera": [32], + "rotation": [32], + "deviceError": [32] + }]]], ["pwa-camera-modal-instance", [[1, "pwa-camera-modal-instance", { + "facingMode": [1, "facing-mode"], + "hidePicker": [4, "hide-picker"], + "noDevicesText": [1, "no-devices-text"], + "noDevicesButtonText": [1, "no-devices-button-text"] + }, [[16, "keyup", "handleBackdropKeyUp"]]]]]], options); +}); \ No newline at end of file diff --git a/src/public/js/pwa-elements/esm/loader.js b/src/public/js/pwa-elements/esm/loader.js new file mode 100644 index 0000000000000000000000000000000000000000..9fdcfae7eed5ce3ba9ae5a3f0845a805c57aeb47 --- /dev/null +++ b/src/public/js/pwa-elements/esm/loader.js @@ -0,0 +1,49 @@ +import { p as promiseResolve, b as bootstrapLazy } from './index-1c5c47b4.js'; +export { s as setNonce } from './index-1c5c47b4.js'; + +/* + Stencil Client Patch Esm v3.4.0 | MIT Licensed | https://stenciljs.com + */ +var patchEsm = function patchEsm() { + return promiseResolve(); +}; +var defineCustomElements = function defineCustomElements(win, options) { + if (typeof window === 'undefined') return Promise.resolve(); + return patchEsm().then(function () { + return bootstrapLazy([["pwa-camera-modal", [[1, "pwa-camera-modal", { + "facingMode": [1, "facing-mode"], + "hidePicker": [4, "hide-picker"], + "present": [64], + "dismiss": [64] + }]]], ["pwa-action-sheet", [[1, "pwa-action-sheet", { + "header": [1], + "cancelable": [4], + "options": [16], + "open": [32] + }]]], ["pwa-toast", [[1, "pwa-toast", { + "message": [1], + "duration": [2], + "closing": [32] + }]]], ["pwa-camera", [[1, "pwa-camera", { + "facingMode": [1, "facing-mode"], + "handlePhoto": [16], + "hidePicker": [4, "hide-picker"], + "handleNoDeviceError": [16], + "noDevicesText": [1, "no-devices-text"], + "noDevicesButtonText": [1, "no-devices-button-text"], + "photo": [32], + "photoSrc": [32], + "showShutterOverlay": [32], + "flashIndex": [32], + "hasCamera": [32], + "rotation": [32], + "deviceError": [32] + }]]], ["pwa-camera-modal-instance", [[1, "pwa-camera-modal-instance", { + "facingMode": [1, "facing-mode"], + "hidePicker": [4, "hide-picker"], + "noDevicesText": [1, "no-devices-text"], + "noDevicesButtonText": [1, "no-devices-button-text"] + }, [[16, "keyup", "handleBackdropKeyUp"]]]]]], options); + }); +}; +export { defineCustomElements }; \ No newline at end of file diff --git a/src/public/js/pwa-elements/esm/polyfills/core-js.js b/src/public/js/pwa-elements/esm/polyfills/core-js.js new file mode 100644 index 0000000000000000000000000000000000000000..f96b1e61b9e1146d56fd0d68ab958eb9a62fd1a1 --- /dev/null +++ b/src/public/js/pwa-elements/esm/polyfills/core-js.js @@ -0,0 +1,5393 @@ +/** + * core-js 3.6.5 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2019 Denis Pushkarev (zloirock.ru) + */ +!function (t) { + "use strict"; + + !function (t) { + var n = {}; + function e(r) { + if (n[r]) return n[r].exports; + var o = n[r] = { + i: r, + l: !1, + exports: {} + }; + return t[r].call(o.exports, o, o.exports, e), o.l = !0, o.exports; + } + e.m = t, e.c = n, e.d = function (t, n, r) { + e.o(t, n) || Object.defineProperty(t, n, { + enumerable: !0, + get: r + }); + }, e.r = function (t) { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { + value: "Module" + }), Object.defineProperty(t, "__esModule", { + value: !0 + }); + }, e.t = function (t, n) { + if (1 & n && (t = e(t)), 8 & n) return t; + if (4 & n && "object" == typeof t && t && t.__esModule) return t; + var r = Object.create(null); + if (e.r(r), Object.defineProperty(r, "default", { + enumerable: !0, + value: t + }), 2 & n && "string" != typeof t) for (var o in t) e.d(r, o, function (n) { + return t[n]; + }.bind(null, o)); + return r; + }, e.n = function (t) { + var n = t && t.__esModule ? function () { + return t.default; + } : function () { + return t; + }; + return e.d(n, "a", n), n; + }, e.o = function (t, n) { + return Object.prototype.hasOwnProperty.call(t, n); + }, e.p = "", e(e.s = 0); + }([function (t, n, e) { + e(1), e(55), e(62), e(68), e(70), e(71), e(72), e(73), e(75), e(76), e(78), e(87), e(88), e(89), e(98), e(99), e(101), e(102), e(103), e(105), e(106), e(107), e(108), e(110), e(111), e(112), e(113), e(114), e(115), e(116), e(117), e(118), e(127), e(130), e(131), e(133), e(135), e(136), e(137), e(138), e(139), e(141), e(143), e(146), e(148), e(150), e(151), e(153), e(154), e(155), e(156), e(157), e(159), e(160), e(162), e(163), e(164), e(165), e(166), e(167), e(168), e(169), e(170), e(172), e(173), e(183), e(184), e(185), e(189), e(191), e(192), e(193), e(194), e(195), e(196), e(198), e(201), e(202), e(203), e(204), e(208), e(209), e(212), e(213), e(214), e(215), e(216), e(217), e(218), e(219), e(221), e(222), e(223), e(226), e(227), e(228), e(229), e(230), e(231), e(232), e(233), e(234), e(235), e(236), e(237), e(238), e(240), e(241), e(243), e(248), t.exports = e(246); + }, function (t, n, e) { + var r = e(2), + o = e(6), + i = e(45), + a = e(14), + u = e(46), + c = e(39), + f = e(47), + s = e(48), + l = e(52), + p = e(49), + h = e(53), + v = p("isConcatSpreadable"), + g = h >= 51 || !o(function () { + var t = []; + return t[v] = !1, t.concat()[0] !== t; + }), + d = l("concat"), + y = function y(t) { + if (!a(t)) return !1; + var n = t[v]; + return void 0 !== n ? !!n : i(t); + }; + r({ + target: "Array", + proto: !0, + forced: !g || !d + }, { + concat: function concat(t) { + var n, + e, + r, + o, + i, + a = u(this), + l = s(a, 0), + p = 0; + for (n = -1, r = arguments.length; n < r; n++) if (i = -1 === n ? a : arguments[n], y(i)) { + if (p + (o = c(i.length)) > 9007199254740991) throw TypeError("Maximum allowed index exceeded"); + for (e = 0; e < o; e++, p++) e in i && f(l, p, i[e]); + } else { + if (p >= 9007199254740991) throw TypeError("Maximum allowed index exceeded"); + f(l, p++, i); + } + return l.length = p, l; + } + }); + }, function (t, n, e) { + var r = e(3), + o = e(4).f, + i = e(18), + a = e(21), + u = e(22), + c = e(32), + f = e(44); + t.exports = function (t, n) { + var e, + s, + l, + p, + h, + v = t.target, + g = t.global, + d = t.stat; + if (e = g ? r : d ? r[v] || u(v, {}) : (r[v] || {}).prototype) for (s in n) { + if (p = n[s], l = t.noTargetGet ? (h = o(e, s)) && h.value : e[s], !f(g ? s : v + (d ? "." : "#") + s, t.forced) && void 0 !== l) { + if (typeof p == typeof l) continue; + c(p, l); + } + (t.sham || l && l.sham) && i(p, "sham", !0), a(e, s, p, t); + } + }; + }, function (t, n) { + var e = function e(t) { + return t && t.Math == Math && t; + }; + t.exports = e("object" == typeof globalThis && globalThis) || e("object" == typeof window && window) || e("object" == typeof self && self) || e("object" == typeof global && global) || Function("return this")(); + }, function (t, n, e) { + var r = e(5), + o = e(7), + i = e(8), + a = e(9), + u = e(13), + c = e(15), + f = e(16), + s = Object.getOwnPropertyDescriptor; + n.f = r ? s : function (t, n) { + if (t = a(t), n = u(n, !0), f) try { + return s(t, n); + } catch (t) {} + if (c(t, n)) return i(!o.f.call(t, n), t[n]); + }; + }, function (t, n, e) { + var r = e(6); + t.exports = !r(function () { + return 7 != Object.defineProperty({}, 1, { + get: function get() { + return 7; + } + })[1]; + }); + }, function (t, n) { + t.exports = function (t) { + try { + return !!t(); + } catch (t) { + return !0; + } + }; + }, function (t, n, e) { + var r = {}.propertyIsEnumerable, + o = Object.getOwnPropertyDescriptor, + i = o && !r.call({ + 1: 2 + }, 1); + n.f = i ? function (t) { + var n = o(this, t); + return !!n && n.enumerable; + } : r; + }, function (t, n) { + t.exports = function (t, n) { + return { + enumerable: !(1 & t), + configurable: !(2 & t), + writable: !(4 & t), + value: n + }; + }; + }, function (t, n, e) { + var r = e(10), + o = e(12); + t.exports = function (t) { + return r(o(t)); + }; + }, function (t, n, e) { + var r = e(6), + o = e(11), + i = "".split; + t.exports = r(function () { + return !Object("z").propertyIsEnumerable(0); + }) ? function (t) { + return "String" == o(t) ? i.call(t, "") : Object(t); + } : Object; + }, function (t, n) { + var e = {}.toString; + t.exports = function (t) { + return e.call(t).slice(8, -1); + }; + }, function (t, n) { + t.exports = function (t) { + if (null == t) throw TypeError("Can't call method on " + t); + return t; + }; + }, function (t, n, e) { + var r = e(14); + t.exports = function (t, n) { + if (!r(t)) return t; + var e, o; + if (n && "function" == typeof (e = t.toString) && !r(o = e.call(t))) return o; + if ("function" == typeof (e = t.valueOf) && !r(o = e.call(t))) return o; + if (!n && "function" == typeof (e = t.toString) && !r(o = e.call(t))) return o; + throw TypeError("Can't convert object to primitive value"); + }; + }, function (t, n) { + t.exports = function (t) { + return "object" == typeof t ? null !== t : "function" == typeof t; + }; + }, function (t, n) { + var e = {}.hasOwnProperty; + t.exports = function (t, n) { + return e.call(t, n); + }; + }, function (t, n, e) { + var r = e(5), + o = e(6), + i = e(17); + t.exports = !r && !o(function () { + return 7 != Object.defineProperty(i("div"), "a", { + get: function get() { + return 7; + } + }).a; + }); + }, function (t, n, e) { + var r = e(3), + o = e(14), + i = r.document, + a = o(i) && o(i.createElement); + t.exports = function (t) { + return a ? i.createElement(t) : {}; + }; + }, function (t, n, e) { + var r = e(5), + o = e(19), + i = e(8); + t.exports = r ? function (t, n, e) { + return o.f(t, n, i(1, e)); + } : function (t, n, e) { + return t[n] = e, t; + }; + }, function (t, n, e) { + var r = e(5), + o = e(16), + i = e(20), + a = e(13), + u = Object.defineProperty; + n.f = r ? u : function (t, n, e) { + if (i(t), n = a(n, !0), i(e), o) try { + return u(t, n, e); + } catch (t) {} + if ("get" in e || "set" in e) throw TypeError("Accessors not supported"); + return "value" in e && (t[n] = e.value), t; + }; + }, function (t, n, e) { + var r = e(14); + t.exports = function (t) { + if (!r(t)) throw TypeError(String(t) + " is not an object"); + return t; + }; + }, function (t, n, e) { + var r = e(3), + o = e(18), + i = e(15), + a = e(22), + u = e(23), + c = e(25), + f = c.get, + s = c.enforce, + l = String(String).split("String"); + (t.exports = function (t, n, e, u) { + var c = !!u && !!u.unsafe, + f = !!u && !!u.enumerable, + p = !!u && !!u.noTargetGet; + "function" == typeof e && ("string" != typeof n || i(e, "name") || o(e, "name", n), s(e).source = l.join("string" == typeof n ? n : "")), t !== r ? (c ? !p && t[n] && (f = !0) : delete t[n], f ? t[n] = e : o(t, n, e)) : f ? t[n] = e : a(n, e); + })(Function.prototype, "toString", function () { + return "function" == typeof this && f(this).source || u(this); + }); + }, function (t, n, e) { + var r = e(3), + o = e(18); + t.exports = function (t, n) { + try { + o(r, t, n); + } catch (e) { + r[t] = n; + } + return n; + }; + }, function (t, n, e) { + var r = e(24), + o = Function.toString; + "function" != typeof r.inspectSource && (r.inspectSource = function (t) { + return o.call(t); + }), t.exports = r.inspectSource; + }, function (t, n, e) { + var r = e(3), + o = e(22), + i = r["__core-js_shared__"] || o("__core-js_shared__", {}); + t.exports = i; + }, function (t, n, e) { + var r, + o, + i, + a = e(26), + u = e(3), + c = e(14), + f = e(18), + s = e(15), + l = e(27), + p = e(31), + h = u.WeakMap; + if (a) { + var v = new h(), + g = v.get, + d = v.has, + y = v.set; + r = function r(t, n) { + return y.call(v, t, n), n; + }, o = function o(t) { + return g.call(v, t) || {}; + }, i = function i(t) { + return d.call(v, t); + }; + } else { + var x = l("state"); + p[x] = !0, r = function r(t, n) { + return f(t, x, n), n; + }, o = function o(t) { + return s(t, x) ? t[x] : {}; + }, i = function i(t) { + return s(t, x); + }; + } + t.exports = { + set: r, + get: o, + has: i, + enforce: function enforce(t) { + return i(t) ? o(t) : r(t, {}); + }, + getterFor: function getterFor(t) { + return function (n) { + var e; + if (!c(n) || (e = o(n)).type !== t) throw TypeError("Incompatible receiver, " + t + " required"); + return e; + }; + } + }; + }, function (t, n, e) { + var r = e(3), + o = e(23), + i = r.WeakMap; + t.exports = "function" == typeof i && /native code/.test(o(i)); + }, function (t, n, e) { + var r = e(28), + o = e(30), + i = r("keys"); + t.exports = function (t) { + return i[t] || (i[t] = o(t)); + }; + }, function (t, n, e) { + var r = e(29), + o = e(24); + (t.exports = function (t, n) { + return o[t] || (o[t] = void 0 !== n ? n : {}); + })("versions", []).push({ + version: "3.6.5", + mode: r ? "pure" : "global", + copyright: "© 2020 Denis Pushkarev (zloirock.ru)" + }); + }, function (t, n) { + t.exports = !1; + }, function (t, n) { + var e = 0, + r = Math.random(); + t.exports = function (t) { + return "Symbol(" + String(void 0 === t ? "" : t) + ")_" + (++e + r).toString(36); + }; + }, function (t, n) { + t.exports = {}; + }, function (t, n, e) { + var r = e(15), + o = e(33), + i = e(4), + a = e(19); + t.exports = function (t, n) { + for (var e = o(n), u = a.f, c = i.f, f = 0; f < e.length; f++) { + var s = e[f]; + r(t, s) || u(t, s, c(n, s)); + } + }; + }, function (t, n, e) { + var r = e(34), + o = e(36), + i = e(43), + a = e(20); + t.exports = r("Reflect", "ownKeys") || function (t) { + var n = o.f(a(t)), + e = i.f; + return e ? n.concat(e(t)) : n; + }; + }, function (t, n, e) { + var r = e(35), + o = e(3), + i = function i(t) { + return "function" == typeof t ? t : void 0; + }; + t.exports = function (t, n) { + return arguments.length < 2 ? i(r[t]) || i(o[t]) : r[t] && r[t][n] || o[t] && o[t][n]; + }; + }, function (t, n, e) { + var r = e(3); + t.exports = r; + }, function (t, n, e) { + var r = e(37), + o = e(42).concat("length", "prototype"); + n.f = Object.getOwnPropertyNames || function (t) { + return r(t, o); + }; + }, function (t, n, e) { + var r = e(15), + o = e(9), + i = e(38).indexOf, + a = e(31); + t.exports = function (t, n) { + var e, + u = o(t), + c = 0, + f = []; + for (e in u) !r(a, e) && r(u, e) && f.push(e); + for (; n.length > c;) r(u, e = n[c++]) && (~i(f, e) || f.push(e)); + return f; + }; + }, function (t, n, e) { + var r = e(9), + o = e(39), + i = e(41), + a = function a(t) { + return function (n, e, a) { + var u, + c = r(n), + f = o(c.length), + s = i(a, f); + if (t && e != e) { + for (; f > s;) if ((u = c[s++]) != u) return !0; + } else for (; f > s; s++) if ((t || s in c) && c[s] === e) return t || s || 0; + return !t && -1; + }; + }; + t.exports = { + includes: a(!0), + indexOf: a(!1) + }; + }, function (t, n, e) { + var r = e(40), + o = Math.min; + t.exports = function (t) { + return t > 0 ? o(r(t), 9007199254740991) : 0; + }; + }, function (t, n) { + var e = Math.ceil, + r = Math.floor; + t.exports = function (t) { + return isNaN(t = +t) ? 0 : (t > 0 ? r : e)(t); + }; + }, function (t, n, e) { + var r = e(40), + o = Math.max, + i = Math.min; + t.exports = function (t, n) { + var e = r(t); + return e < 0 ? o(e + n, 0) : i(e, n); + }; + }, function (t, n) { + t.exports = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf"]; + }, function (t, n) { + n.f = Object.getOwnPropertySymbols; + }, function (t, n, e) { + var r = e(6), + o = /#|\.prototype\./, + i = function i(t, n) { + var e = u[a(t)]; + return e == f || e != c && ("function" == typeof n ? r(n) : !!n); + }, + a = i.normalize = function (t) { + return String(t).replace(o, ".").toLowerCase(); + }, + u = i.data = {}, + c = i.NATIVE = "N", + f = i.POLYFILL = "P"; + t.exports = i; + }, function (t, n, e) { + var r = e(11); + t.exports = Array.isArray || function (t) { + return "Array" == r(t); + }; + }, function (t, n, e) { + var r = e(12); + t.exports = function (t) { + return Object(r(t)); + }; + }, function (t, n, e) { + var r = e(13), + o = e(19), + i = e(8); + t.exports = function (t, n, e) { + var a = r(n); + a in t ? o.f(t, a, i(0, e)) : t[a] = e; + }; + }, function (t, n, e) { + var r = e(14), + o = e(45), + i = e(49)("species"); + t.exports = function (t, n) { + var e; + return o(t) && ("function" != typeof (e = t.constructor) || e !== Array && !o(e.prototype) ? r(e) && null === (e = e[i]) && (e = void 0) : e = void 0), new (void 0 === e ? Array : e)(0 === n ? 0 : n); + }; + }, function (t, n, e) { + var r = e(3), + o = e(28), + i = e(15), + a = e(30), + u = e(50), + c = e(51), + f = o("wks"), + s = r.Symbol, + l = c ? s : s && s.withoutSetter || a; + t.exports = function (t) { + return i(f, t) || (u && i(s, t) ? f[t] = s[t] : f[t] = l("Symbol." + t)), f[t]; + }; + }, function (t, n, e) { + var r = e(6); + t.exports = !!Object.getOwnPropertySymbols && !r(function () { + return !String(Symbol()); + }); + }, function (t, n, e) { + var r = e(50); + t.exports = r && !Symbol.sham && "symbol" == typeof Symbol.iterator; + }, function (t, n, e) { + var r = e(6), + o = e(49), + i = e(53), + a = o("species"); + t.exports = function (t) { + return i >= 51 || !r(function () { + var n = []; + return (n.constructor = {})[a] = function () { + return { + foo: 1 + }; + }, 1 !== n[t](Boolean).foo; + }); + }; + }, function (t, n, e) { + var r, + o, + i = e(3), + a = e(54), + u = i.process, + c = u && u.versions, + f = c && c.v8; + f ? o = (r = f.split("."))[0] + r[1] : a && (!(r = a.match(/Edge\/(\d+)/)) || r[1] >= 74) && (r = a.match(/Chrome\/(\d+)/)) && (o = r[1]), t.exports = o && +o; + }, function (t, n, e) { + var r = e(34); + t.exports = r("navigator", "userAgent") || ""; + }, function (t, n, e) { + var r = e(2), + o = e(56), + i = e(57); + r({ + target: "Array", + proto: !0 + }, { + copyWithin: o + }), i("copyWithin"); + }, function (t, n, e) { + var r = e(46), + o = e(41), + i = e(39), + a = Math.min; + t.exports = [].copyWithin || function (t, n) { + var e = r(this), + u = i(e.length), + c = o(t, u), + f = o(n, u), + s = arguments.length > 2 ? arguments[2] : void 0, + l = a((void 0 === s ? u : o(s, u)) - f, u - c), + p = 1; + for (f < c && c < f + l && (p = -1, f += l - 1, c += l - 1); l-- > 0;) f in e ? e[c] = e[f] : delete e[c], c += p, f += p; + return e; + }; + }, function (t, n, e) { + var r = e(49), + o = e(58), + i = e(19), + a = r("unscopables"), + u = Array.prototype; + null == u[a] && i.f(u, a, { + configurable: !0, + value: o(null) + }), t.exports = function (t) { + u[a][t] = !0; + }; + }, function (t, n, e) { + var r, + o = e(20), + i = e(59), + a = e(42), + u = e(31), + c = e(61), + f = e(17), + s = e(27), + l = s("IE_PROTO"), + p = function p() {}, + h = function h(t) { + return "<script>" + t + "<\/script>"; + }, + _v = function v() { + try { + r = document.domain && new ActiveXObject("htmlfile"); + } catch (t) {} + var t, n; + _v = r ? function (t) { + t.write(h("")), t.close(); + var n = t.parentWindow.Object; + return t = null, n; + }(r) : ((n = f("iframe")).style.display = "none", c.appendChild(n), n.src = String("javascript:"), (t = n.contentWindow.document).open(), t.write(h("document.F=Object")), t.close(), t.F); + for (var e = a.length; e--;) delete _v.prototype[a[e]]; + return _v(); + }; + u[l] = !0, t.exports = Object.create || function (t, n) { + var e; + return null !== t ? (p.prototype = o(t), e = new p(), p.prototype = null, e[l] = t) : e = _v(), void 0 === n ? e : i(e, n); + }; + }, function (t, n, e) { + var r = e(5), + o = e(19), + i = e(20), + a = e(60); + t.exports = r ? Object.defineProperties : function (t, n) { + i(t); + for (var e, r = a(n), u = r.length, c = 0; u > c;) o.f(t, e = r[c++], n[e]); + return t; + }; + }, function (t, n, e) { + var r = e(37), + o = e(42); + t.exports = Object.keys || function (t) { + return r(t, o); + }; + }, function (t, n, e) { + var r = e(34); + t.exports = r("document", "documentElement"); + }, function (t, n, e) { + var r = e(2), + o = e(63).every, + i = e(66), + a = e(67), + u = i("every"), + c = a("every"); + r({ + target: "Array", + proto: !0, + forced: !u || !c + }, { + every: function every(t) { + return o(this, t, arguments.length > 1 ? arguments[1] : void 0); + } + }); + }, function (t, n, e) { + var r = e(64), + o = e(10), + i = e(46), + a = e(39), + u = e(48), + c = [].push, + f = function f(t) { + var n = 1 == t, + e = 2 == t, + f = 3 == t, + s = 4 == t, + l = 6 == t, + p = 5 == t || l; + return function (h, v, g, d) { + for (var y, x, m = i(h), b = o(m), S = r(v, g, 3), E = a(b.length), w = 0, O = d || u, R = n ? O(h, E) : e ? O(h, 0) : void 0; E > w; w++) if ((p || w in b) && (x = S(y = b[w], w, m), t)) if (n) R[w] = x;else if (x) switch (t) { + case 3: + return !0; + case 5: + return y; + case 6: + return w; + case 2: + c.call(R, y); + } else if (s) return !1; + return l ? -1 : f || s ? s : R; + }; + }; + t.exports = { + forEach: f(0), + map: f(1), + filter: f(2), + some: f(3), + every: f(4), + find: f(5), + findIndex: f(6) + }; + }, function (t, n, e) { + var r = e(65); + t.exports = function (t, n, e) { + if (r(t), void 0 === n) return t; + switch (e) { + case 0: + return function () { + return t.call(n); + }; + case 1: + return function (e) { + return t.call(n, e); + }; + case 2: + return function (e, r) { + return t.call(n, e, r); + }; + case 3: + return function (e, r, o) { + return t.call(n, e, r, o); + }; + } + return function () { + return t.apply(n, arguments); + }; + }; + }, function (t, n) { + t.exports = function (t) { + if ("function" != typeof t) throw TypeError(String(t) + " is not a function"); + return t; + }; + }, function (t, n, e) { + var r = e(6); + t.exports = function (t, n) { + var e = [][t]; + return !!e && r(function () { + e.call(null, n || function () { + throw 1; + }, 1); + }); + }; + }, function (t, n, e) { + var r = e(5), + o = e(6), + i = e(15), + a = Object.defineProperty, + u = {}, + c = function c(t) { + throw t; + }; + t.exports = function (t, n) { + if (i(u, t)) return u[t]; + n || (n = {}); + var e = [][t], + f = !!i(n, "ACCESSORS") && n.ACCESSORS, + s = i(n, 0) ? n[0] : c, + l = i(n, 1) ? n[1] : void 0; + return u[t] = !!e && !o(function () { + if (f && !r) return !0; + var t = { + length: -1 + }; + f ? a(t, 1, { + enumerable: !0, + get: c + }) : t[1] = 1, e.call(t, s, l); + }); + }; + }, function (t, n, e) { + var r = e(2), + o = e(69), + i = e(57); + r({ + target: "Array", + proto: !0 + }, { + fill: o + }), i("fill"); + }, function (t, n, e) { + var r = e(46), + o = e(41), + i = e(39); + t.exports = function (t) { + for (var n = r(this), e = i(n.length), a = arguments.length, u = o(a > 1 ? arguments[1] : void 0, e), c = a > 2 ? arguments[2] : void 0, f = void 0 === c ? e : o(c, e); f > u;) n[u++] = t; + return n; + }; + }, function (t, n, e) { + var r = e(2), + o = e(63).filter, + i = e(52), + a = e(67), + u = i("filter"), + c = a("filter"); + r({ + target: "Array", + proto: !0, + forced: !u || !c + }, { + filter: function filter(t) { + return o(this, t, arguments.length > 1 ? arguments[1] : void 0); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(63).find, + i = e(57), + a = e(67), + u = !0, + c = a("find"); + "find" in [] && Array(1).find(function () { + u = !1; + }), r({ + target: "Array", + proto: !0, + forced: u || !c + }, { + find: function find(t) { + return o(this, t, arguments.length > 1 ? arguments[1] : void 0); + } + }), i("find"); + }, function (t, n, e) { + var r = e(2), + o = e(63).findIndex, + i = e(57), + a = e(67), + u = !0, + c = a("findIndex"); + "findIndex" in [] && Array(1).findIndex(function () { + u = !1; + }), r({ + target: "Array", + proto: !0, + forced: u || !c + }, { + findIndex: function findIndex(t) { + return o(this, t, arguments.length > 1 ? arguments[1] : void 0); + } + }), i("findIndex"); + }, function (t, n, e) { + var r = e(2), + o = e(74), + i = e(46), + a = e(39), + u = e(40), + c = e(48); + r({ + target: "Array", + proto: !0 + }, { + flat: function flat() { + var t = arguments.length ? arguments[0] : void 0, + n = i(this), + e = a(n.length), + r = c(n, 0); + return r.length = o(r, n, n, e, 0, void 0 === t ? 1 : u(t)), r; + } + }); + }, function (t, n, e) { + var r = e(45), + o = e(39), + i = e(64), + _a = function a(t, n, e, u, c, f, s, l) { + for (var p, h = c, v = 0, g = !!s && i(s, l, 3); v < u;) { + if (v in e) { + if (p = g ? g(e[v], v, n) : e[v], f > 0 && r(p)) h = _a(t, n, p, o(p.length), h, f - 1) - 1;else { + if (h >= 9007199254740991) throw TypeError("Exceed the acceptable array length"); + t[h] = p; + } + h++; + } + v++; + } + return h; + }; + t.exports = _a; + }, function (t, n, e) { + var r = e(2), + o = e(74), + i = e(46), + a = e(39), + u = e(65), + c = e(48); + r({ + target: "Array", + proto: !0 + }, { + flatMap: function flatMap(t) { + var n, + e = i(this), + r = a(e.length); + return u(t), (n = c(e, 0)).length = o(n, e, e, r, 0, 1, t, arguments.length > 1 ? arguments[1] : void 0), n; + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(77); + r({ + target: "Array", + proto: !0, + forced: [].forEach != o + }, { + forEach: o + }); + }, function (t, n, e) { + var r = e(63).forEach, + o = e(66), + i = e(67), + a = o("forEach"), + u = i("forEach"); + t.exports = a && u ? [].forEach : function (t) { + return r(this, t, arguments.length > 1 ? arguments[1] : void 0); + }; + }, function (t, n, e) { + var r = e(2), + o = e(79); + r({ + target: "Array", + stat: !0, + forced: !e(86)(function (t) { + Array.from(t); + }) + }, { + from: o + }); + }, function (t, n, e) { + var r = e(64), + o = e(46), + i = e(80), + a = e(81), + u = e(39), + c = e(47), + f = e(83); + t.exports = function (t) { + var n, + e, + s, + l, + p, + h, + v = o(t), + g = "function" == typeof this ? this : Array, + d = arguments.length, + y = d > 1 ? arguments[1] : void 0, + x = void 0 !== y, + m = f(v), + b = 0; + if (x && (y = r(y, d > 2 ? arguments[2] : void 0, 2)), null == m || g == Array && a(m)) for (e = new g(n = u(v.length)); n > b; b++) h = x ? y(v[b], b) : v[b], c(e, b, h);else for (p = (l = m.call(v)).next, e = new g(); !(s = p.call(l)).done; b++) h = x ? i(l, y, [s.value, b], !0) : s.value, c(e, b, h); + return e.length = b, e; + }; + }, function (t, n, e) { + var r = e(20); + t.exports = function (t, n, e, o) { + try { + return o ? n(r(e)[0], e[1]) : n(e); + } catch (n) { + var i = t.return; + throw void 0 !== i && r(i.call(t)), n; + } + }; + }, function (t, n, e) { + var r = e(49), + o = e(82), + i = r("iterator"), + a = Array.prototype; + t.exports = function (t) { + return void 0 !== t && (o.Array === t || a[i] === t); + }; + }, function (t, n) { + t.exports = {}; + }, function (t, n, e) { + var r = e(84), + o = e(82), + i = e(49)("iterator"); + t.exports = function (t) { + if (null != t) return t[i] || t["@@iterator"] || o[r(t)]; + }; + }, function (t, n, e) { + var r = e(85), + o = e(11), + i = e(49)("toStringTag"), + a = "Arguments" == o(function () { + return arguments; + }()); + t.exports = r ? o : function (t) { + var n, e, r; + return void 0 === t ? "Undefined" : null === t ? "Null" : "string" == typeof (e = function (t, n) { + try { + return t[n]; + } catch (t) {} + }(n = Object(t), i)) ? e : a ? o(n) : "Object" == (r = o(n)) && "function" == typeof n.callee ? "Arguments" : r; + }; + }, function (t, n, e) { + var r = {}; + r[e(49)("toStringTag")] = "z", t.exports = "[object z]" === String(r); + }, function (t, n, e) { + var r = e(49)("iterator"), + o = !1; + try { + var i = 0, + a = { + next: function next() { + return { + done: !!i++ + }; + }, + return: function _return() { + o = !0; + } + }; + a[r] = function () { + return this; + }, Array.from(a, function () { + throw 2; + }); + } catch (t) {} + t.exports = function (t, n) { + if (!n && !o) return !1; + var e = !1; + try { + var i = {}; + i[r] = function () { + return { + next: function next() { + return { + done: e = !0 + }; + } + }; + }, t(i); + } catch (t) {} + return e; + }; + }, function (t, n, e) { + var r = e(2), + o = e(38).includes, + i = e(57); + r({ + target: "Array", + proto: !0, + forced: !e(67)("indexOf", { + ACCESSORS: !0, + 1: 0 + }) + }, { + includes: function includes(t) { + return o(this, t, arguments.length > 1 ? arguments[1] : void 0); + } + }), i("includes"); + }, function (t, n, e) { + var r = e(2), + o = e(38).indexOf, + i = e(66), + a = e(67), + u = [].indexOf, + c = !!u && 1 / [1].indexOf(1, -0) < 0, + f = i("indexOf"), + s = a("indexOf", { + ACCESSORS: !0, + 1: 0 + }); + r({ + target: "Array", + proto: !0, + forced: c || !f || !s + }, { + indexOf: function indexOf(t) { + return c ? u.apply(this, arguments) || 0 : o(this, t, arguments.length > 1 ? arguments[1] : void 0); + } + }); + }, function (t, n, e) { + var r = e(9), + o = e(57), + i = e(82), + a = e(25), + u = e(90), + c = a.set, + f = a.getterFor("Array Iterator"); + t.exports = u(Array, "Array", function (t, n) { + c(this, { + type: "Array Iterator", + target: r(t), + index: 0, + kind: n + }); + }, function () { + var t = f(this), + n = t.target, + e = t.kind, + r = t.index++; + return !n || r >= n.length ? (t.target = void 0, { + value: void 0, + done: !0 + }) : "keys" == e ? { + value: r, + done: !1 + } : "values" == e ? { + value: n[r], + done: !1 + } : { + value: [r, n[r]], + done: !1 + }; + }, "values"), i.Arguments = i.Array, o("keys"), o("values"), o("entries"); + }, function (t, n, e) { + var r = e(2), + o = e(91), + i = e(93), + a = e(96), + u = e(95), + c = e(18), + f = e(21), + s = e(49), + l = e(29), + p = e(82), + h = e(92), + v = h.IteratorPrototype, + g = h.BUGGY_SAFARI_ITERATORS, + d = s("iterator"), + y = function y() { + return this; + }; + t.exports = function (t, n, e, s, h, x, m) { + o(e, n, s); + var b, + S, + E, + w = function w(t) { + if (t === h && I) return I; + if (!g && t in A) return A[t]; + switch (t) { + case "keys": + case "values": + case "entries": + return function () { + return new e(this, t); + }; + } + return function () { + return new e(this); + }; + }, + O = n + " Iterator", + R = !1, + A = t.prototype, + j = A[d] || A["@@iterator"] || h && A[h], + I = !g && j || w(h), + k = "Array" == n && A.entries || j; + if (k && (b = i(k.call(new t())), v !== Object.prototype && b.next && (l || i(b) === v || (a ? a(b, v) : "function" != typeof b[d] && c(b, d, y)), u(b, O, !0, !0), l && (p[O] = y))), "values" == h && j && "values" !== j.name && (R = !0, I = function I() { + return j.call(this); + }), l && !m || A[d] === I || c(A, d, I), p[n] = I, h) if (S = { + values: w("values"), + keys: x ? I : w("keys"), + entries: w("entries") + }, m) for (E in S) (g || R || !(E in A)) && f(A, E, S[E]);else r({ + target: n, + proto: !0, + forced: g || R + }, S); + return S; + }; + }, function (t, n, e) { + var r = e(92).IteratorPrototype, + o = e(58), + i = e(8), + a = e(95), + u = e(82), + c = function c() { + return this; + }; + t.exports = function (t, n, e) { + var f = n + " Iterator"; + return t.prototype = o(r, { + next: i(1, e) + }), a(t, f, !1, !0), u[f] = c, t; + }; + }, function (t, n, e) { + var r, + o, + i, + a = e(93), + u = e(18), + c = e(15), + f = e(49), + s = e(29), + l = f("iterator"), + p = !1; + [].keys && ("next" in (i = [].keys()) ? (o = a(a(i))) !== Object.prototype && (r = o) : p = !0), null == r && (r = {}), s || c(r, l) || u(r, l, function () { + return this; + }), t.exports = { + IteratorPrototype: r, + BUGGY_SAFARI_ITERATORS: p + }; + }, function (t, n, e) { + var r = e(15), + o = e(46), + i = e(27), + a = e(94), + u = i("IE_PROTO"), + c = Object.prototype; + t.exports = a ? Object.getPrototypeOf : function (t) { + return t = o(t), r(t, u) ? t[u] : "function" == typeof t.constructor && t instanceof t.constructor ? t.constructor.prototype : t instanceof Object ? c : null; + }; + }, function (t, n, e) { + var r = e(6); + t.exports = !r(function () { + function t() {} + return t.prototype.constructor = null, Object.getPrototypeOf(new t()) !== t.prototype; + }); + }, function (t, n, e) { + var r = e(19).f, + o = e(15), + i = e(49)("toStringTag"); + t.exports = function (t, n, e) { + t && !o(t = e ? t : t.prototype, i) && r(t, i, { + configurable: !0, + value: n + }); + }; + }, function (t, n, e) { + var r = e(20), + o = e(97); + t.exports = Object.setPrototypeOf || ("__proto__" in {} ? function () { + var t, + n = !1, + e = {}; + try { + (t = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__").set).call(e, []), n = e instanceof Array; + } catch (t) {} + return function (e, i) { + return r(e), o(i), n ? t.call(e, i) : e.__proto__ = i, e; + }; + }() : void 0); + }, function (t, n, e) { + var r = e(14); + t.exports = function (t) { + if (!r(t) && null !== t) throw TypeError("Can't set " + String(t) + " as a prototype"); + return t; + }; + }, function (t, n, e) { + var r = e(2), + o = e(10), + i = e(9), + a = e(66), + u = [].join, + c = o != Object, + f = a("join", ","); + r({ + target: "Array", + proto: !0, + forced: c || !f + }, { + join: function join(t) { + return u.call(i(this), void 0 === t ? "," : t); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(100); + r({ + target: "Array", + proto: !0, + forced: o !== [].lastIndexOf + }, { + lastIndexOf: o + }); + }, function (t, n, e) { + var r = e(9), + o = e(40), + i = e(39), + a = e(66), + u = e(67), + c = Math.min, + f = [].lastIndexOf, + s = !!f && 1 / [1].lastIndexOf(1, -0) < 0, + l = a("lastIndexOf"), + p = u("indexOf", { + ACCESSORS: !0, + 1: 0 + }), + h = s || !l || !p; + t.exports = h ? function (t) { + if (s) return f.apply(this, arguments) || 0; + var n = r(this), + e = i(n.length), + a = e - 1; + for (arguments.length > 1 && (a = c(a, o(arguments[1]))), a < 0 && (a = e + a); a >= 0; a--) if (a in n && n[a] === t) return a || 0; + return -1; + } : f; + }, function (t, n, e) { + var r = e(2), + o = e(63).map, + i = e(52), + a = e(67), + u = i("map"), + c = a("map"); + r({ + target: "Array", + proto: !0, + forced: !u || !c + }, { + map: function map(t) { + return o(this, t, arguments.length > 1 ? arguments[1] : void 0); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(6), + i = e(47); + r({ + target: "Array", + stat: !0, + forced: o(function () { + function t() {} + return !(Array.of.call(t) instanceof t); + }) + }, { + of: function of() { + for (var t = 0, n = arguments.length, e = new ("function" == typeof this ? this : Array)(n); n > t;) i(e, t, arguments[t++]); + return e.length = n, e; + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(104).left, + i = e(66), + a = e(67), + u = i("reduce"), + c = a("reduce", { + 1: 0 + }); + r({ + target: "Array", + proto: !0, + forced: !u || !c + }, { + reduce: function reduce(t) { + return o(this, t, arguments.length, arguments.length > 1 ? arguments[1] : void 0); + } + }); + }, function (t, n, e) { + var r = e(65), + o = e(46), + i = e(10), + a = e(39), + u = function u(t) { + return function (n, e, u, c) { + r(e); + var f = o(n), + s = i(f), + l = a(f.length), + p = t ? l - 1 : 0, + h = t ? -1 : 1; + if (u < 2) for (;;) { + if (p in s) { + c = s[p], p += h; + break; + } + if (p += h, t ? p < 0 : l <= p) throw TypeError("Reduce of empty array with no initial value"); + } + for (; t ? p >= 0 : l > p; p += h) p in s && (c = e(c, s[p], p, f)); + return c; + }; + }; + t.exports = { + left: u(!1), + right: u(!0) + }; + }, function (t, n, e) { + var r = e(2), + o = e(104).right, + i = e(66), + a = e(67), + u = i("reduceRight"), + c = a("reduce", { + 1: 0 + }); + r({ + target: "Array", + proto: !0, + forced: !u || !c + }, { + reduceRight: function reduceRight(t) { + return o(this, t, arguments.length, arguments.length > 1 ? arguments[1] : void 0); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(14), + i = e(45), + a = e(41), + u = e(39), + c = e(9), + f = e(47), + s = e(49), + l = e(52), + p = e(67), + h = l("slice"), + v = p("slice", { + ACCESSORS: !0, + 0: 0, + 1: 2 + }), + g = s("species"), + d = [].slice, + y = Math.max; + r({ + target: "Array", + proto: !0, + forced: !h || !v + }, { + slice: function slice(t, n) { + var e, + r, + s, + l = c(this), + p = u(l.length), + h = a(t, p), + v = a(void 0 === n ? p : n, p); + if (i(l) && ("function" != typeof (e = l.constructor) || e !== Array && !i(e.prototype) ? o(e) && null === (e = e[g]) && (e = void 0) : e = void 0, e === Array || void 0 === e)) return d.call(l, h, v); + for (r = new (void 0 === e ? Array : e)(y(v - h, 0)), s = 0; h < v; h++, s++) h in l && f(r, s, l[h]); + return r.length = s, r; + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(63).some, + i = e(66), + a = e(67), + u = i("some"), + c = a("some"); + r({ + target: "Array", + proto: !0, + forced: !u || !c + }, { + some: function some(t) { + return o(this, t, arguments.length > 1 ? arguments[1] : void 0); + } + }); + }, function (t, n, e) { + e(109)("Array"); + }, function (t, n, e) { + var r = e(34), + o = e(19), + i = e(49), + a = e(5), + u = i("species"); + t.exports = function (t) { + var n = r(t), + e = o.f; + a && n && !n[u] && e(n, u, { + configurable: !0, + get: function get() { + return this; + } + }); + }; + }, function (t, n, e) { + var r = e(2), + o = e(41), + i = e(40), + a = e(39), + u = e(46), + c = e(48), + f = e(47), + s = e(52), + l = e(67), + p = s("splice"), + h = l("splice", { + ACCESSORS: !0, + 0: 0, + 1: 2 + }), + v = Math.max, + g = Math.min; + r({ + target: "Array", + proto: !0, + forced: !p || !h + }, { + splice: function splice(t, n) { + var e, + r, + s, + l, + p, + h, + d = u(this), + y = a(d.length), + x = o(t, y), + m = arguments.length; + if (0 === m ? e = r = 0 : 1 === m ? (e = 0, r = y - x) : (e = m - 2, r = g(v(i(n), 0), y - x)), y + e - r > 9007199254740991) throw TypeError("Maximum allowed length exceeded"); + for (s = c(d, r), l = 0; l < r; l++) (p = x + l) in d && f(s, l, d[p]); + if (s.length = r, e < r) { + for (l = x; l < y - r; l++) h = l + e, (p = l + r) in d ? d[h] = d[p] : delete d[h]; + for (l = y; l > y - r + e; l--) delete d[l - 1]; + } else if (e > r) for (l = y - r; l > x; l--) h = l + e - 1, (p = l + r - 1) in d ? d[h] = d[p] : delete d[h]; + for (l = 0; l < e; l++) d[l + x] = arguments[l + 2]; + return d.length = y - r + e, s; + } + }); + }, function (t, n, e) { + e(57)("flat"); + }, function (t, n, e) { + e(57)("flatMap"); + }, function (t, n, e) { + var r = e(14), + o = e(19), + i = e(93), + a = e(49)("hasInstance"), + u = Function.prototype; + a in u || o.f(u, a, { + value: function value(t) { + if ("function" != typeof this || !r(t)) return !1; + if (!r(this.prototype)) return t instanceof this; + for (; t = i(t);) if (this.prototype === t) return !0; + return !1; + } + }); + }, function (t, n, e) { + var r = e(5), + o = e(19).f, + i = Function.prototype, + a = i.toString, + u = /^\s*function ([^ (]*)/; + r && !("name" in i) && o(i, "name", { + configurable: !0, + get: function get() { + try { + return a.call(this).match(u)[1]; + } catch (t) { + return ""; + } + } + }); + }, function (t, n, e) { + e(2)({ + global: !0 + }, { + globalThis: e(3) + }); + }, function (t, n, e) { + var r = e(2), + o = e(34), + i = e(6), + a = o("JSON", "stringify"), + u = /[\uD800-\uDFFF]/g, + c = /^[\uD800-\uDBFF]$/, + f = /^[\uDC00-\uDFFF]$/, + s = function s(t, n, e) { + var r = e.charAt(n - 1), + o = e.charAt(n + 1); + return c.test(t) && !f.test(o) || f.test(t) && !c.test(r) ? "\\u" + t.charCodeAt(0).toString(16) : t; + }, + l = i(function () { + return "\"\\udf06\\ud834\"" !== a("\uDF06\uD834") || "\"\\udead\"" !== a("\uDEAD"); + }); + a && r({ + target: "JSON", + stat: !0, + forced: l + }, { + stringify: function stringify(t, n, e) { + var r = a.apply(null, arguments); + return "string" == typeof r ? r.replace(u, s) : r; + } + }); + }, function (t, n, e) { + var r = e(3); + e(95)(r.JSON, "JSON", !0); + }, function (t, n, e) { + var r = e(119), + o = e(125); + t.exports = r("Map", function (t) { + return function () { + return t(this, arguments.length ? arguments[0] : void 0); + }; + }, o); + }, function (t, n, e) { + var r = e(2), + o = e(3), + i = e(44), + a = e(21), + u = e(120), + c = e(122), + f = e(123), + s = e(14), + l = e(6), + p = e(86), + h = e(95), + v = e(124); + t.exports = function (t, n, e) { + var g = -1 !== t.indexOf("Map"), + d = -1 !== t.indexOf("Weak"), + y = g ? "set" : "add", + x = o[t], + m = x && x.prototype, + b = x, + S = {}, + E = function E(t) { + var n = m[t]; + a(m, t, "add" == t ? function (t) { + return n.call(this, 0 === t ? 0 : t), this; + } : "delete" == t ? function (t) { + return !(d && !s(t)) && n.call(this, 0 === t ? 0 : t); + } : "get" == t ? function (t) { + return d && !s(t) ? void 0 : n.call(this, 0 === t ? 0 : t); + } : "has" == t ? function (t) { + return !(d && !s(t)) && n.call(this, 0 === t ? 0 : t); + } : function (t, e) { + return n.call(this, 0 === t ? 0 : t, e), this; + }); + }; + if (i(t, "function" != typeof x || !(d || m.forEach && !l(function () { + new x().entries().next(); + })))) b = e.getConstructor(n, t, g, y), u.REQUIRED = !0;else if (i(t, !0)) { + var w = new b(), + O = w[y](d ? {} : -0, 1) != w, + R = l(function () { + w.has(1); + }), + A = p(function (t) { + new x(t); + }), + j = !d && l(function () { + for (var t = new x(), n = 5; n--;) t[y](n, n); + return !t.has(-0); + }); + A || ((b = n(function (n, e) { + f(n, b, t); + var r = v(new x(), n, b); + return null != e && c(e, r[y], r, g), r; + })).prototype = m, m.constructor = b), (R || j) && (E("delete"), E("has"), g && E("get")), (j || O) && E(y), d && m.clear && delete m.clear; + } + return S[t] = b, r({ + global: !0, + forced: b != x + }, S), h(b, t), d || e.setStrong(b, t, g), b; + }; + }, function (t, n, e) { + var r = e(31), + o = e(14), + i = e(15), + a = e(19).f, + u = e(30), + c = e(121), + f = u("meta"), + s = 0, + l = Object.isExtensible || function () { + return !0; + }, + p = function p(t) { + a(t, f, { + value: { + objectID: "O" + ++s, + weakData: {} + } + }); + }, + h = t.exports = { + REQUIRED: !1, + fastKey: function fastKey(t, n) { + if (!o(t)) return "symbol" == typeof t ? t : ("string" == typeof t ? "S" : "P") + t; + if (!i(t, f)) { + if (!l(t)) return "F"; + if (!n) return "E"; + p(t); + } + return t[f].objectID; + }, + getWeakData: function getWeakData(t, n) { + if (!i(t, f)) { + if (!l(t)) return !0; + if (!n) return !1; + p(t); + } + return t[f].weakData; + }, + onFreeze: function onFreeze(t) { + return c && h.REQUIRED && l(t) && !i(t, f) && p(t), t; + } + }; + r[f] = !0; + }, function (t, n, e) { + var r = e(6); + t.exports = !r(function () { + return Object.isExtensible(Object.preventExtensions({})); + }); + }, function (t, n, e) { + var r = e(20), + o = e(81), + i = e(39), + a = e(64), + u = e(83), + c = e(80), + f = function f(t, n) { + this.stopped = t, this.result = n; + }; + (t.exports = function (t, n, e, s, l) { + var p, + h, + v, + g, + d, + y, + x, + m = a(n, e, s ? 2 : 1); + if (l) p = t;else { + if ("function" != typeof (h = u(t))) throw TypeError("Target is not iterable"); + if (o(h)) { + for (v = 0, g = i(t.length); g > v; v++) if ((d = s ? m(r(x = t[v])[0], x[1]) : m(t[v])) && d instanceof f) return d; + return new f(!1); + } + p = h.call(t); + } + for (y = p.next; !(x = y.call(p)).done;) if ("object" == typeof (d = c(p, m, x.value, s)) && d && d instanceof f) return d; + return new f(!1); + }).stop = function (t) { + return new f(!0, t); + }; + }, function (t, n) { + t.exports = function (t, n, e) { + if (!(t instanceof n)) throw TypeError("Incorrect " + (e ? e + " " : "") + "invocation"); + return t; + }; + }, function (t, n, e) { + var r = e(14), + o = e(96); + t.exports = function (t, n, e) { + var i, a; + return o && "function" == typeof (i = n.constructor) && i !== e && r(a = i.prototype) && a !== e.prototype && o(t, a), t; + }; + }, function (t, n, e) { + var r = e(19).f, + o = e(58), + i = e(126), + a = e(64), + u = e(123), + c = e(122), + f = e(90), + s = e(109), + l = e(5), + p = e(120).fastKey, + h = e(25), + v = h.set, + g = h.getterFor; + t.exports = { + getConstructor: function getConstructor(t, n, e, f) { + var s = t(function (t, r) { + u(t, s, n), v(t, { + type: n, + index: o(null), + first: void 0, + last: void 0, + size: 0 + }), l || (t.size = 0), null != r && c(r, t[f], t, e); + }), + h = g(n), + d = function d(t, n, e) { + var r, + o, + i = h(t), + a = y(t, n); + return a ? a.value = e : (i.last = a = { + index: o = p(n, !0), + key: n, + value: e, + previous: r = i.last, + next: void 0, + removed: !1 + }, i.first || (i.first = a), r && (r.next = a), l ? i.size++ : t.size++, "F" !== o && (i.index[o] = a)), t; + }, + y = function y(t, n) { + var e, + r = h(t), + o = p(n); + if ("F" !== o) return r.index[o]; + for (e = r.first; e; e = e.next) if (e.key == n) return e; + }; + return i(s.prototype, { + clear: function clear() { + for (var t = h(this), n = t.index, e = t.first; e;) e.removed = !0, e.previous && (e.previous = e.previous.next = void 0), delete n[e.index], e = e.next; + t.first = t.last = void 0, l ? t.size = 0 : this.size = 0; + }, + delete: function _delete(t) { + var n = h(this), + e = y(this, t); + if (e) { + var r = e.next, + o = e.previous; + delete n.index[e.index], e.removed = !0, o && (o.next = r), r && (r.previous = o), n.first == e && (n.first = r), n.last == e && (n.last = o), l ? n.size-- : this.size--; + } + return !!e; + }, + forEach: function forEach(t) { + for (var n, e = h(this), r = a(t, arguments.length > 1 ? arguments[1] : void 0, 3); n = n ? n.next : e.first;) for (r(n.value, n.key, this); n && n.removed;) n = n.previous; + }, + has: function has(t) { + return !!y(this, t); + } + }), i(s.prototype, e ? { + get: function get(t) { + var n = y(this, t); + return n && n.value; + }, + set: function set(t, n) { + return d(this, 0 === t ? 0 : t, n); + } + } : { + add: function add(t) { + return d(this, t = 0 === t ? 0 : t, t); + } + }), l && r(s.prototype, "size", { + get: function get() { + return h(this).size; + } + }), s; + }, + setStrong: function setStrong(t, n, e) { + var r = n + " Iterator", + o = g(n), + i = g(r); + f(t, n, function (t, n) { + v(this, { + type: r, + target: t, + state: o(t), + kind: n, + last: void 0 + }); + }, function () { + for (var t = i(this), n = t.kind, e = t.last; e && e.removed;) e = e.previous; + return t.target && (t.last = e = e ? e.next : t.state.first) ? "keys" == n ? { + value: e.key, + done: !1 + } : "values" == n ? { + value: e.value, + done: !1 + } : { + value: [e.key, e.value], + done: !1 + } : (t.target = void 0, { + value: void 0, + done: !0 + }); + }, e ? "entries" : "values", !e, !0), s(n); + } + }; + }, function (t, n, e) { + var r = e(21); + t.exports = function (t, n, e) { + for (var o in n) r(t, o, n[o], e); + return t; + }; + }, function (t, n, e) { + var r = e(5), + o = e(3), + i = e(44), + a = e(21), + u = e(15), + c = e(11), + f = e(124), + s = e(13), + l = e(6), + p = e(58), + h = e(36).f, + v = e(4).f, + g = e(19).f, + d = e(128).trim, + y = o.Number, + x = y.prototype, + m = "Number" == c(p(x)), + b = function b(t) { + var n, + e, + r, + o, + i, + a, + u, + c, + f = s(t, !1); + if ("string" == typeof f && f.length > 2) if (43 === (n = (f = d(f)).charCodeAt(0)) || 45 === n) { + if (88 === (e = f.charCodeAt(2)) || 120 === e) return NaN; + } else if (48 === n) { + switch (f.charCodeAt(1)) { + case 66: + case 98: + r = 2, o = 49; + break; + case 79: + case 111: + r = 8, o = 55; + break; + default: + return +f; + } + for (a = (i = f.slice(2)).length, u = 0; u < a; u++) if ((c = i.charCodeAt(u)) < 48 || c > o) return NaN; + return parseInt(i, r); + } + return +f; + }; + if (i("Number", !y(" 0o1") || !y("0b1") || y("+0x1"))) { + for (var S, _E = function E(t) { + var n = arguments.length < 1 ? 0 : t, + e = this; + return e instanceof _E && (m ? l(function () { + x.valueOf.call(e); + }) : "Number" != c(e)) ? f(new y(b(n)), e, _E) : b(n); + }, w = r ? h(y) : "MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","), O = 0; w.length > O; O++) u(y, S = w[O]) && !u(_E, S) && g(_E, S, v(y, S)); + _E.prototype = x, x.constructor = _E, a(o, "Number", _E); + } + }, function (t, n, e) { + var r = e(12), + o = "[" + e(129) + "]", + i = RegExp("^" + o + o + "*"), + a = RegExp(o + o + "*$"), + u = function u(t) { + return function (n) { + var e = String(r(n)); + return 1 & t && (e = e.replace(i, "")), 2 & t && (e = e.replace(a, "")), e; + }; + }; + t.exports = { + start: u(1), + end: u(2), + trim: u(3) + }; + }, function (t, n) { + t.exports = "\t\n\x0B\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF"; + }, function (t, n, e) { + e(2)({ + target: "Number", + stat: !0 + }, { + EPSILON: Math.pow(2, -52) + }); + }, function (t, n, e) { + e(2)({ + target: "Number", + stat: !0 + }, { + isFinite: e(132) + }); + }, function (t, n, e) { + var r = e(3).isFinite; + t.exports = Number.isFinite || function (t) { + return "number" == typeof t && r(t); + }; + }, function (t, n, e) { + e(2)({ + target: "Number", + stat: !0 + }, { + isInteger: e(134) + }); + }, function (t, n, e) { + var r = e(14), + o = Math.floor; + t.exports = function (t) { + return !r(t) && isFinite(t) && o(t) === t; + }; + }, function (t, n, e) { + e(2)({ + target: "Number", + stat: !0 + }, { + isNaN: function isNaN(t) { + return t != t; + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(134), + i = Math.abs; + r({ + target: "Number", + stat: !0 + }, { + isSafeInteger: function isSafeInteger(t) { + return o(t) && i(t) <= 9007199254740991; + } + }); + }, function (t, n, e) { + e(2)({ + target: "Number", + stat: !0 + }, { + MAX_SAFE_INTEGER: 9007199254740991 + }); + }, function (t, n, e) { + e(2)({ + target: "Number", + stat: !0 + }, { + MIN_SAFE_INTEGER: -9007199254740991 + }); + }, function (t, n, e) { + var r = e(2), + o = e(140); + r({ + target: "Number", + stat: !0, + forced: Number.parseFloat != o + }, { + parseFloat: o + }); + }, function (t, n, e) { + var r = e(3), + o = e(128).trim, + i = e(129), + a = r.parseFloat, + u = 1 / a(i + "-0") != -1 / 0; + t.exports = u ? function (t) { + var n = o(String(t)), + e = a(n); + return 0 === e && "-" == n.charAt(0) ? -0 : e; + } : a; + }, function (t, n, e) { + var r = e(2), + o = e(142); + r({ + target: "Number", + stat: !0, + forced: Number.parseInt != o + }, { + parseInt: o + }); + }, function (t, n, e) { + var r = e(3), + o = e(128).trim, + i = e(129), + a = r.parseInt, + u = /^[+-]?0[Xx]/, + c = 8 !== a(i + "08") || 22 !== a(i + "0x16"); + t.exports = c ? function (t, n) { + var e = o(String(t)); + return a(e, n >>> 0 || (u.test(e) ? 16 : 10)); + } : a; + }, function (t, n, e) { + var r = e(2), + o = e(40), + i = e(144), + a = e(145), + u = e(6), + c = 1..toFixed, + f = Math.floor, + _s = function s(t, n, e) { + return 0 === n ? e : n % 2 == 1 ? _s(t, n - 1, e * t) : _s(t * t, n / 2, e); + }; + r({ + target: "Number", + proto: !0, + forced: c && ("0.000" !== 8e-5.toFixed(3) || "1" !== .9.toFixed(0) || "1.25" !== 1.255.toFixed(2) || "1000000000000000128" !== 0xde0b6b3a7640080.toFixed(0)) || !u(function () { + c.call({}); + }) + }, { + toFixed: function toFixed(t) { + var n, + e, + r, + u, + c = i(this), + l = o(t), + p = [0, 0, 0, 0, 0, 0], + h = "", + v = "0", + g = function g(t, n) { + for (var e = -1, r = n; ++e < 6;) r += t * p[e], p[e] = r % 1e7, r = f(r / 1e7); + }, + d = function d(t) { + for (var n = 6, e = 0; --n >= 0;) e += p[n], p[n] = f(e / t), e = e % t * 1e7; + }, + y = function y() { + for (var t = 6, n = ""; --t >= 0;) if ("" !== n || 0 === t || 0 !== p[t]) { + var e = String(p[t]); + n = "" === n ? e : n + a.call("0", 7 - e.length) + e; + } + return n; + }; + if (l < 0 || l > 20) throw RangeError("Incorrect fraction digits"); + if (c != c) return "NaN"; + if (c <= -1e21 || c >= 1e21) return String(c); + if (c < 0 && (h = "-", c = -c), c > 1e-21) if (e = (n = function (t) { + for (var n = 0, e = t; e >= 4096;) n += 12, e /= 4096; + for (; e >= 2;) n += 1, e /= 2; + return n; + }(c * _s(2, 69, 1)) - 69) < 0 ? c * _s(2, -n, 1) : c / _s(2, n, 1), e *= 4503599627370496, (n = 52 - n) > 0) { + for (g(0, e), r = l; r >= 7;) g(1e7, 0), r -= 7; + for (g(_s(10, r, 1), 0), r = n - 1; r >= 23;) d(1 << 23), r -= 23; + d(1 << r), g(1, 1), d(2), v = y(); + } else g(0, e), g(1 << -n, 0), v = y() + a.call("0", l); + return v = l > 0 ? h + ((u = v.length) <= l ? "0." + a.call("0", l - u) + v : v.slice(0, u - l) + "." + v.slice(u - l)) : h + v; + } + }); + }, function (t, n, e) { + var r = e(11); + t.exports = function (t) { + if ("number" != typeof t && "Number" != r(t)) throw TypeError("Incorrect invocation"); + return +t; + }; + }, function (t, n, e) { + var r = e(40), + o = e(12); + t.exports = "".repeat || function (t) { + var n = String(o(this)), + e = "", + i = r(t); + if (i < 0 || i == 1 / 0) throw RangeError("Wrong number of repetitions"); + for (; i > 0; (i >>>= 1) && (n += n)) 1 & i && (e += n); + return e; + }; + }, function (t, n, e) { + var r = e(2), + o = e(147); + r({ + target: "Object", + stat: !0, + forced: Object.assign !== o + }, { + assign: o + }); + }, function (t, n, e) { + var r = e(5), + o = e(6), + i = e(60), + a = e(43), + u = e(7), + c = e(46), + f = e(10), + s = Object.assign, + l = Object.defineProperty; + t.exports = !s || o(function () { + if (r && 1 !== s({ + b: 1 + }, s(l({}, "a", { + enumerable: !0, + get: function get() { + l(this, "b", { + value: 3, + enumerable: !1 + }); + } + }), { + b: 2 + })).b) return !0; + var t = {}, + n = {}, + e = Symbol(); + return t[e] = 7, "abcdefghijklmnopqrst".split("").forEach(function (t) { + n[t] = t; + }), 7 != s({}, t)[e] || "abcdefghijklmnopqrst" != i(s({}, n)).join(""); + }) ? function (t, n) { + for (var e = c(t), o = arguments.length, s = 1, l = a.f, p = u.f; o > s;) for (var h, v = f(arguments[s++]), g = l ? i(v).concat(l(v)) : i(v), d = g.length, y = 0; d > y;) h = g[y++], r && !p.call(v, h) || (e[h] = v[h]); + return e; + } : s; + }, function (t, n, e) { + var r = e(2), + o = e(5), + i = e(149), + a = e(46), + u = e(65), + c = e(19); + o && r({ + target: "Object", + proto: !0, + forced: i + }, { + __defineGetter__: function __defineGetter__(t, n) { + c.f(a(this), t, { + get: u(n), + enumerable: !0, + configurable: !0 + }); + } + }); + }, function (t, n, e) { + var r = e(29), + o = e(3), + i = e(6); + t.exports = r || !i(function () { + var t = Math.random(); + __defineSetter__.call(null, t, function () {}), delete o[t]; + }); + }, function (t, n, e) { + var r = e(2), + o = e(5), + i = e(149), + a = e(46), + u = e(65), + c = e(19); + o && r({ + target: "Object", + proto: !0, + forced: i + }, { + __defineSetter__: function __defineSetter__(t, n) { + c.f(a(this), t, { + set: u(n), + enumerable: !0, + configurable: !0 + }); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(152).entries; + r({ + target: "Object", + stat: !0 + }, { + entries: function entries(t) { + return o(t); + } + }); + }, function (t, n, e) { + var r = e(5), + o = e(60), + i = e(9), + a = e(7).f, + u = function u(t) { + return function (n) { + for (var e, u = i(n), c = o(u), f = c.length, s = 0, l = []; f > s;) e = c[s++], r && !a.call(u, e) || l.push(t ? [e, u[e]] : u[e]); + return l; + }; + }; + t.exports = { + entries: u(!0), + values: u(!1) + }; + }, function (t, n, e) { + var r = e(2), + o = e(121), + i = e(6), + a = e(14), + u = e(120).onFreeze, + c = Object.freeze; + r({ + target: "Object", + stat: !0, + forced: i(function () { + c(1); + }), + sham: !o + }, { + freeze: function freeze(t) { + return c && a(t) ? c(u(t)) : t; + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(122), + i = e(47); + r({ + target: "Object", + stat: !0 + }, { + fromEntries: function fromEntries(t) { + var n = {}; + return o(t, function (t, e) { + i(n, t, e); + }, void 0, !0), n; + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(6), + i = e(9), + a = e(4).f, + u = e(5), + c = o(function () { + a(1); + }); + r({ + target: "Object", + stat: !0, + forced: !u || c, + sham: !u + }, { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(t, n) { + return a(i(t), n); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(5), + i = e(33), + a = e(9), + u = e(4), + c = e(47); + r({ + target: "Object", + stat: !0, + sham: !o + }, { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(t) { + for (var n, e, r = a(t), o = u.f, f = i(r), s = {}, l = 0; f.length > l;) void 0 !== (e = o(r, n = f[l++])) && c(s, n, e); + return s; + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(6), + i = e(158).f; + r({ + target: "Object", + stat: !0, + forced: o(function () { + return !Object.getOwnPropertyNames(1); + }) + }, { + getOwnPropertyNames: i + }); + }, function (t, n, e) { + var r = e(9), + o = e(36).f, + i = {}.toString, + a = "object" == typeof window && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; + t.exports.f = function (t) { + return a && "[object Window]" == i.call(t) ? function (t) { + try { + return o(t); + } catch (t) { + return a.slice(); + } + }(t) : o(r(t)); + }; + }, function (t, n, e) { + var r = e(2), + o = e(6), + i = e(46), + a = e(93), + u = e(94); + r({ + target: "Object", + stat: !0, + forced: o(function () { + a(1); + }), + sham: !u + }, { + getPrototypeOf: function getPrototypeOf(t) { + return a(i(t)); + } + }); + }, function (t, n, e) { + e(2)({ + target: "Object", + stat: !0 + }, { + is: e(161) + }); + }, function (t, n) { + t.exports = Object.is || function (t, n) { + return t === n ? 0 !== t || 1 / t == 1 / n : t != t && n != n; + }; + }, function (t, n, e) { + var r = e(2), + o = e(6), + i = e(14), + a = Object.isExtensible; + r({ + target: "Object", + stat: !0, + forced: o(function () { + a(1); + }) + }, { + isExtensible: function isExtensible(t) { + return !!i(t) && (!a || a(t)); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(6), + i = e(14), + a = Object.isFrozen; + r({ + target: "Object", + stat: !0, + forced: o(function () { + a(1); + }) + }, { + isFrozen: function isFrozen(t) { + return !i(t) || !!a && a(t); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(6), + i = e(14), + a = Object.isSealed; + r({ + target: "Object", + stat: !0, + forced: o(function () { + a(1); + }) + }, { + isSealed: function isSealed(t) { + return !i(t) || !!a && a(t); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(46), + i = e(60); + r({ + target: "Object", + stat: !0, + forced: e(6)(function () { + i(1); + }) + }, { + keys: function keys(t) { + return i(o(t)); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(5), + i = e(149), + a = e(46), + u = e(13), + c = e(93), + f = e(4).f; + o && r({ + target: "Object", + proto: !0, + forced: i + }, { + __lookupGetter__: function __lookupGetter__(t) { + var n, + e = a(this), + r = u(t, !0); + do { + if (n = f(e, r)) return n.get; + } while (e = c(e)); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(5), + i = e(149), + a = e(46), + u = e(13), + c = e(93), + f = e(4).f; + o && r({ + target: "Object", + proto: !0, + forced: i + }, { + __lookupSetter__: function __lookupSetter__(t) { + var n, + e = a(this), + r = u(t, !0); + do { + if (n = f(e, r)) return n.set; + } while (e = c(e)); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(14), + i = e(120).onFreeze, + a = e(121), + u = e(6), + c = Object.preventExtensions; + r({ + target: "Object", + stat: !0, + forced: u(function () { + c(1); + }), + sham: !a + }, { + preventExtensions: function preventExtensions(t) { + return c && o(t) ? c(i(t)) : t; + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(14), + i = e(120).onFreeze, + a = e(121), + u = e(6), + c = Object.seal; + r({ + target: "Object", + stat: !0, + forced: u(function () { + c(1); + }), + sham: !a + }, { + seal: function seal(t) { + return c && o(t) ? c(i(t)) : t; + } + }); + }, function (t, n, e) { + var r = e(85), + o = e(21), + i = e(171); + r || o(Object.prototype, "toString", i, { + unsafe: !0 + }); + }, function (t, n, e) { + var r = e(85), + o = e(84); + t.exports = r ? {}.toString : function () { + return "[object " + o(this) + "]"; + }; + }, function (t, n, e) { + var r = e(2), + o = e(152).values; + r({ + target: "Object", + stat: !0 + }, { + values: function values(t) { + return o(t); + } + }); + }, function (t, n, e) { + var r, + o, + i, + a, + u = e(2), + c = e(29), + f = e(3), + s = e(34), + l = e(174), + p = e(21), + h = e(126), + v = e(95), + g = e(109), + d = e(14), + y = e(65), + x = e(123), + m = e(11), + b = e(23), + S = e(122), + E = e(86), + w = e(175), + O = e(176).set, + R = e(178), + A = e(179), + j = e(181), + I = e(180), + k = e(182), + P = e(25), + L = e(44), + T = e(49), + _ = e(53), + U = T("species"), + N = "Promise", + C = P.get, + F = P.set, + M = P.getterFor(N), + _z = l, + D = f.TypeError, + q = f.document, + B = f.process, + W = s("fetch"), + $ = I.f, + G = $, + V = "process" == m(B), + X = !!(q && q.createEvent && f.dispatchEvent), + Y = L(N, function () { + if (!(b(_z) !== String(_z))) { + if (66 === _) return !0; + if (!V && "function" != typeof PromiseRejectionEvent) return !0; + } + if (c && !_z.prototype.finally) return !0; + if (_ >= 51 && /native code/.test(_z)) return !1; + var t = _z.resolve(1), + n = function n(t) { + t(function () {}, function () {}); + }; + return (t.constructor = {})[U] = n, !(t.then(function () {}) instanceof n); + }), + K = Y || !E(function (t) { + _z.all(t).catch(function () {}); + }), + J = function J(t) { + var n; + return !(!d(t) || "function" != typeof (n = t.then)) && n; + }, + H = function H(t, n, e) { + if (!n.notified) { + n.notified = !0; + var r = n.reactions; + R(function () { + for (var o = n.value, i = 1 == n.state, a = 0; r.length > a;) { + var u, + c, + f, + s = r[a++], + l = i ? s.ok : s.fail, + p = s.resolve, + h = s.reject, + v = s.domain; + try { + l ? (i || (2 === n.rejection && nt(t, n), n.rejection = 1), !0 === l ? u = o : (v && v.enter(), u = l(o), v && (v.exit(), f = !0)), u === s.promise ? h(D("Promise-chain cycle")) : (c = J(u)) ? c.call(u, p, h) : p(u)) : h(o); + } catch (t) { + v && !f && v.exit(), h(t); + } + } + n.reactions = [], n.notified = !1, e && !n.rejection && Z(t, n); + }); + } + }, + Q = function Q(t, n, e) { + var r, o; + X ? ((r = q.createEvent("Event")).promise = n, r.reason = e, r.initEvent(t, !1, !0), f.dispatchEvent(r)) : r = { + promise: n, + reason: e + }, (o = f["on" + t]) ? o(r) : "unhandledrejection" === t && j("Unhandled promise rejection", e); + }, + Z = function Z(t, n) { + O.call(f, function () { + var e, + r = n.value; + if (tt(n) && (e = k(function () { + V ? B.emit("unhandledRejection", r, t) : Q("unhandledrejection", t, r); + }), n.rejection = V || tt(n) ? 2 : 1, e.error)) throw e.value; + }); + }, + tt = function tt(t) { + return 1 !== t.rejection && !t.parent; + }, + nt = function nt(t, n) { + O.call(f, function () { + V ? B.emit("rejectionHandled", t) : Q("rejectionhandled", t, n.value); + }); + }, + et = function et(t, n, e, r) { + return function (o) { + t(n, e, o, r); + }; + }, + rt = function rt(t, n, e, r) { + n.done || (n.done = !0, r && (n = r), n.value = e, n.state = 2, H(t, n, !0)); + }, + _ot = function ot(t, n, e, r) { + if (!n.done) { + n.done = !0, r && (n = r); + try { + if (t === e) throw D("Promise can't be resolved itself"); + var o = J(e); + o ? R(function () { + var r = { + done: !1 + }; + try { + o.call(e, et(_ot, t, r, n), et(rt, t, r, n)); + } catch (e) { + rt(t, r, e, n); + } + }) : (n.value = e, n.state = 1, H(t, n, !1)); + } catch (e) { + rt(t, { + done: !1 + }, e, n); + } + } + }; + Y && (_z = function z(t) { + x(this, _z, N), y(t), r.call(this); + var n = C(this); + try { + t(et(_ot, this, n), et(rt, this, n)); + } catch (t) { + rt(this, n, t); + } + }, (r = function r(t) { + F(this, { + type: N, + done: !1, + notified: !1, + parent: !1, + reactions: [], + rejection: !1, + state: 0, + value: void 0 + }); + }).prototype = h(_z.prototype, { + then: function then(t, n) { + var e = M(this), + r = $(w(this, _z)); + return r.ok = "function" != typeof t || t, r.fail = "function" == typeof n && n, r.domain = V ? B.domain : void 0, e.parent = !0, e.reactions.push(r), 0 != e.state && H(this, e, !1), r.promise; + }, + catch: function _catch(t) { + return this.then(void 0, t); + } + }), o = function o() { + var t = new r(), + n = C(t); + this.promise = t, this.resolve = et(_ot, t, n), this.reject = et(rt, t, n); + }, I.f = $ = function $(t) { + return t === _z || t === i ? new o(t) : G(t); + }, c || "function" != typeof l || (a = l.prototype.then, p(l.prototype, "then", function (t, n) { + var e = this; + return new _z(function (t, n) { + a.call(e, t, n); + }).then(t, n); + }, { + unsafe: !0 + }), "function" == typeof W && u({ + global: !0, + enumerable: !0, + forced: !0 + }, { + fetch: function fetch(t) { + return A(_z, W.apply(f, arguments)); + } + }))), u({ + global: !0, + wrap: !0, + forced: Y + }, { + Promise: _z + }), v(_z, N, !1, !0), g(N), i = s(N), u({ + target: N, + stat: !0, + forced: Y + }, { + reject: function reject(t) { + var n = $(this); + return n.reject.call(void 0, t), n.promise; + } + }), u({ + target: N, + stat: !0, + forced: c || Y + }, { + resolve: function resolve(t) { + return A(c && this === i ? _z : this, t); + } + }), u({ + target: N, + stat: !0, + forced: K + }, { + all: function all(t) { + var n = this, + e = $(n), + r = e.resolve, + o = e.reject, + i = k(function () { + var e = y(n.resolve), + i = [], + a = 0, + u = 1; + S(t, function (t) { + var c = a++, + f = !1; + i.push(void 0), u++, e.call(n, t).then(function (t) { + f || (f = !0, i[c] = t, --u || r(i)); + }, o); + }), --u || r(i); + }); + return i.error && o(i.value), e.promise; + }, + race: function race(t) { + var n = this, + e = $(n), + r = e.reject, + o = k(function () { + var o = y(n.resolve); + S(t, function (t) { + o.call(n, t).then(e.resolve, r); + }); + }); + return o.error && r(o.value), e.promise; + } + }); + }, function (t, n, e) { + var r = e(3); + t.exports = r.Promise; + }, function (t, n, e) { + var r = e(20), + o = e(65), + i = e(49)("species"); + t.exports = function (t, n) { + var e, + a = r(t).constructor; + return void 0 === a || null == (e = r(a)[i]) ? n : o(e); + }; + }, function (t, n, e) { + var r, + o, + i, + a = e(3), + u = e(6), + c = e(11), + f = e(64), + s = e(61), + l = e(17), + p = e(177), + h = a.location, + v = a.setImmediate, + g = a.clearImmediate, + d = a.process, + y = a.MessageChannel, + x = a.Dispatch, + m = 0, + b = {}, + S = function S(t) { + if (b.hasOwnProperty(t)) { + var n = b[t]; + delete b[t], n(); + } + }, + E = function E(t) { + return function () { + S(t); + }; + }, + w = function w(t) { + S(t.data); + }, + O = function O(t) { + a.postMessage(t + "", h.protocol + "//" + h.host); + }; + v && g || (v = function v(t) { + for (var n = [], e = 1; arguments.length > e;) n.push(arguments[e++]); + return b[++m] = function () { + ("function" == typeof t ? t : Function(t)).apply(void 0, n); + }, r(m), m; + }, g = function g(t) { + delete b[t]; + }, "process" == c(d) ? r = function r(t) { + d.nextTick(E(t)); + } : x && x.now ? r = function r(t) { + x.now(E(t)); + } : y && !p ? (i = (o = new y()).port2, o.port1.onmessage = w, r = f(i.postMessage, i, 1)) : !a.addEventListener || "function" != typeof postMessage || a.importScripts || u(O) || "file:" === h.protocol ? r = "onreadystatechange" in l("script") ? function (t) { + s.appendChild(l("script")).onreadystatechange = function () { + s.removeChild(this), S(t); + }; + } : function (t) { + setTimeout(E(t), 0); + } : (r = O, a.addEventListener("message", w, !1))), t.exports = { + set: v, + clear: g + }; + }, function (t, n, e) { + var r = e(54); + t.exports = /(iphone|ipod|ipad).*applewebkit/i.test(r); + }, function (t, n, e) { + var r, + o, + i, + a, + u, + c, + f, + s, + l = e(3), + p = e(4).f, + h = e(11), + v = e(176).set, + g = e(177), + d = l.MutationObserver || l.WebKitMutationObserver, + y = l.process, + x = l.Promise, + m = "process" == h(y), + b = p(l, "queueMicrotask"), + S = b && b.value; + S || (r = function r() { + var t, n; + for (m && (t = y.domain) && t.exit(); o;) { + n = o.fn, o = o.next; + try { + n(); + } catch (t) { + throw o ? a() : i = void 0, t; + } + } + i = void 0, t && t.enter(); + }, m ? a = function a() { + y.nextTick(r); + } : d && !g ? (u = !0, c = document.createTextNode(""), new d(r).observe(c, { + characterData: !0 + }), a = function a() { + c.data = u = !u; + }) : x && x.resolve ? (f = x.resolve(void 0), s = f.then, a = function a() { + s.call(f, r); + }) : a = function a() { + v.call(l, r); + }), t.exports = S || function (t) { + var n = { + fn: t, + next: void 0 + }; + i && (i.next = n), o || (o = n, a()), i = n; + }; + }, function (t, n, e) { + var r = e(20), + o = e(14), + i = e(180); + t.exports = function (t, n) { + if (r(t), o(n) && n.constructor === t) return n; + var e = i.f(t); + return (0, e.resolve)(n), e.promise; + }; + }, function (t, n, e) { + var r = e(65), + o = function o(t) { + var n, e; + this.promise = new t(function (t, r) { + if (void 0 !== n || void 0 !== e) throw TypeError("Bad Promise constructor"); + n = t, e = r; + }), this.resolve = r(n), this.reject = r(e); + }; + t.exports.f = function (t) { + return new o(t); + }; + }, function (t, n, e) { + var r = e(3); + t.exports = function (t, n) { + var e = r.console; + e && e.error && (1 === arguments.length ? e.error(t) : e.error(t, n)); + }; + }, function (t, n) { + t.exports = function (t) { + try { + return { + error: !1, + value: t() + }; + } catch (t) { + return { + error: !0, + value: t + }; + } + }; + }, function (t, n, e) { + var r = e(2), + o = e(65), + i = e(180), + a = e(182), + u = e(122); + r({ + target: "Promise", + stat: !0 + }, { + allSettled: function allSettled(t) { + var n = this, + e = i.f(n), + r = e.resolve, + c = e.reject, + f = a(function () { + var e = o(n.resolve), + i = [], + a = 0, + c = 1; + u(t, function (t) { + var o = a++, + u = !1; + i.push(void 0), c++, e.call(n, t).then(function (t) { + u || (u = !0, i[o] = { + status: "fulfilled", + value: t + }, --c || r(i)); + }, function (t) { + u || (u = !0, i[o] = { + status: "rejected", + reason: t + }, --c || r(i)); + }); + }), --c || r(i); + }); + return f.error && c(f.value), e.promise; + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(29), + i = e(174), + a = e(6), + u = e(34), + c = e(175), + f = e(179), + s = e(21); + r({ + target: "Promise", + proto: !0, + real: !0, + forced: !!i && a(function () { + i.prototype.finally.call({ + then: function then() {} + }, function () {}); + }) + }, { + finally: function _finally(t) { + var n = c(this, u("Promise")), + e = "function" == typeof t; + return this.then(e ? function (e) { + return f(n, t()).then(function () { + return e; + }); + } : t, e ? function (e) { + return f(n, t()).then(function () { + throw e; + }); + } : t); + } + }), o || "function" != typeof i || i.prototype.finally || s(i.prototype, "finally", u("Promise").prototype.finally); + }, function (t, n, e) { + var r = e(5), + o = e(3), + i = e(44), + a = e(124), + u = e(19).f, + c = e(36).f, + f = e(186), + s = e(187), + l = e(188), + p = e(21), + h = e(6), + v = e(25).set, + g = e(109), + d = e(49)("match"), + y = o.RegExp, + x = y.prototype, + m = /a/g, + b = /a/g, + S = new y(m) !== m, + E = l.UNSUPPORTED_Y; + if (r && i("RegExp", !S || E || h(function () { + return b[d] = !1, y(m) != m || y(b) == b || "/a/i" != y(m, "i"); + }))) { + for (var _w = function w(t, n) { + var e, + r = this instanceof _w, + o = f(t), + i = void 0 === n; + if (!r && o && t.constructor === _w && i) return t; + S ? o && !i && (t = t.source) : t instanceof _w && (i && (n = s.call(t)), t = t.source), E && (e = !!n && n.indexOf("y") > -1) && (n = n.replace(/y/g, "")); + var u = a(S ? new y(t, n) : y(t, n), r ? this : x, _w); + return E && e && v(u, { + sticky: e + }), u; + }, O = function O(t) { + t in _w || u(_w, t, { + configurable: !0, + get: function get() { + return y[t]; + }, + set: function set(n) { + y[t] = n; + } + }); + }, R = c(y), A = 0; R.length > A;) O(R[A++]); + x.constructor = _w, _w.prototype = x, p(o, "RegExp", _w); + } + g("RegExp"); + }, function (t, n, e) { + var r = e(14), + o = e(11), + i = e(49)("match"); + t.exports = function (t) { + var n; + return r(t) && (void 0 !== (n = t[i]) ? !!n : "RegExp" == o(t)); + }; + }, function (t, n, e) { + var r = e(20); + t.exports = function () { + var t = r(this), + n = ""; + return t.global && (n += "g"), t.ignoreCase && (n += "i"), t.multiline && (n += "m"), t.dotAll && (n += "s"), t.unicode && (n += "u"), t.sticky && (n += "y"), n; + }; + }, function (t, n, e) { + var r = e(6); + function o(t, n) { + return RegExp(t, n); + } + n.UNSUPPORTED_Y = r(function () { + var t = o("a", "y"); + return t.lastIndex = 2, null != t.exec("abcd"); + }), n.BROKEN_CARET = r(function () { + var t = o("^r", "gy"); + return t.lastIndex = 2, null != t.exec("str"); + }); + }, function (t, n, e) { + var r = e(2), + o = e(190); + r({ + target: "RegExp", + proto: !0, + forced: /./.exec !== o + }, { + exec: o + }); + }, function (t, n, e) { + var r, + o, + i = e(187), + a = e(188), + u = RegExp.prototype.exec, + c = String.prototype.replace, + f = u, + s = (r = /a/, o = /b*/g, u.call(r, "a"), u.call(o, "a"), 0 !== r.lastIndex || 0 !== o.lastIndex), + l = a.UNSUPPORTED_Y || a.BROKEN_CARET, + p = void 0 !== /()??/.exec("")[1]; + (s || p || l) && (f = function f(t) { + var n, + e, + r, + o, + a = this, + f = l && a.sticky, + h = i.call(a), + v = a.source, + g = 0, + d = t; + return f && (-1 === (h = h.replace("y", "")).indexOf("g") && (h += "g"), d = String(t).slice(a.lastIndex), a.lastIndex > 0 && (!a.multiline || a.multiline && "\n" !== t[a.lastIndex - 1]) && (v = "(?: " + v + ")", d = " " + d, g++), e = new RegExp("^(?:" + v + ")", h)), p && (e = new RegExp("^" + v + "$(?!\\s)", h)), s && (n = a.lastIndex), r = u.call(f ? e : a, d), f ? r ? (r.input = r.input.slice(g), r[0] = r[0].slice(g), r.index = a.lastIndex, a.lastIndex += r[0].length) : a.lastIndex = 0 : s && r && (a.lastIndex = a.global ? r.index + r[0].length : n), p && r && r.length > 1 && c.call(r[0], e, function () { + for (o = 1; o < arguments.length - 2; o++) void 0 === arguments[o] && (r[o] = void 0); + }), r; + }), t.exports = f; + }, function (t, n, e) { + var r = e(5), + o = e(19), + i = e(187), + a = e(188).UNSUPPORTED_Y; + r && ("g" != /./g.flags || a) && o.f(RegExp.prototype, "flags", { + configurable: !0, + get: i + }); + }, function (t, n, e) { + var r = e(5), + o = e(188).UNSUPPORTED_Y, + i = e(19).f, + a = e(25).get, + u = RegExp.prototype; + r && o && i(RegExp.prototype, "sticky", { + configurable: !0, + get: function get() { + if (this !== u) { + if (this instanceof RegExp) return !!a(this).sticky; + throw TypeError("Incompatible receiver, RegExp required"); + } + } + }); + }, function (t, n, e) { + e(189); + var r, + o, + i = e(2), + a = e(14), + u = (r = !1, (o = /[ac]/).exec = function () { + return r = !0, /./.exec.apply(this, arguments); + }, !0 === o.test("abc") && r), + c = /./.test; + i({ + target: "RegExp", + proto: !0, + forced: !u + }, { + test: function test(t) { + if ("function" != typeof this.exec) return c.call(this, t); + var n = this.exec(t); + if (null !== n && !a(n)) throw new Error("RegExp exec method returned something other than an Object or null"); + return !!n; + } + }); + }, function (t, n, e) { + var r = e(21), + o = e(20), + i = e(6), + a = e(187), + u = RegExp.prototype, + c = u.toString, + f = i(function () { + return "/a/b" != c.call({ + source: "a", + flags: "b" + }); + }), + s = "toString" != c.name; + (f || s) && r(RegExp.prototype, "toString", function () { + var t = o(this), + n = String(t.source), + e = t.flags; + return "/" + n + "/" + String(void 0 === e && t instanceof RegExp && !("flags" in u) ? a.call(t) : e); + }, { + unsafe: !0 + }); + }, function (t, n, e) { + var r = e(119), + o = e(125); + t.exports = r("Set", function (t) { + return function () { + return t(this, arguments.length ? arguments[0] : void 0); + }; + }, o); + }, function (t, n, e) { + var r = e(2), + o = e(197).codeAt; + r({ + target: "String", + proto: !0 + }, { + codePointAt: function codePointAt(t) { + return o(this, t); + } + }); + }, function (t, n, e) { + var r = e(40), + o = e(12), + i = function i(t) { + return function (n, e) { + var i, + a, + u = String(o(n)), + c = r(e), + f = u.length; + return c < 0 || c >= f ? t ? "" : void 0 : (i = u.charCodeAt(c)) < 55296 || i > 56319 || c + 1 === f || (a = u.charCodeAt(c + 1)) < 56320 || a > 57343 ? t ? u.charAt(c) : i : t ? u.slice(c, c + 2) : a - 56320 + (i - 55296 << 10) + 65536; + }; + }; + t.exports = { + codeAt: i(!1), + charAt: i(!0) + }; + }, function (t, n, e) { + var r, + o = e(2), + i = e(4).f, + a = e(39), + u = e(199), + c = e(12), + f = e(200), + s = e(29), + l = "".endsWith, + p = Math.min, + h = f("endsWith"); + o({ + target: "String", + proto: !0, + forced: !!(s || h || (r = i(String.prototype, "endsWith"), !r || r.writable)) && !h + }, { + endsWith: function endsWith(t) { + var n = String(c(this)); + u(t); + var e = arguments.length > 1 ? arguments[1] : void 0, + r = a(n.length), + o = void 0 === e ? r : p(a(e), r), + i = String(t); + return l ? l.call(n, i, o) : n.slice(o - i.length, o) === i; + } + }); + }, function (t, n, e) { + var r = e(186); + t.exports = function (t) { + if (r(t)) throw TypeError("The method doesn't accept regular expressions"); + return t; + }; + }, function (t, n, e) { + var r = e(49)("match"); + t.exports = function (t) { + var n = /./; + try { + "/./"[t](n); + } catch (e) { + try { + return n[r] = !1, "/./"[t](n); + } catch (t) {} + } + return !1; + }; + }, function (t, n, e) { + var r = e(2), + o = e(41), + i = String.fromCharCode, + a = String.fromCodePoint; + r({ + target: "String", + stat: !0, + forced: !!a && 1 != a.length + }, { + fromCodePoint: function fromCodePoint(t) { + for (var n, e = [], r = arguments.length, a = 0; r > a;) { + if (n = +arguments[a++], o(n, 1114111) !== n) throw RangeError(n + " is not a valid code point"); + e.push(n < 65536 ? i(n) : i(55296 + ((n -= 65536) >> 10), n % 1024 + 56320)); + } + return e.join(""); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(199), + i = e(12); + r({ + target: "String", + proto: !0, + forced: !e(200)("includes") + }, { + includes: function includes(t) { + return !!~String(i(this)).indexOf(o(t), arguments.length > 1 ? arguments[1] : void 0); + } + }); + }, function (t, n, e) { + var r = e(197).charAt, + o = e(25), + i = e(90), + a = o.set, + u = o.getterFor("String Iterator"); + i(String, "String", function (t) { + a(this, { + type: "String Iterator", + string: String(t), + index: 0 + }); + }, function () { + var t, + n = u(this), + e = n.string, + o = n.index; + return o >= e.length ? { + value: void 0, + done: !0 + } : (t = r(e, o), n.index += t.length, { + value: t, + done: !1 + }); + }); + }, function (t, n, e) { + var r = e(205), + o = e(20), + i = e(39), + a = e(12), + u = e(206), + c = e(207); + r("match", 1, function (t, n, e) { + return [function (n) { + var e = a(this), + r = null == n ? void 0 : n[t]; + return void 0 !== r ? r.call(n, e) : new RegExp(n)[t](String(e)); + }, function (t) { + var r = e(n, t, this); + if (r.done) return r.value; + var a = o(t), + f = String(this); + if (!a.global) return c(a, f); + var s = a.unicode; + a.lastIndex = 0; + for (var l, p = [], h = 0; null !== (l = c(a, f));) { + var v = String(l[0]); + p[h] = v, "" === v && (a.lastIndex = u(f, i(a.lastIndex), s)), h++; + } + return 0 === h ? null : p; + }]; + }); + }, function (t, n, e) { + e(189); + var r = e(21), + o = e(6), + i = e(49), + a = e(190), + u = e(18), + c = i("species"), + f = !o(function () { + var t = /./; + return t.exec = function () { + var t = []; + return t.groups = { + a: "7" + }, t; + }, "7" !== "".replace(t, "$<a>"); + }), + s = "$0" === "a".replace(/./, "$0"), + l = i("replace"), + p = !!/./[l] && "" === /./[l]("a", "$0"), + h = !o(function () { + var t = /(?:)/, + n = t.exec; + t.exec = function () { + return n.apply(this, arguments); + }; + var e = "ab".split(t); + return 2 !== e.length || "a" !== e[0] || "b" !== e[1]; + }); + t.exports = function (t, n, e, l) { + var v = i(t), + g = !o(function () { + var n = {}; + return n[v] = function () { + return 7; + }, 7 != ""[t](n); + }), + d = g && !o(function () { + var n = !1, + e = /a/; + return "split" === t && ((e = {}).constructor = {}, e.constructor[c] = function () { + return e; + }, e.flags = "", e[v] = /./[v]), e.exec = function () { + return n = !0, null; + }, e[v](""), !n; + }); + if (!g || !d || "replace" === t && (!f || !s || p) || "split" === t && !h) { + var y = /./[v], + x = e(v, ""[t], function (t, n, e, r, o) { + return n.exec === a ? g && !o ? { + done: !0, + value: y.call(n, e, r) + } : { + done: !0, + value: t.call(e, n, r) + } : { + done: !1 + }; + }, { + REPLACE_KEEPS_$0: s, + REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: p + }), + m = x[0], + b = x[1]; + r(String.prototype, t, m), r(RegExp.prototype, v, 2 == n ? function (t, n) { + return b.call(t, this, n); + } : function (t) { + return b.call(t, this); + }); + } + l && u(RegExp.prototype[v], "sham", !0); + }; + }, function (t, n, e) { + var r = e(197).charAt; + t.exports = function (t, n, e) { + return n + (e ? r(t, n).length : 1); + }; + }, function (t, n, e) { + var r = e(11), + o = e(190); + t.exports = function (t, n) { + var e = t.exec; + if ("function" == typeof e) { + var i = e.call(t, n); + if ("object" != typeof i) throw TypeError("RegExp exec method returned something other than an Object or null"); + return i; + } + if ("RegExp" !== r(t)) throw TypeError("RegExp#exec called on incompatible receiver"); + return o.call(t, n); + }; + }, function (t, n, e) { + var r = e(2), + o = e(91), + i = e(12), + a = e(39), + u = e(65), + c = e(20), + f = e(11), + s = e(186), + l = e(187), + p = e(18), + h = e(6), + v = e(49), + g = e(175), + d = e(206), + y = e(25), + x = e(29), + m = v("matchAll"), + b = y.set, + S = y.getterFor("RegExp String Iterator"), + E = RegExp.prototype, + w = E.exec, + O = "".matchAll, + R = !!O && !h(function () { + "a".matchAll(/./); + }), + A = o(function (t, n, e, r) { + b(this, { + type: "RegExp String Iterator", + regexp: t, + string: n, + global: e, + unicode: r, + done: !1 + }); + }, "RegExp String", function () { + var t = S(this); + if (t.done) return { + value: void 0, + done: !0 + }; + var n = t.regexp, + e = t.string, + r = function (t, n) { + var e, + r = t.exec; + if ("function" == typeof r) { + if ("object" != typeof (e = r.call(t, n))) throw TypeError("Incorrect exec result"); + return e; + } + return w.call(t, n); + }(n, e); + return null === r ? { + value: void 0, + done: t.done = !0 + } : t.global ? ("" == String(r[0]) && (n.lastIndex = d(e, a(n.lastIndex), t.unicode)), { + value: r, + done: !1 + }) : (t.done = !0, { + value: r, + done: !1 + }); + }), + j = function j(t) { + var n, + e, + r, + o, + i, + u, + f = c(this), + s = String(t); + return n = g(f, RegExp), void 0 === (e = f.flags) && f instanceof RegExp && !("flags" in E) && (e = l.call(f)), r = void 0 === e ? "" : String(e), o = new n(n === RegExp ? f.source : f, r), i = !!~r.indexOf("g"), u = !!~r.indexOf("u"), o.lastIndex = a(f.lastIndex), new A(o, s, i, u); + }; + r({ + target: "String", + proto: !0, + forced: R + }, { + matchAll: function matchAll(t) { + var n, + e, + r, + o = i(this); + if (null != t) { + if (s(t) && !~String(i("flags" in E ? t.flags : l.call(t))).indexOf("g")) throw TypeError("`.matchAll` does not allow non-global regexes"); + if (R) return O.apply(o, arguments); + if (void 0 === (e = t[m]) && x && "RegExp" == f(t) && (e = j), null != e) return u(e).call(t, o); + } else if (R) return O.apply(o, arguments); + return n = String(o), r = new RegExp(t, "g"), x ? j.call(r, n) : r[m](n); + } + }), x || m in E || p(E, m, j); + }, function (t, n, e) { + var r = e(2), + o = e(210).end; + r({ + target: "String", + proto: !0, + forced: e(211) + }, { + padEnd: function padEnd(t) { + return o(this, t, arguments.length > 1 ? arguments[1] : void 0); + } + }); + }, function (t, n, e) { + var r = e(39), + o = e(145), + i = e(12), + a = Math.ceil, + u = function u(t) { + return function (n, e, u) { + var c, + f, + s = String(i(n)), + l = s.length, + p = void 0 === u ? " " : String(u), + h = r(e); + return h <= l || "" == p ? s : (c = h - l, (f = o.call(p, a(c / p.length))).length > c && (f = f.slice(0, c)), t ? s + f : f + s); + }; + }; + t.exports = { + start: u(!1), + end: u(!0) + }; + }, function (t, n, e) { + var r = e(54); + t.exports = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(r); + }, function (t, n, e) { + var r = e(2), + o = e(210).start; + r({ + target: "String", + proto: !0, + forced: e(211) + }, { + padStart: function padStart(t) { + return o(this, t, arguments.length > 1 ? arguments[1] : void 0); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(9), + i = e(39); + r({ + target: "String", + stat: !0 + }, { + raw: function raw(t) { + for (var n = o(t.raw), e = i(n.length), r = arguments.length, a = [], u = 0; e > u;) a.push(String(n[u++])), u < r && a.push(String(arguments[u])); + return a.join(""); + } + }); + }, function (t, n, e) { + e(2)({ + target: "String", + proto: !0 + }, { + repeat: e(145) + }); + }, function (t, n, e) { + var r = e(205), + o = e(20), + i = e(46), + a = e(39), + u = e(40), + c = e(12), + f = e(206), + s = e(207), + l = Math.max, + p = Math.min, + h = Math.floor, + v = /\$([$&'`]|\d\d?|<[^>]*>)/g, + g = /\$([$&'`]|\d\d?)/g; + r("replace", 2, function (t, n, e, r) { + var d = r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE, + y = r.REPLACE_KEEPS_$0, + x = d ? "$" : "$0"; + return [function (e, r) { + var o = c(this), + i = null == e ? void 0 : e[t]; + return void 0 !== i ? i.call(e, o, r) : n.call(String(o), e, r); + }, function (t, r) { + if (!d && y || "string" == typeof r && -1 === r.indexOf(x)) { + var i = e(n, t, this, r); + if (i.done) return i.value; + } + var c = o(t), + h = String(this), + v = "function" == typeof r; + v || (r = String(r)); + var g = c.global; + if (g) { + var b = c.unicode; + c.lastIndex = 0; + } + for (var S = [];;) { + var E = s(c, h); + if (null === E) break; + if (S.push(E), !g) break; + "" === String(E[0]) && (c.lastIndex = f(h, a(c.lastIndex), b)); + } + for (var w, O = "", R = 0, A = 0; A < S.length; A++) { + E = S[A]; + for (var j = String(E[0]), I = l(p(u(E.index), h.length), 0), k = [], P = 1; P < E.length; P++) k.push(void 0 === (w = E[P]) ? w : String(w)); + var L = E.groups; + if (v) { + var T = [j].concat(k, I, h); + void 0 !== L && T.push(L); + var _ = String(r.apply(void 0, T)); + } else _ = m(j, h, I, k, L, r); + I >= R && (O += h.slice(R, I) + _, R = I + j.length); + } + return O + h.slice(R); + }]; + function m(t, e, r, o, a, u) { + var c = r + t.length, + f = o.length, + s = g; + return void 0 !== a && (a = i(a), s = v), n.call(u, s, function (n, i) { + var u; + switch (i.charAt(0)) { + case "$": + return "$"; + case "&": + return t; + case "`": + return e.slice(0, r); + case "'": + return e.slice(c); + case "<": + u = a[i.slice(1, -1)]; + break; + default: + var s = +i; + if (0 === s) return n; + if (s > f) { + var l = h(s / 10); + return 0 === l ? n : l <= f ? void 0 === o[l - 1] ? i.charAt(1) : o[l - 1] + i.charAt(1) : n; + } + u = o[s - 1]; + } + return void 0 === u ? "" : u; + }); + } + }); + }, function (t, n, e) { + var r = e(205), + o = e(20), + i = e(12), + a = e(161), + u = e(207); + r("search", 1, function (t, n, e) { + return [function (n) { + var e = i(this), + r = null == n ? void 0 : n[t]; + return void 0 !== r ? r.call(n, e) : new RegExp(n)[t](String(e)); + }, function (t) { + var r = e(n, t, this); + if (r.done) return r.value; + var i = o(t), + c = String(this), + f = i.lastIndex; + a(f, 0) || (i.lastIndex = 0); + var s = u(i, c); + return a(i.lastIndex, f) || (i.lastIndex = f), null === s ? -1 : s.index; + }]; + }); + }, function (t, n, e) { + var r = e(205), + o = e(186), + i = e(20), + a = e(12), + u = e(175), + c = e(206), + f = e(39), + s = e(207), + l = e(190), + p = e(6), + h = [].push, + v = Math.min, + g = !p(function () { + return !RegExp(4294967295, "y"); + }); + r("split", 2, function (t, n, e) { + var r; + return r = "c" == "abbc".split(/(b)*/)[1] || 4 != "test".split(/(?:)/, -1).length || 2 != "ab".split(/(?:ab)*/).length || 4 != ".".split(/(.?)(.?)/).length || ".".split(/()()/).length > 1 || "".split(/.?/).length ? function (t, e) { + var r = String(a(this)), + i = void 0 === e ? 4294967295 : e >>> 0; + if (0 === i) return []; + if (void 0 === t) return [r]; + if (!o(t)) return n.call(r, t, i); + for (var u, c, f, s = [], p = (t.ignoreCase ? "i" : "") + (t.multiline ? "m" : "") + (t.unicode ? "u" : "") + (t.sticky ? "y" : ""), v = 0, g = new RegExp(t.source, p + "g"); (u = l.call(g, r)) && !((c = g.lastIndex) > v && (s.push(r.slice(v, u.index)), u.length > 1 && u.index < r.length && h.apply(s, u.slice(1)), f = u[0].length, v = c, s.length >= i));) g.lastIndex === u.index && g.lastIndex++; + return v === r.length ? !f && g.test("") || s.push("") : s.push(r.slice(v)), s.length > i ? s.slice(0, i) : s; + } : "0".split(void 0, 0).length ? function (t, e) { + return void 0 === t && 0 === e ? [] : n.call(this, t, e); + } : n, [function (n, e) { + var o = a(this), + i = null == n ? void 0 : n[t]; + return void 0 !== i ? i.call(n, o, e) : r.call(String(o), n, e); + }, function (t, o) { + var a = e(r, t, this, o, r !== n); + if (a.done) return a.value; + var l = i(t), + p = String(this), + h = u(l, RegExp), + d = l.unicode, + y = (l.ignoreCase ? "i" : "") + (l.multiline ? "m" : "") + (l.unicode ? "u" : "") + (g ? "y" : "g"), + x = new h(g ? l : "^(?:" + l.source + ")", y), + m = void 0 === o ? 4294967295 : o >>> 0; + if (0 === m) return []; + if (0 === p.length) return null === s(x, p) ? [p] : []; + for (var b = 0, S = 0, E = []; S < p.length;) { + x.lastIndex = g ? S : 0; + var w, + O = s(x, g ? p : p.slice(S)); + if (null === O || (w = v(f(x.lastIndex + (g ? 0 : S)), p.length)) === b) S = c(p, S, d);else { + if (E.push(p.slice(b, S)), E.length === m) return E; + for (var R = 1; R <= O.length - 1; R++) if (E.push(O[R]), E.length === m) return E; + S = b = w; + } + } + return E.push(p.slice(b)), E; + }]; + }, !g); + }, function (t, n, e) { + var r, + o = e(2), + i = e(4).f, + a = e(39), + u = e(199), + c = e(12), + f = e(200), + s = e(29), + l = "".startsWith, + p = Math.min, + h = f("startsWith"); + o({ + target: "String", + proto: !0, + forced: !!(s || h || (r = i(String.prototype, "startsWith"), !r || r.writable)) && !h + }, { + startsWith: function startsWith(t) { + var n = String(c(this)); + u(t); + var e = a(p(arguments.length > 1 ? arguments[1] : void 0, n.length)), + r = String(t); + return l ? l.call(n, r, e) : n.slice(e, e + r.length) === r; + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(128).trim; + r({ + target: "String", + proto: !0, + forced: e(220)("trim") + }, { + trim: function trim() { + return o(this); + } + }); + }, function (t, n, e) { + var r = e(6), + o = e(129); + t.exports = function (t) { + return r(function () { + return !!o[t]() || "â€‹Â…á Ž" != "â€‹Â…á Ž"[t]() || o[t].name !== t; + }); + }; + }, function (t, n, e) { + var r = e(2), + o = e(128).end, + i = e(220)("trimEnd"), + a = i ? function () { + return o(this); + } : "".trimEnd; + r({ + target: "String", + proto: !0, + forced: i + }, { + trimEnd: a, + trimRight: a + }); + }, function (t, n, e) { + var r = e(2), + o = e(128).start, + i = e(220)("trimStart"), + a = i ? function () { + return o(this); + } : "".trimStart; + r({ + target: "String", + proto: !0, + forced: i + }, { + trimStart: a, + trimLeft: a + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("anchor") + }, { + anchor: function anchor(t) { + return o(this, "a", "name", t); + } + }); + }, function (t, n, e) { + var r = e(12), + o = /"/g; + t.exports = function (t, n, e, i) { + var a = String(r(t)), + u = "<" + n; + return "" !== e && (u += " " + e + '="' + String(i).replace(o, """) + '"'), u + ">" + a + "</" + n + ">"; + }; + }, function (t, n, e) { + var r = e(6); + t.exports = function (t) { + return r(function () { + var n = ""[t]('"'); + return n !== n.toLowerCase() || n.split('"').length > 3; + }); + }; + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("big") + }, { + big: function big() { + return o(this, "big", "", ""); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("blink") + }, { + blink: function blink() { + return o(this, "blink", "", ""); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("bold") + }, { + bold: function bold() { + return o(this, "b", "", ""); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("fixed") + }, { + fixed: function fixed() { + return o(this, "tt", "", ""); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("fontcolor") + }, { + fontcolor: function fontcolor(t) { + return o(this, "font", "color", t); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("fontsize") + }, { + fontsize: function fontsize(t) { + return o(this, "font", "size", t); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("italics") + }, { + italics: function italics() { + return o(this, "i", "", ""); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("link") + }, { + link: function link(t) { + return o(this, "a", "href", t); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("small") + }, { + small: function small() { + return o(this, "small", "", ""); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("strike") + }, { + strike: function strike() { + return o(this, "strike", "", ""); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("sub") + }, { + sub: function sub() { + return o(this, "sub", "", ""); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("sup") + }, { + sup: function sup() { + return o(this, "sup", "", ""); + } + }); + }, function (t, n, e) { + var r, + o = e(3), + i = e(126), + a = e(120), + u = e(119), + c = e(239), + f = e(14), + s = e(25).enforce, + l = e(26), + p = !o.ActiveXObject && "ActiveXObject" in o, + h = Object.isExtensible, + v = function v(t) { + return function () { + return t(this, arguments.length ? arguments[0] : void 0); + }; + }, + g = t.exports = u("WeakMap", v, c); + if (l && p) { + r = c.getConstructor(v, "WeakMap", !0), a.REQUIRED = !0; + var d = g.prototype, + y = d.delete, + x = d.has, + m = d.get, + b = d.set; + i(d, { + delete: function _delete(t) { + if (f(t) && !h(t)) { + var n = s(this); + return n.frozen || (n.frozen = new r()), y.call(this, t) || n.frozen.delete(t); + } + return y.call(this, t); + }, + has: function has(t) { + if (f(t) && !h(t)) { + var n = s(this); + return n.frozen || (n.frozen = new r()), x.call(this, t) || n.frozen.has(t); + } + return x.call(this, t); + }, + get: function get(t) { + if (f(t) && !h(t)) { + var n = s(this); + return n.frozen || (n.frozen = new r()), x.call(this, t) ? m.call(this, t) : n.frozen.get(t); + } + return m.call(this, t); + }, + set: function set(t, n) { + if (f(t) && !h(t)) { + var e = s(this); + e.frozen || (e.frozen = new r()), x.call(this, t) ? b.call(this, t, n) : e.frozen.set(t, n); + } else b.call(this, t, n); + return this; + } + }); + } + }, function (t, n, e) { + var r = e(126), + o = e(120).getWeakData, + i = e(20), + a = e(14), + u = e(123), + c = e(122), + f = e(63), + s = e(15), + l = e(25), + p = l.set, + h = l.getterFor, + v = f.find, + g = f.findIndex, + d = 0, + y = function y(t) { + return t.frozen || (t.frozen = new x()); + }, + x = function x() { + this.entries = []; + }, + m = function m(t, n) { + return v(t.entries, function (t) { + return t[0] === n; + }); + }; + x.prototype = { + get: function get(t) { + var n = m(this, t); + if (n) return n[1]; + }, + has: function has(t) { + return !!m(this, t); + }, + set: function set(t, n) { + var e = m(this, t); + e ? e[1] = n : this.entries.push([t, n]); + }, + delete: function _delete(t) { + var n = g(this.entries, function (n) { + return n[0] === t; + }); + return ~n && this.entries.splice(n, 1), !!~n; + } + }, t.exports = { + getConstructor: function getConstructor(t, n, e, f) { + var l = t(function (t, r) { + u(t, l, n), p(t, { + type: n, + id: d++, + frozen: void 0 + }), null != r && c(r, t[f], t, e); + }), + v = h(n), + g = function g(t, n, e) { + var r = v(t), + a = o(i(n), !0); + return !0 === a ? y(r).set(n, e) : a[r.id] = e, t; + }; + return r(l.prototype, { + delete: function _delete(t) { + var n = v(this); + if (!a(t)) return !1; + var e = o(t); + return !0 === e ? y(n).delete(t) : e && s(e, n.id) && delete e[n.id]; + }, + has: function has(t) { + var n = v(this); + if (!a(t)) return !1; + var e = o(t); + return !0 === e ? y(n).has(t) : e && s(e, n.id); + } + }), r(l.prototype, e ? { + get: function get(t) { + var n = v(this); + if (a(t)) { + var e = o(t); + return !0 === e ? y(n).get(t) : e ? e[n.id] : void 0; + } + }, + set: function set(t, n) { + return g(this, t, n); + } + } : { + add: function add(t) { + return g(this, t, !0); + } + }), l; + } + }; + }, function (t, n, e) { + e(119)("WeakSet", function (t) { + return function () { + return t(this, arguments.length ? arguments[0] : void 0); + }; + }, e(239)); + }, function (t, n, e) { + var r = e(3), + o = e(242), + i = e(77), + a = e(18); + for (var u in o) { + var c = r[u], + f = c && c.prototype; + if (f && f.forEach !== i) try { + a(f, "forEach", i); + } catch (t) { + f.forEach = i; + } + } + }, function (t, n) { + t.exports = { + CSSRuleList: 0, + CSSStyleDeclaration: 0, + CSSValueList: 0, + ClientRectList: 0, + DOMRectList: 0, + DOMStringList: 0, + DOMTokenList: 1, + DataTransferItemList: 0, + FileList: 0, + HTMLAllCollection: 0, + HTMLCollection: 0, + HTMLFormElement: 0, + HTMLSelectElement: 0, + MediaList: 0, + MimeTypeArray: 0, + NamedNodeMap: 0, + NodeList: 1, + PaintRequestList: 0, + Plugin: 0, + PluginArray: 0, + SVGLengthList: 0, + SVGNumberList: 0, + SVGPathSegList: 0, + SVGPointList: 0, + SVGStringList: 0, + SVGTransformList: 0, + SourceBufferList: 0, + StyleSheetList: 0, + TextTrackCueList: 0, + TextTrackList: 0, + TouchList: 0 + }; + }, function (t, n, e) { + e(203); + var r, + o = e(2), + i = e(5), + a = e(244), + u = e(3), + c = e(59), + f = e(21), + s = e(123), + l = e(15), + p = e(147), + h = e(79), + v = e(197).codeAt, + g = e(245), + d = e(95), + y = e(246), + x = e(25), + m = u.URL, + b = y.URLSearchParams, + S = y.getState, + E = x.set, + w = x.getterFor("URL"), + O = Math.floor, + R = Math.pow, + A = /[A-Za-z]/, + j = /[\d+-.A-Za-z]/, + I = /\d/, + k = /^(0x|0X)/, + P = /^[0-7]+$/, + L = /^\d+$/, + T = /^[\dA-Fa-f]+$/, + _ = /[\u0000\u0009\u000A\u000D #%/:?@[\\]]/, + U = /[\u0000\u0009\u000A\u000D #/:?@[\\]]/, + N = /^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g, + C = /[\u0009\u000A\u000D]/g, + F = function F(t, n) { + var e, r, o; + if ("[" == n.charAt(0)) { + if ("]" != n.charAt(n.length - 1)) return "Invalid host"; + if (!(e = z(n.slice(1, -1)))) return "Invalid host"; + t.host = e; + } else if (X(t)) { + if (n = g(n), _.test(n)) return "Invalid host"; + if (null === (e = M(n))) return "Invalid host"; + t.host = e; + } else { + if (U.test(n)) return "Invalid host"; + for (e = "", r = h(n), o = 0; o < r.length; o++) e += G(r[o], q); + t.host = e; + } + }, + M = function M(t) { + var n, + e, + r, + o, + i, + a, + u, + c = t.split("."); + if (c.length && "" == c[c.length - 1] && c.pop(), (n = c.length) > 4) return t; + for (e = [], r = 0; r < n; r++) { + if ("" == (o = c[r])) return t; + if (i = 10, o.length > 1 && "0" == o.charAt(0) && (i = k.test(o) ? 16 : 8, o = o.slice(8 == i ? 1 : 2)), "" === o) a = 0;else { + if (!(10 == i ? L : 8 == i ? P : T).test(o)) return t; + a = parseInt(o, i); + } + e.push(a); + } + for (r = 0; r < n; r++) if (a = e[r], r == n - 1) { + if (a >= R(256, 5 - n)) return null; + } else if (a > 255) return null; + for (u = e.pop(), r = 0; r < e.length; r++) u += e[r] * R(256, 3 - r); + return u; + }, + z = function z(t) { + var n, + e, + r, + o, + i, + a, + u, + c = [0, 0, 0, 0, 0, 0, 0, 0], + f = 0, + s = null, + l = 0, + p = function p() { + return t.charAt(l); + }; + if (":" == p()) { + if (":" != t.charAt(1)) return; + l += 2, s = ++f; + } + for (; p();) { + if (8 == f) return; + if (":" != p()) { + for (n = e = 0; e < 4 && T.test(p());) n = 16 * n + parseInt(p(), 16), l++, e++; + if ("." == p()) { + if (0 == e) return; + if (l -= e, f > 6) return; + for (r = 0; p();) { + if (o = null, r > 0) { + if (!("." == p() && r < 4)) return; + l++; + } + if (!I.test(p())) return; + for (; I.test(p());) { + if (i = parseInt(p(), 10), null === o) o = i;else { + if (0 == o) return; + o = 10 * o + i; + } + if (o > 255) return; + l++; + } + c[f] = 256 * c[f] + o, 2 != ++r && 4 != r || f++; + } + if (4 != r) return; + break; + } + if (":" == p()) { + if (l++, !p()) return; + } else if (p()) return; + c[f++] = n; + } else { + if (null !== s) return; + l++, s = ++f; + } + } + if (null !== s) for (a = f - s, f = 7; 0 != f && a > 0;) u = c[f], c[f--] = c[s + a - 1], c[s + --a] = u;else if (8 != f) return; + return c; + }, + D = function D(t) { + var n, e, r, o; + if ("number" == typeof t) { + for (n = [], e = 0; e < 4; e++) n.unshift(t % 256), t = O(t / 256); + return n.join("."); + } + if ("object" == typeof t) { + for (n = "", r = function (t) { + for (var n = null, e = 1, r = null, o = 0, i = 0; i < 8; i++) 0 !== t[i] ? (o > e && (n = r, e = o), r = null, o = 0) : (null === r && (r = i), ++o); + return o > e && (n = r, e = o), n; + }(t), e = 0; e < 8; e++) o && 0 === t[e] || (o && (o = !1), r === e ? (n += e ? ":" : "::", o = !0) : (n += t[e].toString(16), e < 7 && (n += ":"))); + return "[" + n + "]"; + } + return t; + }, + q = {}, + B = p({}, q, { + " ": 1, + '"': 1, + "<": 1, + ">": 1, + "`": 1 + }), + W = p({}, B, { + "#": 1, + "?": 1, + "{": 1, + "}": 1 + }), + $ = p({}, W, { + "/": 1, + ":": 1, + ";": 1, + "=": 1, + "@": 1, + "[": 1, + "\\": 1, + "]": 1, + "^": 1, + "|": 1 + }), + G = function G(t, n) { + var e = v(t, 0); + return e > 32 && e < 127 && !l(n, t) ? t : encodeURIComponent(t); + }, + V = { + ftp: 21, + file: null, + http: 80, + https: 443, + ws: 80, + wss: 443 + }, + X = function X(t) { + return l(V, t.scheme); + }, + Y = function Y(t) { + return "" != t.username || "" != t.password; + }, + K = function K(t) { + return !t.host || t.cannotBeABaseURL || "file" == t.scheme; + }, + J = function J(t, n) { + var e; + return 2 == t.length && A.test(t.charAt(0)) && (":" == (e = t.charAt(1)) || !n && "|" == e); + }, + H = function H(t) { + var n; + return t.length > 1 && J(t.slice(0, 2)) && (2 == t.length || "/" === (n = t.charAt(2)) || "\\" === n || "?" === n || "#" === n); + }, + Q = function Q(t) { + var n = t.path, + e = n.length; + !e || "file" == t.scheme && 1 == e && J(n[0], !0) || n.pop(); + }, + Z = function Z(t) { + return "." === t || "%2e" === t.toLowerCase(); + }, + tt = {}, + nt = {}, + et = {}, + rt = {}, + ot = {}, + it = {}, + at = {}, + ut = {}, + ct = {}, + ft = {}, + st = {}, + lt = {}, + pt = {}, + ht = {}, + vt = {}, + gt = {}, + dt = {}, + yt = {}, + xt = {}, + mt = {}, + bt = {}, + St = function St(t, n, e, o) { + var i, + a, + u, + c, + f, + s = e || tt, + p = 0, + v = "", + g = !1, + d = !1, + y = !1; + for (e || (t.scheme = "", t.username = "", t.password = "", t.host = null, t.port = null, t.path = [], t.query = null, t.fragment = null, t.cannotBeABaseURL = !1, n = n.replace(N, "")), n = n.replace(C, ""), i = h(n); p <= i.length;) { + switch (a = i[p], s) { + case tt: + if (!a || !A.test(a)) { + if (e) return "Invalid scheme"; + s = et; + continue; + } + v += a.toLowerCase(), s = nt; + break; + case nt: + if (a && (j.test(a) || "+" == a || "-" == a || "." == a)) v += a.toLowerCase();else { + if (":" != a) { + if (e) return "Invalid scheme"; + v = "", s = et, p = 0; + continue; + } + if (e && (X(t) != l(V, v) || "file" == v && (Y(t) || null !== t.port) || "file" == t.scheme && !t.host)) return; + if (t.scheme = v, e) return void (X(t) && V[t.scheme] == t.port && (t.port = null)); + v = "", "file" == t.scheme ? s = ht : X(t) && o && o.scheme == t.scheme ? s = rt : X(t) ? s = ut : "/" == i[p + 1] ? (s = ot, p++) : (t.cannotBeABaseURL = !0, t.path.push(""), s = xt); + } + break; + case et: + if (!o || o.cannotBeABaseURL && "#" != a) return "Invalid scheme"; + if (o.cannotBeABaseURL && "#" == a) { + t.scheme = o.scheme, t.path = o.path.slice(), t.query = o.query, t.fragment = "", t.cannotBeABaseURL = !0, s = bt; + break; + } + s = "file" == o.scheme ? ht : it; + continue; + case rt: + if ("/" != a || "/" != i[p + 1]) { + s = it; + continue; + } + s = ct, p++; + break; + case ot: + if ("/" == a) { + s = ft; + break; + } + s = yt; + continue; + case it: + if (t.scheme = o.scheme, a == r) t.username = o.username, t.password = o.password, t.host = o.host, t.port = o.port, t.path = o.path.slice(), t.query = o.query;else if ("/" == a || "\\" == a && X(t)) s = at;else if ("?" == a) t.username = o.username, t.password = o.password, t.host = o.host, t.port = o.port, t.path = o.path.slice(), t.query = "", s = mt;else { + if ("#" != a) { + t.username = o.username, t.password = o.password, t.host = o.host, t.port = o.port, t.path = o.path.slice(), t.path.pop(), s = yt; + continue; + } + t.username = o.username, t.password = o.password, t.host = o.host, t.port = o.port, t.path = o.path.slice(), t.query = o.query, t.fragment = "", s = bt; + } + break; + case at: + if (!X(t) || "/" != a && "\\" != a) { + if ("/" != a) { + t.username = o.username, t.password = o.password, t.host = o.host, t.port = o.port, s = yt; + continue; + } + s = ft; + } else s = ct; + break; + case ut: + if (s = ct, "/" != a || "/" != v.charAt(p + 1)) continue; + p++; + break; + case ct: + if ("/" != a && "\\" != a) { + s = ft; + continue; + } + break; + case ft: + if ("@" == a) { + g && (v = "%40" + v), g = !0, u = h(v); + for (var x = 0; x < u.length; x++) { + var m = u[x]; + if (":" != m || y) { + var b = G(m, $); + y ? t.password += b : t.username += b; + } else y = !0; + } + v = ""; + } else if (a == r || "/" == a || "?" == a || "#" == a || "\\" == a && X(t)) { + if (g && "" == v) return "Invalid authority"; + p -= h(v).length + 1, v = "", s = st; + } else v += a; + break; + case st: + case lt: + if (e && "file" == t.scheme) { + s = gt; + continue; + } + if (":" != a || d) { + if (a == r || "/" == a || "?" == a || "#" == a || "\\" == a && X(t)) { + if (X(t) && "" == v) return "Invalid host"; + if (e && "" == v && (Y(t) || null !== t.port)) return; + if (c = F(t, v)) return c; + if (v = "", s = dt, e) return; + continue; + } + "[" == a ? d = !0 : "]" == a && (d = !1), v += a; + } else { + if ("" == v) return "Invalid host"; + if (c = F(t, v)) return c; + if (v = "", s = pt, e == lt) return; + } + break; + case pt: + if (!I.test(a)) { + if (a == r || "/" == a || "?" == a || "#" == a || "\\" == a && X(t) || e) { + if ("" != v) { + var S = parseInt(v, 10); + if (S > 65535) return "Invalid port"; + t.port = X(t) && S === V[t.scheme] ? null : S, v = ""; + } + if (e) return; + s = dt; + continue; + } + return "Invalid port"; + } + v += a; + break; + case ht: + if (t.scheme = "file", "/" == a || "\\" == a) s = vt;else { + if (!o || "file" != o.scheme) { + s = yt; + continue; + } + if (a == r) t.host = o.host, t.path = o.path.slice(), t.query = o.query;else if ("?" == a) t.host = o.host, t.path = o.path.slice(), t.query = "", s = mt;else { + if ("#" != a) { + H(i.slice(p).join("")) || (t.host = o.host, t.path = o.path.slice(), Q(t)), s = yt; + continue; + } + t.host = o.host, t.path = o.path.slice(), t.query = o.query, t.fragment = "", s = bt; + } + } + break; + case vt: + if ("/" == a || "\\" == a) { + s = gt; + break; + } + o && "file" == o.scheme && !H(i.slice(p).join("")) && (J(o.path[0], !0) ? t.path.push(o.path[0]) : t.host = o.host), s = yt; + continue; + case gt: + if (a == r || "/" == a || "\\" == a || "?" == a || "#" == a) { + if (!e && J(v)) s = yt;else if ("" == v) { + if (t.host = "", e) return; + s = dt; + } else { + if (c = F(t, v)) return c; + if ("localhost" == t.host && (t.host = ""), e) return; + v = "", s = dt; + } + continue; + } + v += a; + break; + case dt: + if (X(t)) { + if (s = yt, "/" != a && "\\" != a) continue; + } else if (e || "?" != a) { + if (e || "#" != a) { + if (a != r && (s = yt, "/" != a)) continue; + } else t.fragment = "", s = bt; + } else t.query = "", s = mt; + break; + case yt: + if (a == r || "/" == a || "\\" == a && X(t) || !e && ("?" == a || "#" == a)) { + if (".." === (f = (f = v).toLowerCase()) || "%2e." === f || ".%2e" === f || "%2e%2e" === f ? (Q(t), "/" == a || "\\" == a && X(t) || t.path.push("")) : Z(v) ? "/" == a || "\\" == a && X(t) || t.path.push("") : ("file" == t.scheme && !t.path.length && J(v) && (t.host && (t.host = ""), v = v.charAt(0) + ":"), t.path.push(v)), v = "", "file" == t.scheme && (a == r || "?" == a || "#" == a)) for (; t.path.length > 1 && "" === t.path[0];) t.path.shift(); + "?" == a ? (t.query = "", s = mt) : "#" == a && (t.fragment = "", s = bt); + } else v += G(a, W); + break; + case xt: + "?" == a ? (t.query = "", s = mt) : "#" == a ? (t.fragment = "", s = bt) : a != r && (t.path[0] += G(a, q)); + break; + case mt: + e || "#" != a ? a != r && ("'" == a && X(t) ? t.query += "%27" : t.query += "#" == a ? "%23" : G(a, q)) : (t.fragment = "", s = bt); + break; + case bt: + a != r && (t.fragment += G(a, B)); + } + p++; + } + }, + _Et = function Et(t) { + var n, + e, + r = s(this, _Et, "URL"), + o = arguments.length > 1 ? arguments[1] : void 0, + a = String(t), + u = E(r, { + type: "URL" + }); + if (void 0 !== o) if (o instanceof _Et) n = w(o);else if (e = St(n = {}, String(o))) throw TypeError(e); + if (e = St(u, a, null, n)) throw TypeError(e); + var c = u.searchParams = new b(), + f = S(c); + f.updateSearchParams(u.query), f.updateURL = function () { + u.query = String(c) || null; + }, i || (r.href = Ot.call(r), r.origin = Rt.call(r), r.protocol = At.call(r), r.username = jt.call(r), r.password = It.call(r), r.host = kt.call(r), r.hostname = Pt.call(r), r.port = Lt.call(r), r.pathname = Tt.call(r), r.search = _t.call(r), r.searchParams = Ut.call(r), r.hash = Nt.call(r)); + }, + wt = _Et.prototype, + Ot = function Ot() { + var t = w(this), + n = t.scheme, + e = t.username, + r = t.password, + o = t.host, + i = t.port, + a = t.path, + u = t.query, + c = t.fragment, + f = n + ":"; + return null !== o ? (f += "//", Y(t) && (f += e + (r ? ":" + r : "") + "@"), f += D(o), null !== i && (f += ":" + i)) : "file" == n && (f += "//"), f += t.cannotBeABaseURL ? a[0] : a.length ? "/" + a.join("/") : "", null !== u && (f += "?" + u), null !== c && (f += "#" + c), f; + }, + Rt = function Rt() { + var t = w(this), + n = t.scheme, + e = t.port; + if ("blob" == n) try { + return new URL(n.path[0]).origin; + } catch (t) { + return "null"; + } + return "file" != n && X(t) ? n + "://" + D(t.host) + (null !== e ? ":" + e : "") : "null"; + }, + At = function At() { + return w(this).scheme + ":"; + }, + jt = function jt() { + return w(this).username; + }, + It = function It() { + return w(this).password; + }, + kt = function kt() { + var t = w(this), + n = t.host, + e = t.port; + return null === n ? "" : null === e ? D(n) : D(n) + ":" + e; + }, + Pt = function Pt() { + var t = w(this).host; + return null === t ? "" : D(t); + }, + Lt = function Lt() { + var t = w(this).port; + return null === t ? "" : String(t); + }, + Tt = function Tt() { + var t = w(this), + n = t.path; + return t.cannotBeABaseURL ? n[0] : n.length ? "/" + n.join("/") : ""; + }, + _t = function _t() { + var t = w(this).query; + return t ? "?" + t : ""; + }, + Ut = function Ut() { + return w(this).searchParams; + }, + Nt = function Nt() { + var t = w(this).fragment; + return t ? "#" + t : ""; + }, + Ct = function Ct(t, n) { + return { + get: t, + set: n, + configurable: !0, + enumerable: !0 + }; + }; + if (i && c(wt, { + href: Ct(Ot, function (t) { + var n = w(this), + e = String(t), + r = St(n, e); + if (r) throw TypeError(r); + S(n.searchParams).updateSearchParams(n.query); + }), + origin: Ct(Rt), + protocol: Ct(At, function (t) { + var n = w(this); + St(n, String(t) + ":", tt); + }), + username: Ct(jt, function (t) { + var n = w(this), + e = h(String(t)); + if (!K(n)) { + n.username = ""; + for (var r = 0; r < e.length; r++) n.username += G(e[r], $); + } + }), + password: Ct(It, function (t) { + var n = w(this), + e = h(String(t)); + if (!K(n)) { + n.password = ""; + for (var r = 0; r < e.length; r++) n.password += G(e[r], $); + } + }), + host: Ct(kt, function (t) { + var n = w(this); + n.cannotBeABaseURL || St(n, String(t), st); + }), + hostname: Ct(Pt, function (t) { + var n = w(this); + n.cannotBeABaseURL || St(n, String(t), lt); + }), + port: Ct(Lt, function (t) { + var n = w(this); + K(n) || ("" == (t = String(t)) ? n.port = null : St(n, t, pt)); + }), + pathname: Ct(Tt, function (t) { + var n = w(this); + n.cannotBeABaseURL || (n.path = [], St(n, t + "", dt)); + }), + search: Ct(_t, function (t) { + var n = w(this); + "" == (t = String(t)) ? n.query = null : ("?" == t.charAt(0) && (t = t.slice(1)), n.query = "", St(n, t, mt)), S(n.searchParams).updateSearchParams(n.query); + }), + searchParams: Ct(Ut), + hash: Ct(Nt, function (t) { + var n = w(this); + "" != (t = String(t)) ? ("#" == t.charAt(0) && (t = t.slice(1)), n.fragment = "", St(n, t, bt)) : n.fragment = null; + }) + }), f(wt, "toJSON", function () { + return Ot.call(this); + }, { + enumerable: !0 + }), f(wt, "toString", function () { + return Ot.call(this); + }, { + enumerable: !0 + }), m) { + var Ft = m.createObjectURL, + Mt = m.revokeObjectURL; + Ft && f(_Et, "createObjectURL", function (t) { + return Ft.apply(m, arguments); + }), Mt && f(_Et, "revokeObjectURL", function (t) { + return Mt.apply(m, arguments); + }); + } + d(_Et, "URL"), o({ + global: !0, + forced: !a, + sham: !i + }, { + URL: _Et + }); + }, function (t, n, e) { + var r = e(6), + o = e(49), + i = e(29), + a = o("iterator"); + t.exports = !r(function () { + var t = new URL("b?a=1&b=2&c=3", "http://a"), + n = t.searchParams, + e = ""; + return t.pathname = "c%20d", n.forEach(function (t, r) { + n.delete("b"), e += r + t; + }), i && !t.toJSON || !n.sort || "http://a/c%20d?a=1&c=3" !== t.href || "3" !== n.get("c") || "a=1" !== String(new URLSearchParams("?a=1")) || !n[a] || "a" !== new URL("https://a@b").username || "b" !== new URLSearchParams(new URLSearchParams("a=b")).get("a") || "xn--e1aybc" !== new URL("http://теÑÑ‚").host || "#%D0%B1" !== new URL("http://a#б").hash || "a1c3" !== e || "x" !== new URL("http://x", void 0).host; + }); + }, function (t, n, e) { + var r = /[^\0-\u007E]/, + o = /[.\u3002\uFF0E\uFF61]/g, + i = "Overflow: input needs wider integers to process", + a = Math.floor, + u = String.fromCharCode, + c = function c(t) { + return t + 22 + 75 * (t < 26); + }, + f = function f(t, n, e) { + var r = 0; + for (t = e ? a(t / 700) : t >> 1, t += a(t / n); t > 455; r += 36) t = a(t / 35); + return a(r + 36 * t / (t + 38)); + }, + s = function s(t) { + var n, + e, + r = [], + o = (t = function (t) { + for (var n = [], e = 0, r = t.length; e < r;) { + var o = t.charCodeAt(e++); + if (o >= 55296 && o <= 56319 && e < r) { + var i = t.charCodeAt(e++); + 56320 == (64512 & i) ? n.push(((1023 & o) << 10) + (1023 & i) + 65536) : (n.push(o), e--); + } else n.push(o); + } + return n; + }(t)).length, + s = 128, + l = 0, + p = 72; + for (n = 0; n < t.length; n++) (e = t[n]) < 128 && r.push(u(e)); + var h = r.length, + v = h; + for (h && r.push("-"); v < o;) { + var g = 2147483647; + for (n = 0; n < t.length; n++) (e = t[n]) >= s && e < g && (g = e); + var d = v + 1; + if (g - s > a((2147483647 - l) / d)) throw RangeError(i); + for (l += (g - s) * d, s = g, n = 0; n < t.length; n++) { + if ((e = t[n]) < s && ++l > 2147483647) throw RangeError(i); + if (e == s) { + for (var y = l, x = 36;; x += 36) { + var m = x <= p ? 1 : x >= p + 26 ? 26 : x - p; + if (y < m) break; + var b = y - m, + S = 36 - m; + r.push(u(c(m + b % S))), y = a(b / S); + } + r.push(u(c(y))), p = f(l, d, v == h), l = 0, ++v; + } + } + ++l, ++s; + } + return r.join(""); + }; + t.exports = function (t) { + var n, + e, + i = [], + a = t.toLowerCase().replace(o, ".").split("."); + for (n = 0; n < a.length; n++) e = a[n], i.push(r.test(e) ? "xn--" + s(e) : e); + return i.join("."); + }; + }, function (t, n, e) { + e(89); + var r = e(2), + o = e(34), + i = e(244), + a = e(21), + u = e(126), + c = e(95), + f = e(91), + s = e(25), + l = e(123), + p = e(15), + h = e(64), + v = e(84), + g = e(20), + d = e(14), + y = e(58), + x = e(8), + m = e(247), + b = e(83), + S = e(49), + E = o("fetch"), + w = o("Headers"), + O = S("iterator"), + R = s.set, + A = s.getterFor("URLSearchParams"), + j = s.getterFor("URLSearchParamsIterator"), + I = /\+/g, + k = Array(4), + P = function P(t) { + return k[t - 1] || (k[t - 1] = RegExp("((?:%[\\da-f]{2}){" + t + "})", "gi")); + }, + L = function L(t) { + try { + return decodeURIComponent(t); + } catch (n) { + return t; + } + }, + T = function T(t) { + var n = t.replace(I, " "), + e = 4; + try { + return decodeURIComponent(n); + } catch (t) { + for (; e;) n = n.replace(P(e--), L); + return n; + } + }, + _ = /[!'()~]|%20/g, + U = { + "!": "%21", + "'": "%27", + "(": "%28", + ")": "%29", + "~": "%7E", + "%20": "+" + }, + N = function N(t) { + return U[t]; + }, + C = function C(t) { + return encodeURIComponent(t).replace(_, N); + }, + F = function F(t, n) { + if (n) for (var e, r, o = n.split("&"), i = 0; i < o.length;) (e = o[i++]).length && (r = e.split("="), t.push({ + key: T(r.shift()), + value: T(r.join("=")) + })); + }, + M = function M(t) { + this.entries.length = 0, F(this.entries, t); + }, + z = function z(t, n) { + if (t < n) throw TypeError("Not enough arguments"); + }, + D = f(function (t, n) { + R(this, { + type: "URLSearchParamsIterator", + iterator: m(A(t).entries), + kind: n + }); + }, "Iterator", function () { + var t = j(this), + n = t.kind, + e = t.iterator.next(), + r = e.value; + return e.done || (e.value = "keys" === n ? r.key : "values" === n ? r.value : [r.key, r.value]), e; + }), + _q = function q() { + l(this, _q, "URLSearchParams"); + var t, + n, + e, + r, + o, + i, + a, + u, + c, + f = arguments.length > 0 ? arguments[0] : void 0, + s = this, + h = []; + if (R(s, { + type: "URLSearchParams", + entries: h, + updateURL: function updateURL() {}, + updateSearchParams: M + }), void 0 !== f) if (d(f)) { + if ("function" == typeof (t = b(f))) for (e = (n = t.call(f)).next; !(r = e.call(n)).done;) { + if ((a = (i = (o = m(g(r.value))).next).call(o)).done || (u = i.call(o)).done || !i.call(o).done) throw TypeError("Expected sequence with length 2"); + h.push({ + key: a.value + "", + value: u.value + "" + }); + } else for (c in f) p(f, c) && h.push({ + key: c, + value: f[c] + "" + }); + } else F(h, "string" == typeof f ? "?" === f.charAt(0) ? f.slice(1) : f : f + ""); + }, + B = _q.prototype; + u(B, { + append: function append(t, n) { + z(arguments.length, 2); + var e = A(this); + e.entries.push({ + key: t + "", + value: n + "" + }), e.updateURL(); + }, + delete: function _delete(t) { + z(arguments.length, 1); + for (var n = A(this), e = n.entries, r = t + "", o = 0; o < e.length;) e[o].key === r ? e.splice(o, 1) : o++; + n.updateURL(); + }, + get: function get(t) { + z(arguments.length, 1); + for (var n = A(this).entries, e = t + "", r = 0; r < n.length; r++) if (n[r].key === e) return n[r].value; + return null; + }, + getAll: function getAll(t) { + z(arguments.length, 1); + for (var n = A(this).entries, e = t + "", r = [], o = 0; o < n.length; o++) n[o].key === e && r.push(n[o].value); + return r; + }, + has: function has(t) { + z(arguments.length, 1); + for (var n = A(this).entries, e = t + "", r = 0; r < n.length;) if (n[r++].key === e) return !0; + return !1; + }, + set: function set(t, n) { + z(arguments.length, 1); + for (var e, r = A(this), o = r.entries, i = !1, a = t + "", u = n + "", c = 0; c < o.length; c++) (e = o[c]).key === a && (i ? o.splice(c--, 1) : (i = !0, e.value = u)); + i || o.push({ + key: a, + value: u + }), r.updateURL(); + }, + sort: function sort() { + var t, + n, + e, + r = A(this), + o = r.entries, + i = o.slice(); + for (o.length = 0, e = 0; e < i.length; e++) { + for (t = i[e], n = 0; n < e; n++) if (o[n].key > t.key) { + o.splice(n, 0, t); + break; + } + n === e && o.push(t); + } + r.updateURL(); + }, + forEach: function forEach(t) { + for (var n, e = A(this).entries, r = h(t, arguments.length > 1 ? arguments[1] : void 0, 3), o = 0; o < e.length;) r((n = e[o++]).value, n.key, this); + }, + keys: function keys() { + return new D(this, "keys"); + }, + values: function values() { + return new D(this, "values"); + }, + entries: function entries() { + return new D(this, "entries"); + } + }, { + enumerable: !0 + }), a(B, O, B.entries), a(B, "toString", function () { + for (var t, n = A(this).entries, e = [], r = 0; r < n.length;) t = n[r++], e.push(C(t.key) + "=" + C(t.value)); + return e.join("&"); + }, { + enumerable: !0 + }), c(_q, "URLSearchParams"), r({ + global: !0, + forced: !i + }, { + URLSearchParams: _q + }), i || "function" != typeof E || "function" != typeof w || r({ + global: !0, + enumerable: !0, + forced: !0 + }, { + fetch: function fetch(t) { + var n, + e, + r, + o = [t]; + return arguments.length > 1 && (n = arguments[1], d(n) && (e = n.body, "URLSearchParams" === v(e) && ((r = n.headers ? new w(n.headers) : new w()).has("content-type") || r.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"), n = y(n, { + body: x(0, String(e)), + headers: x(0, r) + }))), o.push(n)), E.apply(this, o); + } + }), t.exports = { + URLSearchParams: _q, + getState: A + }; + }, function (t, n, e) { + var r = e(20), + o = e(83); + t.exports = function (t) { + var n = o(t); + if ("function" != typeof n) throw TypeError(String(t) + " is not iterable"); + return r(n.call(t)); + }; + }, function (t, n, e) { + e(2)({ + target: "URL", + proto: !0, + enumerable: !0 + }, { + toJSON: function toJSON() { + return URL.prototype.toString.call(this); + } + }); + }]); +}(); + +//!fetch 3.0.0, global "this" must be replaced with "window" +// IIFE version +!function (t) { + "use strict"; + + var e = "URLSearchParams" in self, + r = "Symbol" in self && "iterator" in Symbol, + o = "FileReader" in self && "Blob" in self && function () { + try { + return new Blob(), !0; + } catch (t) { + return !1; + } + }(), + n = "FormData" in self, + i = "ArrayBuffer" in self; + if (i) var s = ["[object Int8Array]", "[object Uint8Array]", "[object Uint8ClampedArray]", "[object Int16Array]", "[object Uint16Array]", "[object Int32Array]", "[object Uint32Array]", "[object Float32Array]", "[object Float64Array]"], + a = ArrayBuffer.isView || function (t) { + return t && s.indexOf(Object.prototype.toString.call(t)) > -1; + }; + function h(t) { + if ("string" != typeof t && (t = String(t)), /[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t)) throw new TypeError("Invalid character in header field name"); + return t.toLowerCase(); + } + function u(t) { + return "string" != typeof t && (t = String(t)), t; + } + function f(t) { + var e = { + next: function next() { + var e = t.shift(); + return { + done: void 0 === e, + value: e + }; + } + }; + return r && (e[Symbol.iterator] = function () { + return e; + }), e; + } + function d(t) { + this.map = {}, t instanceof d ? t.forEach(function (t, e) { + this.append(e, t); + }, this) : Array.isArray(t) ? t.forEach(function (t) { + this.append(t[0], t[1]); + }, this) : t && Object.getOwnPropertyNames(t).forEach(function (e) { + this.append(e, t[e]); + }, this); + } + function c(t) { + if (t.bodyUsed) return Promise.reject(new TypeError("Already read")); + t.bodyUsed = !0; + } + function p(t) { + return new Promise(function (e, r) { + t.onload = function () { + e(t.result); + }, t.onerror = function () { + r(t.error); + }; + }); + } + function y(t) { + var e = new FileReader(), + r = p(e); + return e.readAsArrayBuffer(t), r; + } + function l(t) { + if (t.slice) return t.slice(0); + var e = new Uint8Array(t.byteLength); + return e.set(new Uint8Array(t)), e.buffer; + } + function b() { + return this.bodyUsed = !1, this._initBody = function (t) { + var r; + this._bodyInit = t, t ? "string" == typeof t ? this._bodyText = t : o && Blob.prototype.isPrototypeOf(t) ? this._bodyBlob = t : n && FormData.prototype.isPrototypeOf(t) ? this._bodyFormData = t : e && URLSearchParams.prototype.isPrototypeOf(t) ? this._bodyText = t.toString() : i && o && (r = t) && DataView.prototype.isPrototypeOf(r) ? (this._bodyArrayBuffer = l(t.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : i && (ArrayBuffer.prototype.isPrototypeOf(t) || a(t)) ? this._bodyArrayBuffer = l(t) : this._bodyText = t = Object.prototype.toString.call(t) : this._bodyText = "", this.headers.get("content-type") || ("string" == typeof t ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : e && URLSearchParams.prototype.isPrototypeOf(t) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8")); + }, o && (this.blob = function () { + var t = c(this); + if (t) return t; + if (this._bodyBlob) return Promise.resolve(this._bodyBlob); + if (this._bodyArrayBuffer) return Promise.resolve(new Blob([this._bodyArrayBuffer])); + if (this._bodyFormData) throw new Error("could not read FormData body as blob"); + return Promise.resolve(new Blob([this._bodyText])); + }, this.arrayBuffer = function () { + return this._bodyArrayBuffer ? c(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(y); + }), this.text = function () { + var t, + e, + r, + o = c(this); + if (o) return o; + if (this._bodyBlob) return t = this._bodyBlob, e = new FileReader(), r = p(e), e.readAsText(t), r; + if (this._bodyArrayBuffer) return Promise.resolve(function (t) { + for (var e = new Uint8Array(t), r = new Array(e.length), o = 0; o < e.length; o++) r[o] = String.fromCharCode(e[o]); + return r.join(""); + }(this._bodyArrayBuffer)); + if (this._bodyFormData) throw new Error("could not read FormData body as text"); + return Promise.resolve(this._bodyText); + }, n && (this.formData = function () { + return this.text().then(v); + }), this.json = function () { + return this.text().then(JSON.parse); + }, this; + } + d.prototype.append = function (t, e) { + t = h(t), e = u(e); + var r = this.map[t]; + this.map[t] = r ? r + ", " + e : e; + }, d.prototype.delete = function (t) { + delete this.map[h(t)]; + }, d.prototype.get = function (t) { + return t = h(t), this.has(t) ? this.map[t] : null; + }, d.prototype.has = function (t) { + return this.map.hasOwnProperty(h(t)); + }, d.prototype.set = function (t, e) { + this.map[h(t)] = u(e); + }, d.prototype.forEach = function (t, e) { + for (var r in this.map) this.map.hasOwnProperty(r) && t.call(e, this.map[r], r, this); + }, d.prototype.keys = function () { + var t = []; + return this.forEach(function (e, r) { + t.push(r); + }), f(t); + }, d.prototype.values = function () { + var t = []; + return this.forEach(function (e) { + t.push(e); + }), f(t); + }, d.prototype.entries = function () { + var t = []; + return this.forEach(function (e, r) { + t.push([r, e]); + }), f(t); + }, r && (d.prototype[Symbol.iterator] = d.prototype.entries); + var m = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"]; + function w(t, e) { + var r, + o, + n = (e = e || {}).body; + if (t instanceof w) { + if (t.bodyUsed) throw new TypeError("Already read"); + this.url = t.url, this.credentials = t.credentials, e.headers || (this.headers = new d(t.headers)), this.method = t.method, this.mode = t.mode, this.signal = t.signal, n || null == t._bodyInit || (n = t._bodyInit, t.bodyUsed = !0); + } else this.url = String(t); + if (this.credentials = e.credentials || this.credentials || "same-origin", !e.headers && this.headers || (this.headers = new d(e.headers)), this.method = (r = e.method || this.method || "GET", o = r.toUpperCase(), m.indexOf(o) > -1 ? o : r), this.mode = e.mode || this.mode || null, this.signal = e.signal || this.signal, this.referrer = null, ("GET" === this.method || "HEAD" === this.method) && n) throw new TypeError("Body not allowed for GET or HEAD requests"); + this._initBody(n); + } + function v(t) { + var e = new FormData(); + return t.trim().split("&").forEach(function (t) { + if (t) { + var r = t.split("="), + o = r.shift().replace(/\+/g, " "), + n = r.join("=").replace(/\+/g, " "); + e.append(decodeURIComponent(o), decodeURIComponent(n)); + } + }), e; + } + function E(t, e) { + e || (e = {}), this.type = "default", this.status = void 0 === e.status ? 200 : e.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = "statusText" in e ? e.statusText : "OK", this.headers = new d(e.headers), this.url = e.url || "", this._initBody(t); + } + w.prototype.clone = function () { + return new w(this, { + body: this._bodyInit + }); + }, b.call(w.prototype), b.call(E.prototype), E.prototype.clone = function () { + return new E(this._bodyInit, { + status: this.status, + statusText: this.statusText, + headers: new d(this.headers), + url: this.url + }); + }, E.error = function () { + var t = new E(null, { + status: 0, + statusText: "" + }); + return t.type = "error", t; + }; + var A = [301, 302, 303, 307, 308]; + E.redirect = function (t, e) { + if (-1 === A.indexOf(e)) throw new RangeError("Invalid status code"); + return new E(null, { + status: e, + headers: { + location: t + } + }); + }, t.DOMException = self.DOMException; + try { + new t.DOMException(); + } catch (e) { + t.DOMException = function (t, e) { + this.message = t, this.name = e; + var r = Error(t); + this.stack = r.stack; + }, t.DOMException.prototype = Object.create(Error.prototype), t.DOMException.prototype.constructor = t.DOMException; + } + function _(e, r) { + return new Promise(function (n, i) { + var s = new w(e, r); + if (s.signal && s.signal.aborted) return i(new t.DOMException("Aborted", "AbortError")); + var a = new XMLHttpRequest(); + function h() { + a.abort(); + } + a.onload = function () { + var t, + e, + r = { + status: a.status, + statusText: a.statusText, + headers: (t = a.getAllResponseHeaders() || "", e = new d(), t.replace(/\r?\n[\t ]+/g, " ").split(/\r?\n/).forEach(function (t) { + var r = t.split(":"), + o = r.shift().trim(); + if (o) { + var n = r.join(":").trim(); + e.append(o, n); + } + }), e) + }; + r.url = "responseURL" in a ? a.responseURL : r.headers.get("X-Request-URL"); + var o = "response" in a ? a.response : a.responseText; + n(new E(o, r)); + }, a.onerror = function () { + i(new TypeError("Network request failed")); + }, a.ontimeout = function () { + i(new TypeError("Network request failed")); + }, a.onabort = function () { + i(new t.DOMException("Aborted", "AbortError")); + }, a.open(s.method, s.url, !0), "include" === s.credentials ? a.withCredentials = !0 : "omit" === s.credentials && (a.withCredentials = !1), "responseType" in a && o && (a.responseType = "blob"), s.headers.forEach(function (t, e) { + a.setRequestHeader(e, t); + }), s.signal && (s.signal.addEventListener("abort", h), a.onreadystatechange = function () { + 4 === a.readyState && s.signal.removeEventListener("abort", h); + }), a.send(void 0 === s._bodyInit ? null : s._bodyInit); + }); + } + _.polyfill = !0, self.fetch || (self.fetch = _, self.Headers = d, self.Request = w, self.Response = E), t.Headers = d, t.Request = w, t.Response = E, t.fetch = _; +}({}); \ No newline at end of file diff --git a/src/public/js/pwa-elements/esm/polyfills/css-shim.js b/src/public/js/pwa-elements/esm/polyfills/css-shim.js new file mode 100644 index 0000000000000000000000000000000000000000..2ec828f6d78cc2a9006e1884f98b243283eafe81 --- /dev/null +++ b/src/public/js/pwa-elements/esm/polyfills/css-shim.js @@ -0,0 +1,380 @@ +var __assign = this && this.__assign || function () { + return __assign = Object.assign || function (e) { + for (var t, r = 1, n = arguments.length; r < n; r++) for (var s in t = arguments[r]) Object.prototype.hasOwnProperty.call(t, s) && (e[s] = t[s]); + return e; + }, __assign.apply(this, arguments); + }, + StyleNode = function StyleNode() { + this.start = 0, this.end = 0, this.previous = null, this.parent = null, this.rules = null, this.parsedCssText = "", this.cssText = "", this.atRule = !1, this.type = 0, this.keyframesName = "", this.selector = "", this.parsedSelector = ""; + }; +function parse(e) { + return parseCss(lex(e = clean(e)), e); +} +function clean(e) { + return e.replace(RX.comments, "").replace(RX.port, ""); +} +function lex(e) { + var t = new StyleNode(); + t.start = 0, t.end = e.length; + for (var r = t, n = 0, s = e.length; n < s; n++) if (e[n] === OPEN_BRACE) { + r.rules || (r.rules = []); + var o = r, + a = o.rules[o.rules.length - 1] || null; + (r = new StyleNode()).start = n + 1, r.parent = o, r.previous = a, o.rules.push(r); + } else e[n] === CLOSE_BRACE && (r.end = n + 1, r = r.parent || t); + return t; +} +function parseCss(e, t) { + var r = t.substring(e.start, e.end - 1); + if (e.parsedCssText = e.cssText = r.trim(), e.parent) { + var n = e.previous ? e.previous.end : e.parent.start; + r = (r = (r = _expandUnicodeEscapes(r = t.substring(n, e.start - 1))).replace(RX.multipleSpaces, " ")).substring(r.lastIndexOf(";") + 1); + var s = e.parsedSelector = e.selector = r.trim(); + e.atRule = 0 === s.indexOf(AT_START), e.atRule ? 0 === s.indexOf(MEDIA_START) ? e.type = types.MEDIA_RULE : s.match(RX.keyframesRule) && (e.type = types.KEYFRAMES_RULE, e.keyframesName = e.selector.split(RX.multipleSpaces).pop()) : 0 === s.indexOf(VAR_START) ? e.type = types.MIXIN_RULE : e.type = types.STYLE_RULE; + } + var o = e.rules; + if (o) for (var a = 0, i = o.length, l = void 0; a < i && (l = o[a]); a++) parseCss(l, t); + return e; +} +function _expandUnicodeEscapes(e) { + return e.replace(/\\([0-9a-f]{1,6})\s/gi, function () { + for (var e = arguments[1], t = 6 - e.length; t--;) e = "0" + e; + return "\\" + e; + }); +} +var types = { + STYLE_RULE: 1, + KEYFRAMES_RULE: 7, + MEDIA_RULE: 4, + MIXIN_RULE: 1e3 + }, + OPEN_BRACE = "{", + CLOSE_BRACE = "}", + RX = { + comments: /\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim, + port: /@import[^;]*;/gim, + customProp: /(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim, + mixinProp: /(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim, + mixinApply: /@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim, + varApply: /[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim, + keyframesRule: /^@[^\s]*keyframes/, + multipleSpaces: /\s+/g + }, + VAR_START = "--", + MEDIA_START = "@media", + AT_START = "@", + VAR_USAGE_START = /\bvar\(/, + VAR_ASSIGN_START = /\B--[\w-]+\s*:/, + COMMENTS = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim, + TRAILING_LINES = /^[\t ]+\n/gm; +function findRegex(e, t, r) { + e.lastIndex = 0; + var n = t.substring(r).match(e); + if (n) { + var s = r + n.index; + return { + start: s, + end: s + n[0].length + }; + } + return null; +} +function resolveVar(e, t, r) { + return e[t] ? e[t] : r ? executeTemplate(r, e) : ""; +} +function findVarEndIndex(e, t) { + for (var r = 0, n = t; n < e.length; n++) { + var s = e[n]; + if ("(" === s) r++;else if (")" === s && --r <= 0) return n + 1; + } + return n; +} +function parseVar(e, t) { + var r = findRegex(VAR_USAGE_START, e, t); + if (!r) return null; + var n = findVarEndIndex(e, r.start), + s = e.substring(r.end, n - 1).split(","), + o = s[0], + a = s.slice(1); + return { + start: r.start, + end: n, + propName: o.trim(), + fallback: a.length > 0 ? a.join(",").trim() : void 0 + }; +} +function compileVar(e, t, r) { + var n = parseVar(e, r); + if (!n) return t.push(e.substring(r, e.length)), e.length; + var s = n.propName, + o = null != n.fallback ? compileTemplate(n.fallback) : void 0; + return t.push(e.substring(r, n.start), function (e) { + return resolveVar(e, s, o); + }), n.end; +} +function executeTemplate(e, t) { + for (var r = "", n = 0; n < e.length; n++) { + var s = e[n]; + r += "string" == typeof s ? s : s(t); + } + return r; +} +function findEndValue(e, t) { + for (var r = !1, n = !1, s = t; s < e.length; s++) { + var o = e[s]; + if (r) n && '"' === o && (r = !1), n || "'" !== o || (r = !1);else if ('"' === o) r = !0, n = !0;else if ("'" === o) r = !0, n = !1;else { + if (";" === o) return s + 1; + if ("}" === o) return s; + } + } + return s; +} +function removeCustomAssigns(e) { + for (var t = "", r = 0;;) { + var n = findRegex(VAR_ASSIGN_START, e, r), + s = n ? n.start : e.length; + if (t += e.substring(r, s), !n) break; + r = findEndValue(e, s); + } + return t; +} +function compileTemplate(e) { + var t = 0; + e = removeCustomAssigns(e = e.replace(COMMENTS, "")).replace(TRAILING_LINES, ""); + for (var r = []; t < e.length;) t = compileVar(e, r, t); + return r; +} +function resolveValues(e) { + var t = {}; + e.forEach(function (e) { + e.declarations.forEach(function (e) { + t[e.prop] = e.value; + }); + }); + for (var r = {}, n = Object.entries(t), s = function s(e) { + var t = !1; + if (n.forEach(function (e) { + var n = e[0], + s = executeTemplate(e[1], r); + s !== r[n] && (r[n] = s, t = !0); + }), !t) return "break"; + }, o = 0; o < 10; o++) { + if ("break" === s()) break; + } + return r; +} +function getSelectors(e, t) { + if (void 0 === t && (t = 0), !e.rules) return []; + var r = []; + return e.rules.filter(function (e) { + return e.type === types.STYLE_RULE; + }).forEach(function (e) { + var n = getDeclarations(e.cssText); + n.length > 0 && e.parsedSelector.split(",").forEach(function (e) { + e = e.trim(), r.push({ + selector: e, + declarations: n, + specificity: computeSpecificity(), + nu: t + }); + }), t++; + }), r; +} +function computeSpecificity(e) { + return 1; +} +var IMPORTANT = "!important", + FIND_DECLARATIONS = /(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm; +function getDeclarations(e) { + for (var t, r = []; t = FIND_DECLARATIONS.exec(e.trim());) { + var n = normalizeValue(t[2]), + s = n.value, + o = n.important; + r.push({ + prop: t[1].trim(), + value: compileTemplate(s), + important: o + }); + } + return r; +} +function normalizeValue(e) { + var t = (e = e.replace(/\s+/gim, " ").trim()).endsWith(IMPORTANT); + return t && (e = e.slice(0, e.length - IMPORTANT.length).trim()), { + value: e, + important: t + }; +} +function getActiveSelectors(e, t, r) { + var n = [], + s = getScopesForElement(t, e); + return r.forEach(function (e) { + return n.push(e); + }), s.forEach(function (e) { + return n.push(e); + }), sortSelectors(getSelectorsForScopes(n).filter(function (t) { + return matches(e, t.selector); + })); +} +function getScopesForElement(e, t) { + for (var r = []; t;) { + var n = e.get(t); + n && r.push(n), t = t.parentElement; + } + return r; +} +function getSelectorsForScopes(e) { + var t = []; + return e.forEach(function (e) { + t.push.apply(t, e.selectors); + }), t; +} +function sortSelectors(e) { + return e.sort(function (e, t) { + return e.specificity === t.specificity ? e.nu - t.nu : e.specificity - t.specificity; + }), e; +} +function matches(e, t) { + return ":root" === t || "html" === t || e.matches(t); +} +function parseCSS(e) { + var t = parse(e), + r = compileTemplate(e); + return { + original: e, + template: r, + selectors: getSelectors(t), + usesCssVars: r.length > 1 + }; +} +function addGlobalStyle(e, t) { + if (e.some(function (e) { + return e.styleEl === t; + })) return !1; + var r = parseCSS(t.textContent); + return r.styleEl = t, e.push(r), !0; +} +function updateGlobalScopes(e) { + var t = resolveValues(getSelectorsForScopes(e)); + e.forEach(function (e) { + e.usesCssVars && (e.styleEl.textContent = executeTemplate(e.template, t)); + }); +} +function reScope(e, t) { + var r = e.template.map(function (r) { + return "string" == typeof r ? replaceScope(r, e.scopeId, t) : r; + }), + n = e.selectors.map(function (r) { + return __assign(__assign({}, r), { + selector: replaceScope(r.selector, e.scopeId, t) + }); + }); + return __assign(__assign({}, e), { + template: r, + selectors: n, + scopeId: t + }); +} +function replaceScope(e, t, r) { + return e = replaceAll(e, "\\.".concat(t), ".".concat(r)); +} +function replaceAll(e, t, r) { + return e.replace(new RegExp(t, "g"), r); +} +function loadDocument(e, t) { + return loadDocumentStyles(e, t), loadDocumentLinks(e, t).then(function () { + updateGlobalScopes(t); + }); +} +function startWatcher(e, t) { + "undefined" != typeof MutationObserver && new MutationObserver(function () { + loadDocumentStyles(e, t) && updateGlobalScopes(t); + }).observe(document.head, { + childList: !0 + }); +} +function loadDocumentLinks(e, t) { + for (var r = [], n = e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'), s = 0; s < n.length; s++) r.push(addGlobalLink(e, t, n[s])); + return Promise.all(r); +} +function loadDocumentStyles(e, t) { + return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map(function (e) { + return addGlobalStyle(t, e); + }).some(Boolean); +} +function addGlobalLink(e, t, r) { + var n = r.href; + return fetch(n).then(function (e) { + return e.text(); + }).then(function (s) { + if (hasCssVariables(s) && r.parentNode) { + hasRelativeUrls(s) && (s = fixRelativeUrls(s, n)); + var o = e.createElement("style"); + o.setAttribute("data-styles", ""), o.textContent = s, addGlobalStyle(t, o), r.parentNode.insertBefore(o, r), r.remove(); + } + }).catch(function (e) { + console.error(e); + }); +} +var CSS_VARIABLE_REGEXP = /[\s;{]--[-a-zA-Z0-9]+\s*:/m; +function hasCssVariables(e) { + return e.indexOf("var(") > -1 || CSS_VARIABLE_REGEXP.test(e); +} +var CSS_URL_REGEXP = /url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim; +function hasRelativeUrls(e) { + return CSS_URL_REGEXP.lastIndex = 0, CSS_URL_REGEXP.test(e); +} +function fixRelativeUrls(e, t) { + var r = t.replace(/[^/]*$/, ""); + return e.replace(CSS_URL_REGEXP, function (e, t) { + var n = r + t; + return e.replace(t, n); + }); +} +var CustomStyle = function () { + function e(e, t) { + this.win = e, this.doc = t, this.count = 0, this.hostStyleMap = new WeakMap(), this.hostScopeMap = new WeakMap(), this.globalScopes = [], this.scopesMap = new Map(), this.didInit = !1; + } + return e.prototype.i = function () { + var e = this; + return this.didInit || !this.win.requestAnimationFrame ? Promise.resolve() : (this.didInit = !0, new Promise(function (t) { + e.win.requestAnimationFrame(function () { + startWatcher(e.doc, e.globalScopes), loadDocument(e.doc, e.globalScopes).then(function () { + return t(); + }); + }); + })); + }, e.prototype.addLink = function (e) { + var t = this; + return addGlobalLink(this.doc, this.globalScopes, e).then(function () { + t.updateGlobal(); + }); + }, e.prototype.addGlobalStyle = function (e) { + addGlobalStyle(this.globalScopes, e) && this.updateGlobal(); + }, e.prototype.createHostStyle = function (e, t, r, n) { + if (this.hostScopeMap.has(e)) throw new Error("host style already created"); + var s = this.registerHostTemplate(r, t, n), + o = this.doc.createElement("style"); + return o.setAttribute("data-no-shim", ""), s.usesCssVars ? n ? (o["s-sc"] = t = "".concat(s.scopeId, "-").concat(this.count), o.textContent = "/*needs update*/", this.hostStyleMap.set(e, o), this.hostScopeMap.set(e, reScope(s, t)), this.count++) : (s.styleEl = o, s.usesCssVars || (o.textContent = executeTemplate(s.template, {})), this.globalScopes.push(s), this.updateGlobal(), this.hostScopeMap.set(e, s)) : o.textContent = r, o; + }, e.prototype.removeHost = function (e) { + var t = this.hostStyleMap.get(e); + t && t.remove(), this.hostStyleMap.delete(e), this.hostScopeMap.delete(e); + }, e.prototype.updateHost = function (e) { + var t = this.hostScopeMap.get(e); + if (t && t.usesCssVars && t.isScoped) { + var r = this.hostStyleMap.get(e); + if (r) { + var n = resolveValues(getActiveSelectors(e, this.hostScopeMap, this.globalScopes)); + r.textContent = executeTemplate(t.template, n); + } + } + }, e.prototype.updateGlobal = function () { + updateGlobalScopes(this.globalScopes); + }, e.prototype.registerHostTemplate = function (e, t, r) { + var n = this.scopesMap.get(t); + return n || ((n = parseCSS(e)).scopeId = t, n.isScoped = r, this.scopesMap.set(t, n)), n; + }, e; +}(); +!function (e) { + !e || e.__cssshim || e.CSS && e.CSS.supports && e.CSS.supports("color", "var(--c)") || (e.__cssshim = new CustomStyle(e, e.document)); +}("undefined" != typeof window && window); \ No newline at end of file diff --git a/src/public/js/pwa-elements/esm/polyfills/dom.js b/src/public/js/pwa-elements/esm/polyfills/dom.js new file mode 100644 index 0000000000000000000000000000000000000000..828611a393f8cf949623ecaebf230c52219d7499 --- /dev/null +++ b/src/public/js/pwa-elements/esm/polyfills/dom.js @@ -0,0 +1,831 @@ +(function () { + /* + Copyright (c) 2016 The Polymer Project Authors. All rights reserved. + This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + Code distributed by Google as part of the polymer project is also + subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt + */ + 'use strict'; + + var aa = new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ")); + function g(a) { + var b = aa.has(a); + a = /^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(a); + return !b && a; + } + function l(a) { + var b = a.isConnected; + if (void 0 !== b) return b; + for (; a && !(a.__CE_isImportDocument || a instanceof Document);) a = a.parentNode || (window.ShadowRoot && a instanceof ShadowRoot ? a.host : void 0); + return !(!a || !(a.__CE_isImportDocument || a instanceof Document)); + } + function n(a, b) { + for (; b && b !== a && !b.nextSibling;) b = b.parentNode; + return b && b !== a ? b.nextSibling : null; + } + function p(a, b, d) { + d = void 0 === d ? new Set() : d; + for (var c = a; c;) { + if (c.nodeType === Node.ELEMENT_NODE) { + var e = c; + b(e); + var f = e.localName; + if ("link" === f && "import" === e.getAttribute("rel")) { + c = e.import; + if (c instanceof Node && !d.has(c)) for (d.add(c), c = c.firstChild; c; c = c.nextSibling) p(c, b, d); + c = n(a, e); + continue; + } else if ("template" === f) { + c = n(a, e); + continue; + } + if (e = e.__CE_shadowRoot) for (e = e.firstChild; e; e = e.nextSibling) p(e, b, d); + } + c = c.firstChild ? c.firstChild : n(a, c); + } + } + function r(a, b, d) { + a[b] = d; + } + ; + function u() { + this.a = new Map(); + this.g = new Map(); + this.c = []; + this.f = []; + this.b = !1; + } + function ba(a, b, d) { + a.a.set(b, d); + a.g.set(d.constructorFunction, d); + } + function ca(a, b) { + a.b = !0; + a.c.push(b); + } + function da(a, b) { + a.b = !0; + a.f.push(b); + } + function v(a, b) { + a.b && p(b, function (b) { + return w(a, b); + }); + } + function w(a, b) { + if (a.b && !b.__CE_patched) { + b.__CE_patched = !0; + for (var d = 0; d < a.c.length; d++) a.c[d](b); + for (d = 0; d < a.f.length; d++) a.f[d](b); + } + } + function x(a, b) { + var d = []; + p(b, function (b) { + return d.push(b); + }); + for (b = 0; b < d.length; b++) { + var c = d[b]; + 1 === c.__CE_state ? a.connectedCallback(c) : y(a, c); + } + } + function z(a, b) { + var d = []; + p(b, function (b) { + return d.push(b); + }); + for (b = 0; b < d.length; b++) { + var c = d[b]; + 1 === c.__CE_state && a.disconnectedCallback(c); + } + } + function A(a, b, d) { + d = void 0 === d ? {} : d; + var c = d.u || new Set(), + e = d.i || function (b) { + return y(a, b); + }, + f = []; + p(b, function (b) { + if ("link" === b.localName && "import" === b.getAttribute("rel")) { + var d = b.import; + d instanceof Node && (d.__CE_isImportDocument = !0, d.__CE_hasRegistry = !0); + d && "complete" === d.readyState ? d.__CE_documentLoadHandled = !0 : b.addEventListener("load", function () { + var d = b.import; + if (!d.__CE_documentLoadHandled) { + d.__CE_documentLoadHandled = !0; + var f = new Set(c); + f.delete(d); + A(a, d, { + u: f, + i: e + }); + } + }); + } else f.push(b); + }, c); + if (a.b) for (b = 0; b < f.length; b++) w(a, f[b]); + for (b = 0; b < f.length; b++) e(f[b]); + } + function y(a, b) { + if (void 0 === b.__CE_state) { + var d = b.ownerDocument; + if (d.defaultView || d.__CE_isImportDocument && d.__CE_hasRegistry) if (d = a.a.get(b.localName)) { + d.constructionStack.push(b); + var c = d.constructorFunction; + try { + try { + if (new c() !== b) throw Error("The custom element constructor did not produce the element being upgraded."); + } finally { + d.constructionStack.pop(); + } + } catch (t) { + throw b.__CE_state = 2, t; + } + b.__CE_state = 1; + b.__CE_definition = d; + if (d.attributeChangedCallback) for (d = d.observedAttributes, c = 0; c < d.length; c++) { + var e = d[c], + f = b.getAttribute(e); + null !== f && a.attributeChangedCallback(b, e, null, f, null); + } + l(b) && a.connectedCallback(b); + } + } + } + u.prototype.connectedCallback = function (a) { + var b = a.__CE_definition; + b.connectedCallback && b.connectedCallback.call(a); + }; + u.prototype.disconnectedCallback = function (a) { + var b = a.__CE_definition; + b.disconnectedCallback && b.disconnectedCallback.call(a); + }; + u.prototype.attributeChangedCallback = function (a, b, d, c, e) { + var f = a.__CE_definition; + f.attributeChangedCallback && -1 < f.observedAttributes.indexOf(b) && f.attributeChangedCallback.call(a, b, d, c, e); + }; + function B(a) { + var b = document; + this.c = a; + this.a = b; + this.b = void 0; + A(this.c, this.a); + "loading" === this.a.readyState && (this.b = new MutationObserver(this.f.bind(this)), this.b.observe(this.a, { + childList: !0, + subtree: !0 + })); + } + function C(a) { + a.b && a.b.disconnect(); + } + B.prototype.f = function (a) { + var b = this.a.readyState; + "interactive" !== b && "complete" !== b || C(this); + for (b = 0; b < a.length; b++) for (var d = a[b].addedNodes, c = 0; c < d.length; c++) A(this.c, d[c]); + }; + function ea() { + var a = this; + this.b = this.a = void 0; + this.c = new Promise(function (b) { + a.b = b; + a.a && b(a.a); + }); + } + function D(a) { + if (a.a) throw Error("Already resolved."); + a.a = void 0; + a.b && a.b(void 0); + } + ; + function E(a) { + this.c = !1; + this.a = a; + this.j = new Map(); + this.f = function (b) { + return b(); + }; + this.b = !1; + this.g = []; + this.o = new B(a); + } + E.prototype.l = function (a, b) { + var d = this; + if (!(b instanceof Function)) throw new TypeError("Custom element constructors must be functions."); + if (!g(a)) throw new SyntaxError("The element name '" + a + "' is not valid."); + if (this.a.a.get(a)) throw Error("A custom element with name '" + a + "' has already been defined."); + if (this.c) throw Error("A custom element is already being defined."); + this.c = !0; + try { + var c = function c(b) { + var a = e[b]; + if (void 0 !== a && !(a instanceof Function)) throw Error("The '" + b + "' callback must be a function."); + return a; + }, + e = b.prototype; + if (!(e instanceof Object)) throw new TypeError("The custom element constructor's prototype is not an object."); + var f = c("connectedCallback"); + var t = c("disconnectedCallback"); + var k = c("adoptedCallback"); + var h = c("attributeChangedCallback"); + var m = b.observedAttributes || []; + } catch (q) { + return; + } finally { + this.c = !1; + } + b = { + localName: a, + constructorFunction: b, + connectedCallback: f, + disconnectedCallback: t, + adoptedCallback: k, + attributeChangedCallback: h, + observedAttributes: m, + constructionStack: [] + }; + ba(this.a, a, b); + this.g.push(b); + this.b || (this.b = !0, this.f(function () { + return fa(d); + })); + }; + E.prototype.i = function (a) { + A(this.a, a); + }; + function fa(a) { + if (!1 !== a.b) { + a.b = !1; + for (var b = a.g, d = [], c = new Map(), e = 0; e < b.length; e++) c.set(b[e].localName, []); + A(a.a, document, { + i: function i(b) { + if (void 0 === b.__CE_state) { + var e = b.localName, + f = c.get(e); + f ? f.push(b) : a.a.a.get(e) && d.push(b); + } + } + }); + for (e = 0; e < d.length; e++) y(a.a, d[e]); + for (; 0 < b.length;) { + var f = b.shift(); + e = f.localName; + f = c.get(f.localName); + for (var t = 0; t < f.length; t++) y(a.a, f[t]); + (e = a.j.get(e)) && D(e); + } + } + } + E.prototype.get = function (a) { + if (a = this.a.a.get(a)) return a.constructorFunction; + }; + E.prototype.m = function (a) { + if (!g(a)) return Promise.reject(new SyntaxError("'" + a + "' is not a valid custom element name.")); + var b = this.j.get(a); + if (b) return b.c; + b = new ea(); + this.j.set(a, b); + this.a.a.get(a) && !this.g.some(function (b) { + return b.localName === a; + }) && D(b); + return b.c; + }; + E.prototype.s = function (a) { + C(this.o); + var b = this.f; + this.f = function (d) { + return a(function () { + return b(d); + }); + }; + }; + window.CustomElementRegistry = E; + E.prototype.define = E.prototype.l; + E.prototype.upgrade = E.prototype.i; + E.prototype.get = E.prototype.get; + E.prototype.whenDefined = E.prototype.m; + E.prototype.polyfillWrapFlushCallback = E.prototype.s; + var F = window.Document.prototype.createElement, + G = window.Document.prototype.createElementNS, + ha = window.Document.prototype.importNode, + ia = window.Document.prototype.prepend, + ja = window.Document.prototype.append, + ka = window.DocumentFragment.prototype.prepend, + la = window.DocumentFragment.prototype.append, + H = window.Node.prototype.cloneNode, + I = window.Node.prototype.appendChild, + J = window.Node.prototype.insertBefore, + K = window.Node.prototype.removeChild, + L = window.Node.prototype.replaceChild, + M = Object.getOwnPropertyDescriptor(window.Node.prototype, "textContent"), + N = window.Element.prototype.attachShadow, + O = Object.getOwnPropertyDescriptor(window.Element.prototype, "innerHTML"), + P = window.Element.prototype.getAttribute, + Q = window.Element.prototype.setAttribute, + R = window.Element.prototype.removeAttribute, + S = window.Element.prototype.getAttributeNS, + T = window.Element.prototype.setAttributeNS, + U = window.Element.prototype.removeAttributeNS, + ma = window.Element.prototype.insertAdjacentElement, + na = window.Element.prototype.insertAdjacentHTML, + oa = window.Element.prototype.prepend, + pa = window.Element.prototype.append, + V = window.Element.prototype.before, + qa = window.Element.prototype.after, + ra = window.Element.prototype.replaceWith, + sa = window.Element.prototype.remove, + ta = window.HTMLElement, + W = Object.getOwnPropertyDescriptor(window.HTMLElement.prototype, "innerHTML"), + ua = window.HTMLElement.prototype.insertAdjacentElement, + va = window.HTMLElement.prototype.insertAdjacentHTML; + var wa = new function () {}(); + function xa() { + var a = X; + window.HTMLElement = function () { + function b() { + var b = this.constructor, + c = a.g.get(b); + if (!c) throw Error("The custom element being constructed was not registered with `customElements`."); + var e = c.constructionStack; + if (0 === e.length) return e = F.call(document, c.localName), Object.setPrototypeOf(e, b.prototype), e.__CE_state = 1, e.__CE_definition = c, w(a, e), e; + c = e.length - 1; + var f = e[c]; + if (f === wa) throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times."); + e[c] = wa; + Object.setPrototypeOf(f, b.prototype); + w(a, f); + return f; + } + b.prototype = ta.prototype; + Object.defineProperty(b.prototype, "constructor", { + writable: !0, + configurable: !0, + enumerable: !1, + value: b + }); + return b; + }(); + } + ; + function Y(a, b, d) { + function c(b) { + return function (d) { + for (var e = [], c = 0; c < arguments.length; ++c) e[c] = arguments[c]; + c = []; + for (var f = [], m = 0; m < e.length; m++) { + var q = e[m]; + q instanceof Element && l(q) && f.push(q); + if (q instanceof DocumentFragment) for (q = q.firstChild; q; q = q.nextSibling) c.push(q);else c.push(q); + } + b.apply(this, e); + for (e = 0; e < f.length; e++) z(a, f[e]); + if (l(this)) for (e = 0; e < c.length; e++) f = c[e], f instanceof Element && x(a, f); + }; + } + void 0 !== d.h && (b.prepend = c(d.h)); + void 0 !== d.append && (b.append = c(d.append)); + } + ; + function ya() { + var a = X; + r(Document.prototype, "createElement", function (b) { + if (this.__CE_hasRegistry) { + var d = a.a.get(b); + if (d) return new d.constructorFunction(); + } + b = F.call(this, b); + w(a, b); + return b; + }); + r(Document.prototype, "importNode", function (b, d) { + b = ha.call(this, b, !!d); + this.__CE_hasRegistry ? A(a, b) : v(a, b); + return b; + }); + r(Document.prototype, "createElementNS", function (b, d) { + if (this.__CE_hasRegistry && (null === b || "http://www.w3.org/1999/xhtml" === b)) { + var c = a.a.get(d); + if (c) return new c.constructorFunction(); + } + b = G.call(this, b, d); + w(a, b); + return b; + }); + Y(a, Document.prototype, { + h: ia, + append: ja + }); + } + ; + function za() { + function a(a, c) { + Object.defineProperty(a, "textContent", { + enumerable: c.enumerable, + configurable: !0, + get: c.get, + set: function set(a) { + if (this.nodeType === Node.TEXT_NODE) c.set.call(this, a);else { + var d = void 0; + if (this.firstChild) { + var e = this.childNodes, + k = e.length; + if (0 < k && l(this)) { + d = Array(k); + for (var h = 0; h < k; h++) d[h] = e[h]; + } + } + c.set.call(this, a); + if (d) for (a = 0; a < d.length; a++) z(b, d[a]); + } + } + }); + } + var b = X; + r(Node.prototype, "insertBefore", function (a, c) { + if (a instanceof DocumentFragment) { + var e = Array.prototype.slice.apply(a.childNodes); + a = J.call(this, a, c); + if (l(this)) for (c = 0; c < e.length; c++) x(b, e[c]); + return a; + } + e = l(a); + c = J.call(this, a, c); + e && z(b, a); + l(this) && x(b, a); + return c; + }); + r(Node.prototype, "appendChild", function (a) { + if (a instanceof DocumentFragment) { + var c = Array.prototype.slice.apply(a.childNodes); + a = I.call(this, a); + if (l(this)) for (var e = 0; e < c.length; e++) x(b, c[e]); + return a; + } + c = l(a); + e = I.call(this, a); + c && z(b, a); + l(this) && x(b, a); + return e; + }); + r(Node.prototype, "cloneNode", function (a) { + a = H.call(this, !!a); + this.ownerDocument.__CE_hasRegistry ? A(b, a) : v(b, a); + return a; + }); + r(Node.prototype, "removeChild", function (a) { + var c = l(a), + e = K.call(this, a); + c && z(b, a); + return e; + }); + r(Node.prototype, "replaceChild", function (a, c) { + if (a instanceof DocumentFragment) { + var e = Array.prototype.slice.apply(a.childNodes); + a = L.call(this, a, c); + if (l(this)) for (z(b, c), c = 0; c < e.length; c++) x(b, e[c]); + return a; + } + e = l(a); + var f = L.call(this, a, c), + d = l(this); + d && z(b, c); + e && z(b, a); + d && x(b, a); + return f; + }); + M && M.get ? a(Node.prototype, M) : ca(b, function (b) { + a(b, { + enumerable: !0, + configurable: !0, + get: function get() { + for (var a = [], b = 0; b < this.childNodes.length; b++) { + var f = this.childNodes[b]; + f.nodeType !== Node.COMMENT_NODE && a.push(f.textContent); + } + return a.join(""); + }, + set: function set(a) { + for (; this.firstChild;) K.call(this, this.firstChild); + null != a && "" !== a && I.call(this, document.createTextNode(a)); + } + }); + }); + } + ; + function Aa(a) { + function b(b) { + return function (e) { + for (var c = [], d = 0; d < arguments.length; ++d) c[d] = arguments[d]; + d = []; + for (var k = [], h = 0; h < c.length; h++) { + var m = c[h]; + m instanceof Element && l(m) && k.push(m); + if (m instanceof DocumentFragment) for (m = m.firstChild; m; m = m.nextSibling) d.push(m);else d.push(m); + } + b.apply(this, c); + for (c = 0; c < k.length; c++) z(a, k[c]); + if (l(this)) for (c = 0; c < d.length; c++) k = d[c], k instanceof Element && x(a, k); + }; + } + var d = Element.prototype; + void 0 !== V && (d.before = b(V)); + void 0 !== V && (d.after = b(qa)); + void 0 !== ra && r(d, "replaceWith", function (b) { + for (var e = [], c = 0; c < arguments.length; ++c) e[c] = arguments[c]; + c = []; + for (var d = [], k = 0; k < e.length; k++) { + var h = e[k]; + h instanceof Element && l(h) && d.push(h); + if (h instanceof DocumentFragment) for (h = h.firstChild; h; h = h.nextSibling) c.push(h);else c.push(h); + } + k = l(this); + ra.apply(this, e); + for (e = 0; e < d.length; e++) z(a, d[e]); + if (k) for (z(a, this), e = 0; e < c.length; e++) d = c[e], d instanceof Element && x(a, d); + }); + void 0 !== sa && r(d, "remove", function () { + var b = l(this); + sa.call(this); + b && z(a, this); + }); + } + ; + function Ba() { + function a(a, b) { + Object.defineProperty(a, "innerHTML", { + enumerable: b.enumerable, + configurable: !0, + get: b.get, + set: function set(a) { + var e = this, + d = void 0; + l(this) && (d = [], p(this, function (a) { + a !== e && d.push(a); + })); + b.set.call(this, a); + if (d) for (var f = 0; f < d.length; f++) { + var t = d[f]; + 1 === t.__CE_state && c.disconnectedCallback(t); + } + this.ownerDocument.__CE_hasRegistry ? A(c, this) : v(c, this); + return a; + } + }); + } + function b(a, b) { + r(a, "insertAdjacentElement", function (a, e) { + var d = l(e); + a = b.call(this, a, e); + d && z(c, e); + l(a) && x(c, e); + return a; + }); + } + function d(a, b) { + function e(a, b) { + for (var e = []; a !== b; a = a.nextSibling) e.push(a); + for (b = 0; b < e.length; b++) A(c, e[b]); + } + r(a, "insertAdjacentHTML", function (a, c) { + a = a.toLowerCase(); + if ("beforebegin" === a) { + var d = this.previousSibling; + b.call(this, a, c); + e(d || this.parentNode.firstChild, this); + } else if ("afterbegin" === a) d = this.firstChild, b.call(this, a, c), e(this.firstChild, d);else if ("beforeend" === a) d = this.lastChild, b.call(this, a, c), e(d || this.firstChild, null);else if ("afterend" === a) d = this.nextSibling, b.call(this, a, c), e(this.nextSibling, d);else throw new SyntaxError("The value provided (" + String(a) + ") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'."); + }); + } + var c = X; + N && r(Element.prototype, "attachShadow", function (a) { + a = N.call(this, a); + var b = c; + if (b.b && !a.__CE_patched) { + a.__CE_patched = !0; + for (var e = 0; e < b.c.length; e++) b.c[e](a); + } + return this.__CE_shadowRoot = a; + }); + O && O.get ? a(Element.prototype, O) : W && W.get ? a(HTMLElement.prototype, W) : da(c, function (b) { + a(b, { + enumerable: !0, + configurable: !0, + get: function get() { + return H.call(this, !0).innerHTML; + }, + set: function set(a) { + var b = "template" === this.localName, + c = b ? this.content : this, + e = G.call(document, this.namespaceURI, this.localName); + for (e.innerHTML = a; 0 < c.childNodes.length;) K.call(c, c.childNodes[0]); + for (a = b ? e.content : e; 0 < a.childNodes.length;) I.call(c, a.childNodes[0]); + } + }); + }); + r(Element.prototype, "setAttribute", function (a, b) { + if (1 !== this.__CE_state) return Q.call(this, a, b); + var e = P.call(this, a); + Q.call(this, a, b); + b = P.call(this, a); + c.attributeChangedCallback(this, a, e, b, null); + }); + r(Element.prototype, "setAttributeNS", function (a, b, d) { + if (1 !== this.__CE_state) return T.call(this, a, b, d); + var e = S.call(this, a, b); + T.call(this, a, b, d); + d = S.call(this, a, b); + c.attributeChangedCallback(this, b, e, d, a); + }); + r(Element.prototype, "removeAttribute", function (a) { + if (1 !== this.__CE_state) return R.call(this, a); + var b = P.call(this, a); + R.call(this, a); + null !== b && c.attributeChangedCallback(this, a, b, null, null); + }); + r(Element.prototype, "removeAttributeNS", function (a, b) { + if (1 !== this.__CE_state) return U.call(this, a, b); + var d = S.call(this, a, b); + U.call(this, a, b); + var e = S.call(this, a, b); + d !== e && c.attributeChangedCallback(this, b, d, e, a); + }); + ua ? b(HTMLElement.prototype, ua) : ma ? b(Element.prototype, ma) : console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."); + va ? d(HTMLElement.prototype, va) : na ? d(Element.prototype, na) : console.warn("Custom Elements: `Element#insertAdjacentHTML` was not patched."); + Y(c, Element.prototype, { + h: oa, + append: pa + }); + Aa(c); + } + ; + var Z = window.customElements; + if (!Z || Z.forcePolyfill || "function" != typeof Z.define || "function" != typeof Z.get) { + var X = new u(); + xa(); + ya(); + Y(X, DocumentFragment.prototype, { + h: ka, + append: la + }); + za(); + Ba(); + document.__CE_hasRegistry = !0; + var customElements = new E(X); + Object.defineProperty(window, "customElements", { + configurable: !0, + enumerable: !0, + value: customElements + }); + } + ; +}).call(self); + +// Polyfill document.baseURI +"string" !== typeof document.baseURI && Object.defineProperty(Document.prototype, "baseURI", { + enumerable: !0, + configurable: !0, + get: function get() { + var a = document.querySelector("base"); + return a && a.href ? a.href : document.URL; + } +}); + +// Polyfill CustomEvent +"function" !== typeof window.CustomEvent && (window.CustomEvent = function (c, a) { + a = a || { + bubbles: !1, + cancelable: !1, + detail: void 0 + }; + var b = document.createEvent("CustomEvent"); + b.initCustomEvent(c, a.bubbles, a.cancelable, a.detail); + return b; +}, window.CustomEvent.prototype = window.Event.prototype); + +// Event.composedPath +(function (b, c, d) { + b.composedPath || (b.composedPath = function () { + if (this.path) return this.path; + var a = this.target; + for (this.path = []; null !== a.parentNode;) this.path.push(a), a = a.parentNode; + this.path.push(c, d); + return this.path; + }); +})(Event.prototype, document, window); + +/*! +Element.closest and Element.matches +https://github.com/jonathantneal/closest +Creative Commons Zero v1.0 Universal +*/ +(function (a) { + "function" !== typeof a.matches && (a.matches = a.msMatchesSelector || a.mozMatchesSelector || a.webkitMatchesSelector || function (a) { + a = (this.document || this.ownerDocument).querySelectorAll(a); + for (var b = 0; a[b] && a[b] !== this;) ++b; + return !!a[b]; + }); + "function" !== typeof a.closest && (a.closest = function (a) { + for (var b = this; b && 1 === b.nodeType;) { + if (b.matches(a)) return b; + b = b.parentNode; + } + return null; + }); +})(window.Element.prototype); + +/*! +Element.getRootNode() +*/ +(function (c) { + function d(a) { + a = b(a); + return a && 11 === a.nodeType ? d(a.host) : a; + } + function b(a) { + return a && a.parentNode ? b(a.parentNode) : a; + } + "function" !== typeof c.getRootNode && (c.getRootNode = function (a) { + return a && a.composed ? d(this) : b(this); + }); +})(Element.prototype); + +/*! +Element.isConnected() +*/ +(function (a) { + "isConnected" in a || Object.defineProperty(a, "isConnected", { + configurable: !0, + enumerable: !0, + get: function get() { + var a = this.getRootNode({ + composed: !0 + }); + return a && 9 === a.nodeType; + } + }); +})(Element.prototype); + +/*! +Element.remove() +*/ +(function (b) { + b.forEach(function (a) { + a.hasOwnProperty("remove") || Object.defineProperty(a, "remove", { + configurable: !0, + enumerable: !0, + writable: !0, + value: function value() { + null !== this.parentNode && this.parentNode.removeChild(this); + } + }); + }); +})([Element.prototype, CharacterData.prototype, DocumentType.prototype]); + +/*! +Element.classList +*/ +!function (e) { + 'classList' in e || Object.defineProperty(e, "classList", { + get: function get() { + var e = this, + t = (e.getAttribute("class") || "").replace(/^\s+|\s$/g, "").split(/\s+/g); + function n() { + t.length > 0 ? e.setAttribute("class", t.join(" ")) : e.removeAttribute("class"); + } + return "" === t[0] && t.splice(0, 1), t.toggle = function (e, i) { + void 0 !== i ? i ? t.add(e) : t.remove(e) : -1 !== t.indexOf(e) ? t.splice(t.indexOf(e), 1) : t.push(e), n(); + }, t.add = function () { + for (var e = [].slice.call(arguments), i = 0, s = e.length; i < s; i++) -1 === t.indexOf(e[i]) && t.push(e[i]); + n(); + }, t.remove = function () { + for (var e = [].slice.call(arguments), i = 0, s = e.length; i < s; i++) -1 !== t.indexOf(e[i]) && t.splice(t.indexOf(e[i]), 1); + n(); + }, t.item = function (e) { + return t[e]; + }, t.contains = function (e) { + return -1 !== t.indexOf(e); + }, t.replace = function (e, i) { + -1 !== t.indexOf(e) && t.splice(t.indexOf(e), 1, i), n(); + }, t.value = e.getAttribute("class") || "", t; + } + }); +}(Element.prototype); + +/*! +DOMTokenList +*/ +(function (b) { + try { + document.body.classList.add(); + } catch (e) { + var c = b.add, + d = b.remove; + b.add = function () { + for (var a = 0; a < arguments.length; a++) c.call(this, arguments[a]); + }; + b.remove = function () { + for (var a = 0; a < arguments.length; a++) d.call(this, arguments[a]); + }; + } +})(DOMTokenList.prototype); \ No newline at end of file diff --git a/src/public/js/pwa-elements/esm/polyfills/es5-html-element.js b/src/public/js/pwa-elements/esm/polyfills/es5-html-element.js new file mode 100644 index 0000000000000000000000000000000000000000..336acc0898b9f69c72b14f35353318728f0254cd --- /dev/null +++ b/src/public/js/pwa-elements/esm/polyfills/es5-html-element.js @@ -0,0 +1,11 @@ +(function () { + if ("undefined" !== typeof window && void 0 !== window.Reflect && void 0 !== window.customElements) { + var a = HTMLElement; + window.HTMLElement = function () { + return Reflect.construct(a, [], this.constructor); + }; + HTMLElement.prototype = a.prototype; + HTMLElement.prototype.constructor = HTMLElement; + Object.setPrototypeOf(HTMLElement, a); + } +})(); \ No newline at end of file diff --git a/src/public/js/pwa-elements/esm/polyfills/index.js b/src/public/js/pwa-elements/esm/polyfills/index.js new file mode 100644 index 0000000000000000000000000000000000000000..50824e1103c1c2774ebd1266b2842a5f63321382 --- /dev/null +++ b/src/public/js/pwa-elements/esm/polyfills/index.js @@ -0,0 +1,22 @@ +export function applyPolyfills() { + var promises = []; + if (typeof window !== 'undefined') { + var win = window; + if (!win.customElements || win.Element && (!win.Element.prototype.closest || !win.Element.prototype.matches || !win.Element.prototype.remove || !win.Element.prototype.getRootNode)) { + promises.push(import(/* webpackChunkName: "polyfills-dom" */'./dom.js')); + } + var checkIfURLIsSupported = function checkIfURLIsSupported() { + try { + var u = new URL('b', 'http://a'); + u.pathname = 'c%20d'; + return u.href === 'http://a/c%20d' && u.searchParams; + } catch (e) { + return false; + } + }; + if ('function' !== typeof Object.assign || !Object.entries || !Array.prototype.find || !Array.prototype.includes || !String.prototype.startsWith || !String.prototype.endsWith || win.NodeList && !win.NodeList.prototype.forEach || !win.fetch || !checkIfURLIsSupported() || typeof WeakMap == 'undefined') { + promises.push(import(/* webpackChunkName: "polyfills-core-js" */'./core-js.js')); + } + } + return Promise.all(promises); +} \ No newline at end of file diff --git a/src/public/js/pwa-elements/esm/polyfills/system.js b/src/public/js/pwa-elements/esm/polyfills/system.js new file mode 100644 index 0000000000000000000000000000000000000000..cc38eb06465bc9452dc3f5e3c0871050bfaf80aa --- /dev/null +++ b/src/public/js/pwa-elements/esm/polyfills/system.js @@ -0,0 +1,198 @@ +/** + * SystemJS 4.0.2 + * MANUAL PATCH: remove script.crossOrigin = "anonymous" + * MANUAL PATCH: add conditionally apply, n.System=n.System||new u + */ +!function () { + var e = "undefined" != typeof self, + n = e ? self : global; + var t; + if ("undefined" != typeof document) { + var e = document.querySelector("base[href]"); + e && (t = e.href); + } + if (!t && "undefined" != typeof location) { + var e = (t = location.href.split("#")[0].split("?")[0]).lastIndexOf("/"); + -1 !== e && (t = t.slice(0, e + 1)); + } + var r = /\\/g, + o = "undefined" != typeof Symbol, + i = o && Symbol.toStringTag, + c = o ? Symbol() : "@"; + function u() { + this[c] = {}; + } + var s = u.prototype; + var l; + s.import = function (e, n) { + var t = this; + return Promise.resolve(t.resolve(e, n)).then(function (e) { + var n = function e(n, t, r) { + var o = n[c][t]; + if (o) return o; + var u = [], + s = Object.create(null); + i && Object.defineProperty(s, i, { + value: "Module" + }); + var l = Promise.resolve().then(function () { + return n.instantiate(t, r); + }).then(function (e) { + if (!e) throw Error("Module " + t + " did not instantiate"); + var r = e[1](function (e, n) { + o.h = !0; + var t = !1; + if ("object" != typeof e) e in s && s[e] === n || (s[e] = n, t = !0);else for (var n in e) { + var r = e[n]; + n in s && s[n] === r || (s[n] = r, t = !0); + } + if (t) for (var e = 0; e < u.length; e++) u[e](s); + return n; + }, 2 === e[1].length ? { + import: function _import(e) { + return n.import(e, t); + }, + meta: n.createContext(t) + } : void 0); + return o.e = r.execute || function () {}, [e[0], r.setters || []]; + }); + var f = l.then(function (r) { + return Promise.all(r[0].map(function (o, i) { + var c = r[1][i]; + return Promise.resolve(n.resolve(o, t)).then(function (r) { + var o = e(n, r, t); + return Promise.resolve(o.I).then(function () { + return c && (o.i.push(c), !o.h && o.I || c(o.n)), o; + }); + }); + })).then(function (e) { + o.d = e; + }); + }); + return f.catch(function (e) { + o.e = null, o.er = e; + }), o = n[c][t] = { + id: t, + i: u, + n: s, + I: l, + L: f, + h: !1, + d: void 0, + e: void 0, + er: void 0, + E: void 0, + C: void 0 + }; + }(t, e); + return n.C || function (e, n) { + return n.C = function e(n, t, r) { + if (!r[t.id]) return r[t.id] = !0, Promise.resolve(t.L).then(function () { + return Promise.all(t.d.map(function (t) { + return e(n, t, r); + })); + }); + }(e, n, {}).then(function () { + return function e(n, t, r) { + if (r[t.id]) return; + if (r[t.id] = !0, !t.e) { + if (t.er) throw t.er; + return t.E ? t.E : void 0; + } + var o; + return t.d.forEach(function (t) { + { + var i = e(n, t, r); + i && (o = o || []).push(i); + } + }), o ? Promise.all(o).then(i) : i(); + function i() { + try { + var e = t.e.call(f); + if (e) return e = e.then(function () { + t.C = t.n, t.E = null; + }), t.E = t.E || e; + t.C = t.n; + } catch (e) { + throw t.er = e, e; + } finally { + t.L = t.I = void 0, t.e = null; + } + } + }(e, n, {}); + }).then(function () { + return n.n; + }); + }(t, n); + }); + }, s.createContext = function (e) { + return { + url: e + }; + }, s.register = function (e, n) { + l = [e, n]; + }, s.getRegister = function () { + var e = l; + return l = void 0, e; + }; + var f = Object.freeze(Object.create(null)); + n.System = n.System || new u(); + var d = s.register; + s.register = function (e, n) { + d.call(this, e, n); + }, s.instantiate = function (e, n) { + var t = this; + return ".json" === e.substr(-5) ? fetch(e).then(function (e) { + return e.text(); + }).then(function (e) { + return [[], function (n) { + return { + execute: function execute() { + n("default", JSON.parse(e)); + } + }; + }]; + }) : new Promise(function (r, o) { + var i; + function c(n) { + n.filename === e && (i = n.error); + } + window.addEventListener("error", c); + var u = document.createElement("script"); + u.charset = "utf-8", u.async = !0, u.addEventListener("error", function () { + window.removeEventListener("error", c), o(Error("Error loading " + e + (n ? " from " + n : ""))); + }), u.addEventListener("load", function () { + window.removeEventListener("error", c), document.head.removeChild(u), i ? o(i) : r(t.getRegister()); + }), u.src = e, document.head.appendChild(u); + }); + }, e && "function" == typeof importScripts && (s.instantiate = function (e) { + var n = this; + return new Promise(function (t, r) { + try { + importScripts(e); + } catch (e) { + r(e); + } + t(n.getRegister()); + }); + }), s.resolve = function (e, n) { + var o = function (e, n) { + if (-1 !== e.indexOf("\\") && (e = e.replace(r, "/")), "/" === e[0] && "/" === e[1]) return n.slice(0, n.indexOf(":") + 1) + e; + if ("." === e[0] && ("/" === e[1] || "." === e[1] && ("/" === e[2] || 2 === e.length && (e += "/")) || 1 === e.length && (e += "/")) || "/" === e[0]) { + var t = n.slice(0, n.indexOf(":") + 1); + var r; + if (r = "/" === n[t.length + 1] ? "file:" !== t ? (r = n.slice(t.length + 2)).slice(r.indexOf("/") + 1) : n.slice(8) : n.slice(t.length + ("/" === n[t.length])), "/" === e[0]) return n.slice(0, n.length - r.length - 1) + e; + var o = r.slice(0, r.lastIndexOf("/") + 1) + e, + i = []; + var c = -1; + for (var e = 0; e < o.length; e++) -1 !== c ? "/" === o[e] && (i.push(o.slice(c, e + 1)), c = -1) : "." === o[e] ? "." !== o[e + 1] || "/" !== o[e + 2] && e + 2 !== o.length ? "/" === o[e + 1] || e + 1 === o.length ? e += 1 : c = e : (i.pop(), e += 2) : c = e; + return -1 !== c && i.push(o.slice(c)), n.slice(0, n.length - r.length) + i.join(""); + } + }(e, n || t); + if (!o) { + if (-1 !== e.indexOf(":")) return Promise.resolve(e); + throw Error('Cannot resolve "' + e + (n ? '" from ' + n : '"')); + } + return Promise.resolve(o); + }; +}(); \ No newline at end of file diff --git a/src/public/js/pwa-elements/esm/pwa-action-sheet.entry.js b/src/public/js/pwa-elements/esm/pwa-action-sheet.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..e8711cc842a832369189555337cbd4a7a513d1ce --- /dev/null +++ b/src/public/js/pwa-elements/esm/pwa-action-sheet.entry.js @@ -0,0 +1,81 @@ +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +import { r as registerInstance, c as createEvent, h, g as getElement } from './index-1c5c47b4.js'; +var actionSheetCss = ":host{z-index:1000;position:fixed;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex;contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:-apple-system, BlinkMacSystemFont, \"Helvetica Neue\", \"Roboto\", sans-serif}.wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:rgba(0, 0, 0, 0);-webkit-transition:400ms background-color cubic-bezier(.36,.66,.04,1);transition:400ms background-color cubic-bezier(.36,.66,.04,1)}.wrapper.open{background-color:rgba(0, 0, 0, 0.32)}.title{color:#999;height:23px;line-height:23px;padding-bottom:17px;-webkit-padding-end:16px;padding-inline-end:16px;-webkit-padding-start:16px;padding-inline-start:16px;padding-left:16px;padding-right:16px;padding-top:20px}.content{width:568px;-ms-flex-item-align:end;align-self:flex-end;background-color:#fff;-webkit-transition:400ms -webkit-transform cubic-bezier(.36,.66,.04,1);transition:400ms -webkit-transform cubic-bezier(.36,.66,.04,1);transition:400ms transform cubic-bezier(.36,.66,.04,1);transition:400ms transform cubic-bezier(.36,.66,.04,1), 400ms -webkit-transform cubic-bezier(.36,.66,.04,1);-webkit-transform:translateY(100%);transform:translateY(100%)}.wrapper.open .content{-webkit-transform:translateY(0%);transform:translateY(0%)}@media only screen and (max-width: 568px){.content{width:100%}}.action-sheet-option{cursor:pointer;height:52px;line-height:52px}.action-sheet-button{color:rgb(38, 38, 38);font-size:16px;-webkit-padding-end:16px;padding-inline-end:16px;-webkit-padding-start:16px;padding-inline-start:16px;padding-left:16px;padding-right:16px;padding-top:0px}.action-sheet-button:hover{background-color:#F6F6F6}"; +var PWAActionSheet = /*#__PURE__*/function () { + function PWAActionSheet(hostRef) { + _classCallCheck(this, PWAActionSheet); + registerInstance(this, hostRef); + this.onSelection = createEvent(this, "onSelection", 7); + this.header = undefined; + this.cancelable = true; + this.options = []; + this.open = false; + } + return _createClass(PWAActionSheet, [{ + key: "componentDidLoad", + value: function componentDidLoad() { + var _this = this; + requestAnimationFrame(function () { + _this.open = true; + }); + } + }, { + key: "dismiss", + value: function dismiss() { + if (this.cancelable) { + this.close(); + } + } + }, { + key: "close", + value: function close() { + var _this2 = this; + this.open = false; + setTimeout(function () { + _this2.el.parentNode.removeChild(_this2.el); + }, 500); + } + }, { + key: "handleOptionClick", + value: function handleOptionClick(e, i) { + e.stopPropagation(); + this.onSelection.emit(i); + this.close(); + } + }, { + key: "render", + value: function render() { + var _this3 = this; + return h("div", { + class: "wrapper".concat(this.open ? ' open' : ''), + onClick: function onClick() { + return _this3.dismiss(); + } + }, h("div", { + class: "content" + }, h("div", { + class: "title" + }, this.header), this.options.map(function (option, i) { + return h("div", { + class: "action-sheet-option", + onClick: function onClick(e) { + return _this3.handleOptionClick(e, i); + } + }, h("div", { + class: "action-sheet-button" + }, option.title)); + }))); + } + }, { + key: "el", + get: function get() { + return getElement(this); + } + }]); +}(); +PWAActionSheet.style = actionSheetCss; +export { PWAActionSheet as pwa_action_sheet }; \ No newline at end of file diff --git a/src/public/js/pwa-elements/esm/pwa-camera-modal-instance.entry.js b/src/public/js/pwa-elements/esm/pwa-camera-modal-instance.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..e00a81727175968c4b369aafbe3d6c42de6dbdd5 --- /dev/null +++ b/src/public/js/pwa-elements/esm/pwa-camera-modal-instance.entry.js @@ -0,0 +1,105 @@ +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } +function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } +function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +import { r as registerInstance, c as createEvent, h, g as getElement } from './index-1c5c47b4.js'; +var cameraModalInstanceCss = ":host{z-index:1000;position:fixed;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex;contain:strict;--inset-width:600px;--inset-height:600px}.wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:rgba(0, 0, 0, 0.15)}.content{-webkit-box-shadow:0px 0px 5px rgba(0, 0, 0, 0.2);box-shadow:0px 0px 5px rgba(0, 0, 0, 0.2);width:var(--inset-width);height:var(--inset-height);max-height:100%}@media only screen and (max-width: 600px){.content{width:100%;height:100%}}"; +var PWACameraModal = /*#__PURE__*/function () { + function PWACameraModal(hostRef) { + var _this = this; + _classCallCheck(this, PWACameraModal); + registerInstance(this, hostRef); + this.onPhoto = createEvent(this, "onPhoto", 7); + this.noDeviceError = createEvent(this, "noDeviceError", 7); + this.handlePhoto = /*#__PURE__*/function () { + var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(photo) { + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _this.onPhoto.emit(photo); + case 1: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function (_x) { + return _ref.apply(this, arguments); + }; + }(); + this.handleNoDeviceError = /*#__PURE__*/function () { + var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(photo) { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _this.noDeviceError.emit(photo); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return function (_x2) { + return _ref2.apply(this, arguments); + }; + }(); + this.facingMode = 'user'; + this.hidePicker = false; + this.noDevicesText = 'No camera found'; + this.noDevicesButtonText = 'Choose image'; + } + return _createClass(PWACameraModal, [{ + key: "handleBackdropClick", + value: function handleBackdropClick(e) { + if (e.target !== this.el) { + this.onPhoto.emit(null); + } + } + }, { + key: "handleComponentClick", + value: function handleComponentClick(e) { + e.stopPropagation(); + } + }, { + key: "handleBackdropKeyUp", + value: function handleBackdropKeyUp(e) { + if (e.key === "Escape") { + this.onPhoto.emit(null); + } + } + }, { + key: "render", + value: function render() { + var _this2 = this; + return h("div", { + class: "wrapper", + onClick: function onClick(e) { + return _this2.handleBackdropClick(e); + } + }, h("div", { + class: "content" + }, h("pwa-camera", { + onClick: function onClick(e) { + return _this2.handleComponentClick(e); + }, + facingMode: this.facingMode, + hidePicker: this.hidePicker, + handlePhoto: this.handlePhoto, + handleNoDeviceError: this.handleNoDeviceError, + noDevicesButtonText: this.noDevicesButtonText, + noDevicesText: this.noDevicesText + }))); + } + }, { + key: "el", + get: function get() { + return getElement(this); + } + }]); +}(); +PWACameraModal.style = cameraModalInstanceCss; +export { PWACameraModal as pwa_camera_modal_instance }; \ No newline at end of file diff --git a/src/public/js/pwa-elements/esm/pwa-camera-modal.entry.js b/src/public/js/pwa-elements/esm/pwa-camera-modal.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..da35bd25b76fc070b4760845763ef49d6feb5db1 --- /dev/null +++ b/src/public/js/pwa-elements/esm/pwa-camera-modal.entry.js @@ -0,0 +1,119 @@ +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } +function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } +function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +import { r as registerInstance, c as createEvent, h } from './index-1c5c47b4.js'; +var cameraModalCss = ":host{z-index:1000;position:fixed;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex;contain:strict}.wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:rgba(0, 0, 0, 0.15)}.content{-webkit-box-shadow:0px 0px 5px rgba(0, 0, 0, 0.2);box-shadow:0px 0px 5px rgba(0, 0, 0, 0.2);width:600px;height:600px}"; +var PWACameraModal = /*#__PURE__*/function () { + function PWACameraModal(hostRef) { + _classCallCheck(this, PWACameraModal); + registerInstance(this, hostRef); + this.onPhoto = createEvent(this, "onPhoto", 7); + this.noDeviceError = createEvent(this, "noDeviceError", 7); + this.facingMode = 'user'; + this.hidePicker = false; + } + return _createClass(PWACameraModal, [{ + key: "present", + value: function () { + var _present = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() { + var _this = this; + var camera; + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + camera = document.createElement('pwa-camera-modal-instance'); + camera.facingMode = this.facingMode; + camera.hidePicker = this.hidePicker; + camera.addEventListener('onPhoto', /*#__PURE__*/function () { + var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) { + var photo; + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + if (_this._modal) { + _context.next = 2; + break; + } + return _context.abrupt("return"); + case 2: + photo = e.detail; + _this.onPhoto.emit(photo); + case 4: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function (_x) { + return _ref.apply(this, arguments); + }; + }()); + camera.addEventListener('noDeviceError', /*#__PURE__*/function () { + var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _this.noDeviceError.emit(e); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return function (_x2) { + return _ref2.apply(this, arguments); + }; + }()); + document.body.append(camera); + this._modal = camera; + case 7: + case "end": + return _context3.stop(); + } + }, _callee3, this); + })); + function present() { + return _present.apply(this, arguments); + } + return present; + }() + }, { + key: "dismiss", + value: function () { + var _dismiss = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() { + return _regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + if (this._modal) { + _context4.next = 2; + break; + } + return _context4.abrupt("return"); + case 2: + this._modal && this._modal.parentNode.removeChild(this._modal); + this._modal = null; + case 4: + case "end": + return _context4.stop(); + } + }, _callee4, this); + })); + function dismiss() { + return _dismiss.apply(this, arguments); + } + return dismiss; + }() + }, { + key: "render", + value: function render() { + return h("div", null); + } + }]); +}(); +PWACameraModal.style = cameraModalCss; +export { PWACameraModal as pwa_camera_modal }; \ No newline at end of file diff --git a/src/public/js/pwa-elements/esm/pwa-camera.entry.js b/src/public/js/pwa-elements/esm/pwa-camera.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..bdc71ff4f963310deeed82a6624ad52ff11ca246 --- /dev/null +++ b/src/public/js/pwa-elements/esm/pwa-camera.entry.js @@ -0,0 +1,842 @@ +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } +function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } +function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +import { r as registerInstance, f as forceUpdate, h, g as getElement } from './index-1c5c47b4.js'; + +/** + * MediaStream ImageCapture polyfill + * + * @license + * Copyright 2018 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +var ImageCapture = window.ImageCapture; +if (typeof ImageCapture === 'undefined') { + ImageCapture = /*#__PURE__*/function () { + /** + * TODO https://www.w3.org/TR/image-capture/#constructors + * + * @param {MediaStreamTrack} videoStreamTrack - A MediaStreamTrack of the 'video' kind + */ + function ImageCapture(videoStreamTrack) { + var _this = this; + _classCallCheck(this, ImageCapture); + if (videoStreamTrack.kind !== 'video') throw new DOMException('NotSupportedError'); + this._videoStreamTrack = videoStreamTrack; + if (!('readyState' in this._videoStreamTrack)) { + // Polyfill for Firefox + this._videoStreamTrack.readyState = 'live'; + } + // MediaStream constructor not available until Chrome 55 - https://www.chromestatus.com/feature/5912172546752512 + this._previewStream = new MediaStream([videoStreamTrack]); + this.videoElement = document.createElement('video'); + this.videoElementPlaying = new Promise(function (resolve) { + _this.videoElement.addEventListener('playing', resolve); + }); + if (HTMLMediaElement) { + this.videoElement.srcObject = this._previewStream; // Safari 11 doesn't allow use of createObjectURL for MediaStream + } else { + this.videoElement.src = URL.createObjectURL(this._previewStream); + } + this.videoElement.muted = true; + this.videoElement.setAttribute('playsinline', ''); // Required by Safari on iOS 11. See https://webkit.org/blog/6784 + this.videoElement.play(); + this.canvasElement = document.createElement('canvas'); + // TODO Firefox has https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas + this.canvas2dContext = this.canvasElement.getContext('2d'); + } + /** + * https://w3c.github.io/mediacapture-image/index.html#dom-imagecapture-videostreamtrack + * @return {MediaStreamTrack} The MediaStreamTrack passed into the constructor + */ + return _createClass(ImageCapture, [{ + key: "videoStreamTrack", + get: function get() { + return this._videoStreamTrack; + } + /** + * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-getphotocapabilities + * @return {Promise<PhotoCapabilities>} Fulfilled promise with + * [PhotoCapabilities](https://www.w3.org/TR/image-capture/#idl-def-photocapabilities) + * object on success, rejected promise on failure + */ + }, { + key: "getPhotoCapabilities", + value: function getPhotoCapabilities() { + return new Promise(function executorGPC(resolve, reject) { + // TODO see https://github.com/w3c/mediacapture-image/issues/97 + var MediaSettingsRange = { + current: 0, + min: 0, + max: 0 + }; + resolve({ + exposureCompensation: MediaSettingsRange, + exposureMode: 'none', + fillLightMode: ['none'], + focusMode: 'none', + imageHeight: MediaSettingsRange, + imageWidth: MediaSettingsRange, + iso: MediaSettingsRange, + redEyeReduction: false, + whiteBalanceMode: 'none', + zoom: MediaSettingsRange + }); + reject(new DOMException('OperationError')); + }); + } + /** + * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-setoptions + * @param {Object} photoSettings - Photo settings dictionary, https://www.w3.org/TR/image-capture/#idl-def-photosettings + * @return {Promise<void>} Fulfilled promise on success, rejected promise on failure + */ + }, { + key: "setOptions", + value: function setOptions() { + var _photoSettings = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return new Promise(function executorSO(_resolve, _reject) { + // TODO + }); + } + /** + * TODO + * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-takephoto + * @return {Promise<Blob>} Fulfilled promise with [Blob](https://www.w3.org/TR/FileAPI/#blob) + * argument on success; rejected promise on failure + */ + }, { + key: "takePhoto", + value: function takePhoto() { + var self = this; + return new Promise(function executorTP(resolve, reject) { + // `If the readyState of the MediaStreamTrack provided in the constructor is not live, + // return a promise rejected with a new DOMException whose name is "InvalidStateError".` + if (self._videoStreamTrack.readyState !== 'live') { + return reject(new DOMException('InvalidStateError')); + } + self.videoElementPlaying.then(function () { + try { + self.canvasElement.width = self.videoElement.videoWidth; + self.canvasElement.height = self.videoElement.videoHeight; + self.canvas2dContext.drawImage(self.videoElement, 0, 0); + self.canvasElement.toBlob(resolve); + } catch (error) { + reject(new DOMException('UnknownError')); + } + }); + }); + } + /** + * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-grabframe + * @return {Promise<ImageBitmap>} Fulfilled promise with + * [ImageBitmap](https://www.w3.org/TR/html51/webappapis.html#webappapis-images) + * argument on success; rejected promise on failure + */ + }, { + key: "grabFrame", + value: function grabFrame() { + var self = this; + return new Promise(function executorGF(resolve, reject) { + // `If the readyState of the MediaStreamTrack provided in the constructor is not live, + // return a promise rejected with a new DOMException whose name is "InvalidStateError".` + if (self._videoStreamTrack.readyState !== 'live') { + return reject(new DOMException('InvalidStateError')); + } + self.videoElementPlaying.then(function () { + try { + self.canvasElement.width = self.videoElement.videoWidth; + self.canvasElement.height = self.videoElement.videoHeight; + self.canvas2dContext.drawImage(self.videoElement, 0, 0); + // TODO polyfill https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmapFactories/createImageBitmap for IE + resolve(window.createImageBitmap(self.canvasElement)); + } catch (error) { + reject(new DOMException('UnknownError')); + } + }); + }); + } + }]); + }(); +} +window.ImageCapture = ImageCapture; +var cameraCss = ":host{--header-height:4em;--footer-height:9em;--header-height-landscape:3em;--footer-height-landscape:6em;--shutter-size:6em;--icon-size-header:1.5em;--icon-size-footer:2.5em;--margin-size-header:1.5em;--margin-size-footer:2.0em;font-family:-apple-system, BlinkMacSystemFont,\n “Segoe UIâ€, “Robotoâ€, “Droid Sansâ€, “Helvetica Neueâ€, sans-serif;display:block;width:100%;height:100%}.items{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;width:100%;height:100%;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.items .item{-ms-flex:1;flex:1;text-align:center}.items .item:first-child{text-align:left}.items .item:last-child{text-align:right}.camera-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100%;height:100%}.camera-header{color:white;background-color:black;height:var(--header-height)}.camera-header .items{padding:var(--margin-size-header)}.camera-footer{position:relative;color:white;background-color:black;height:var(--footer-height)}.camera-footer .items{padding:var(--margin-size-footer)}@media (max-height: 375px){.camera-header{--header-height:var(--header-height-landscape)}.camera-footer{--footer-height:var(--footer-height-landscape)}.camera-footer .shutter{--shutter-size:4em}}.camera-video{position:relative;-ms-flex:1;flex:1;overflow:hidden;background-color:black}video{width:100%;height:100%;max-height:100%;min-height:100%;-o-object-fit:cover;object-fit:cover;background-color:black}.pick-image{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;left:var(--margin-size-footer);top:0;height:100%;width:var(--icon-size-footer);color:white}.pick-image input{visibility:hidden}.pick-image svg{cursor:pointer;fill:white;width:var(--icon-size-footer);height:var(--icon-size-footer)}.shutter{position:absolute;left:50%;top:50%;width:var(--shutter-size);height:var(--shutter-size);margin-top:calc(var(--shutter-size) / -2);margin-left:calc(var(--shutter-size) / -2);border-radius:100%;background-color:#c6cdd8;padding:12px;-webkit-box-sizing:border-box;box-sizing:border-box}.shutter:active .shutter-button{background-color:#9da9bb}.shutter-button{background-color:white;border-radius:100%;width:100%;height:100%}.rotate{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;right:var(--margin-size-footer);top:0;height:100%;width:var(--icon-size-footer);color:white}.rotate img{width:var(--icon-size-footer);height:var(--icon-size-footer)}.shutter-overlay{z-index:5;position:absolute;width:100%;height:100%;background-color:black}.error{width:100%;height:100%;color:white;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.no-device{background-color:black;-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:white}.no-device label{cursor:pointer;background:#fff;border-radius:6px;padding:6px 8px;color:black}.no-device input{visibility:hidden;height:0;margin-top:16px}.accept{background-color:black;-ms-flex:1;flex:1;overflow:hidden}.accept .accept-image{width:100%;height:100%;max-height:100%;background-position:center center;background-size:cover;background-repeat:no-repeat}.close img{cursor:pointer;width:var(--icon-size-header);height:var(--icon-size-header)}.flash img{width:var(--icon-size-header);height:var(--icon-size-header)}.accept-use img{width:var(--icon-size-footer);height:var(--icon-size-footer)}.accept-cancel img{width:var(--icon-size-footer);height:var(--icon-size-footer)}.offscreen-image-render{top:0;left:0;visibility:hidden;pointer-events:none;width:100%;height:100%}"; +var CameraPWA = /*#__PURE__*/function () { + function CameraPWA(hostRef) { + var _this2 = this; + _classCallCheck(this, CameraPWA); + registerInstance(this, hostRef); + // Whether the device has multiple cameras (front/back) + this.hasMultipleCameras = false; + // Whether the device has flash support + this.hasFlash = false; + // Flash modes for camera + this.flashModes = []; + // Current flash mode + this.flashMode = 'off'; + this.handlePickFile = function (_e) {}; + this.handleShutterClick = function (_e) { + console.debug('shutter click'); + _this2.capture(); + }; + this.handleRotateClick = function (_e) { + _this2.rotate(); + }; + this.handleClose = function (_e) { + _this2.handlePhoto && _this2.handlePhoto(null); + }; + this.handleFlashClick = function (_e) { + _this2.cycleFlash(); + }; + this.handleCancelPhoto = function (_e) { + var track = _this2.stream && _this2.stream.getTracks()[0]; + var c = track && track.getConstraints(); + _this2.photo = null; + _this2.photoSrc = null; + if (c) { + _this2.initCamera({ + video: { + facingMode: c.facingMode + } + }); + } else { + _this2.initCamera(); + } + }; + this.handleAcceptPhoto = function (_e) { + _this2.handlePhoto && _this2.handlePhoto(_this2.photo); + }; + this.handleFileInputChange = /*#__PURE__*/function () { + var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) { + var input, file, orientation; + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + input = e.target; + file = input.files[0]; + _context.prev = 2; + _context.next = 5; + return _this2.getOrientation(file); + case 5: + orientation = _context.sent; + console.debug('Got orientation', orientation); + _this2.photoOrientation = orientation; + _context.next = 12; + break; + case 10: + _context.prev = 10; + _context.t0 = _context["catch"](2); + case 12: + _this2.handlePhoto && _this2.handlePhoto(file); + case 13: + case "end": + return _context.stop(); + } + }, _callee, null, [[2, 10]]); + })); + return function (_x) { + return _ref.apply(this, arguments); + }; + }(); + this.handleVideoMetadata = function (e) { + console.debug('Video metadata', e); + }; + this.facingMode = 'user'; + this.handlePhoto = undefined; + this.hidePicker = false; + this.handleNoDeviceError = undefined; + this.noDevicesText = 'No camera found'; + this.noDevicesButtonText = 'Choose image'; + this.photo = undefined; + this.photoSrc = undefined; + this.showShutterOverlay = false; + this.flashIndex = 0; + this.hasCamera = null; + this.rotation = 0; + this.deviceError = null; + } + return _createClass(CameraPWA, [{ + key: "componentDidLoad", + value: function () { + var _componentDidLoad = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + this.defaultConstraints = { + video: { + facingMode: this.facingMode + } + }; + // Figure out how many cameras we have + _context2.next = 3; + return this.queryDevices(); + case 3: + _context2.next = 5; + return this.initCamera(); + case 5: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function componentDidLoad() { + return _componentDidLoad.apply(this, arguments); + } + return componentDidLoad; + }() + }, { + key: "disconnectedCallback", + value: function disconnectedCallback() { + this.stopStream(); + this.photoSrc && URL.revokeObjectURL(this.photoSrc); + } + }, { + key: "hasImageCapture", + value: function hasImageCapture() { + return 'ImageCapture' in window; + } + /** + * Query the list of connected devices and figure out how many video inputs we have. + */ + }, { + key: "queryDevices", + value: (function () { + var _queryDevices = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() { + var devices, videoDevices; + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + _context3.prev = 0; + _context3.next = 3; + return navigator.mediaDevices.enumerateDevices(); + case 3: + devices = _context3.sent; + videoDevices = devices.filter(function (d) { + return d.kind == 'videoinput'; + }); + this.hasCamera = !!videoDevices.length; + this.hasMultipleCameras = videoDevices.length > 1; + _context3.next = 12; + break; + case 9: + _context3.prev = 9; + _context3.t0 = _context3["catch"](0); + this.deviceError = _context3.t0; + case 12: + case "end": + return _context3.stop(); + } + }, _callee3, this, [[0, 9]]); + })); + function queryDevices() { + return _queryDevices.apply(this, arguments); + } + return queryDevices; + }()) + }, { + key: "initCamera", + value: function () { + var _initCamera = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(constraints) { + var stream; + return _regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + if (!constraints) { + constraints = this.defaultConstraints; + } + _context4.prev = 1; + _context4.next = 4; + return navigator.mediaDevices.getUserMedia(Object.assign({ + video: true, + audio: false + }, constraints)); + case 4: + stream = _context4.sent; + this.initStream(stream); + _context4.next = 12; + break; + case 8: + _context4.prev = 8; + _context4.t0 = _context4["catch"](1); + this.deviceError = _context4.t0; + this.handleNoDeviceError && this.handleNoDeviceError(_context4.t0); + case 12: + case "end": + return _context4.stop(); + } + }, _callee4, this, [[1, 8]]); + })); + function initCamera(_x2) { + return _initCamera.apply(this, arguments); + } + return initCamera; + }() + }, { + key: "initStream", + value: function () { + var _initStream = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(stream) { + return _regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + this.stream = stream; + this.videoElement.srcObject = stream; + if (!this.hasImageCapture()) { + _context5.next = 8; + break; + } + this.imageCapture = new window.ImageCapture(stream.getVideoTracks()[0]); + _context5.next = 6; + return this.initPhotoCapabilities(this.imageCapture); + case 6: + _context5.next = 10; + break; + case 8: + this.deviceError = 'No image capture'; + this.handleNoDeviceError && this.handleNoDeviceError(); + case 10: + // Always re-render + forceUpdate(this.el); + case 11: + case "end": + return _context5.stop(); + } + }, _callee5, this); + })); + function initStream(_x3) { + return _initStream.apply(this, arguments); + } + return initStream; + }() + }, { + key: "initPhotoCapabilities", + value: function () { + var _initPhotoCapabilities = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(imageCapture) { + var c; + return _regeneratorRuntime().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + _context6.next = 2; + return imageCapture.getPhotoCapabilities(); + case 2: + c = _context6.sent; + if (c.fillLightMode && c.fillLightMode.length > 1) { + this.flashModes = c.fillLightMode.map(function (m) { + return m; + }); + // Try to recall the current flash mode + if (this.flashMode) { + this.flashMode = this.flashModes[this.flashModes.indexOf(this.flashMode)] || 'off'; + this.flashIndex = this.flashModes.indexOf(this.flashMode) || 0; + } else { + this.flashIndex = 0; + } + } + case 4: + case "end": + return _context6.stop(); + } + }, _callee6, this); + })); + function initPhotoCapabilities(_x4) { + return _initPhotoCapabilities.apply(this, arguments); + } + return initPhotoCapabilities; + }() + }, { + key: "stopStream", + value: function stopStream() { + if (this.videoElement) { + this.videoElement.srcObject = null; + } + this.stream && this.stream.getTracks().forEach(function (track) { + return track.stop(); + }); + } + }, { + key: "capture", + value: function () { + var _capture = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7() { + var photo; + return _regeneratorRuntime().wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { + case 0: + if (!this.hasImageCapture()) { + _context7.next = 13; + break; + } + _context7.prev = 1; + _context7.next = 4; + return this.imageCapture.takePhoto({ + fillLightMode: this.flashModes.length > 1 ? this.flashMode : undefined + }); + case 4: + photo = _context7.sent; + _context7.next = 7; + return this.flashScreen(); + case 7: + this.promptAccept(photo); + _context7.next = 13; + break; + case 10: + _context7.prev = 10; + _context7.t0 = _context7["catch"](1); + console.error('Unable to take photo!', _context7.t0); + case 13: + this.stopStream(); + case 14: + case "end": + return _context7.stop(); + } + }, _callee7, this, [[1, 10]]); + })); + function capture() { + return _capture.apply(this, arguments); + } + return capture; + }() + }, { + key: "promptAccept", + value: function () { + var _promptAccept = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(photo) { + var orientation; + return _regeneratorRuntime().wrap(function _callee8$(_context8) { + while (1) switch (_context8.prev = _context8.next) { + case 0: + this.photo = photo; + _context8.next = 3; + return this.getOrientation(photo); + case 3: + orientation = _context8.sent; + console.debug('Got orientation', orientation); + this.photoOrientation = orientation; + if (!orientation) { + _context8.next = 18; + break; + } + _context8.t0 = orientation; + _context8.next = _context8.t0 === 1 ? 10 : _context8.t0 === 2 ? 10 : _context8.t0 === 3 ? 12 : _context8.t0 === 4 ? 12 : _context8.t0 === 5 ? 14 : _context8.t0 === 6 ? 14 : _context8.t0 === 7 ? 16 : _context8.t0 === 8 ? 16 : 18; + break; + case 10: + this.rotation = 0; + return _context8.abrupt("break", 18); + case 12: + this.rotation = 180; + return _context8.abrupt("break", 18); + case 14: + this.rotation = 90; + return _context8.abrupt("break", 18); + case 16: + this.rotation = 270; + return _context8.abrupt("break", 18); + case 18: + this.photoSrc = URL.createObjectURL(photo); + case 19: + case "end": + return _context8.stop(); + } + }, _callee8, this); + })); + function promptAccept(_x5) { + return _promptAccept.apply(this, arguments); + } + return promptAccept; + }() + }, { + key: "getOrientation", + value: function getOrientation(file) { + return new Promise(function (resolve) { + var reader = new FileReader(); + reader.onload = function (event) { + var view = new DataView(event.target.result); + if (view.getUint16(0, false) !== 0xFFD8) { + return resolve(-2); + } + var length = view.byteLength; + var offset = 2; + while (offset < length) { + var marker = view.getUint16(offset, false); + offset += 2; + if (marker === 0xFFE1) { + if (view.getUint32(offset += 2, false) !== 0x45786966) { + return resolve(-1); + } + var little = view.getUint16(offset += 6, false) === 0x4949; + offset += view.getUint32(offset + 4, little); + var tags = view.getUint16(offset, little); + offset += 2; + for (var i = 0; i < tags; i++) { + if (view.getUint16(offset + i * 12, little) === 0x0112) { + return resolve(view.getUint16(offset + i * 12 + 8, little)); + } + } + } else if ((marker & 0xFF00) !== 0xFF00) { + break; + } else { + offset += view.getUint16(offset, false); + } + } + return resolve(-1); + }; + reader.readAsArrayBuffer(file.slice(0, 64 * 1024)); + }); + } + }, { + key: "rotate", + value: function rotate() { + this.stopStream(); + var track = this.stream && this.stream.getTracks()[0]; + if (!track) { + return; + } + var c = track.getConstraints(); + var facingMode = c.facingMode; + if (!facingMode) { + var _c = track.getCapabilities(); + if (_c.facingMode) { + facingMode = _c.facingMode[0]; + } + } + if (facingMode === 'environment') { + this.initCamera({ + video: { + facingMode: 'user' + } + }); + } else { + this.initCamera({ + video: { + facingMode: 'environment' + } + }); + } + } + }, { + key: "setFlashMode", + value: function setFlashMode(mode) { + console.debug('New flash mode: ', mode); + this.flashMode = mode; + } + }, { + key: "cycleFlash", + value: function cycleFlash() { + if (this.flashModes.length > 0) { + this.flashIndex = (this.flashIndex + 1) % this.flashModes.length; + this.setFlashMode(this.flashModes[this.flashIndex]); + } + } + }, { + key: "flashScreen", + value: function () { + var _flashScreen = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9() { + var _this3 = this; + return _regeneratorRuntime().wrap(function _callee9$(_context9) { + while (1) switch (_context9.prev = _context9.next) { + case 0: + return _context9.abrupt("return", new Promise(function (resolve, _reject) { + _this3.showShutterOverlay = true; + setTimeout(function () { + _this3.showShutterOverlay = false; + resolve(); + }, 100); + })); + case 1: + case "end": + return _context9.stop(); + } + }, _callee9); + })); + function flashScreen() { + return _flashScreen.apply(this, arguments); + } + return flashScreen; + }() + }, { + key: "iconExit", + value: function iconExit() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Cg id='Icon_5_'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M402.2,134L378,109.8c-1.6-1.6-4.1-1.6-5.7,0L258.8,223.4c-1.6,1.6-4.1,1.6-5.7,0L139.6,109.8 c-1.6-1.6-4.1-1.6-5.7,0L109.8,134c-1.6,1.6-1.6,4.1,0,5.7l113.5,113.5c1.6,1.6,1.6,4.1,0,5.7L109.8,372.4c-1.6,1.6-1.6,4.1,0,5.7 l24.1,24.1c1.6,1.6,4.1,1.6,5.7,0l113.5-113.5c1.6-1.6,4.1-1.6,5.7,0l113.5,113.5c1.6,1.6,4.1,1.6,5.7,0l24.1-24.1 c1.6-1.6,1.6-4.1,0-5.7L288.6,258.8c-1.6-1.6-1.6-4.1,0-5.7l113.5-113.5C403.7,138.1,403.7,135.5,402.2,134z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "iconPhotos", + value: function iconPhotos() { + return h("svg", { + xmlns: 'http://www.w3.org/2000/svg', + width: '512', + height: '512', + viewBox: '0 0 512 512' + }, h("path", { + d: 'M450.29,112H142c-34,0-62,27.51-62,61.33V418.67C80,452.49,108,480,142,480H450c34,0,62-26.18,62-60V173.33C512,139.51,484.32,112,450.29,112Zm-77.15,61.34a46,46,0,1,1-46.28,46A46.19,46.19,0,0,1,373.14,173.33Zm-231.55,276c-17,0-29.86-13.75-29.86-30.66V353.85l90.46-80.79a46.54,46.54,0,0,1,63.44,1.83L328.27,337l-113,112.33ZM480,418.67a30.67,30.67,0,0,1-30.71,30.66H259L376.08,333a46.24,46.24,0,0,1,59.44-.16L480,370.59Z' + }), h("path", { + d: 'M384,32H64A64,64,0,0,0,0,96V352a64.11,64.11,0,0,0,48,62V152a72,72,0,0,1,72-72H446A64.11,64.11,0,0,0,384,32Z' + })); + } + }, { + key: "iconConfirm", + value: function iconConfirm() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Ccircle fill='%232CD865' cx='256' cy='256' r='256'/%3E%3Cg id='Icon_1_'%3E%3Cg%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M208,301.4l-55.4-55.5c-1.5-1.5-4-1.6-5.6-0.1l-23.4,22.3c-1.6,1.6-1.7,4.1-0.1,5.7l81.6,81.4 c3.1,3.1,8.2,3.1,11.3,0l171.8-171.7c1.6-1.6,1.6-4.2-0.1-5.7l-23.4-22.3c-1.6-1.5-4.1-1.5-5.6,0.1L213.7,301.4 C212.1,303,209.6,303,208,301.4z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "iconReverseCamera", + value: function iconReverseCamera() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M352,0H160C72,0,0,72,0,160v192c0,88,72,160,160,160h192c88,0,160-72,160-160V160C512,72,440,0,352,0z M356.7,365.8l-3.7,3.3c-27,23.2-61.4,35.9-96.8,35.9c-72.4,0-135.8-54.7-147-125.6c-0.3-1.9-2-3.3-3.9-3.3H64 c-3.3,0-5.2-3.8-3.2-6.4l61.1-81.4c1.6-2.1,4.7-2.1,6.4-0.1l63.3,81.4c2,2.6,0.2,6.5-3.2,6.5h-40.6c-2.5,0-4.5,2.4-3.9,4.8 c11.5,51.5,59.2,90.6,112.4,90.6c26.4,0,51.8-9.7,73.7-27.9l3.1-2.5c1.6-1.3,3.9-1.1,5.3,0.3l18.5,18.6 C358.5,361.6,358.4,364.3,356.7,365.8z M451.4,245.6l-61,83.5c-1.6,2.2-4.8,2.2-6.4,0.1l-63.3-83.3c-2-2.6-0.1-6.4,3.2-6.4h40.8 c2.5,0,4.4-2.3,3.9-4.8c-5.1-24.2-17.8-46.5-36.5-63.7c-21.2-19.4-48.2-30.1-76-30.1c-26.5,0-52.6,9.7-73.7,27.3l-3.1,2.5 c-1.6,1.3-3.9,1.2-5.4-0.3l-18.5-18.5c-1.6-1.6-1.5-4.3,0.2-5.9l3.5-3.1c27-23.2,61.4-35.9,96.8-35.9c38,0,73.9,13.7,101.2,38.7 c23.2,21.1,40.3,55.2,45.7,90.1c0.3,1.9,1.9,3.4,3.9,3.4h41.3C451.4,239.2,453.3,243,451.4,245.6z'/%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "iconRetake", + value: function iconRetake() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Ccircle fill='%23727A87' cx='256' cy='256' r='256'/%3E%3Cg id='Icon_5_'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M394.2,142L370,117.8c-1.6-1.6-4.1-1.6-5.7,0L258.8,223.4c-1.6,1.6-4.1,1.6-5.7,0L147.6,117.8 c-1.6-1.6-4.1-1.6-5.7,0L117.8,142c-1.6,1.6-1.6,4.1,0,5.7l105.5,105.5c1.6,1.6,1.6,4.1,0,5.7L117.8,364.4c-1.6,1.6-1.6,4.1,0,5.7 l24.1,24.1c1.6,1.6,4.1,1.6,5.7,0l105.5-105.5c1.6-1.6,4.1-1.6,5.7,0l105.5,105.5c1.6,1.6,4.1,1.6,5.7,0l24.1-24.1 c1.6-1.6,1.6-4.1,0-5.7L288.6,258.8c-1.6-1.6-1.6-4.1,0-5.7l105.5-105.5C395.7,146.1,395.7,143.5,394.2,142z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "iconFlashOff", + value: function iconFlashOff() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cg%3E%3Cpath class='st0' d='M498,483.7L42.3,28L14,56.4l149.8,149.8L91,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9c1.6,0,2.7,1.3,2.4,2.7 L197.6,507c-1,4.4,5.8,6.9,8.9,3.2l118.6-142.8L469.6,512L498,483.7z'/%3E%3Cpath class='st0' d='M449,218.2c2.5-3,0.1-7.2-3.9-7.2H301.2c-1.6,0-2.7-1.3-2.4-2.7L342.4,5c1-4.4-5.8-6.9-8.9-3.2L214.9,144.6 l161.3,161.3L449,218.2z'/%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "iconFlashOn", + value: function iconFlashOn() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cpath class='st0' d='M287.2,211c-1.6,0-2.7-1.3-2.4-2.7L328.4,5c1-4.4-5.8-6.9-8.9-3.2L77,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9 c1.6,0,2.7,1.3,2.4,2.7L183.6,507c-1,4.4,5.8,6.9,8.9,3.2l242.5-292c2.5-3,0.1-7.2-3.9-7.2L287.2,211L287.2,211z'/%3E%3C/svg%3E"; + } + }, { + key: "iconFlashAuto", + value: function iconFlashAuto() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cpath class='st0' d='M287.2,211c-1.6,0-2.7-1.3-2.4-2.7L328.4,5c1-4.4-5.8-6.9-8.9-3.2L77,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9 c1.6,0,2.7,1.3,2.4,2.7L183.6,507c-1,4.4,5.8,6.9,8.9,3.2l242.5-292c2.5-3,0.1-7.2-3.9-7.2L287.2,211L287.2,211z'/%3E%3Cg%3E%3Cpath class='st0' d='M321.3,186l74-186H438l74,186h-43.5l-11.9-32.5h-80.9l-12,32.5H321.3z M415.8,47.9l-27.2,70.7h54.9l-27.2-70.7 H415.8z'/%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "render", + value: function render() { + var _this4 = this; + // const acceptStyles = { transform: `rotate(${-this.rotation}deg)` }; + var acceptStyles = {}; + return h("div", { + class: "camera-wrapper" + }, h("div", { + class: "camera-header" + }, h("section", { + class: "items" + }, h("div", { + class: "item close", + onClick: function onClick(e) { + return _this4.handleClose(e); + } + }, h("img", { + src: this.iconExit() + })), h("div", { + class: "item flash", + onClick: function onClick(e) { + return _this4.handleFlashClick(e); + } + }, this.flashModes.length > 0 && h("div", null, this.flashMode == 'off' ? h("img", { + src: this.iconFlashOff() + }) : '', this.flashMode == 'auto' ? h("img", { + src: this.iconFlashAuto() + }) : '', this.flashMode == 'flash' ? h("img", { + src: this.iconFlashOn() + }) : '')))), (this.hasCamera === false || !!this.deviceError) && h("div", { + class: "no-device" + }, h("h2", null, this.noDevicesText), h("label", { + htmlFor: "_pwa-elements-camera-input" + }, this.noDevicesButtonText), h("input", { + type: "file", + id: "_pwa-elements-camera-input", + onChange: this.handleFileInputChange, + accept: "image/*", + class: "select-file-button" + })), this.photoSrc ? h("div", { + class: "accept" + }, h("div", { + class: "accept-image", + style: Object.assign({ + backgroundImage: "url(".concat(this.photoSrc, ")") + }, acceptStyles) + })) : h("div", { + class: "camera-video" + }, this.showShutterOverlay && h("div", { + class: "shutter-overlay" + }), this.hasImageCapture() ? h("video", { + ref: function ref(el) { + return _this4.videoElement = el; + }, + onLoadedMetaData: this.handleVideoMetadata, + autoplay: true, + playsinline: true + }) : h("canvas", { + ref: function ref(el) { + return _this4.canvasElement = el; + }, + width: "100%", + height: "100%" + }), h("canvas", { + class: "offscreen-image-render", + ref: function ref(e) { + return _this4.offscreenCanvas = e; + }, + width: "100%", + height: "100%" + })), this.hasCamera && h("div", { + class: "camera-footer" + }, !this.photo ? [!this.hidePicker && h("div", { + class: "pick-image", + onClick: this.handlePickFile + }, h("label", { + htmlFor: "_pwa-elements-file-pick" + }, this.iconPhotos()), h("input", { + type: "file", + id: "_pwa-elements-file-pick", + onChange: this.handleFileInputChange, + accept: "image/*", + class: "pick-image-button" + })), h("div", { + class: "shutter", + onClick: this.handleShutterClick + }, h("div", { + class: "shutter-button" + })), h("div", { + class: "rotate", + onClick: this.handleRotateClick + }, h("img", { + src: this.iconReverseCamera() + }))] : h("section", { + class: "items" + }, h("div", { + class: "item accept-cancel", + onClick: function onClick(e) { + return _this4.handleCancelPhoto(e); + } + }, h("img", { + src: this.iconRetake() + })), h("div", { + class: "item accept-use", + onClick: function onClick(e) { + return _this4.handleAcceptPhoto(e); + } + }, h("img", { + src: this.iconConfirm() + }))))); + } + }, { + key: "el", + get: function get() { + return getElement(this); + } + }], [{ + key: "assetsDirs", + get: function get() { + return ["icons"]; + } + }]); +}(); +CameraPWA.style = cameraCss; +export { CameraPWA as pwa_camera }; \ No newline at end of file diff --git a/src/public/js/pwa-elements/esm/pwa-toast.entry.js b/src/public/js/pwa-elements/esm/pwa-toast.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..490dc9f2f49bc324e8299f428adcefc5126e6c98 --- /dev/null +++ b/src/public/js/pwa-elements/esm/pwa-toast.entry.js @@ -0,0 +1,71 @@ +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +import { r as registerInstance, h, g as getElement, H as Host } from './index-1c5c47b4.js'; +var toastCss = ":host{position:fixed;bottom:20px;left:0;right:0;display:-ms-flexbox;display:flex;opacity:0}:host(.in){-webkit-transition:opacity 300ms;transition:opacity 300ms;opacity:1}:host(.out){-webkit-transition:opacity 1s;transition:opacity 1s;opacity:0}.wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.toast{font-family:-apple-system, system-ui, \"Helvetica Neue\", Roboto, sans-serif;background-color:#eee;color:black;border-radius:5px;padding:10px 15px;font-size:14px;font-weight:500;-webkit-box-shadow:0px 1px 2px rgba(0, 0, 0, 0.20);box-shadow:0px 1px 2px rgba(0, 0, 0, 0.20)}"; +var PWAToast = /*#__PURE__*/function () { + function PWAToast(hostRef) { + _classCallCheck(this, PWAToast); + registerInstance(this, hostRef); + this.message = undefined; + this.duration = 2000; + this.closing = null; + } + return _createClass(PWAToast, [{ + key: "hostData", + value: function hostData() { + var classes = { + out: !!this.closing + }; + if (this.closing !== null) { + classes['in'] = !this.closing; + } + return { + class: classes + }; + } + }, { + key: "componentDidLoad", + value: function componentDidLoad() { + var _this = this; + setTimeout(function () { + _this.closing = false; + }); + setTimeout(function () { + _this.close(); + }, this.duration); + } + }, { + key: "close", + value: function close() { + var _this2 = this; + this.closing = true; + setTimeout(function () { + _this2.el.parentNode.removeChild(_this2.el); + }, 1000); + } + }, { + key: "__stencil_render", + value: function __stencil_render() { + return h("div", { + class: "wrapper" + }, h("div", { + class: "toast" + }, this.message)); + } + }, { + key: "el", + get: function get() { + return getElement(this); + } + }, { + key: "render", + value: function render() { + return h(Host, this.hostData(), this.__stencil_render()); + } + }]); +}(); +PWAToast.style = toastCss; +export { PWAToast as pwa_toast }; \ No newline at end of file diff --git a/src/public/js/pwa-elements/index.cjs.js b/src/public/js/pwa-elements/index.cjs.js new file mode 100644 index 0000000000000000000000000000000000000000..b8ff46e2066239aa7022b2565adc247c0951c177 --- /dev/null +++ b/src/public/js/pwa-elements/index.cjs.js @@ -0,0 +1 @@ +module.exports = require('./cjs/index.cjs.js'); \ No newline at end of file diff --git a/src/public/js/pwa-elements/index.js b/src/public/js/pwa-elements/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e4839b6e6dd49645ac0f74605e90a6e484545f03 --- /dev/null +++ b/src/public/js/pwa-elements/index.js @@ -0,0 +1 @@ +export * from './esm-es5/index.js'; \ No newline at end of file diff --git a/src/public/js/pwa-elements/ionicpwaelements/icons/confirm.svg b/src/public/js/pwa-elements/ionicpwaelements/icons/confirm.svg new file mode 100644 index 0000000000000000000000000000000000000000..1213fd985488c54d7bf52299d0256052668cfdc6 --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/icons/confirm.svg @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve"> +<circle fill="#2CD865" cx="256" cy="256" r="256"/> +<g id="Icon_1_"> + <g> + <g> + <path fill="#FFFFFF" d="M208,301.4l-55.4-55.5c-1.5-1.5-4-1.6-5.6-0.1l-23.4,22.3c-1.6,1.6-1.7,4.1-0.1,5.7l81.6,81.4 + c3.1,3.1,8.2,3.1,11.3,0l171.8-171.7c1.6-1.6,1.6-4.2-0.1-5.7l-23.4-22.3c-1.6-1.5-4.1-1.5-5.6,0.1L213.7,301.4 + C212.1,303,209.6,303,208,301.4z"/> + </g> + </g> +</g> +</svg> diff --git a/src/public/js/pwa-elements/ionicpwaelements/icons/exit.svg b/src/public/js/pwa-elements/ionicpwaelements/icons/exit.svg new file mode 100644 index 0000000000000000000000000000000000000000..be96592a15b3597189c7c530ae7038652cbaf1d8 --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/icons/exit.svg @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve"> +<g id="Icon_5_"> + <g> + <path fill="#FFFFFF" d="M402.2,134L378,109.8c-1.6-1.6-4.1-1.6-5.7,0L258.8,223.4c-1.6,1.6-4.1,1.6-5.7,0L139.6,109.8 + c-1.6-1.6-4.1-1.6-5.7,0L109.8,134c-1.6,1.6-1.6,4.1,0,5.7l113.5,113.5c1.6,1.6,1.6,4.1,0,5.7L109.8,372.4c-1.6,1.6-1.6,4.1,0,5.7 + l24.1,24.1c1.6,1.6,4.1,1.6,5.7,0l113.5-113.5c1.6-1.6,4.1-1.6,5.7,0l113.5,113.5c1.6,1.6,4.1,1.6,5.7,0l24.1-24.1 + c1.6-1.6,1.6-4.1,0-5.7L288.6,258.8c-1.6-1.6-1.6-4.1,0-5.7l113.5-113.5C403.7,138.1,403.7,135.5,402.2,134z"/> + </g> +</g> +</svg> diff --git a/src/public/js/pwa-elements/ionicpwaelements/icons/flash-auto.svg b/src/public/js/pwa-elements/ionicpwaelements/icons/flash-auto.svg new file mode 100644 index 0000000000000000000000000000000000000000..c388e8624431d2fb995587afaecce200054426f3 --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/icons/flash-auto.svg @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve"> +<style type="text/css"> + .st0{fill:#FFFFFF;} +</style> +<path class="st0" d="M287.2,211c-1.6,0-2.7-1.3-2.4-2.7L328.4,5c1-4.4-5.8-6.9-8.9-3.2L77,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9 + c1.6,0,2.7,1.3,2.4,2.7L183.6,507c-1,4.4,5.8,6.9,8.9,3.2l242.5-292c2.5-3,0.1-7.2-3.9-7.2L287.2,211L287.2,211z"/> +<g> + <path class="st0" d="M321.3,186l74-186H438l74,186h-43.5l-11.9-32.5h-80.9l-12,32.5H321.3z M415.8,47.9l-27.2,70.7h54.9l-27.2-70.7 + H415.8z"/> +</g> +</svg> diff --git a/src/public/js/pwa-elements/ionicpwaelements/icons/flash-off.svg b/src/public/js/pwa-elements/ionicpwaelements/icons/flash-off.svg new file mode 100644 index 0000000000000000000000000000000000000000..98b25994a64831e428d399fec07333de06d5e704 --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/icons/flash-off.svg @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve"> +<style type="text/css"> + .st0{fill:#FFFFFF;} +</style> +<g> + <path class="st0" d="M498,483.7L42.3,28L14,56.4l149.8,149.8L91,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9c1.6,0,2.7,1.3,2.4,2.7 + L197.6,507c-1,4.4,5.8,6.9,8.9,3.2l118.6-142.8L469.6,512L498,483.7z"/> + <path class="st0" d="M449,218.2c2.5-3,0.1-7.2-3.9-7.2H301.2c-1.6,0-2.7-1.3-2.4-2.7L342.4,5c1-4.4-5.8-6.9-8.9-3.2L214.9,144.6 + l161.3,161.3L449,218.2z"/> +</g> +</svg> diff --git a/src/public/js/pwa-elements/ionicpwaelements/icons/flash-on.svg b/src/public/js/pwa-elements/ionicpwaelements/icons/flash-on.svg new file mode 100644 index 0000000000000000000000000000000000000000..e045c08690026c359bd1432786e27065aaf2640d --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/icons/flash-on.svg @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve"> +<style type="text/css"> + .st0{fill:#FFFFFF;} +</style> +<path class="st0" d="M287.2,211c-1.6,0-2.7-1.3-2.4-2.7L328.4,5c1-4.4-5.8-6.9-8.9-3.2L77,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9 + c1.6,0,2.7,1.3,2.4,2.7L183.6,507c-1,4.4,5.8,6.9,8.9,3.2l242.5-292c2.5-3,0.1-7.2-3.9-7.2L287.2,211L287.2,211z"/> +</svg> diff --git a/src/public/js/pwa-elements/ionicpwaelements/icons/retake.svg b/src/public/js/pwa-elements/ionicpwaelements/icons/retake.svg new file mode 100644 index 0000000000000000000000000000000000000000..04fc2a099863a42730d5114ad4e75489589e67de --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/icons/retake.svg @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve"> +<circle fill="#727A87" cx="256" cy="256" r="256"/> +<g id="Icon_5_"> + <g> + <path fill="#FFFFFF" d="M394.2,142L370,117.8c-1.6-1.6-4.1-1.6-5.7,0L258.8,223.4c-1.6,1.6-4.1,1.6-5.7,0L147.6,117.8 + c-1.6-1.6-4.1-1.6-5.7,0L117.8,142c-1.6,1.6-1.6,4.1,0,5.7l105.5,105.5c1.6,1.6,1.6,4.1,0,5.7L117.8,364.4c-1.6,1.6-1.6,4.1,0,5.7 + l24.1,24.1c1.6,1.6,4.1,1.6,5.7,0l105.5-105.5c1.6-1.6,4.1-1.6,5.7,0l105.5,105.5c1.6,1.6,4.1,1.6,5.7,0l24.1-24.1 + c1.6-1.6,1.6-4.1,0-5.7L288.6,258.8c-1.6-1.6-1.6-4.1,0-5.7l105.5-105.5C395.7,146.1,395.7,143.5,394.2,142z"/> + </g> +</g> +</svg> diff --git a/src/public/js/pwa-elements/ionicpwaelements/icons/reverse-camera.svg b/src/public/js/pwa-elements/ionicpwaelements/icons/reverse-camera.svg new file mode 100644 index 0000000000000000000000000000000000000000..ec09076d5c46c9068e1e024170f2a6817e7cd282 --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/icons/reverse-camera.svg @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve"> +<g> + <path fill="#FFFFFF" d="M352,0H160C72,0,0,72,0,160v192c0,88,72,160,160,160h192c88,0,160-72,160-160V160C512,72,440,0,352,0z + M356.7,365.8l-3.7,3.3c-27,23.2-61.4,35.9-96.8,35.9c-72.4,0-135.8-54.7-147-125.6c-0.3-1.9-2-3.3-3.9-3.3H64 + c-3.3,0-5.2-3.8-3.2-6.4l61.1-81.4c1.6-2.1,4.7-2.1,6.4-0.1l63.3,81.4c2,2.6,0.2,6.5-3.2,6.5h-40.6c-2.5,0-4.5,2.4-3.9,4.8 + c11.5,51.5,59.2,90.6,112.4,90.6c26.4,0,51.8-9.7,73.7-27.9l3.1-2.5c1.6-1.3,3.9-1.1,5.3,0.3l18.5,18.6 + C358.5,361.6,358.4,364.3,356.7,365.8z M451.4,245.6l-61,83.5c-1.6,2.2-4.8,2.2-6.4,0.1l-63.3-83.3c-2-2.6-0.1-6.4,3.2-6.4h40.8 + c2.5,0,4.4-2.3,3.9-4.8c-5.1-24.2-17.8-46.5-36.5-63.7c-21.2-19.4-48.2-30.1-76-30.1c-26.5,0-52.6,9.7-73.7,27.3l-3.1,2.5 + c-1.6,1.3-3.9,1.2-5.4-0.3l-18.5-18.5c-1.6-1.6-1.5-4.3,0.2-5.9l3.5-3.1c27-23.2,61.4-35.9,96.8-35.9c38,0,73.9,13.7,101.2,38.7 + c23.2,21.1,40.3,55.2,45.7,90.1c0.3,1.9,1.9,3.4,3.9,3.4h41.3C451.4,239.2,453.3,243,451.4,245.6z"/> +</g> +</svg> diff --git a/src/public/js/pwa-elements/ionicpwaelements/index.esm.js b/src/public/js/pwa-elements/ionicpwaelements/index.esm.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/public/js/pwa-elements/ionicpwaelements/ionicpwaelements.esm.js b/src/public/js/pwa-elements/ionicpwaelements/ionicpwaelements.esm.js new file mode 100644 index 0000000000000000000000000000000000000000..f893813b44803bdb3fe32a6db9c3d0ea08a14e31 --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/ionicpwaelements.esm.js @@ -0,0 +1,42 @@ +import { p as e, b as o } from "./p-386e91ad.js"; +export { s as setNonce } from "./p-386e91ad.js"; +(function () { + var o = import.meta.url, + a = {}; + return "" !== o && (a.resourcesUrl = new URL(".", o).href), e(a); +})().then(function (e) { + return o([["p-3bb700a2", [[1, "pwa-camera-modal", { + facingMode: [1, "facing-mode"], + hidePicker: [4, "hide-picker"], + present: [64], + dismiss: [64] + }]]], ["p-d0cae4dc", [[1, "pwa-action-sheet", { + header: [1], + cancelable: [4], + options: [16], + open: [32] + }]]], ["p-b57f4873", [[1, "pwa-toast", { + message: [1], + duration: [2], + closing: [32] + }]]], ["p-665001c2", [[1, "pwa-camera", { + facingMode: [1, "facing-mode"], + handlePhoto: [16], + hidePicker: [4, "hide-picker"], + handleNoDeviceError: [16], + noDevicesText: [1, "no-devices-text"], + noDevicesButtonText: [1, "no-devices-button-text"], + photo: [32], + photoSrc: [32], + showShutterOverlay: [32], + flashIndex: [32], + hasCamera: [32], + rotation: [32], + deviceError: [32] + }]]], ["p-d212ae1d", [[1, "pwa-camera-modal-instance", { + facingMode: [1, "facing-mode"], + hidePicker: [4, "hide-picker"], + noDevicesText: [1, "no-devices-text"], + noDevicesButtonText: [1, "no-devices-button-text"] + }, [[16, "keyup", "handleBackdropKeyUp"]]]]]], e); +}); \ No newline at end of file diff --git a/src/public/js/pwa-elements/ionicpwaelements/ionicpwaelements.js b/src/public/js/pwa-elements/ionicpwaelements/ionicpwaelements.js new file mode 100644 index 0000000000000000000000000000000000000000..3de6e9ace07ed770e09256a2219ebf6a946784ca --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/ionicpwaelements.js @@ -0,0 +1,6462 @@ +'use strict'; + +(function () { + var currentScript = document.currentScript; + + // Safari 10 support type="module" but still download and executes the nomodule script + if (!currentScript || !currentScript.hasAttribute('nomodule') || !('onbeforeload' in currentScript)) { + /** + * core-js 3.6.5 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2019 Denis Pushkarev (zloirock.ru) + */ + !function (t) { + "use strict"; + + !function (t) { + var n = {}; + function e(r) { + if (n[r]) return n[r].exports; + var o = n[r] = { + i: r, + l: !1, + exports: {} + }; + return t[r].call(o.exports, o, o.exports, e), o.l = !0, o.exports; + } + e.m = t, e.c = n, e.d = function (t, n, r) { + e.o(t, n) || Object.defineProperty(t, n, { + enumerable: !0, + get: r + }); + }, e.r = function (t) { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { + value: "Module" + }), Object.defineProperty(t, "__esModule", { + value: !0 + }); + }, e.t = function (t, n) { + if (1 & n && (t = e(t)), 8 & n) return t; + if (4 & n && "object" == typeof t && t && t.__esModule) return t; + var r = Object.create(null); + if (e.r(r), Object.defineProperty(r, "default", { + enumerable: !0, + value: t + }), 2 & n && "string" != typeof t) for (var o in t) e.d(r, o, function (n) { + return t[n]; + }.bind(null, o)); + return r; + }, e.n = function (t) { + var n = t && t.__esModule ? function () { + return t.default; + } : function () { + return t; + }; + return e.d(n, "a", n), n; + }, e.o = function (t, n) { + return Object.prototype.hasOwnProperty.call(t, n); + }, e.p = "", e(e.s = 0); + }([function (t, n, e) { + e(1), e(55), e(62), e(68), e(70), e(71), e(72), e(73), e(75), e(76), e(78), e(87), e(88), e(89), e(98), e(99), e(101), e(102), e(103), e(105), e(106), e(107), e(108), e(110), e(111), e(112), e(113), e(114), e(115), e(116), e(117), e(118), e(127), e(130), e(131), e(133), e(135), e(136), e(137), e(138), e(139), e(141), e(143), e(146), e(148), e(150), e(151), e(153), e(154), e(155), e(156), e(157), e(159), e(160), e(162), e(163), e(164), e(165), e(166), e(167), e(168), e(169), e(170), e(172), e(173), e(183), e(184), e(185), e(189), e(191), e(192), e(193), e(194), e(195), e(196), e(198), e(201), e(202), e(203), e(204), e(208), e(209), e(212), e(213), e(214), e(215), e(216), e(217), e(218), e(219), e(221), e(222), e(223), e(226), e(227), e(228), e(229), e(230), e(231), e(232), e(233), e(234), e(235), e(236), e(237), e(238), e(240), e(241), e(243), e(248), t.exports = e(246); + }, function (t, n, e) { + var r = e(2), + o = e(6), + i = e(45), + a = e(14), + u = e(46), + c = e(39), + f = e(47), + s = e(48), + l = e(52), + p = e(49), + h = e(53), + v = p("isConcatSpreadable"), + g = h >= 51 || !o(function () { + var t = []; + return t[v] = !1, t.concat()[0] !== t; + }), + d = l("concat"), + y = function y(t) { + if (!a(t)) return !1; + var n = t[v]; + return void 0 !== n ? !!n : i(t); + }; + r({ + target: "Array", + proto: !0, + forced: !g || !d + }, { + concat: function concat(t) { + var n, + e, + r, + o, + i, + a = u(this), + l = s(a, 0), + p = 0; + for (n = -1, r = arguments.length; n < r; n++) if (i = -1 === n ? a : arguments[n], y(i)) { + if (p + (o = c(i.length)) > 9007199254740991) throw TypeError("Maximum allowed index exceeded"); + for (e = 0; e < o; e++, p++) e in i && f(l, p, i[e]); + } else { + if (p >= 9007199254740991) throw TypeError("Maximum allowed index exceeded"); + f(l, p++, i); + } + return l.length = p, l; + } + }); + }, function (t, n, e) { + var r = e(3), + o = e(4).f, + i = e(18), + a = e(21), + u = e(22), + c = e(32), + f = e(44); + t.exports = function (t, n) { + var e, + s, + l, + p, + h, + v = t.target, + g = t.global, + d = t.stat; + if (e = g ? r : d ? r[v] || u(v, {}) : (r[v] || {}).prototype) for (s in n) { + if (p = n[s], l = t.noTargetGet ? (h = o(e, s)) && h.value : e[s], !f(g ? s : v + (d ? "." : "#") + s, t.forced) && void 0 !== l) { + if (typeof p == typeof l) continue; + c(p, l); + } + (t.sham || l && l.sham) && i(p, "sham", !0), a(e, s, p, t); + } + }; + }, function (t, n) { + var e = function e(t) { + return t && t.Math == Math && t; + }; + t.exports = e("object" == typeof globalThis && globalThis) || e("object" == typeof window && window) || e("object" == typeof self && self) || e("object" == typeof global && global) || Function("return this")(); + }, function (t, n, e) { + var r = e(5), + o = e(7), + i = e(8), + a = e(9), + u = e(13), + c = e(15), + f = e(16), + s = Object.getOwnPropertyDescriptor; + n.f = r ? s : function (t, n) { + if (t = a(t), n = u(n, !0), f) try { + return s(t, n); + } catch (t) {} + if (c(t, n)) return i(!o.f.call(t, n), t[n]); + }; + }, function (t, n, e) { + var r = e(6); + t.exports = !r(function () { + return 7 != Object.defineProperty({}, 1, { + get: function get() { + return 7; + } + })[1]; + }); + }, function (t, n) { + t.exports = function (t) { + try { + return !!t(); + } catch (t) { + return !0; + } + }; + }, function (t, n, e) { + var r = {}.propertyIsEnumerable, + o = Object.getOwnPropertyDescriptor, + i = o && !r.call({ + 1: 2 + }, 1); + n.f = i ? function (t) { + var n = o(this, t); + return !!n && n.enumerable; + } : r; + }, function (t, n) { + t.exports = function (t, n) { + return { + enumerable: !(1 & t), + configurable: !(2 & t), + writable: !(4 & t), + value: n + }; + }; + }, function (t, n, e) { + var r = e(10), + o = e(12); + t.exports = function (t) { + return r(o(t)); + }; + }, function (t, n, e) { + var r = e(6), + o = e(11), + i = "".split; + t.exports = r(function () { + return !Object("z").propertyIsEnumerable(0); + }) ? function (t) { + return "String" == o(t) ? i.call(t, "") : Object(t); + } : Object; + }, function (t, n) { + var e = {}.toString; + t.exports = function (t) { + return e.call(t).slice(8, -1); + }; + }, function (t, n) { + t.exports = function (t) { + if (null == t) throw TypeError("Can't call method on " + t); + return t; + }; + }, function (t, n, e) { + var r = e(14); + t.exports = function (t, n) { + if (!r(t)) return t; + var e, o; + if (n && "function" == typeof (e = t.toString) && !r(o = e.call(t))) return o; + if ("function" == typeof (e = t.valueOf) && !r(o = e.call(t))) return o; + if (!n && "function" == typeof (e = t.toString) && !r(o = e.call(t))) return o; + throw TypeError("Can't convert object to primitive value"); + }; + }, function (t, n) { + t.exports = function (t) { + return "object" == typeof t ? null !== t : "function" == typeof t; + }; + }, function (t, n) { + var e = {}.hasOwnProperty; + t.exports = function (t, n) { + return e.call(t, n); + }; + }, function (t, n, e) { + var r = e(5), + o = e(6), + i = e(17); + t.exports = !r && !o(function () { + return 7 != Object.defineProperty(i("div"), "a", { + get: function get() { + return 7; + } + }).a; + }); + }, function (t, n, e) { + var r = e(3), + o = e(14), + i = r.document, + a = o(i) && o(i.createElement); + t.exports = function (t) { + return a ? i.createElement(t) : {}; + }; + }, function (t, n, e) { + var r = e(5), + o = e(19), + i = e(8); + t.exports = r ? function (t, n, e) { + return o.f(t, n, i(1, e)); + } : function (t, n, e) { + return t[n] = e, t; + }; + }, function (t, n, e) { + var r = e(5), + o = e(16), + i = e(20), + a = e(13), + u = Object.defineProperty; + n.f = r ? u : function (t, n, e) { + if (i(t), n = a(n, !0), i(e), o) try { + return u(t, n, e); + } catch (t) {} + if ("get" in e || "set" in e) throw TypeError("Accessors not supported"); + return "value" in e && (t[n] = e.value), t; + }; + }, function (t, n, e) { + var r = e(14); + t.exports = function (t) { + if (!r(t)) throw TypeError(String(t) + " is not an object"); + return t; + }; + }, function (t, n, e) { + var r = e(3), + o = e(18), + i = e(15), + a = e(22), + u = e(23), + c = e(25), + f = c.get, + s = c.enforce, + l = String(String).split("String"); + (t.exports = function (t, n, e, u) { + var c = !!u && !!u.unsafe, + f = !!u && !!u.enumerable, + p = !!u && !!u.noTargetGet; + "function" == typeof e && ("string" != typeof n || i(e, "name") || o(e, "name", n), s(e).source = l.join("string" == typeof n ? n : "")), t !== r ? (c ? !p && t[n] && (f = !0) : delete t[n], f ? t[n] = e : o(t, n, e)) : f ? t[n] = e : a(n, e); + })(Function.prototype, "toString", function () { + return "function" == typeof this && f(this).source || u(this); + }); + }, function (t, n, e) { + var r = e(3), + o = e(18); + t.exports = function (t, n) { + try { + o(r, t, n); + } catch (e) { + r[t] = n; + } + return n; + }; + }, function (t, n, e) { + var r = e(24), + o = Function.toString; + "function" != typeof r.inspectSource && (r.inspectSource = function (t) { + return o.call(t); + }), t.exports = r.inspectSource; + }, function (t, n, e) { + var r = e(3), + o = e(22), + i = r["__core-js_shared__"] || o("__core-js_shared__", {}); + t.exports = i; + }, function (t, n, e) { + var r, + o, + i, + a = e(26), + u = e(3), + c = e(14), + f = e(18), + s = e(15), + l = e(27), + p = e(31), + h = u.WeakMap; + if (a) { + var v = new h(), + g = v.get, + d = v.has, + y = v.set; + r = function r(t, n) { + return y.call(v, t, n), n; + }, o = function o(t) { + return g.call(v, t) || {}; + }, i = function i(t) { + return d.call(v, t); + }; + } else { + var x = l("state"); + p[x] = !0, r = function r(t, n) { + return f(t, x, n), n; + }, o = function o(t) { + return s(t, x) ? t[x] : {}; + }, i = function i(t) { + return s(t, x); + }; + } + t.exports = { + set: r, + get: o, + has: i, + enforce: function enforce(t) { + return i(t) ? o(t) : r(t, {}); + }, + getterFor: function getterFor(t) { + return function (n) { + var e; + if (!c(n) || (e = o(n)).type !== t) throw TypeError("Incompatible receiver, " + t + " required"); + return e; + }; + } + }; + }, function (t, n, e) { + var r = e(3), + o = e(23), + i = r.WeakMap; + t.exports = "function" == typeof i && /native code/.test(o(i)); + }, function (t, n, e) { + var r = e(28), + o = e(30), + i = r("keys"); + t.exports = function (t) { + return i[t] || (i[t] = o(t)); + }; + }, function (t, n, e) { + var r = e(29), + o = e(24); + (t.exports = function (t, n) { + return o[t] || (o[t] = void 0 !== n ? n : {}); + })("versions", []).push({ + version: "3.6.5", + mode: r ? "pure" : "global", + copyright: "© 2020 Denis Pushkarev (zloirock.ru)" + }); + }, function (t, n) { + t.exports = !1; + }, function (t, n) { + var e = 0, + r = Math.random(); + t.exports = function (t) { + return "Symbol(" + String(void 0 === t ? "" : t) + ")_" + (++e + r).toString(36); + }; + }, function (t, n) { + t.exports = {}; + }, function (t, n, e) { + var r = e(15), + o = e(33), + i = e(4), + a = e(19); + t.exports = function (t, n) { + for (var e = o(n), u = a.f, c = i.f, f = 0; f < e.length; f++) { + var s = e[f]; + r(t, s) || u(t, s, c(n, s)); + } + }; + }, function (t, n, e) { + var r = e(34), + o = e(36), + i = e(43), + a = e(20); + t.exports = r("Reflect", "ownKeys") || function (t) { + var n = o.f(a(t)), + e = i.f; + return e ? n.concat(e(t)) : n; + }; + }, function (t, n, e) { + var r = e(35), + o = e(3), + i = function i(t) { + return "function" == typeof t ? t : void 0; + }; + t.exports = function (t, n) { + return arguments.length < 2 ? i(r[t]) || i(o[t]) : r[t] && r[t][n] || o[t] && o[t][n]; + }; + }, function (t, n, e) { + var r = e(3); + t.exports = r; + }, function (t, n, e) { + var r = e(37), + o = e(42).concat("length", "prototype"); + n.f = Object.getOwnPropertyNames || function (t) { + return r(t, o); + }; + }, function (t, n, e) { + var r = e(15), + o = e(9), + i = e(38).indexOf, + a = e(31); + t.exports = function (t, n) { + var e, + u = o(t), + c = 0, + f = []; + for (e in u) !r(a, e) && r(u, e) && f.push(e); + for (; n.length > c;) r(u, e = n[c++]) && (~i(f, e) || f.push(e)); + return f; + }; + }, function (t, n, e) { + var r = e(9), + o = e(39), + i = e(41), + a = function a(t) { + return function (n, e, a) { + var u, + c = r(n), + f = o(c.length), + s = i(a, f); + if (t && e != e) { + for (; f > s;) if ((u = c[s++]) != u) return !0; + } else for (; f > s; s++) if ((t || s in c) && c[s] === e) return t || s || 0; + return !t && -1; + }; + }; + t.exports = { + includes: a(!0), + indexOf: a(!1) + }; + }, function (t, n, e) { + var r = e(40), + o = Math.min; + t.exports = function (t) { + return t > 0 ? o(r(t), 9007199254740991) : 0; + }; + }, function (t, n) { + var e = Math.ceil, + r = Math.floor; + t.exports = function (t) { + return isNaN(t = +t) ? 0 : (t > 0 ? r : e)(t); + }; + }, function (t, n, e) { + var r = e(40), + o = Math.max, + i = Math.min; + t.exports = function (t, n) { + var e = r(t); + return e < 0 ? o(e + n, 0) : i(e, n); + }; + }, function (t, n) { + t.exports = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf"]; + }, function (t, n) { + n.f = Object.getOwnPropertySymbols; + }, function (t, n, e) { + var r = e(6), + o = /#|\.prototype\./, + i = function i(t, n) { + var e = u[a(t)]; + return e == f || e != c && ("function" == typeof n ? r(n) : !!n); + }, + a = i.normalize = function (t) { + return String(t).replace(o, ".").toLowerCase(); + }, + u = i.data = {}, + c = i.NATIVE = "N", + f = i.POLYFILL = "P"; + t.exports = i; + }, function (t, n, e) { + var r = e(11); + t.exports = Array.isArray || function (t) { + return "Array" == r(t); + }; + }, function (t, n, e) { + var r = e(12); + t.exports = function (t) { + return Object(r(t)); + }; + }, function (t, n, e) { + var r = e(13), + o = e(19), + i = e(8); + t.exports = function (t, n, e) { + var a = r(n); + a in t ? o.f(t, a, i(0, e)) : t[a] = e; + }; + }, function (t, n, e) { + var r = e(14), + o = e(45), + i = e(49)("species"); + t.exports = function (t, n) { + var e; + return o(t) && ("function" != typeof (e = t.constructor) || e !== Array && !o(e.prototype) ? r(e) && null === (e = e[i]) && (e = void 0) : e = void 0), new (void 0 === e ? Array : e)(0 === n ? 0 : n); + }; + }, function (t, n, e) { + var r = e(3), + o = e(28), + i = e(15), + a = e(30), + u = e(50), + c = e(51), + f = o("wks"), + s = r.Symbol, + l = c ? s : s && s.withoutSetter || a; + t.exports = function (t) { + return i(f, t) || (u && i(s, t) ? f[t] = s[t] : f[t] = l("Symbol." + t)), f[t]; + }; + }, function (t, n, e) { + var r = e(6); + t.exports = !!Object.getOwnPropertySymbols && !r(function () { + return !String(Symbol()); + }); + }, function (t, n, e) { + var r = e(50); + t.exports = r && !Symbol.sham && "symbol" == typeof Symbol.iterator; + }, function (t, n, e) { + var r = e(6), + o = e(49), + i = e(53), + a = o("species"); + t.exports = function (t) { + return i >= 51 || !r(function () { + var n = []; + return (n.constructor = {})[a] = function () { + return { + foo: 1 + }; + }, 1 !== n[t](Boolean).foo; + }); + }; + }, function (t, n, e) { + var r, + o, + i = e(3), + a = e(54), + u = i.process, + c = u && u.versions, + f = c && c.v8; + f ? o = (r = f.split("."))[0] + r[1] : a && (!(r = a.match(/Edge\/(\d+)/)) || r[1] >= 74) && (r = a.match(/Chrome\/(\d+)/)) && (o = r[1]), t.exports = o && +o; + }, function (t, n, e) { + var r = e(34); + t.exports = r("navigator", "userAgent") || ""; + }, function (t, n, e) { + var r = e(2), + o = e(56), + i = e(57); + r({ + target: "Array", + proto: !0 + }, { + copyWithin: o + }), i("copyWithin"); + }, function (t, n, e) { + var r = e(46), + o = e(41), + i = e(39), + a = Math.min; + t.exports = [].copyWithin || function (t, n) { + var e = r(this), + u = i(e.length), + c = o(t, u), + f = o(n, u), + s = arguments.length > 2 ? arguments[2] : void 0, + l = a((void 0 === s ? u : o(s, u)) - f, u - c), + p = 1; + for (f < c && c < f + l && (p = -1, f += l - 1, c += l - 1); l-- > 0;) f in e ? e[c] = e[f] : delete e[c], c += p, f += p; + return e; + }; + }, function (t, n, e) { + var r = e(49), + o = e(58), + i = e(19), + a = r("unscopables"), + u = Array.prototype; + null == u[a] && i.f(u, a, { + configurable: !0, + value: o(null) + }), t.exports = function (t) { + u[a][t] = !0; + }; + }, function (t, n, e) { + var r, + o = e(20), + i = e(59), + a = e(42), + u = e(31), + c = e(61), + f = e(17), + s = e(27), + l = s("IE_PROTO"), + p = function p() {}, + h = function h(t) { + return "<script>" + t + "<\/script>"; + }, + _v = function v() { + try { + r = document.domain && new ActiveXObject("htmlfile"); + } catch (t) {} + var t, n; + _v = r ? function (t) { + t.write(h("")), t.close(); + var n = t.parentWindow.Object; + return t = null, n; + }(r) : ((n = f("iframe")).style.display = "none", c.appendChild(n), n.src = String("javascript:"), (t = n.contentWindow.document).open(), t.write(h("document.F=Object")), t.close(), t.F); + for (var e = a.length; e--;) delete _v.prototype[a[e]]; + return _v(); + }; + u[l] = !0, t.exports = Object.create || function (t, n) { + var e; + return null !== t ? (p.prototype = o(t), e = new p(), p.prototype = null, e[l] = t) : e = _v(), void 0 === n ? e : i(e, n); + }; + }, function (t, n, e) { + var r = e(5), + o = e(19), + i = e(20), + a = e(60); + t.exports = r ? Object.defineProperties : function (t, n) { + i(t); + for (var e, r = a(n), u = r.length, c = 0; u > c;) o.f(t, e = r[c++], n[e]); + return t; + }; + }, function (t, n, e) { + var r = e(37), + o = e(42); + t.exports = Object.keys || function (t) { + return r(t, o); + }; + }, function (t, n, e) { + var r = e(34); + t.exports = r("document", "documentElement"); + }, function (t, n, e) { + var r = e(2), + o = e(63).every, + i = e(66), + a = e(67), + u = i("every"), + c = a("every"); + r({ + target: "Array", + proto: !0, + forced: !u || !c + }, { + every: function every(t) { + return o(this, t, arguments.length > 1 ? arguments[1] : void 0); + } + }); + }, function (t, n, e) { + var r = e(64), + o = e(10), + i = e(46), + a = e(39), + u = e(48), + c = [].push, + f = function f(t) { + var n = 1 == t, + e = 2 == t, + f = 3 == t, + s = 4 == t, + l = 6 == t, + p = 5 == t || l; + return function (h, v, g, d) { + for (var y, x, m = i(h), b = o(m), S = r(v, g, 3), E = a(b.length), w = 0, O = d || u, R = n ? O(h, E) : e ? O(h, 0) : void 0; E > w; w++) if ((p || w in b) && (x = S(y = b[w], w, m), t)) if (n) R[w] = x;else if (x) switch (t) { + case 3: + return !0; + case 5: + return y; + case 6: + return w; + case 2: + c.call(R, y); + } else if (s) return !1; + return l ? -1 : f || s ? s : R; + }; + }; + t.exports = { + forEach: f(0), + map: f(1), + filter: f(2), + some: f(3), + every: f(4), + find: f(5), + findIndex: f(6) + }; + }, function (t, n, e) { + var r = e(65); + t.exports = function (t, n, e) { + if (r(t), void 0 === n) return t; + switch (e) { + case 0: + return function () { + return t.call(n); + }; + case 1: + return function (e) { + return t.call(n, e); + }; + case 2: + return function (e, r) { + return t.call(n, e, r); + }; + case 3: + return function (e, r, o) { + return t.call(n, e, r, o); + }; + } + return function () { + return t.apply(n, arguments); + }; + }; + }, function (t, n) { + t.exports = function (t) { + if ("function" != typeof t) throw TypeError(String(t) + " is not a function"); + return t; + }; + }, function (t, n, e) { + var r = e(6); + t.exports = function (t, n) { + var e = [][t]; + return !!e && r(function () { + e.call(null, n || function () { + throw 1; + }, 1); + }); + }; + }, function (t, n, e) { + var r = e(5), + o = e(6), + i = e(15), + a = Object.defineProperty, + u = {}, + c = function c(t) { + throw t; + }; + t.exports = function (t, n) { + if (i(u, t)) return u[t]; + n || (n = {}); + var e = [][t], + f = !!i(n, "ACCESSORS") && n.ACCESSORS, + s = i(n, 0) ? n[0] : c, + l = i(n, 1) ? n[1] : void 0; + return u[t] = !!e && !o(function () { + if (f && !r) return !0; + var t = { + length: -1 + }; + f ? a(t, 1, { + enumerable: !0, + get: c + }) : t[1] = 1, e.call(t, s, l); + }); + }; + }, function (t, n, e) { + var r = e(2), + o = e(69), + i = e(57); + r({ + target: "Array", + proto: !0 + }, { + fill: o + }), i("fill"); + }, function (t, n, e) { + var r = e(46), + o = e(41), + i = e(39); + t.exports = function (t) { + for (var n = r(this), e = i(n.length), a = arguments.length, u = o(a > 1 ? arguments[1] : void 0, e), c = a > 2 ? arguments[2] : void 0, f = void 0 === c ? e : o(c, e); f > u;) n[u++] = t; + return n; + }; + }, function (t, n, e) { + var r = e(2), + o = e(63).filter, + i = e(52), + a = e(67), + u = i("filter"), + c = a("filter"); + r({ + target: "Array", + proto: !0, + forced: !u || !c + }, { + filter: function filter(t) { + return o(this, t, arguments.length > 1 ? arguments[1] : void 0); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(63).find, + i = e(57), + a = e(67), + u = !0, + c = a("find"); + "find" in [] && Array(1).find(function () { + u = !1; + }), r({ + target: "Array", + proto: !0, + forced: u || !c + }, { + find: function find(t) { + return o(this, t, arguments.length > 1 ? arguments[1] : void 0); + } + }), i("find"); + }, function (t, n, e) { + var r = e(2), + o = e(63).findIndex, + i = e(57), + a = e(67), + u = !0, + c = a("findIndex"); + "findIndex" in [] && Array(1).findIndex(function () { + u = !1; + }), r({ + target: "Array", + proto: !0, + forced: u || !c + }, { + findIndex: function findIndex(t) { + return o(this, t, arguments.length > 1 ? arguments[1] : void 0); + } + }), i("findIndex"); + }, function (t, n, e) { + var r = e(2), + o = e(74), + i = e(46), + a = e(39), + u = e(40), + c = e(48); + r({ + target: "Array", + proto: !0 + }, { + flat: function flat() { + var t = arguments.length ? arguments[0] : void 0, + n = i(this), + e = a(n.length), + r = c(n, 0); + return r.length = o(r, n, n, e, 0, void 0 === t ? 1 : u(t)), r; + } + }); + }, function (t, n, e) { + var r = e(45), + o = e(39), + i = e(64), + _a = function a(t, n, e, u, c, f, s, l) { + for (var p, h = c, v = 0, g = !!s && i(s, l, 3); v < u;) { + if (v in e) { + if (p = g ? g(e[v], v, n) : e[v], f > 0 && r(p)) h = _a(t, n, p, o(p.length), h, f - 1) - 1;else { + if (h >= 9007199254740991) throw TypeError("Exceed the acceptable array length"); + t[h] = p; + } + h++; + } + v++; + } + return h; + }; + t.exports = _a; + }, function (t, n, e) { + var r = e(2), + o = e(74), + i = e(46), + a = e(39), + u = e(65), + c = e(48); + r({ + target: "Array", + proto: !0 + }, { + flatMap: function flatMap(t) { + var n, + e = i(this), + r = a(e.length); + return u(t), (n = c(e, 0)).length = o(n, e, e, r, 0, 1, t, arguments.length > 1 ? arguments[1] : void 0), n; + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(77); + r({ + target: "Array", + proto: !0, + forced: [].forEach != o + }, { + forEach: o + }); + }, function (t, n, e) { + var r = e(63).forEach, + o = e(66), + i = e(67), + a = o("forEach"), + u = i("forEach"); + t.exports = a && u ? [].forEach : function (t) { + return r(this, t, arguments.length > 1 ? arguments[1] : void 0); + }; + }, function (t, n, e) { + var r = e(2), + o = e(79); + r({ + target: "Array", + stat: !0, + forced: !e(86)(function (t) { + Array.from(t); + }) + }, { + from: o + }); + }, function (t, n, e) { + var r = e(64), + o = e(46), + i = e(80), + a = e(81), + u = e(39), + c = e(47), + f = e(83); + t.exports = function (t) { + var n, + e, + s, + l, + p, + h, + v = o(t), + g = "function" == typeof this ? this : Array, + d = arguments.length, + y = d > 1 ? arguments[1] : void 0, + x = void 0 !== y, + m = f(v), + b = 0; + if (x && (y = r(y, d > 2 ? arguments[2] : void 0, 2)), null == m || g == Array && a(m)) for (e = new g(n = u(v.length)); n > b; b++) h = x ? y(v[b], b) : v[b], c(e, b, h);else for (p = (l = m.call(v)).next, e = new g(); !(s = p.call(l)).done; b++) h = x ? i(l, y, [s.value, b], !0) : s.value, c(e, b, h); + return e.length = b, e; + }; + }, function (t, n, e) { + var r = e(20); + t.exports = function (t, n, e, o) { + try { + return o ? n(r(e)[0], e[1]) : n(e); + } catch (n) { + var i = t.return; + throw void 0 !== i && r(i.call(t)), n; + } + }; + }, function (t, n, e) { + var r = e(49), + o = e(82), + i = r("iterator"), + a = Array.prototype; + t.exports = function (t) { + return void 0 !== t && (o.Array === t || a[i] === t); + }; + }, function (t, n) { + t.exports = {}; + }, function (t, n, e) { + var r = e(84), + o = e(82), + i = e(49)("iterator"); + t.exports = function (t) { + if (null != t) return t[i] || t["@@iterator"] || o[r(t)]; + }; + }, function (t, n, e) { + var r = e(85), + o = e(11), + i = e(49)("toStringTag"), + a = "Arguments" == o(function () { + return arguments; + }()); + t.exports = r ? o : function (t) { + var n, e, r; + return void 0 === t ? "Undefined" : null === t ? "Null" : "string" == typeof (e = function (t, n) { + try { + return t[n]; + } catch (t) {} + }(n = Object(t), i)) ? e : a ? o(n) : "Object" == (r = o(n)) && "function" == typeof n.callee ? "Arguments" : r; + }; + }, function (t, n, e) { + var r = {}; + r[e(49)("toStringTag")] = "z", t.exports = "[object z]" === String(r); + }, function (t, n, e) { + var r = e(49)("iterator"), + o = !1; + try { + var i = 0, + a = { + next: function next() { + return { + done: !!i++ + }; + }, + return: function _return() { + o = !0; + } + }; + a[r] = function () { + return this; + }, Array.from(a, function () { + throw 2; + }); + } catch (t) {} + t.exports = function (t, n) { + if (!n && !o) return !1; + var e = !1; + try { + var i = {}; + i[r] = function () { + return { + next: function next() { + return { + done: e = !0 + }; + } + }; + }, t(i); + } catch (t) {} + return e; + }; + }, function (t, n, e) { + var r = e(2), + o = e(38).includes, + i = e(57); + r({ + target: "Array", + proto: !0, + forced: !e(67)("indexOf", { + ACCESSORS: !0, + 1: 0 + }) + }, { + includes: function includes(t) { + return o(this, t, arguments.length > 1 ? arguments[1] : void 0); + } + }), i("includes"); + }, function (t, n, e) { + var r = e(2), + o = e(38).indexOf, + i = e(66), + a = e(67), + u = [].indexOf, + c = !!u && 1 / [1].indexOf(1, -0) < 0, + f = i("indexOf"), + s = a("indexOf", { + ACCESSORS: !0, + 1: 0 + }); + r({ + target: "Array", + proto: !0, + forced: c || !f || !s + }, { + indexOf: function indexOf(t) { + return c ? u.apply(this, arguments) || 0 : o(this, t, arguments.length > 1 ? arguments[1] : void 0); + } + }); + }, function (t, n, e) { + var r = e(9), + o = e(57), + i = e(82), + a = e(25), + u = e(90), + c = a.set, + f = a.getterFor("Array Iterator"); + t.exports = u(Array, "Array", function (t, n) { + c(this, { + type: "Array Iterator", + target: r(t), + index: 0, + kind: n + }); + }, function () { + var t = f(this), + n = t.target, + e = t.kind, + r = t.index++; + return !n || r >= n.length ? (t.target = void 0, { + value: void 0, + done: !0 + }) : "keys" == e ? { + value: r, + done: !1 + } : "values" == e ? { + value: n[r], + done: !1 + } : { + value: [r, n[r]], + done: !1 + }; + }, "values"), i.Arguments = i.Array, o("keys"), o("values"), o("entries"); + }, function (t, n, e) { + var r = e(2), + o = e(91), + i = e(93), + a = e(96), + u = e(95), + c = e(18), + f = e(21), + s = e(49), + l = e(29), + p = e(82), + h = e(92), + v = h.IteratorPrototype, + g = h.BUGGY_SAFARI_ITERATORS, + d = s("iterator"), + y = function y() { + return this; + }; + t.exports = function (t, n, e, s, h, x, m) { + o(e, n, s); + var b, + S, + E, + w = function w(t) { + if (t === h && I) return I; + if (!g && t in A) return A[t]; + switch (t) { + case "keys": + case "values": + case "entries": + return function () { + return new e(this, t); + }; + } + return function () { + return new e(this); + }; + }, + O = n + " Iterator", + R = !1, + A = t.prototype, + j = A[d] || A["@@iterator"] || h && A[h], + I = !g && j || w(h), + k = "Array" == n && A.entries || j; + if (k && (b = i(k.call(new t())), v !== Object.prototype && b.next && (l || i(b) === v || (a ? a(b, v) : "function" != typeof b[d] && c(b, d, y)), u(b, O, !0, !0), l && (p[O] = y))), "values" == h && j && "values" !== j.name && (R = !0, I = function I() { + return j.call(this); + }), l && !m || A[d] === I || c(A, d, I), p[n] = I, h) if (S = { + values: w("values"), + keys: x ? I : w("keys"), + entries: w("entries") + }, m) for (E in S) (g || R || !(E in A)) && f(A, E, S[E]);else r({ + target: n, + proto: !0, + forced: g || R + }, S); + return S; + }; + }, function (t, n, e) { + var r = e(92).IteratorPrototype, + o = e(58), + i = e(8), + a = e(95), + u = e(82), + c = function c() { + return this; + }; + t.exports = function (t, n, e) { + var f = n + " Iterator"; + return t.prototype = o(r, { + next: i(1, e) + }), a(t, f, !1, !0), u[f] = c, t; + }; + }, function (t, n, e) { + var r, + o, + i, + a = e(93), + u = e(18), + c = e(15), + f = e(49), + s = e(29), + l = f("iterator"), + p = !1; + [].keys && ("next" in (i = [].keys()) ? (o = a(a(i))) !== Object.prototype && (r = o) : p = !0), null == r && (r = {}), s || c(r, l) || u(r, l, function () { + return this; + }), t.exports = { + IteratorPrototype: r, + BUGGY_SAFARI_ITERATORS: p + }; + }, function (t, n, e) { + var r = e(15), + o = e(46), + i = e(27), + a = e(94), + u = i("IE_PROTO"), + c = Object.prototype; + t.exports = a ? Object.getPrototypeOf : function (t) { + return t = o(t), r(t, u) ? t[u] : "function" == typeof t.constructor && t instanceof t.constructor ? t.constructor.prototype : t instanceof Object ? c : null; + }; + }, function (t, n, e) { + var r = e(6); + t.exports = !r(function () { + function t() {} + return t.prototype.constructor = null, Object.getPrototypeOf(new t()) !== t.prototype; + }); + }, function (t, n, e) { + var r = e(19).f, + o = e(15), + i = e(49)("toStringTag"); + t.exports = function (t, n, e) { + t && !o(t = e ? t : t.prototype, i) && r(t, i, { + configurable: !0, + value: n + }); + }; + }, function (t, n, e) { + var r = e(20), + o = e(97); + t.exports = Object.setPrototypeOf || ("__proto__" in {} ? function () { + var t, + n = !1, + e = {}; + try { + (t = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__").set).call(e, []), n = e instanceof Array; + } catch (t) {} + return function (e, i) { + return r(e), o(i), n ? t.call(e, i) : e.__proto__ = i, e; + }; + }() : void 0); + }, function (t, n, e) { + var r = e(14); + t.exports = function (t) { + if (!r(t) && null !== t) throw TypeError("Can't set " + String(t) + " as a prototype"); + return t; + }; + }, function (t, n, e) { + var r = e(2), + o = e(10), + i = e(9), + a = e(66), + u = [].join, + c = o != Object, + f = a("join", ","); + r({ + target: "Array", + proto: !0, + forced: c || !f + }, { + join: function join(t) { + return u.call(i(this), void 0 === t ? "," : t); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(100); + r({ + target: "Array", + proto: !0, + forced: o !== [].lastIndexOf + }, { + lastIndexOf: o + }); + }, function (t, n, e) { + var r = e(9), + o = e(40), + i = e(39), + a = e(66), + u = e(67), + c = Math.min, + f = [].lastIndexOf, + s = !!f && 1 / [1].lastIndexOf(1, -0) < 0, + l = a("lastIndexOf"), + p = u("indexOf", { + ACCESSORS: !0, + 1: 0 + }), + h = s || !l || !p; + t.exports = h ? function (t) { + if (s) return f.apply(this, arguments) || 0; + var n = r(this), + e = i(n.length), + a = e - 1; + for (arguments.length > 1 && (a = c(a, o(arguments[1]))), a < 0 && (a = e + a); a >= 0; a--) if (a in n && n[a] === t) return a || 0; + return -1; + } : f; + }, function (t, n, e) { + var r = e(2), + o = e(63).map, + i = e(52), + a = e(67), + u = i("map"), + c = a("map"); + r({ + target: "Array", + proto: !0, + forced: !u || !c + }, { + map: function map(t) { + return o(this, t, arguments.length > 1 ? arguments[1] : void 0); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(6), + i = e(47); + r({ + target: "Array", + stat: !0, + forced: o(function () { + function t() {} + return !(Array.of.call(t) instanceof t); + }) + }, { + of: function of() { + for (var t = 0, n = arguments.length, e = new ("function" == typeof this ? this : Array)(n); n > t;) i(e, t, arguments[t++]); + return e.length = n, e; + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(104).left, + i = e(66), + a = e(67), + u = i("reduce"), + c = a("reduce", { + 1: 0 + }); + r({ + target: "Array", + proto: !0, + forced: !u || !c + }, { + reduce: function reduce(t) { + return o(this, t, arguments.length, arguments.length > 1 ? arguments[1] : void 0); + } + }); + }, function (t, n, e) { + var r = e(65), + o = e(46), + i = e(10), + a = e(39), + u = function u(t) { + return function (n, e, u, c) { + r(e); + var f = o(n), + s = i(f), + l = a(f.length), + p = t ? l - 1 : 0, + h = t ? -1 : 1; + if (u < 2) for (;;) { + if (p in s) { + c = s[p], p += h; + break; + } + if (p += h, t ? p < 0 : l <= p) throw TypeError("Reduce of empty array with no initial value"); + } + for (; t ? p >= 0 : l > p; p += h) p in s && (c = e(c, s[p], p, f)); + return c; + }; + }; + t.exports = { + left: u(!1), + right: u(!0) + }; + }, function (t, n, e) { + var r = e(2), + o = e(104).right, + i = e(66), + a = e(67), + u = i("reduceRight"), + c = a("reduce", { + 1: 0 + }); + r({ + target: "Array", + proto: !0, + forced: !u || !c + }, { + reduceRight: function reduceRight(t) { + return o(this, t, arguments.length, arguments.length > 1 ? arguments[1] : void 0); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(14), + i = e(45), + a = e(41), + u = e(39), + c = e(9), + f = e(47), + s = e(49), + l = e(52), + p = e(67), + h = l("slice"), + v = p("slice", { + ACCESSORS: !0, + 0: 0, + 1: 2 + }), + g = s("species"), + d = [].slice, + y = Math.max; + r({ + target: "Array", + proto: !0, + forced: !h || !v + }, { + slice: function slice(t, n) { + var e, + r, + s, + l = c(this), + p = u(l.length), + h = a(t, p), + v = a(void 0 === n ? p : n, p); + if (i(l) && ("function" != typeof (e = l.constructor) || e !== Array && !i(e.prototype) ? o(e) && null === (e = e[g]) && (e = void 0) : e = void 0, e === Array || void 0 === e)) return d.call(l, h, v); + for (r = new (void 0 === e ? Array : e)(y(v - h, 0)), s = 0; h < v; h++, s++) h in l && f(r, s, l[h]); + return r.length = s, r; + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(63).some, + i = e(66), + a = e(67), + u = i("some"), + c = a("some"); + r({ + target: "Array", + proto: !0, + forced: !u || !c + }, { + some: function some(t) { + return o(this, t, arguments.length > 1 ? arguments[1] : void 0); + } + }); + }, function (t, n, e) { + e(109)("Array"); + }, function (t, n, e) { + var r = e(34), + o = e(19), + i = e(49), + a = e(5), + u = i("species"); + t.exports = function (t) { + var n = r(t), + e = o.f; + a && n && !n[u] && e(n, u, { + configurable: !0, + get: function get() { + return this; + } + }); + }; + }, function (t, n, e) { + var r = e(2), + o = e(41), + i = e(40), + a = e(39), + u = e(46), + c = e(48), + f = e(47), + s = e(52), + l = e(67), + p = s("splice"), + h = l("splice", { + ACCESSORS: !0, + 0: 0, + 1: 2 + }), + v = Math.max, + g = Math.min; + r({ + target: "Array", + proto: !0, + forced: !p || !h + }, { + splice: function splice(t, n) { + var e, + r, + s, + l, + p, + h, + d = u(this), + y = a(d.length), + x = o(t, y), + m = arguments.length; + if (0 === m ? e = r = 0 : 1 === m ? (e = 0, r = y - x) : (e = m - 2, r = g(v(i(n), 0), y - x)), y + e - r > 9007199254740991) throw TypeError("Maximum allowed length exceeded"); + for (s = c(d, r), l = 0; l < r; l++) (p = x + l) in d && f(s, l, d[p]); + if (s.length = r, e < r) { + for (l = x; l < y - r; l++) h = l + e, (p = l + r) in d ? d[h] = d[p] : delete d[h]; + for (l = y; l > y - r + e; l--) delete d[l - 1]; + } else if (e > r) for (l = y - r; l > x; l--) h = l + e - 1, (p = l + r - 1) in d ? d[h] = d[p] : delete d[h]; + for (l = 0; l < e; l++) d[l + x] = arguments[l + 2]; + return d.length = y - r + e, s; + } + }); + }, function (t, n, e) { + e(57)("flat"); + }, function (t, n, e) { + e(57)("flatMap"); + }, function (t, n, e) { + var r = e(14), + o = e(19), + i = e(93), + a = e(49)("hasInstance"), + u = Function.prototype; + a in u || o.f(u, a, { + value: function value(t) { + if ("function" != typeof this || !r(t)) return !1; + if (!r(this.prototype)) return t instanceof this; + for (; t = i(t);) if (this.prototype === t) return !0; + return !1; + } + }); + }, function (t, n, e) { + var r = e(5), + o = e(19).f, + i = Function.prototype, + a = i.toString, + u = /^\s*function ([^ (]*)/; + r && !("name" in i) && o(i, "name", { + configurable: !0, + get: function get() { + try { + return a.call(this).match(u)[1]; + } catch (t) { + return ""; + } + } + }); + }, function (t, n, e) { + e(2)({ + global: !0 + }, { + globalThis: e(3) + }); + }, function (t, n, e) { + var r = e(2), + o = e(34), + i = e(6), + a = o("JSON", "stringify"), + u = /[\uD800-\uDFFF]/g, + c = /^[\uD800-\uDBFF]$/, + f = /^[\uDC00-\uDFFF]$/, + s = function s(t, n, e) { + var r = e.charAt(n - 1), + o = e.charAt(n + 1); + return c.test(t) && !f.test(o) || f.test(t) && !c.test(r) ? "\\u" + t.charCodeAt(0).toString(16) : t; + }, + l = i(function () { + return "\"\\udf06\\ud834\"" !== a("\uDF06\uD834") || "\"\\udead\"" !== a("\uDEAD"); + }); + a && r({ + target: "JSON", + stat: !0, + forced: l + }, { + stringify: function stringify(t, n, e) { + var r = a.apply(null, arguments); + return "string" == typeof r ? r.replace(u, s) : r; + } + }); + }, function (t, n, e) { + var r = e(3); + e(95)(r.JSON, "JSON", !0); + }, function (t, n, e) { + var r = e(119), + o = e(125); + t.exports = r("Map", function (t) { + return function () { + return t(this, arguments.length ? arguments[0] : void 0); + }; + }, o); + }, function (t, n, e) { + var r = e(2), + o = e(3), + i = e(44), + a = e(21), + u = e(120), + c = e(122), + f = e(123), + s = e(14), + l = e(6), + p = e(86), + h = e(95), + v = e(124); + t.exports = function (t, n, e) { + var g = -1 !== t.indexOf("Map"), + d = -1 !== t.indexOf("Weak"), + y = g ? "set" : "add", + x = o[t], + m = x && x.prototype, + b = x, + S = {}, + E = function E(t) { + var n = m[t]; + a(m, t, "add" == t ? function (t) { + return n.call(this, 0 === t ? 0 : t), this; + } : "delete" == t ? function (t) { + return !(d && !s(t)) && n.call(this, 0 === t ? 0 : t); + } : "get" == t ? function (t) { + return d && !s(t) ? void 0 : n.call(this, 0 === t ? 0 : t); + } : "has" == t ? function (t) { + return !(d && !s(t)) && n.call(this, 0 === t ? 0 : t); + } : function (t, e) { + return n.call(this, 0 === t ? 0 : t, e), this; + }); + }; + if (i(t, "function" != typeof x || !(d || m.forEach && !l(function () { + new x().entries().next(); + })))) b = e.getConstructor(n, t, g, y), u.REQUIRED = !0;else if (i(t, !0)) { + var w = new b(), + O = w[y](d ? {} : -0, 1) != w, + R = l(function () { + w.has(1); + }), + A = p(function (t) { + new x(t); + }), + j = !d && l(function () { + for (var t = new x(), n = 5; n--;) t[y](n, n); + return !t.has(-0); + }); + A || ((b = n(function (n, e) { + f(n, b, t); + var r = v(new x(), n, b); + return null != e && c(e, r[y], r, g), r; + })).prototype = m, m.constructor = b), (R || j) && (E("delete"), E("has"), g && E("get")), (j || O) && E(y), d && m.clear && delete m.clear; + } + return S[t] = b, r({ + global: !0, + forced: b != x + }, S), h(b, t), d || e.setStrong(b, t, g), b; + }; + }, function (t, n, e) { + var r = e(31), + o = e(14), + i = e(15), + a = e(19).f, + u = e(30), + c = e(121), + f = u("meta"), + s = 0, + l = Object.isExtensible || function () { + return !0; + }, + p = function p(t) { + a(t, f, { + value: { + objectID: "O" + ++s, + weakData: {} + } + }); + }, + h = t.exports = { + REQUIRED: !1, + fastKey: function fastKey(t, n) { + if (!o(t)) return "symbol" == typeof t ? t : ("string" == typeof t ? "S" : "P") + t; + if (!i(t, f)) { + if (!l(t)) return "F"; + if (!n) return "E"; + p(t); + } + return t[f].objectID; + }, + getWeakData: function getWeakData(t, n) { + if (!i(t, f)) { + if (!l(t)) return !0; + if (!n) return !1; + p(t); + } + return t[f].weakData; + }, + onFreeze: function onFreeze(t) { + return c && h.REQUIRED && l(t) && !i(t, f) && p(t), t; + } + }; + r[f] = !0; + }, function (t, n, e) { + var r = e(6); + t.exports = !r(function () { + return Object.isExtensible(Object.preventExtensions({})); + }); + }, function (t, n, e) { + var r = e(20), + o = e(81), + i = e(39), + a = e(64), + u = e(83), + c = e(80), + f = function f(t, n) { + this.stopped = t, this.result = n; + }; + (t.exports = function (t, n, e, s, l) { + var p, + h, + v, + g, + d, + y, + x, + m = a(n, e, s ? 2 : 1); + if (l) p = t;else { + if ("function" != typeof (h = u(t))) throw TypeError("Target is not iterable"); + if (o(h)) { + for (v = 0, g = i(t.length); g > v; v++) if ((d = s ? m(r(x = t[v])[0], x[1]) : m(t[v])) && d instanceof f) return d; + return new f(!1); + } + p = h.call(t); + } + for (y = p.next; !(x = y.call(p)).done;) if ("object" == typeof (d = c(p, m, x.value, s)) && d && d instanceof f) return d; + return new f(!1); + }).stop = function (t) { + return new f(!0, t); + }; + }, function (t, n) { + t.exports = function (t, n, e) { + if (!(t instanceof n)) throw TypeError("Incorrect " + (e ? e + " " : "") + "invocation"); + return t; + }; + }, function (t, n, e) { + var r = e(14), + o = e(96); + t.exports = function (t, n, e) { + var i, a; + return o && "function" == typeof (i = n.constructor) && i !== e && r(a = i.prototype) && a !== e.prototype && o(t, a), t; + }; + }, function (t, n, e) { + var r = e(19).f, + o = e(58), + i = e(126), + a = e(64), + u = e(123), + c = e(122), + f = e(90), + s = e(109), + l = e(5), + p = e(120).fastKey, + h = e(25), + v = h.set, + g = h.getterFor; + t.exports = { + getConstructor: function getConstructor(t, n, e, f) { + var s = t(function (t, r) { + u(t, s, n), v(t, { + type: n, + index: o(null), + first: void 0, + last: void 0, + size: 0 + }), l || (t.size = 0), null != r && c(r, t[f], t, e); + }), + h = g(n), + d = function d(t, n, e) { + var r, + o, + i = h(t), + a = y(t, n); + return a ? a.value = e : (i.last = a = { + index: o = p(n, !0), + key: n, + value: e, + previous: r = i.last, + next: void 0, + removed: !1 + }, i.first || (i.first = a), r && (r.next = a), l ? i.size++ : t.size++, "F" !== o && (i.index[o] = a)), t; + }, + y = function y(t, n) { + var e, + r = h(t), + o = p(n); + if ("F" !== o) return r.index[o]; + for (e = r.first; e; e = e.next) if (e.key == n) return e; + }; + return i(s.prototype, { + clear: function clear() { + for (var t = h(this), n = t.index, e = t.first; e;) e.removed = !0, e.previous && (e.previous = e.previous.next = void 0), delete n[e.index], e = e.next; + t.first = t.last = void 0, l ? t.size = 0 : this.size = 0; + }, + delete: function _delete(t) { + var n = h(this), + e = y(this, t); + if (e) { + var r = e.next, + o = e.previous; + delete n.index[e.index], e.removed = !0, o && (o.next = r), r && (r.previous = o), n.first == e && (n.first = r), n.last == e && (n.last = o), l ? n.size-- : this.size--; + } + return !!e; + }, + forEach: function forEach(t) { + for (var n, e = h(this), r = a(t, arguments.length > 1 ? arguments[1] : void 0, 3); n = n ? n.next : e.first;) for (r(n.value, n.key, this); n && n.removed;) n = n.previous; + }, + has: function has(t) { + return !!y(this, t); + } + }), i(s.prototype, e ? { + get: function get(t) { + var n = y(this, t); + return n && n.value; + }, + set: function set(t, n) { + return d(this, 0 === t ? 0 : t, n); + } + } : { + add: function add(t) { + return d(this, t = 0 === t ? 0 : t, t); + } + }), l && r(s.prototype, "size", { + get: function get() { + return h(this).size; + } + }), s; + }, + setStrong: function setStrong(t, n, e) { + var r = n + " Iterator", + o = g(n), + i = g(r); + f(t, n, function (t, n) { + v(this, { + type: r, + target: t, + state: o(t), + kind: n, + last: void 0 + }); + }, function () { + for (var t = i(this), n = t.kind, e = t.last; e && e.removed;) e = e.previous; + return t.target && (t.last = e = e ? e.next : t.state.first) ? "keys" == n ? { + value: e.key, + done: !1 + } : "values" == n ? { + value: e.value, + done: !1 + } : { + value: [e.key, e.value], + done: !1 + } : (t.target = void 0, { + value: void 0, + done: !0 + }); + }, e ? "entries" : "values", !e, !0), s(n); + } + }; + }, function (t, n, e) { + var r = e(21); + t.exports = function (t, n, e) { + for (var o in n) r(t, o, n[o], e); + return t; + }; + }, function (t, n, e) { + var r = e(5), + o = e(3), + i = e(44), + a = e(21), + u = e(15), + c = e(11), + f = e(124), + s = e(13), + l = e(6), + p = e(58), + h = e(36).f, + v = e(4).f, + g = e(19).f, + d = e(128).trim, + y = o.Number, + x = y.prototype, + m = "Number" == c(p(x)), + b = function b(t) { + var n, + e, + r, + o, + i, + a, + u, + c, + f = s(t, !1); + if ("string" == typeof f && f.length > 2) if (43 === (n = (f = d(f)).charCodeAt(0)) || 45 === n) { + if (88 === (e = f.charCodeAt(2)) || 120 === e) return NaN; + } else if (48 === n) { + switch (f.charCodeAt(1)) { + case 66: + case 98: + r = 2, o = 49; + break; + case 79: + case 111: + r = 8, o = 55; + break; + default: + return +f; + } + for (a = (i = f.slice(2)).length, u = 0; u < a; u++) if ((c = i.charCodeAt(u)) < 48 || c > o) return NaN; + return parseInt(i, r); + } + return +f; + }; + if (i("Number", !y(" 0o1") || !y("0b1") || y("+0x1"))) { + for (var S, _E = function E(t) { + var n = arguments.length < 1 ? 0 : t, + e = this; + return e instanceof _E && (m ? l(function () { + x.valueOf.call(e); + }) : "Number" != c(e)) ? f(new y(b(n)), e, _E) : b(n); + }, w = r ? h(y) : "MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","), O = 0; w.length > O; O++) u(y, S = w[O]) && !u(_E, S) && g(_E, S, v(y, S)); + _E.prototype = x, x.constructor = _E, a(o, "Number", _E); + } + }, function (t, n, e) { + var r = e(12), + o = "[" + e(129) + "]", + i = RegExp("^" + o + o + "*"), + a = RegExp(o + o + "*$"), + u = function u(t) { + return function (n) { + var e = String(r(n)); + return 1 & t && (e = e.replace(i, "")), 2 & t && (e = e.replace(a, "")), e; + }; + }; + t.exports = { + start: u(1), + end: u(2), + trim: u(3) + }; + }, function (t, n) { + t.exports = "\t\n\x0B\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF"; + }, function (t, n, e) { + e(2)({ + target: "Number", + stat: !0 + }, { + EPSILON: Math.pow(2, -52) + }); + }, function (t, n, e) { + e(2)({ + target: "Number", + stat: !0 + }, { + isFinite: e(132) + }); + }, function (t, n, e) { + var r = e(3).isFinite; + t.exports = Number.isFinite || function (t) { + return "number" == typeof t && r(t); + }; + }, function (t, n, e) { + e(2)({ + target: "Number", + stat: !0 + }, { + isInteger: e(134) + }); + }, function (t, n, e) { + var r = e(14), + o = Math.floor; + t.exports = function (t) { + return !r(t) && isFinite(t) && o(t) === t; + }; + }, function (t, n, e) { + e(2)({ + target: "Number", + stat: !0 + }, { + isNaN: function isNaN(t) { + return t != t; + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(134), + i = Math.abs; + r({ + target: "Number", + stat: !0 + }, { + isSafeInteger: function isSafeInteger(t) { + return o(t) && i(t) <= 9007199254740991; + } + }); + }, function (t, n, e) { + e(2)({ + target: "Number", + stat: !0 + }, { + MAX_SAFE_INTEGER: 9007199254740991 + }); + }, function (t, n, e) { + e(2)({ + target: "Number", + stat: !0 + }, { + MIN_SAFE_INTEGER: -9007199254740991 + }); + }, function (t, n, e) { + var r = e(2), + o = e(140); + r({ + target: "Number", + stat: !0, + forced: Number.parseFloat != o + }, { + parseFloat: o + }); + }, function (t, n, e) { + var r = e(3), + o = e(128).trim, + i = e(129), + a = r.parseFloat, + u = 1 / a(i + "-0") != -1 / 0; + t.exports = u ? function (t) { + var n = o(String(t)), + e = a(n); + return 0 === e && "-" == n.charAt(0) ? -0 : e; + } : a; + }, function (t, n, e) { + var r = e(2), + o = e(142); + r({ + target: "Number", + stat: !0, + forced: Number.parseInt != o + }, { + parseInt: o + }); + }, function (t, n, e) { + var r = e(3), + o = e(128).trim, + i = e(129), + a = r.parseInt, + u = /^[+-]?0[Xx]/, + c = 8 !== a(i + "08") || 22 !== a(i + "0x16"); + t.exports = c ? function (t, n) { + var e = o(String(t)); + return a(e, n >>> 0 || (u.test(e) ? 16 : 10)); + } : a; + }, function (t, n, e) { + var r = e(2), + o = e(40), + i = e(144), + a = e(145), + u = e(6), + c = 1..toFixed, + f = Math.floor, + _s = function s(t, n, e) { + return 0 === n ? e : n % 2 == 1 ? _s(t, n - 1, e * t) : _s(t * t, n / 2, e); + }; + r({ + target: "Number", + proto: !0, + forced: c && ("0.000" !== 8e-5.toFixed(3) || "1" !== .9.toFixed(0) || "1.25" !== 1.255.toFixed(2) || "1000000000000000128" !== 0xde0b6b3a7640080.toFixed(0)) || !u(function () { + c.call({}); + }) + }, { + toFixed: function toFixed(t) { + var n, + e, + r, + u, + c = i(this), + l = o(t), + p = [0, 0, 0, 0, 0, 0], + h = "", + v = "0", + g = function g(t, n) { + for (var e = -1, r = n; ++e < 6;) r += t * p[e], p[e] = r % 1e7, r = f(r / 1e7); + }, + d = function d(t) { + for (var n = 6, e = 0; --n >= 0;) e += p[n], p[n] = f(e / t), e = e % t * 1e7; + }, + y = function y() { + for (var t = 6, n = ""; --t >= 0;) if ("" !== n || 0 === t || 0 !== p[t]) { + var e = String(p[t]); + n = "" === n ? e : n + a.call("0", 7 - e.length) + e; + } + return n; + }; + if (l < 0 || l > 20) throw RangeError("Incorrect fraction digits"); + if (c != c) return "NaN"; + if (c <= -1e21 || c >= 1e21) return String(c); + if (c < 0 && (h = "-", c = -c), c > 1e-21) if (e = (n = function (t) { + for (var n = 0, e = t; e >= 4096;) n += 12, e /= 4096; + for (; e >= 2;) n += 1, e /= 2; + return n; + }(c * _s(2, 69, 1)) - 69) < 0 ? c * _s(2, -n, 1) : c / _s(2, n, 1), e *= 4503599627370496, (n = 52 - n) > 0) { + for (g(0, e), r = l; r >= 7;) g(1e7, 0), r -= 7; + for (g(_s(10, r, 1), 0), r = n - 1; r >= 23;) d(1 << 23), r -= 23; + d(1 << r), g(1, 1), d(2), v = y(); + } else g(0, e), g(1 << -n, 0), v = y() + a.call("0", l); + return v = l > 0 ? h + ((u = v.length) <= l ? "0." + a.call("0", l - u) + v : v.slice(0, u - l) + "." + v.slice(u - l)) : h + v; + } + }); + }, function (t, n, e) { + var r = e(11); + t.exports = function (t) { + if ("number" != typeof t && "Number" != r(t)) throw TypeError("Incorrect invocation"); + return +t; + }; + }, function (t, n, e) { + var r = e(40), + o = e(12); + t.exports = "".repeat || function (t) { + var n = String(o(this)), + e = "", + i = r(t); + if (i < 0 || i == 1 / 0) throw RangeError("Wrong number of repetitions"); + for (; i > 0; (i >>>= 1) && (n += n)) 1 & i && (e += n); + return e; + }; + }, function (t, n, e) { + var r = e(2), + o = e(147); + r({ + target: "Object", + stat: !0, + forced: Object.assign !== o + }, { + assign: o + }); + }, function (t, n, e) { + var r = e(5), + o = e(6), + i = e(60), + a = e(43), + u = e(7), + c = e(46), + f = e(10), + s = Object.assign, + l = Object.defineProperty; + t.exports = !s || o(function () { + if (r && 1 !== s({ + b: 1 + }, s(l({}, "a", { + enumerable: !0, + get: function get() { + l(this, "b", { + value: 3, + enumerable: !1 + }); + } + }), { + b: 2 + })).b) return !0; + var t = {}, + n = {}, + e = Symbol(); + return t[e] = 7, "abcdefghijklmnopqrst".split("").forEach(function (t) { + n[t] = t; + }), 7 != s({}, t)[e] || "abcdefghijklmnopqrst" != i(s({}, n)).join(""); + }) ? function (t, n) { + for (var e = c(t), o = arguments.length, s = 1, l = a.f, p = u.f; o > s;) for (var h, v = f(arguments[s++]), g = l ? i(v).concat(l(v)) : i(v), d = g.length, y = 0; d > y;) h = g[y++], r && !p.call(v, h) || (e[h] = v[h]); + return e; + } : s; + }, function (t, n, e) { + var r = e(2), + o = e(5), + i = e(149), + a = e(46), + u = e(65), + c = e(19); + o && r({ + target: "Object", + proto: !0, + forced: i + }, { + __defineGetter__: function __defineGetter__(t, n) { + c.f(a(this), t, { + get: u(n), + enumerable: !0, + configurable: !0 + }); + } + }); + }, function (t, n, e) { + var r = e(29), + o = e(3), + i = e(6); + t.exports = r || !i(function () { + var t = Math.random(); + __defineSetter__.call(null, t, function () {}), delete o[t]; + }); + }, function (t, n, e) { + var r = e(2), + o = e(5), + i = e(149), + a = e(46), + u = e(65), + c = e(19); + o && r({ + target: "Object", + proto: !0, + forced: i + }, { + __defineSetter__: function __defineSetter__(t, n) { + c.f(a(this), t, { + set: u(n), + enumerable: !0, + configurable: !0 + }); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(152).entries; + r({ + target: "Object", + stat: !0 + }, { + entries: function entries(t) { + return o(t); + } + }); + }, function (t, n, e) { + var r = e(5), + o = e(60), + i = e(9), + a = e(7).f, + u = function u(t) { + return function (n) { + for (var e, u = i(n), c = o(u), f = c.length, s = 0, l = []; f > s;) e = c[s++], r && !a.call(u, e) || l.push(t ? [e, u[e]] : u[e]); + return l; + }; + }; + t.exports = { + entries: u(!0), + values: u(!1) + }; + }, function (t, n, e) { + var r = e(2), + o = e(121), + i = e(6), + a = e(14), + u = e(120).onFreeze, + c = Object.freeze; + r({ + target: "Object", + stat: !0, + forced: i(function () { + c(1); + }), + sham: !o + }, { + freeze: function freeze(t) { + return c && a(t) ? c(u(t)) : t; + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(122), + i = e(47); + r({ + target: "Object", + stat: !0 + }, { + fromEntries: function fromEntries(t) { + var n = {}; + return o(t, function (t, e) { + i(n, t, e); + }, void 0, !0), n; + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(6), + i = e(9), + a = e(4).f, + u = e(5), + c = o(function () { + a(1); + }); + r({ + target: "Object", + stat: !0, + forced: !u || c, + sham: !u + }, { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(t, n) { + return a(i(t), n); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(5), + i = e(33), + a = e(9), + u = e(4), + c = e(47); + r({ + target: "Object", + stat: !0, + sham: !o + }, { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(t) { + for (var n, e, r = a(t), o = u.f, f = i(r), s = {}, l = 0; f.length > l;) void 0 !== (e = o(r, n = f[l++])) && c(s, n, e); + return s; + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(6), + i = e(158).f; + r({ + target: "Object", + stat: !0, + forced: o(function () { + return !Object.getOwnPropertyNames(1); + }) + }, { + getOwnPropertyNames: i + }); + }, function (t, n, e) { + var r = e(9), + o = e(36).f, + i = {}.toString, + a = "object" == typeof window && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; + t.exports.f = function (t) { + return a && "[object Window]" == i.call(t) ? function (t) { + try { + return o(t); + } catch (t) { + return a.slice(); + } + }(t) : o(r(t)); + }; + }, function (t, n, e) { + var r = e(2), + o = e(6), + i = e(46), + a = e(93), + u = e(94); + r({ + target: "Object", + stat: !0, + forced: o(function () { + a(1); + }), + sham: !u + }, { + getPrototypeOf: function getPrototypeOf(t) { + return a(i(t)); + } + }); + }, function (t, n, e) { + e(2)({ + target: "Object", + stat: !0 + }, { + is: e(161) + }); + }, function (t, n) { + t.exports = Object.is || function (t, n) { + return t === n ? 0 !== t || 1 / t == 1 / n : t != t && n != n; + }; + }, function (t, n, e) { + var r = e(2), + o = e(6), + i = e(14), + a = Object.isExtensible; + r({ + target: "Object", + stat: !0, + forced: o(function () { + a(1); + }) + }, { + isExtensible: function isExtensible(t) { + return !!i(t) && (!a || a(t)); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(6), + i = e(14), + a = Object.isFrozen; + r({ + target: "Object", + stat: !0, + forced: o(function () { + a(1); + }) + }, { + isFrozen: function isFrozen(t) { + return !i(t) || !!a && a(t); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(6), + i = e(14), + a = Object.isSealed; + r({ + target: "Object", + stat: !0, + forced: o(function () { + a(1); + }) + }, { + isSealed: function isSealed(t) { + return !i(t) || !!a && a(t); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(46), + i = e(60); + r({ + target: "Object", + stat: !0, + forced: e(6)(function () { + i(1); + }) + }, { + keys: function keys(t) { + return i(o(t)); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(5), + i = e(149), + a = e(46), + u = e(13), + c = e(93), + f = e(4).f; + o && r({ + target: "Object", + proto: !0, + forced: i + }, { + __lookupGetter__: function __lookupGetter__(t) { + var n, + e = a(this), + r = u(t, !0); + do { + if (n = f(e, r)) return n.get; + } while (e = c(e)); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(5), + i = e(149), + a = e(46), + u = e(13), + c = e(93), + f = e(4).f; + o && r({ + target: "Object", + proto: !0, + forced: i + }, { + __lookupSetter__: function __lookupSetter__(t) { + var n, + e = a(this), + r = u(t, !0); + do { + if (n = f(e, r)) return n.set; + } while (e = c(e)); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(14), + i = e(120).onFreeze, + a = e(121), + u = e(6), + c = Object.preventExtensions; + r({ + target: "Object", + stat: !0, + forced: u(function () { + c(1); + }), + sham: !a + }, { + preventExtensions: function preventExtensions(t) { + return c && o(t) ? c(i(t)) : t; + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(14), + i = e(120).onFreeze, + a = e(121), + u = e(6), + c = Object.seal; + r({ + target: "Object", + stat: !0, + forced: u(function () { + c(1); + }), + sham: !a + }, { + seal: function seal(t) { + return c && o(t) ? c(i(t)) : t; + } + }); + }, function (t, n, e) { + var r = e(85), + o = e(21), + i = e(171); + r || o(Object.prototype, "toString", i, { + unsafe: !0 + }); + }, function (t, n, e) { + var r = e(85), + o = e(84); + t.exports = r ? {}.toString : function () { + return "[object " + o(this) + "]"; + }; + }, function (t, n, e) { + var r = e(2), + o = e(152).values; + r({ + target: "Object", + stat: !0 + }, { + values: function values(t) { + return o(t); + } + }); + }, function (t, n, e) { + var r, + o, + i, + a, + u = e(2), + c = e(29), + f = e(3), + s = e(34), + l = e(174), + p = e(21), + h = e(126), + v = e(95), + g = e(109), + d = e(14), + y = e(65), + x = e(123), + m = e(11), + b = e(23), + S = e(122), + E = e(86), + w = e(175), + O = e(176).set, + R = e(178), + A = e(179), + j = e(181), + I = e(180), + k = e(182), + P = e(25), + L = e(44), + T = e(49), + _ = e(53), + U = T("species"), + N = "Promise", + C = P.get, + F = P.set, + M = P.getterFor(N), + _z = l, + D = f.TypeError, + q = f.document, + B = f.process, + W = s("fetch"), + $ = I.f, + G = $, + V = "process" == m(B), + X = !!(q && q.createEvent && f.dispatchEvent), + Y = L(N, function () { + if (!(b(_z) !== String(_z))) { + if (66 === _) return !0; + if (!V && "function" != typeof PromiseRejectionEvent) return !0; + } + if (c && !_z.prototype.finally) return !0; + if (_ >= 51 && /native code/.test(_z)) return !1; + var t = _z.resolve(1), + n = function n(t) { + t(function () {}, function () {}); + }; + return (t.constructor = {})[U] = n, !(t.then(function () {}) instanceof n); + }), + K = Y || !E(function (t) { + _z.all(t).catch(function () {}); + }), + J = function J(t) { + var n; + return !(!d(t) || "function" != typeof (n = t.then)) && n; + }, + H = function H(t, n, e) { + if (!n.notified) { + n.notified = !0; + var r = n.reactions; + R(function () { + for (var o = n.value, i = 1 == n.state, a = 0; r.length > a;) { + var u, + c, + f, + s = r[a++], + l = i ? s.ok : s.fail, + p = s.resolve, + h = s.reject, + v = s.domain; + try { + l ? (i || (2 === n.rejection && nt(t, n), n.rejection = 1), !0 === l ? u = o : (v && v.enter(), u = l(o), v && (v.exit(), f = !0)), u === s.promise ? h(D("Promise-chain cycle")) : (c = J(u)) ? c.call(u, p, h) : p(u)) : h(o); + } catch (t) { + v && !f && v.exit(), h(t); + } + } + n.reactions = [], n.notified = !1, e && !n.rejection && Z(t, n); + }); + } + }, + Q = function Q(t, n, e) { + var r, o; + X ? ((r = q.createEvent("Event")).promise = n, r.reason = e, r.initEvent(t, !1, !0), f.dispatchEvent(r)) : r = { + promise: n, + reason: e + }, (o = f["on" + t]) ? o(r) : "unhandledrejection" === t && j("Unhandled promise rejection", e); + }, + Z = function Z(t, n) { + O.call(f, function () { + var e, + r = n.value; + if (tt(n) && (e = k(function () { + V ? B.emit("unhandledRejection", r, t) : Q("unhandledrejection", t, r); + }), n.rejection = V || tt(n) ? 2 : 1, e.error)) throw e.value; + }); + }, + tt = function tt(t) { + return 1 !== t.rejection && !t.parent; + }, + nt = function nt(t, n) { + O.call(f, function () { + V ? B.emit("rejectionHandled", t) : Q("rejectionhandled", t, n.value); + }); + }, + et = function et(t, n, e, r) { + return function (o) { + t(n, e, o, r); + }; + }, + rt = function rt(t, n, e, r) { + n.done || (n.done = !0, r && (n = r), n.value = e, n.state = 2, H(t, n, !0)); + }, + _ot = function ot(t, n, e, r) { + if (!n.done) { + n.done = !0, r && (n = r); + try { + if (t === e) throw D("Promise can't be resolved itself"); + var o = J(e); + o ? R(function () { + var r = { + done: !1 + }; + try { + o.call(e, et(_ot, t, r, n), et(rt, t, r, n)); + } catch (e) { + rt(t, r, e, n); + } + }) : (n.value = e, n.state = 1, H(t, n, !1)); + } catch (e) { + rt(t, { + done: !1 + }, e, n); + } + } + }; + Y && (_z = function z(t) { + x(this, _z, N), y(t), r.call(this); + var n = C(this); + try { + t(et(_ot, this, n), et(rt, this, n)); + } catch (t) { + rt(this, n, t); + } + }, (r = function r(t) { + F(this, { + type: N, + done: !1, + notified: !1, + parent: !1, + reactions: [], + rejection: !1, + state: 0, + value: void 0 + }); + }).prototype = h(_z.prototype, { + then: function then(t, n) { + var e = M(this), + r = $(w(this, _z)); + return r.ok = "function" != typeof t || t, r.fail = "function" == typeof n && n, r.domain = V ? B.domain : void 0, e.parent = !0, e.reactions.push(r), 0 != e.state && H(this, e, !1), r.promise; + }, + catch: function _catch(t) { + return this.then(void 0, t); + } + }), o = function o() { + var t = new r(), + n = C(t); + this.promise = t, this.resolve = et(_ot, t, n), this.reject = et(rt, t, n); + }, I.f = $ = function $(t) { + return t === _z || t === i ? new o(t) : G(t); + }, c || "function" != typeof l || (a = l.prototype.then, p(l.prototype, "then", function (t, n) { + var e = this; + return new _z(function (t, n) { + a.call(e, t, n); + }).then(t, n); + }, { + unsafe: !0 + }), "function" == typeof W && u({ + global: !0, + enumerable: !0, + forced: !0 + }, { + fetch: function fetch(t) { + return A(_z, W.apply(f, arguments)); + } + }))), u({ + global: !0, + wrap: !0, + forced: Y + }, { + Promise: _z + }), v(_z, N, !1, !0), g(N), i = s(N), u({ + target: N, + stat: !0, + forced: Y + }, { + reject: function reject(t) { + var n = $(this); + return n.reject.call(void 0, t), n.promise; + } + }), u({ + target: N, + stat: !0, + forced: c || Y + }, { + resolve: function resolve(t) { + return A(c && this === i ? _z : this, t); + } + }), u({ + target: N, + stat: !0, + forced: K + }, { + all: function all(t) { + var n = this, + e = $(n), + r = e.resolve, + o = e.reject, + i = k(function () { + var e = y(n.resolve), + i = [], + a = 0, + u = 1; + S(t, function (t) { + var c = a++, + f = !1; + i.push(void 0), u++, e.call(n, t).then(function (t) { + f || (f = !0, i[c] = t, --u || r(i)); + }, o); + }), --u || r(i); + }); + return i.error && o(i.value), e.promise; + }, + race: function race(t) { + var n = this, + e = $(n), + r = e.reject, + o = k(function () { + var o = y(n.resolve); + S(t, function (t) { + o.call(n, t).then(e.resolve, r); + }); + }); + return o.error && r(o.value), e.promise; + } + }); + }, function (t, n, e) { + var r = e(3); + t.exports = r.Promise; + }, function (t, n, e) { + var r = e(20), + o = e(65), + i = e(49)("species"); + t.exports = function (t, n) { + var e, + a = r(t).constructor; + return void 0 === a || null == (e = r(a)[i]) ? n : o(e); + }; + }, function (t, n, e) { + var r, + o, + i, + a = e(3), + u = e(6), + c = e(11), + f = e(64), + s = e(61), + l = e(17), + p = e(177), + h = a.location, + v = a.setImmediate, + g = a.clearImmediate, + d = a.process, + y = a.MessageChannel, + x = a.Dispatch, + m = 0, + b = {}, + S = function S(t) { + if (b.hasOwnProperty(t)) { + var n = b[t]; + delete b[t], n(); + } + }, + E = function E(t) { + return function () { + S(t); + }; + }, + w = function w(t) { + S(t.data); + }, + O = function O(t) { + a.postMessage(t + "", h.protocol + "//" + h.host); + }; + v && g || (v = function v(t) { + for (var n = [], e = 1; arguments.length > e;) n.push(arguments[e++]); + return b[++m] = function () { + ("function" == typeof t ? t : Function(t)).apply(void 0, n); + }, r(m), m; + }, g = function g(t) { + delete b[t]; + }, "process" == c(d) ? r = function r(t) { + d.nextTick(E(t)); + } : x && x.now ? r = function r(t) { + x.now(E(t)); + } : y && !p ? (i = (o = new y()).port2, o.port1.onmessage = w, r = f(i.postMessage, i, 1)) : !a.addEventListener || "function" != typeof postMessage || a.importScripts || u(O) || "file:" === h.protocol ? r = "onreadystatechange" in l("script") ? function (t) { + s.appendChild(l("script")).onreadystatechange = function () { + s.removeChild(this), S(t); + }; + } : function (t) { + setTimeout(E(t), 0); + } : (r = O, a.addEventListener("message", w, !1))), t.exports = { + set: v, + clear: g + }; + }, function (t, n, e) { + var r = e(54); + t.exports = /(iphone|ipod|ipad).*applewebkit/i.test(r); + }, function (t, n, e) { + var r, + o, + i, + a, + u, + c, + f, + s, + l = e(3), + p = e(4).f, + h = e(11), + v = e(176).set, + g = e(177), + d = l.MutationObserver || l.WebKitMutationObserver, + y = l.process, + x = l.Promise, + m = "process" == h(y), + b = p(l, "queueMicrotask"), + S = b && b.value; + S || (r = function r() { + var t, n; + for (m && (t = y.domain) && t.exit(); o;) { + n = o.fn, o = o.next; + try { + n(); + } catch (t) { + throw o ? a() : i = void 0, t; + } + } + i = void 0, t && t.enter(); + }, m ? a = function a() { + y.nextTick(r); + } : d && !g ? (u = !0, c = document.createTextNode(""), new d(r).observe(c, { + characterData: !0 + }), a = function a() { + c.data = u = !u; + }) : x && x.resolve ? (f = x.resolve(void 0), s = f.then, a = function a() { + s.call(f, r); + }) : a = function a() { + v.call(l, r); + }), t.exports = S || function (t) { + var n = { + fn: t, + next: void 0 + }; + i && (i.next = n), o || (o = n, a()), i = n; + }; + }, function (t, n, e) { + var r = e(20), + o = e(14), + i = e(180); + t.exports = function (t, n) { + if (r(t), o(n) && n.constructor === t) return n; + var e = i.f(t); + return (0, e.resolve)(n), e.promise; + }; + }, function (t, n, e) { + var r = e(65), + o = function o(t) { + var n, e; + this.promise = new t(function (t, r) { + if (void 0 !== n || void 0 !== e) throw TypeError("Bad Promise constructor"); + n = t, e = r; + }), this.resolve = r(n), this.reject = r(e); + }; + t.exports.f = function (t) { + return new o(t); + }; + }, function (t, n, e) { + var r = e(3); + t.exports = function (t, n) { + var e = r.console; + e && e.error && (1 === arguments.length ? e.error(t) : e.error(t, n)); + }; + }, function (t, n) { + t.exports = function (t) { + try { + return { + error: !1, + value: t() + }; + } catch (t) { + return { + error: !0, + value: t + }; + } + }; + }, function (t, n, e) { + var r = e(2), + o = e(65), + i = e(180), + a = e(182), + u = e(122); + r({ + target: "Promise", + stat: !0 + }, { + allSettled: function allSettled(t) { + var n = this, + e = i.f(n), + r = e.resolve, + c = e.reject, + f = a(function () { + var e = o(n.resolve), + i = [], + a = 0, + c = 1; + u(t, function (t) { + var o = a++, + u = !1; + i.push(void 0), c++, e.call(n, t).then(function (t) { + u || (u = !0, i[o] = { + status: "fulfilled", + value: t + }, --c || r(i)); + }, function (t) { + u || (u = !0, i[o] = { + status: "rejected", + reason: t + }, --c || r(i)); + }); + }), --c || r(i); + }); + return f.error && c(f.value), e.promise; + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(29), + i = e(174), + a = e(6), + u = e(34), + c = e(175), + f = e(179), + s = e(21); + r({ + target: "Promise", + proto: !0, + real: !0, + forced: !!i && a(function () { + i.prototype.finally.call({ + then: function then() {} + }, function () {}); + }) + }, { + finally: function _finally(t) { + var n = c(this, u("Promise")), + e = "function" == typeof t; + return this.then(e ? function (e) { + return f(n, t()).then(function () { + return e; + }); + } : t, e ? function (e) { + return f(n, t()).then(function () { + throw e; + }); + } : t); + } + }), o || "function" != typeof i || i.prototype.finally || s(i.prototype, "finally", u("Promise").prototype.finally); + }, function (t, n, e) { + var r = e(5), + o = e(3), + i = e(44), + a = e(124), + u = e(19).f, + c = e(36).f, + f = e(186), + s = e(187), + l = e(188), + p = e(21), + h = e(6), + v = e(25).set, + g = e(109), + d = e(49)("match"), + y = o.RegExp, + x = y.prototype, + m = /a/g, + b = /a/g, + S = new y(m) !== m, + E = l.UNSUPPORTED_Y; + if (r && i("RegExp", !S || E || h(function () { + return b[d] = !1, y(m) != m || y(b) == b || "/a/i" != y(m, "i"); + }))) { + for (var _w = function w(t, n) { + var e, + r = this instanceof _w, + o = f(t), + i = void 0 === n; + if (!r && o && t.constructor === _w && i) return t; + S ? o && !i && (t = t.source) : t instanceof _w && (i && (n = s.call(t)), t = t.source), E && (e = !!n && n.indexOf("y") > -1) && (n = n.replace(/y/g, "")); + var u = a(S ? new y(t, n) : y(t, n), r ? this : x, _w); + return E && e && v(u, { + sticky: e + }), u; + }, O = function O(t) { + t in _w || u(_w, t, { + configurable: !0, + get: function get() { + return y[t]; + }, + set: function set(n) { + y[t] = n; + } + }); + }, R = c(y), A = 0; R.length > A;) O(R[A++]); + x.constructor = _w, _w.prototype = x, p(o, "RegExp", _w); + } + g("RegExp"); + }, function (t, n, e) { + var r = e(14), + o = e(11), + i = e(49)("match"); + t.exports = function (t) { + var n; + return r(t) && (void 0 !== (n = t[i]) ? !!n : "RegExp" == o(t)); + }; + }, function (t, n, e) { + var r = e(20); + t.exports = function () { + var t = r(this), + n = ""; + return t.global && (n += "g"), t.ignoreCase && (n += "i"), t.multiline && (n += "m"), t.dotAll && (n += "s"), t.unicode && (n += "u"), t.sticky && (n += "y"), n; + }; + }, function (t, n, e) { + var r = e(6); + function o(t, n) { + return RegExp(t, n); + } + n.UNSUPPORTED_Y = r(function () { + var t = o("a", "y"); + return t.lastIndex = 2, null != t.exec("abcd"); + }), n.BROKEN_CARET = r(function () { + var t = o("^r", "gy"); + return t.lastIndex = 2, null != t.exec("str"); + }); + }, function (t, n, e) { + var r = e(2), + o = e(190); + r({ + target: "RegExp", + proto: !0, + forced: /./.exec !== o + }, { + exec: o + }); + }, function (t, n, e) { + var r, + o, + i = e(187), + a = e(188), + u = RegExp.prototype.exec, + c = String.prototype.replace, + f = u, + s = (r = /a/, o = /b*/g, u.call(r, "a"), u.call(o, "a"), 0 !== r.lastIndex || 0 !== o.lastIndex), + l = a.UNSUPPORTED_Y || a.BROKEN_CARET, + p = void 0 !== /()??/.exec("")[1]; + (s || p || l) && (f = function f(t) { + var n, + e, + r, + o, + a = this, + f = l && a.sticky, + h = i.call(a), + v = a.source, + g = 0, + d = t; + return f && (-1 === (h = h.replace("y", "")).indexOf("g") && (h += "g"), d = String(t).slice(a.lastIndex), a.lastIndex > 0 && (!a.multiline || a.multiline && "\n" !== t[a.lastIndex - 1]) && (v = "(?: " + v + ")", d = " " + d, g++), e = new RegExp("^(?:" + v + ")", h)), p && (e = new RegExp("^" + v + "$(?!\\s)", h)), s && (n = a.lastIndex), r = u.call(f ? e : a, d), f ? r ? (r.input = r.input.slice(g), r[0] = r[0].slice(g), r.index = a.lastIndex, a.lastIndex += r[0].length) : a.lastIndex = 0 : s && r && (a.lastIndex = a.global ? r.index + r[0].length : n), p && r && r.length > 1 && c.call(r[0], e, function () { + for (o = 1; o < arguments.length - 2; o++) void 0 === arguments[o] && (r[o] = void 0); + }), r; + }), t.exports = f; + }, function (t, n, e) { + var r = e(5), + o = e(19), + i = e(187), + a = e(188).UNSUPPORTED_Y; + r && ("g" != /./g.flags || a) && o.f(RegExp.prototype, "flags", { + configurable: !0, + get: i + }); + }, function (t, n, e) { + var r = e(5), + o = e(188).UNSUPPORTED_Y, + i = e(19).f, + a = e(25).get, + u = RegExp.prototype; + r && o && i(RegExp.prototype, "sticky", { + configurable: !0, + get: function get() { + if (this !== u) { + if (this instanceof RegExp) return !!a(this).sticky; + throw TypeError("Incompatible receiver, RegExp required"); + } + } + }); + }, function (t, n, e) { + e(189); + var r, + o, + i = e(2), + a = e(14), + u = (r = !1, (o = /[ac]/).exec = function () { + return r = !0, /./.exec.apply(this, arguments); + }, !0 === o.test("abc") && r), + c = /./.test; + i({ + target: "RegExp", + proto: !0, + forced: !u + }, { + test: function test(t) { + if ("function" != typeof this.exec) return c.call(this, t); + var n = this.exec(t); + if (null !== n && !a(n)) throw new Error("RegExp exec method returned something other than an Object or null"); + return !!n; + } + }); + }, function (t, n, e) { + var r = e(21), + o = e(20), + i = e(6), + a = e(187), + u = RegExp.prototype, + c = u.toString, + f = i(function () { + return "/a/b" != c.call({ + source: "a", + flags: "b" + }); + }), + s = "toString" != c.name; + (f || s) && r(RegExp.prototype, "toString", function () { + var t = o(this), + n = String(t.source), + e = t.flags; + return "/" + n + "/" + String(void 0 === e && t instanceof RegExp && !("flags" in u) ? a.call(t) : e); + }, { + unsafe: !0 + }); + }, function (t, n, e) { + var r = e(119), + o = e(125); + t.exports = r("Set", function (t) { + return function () { + return t(this, arguments.length ? arguments[0] : void 0); + }; + }, o); + }, function (t, n, e) { + var r = e(2), + o = e(197).codeAt; + r({ + target: "String", + proto: !0 + }, { + codePointAt: function codePointAt(t) { + return o(this, t); + } + }); + }, function (t, n, e) { + var r = e(40), + o = e(12), + i = function i(t) { + return function (n, e) { + var i, + a, + u = String(o(n)), + c = r(e), + f = u.length; + return c < 0 || c >= f ? t ? "" : void 0 : (i = u.charCodeAt(c)) < 55296 || i > 56319 || c + 1 === f || (a = u.charCodeAt(c + 1)) < 56320 || a > 57343 ? t ? u.charAt(c) : i : t ? u.slice(c, c + 2) : a - 56320 + (i - 55296 << 10) + 65536; + }; + }; + t.exports = { + codeAt: i(!1), + charAt: i(!0) + }; + }, function (t, n, e) { + var r, + o = e(2), + i = e(4).f, + a = e(39), + u = e(199), + c = e(12), + f = e(200), + s = e(29), + l = "".endsWith, + p = Math.min, + h = f("endsWith"); + o({ + target: "String", + proto: !0, + forced: !!(s || h || (r = i(String.prototype, "endsWith"), !r || r.writable)) && !h + }, { + endsWith: function endsWith(t) { + var n = String(c(this)); + u(t); + var e = arguments.length > 1 ? arguments[1] : void 0, + r = a(n.length), + o = void 0 === e ? r : p(a(e), r), + i = String(t); + return l ? l.call(n, i, o) : n.slice(o - i.length, o) === i; + } + }); + }, function (t, n, e) { + var r = e(186); + t.exports = function (t) { + if (r(t)) throw TypeError("The method doesn't accept regular expressions"); + return t; + }; + }, function (t, n, e) { + var r = e(49)("match"); + t.exports = function (t) { + var n = /./; + try { + "/./"[t](n); + } catch (e) { + try { + return n[r] = !1, "/./"[t](n); + } catch (t) {} + } + return !1; + }; + }, function (t, n, e) { + var r = e(2), + o = e(41), + i = String.fromCharCode, + a = String.fromCodePoint; + r({ + target: "String", + stat: !0, + forced: !!a && 1 != a.length + }, { + fromCodePoint: function fromCodePoint(t) { + for (var n, e = [], r = arguments.length, a = 0; r > a;) { + if (n = +arguments[a++], o(n, 1114111) !== n) throw RangeError(n + " is not a valid code point"); + e.push(n < 65536 ? i(n) : i(55296 + ((n -= 65536) >> 10), n % 1024 + 56320)); + } + return e.join(""); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(199), + i = e(12); + r({ + target: "String", + proto: !0, + forced: !e(200)("includes") + }, { + includes: function includes(t) { + return !!~String(i(this)).indexOf(o(t), arguments.length > 1 ? arguments[1] : void 0); + } + }); + }, function (t, n, e) { + var r = e(197).charAt, + o = e(25), + i = e(90), + a = o.set, + u = o.getterFor("String Iterator"); + i(String, "String", function (t) { + a(this, { + type: "String Iterator", + string: String(t), + index: 0 + }); + }, function () { + var t, + n = u(this), + e = n.string, + o = n.index; + return o >= e.length ? { + value: void 0, + done: !0 + } : (t = r(e, o), n.index += t.length, { + value: t, + done: !1 + }); + }); + }, function (t, n, e) { + var r = e(205), + o = e(20), + i = e(39), + a = e(12), + u = e(206), + c = e(207); + r("match", 1, function (t, n, e) { + return [function (n) { + var e = a(this), + r = null == n ? void 0 : n[t]; + return void 0 !== r ? r.call(n, e) : new RegExp(n)[t](String(e)); + }, function (t) { + var r = e(n, t, this); + if (r.done) return r.value; + var a = o(t), + f = String(this); + if (!a.global) return c(a, f); + var s = a.unicode; + a.lastIndex = 0; + for (var l, p = [], h = 0; null !== (l = c(a, f));) { + var v = String(l[0]); + p[h] = v, "" === v && (a.lastIndex = u(f, i(a.lastIndex), s)), h++; + } + return 0 === h ? null : p; + }]; + }); + }, function (t, n, e) { + e(189); + var r = e(21), + o = e(6), + i = e(49), + a = e(190), + u = e(18), + c = i("species"), + f = !o(function () { + var t = /./; + return t.exec = function () { + var t = []; + return t.groups = { + a: "7" + }, t; + }, "7" !== "".replace(t, "$<a>"); + }), + s = "$0" === "a".replace(/./, "$0"), + l = i("replace"), + p = !!/./[l] && "" === /./[l]("a", "$0"), + h = !o(function () { + var t = /(?:)/, + n = t.exec; + t.exec = function () { + return n.apply(this, arguments); + }; + var e = "ab".split(t); + return 2 !== e.length || "a" !== e[0] || "b" !== e[1]; + }); + t.exports = function (t, n, e, l) { + var v = i(t), + g = !o(function () { + var n = {}; + return n[v] = function () { + return 7; + }, 7 != ""[t](n); + }), + d = g && !o(function () { + var n = !1, + e = /a/; + return "split" === t && ((e = {}).constructor = {}, e.constructor[c] = function () { + return e; + }, e.flags = "", e[v] = /./[v]), e.exec = function () { + return n = !0, null; + }, e[v](""), !n; + }); + if (!g || !d || "replace" === t && (!f || !s || p) || "split" === t && !h) { + var y = /./[v], + x = e(v, ""[t], function (t, n, e, r, o) { + return n.exec === a ? g && !o ? { + done: !0, + value: y.call(n, e, r) + } : { + done: !0, + value: t.call(e, n, r) + } : { + done: !1 + }; + }, { + REPLACE_KEEPS_$0: s, + REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: p + }), + m = x[0], + b = x[1]; + r(String.prototype, t, m), r(RegExp.prototype, v, 2 == n ? function (t, n) { + return b.call(t, this, n); + } : function (t) { + return b.call(t, this); + }); + } + l && u(RegExp.prototype[v], "sham", !0); + }; + }, function (t, n, e) { + var r = e(197).charAt; + t.exports = function (t, n, e) { + return n + (e ? r(t, n).length : 1); + }; + }, function (t, n, e) { + var r = e(11), + o = e(190); + t.exports = function (t, n) { + var e = t.exec; + if ("function" == typeof e) { + var i = e.call(t, n); + if ("object" != typeof i) throw TypeError("RegExp exec method returned something other than an Object or null"); + return i; + } + if ("RegExp" !== r(t)) throw TypeError("RegExp#exec called on incompatible receiver"); + return o.call(t, n); + }; + }, function (t, n, e) { + var r = e(2), + o = e(91), + i = e(12), + a = e(39), + u = e(65), + c = e(20), + f = e(11), + s = e(186), + l = e(187), + p = e(18), + h = e(6), + v = e(49), + g = e(175), + d = e(206), + y = e(25), + x = e(29), + m = v("matchAll"), + b = y.set, + S = y.getterFor("RegExp String Iterator"), + E = RegExp.prototype, + w = E.exec, + O = "".matchAll, + R = !!O && !h(function () { + "a".matchAll(/./); + }), + A = o(function (t, n, e, r) { + b(this, { + type: "RegExp String Iterator", + regexp: t, + string: n, + global: e, + unicode: r, + done: !1 + }); + }, "RegExp String", function () { + var t = S(this); + if (t.done) return { + value: void 0, + done: !0 + }; + var n = t.regexp, + e = t.string, + r = function (t, n) { + var e, + r = t.exec; + if ("function" == typeof r) { + if ("object" != typeof (e = r.call(t, n))) throw TypeError("Incorrect exec result"); + return e; + } + return w.call(t, n); + }(n, e); + return null === r ? { + value: void 0, + done: t.done = !0 + } : t.global ? ("" == String(r[0]) && (n.lastIndex = d(e, a(n.lastIndex), t.unicode)), { + value: r, + done: !1 + }) : (t.done = !0, { + value: r, + done: !1 + }); + }), + j = function j(t) { + var n, + e, + r, + o, + i, + u, + f = c(this), + s = String(t); + return n = g(f, RegExp), void 0 === (e = f.flags) && f instanceof RegExp && !("flags" in E) && (e = l.call(f)), r = void 0 === e ? "" : String(e), o = new n(n === RegExp ? f.source : f, r), i = !!~r.indexOf("g"), u = !!~r.indexOf("u"), o.lastIndex = a(f.lastIndex), new A(o, s, i, u); + }; + r({ + target: "String", + proto: !0, + forced: R + }, { + matchAll: function matchAll(t) { + var n, + e, + r, + o = i(this); + if (null != t) { + if (s(t) && !~String(i("flags" in E ? t.flags : l.call(t))).indexOf("g")) throw TypeError("`.matchAll` does not allow non-global regexes"); + if (R) return O.apply(o, arguments); + if (void 0 === (e = t[m]) && x && "RegExp" == f(t) && (e = j), null != e) return u(e).call(t, o); + } else if (R) return O.apply(o, arguments); + return n = String(o), r = new RegExp(t, "g"), x ? j.call(r, n) : r[m](n); + } + }), x || m in E || p(E, m, j); + }, function (t, n, e) { + var r = e(2), + o = e(210).end; + r({ + target: "String", + proto: !0, + forced: e(211) + }, { + padEnd: function padEnd(t) { + return o(this, t, arguments.length > 1 ? arguments[1] : void 0); + } + }); + }, function (t, n, e) { + var r = e(39), + o = e(145), + i = e(12), + a = Math.ceil, + u = function u(t) { + return function (n, e, u) { + var c, + f, + s = String(i(n)), + l = s.length, + p = void 0 === u ? " " : String(u), + h = r(e); + return h <= l || "" == p ? s : (c = h - l, (f = o.call(p, a(c / p.length))).length > c && (f = f.slice(0, c)), t ? s + f : f + s); + }; + }; + t.exports = { + start: u(!1), + end: u(!0) + }; + }, function (t, n, e) { + var r = e(54); + t.exports = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(r); + }, function (t, n, e) { + var r = e(2), + o = e(210).start; + r({ + target: "String", + proto: !0, + forced: e(211) + }, { + padStart: function padStart(t) { + return o(this, t, arguments.length > 1 ? arguments[1] : void 0); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(9), + i = e(39); + r({ + target: "String", + stat: !0 + }, { + raw: function raw(t) { + for (var n = o(t.raw), e = i(n.length), r = arguments.length, a = [], u = 0; e > u;) a.push(String(n[u++])), u < r && a.push(String(arguments[u])); + return a.join(""); + } + }); + }, function (t, n, e) { + e(2)({ + target: "String", + proto: !0 + }, { + repeat: e(145) + }); + }, function (t, n, e) { + var r = e(205), + o = e(20), + i = e(46), + a = e(39), + u = e(40), + c = e(12), + f = e(206), + s = e(207), + l = Math.max, + p = Math.min, + h = Math.floor, + v = /\$([$&'`]|\d\d?|<[^>]*>)/g, + g = /\$([$&'`]|\d\d?)/g; + r("replace", 2, function (t, n, e, r) { + var d = r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE, + y = r.REPLACE_KEEPS_$0, + x = d ? "$" : "$0"; + return [function (e, r) { + var o = c(this), + i = null == e ? void 0 : e[t]; + return void 0 !== i ? i.call(e, o, r) : n.call(String(o), e, r); + }, function (t, r) { + if (!d && y || "string" == typeof r && -1 === r.indexOf(x)) { + var i = e(n, t, this, r); + if (i.done) return i.value; + } + var c = o(t), + h = String(this), + v = "function" == typeof r; + v || (r = String(r)); + var g = c.global; + if (g) { + var b = c.unicode; + c.lastIndex = 0; + } + for (var S = [];;) { + var E = s(c, h); + if (null === E) break; + if (S.push(E), !g) break; + "" === String(E[0]) && (c.lastIndex = f(h, a(c.lastIndex), b)); + } + for (var w, O = "", R = 0, A = 0; A < S.length; A++) { + E = S[A]; + for (var j = String(E[0]), I = l(p(u(E.index), h.length), 0), k = [], P = 1; P < E.length; P++) k.push(void 0 === (w = E[P]) ? w : String(w)); + var L = E.groups; + if (v) { + var T = [j].concat(k, I, h); + void 0 !== L && T.push(L); + var _ = String(r.apply(void 0, T)); + } else _ = m(j, h, I, k, L, r); + I >= R && (O += h.slice(R, I) + _, R = I + j.length); + } + return O + h.slice(R); + }]; + function m(t, e, r, o, a, u) { + var c = r + t.length, + f = o.length, + s = g; + return void 0 !== a && (a = i(a), s = v), n.call(u, s, function (n, i) { + var u; + switch (i.charAt(0)) { + case "$": + return "$"; + case "&": + return t; + case "`": + return e.slice(0, r); + case "'": + return e.slice(c); + case "<": + u = a[i.slice(1, -1)]; + break; + default: + var s = +i; + if (0 === s) return n; + if (s > f) { + var l = h(s / 10); + return 0 === l ? n : l <= f ? void 0 === o[l - 1] ? i.charAt(1) : o[l - 1] + i.charAt(1) : n; + } + u = o[s - 1]; + } + return void 0 === u ? "" : u; + }); + } + }); + }, function (t, n, e) { + var r = e(205), + o = e(20), + i = e(12), + a = e(161), + u = e(207); + r("search", 1, function (t, n, e) { + return [function (n) { + var e = i(this), + r = null == n ? void 0 : n[t]; + return void 0 !== r ? r.call(n, e) : new RegExp(n)[t](String(e)); + }, function (t) { + var r = e(n, t, this); + if (r.done) return r.value; + var i = o(t), + c = String(this), + f = i.lastIndex; + a(f, 0) || (i.lastIndex = 0); + var s = u(i, c); + return a(i.lastIndex, f) || (i.lastIndex = f), null === s ? -1 : s.index; + }]; + }); + }, function (t, n, e) { + var r = e(205), + o = e(186), + i = e(20), + a = e(12), + u = e(175), + c = e(206), + f = e(39), + s = e(207), + l = e(190), + p = e(6), + h = [].push, + v = Math.min, + g = !p(function () { + return !RegExp(4294967295, "y"); + }); + r("split", 2, function (t, n, e) { + var r; + return r = "c" == "abbc".split(/(b)*/)[1] || 4 != "test".split(/(?:)/, -1).length || 2 != "ab".split(/(?:ab)*/).length || 4 != ".".split(/(.?)(.?)/).length || ".".split(/()()/).length > 1 || "".split(/.?/).length ? function (t, e) { + var r = String(a(this)), + i = void 0 === e ? 4294967295 : e >>> 0; + if (0 === i) return []; + if (void 0 === t) return [r]; + if (!o(t)) return n.call(r, t, i); + for (var u, c, f, s = [], p = (t.ignoreCase ? "i" : "") + (t.multiline ? "m" : "") + (t.unicode ? "u" : "") + (t.sticky ? "y" : ""), v = 0, g = new RegExp(t.source, p + "g"); (u = l.call(g, r)) && !((c = g.lastIndex) > v && (s.push(r.slice(v, u.index)), u.length > 1 && u.index < r.length && h.apply(s, u.slice(1)), f = u[0].length, v = c, s.length >= i));) g.lastIndex === u.index && g.lastIndex++; + return v === r.length ? !f && g.test("") || s.push("") : s.push(r.slice(v)), s.length > i ? s.slice(0, i) : s; + } : "0".split(void 0, 0).length ? function (t, e) { + return void 0 === t && 0 === e ? [] : n.call(this, t, e); + } : n, [function (n, e) { + var o = a(this), + i = null == n ? void 0 : n[t]; + return void 0 !== i ? i.call(n, o, e) : r.call(String(o), n, e); + }, function (t, o) { + var a = e(r, t, this, o, r !== n); + if (a.done) return a.value; + var l = i(t), + p = String(this), + h = u(l, RegExp), + d = l.unicode, + y = (l.ignoreCase ? "i" : "") + (l.multiline ? "m" : "") + (l.unicode ? "u" : "") + (g ? "y" : "g"), + x = new h(g ? l : "^(?:" + l.source + ")", y), + m = void 0 === o ? 4294967295 : o >>> 0; + if (0 === m) return []; + if (0 === p.length) return null === s(x, p) ? [p] : []; + for (var b = 0, S = 0, E = []; S < p.length;) { + x.lastIndex = g ? S : 0; + var w, + O = s(x, g ? p : p.slice(S)); + if (null === O || (w = v(f(x.lastIndex + (g ? 0 : S)), p.length)) === b) S = c(p, S, d);else { + if (E.push(p.slice(b, S)), E.length === m) return E; + for (var R = 1; R <= O.length - 1; R++) if (E.push(O[R]), E.length === m) return E; + S = b = w; + } + } + return E.push(p.slice(b)), E; + }]; + }, !g); + }, function (t, n, e) { + var r, + o = e(2), + i = e(4).f, + a = e(39), + u = e(199), + c = e(12), + f = e(200), + s = e(29), + l = "".startsWith, + p = Math.min, + h = f("startsWith"); + o({ + target: "String", + proto: !0, + forced: !!(s || h || (r = i(String.prototype, "startsWith"), !r || r.writable)) && !h + }, { + startsWith: function startsWith(t) { + var n = String(c(this)); + u(t); + var e = a(p(arguments.length > 1 ? arguments[1] : void 0, n.length)), + r = String(t); + return l ? l.call(n, r, e) : n.slice(e, e + r.length) === r; + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(128).trim; + r({ + target: "String", + proto: !0, + forced: e(220)("trim") + }, { + trim: function trim() { + return o(this); + } + }); + }, function (t, n, e) { + var r = e(6), + o = e(129); + t.exports = function (t) { + return r(function () { + return !!o[t]() || "â€‹Â…á Ž" != "â€‹Â…á Ž"[t]() || o[t].name !== t; + }); + }; + }, function (t, n, e) { + var r = e(2), + o = e(128).end, + i = e(220)("trimEnd"), + a = i ? function () { + return o(this); + } : "".trimEnd; + r({ + target: "String", + proto: !0, + forced: i + }, { + trimEnd: a, + trimRight: a + }); + }, function (t, n, e) { + var r = e(2), + o = e(128).start, + i = e(220)("trimStart"), + a = i ? function () { + return o(this); + } : "".trimStart; + r({ + target: "String", + proto: !0, + forced: i + }, { + trimStart: a, + trimLeft: a + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("anchor") + }, { + anchor: function anchor(t) { + return o(this, "a", "name", t); + } + }); + }, function (t, n, e) { + var r = e(12), + o = /"/g; + t.exports = function (t, n, e, i) { + var a = String(r(t)), + u = "<" + n; + return "" !== e && (u += " " + e + '="' + String(i).replace(o, """) + '"'), u + ">" + a + "</" + n + ">"; + }; + }, function (t, n, e) { + var r = e(6); + t.exports = function (t) { + return r(function () { + var n = ""[t]('"'); + return n !== n.toLowerCase() || n.split('"').length > 3; + }); + }; + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("big") + }, { + big: function big() { + return o(this, "big", "", ""); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("blink") + }, { + blink: function blink() { + return o(this, "blink", "", ""); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("bold") + }, { + bold: function bold() { + return o(this, "b", "", ""); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("fixed") + }, { + fixed: function fixed() { + return o(this, "tt", "", ""); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("fontcolor") + }, { + fontcolor: function fontcolor(t) { + return o(this, "font", "color", t); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("fontsize") + }, { + fontsize: function fontsize(t) { + return o(this, "font", "size", t); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("italics") + }, { + italics: function italics() { + return o(this, "i", "", ""); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("link") + }, { + link: function link(t) { + return o(this, "a", "href", t); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("small") + }, { + small: function small() { + return o(this, "small", "", ""); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("strike") + }, { + strike: function strike() { + return o(this, "strike", "", ""); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("sub") + }, { + sub: function sub() { + return o(this, "sub", "", ""); + } + }); + }, function (t, n, e) { + var r = e(2), + o = e(224); + r({ + target: "String", + proto: !0, + forced: e(225)("sup") + }, { + sup: function sup() { + return o(this, "sup", "", ""); + } + }); + }, function (t, n, e) { + var r, + o = e(3), + i = e(126), + a = e(120), + u = e(119), + c = e(239), + f = e(14), + s = e(25).enforce, + l = e(26), + p = !o.ActiveXObject && "ActiveXObject" in o, + h = Object.isExtensible, + v = function v(t) { + return function () { + return t(this, arguments.length ? arguments[0] : void 0); + }; + }, + g = t.exports = u("WeakMap", v, c); + if (l && p) { + r = c.getConstructor(v, "WeakMap", !0), a.REQUIRED = !0; + var d = g.prototype, + y = d.delete, + x = d.has, + m = d.get, + b = d.set; + i(d, { + delete: function _delete(t) { + if (f(t) && !h(t)) { + var n = s(this); + return n.frozen || (n.frozen = new r()), y.call(this, t) || n.frozen.delete(t); + } + return y.call(this, t); + }, + has: function has(t) { + if (f(t) && !h(t)) { + var n = s(this); + return n.frozen || (n.frozen = new r()), x.call(this, t) || n.frozen.has(t); + } + return x.call(this, t); + }, + get: function get(t) { + if (f(t) && !h(t)) { + var n = s(this); + return n.frozen || (n.frozen = new r()), x.call(this, t) ? m.call(this, t) : n.frozen.get(t); + } + return m.call(this, t); + }, + set: function set(t, n) { + if (f(t) && !h(t)) { + var e = s(this); + e.frozen || (e.frozen = new r()), x.call(this, t) ? b.call(this, t, n) : e.frozen.set(t, n); + } else b.call(this, t, n); + return this; + } + }); + } + }, function (t, n, e) { + var r = e(126), + o = e(120).getWeakData, + i = e(20), + a = e(14), + u = e(123), + c = e(122), + f = e(63), + s = e(15), + l = e(25), + p = l.set, + h = l.getterFor, + v = f.find, + g = f.findIndex, + d = 0, + y = function y(t) { + return t.frozen || (t.frozen = new x()); + }, + x = function x() { + this.entries = []; + }, + m = function m(t, n) { + return v(t.entries, function (t) { + return t[0] === n; + }); + }; + x.prototype = { + get: function get(t) { + var n = m(this, t); + if (n) return n[1]; + }, + has: function has(t) { + return !!m(this, t); + }, + set: function set(t, n) { + var e = m(this, t); + e ? e[1] = n : this.entries.push([t, n]); + }, + delete: function _delete(t) { + var n = g(this.entries, function (n) { + return n[0] === t; + }); + return ~n && this.entries.splice(n, 1), !!~n; + } + }, t.exports = { + getConstructor: function getConstructor(t, n, e, f) { + var l = t(function (t, r) { + u(t, l, n), p(t, { + type: n, + id: d++, + frozen: void 0 + }), null != r && c(r, t[f], t, e); + }), + v = h(n), + g = function g(t, n, e) { + var r = v(t), + a = o(i(n), !0); + return !0 === a ? y(r).set(n, e) : a[r.id] = e, t; + }; + return r(l.prototype, { + delete: function _delete(t) { + var n = v(this); + if (!a(t)) return !1; + var e = o(t); + return !0 === e ? y(n).delete(t) : e && s(e, n.id) && delete e[n.id]; + }, + has: function has(t) { + var n = v(this); + if (!a(t)) return !1; + var e = o(t); + return !0 === e ? y(n).has(t) : e && s(e, n.id); + } + }), r(l.prototype, e ? { + get: function get(t) { + var n = v(this); + if (a(t)) { + var e = o(t); + return !0 === e ? y(n).get(t) : e ? e[n.id] : void 0; + } + }, + set: function set(t, n) { + return g(this, t, n); + } + } : { + add: function add(t) { + return g(this, t, !0); + } + }), l; + } + }; + }, function (t, n, e) { + e(119)("WeakSet", function (t) { + return function () { + return t(this, arguments.length ? arguments[0] : void 0); + }; + }, e(239)); + }, function (t, n, e) { + var r = e(3), + o = e(242), + i = e(77), + a = e(18); + for (var u in o) { + var c = r[u], + f = c && c.prototype; + if (f && f.forEach !== i) try { + a(f, "forEach", i); + } catch (t) { + f.forEach = i; + } + } + }, function (t, n) { + t.exports = { + CSSRuleList: 0, + CSSStyleDeclaration: 0, + CSSValueList: 0, + ClientRectList: 0, + DOMRectList: 0, + DOMStringList: 0, + DOMTokenList: 1, + DataTransferItemList: 0, + FileList: 0, + HTMLAllCollection: 0, + HTMLCollection: 0, + HTMLFormElement: 0, + HTMLSelectElement: 0, + MediaList: 0, + MimeTypeArray: 0, + NamedNodeMap: 0, + NodeList: 1, + PaintRequestList: 0, + Plugin: 0, + PluginArray: 0, + SVGLengthList: 0, + SVGNumberList: 0, + SVGPathSegList: 0, + SVGPointList: 0, + SVGStringList: 0, + SVGTransformList: 0, + SourceBufferList: 0, + StyleSheetList: 0, + TextTrackCueList: 0, + TextTrackList: 0, + TouchList: 0 + }; + }, function (t, n, e) { + e(203); + var r, + o = e(2), + i = e(5), + a = e(244), + u = e(3), + c = e(59), + f = e(21), + s = e(123), + l = e(15), + p = e(147), + h = e(79), + v = e(197).codeAt, + g = e(245), + d = e(95), + y = e(246), + x = e(25), + m = u.URL, + b = y.URLSearchParams, + S = y.getState, + E = x.set, + w = x.getterFor("URL"), + O = Math.floor, + R = Math.pow, + A = /[A-Za-z]/, + j = /[\d+-.A-Za-z]/, + I = /\d/, + k = /^(0x|0X)/, + P = /^[0-7]+$/, + L = /^\d+$/, + T = /^[\dA-Fa-f]+$/, + _ = /[\u0000\u0009\u000A\u000D #%/:?@[\\]]/, + U = /[\u0000\u0009\u000A\u000D #/:?@[\\]]/, + N = /^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g, + C = /[\u0009\u000A\u000D]/g, + F = function F(t, n) { + var e, r, o; + if ("[" == n.charAt(0)) { + if ("]" != n.charAt(n.length - 1)) return "Invalid host"; + if (!(e = z(n.slice(1, -1)))) return "Invalid host"; + t.host = e; + } else if (X(t)) { + if (n = g(n), _.test(n)) return "Invalid host"; + if (null === (e = M(n))) return "Invalid host"; + t.host = e; + } else { + if (U.test(n)) return "Invalid host"; + for (e = "", r = h(n), o = 0; o < r.length; o++) e += G(r[o], q); + t.host = e; + } + }, + M = function M(t) { + var n, + e, + r, + o, + i, + a, + u, + c = t.split("."); + if (c.length && "" == c[c.length - 1] && c.pop(), (n = c.length) > 4) return t; + for (e = [], r = 0; r < n; r++) { + if ("" == (o = c[r])) return t; + if (i = 10, o.length > 1 && "0" == o.charAt(0) && (i = k.test(o) ? 16 : 8, o = o.slice(8 == i ? 1 : 2)), "" === o) a = 0;else { + if (!(10 == i ? L : 8 == i ? P : T).test(o)) return t; + a = parseInt(o, i); + } + e.push(a); + } + for (r = 0; r < n; r++) if (a = e[r], r == n - 1) { + if (a >= R(256, 5 - n)) return null; + } else if (a > 255) return null; + for (u = e.pop(), r = 0; r < e.length; r++) u += e[r] * R(256, 3 - r); + return u; + }, + z = function z(t) { + var n, + e, + r, + o, + i, + a, + u, + c = [0, 0, 0, 0, 0, 0, 0, 0], + f = 0, + s = null, + l = 0, + p = function p() { + return t.charAt(l); + }; + if (":" == p()) { + if (":" != t.charAt(1)) return; + l += 2, s = ++f; + } + for (; p();) { + if (8 == f) return; + if (":" != p()) { + for (n = e = 0; e < 4 && T.test(p());) n = 16 * n + parseInt(p(), 16), l++, e++; + if ("." == p()) { + if (0 == e) return; + if (l -= e, f > 6) return; + for (r = 0; p();) { + if (o = null, r > 0) { + if (!("." == p() && r < 4)) return; + l++; + } + if (!I.test(p())) return; + for (; I.test(p());) { + if (i = parseInt(p(), 10), null === o) o = i;else { + if (0 == o) return; + o = 10 * o + i; + } + if (o > 255) return; + l++; + } + c[f] = 256 * c[f] + o, 2 != ++r && 4 != r || f++; + } + if (4 != r) return; + break; + } + if (":" == p()) { + if (l++, !p()) return; + } else if (p()) return; + c[f++] = n; + } else { + if (null !== s) return; + l++, s = ++f; + } + } + if (null !== s) for (a = f - s, f = 7; 0 != f && a > 0;) u = c[f], c[f--] = c[s + a - 1], c[s + --a] = u;else if (8 != f) return; + return c; + }, + D = function D(t) { + var n, e, r, o; + if ("number" == typeof t) { + for (n = [], e = 0; e < 4; e++) n.unshift(t % 256), t = O(t / 256); + return n.join("."); + } + if ("object" == typeof t) { + for (n = "", r = function (t) { + for (var n = null, e = 1, r = null, o = 0, i = 0; i < 8; i++) 0 !== t[i] ? (o > e && (n = r, e = o), r = null, o = 0) : (null === r && (r = i), ++o); + return o > e && (n = r, e = o), n; + }(t), e = 0; e < 8; e++) o && 0 === t[e] || (o && (o = !1), r === e ? (n += e ? ":" : "::", o = !0) : (n += t[e].toString(16), e < 7 && (n += ":"))); + return "[" + n + "]"; + } + return t; + }, + q = {}, + B = p({}, q, { + " ": 1, + '"': 1, + "<": 1, + ">": 1, + "`": 1 + }), + W = p({}, B, { + "#": 1, + "?": 1, + "{": 1, + "}": 1 + }), + $ = p({}, W, { + "/": 1, + ":": 1, + ";": 1, + "=": 1, + "@": 1, + "[": 1, + "\\": 1, + "]": 1, + "^": 1, + "|": 1 + }), + G = function G(t, n) { + var e = v(t, 0); + return e > 32 && e < 127 && !l(n, t) ? t : encodeURIComponent(t); + }, + V = { + ftp: 21, + file: null, + http: 80, + https: 443, + ws: 80, + wss: 443 + }, + X = function X(t) { + return l(V, t.scheme); + }, + Y = function Y(t) { + return "" != t.username || "" != t.password; + }, + K = function K(t) { + return !t.host || t.cannotBeABaseURL || "file" == t.scheme; + }, + J = function J(t, n) { + var e; + return 2 == t.length && A.test(t.charAt(0)) && (":" == (e = t.charAt(1)) || !n && "|" == e); + }, + H = function H(t) { + var n; + return t.length > 1 && J(t.slice(0, 2)) && (2 == t.length || "/" === (n = t.charAt(2)) || "\\" === n || "?" === n || "#" === n); + }, + Q = function Q(t) { + var n = t.path, + e = n.length; + !e || "file" == t.scheme && 1 == e && J(n[0], !0) || n.pop(); + }, + Z = function Z(t) { + return "." === t || "%2e" === t.toLowerCase(); + }, + tt = {}, + nt = {}, + et = {}, + rt = {}, + ot = {}, + it = {}, + at = {}, + ut = {}, + ct = {}, + ft = {}, + st = {}, + lt = {}, + pt = {}, + ht = {}, + vt = {}, + gt = {}, + dt = {}, + yt = {}, + xt = {}, + mt = {}, + bt = {}, + St = function St(t, n, e, o) { + var i, + a, + u, + c, + f, + s = e || tt, + p = 0, + v = "", + g = !1, + d = !1, + y = !1; + for (e || (t.scheme = "", t.username = "", t.password = "", t.host = null, t.port = null, t.path = [], t.query = null, t.fragment = null, t.cannotBeABaseURL = !1, n = n.replace(N, "")), n = n.replace(C, ""), i = h(n); p <= i.length;) { + switch (a = i[p], s) { + case tt: + if (!a || !A.test(a)) { + if (e) return "Invalid scheme"; + s = et; + continue; + } + v += a.toLowerCase(), s = nt; + break; + case nt: + if (a && (j.test(a) || "+" == a || "-" == a || "." == a)) v += a.toLowerCase();else { + if (":" != a) { + if (e) return "Invalid scheme"; + v = "", s = et, p = 0; + continue; + } + if (e && (X(t) != l(V, v) || "file" == v && (Y(t) || null !== t.port) || "file" == t.scheme && !t.host)) return; + if (t.scheme = v, e) return void (X(t) && V[t.scheme] == t.port && (t.port = null)); + v = "", "file" == t.scheme ? s = ht : X(t) && o && o.scheme == t.scheme ? s = rt : X(t) ? s = ut : "/" == i[p + 1] ? (s = ot, p++) : (t.cannotBeABaseURL = !0, t.path.push(""), s = xt); + } + break; + case et: + if (!o || o.cannotBeABaseURL && "#" != a) return "Invalid scheme"; + if (o.cannotBeABaseURL && "#" == a) { + t.scheme = o.scheme, t.path = o.path.slice(), t.query = o.query, t.fragment = "", t.cannotBeABaseURL = !0, s = bt; + break; + } + s = "file" == o.scheme ? ht : it; + continue; + case rt: + if ("/" != a || "/" != i[p + 1]) { + s = it; + continue; + } + s = ct, p++; + break; + case ot: + if ("/" == a) { + s = ft; + break; + } + s = yt; + continue; + case it: + if (t.scheme = o.scheme, a == r) t.username = o.username, t.password = o.password, t.host = o.host, t.port = o.port, t.path = o.path.slice(), t.query = o.query;else if ("/" == a || "\\" == a && X(t)) s = at;else if ("?" == a) t.username = o.username, t.password = o.password, t.host = o.host, t.port = o.port, t.path = o.path.slice(), t.query = "", s = mt;else { + if ("#" != a) { + t.username = o.username, t.password = o.password, t.host = o.host, t.port = o.port, t.path = o.path.slice(), t.path.pop(), s = yt; + continue; + } + t.username = o.username, t.password = o.password, t.host = o.host, t.port = o.port, t.path = o.path.slice(), t.query = o.query, t.fragment = "", s = bt; + } + break; + case at: + if (!X(t) || "/" != a && "\\" != a) { + if ("/" != a) { + t.username = o.username, t.password = o.password, t.host = o.host, t.port = o.port, s = yt; + continue; + } + s = ft; + } else s = ct; + break; + case ut: + if (s = ct, "/" != a || "/" != v.charAt(p + 1)) continue; + p++; + break; + case ct: + if ("/" != a && "\\" != a) { + s = ft; + continue; + } + break; + case ft: + if ("@" == a) { + g && (v = "%40" + v), g = !0, u = h(v); + for (var x = 0; x < u.length; x++) { + var m = u[x]; + if (":" != m || y) { + var b = G(m, $); + y ? t.password += b : t.username += b; + } else y = !0; + } + v = ""; + } else if (a == r || "/" == a || "?" == a || "#" == a || "\\" == a && X(t)) { + if (g && "" == v) return "Invalid authority"; + p -= h(v).length + 1, v = "", s = st; + } else v += a; + break; + case st: + case lt: + if (e && "file" == t.scheme) { + s = gt; + continue; + } + if (":" != a || d) { + if (a == r || "/" == a || "?" == a || "#" == a || "\\" == a && X(t)) { + if (X(t) && "" == v) return "Invalid host"; + if (e && "" == v && (Y(t) || null !== t.port)) return; + if (c = F(t, v)) return c; + if (v = "", s = dt, e) return; + continue; + } + "[" == a ? d = !0 : "]" == a && (d = !1), v += a; + } else { + if ("" == v) return "Invalid host"; + if (c = F(t, v)) return c; + if (v = "", s = pt, e == lt) return; + } + break; + case pt: + if (!I.test(a)) { + if (a == r || "/" == a || "?" == a || "#" == a || "\\" == a && X(t) || e) { + if ("" != v) { + var S = parseInt(v, 10); + if (S > 65535) return "Invalid port"; + t.port = X(t) && S === V[t.scheme] ? null : S, v = ""; + } + if (e) return; + s = dt; + continue; + } + return "Invalid port"; + } + v += a; + break; + case ht: + if (t.scheme = "file", "/" == a || "\\" == a) s = vt;else { + if (!o || "file" != o.scheme) { + s = yt; + continue; + } + if (a == r) t.host = o.host, t.path = o.path.slice(), t.query = o.query;else if ("?" == a) t.host = o.host, t.path = o.path.slice(), t.query = "", s = mt;else { + if ("#" != a) { + H(i.slice(p).join("")) || (t.host = o.host, t.path = o.path.slice(), Q(t)), s = yt; + continue; + } + t.host = o.host, t.path = o.path.slice(), t.query = o.query, t.fragment = "", s = bt; + } + } + break; + case vt: + if ("/" == a || "\\" == a) { + s = gt; + break; + } + o && "file" == o.scheme && !H(i.slice(p).join("")) && (J(o.path[0], !0) ? t.path.push(o.path[0]) : t.host = o.host), s = yt; + continue; + case gt: + if (a == r || "/" == a || "\\" == a || "?" == a || "#" == a) { + if (!e && J(v)) s = yt;else if ("" == v) { + if (t.host = "", e) return; + s = dt; + } else { + if (c = F(t, v)) return c; + if ("localhost" == t.host && (t.host = ""), e) return; + v = "", s = dt; + } + continue; + } + v += a; + break; + case dt: + if (X(t)) { + if (s = yt, "/" != a && "\\" != a) continue; + } else if (e || "?" != a) { + if (e || "#" != a) { + if (a != r && (s = yt, "/" != a)) continue; + } else t.fragment = "", s = bt; + } else t.query = "", s = mt; + break; + case yt: + if (a == r || "/" == a || "\\" == a && X(t) || !e && ("?" == a || "#" == a)) { + if (".." === (f = (f = v).toLowerCase()) || "%2e." === f || ".%2e" === f || "%2e%2e" === f ? (Q(t), "/" == a || "\\" == a && X(t) || t.path.push("")) : Z(v) ? "/" == a || "\\" == a && X(t) || t.path.push("") : ("file" == t.scheme && !t.path.length && J(v) && (t.host && (t.host = ""), v = v.charAt(0) + ":"), t.path.push(v)), v = "", "file" == t.scheme && (a == r || "?" == a || "#" == a)) for (; t.path.length > 1 && "" === t.path[0];) t.path.shift(); + "?" == a ? (t.query = "", s = mt) : "#" == a && (t.fragment = "", s = bt); + } else v += G(a, W); + break; + case xt: + "?" == a ? (t.query = "", s = mt) : "#" == a ? (t.fragment = "", s = bt) : a != r && (t.path[0] += G(a, q)); + break; + case mt: + e || "#" != a ? a != r && ("'" == a && X(t) ? t.query += "%27" : t.query += "#" == a ? "%23" : G(a, q)) : (t.fragment = "", s = bt); + break; + case bt: + a != r && (t.fragment += G(a, B)); + } + p++; + } + }, + _Et = function Et(t) { + var n, + e, + r = s(this, _Et, "URL"), + o = arguments.length > 1 ? arguments[1] : void 0, + a = String(t), + u = E(r, { + type: "URL" + }); + if (void 0 !== o) if (o instanceof _Et) n = w(o);else if (e = St(n = {}, String(o))) throw TypeError(e); + if (e = St(u, a, null, n)) throw TypeError(e); + var c = u.searchParams = new b(), + f = S(c); + f.updateSearchParams(u.query), f.updateURL = function () { + u.query = String(c) || null; + }, i || (r.href = Ot.call(r), r.origin = Rt.call(r), r.protocol = At.call(r), r.username = jt.call(r), r.password = It.call(r), r.host = kt.call(r), r.hostname = Pt.call(r), r.port = Lt.call(r), r.pathname = Tt.call(r), r.search = _t.call(r), r.searchParams = Ut.call(r), r.hash = Nt.call(r)); + }, + wt = _Et.prototype, + Ot = function Ot() { + var t = w(this), + n = t.scheme, + e = t.username, + r = t.password, + o = t.host, + i = t.port, + a = t.path, + u = t.query, + c = t.fragment, + f = n + ":"; + return null !== o ? (f += "//", Y(t) && (f += e + (r ? ":" + r : "") + "@"), f += D(o), null !== i && (f += ":" + i)) : "file" == n && (f += "//"), f += t.cannotBeABaseURL ? a[0] : a.length ? "/" + a.join("/") : "", null !== u && (f += "?" + u), null !== c && (f += "#" + c), f; + }, + Rt = function Rt() { + var t = w(this), + n = t.scheme, + e = t.port; + if ("blob" == n) try { + return new URL(n.path[0]).origin; + } catch (t) { + return "null"; + } + return "file" != n && X(t) ? n + "://" + D(t.host) + (null !== e ? ":" + e : "") : "null"; + }, + At = function At() { + return w(this).scheme + ":"; + }, + jt = function jt() { + return w(this).username; + }, + It = function It() { + return w(this).password; + }, + kt = function kt() { + var t = w(this), + n = t.host, + e = t.port; + return null === n ? "" : null === e ? D(n) : D(n) + ":" + e; + }, + Pt = function Pt() { + var t = w(this).host; + return null === t ? "" : D(t); + }, + Lt = function Lt() { + var t = w(this).port; + return null === t ? "" : String(t); + }, + Tt = function Tt() { + var t = w(this), + n = t.path; + return t.cannotBeABaseURL ? n[0] : n.length ? "/" + n.join("/") : ""; + }, + _t = function _t() { + var t = w(this).query; + return t ? "?" + t : ""; + }, + Ut = function Ut() { + return w(this).searchParams; + }, + Nt = function Nt() { + var t = w(this).fragment; + return t ? "#" + t : ""; + }, + Ct = function Ct(t, n) { + return { + get: t, + set: n, + configurable: !0, + enumerable: !0 + }; + }; + if (i && c(wt, { + href: Ct(Ot, function (t) { + var n = w(this), + e = String(t), + r = St(n, e); + if (r) throw TypeError(r); + S(n.searchParams).updateSearchParams(n.query); + }), + origin: Ct(Rt), + protocol: Ct(At, function (t) { + var n = w(this); + St(n, String(t) + ":", tt); + }), + username: Ct(jt, function (t) { + var n = w(this), + e = h(String(t)); + if (!K(n)) { + n.username = ""; + for (var r = 0; r < e.length; r++) n.username += G(e[r], $); + } + }), + password: Ct(It, function (t) { + var n = w(this), + e = h(String(t)); + if (!K(n)) { + n.password = ""; + for (var r = 0; r < e.length; r++) n.password += G(e[r], $); + } + }), + host: Ct(kt, function (t) { + var n = w(this); + n.cannotBeABaseURL || St(n, String(t), st); + }), + hostname: Ct(Pt, function (t) { + var n = w(this); + n.cannotBeABaseURL || St(n, String(t), lt); + }), + port: Ct(Lt, function (t) { + var n = w(this); + K(n) || ("" == (t = String(t)) ? n.port = null : St(n, t, pt)); + }), + pathname: Ct(Tt, function (t) { + var n = w(this); + n.cannotBeABaseURL || (n.path = [], St(n, t + "", dt)); + }), + search: Ct(_t, function (t) { + var n = w(this); + "" == (t = String(t)) ? n.query = null : ("?" == t.charAt(0) && (t = t.slice(1)), n.query = "", St(n, t, mt)), S(n.searchParams).updateSearchParams(n.query); + }), + searchParams: Ct(Ut), + hash: Ct(Nt, function (t) { + var n = w(this); + "" != (t = String(t)) ? ("#" == t.charAt(0) && (t = t.slice(1)), n.fragment = "", St(n, t, bt)) : n.fragment = null; + }) + }), f(wt, "toJSON", function () { + return Ot.call(this); + }, { + enumerable: !0 + }), f(wt, "toString", function () { + return Ot.call(this); + }, { + enumerable: !0 + }), m) { + var Ft = m.createObjectURL, + Mt = m.revokeObjectURL; + Ft && f(_Et, "createObjectURL", function (t) { + return Ft.apply(m, arguments); + }), Mt && f(_Et, "revokeObjectURL", function (t) { + return Mt.apply(m, arguments); + }); + } + d(_Et, "URL"), o({ + global: !0, + forced: !a, + sham: !i + }, { + URL: _Et + }); + }, function (t, n, e) { + var r = e(6), + o = e(49), + i = e(29), + a = o("iterator"); + t.exports = !r(function () { + var t = new URL("b?a=1&b=2&c=3", "http://a"), + n = t.searchParams, + e = ""; + return t.pathname = "c%20d", n.forEach(function (t, r) { + n.delete("b"), e += r + t; + }), i && !t.toJSON || !n.sort || "http://a/c%20d?a=1&c=3" !== t.href || "3" !== n.get("c") || "a=1" !== String(new URLSearchParams("?a=1")) || !n[a] || "a" !== new URL("https://a@b").username || "b" !== new URLSearchParams(new URLSearchParams("a=b")).get("a") || "xn--e1aybc" !== new URL("http://теÑÑ‚").host || "#%D0%B1" !== new URL("http://a#б").hash || "a1c3" !== e || "x" !== new URL("http://x", void 0).host; + }); + }, function (t, n, e) { + var r = /[^\0-\u007E]/, + o = /[.\u3002\uFF0E\uFF61]/g, + i = "Overflow: input needs wider integers to process", + a = Math.floor, + u = String.fromCharCode, + c = function c(t) { + return t + 22 + 75 * (t < 26); + }, + f = function f(t, n, e) { + var r = 0; + for (t = e ? a(t / 700) : t >> 1, t += a(t / n); t > 455; r += 36) t = a(t / 35); + return a(r + 36 * t / (t + 38)); + }, + s = function s(t) { + var n, + e, + r = [], + o = (t = function (t) { + for (var n = [], e = 0, r = t.length; e < r;) { + var o = t.charCodeAt(e++); + if (o >= 55296 && o <= 56319 && e < r) { + var i = t.charCodeAt(e++); + 56320 == (64512 & i) ? n.push(((1023 & o) << 10) + (1023 & i) + 65536) : (n.push(o), e--); + } else n.push(o); + } + return n; + }(t)).length, + s = 128, + l = 0, + p = 72; + for (n = 0; n < t.length; n++) (e = t[n]) < 128 && r.push(u(e)); + var h = r.length, + v = h; + for (h && r.push("-"); v < o;) { + var g = 2147483647; + for (n = 0; n < t.length; n++) (e = t[n]) >= s && e < g && (g = e); + var d = v + 1; + if (g - s > a((2147483647 - l) / d)) throw RangeError(i); + for (l += (g - s) * d, s = g, n = 0; n < t.length; n++) { + if ((e = t[n]) < s && ++l > 2147483647) throw RangeError(i); + if (e == s) { + for (var y = l, x = 36;; x += 36) { + var m = x <= p ? 1 : x >= p + 26 ? 26 : x - p; + if (y < m) break; + var b = y - m, + S = 36 - m; + r.push(u(c(m + b % S))), y = a(b / S); + } + r.push(u(c(y))), p = f(l, d, v == h), l = 0, ++v; + } + } + ++l, ++s; + } + return r.join(""); + }; + t.exports = function (t) { + var n, + e, + i = [], + a = t.toLowerCase().replace(o, ".").split("."); + for (n = 0; n < a.length; n++) e = a[n], i.push(r.test(e) ? "xn--" + s(e) : e); + return i.join("."); + }; + }, function (t, n, e) { + e(89); + var r = e(2), + o = e(34), + i = e(244), + a = e(21), + u = e(126), + c = e(95), + f = e(91), + s = e(25), + l = e(123), + p = e(15), + h = e(64), + v = e(84), + g = e(20), + d = e(14), + y = e(58), + x = e(8), + m = e(247), + b = e(83), + S = e(49), + E = o("fetch"), + w = o("Headers"), + O = S("iterator"), + R = s.set, + A = s.getterFor("URLSearchParams"), + j = s.getterFor("URLSearchParamsIterator"), + I = /\+/g, + k = Array(4), + P = function P(t) { + return k[t - 1] || (k[t - 1] = RegExp("((?:%[\\da-f]{2}){" + t + "})", "gi")); + }, + L = function L(t) { + try { + return decodeURIComponent(t); + } catch (n) { + return t; + } + }, + T = function T(t) { + var n = t.replace(I, " "), + e = 4; + try { + return decodeURIComponent(n); + } catch (t) { + for (; e;) n = n.replace(P(e--), L); + return n; + } + }, + _ = /[!'()~]|%20/g, + U = { + "!": "%21", + "'": "%27", + "(": "%28", + ")": "%29", + "~": "%7E", + "%20": "+" + }, + N = function N(t) { + return U[t]; + }, + C = function C(t) { + return encodeURIComponent(t).replace(_, N); + }, + F = function F(t, n) { + if (n) for (var e, r, o = n.split("&"), i = 0; i < o.length;) (e = o[i++]).length && (r = e.split("="), t.push({ + key: T(r.shift()), + value: T(r.join("=")) + })); + }, + M = function M(t) { + this.entries.length = 0, F(this.entries, t); + }, + z = function z(t, n) { + if (t < n) throw TypeError("Not enough arguments"); + }, + D = f(function (t, n) { + R(this, { + type: "URLSearchParamsIterator", + iterator: m(A(t).entries), + kind: n + }); + }, "Iterator", function () { + var t = j(this), + n = t.kind, + e = t.iterator.next(), + r = e.value; + return e.done || (e.value = "keys" === n ? r.key : "values" === n ? r.value : [r.key, r.value]), e; + }), + _q = function q() { + l(this, _q, "URLSearchParams"); + var t, + n, + e, + r, + o, + i, + a, + u, + c, + f = arguments.length > 0 ? arguments[0] : void 0, + s = this, + h = []; + if (R(s, { + type: "URLSearchParams", + entries: h, + updateURL: function updateURL() {}, + updateSearchParams: M + }), void 0 !== f) if (d(f)) { + if ("function" == typeof (t = b(f))) for (e = (n = t.call(f)).next; !(r = e.call(n)).done;) { + if ((a = (i = (o = m(g(r.value))).next).call(o)).done || (u = i.call(o)).done || !i.call(o).done) throw TypeError("Expected sequence with length 2"); + h.push({ + key: a.value + "", + value: u.value + "" + }); + } else for (c in f) p(f, c) && h.push({ + key: c, + value: f[c] + "" + }); + } else F(h, "string" == typeof f ? "?" === f.charAt(0) ? f.slice(1) : f : f + ""); + }, + B = _q.prototype; + u(B, { + append: function append(t, n) { + z(arguments.length, 2); + var e = A(this); + e.entries.push({ + key: t + "", + value: n + "" + }), e.updateURL(); + }, + delete: function _delete(t) { + z(arguments.length, 1); + for (var n = A(this), e = n.entries, r = t + "", o = 0; o < e.length;) e[o].key === r ? e.splice(o, 1) : o++; + n.updateURL(); + }, + get: function get(t) { + z(arguments.length, 1); + for (var n = A(this).entries, e = t + "", r = 0; r < n.length; r++) if (n[r].key === e) return n[r].value; + return null; + }, + getAll: function getAll(t) { + z(arguments.length, 1); + for (var n = A(this).entries, e = t + "", r = [], o = 0; o < n.length; o++) n[o].key === e && r.push(n[o].value); + return r; + }, + has: function has(t) { + z(arguments.length, 1); + for (var n = A(this).entries, e = t + "", r = 0; r < n.length;) if (n[r++].key === e) return !0; + return !1; + }, + set: function set(t, n) { + z(arguments.length, 1); + for (var e, r = A(this), o = r.entries, i = !1, a = t + "", u = n + "", c = 0; c < o.length; c++) (e = o[c]).key === a && (i ? o.splice(c--, 1) : (i = !0, e.value = u)); + i || o.push({ + key: a, + value: u + }), r.updateURL(); + }, + sort: function sort() { + var t, + n, + e, + r = A(this), + o = r.entries, + i = o.slice(); + for (o.length = 0, e = 0; e < i.length; e++) { + for (t = i[e], n = 0; n < e; n++) if (o[n].key > t.key) { + o.splice(n, 0, t); + break; + } + n === e && o.push(t); + } + r.updateURL(); + }, + forEach: function forEach(t) { + for (var n, e = A(this).entries, r = h(t, arguments.length > 1 ? arguments[1] : void 0, 3), o = 0; o < e.length;) r((n = e[o++]).value, n.key, this); + }, + keys: function keys() { + return new D(this, "keys"); + }, + values: function values() { + return new D(this, "values"); + }, + entries: function entries() { + return new D(this, "entries"); + } + }, { + enumerable: !0 + }), a(B, O, B.entries), a(B, "toString", function () { + for (var t, n = A(this).entries, e = [], r = 0; r < n.length;) t = n[r++], e.push(C(t.key) + "=" + C(t.value)); + return e.join("&"); + }, { + enumerable: !0 + }), c(_q, "URLSearchParams"), r({ + global: !0, + forced: !i + }, { + URLSearchParams: _q + }), i || "function" != typeof E || "function" != typeof w || r({ + global: !0, + enumerable: !0, + forced: !0 + }, { + fetch: function fetch(t) { + var n, + e, + r, + o = [t]; + return arguments.length > 1 && (n = arguments[1], d(n) && (e = n.body, "URLSearchParams" === v(e) && ((r = n.headers ? new w(n.headers) : new w()).has("content-type") || r.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"), n = y(n, { + body: x(0, String(e)), + headers: x(0, r) + }))), o.push(n)), E.apply(this, o); + } + }), t.exports = { + URLSearchParams: _q, + getState: A + }; + }, function (t, n, e) { + var r = e(20), + o = e(83); + t.exports = function (t) { + var n = o(t); + if ("function" != typeof n) throw TypeError(String(t) + " is not iterable"); + return r(n.call(t)); + }; + }, function (t, n, e) { + e(2)({ + target: "URL", + proto: !0, + enumerable: !0 + }, { + toJSON: function toJSON() { + return URL.prototype.toString.call(this); + } + }); + }]); + }(); + + //!fetch 3.0.0, global "this" must be replaced with "window" + // IIFE version + !function (t) { + "use strict"; + + var e = "URLSearchParams" in self, + r = "Symbol" in self && "iterator" in Symbol, + o = "FileReader" in self && "Blob" in self && function () { + try { + return new Blob(), !0; + } catch (t) { + return !1; + } + }(), + n = "FormData" in self, + i = "ArrayBuffer" in self; + if (i) var s = ["[object Int8Array]", "[object Uint8Array]", "[object Uint8ClampedArray]", "[object Int16Array]", "[object Uint16Array]", "[object Int32Array]", "[object Uint32Array]", "[object Float32Array]", "[object Float64Array]"], + a = ArrayBuffer.isView || function (t) { + return t && s.indexOf(Object.prototype.toString.call(t)) > -1; + }; + function h(t) { + if ("string" != typeof t && (t = String(t)), /[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t)) throw new TypeError("Invalid character in header field name"); + return t.toLowerCase(); + } + function u(t) { + return "string" != typeof t && (t = String(t)), t; + } + function f(t) { + var e = { + next: function next() { + var e = t.shift(); + return { + done: void 0 === e, + value: e + }; + } + }; + return r && (e[Symbol.iterator] = function () { + return e; + }), e; + } + function d(t) { + this.map = {}, t instanceof d ? t.forEach(function (t, e) { + this.append(e, t); + }, this) : Array.isArray(t) ? t.forEach(function (t) { + this.append(t[0], t[1]); + }, this) : t && Object.getOwnPropertyNames(t).forEach(function (e) { + this.append(e, t[e]); + }, this); + } + function c(t) { + if (t.bodyUsed) return Promise.reject(new TypeError("Already read")); + t.bodyUsed = !0; + } + function p(t) { + return new Promise(function (e, r) { + t.onload = function () { + e(t.result); + }, t.onerror = function () { + r(t.error); + }; + }); + } + function y(t) { + var e = new FileReader(), + r = p(e); + return e.readAsArrayBuffer(t), r; + } + function l(t) { + if (t.slice) return t.slice(0); + var e = new Uint8Array(t.byteLength); + return e.set(new Uint8Array(t)), e.buffer; + } + function b() { + return this.bodyUsed = !1, this._initBody = function (t) { + var r; + this._bodyInit = t, t ? "string" == typeof t ? this._bodyText = t : o && Blob.prototype.isPrototypeOf(t) ? this._bodyBlob = t : n && FormData.prototype.isPrototypeOf(t) ? this._bodyFormData = t : e && URLSearchParams.prototype.isPrototypeOf(t) ? this._bodyText = t.toString() : i && o && (r = t) && DataView.prototype.isPrototypeOf(r) ? (this._bodyArrayBuffer = l(t.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : i && (ArrayBuffer.prototype.isPrototypeOf(t) || a(t)) ? this._bodyArrayBuffer = l(t) : this._bodyText = t = Object.prototype.toString.call(t) : this._bodyText = "", this.headers.get("content-type") || ("string" == typeof t ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : e && URLSearchParams.prototype.isPrototypeOf(t) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8")); + }, o && (this.blob = function () { + var t = c(this); + if (t) return t; + if (this._bodyBlob) return Promise.resolve(this._bodyBlob); + if (this._bodyArrayBuffer) return Promise.resolve(new Blob([this._bodyArrayBuffer])); + if (this._bodyFormData) throw new Error("could not read FormData body as blob"); + return Promise.resolve(new Blob([this._bodyText])); + }, this.arrayBuffer = function () { + return this._bodyArrayBuffer ? c(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(y); + }), this.text = function () { + var t, + e, + r, + o = c(this); + if (o) return o; + if (this._bodyBlob) return t = this._bodyBlob, e = new FileReader(), r = p(e), e.readAsText(t), r; + if (this._bodyArrayBuffer) return Promise.resolve(function (t) { + for (var e = new Uint8Array(t), r = new Array(e.length), o = 0; o < e.length; o++) r[o] = String.fromCharCode(e[o]); + return r.join(""); + }(this._bodyArrayBuffer)); + if (this._bodyFormData) throw new Error("could not read FormData body as text"); + return Promise.resolve(this._bodyText); + }, n && (this.formData = function () { + return this.text().then(v); + }), this.json = function () { + return this.text().then(JSON.parse); + }, this; + } + d.prototype.append = function (t, e) { + t = h(t), e = u(e); + var r = this.map[t]; + this.map[t] = r ? r + ", " + e : e; + }, d.prototype.delete = function (t) { + delete this.map[h(t)]; + }, d.prototype.get = function (t) { + return t = h(t), this.has(t) ? this.map[t] : null; + }, d.prototype.has = function (t) { + return this.map.hasOwnProperty(h(t)); + }, d.prototype.set = function (t, e) { + this.map[h(t)] = u(e); + }, d.prototype.forEach = function (t, e) { + for (var r in this.map) this.map.hasOwnProperty(r) && t.call(e, this.map[r], r, this); + }, d.prototype.keys = function () { + var t = []; + return this.forEach(function (e, r) { + t.push(r); + }), f(t); + }, d.prototype.values = function () { + var t = []; + return this.forEach(function (e) { + t.push(e); + }), f(t); + }, d.prototype.entries = function () { + var t = []; + return this.forEach(function (e, r) { + t.push([r, e]); + }), f(t); + }, r && (d.prototype[Symbol.iterator] = d.prototype.entries); + var m = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"]; + function w(t, e) { + var r, + o, + n = (e = e || {}).body; + if (t instanceof w) { + if (t.bodyUsed) throw new TypeError("Already read"); + this.url = t.url, this.credentials = t.credentials, e.headers || (this.headers = new d(t.headers)), this.method = t.method, this.mode = t.mode, this.signal = t.signal, n || null == t._bodyInit || (n = t._bodyInit, t.bodyUsed = !0); + } else this.url = String(t); + if (this.credentials = e.credentials || this.credentials || "same-origin", !e.headers && this.headers || (this.headers = new d(e.headers)), this.method = (r = e.method || this.method || "GET", o = r.toUpperCase(), m.indexOf(o) > -1 ? o : r), this.mode = e.mode || this.mode || null, this.signal = e.signal || this.signal, this.referrer = null, ("GET" === this.method || "HEAD" === this.method) && n) throw new TypeError("Body not allowed for GET or HEAD requests"); + this._initBody(n); + } + function v(t) { + var e = new FormData(); + return t.trim().split("&").forEach(function (t) { + if (t) { + var r = t.split("="), + o = r.shift().replace(/\+/g, " "), + n = r.join("=").replace(/\+/g, " "); + e.append(decodeURIComponent(o), decodeURIComponent(n)); + } + }), e; + } + function E(t, e) { + e || (e = {}), this.type = "default", this.status = void 0 === e.status ? 200 : e.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = "statusText" in e ? e.statusText : "OK", this.headers = new d(e.headers), this.url = e.url || "", this._initBody(t); + } + w.prototype.clone = function () { + return new w(this, { + body: this._bodyInit + }); + }, b.call(w.prototype), b.call(E.prototype), E.prototype.clone = function () { + return new E(this._bodyInit, { + status: this.status, + statusText: this.statusText, + headers: new d(this.headers), + url: this.url + }); + }, E.error = function () { + var t = new E(null, { + status: 0, + statusText: "" + }); + return t.type = "error", t; + }; + var A = [301, 302, 303, 307, 308]; + E.redirect = function (t, e) { + if (-1 === A.indexOf(e)) throw new RangeError("Invalid status code"); + return new E(null, { + status: e, + headers: { + location: t + } + }); + }, t.DOMException = self.DOMException; + try { + new t.DOMException(); + } catch (e) { + t.DOMException = function (t, e) { + this.message = t, this.name = e; + var r = Error(t); + this.stack = r.stack; + }, t.DOMException.prototype = Object.create(Error.prototype), t.DOMException.prototype.constructor = t.DOMException; + } + function _(e, r) { + return new Promise(function (n, i) { + var s = new w(e, r); + if (s.signal && s.signal.aborted) return i(new t.DOMException("Aborted", "AbortError")); + var a = new XMLHttpRequest(); + function h() { + a.abort(); + } + a.onload = function () { + var t, + e, + r = { + status: a.status, + statusText: a.statusText, + headers: (t = a.getAllResponseHeaders() || "", e = new d(), t.replace(/\r?\n[\t ]+/g, " ").split(/\r?\n/).forEach(function (t) { + var r = t.split(":"), + o = r.shift().trim(); + if (o) { + var n = r.join(":").trim(); + e.append(o, n); + } + }), e) + }; + r.url = "responseURL" in a ? a.responseURL : r.headers.get("X-Request-URL"); + var o = "response" in a ? a.response : a.responseText; + n(new E(o, r)); + }, a.onerror = function () { + i(new TypeError("Network request failed")); + }, a.ontimeout = function () { + i(new TypeError("Network request failed")); + }, a.onabort = function () { + i(new t.DOMException("Aborted", "AbortError")); + }, a.open(s.method, s.url, !0), "include" === s.credentials ? a.withCredentials = !0 : "omit" === s.credentials && (a.withCredentials = !1), "responseType" in a && o && (a.responseType = "blob"), s.headers.forEach(function (t, e) { + a.setRequestHeader(e, t); + }), s.signal && (s.signal.addEventListener("abort", h), a.onreadystatechange = function () { + 4 === a.readyState && s.signal.removeEventListener("abort", h); + }), a.send(void 0 === s._bodyInit ? null : s._bodyInit); + }); + } + _.polyfill = !0, self.fetch || (self.fetch = _, self.Headers = d, self.Request = w, self.Response = E), t.Headers = d, t.Request = w, t.Response = E, t.fetch = _; + }({}); + (function () { + /* + Copyright (c) 2016 The Polymer Project Authors. All rights reserved. + This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + Code distributed by Google as part of the polymer project is also + subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt + */ + 'use strict'; + + var aa = new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ")); + function g(a) { + var b = aa.has(a); + a = /^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(a); + return !b && a; + } + function l(a) { + var b = a.isConnected; + if (void 0 !== b) return b; + for (; a && !(a.__CE_isImportDocument || a instanceof Document);) a = a.parentNode || (window.ShadowRoot && a instanceof ShadowRoot ? a.host : void 0); + return !(!a || !(a.__CE_isImportDocument || a instanceof Document)); + } + function n(a, b) { + for (; b && b !== a && !b.nextSibling;) b = b.parentNode; + return b && b !== a ? b.nextSibling : null; + } + function p(a, b, d) { + d = void 0 === d ? new Set() : d; + for (var c = a; c;) { + if (c.nodeType === Node.ELEMENT_NODE) { + var e = c; + b(e); + var f = e.localName; + if ("link" === f && "import" === e.getAttribute("rel")) { + c = e.import; + if (c instanceof Node && !d.has(c)) for (d.add(c), c = c.firstChild; c; c = c.nextSibling) p(c, b, d); + c = n(a, e); + continue; + } else if ("template" === f) { + c = n(a, e); + continue; + } + if (e = e.__CE_shadowRoot) for (e = e.firstChild; e; e = e.nextSibling) p(e, b, d); + } + c = c.firstChild ? c.firstChild : n(a, c); + } + } + function r(a, b, d) { + a[b] = d; + } + ; + function u() { + this.a = new Map(); + this.g = new Map(); + this.c = []; + this.f = []; + this.b = !1; + } + function ba(a, b, d) { + a.a.set(b, d); + a.g.set(d.constructorFunction, d); + } + function ca(a, b) { + a.b = !0; + a.c.push(b); + } + function da(a, b) { + a.b = !0; + a.f.push(b); + } + function v(a, b) { + a.b && p(b, function (b) { + return w(a, b); + }); + } + function w(a, b) { + if (a.b && !b.__CE_patched) { + b.__CE_patched = !0; + for (var d = 0; d < a.c.length; d++) a.c[d](b); + for (d = 0; d < a.f.length; d++) a.f[d](b); + } + } + function x(a, b) { + var d = []; + p(b, function (b) { + return d.push(b); + }); + for (b = 0; b < d.length; b++) { + var c = d[b]; + 1 === c.__CE_state ? a.connectedCallback(c) : y(a, c); + } + } + function z(a, b) { + var d = []; + p(b, function (b) { + return d.push(b); + }); + for (b = 0; b < d.length; b++) { + var c = d[b]; + 1 === c.__CE_state && a.disconnectedCallback(c); + } + } + function A(a, b, d) { + d = void 0 === d ? {} : d; + var c = d.u || new Set(), + e = d.i || function (b) { + return y(a, b); + }, + f = []; + p(b, function (b) { + if ("link" === b.localName && "import" === b.getAttribute("rel")) { + var d = b.import; + d instanceof Node && (d.__CE_isImportDocument = !0, d.__CE_hasRegistry = !0); + d && "complete" === d.readyState ? d.__CE_documentLoadHandled = !0 : b.addEventListener("load", function () { + var d = b.import; + if (!d.__CE_documentLoadHandled) { + d.__CE_documentLoadHandled = !0; + var f = new Set(c); + f.delete(d); + A(a, d, { + u: f, + i: e + }); + } + }); + } else f.push(b); + }, c); + if (a.b) for (b = 0; b < f.length; b++) w(a, f[b]); + for (b = 0; b < f.length; b++) e(f[b]); + } + function y(a, b) { + if (void 0 === b.__CE_state) { + var d = b.ownerDocument; + if (d.defaultView || d.__CE_isImportDocument && d.__CE_hasRegistry) if (d = a.a.get(b.localName)) { + d.constructionStack.push(b); + var c = d.constructorFunction; + try { + try { + if (new c() !== b) throw Error("The custom element constructor did not produce the element being upgraded."); + } finally { + d.constructionStack.pop(); + } + } catch (t) { + throw b.__CE_state = 2, t; + } + b.__CE_state = 1; + b.__CE_definition = d; + if (d.attributeChangedCallback) for (d = d.observedAttributes, c = 0; c < d.length; c++) { + var e = d[c], + f = b.getAttribute(e); + null !== f && a.attributeChangedCallback(b, e, null, f, null); + } + l(b) && a.connectedCallback(b); + } + } + } + u.prototype.connectedCallback = function (a) { + var b = a.__CE_definition; + b.connectedCallback && b.connectedCallback.call(a); + }; + u.prototype.disconnectedCallback = function (a) { + var b = a.__CE_definition; + b.disconnectedCallback && b.disconnectedCallback.call(a); + }; + u.prototype.attributeChangedCallback = function (a, b, d, c, e) { + var f = a.__CE_definition; + f.attributeChangedCallback && -1 < f.observedAttributes.indexOf(b) && f.attributeChangedCallback.call(a, b, d, c, e); + }; + function B(a) { + var b = document; + this.c = a; + this.a = b; + this.b = void 0; + A(this.c, this.a); + "loading" === this.a.readyState && (this.b = new MutationObserver(this.f.bind(this)), this.b.observe(this.a, { + childList: !0, + subtree: !0 + })); + } + function C(a) { + a.b && a.b.disconnect(); + } + B.prototype.f = function (a) { + var b = this.a.readyState; + "interactive" !== b && "complete" !== b || C(this); + for (b = 0; b < a.length; b++) for (var d = a[b].addedNodes, c = 0; c < d.length; c++) A(this.c, d[c]); + }; + function ea() { + var a = this; + this.b = this.a = void 0; + this.c = new Promise(function (b) { + a.b = b; + a.a && b(a.a); + }); + } + function D(a) { + if (a.a) throw Error("Already resolved."); + a.a = void 0; + a.b && a.b(void 0); + } + ; + function E(a) { + this.c = !1; + this.a = a; + this.j = new Map(); + this.f = function (b) { + return b(); + }; + this.b = !1; + this.g = []; + this.o = new B(a); + } + E.prototype.l = function (a, b) { + var d = this; + if (!(b instanceof Function)) throw new TypeError("Custom element constructors must be functions."); + if (!g(a)) throw new SyntaxError("The element name '" + a + "' is not valid."); + if (this.a.a.get(a)) throw Error("A custom element with name '" + a + "' has already been defined."); + if (this.c) throw Error("A custom element is already being defined."); + this.c = !0; + try { + var c = function c(b) { + var a = e[b]; + if (void 0 !== a && !(a instanceof Function)) throw Error("The '" + b + "' callback must be a function."); + return a; + }, + e = b.prototype; + if (!(e instanceof Object)) throw new TypeError("The custom element constructor's prototype is not an object."); + var f = c("connectedCallback"); + var t = c("disconnectedCallback"); + var k = c("adoptedCallback"); + var h = c("attributeChangedCallback"); + var m = b.observedAttributes || []; + } catch (q) { + return; + } finally { + this.c = !1; + } + b = { + localName: a, + constructorFunction: b, + connectedCallback: f, + disconnectedCallback: t, + adoptedCallback: k, + attributeChangedCallback: h, + observedAttributes: m, + constructionStack: [] + }; + ba(this.a, a, b); + this.g.push(b); + this.b || (this.b = !0, this.f(function () { + return fa(d); + })); + }; + E.prototype.i = function (a) { + A(this.a, a); + }; + function fa(a) { + if (!1 !== a.b) { + a.b = !1; + for (var b = a.g, d = [], c = new Map(), e = 0; e < b.length; e++) c.set(b[e].localName, []); + A(a.a, document, { + i: function i(b) { + if (void 0 === b.__CE_state) { + var e = b.localName, + f = c.get(e); + f ? f.push(b) : a.a.a.get(e) && d.push(b); + } + } + }); + for (e = 0; e < d.length; e++) y(a.a, d[e]); + for (; 0 < b.length;) { + var f = b.shift(); + e = f.localName; + f = c.get(f.localName); + for (var t = 0; t < f.length; t++) y(a.a, f[t]); + (e = a.j.get(e)) && D(e); + } + } + } + E.prototype.get = function (a) { + if (a = this.a.a.get(a)) return a.constructorFunction; + }; + E.prototype.m = function (a) { + if (!g(a)) return Promise.reject(new SyntaxError("'" + a + "' is not a valid custom element name.")); + var b = this.j.get(a); + if (b) return b.c; + b = new ea(); + this.j.set(a, b); + this.a.a.get(a) && !this.g.some(function (b) { + return b.localName === a; + }) && D(b); + return b.c; + }; + E.prototype.s = function (a) { + C(this.o); + var b = this.f; + this.f = function (d) { + return a(function () { + return b(d); + }); + }; + }; + window.CustomElementRegistry = E; + E.prototype.define = E.prototype.l; + E.prototype.upgrade = E.prototype.i; + E.prototype.get = E.prototype.get; + E.prototype.whenDefined = E.prototype.m; + E.prototype.polyfillWrapFlushCallback = E.prototype.s; + var F = window.Document.prototype.createElement, + G = window.Document.prototype.createElementNS, + ha = window.Document.prototype.importNode, + ia = window.Document.prototype.prepend, + ja = window.Document.prototype.append, + ka = window.DocumentFragment.prototype.prepend, + la = window.DocumentFragment.prototype.append, + H = window.Node.prototype.cloneNode, + I = window.Node.prototype.appendChild, + J = window.Node.prototype.insertBefore, + K = window.Node.prototype.removeChild, + L = window.Node.prototype.replaceChild, + M = Object.getOwnPropertyDescriptor(window.Node.prototype, "textContent"), + N = window.Element.prototype.attachShadow, + O = Object.getOwnPropertyDescriptor(window.Element.prototype, "innerHTML"), + P = window.Element.prototype.getAttribute, + Q = window.Element.prototype.setAttribute, + R = window.Element.prototype.removeAttribute, + S = window.Element.prototype.getAttributeNS, + T = window.Element.prototype.setAttributeNS, + U = window.Element.prototype.removeAttributeNS, + ma = window.Element.prototype.insertAdjacentElement, + na = window.Element.prototype.insertAdjacentHTML, + oa = window.Element.prototype.prepend, + pa = window.Element.prototype.append, + V = window.Element.prototype.before, + qa = window.Element.prototype.after, + ra = window.Element.prototype.replaceWith, + sa = window.Element.prototype.remove, + ta = window.HTMLElement, + W = Object.getOwnPropertyDescriptor(window.HTMLElement.prototype, "innerHTML"), + ua = window.HTMLElement.prototype.insertAdjacentElement, + va = window.HTMLElement.prototype.insertAdjacentHTML; + var wa = new function () {}(); + function xa() { + var a = X; + window.HTMLElement = function () { + function b() { + var b = this.constructor, + c = a.g.get(b); + if (!c) throw Error("The custom element being constructed was not registered with `customElements`."); + var e = c.constructionStack; + if (0 === e.length) return e = F.call(document, c.localName), Object.setPrototypeOf(e, b.prototype), e.__CE_state = 1, e.__CE_definition = c, w(a, e), e; + c = e.length - 1; + var f = e[c]; + if (f === wa) throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times."); + e[c] = wa; + Object.setPrototypeOf(f, b.prototype); + w(a, f); + return f; + } + b.prototype = ta.prototype; + Object.defineProperty(b.prototype, "constructor", { + writable: !0, + configurable: !0, + enumerable: !1, + value: b + }); + return b; + }(); + } + ; + function Y(a, b, d) { + function c(b) { + return function (d) { + for (var e = [], c = 0; c < arguments.length; ++c) e[c] = arguments[c]; + c = []; + for (var f = [], m = 0; m < e.length; m++) { + var q = e[m]; + q instanceof Element && l(q) && f.push(q); + if (q instanceof DocumentFragment) for (q = q.firstChild; q; q = q.nextSibling) c.push(q);else c.push(q); + } + b.apply(this, e); + for (e = 0; e < f.length; e++) z(a, f[e]); + if (l(this)) for (e = 0; e < c.length; e++) f = c[e], f instanceof Element && x(a, f); + }; + } + void 0 !== d.h && (b.prepend = c(d.h)); + void 0 !== d.append && (b.append = c(d.append)); + } + ; + function ya() { + var a = X; + r(Document.prototype, "createElement", function (b) { + if (this.__CE_hasRegistry) { + var d = a.a.get(b); + if (d) return new d.constructorFunction(); + } + b = F.call(this, b); + w(a, b); + return b; + }); + r(Document.prototype, "importNode", function (b, d) { + b = ha.call(this, b, !!d); + this.__CE_hasRegistry ? A(a, b) : v(a, b); + return b; + }); + r(Document.prototype, "createElementNS", function (b, d) { + if (this.__CE_hasRegistry && (null === b || "http://www.w3.org/1999/xhtml" === b)) { + var c = a.a.get(d); + if (c) return new c.constructorFunction(); + } + b = G.call(this, b, d); + w(a, b); + return b; + }); + Y(a, Document.prototype, { + h: ia, + append: ja + }); + } + ; + function za() { + function a(a, c) { + Object.defineProperty(a, "textContent", { + enumerable: c.enumerable, + configurable: !0, + get: c.get, + set: function set(a) { + if (this.nodeType === Node.TEXT_NODE) c.set.call(this, a);else { + var d = void 0; + if (this.firstChild) { + var e = this.childNodes, + k = e.length; + if (0 < k && l(this)) { + d = Array(k); + for (var h = 0; h < k; h++) d[h] = e[h]; + } + } + c.set.call(this, a); + if (d) for (a = 0; a < d.length; a++) z(b, d[a]); + } + } + }); + } + var b = X; + r(Node.prototype, "insertBefore", function (a, c) { + if (a instanceof DocumentFragment) { + var e = Array.prototype.slice.apply(a.childNodes); + a = J.call(this, a, c); + if (l(this)) for (c = 0; c < e.length; c++) x(b, e[c]); + return a; + } + e = l(a); + c = J.call(this, a, c); + e && z(b, a); + l(this) && x(b, a); + return c; + }); + r(Node.prototype, "appendChild", function (a) { + if (a instanceof DocumentFragment) { + var c = Array.prototype.slice.apply(a.childNodes); + a = I.call(this, a); + if (l(this)) for (var e = 0; e < c.length; e++) x(b, c[e]); + return a; + } + c = l(a); + e = I.call(this, a); + c && z(b, a); + l(this) && x(b, a); + return e; + }); + r(Node.prototype, "cloneNode", function (a) { + a = H.call(this, !!a); + this.ownerDocument.__CE_hasRegistry ? A(b, a) : v(b, a); + return a; + }); + r(Node.prototype, "removeChild", function (a) { + var c = l(a), + e = K.call(this, a); + c && z(b, a); + return e; + }); + r(Node.prototype, "replaceChild", function (a, c) { + if (a instanceof DocumentFragment) { + var e = Array.prototype.slice.apply(a.childNodes); + a = L.call(this, a, c); + if (l(this)) for (z(b, c), c = 0; c < e.length; c++) x(b, e[c]); + return a; + } + e = l(a); + var f = L.call(this, a, c), + d = l(this); + d && z(b, c); + e && z(b, a); + d && x(b, a); + return f; + }); + M && M.get ? a(Node.prototype, M) : ca(b, function (b) { + a(b, { + enumerable: !0, + configurable: !0, + get: function get() { + for (var a = [], b = 0; b < this.childNodes.length; b++) { + var f = this.childNodes[b]; + f.nodeType !== Node.COMMENT_NODE && a.push(f.textContent); + } + return a.join(""); + }, + set: function set(a) { + for (; this.firstChild;) K.call(this, this.firstChild); + null != a && "" !== a && I.call(this, document.createTextNode(a)); + } + }); + }); + } + ; + function Aa(a) { + function b(b) { + return function (e) { + for (var c = [], d = 0; d < arguments.length; ++d) c[d] = arguments[d]; + d = []; + for (var k = [], h = 0; h < c.length; h++) { + var m = c[h]; + m instanceof Element && l(m) && k.push(m); + if (m instanceof DocumentFragment) for (m = m.firstChild; m; m = m.nextSibling) d.push(m);else d.push(m); + } + b.apply(this, c); + for (c = 0; c < k.length; c++) z(a, k[c]); + if (l(this)) for (c = 0; c < d.length; c++) k = d[c], k instanceof Element && x(a, k); + }; + } + var d = Element.prototype; + void 0 !== V && (d.before = b(V)); + void 0 !== V && (d.after = b(qa)); + void 0 !== ra && r(d, "replaceWith", function (b) { + for (var e = [], c = 0; c < arguments.length; ++c) e[c] = arguments[c]; + c = []; + for (var d = [], k = 0; k < e.length; k++) { + var h = e[k]; + h instanceof Element && l(h) && d.push(h); + if (h instanceof DocumentFragment) for (h = h.firstChild; h; h = h.nextSibling) c.push(h);else c.push(h); + } + k = l(this); + ra.apply(this, e); + for (e = 0; e < d.length; e++) z(a, d[e]); + if (k) for (z(a, this), e = 0; e < c.length; e++) d = c[e], d instanceof Element && x(a, d); + }); + void 0 !== sa && r(d, "remove", function () { + var b = l(this); + sa.call(this); + b && z(a, this); + }); + } + ; + function Ba() { + function a(a, b) { + Object.defineProperty(a, "innerHTML", { + enumerable: b.enumerable, + configurable: !0, + get: b.get, + set: function set(a) { + var e = this, + d = void 0; + l(this) && (d = [], p(this, function (a) { + a !== e && d.push(a); + })); + b.set.call(this, a); + if (d) for (var f = 0; f < d.length; f++) { + var t = d[f]; + 1 === t.__CE_state && c.disconnectedCallback(t); + } + this.ownerDocument.__CE_hasRegistry ? A(c, this) : v(c, this); + return a; + } + }); + } + function b(a, b) { + r(a, "insertAdjacentElement", function (a, e) { + var d = l(e); + a = b.call(this, a, e); + d && z(c, e); + l(a) && x(c, e); + return a; + }); + } + function d(a, b) { + function e(a, b) { + for (var e = []; a !== b; a = a.nextSibling) e.push(a); + for (b = 0; b < e.length; b++) A(c, e[b]); + } + r(a, "insertAdjacentHTML", function (a, c) { + a = a.toLowerCase(); + if ("beforebegin" === a) { + var d = this.previousSibling; + b.call(this, a, c); + e(d || this.parentNode.firstChild, this); + } else if ("afterbegin" === a) d = this.firstChild, b.call(this, a, c), e(this.firstChild, d);else if ("beforeend" === a) d = this.lastChild, b.call(this, a, c), e(d || this.firstChild, null);else if ("afterend" === a) d = this.nextSibling, b.call(this, a, c), e(this.nextSibling, d);else throw new SyntaxError("The value provided (" + String(a) + ") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'."); + }); + } + var c = X; + N && r(Element.prototype, "attachShadow", function (a) { + a = N.call(this, a); + var b = c; + if (b.b && !a.__CE_patched) { + a.__CE_patched = !0; + for (var e = 0; e < b.c.length; e++) b.c[e](a); + } + return this.__CE_shadowRoot = a; + }); + O && O.get ? a(Element.prototype, O) : W && W.get ? a(HTMLElement.prototype, W) : da(c, function (b) { + a(b, { + enumerable: !0, + configurable: !0, + get: function get() { + return H.call(this, !0).innerHTML; + }, + set: function set(a) { + var b = "template" === this.localName, + c = b ? this.content : this, + e = G.call(document, this.namespaceURI, this.localName); + for (e.innerHTML = a; 0 < c.childNodes.length;) K.call(c, c.childNodes[0]); + for (a = b ? e.content : e; 0 < a.childNodes.length;) I.call(c, a.childNodes[0]); + } + }); + }); + r(Element.prototype, "setAttribute", function (a, b) { + if (1 !== this.__CE_state) return Q.call(this, a, b); + var e = P.call(this, a); + Q.call(this, a, b); + b = P.call(this, a); + c.attributeChangedCallback(this, a, e, b, null); + }); + r(Element.prototype, "setAttributeNS", function (a, b, d) { + if (1 !== this.__CE_state) return T.call(this, a, b, d); + var e = S.call(this, a, b); + T.call(this, a, b, d); + d = S.call(this, a, b); + c.attributeChangedCallback(this, b, e, d, a); + }); + r(Element.prototype, "removeAttribute", function (a) { + if (1 !== this.__CE_state) return R.call(this, a); + var b = P.call(this, a); + R.call(this, a); + null !== b && c.attributeChangedCallback(this, a, b, null, null); + }); + r(Element.prototype, "removeAttributeNS", function (a, b) { + if (1 !== this.__CE_state) return U.call(this, a, b); + var d = S.call(this, a, b); + U.call(this, a, b); + var e = S.call(this, a, b); + d !== e && c.attributeChangedCallback(this, b, d, e, a); + }); + ua ? b(HTMLElement.prototype, ua) : ma ? b(Element.prototype, ma) : console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."); + va ? d(HTMLElement.prototype, va) : na ? d(Element.prototype, na) : console.warn("Custom Elements: `Element#insertAdjacentHTML` was not patched."); + Y(c, Element.prototype, { + h: oa, + append: pa + }); + Aa(c); + } + ; + var Z = window.customElements; + if (!Z || Z.forcePolyfill || "function" != typeof Z.define || "function" != typeof Z.get) { + var X = new u(); + xa(); + ya(); + Y(X, DocumentFragment.prototype, { + h: ka, + append: la + }); + za(); + Ba(); + document.__CE_hasRegistry = !0; + var customElements = new E(X); + Object.defineProperty(window, "customElements", { + configurable: !0, + enumerable: !0, + value: customElements + }); + } + ; + }).call(self); + + // Polyfill document.baseURI + "string" !== typeof document.baseURI && Object.defineProperty(Document.prototype, "baseURI", { + enumerable: !0, + configurable: !0, + get: function get() { + var a = document.querySelector("base"); + return a && a.href ? a.href : document.URL; + } + }); + + // Polyfill CustomEvent + "function" !== typeof window.CustomEvent && (window.CustomEvent = function (c, a) { + a = a || { + bubbles: !1, + cancelable: !1, + detail: void 0 + }; + var b = document.createEvent("CustomEvent"); + b.initCustomEvent(c, a.bubbles, a.cancelable, a.detail); + return b; + }, window.CustomEvent.prototype = window.Event.prototype); + + // Event.composedPath + (function (b, c, d) { + b.composedPath || (b.composedPath = function () { + if (this.path) return this.path; + var a = this.target; + for (this.path = []; null !== a.parentNode;) this.path.push(a), a = a.parentNode; + this.path.push(c, d); + return this.path; + }); + })(Event.prototype, document, window); + + /*! + Element.closest and Element.matches + https://github.com/jonathantneal/closest + Creative Commons Zero v1.0 Universal + */ + (function (a) { + "function" !== typeof a.matches && (a.matches = a.msMatchesSelector || a.mozMatchesSelector || a.webkitMatchesSelector || function (a) { + a = (this.document || this.ownerDocument).querySelectorAll(a); + for (var b = 0; a[b] && a[b] !== this;) ++b; + return !!a[b]; + }); + "function" !== typeof a.closest && (a.closest = function (a) { + for (var b = this; b && 1 === b.nodeType;) { + if (b.matches(a)) return b; + b = b.parentNode; + } + return null; + }); + })(window.Element.prototype); + + /*! + Element.getRootNode() + */ + (function (c) { + function d(a) { + a = b(a); + return a && 11 === a.nodeType ? d(a.host) : a; + } + function b(a) { + return a && a.parentNode ? b(a.parentNode) : a; + } + "function" !== typeof c.getRootNode && (c.getRootNode = function (a) { + return a && a.composed ? d(this) : b(this); + }); + })(Element.prototype); + + /*! + Element.isConnected() + */ + (function (a) { + "isConnected" in a || Object.defineProperty(a, "isConnected", { + configurable: !0, + enumerable: !0, + get: function get() { + var a = this.getRootNode({ + composed: !0 + }); + return a && 9 === a.nodeType; + } + }); + })(Element.prototype); + + /*! + Element.remove() + */ + (function (b) { + b.forEach(function (a) { + a.hasOwnProperty("remove") || Object.defineProperty(a, "remove", { + configurable: !0, + enumerable: !0, + writable: !0, + value: function value() { + null !== this.parentNode && this.parentNode.removeChild(this); + } + }); + }); + })([Element.prototype, CharacterData.prototype, DocumentType.prototype]); + + /*! + Element.classList + */ + !function (e) { + 'classList' in e || Object.defineProperty(e, "classList", { + get: function get() { + var e = this, + t = (e.getAttribute("class") || "").replace(/^\s+|\s$/g, "").split(/\s+/g); + function n() { + t.length > 0 ? e.setAttribute("class", t.join(" ")) : e.removeAttribute("class"); + } + return "" === t[0] && t.splice(0, 1), t.toggle = function (e, i) { + void 0 !== i ? i ? t.add(e) : t.remove(e) : -1 !== t.indexOf(e) ? t.splice(t.indexOf(e), 1) : t.push(e), n(); + }, t.add = function () { + for (var e = [].slice.call(arguments), i = 0, s = e.length; i < s; i++) -1 === t.indexOf(e[i]) && t.push(e[i]); + n(); + }, t.remove = function () { + for (var e = [].slice.call(arguments), i = 0, s = e.length; i < s; i++) -1 !== t.indexOf(e[i]) && t.splice(t.indexOf(e[i]), 1); + n(); + }, t.item = function (e) { + return t[e]; + }, t.contains = function (e) { + return -1 !== t.indexOf(e); + }, t.replace = function (e, i) { + -1 !== t.indexOf(e) && t.splice(t.indexOf(e), 1, i), n(); + }, t.value = e.getAttribute("class") || "", t; + } + }); + }(Element.prototype); + + /*! + DOMTokenList + */ + (function (b) { + try { + document.body.classList.add(); + } catch (e) { + var c = b.add, + d = b.remove; + b.add = function () { + for (var a = 0; a < arguments.length; a++) c.call(this, arguments[a]); + }; + b.remove = function () { + for (var a = 0; a < arguments.length; a++) d.call(this, arguments[a]); + }; + } + })(DOMTokenList.prototype); + (function () { + if ("undefined" !== typeof window && void 0 !== window.Reflect && void 0 !== window.customElements) { + var a = HTMLElement; + window.HTMLElement = function () { + return Reflect.construct(a, [], this.constructor); + }; + HTMLElement.prototype = a.prototype; + HTMLElement.prototype.constructor = HTMLElement; + Object.setPrototypeOf(HTMLElement, a); + } + })(); + /** + * SystemJS 4.0.2 + * MANUAL PATCH: remove script.crossOrigin = "anonymous" + * MANUAL PATCH: add conditionally apply, n.System=n.System||new u + */ + !function () { + var e = "undefined" != typeof self, + n = e ? self : global; + var t; + if ("undefined" != typeof document) { + var e = document.querySelector("base[href]"); + e && (t = e.href); + } + if (!t && "undefined" != typeof location) { + var e = (t = location.href.split("#")[0].split("?")[0]).lastIndexOf("/"); + -1 !== e && (t = t.slice(0, e + 1)); + } + var r = /\\/g, + o = "undefined" != typeof Symbol, + i = o && Symbol.toStringTag, + c = o ? Symbol() : "@"; + function u() { + this[c] = {}; + } + var s = u.prototype; + var l; + s.import = function (e, n) { + var t = this; + return Promise.resolve(t.resolve(e, n)).then(function (e) { + var n = function e(n, t, r) { + var o = n[c][t]; + if (o) return o; + var u = [], + s = Object.create(null); + i && Object.defineProperty(s, i, { + value: "Module" + }); + var l = Promise.resolve().then(function () { + return n.instantiate(t, r); + }).then(function (e) { + if (!e) throw Error("Module " + t + " did not instantiate"); + var r = e[1](function (e, n) { + o.h = !0; + var t = !1; + if ("object" != typeof e) e in s && s[e] === n || (s[e] = n, t = !0);else for (var n in e) { + var r = e[n]; + n in s && s[n] === r || (s[n] = r, t = !0); + } + if (t) for (var e = 0; e < u.length; e++) u[e](s); + return n; + }, 2 === e[1].length ? { + import: function _import(e) { + return n.import(e, t); + }, + meta: n.createContext(t) + } : void 0); + return o.e = r.execute || function () {}, [e[0], r.setters || []]; + }); + var f = l.then(function (r) { + return Promise.all(r[0].map(function (o, i) { + var c = r[1][i]; + return Promise.resolve(n.resolve(o, t)).then(function (r) { + var o = e(n, r, t); + return Promise.resolve(o.I).then(function () { + return c && (o.i.push(c), !o.h && o.I || c(o.n)), o; + }); + }); + })).then(function (e) { + o.d = e; + }); + }); + return f.catch(function (e) { + o.e = null, o.er = e; + }), o = n[c][t] = { + id: t, + i: u, + n: s, + I: l, + L: f, + h: !1, + d: void 0, + e: void 0, + er: void 0, + E: void 0, + C: void 0 + }; + }(t, e); + return n.C || function (e, n) { + return n.C = function e(n, t, r) { + if (!r[t.id]) return r[t.id] = !0, Promise.resolve(t.L).then(function () { + return Promise.all(t.d.map(function (t) { + return e(n, t, r); + })); + }); + }(e, n, {}).then(function () { + return function e(n, t, r) { + if (r[t.id]) return; + if (r[t.id] = !0, !t.e) { + if (t.er) throw t.er; + return t.E ? t.E : void 0; + } + var o; + return t.d.forEach(function (t) { + { + var i = e(n, t, r); + i && (o = o || []).push(i); + } + }), o ? Promise.all(o).then(i) : i(); + function i() { + try { + var e = t.e.call(f); + if (e) return e = e.then(function () { + t.C = t.n, t.E = null; + }), t.E = t.E || e; + t.C = t.n; + } catch (e) { + throw t.er = e, e; + } finally { + t.L = t.I = void 0, t.e = null; + } + } + }(e, n, {}); + }).then(function () { + return n.n; + }); + }(t, n); + }); + }, s.createContext = function (e) { + return { + url: e + }; + }, s.register = function (e, n) { + l = [e, n]; + }, s.getRegister = function () { + var e = l; + return l = void 0, e; + }; + var f = Object.freeze(Object.create(null)); + n.System = n.System || new u(); + var d = s.register; + s.register = function (e, n) { + d.call(this, e, n); + }, s.instantiate = function (e, n) { + var t = this; + return ".json" === e.substr(-5) ? fetch(e).then(function (e) { + return e.text(); + }).then(function (e) { + return [[], function (n) { + return { + execute: function execute() { + n("default", JSON.parse(e)); + } + }; + }]; + }) : new Promise(function (r, o) { + var i; + function c(n) { + n.filename === e && (i = n.error); + } + window.addEventListener("error", c); + var u = document.createElement("script"); + u.charset = "utf-8", u.async = !0, u.addEventListener("error", function () { + window.removeEventListener("error", c), o(Error("Error loading " + e + (n ? " from " + n : ""))); + }), u.addEventListener("load", function () { + window.removeEventListener("error", c), document.head.removeChild(u), i ? o(i) : r(t.getRegister()); + }), u.src = e, document.head.appendChild(u); + }); + }, e && "function" == typeof importScripts && (s.instantiate = function (e) { + var n = this; + return new Promise(function (t, r) { + try { + importScripts(e); + } catch (e) { + r(e); + } + t(n.getRegister()); + }); + }), s.resolve = function (e, n) { + var o = function (e, n) { + if (-1 !== e.indexOf("\\") && (e = e.replace(r, "/")), "/" === e[0] && "/" === e[1]) return n.slice(0, n.indexOf(":") + 1) + e; + if ("." === e[0] && ("/" === e[1] || "." === e[1] && ("/" === e[2] || 2 === e.length && (e += "/")) || 1 === e.length && (e += "/")) || "/" === e[0]) { + var t = n.slice(0, n.indexOf(":") + 1); + var r; + if (r = "/" === n[t.length + 1] ? "file:" !== t ? (r = n.slice(t.length + 2)).slice(r.indexOf("/") + 1) : n.slice(8) : n.slice(t.length + ("/" === n[t.length])), "/" === e[0]) return n.slice(0, n.length - r.length - 1) + e; + var o = r.slice(0, r.lastIndexOf("/") + 1) + e, + i = []; + var c = -1; + for (var e = 0; e < o.length; e++) -1 !== c ? "/" === o[e] && (i.push(o.slice(c, e + 1)), c = -1) : "." === o[e] ? "." !== o[e + 1] || "/" !== o[e + 2] && e + 2 !== o.length ? "/" === o[e + 1] || e + 1 === o.length ? e += 1 : c = e : (i.pop(), e += 2) : c = e; + return -1 !== c && i.push(o.slice(c)), n.slice(0, n.length - r.length) + i.join(""); + } + }(e, n || t); + if (!o) { + if (-1 !== e.indexOf(":")) return Promise.resolve(e); + throw Error('Cannot resolve "' + e + (n ? '" from ' + n : '"')); + } + return Promise.resolve(o); + }; + }(); + + // Figure out currentScript (for IE11, since it does not support currentScript) + var regex = /\/ionicpwaelements(\.esm)?\.js($|\?|#)/; + var scriptElm = currentScript || Array.from(document.querySelectorAll('script')).find(function (s) { + return regex.test(s.src) || s.getAttribute('data-stencil-namespace') === "ionicpwaelements"; + }); + var resourcesUrl = scriptElm ? scriptElm.getAttribute('data-resources-url') || scriptElm.src : ''; + var start = function start() { + // if src is not present then origin is "null", and new URL() throws TypeError: Failed to construct 'URL': Invalid base URL + var url = new URL('./p-00206cb0.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined)); + System.import(url.href); + }; + if (window.__cssshim) { + window.__cssshim.i().then(start); + } else { + start(); + } + + // Note: using .call(window) here because the self-executing function needs + // to be scoped to the window object for the ES6Promise polyfill to work + } +}).call(window); \ No newline at end of file diff --git a/src/public/js/pwa-elements/ionicpwaelements/p-00206cb0.system.js b/src/public/js/pwa-elements/ionicpwaelements/p-00206cb0.system.js new file mode 100644 index 0000000000000000000000000000000000000000..59aed99486f75fdc7f93825361f0554d6d9ce0b0 --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/p-00206cb0.system.js @@ -0,0 +1,58 @@ +System.register(["./p-335782c2.system.js"], function (e, t) { + "use strict"; + + var n, o; + return { + setters: [function (t) { + n = t.p; + o = t.b; + e("setNonce", t.s); + }], + execute: function execute() { + var e = function e() { + var e = t.meta.url; + var o = {}; + if (e !== "") { + o.resourcesUrl = new URL(".", e).href; + } + return n(o); + }; + e().then(function (e) { + return o([["p-1b81a39d.system", [[1, "pwa-camera-modal", { + facingMode: [1, "facing-mode"], + hidePicker: [4, "hide-picker"], + present: [64], + dismiss: [64] + }]]], ["p-5b57434a.system", [[1, "pwa-action-sheet", { + header: [1], + cancelable: [4], + options: [16], + open: [32] + }]]], ["p-db3c6183.system", [[1, "pwa-toast", { + message: [1], + duration: [2], + closing: [32] + }]]], ["p-fab2e7af.system", [[1, "pwa-camera", { + facingMode: [1, "facing-mode"], + handlePhoto: [16], + hidePicker: [4, "hide-picker"], + handleNoDeviceError: [16], + noDevicesText: [1, "no-devices-text"], + noDevicesButtonText: [1, "no-devices-button-text"], + photo: [32], + photoSrc: [32], + showShutterOverlay: [32], + flashIndex: [32], + hasCamera: [32], + rotation: [32], + deviceError: [32] + }]]], ["p-550557d3.system", [[1, "pwa-camera-modal-instance", { + facingMode: [1, "facing-mode"], + hidePicker: [4, "hide-picker"], + noDevicesText: [1, "no-devices-text"], + noDevicesButtonText: [1, "no-devices-button-text"] + }, [[16, "keyup", "handleBackdropKeyUp"]]]]]], e); + }); + } + }; +}); \ No newline at end of file diff --git a/src/public/js/pwa-elements/ionicpwaelements/p-1b81a39d.system.entry.js b/src/public/js/pwa-elements/ionicpwaelements/p-1b81a39d.system.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..05bb74dada75f107cb1b93b3e6647b3e62fc1690 --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/p-1b81a39d.system.entry.js @@ -0,0 +1,191 @@ +var __awaiter = this && this.__awaiter || function (t, e, n, r) { + function i(t) { + return t instanceof n ? t : new n(function (e) { + e(t); + }); + } + return new (n || (n = Promise))(function (n, o) { + function a(t) { + try { + c(r.next(t)); + } catch (t) { + o(t); + } + } + function s(t) { + try { + c(r["throw"](t)); + } catch (t) { + o(t); + } + } + function c(t) { + t.done ? n(t.value) : i(t.value).then(a, s); + } + c((r = r.apply(t, e || [])).next()); + }); +}; +var __generator = this && this.__generator || function (t, e) { + var n = { + label: 0, + sent: function sent() { + if (o[0] & 1) throw o[1]; + return o[1]; + }, + trys: [], + ops: [] + }, + r, + i, + o, + a; + return a = { + next: s(0), + throw: s(1), + return: s(2) + }, typeof Symbol === "function" && (a[Symbol.iterator] = function () { + return this; + }), a; + function s(t) { + return function (e) { + return c([t, e]); + }; + } + function c(s) { + if (r) throw new TypeError("Generator is already executing."); + while (a && (a = 0, s[0] && (n = 0)), n) try { + if (r = 1, i && (o = s[0] & 2 ? i["return"] : s[0] ? i["throw"] || ((o = i["return"]) && o.call(i), 0) : i.next) && !(o = o.call(i, s[1])).done) return o; + if (i = 0, o) s = [s[0] & 2, o.value]; + switch (s[0]) { + case 0: + case 1: + o = s; + break; + case 4: + n.label++; + return { + value: s[1], + done: false + }; + case 5: + n.label++; + i = s[1]; + s = [0]; + continue; + case 7: + s = n.ops.pop(); + n.trys.pop(); + continue; + default: + if (!(o = n.trys, o = o.length > 0 && o[o.length - 1]) && (s[0] === 6 || s[0] === 2)) { + n = 0; + continue; + } + if (s[0] === 3 && (!o || s[1] > o[0] && s[1] < o[3])) { + n.label = s[1]; + break; + } + if (s[0] === 6 && n.label < o[1]) { + n.label = o[1]; + o = s; + break; + } + if (o && n.label < o[2]) { + n.label = o[2]; + n.ops.push(s); + break; + } + if (o[2]) n.ops.pop(); + n.trys.pop(); + continue; + } + s = e.call(t, n); + } catch (t) { + s = [6, t]; + i = 0; + } finally { + r = o = 0; + } + if (s[0] & 5) throw s[1]; + return { + value: s[0] ? s[1] : void 0, + done: true + }; + } +}; +System.register(["./p-335782c2.system.js"], function (t) { + "use strict"; + + var e, n, r; + return { + setters: [function (t) { + e = t.r; + n = t.c; + r = t.h; + }], + execute: function execute() { + var i = ":host{z-index:1000;position:fixed;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex;contain:strict}.wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:rgba(0, 0, 0, 0.15)}.content{-webkit-box-shadow:0px 0px 5px rgba(0, 0, 0, 0.2);box-shadow:0px 0px 5px rgba(0, 0, 0, 0.2);width:600px;height:600px}"; + var o = t("pwa_camera_modal", function () { + function t(t) { + e(this, t); + this.onPhoto = n(this, "onPhoto", 7); + this.noDeviceError = n(this, "noDeviceError", 7); + this.facingMode = "user"; + this.hidePicker = false; + } + t.prototype.present = function () { + return __awaiter(this, void 0, void 0, function () { + var t; + var e = this; + return __generator(this, function (n) { + t = document.createElement("pwa-camera-modal-instance"); + t.facingMode = this.facingMode; + t.hidePicker = this.hidePicker; + t.addEventListener("onPhoto", function (t) { + return __awaiter(e, void 0, void 0, function () { + var e; + return __generator(this, function (n) { + if (!this._modal) { + return [2]; + } + e = t.detail; + this.onPhoto.emit(e); + return [2]; + }); + }); + }); + t.addEventListener("noDeviceError", function (t) { + return __awaiter(e, void 0, void 0, function () { + return __generator(this, function (e) { + this.noDeviceError.emit(t); + return [2]; + }); + }); + }); + document.body.append(t); + this._modal = t; + return [2]; + }); + }); + }; + t.prototype.dismiss = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (t) { + if (!this._modal) { + return [2]; + } + this._modal && this._modal.parentNode.removeChild(this._modal); + this._modal = null; + return [2]; + }); + }); + }; + t.prototype.render = function () { + return r("div", null); + }; + return t; + }()); + o.style = i; + } + }; +}); \ No newline at end of file diff --git a/src/public/js/pwa-elements/ionicpwaelements/p-335782c2.system.js b/src/public/js/pwa-elements/ionicpwaelements/p-335782c2.system.js new file mode 100644 index 0000000000000000000000000000000000000000..348c1f68db866ce94f2bc29bd81ad34d5cdabccb --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/p-335782c2.system.js @@ -0,0 +1,1284 @@ +var __extends = this && this.__extends || function () { + var _e2 = function e(n, t) { + _e2 = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (e, n) { + e.__proto__ = n; + } || function (e, n) { + for (var t in n) if (Object.prototype.hasOwnProperty.call(n, t)) e[t] = n[t]; + }; + return _e2(n, t); + }; + return function (n, t) { + if (typeof t !== "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); + _e2(n, t); + function r() { + this.constructor = n; + } + n.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r()); + }; +}(); +var __awaiter = this && this.__awaiter || function (e, n, t, r) { + function a(e) { + return e instanceof t ? e : new t(function (n) { + n(e); + }); + } + return new (t || (t = Promise))(function (t, i) { + function l(e) { + try { + s(r.next(e)); + } catch (e) { + i(e); + } + } + function o(e) { + try { + s(r["throw"](e)); + } catch (e) { + i(e); + } + } + function s(e) { + e.done ? t(e.value) : a(e.value).then(l, o); + } + s((r = r.apply(e, n || [])).next()); + }); +}; +var __generator = this && this.__generator || function (e, n) { + var t = { + label: 0, + sent: function sent() { + if (i[0] & 1) throw i[1]; + return i[1]; + }, + trys: [], + ops: [] + }, + r, + a, + i, + l; + return l = { + next: o(0), + throw: o(1), + return: o(2) + }, typeof Symbol === "function" && (l[Symbol.iterator] = function () { + return this; + }), l; + function o(e) { + return function (n) { + return s([e, n]); + }; + } + function s(o) { + if (r) throw new TypeError("Generator is already executing."); + while (l && (l = 0, o[0] && (t = 0)), t) try { + if (r = 1, a && (i = o[0] & 2 ? a["return"] : o[0] ? a["throw"] || ((i = a["return"]) && i.call(a), 0) : a.next) && !(i = i.call(a, o[1])).done) return i; + if (a = 0, i) o = [o[0] & 2, i.value]; + switch (o[0]) { + case 0: + case 1: + i = o; + break; + case 4: + t.label++; + return { + value: o[1], + done: false + }; + case 5: + t.label++; + a = o[1]; + o = [0]; + continue; + case 7: + o = t.ops.pop(); + t.trys.pop(); + continue; + default: + if (!(i = t.trys, i = i.length > 0 && i[i.length - 1]) && (o[0] === 6 || o[0] === 2)) { + t = 0; + continue; + } + if (o[0] === 3 && (!i || o[1] > i[0] && o[1] < i[3])) { + t.label = o[1]; + break; + } + if (o[0] === 6 && t.label < i[1]) { + t.label = i[1]; + i = o; + break; + } + if (i && t.label < i[2]) { + t.label = i[2]; + t.ops.push(o); + break; + } + if (i[2]) t.ops.pop(); + t.trys.pop(); + continue; + } + o = n.call(e, t); + } catch (e) { + o = [6, e]; + a = 0; + } finally { + r = i = 0; + } + if (o[0] & 5) throw o[1]; + return { + value: o[0] ? o[1] : void 0, + done: true + }; + } +}; +var __spreadArray = this && this.__spreadArray || function (e, n, t) { + if (t || arguments.length === 2) for (var r = 0, a = n.length, i; r < a; r++) { + if (i || !(r in n)) { + if (!i) i = Array.prototype.slice.call(n, 0, r); + i[r] = n[r]; + } + } + return e.concat(i || Array.prototype.slice.call(n)); +}; +System.register([], function (e, n) { + "use strict"; + + return { + execute: function execute() { + var t = this; + var r = "ionicpwaelements"; + var a; + var i; + var l = false; + var o = false; + var s = function s(e, n) { + if (n === void 0) { + n = ""; + } + { + return function () { + return; + }; + } + }; + var u = function u(e, n) { + { + return function () { + return; + }; + } + }; + var f = "{visibility:hidden}.hydrated{visibility:inherit}"; + var c = {}; + var $ = "http://www.w3.org/2000/svg"; + var v = "http://www.w3.org/1999/xhtml"; + var d = function d(e) { + return e != null; + }; + var p = function p(e) { + e = typeof e; + return e === "object" || e === "function"; + }; + function h(e) { + var n, t, r; + return (r = (t = (n = e.head) === null || n === void 0 ? void 0 : n.querySelector('meta[name="csp-nonce"]')) === null || t === void 0 ? void 0 : t.getAttribute("content")) !== null && r !== void 0 ? r : undefined; + } + var m = e("h", function (e, n) { + var t = []; + for (var r = 2; r < arguments.length; r++) { + t[r - 2] = arguments[r]; + } + var a = null; + var i = false; + var l = false; + var o = []; + var _s = function s(n) { + for (var t = 0; t < n.length; t++) { + a = n[t]; + if (Array.isArray(a)) { + _s(a); + } else if (a != null && typeof a !== "boolean") { + if (i = typeof e !== "function" && !p(a)) { + a = String(a); + } + if (i && l) { + o[o.length - 1].$text$ += a; + } else { + o.push(i ? g(null, a) : a); + } + l = i; + } + } + }; + _s(t); + if (n) { + { + var u = n.className || n.class; + if (u) { + n.class = typeof u !== "object" ? u : Object.keys(u).filter(function (e) { + return u[e]; + }).join(" "); + } + } + } + var f = g(e, null); + f.$attrs$ = n; + if (o.length > 0) { + f.$children$ = o; + } + return f; + }); + var g = function g(e, n) { + var t = { + $flags$: 0, + $tag$: e, + $text$: n, + $elm$: null, + $children$: null + }; + { + t.$attrs$ = null; + } + return t; + }; + var y = e("H", {}); + var b = function b(e) { + return e && e.$tag$ === y; + }; + var w = function w(e, n) { + if (e != null && !p(e)) { + if (n & 4) { + return e === "false" ? false : e === "" || !!e; + } + if (n & 2) { + return parseFloat(e); + } + if (n & 1) { + return String(e); + } + return e; + } + return e; + }; + var _ = e("g", function (e) { + return ve(e).$hostElement$; + }); + var S = e("c", function (e, n, t) { + var r = _(e); + return { + emit: function emit(e) { + return N(r, n, { + bubbles: !!(t & 4), + composed: !!(t & 2), + cancelable: !!(t & 1), + detail: e + }); + } + }; + }); + var N = function N(e, n, t) { + var r = Se.ce(n, t); + e.dispatchEvent(r); + return r; + }; + var R = new WeakMap(); + var x = function x(e, n, t) { + var r = be.get(e); + if (Re && t) { + r = r || new CSSStyleSheet(); + if (typeof r === "string") { + r = n; + } else { + r.replaceSync(n); + } + } else { + r = n; + } + be.set(e, r); + }; + var L = function L(e, n, t, r) { + var a; + var i = j(n); + var l = be.get(i); + e = e.nodeType === 11 ? e : _e; + if (l) { + if (typeof l === "string") { + e = e.head || e; + var o = R.get(e); + var s = void 0; + if (!o) { + R.set(e, o = new Set()); + } + if (!o.has(i)) { + { + { + s = _e.createElement("style"); + s.innerHTML = l; + } + var u = (a = Se.$nonce$) !== null && a !== void 0 ? a : h(_e); + if (u != null) { + s.setAttribute("nonce", u); + } + e.insertBefore(s, e.querySelector("link")); + } + if (o) { + o.add(i); + } + } + } else if (!e.adoptedStyleSheets.includes(l)) { + e.adoptedStyleSheets = __spreadArray(__spreadArray([], e.adoptedStyleSheets, true), [l], false); + } + } + return i; + }; + var P = function P(e) { + var n = e.$cmpMeta$; + var t = e.$hostElement$; + var r = n.$flags$; + var a = s("attachStyles", n.$tagName$); + var i = L(t.shadowRoot ? t.shadowRoot : t.getRootNode(), n); + if (r & 10) { + t["s-sc"] = i; + t.classList.add(i + "-h"); + } + a(); + }; + var j = function j(e, n) { + return "sc-" + e.$tagName$; + }; + var C = function C(e, n, t, r, a, i) { + if (t !== r) { + var l = he(e, n); + var o = n.toLowerCase(); + if (n === "class") { + var s = e.classList; + var u = A(t); + var f = A(r); + s.remove.apply(s, u.filter(function (e) { + return e && !f.includes(e); + })); + s.add.apply(s, f.filter(function (e) { + return e && !u.includes(e); + })); + } else if (n === "style") { + { + for (var c in t) { + if (!r || r[c] == null) { + if (c.includes("-")) { + e.style.removeProperty(c); + } else { + e.style[c] = ""; + } + } + } + } + for (var c in r) { + if (!t || r[c] !== t[c]) { + if (c.includes("-")) { + e.style.setProperty(c, r[c]); + } else { + e.style[c] = r[c]; + } + } + } + } else if (n === "ref") { + if (r) { + r(e); + } + } else if (!l && n[0] === "o" && n[1] === "n") { + if (n[2] === "-") { + n = n.slice(3); + } else if (he(we, o)) { + n = o.slice(2); + } else { + n = o[2] + n.slice(3); + } + if (t) { + Se.rel(e, n, t, false); + } + if (r) { + Se.ael(e, n, r, false); + } + } else { + var $ = p(r); + if ((l || $ && r !== null) && !a) { + try { + if (!e.tagName.includes("-")) { + var v = r == null ? "" : r; + if (n === "list") { + l = false; + } else if (t == null || e[n] != v) { + e[n] = v; + } + } else { + e[n] = r; + } + } catch (e) {} + } + if (r == null || r === false) { + if (r !== false || e.getAttribute(n) === "") { + { + e.removeAttribute(n); + } + } + } else if ((!l || i & 4 || a) && !$) { + r = r === true ? "" : r; + { + e.setAttribute(n, r); + } + } + } + } + }; + var E = /\s/; + var A = function A(e) { + return !e ? [] : e.split(E); + }; + var O = function O(e, n, t, r) { + var a = n.$elm$.nodeType === 11 && n.$elm$.host ? n.$elm$.host : n.$elm$; + var i = e && e.$attrs$ || c; + var l = n.$attrs$ || c; + { + for (r in i) { + if (!(r in l)) { + C(a, r, i[r], undefined, t, n.$flags$); + } + } + } + for (r in l) { + C(a, r, i[r], l[r], t, n.$flags$); + } + }; + var _M = function M(e, n, t, r) { + var i = n.$children$[t]; + var o = 0; + var s; + var u; + if (i.$text$ !== null) { + s = i.$elm$ = _e.createTextNode(i.$text$); + } else { + if (!l) { + l = i.$tag$ === "svg"; + } + s = i.$elm$ = _e.createElementNS(l ? $ : v, i.$tag$); + if (l && i.$tag$ === "foreignObject") { + l = false; + } + { + O(null, i, l); + } + if (d(a) && s["s-si"] !== a) { + s.classList.add(s["s-si"] = a); + } + if (i.$children$) { + for (o = 0; o < i.$children$.length; ++o) { + u = _M(e, i, o); + if (u) { + s.appendChild(u); + } + } + } + { + if (i.$tag$ === "svg") { + l = false; + } else if (s.tagName === "foreignObject") { + l = true; + } + } + } + return s; + }; + var k = function k(e, n, t, r, a, l) { + var o = e; + var s; + if (o.shadowRoot && o.tagName === i) { + o = o.shadowRoot; + } + for (; a <= l; ++a) { + if (r[a]) { + s = _M(null, t, a); + if (s) { + r[a].$elm$ = s; + o.insertBefore(s, n); + } + } + } + }; + var I = function I(e, n, t) { + for (var r = n; r <= t; ++r) { + var a = e[r]; + if (a) { + var i = a.$elm$; + _B(a); + if (i) { + i.remove(); + } + } + } + }; + var T = function T(e, n, t, r) { + var a = 0; + var i = 0; + var l = n.length - 1; + var o = n[0]; + var s = n[l]; + var u = r.length - 1; + var f = r[0]; + var c = r[u]; + var $; + while (a <= l && i <= u) { + if (o == null) { + o = n[++a]; + } else if (s == null) { + s = n[--l]; + } else if (f == null) { + f = r[++i]; + } else if (c == null) { + c = r[--u]; + } else if (q(o, f)) { + z(o, f); + o = n[++a]; + f = r[++i]; + } else if (q(s, c)) { + z(s, c); + s = n[--l]; + c = r[--u]; + } else if (q(o, c)) { + z(o, c); + e.insertBefore(o.$elm$, s.$elm$.nextSibling); + o = n[++a]; + c = r[--u]; + } else if (q(s, f)) { + z(s, f); + e.insertBefore(s.$elm$, o.$elm$); + s = n[--l]; + f = r[++i]; + } else { + { + $ = _M(n && n[i], t, i); + f = r[++i]; + } + if ($) { + { + o.$elm$.parentNode.insertBefore($, o.$elm$); + } + } + } + } + if (a > l) { + k(e, r[u + 1] == null ? null : r[u + 1].$elm$, t, r, i, u); + } else if (i > u) { + I(n, a, l); + } + }; + var q = function q(e, n) { + if (e.$tag$ === n.$tag$) { + return true; + } + return false; + }; + var z = function z(e, n) { + var t = n.$elm$ = e.$elm$; + var r = e.$children$; + var a = n.$children$; + var i = n.$tag$; + var o = n.$text$; + if (o === null) { + { + l = i === "svg" ? true : i === "foreignObject" ? false : l; + } + { + { + O(e, n, l); + } + } + if (r !== null && a !== null) { + T(t, r, n, a); + } else if (a !== null) { + if (e.$text$ !== null) { + t.textContent = ""; + } + k(t, null, n, a, 0, a.length - 1); + } else if (r !== null) { + I(r, 0, r.length - 1); + } + if (l && i === "svg") { + l = false; + } + } else if (e.$text$ !== o) { + t.data = o; + } + }; + var _B = function B(e) { + { + e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null); + e.$children$ && e.$children$.map(_B); + } + }; + var U = function U(e, n) { + var t = e.$hostElement$; + var r = e.$vnode$ || g(null, null); + var l = b(n) ? n : m(null, null, n); + i = t.tagName; + l.$tag$ = null; + l.$flags$ |= 4; + e.$vnode$ = l; + l.$elm$ = r.$elm$ = t.shadowRoot || t; + { + a = t["s-sc"]; + } + z(r, l); + }; + var H = function H(e, n) { + if (n && !e.$onRenderResolve$ && n["s-p"]) { + n["s-p"].push(new Promise(function (n) { + return e.$onRenderResolve$ = n; + })); + } + }; + var V = function V(e, n) { + { + e.$flags$ |= 16; + } + if (e.$flags$ & 4) { + e.$flags$ |= 512; + return; + } + H(e, e.$ancestorComponent$); + var t = function t() { + return F(e, n); + }; + return Ae(t); + }; + var F = function F(e, n) { + var t = s("scheduleUpdate", e.$cmpMeta$.$tagName$); + var r = e.$lazyInstance$; + var a; + if (n) { + { + e.$flags$ |= 256; + if (e.$queuedListeners$) { + e.$queuedListeners$.map(function (e) { + var n = e[0], + t = e[1]; + return Y(r, n, t); + }); + e.$queuedListeners$ = undefined; + } + } + } + t(); + return W(a, function () { + return G(e, r, n); + }); + }; + var W = function W(e, n) { + return D(e) ? e.then(n) : n(); + }; + var D = function D(e) { + return e instanceof Promise || e && e.then && typeof e.then === "function"; + }; + var G = function G(e, n, r) { + return __awaiter(t, void 0, void 0, function () { + var t, a, i, l, o, u, f; + return __generator(this, function (c) { + a = e.$hostElement$; + i = s("update", e.$cmpMeta$.$tagName$); + l = a["s-rc"]; + if (r) { + P(e); + } + o = s("render", e.$cmpMeta$.$tagName$); + { + J(e, n); + } + if (l) { + l.map(function (e) { + return e(); + }); + a["s-rc"] = undefined; + } + o(); + i(); + { + u = (t = a["s-p"]) !== null && t !== void 0 ? t : []; + f = function f() { + return K(e); + }; + if (u.length === 0) { + f(); + } else { + Promise.all(u).then(f); + e.$flags$ |= 4; + u.length = 0; + } + } + return [2]; + }); + }); + }; + var J = function J(e, n, t) { + try { + n = n.render(); + { + e.$flags$ &= ~16; + } + { + e.$flags$ |= 2; + } + { + { + { + U(e, n); + } + } + } + } catch (n) { + me(n, e.$hostElement$); + } + return null; + }; + var K = function K(e) { + var n = e.$cmpMeta$.$tagName$; + var t = e.$hostElement$; + var r = s("postUpdate", n); + var a = e.$lazyInstance$; + var i = e.$ancestorComponent$; + if (!(e.$flags$ & 64)) { + e.$flags$ |= 64; + { + Z(t); + } + { + Y(a, "componentDidLoad"); + } + r(); + { + e.$onReadyResolve$(t); + if (!i) { + X(); + } + } + } else { + r(); + } + { + e.$onInstanceResolve$(t); + } + { + if (e.$onRenderResolve$) { + e.$onRenderResolve$(); + e.$onRenderResolve$ = undefined; + } + if (e.$flags$ & 512) { + Ee(function () { + return V(e, false); + }); + } + e.$flags$ &= ~(4 | 512); + } + }; + var Q = e("f", function (e) { + { + var n = ve(e); + var t = n.$hostElement$.isConnected; + if (t && (n.$flags$ & (2 | 16)) === 2) { + V(n, false); + } + return t; + } + }); + var X = function X(e) { + { + Z(_e.documentElement); + } + Ee(function () { + return N(we, "appload", { + detail: { + namespace: r + } + }); + }); + }; + var Y = function Y(e, n, t) { + if (e && e[n]) { + try { + return e[n](t); + } catch (e) { + me(e); + } + } + return undefined; + }; + var Z = function Z(e) { + return e.classList.add("hydrated"); + }; + var ee = function ee(e, n) { + return ve(e).$instanceValues$.get(n); + }; + var ne = function ne(e, n, t, r) { + var a = ve(e); + var i = a.$instanceValues$.get(n); + var l = a.$flags$; + var o = a.$lazyInstance$; + t = w(t, r.$members$[n][0]); + var s = Number.isNaN(i) && Number.isNaN(t); + var u = t !== i && !s; + if ((!(l & 8) || i === undefined) && u) { + a.$instanceValues$.set(n, t); + if (o) { + if ((l & (2 | 16)) === 2) { + V(a, false); + } + } + } + }; + var te = function te(e, n, t) { + if (n.$members$) { + var r = Object.entries(n.$members$); + var a = e.prototype; + r.map(function (e) { + var r = e[0], + i = e[1][0]; + if (i & 31 || t & 2 && i & 32) { + Object.defineProperty(a, r, { + get: function get() { + return ee(this, r); + }, + set: function set(e) { + ne(this, r, e, n); + }, + configurable: true, + enumerable: true + }); + } else if (t & 1 && i & 64) { + Object.defineProperty(a, r, { + value: function value() { + var e = []; + for (var n = 0; n < arguments.length; n++) { + e[n] = arguments[n]; + } + var t = ve(this); + return t.$onInstancePromise$.then(function () { + var n; + return (n = t.$lazyInstance$)[r].apply(n, e); + }); + } + }); + } + }); + if (t & 1) { + var i = new Map(); + a.attributeChangedCallback = function (e, n, t) { + var r = this; + Se.jmp(function () { + var n = i.get(e); + if (r.hasOwnProperty(n)) { + t = r[n]; + delete r[n]; + } else if (a.hasOwnProperty(n) && typeof r[n] === "number" && r[n] == t) { + return; + } + r[n] = t === null && typeof r[n] === "boolean" ? false : t; + }); + }; + e.observedAttributes = r.filter(function (e) { + var n = e[0], + t = e[1]; + return t[0] & 15; + }).map(function (e) { + var n = e[0], + t = e[1]; + var r = t[1] || n; + i.set(r, n); + return r; + }); + } + } + return e; + }; + var re = function re(e, n, r, a, i) { + return __awaiter(t, void 0, void 0, function () { + var e, t, a, l, o, f, c; + return __generator(this, function ($) { + switch ($.label) { + case 0: + if (!((n.$flags$ & 32) === 0)) return [3, 3]; + n.$flags$ |= 32; + i = ye(r); + if (!i.then) return [3, 2]; + e = u(); + return [4, i]; + case 1: + i = $.sent(); + e(); + $.label = 2; + case 2: + if (!i.isProxied) { + te(i, r, 2); + i.isProxied = true; + } + t = s("createInstance", r.$tagName$); + { + n.$flags$ |= 8; + } + try { + new i(n); + } catch (e) { + me(e); + } + { + n.$flags$ &= ~8; + } + t(); + if (i.style) { + a = i.style; + l = j(r); + if (!be.has(l)) { + o = s("registerStyles", r.$tagName$); + x(l, a, !!(r.$flags$ & 1)); + o(); + } + } + $.label = 3; + case 3: + f = n.$ancestorComponent$; + c = function c() { + return V(n, true); + }; + if (f && f["s-rc"]) { + f["s-rc"].push(c); + } else { + c(); + } + return [2]; + } + }); + }); + }; + var ae = function ae(e) { + if ((Se.$flags$ & 1) === 0) { + var n = ve(e); + var t = n.$cmpMeta$; + var r = s("connectedCallback", t.$tagName$); + if (!(n.$flags$ & 1)) { + n.$flags$ |= 1; + { + var a = e; + while (a = a.parentNode || a.host) { + if (a["s-p"]) { + H(n, n.$ancestorComponent$ = a); + break; + } + } + } + if (t.$members$) { + Object.entries(t.$members$).map(function (n) { + var t = n[0], + r = n[1][0]; + if (r & 31 && e.hasOwnProperty(t)) { + var a = e[t]; + delete e[t]; + e[t] = a; + } + }); + } + { + re(e, n, t); + } + } else { + oe(e, n, t.$listeners$); + } + r(); + } + }; + var ie = function ie(e) { + if ((Se.$flags$ & 1) === 0) { + var n = ve(e); + var t = n.$lazyInstance$; + { + if (n.$rmListeners$) { + n.$rmListeners$.map(function (e) { + return e(); + }); + n.$rmListeners$ = undefined; + } + } + { + Y(t, "disconnectedCallback"); + } + } + }; + var le = e("b", function (e, n) { + if (n === void 0) { + n = {}; + } + var t; + var r = s(); + var a = []; + var i = n.exclude || []; + var l = we.customElements; + var o = _e.head; + var u = o.querySelector("meta[charset]"); + var c = _e.createElement("style"); + var $ = []; + var v; + var d = true; + Object.assign(Se, n); + Se.$resourcesUrl$ = new URL(n.resourcesUrl || "./", _e.baseURI).href; + e.map(function (e) { + e[1].map(function (n) { + var t = { + $flags$: n[0], + $tagName$: n[1], + $members$: n[2], + $listeners$: n[3] + }; + { + t.$members$ = n[2]; + } + { + t.$listeners$ = n[3]; + } + var r = t.$tagName$; + var o = function (e) { + __extends(n, e); + function n(n) { + var r = e.call(this, n) || this; + n = r; + pe(n, t); + if (t.$flags$ & 1) { + { + { + n.attachShadow({ + mode: "open" + }); + } + } + } + return r; + } + n.prototype.connectedCallback = function () { + var e = this; + if (v) { + clearTimeout(v); + v = null; + } + if (d) { + $.push(this); + } else { + Se.jmp(function () { + return ae(e); + }); + } + }; + n.prototype.disconnectedCallback = function () { + var e = this; + Se.jmp(function () { + return ie(e); + }); + }; + n.prototype.componentOnReady = function () { + return ve(this).$onReadyPromise$; + }; + return n; + }(HTMLElement); + t.$lazyBundleId$ = e[0]; + if (!i.includes(r) && !l.get(r)) { + a.push(r); + l.define(r, te(o, t, 1)); + } + }); + }); + { + c.innerHTML = a + f; + c.setAttribute("data-styles", ""); + var p = (t = Se.$nonce$) !== null && t !== void 0 ? t : h(_e); + if (p != null) { + c.setAttribute("nonce", p); + } + o.insertBefore(c, u ? u.nextSibling : o.firstChild); + } + d = false; + if ($.length) { + $.map(function (e) { + return e.connectedCallback(); + }); + } else { + { + Se.jmp(function () { + return v = setTimeout(X, 30); + }); + } + } + r(); + }); + var oe = function oe(e, n, t, r) { + if (t) { + t.map(function (t) { + var r = t[0], + a = t[1], + i = t[2]; + var l = ue(e, r); + var o = se(n, i); + var s = fe(r); + Se.ael(l, a, o, s); + (n.$rmListeners$ = n.$rmListeners$ || []).push(function () { + return Se.rel(l, a, o, s); + }); + }); + } + }; + var se = function se(e, n) { + return function (t) { + try { + { + if (e.$flags$ & 256) { + e.$lazyInstance$[n](t); + } else { + (e.$queuedListeners$ = e.$queuedListeners$ || []).push([n, t]); + } + } + } catch (e) { + me(e); + } + }; + }; + var ue = function ue(e, n) { + if (n & 16) return _e.body; + return e; + }; + var fe = function fe(e) { + return (e & 2) !== 0; + }; + var ce = e("s", function (e) { + return Se.$nonce$ = e; + }); + var $e = new WeakMap(); + var ve = function ve(e) { + return $e.get(e); + }; + var de = e("r", function (e, n) { + return $e.set(n.$lazyInstance$ = e, n); + }); + var pe = function pe(e, n) { + var t = { + $flags$: 0, + $hostElement$: e, + $cmpMeta$: n, + $instanceValues$: new Map() + }; + { + t.$onInstancePromise$ = new Promise(function (e) { + return t.$onInstanceResolve$ = e; + }); + } + { + t.$onReadyPromise$ = new Promise(function (e) { + return t.$onReadyResolve$ = e; + }); + e["s-p"] = []; + e["s-rc"] = []; + } + oe(e, t, n.$listeners$); + return $e.set(e, t); + }; + var he = function he(e, n) { + return n in e; + }; + var me = function me(e, n) { + return (0, console.error)(e, n); + }; + var ge = new Map(); + var ye = function ye(e, t, r) { + var a = e.$tagName$.replace(/-/g, "_"); + var i = e.$lazyBundleId$; + var l = ge.get(i); + if (l) { + return l[a]; + } + /*!__STENCIL_STATIC_IMPORT_SWITCH__*/ + return n.import("./".concat(i, ".entry.js").concat("")).then(function (e) { + { + ge.set(i, e); + } + return e[a]; + }, me); + }; + var be = new Map(); + var we = typeof window !== "undefined" ? window : {}; + var _e = we.document || { + head: {} + }; + var Se = { + $flags$: 0, + $resourcesUrl$: "", + jmp: function jmp(e) { + return e(); + }, + raf: function raf(e) { + return requestAnimationFrame(e); + }, + ael: function ael(e, n, t, r) { + return e.addEventListener(n, t, r); + }, + rel: function rel(e, n, t, r) { + return e.removeEventListener(n, t, r); + }, + ce: function ce(e, n) { + return new CustomEvent(e, n); + } + }; + var Ne = e("p", function (e) { + return Promise.resolve(e); + }); + var Re = function () { + try { + new CSSStyleSheet(); + return typeof new CSSStyleSheet().replaceSync === "function"; + } catch (e) {} + return false; + }(); + var xe = []; + var Le = []; + var Pe = function Pe(e, n) { + return function (t) { + e.push(t); + if (!o) { + o = true; + if (n && Se.$flags$ & 4) { + Ee(_Ce); + } else { + Se.raf(_Ce); + } + } + }; + }; + var je = function je(e) { + for (var n = 0; n < e.length; n++) { + try { + e[n](performance.now()); + } catch (e) { + me(e); + } + } + e.length = 0; + }; + var _Ce = function Ce() { + je(xe); + { + je(Le); + if (o = xe.length > 0) { + Se.raf(_Ce); + } + } + }; + var Ee = function Ee(e) { + return Ne().then(e); + }; + var Ae = Pe(Le, true); + } + }; +}); \ No newline at end of file diff --git a/src/public/js/pwa-elements/ionicpwaelements/p-386e91ad.js b/src/public/js/pwa-elements/ionicpwaelements/p-386e91ad.js new file mode 100644 index 0000000000000000000000000000000000000000..22adfe4ecc275fc3273deff0c8c9555b01d96a12 --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/p-386e91ad.js @@ -0,0 +1,660 @@ +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } +function _possibleConstructorReturn(t, e) { if (e && ("object" == typeof e || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); } +function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } +function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); } +function _wrapNativeSuper(t) { var r = "function" == typeof Map ? new Map() : void 0; return _wrapNativeSuper = function _wrapNativeSuper(t) { if (null === t || !_isNativeFunction(t)) return t; if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); if (void 0 !== r) { if (r.has(t)) return r.get(t); r.set(t, Wrapper); } function Wrapper() { return _construct(t, arguments, _getPrototypeOf(this).constructor); } return Wrapper.prototype = Object.create(t.prototype, { constructor: { value: Wrapper, enumerable: !1, writable: !0, configurable: !0 } }), _setPrototypeOf(Wrapper, t); }, _wrapNativeSuper(t); } +function _construct(t, e, r) { if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); var o = [null]; o.push.apply(o, e); var p = new (t.bind.apply(t, o))(); return r && _setPrototypeOf(p, r.prototype), p; } +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } +function _isNativeFunction(t) { try { return -1 !== Function.toString.call(t).indexOf("[native code]"); } catch (n) { return "function" == typeof t; } } +function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } +function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); } +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } +function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } +function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } +function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } +function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } +function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } +function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); } +function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); } +function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } +var e, + t, + n = !1, + l = !1; +var o = {}, + s = function s(e) { + return "object" == (e = typeof e) || "function" === e; + }; +function c(e) { + var t, n, l; + return null !== (l = null === (n = null === (t = e.head) || void 0 === t ? void 0 : t.querySelector('meta[name="csp-nonce"]')) || void 0 === n ? void 0 : n.getAttribute("content")) && void 0 !== l ? l : void 0; +} +var i = function i(e, t) { + var l = null, + o = !1, + c = !1; + var i = [], + _u = function u(t) { + for (var _n = 0; _n < t.length; _n++) l = t[_n], Array.isArray(l) ? _u(l) : null != l && "boolean" != typeof l && ((o = "function" != typeof e && !s(l)) && (l += ""), o && c ? i[i.length - 1].t += l : i.push(o ? r(null, l) : l), c = o); + }; + for (var _len = arguments.length, n = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + n[_key - 2] = arguments[_key]; + } + if (_u(n), t) { + var _e = t.className || t.class; + _e && (t.class = "object" != typeof _e ? _e : Object.keys(_e).filter(function (t) { + return _e[t]; + }).join(" ")); + } + var a = r(e, null); + return a.l = t, i.length > 0 && (a.o = i), a; + }, + r = function r(e, t) { + return { + i: 0, + u: e, + t: t, + h: null, + o: null, + l: null + }; + }, + u = {}, + a = function a(e) { + return B(e).m; + }, + f = function f(e, t, n) { + var l = a(e); + return { + emit: function emit(e) { + return d(l, t, { + bubbles: !!(4 & n), + composed: !!(2 & n), + cancelable: !!(1 & n), + detail: e + }); + } + }; + }, + d = function d(e, t, n) { + var l = te.ce(t, n); + return e.dispatchEvent(l), l; + }, + h = new WeakMap(), + m = function m(e) { + return "sc-" + e.p; + }, + p = function p(e, t, n, l, o, c) { + if (n !== l) { + var _i = J(e, t), + _r = t.toLowerCase(); + if ("class" === t) { + var _t = e.classList, + _o = $(n), + _s = $(l); + _t.remove.apply(_t, _toConsumableArray(_o.filter(function (e) { + return e && !_s.includes(e); + }))), _t.add.apply(_t, _toConsumableArray(_s.filter(function (e) { + return e && !_o.includes(e); + }))); + } else if ("style" === t) { + for (var _t2 in n) l && null != l[_t2] || (_t2.includes("-") ? e.style.removeProperty(_t2) : e.style[_t2] = ""); + for (var _t3 in l) n && l[_t3] === n[_t3] || (_t3.includes("-") ? e.style.setProperty(_t3, l[_t3]) : e.style[_t3] = l[_t3]); + } else if ("ref" === t) l && l(e);else if (_i || "o" !== t[0] || "n" !== t[1]) { + var _r2 = s(l); + if ((_i || _r2 && null !== l) && !o) try { + if (e.tagName.includes("-")) e[t] = l;else { + var _o2 = null == l ? "" : l; + "list" === t ? _i = !1 : null != n && e[t] == _o2 || (e[t] = _o2); + } + } catch (e) {} + null == l || !1 === l ? !1 === l && "" !== e.getAttribute(t) || e.removeAttribute(t) : (!_i || 4 & c || o) && !_r2 && e.setAttribute(t, l = !0 === l ? "" : l); + } else t = "-" === t[2] ? t.slice(3) : J(Z, _r) ? _r.slice(2) : _r[2] + t.slice(3), n && te.rel(e, t, n, !1), l && te.ael(e, t, l, !1); + } + }, + y = /\s/, + $ = function $(e) { + return e ? e.split(y) : []; + }, + b = function b(e, t, n, l) { + var s = 11 === t.h.nodeType && t.h.host ? t.h.host : t.h, + c = e && e.l || o, + i = t.l || o; + for (l in c) l in i || p(s, l, c[l], void 0, n, t.i); + for (l in i) p(s, l, c[l], i[l], n, t.i); + }, + _w = function w(t, l, o) { + var s = l.o[o]; + var c, + i, + r = 0; + if (null !== s.t) c = s.h = ee.createTextNode(s.t);else { + if (n || (n = "svg" === s.u), c = s.h = ee.createElementNS(n ? "http://www.w3.org/2000/svg" : "http://www.w3.org/1999/xhtml", s.u), n && "foreignObject" === s.u && (n = !1), b(null, s, n), null != e && c["s-si"] !== e && c.classList.add(c["s-si"] = e), s.o) for (r = 0; r < s.o.length; ++r) i = _w(t, s, r), i && c.appendChild(i); + "svg" === s.u ? n = !1 : "foreignObject" === c.tagName && (n = !0); + } + return c; + }, + v = function v(e, n, l, o, s, c) { + var i, + r = e; + for (r.shadowRoot && r.tagName === t && (r = r.shadowRoot); s <= c; ++s) o[s] && (i = _w(null, l, s), i && (o[s].h = i, r.insertBefore(i, n))); + }, + g = function g(e, t, n) { + for (var _l = t; _l <= n; ++_l) { + var _t4 = e[_l]; + if (_t4) { + var _e2 = _t4.h; + _O(_t4), _e2 && _e2.remove(); + } + } + }, + j = function j(e, t) { + return e.u === t.u; + }, + _S = function S(e, t) { + var l = t.h = e.h, + o = e.o, + s = t.o, + c = t.u, + i = t.t; + null === i ? (n = "svg" === c || "foreignObject" !== c && n, b(e, t, n), null !== o && null !== s ? function (e, t, n, l) { + var o, + s = 0, + c = 0, + i = t.length - 1, + r = t[0], + u = t[i], + a = l.length - 1, + f = l[0], + d = l[a]; + for (; s <= i && c <= a;) null == r ? r = t[++s] : null == u ? u = t[--i] : null == f ? f = l[++c] : null == d ? d = l[--a] : j(r, f) ? (_S(r, f), r = t[++s], f = l[++c]) : j(u, d) ? (_S(u, d), u = t[--i], d = l[--a]) : j(r, d) ? (_S(r, d), e.insertBefore(r.h, u.h.nextSibling), r = t[++s], d = l[--a]) : j(u, f) ? (_S(u, f), e.insertBefore(u.h, r.h), u = t[--i], f = l[++c]) : (o = _w(t && t[c], n, c), f = l[++c], o && r.h.parentNode.insertBefore(o, r.h)); + s > i ? v(e, null == l[a + 1] ? null : l[a + 1].h, n, l, c, a) : c > a && g(t, s, i); + }(l, o, t, s) : null !== s ? (null !== e.t && (l.textContent = ""), v(l, null, t, s, 0, s.length - 1)) : null !== o && g(o, 0, o.length - 1), n && "svg" === c && (n = !1)) : e.t !== i && (l.data = i); + }, + _O = function O(e) { + e.l && e.l.ref && e.l.ref(null), e.o && e.o.map(_O); + }, + M = function M(e, t) { + t && !e.$ && t["s-p"] && t["s-p"].push(new Promise(function (t) { + return e.$ = t; + })); + }, + k = function k(e, t) { + if (e.i |= 16, !(4 & e.i)) return M(e, e.v), ae(function () { + return C(e, t); + }); + e.i |= 512; + }, + C = function C(e, t) { + var n = e.g; + return t && (e.i |= 256, e.j && (e.j.map(function (_ref) { + var _ref2 = _slicedToArray(_ref, 2), + e = _ref2[0], + t = _ref2[1]; + return F(n, e, t); + }), e.j = void 0)), P(void 0, function () { + return E(e, n, t); + }); + }, + P = function P(e, t) { + return x(e) ? e.then(t) : t(); + }, + x = function x(e) { + return e instanceof Promise || e && e.then && "function" == typeof e.then; + }, + E = /*#__PURE__*/function () { + var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(e, t, n) { + var l, o, s, _t6, _n2; + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + o = e.m, s = o["s-rc"]; + n && function (e) { + var t = e.S, + n = e.m, + l = t.i, + o = function (e, t) { + var n; + var l = m(t); + var o = Y.get(l); + if (e = 11 === e.nodeType ? e : ee, o) if ("string" == typeof o) { + var _t5, + _s2 = h.get(e = e.head || e); + if (_s2 || h.set(e, _s2 = new Set()), !_s2.has(l)) { + { + _t5 = ee.createElement("style"), _t5.innerHTML = o; + var _l2 = null !== (n = te.O) && void 0 !== n ? n : c(ee); + null != _l2 && _t5.setAttribute("nonce", _l2), e.insertBefore(_t5, e.querySelector("link")); + } + _s2 && _s2.add(l); + } + } else e.adoptedStyleSheets.includes(o) || (e.adoptedStyleSheets = [].concat(_toConsumableArray(e.adoptedStyleSheets), [o])); + return l; + }(n.shadowRoot ? n.shadowRoot : n.getRootNode(), t); + 10 & l && (n["s-sc"] = o, n.classList.add(o + "-h")); + }(e); + L(e, t), s && (s.map(function (e) { + return e(); + }), o["s-rc"] = void 0); + _t6 = null !== (l = o["s-p"]) && void 0 !== l ? l : [], _n2 = function _n2() { + return N(e); + }; + 0 === _t6.length ? _n2() : (Promise.all(_t6).then(_n2), e.i |= 4, _t6.length = 0); + case 5: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function E(_x, _x2, _x3) { + return _ref3.apply(this, arguments); + }; + }(), + L = function L(n, l) { + try { + l = l.render(), n.i &= -17, n.i |= 2, function (n, l) { + var o = n.m, + s = n.M || r(null, null), + c = function (e) { + return e && e.u === u; + }(l) ? l : i(null, null, l); + t = o.tagName, c.u = null, c.i |= 4, n.M = c, c.h = s.h = o.shadowRoot || o, e = o["s-sc"], _S(s, c); + }(n, l); + } catch (e) { + K(e, n.m); + } + return null; + }, + N = function N(e) { + var t = e.m, + n = e.g, + l = e.v; + 64 & e.i || (e.i |= 64, H(t), F(n, "componentDidLoad"), e.k(t), l || A()), e.C(t), e.$ && (e.$(), e.$ = void 0), 512 & e.i && ue(function () { + return k(e, !1); + }), e.i &= -517; + }, + T = function T(e) { + { + var _t7 = B(e), + _n3 = _t7.m.isConnected; + return _n3 && 2 == (18 & _t7.i) && k(_t7, !1), _n3; + } + }, + A = function A() { + H(ee.documentElement), ue(function () { + return d(Z, "appload", { + detail: { + namespace: "ionicpwaelements" + } + }); + }); + }, + F = function F(e, t, n) { + if (e && e[t]) try { + return e[t](n); + } catch (e) { + K(e); + } + }, + H = function H(e) { + return e.classList.add("hydrated"); + }, + R = function R(e, t, n) { + if (t.P) { + var l = Object.entries(t.P), + _o3 = e.prototype; + if (l.map(function (_ref4) { + var _ref5 = _slicedToArray(_ref4, 2), + e = _ref5[0], + _ref5$ = _slicedToArray(_ref5[1], 1), + l = _ref5$[0]; + 31 & l || 2 & n && 32 & l ? Object.defineProperty(_o3, e, { + get: function get() { + var _this = this; + return function (e, t) { + return B(_this).L.get(t); + }(0, e); + }, + set: function set(n) { + (function (e, t, n, l) { + var o = B(e), + c = o.L.get(t), + i = o.i, + r = o.g; + n = function (e, t) { + return null == e || s(e) ? e : 4 & t ? "false" !== e && ("" === e || !!e) : 2 & t ? parseFloat(e) : 1 & t ? e + "" : e; + }(n, l.P[t][0]), 8 & i && void 0 !== c || n === c || Number.isNaN(c) && Number.isNaN(n) || (o.L.set(t, n), r && 2 == (18 & i) && k(o, !1)); + })(this, e, n, t); + }, + configurable: !0, + enumerable: !0 + }) : 1 & n && 64 & l && Object.defineProperty(_o3, e, { + value: function value() { + for (var _len2 = arguments.length, t = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + t[_key2] = arguments[_key2]; + } + var n = B(this); + return n.N.then(function () { + var _n$g; + return (_n$g = n.g)[e].apply(_n$g, t); + }); + } + }); + }), 1 & n) { + var _t8 = new Map(); + _o3.attributeChangedCallback = function (e, n, l) { + var _this2 = this; + te.jmp(function () { + var n = _t8.get(e); + if (_this2.hasOwnProperty(n)) l = _this2[n], delete _this2[n];else if (_o3.hasOwnProperty(n) && "number" == typeof _this2[n] && _this2[n] == l) return; + _this2[n] = (null !== l || "boolean" != typeof _this2[n]) && l; + }); + }, e.observedAttributes = l.filter(function (_ref6) { + var _ref7 = _slicedToArray(_ref6, 2), + e = _ref7[0], + t = _ref7[1]; + return 15 & t[0]; + }).map(function (_ref8) { + var _ref9 = _slicedToArray(_ref8, 2), + e = _ref9[0], + n = _ref9[1]; + var l = n[1] || e; + return _t8.set(l, e), l; + }); + } + } + return e; + }, + U = function U(e) { + var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var n; + var l = [], + o = t.exclude || [], + s = Z.customElements, + i = ee.head, + r = i.querySelector("meta[charset]"), + u = ee.createElement("style"), + a = []; + var f, + d = !0; + Object.assign(te, t), te.T = new URL(t.resourcesUrl || "./", ee.baseURI).href, e.map(function (e) { + e[1].map(function (t) { + var n = { + i: t[0], + p: t[1], + P: t[2], + A: t[3] + }; + n.P = t[2], n.A = t[3]; + var c = n.p, + i = /*#__PURE__*/function (_HTMLElement) { + function i(e) { + var _this3; + _classCallCheck(this, i); + _this3 = _callSuper(this, i, [e]), I(e = _assertThisInitialized(_this3), n), 1 & n.i && e.attachShadow({ + mode: "open" + }); + return _this3; + } + _inherits(i, _HTMLElement); + return _createClass(i, [{ + key: "connectedCallback", + value: function connectedCallback() { + var _this4 = this; + f && (clearTimeout(f), f = null), d ? a.push(this) : te.jmp(function () { + return function (e) { + if (0 == (1 & te.i)) { + var _t9 = B(e), + _n4 = _t9.S, + _l3 = function _l3() {}; + if (1 & _t9.i) W(e, _t9, _n4.A);else { + _t9.i |= 1; + { + var _n5 = e; + for (; _n5 = _n5.parentNode || _n5.host;) if (_n5["s-p"]) { + M(_t9, _t9.v = _n5); + break; + } + } + _n4.P && Object.entries(_n4.P).map(function (_ref10) { + var _ref11 = _slicedToArray(_ref10, 2), + t = _ref11[0], + _ref11$ = _slicedToArray(_ref11[1], 1), + n = _ref11$[0]; + if (31 & n && e.hasOwnProperty(t)) { + var _n6 = e[t]; + delete e[t], e[t] = _n6; + } + }), function () { + var _ref12 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e, t, n, l, o) { + var _e3, _e4, _e5, _t10, _l4, s, c; + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + if (!(0 == (32 & t.i))) { + _context2.next = 14; + break; + } + t.i |= 32; + if (!(o = X(n)).then) { + _context2.next = 8; + break; + } + _e3 = function _e3() {}; + _context2.next = 6; + return o; + case 6: + o = _context2.sent; + _e3(); + case 8: + o.isProxied || (R(o, n, 2), o.isProxied = !0); + _e4 = function _e4() {}; + t.i |= 8; + try { + new o(t); + } catch (e) { + K(e); + } + t.i &= -9, _e4(); + if (o.style) { + _e5 = o.style; + _t10 = m(n); + if (!Y.has(_t10)) { + _l4 = function _l4() {}; + (function (e, t, n) { + var l = Y.get(e); + le && n ? (l = l || new CSSStyleSheet(), "string" == typeof l ? l = t : l.replaceSync(t)) : l = t, Y.set(e, l); + })(_t10, _e5, !!(1 & n.i)), _l4(); + } + } + case 14: + s = t.v, c = function c() { + return k(t, !0); + }; + s && s["s-rc"] ? s["s-rc"].push(c) : c(); + case 16: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return function (_x4, _x5, _x6, _x7, _x8) { + return _ref12.apply(this, arguments); + }; + }()(0, _t9, _n4); + } + _l3(); + } + }(_this4); + }); + } + }, { + key: "disconnectedCallback", + value: function disconnectedCallback() { + var _this5 = this; + te.jmp(function () { + return function () { + if (0 == (1 & te.i)) { + var _e6 = B(_this5), + _t11 = _e6.g; + _e6.F && (_e6.F.map(function (e) { + return e(); + }), _e6.F = void 0), F(_t11, "disconnectedCallback"); + } + }(); + }); + } + }, { + key: "componentOnReady", + value: function componentOnReady() { + return B(this).H; + } + }]); + }(/*#__PURE__*/_wrapNativeSuper(HTMLElement)); + n.R = e[0], o.includes(c) || s.get(c) || (l.push(c), s.define(c, R(i, n, 1))); + }); + }); + { + u.innerHTML = l + "{visibility:hidden}.hydrated{visibility:inherit}", u.setAttribute("data-styles", ""); + var _e7 = null !== (n = te.O) && void 0 !== n ? n : c(ee); + null != _e7 && u.setAttribute("nonce", _e7), i.insertBefore(u, r ? r.nextSibling : i.firstChild); + } + d = !1, a.length ? a.map(function (e) { + return e.connectedCallback(); + }) : te.jmp(function () { + return f = setTimeout(A, 30); + }); + }, + W = function W(e, t, n) { + n && n.map(function (_ref13) { + var _ref14 = _slicedToArray(_ref13, 3), + n = _ref14[0], + l = _ref14[1], + o = _ref14[2]; + var s = D(e, n), + c = q(t, o), + i = V(n); + te.ael(s, l, c, i), (t.F = t.F || []).push(function () { + return te.rel(s, l, c, i); + }); + }); + }, + q = function q(e, t) { + return function (n) { + try { + 256 & e.i ? e.g[t](n) : (e.j = e.j || []).push([t, n]); + } catch (e) { + K(e); + } + }; + }, + D = function D(e, t) { + return 16 & t ? ee.body : e; + }, + V = function V(e) { + return 0 != (2 & e); + }, + _ = function _(e) { + return te.O = e; + }, + z = new WeakMap(), + B = function B(e) { + return z.get(e); + }, + G = function G(e, t) { + return z.set(t.g = e, t); + }, + I = function I(e, t) { + var n = { + i: 0, + m: e, + S: t, + L: new Map() + }; + return n.N = new Promise(function (e) { + return n.C = e; + }), n.H = new Promise(function (e) { + return n.k = e; + }), e["s-p"] = [], e["s-rc"] = [], W(e, n, t.A), z.set(e, n); + }, + J = function J(e, t) { + return t in e; + }, + K = function K(e, t) { + return (0, console.error)(e, t); + }, + Q = new Map(), + X = function X(e) { + var t = e.p.replace(/-/g, "_"), + n = e.R, + l = Q.get(n); + return l ? l[t] : import("./".concat(n, ".entry.js")).then(function (e) { + return Q.set(n, e), e[t]; + }, K); + /*!__STENCIL_STATIC_IMPORT_SWITCH__*/ + }, + Y = new Map(), + Z = "undefined" != typeof window ? window : {}, + ee = Z.document || { + head: {} + }, + te = { + i: 0, + T: "", + jmp: function jmp(e) { + return e(); + }, + raf: function raf(e) { + return requestAnimationFrame(e); + }, + ael: function ael(e, t, n, l) { + return e.addEventListener(t, n, l); + }, + rel: function rel(e, t, n, l) { + return e.removeEventListener(t, n, l); + }, + ce: function ce(e, t) { + return new CustomEvent(e, t); + } + }, + ne = function ne(e) { + return Promise.resolve(e); + }, + le = function () { + try { + return new CSSStyleSheet(), "function" == typeof new CSSStyleSheet().replaceSync; + } catch (e) {} + return !1; + }(), + oe = [], + se = [], + ce = function ce(e, t) { + return function (n) { + e.push(n), l || (l = !0, t && 4 & te.i ? ue(_re) : te.raf(_re)); + }; + }, + ie = function ie(e) { + for (var _t12 = 0; _t12 < e.length; _t12++) try { + e[_t12](performance.now()); + } catch (e) { + K(e); + } + e.length = 0; + }, + _re = function re() { + ie(oe), ie(se), (l = oe.length > 0) && te.raf(_re); + }, + ue = function ue(e) { + return ne().then(e); + }, + ae = ce(se, !0); +export { u as H, U as b, f as c, T as f, a as g, i as h, ne as p, G as r, _ as s }; \ No newline at end of file diff --git a/src/public/js/pwa-elements/ionicpwaelements/p-3bb700a2.entry.js b/src/public/js/pwa-elements/ionicpwaelements/p-3bb700a2.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..7f9a165c1372ba5f0ca553ee9a92830a9cc0c697 --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/p-3bb700a2.entry.js @@ -0,0 +1,94 @@ +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } +function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } +function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +import { r as s, c as t, h as i } from "./p-386e91ad.js"; +var e = /*#__PURE__*/function () { + function e(i) { + _classCallCheck(this, e); + s(this, i), this.onPhoto = t(this, "onPhoto", 7), this.noDeviceError = t(this, "noDeviceError", 7), this.facingMode = "user", this.hidePicker = !1; + } + return _createClass(e, [{ + key: "present", + value: function () { + var _present = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() { + var _this = this; + var s; + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + s = document.createElement("pwa-camera-modal-instance"); + s.facingMode = this.facingMode, s.hidePicker = this.hidePicker, s.addEventListener("onPhoto", /*#__PURE__*/function () { + var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) { + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _this._modal && _this.onPhoto.emit(s.detail); + case 1: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function (_x) { + return _ref.apply(this, arguments); + }; + }()), s.addEventListener("noDeviceError", /*#__PURE__*/function () { + var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _this.noDeviceError.emit(s); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return function (_x2) { + return _ref2.apply(this, arguments); + }; + }()), document.body.append(s), this._modal = s; + case 2: + case "end": + return _context3.stop(); + } + }, _callee3, this); + })); + function present() { + return _present.apply(this, arguments); + } + return present; + }() + }, { + key: "dismiss", + value: function () { + var _dismiss = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() { + return _regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + this._modal && (this._modal && this._modal.parentNode.removeChild(this._modal), this._modal = null); + case 1: + case "end": + return _context4.stop(); + } + }, _callee4, this); + })); + function dismiss() { + return _dismiss.apply(this, arguments); + } + return dismiss; + }() + }, { + key: "render", + value: function render() { + return i("div", null); + } + }]); +}(); +e.style = ":host{z-index:1000;position:fixed;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex;contain:strict}.wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:rgba(0, 0, 0, 0.15)}.content{-webkit-box-shadow:0px 0px 5px rgba(0, 0, 0, 0.2);box-shadow:0px 0px 5px rgba(0, 0, 0, 0.2);width:600px;height:600px}"; +export { e as pwa_camera_modal }; \ No newline at end of file diff --git a/src/public/js/pwa-elements/ionicpwaelements/p-50ea2036.system.js b/src/public/js/pwa-elements/ionicpwaelements/p-50ea2036.system.js new file mode 100644 index 0000000000000000000000000000000000000000..5c6cc366722d8a8314c1c1ef7bab949e303cdc69 --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/p-50ea2036.system.js @@ -0,0 +1,7 @@ +System.register([], function () { + "use strict"; + + return { + execute: function execute() {} + }; +}); \ No newline at end of file diff --git a/src/public/js/pwa-elements/ionicpwaelements/p-550557d3.system.entry.js b/src/public/js/pwa-elements/ionicpwaelements/p-550557d3.system.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..c0b55d2014280b5c52db4eb9c68b00abb734d3f5 --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/p-550557d3.system.entry.js @@ -0,0 +1,202 @@ +var __awaiter = this && this.__awaiter || function (e, t, n, i) { + function o(e) { + return e instanceof n ? e : new n(function (t) { + t(e); + }); + } + return new (n || (n = Promise))(function (n, r) { + function a(e) { + try { + s(i.next(e)); + } catch (e) { + r(e); + } + } + function c(e) { + try { + s(i["throw"](e)); + } catch (e) { + r(e); + } + } + function s(e) { + e.done ? n(e.value) : o(e.value).then(a, c); + } + s((i = i.apply(e, t || [])).next()); + }); +}; +var __generator = this && this.__generator || function (e, t) { + var n = { + label: 0, + sent: function sent() { + if (r[0] & 1) throw r[1]; + return r[1]; + }, + trys: [], + ops: [] + }, + i, + o, + r, + a; + return a = { + next: c(0), + throw: c(1), + return: c(2) + }, typeof Symbol === "function" && (a[Symbol.iterator] = function () { + return this; + }), a; + function c(e) { + return function (t) { + return s([e, t]); + }; + } + function s(c) { + if (i) throw new TypeError("Generator is already executing."); + while (a && (a = 0, c[0] && (n = 0)), n) try { + if (i = 1, o && (r = c[0] & 2 ? o["return"] : c[0] ? o["throw"] || ((r = o["return"]) && r.call(o), 0) : o.next) && !(r = r.call(o, c[1])).done) return r; + if (o = 0, r) c = [c[0] & 2, r.value]; + switch (c[0]) { + case 0: + case 1: + r = c; + break; + case 4: + n.label++; + return { + value: c[1], + done: false + }; + case 5: + n.label++; + o = c[1]; + c = [0]; + continue; + case 7: + c = n.ops.pop(); + n.trys.pop(); + continue; + default: + if (!(r = n.trys, r = r.length > 0 && r[r.length - 1]) && (c[0] === 6 || c[0] === 2)) { + n = 0; + continue; + } + if (c[0] === 3 && (!r || c[1] > r[0] && c[1] < r[3])) { + n.label = c[1]; + break; + } + if (c[0] === 6 && n.label < r[1]) { + n.label = r[1]; + r = c; + break; + } + if (r && n.label < r[2]) { + n.label = r[2]; + n.ops.push(c); + break; + } + if (r[2]) n.ops.pop(); + n.trys.pop(); + continue; + } + c = t.call(e, n); + } catch (e) { + c = [6, e]; + o = 0; + } finally { + i = r = 0; + } + if (c[0] & 5) throw c[1]; + return { + value: c[0] ? c[1] : void 0, + done: true + }; + } +}; +System.register(["./p-335782c2.system.js"], function (e) { + "use strict"; + + var t, n, i, o; + return { + setters: [function (e) { + t = e.r; + n = e.c; + i = e.h; + o = e.g; + }], + execute: function execute() { + var r = ":host{z-index:1000;position:fixed;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex;contain:strict;--inset-width:600px;--inset-height:600px}.wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:rgba(0, 0, 0, 0.15)}.content{-webkit-box-shadow:0px 0px 5px rgba(0, 0, 0, 0.2);box-shadow:0px 0px 5px rgba(0, 0, 0, 0.2);width:var(--inset-width);height:var(--inset-height);max-height:100%}@media only screen and (max-width: 600px){.content{width:100%;height:100%}}"; + var a = e("pwa_camera_modal_instance", function () { + function e(e) { + var i = this; + t(this, e); + this.onPhoto = n(this, "onPhoto", 7); + this.noDeviceError = n(this, "noDeviceError", 7); + this.handlePhoto = function (e) { + return __awaiter(i, void 0, void 0, function () { + return __generator(this, function (t) { + this.onPhoto.emit(e); + return [2]; + }); + }); + }; + this.handleNoDeviceError = function (e) { + return __awaiter(i, void 0, void 0, function () { + return __generator(this, function (t) { + this.noDeviceError.emit(e); + return [2]; + }); + }); + }; + this.facingMode = "user"; + this.hidePicker = false; + this.noDevicesText = "No camera found"; + this.noDevicesButtonText = "Choose image"; + } + e.prototype.handleBackdropClick = function (e) { + if (e.target !== this.el) { + this.onPhoto.emit(null); + } + }; + e.prototype.handleComponentClick = function (e) { + e.stopPropagation(); + }; + e.prototype.handleBackdropKeyUp = function (e) { + if (e.key === "Escape") { + this.onPhoto.emit(null); + } + }; + e.prototype.render = function () { + var e = this; + return i("div", { + class: "wrapper", + onClick: function onClick(t) { + return e.handleBackdropClick(t); + } + }, i("div", { + class: "content" + }, i("pwa-camera", { + onClick: function onClick(t) { + return e.handleComponentClick(t); + }, + facingMode: this.facingMode, + hidePicker: this.hidePicker, + handlePhoto: this.handlePhoto, + handleNoDeviceError: this.handleNoDeviceError, + noDevicesButtonText: this.noDevicesButtonText, + noDevicesText: this.noDevicesText + }))); + }; + Object.defineProperty(e.prototype, "el", { + get: function get() { + return o(this); + }, + enumerable: false, + configurable: true + }); + return e; + }()); + a.style = r; + } + }; +}); \ No newline at end of file diff --git a/src/public/js/pwa-elements/ionicpwaelements/p-5b57434a.system.entry.js b/src/public/js/pwa-elements/ionicpwaelements/p-5b57434a.system.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..6be185393dc3bff400521b5147c85fdcf8c4b28e --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/p-5b57434a.system.entry.js @@ -0,0 +1,80 @@ +System.register(["./p-335782c2.system.js"], function (t) { + "use strict"; + + var e, n, i, o; + return { + setters: [function (t) { + e = t.r; + n = t.c; + i = t.h; + o = t.g; + }], + execute: function execute() { + var r = ':host{z-index:1000;position:fixed;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex;contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:-apple-system, BlinkMacSystemFont, "Helvetica Neue", "Roboto", sans-serif}.wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:rgba(0, 0, 0, 0);-webkit-transition:400ms background-color cubic-bezier(.36,.66,.04,1);transition:400ms background-color cubic-bezier(.36,.66,.04,1)}.wrapper.open{background-color:rgba(0, 0, 0, 0.32)}.title{color:#999;height:23px;line-height:23px;padding-bottom:17px;-webkit-padding-end:16px;padding-inline-end:16px;-webkit-padding-start:16px;padding-inline-start:16px;padding-left:16px;padding-right:16px;padding-top:20px}.content{width:568px;-ms-flex-item-align:end;align-self:flex-end;background-color:#fff;-webkit-transition:400ms -webkit-transform cubic-bezier(.36,.66,.04,1);transition:400ms -webkit-transform cubic-bezier(.36,.66,.04,1);transition:400ms transform cubic-bezier(.36,.66,.04,1);transition:400ms transform cubic-bezier(.36,.66,.04,1), 400ms -webkit-transform cubic-bezier(.36,.66,.04,1);-webkit-transform:translateY(100%);transform:translateY(100%)}.wrapper.open .content{-webkit-transform:translateY(0%);transform:translateY(0%)}@media only screen and (max-width: 568px){.content{width:100%}}.action-sheet-option{cursor:pointer;height:52px;line-height:52px}.action-sheet-button{color:rgb(38, 38, 38);font-size:16px;-webkit-padding-end:16px;padding-inline-end:16px;-webkit-padding-start:16px;padding-inline-start:16px;padding-left:16px;padding-right:16px;padding-top:0px}.action-sheet-button:hover{background-color:#F6F6F6}'; + var s = t("pwa_action_sheet", function () { + function t(t) { + e(this, t); + this.onSelection = n(this, "onSelection", 7); + this.header = undefined; + this.cancelable = true; + this.options = []; + this.open = false; + } + t.prototype.componentDidLoad = function () { + var t = this; + requestAnimationFrame(function () { + t.open = true; + }); + }; + t.prototype.dismiss = function () { + if (this.cancelable) { + this.close(); + } + }; + t.prototype.close = function () { + var t = this; + this.open = false; + setTimeout(function () { + t.el.parentNode.removeChild(t.el); + }, 500); + }; + t.prototype.handleOptionClick = function (t, e) { + t.stopPropagation(); + this.onSelection.emit(e); + this.close(); + }; + t.prototype.render = function () { + var t = this; + return i("div", { + class: "wrapper".concat(this.open ? " open" : ""), + onClick: function onClick() { + return t.dismiss(); + } + }, i("div", { + class: "content" + }, i("div", { + class: "title" + }, this.header), this.options.map(function (e, n) { + return i("div", { + class: "action-sheet-option", + onClick: function onClick(e) { + return t.handleOptionClick(e, n); + } + }, i("div", { + class: "action-sheet-button" + }, e.title)); + }))); + }; + Object.defineProperty(t.prototype, "el", { + get: function get() { + return o(this); + }, + enumerable: false, + configurable: true + }); + return t; + }()); + s.style = r; + } + }; +}); \ No newline at end of file diff --git a/src/public/js/pwa-elements/ionicpwaelements/p-665001c2.entry.js b/src/public/js/pwa-elements/ionicpwaelements/p-665001c2.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..8af8c119feef70c10d3aeb5e3aeda178cd7e30c0 --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/p-665001c2.entry.js @@ -0,0 +1,673 @@ +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } +function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } +function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +import { r as e, f as t, h as i, g as s } from "./p-386e91ad.js"; +/** + * MediaStream ImageCapture polyfill + * + * @license + * Copyright 2018 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +var a = window.ImageCapture; +void 0 === a && (a = /*#__PURE__*/function () { + function a(e) { + var _this = this; + _classCallCheck(this, a); + if ("video" !== e.kind) throw new DOMException("NotSupportedError"); + this._videoStreamTrack = e, "readyState" in this._videoStreamTrack || (this._videoStreamTrack.readyState = "live"), this._previewStream = new MediaStream([e]), this.videoElement = document.createElement("video"), this.videoElementPlaying = new Promise(function (e) { + _this.videoElement.addEventListener("playing", e); + }), HTMLMediaElement ? this.videoElement.srcObject = this._previewStream : this.videoElement.src = URL.createObjectURL(this._previewStream), this.videoElement.muted = !0, this.videoElement.setAttribute("playsinline", ""), this.videoElement.play(), this.canvasElement = document.createElement("canvas"), this.canvas2dContext = this.canvasElement.getContext("2d"); + } + return _createClass(a, [{ + key: "videoStreamTrack", + get: function get() { + return this._videoStreamTrack; + } + }, { + key: "getPhotoCapabilities", + value: function getPhotoCapabilities() { + return new Promise(function (e, t) { + var i = { + current: 0, + min: 0, + max: 0 + }; + e({ + exposureCompensation: i, + exposureMode: "none", + fillLightMode: ["none"], + focusMode: "none", + imageHeight: i, + imageWidth: i, + iso: i, + redEyeReduction: !1, + whiteBalanceMode: "none", + zoom: i + }), t(new DOMException("OperationError")); + }); + } + }, { + key: "setOptions", + value: function setOptions() { + var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return new Promise(function () {}); + } + }, { + key: "takePhoto", + value: function takePhoto() { + var e = this; + return new Promise(function (t, i) { + if ("live" !== e._videoStreamTrack.readyState) return i(new DOMException("InvalidStateError")); + e.videoElementPlaying.then(function () { + try { + e.canvasElement.width = e.videoElement.videoWidth, e.canvasElement.height = e.videoElement.videoHeight, e.canvas2dContext.drawImage(e.videoElement, 0, 0), e.canvasElement.toBlob(t); + } catch (e) { + i(new DOMException("UnknownError")); + } + }); + }); + } + }, { + key: "grabFrame", + value: function grabFrame() { + var e = this; + return new Promise(function (t, i) { + if ("live" !== e._videoStreamTrack.readyState) return i(new DOMException("InvalidStateError")); + e.videoElementPlaying.then(function () { + try { + e.canvasElement.width = e.videoElement.videoWidth, e.canvasElement.height = e.videoElement.videoHeight, e.canvas2dContext.drawImage(e.videoElement, 0, 0), t(window.createImageBitmap(e.canvasElement)); + } catch (e) { + i(new DOMException("UnknownError")); + } + }); + }); + } + }]); +}()), window.ImageCapture = a; +var o = /*#__PURE__*/function () { + function o(t) { + var _this2 = this; + _classCallCheck(this, o); + e(this, t), this.hasMultipleCameras = !1, this.hasFlash = !1, this.flashModes = [], this.flashMode = "off", this.handlePickFile = function () {}, this.handleShutterClick = function () { + console.debug("shutter click"), _this2.capture(); + }, this.handleRotateClick = function () { + _this2.rotate(); + }, this.handleClose = function () { + _this2.handlePhoto && _this2.handlePhoto(null); + }, this.handleFlashClick = function () { + _this2.cycleFlash(); + }, this.handleCancelPhoto = function () { + var e = _this2.stream && _this2.stream.getTracks()[0]; + var t = e && e.getConstraints(); + _this2.photo = null, _this2.photoSrc = null, t ? _this2.initCamera({ + video: { + facingMode: t.facingMode + } + }) : _this2.initCamera(); + }, this.handleAcceptPhoto = function () { + _this2.handlePhoto && _this2.handlePhoto(_this2.photo); + }, this.handleFileInputChange = /*#__PURE__*/function () { + var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) { + var t, _e; + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + t = e.target.files[0]; + _context.prev = 1; + _context.next = 4; + return _this2.getOrientation(t); + case 4: + _e = _context.sent; + console.debug("Got orientation", _e), _this2.photoOrientation = _e; + _context.next = 10; + break; + case 8: + _context.prev = 8; + _context.t0 = _context["catch"](1); + case 10: + _this2.handlePhoto && _this2.handlePhoto(t); + case 11: + case "end": + return _context.stop(); + } + }, _callee, null, [[1, 8]]); + })); + return function (_x) { + return _ref.apply(this, arguments); + }; + }(), this.handleVideoMetadata = function (e) { + console.debug("Video metadata", e); + }, this.facingMode = "user", this.handlePhoto = void 0, this.hidePicker = !1, this.handleNoDeviceError = void 0, this.noDevicesText = "No camera found", this.noDevicesButtonText = "Choose image", this.photo = void 0, this.photoSrc = void 0, this.showShutterOverlay = !1, this.flashIndex = 0, this.hasCamera = null, this.rotation = 0, this.deviceError = null; + } + return _createClass(o, [{ + key: "componentDidLoad", + value: function () { + var _componentDidLoad = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + this.defaultConstraints = { + video: { + facingMode: this.facingMode + } + }; + _context2.next = 3; + return this.queryDevices(); + case 3: + _context2.next = 5; + return this.initCamera(); + case 5: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function componentDidLoad() { + return _componentDidLoad.apply(this, arguments); + } + return componentDidLoad; + }() + }, { + key: "disconnectedCallback", + value: function disconnectedCallback() { + this.stopStream(), this.photoSrc && URL.revokeObjectURL(this.photoSrc); + } + }, { + key: "hasImageCapture", + value: function hasImageCapture() { + return "ImageCapture" in window; + } + }, { + key: "queryDevices", + value: function () { + var _queryDevices = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() { + var _e2; + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + _context3.prev = 0; + _context3.next = 3; + return navigator.mediaDevices.enumerateDevices(); + case 3: + _e2 = _context3.sent.filter(function (e) { + return "videoinput" == e.kind; + }); + this.hasCamera = !!_e2.length, this.hasMultipleCameras = _e2.length > 1; + _context3.next = 10; + break; + case 7: + _context3.prev = 7; + _context3.t0 = _context3["catch"](0); + this.deviceError = _context3.t0; + case 10: + case "end": + return _context3.stop(); + } + }, _callee3, this, [[0, 7]]); + })); + function queryDevices() { + return _queryDevices.apply(this, arguments); + } + return queryDevices; + }() + }, { + key: "initCamera", + value: function () { + var _initCamera = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(e) { + var _t; + return _regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + e || (e = this.defaultConstraints); + _context4.prev = 1; + _context4.next = 4; + return navigator.mediaDevices.getUserMedia(Object.assign({ + video: !0, + audio: !1 + }, e)); + case 4: + _t = _context4.sent; + this.initStream(_t); + _context4.next = 11; + break; + case 8: + _context4.prev = 8; + _context4.t0 = _context4["catch"](1); + this.deviceError = _context4.t0, this.handleNoDeviceError && this.handleNoDeviceError(_context4.t0); + case 11: + case "end": + return _context4.stop(); + } + }, _callee4, this, [[1, 8]]); + })); + function initCamera(_x2) { + return _initCamera.apply(this, arguments); + } + return initCamera; + }() + }, { + key: "initStream", + value: function () { + var _initStream = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(e) { + return _regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + this.stream = e; + this.videoElement.srcObject = e; + if (!this.hasImageCapture()) { + _context5.next = 8; + break; + } + this.imageCapture = new window.ImageCapture(e.getVideoTracks()[0]); + _context5.next = 6; + return this.initPhotoCapabilities(this.imageCapture); + case 6: + _context5.next = 9; + break; + case 8: + this.deviceError = "No image capture", this.handleNoDeviceError && this.handleNoDeviceError(); + case 9: + t(this.el); + case 10: + case "end": + return _context5.stop(); + } + }, _callee5, this); + })); + function initStream(_x3) { + return _initStream.apply(this, arguments); + } + return initStream; + }() + }, { + key: "initPhotoCapabilities", + value: function () { + var _initPhotoCapabilities = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(e) { + var t; + return _regeneratorRuntime().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + _context6.next = 2; + return e.getPhotoCapabilities(); + case 2: + t = _context6.sent; + t.fillLightMode && t.fillLightMode.length > 1 && (this.flashModes = t.fillLightMode.map(function (e) { + return e; + }), this.flashMode ? (this.flashMode = this.flashModes[this.flashModes.indexOf(this.flashMode)] || "off", this.flashIndex = this.flashModes.indexOf(this.flashMode) || 0) : this.flashIndex = 0); + case 4: + case "end": + return _context6.stop(); + } + }, _callee6, this); + })); + function initPhotoCapabilities(_x4) { + return _initPhotoCapabilities.apply(this, arguments); + } + return initPhotoCapabilities; + }() + }, { + key: "stopStream", + value: function stopStream() { + this.videoElement && (this.videoElement.srcObject = null), this.stream && this.stream.getTracks().forEach(function (e) { + return e.stop(); + }); + } + }, { + key: "capture", + value: function () { + var _capture = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7() { + var _e3; + return _regeneratorRuntime().wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { + case 0: + if (!this.hasImageCapture()) { + _context7.next = 13; + break; + } + _context7.prev = 1; + _context7.next = 4; + return this.imageCapture.takePhoto({ + fillLightMode: this.flashModes.length > 1 ? this.flashMode : void 0 + }); + case 4: + _e3 = _context7.sent; + _context7.next = 7; + return this.flashScreen(); + case 7: + this.promptAccept(_e3); + _context7.next = 13; + break; + case 10: + _context7.prev = 10; + _context7.t0 = _context7["catch"](1); + console.error("Unable to take photo!", _context7.t0); + case 13: + this.stopStream(); + case 14: + case "end": + return _context7.stop(); + } + }, _callee7, this, [[1, 10]]); + })); + function capture() { + return _capture.apply(this, arguments); + } + return capture; + }() + }, { + key: "promptAccept", + value: function () { + var _promptAccept = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(e) { + var t; + return _regeneratorRuntime().wrap(function _callee8$(_context8) { + while (1) switch (_context8.prev = _context8.next) { + case 0: + this.photo = e; + _context8.next = 3; + return this.getOrientation(e); + case 3: + t = _context8.sent; + if (!(console.debug("Got orientation", t), this.photoOrientation = t, t)) { + _context8.next = 15; + break; + } + _context8.t0 = t; + _context8.next = _context8.t0 === 1 ? 8 : _context8.t0 === 2 ? 8 : _context8.t0 === 3 ? 10 : _context8.t0 === 4 ? 10 : _context8.t0 === 5 ? 12 : _context8.t0 === 6 ? 12 : _context8.t0 === 7 ? 14 : _context8.t0 === 8 ? 14 : 15; + break; + case 8: + this.rotation = 0; + return _context8.abrupt("break", 15); + case 10: + this.rotation = 180; + return _context8.abrupt("break", 15); + case 12: + this.rotation = 90; + return _context8.abrupt("break", 15); + case 14: + this.rotation = 270; + case 15: + this.photoSrc = URL.createObjectURL(e); + case 16: + case "end": + return _context8.stop(); + } + }, _callee8, this); + })); + function promptAccept(_x5) { + return _promptAccept.apply(this, arguments); + } + return promptAccept; + }() + }, { + key: "getOrientation", + value: function getOrientation(e) { + return new Promise(function (t) { + var i = new FileReader(); + i.onload = function (e) { + var i = new DataView(e.target.result); + if (65496 !== i.getUint16(0, !1)) return t(-2); + var s = i.byteLength; + var a = 2; + for (; a < s;) { + var _e4 = i.getUint16(a, !1); + if (a += 2, 65505 === _e4) { + if (1165519206 !== i.getUint32(a += 2, !1)) return t(-1); + var _e5 = 18761 === i.getUint16(a += 6, !1); + a += i.getUint32(a + 4, _e5); + var _s = i.getUint16(a, _e5); + a += 2; + for (var _o2 = 0; _o2 < _s; _o2++) if (274 === i.getUint16(a + 12 * _o2, _e5)) return t(i.getUint16(a + 12 * _o2 + 8, _e5)); + } else { + if (65280 != (65280 & _e4)) break; + a += i.getUint16(a, !1); + } + } + return t(-1); + }, i.readAsArrayBuffer(e.slice(0, 65536)); + }); + } + }, { + key: "rotate", + value: function rotate() { + this.stopStream(); + var e = this.stream && this.stream.getTracks()[0]; + if (!e) return; + var t = e.getConstraints().facingMode; + if (!t) { + var _i = e.getCapabilities(); + _i.facingMode && (t = _i.facingMode[0]); + } + this.initCamera("environment" === t ? { + video: { + facingMode: "user" + } + } : { + video: { + facingMode: "environment" + } + }); + } + }, { + key: "setFlashMode", + value: function setFlashMode(e) { + console.debug("New flash mode: ", e), this.flashMode = e; + } + }, { + key: "cycleFlash", + value: function cycleFlash() { + this.flashModes.length > 0 && (this.flashIndex = (this.flashIndex + 1) % this.flashModes.length, this.setFlashMode(this.flashModes[this.flashIndex])); + } + }, { + key: "flashScreen", + value: function () { + var _flashScreen = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9() { + var _this3 = this; + return _regeneratorRuntime().wrap(function _callee9$(_context9) { + while (1) switch (_context9.prev = _context9.next) { + case 0: + return _context9.abrupt("return", new Promise(function (e) { + _this3.showShutterOverlay = !0, setTimeout(function () { + _this3.showShutterOverlay = !1, e(); + }, 100); + })); + case 1: + case "end": + return _context9.stop(); + } + }, _callee9); + })); + function flashScreen() { + return _flashScreen.apply(this, arguments); + } + return flashScreen; + }() + }, { + key: "iconExit", + value: function iconExit() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Cg id='Icon_5_'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M402.2,134L378,109.8c-1.6-1.6-4.1-1.6-5.7,0L258.8,223.4c-1.6,1.6-4.1,1.6-5.7,0L139.6,109.8 c-1.6-1.6-4.1-1.6-5.7,0L109.8,134c-1.6,1.6-1.6,4.1,0,5.7l113.5,113.5c1.6,1.6,1.6,4.1,0,5.7L109.8,372.4c-1.6,1.6-1.6,4.1,0,5.7 l24.1,24.1c1.6,1.6,4.1,1.6,5.7,0l113.5-113.5c1.6-1.6,4.1-1.6,5.7,0l113.5,113.5c1.6,1.6,4.1,1.6,5.7,0l24.1-24.1 c1.6-1.6,1.6-4.1,0-5.7L288.6,258.8c-1.6-1.6-1.6-4.1,0-5.7l113.5-113.5C403.7,138.1,403.7,135.5,402.2,134z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "iconPhotos", + value: function iconPhotos() { + return i("svg", { + xmlns: "http://www.w3.org/2000/svg", + width: "512", + height: "512", + viewBox: "0 0 512 512" + }, i("path", { + d: "M450.29,112H142c-34,0-62,27.51-62,61.33V418.67C80,452.49,108,480,142,480H450c34,0,62-26.18,62-60V173.33C512,139.51,484.32,112,450.29,112Zm-77.15,61.34a46,46,0,1,1-46.28,46A46.19,46.19,0,0,1,373.14,173.33Zm-231.55,276c-17,0-29.86-13.75-29.86-30.66V353.85l90.46-80.79a46.54,46.54,0,0,1,63.44,1.83L328.27,337l-113,112.33ZM480,418.67a30.67,30.67,0,0,1-30.71,30.66H259L376.08,333a46.24,46.24,0,0,1,59.44-.16L480,370.59Z" + }), i("path", { + d: "M384,32H64A64,64,0,0,0,0,96V352a64.11,64.11,0,0,0,48,62V152a72,72,0,0,1,72-72H446A64.11,64.11,0,0,0,384,32Z" + })); + } + }, { + key: "iconConfirm", + value: function iconConfirm() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Ccircle fill='%232CD865' cx='256' cy='256' r='256'/%3E%3Cg id='Icon_1_'%3E%3Cg%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M208,301.4l-55.4-55.5c-1.5-1.5-4-1.6-5.6-0.1l-23.4,22.3c-1.6,1.6-1.7,4.1-0.1,5.7l81.6,81.4 c3.1,3.1,8.2,3.1,11.3,0l171.8-171.7c1.6-1.6,1.6-4.2-0.1-5.7l-23.4-22.3c-1.6-1.5-4.1-1.5-5.6,0.1L213.7,301.4 C212.1,303,209.6,303,208,301.4z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "iconReverseCamera", + value: function iconReverseCamera() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M352,0H160C72,0,0,72,0,160v192c0,88,72,160,160,160h192c88,0,160-72,160-160V160C512,72,440,0,352,0z M356.7,365.8l-3.7,3.3c-27,23.2-61.4,35.9-96.8,35.9c-72.4,0-135.8-54.7-147-125.6c-0.3-1.9-2-3.3-3.9-3.3H64 c-3.3,0-5.2-3.8-3.2-6.4l61.1-81.4c1.6-2.1,4.7-2.1,6.4-0.1l63.3,81.4c2,2.6,0.2,6.5-3.2,6.5h-40.6c-2.5,0-4.5,2.4-3.9,4.8 c11.5,51.5,59.2,90.6,112.4,90.6c26.4,0,51.8-9.7,73.7-27.9l3.1-2.5c1.6-1.3,3.9-1.1,5.3,0.3l18.5,18.6 C358.5,361.6,358.4,364.3,356.7,365.8z M451.4,245.6l-61,83.5c-1.6,2.2-4.8,2.2-6.4,0.1l-63.3-83.3c-2-2.6-0.1-6.4,3.2-6.4h40.8 c2.5,0,4.4-2.3,3.9-4.8c-5.1-24.2-17.8-46.5-36.5-63.7c-21.2-19.4-48.2-30.1-76-30.1c-26.5,0-52.6,9.7-73.7,27.3l-3.1,2.5 c-1.6,1.3-3.9,1.2-5.4-0.3l-18.5-18.5c-1.6-1.6-1.5-4.3,0.2-5.9l3.5-3.1c27-23.2,61.4-35.9,96.8-35.9c38,0,73.9,13.7,101.2,38.7 c23.2,21.1,40.3,55.2,45.7,90.1c0.3,1.9,1.9,3.4,3.9,3.4h41.3C451.4,239.2,453.3,243,451.4,245.6z'/%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "iconRetake", + value: function iconRetake() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Ccircle fill='%23727A87' cx='256' cy='256' r='256'/%3E%3Cg id='Icon_5_'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M394.2,142L370,117.8c-1.6-1.6-4.1-1.6-5.7,0L258.8,223.4c-1.6,1.6-4.1,1.6-5.7,0L147.6,117.8 c-1.6-1.6-4.1-1.6-5.7,0L117.8,142c-1.6,1.6-1.6,4.1,0,5.7l105.5,105.5c1.6,1.6,1.6,4.1,0,5.7L117.8,364.4c-1.6,1.6-1.6,4.1,0,5.7 l24.1,24.1c1.6,1.6,4.1,1.6,5.7,0l105.5-105.5c1.6-1.6,4.1-1.6,5.7,0l105.5,105.5c1.6,1.6,4.1,1.6,5.7,0l24.1-24.1 c1.6-1.6,1.6-4.1,0-5.7L288.6,258.8c-1.6-1.6-1.6-4.1,0-5.7l105.5-105.5C395.7,146.1,395.7,143.5,394.2,142z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "iconFlashOff", + value: function iconFlashOff() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cg%3E%3Cpath class='st0' d='M498,483.7L42.3,28L14,56.4l149.8,149.8L91,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9c1.6,0,2.7,1.3,2.4,2.7 L197.6,507c-1,4.4,5.8,6.9,8.9,3.2l118.6-142.8L469.6,512L498,483.7z'/%3E%3Cpath class='st0' d='M449,218.2c2.5-3,0.1-7.2-3.9-7.2H301.2c-1.6,0-2.7-1.3-2.4-2.7L342.4,5c1-4.4-5.8-6.9-8.9-3.2L214.9,144.6 l161.3,161.3L449,218.2z'/%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "iconFlashOn", + value: function iconFlashOn() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cpath class='st0' d='M287.2,211c-1.6,0-2.7-1.3-2.4-2.7L328.4,5c1-4.4-5.8-6.9-8.9-3.2L77,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9 c1.6,0,2.7,1.3,2.4,2.7L183.6,507c-1,4.4,5.8,6.9,8.9,3.2l242.5-292c2.5-3,0.1-7.2-3.9-7.2L287.2,211L287.2,211z'/%3E%3C/svg%3E"; + } + }, { + key: "iconFlashAuto", + value: function iconFlashAuto() { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cpath class='st0' d='M287.2,211c-1.6,0-2.7-1.3-2.4-2.7L328.4,5c1-4.4-5.8-6.9-8.9-3.2L77,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9 c1.6,0,2.7,1.3,2.4,2.7L183.6,507c-1,4.4,5.8,6.9,8.9,3.2l242.5-292c2.5-3,0.1-7.2-3.9-7.2L287.2,211L287.2,211z'/%3E%3Cg%3E%3Cpath class='st0' d='M321.3,186l74-186H438l74,186h-43.5l-11.9-32.5h-80.9l-12,32.5H321.3z M415.8,47.9l-27.2,70.7h54.9l-27.2-70.7 H415.8z'/%3E%3C/g%3E%3C/svg%3E"; + } + }, { + key: "render", + value: function render() { + var _this4 = this; + return i("div", { + class: "camera-wrapper" + }, i("div", { + class: "camera-header" + }, i("section", { + class: "items" + }, i("div", { + class: "item close", + onClick: function onClick(e) { + return _this4.handleClose(e); + } + }, i("img", { + src: this.iconExit() + })), i("div", { + class: "item flash", + onClick: function onClick(e) { + return _this4.handleFlashClick(e); + } + }, this.flashModes.length > 0 && i("div", null, "off" == this.flashMode ? i("img", { + src: this.iconFlashOff() + }) : "", "auto" == this.flashMode ? i("img", { + src: this.iconFlashAuto() + }) : "", "flash" == this.flashMode ? i("img", { + src: this.iconFlashOn() + }) : "")))), (!1 === this.hasCamera || !!this.deviceError) && i("div", { + class: "no-device" + }, i("h2", null, this.noDevicesText), i("label", { + htmlFor: "_pwa-elements-camera-input" + }, this.noDevicesButtonText), i("input", { + type: "file", + id: "_pwa-elements-camera-input", + onChange: this.handleFileInputChange, + accept: "image/*", + class: "select-file-button" + })), this.photoSrc ? i("div", { + class: "accept" + }, i("div", { + class: "accept-image", + style: Object.assign({ + backgroundImage: "url(".concat(this.photoSrc, ")") + }, {}) + })) : i("div", { + class: "camera-video" + }, this.showShutterOverlay && i("div", { + class: "shutter-overlay" + }), this.hasImageCapture() ? i("video", { + ref: function ref(e) { + return _this4.videoElement = e; + }, + onLoadedMetaData: this.handleVideoMetadata, + autoplay: !0, + playsinline: !0 + }) : i("canvas", { + ref: function ref(e) { + return _this4.canvasElement = e; + }, + width: "100%", + height: "100%" + }), i("canvas", { + class: "offscreen-image-render", + ref: function ref(e) { + return _this4.offscreenCanvas = e; + }, + width: "100%", + height: "100%" + })), this.hasCamera && i("div", { + class: "camera-footer" + }, this.photo ? i("section", { + class: "items" + }, i("div", { + class: "item accept-cancel", + onClick: function onClick(e) { + return _this4.handleCancelPhoto(e); + } + }, i("img", { + src: this.iconRetake() + })), i("div", { + class: "item accept-use", + onClick: function onClick(e) { + return _this4.handleAcceptPhoto(e); + } + }, i("img", { + src: this.iconConfirm() + }))) : [!this.hidePicker && i("div", { + class: "pick-image", + onClick: this.handlePickFile + }, i("label", { + htmlFor: "_pwa-elements-file-pick" + }, this.iconPhotos()), i("input", { + type: "file", + id: "_pwa-elements-file-pick", + onChange: this.handleFileInputChange, + accept: "image/*", + class: "pick-image-button" + })), i("div", { + class: "shutter", + onClick: this.handleShutterClick + }, i("div", { + class: "shutter-button" + })), i("div", { + class: "rotate", + onClick: this.handleRotateClick + }, i("img", { + src: this.iconReverseCamera() + }))])); + } + }, { + key: "el", + get: function get() { + return s(this); + } + }], [{ + key: "assetsDirs", + get: function get() { + return ["icons"]; + } + }]); +}(); +o.style = ":host{--header-height:4em;--footer-height:9em;--header-height-landscape:3em;--footer-height-landscape:6em;--shutter-size:6em;--icon-size-header:1.5em;--icon-size-footer:2.5em;--margin-size-header:1.5em;--margin-size-footer:2.0em;font-family:-apple-system, BlinkMacSystemFont,\n “Segoe UIâ€, “Robotoâ€, “Droid Sansâ€, “Helvetica Neueâ€, sans-serif;display:block;width:100%;height:100%}.items{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;width:100%;height:100%;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.items .item{-ms-flex:1;flex:1;text-align:center}.items .item:first-child{text-align:left}.items .item:last-child{text-align:right}.camera-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100%;height:100%}.camera-header{color:white;background-color:black;height:var(--header-height)}.camera-header .items{padding:var(--margin-size-header)}.camera-footer{position:relative;color:white;background-color:black;height:var(--footer-height)}.camera-footer .items{padding:var(--margin-size-footer)}@media (max-height: 375px){.camera-header{--header-height:var(--header-height-landscape)}.camera-footer{--footer-height:var(--footer-height-landscape)}.camera-footer .shutter{--shutter-size:4em}}.camera-video{position:relative;-ms-flex:1;flex:1;overflow:hidden;background-color:black}video{width:100%;height:100%;max-height:100%;min-height:100%;-o-object-fit:cover;object-fit:cover;background-color:black}.pick-image{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;left:var(--margin-size-footer);top:0;height:100%;width:var(--icon-size-footer);color:white}.pick-image input{visibility:hidden}.pick-image svg{cursor:pointer;fill:white;width:var(--icon-size-footer);height:var(--icon-size-footer)}.shutter{position:absolute;left:50%;top:50%;width:var(--shutter-size);height:var(--shutter-size);margin-top:calc(var(--shutter-size) / -2);margin-left:calc(var(--shutter-size) / -2);border-radius:100%;background-color:#c6cdd8;padding:12px;-webkit-box-sizing:border-box;box-sizing:border-box}.shutter:active .shutter-button{background-color:#9da9bb}.shutter-button{background-color:white;border-radius:100%;width:100%;height:100%}.rotate{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;right:var(--margin-size-footer);top:0;height:100%;width:var(--icon-size-footer);color:white}.rotate img{width:var(--icon-size-footer);height:var(--icon-size-footer)}.shutter-overlay{z-index:5;position:absolute;width:100%;height:100%;background-color:black}.error{width:100%;height:100%;color:white;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.no-device{background-color:black;-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:white}.no-device label{cursor:pointer;background:#fff;border-radius:6px;padding:6px 8px;color:black}.no-device input{visibility:hidden;height:0;margin-top:16px}.accept{background-color:black;-ms-flex:1;flex:1;overflow:hidden}.accept .accept-image{width:100%;height:100%;max-height:100%;background-position:center center;background-size:cover;background-repeat:no-repeat}.close img{cursor:pointer;width:var(--icon-size-header);height:var(--icon-size-header)}.flash img{width:var(--icon-size-header);height:var(--icon-size-header)}.accept-use img{width:var(--icon-size-footer);height:var(--icon-size-footer)}.accept-cancel img{width:var(--icon-size-footer);height:var(--icon-size-footer)}.offscreen-image-render{top:0;left:0;visibility:hidden;pointer-events:none;width:100%;height:100%}"; +export { o as pwa_camera }; \ No newline at end of file diff --git a/src/public/js/pwa-elements/ionicpwaelements/p-b57f4873.entry.js b/src/public/js/pwa-elements/ionicpwaelements/p-b57f4873.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..d00f7b27fda957a3c07bd1ac6fe5bebc6be29940 --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/p-b57f4873.entry.js @@ -0,0 +1,62 @@ +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +import { r as t, h as s, g as i, H as e } from "./p-386e91ad.js"; +var o = /*#__PURE__*/function () { + function o(s) { + _classCallCheck(this, o); + t(this, s), this.message = void 0, this.duration = 2e3, this.closing = null; + } + return _createClass(o, [{ + key: "hostData", + value: function hostData() { + var t = { + out: !!this.closing + }; + return null !== this.closing && (t.in = !this.closing), { + class: t + }; + } + }, { + key: "componentDidLoad", + value: function componentDidLoad() { + var _this = this; + setTimeout(function () { + _this.closing = !1; + }), setTimeout(function () { + _this.close(); + }, this.duration); + } + }, { + key: "close", + value: function close() { + var _this2 = this; + this.closing = !0, setTimeout(function () { + _this2.el.parentNode.removeChild(_this2.el); + }, 1e3); + } + }, { + key: "__stencil_render", + value: function __stencil_render() { + return s("div", { + class: "wrapper" + }, s("div", { + class: "toast" + }, this.message)); + } + }, { + key: "el", + get: function get() { + return i(this); + } + }, { + key: "render", + value: function render() { + return s(e, this.hostData(), this.__stencil_render()); + } + }]); +}(); +o.style = ':host{position:fixed;bottom:20px;left:0;right:0;display:-ms-flexbox;display:flex;opacity:0}:host(.in){-webkit-transition:opacity 300ms;transition:opacity 300ms;opacity:1}:host(.out){-webkit-transition:opacity 1s;transition:opacity 1s;opacity:0}.wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.toast{font-family:-apple-system, system-ui, "Helvetica Neue", Roboto, sans-serif;background-color:#eee;color:black;border-radius:5px;padding:10px 15px;font-size:14px;font-weight:500;-webkit-box-shadow:0px 1px 2px rgba(0, 0, 0, 0.20);box-shadow:0px 1px 2px rgba(0, 0, 0, 0.20)}'; +export { o as pwa_toast }; \ No newline at end of file diff --git a/src/public/js/pwa-elements/ionicpwaelements/p-d0cae4dc.entry.js b/src/public/js/pwa-elements/ionicpwaelements/p-d0cae4dc.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..e93d499609240fcf36caf0b4c4752e3fe5e25bdf --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/p-d0cae4dc.entry.js @@ -0,0 +1,70 @@ +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +import { r as t, c as e, h as i, g as n } from "./p-386e91ad.js"; +var s = /*#__PURE__*/function () { + function s(i) { + _classCallCheck(this, s); + t(this, i), this.onSelection = e(this, "onSelection", 7), this.header = void 0, this.cancelable = !0, this.options = [], this.open = !1; + } + return _createClass(s, [{ + key: "componentDidLoad", + value: function componentDidLoad() { + var _this = this; + requestAnimationFrame(function () { + _this.open = !0; + }); + } + }, { + key: "dismiss", + value: function dismiss() { + this.cancelable && this.close(); + } + }, { + key: "close", + value: function close() { + var _this2 = this; + this.open = !1, setTimeout(function () { + _this2.el.parentNode.removeChild(_this2.el); + }, 500); + } + }, { + key: "handleOptionClick", + value: function handleOptionClick(t, e) { + t.stopPropagation(), this.onSelection.emit(e), this.close(); + } + }, { + key: "render", + value: function render() { + var _this3 = this; + return i("div", { + class: "wrapper" + (this.open ? " open" : ""), + onClick: function onClick() { + return _this3.dismiss(); + } + }, i("div", { + class: "content" + }, i("div", { + class: "title" + }, this.header), this.options.map(function (t, e) { + return i("div", { + class: "action-sheet-option", + onClick: function onClick(t) { + return _this3.handleOptionClick(t, e); + } + }, i("div", { + class: "action-sheet-button" + }, t.title)); + }))); + } + }, { + key: "el", + get: function get() { + return n(this); + } + }]); +}(); +s.style = ':host{z-index:1000;position:fixed;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex;contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:-apple-system, BlinkMacSystemFont, "Helvetica Neue", "Roboto", sans-serif}.wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:rgba(0, 0, 0, 0);-webkit-transition:400ms background-color cubic-bezier(.36,.66,.04,1);transition:400ms background-color cubic-bezier(.36,.66,.04,1)}.wrapper.open{background-color:rgba(0, 0, 0, 0.32)}.title{color:#999;height:23px;line-height:23px;padding-bottom:17px;-webkit-padding-end:16px;padding-inline-end:16px;-webkit-padding-start:16px;padding-inline-start:16px;padding-left:16px;padding-right:16px;padding-top:20px}.content{width:568px;-ms-flex-item-align:end;align-self:flex-end;background-color:#fff;-webkit-transition:400ms -webkit-transform cubic-bezier(.36,.66,.04,1);transition:400ms -webkit-transform cubic-bezier(.36,.66,.04,1);transition:400ms transform cubic-bezier(.36,.66,.04,1);transition:400ms transform cubic-bezier(.36,.66,.04,1), 400ms -webkit-transform cubic-bezier(.36,.66,.04,1);-webkit-transform:translateY(100%);transform:translateY(100%)}.wrapper.open .content{-webkit-transform:translateY(0%);transform:translateY(0%)}@media only screen and (max-width: 568px){.content{width:100%}}.action-sheet-option{cursor:pointer;height:52px;line-height:52px}.action-sheet-button{color:rgb(38, 38, 38);font-size:16px;-webkit-padding-end:16px;padding-inline-end:16px;-webkit-padding-start:16px;padding-inline-start:16px;padding-left:16px;padding-right:16px;padding-top:0px}.action-sheet-button:hover{background-color:#F6F6F6}'; +export { s as pwa_action_sheet }; \ No newline at end of file diff --git a/src/public/js/pwa-elements/ionicpwaelements/p-d212ae1d.entry.js b/src/public/js/pwa-elements/ionicpwaelements/p-d212ae1d.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..0984df026a5238e52777fd0c52e092f167da7c67 --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/p-d212ae1d.entry.js @@ -0,0 +1,92 @@ +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } +function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } +function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +import { r as t, c as e, h as i, g as s } from "./p-386e91ad.js"; +var h = /*#__PURE__*/function () { + function h(i) { + var _this = this; + _classCallCheck(this, h); + t(this, i), this.onPhoto = e(this, "onPhoto", 7), this.noDeviceError = e(this, "noDeviceError", 7), this.handlePhoto = /*#__PURE__*/function () { + var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(t) { + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _this.onPhoto.emit(t); + case 1: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function (_x) { + return _ref.apply(this, arguments); + }; + }(), this.handleNoDeviceError = /*#__PURE__*/function () { + var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(t) { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _this.noDeviceError.emit(t); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return function (_x2) { + return _ref2.apply(this, arguments); + }; + }(), this.facingMode = "user", this.hidePicker = !1, this.noDevicesText = "No camera found", this.noDevicesButtonText = "Choose image"; + } + return _createClass(h, [{ + key: "handleBackdropClick", + value: function handleBackdropClick(t) { + t.target !== this.el && this.onPhoto.emit(null); + } + }, { + key: "handleComponentClick", + value: function handleComponentClick(t) { + t.stopPropagation(); + } + }, { + key: "handleBackdropKeyUp", + value: function handleBackdropKeyUp(t) { + "Escape" === t.key && this.onPhoto.emit(null); + } + }, { + key: "render", + value: function render() { + var _this2 = this; + return i("div", { + class: "wrapper", + onClick: function onClick(t) { + return _this2.handleBackdropClick(t); + } + }, i("div", { + class: "content" + }, i("pwa-camera", { + onClick: function onClick(t) { + return _this2.handleComponentClick(t); + }, + facingMode: this.facingMode, + hidePicker: this.hidePicker, + handlePhoto: this.handlePhoto, + handleNoDeviceError: this.handleNoDeviceError, + noDevicesButtonText: this.noDevicesButtonText, + noDevicesText: this.noDevicesText + }))); + } + }, { + key: "el", + get: function get() { + return s(this); + } + }]); +}(); +h.style = ":host{z-index:1000;position:fixed;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex;contain:strict;--inset-width:600px;--inset-height:600px}.wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:rgba(0, 0, 0, 0.15)}.content{-webkit-box-shadow:0px 0px 5px rgba(0, 0, 0, 0.2);box-shadow:0px 0px 5px rgba(0, 0, 0, 0.2);width:var(--inset-width);height:var(--inset-height);max-height:100%}@media only screen and (max-width: 600px){.content{width:100%;height:100%}}"; +export { h as pwa_camera_modal_instance }; \ No newline at end of file diff --git a/src/public/js/pwa-elements/ionicpwaelements/p-db3c6183.system.entry.js b/src/public/js/pwa-elements/ionicpwaelements/p-db3c6183.system.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..c8580396907599eb2a21e736f8ffe1e1b4f1f86d --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/p-db3c6183.system.entry.js @@ -0,0 +1,70 @@ +System.register(["./p-335782c2.system.js"], function (t) { + "use strict"; + + var e, i, o, s; + return { + setters: [function (t) { + e = t.r; + i = t.h; + o = t.g; + s = t.H; + }], + execute: function execute() { + var n = ':host{position:fixed;bottom:20px;left:0;right:0;display:-ms-flexbox;display:flex;opacity:0}:host(.in){-webkit-transition:opacity 300ms;transition:opacity 300ms;opacity:1}:host(.out){-webkit-transition:opacity 1s;transition:opacity 1s;opacity:0}.wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.toast{font-family:-apple-system, system-ui, "Helvetica Neue", Roboto, sans-serif;background-color:#eee;color:black;border-radius:5px;padding:10px 15px;font-size:14px;font-weight:500;-webkit-box-shadow:0px 1px 2px rgba(0, 0, 0, 0.20);box-shadow:0px 1px 2px rgba(0, 0, 0, 0.20)}'; + var r = t("pwa_toast", function () { + function t(t) { + e(this, t); + this.message = undefined; + this.duration = 2e3; + this.closing = null; + } + t.prototype.hostData = function () { + var t = { + out: !!this.closing + }; + if (this.closing !== null) { + t["in"] = !this.closing; + } + return { + class: t + }; + }; + t.prototype.componentDidLoad = function () { + var t = this; + setTimeout(function () { + t.closing = false; + }); + setTimeout(function () { + t.close(); + }, this.duration); + }; + t.prototype.close = function () { + var t = this; + this.closing = true; + setTimeout(function () { + t.el.parentNode.removeChild(t.el); + }, 1e3); + }; + t.prototype.__stencil_render = function () { + return i("div", { + class: "wrapper" + }, i("div", { + class: "toast" + }, this.message)); + }; + Object.defineProperty(t.prototype, "el", { + get: function get() { + return o(this); + }, + enumerable: false, + configurable: true + }); + t.prototype.render = function () { + return i(s, this.hostData(), this.__stencil_render()); + }; + return t; + }()); + r.style = n; + } + }; +}); \ No newline at end of file diff --git a/src/public/js/pwa-elements/ionicpwaelements/p-fab2e7af.system.entry.js b/src/public/js/pwa-elements/ionicpwaelements/p-fab2e7af.system.entry.js new file mode 100644 index 0000000000000000000000000000000000000000..a09c6f3c28e7f0a4b31bc4f8789b01da4542d0e8 --- /dev/null +++ b/src/public/js/pwa-elements/ionicpwaelements/p-fab2e7af.system.entry.js @@ -0,0 +1,793 @@ +var __awaiter = this && this.__awaiter || function (e, t, i, n) { + function r(e) { + return e instanceof i ? e : new i(function (t) { + t(e); + }); + } + return new (i || (i = Promise))(function (i, a) { + function o(e) { + try { + c(n.next(e)); + } catch (e) { + a(e); + } + } + function s(e) { + try { + c(n["throw"](e)); + } catch (e) { + a(e); + } + } + function c(e) { + e.done ? i(e.value) : r(e.value).then(o, s); + } + c((n = n.apply(e, t || [])).next()); + }); +}; +var __generator = this && this.__generator || function (e, t) { + var i = { + label: 0, + sent: function sent() { + if (a[0] & 1) throw a[1]; + return a[1]; + }, + trys: [], + ops: [] + }, + n, + r, + a, + o; + return o = { + next: s(0), + throw: s(1), + return: s(2) + }, typeof Symbol === "function" && (o[Symbol.iterator] = function () { + return this; + }), o; + function s(e) { + return function (t) { + return c([e, t]); + }; + } + function c(s) { + if (n) throw new TypeError("Generator is already executing."); + while (o && (o = 0, s[0] && (i = 0)), i) try { + if (n = 1, r && (a = s[0] & 2 ? r["return"] : s[0] ? r["throw"] || ((a = r["return"]) && a.call(r), 0) : r.next) && !(a = a.call(r, s[1])).done) return a; + if (r = 0, a) s = [s[0] & 2, a.value]; + switch (s[0]) { + case 0: + case 1: + a = s; + break; + case 4: + i.label++; + return { + value: s[1], + done: false + }; + case 5: + i.label++; + r = s[1]; + s = [0]; + continue; + case 7: + s = i.ops.pop(); + i.trys.pop(); + continue; + default: + if (!(a = i.trys, a = a.length > 0 && a[a.length - 1]) && (s[0] === 6 || s[0] === 2)) { + i = 0; + continue; + } + if (s[0] === 3 && (!a || s[1] > a[0] && s[1] < a[3])) { + i.label = s[1]; + break; + } + if (s[0] === 6 && i.label < a[1]) { + i.label = a[1]; + a = s; + break; + } + if (a && i.label < a[2]) { + i.label = a[2]; + i.ops.push(s); + break; + } + if (a[2]) i.ops.pop(); + i.trys.pop(); + continue; + } + s = t.call(e, i); + } catch (e) { + s = [6, e]; + r = 0; + } finally { + n = a = 0; + } + if (s[0] & 5) throw s[1]; + return { + value: s[0] ? s[1] : void 0, + done: true + }; + } +}; +System.register(["./p-335782c2.system.js"], function (e) { + "use strict"; + + var t, i, n, r; + return { + setters: [function (e) { + t = e.r; + i = e.f; + n = e.h; + r = e.g; + }], + execute: function execute() { + /** + * MediaStream ImageCapture polyfill + * + * @license + * Copyright 2018 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + var a = window.ImageCapture; + if (typeof a === "undefined") { + a = function () { + function e(e) { + var t = this; + if (e.kind !== "video") throw new DOMException("NotSupportedError"); + this._videoStreamTrack = e; + if (!("readyState" in this._videoStreamTrack)) { + this._videoStreamTrack.readyState = "live"; + } + this._previewStream = new MediaStream([e]); + this.videoElement = document.createElement("video"); + this.videoElementPlaying = new Promise(function (e) { + t.videoElement.addEventListener("playing", e); + }); + if (HTMLMediaElement) { + this.videoElement.srcObject = this._previewStream; + } else { + this.videoElement.src = URL.createObjectURL(this._previewStream); + } + this.videoElement.muted = true; + this.videoElement.setAttribute("playsinline", ""); + this.videoElement.play(); + this.canvasElement = document.createElement("canvas"); + this.canvas2dContext = this.canvasElement.getContext("2d"); + } + Object.defineProperty(e.prototype, "videoStreamTrack", { + get: function get() { + return this._videoStreamTrack; + }, + enumerable: false, + configurable: true + }); + e.prototype.getPhotoCapabilities = function () { + return new Promise(function e(t, i) { + var n = { + current: 0, + min: 0, + max: 0 + }; + t({ + exposureCompensation: n, + exposureMode: "none", + fillLightMode: ["none"], + focusMode: "none", + imageHeight: n, + imageWidth: n, + iso: n, + redEyeReduction: false, + whiteBalanceMode: "none", + zoom: n + }); + i(new DOMException("OperationError")); + }); + }; + e.prototype.setOptions = function (e) { + if (e === void 0) { + e = {}; + } + return new Promise(function e(t, i) {}); + }; + e.prototype.takePhoto = function () { + var e = this; + return new Promise(function t(i, n) { + if (e._videoStreamTrack.readyState !== "live") { + return n(new DOMException("InvalidStateError")); + } + e.videoElementPlaying.then(function () { + try { + e.canvasElement.width = e.videoElement.videoWidth; + e.canvasElement.height = e.videoElement.videoHeight; + e.canvas2dContext.drawImage(e.videoElement, 0, 0); + e.canvasElement.toBlob(i); + } catch (e) { + n(new DOMException("UnknownError")); + } + }); + }); + }; + e.prototype.grabFrame = function () { + var e = this; + return new Promise(function t(i, n) { + if (e._videoStreamTrack.readyState !== "live") { + return n(new DOMException("InvalidStateError")); + } + e.videoElementPlaying.then(function () { + try { + e.canvasElement.width = e.videoElement.videoWidth; + e.canvasElement.height = e.videoElement.videoHeight; + e.canvas2dContext.drawImage(e.videoElement, 0, 0); + i(window.createImageBitmap(e.canvasElement)); + } catch (e) { + n(new DOMException("UnknownError")); + } + }); + }); + }; + return e; + }(); + } + window.ImageCapture = a; + var o = ":host{--header-height:4em;--footer-height:9em;--header-height-landscape:3em;--footer-height-landscape:6em;--shutter-size:6em;--icon-size-header:1.5em;--icon-size-footer:2.5em;--margin-size-header:1.5em;--margin-size-footer:2.0em;font-family:-apple-system, BlinkMacSystemFont,\n “Segoe UIâ€, “Robotoâ€, “Droid Sansâ€, “Helvetica Neueâ€, sans-serif;display:block;width:100%;height:100%}.items{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;width:100%;height:100%;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.items .item{-ms-flex:1;flex:1;text-align:center}.items .item:first-child{text-align:left}.items .item:last-child{text-align:right}.camera-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100%;height:100%}.camera-header{color:white;background-color:black;height:var(--header-height)}.camera-header .items{padding:var(--margin-size-header)}.camera-footer{position:relative;color:white;background-color:black;height:var(--footer-height)}.camera-footer .items{padding:var(--margin-size-footer)}@media (max-height: 375px){.camera-header{--header-height:var(--header-height-landscape)}.camera-footer{--footer-height:var(--footer-height-landscape)}.camera-footer .shutter{--shutter-size:4em}}.camera-video{position:relative;-ms-flex:1;flex:1;overflow:hidden;background-color:black}video{width:100%;height:100%;max-height:100%;min-height:100%;-o-object-fit:cover;object-fit:cover;background-color:black}.pick-image{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;left:var(--margin-size-footer);top:0;height:100%;width:var(--icon-size-footer);color:white}.pick-image input{visibility:hidden}.pick-image svg{cursor:pointer;fill:white;width:var(--icon-size-footer);height:var(--icon-size-footer)}.shutter{position:absolute;left:50%;top:50%;width:var(--shutter-size);height:var(--shutter-size);margin-top:calc(var(--shutter-size) / -2);margin-left:calc(var(--shutter-size) / -2);border-radius:100%;background-color:#c6cdd8;padding:12px;-webkit-box-sizing:border-box;box-sizing:border-box}.shutter:active .shutter-button{background-color:#9da9bb}.shutter-button{background-color:white;border-radius:100%;width:100%;height:100%}.rotate{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;right:var(--margin-size-footer);top:0;height:100%;width:var(--icon-size-footer);color:white}.rotate img{width:var(--icon-size-footer);height:var(--icon-size-footer)}.shutter-overlay{z-index:5;position:absolute;width:100%;height:100%;background-color:black}.error{width:100%;height:100%;color:white;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.no-device{background-color:black;-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:white}.no-device label{cursor:pointer;background:#fff;border-radius:6px;padding:6px 8px;color:black}.no-device input{visibility:hidden;height:0;margin-top:16px}.accept{background-color:black;-ms-flex:1;flex:1;overflow:hidden}.accept .accept-image{width:100%;height:100%;max-height:100%;background-position:center center;background-size:cover;background-repeat:no-repeat}.close img{cursor:pointer;width:var(--icon-size-header);height:var(--icon-size-header)}.flash img{width:var(--icon-size-header);height:var(--icon-size-header)}.accept-use img{width:var(--icon-size-footer);height:var(--icon-size-footer)}.accept-cancel img{width:var(--icon-size-footer);height:var(--icon-size-footer)}.offscreen-image-render{top:0;left:0;visibility:hidden;pointer-events:none;width:100%;height:100%}"; + var s = e("pwa_camera", function () { + function e(e) { + var i = this; + t(this, e); + this.hasMultipleCameras = false; + this.hasFlash = false; + this.flashModes = []; + this.flashMode = "off"; + this.handlePickFile = function (e) {}; + this.handleShutterClick = function (e) { + console.debug("shutter click"); + i.capture(); + }; + this.handleRotateClick = function (e) { + i.rotate(); + }; + this.handleClose = function (e) { + i.handlePhoto && i.handlePhoto(null); + }; + this.handleFlashClick = function (e) { + i.cycleFlash(); + }; + this.handleCancelPhoto = function (e) { + var t = i.stream && i.stream.getTracks()[0]; + var n = t && t.getConstraints(); + i.photo = null; + i.photoSrc = null; + if (n) { + i.initCamera({ + video: { + facingMode: n.facingMode + } + }); + } else { + i.initCamera(); + } + }; + this.handleAcceptPhoto = function (e) { + i.handlePhoto && i.handlePhoto(i.photo); + }; + this.handleFileInputChange = function (e) { + return __awaiter(i, void 0, void 0, function () { + var t, i, n, r; + return __generator(this, function (a) { + switch (a.label) { + case 0: + t = e.target; + i = t.files[0]; + a.label = 1; + case 1: + a.trys.push([1, 3,, 4]); + return [4, this.getOrientation(i)]; + case 2: + n = a.sent(); + console.debug("Got orientation", n); + this.photoOrientation = n; + return [3, 4]; + case 3: + r = a.sent(); + return [3, 4]; + case 4: + this.handlePhoto && this.handlePhoto(i); + return [2]; + } + }); + }); + }; + this.handleVideoMetadata = function (e) { + console.debug("Video metadata", e); + }; + this.facingMode = "user"; + this.handlePhoto = undefined; + this.hidePicker = false; + this.handleNoDeviceError = undefined; + this.noDevicesText = "No camera found"; + this.noDevicesButtonText = "Choose image"; + this.photo = undefined; + this.photoSrc = undefined; + this.showShutterOverlay = false; + this.flashIndex = 0; + this.hasCamera = null; + this.rotation = 0; + this.deviceError = null; + } + e.prototype.componentDidLoad = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (e) { + switch (e.label) { + case 0: + this.defaultConstraints = { + video: { + facingMode: this.facingMode + } + }; + return [4, this.queryDevices()]; + case 1: + e.sent(); + return [4, this.initCamera()]; + case 2: + e.sent(); + return [2]; + } + }); + }); + }; + e.prototype.disconnectedCallback = function () { + this.stopStream(); + this.photoSrc && URL.revokeObjectURL(this.photoSrc); + }; + e.prototype.hasImageCapture = function () { + return "ImageCapture" in window; + }; + e.prototype.queryDevices = function () { + return __awaiter(this, void 0, void 0, function () { + var e, t, i; + return __generator(this, function (n) { + switch (n.label) { + case 0: + n.trys.push([0, 2,, 3]); + return [4, navigator.mediaDevices.enumerateDevices()]; + case 1: + e = n.sent(); + t = e.filter(function (e) { + return e.kind == "videoinput"; + }); + this.hasCamera = !!t.length; + this.hasMultipleCameras = t.length > 1; + return [3, 3]; + case 2: + i = n.sent(); + this.deviceError = i; + return [3, 3]; + case 3: + return [2]; + } + }); + }); + }; + e.prototype.initCamera = function (e) { + return __awaiter(this, void 0, void 0, function () { + var t, i; + return __generator(this, function (n) { + switch (n.label) { + case 0: + if (!e) { + e = this.defaultConstraints; + } + n.label = 1; + case 1: + n.trys.push([1, 3,, 4]); + return [4, navigator.mediaDevices.getUserMedia(Object.assign({ + video: true, + audio: false + }, e))]; + case 2: + t = n.sent(); + this.initStream(t); + return [3, 4]; + case 3: + i = n.sent(); + this.deviceError = i; + this.handleNoDeviceError && this.handleNoDeviceError(i); + return [3, 4]; + case 4: + return [2]; + } + }); + }); + }; + e.prototype.initStream = function (e) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (t) { + switch (t.label) { + case 0: + this.stream = e; + this.videoElement.srcObject = e; + if (!this.hasImageCapture()) return [3, 2]; + this.imageCapture = new window.ImageCapture(e.getVideoTracks()[0]); + return [4, this.initPhotoCapabilities(this.imageCapture)]; + case 1: + t.sent(); + return [3, 3]; + case 2: + this.deviceError = "No image capture"; + this.handleNoDeviceError && this.handleNoDeviceError(); + t.label = 3; + case 3: + i(this.el); + return [2]; + } + }); + }); + }; + e.prototype.initPhotoCapabilities = function (e) { + return __awaiter(this, void 0, void 0, function () { + var t; + return __generator(this, function (i) { + switch (i.label) { + case 0: + return [4, e.getPhotoCapabilities()]; + case 1: + t = i.sent(); + if (t.fillLightMode && t.fillLightMode.length > 1) { + this.flashModes = t.fillLightMode.map(function (e) { + return e; + }); + if (this.flashMode) { + this.flashMode = this.flashModes[this.flashModes.indexOf(this.flashMode)] || "off"; + this.flashIndex = this.flashModes.indexOf(this.flashMode) || 0; + } else { + this.flashIndex = 0; + } + } + return [2]; + } + }); + }); + }; + e.prototype.stopStream = function () { + if (this.videoElement) { + this.videoElement.srcObject = null; + } + this.stream && this.stream.getTracks().forEach(function (e) { + return e.stop(); + }); + }; + e.prototype.capture = function () { + return __awaiter(this, void 0, void 0, function () { + var e, t; + return __generator(this, function (i) { + switch (i.label) { + case 0: + if (!this.hasImageCapture()) return [3, 5]; + i.label = 1; + case 1: + i.trys.push([1, 4,, 5]); + return [4, this.imageCapture.takePhoto({ + fillLightMode: this.flashModes.length > 1 ? this.flashMode : undefined + })]; + case 2: + e = i.sent(); + return [4, this.flashScreen()]; + case 3: + i.sent(); + this.promptAccept(e); + return [3, 5]; + case 4: + t = i.sent(); + console.error("Unable to take photo!", t); + return [3, 5]; + case 5: + this.stopStream(); + return [2]; + } + }); + }); + }; + e.prototype.promptAccept = function (e) { + return __awaiter(this, void 0, void 0, function () { + var t; + return __generator(this, function (i) { + switch (i.label) { + case 0: + this.photo = e; + return [4, this.getOrientation(e)]; + case 1: + t = i.sent(); + console.debug("Got orientation", t); + this.photoOrientation = t; + if (t) { + switch (t) { + case 1: + case 2: + this.rotation = 0; + break; + case 3: + case 4: + this.rotation = 180; + break; + case 5: + case 6: + this.rotation = 90; + break; + case 7: + case 8: + this.rotation = 270; + break; + } + } + this.photoSrc = URL.createObjectURL(e); + return [2]; + } + }); + }); + }; + e.prototype.getOrientation = function (e) { + return new Promise(function (t) { + var i = new FileReader(); + i.onload = function (e) { + var i = new DataView(e.target.result); + if (i.getUint16(0, false) !== 65496) { + return t(-2); + } + var n = i.byteLength; + var r = 2; + while (r < n) { + var a = i.getUint16(r, false); + r += 2; + if (a === 65505) { + if (i.getUint32(r += 2, false) !== 1165519206) { + return t(-1); + } + var o = i.getUint16(r += 6, false) === 18761; + r += i.getUint32(r + 4, o); + var s = i.getUint16(r, o); + r += 2; + for (var c = 0; c < s; c++) { + if (i.getUint16(r + c * 12, o) === 274) { + return t(i.getUint16(r + c * 12 + 8, o)); + } + } + } else if ((a & 65280) !== 65280) { + break; + } else { + r += i.getUint16(r, false); + } + } + return t(-1); + }; + i.readAsArrayBuffer(e.slice(0, 64 * 1024)); + }); + }; + e.prototype.rotate = function () { + this.stopStream(); + var e = this.stream && this.stream.getTracks()[0]; + if (!e) { + return; + } + var t = e.getConstraints(); + var i = t.facingMode; + if (!i) { + var n = e.getCapabilities(); + if (n.facingMode) { + i = n.facingMode[0]; + } + } + if (i === "environment") { + this.initCamera({ + video: { + facingMode: "user" + } + }); + } else { + this.initCamera({ + video: { + facingMode: "environment" + } + }); + } + }; + e.prototype.setFlashMode = function (e) { + console.debug("New flash mode: ", e); + this.flashMode = e; + }; + e.prototype.cycleFlash = function () { + if (this.flashModes.length > 0) { + this.flashIndex = (this.flashIndex + 1) % this.flashModes.length; + this.setFlashMode(this.flashModes[this.flashIndex]); + } + }; + e.prototype.flashScreen = function () { + return __awaiter(this, void 0, void 0, function () { + var e = this; + return __generator(this, function (t) { + return [2, new Promise(function (t, i) { + e.showShutterOverlay = true; + setTimeout(function () { + e.showShutterOverlay = false; + t(); + }, 100); + })]; + }); + }); + }; + e.prototype.iconExit = function () { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Cg id='Icon_5_'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M402.2,134L378,109.8c-1.6-1.6-4.1-1.6-5.7,0L258.8,223.4c-1.6,1.6-4.1,1.6-5.7,0L139.6,109.8 c-1.6-1.6-4.1-1.6-5.7,0L109.8,134c-1.6,1.6-1.6,4.1,0,5.7l113.5,113.5c1.6,1.6,1.6,4.1,0,5.7L109.8,372.4c-1.6,1.6-1.6,4.1,0,5.7 l24.1,24.1c1.6,1.6,4.1,1.6,5.7,0l113.5-113.5c1.6-1.6,4.1-1.6,5.7,0l113.5,113.5c1.6,1.6,4.1,1.6,5.7,0l24.1-24.1 c1.6-1.6,1.6-4.1,0-5.7L288.6,258.8c-1.6-1.6-1.6-4.1,0-5.7l113.5-113.5C403.7,138.1,403.7,135.5,402.2,134z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"; + }; + e.prototype.iconPhotos = function () { + return n("svg", { + xmlns: "http://www.w3.org/2000/svg", + width: "512", + height: "512", + viewBox: "0 0 512 512" + }, n("path", { + d: "M450.29,112H142c-34,0-62,27.51-62,61.33V418.67C80,452.49,108,480,142,480H450c34,0,62-26.18,62-60V173.33C512,139.51,484.32,112,450.29,112Zm-77.15,61.34a46,46,0,1,1-46.28,46A46.19,46.19,0,0,1,373.14,173.33Zm-231.55,276c-17,0-29.86-13.75-29.86-30.66V353.85l90.46-80.79a46.54,46.54,0,0,1,63.44,1.83L328.27,337l-113,112.33ZM480,418.67a30.67,30.67,0,0,1-30.71,30.66H259L376.08,333a46.24,46.24,0,0,1,59.44-.16L480,370.59Z" + }), n("path", { + d: "M384,32H64A64,64,0,0,0,0,96V352a64.11,64.11,0,0,0,48,62V152a72,72,0,0,1,72-72H446A64.11,64.11,0,0,0,384,32Z" + })); + }; + e.prototype.iconConfirm = function () { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Ccircle fill='%232CD865' cx='256' cy='256' r='256'/%3E%3Cg id='Icon_1_'%3E%3Cg%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M208,301.4l-55.4-55.5c-1.5-1.5-4-1.6-5.6-0.1l-23.4,22.3c-1.6,1.6-1.7,4.1-0.1,5.7l81.6,81.4 c3.1,3.1,8.2,3.1,11.3,0l171.8-171.7c1.6-1.6,1.6-4.2-0.1-5.7l-23.4-22.3c-1.6-1.5-4.1-1.5-5.6,0.1L213.7,301.4 C212.1,303,209.6,303,208,301.4z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E"; + }; + e.prototype.iconReverseCamera = function () { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M352,0H160C72,0,0,72,0,160v192c0,88,72,160,160,160h192c88,0,160-72,160-160V160C512,72,440,0,352,0z M356.7,365.8l-3.7,3.3c-27,23.2-61.4,35.9-96.8,35.9c-72.4,0-135.8-54.7-147-125.6c-0.3-1.9-2-3.3-3.9-3.3H64 c-3.3,0-5.2-3.8-3.2-6.4l61.1-81.4c1.6-2.1,4.7-2.1,6.4-0.1l63.3,81.4c2,2.6,0.2,6.5-3.2,6.5h-40.6c-2.5,0-4.5,2.4-3.9,4.8 c11.5,51.5,59.2,90.6,112.4,90.6c26.4,0,51.8-9.7,73.7-27.9l3.1-2.5c1.6-1.3,3.9-1.1,5.3,0.3l18.5,18.6 C358.5,361.6,358.4,364.3,356.7,365.8z M451.4,245.6l-61,83.5c-1.6,2.2-4.8,2.2-6.4,0.1l-63.3-83.3c-2-2.6-0.1-6.4,3.2-6.4h40.8 c2.5,0,4.4-2.3,3.9-4.8c-5.1-24.2-17.8-46.5-36.5-63.7c-21.2-19.4-48.2-30.1-76-30.1c-26.5,0-52.6,9.7-73.7,27.3l-3.1,2.5 c-1.6,1.3-3.9,1.2-5.4-0.3l-18.5-18.5c-1.6-1.6-1.5-4.3,0.2-5.9l3.5-3.1c27-23.2,61.4-35.9,96.8-35.9c38,0,73.9,13.7,101.2,38.7 c23.2,21.1,40.3,55.2,45.7,90.1c0.3,1.9,1.9,3.4,3.9,3.4h41.3C451.4,239.2,453.3,243,451.4,245.6z'/%3E%3C/g%3E%3C/svg%3E"; + }; + e.prototype.iconRetake = function () { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Ccircle fill='%23727A87' cx='256' cy='256' r='256'/%3E%3Cg id='Icon_5_'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M394.2,142L370,117.8c-1.6-1.6-4.1-1.6-5.7,0L258.8,223.4c-1.6,1.6-4.1,1.6-5.7,0L147.6,117.8 c-1.6-1.6-4.1-1.6-5.7,0L117.8,142c-1.6,1.6-1.6,4.1,0,5.7l105.5,105.5c1.6,1.6,1.6,4.1,0,5.7L117.8,364.4c-1.6,1.6-1.6,4.1,0,5.7 l24.1,24.1c1.6,1.6,4.1,1.6,5.7,0l105.5-105.5c1.6-1.6,4.1-1.6,5.7,0l105.5,105.5c1.6,1.6,4.1,1.6,5.7,0l24.1-24.1 c1.6-1.6,1.6-4.1,0-5.7L288.6,258.8c-1.6-1.6-1.6-4.1,0-5.7l105.5-105.5C395.7,146.1,395.7,143.5,394.2,142z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"; + }; + e.prototype.iconFlashOff = function () { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cg%3E%3Cpath class='st0' d='M498,483.7L42.3,28L14,56.4l149.8,149.8L91,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9c1.6,0,2.7,1.3,2.4,2.7 L197.6,507c-1,4.4,5.8,6.9,8.9,3.2l118.6-142.8L469.6,512L498,483.7z'/%3E%3Cpath class='st0' d='M449,218.2c2.5-3,0.1-7.2-3.9-7.2H301.2c-1.6,0-2.7-1.3-2.4-2.7L342.4,5c1-4.4-5.8-6.9-8.9-3.2L214.9,144.6 l161.3,161.3L449,218.2z'/%3E%3C/g%3E%3C/svg%3E"; + }; + e.prototype.iconFlashOn = function () { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cpath class='st0' d='M287.2,211c-1.6,0-2.7-1.3-2.4-2.7L328.4,5c1-4.4-5.8-6.9-8.9-3.2L77,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9 c1.6,0,2.7,1.3,2.4,2.7L183.6,507c-1,4.4,5.8,6.9,8.9,3.2l242.5-292c2.5-3,0.1-7.2-3.9-7.2L287.2,211L287.2,211z'/%3E%3C/svg%3E"; + }; + e.prototype.iconFlashAuto = function () { + return "data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cpath class='st0' d='M287.2,211c-1.6,0-2.7-1.3-2.4-2.7L328.4,5c1-4.4-5.8-6.9-8.9-3.2L77,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9 c1.6,0,2.7,1.3,2.4,2.7L183.6,507c-1,4.4,5.8,6.9,8.9,3.2l242.5-292c2.5-3,0.1-7.2-3.9-7.2L287.2,211L287.2,211z'/%3E%3Cg%3E%3Cpath class='st0' d='M321.3,186l74-186H438l74,186h-43.5l-11.9-32.5h-80.9l-12,32.5H321.3z M415.8,47.9l-27.2,70.7h54.9l-27.2-70.7 H415.8z'/%3E%3C/g%3E%3C/svg%3E"; + }; + e.prototype.render = function () { + var e = this; + var t = {}; + return n("div", { + class: "camera-wrapper" + }, n("div", { + class: "camera-header" + }, n("section", { + class: "items" + }, n("div", { + class: "item close", + onClick: function onClick(t) { + return e.handleClose(t); + } + }, n("img", { + src: this.iconExit() + })), n("div", { + class: "item flash", + onClick: function onClick(t) { + return e.handleFlashClick(t); + } + }, this.flashModes.length > 0 && n("div", null, this.flashMode == "off" ? n("img", { + src: this.iconFlashOff() + }) : "", this.flashMode == "auto" ? n("img", { + src: this.iconFlashAuto() + }) : "", this.flashMode == "flash" ? n("img", { + src: this.iconFlashOn() + }) : "")))), (this.hasCamera === false || !!this.deviceError) && n("div", { + class: "no-device" + }, n("h2", null, this.noDevicesText), n("label", { + htmlFor: "_pwa-elements-camera-input" + }, this.noDevicesButtonText), n("input", { + type: "file", + id: "_pwa-elements-camera-input", + onChange: this.handleFileInputChange, + accept: "image/*", + class: "select-file-button" + })), this.photoSrc ? n("div", { + class: "accept" + }, n("div", { + class: "accept-image", + style: Object.assign({ + backgroundImage: "url(".concat(this.photoSrc, ")") + }, t) + })) : n("div", { + class: "camera-video" + }, this.showShutterOverlay && n("div", { + class: "shutter-overlay" + }), this.hasImageCapture() ? n("video", { + ref: function ref(t) { + return e.videoElement = t; + }, + onLoadedMetaData: this.handleVideoMetadata, + autoplay: true, + playsinline: true + }) : n("canvas", { + ref: function ref(t) { + return e.canvasElement = t; + }, + width: "100%", + height: "100%" + }), n("canvas", { + class: "offscreen-image-render", + ref: function ref(t) { + return e.offscreenCanvas = t; + }, + width: "100%", + height: "100%" + })), this.hasCamera && n("div", { + class: "camera-footer" + }, !this.photo ? [!this.hidePicker && n("div", { + class: "pick-image", + onClick: this.handlePickFile + }, n("label", { + htmlFor: "_pwa-elements-file-pick" + }, this.iconPhotos()), n("input", { + type: "file", + id: "_pwa-elements-file-pick", + onChange: this.handleFileInputChange, + accept: "image/*", + class: "pick-image-button" + })), n("div", { + class: "shutter", + onClick: this.handleShutterClick + }, n("div", { + class: "shutter-button" + })), n("div", { + class: "rotate", + onClick: this.handleRotateClick + }, n("img", { + src: this.iconReverseCamera() + }))] : n("section", { + class: "items" + }, n("div", { + class: "item accept-cancel", + onClick: function onClick(t) { + return e.handleCancelPhoto(t); + } + }, n("img", { + src: this.iconRetake() + })), n("div", { + class: "item accept-use", + onClick: function onClick(t) { + return e.handleAcceptPhoto(t); + } + }, n("img", { + src: this.iconConfirm() + }))))); + }; + Object.defineProperty(e, "assetsDirs", { + get: function get() { + return ["icons"]; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(e.prototype, "el", { + get: function get() { + return r(this); + }, + enumerable: false, + configurable: true + }); + return e; + }()); + s.style = o; + } + }; +}); \ No newline at end of file diff --git a/src/public/js/pwa-elements/types/components.d.ts b/src/public/js/pwa-elements/types/components.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3b374f5a3ca5ea935e3759ddebab9ea5fa8bee07 --- /dev/null +++ b/src/public/js/pwa-elements/types/components.d.ts @@ -0,0 +1,144 @@ +/* eslint-disable */ +/* tslint:disable */ +/** + * This is an autogenerated file created by the Stencil compiler. + * It contains typing information for all components that exist in this project. + */ +import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime"; +import { ActionSheetOption } from "./definitions"; +export { ActionSheetOption } from "./definitions"; +export namespace Components { + interface PwaActionSheet { + "cancelable": boolean; + "header": string; + "options": ActionSheetOption[]; + } + interface PwaCamera { + "facingMode": string; + "handleNoDeviceError": (e?: any) => void; + "handlePhoto": (photo: Blob) => void; + "hidePicker": boolean; + "noDevicesButtonText": string; + "noDevicesText": string; + } + interface PwaCameraModal { + "dismiss": () => Promise<void>; + "facingMode": string; + "hidePicker": boolean; + "present": () => Promise<void>; + } + interface PwaCameraModalInstance { + "facingMode": string; + "hidePicker": boolean; + "noDevicesButtonText": string; + "noDevicesText": string; + } + interface PwaToast { + "duration": number; + "message": string; + } +} +export interface PwaActionSheetCustomEvent<T> extends CustomEvent<T> { + detail: T; + target: HTMLPwaActionSheetElement; +} +export interface PwaCameraModalCustomEvent<T> extends CustomEvent<T> { + detail: T; + target: HTMLPwaCameraModalElement; +} +export interface PwaCameraModalInstanceCustomEvent<T> extends CustomEvent<T> { + detail: T; + target: HTMLPwaCameraModalInstanceElement; +} +declare global { + interface HTMLPwaActionSheetElement extends Components.PwaActionSheet, HTMLStencilElement { + } + var HTMLPwaActionSheetElement: { + prototype: HTMLPwaActionSheetElement; + new (): HTMLPwaActionSheetElement; + }; + interface HTMLPwaCameraElement extends Components.PwaCamera, HTMLStencilElement { + } + var HTMLPwaCameraElement: { + prototype: HTMLPwaCameraElement; + new (): HTMLPwaCameraElement; + }; + interface HTMLPwaCameraModalElement extends Components.PwaCameraModal, HTMLStencilElement { + } + var HTMLPwaCameraModalElement: { + prototype: HTMLPwaCameraModalElement; + new (): HTMLPwaCameraModalElement; + }; + interface HTMLPwaCameraModalInstanceElement extends Components.PwaCameraModalInstance, HTMLStencilElement { + } + var HTMLPwaCameraModalInstanceElement: { + prototype: HTMLPwaCameraModalInstanceElement; + new (): HTMLPwaCameraModalInstanceElement; + }; + interface HTMLPwaToastElement extends Components.PwaToast, HTMLStencilElement { + } + var HTMLPwaToastElement: { + prototype: HTMLPwaToastElement; + new (): HTMLPwaToastElement; + }; + interface HTMLElementTagNameMap { + "pwa-action-sheet": HTMLPwaActionSheetElement; + "pwa-camera": HTMLPwaCameraElement; + "pwa-camera-modal": HTMLPwaCameraModalElement; + "pwa-camera-modal-instance": HTMLPwaCameraModalInstanceElement; + "pwa-toast": HTMLPwaToastElement; + } +} +declare namespace LocalJSX { + interface PwaActionSheet { + "cancelable"?: boolean; + "header"?: string; + "onOnSelection"?: (event: PwaActionSheetCustomEvent<any>) => void; + "options"?: ActionSheetOption[]; + } + interface PwaCamera { + "facingMode"?: string; + "handleNoDeviceError"?: (e?: any) => void; + "handlePhoto"?: (photo: Blob) => void; + "hidePicker"?: boolean; + "noDevicesButtonText"?: string; + "noDevicesText"?: string; + } + interface PwaCameraModal { + "facingMode"?: string; + "hidePicker"?: boolean; + "onNoDeviceError"?: (event: PwaCameraModalCustomEvent<any>) => void; + "onOnPhoto"?: (event: PwaCameraModalCustomEvent<any>) => void; + } + interface PwaCameraModalInstance { + "facingMode"?: string; + "hidePicker"?: boolean; + "noDevicesButtonText"?: string; + "noDevicesText"?: string; + "onNoDeviceError"?: (event: PwaCameraModalInstanceCustomEvent<any>) => void; + "onOnPhoto"?: (event: PwaCameraModalInstanceCustomEvent<any>) => void; + } + interface PwaToast { + "duration"?: number; + "message"?: string; + } + interface IntrinsicElements { + "pwa-action-sheet": PwaActionSheet; + "pwa-camera": PwaCamera; + "pwa-camera-modal": PwaCameraModal; + "pwa-camera-modal-instance": PwaCameraModalInstance; + "pwa-toast": PwaToast; + } +} +export { LocalJSX as JSX }; +declare module "@stencil/core" { + export namespace JSX { + interface IntrinsicElements { + "pwa-action-sheet": LocalJSX.PwaActionSheet & JSXBase.HTMLAttributes<HTMLPwaActionSheetElement>; + "pwa-camera": LocalJSX.PwaCamera & JSXBase.HTMLAttributes<HTMLPwaCameraElement>; + "pwa-camera-modal": LocalJSX.PwaCameraModal & JSXBase.HTMLAttributes<HTMLPwaCameraModalElement>; + "pwa-camera-modal-instance": LocalJSX.PwaCameraModalInstance & JSXBase.HTMLAttributes<HTMLPwaCameraModalInstanceElement>; + "pwa-toast": LocalJSX.PwaToast & JSXBase.HTMLAttributes<HTMLPwaToastElement>; + } + } +} diff --git a/src/public/js/pwa-elements/types/components/action-sheet/action-sheet.d.ts b/src/public/js/pwa-elements/types/components/action-sheet/action-sheet.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5c15fde86aad0d01b26791cb61bc2ce495592064 --- /dev/null +++ b/src/public/js/pwa-elements/types/components/action-sheet/action-sheet.d.ts @@ -0,0 +1,15 @@ +import { EventEmitter } from '../../stencil-public-runtime'; +import { ActionSheetOption } from '../../definitions'; +export declare class PWAActionSheet { + el: HTMLElement; + header: string; + cancelable: boolean; + options: ActionSheetOption[]; + onSelection: EventEmitter; + open: boolean; + componentDidLoad(): void; + dismiss(): void; + close(): void; + handleOptionClick(e: MouseEvent, i: number): void; + render(): any; +} diff --git a/src/public/js/pwa-elements/types/components/camera-modal/camera-modal-instance.d.ts b/src/public/js/pwa-elements/types/components/camera-modal/camera-modal-instance.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..4b68a0cd88848a74bf8243a0abcb0057fa93a44a --- /dev/null +++ b/src/public/js/pwa-elements/types/components/camera-modal/camera-modal-instance.d.ts @@ -0,0 +1,16 @@ +import { EventEmitter } from '../../stencil-public-runtime'; +export declare class PWACameraModal { + el: any; + onPhoto: EventEmitter; + noDeviceError: EventEmitter; + facingMode: string; + hidePicker: boolean; + noDevicesText: string; + noDevicesButtonText: string; + handlePhoto: (photo: Blob) => Promise<void>; + handleNoDeviceError: (photo: any) => Promise<void>; + handleBackdropClick(e: MouseEvent): void; + handleComponentClick(e: MouseEvent): void; + handleBackdropKeyUp(e: KeyboardEvent): void; + render(): any; +} diff --git a/src/public/js/pwa-elements/types/components/camera-modal/camera-modal.d.ts b/src/public/js/pwa-elements/types/components/camera-modal/camera-modal.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5381dac52dd1d75cd0cce753c4c5056df352b19b --- /dev/null +++ b/src/public/js/pwa-elements/types/components/camera-modal/camera-modal.d.ts @@ -0,0 +1,11 @@ +import { EventEmitter } from '../../stencil-public-runtime'; +export declare class PWACameraModal { + facingMode: string; + hidePicker: boolean; + onPhoto: EventEmitter; + noDeviceError: EventEmitter; + _modal: HTMLElement; + present(): Promise<void>; + dismiss(): Promise<void>; + render(): any; +} diff --git a/src/public/js/pwa-elements/types/components/camera/camera.d.ts b/src/public/js/pwa-elements/types/components/camera/camera.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..265b09bd24078a5d4ef97c7d02c154b7ba61d1bb --- /dev/null +++ b/src/public/js/pwa-elements/types/components/camera/camera.d.ts @@ -0,0 +1,66 @@ +import { FlashMode } from '../../definitions'; +import './imagecapture'; +export declare class CameraPWA { + el: any; + facingMode: string; + handlePhoto: (photo: Blob) => void; + hidePicker: boolean; + handleNoDeviceError: (e?: any) => void; + noDevicesText: string; + noDevicesButtonText: string; + photo: any; + photoSrc: any; + showShutterOverlay: boolean; + flashIndex: number; + hasCamera: boolean | null; + rotation: number; + deviceError: any | null; + photoOrientation: number; + exifData: any; + offscreenCanvas: HTMLCanvasElement; + defaultConstraints: any; + stream: MediaStream; + imageCapture: any; + videoElement: HTMLVideoElement; + canvasElement: HTMLCanvasElement; + hasMultipleCameras: boolean; + hasFlash: boolean; + flashModes: FlashMode[]; + flashMode: FlashMode; + componentDidLoad(): Promise<void>; + disconnectedCallback(): void; + hasImageCapture(): boolean; + /** + * Query the list of connected devices and figure out how many video inputs we have. + */ + queryDevices(): Promise<void>; + initCamera(constraints?: MediaStreamConstraints): Promise<void>; + initStream(stream: MediaStream): Promise<void>; + initPhotoCapabilities(imageCapture: any): Promise<void>; + stopStream(): void; + capture(): Promise<void>; + promptAccept(photo: any): Promise<void>; + private getOrientation; + rotate(): void; + setFlashMode(mode: FlashMode): void; + cycleFlash(): void; + flashScreen(): Promise<void>; + handlePickFile: (_e: Event) => void; + handleShutterClick: (_e: Event) => void; + handleRotateClick: (_e: Event) => void; + handleClose: (_e: Event) => void; + handleFlashClick: (_e: Event) => void; + handleCancelPhoto: (_e: Event) => void; + handleAcceptPhoto: (_e: Event) => void; + handleFileInputChange: (e: InputEvent) => Promise<void>; + handleVideoMetadata: (e: Event) => void; + iconExit(): string; + iconPhotos(): any; + iconConfirm(): string; + iconReverseCamera(): string; + iconRetake(): string; + iconFlashOff(): string; + iconFlashOn(): string; + iconFlashAuto(): string; + render(): any; +} diff --git a/src/public/js/pwa-elements/types/components/camera/imagecapture.d.ts b/src/public/js/pwa-elements/types/components/camera/imagecapture.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0096488b02ce7a872fbd0213bdd479f9150e4688 --- /dev/null +++ b/src/public/js/pwa-elements/types/components/camera/imagecapture.d.ts @@ -0,0 +1,19 @@ +/** + * MediaStream ImageCapture polyfill + * + * @license + * Copyright 2018 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export declare let ImageCapture: any; diff --git a/src/public/js/pwa-elements/types/components/toast/toast.d.ts b/src/public/js/pwa-elements/types/components/toast/toast.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..65528c56e9817775933465630ca607e00bc4403d --- /dev/null +++ b/src/public/js/pwa-elements/types/components/toast/toast.d.ts @@ -0,0 +1,14 @@ +export declare class PWAToast { + el: HTMLElement; + message: string; + duration: number; + closing: any; + hostData(): { + class: { + out: boolean; + }; + }; + componentDidLoad(): void; + close(): void; + render(): any; +} diff --git a/src/public/js/pwa-elements/types/definitions.d.ts b/src/public/js/pwa-elements/types/definitions.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..103fa3a674e22ade6620ce3217710bb8b10cf290 --- /dev/null +++ b/src/public/js/pwa-elements/types/definitions.d.ts @@ -0,0 +1,15 @@ +export interface MediaSettingsRange { + min: number; + max: number; + step: number; +} +export interface PhotoCapabilities { + redEyeReduction: "never" | "always" | "controllable"; + imageHeight: MediaSettingsRange; + imageWidth: MediaSettingsRange; + fillLightMode: string[]; +} +export type FlashMode = "auto" | "off" | "flash"; +export interface ActionSheetOption { + title: string; +} diff --git a/src/public/js/pwa-elements/types/index.d.ts b/src/public/js/pwa-elements/types/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..07635cbbc8e7a20c52efe5c76088af24735709d8 --- /dev/null +++ b/src/public/js/pwa-elements/types/index.d.ts @@ -0,0 +1 @@ +export * from './components'; diff --git a/src/public/js/pwa-elements/types/stencil-public-runtime.d.ts b/src/public/js/pwa-elements/types/stencil-public-runtime.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b44ed14ed49cb5612451028af051cda3cb869c40 --- /dev/null +++ b/src/public/js/pwa-elements/types/stencil-public-runtime.d.ts @@ -0,0 +1,1640 @@ +declare type CustomMethodDecorator<T> = (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void; +export interface ComponentDecorator { + (opts?: ComponentOptions): ClassDecorator; +} +export interface ComponentOptions { + /** + * Tag name of the web component. Ideally, the tag name must be globally unique, + * so it's recommended to choose an unique prefix for all your components within the same collection. + * + * In addition, tag name must contain a '-' + */ + tag: string; + /** + * If `true`, the component will use scoped stylesheets. Similar to shadow-dom, + * but without native isolation. Defaults to `false`. + */ + scoped?: boolean; + /** + * If `true`, the component will use native shadow-dom encapsulation, it will fallback to + * `scoped` if the browser does not support shadow-dom natively. Defaults to `false`. + * Additionally, `shadow` can also be given options when attaching the shadow root. + */ + shadow?: boolean | ShadowRootOptions; + /** + * Relative URL to some external stylesheet file. It should be a `.css` file unless some + * external plugin is installed like `@stencil/sass`. + */ + styleUrl?: string; + /** + * Similar as `styleUrl` but allows to specify different stylesheets for different modes. + */ + styleUrls?: string[] | ModeStyles; + /** + * String that contains inlined CSS instead of using an external stylesheet. + * The performance characteristics of this feature are the same as using an external stylesheet. + * + * Notice, you can't use sass, or less, only `css` is allowed using `styles`, use `styleUrl` is you need more advanced features. + */ + styles?: string | { + [modeName: string]: any; + }; + /** + * Array of relative links to folders of assets required by the component. + */ + assetsDirs?: string[]; +} +export interface ShadowRootOptions { + /** + * When set to `true`, specifies behavior that mitigates custom element issues + * around focusability. When a non-focusable part of the shadow DOM is clicked, the first + * focusable part is given focus, and the shadow host is given any available `:focus` styling. + */ + delegatesFocus?: boolean; +} +export interface ModeStyles { + [modeName: string]: string | string[]; +} +export interface PropDecorator { + (opts?: PropOptions): PropertyDecorator; +} +export interface PropOptions { + /** + * The name of the associated DOM attribute. + * Stencil uses different heuristics to determine the default name of the attribute, + * but using this property, you can override the default behaviour. + */ + attribute?: string | null; + /** + * A Prop is _by default_ immutable from inside the component logic. + * Once a value is set by a user, the component cannot update it internally. + * However, it's possible to explicitly allow a Prop to be mutated from inside the component, + * by setting this `mutable` option to `true`. + */ + mutable?: boolean; + /** + * In some cases it may be useful to keep a Prop in sync with an attribute. + * In this case you can set the `reflect` option to `true`, since it defaults to `false`: + */ + reflect?: boolean; +} +export interface MethodDecorator { + (opts?: MethodOptions): CustomMethodDecorator<any>; +} +export interface MethodOptions { +} +export interface ElementDecorator { + (): PropertyDecorator; +} +export interface EventDecorator { + (opts?: EventOptions): PropertyDecorator; +} +export interface EventOptions { + /** + * A string custom event name to override the default. + */ + eventName?: string; + /** + * A Boolean indicating whether the event bubbles up through the DOM or not. + */ + bubbles?: boolean; + /** + * A Boolean indicating whether the event is cancelable. + */ + cancelable?: boolean; + /** + * A Boolean value indicating whether or not the event can bubble across the boundary between the shadow DOM and the regular DOM. + */ + composed?: boolean; +} +export interface ListenDecorator { + (eventName: string, opts?: ListenOptions): CustomMethodDecorator<any>; +} +export interface ListenOptions { + /** + * Handlers can also be registered for an event other than the host itself. + * The `target` option can be used to change where the event listener is attached, + * this is useful for listening to application-wide events. + */ + target?: ListenTargetOptions; + /** + * Event listener attached with `@Listen` does not "capture" by default, + * When a event listener is set to "capture", means the event will be dispatched + * during the "capture phase". Please see + * https://www.quirksmode.org/js/events_order.html for further information. + */ + capture?: boolean; + /** + * By default, Stencil uses several heuristics to determine if + * it must attach a `passive` event listener or not. + * + * Using the `passive` option can be used to change the default behaviour. + * Please see https://developers.google.com/web/updates/2016/06/passive-event-listeners for further information. + */ + passive?: boolean; +} +export type ListenTargetOptions = 'body' | 'document' | 'window'; +export interface StateDecorator { + (): PropertyDecorator; +} +export interface WatchDecorator { + (propName: string): CustomMethodDecorator<any>; +} +export interface UserBuildConditionals { + isDev: boolean; + isBrowser: boolean; + isServer: boolean; + isTesting: boolean; +} +/** + * The `Build` object provides many build conditionals that can be used to + * include or exclude code depending on the build. + */ +export declare const Build: UserBuildConditionals; +/** + * The `Env` object provides access to the "env" object declared in the project's `stencil.config.ts`. + */ +export declare const Env: { + [prop: string]: string | undefined; +}; +/** + * The `@Component()` decorator is used to provide metadata about the component class. + * https://stenciljs.com/docs/component + */ +export declare const Component: ComponentDecorator; +/** + * The `@Element()` decorator is a reference to the actual host element + * once it has rendered. + */ +export declare const Element: ElementDecorator; +/** + * Components can emit data and events using the Event Emitter decorator. + * To dispatch Custom DOM events for other components to handle, use the + * `@Event()` decorator. The Event decorator also makes it easier for Stencil + * to automatically build types and documentation for the event data. + * https://stenciljs.com/docs/events + */ +export declare const Event: EventDecorator; +/** + * The `Listen()` decorator is for listening DOM events, including the ones + * dispatched from `@Events()`. + * https://stenciljs.com/docs/events#listen-decorator + */ +export declare const Listen: ListenDecorator; +/** + * The `@Method()` decorator is used to expose methods on the public API. + * Class methods decorated with the @Method() decorator can be called directly + * from the element, meaning they are intended to be callable from the outside. + * https://stenciljs.com/docs/methods + */ +export declare const Method: MethodDecorator; +/** + * Props are custom attribute/properties exposed publicly on the element + * that developers can provide values for. Children components do not need to + * know about or reference parent components, so Props can be used to pass + * data down from the parent to the child. Components need to explicitly + * declare the Props they expect to receive using the `@Prop()` decorator. + * Any value changes to a Prop will cause a re-render. + * https://stenciljs.com/docs/properties + */ +export declare const Prop: PropDecorator; +/** + * The `@State()` decorator can be used to manage internal data for a component. + * This means that a user cannot modify this data from outside the component, + * but the component can modify it however it sees fit. Any value changes to a + * `@State()` property will cause the components render function to be called again. + * https://stenciljs.com/docs/state + */ +export declare const State: StateDecorator; +/** + * When a property's value has changed, a method decorated with `@Watch()` will be + * called and passed the new value of the prop along with the old value. Watch is + * useful for validating props or handling side effects. Watch decorator does not + * fire when a component initially loads. + * https://stenciljs.com/docs/reactive-data#watch-decorator + */ +export declare const Watch: WatchDecorator; +export type ResolutionHandler = (elm: HTMLElement) => string | undefined | null; +export type ErrorHandler = (err: any, element?: HTMLElement) => void; +/** + * `setMode()` is used for libraries which provide multiple "modes" for styles. + */ +export declare const setMode: (handler: ResolutionHandler) => void; +/** + * `getMode()` is used for libraries which provide multiple "modes" for styles. + * @param ref a reference to the node to get styles for + * @returns the current mode or undefined, if not found + */ +export declare function getMode<T = string | undefined>(ref: any): T; +export declare function setPlatformHelpers(helpers: { + jmp?: (c: any) => any; + raf?: (c: any) => number; + ael?: (el: any, eventName: string, listener: any, options: any) => void; + rel?: (el: any, eventName: string, listener: any, options: any) => void; + ce?: (eventName: string, opts?: any) => any; +}): void; +/** + * Get the base path to where the assets can be found. Use `setAssetPath(path)` + * if the path needs to be customized. + * @param path the path to use in calculating the asset path. this value will be + * used in conjunction with the base asset path + * @returns the base path + */ +export declare function getAssetPath(path: string): string; +/** + * Used to manually set the base path where assets can be found. For lazy-loaded + * builds the asset path is automatically set and assets copied to the correct + * build directory. However, for custom elements builds, the `setAssetPath(path)` could + * be used to customize the asset path depending on how the script file is consumed. + * If the script is used as "module", it's recommended to use "import.meta.url", such + * as `setAssetPath(import.meta.url)`. Other options include + * `setAssetPath(document.currentScript.src)`, or using a bundler's replace plugin to + * dynamically set the path at build time, such as `setAssetPath(process.env.ASSET_PATH)`. + * But do note that this configuration depends on how your script is bundled, or lack of + * bundling, and where your assets can be loaded from. Additionally custom bundling + * will have to ensure the static assets are copied to its build directory. + * @param path the asset path to set + * @returns the set path + */ +export declare function setAssetPath(path: string): string; +/** + * Used to specify a nonce value that corresponds with an application's + * [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP). + * When set, the nonce will be added to all dynamically created script and style tags at runtime. + * Alternatively, the nonce value can be set on a `meta` tag in the DOM head + * (<meta name="csp-nonce" content="{ nonce value here }" />) and will result in the same behavior. + * @param nonce The value to be used for the nonce attribute. + */ +export declare function setNonce(nonce: string): void; +/** + * Retrieve a Stencil element for a given reference + * @param ref the ref to get the Stencil element for + * @returns a reference to the element + */ +export declare function getElement(ref: any): HTMLStencilElement; +/** + * Schedules a new render of the given instance or element even if no state changed. + * + * Notice `forceUpdate()` is not synchronous and might perform the DOM render in the next frame. + * + * @param ref the node/element to force the re-render of + */ +export declare function forceUpdate(ref: any): void; +/** + * getRenderingRef + * @returns the rendering ref + */ +export declare function getRenderingRef(): any; +export interface HTMLStencilElement extends HTMLElement { + componentOnReady(): Promise<this>; +} +/** + * Schedules a DOM-write task. The provided callback will be executed + * in the best moment to perform DOM mutation without causing layout thrashing. + * + * For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing + * + * @param task the DOM-write to schedule + */ +export declare function writeTask(task: RafCallback): void; +/** + * Schedules a DOM-read task. The provided callback will be executed + * in the best moment to perform DOM reads without causing layout thrashing. + * + * For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing + * + * @param task the DOM-read to schedule + */ +export declare function readTask(task: RafCallback): void; +/** + * `setErrorHandler()` can be used to inject a custom global error handler. + * Unhandled exception raised while rendering, during event handling, or lifecycles will trigger the custom event handler. + */ +export declare const setErrorHandler: (handler: ErrorHandler) => void; +/** + * This file gets copied to all distributions of stencil component collections. + * - no imports + */ +export interface ComponentWillLoad { + /** + * The component is about to load and it has not + * rendered yet. + * + * This is the best place to make any data updates + * before the first render. + * + * componentWillLoad will only be called once. + */ + componentWillLoad(): Promise<void> | void; +} +export interface ComponentDidLoad { + /** + * The component has loaded and has already rendered. + * + * Updating data in this method will cause the + * component to re-render. + * + * componentDidLoad will only be called once. + */ + componentDidLoad(): void; +} +export interface ComponentWillUpdate { + /** + * The component is about to update and re-render. + * + * Called multiple times throughout the life of + * the component as it updates. + * + * componentWillUpdate is not called on the first render. + */ + componentWillUpdate(): Promise<void> | void; +} +export interface ComponentDidUpdate { + /** + * The component has just re-rendered. + * + * Called multiple times throughout the life of + * the component as it updates. + * + * componentWillUpdate is not called on the + * first render. + */ + componentDidUpdate(): void; +} +export interface ComponentInterface { + connectedCallback?(): void; + disconnectedCallback?(): void; + componentWillRender?(): Promise<void> | void; + componentDidRender?(): void; + /** + * The component is about to load and it has not + * rendered yet. + * + * This is the best place to make any data updates + * before the first render. + * + * componentWillLoad will only be called once. + */ + componentWillLoad?(): Promise<void> | void; + /** + * The component has loaded and has already rendered. + * + * Updating data in this method will cause the + * component to re-render. + * + * componentDidLoad will only be called once. + */ + componentDidLoad?(): void; + /** + * A `@Prop` or `@State` property changed and a rerender is about to be requested. + * + * Called multiple times throughout the life of + * the component as its properties change. + * + * componentShouldUpdate is not called on the first render. + */ + componentShouldUpdate?(newVal: any, oldVal: any, propName: string): boolean | void; + /** + * The component is about to update and re-render. + * + * Called multiple times throughout the life of + * the component as it updates. + * + * componentWillUpdate is not called on the first render. + */ + componentWillUpdate?(): Promise<void> | void; + /** + * The component has just re-rendered. + * + * Called multiple times throughout the life of + * the component as it updates. + * + * componentWillUpdate is not called on the + * first render. + */ + componentDidUpdate?(): void; + render?(): any; + [memberName: string]: any; +} +export interface EventEmitter<T = any> { + emit: (data?: T) => CustomEvent<T>; +} +export interface RafCallback { + (timeStamp: number): void; +} +export interface QueueApi { + tick: (cb: RafCallback) => void; + read: (cb: RafCallback) => void; + write: (cb: RafCallback) => void; + clear?: () => void; + flush?: (cb?: () => void) => void; +} +/** + * Host + */ +interface HostAttributes { + class?: string | { + [className: string]: boolean; + }; + style?: { + [key: string]: string | undefined; + }; + ref?: (el: HTMLElement | null) => void; + [prop: string]: any; +} +/** + * Utilities for working with functional Stencil components. An object + * conforming to this interface is passed by the Stencil runtime as the third + * argument to a functional component, allowing component authors to work with + * features like children. + * + * The children of a functional component will be passed as the second + * argument, so a functional component which uses these utils to transform its + * children might look like the following: + * + * ```ts + * export const AddClass: FunctionalComponent = (_, children, utils) => ( + * utils.map(children, child => ({ + * ...child, + * vattrs: { + * ...child.vattrs, + * class: `${child.vattrs.class} add-class` + * } + * })) + * ); + * ``` + * + * For more see the Stencil documentation, here: + * https://stenciljs.com/docs/functional-components + */ +export interface FunctionalUtilities { + /** + * Utility for reading the children of a functional component at runtime. + * Since the Stencil runtime uses a different interface for children it is + * not recommendeded to read the children directly, and is preferable to use + * this utility to, for instance, perform a side effect for each child. + */ + forEach: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => void) => void; + /** + * Utility for transforming the children of a functional component. Given an + * array of children and a callback this will return a list of the results of + * passing each child to the supplied callback. + */ + map: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => ChildNode) => VNode[]; +} +export interface FunctionalComponent<T = {}> { + (props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[]; +} +/** + * A Child VDOM node + * + * This has most of the same properties as {@link VNode} but friendlier names + * (i.e. `vtag` instead of `$tag$`, `vchildren` instead of `$children$`) in + * order to provide a friendlier public interface for users of the + * {@link FunctionalUtilities}). + */ +export interface ChildNode { + vtag?: string | number | Function; + vkey?: string | number; + vtext?: string; + vchildren?: VNode[]; + vattrs?: any; + vname?: string; +} +/** + * Host is a functional component can be used at the root of the render function + * to set attributes and event listeners to the host element itself. + * + * For further information: https://stenciljs.com/docs/host-element + */ +export declare const Host: FunctionalComponent<HostAttributes>; +/** + * Fragment + */ +export declare const Fragment: FunctionalComponent<{}>; +/** + * The "h" namespace is used to import JSX types for elements and attributes. + * It is imported in order to avoid conflicting global JSX issues. + */ +export declare namespace h { + function h(sel: any): VNode; + function h(sel: Node, data: VNodeData | null): VNode; + function h(sel: any, data: VNodeData | null): VNode; + function h(sel: any, text: string): VNode; + function h(sel: any, children: Array<VNode | undefined | null>): VNode; + function h(sel: any, data: VNodeData | null, text: string): VNode; + function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode; + function h(sel: any, data: VNodeData | null, children: VNode): VNode; + namespace JSX { + interface IntrinsicElements extends LocalJSX.IntrinsicElements, JSXBase.IntrinsicElements { + [tagName: string]: any; + } + } +} +export declare function h(sel: any): VNode; +export declare function h(sel: Node, data: VNodeData | null): VNode; +export declare function h(sel: any, data: VNodeData | null): VNode; +export declare function h(sel: any, text: string): VNode; +export declare function h(sel: any, children: Array<VNode | undefined | null>): VNode; +export declare function h(sel: any, data: VNodeData | null, text: string): VNode; +export declare function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode; +export declare function h(sel: any, data: VNodeData | null, children: VNode): VNode; +/** + * A virtual DOM node + */ +export interface VNode { + $flags$: number; + $tag$: string | number | Function; + $elm$: any; + $text$: string; + $children$: VNode[]; + $attrs$?: any; + $name$?: string; + $key$?: string | number; +} +export interface VNodeData { + class?: { + [className: string]: boolean; + }; + style?: any; + [attrName: string]: any; +} +declare namespace LocalJSX { + interface Element { + } + interface IntrinsicElements { + } +} +export { LocalJSX as JSX }; +export declare namespace JSXBase { + interface IntrinsicElements { + slot: JSXBase.SlotAttributes; + a: JSXBase.AnchorHTMLAttributes<HTMLAnchorElement>; + abbr: JSXBase.HTMLAttributes; + address: JSXBase.HTMLAttributes; + area: JSXBase.AreaHTMLAttributes<HTMLAreaElement>; + article: JSXBase.HTMLAttributes; + aside: JSXBase.HTMLAttributes; + audio: JSXBase.AudioHTMLAttributes<HTMLAudioElement>; + b: JSXBase.HTMLAttributes; + base: JSXBase.BaseHTMLAttributes<HTMLBaseElement>; + bdi: JSXBase.HTMLAttributes; + bdo: JSXBase.HTMLAttributes; + big: JSXBase.HTMLAttributes; + blockquote: JSXBase.BlockquoteHTMLAttributes<HTMLQuoteElement>; + body: JSXBase.HTMLAttributes<HTMLBodyElement>; + br: JSXBase.HTMLAttributes<HTMLBRElement>; + button: JSXBase.ButtonHTMLAttributes<HTMLButtonElement>; + canvas: JSXBase.CanvasHTMLAttributes<HTMLCanvasElement>; + caption: JSXBase.HTMLAttributes<HTMLTableCaptionElement>; + cite: JSXBase.HTMLAttributes; + code: JSXBase.HTMLAttributes; + col: JSXBase.ColHTMLAttributes<HTMLTableColElement>; + colgroup: JSXBase.ColgroupHTMLAttributes<HTMLTableColElement>; + data: JSXBase.HTMLAttributes<HTMLDataElement>; + datalist: JSXBase.HTMLAttributes<HTMLDataListElement>; + dd: JSXBase.HTMLAttributes; + del: JSXBase.DelHTMLAttributes<HTMLModElement>; + details: JSXBase.DetailsHTMLAttributes<HTMLElement>; + dfn: JSXBase.HTMLAttributes; + dialog: JSXBase.DialogHTMLAttributes<HTMLDialogElement>; + div: JSXBase.HTMLAttributes<HTMLDivElement>; + dl: JSXBase.HTMLAttributes<HTMLDListElement>; + dt: JSXBase.HTMLAttributes; + em: JSXBase.HTMLAttributes; + embed: JSXBase.EmbedHTMLAttributes<HTMLEmbedElement>; + fieldset: JSXBase.FieldsetHTMLAttributes<HTMLFieldSetElement>; + figcaption: JSXBase.HTMLAttributes; + figure: JSXBase.HTMLAttributes; + footer: JSXBase.HTMLAttributes; + form: JSXBase.FormHTMLAttributes<HTMLFormElement>; + h1: JSXBase.HTMLAttributes<HTMLHeadingElement>; + h2: JSXBase.HTMLAttributes<HTMLHeadingElement>; + h3: JSXBase.HTMLAttributes<HTMLHeadingElement>; + h4: JSXBase.HTMLAttributes<HTMLHeadingElement>; + h5: JSXBase.HTMLAttributes<HTMLHeadingElement>; + h6: JSXBase.HTMLAttributes<HTMLHeadingElement>; + head: JSXBase.HTMLAttributes<HTMLHeadElement>; + header: JSXBase.HTMLAttributes; + hgroup: JSXBase.HTMLAttributes; + hr: JSXBase.HTMLAttributes<HTMLHRElement>; + html: JSXBase.HTMLAttributes<HTMLHtmlElement>; + i: JSXBase.HTMLAttributes; + iframe: JSXBase.IframeHTMLAttributes<HTMLIFrameElement>; + img: JSXBase.ImgHTMLAttributes<HTMLImageElement>; + input: JSXBase.InputHTMLAttributes<HTMLInputElement>; + ins: JSXBase.InsHTMLAttributes<HTMLModElement>; + kbd: JSXBase.HTMLAttributes; + keygen: JSXBase.KeygenHTMLAttributes<HTMLElement>; + label: JSXBase.LabelHTMLAttributes<HTMLLabelElement>; + legend: JSXBase.HTMLAttributes<HTMLLegendElement>; + li: JSXBase.LiHTMLAttributes<HTMLLIElement>; + link: JSXBase.LinkHTMLAttributes<HTMLLinkElement>; + main: JSXBase.HTMLAttributes; + map: JSXBase.MapHTMLAttributes<HTMLMapElement>; + mark: JSXBase.HTMLAttributes; + menu: JSXBase.MenuHTMLAttributes<HTMLMenuElement>; + menuitem: JSXBase.HTMLAttributes; + meta: JSXBase.MetaHTMLAttributes<HTMLMetaElement>; + meter: JSXBase.MeterHTMLAttributes<HTMLMeterElement>; + nav: JSXBase.HTMLAttributes; + noscript: JSXBase.HTMLAttributes; + object: JSXBase.ObjectHTMLAttributes<HTMLObjectElement>; + ol: JSXBase.OlHTMLAttributes<HTMLOListElement>; + optgroup: JSXBase.OptgroupHTMLAttributes<HTMLOptGroupElement>; + option: JSXBase.OptionHTMLAttributes<HTMLOptionElement>; + output: JSXBase.OutputHTMLAttributes<HTMLOutputElement>; + p: JSXBase.HTMLAttributes<HTMLParagraphElement>; + param: JSXBase.ParamHTMLAttributes<HTMLParamElement>; + picture: JSXBase.HTMLAttributes<HTMLPictureElement>; + pre: JSXBase.HTMLAttributes<HTMLPreElement>; + progress: JSXBase.ProgressHTMLAttributes<HTMLProgressElement>; + q: JSXBase.QuoteHTMLAttributes<HTMLQuoteElement>; + rp: JSXBase.HTMLAttributes; + rt: JSXBase.HTMLAttributes; + ruby: JSXBase.HTMLAttributes; + s: JSXBase.HTMLAttributes; + samp: JSXBase.HTMLAttributes; + script: JSXBase.ScriptHTMLAttributes<HTMLScriptElement>; + section: JSXBase.HTMLAttributes; + select: JSXBase.SelectHTMLAttributes<HTMLSelectElement>; + small: JSXBase.HTMLAttributes; + source: JSXBase.SourceHTMLAttributes<HTMLSourceElement>; + span: JSXBase.HTMLAttributes<HTMLSpanElement>; + strong: JSXBase.HTMLAttributes; + style: JSXBase.StyleHTMLAttributes<HTMLStyleElement>; + sub: JSXBase.HTMLAttributes; + summary: JSXBase.HTMLAttributes; + sup: JSXBase.HTMLAttributes; + table: JSXBase.TableHTMLAttributes<HTMLTableElement>; + tbody: JSXBase.HTMLAttributes<HTMLTableSectionElement>; + td: JSXBase.TdHTMLAttributes<HTMLTableDataCellElement>; + textarea: JSXBase.TextareaHTMLAttributes<HTMLTextAreaElement>; + tfoot: JSXBase.HTMLAttributes<HTMLTableSectionElement>; + th: JSXBase.ThHTMLAttributes<HTMLTableHeaderCellElement>; + thead: JSXBase.HTMLAttributes<HTMLTableSectionElement>; + time: JSXBase.TimeHTMLAttributes<HTMLTimeElement>; + title: JSXBase.HTMLAttributes<HTMLTitleElement>; + tr: JSXBase.HTMLAttributes<HTMLTableRowElement>; + track: JSXBase.TrackHTMLAttributes<HTMLTrackElement>; + u: JSXBase.HTMLAttributes; + ul: JSXBase.HTMLAttributes<HTMLUListElement>; + var: JSXBase.HTMLAttributes; + video: JSXBase.VideoHTMLAttributes<HTMLVideoElement>; + wbr: JSXBase.HTMLAttributes; + animate: JSXBase.SVGAttributes; + circle: JSXBase.SVGAttributes; + clipPath: JSXBase.SVGAttributes; + defs: JSXBase.SVGAttributes; + desc: JSXBase.SVGAttributes; + ellipse: JSXBase.SVGAttributes; + feBlend: JSXBase.SVGAttributes; + feColorMatrix: JSXBase.SVGAttributes; + feComponentTransfer: JSXBase.SVGAttributes; + feComposite: JSXBase.SVGAttributes; + feConvolveMatrix: JSXBase.SVGAttributes; + feDiffuseLighting: JSXBase.SVGAttributes; + feDisplacementMap: JSXBase.SVGAttributes; + feDistantLight: JSXBase.SVGAttributes; + feDropShadow: JSXBase.SVGAttributes; + feFlood: JSXBase.SVGAttributes; + feFuncA: JSXBase.SVGAttributes; + feFuncB: JSXBase.SVGAttributes; + feFuncG: JSXBase.SVGAttributes; + feFuncR: JSXBase.SVGAttributes; + feGaussianBlur: JSXBase.SVGAttributes; + feImage: JSXBase.SVGAttributes; + feMerge: JSXBase.SVGAttributes; + feMergeNode: JSXBase.SVGAttributes; + feMorphology: JSXBase.SVGAttributes; + feOffset: JSXBase.SVGAttributes; + fePointLight: JSXBase.SVGAttributes; + feSpecularLighting: JSXBase.SVGAttributes; + feSpotLight: JSXBase.SVGAttributes; + feTile: JSXBase.SVGAttributes; + feTurbulence: JSXBase.SVGAttributes; + filter: JSXBase.SVGAttributes; + foreignObject: JSXBase.SVGAttributes; + g: JSXBase.SVGAttributes; + image: JSXBase.SVGAttributes; + line: JSXBase.SVGAttributes; + linearGradient: JSXBase.SVGAttributes; + marker: JSXBase.SVGAttributes; + mask: JSXBase.SVGAttributes; + metadata: JSXBase.SVGAttributes; + path: JSXBase.SVGAttributes; + pattern: JSXBase.SVGAttributes; + polygon: JSXBase.SVGAttributes; + polyline: JSXBase.SVGAttributes; + radialGradient: JSXBase.SVGAttributes; + rect: JSXBase.SVGAttributes; + stop: JSXBase.SVGAttributes; + svg: JSXBase.SVGAttributes; + switch: JSXBase.SVGAttributes; + symbol: JSXBase.SVGAttributes; + text: JSXBase.SVGAttributes; + textPath: JSXBase.SVGAttributes; + tspan: JSXBase.SVGAttributes; + use: JSXBase.SVGAttributes; + view: JSXBase.SVGAttributes; + } + interface SlotAttributes extends JSXAttributes { + name?: string; + slot?: string; + onSlotchange?: (event: Event) => void; + } + interface AnchorHTMLAttributes<T> extends HTMLAttributes<T> { + download?: any; + href?: string; + hrefLang?: string; + hreflang?: string; + media?: string; + rel?: string; + target?: string; + referrerPolicy?: ReferrerPolicy; + } + interface AudioHTMLAttributes<T> extends MediaHTMLAttributes<T> { + } + interface AreaHTMLAttributes<T> extends HTMLAttributes<T> { + alt?: string; + coords?: string; + download?: any; + href?: string; + hrefLang?: string; + hreflang?: string; + media?: string; + rel?: string; + shape?: string; + target?: string; + } + interface BaseHTMLAttributes<T> extends HTMLAttributes<T> { + href?: string; + target?: string; + } + interface BlockquoteHTMLAttributes<T> extends HTMLAttributes<T> { + cite?: string; + } + interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> { + autoFocus?: boolean; + disabled?: boolean; + form?: string; + formAction?: string; + formaction?: string; + formEncType?: string; + formenctype?: string; + formMethod?: string; + formmethod?: string; + formNoValidate?: boolean; + formnovalidate?: boolean; + formTarget?: string; + formtarget?: string; + name?: string; + type?: string; + value?: string | string[] | number; + } + interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> { + height?: number | string; + width?: number | string; + } + interface ColHTMLAttributes<T> extends HTMLAttributes<T> { + span?: number; + } + interface ColgroupHTMLAttributes<T> extends HTMLAttributes<T> { + span?: number; + } + interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> { + open?: boolean; + onToggle?: (event: Event) => void; + } + interface DelHTMLAttributes<T> extends HTMLAttributes<T> { + cite?: string; + dateTime?: string; + datetime?: string; + } + interface DialogHTMLAttributes<T> extends HTMLAttributes<T> { + onCancel?: (event: Event) => void; + onClose?: (event: Event) => void; + open?: boolean; + returnValue?: string; + } + interface EmbedHTMLAttributes<T> extends HTMLAttributes<T> { + height?: number | string; + src?: string; + type?: string; + width?: number | string; + } + interface FieldsetHTMLAttributes<T> extends HTMLAttributes<T> { + disabled?: boolean; + form?: string; + name?: string; + } + interface FormHTMLAttributes<T> extends HTMLAttributes<T> { + acceptCharset?: string; + acceptcharset?: string; + action?: string; + autoComplete?: string; + autocomplete?: string; + encType?: string; + enctype?: string; + method?: string; + name?: string; + noValidate?: boolean; + novalidate?: boolean | string; + target?: string; + } + interface HtmlHTMLAttributes<T> extends HTMLAttributes<T> { + manifest?: string; + } + interface IframeHTMLAttributes<T> extends HTMLAttributes<T> { + allow?: string; + allowFullScreen?: boolean; + allowfullScreen?: string | boolean; + allowTransparency?: boolean; + allowtransparency?: string | boolean; + frameBorder?: number | string; + frameborder?: number | string; + importance?: 'low' | 'auto' | 'high'; + height?: number | string; + loading?: 'lazy' | 'auto' | 'eager'; + marginHeight?: number; + marginheight?: string | number; + marginWidth?: number; + marginwidth?: string | number; + name?: string; + referrerPolicy?: ReferrerPolicy; + sandbox?: string; + scrolling?: string; + seamless?: boolean; + src?: string; + srcDoc?: string; + srcdoc?: string; + width?: number | string; + } + interface ImgHTMLAttributes<T> extends HTMLAttributes<T> { + alt?: string; + decoding?: 'async' | 'auto' | 'sync'; + importance?: 'low' | 'auto' | 'high'; + height?: number | string; + loading?: 'lazy' | 'auto' | 'eager'; + sizes?: string; + src?: string; + srcSet?: string; + srcset?: string; + useMap?: string; + usemap?: string; + width?: number | string; + } + interface InsHTMLAttributes<T> extends HTMLAttributes<T> { + cite?: string; + dateTime?: string; + datetime?: string; + } + interface InputHTMLAttributes<T> extends HTMLAttributes<T> { + accept?: string; + allowdirs?: boolean; + alt?: string; + autoCapitalize?: string; + autocapitalize?: string; + autoComplete?: string; + autocomplete?: string; + autoFocus?: boolean; + autofocus?: boolean | string; + capture?: string; + checked?: boolean; + crossOrigin?: string; + crossorigin?: string; + defaultChecked?: boolean; + defaultValue?: string; + dirName?: string; + disabled?: boolean; + files?: any; + form?: string; + formAction?: string; + formaction?: string; + formEncType?: string; + formenctype?: string; + formMethod?: string; + formmethod?: string; + formNoValidate?: boolean; + formnovalidate?: boolean; + formTarget?: string; + formtarget?: string; + height?: number | string; + indeterminate?: boolean; + list?: string; + max?: number | string; + maxLength?: number; + maxlength?: number | string; + min?: number | string; + minLength?: number; + minlength?: number | string; + multiple?: boolean; + name?: string; + pattern?: string; + placeholder?: string; + readOnly?: boolean; + readonly?: boolean | string; + required?: boolean; + selectionStart?: number | string; + selectionEnd?: number | string; + selectionDirection?: string; + size?: number; + src?: string; + step?: number | string; + type?: string; + value?: string | string[] | number; + valueAsDate?: any; + valueAsNumber?: any; + webkitdirectory?: boolean; + webkitEntries?: any; + width?: number | string; + } + interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> { + autoFocus?: boolean; + autofocus?: boolean | string; + challenge?: string; + disabled?: boolean; + form?: string; + keyType?: string; + keytype?: string; + keyParams?: string; + keyparams?: string; + name?: string; + } + interface LabelHTMLAttributes<T> extends HTMLAttributes<T> { + form?: string; + htmlFor?: string; + htmlfor?: string; + } + interface LiHTMLAttributes<T> extends HTMLAttributes<T> { + value?: string | string[] | number; + } + interface LinkHTMLAttributes<T> extends HTMLAttributes<T> { + as?: string; + href?: string; + hrefLang?: string; + hreflang?: string; + importance?: 'low' | 'auto' | 'high'; + integrity?: string; + media?: string; + rel?: string; + sizes?: string; + type?: string; + } + interface MapHTMLAttributes<T> extends HTMLAttributes<T> { + name?: string; + } + interface MenuHTMLAttributes<T> extends HTMLAttributes<T> { + type?: string; + } + interface MediaHTMLAttributes<T> extends HTMLAttributes<T> { + autoPlay?: boolean; + autoplay?: boolean | string; + controls?: boolean; + crossOrigin?: string; + crossorigin?: string; + loop?: boolean; + mediaGroup?: string; + mediagroup?: string; + muted?: boolean; + preload?: string; + src?: string; + onAbort?: (event: Event) => void; + onCanPlay?: (event: Event) => void; + onCanPlayThrough?: (event: Event) => void; + onDurationChange?: (event: Event) => void; + onEmptied?: (event: Event) => void; + onEnded?: (event: Event) => void; + onError?: (event: Event) => void; + onInterruptBegin?: (event: Event) => void; + onInterruptEnd?: (event: Event) => void; + onLoadedData?: (event: Event) => void; + onLoadedMetaData?: (event: Event) => void; + onLoadStart?: (event: Event) => void; + onMozAudioAvailable?: (event: Event) => void; + onPause?: (event: Event) => void; + onPlay?: (event: Event) => void; + onPlaying?: (event: Event) => void; + onProgress?: (event: Event) => void; + onRateChange?: (event: Event) => void; + onSeeked?: (event: Event) => void; + onSeeking?: (event: Event) => void; + onStalled?: (event: Event) => void; + onSuspend?: (event: Event) => void; + onTimeUpdate?: (event: Event) => void; + onVolumeChange?: (event: Event) => void; + onWaiting?: (event: Event) => void; + } + interface MetaHTMLAttributes<T> extends HTMLAttributes<T> { + charSet?: string; + charset?: string; + content?: string; + httpEquiv?: string; + httpequiv?: string; + name?: string; + } + interface MeterHTMLAttributes<T> extends HTMLAttributes<T> { + form?: string; + high?: number; + low?: number; + max?: number | string; + min?: number | string; + optimum?: number; + value?: string | string[] | number; + } + interface QuoteHTMLAttributes<T> extends HTMLAttributes<T> { + cite?: string; + } + interface ObjectHTMLAttributes<T> extends HTMLAttributes<T> { + classID?: string; + classid?: string; + data?: string; + form?: string; + height?: number | string; + name?: string; + type?: string; + useMap?: string; + usemap?: string; + width?: number | string; + wmode?: string; + } + interface OlHTMLAttributes<T> extends HTMLAttributes<T> { + reversed?: boolean; + start?: number; + } + interface OptgroupHTMLAttributes<T> extends HTMLAttributes<T> { + disabled?: boolean; + label?: string; + } + interface OptionHTMLAttributes<T> extends HTMLAttributes<T> { + disabled?: boolean; + label?: string; + selected?: boolean; + value?: string | string[] | number; + } + interface OutputHTMLAttributes<T> extends HTMLAttributes<T> { + form?: string; + htmlFor?: string; + htmlfor?: string; + name?: string; + } + interface ParamHTMLAttributes<T> extends HTMLAttributes<T> { + name?: string; + value?: string | string[] | number; + } + interface ProgressHTMLAttributes<T> extends HTMLAttributes<T> { + max?: number | string; + value?: string | string[] | number; + } + interface ScriptHTMLAttributes<T> extends HTMLAttributes<T> { + async?: boolean; + charSet?: string; + charset?: string; + crossOrigin?: string; + crossorigin?: string; + defer?: boolean; + importance?: 'low' | 'auto' | 'high'; + integrity?: string; + nonce?: string; + src?: string; + type?: string; + } + interface SelectHTMLAttributes<T> extends HTMLAttributes<T> { + autoFocus?: boolean; + disabled?: boolean; + form?: string; + multiple?: boolean; + name?: string; + required?: boolean; + size?: number; + autoComplete?: string; + autocomplete?: string; + } + interface SourceHTMLAttributes<T> extends HTMLAttributes<T> { + media?: string; + sizes?: string; + src?: string; + srcSet?: string; + type?: string; + } + interface StyleHTMLAttributes<T> extends HTMLAttributes<T> { + media?: string; + nonce?: string; + scoped?: boolean; + type?: string; + } + interface TableHTMLAttributes<T> extends HTMLAttributes<T> { + cellPadding?: number | string; + cellpadding?: number | string; + cellSpacing?: number | string; + cellspacing?: number | string; + summary?: string; + } + interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> { + autoComplete?: string; + autocomplete?: string; + autoFocus?: boolean; + autofocus?: boolean | string; + cols?: number; + disabled?: boolean; + form?: string; + maxLength?: number; + maxlength?: number | string; + minLength?: number; + minlength?: number | string; + name?: string; + placeholder?: string; + readOnly?: boolean; + readonly?: boolean | string; + required?: boolean; + rows?: number; + value?: string | string[] | number; + wrap?: string; + } + interface TdHTMLAttributes<T> extends HTMLAttributes<T> { + colSpan?: number; + headers?: string; + rowSpan?: number; + } + interface ThHTMLAttributes<T> extends HTMLAttributes<T> { + abbr?: string; + colSpan?: number; + headers?: string; + rowSpan?: number; + rowspan?: number | string; + scope?: string; + } + interface TimeHTMLAttributes<T> extends HTMLAttributes<T> { + dateTime?: string; + } + interface TrackHTMLAttributes<T> extends HTMLAttributes<T> { + default?: boolean; + kind?: string; + label?: string; + src?: string; + srcLang?: string; + srclang?: string; + } + interface VideoHTMLAttributes<T> extends MediaHTMLAttributes<T> { + height?: number | string; + playsInline?: boolean; + playsinline?: boolean | string; + poster?: string; + width?: number | string; + } + interface HTMLAttributes<T = HTMLElement> extends DOMAttributes<T> { + innerHTML?: string; + accessKey?: string; + class?: string | { + [className: string]: boolean; + }; + contentEditable?: boolean | string; + contenteditable?: boolean | string; + contextMenu?: string; + contextmenu?: string; + dir?: string; + draggable?: boolean; + hidden?: boolean; + id?: string; + lang?: string; + spellcheck?: 'true' | 'false' | any; + style?: { + [key: string]: string | undefined; + }; + tabIndex?: number; + tabindex?: number | string; + title?: string; + inputMode?: string; + inputmode?: string; + enterKeyHint?: string; + enterkeyhint?: string; + is?: string; + radioGroup?: string; + radiogroup?: string; + role?: string; + about?: string; + datatype?: string; + inlist?: any; + prefix?: string; + property?: string; + resource?: string; + typeof?: string; + vocab?: string; + autoCapitalize?: string; + autocapitalize?: string; + autoCorrect?: string; + autocorrect?: string; + autoSave?: string; + autosave?: string; + color?: string; + itemProp?: string; + itemprop?: string; + itemScope?: boolean; + itemscope?: boolean; + itemType?: string; + itemtype?: string; + itemID?: string; + itemid?: string; + itemRef?: string; + itemref?: string; + results?: number; + security?: string; + unselectable?: boolean; + } + interface SVGAttributes<T = SVGElement> extends DOMAttributes<T> { + class?: string | { + [className: string]: boolean; + }; + color?: string; + height?: number | string; + id?: string; + lang?: string; + max?: number | string; + media?: string; + method?: string; + min?: number | string; + name?: string; + style?: { + [key: string]: string | undefined; + }; + target?: string; + type?: string; + width?: number | string; + role?: string; + tabindex?: number; + 'accent-height'?: number | string; + accumulate?: 'none' | 'sum'; + additive?: 'replace' | 'sum'; + 'alignment-baseline'?: 'auto' | 'baseline' | 'before-edge' | 'text-before-edge' | 'middle' | 'central' | 'after-edge' | 'text-after-edge' | 'ideographic' | 'alphabetic' | 'hanging' | 'mathematical' | 'inherit'; + allowReorder?: 'no' | 'yes'; + alphabetic?: number | string; + amplitude?: number | string; + 'arabic-form'?: 'initial' | 'medial' | 'terminal' | 'isolated'; + ascent?: number | string; + attributeName?: string; + attributeType?: string; + autoReverse?: number | string; + azimuth?: number | string; + baseFrequency?: number | string; + 'baseline-shift'?: number | string; + baseProfile?: number | string; + bbox?: number | string; + begin?: number | string; + bias?: number | string; + by?: number | string; + calcMode?: number | string; + 'cap-height'?: number | string; + clip?: number | string; + 'clip-path'?: string; + clipPathUnits?: number | string; + 'clip-rule'?: number | string; + 'color-interpolation'?: number | string; + 'color-interpolation-filters'?: 'auto' | 's-rGB' | 'linear-rGB' | 'inherit'; + 'color-profile'?: number | string; + 'color-rendering'?: number | string; + contentScriptType?: number | string; + contentStyleType?: number | string; + cursor?: number | string; + cx?: number | string; + cy?: number | string; + d?: string; + decelerate?: number | string; + descent?: number | string; + diffuseConstant?: number | string; + direction?: number | string; + display?: number | string; + divisor?: number | string; + 'dominant-baseline'?: number | string; + dur?: number | string; + dx?: number | string; + dy?: number | string; + 'edge-mode'?: number | string; + elevation?: number | string; + 'enable-background'?: number | string; + end?: number | string; + exponent?: number | string; + externalResourcesRequired?: number | string; + fill?: string; + 'fill-opacity'?: number | string; + 'fill-rule'?: 'nonzero' | 'evenodd' | 'inherit'; + filter?: string; + filterRes?: number | string; + filterUnits?: number | string; + 'flood-color'?: number | string; + 'flood-opacity'?: number | string; + focusable?: number | string; + 'font-family'?: string; + 'font-size'?: number | string; + 'font-size-adjust'?: number | string; + 'font-stretch'?: number | string; + 'font-style'?: number | string; + 'font-variant'?: number | string; + 'font-weight'?: number | string; + format?: number | string; + from?: number | string; + fx?: number | string; + fy?: number | string; + g1?: number | string; + g2?: number | string; + 'glyph-name'?: number | string; + 'glyph-orientation-horizontal'?: number | string; + 'glyph-orientation-vertical'?: number | string; + glyphRef?: number | string; + gradientTransform?: string; + gradientUnits?: string; + hanging?: number | string; + 'horiz-adv-x'?: number | string; + 'horiz-origin-x'?: number | string; + href?: string; + ideographic?: number | string; + 'image-rendering'?: number | string; + in2?: number | string; + in?: string; + intercept?: number | string; + k1?: number | string; + k2?: number | string; + k3?: number | string; + k4?: number | string; + k?: number | string; + kernelMatrix?: number | string; + kernelUnitLength?: number | string; + kerning?: number | string; + keyPoints?: number | string; + keySplines?: number | string; + keyTimes?: number | string; + lengthAdjust?: number | string; + 'letter-spacing'?: number | string; + 'lighting-color'?: number | string; + limitingConeAngle?: number | string; + local?: number | string; + 'marker-end'?: string; + markerHeight?: number | string; + 'marker-mid'?: string; + 'marker-start'?: string; + markerUnits?: number | string; + markerWidth?: number | string; + mask?: string; + maskContentUnits?: number | string; + maskUnits?: number | string; + mathematical?: number | string; + mode?: number | string; + numOctaves?: number | string; + offset?: number | string; + opacity?: number | string; + operator?: number | string; + order?: number | string; + orient?: number | string; + orientation?: number | string; + origin?: number | string; + overflow?: number | string; + 'overline-position'?: number | string; + 'overline-thickness'?: number | string; + 'paint-order'?: number | string; + panose1?: number | string; + pathLength?: number | string; + patternContentUnits?: string; + patternTransform?: number | string; + patternUnits?: string; + 'pointer-events'?: number | string; + points?: string; + pointsAtX?: number | string; + pointsAtY?: number | string; + pointsAtZ?: number | string; + preserveAlpha?: number | string; + preserveAspectRatio?: string; + primitiveUnits?: number | string; + r?: number | string; + radius?: number | string; + refX?: number | string; + refY?: number | string; + 'rendering-intent'?: number | string; + repeatCount?: number | string; + repeatDur?: number | string; + requiredextensions?: number | string; + requiredFeatures?: number | string; + restart?: number | string; + result?: string; + rotate?: number | string; + rx?: number | string; + ry?: number | string; + scale?: number | string; + seed?: number | string; + 'shape-rendering'?: number | string; + slope?: number | string; + spacing?: number | string; + specularConstant?: number | string; + specularExponent?: number | string; + speed?: number | string; + spreadMethod?: string; + startOffset?: number | string; + stdDeviation?: number | string; + stemh?: number | string; + stemv?: number | string; + stitchTiles?: number | string; + 'stop-color'?: string; + 'stop-opacity'?: number | string; + 'strikethrough-position'?: number | string; + 'strikethrough-thickness'?: number | string; + string?: number | string; + stroke?: string; + 'stroke-dasharray'?: string | number; + 'stroke-dashoffset'?: string | number; + 'stroke-linecap'?: 'butt' | 'round' | 'square' | 'inherit'; + 'stroke-linejoin'?: 'miter' | 'round' | 'bevel' | 'inherit'; + 'stroke-miterlimit'?: string; + 'stroke-opacity'?: number | string; + 'stroke-width'?: number | string; + surfaceScale?: number | string; + systemLanguage?: number | string; + tableValues?: number | string; + targetX?: number | string; + targetY?: number | string; + 'text-anchor'?: string; + 'text-decoration'?: number | string; + textLength?: number | string; + 'text-rendering'?: number | string; + to?: number | string; + transform?: string; + u1?: number | string; + u2?: number | string; + 'underline-position'?: number | string; + 'underline-thickness'?: number | string; + unicode?: number | string; + 'unicode-bidi'?: number | string; + 'unicode-range'?: number | string; + 'units-per-em'?: number | string; + 'v-alphabetic'?: number | string; + values?: string; + 'vector-effect'?: number | string; + version?: string; + 'vert-adv-y'?: number | string; + 'vert-origin-x'?: number | string; + 'vert-origin-y'?: number | string; + 'v-hanging'?: number | string; + 'v-ideographic'?: number | string; + viewBox?: string; + viewTarget?: number | string; + visibility?: number | string; + 'v-mathematical'?: number | string; + widths?: number | string; + 'word-spacing'?: number | string; + 'writing-mode'?: number | string; + x1?: number | string; + x2?: number | string; + x?: number | string; + 'x-channel-selector'?: string; + 'x-height'?: number | string; + xlinkActuate?: string; + xlinkArcrole?: string; + xlinkHref?: string; + xlinkRole?: string; + xlinkShow?: string; + xlinkTitle?: string; + xlinkType?: string; + xmlBase?: string; + xmlLang?: string; + xmlns?: string; + xmlSpace?: string; + y1?: number | string; + y2?: number | string; + y?: number | string; + yChannelSelector?: string; + z?: number | string; + zoomAndPan?: string; + } + interface DOMAttributes<T> extends JSXAttributes<T> { + slot?: string; + part?: string; + exportparts?: string; + onCopy?: (event: ClipboardEvent) => void; + onCopyCapture?: (event: ClipboardEvent) => void; + onCut?: (event: ClipboardEvent) => void; + onCutCapture?: (event: ClipboardEvent) => void; + onPaste?: (event: ClipboardEvent) => void; + onPasteCapture?: (event: ClipboardEvent) => void; + onCompositionend?: (event: CompositionEvent) => void; + onCompositionendCapture?: (event: CompositionEvent) => void; + onCompositionstart?: (event: CompositionEvent) => void; + onCompositionstartCapture?: (event: CompositionEvent) => void; + onCompositionupdate?: (event: CompositionEvent) => void; + onCompositionupdateCapture?: (event: CompositionEvent) => void; + onFocus?: (event: FocusEvent) => void; + onFocusCapture?: (event: FocusEvent) => void; + onFocusin?: (event: FocusEvent) => void; + onFocusinCapture?: (event: FocusEvent) => void; + onFocusout?: (event: FocusEvent) => void; + onFocusoutCapture?: (event: FocusEvent) => void; + onBlur?: (event: FocusEvent) => void; + onBlurCapture?: (event: FocusEvent) => void; + onChange?: (event: Event) => void; + onChangeCapture?: (event: Event) => void; + onInput?: (event: InputEvent) => void; + onInputCapture?: (event: InputEvent) => void; + onReset?: (event: Event) => void; + onResetCapture?: (event: Event) => void; + onSubmit?: (event: Event) => void; + onSubmitCapture?: (event: Event) => void; + onInvalid?: (event: Event) => void; + onInvalidCapture?: (event: Event) => void; + onLoad?: (event: Event) => void; + onLoadCapture?: (event: Event) => void; + onError?: (event: Event) => void; + onErrorCapture?: (event: Event) => void; + onKeyDown?: (event: KeyboardEvent) => void; + onKeyDownCapture?: (event: KeyboardEvent) => void; + onKeyPress?: (event: KeyboardEvent) => void; + onKeyPressCapture?: (event: KeyboardEvent) => void; + onKeyUp?: (event: KeyboardEvent) => void; + onKeyUpCapture?: (event: KeyboardEvent) => void; + onAuxClick?: (event: MouseEvent) => void; + onClick?: (event: MouseEvent) => void; + onClickCapture?: (event: MouseEvent) => void; + onContextMenu?: (event: MouseEvent) => void; + onContextMenuCapture?: (event: MouseEvent) => void; + onDblClick?: (event: MouseEvent) => void; + onDblClickCapture?: (event: MouseEvent) => void; + onDrag?: (event: DragEvent) => void; + onDragCapture?: (event: DragEvent) => void; + onDragEnd?: (event: DragEvent) => void; + onDragEndCapture?: (event: DragEvent) => void; + onDragEnter?: (event: DragEvent) => void; + onDragEnterCapture?: (event: DragEvent) => void; + onDragExit?: (event: DragEvent) => void; + onDragExitCapture?: (event: DragEvent) => void; + onDragLeave?: (event: DragEvent) => void; + onDragLeaveCapture?: (event: DragEvent) => void; + onDragOver?: (event: DragEvent) => void; + onDragOverCapture?: (event: DragEvent) => void; + onDragStart?: (event: DragEvent) => void; + onDragStartCapture?: (event: DragEvent) => void; + onDrop?: (event: DragEvent) => void; + onDropCapture?: (event: DragEvent) => void; + onMouseDown?: (event: MouseEvent) => void; + onMouseDownCapture?: (event: MouseEvent) => void; + onMouseEnter?: (event: MouseEvent) => void; + onMouseLeave?: (event: MouseEvent) => void; + onMouseMove?: (event: MouseEvent) => void; + onMouseMoveCapture?: (event: MouseEvent) => void; + onMouseOut?: (event: MouseEvent) => void; + onMouseOutCapture?: (event: MouseEvent) => void; + onMouseOver?: (event: MouseEvent) => void; + onMouseOverCapture?: (event: MouseEvent) => void; + onMouseUp?: (event: MouseEvent) => void; + onMouseUpCapture?: (event: MouseEvent) => void; + onTouchCancel?: (event: TouchEvent) => void; + onTouchCancelCapture?: (event: TouchEvent) => void; + onTouchEnd?: (event: TouchEvent) => void; + onTouchEndCapture?: (event: TouchEvent) => void; + onTouchMove?: (event: TouchEvent) => void; + onTouchMoveCapture?: (event: TouchEvent) => void; + onTouchStart?: (event: TouchEvent) => void; + onTouchStartCapture?: (event: TouchEvent) => void; + onPointerDown?: (event: PointerEvent) => void; + onPointerDownCapture?: (event: PointerEvent) => void; + onPointerMove?: (event: PointerEvent) => void; + onPointerMoveCapture?: (event: PointerEvent) => void; + onPointerUp?: (event: PointerEvent) => void; + onPointerUpCapture?: (event: PointerEvent) => void; + onPointerCancel?: (event: PointerEvent) => void; + onPointerCancelCapture?: (event: PointerEvent) => void; + onPointerEnter?: (event: PointerEvent) => void; + onPointerEnterCapture?: (event: PointerEvent) => void; + onPointerLeave?: (event: PointerEvent) => void; + onPointerLeaveCapture?: (event: PointerEvent) => void; + onPointerOver?: (event: PointerEvent) => void; + onPointerOverCapture?: (event: PointerEvent) => void; + onPointerOut?: (event: PointerEvent) => void; + onPointerOutCapture?: (event: PointerEvent) => void; + onGotPointerCapture?: (event: PointerEvent) => void; + onGotPointerCaptureCapture?: (event: PointerEvent) => void; + onLostPointerCapture?: (event: PointerEvent) => void; + onLostPointerCaptureCapture?: (event: PointerEvent) => void; + onScroll?: (event: UIEvent) => void; + onScrollCapture?: (event: UIEvent) => void; + onWheel?: (event: WheelEvent) => void; + onWheelCapture?: (event: WheelEvent) => void; + onAnimationStart?: (event: AnimationEvent) => void; + onAnimationStartCapture?: (event: AnimationEvent) => void; + onAnimationEnd?: (event: AnimationEvent) => void; + onAnimationEndCapture?: (event: AnimationEvent) => void; + onAnimationIteration?: (event: AnimationEvent) => void; + onAnimationIterationCapture?: (event: AnimationEvent) => void; + onTransitionEnd?: (event: TransitionEvent) => void; + onTransitionEndCapture?: (event: TransitionEvent) => void; + } +} +export interface JSXAttributes<T = Element> { + key?: string | number; + ref?: (elm?: T) => void; +} +export interface CustomElementsDefineOptions { + exclude?: string[]; + resourcesUrl?: string; + syncQueue?: boolean; + transformTagName?: (tagName: string) => string; + jmp?: (c: Function) => any; + raf?: (c: FrameRequestCallback) => number; + ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void; + rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void; + ce?: (eventName: string, opts?: any) => CustomEvent; +} diff --git a/vite.config.ts b/vite.config.ts index 8048ec98d734ad58f8feadace36b516205a564d1..296848f82162d1a085c99527c33bba8c020545f3 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,14 +1,32 @@ import vue from '@vitejs/plugin-vue'; +import legacy from '@vitejs/plugin-legacy'; + import { resolve } from 'path'; import { defineConfig } from 'vite'; export default defineConfig({ build: { + target: 'es2015', + cssTarget: 'chrome39', emptyOutDir: true, minify: false, outDir: '../dist', + rollupOptions: { + external: [ + "/js/pwa-elements/ionicpwaelements/ionicpwaelements.esm.js" + ] + } }, - plugins: [vue()], + plugins: [ + vue(), + legacy({ + targets: ['chrome 39'], + modernTargets: ['chrome 58'], + polyfills: false, + modernPolyfills: false, + }) + ], resolve: { alias: { '@': resolve(__dirname, './src') } }, root: './src', + publicDir: "./public" });