From 572c3c2a41b92244b5358d124b9ac0b922d14124 Mon Sep 17 00:00:00 2001 From: Huffle Date: Wed, 14 May 2025 13:40:00 +0200 Subject: [PATCH] remove node-modules --- frontend/allowance-planner-v2/src/global.scss | 36 - frontend/node_modules/.package-lock.json | 16 - .../node_modules/@ionic/pwa-elements/LICENSE | 21 - .../pwa-elements/dist/cjs/index-d7f36e37.js | 1666 ----------------- .../@ionic/pwa-elements/dist/cjs/index.cjs.js | 2 - .../dist/cjs/ionicpwaelements.cjs.js | 26 - .../pwa-elements/dist/cjs/loader.cjs.js | 22 - .../dist/cjs/pwa-action-sheet.cjs.entry.js | 46 - .../pwa-camera-modal-instance.cjs.entry.js | 45 - .../dist/cjs/pwa-camera-modal.cjs.entry.js | 47 - .../dist/cjs/pwa-camera.cjs.entry.js | 485 ----- .../dist/cjs/pwa-toast.cjs.entry.js | 49 - .../dist/collection/collection-manifest.json | 16 - .../components/action-sheet/action-sheet.css | 79 - .../components/action-sheet/action-sheet.js | 129 -- .../camera-modal/camera-modal-instance.css | 35 - .../camera-modal/camera-modal-instance.js | 162 -- .../components/camera-modal/camera-modal.css | 24 - .../components/camera-modal/camera-modal.js | 155 -- .../collection/components/camera/camera.css | 244 --- .../collection/components/camera/camera.js | 455 ----- .../components/camera/icons/confirm.svg | 15 - .../components/camera/icons/exit.svg | 13 - .../components/camera/icons/flash-auto.svg | 14 - .../components/camera/icons/flash-off.svg | 14 - .../components/camera/icons/flash-on.svg | 10 - .../components/camera/icons/retake.svg | 14 - .../camera/icons/reverse-camera.svg | 15 - .../components/camera/imagecapture.js | 155 -- .../collection/components/toast/toast.css | 37 - .../dist/collection/components/toast/toast.js | 93 - .../dist/collection/definitions.js | 1 - .../pwa-elements/dist/collection/index.js | 1 - .../dist/esm-es5/index-1c5c47b4.js | 1 - .../@ionic/pwa-elements/dist/esm-es5/index.js | 0 .../dist/esm-es5/ionicpwaelements.js | 1 - .../pwa-elements/dist/esm-es5/loader.js | 1 - .../dist/esm-es5/pwa-action-sheet.entry.js | 1 - .../pwa-camera-modal-instance.entry.js | 1 - .../dist/esm-es5/pwa-camera-modal.entry.js | 1 - .../dist/esm-es5/pwa-camera.entry.js | 19 - .../dist/esm-es5/pwa-toast.entry.js | 1 - .../pwa-elements/dist/esm/index-1c5c47b4.js | 1636 ---------------- .../@ionic/pwa-elements/dist/esm/index.js | 1 - .../pwa-elements/dist/esm/ionicpwaelements.js | 21 - .../@ionic/pwa-elements/dist/esm/loader.js | 18 - .../dist/esm/polyfills/core-js.js | 11 - .../dist/esm/polyfills/css-shim.js | 1 - .../pwa-elements/dist/esm/polyfills/dom.js | 79 - .../dist/esm/polyfills/es5-html-element.js | 1 - .../pwa-elements/dist/esm/polyfills/index.js | 34 - .../pwa-elements/dist/esm/polyfills/system.js | 6 - .../dist/esm/pwa-action-sheet.entry.js | 42 - .../esm/pwa-camera-modal-instance.entry.js | 41 - .../dist/esm/pwa-camera-modal.entry.js | 43 - .../pwa-elements/dist/esm/pwa-camera.entry.js | 481 ----- .../pwa-elements/dist/esm/pwa-toast.entry.js | 45 - .../@ionic/pwa-elements/dist/index.cjs.js | 1 - .../@ionic/pwa-elements/dist/index.js | 1 - .../dist/ionicpwaelements/icons/confirm.svg | 15 - .../dist/ionicpwaelements/icons/exit.svg | 13 - .../ionicpwaelements/icons/flash-auto.svg | 14 - .../dist/ionicpwaelements/icons/flash-off.svg | 14 - .../dist/ionicpwaelements/icons/flash-on.svg | 10 - .../dist/ionicpwaelements/icons/retake.svg | 14 - .../ionicpwaelements/icons/reverse-camera.svg | 15 - .../dist/ionicpwaelements/index.esm.js | 0 .../ionicpwaelements/ionicpwaelements.esm.js | 1 - .../dist/ionicpwaelements/ionicpwaelements.js | 131 -- .../ionicpwaelements/p-00206cb0.system.js | 1 - .../p-1b81a39d.system.entry.js | 1 - .../ionicpwaelements/p-335782c2.system.js | 2 - .../dist/ionicpwaelements/p-386e91ad.js | 2 - .../dist/ionicpwaelements/p-3bb700a2.entry.js | 1 - .../ionicpwaelements/p-50ea2036.system.js | 1 - .../p-550557d3.system.entry.js | 1 - .../p-5b57434a.system.entry.js | 1 - .../dist/ionicpwaelements/p-665001c2.entry.js | 19 - .../dist/ionicpwaelements/p-b57f4873.entry.js | 1 - .../dist/ionicpwaelements/p-d0cae4dc.entry.js | 1 - .../dist/ionicpwaelements/p-d212ae1d.entry.js | 1 - .../p-db3c6183.system.entry.js | 1 - .../p-fab2e7af.system.entry.js | 20 - .../pwa-elements/dist/types/components.d.ts | 144 -- .../components/action-sheet/action-sheet.d.ts | 15 - .../camera-modal/camera-modal-instance.d.ts | 16 - .../components/camera-modal/camera-modal.d.ts | 11 - .../dist/types/components/camera/camera.d.ts | 66 - .../types/components/camera/imagecapture.d.ts | 19 - .../dist/types/components/toast/toast.d.ts | 14 - .../pwa-elements/dist/types/definitions.d.ts | 15 - .../@ionic/pwa-elements/dist/types/index.d.ts | 1 - .../dist/types/stencil-public-runtime.d.ts | 1640 ---------------- .../@ionic/pwa-elements/loader/cdn.js | 3 - .../@ionic/pwa-elements/loader/index.cjs.js | 3 - .../@ionic/pwa-elements/loader/index.d.ts | 21 - .../pwa-elements/loader/index.es2017.js | 3 - .../@ionic/pwa-elements/loader/index.js | 4 - .../@ionic/pwa-elements/loader/package.json | 11 - .../@ionic/pwa-elements/package.json | 39 - .../@ionic/pwa-elements/readme.md | 32 - 101 files changed, 8967 deletions(-) delete mode 100644 frontend/node_modules/.package-lock.json delete mode 100644 frontend/node_modules/@ionic/pwa-elements/LICENSE delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/cjs/index-d7f36e37.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/cjs/index.cjs.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/cjs/ionicpwaelements.cjs.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/cjs/loader.cjs.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/cjs/pwa-action-sheet.cjs.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/cjs/pwa-camera-modal-instance.cjs.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/cjs/pwa-camera-modal.cjs.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/cjs/pwa-camera.cjs.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/cjs/pwa-toast.cjs.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/collection/collection-manifest.json delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/collection/components/action-sheet/action-sheet.css delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/collection/components/action-sheet/action-sheet.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera-modal/camera-modal-instance.css delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera-modal/camera-modal-instance.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera-modal/camera-modal.css delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera-modal/camera-modal.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/camera.css delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/camera.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/confirm.svg delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/exit.svg delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/flash-auto.svg delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/flash-off.svg delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/flash-on.svg delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/retake.svg delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/reverse-camera.svg delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/imagecapture.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/collection/components/toast/toast.css delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/collection/components/toast/toast.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/collection/definitions.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/collection/index.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/index-1c5c47b4.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/index.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/ionicpwaelements.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/loader.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/pwa-action-sheet.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/pwa-camera-modal-instance.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/pwa-camera-modal.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/pwa-camera.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/pwa-toast.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm/index-1c5c47b4.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm/index.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm/ionicpwaelements.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm/loader.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm/polyfills/core-js.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm/polyfills/css-shim.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm/polyfills/dom.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm/polyfills/es5-html-element.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm/polyfills/index.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm/polyfills/system.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm/pwa-action-sheet.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm/pwa-camera-modal-instance.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm/pwa-camera-modal.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm/pwa-camera.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/esm/pwa-toast.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/index.cjs.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/index.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/icons/confirm.svg delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/icons/exit.svg delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/icons/flash-auto.svg delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/icons/flash-off.svg delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/icons/flash-on.svg delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/icons/retake.svg delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/icons/reverse-camera.svg delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/index.esm.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/ionicpwaelements.esm.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/ionicpwaelements.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/p-00206cb0.system.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/p-1b81a39d.system.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/p-335782c2.system.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/p-386e91ad.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/p-3bb700a2.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/p-50ea2036.system.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/p-550557d3.system.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/p-5b57434a.system.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/p-665001c2.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/p-b57f4873.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/p-d0cae4dc.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/p-d212ae1d.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/p-db3c6183.system.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/ionicpwaelements/p-fab2e7af.system.entry.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/types/components.d.ts delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/types/components/action-sheet/action-sheet.d.ts delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/types/components/camera-modal/camera-modal-instance.d.ts delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/types/components/camera-modal/camera-modal.d.ts delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/types/components/camera/camera.d.ts delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/types/components/camera/imagecapture.d.ts delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/types/components/toast/toast.d.ts delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/types/definitions.d.ts delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/types/index.d.ts delete mode 100644 frontend/node_modules/@ionic/pwa-elements/dist/types/stencil-public-runtime.d.ts delete mode 100644 frontend/node_modules/@ionic/pwa-elements/loader/cdn.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/loader/index.cjs.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/loader/index.d.ts delete mode 100644 frontend/node_modules/@ionic/pwa-elements/loader/index.es2017.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/loader/index.js delete mode 100644 frontend/node_modules/@ionic/pwa-elements/loader/package.json delete mode 100644 frontend/node_modules/@ionic/pwa-elements/package.json delete mode 100644 frontend/node_modules/@ionic/pwa-elements/readme.md diff --git a/frontend/allowance-planner-v2/src/global.scss b/frontend/allowance-planner-v2/src/global.scss index 840c6c6..8b13789 100644 --- a/frontend/allowance-planner-v2/src/global.scss +++ b/frontend/allowance-planner-v2/src/global.scss @@ -1,37 +1 @@ -/* - * App Global CSS - * ---------------------------------------------------------------------------- - * Put style rules here that you want to apply globally. These styles are for - * the entire app and not just one component. Additionally, this file can be - * used as an entry point to import other CSS/Sass files to be included in the - * output CSS. - * For more information on global stylesheets, visit the documentation: - * https://ionicframework.com/docs/layout/global-stylesheets - */ -/* Core CSS required for Ionic components to work properly */ -@import "@ionic/angular/css/core.css"; - -/* Basic CSS for apps built with Ionic */ -@import "@ionic/angular/css/normalize.css"; -@import "@ionic/angular/css/structure.css"; -@import "@ionic/angular/css/typography.css"; -@import "@ionic/angular/css/display.css"; - -/* Optional CSS utils that can be commented out */ -@import "@ionic/angular/css/padding.css"; -@import "@ionic/angular/css/float-elements.css"; -@import "@ionic/angular/css/text-alignment.css"; -@import "@ionic/angular/css/text-transformation.css"; -@import "@ionic/angular/css/flex-utils.css"; - -/** - * Ionic Dark Mode - * ----------------------------------------------------- - * For more info, please see: - * https://ionicframework.com/docs/theming/dark-mode - */ - -/* @import "@ionic/angular/css/palettes/dark.always.css"; */ -/* @import "@ionic/angular/css/palettes/dark.class.css"; */ -@import "@ionic/angular/css/palettes/dark.system.css"; diff --git a/frontend/node_modules/.package-lock.json b/frontend/node_modules/.package-lock.json deleted file mode 100644 index c33c18e..0000000 --- a/frontend/node_modules/.package-lock.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "frontend", - "lockfileVersion": 3, - "requires": true, - "packages": { - "node_modules/@ionic/pwa-elements": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@ionic/pwa-elements/-/pwa-elements-3.3.0.tgz", - "integrity": "sha512-vbykpxd2nGRlA67AnqDwsiVf8PUmInLyi6lQdnPDjeiML1WZa0CPe6r632nGDV9PTi+sWNde9Xexg9SD6Pwyqw==", - "engines": { - "node": ">=16.0.0", - "npm": ">=8.0.0" - } - } - } -} diff --git a/frontend/node_modules/@ionic/pwa-elements/LICENSE b/frontend/node_modules/@ionic/pwa-elements/LICENSE deleted file mode 100644 index cdedba3..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Ionic - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/cjs/index-d7f36e37.js b/frontend/node_modules/@ionic/pwa-elements/dist/cjs/index-d7f36e37.js deleted file mode 100644 index 4cbe41d..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/cjs/index-d7f36e37.js +++ /dev/null @@ -1,1666 +0,0 @@ -'use strict'; - -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 () { - return e[k]; - } - }); - } - }); - } - n['default'] = e; - return Object.freeze(n); -} - -const 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 - */ -let scopeId; -let hostTagName; -let isSvgMode = false; -let queuePending = false; -const createTime = (fnName, tagName = '') => { - { - return () => { - return; - }; - } -}; -const uniqueTime = (key, measureText) => { - { - return () => { - return; - }; - } -}; -const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}'; -/** - * Default style mode id - */ -/** - * Reusable empty obj/array - * Don't add values to these!! - */ -const EMPTY_OBJ = {}; -/** - * Namespaces - */ -const SVG_NS = 'http://www.w3.org/2000/svg'; -const HTML_NS = 'http://www.w3.org/1999/xhtml'; -const isDef = (v) => 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 - */ -const 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; -const h = (nodeName, vnodeData, ...children) => { - let child = null; - let simple = false; - let lastSimple = false; - const vNodeChildren = []; - const walk = (c) => { - for (let 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; - } - } - }; - walk(children); - if (vnodeData) { - { - const classData = vnodeData.className || vnodeData.class; - if (classData) { - vnodeData.class = - typeof classData !== 'object' - ? classData - : Object.keys(classData) - .filter((k) => classData[k]) - .join(' '); - } - } - } - const 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 - */ -const newVNode = (tag, text) => { - const vnode = { - $flags$: 0, - $tag$: tag, - $text$: text, - $elm$: null, - $children$: null, - }; - { - vnode.$attrs$ = null; - } - return vnode; -}; -const 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 - */ -const isHost = (node) => 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 - * - * ``` - * - * 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 - */ -const 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; -}; -const getElement = (ref) => (getHostRef(ref).$hostElement$ ); -const createEvent = (ref, name, flags) => { - const elm = getElement(ref); - return { - 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, - }); - }, - }; -}; -/** - * 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 - */ -const emitEvent = (elm, name, opts) => { - const ev = plt.ce(name, opts); - elm.dispatchEvent(ev); - return ev; -}; -const rootAppliedStyles = /*@__PURE__*/ new WeakMap(); -const registerStyle = (scopeId, cssText, allowCS) => { - let 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); -}; -const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => { - var _a; - let scopeId = getScopeId(cmpMeta); - const 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; - let appliedStyles = rootAppliedStyles.get(styleContainerNode); - let 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 - const 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 = [...styleContainerNode.adoptedStyleSheets, style]; - } - } - return scopeId; -}; -const attachStyles = (hostRef) => { - const cmpMeta = hostRef.$cmpMeta$; - const elm = hostRef.$hostElement$; - const flags = cmpMeta.$flags$; - const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$); - const 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(); -}; -const getScopeId = (cmp, mode) => '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 - */ -const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => { - if (oldValue !== newValue) { - let isProp = isMemberInElement(elm, memberName); - let ln = memberName.toLowerCase(); - if (memberName === 'class') { - const classList = elm.classList; - const oldClasses = parseClassList(oldValue); - const newClasses = parseClassList(newValue); - classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c))); - classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c))); - } - else if (memberName === 'style') { - // update style attribute, css properties and values - { - for (const prop in oldValue) { - if (!newValue || newValue[prop] == null) { - if (prop.includes('-')) { - elm.style.removeProperty(prop); - } - else { - elm.style[prop] = ''; - } - } - } - } - for (const 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: - // // listens for "click" - // // listens for "Click" - // // listens for "ionChange" - // // 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 - const isComplex = isComplexType(newValue); - if ((isProp || (isComplex && newValue !== null)) && !isSvg) { - try { - if (!elm.tagName.includes('-')) { - const n = newValue == null ? '' : newValue; - // Workaround for Safari, moving the 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); - } - } - } - } -}; -const parseClassListRegex = /\s/; -const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex)); -const 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 - const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host - ? newVnode.$elm$.host - : newVnode.$elm$; - const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ; - const 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 - */ -const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => { - // tslint:disable-next-line: prefer-const - const newVNode = newParentVNode.$children$[childIndex]; - let i = 0; - let elm; - let 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 element - isSvgMode = false; - } - else if (elm.tagName === 'foreignObject') { - // Reenter SVG context when we're exiting 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) - */ -const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => { - let containerElm = (parentElm); - let 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) - */ -const removeVnodes = (vnodes, startIdx, endIdx) => { - for (let index = startIdx; index <= endIdx; ++index) { - const vnode = vnodes[index]; - if (vnode) { - const 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: `

HEY

` - * newVNode: `

THERE

` - * - * Then when comparing the children of the `
` tag we check the equality - * of the VNodes corresponding to the `

` 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: `

` - * newVNode: `
` - * - * 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 - */ -const updateChildren = (parentElm, oldCh, newVNode, newCh) => { - let oldStartIdx = 0; - let newStartIdx = 0; - let oldEndIdx = oldCh.length - 1; - let oldStartVnode = oldCh[0]; - let oldEndVnode = oldCh[oldEndIdx]; - let newEndIdx = newCh.length - 1; - let newStartVnode = newCh[0]; - let newEndVnode = newCh[newEndIdx]; - let 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: - // - // - // - // - // - // - // - // ``` - // 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(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes - .map(([propName, m]) => { - const attrName = m[1] || propName; - attrNameToPropName.set(attrName, propName); - return attrName; - }); - } - } - return Cstr; -}; -const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => { - // initializeComponent - if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) { - // 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) { - // Await creates a micro-task avoid if possible - const endLoad = uniqueTime(); - Cstr = await Cstr; - endLoad(); - } - if (!Cstr.isProxied) { - proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */); - Cstr.isProxied = true; - } - const 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 - let style = Cstr.style; - const scopeId = getScopeId(cmpMeta); - if (!styles.has(scopeId)) { - const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$); - registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */)); - endRegisterStyles(); - } - } - } - // we've successfully created a lazy instance - const ancestorComponent = hostRef.$ancestorComponent$; - const schedule = () => 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(); - } -}; -const connectedCallback = (elm) => { - if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) { - const hostRef = getHostRef(elm); - const cmpMeta = hostRef.$cmpMeta$; - const 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 - let 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(([memberName, [memberFlags]]) => { - if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) { - const 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(); - } -}; -const disconnectedCallback = (elm) => { - if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) { - const hostRef = getHostRef(elm); - const instance = hostRef.$lazyInstance$ ; - { - if (hostRef.$rmListeners$) { - hostRef.$rmListeners$.map((rmListener) => rmListener()); - hostRef.$rmListeners$ = undefined; - } - } - { - safeCall(instance, 'disconnectedCallback'); - } - } -}; -const bootstrapLazy = (lazyBundles, options = {}) => { - var _a; - const endBootstrap = createTime(); - const cmpTags = []; - const exclude = options.exclude || []; - const customElements = win.customElements; - const head = doc.head; - const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]'); - const visibilityStyle = /*@__PURE__*/ doc.createElement('style'); - const deferredConnectedCallbacks = []; - let appLoadFallback; - let isBootstrapping = true; - Object.assign(plt, options); - plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href; - lazyBundles.map((lazyBundle) => { - lazyBundle[1].map((compactMeta) => { - const cmpMeta = { - $flags$: compactMeta[0], - $tagName$: compactMeta[1], - $members$: compactMeta[2], - $listeners$: compactMeta[3], - }; - { - cmpMeta.$members$ = compactMeta[2]; - } - { - cmpMeta.$listeners$ = compactMeta[3]; - } - const tagName = cmpMeta.$tagName$; - const HostElement = class extends HTMLElement { - // StencilLazyHost - constructor(self) { - // @ts-ignore - super(self); - self = this; - 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' }); - } - } - } - } - connectedCallback() { - if (appLoadFallback) { - clearTimeout(appLoadFallback); - appLoadFallback = null; - } - if (isBootstrapping) { - // connectedCallback will be processed once all components have been registered - deferredConnectedCallbacks.push(this); - } - else { - plt.jmp(() => connectedCallback(this)); - } - } - disconnectedCallback() { - plt.jmp(() => disconnectedCallback(this)); - } - componentOnReady() { - return getHostRef(this).$onReadyPromise$; - } - }; - 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 - const 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((host) => host.connectedCallback()); - } - else { - { - plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30))); - } - } - // Fallback appLoad event - endBootstrap(); -}; -const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => { - if (listeners) { - listeners.map(([flags, name, method]) => { - const target = getHostListenerTarget(elm, flags) ; - const handler = hostListenerProxy(hostRef, method); - const opts = hostListenerOpts(flags); - plt.ael(target, name, handler, opts); - (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts)); - }); - } -}; -const hostListenerProxy = (hostRef, methodName) => (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); - } -}; -const getHostListenerTarget = (elm, flags) => { - if (flags & 16 /* LISTENER_FLAGS.TargetBody */) - return doc.body; - return elm; -}; -// prettier-ignore -const hostListenerOpts = (flags) => (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 - */ -const setNonce = (nonce) => (plt.$nonce$ = nonce); -const hostRefs = /*@__PURE__*/ new WeakMap(); -const getHostRef = (ref) => hostRefs.get(ref); -const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef); -const registerHost = (elm, cmpMeta) => { - const hostRef = { - $flags$: 0, - $hostElement$: elm, - $cmpMeta$: cmpMeta, - $instanceValues$: new Map(), - }; - { - hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r)); - } - { - hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r)); - elm['s-p'] = []; - elm['s-rc'] = []; - } - addHostEventListeners(elm, hostRef, cmpMeta.$listeners$); - return hostRefs.set(elm, hostRef); -}; -const isMemberInElement = (elm, memberName) => memberName in elm; -const consoleError = (e, el) => (0, console.error)(e, el); -const cmpModules = /*@__PURE__*/ new Map(); -const loadModule = (cmpMeta, hostRef, hmrVersionId) => { - // loadModuleImport - const exportName = cmpMeta.$tagName$.replace(/-/g, '_'); - const bundleId = cmpMeta.$lazyBundleId$; - const module = cmpModules.get(bundleId) ; - if (module) { - return module[exportName]; - } - - if (!hmrVersionId || !BUILD.hotModuleReplacement) { - const 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" */ - `./${bundleId}.entry.js${''}`)); }).then((importedModule) => { - { - cmpModules.set(bundleId, importedModule); - } - return importedModule[exportName]; - }, consoleError); -}; -const styles = /*@__PURE__*/ new Map(); -const win = typeof window !== 'undefined' ? window : {}; -const doc = win.document || { head: {} }; -const plt = { - $flags$: 0, - $resourcesUrl$: '', - jmp: (h) => h(), - raf: (h) => requestAnimationFrame(h), - ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts), - rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts), - ce: (eventName, opts) => new CustomEvent(eventName, opts), -}; -const promiseResolve = (v) => Promise.resolve(v); -const supportsConstructableStylesheets = /*@__PURE__*/ (() => { - try { - new CSSStyleSheet(); - return typeof new CSSStyleSheet().replaceSync === 'function'; - } - catch (e) { } - return false; - })() - ; -const queueDomReads = []; -const queueDomWrites = []; -const queueTask = (queue, write) => (cb) => { - queue.push(cb); - if (!queuePending) { - queuePending = true; - if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) { - nextTick(flush); - } - else { - plt.raf(flush); - } - } -}; -const consume = (queue) => { - for (let i = 0; i < queue.length; i++) { - try { - queue[i](performance.now()); - } - catch (e) { - consoleError(e); - } - } - queue.length = 0; -}; -const 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); - } - } -}; -const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb); -const 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; diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/cjs/index.cjs.js b/frontend/node_modules/@ionic/pwa-elements/dist/cjs/index.cjs.js deleted file mode 100644 index eb109ab..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/cjs/index.cjs.js +++ /dev/null @@ -1,2 +0,0 @@ -'use strict'; - diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/cjs/ionicpwaelements.cjs.js b/frontend/node_modules/@ionic/pwa-elements/dist/cjs/ionicpwaelements.cjs.js deleted file mode 100644 index 10dd1b3..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/cjs/ionicpwaelements.cjs.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -const index = require('./index-d7f36e37.js'); - -/* - Stencil Client Patch Browser v3.4.0 | MIT Licensed | https://stenciljs.com - */ -const patchBrowser = () => { - const 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)); - const 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(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; diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/cjs/loader.cjs.js b/frontend/node_modules/@ionic/pwa-elements/dist/cjs/loader.cjs.js deleted file mode 100644 index a197f5f..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/cjs/loader.cjs.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -const index = require('./index-d7f36e37.js'); - -/* - Stencil Client Patch Esm v3.4.0 | MIT Licensed | https://stenciljs.com - */ -const patchEsm = () => { - return index.promiseResolve(); -}; - -const defineCustomElements = (win, options) => { - if (typeof window === 'undefined') return Promise.resolve(); - return patchEsm().then(() => { - 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; diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/cjs/pwa-action-sheet.cjs.entry.js b/frontend/node_modules/@ionic/pwa-elements/dist/cjs/pwa-action-sheet.cjs.entry.js deleted file mode 100644 index f482ee2..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/cjs/pwa-action-sheet.cjs.entry.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -const index = require('./index-d7f36e37.js'); - -const 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}"; - -const PWAActionSheet = class { - constructor(hostRef) { - index.registerInstance(this, hostRef); - this.onSelection = index.createEvent(this, "onSelection", 7); - this.header = undefined; - this.cancelable = true; - this.options = []; - this.open = false; - } - componentDidLoad() { - requestAnimationFrame(() => { - this.open = true; - }); - } - dismiss() { - if (this.cancelable) { - this.close(); - } - } - close() { - this.open = false; - setTimeout(() => { - this.el.parentNode.removeChild(this.el); - }, 500); - } - handleOptionClick(e, i) { - e.stopPropagation(); - this.onSelection.emit(i); - this.close(); - } - render() { - return (index.h("div", { class: `wrapper${this.open ? ' open' : ''}`, onClick: () => this.dismiss() }, index.h("div", { class: "content" }, index.h("div", { class: "title" }, this.header), this.options.map((option, i) => index.h("div", { class: "action-sheet-option", onClick: (e) => this.handleOptionClick(e, i) }, index.h("div", { class: "action-sheet-button" }, option.title)))))); - } - get el() { return index.getElement(this); } -}; -PWAActionSheet.style = actionSheetCss; - -exports.pwa_action_sheet = PWAActionSheet; diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/cjs/pwa-camera-modal-instance.cjs.entry.js b/frontend/node_modules/@ionic/pwa-elements/dist/cjs/pwa-camera-modal-instance.cjs.entry.js deleted file mode 100644 index 0c8cfe3..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/cjs/pwa-camera-modal-instance.cjs.entry.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -const index = require('./index-d7f36e37.js'); - -const 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%}}"; - -const PWACameraModal = class { - constructor(hostRef) { - index.registerInstance(this, hostRef); - this.onPhoto = index.createEvent(this, "onPhoto", 7); - this.noDeviceError = index.createEvent(this, "noDeviceError", 7); - this.handlePhoto = async (photo) => { - this.onPhoto.emit(photo); - }; - this.handleNoDeviceError = async (photo) => { - this.noDeviceError.emit(photo); - }; - this.facingMode = 'user'; - this.hidePicker = false; - this.noDevicesText = 'No camera found'; - this.noDevicesButtonText = 'Choose image'; - } - handleBackdropClick(e) { - if (e.target !== this.el) { - this.onPhoto.emit(null); - } - } - handleComponentClick(e) { - e.stopPropagation(); - } - handleBackdropKeyUp(e) { - if (e.key === "Escape") { - this.onPhoto.emit(null); - } - } - render() { - return (index.h("div", { class: "wrapper", onClick: e => this.handleBackdropClick(e) }, index.h("div", { class: "content" }, index.h("pwa-camera", { onClick: e => this.handleComponentClick(e), facingMode: this.facingMode, hidePicker: this.hidePicker, handlePhoto: this.handlePhoto, handleNoDeviceError: this.handleNoDeviceError, noDevicesButtonText: this.noDevicesButtonText, noDevicesText: this.noDevicesText })))); - } - get el() { return index.getElement(this); } -}; -PWACameraModal.style = cameraModalInstanceCss; - -exports.pwa_camera_modal_instance = PWACameraModal; diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/cjs/pwa-camera-modal.cjs.entry.js b/frontend/node_modules/@ionic/pwa-elements/dist/cjs/pwa-camera-modal.cjs.entry.js deleted file mode 100644 index 867fa4c..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/cjs/pwa-camera-modal.cjs.entry.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -const index = require('./index-d7f36e37.js'); - -const 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}"; - -const PWACameraModal = class { - constructor(hostRef) { - index.registerInstance(this, hostRef); - this.onPhoto = index.createEvent(this, "onPhoto", 7); - this.noDeviceError = index.createEvent(this, "noDeviceError", 7); - this.facingMode = 'user'; - this.hidePicker = false; - } - async present() { - const camera = document.createElement('pwa-camera-modal-instance'); - camera.facingMode = this.facingMode; - camera.hidePicker = this.hidePicker; - camera.addEventListener('onPhoto', async (e) => { - if (!this._modal) { - return; - } - const photo = e.detail; - this.onPhoto.emit(photo); - }); - camera.addEventListener('noDeviceError', async (e) => { - this.noDeviceError.emit(e); - }); - document.body.append(camera); - this._modal = camera; - } - async dismiss() { - if (!this._modal) { - return; - } - this._modal && this._modal.parentNode.removeChild(this._modal); - this._modal = null; - } - render() { - return (index.h("div", null)); - } -}; -PWACameraModal.style = cameraModalCss; - -exports.pwa_camera_modal = PWACameraModal; diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/cjs/pwa-camera.cjs.entry.js b/frontend/node_modules/@ionic/pwa-elements/dist/cjs/pwa-camera.cjs.entry.js deleted file mode 100644 index f961db3..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/cjs/pwa-camera.cjs.entry.js +++ /dev/null @@ -1,485 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -const 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. - */ -let ImageCapture = window.ImageCapture; -if (typeof ImageCapture === 'undefined') { - ImageCapture = class { - /** - * TODO https://www.w3.org/TR/image-capture/#constructors - * - * @param {MediaStreamTrack} videoStreamTrack - A MediaStreamTrack of the 'video' kind - */ - constructor(videoStreamTrack) { - 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(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 - */ - get videoStreamTrack() { - return this._videoStreamTrack; - } - /** - * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-getphotocapabilities - * @return {Promise} Fulfilled promise with - * [PhotoCapabilities](https://www.w3.org/TR/image-capture/#idl-def-photocapabilities) - * object on success, rejected promise on failure - */ - getPhotoCapabilities() { - return new Promise(function executorGPC(resolve, reject) { - // TODO see https://github.com/w3c/mediacapture-image/issues/97 - const 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} Fulfilled promise on success, rejected promise on failure - */ - setOptions(_photoSettings = {}) { - return new Promise(function executorSO(_resolve, _reject) { - // TODO - }); - } - /** - * TODO - * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-takephoto - * @return {Promise} Fulfilled promise with [Blob](https://www.w3.org/TR/FileAPI/#blob) - * argument on success; rejected promise on failure - */ - takePhoto() { - const 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(() => { - 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} Fulfilled promise with - * [ImageBitmap](https://www.w3.org/TR/html51/webappapis.html#webappapis-images) - * argument on success; rejected promise on failure - */ - grabFrame() { - const 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(() => { - 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; - -const 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%}"; - -const CameraPWA = class { - constructor(hostRef) { - 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 = (_e) => { - }; - this.handleShutterClick = (_e) => { - console.debug('shutter click'); - this.capture(); - }; - this.handleRotateClick = (_e) => { - this.rotate(); - }; - this.handleClose = (_e) => { - this.handlePhoto && this.handlePhoto(null); - }; - this.handleFlashClick = (_e) => { - this.cycleFlash(); - }; - this.handleCancelPhoto = (_e) => { - const track = this.stream && this.stream.getTracks()[0]; - let c = track && track.getConstraints(); - this.photo = null; - this.photoSrc = null; - if (c) { - this.initCamera({ - video: { - facingMode: c.facingMode - } - }); - } - else { - this.initCamera(); - } - }; - this.handleAcceptPhoto = (_e) => { - this.handlePhoto && this.handlePhoto(this.photo); - }; - this.handleFileInputChange = async (e) => { - const input = e.target; - const file = input.files[0]; - try { - const orientation = await this.getOrientation(file); - console.debug('Got orientation', orientation); - this.photoOrientation = orientation; - } - catch (e) { - } - this.handlePhoto && this.handlePhoto(file); - }; - this.handleVideoMetadata = (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; - } - async componentDidLoad() { - this.defaultConstraints = { - video: { - facingMode: this.facingMode - } - }; - // Figure out how many cameras we have - await this.queryDevices(); - // Initialize the camera - await this.initCamera(); - } - disconnectedCallback() { - this.stopStream(); - this.photoSrc && URL.revokeObjectURL(this.photoSrc); - } - hasImageCapture() { - return 'ImageCapture' in window; - } - /** - * Query the list of connected devices and figure out how many video inputs we have. - */ - async queryDevices() { - try { - const devices = await navigator.mediaDevices.enumerateDevices(); - const videoDevices = devices.filter(d => d.kind == 'videoinput'); - this.hasCamera = !!videoDevices.length; - this.hasMultipleCameras = videoDevices.length > 1; - } - catch (e) { - this.deviceError = e; - } - } - async initCamera(constraints) { - if (!constraints) { - constraints = this.defaultConstraints; - } - try { - const stream = await navigator.mediaDevices.getUserMedia(Object.assign({ video: true, audio: false }, constraints)); - this.initStream(stream); - } - catch (e) { - this.deviceError = e; - this.handleNoDeviceError && this.handleNoDeviceError(e); - } - } - async initStream(stream) { - this.stream = stream; - this.videoElement.srcObject = stream; - if (this.hasImageCapture()) { - this.imageCapture = new window.ImageCapture(stream.getVideoTracks()[0]); - await this.initPhotoCapabilities(this.imageCapture); - } - else { - this.deviceError = 'No image capture'; - this.handleNoDeviceError && this.handleNoDeviceError(); - } - // Always re-render - index.forceUpdate(this.el); - } - async initPhotoCapabilities(imageCapture) { - const c = await imageCapture.getPhotoCapabilities(); - if (c.fillLightMode && c.fillLightMode.length > 1) { - this.flashModes = c.fillLightMode.map(m => 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; - } - } - } - stopStream() { - if (this.videoElement) { - this.videoElement.srcObject = null; - } - this.stream && this.stream.getTracks().forEach(track => track.stop()); - } - async capture() { - if (this.hasImageCapture()) { - try { - const photo = await this.imageCapture.takePhoto({ - fillLightMode: this.flashModes.length > 1 ? this.flashMode : undefined - }); - await this.flashScreen(); - this.promptAccept(photo); - } - catch (e) { - console.error('Unable to take photo!', e); - } - } - this.stopStream(); - } - async promptAccept(photo) { - this.photo = photo; - const orientation = await this.getOrientation(photo); - console.debug('Got orientation', orientation); - this.photoOrientation = orientation; - if (orientation) { - switch (orientation) { - 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(photo); - } - getOrientation(file) { - return new Promise(resolve => { - const reader = new FileReader(); - reader.onload = (event) => { - const view = new DataView(event.target.result); - if (view.getUint16(0, false) !== 0xFFD8) { - return resolve(-2); - } - const length = view.byteLength; - let offset = 2; - while (offset < length) { - const marker = view.getUint16(offset, false); - offset += 2; - if (marker === 0xFFE1) { - if (view.getUint32(offset += 2, false) !== 0x45786966) { - return resolve(-1); - } - const little = view.getUint16(offset += 6, false) === 0x4949; - offset += view.getUint32(offset + 4, little); - const tags = view.getUint16(offset, little); - offset += 2; - for (let 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)); - }); - } - rotate() { - this.stopStream(); - const track = this.stream && this.stream.getTracks()[0]; - if (!track) { - return; - } - let c = track.getConstraints(); - let facingMode = c.facingMode; - if (!facingMode) { - let c = track.getCapabilities(); - if (c.facingMode) { - facingMode = c.facingMode[0]; - } - } - if (facingMode === 'environment') { - this.initCamera({ - video: { - facingMode: 'user' - } - }); - } - else { - this.initCamera({ - video: { - facingMode: 'environment' - } - }); - } - } - setFlashMode(mode) { - console.debug('New flash mode: ', mode); - this.flashMode = mode; - } - cycleFlash() { - if (this.flashModes.length > 0) { - this.flashIndex = (this.flashIndex + 1) % this.flashModes.length; - this.setFlashMode(this.flashModes[this.flashIndex]); - } - } - async flashScreen() { - return new Promise((resolve, _reject) => { - this.showShutterOverlay = true; - setTimeout(() => { - this.showShutterOverlay = false; - resolve(); - }, 100); - }); - } - 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`; - } - 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' }))); - } - 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`; - } - 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`; - } - 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`; - } - 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`; - } - 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`; - } - 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`; - } - render() { - // const acceptStyles = { transform: `rotate(${-this.rotation}deg)` }; - const 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: e => this.handleClose(e) }, index.h("img", { src: this.iconExit() })), index.h("div", { class: "item flash", onClick: e => this.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(${this.photoSrc})` }, acceptStyles) }))) : (index.h("div", { class: "camera-video" }, this.showShutterOverlay && (index.h("div", { class: "shutter-overlay" })), this.hasImageCapture() ? (index.h("video", { ref: (el) => this.videoElement = el, onLoadedMetaData: this.handleVideoMetadata, autoplay: true, playsinline: true })) : (index.h("canvas", { ref: (el) => this.canvasElement = el, width: "100%", height: "100%" })), index.h("canvas", { class: "offscreen-image-render", ref: e => this.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: e => this.handleCancelPhoto(e) }, index.h("img", { src: this.iconRetake() })), index.h("div", { class: "item accept-use", onClick: e => this.handleAcceptPhoto(e) }, index.h("img", { src: this.iconConfirm() })))))))); - } - static get assetsDirs() { return ["icons"]; } - get el() { return index.getElement(this); } -}; -CameraPWA.style = cameraCss; - -exports.pwa_camera = CameraPWA; diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/cjs/pwa-toast.cjs.entry.js b/frontend/node_modules/@ionic/pwa-elements/dist/cjs/pwa-toast.cjs.entry.js deleted file mode 100644 index a799f7d..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/cjs/pwa-toast.cjs.entry.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -const index = require('./index-d7f36e37.js'); - -const 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)}"; - -const PWAToast = class { - constructor(hostRef) { - index.registerInstance(this, hostRef); - this.message = undefined; - this.duration = 2000; - this.closing = null; - } - hostData() { - const classes = { - out: !!this.closing - }; - if (this.closing !== null) { - classes['in'] = !this.closing; - } - return { - class: classes - }; - } - componentDidLoad() { - setTimeout(() => { - this.closing = false; - }); - setTimeout(() => { - this.close(); - }, this.duration); - } - close() { - this.closing = true; - setTimeout(() => { - this.el.parentNode.removeChild(this.el); - }, 1000); - } - __stencil_render() { - return (index.h("div", { class: "wrapper" }, index.h("div", { class: "toast" }, this.message))); - } - get el() { return index.getElement(this); } - render() { return index.h(index.Host, this.hostData(), this.__stencil_render()); } -}; -PWAToast.style = toastCss; - -exports.pwa_toast = PWAToast; diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/collection/collection-manifest.json b/frontend/node_modules/@ionic/pwa-elements/dist/collection/collection-manifest.json deleted file mode 100644 index d234bf1..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/collection/collection-manifest.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "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/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/action-sheet/action-sheet.css b/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/action-sheet/action-sheet.css deleted file mode 100644 index 5b18b97..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/action-sheet/action-sheet.css +++ /dev/null @@ -1,79 +0,0 @@ -: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/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/action-sheet/action-sheet.js b/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/action-sheet/action-sheet.js deleted file mode 100644 index a2c8e06..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/action-sheet/action-sheet.js +++ /dev/null @@ -1,129 +0,0 @@ -import { h } from '@stencil/core'; -export class PWAActionSheet { - constructor() { - this.header = undefined; - this.cancelable = true; - this.options = []; - this.open = false; - } - componentDidLoad() { - requestAnimationFrame(() => { - this.open = true; - }); - } - dismiss() { - if (this.cancelable) { - this.close(); - } - } - close() { - this.open = false; - setTimeout(() => { - this.el.parentNode.removeChild(this.el); - }, 500); - } - handleOptionClick(e, i) { - e.stopPropagation(); - this.onSelection.emit(i); - this.close(); - } - render() { - return (h("div", { class: `wrapper${this.open ? ' open' : ''}`, onClick: () => this.dismiss() }, h("div", { class: "content" }, h("div", { class: "title" }, this.header), this.options.map((option, i) => h("div", { class: "action-sheet-option", onClick: (e) => this.handleOptionClick(e, i) }, h("div", { class: "action-sheet-button" }, option.title)))))); - } - static get is() { return "pwa-action-sheet"; } - static get encapsulation() { return "shadow"; } - static get originalStyleUrls() { - return { - "$": ["action-sheet.css"] - }; - } - static get styleUrls() { - return { - "$": ["action-sheet.css"] - }; - } - static get properties() { - 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": "[]" - } - }; - } - static get states() { - return { - "open": {} - }; - } - static get events() { - return [{ - "method": "onSelection", - "name": "onSelection", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": { - "tags": [], - "text": "" - }, - "complexType": { - "original": "any", - "resolved": "any", - "references": {} - } - }]; - } - static get elementRef() { return "el"; } -} diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera-modal/camera-modal-instance.css b/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera-modal/camera-modal-instance.css deleted file mode 100644 index 595d43a..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera-modal/camera-modal-instance.css +++ /dev/null @@ -1,35 +0,0 @@ -: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/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera-modal/camera-modal-instance.js b/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera-modal/camera-modal-instance.js deleted file mode 100644 index 6f0187a..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera-modal/camera-modal-instance.js +++ /dev/null @@ -1,162 +0,0 @@ -import { h } from '@stencil/core'; -export class PWACameraModal { - constructor() { - this.handlePhoto = async (photo) => { - this.onPhoto.emit(photo); - }; - this.handleNoDeviceError = async (photo) => { - this.noDeviceError.emit(photo); - }; - this.facingMode = 'user'; - this.hidePicker = false; - this.noDevicesText = 'No camera found'; - this.noDevicesButtonText = 'Choose image'; - } - handleBackdropClick(e) { - if (e.target !== this.el) { - this.onPhoto.emit(null); - } - } - handleComponentClick(e) { - e.stopPropagation(); - } - handleBackdropKeyUp(e) { - if (e.key === "Escape") { - this.onPhoto.emit(null); - } - } - render() { - return (h("div", { class: "wrapper", onClick: e => this.handleBackdropClick(e) }, h("div", { class: "content" }, h("pwa-camera", { onClick: e => this.handleComponentClick(e), facingMode: this.facingMode, hidePicker: this.hidePicker, handlePhoto: this.handlePhoto, handleNoDeviceError: this.handleNoDeviceError, noDevicesButtonText: this.noDevicesButtonText, noDevicesText: this.noDevicesText })))); - } - static get is() { return "pwa-camera-modal-instance"; } - static get encapsulation() { return "shadow"; } - static get originalStyleUrls() { - return { - "$": ["camera-modal-instance.css"] - }; - } - static get styleUrls() { - return { - "$": ["camera-modal-instance.css"] - }; - } - static get properties() { - 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'" - } - }; - } - static get events() { - 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": {} - } - }]; - } - static get elementRef() { return "el"; } - static get listeners() { - return [{ - "name": "keyup", - "method": "handleBackdropKeyUp", - "target": "body", - "capture": false, - "passive": false - }]; - } -} diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera-modal/camera-modal.css b/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera-modal/camera-modal.css deleted file mode 100644 index 7fa443e..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera-modal/camera-modal.css +++ /dev/null @@ -1,24 +0,0 @@ -: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/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera-modal/camera-modal.js b/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera-modal/camera-modal.js deleted file mode 100644 index 3326ee3..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera-modal/camera-modal.js +++ /dev/null @@ -1,155 +0,0 @@ -import { h } from '@stencil/core'; -export class PWACameraModal { - constructor() { - this.facingMode = 'user'; - this.hidePicker = false; - } - async present() { - const camera = document.createElement('pwa-camera-modal-instance'); - camera.facingMode = this.facingMode; - camera.hidePicker = this.hidePicker; - camera.addEventListener('onPhoto', async (e) => { - if (!this._modal) { - return; - } - const photo = e.detail; - this.onPhoto.emit(photo); - }); - camera.addEventListener('noDeviceError', async (e) => { - this.noDeviceError.emit(e); - }); - document.body.append(camera); - this._modal = camera; - } - async dismiss() { - if (!this._modal) { - return; - } - this._modal && this._modal.parentNode.removeChild(this._modal); - this._modal = null; - } - render() { - return (h("div", null)); - } - static get is() { return "pwa-camera-modal"; } - static get encapsulation() { return "shadow"; } - static get originalStyleUrls() { - return { - "$": ["camera-modal.css"] - }; - } - static get styleUrls() { - return { - "$": ["camera-modal.css"] - }; - } - static get properties() { - 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" - } - }; - } - static get events() { - 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": {} - } - }]; - } - static get methods() { - return { - "present": { - "complexType": { - "signature": "() => Promise", - "parameters": [], - "references": { - "Promise": { - "location": "global" - } - }, - "return": "Promise" - }, - "docs": { - "text": "", - "tags": [] - } - }, - "dismiss": { - "complexType": { - "signature": "() => Promise", - "parameters": [], - "references": { - "Promise": { - "location": "global" - } - }, - "return": "Promise" - }, - "docs": { - "text": "", - "tags": [] - } - } - }; - } -} diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/camera.css b/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/camera.css deleted file mode 100644 index b328579..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/camera.css +++ /dev/null @@ -1,244 +0,0 @@ -: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/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/camera.js b/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/camera.js deleted file mode 100644 index d94b830..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/camera.js +++ /dev/null @@ -1,455 +0,0 @@ -import { h, Build, forceUpdate } from '@stencil/core'; -import './imagecapture'; -export class CameraPWA { - constructor() { - // 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 = (_e) => { - }; - this.handleShutterClick = (_e) => { - console.debug('shutter click'); - this.capture(); - }; - this.handleRotateClick = (_e) => { - this.rotate(); - }; - this.handleClose = (_e) => { - this.handlePhoto && this.handlePhoto(null); - }; - this.handleFlashClick = (_e) => { - this.cycleFlash(); - }; - this.handleCancelPhoto = (_e) => { - const track = this.stream && this.stream.getTracks()[0]; - let c = track && track.getConstraints(); - this.photo = null; - this.photoSrc = null; - if (c) { - this.initCamera({ - video: { - facingMode: c.facingMode - } - }); - } - else { - this.initCamera(); - } - }; - this.handleAcceptPhoto = (_e) => { - this.handlePhoto && this.handlePhoto(this.photo); - }; - this.handleFileInputChange = async (e) => { - const input = e.target; - const file = input.files[0]; - try { - const orientation = await this.getOrientation(file); - console.debug('Got orientation', orientation); - this.photoOrientation = orientation; - } - catch (e) { - } - this.handlePhoto && this.handlePhoto(file); - }; - this.handleVideoMetadata = (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; - } - async componentDidLoad() { - if (Build.isServer) { - return; - } - this.defaultConstraints = { - video: { - facingMode: this.facingMode - } - }; - // Figure out how many cameras we have - await this.queryDevices(); - // Initialize the camera - await this.initCamera(); - } - disconnectedCallback() { - this.stopStream(); - this.photoSrc && URL.revokeObjectURL(this.photoSrc); - } - hasImageCapture() { - return 'ImageCapture' in window; - } - /** - * Query the list of connected devices and figure out how many video inputs we have. - */ - async queryDevices() { - try { - const devices = await navigator.mediaDevices.enumerateDevices(); - const videoDevices = devices.filter(d => d.kind == 'videoinput'); - this.hasCamera = !!videoDevices.length; - this.hasMultipleCameras = videoDevices.length > 1; - } - catch (e) { - this.deviceError = e; - } - } - async initCamera(constraints) { - if (!constraints) { - constraints = this.defaultConstraints; - } - try { - const stream = await navigator.mediaDevices.getUserMedia(Object.assign({ video: true, audio: false }, constraints)); - this.initStream(stream); - } - catch (e) { - this.deviceError = e; - this.handleNoDeviceError && this.handleNoDeviceError(e); - } - } - async initStream(stream) { - this.stream = stream; - this.videoElement.srcObject = stream; - if (this.hasImageCapture()) { - this.imageCapture = new window.ImageCapture(stream.getVideoTracks()[0]); - await this.initPhotoCapabilities(this.imageCapture); - } - else { - this.deviceError = 'No image capture'; - this.handleNoDeviceError && this.handleNoDeviceError(); - } - // Always re-render - forceUpdate(this.el); - } - async initPhotoCapabilities(imageCapture) { - const c = await imageCapture.getPhotoCapabilities(); - if (c.fillLightMode && c.fillLightMode.length > 1) { - this.flashModes = c.fillLightMode.map(m => 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; - } - } - } - stopStream() { - if (this.videoElement) { - this.videoElement.srcObject = null; - } - this.stream && this.stream.getTracks().forEach(track => track.stop()); - } - async capture() { - if (this.hasImageCapture()) { - try { - const photo = await this.imageCapture.takePhoto({ - fillLightMode: this.flashModes.length > 1 ? this.flashMode : undefined - }); - await this.flashScreen(); - this.promptAccept(photo); - } - catch (e) { - console.error('Unable to take photo!', e); - } - } - this.stopStream(); - } - async promptAccept(photo) { - this.photo = photo; - const orientation = await this.getOrientation(photo); - console.debug('Got orientation', orientation); - this.photoOrientation = orientation; - if (orientation) { - switch (orientation) { - 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(photo); - } - getOrientation(file) { - return new Promise(resolve => { - const reader = new FileReader(); - reader.onload = (event) => { - const view = new DataView(event.target.result); - if (view.getUint16(0, false) !== 0xFFD8) { - return resolve(-2); - } - const length = view.byteLength; - let offset = 2; - while (offset < length) { - const marker = view.getUint16(offset, false); - offset += 2; - if (marker === 0xFFE1) { - if (view.getUint32(offset += 2, false) !== 0x45786966) { - return resolve(-1); - } - const little = view.getUint16(offset += 6, false) === 0x4949; - offset += view.getUint32(offset + 4, little); - const tags = view.getUint16(offset, little); - offset += 2; - for (let 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)); - }); - } - rotate() { - this.stopStream(); - const track = this.stream && this.stream.getTracks()[0]; - if (!track) { - return; - } - let c = track.getConstraints(); - let facingMode = c.facingMode; - if (!facingMode) { - let c = track.getCapabilities(); - if (c.facingMode) { - facingMode = c.facingMode[0]; - } - } - if (facingMode === 'environment') { - this.initCamera({ - video: { - facingMode: 'user' - } - }); - } - else { - this.initCamera({ - video: { - facingMode: 'environment' - } - }); - } - } - setFlashMode(mode) { - console.debug('New flash mode: ', mode); - this.flashMode = mode; - } - cycleFlash() { - if (this.flashModes.length > 0) { - this.flashIndex = (this.flashIndex + 1) % this.flashModes.length; - this.setFlashMode(this.flashModes[this.flashIndex]); - } - } - async flashScreen() { - return new Promise((resolve, _reject) => { - this.showShutterOverlay = true; - setTimeout(() => { - this.showShutterOverlay = false; - resolve(); - }, 100); - }); - } - 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`; - } - 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' }))); - } - 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`; - } - 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`; - } - 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`; - } - 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`; - } - 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`; - } - 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`; - } - render() { - // const acceptStyles = { transform: `rotate(${-this.rotation}deg)` }; - const acceptStyles = {}; - return (h("div", { class: "camera-wrapper" }, h("div", { class: "camera-header" }, h("section", { class: "items" }, h("div", { class: "item close", onClick: e => this.handleClose(e) }, h("img", { src: this.iconExit() })), h("div", { class: "item flash", onClick: e => this.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(${this.photoSrc})` }, acceptStyles) }))) : (h("div", { class: "camera-video" }, this.showShutterOverlay && (h("div", { class: "shutter-overlay" })), this.hasImageCapture() ? (h("video", { ref: (el) => this.videoElement = el, onLoadedMetaData: this.handleVideoMetadata, autoplay: true, playsinline: true })) : (h("canvas", { ref: (el) => this.canvasElement = el, width: "100%", height: "100%" })), h("canvas", { class: "offscreen-image-render", ref: e => this.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: e => this.handleCancelPhoto(e) }, h("img", { src: this.iconRetake() })), h("div", { class: "item accept-use", onClick: e => this.handleAcceptPhoto(e) }, h("img", { src: this.iconConfirm() })))))))); - } - static get is() { return "pwa-camera"; } - static get encapsulation() { return "shadow"; } - static get originalStyleUrls() { - return { - "$": ["camera.css"] - }; - } - static get styleUrls() { - return { - "$": ["camera.css"] - }; - } - static get assetsDirs() { return ["icons"]; } - static get properties() { - 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'" - } - }; - } - static get states() { - return { - "photo": {}, - "photoSrc": {}, - "showShutterOverlay": {}, - "flashIndex": {}, - "hasCamera": {}, - "rotation": {}, - "deviceError": {} - }; - } - static get elementRef() { return "el"; } -} diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/confirm.svg b/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/confirm.svg deleted file mode 100644 index 1213fd9..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/confirm.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/exit.svg b/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/exit.svg deleted file mode 100644 index be96592..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/exit.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/flash-auto.svg b/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/flash-auto.svg deleted file mode 100644 index c388e86..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/flash-auto.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/flash-off.svg b/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/flash-off.svg deleted file mode 100644 index 98b2599..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/flash-off.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/flash-on.svg b/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/flash-on.svg deleted file mode 100644 index e045c08..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/flash-on.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/retake.svg b/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/retake.svg deleted file mode 100644 index 04fc2a0..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/retake.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/reverse-camera.svg b/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/reverse-camera.svg deleted file mode 100644 index ec09076..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/icons/reverse-camera.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/imagecapture.js b/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/imagecapture.js deleted file mode 100644 index dfb6cba..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/camera/imagecapture.js +++ /dev/null @@ -1,155 +0,0 @@ -/** - * 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 let ImageCapture = window.ImageCapture; -if (typeof ImageCapture === 'undefined') { - ImageCapture = class { - /** - * TODO https://www.w3.org/TR/image-capture/#constructors - * - * @param {MediaStreamTrack} videoStreamTrack - A MediaStreamTrack of the 'video' kind - */ - constructor(videoStreamTrack) { - 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(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 - */ - get videoStreamTrack() { - return this._videoStreamTrack; - } - /** - * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-getphotocapabilities - * @return {Promise} Fulfilled promise with - * [PhotoCapabilities](https://www.w3.org/TR/image-capture/#idl-def-photocapabilities) - * object on success, rejected promise on failure - */ - getPhotoCapabilities() { - return new Promise(function executorGPC(resolve, reject) { - // TODO see https://github.com/w3c/mediacapture-image/issues/97 - const 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} Fulfilled promise on success, rejected promise on failure - */ - setOptions(_photoSettings = {}) { - return new Promise(function executorSO(_resolve, _reject) { - // TODO - }); - } - /** - * TODO - * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-takephoto - * @return {Promise} Fulfilled promise with [Blob](https://www.w3.org/TR/FileAPI/#blob) - * argument on success; rejected promise on failure - */ - takePhoto() { - const 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(() => { - 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} Fulfilled promise with - * [ImageBitmap](https://www.w3.org/TR/html51/webappapis.html#webappapis-images) - * argument on success; rejected promise on failure - */ - grabFrame() { - const 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(() => { - 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; diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/toast/toast.css b/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/toast/toast.css deleted file mode 100644 index 180ec87..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/toast/toast.css +++ /dev/null @@ -1,37 +0,0 @@ -: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/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/toast/toast.js b/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/toast/toast.js deleted file mode 100644 index 3dc57b7..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/collection/components/toast/toast.js +++ /dev/null @@ -1,93 +0,0 @@ -import { h } from '@stencil/core'; -export class PWAToast { - constructor() { - this.message = undefined; - this.duration = 2000; - this.closing = null; - } - hostData() { - const classes = { - out: !!this.closing - }; - if (this.closing !== null) { - classes['in'] = !this.closing; - } - return { - class: classes - }; - } - componentDidLoad() { - setTimeout(() => { - this.closing = false; - }); - setTimeout(() => { - this.close(); - }, this.duration); - } - close() { - this.closing = true; - setTimeout(() => { - this.el.parentNode.removeChild(this.el); - }, 1000); - } - render() { - return (h("div", { class: "wrapper" }, h("div", { class: "toast" }, this.message))); - } - static get is() { return "pwa-toast"; } - static get encapsulation() { return "shadow"; } - static get originalStyleUrls() { - return { - "$": ["toast.css"] - }; - } - static get styleUrls() { - return { - "$": ["toast.css"] - }; - } - static get properties() { - 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" - } - }; - } - static get states() { - return { - "closing": {} - }; - } - static get elementRef() { return "el"; } -} diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/collection/definitions.js b/frontend/node_modules/@ionic/pwa-elements/dist/collection/definitions.js deleted file mode 100644 index cb0ff5c..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/collection/definitions.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/collection/index.js b/frontend/node_modules/@ionic/pwa-elements/dist/collection/index.js deleted file mode 100644 index 07635cb..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/collection/index.js +++ /dev/null @@ -1 +0,0 @@ -export * from './components'; diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/index-1c5c47b4.js b/frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/index-1c5c47b4.js deleted file mode 100644 index 6f5cdf8..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/index-1c5c47b4.js +++ /dev/null @@ -1 +0,0 @@ -var __extends=this&&this.__extends||function(){var e=function(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(){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]0){c.$children$=i}return c};var newVNode=function(e,t){var n={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};{n.$attrs$=null}return n};var Host={};var isHost=function(e){return e&&e.$tag$===Host};var parsePropertyValue=function(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(e){return getHostRef(e).$hostElement$};var createEvent=function(e,t,n){var r=getElement(e);return{emit:function(e){return emitEvent(r,t,{bubbles:!!(n&4),composed:!!(n&2),cancelable:!!(n&1),detail:e})}}};var emitEvent=function(e,t,n){var r=plt.ce(t,n);e.dispatchEvent(r);return r};var rootAppliedStyles=new WeakMap;var registerStyle=function(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(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(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(e,t){return"sc-"+e.$tagName$};var setAccessor=function(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(e){return!e?[]:e.split(parseClassListRegex)};var updateElement=function(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(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;os){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(e,t){if(e.$tag$===t.$tag$){return true}return false};var patch=function(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(e){{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null);e.$children$&&e.$children$.map(nullifyVNodeRefs)}};var renderVdom=function(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(e,t){if(t&&!e.$onRenderResolve$&&t["s-p"]){t["s-p"].push(new Promise((function(t){return e.$onRenderResolve$=t})))}};var scheduleUpdate=function(e,t){{e.$flags$|=16}if(e.$flags$&4){e.$flags$|=512;return}attachToAncestor(e,e.$ancestorComponent$);var n=function(){return dispatchHooks(e,t)};return writeTask(n)};var dispatchHooks=function(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(e,t){return isPromisey(e)?e.then(t):t()};var isPromisey=function(e){return e instanceof Promise||e&&e.then&&typeof e.then==="function"};var updateComponent=function(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(){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(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(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(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(e){{addHydratedFlag(doc.documentElement)}nextTick((function(){return emitEvent(win,"appload",{detail:{namespace:NAMESPACE}})}))};var safeCall=function(e,t,n){if(e&&e[t]){try{return e[t](n)}catch(e){consoleError(e)}}return undefined};var addHydratedFlag=function(e){return e.classList.add("hydrated")};var getValue=function(e,t){return getHostRef(e).$instanceValues$.get(t)};var setValue=function(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(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(){return getValue(this,r)},set:function(e){setValue(this,r,e,t)},configurable:true,enumerable:true})}else if(n&1&&o&64){Object.defineProperty(a,r,{value:function(){var e=[];for(var t=0;t0){plt.raf(flush)}}};var nextTick=function(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/frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/index.js b/frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/index.js deleted file mode 100644 index e69de29..0000000 diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/ionicpwaelements.js b/frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/ionicpwaelements.js deleted file mode 100644 index a1b8a72..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/ionicpwaelements.js +++ /dev/null @@ -1 +0,0 @@ -import{p as promiseResolve,b as bootstrapLazy}from"./index-1c5c47b4.js";export{s as setNonce}from"./index-1c5c47b4.js";var patchBrowser=function(){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/frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/loader.js b/frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/loader.js deleted file mode 100644 index 89fde8d..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/loader.js +++ /dev/null @@ -1 +0,0 @@ -import{p as promiseResolve,b as bootstrapLazy}from"./index-1c5c47b4.js";export{s as setNonce}from"./index-1c5c47b4.js";var patchEsm=function(){return promiseResolve()};var defineCustomElements=function(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/frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/pwa-action-sheet.entry.js b/frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/pwa-action-sheet.entry.js deleted file mode 100644 index 36f6d26..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/pwa-action-sheet.entry.js +++ /dev/null @@ -1 +0,0 @@ -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(){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(t){return e.handleOptionClick(t,n)}},h("div",{class:"action-sheet-button"},t.title))}))))};Object.defineProperty(e.prototype,"el",{get:function(){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/frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/pwa-camera-modal-instance.entry.js b/frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/pwa-camera-modal-instance.entry.js deleted file mode 100644 index a1746cf..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/pwa-camera-modal-instance.entry.js +++ /dev/null @@ -1 +0,0 @@ -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(){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]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]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]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(r0){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(t){return e.handleClose(t)}},h("img",{src:this.iconExit()})),h("div",{class:"item flash",onClick:function(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(t){return e.videoElement=t},onLoadedMetaData:this.handleVideoMetadata,autoplay:true,playsinline:true}):h("canvas",{ref:function(t){return e.canvasElement=t},width:"100%",height:"100%"}),h("canvas",{class:"offscreen-image-render",ref:function(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(t){return e.handleCancelPhoto(t)}},h("img",{src:this.iconRetake()})),h("div",{class:"item accept-use",onClick:function(t){return e.handleAcceptPhoto(t)}},h("img",{src:this.iconConfirm()})))))};Object.defineProperty(e,"assetsDirs",{get:function(){return["icons"]},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){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/frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/pwa-toast.entry.js b/frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/pwa-toast.entry.js deleted file mode 100644 index 2b8e239..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/esm-es5/pwa-toast.entry.js +++ /dev/null @@ -1 +0,0 @@ -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(){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/frontend/node_modules/@ionic/pwa-elements/dist/esm/index-1c5c47b4.js b/frontend/node_modules/@ionic/pwa-elements/dist/esm/index-1c5c47b4.js deleted file mode 100644 index 14e6a7f..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/esm/index-1c5c47b4.js +++ /dev/null @@ -1,1636 +0,0 @@ -const 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 - */ -let scopeId; -let hostTagName; -let isSvgMode = false; -let queuePending = false; -const createTime = (fnName, tagName = '') => { - { - return () => { - return; - }; - } -}; -const uniqueTime = (key, measureText) => { - { - return () => { - return; - }; - } -}; -const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}'; -/** - * Default style mode id - */ -/** - * Reusable empty obj/array - * Don't add values to these!! - */ -const EMPTY_OBJ = {}; -/** - * Namespaces - */ -const SVG_NS = 'http://www.w3.org/2000/svg'; -const HTML_NS = 'http://www.w3.org/1999/xhtml'; -const isDef = (v) => 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 - */ -const 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; -const h = (nodeName, vnodeData, ...children) => { - let child = null; - let simple = false; - let lastSimple = false; - const vNodeChildren = []; - const walk = (c) => { - for (let 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; - } - } - }; - walk(children); - if (vnodeData) { - { - const classData = vnodeData.className || vnodeData.class; - if (classData) { - vnodeData.class = - typeof classData !== 'object' - ? classData - : Object.keys(classData) - .filter((k) => classData[k]) - .join(' '); - } - } - } - const 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 - */ -const newVNode = (tag, text) => { - const vnode = { - $flags$: 0, - $tag$: tag, - $text$: text, - $elm$: null, - $children$: null, - }; - { - vnode.$attrs$ = null; - } - return vnode; -}; -const 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 - */ -const isHost = (node) => 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 - * - * ``` - * - * 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 - */ -const 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; -}; -const getElement = (ref) => (getHostRef(ref).$hostElement$ ); -const createEvent = (ref, name, flags) => { - const elm = getElement(ref); - return { - 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, - }); - }, - }; -}; -/** - * 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 - */ -const emitEvent = (elm, name, opts) => { - const ev = plt.ce(name, opts); - elm.dispatchEvent(ev); - return ev; -}; -const rootAppliedStyles = /*@__PURE__*/ new WeakMap(); -const registerStyle = (scopeId, cssText, allowCS) => { - let 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); -}; -const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => { - var _a; - let scopeId = getScopeId(cmpMeta); - const 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; - let appliedStyles = rootAppliedStyles.get(styleContainerNode); - let 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 - const 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 = [...styleContainerNode.adoptedStyleSheets, style]; - } - } - return scopeId; -}; -const attachStyles = (hostRef) => { - const cmpMeta = hostRef.$cmpMeta$; - const elm = hostRef.$hostElement$; - const flags = cmpMeta.$flags$; - const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$); - const 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(); -}; -const getScopeId = (cmp, mode) => '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 - */ -const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => { - if (oldValue !== newValue) { - let isProp = isMemberInElement(elm, memberName); - let ln = memberName.toLowerCase(); - if (memberName === 'class') { - const classList = elm.classList; - const oldClasses = parseClassList(oldValue); - const newClasses = parseClassList(newValue); - classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c))); - classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c))); - } - else if (memberName === 'style') { - // update style attribute, css properties and values - { - for (const prop in oldValue) { - if (!newValue || newValue[prop] == null) { - if (prop.includes('-')) { - elm.style.removeProperty(prop); - } - else { - elm.style[prop] = ''; - } - } - } - } - for (const 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: - // // listens for "click" - // // listens for "Click" - // // listens for "ionChange" - // // 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 - const isComplex = isComplexType(newValue); - if ((isProp || (isComplex && newValue !== null)) && !isSvg) { - try { - if (!elm.tagName.includes('-')) { - const n = newValue == null ? '' : newValue; - // Workaround for Safari, moving the 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); - } - } - } - } -}; -const parseClassListRegex = /\s/; -const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex)); -const 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 - const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host - ? newVnode.$elm$.host - : newVnode.$elm$; - const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ; - const 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 - */ -const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => { - // tslint:disable-next-line: prefer-const - const newVNode = newParentVNode.$children$[childIndex]; - let i = 0; - let elm; - let 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 element - isSvgMode = false; - } - else if (elm.tagName === 'foreignObject') { - // Reenter SVG context when we're exiting 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) - */ -const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => { - let containerElm = (parentElm); - let 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) - */ -const removeVnodes = (vnodes, startIdx, endIdx) => { - for (let index = startIdx; index <= endIdx; ++index) { - const vnode = vnodes[index]; - if (vnode) { - const 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: `

HEY

` - * newVNode: `

THERE

` - * - * Then when comparing the children of the `
` tag we check the equality - * of the VNodes corresponding to the `

` 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: `

` - * newVNode: `
` - * - * 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 - */ -const updateChildren = (parentElm, oldCh, newVNode, newCh) => { - let oldStartIdx = 0; - let newStartIdx = 0; - let oldEndIdx = oldCh.length - 1; - let oldStartVnode = oldCh[0]; - let oldEndVnode = oldCh[oldEndIdx]; - let newEndIdx = newCh.length - 1; - let newStartVnode = newCh[0]; - let newEndVnode = newCh[newEndIdx]; - let 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: - // - // - // - // - // - // - // - // ``` - // 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(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes - .map(([propName, m]) => { - const attrName = m[1] || propName; - attrNameToPropName.set(attrName, propName); - return attrName; - }); - } - } - return Cstr; -}; -const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => { - // initializeComponent - if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) { - // 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) { - // Await creates a micro-task avoid if possible - const endLoad = uniqueTime(); - Cstr = await Cstr; - endLoad(); - } - if (!Cstr.isProxied) { - proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */); - Cstr.isProxied = true; - } - const 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 - let style = Cstr.style; - const scopeId = getScopeId(cmpMeta); - if (!styles.has(scopeId)) { - const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$); - registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */)); - endRegisterStyles(); - } - } - } - // we've successfully created a lazy instance - const ancestorComponent = hostRef.$ancestorComponent$; - const schedule = () => 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(); - } -}; -const connectedCallback = (elm) => { - if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) { - const hostRef = getHostRef(elm); - const cmpMeta = hostRef.$cmpMeta$; - const 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 - let 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(([memberName, [memberFlags]]) => { - if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) { - const 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(); - } -}; -const disconnectedCallback = (elm) => { - if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) { - const hostRef = getHostRef(elm); - const instance = hostRef.$lazyInstance$ ; - { - if (hostRef.$rmListeners$) { - hostRef.$rmListeners$.map((rmListener) => rmListener()); - hostRef.$rmListeners$ = undefined; - } - } - { - safeCall(instance, 'disconnectedCallback'); - } - } -}; -const bootstrapLazy = (lazyBundles, options = {}) => { - var _a; - const endBootstrap = createTime(); - const cmpTags = []; - const exclude = options.exclude || []; - const customElements = win.customElements; - const head = doc.head; - const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]'); - const visibilityStyle = /*@__PURE__*/ doc.createElement('style'); - const deferredConnectedCallbacks = []; - let appLoadFallback; - let isBootstrapping = true; - Object.assign(plt, options); - plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href; - lazyBundles.map((lazyBundle) => { - lazyBundle[1].map((compactMeta) => { - const cmpMeta = { - $flags$: compactMeta[0], - $tagName$: compactMeta[1], - $members$: compactMeta[2], - $listeners$: compactMeta[3], - }; - { - cmpMeta.$members$ = compactMeta[2]; - } - { - cmpMeta.$listeners$ = compactMeta[3]; - } - const tagName = cmpMeta.$tagName$; - const HostElement = class extends HTMLElement { - // StencilLazyHost - constructor(self) { - // @ts-ignore - super(self); - self = this; - 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' }); - } - } - } - } - connectedCallback() { - if (appLoadFallback) { - clearTimeout(appLoadFallback); - appLoadFallback = null; - } - if (isBootstrapping) { - // connectedCallback will be processed once all components have been registered - deferredConnectedCallbacks.push(this); - } - else { - plt.jmp(() => connectedCallback(this)); - } - } - disconnectedCallback() { - plt.jmp(() => disconnectedCallback(this)); - } - componentOnReady() { - return getHostRef(this).$onReadyPromise$; - } - }; - 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 - const 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((host) => host.connectedCallback()); - } - else { - { - plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30))); - } - } - // Fallback appLoad event - endBootstrap(); -}; -const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => { - if (listeners) { - listeners.map(([flags, name, method]) => { - const target = getHostListenerTarget(elm, flags) ; - const handler = hostListenerProxy(hostRef, method); - const opts = hostListenerOpts(flags); - plt.ael(target, name, handler, opts); - (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts)); - }); - } -}; -const hostListenerProxy = (hostRef, methodName) => (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); - } -}; -const getHostListenerTarget = (elm, flags) => { - if (flags & 16 /* LISTENER_FLAGS.TargetBody */) - return doc.body; - return elm; -}; -// prettier-ignore -const hostListenerOpts = (flags) => (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 - */ -const setNonce = (nonce) => (plt.$nonce$ = nonce); -const hostRefs = /*@__PURE__*/ new WeakMap(); -const getHostRef = (ref) => hostRefs.get(ref); -const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef); -const registerHost = (elm, cmpMeta) => { - const hostRef = { - $flags$: 0, - $hostElement$: elm, - $cmpMeta$: cmpMeta, - $instanceValues$: new Map(), - }; - { - hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r)); - } - { - hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r)); - elm['s-p'] = []; - elm['s-rc'] = []; - } - addHostEventListeners(elm, hostRef, cmpMeta.$listeners$); - return hostRefs.set(elm, hostRef); -}; -const isMemberInElement = (elm, memberName) => memberName in elm; -const consoleError = (e, el) => (0, console.error)(e, el); -const cmpModules = /*@__PURE__*/ new Map(); -const loadModule = (cmpMeta, hostRef, hmrVersionId) => { - // loadModuleImport - const exportName = cmpMeta.$tagName$.replace(/-/g, '_'); - const bundleId = cmpMeta.$lazyBundleId$; - const module = cmpModules.get(bundleId) ; - if (module) { - return module[exportName]; - } - - if (!hmrVersionId || !BUILD.hotModuleReplacement) { - const 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" */ - `./${bundleId}.entry.js${''}`).then((importedModule) => { - { - cmpModules.set(bundleId, importedModule); - } - return importedModule[exportName]; - }, consoleError); -}; -const styles = /*@__PURE__*/ new Map(); -const win = typeof window !== 'undefined' ? window : {}; -const doc = win.document || { head: {} }; -const plt = { - $flags$: 0, - $resourcesUrl$: '', - jmp: (h) => h(), - raf: (h) => requestAnimationFrame(h), - ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts), - rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts), - ce: (eventName, opts) => new CustomEvent(eventName, opts), -}; -const promiseResolve = (v) => Promise.resolve(v); -const supportsConstructableStylesheets = /*@__PURE__*/ (() => { - try { - new CSSStyleSheet(); - return typeof new CSSStyleSheet().replaceSync === 'function'; - } - catch (e) { } - return false; - })() - ; -const queueDomReads = []; -const queueDomWrites = []; -const queueTask = (queue, write) => (cb) => { - queue.push(cb); - if (!queuePending) { - queuePending = true; - if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) { - nextTick(flush); - } - else { - plt.raf(flush); - } - } -}; -const consume = (queue) => { - for (let i = 0; i < queue.length; i++) { - try { - queue[i](performance.now()); - } - catch (e) { - consoleError(e); - } - } - queue.length = 0; -}; -const 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); - } - } -}; -const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb); -const 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 }; diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/esm/index.js b/frontend/node_modules/@ionic/pwa-elements/dist/esm/index.js deleted file mode 100644 index 8b13789..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/esm/index.js +++ /dev/null @@ -1 +0,0 @@ - diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/esm/ionicpwaelements.js b/frontend/node_modules/@ionic/pwa-elements/dist/esm/ionicpwaelements.js deleted file mode 100644 index e189a23..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/esm/ionicpwaelements.js +++ /dev/null @@ -1,21 +0,0 @@ -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 - */ -const patchBrowser = () => { - const importMeta = import.meta.url; - const 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(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); -}); diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/esm/loader.js b/frontend/node_modules/@ionic/pwa-elements/dist/esm/loader.js deleted file mode 100644 index 608f50d..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/esm/loader.js +++ /dev/null @@ -1,18 +0,0 @@ -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 - */ -const patchEsm = () => { - return promiseResolve(); -}; - -const defineCustomElements = (win, options) => { - if (typeof window === 'undefined') return Promise.resolve(); - return patchEsm().then(() => { - 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 }; diff --git a/frontend/node_modules/@ionic/pwa-elements/dist/esm/polyfills/core-js.js b/frontend/node_modules/@ionic/pwa-elements/dist/esm/polyfills/core-js.js deleted file mode 100644 index 7bbc909..0000000 --- a/frontend/node_modules/@ionic/pwa-elements/dist/esm/polyfills/core-js.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * 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(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(t){var n,e,r,o,i,a=u(this),l=s(a,0),p=0;for(n=-1,r=arguments.length;n9007199254740991)throw TypeError("Maximum allowed index exceeded");for(e=0;e=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(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(){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(){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(t,n){return y.call(v,t,n),n},o=function(t){return g.call(v,t)||{}},i=function(t){return d.call(v,t)}}else{var x=l("state");p[x]=!0,r=function(t,n){return f(t,x,n),n},o=function(t){return s(t,x)?t[x]:{}},i=function(t){return s(t,x)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(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;fc;)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(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(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(f0;)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(){},h=function(t){return"