From 0152518696b1cae80a771644bfdccf3c98d33cbe Mon Sep 17 00:00:00 2001 From: Niklas Gruhn Date: Sun, 19 Jul 2020 15:18:44 +0200 Subject: [PATCH] docs: include docs in master branch --- .travis.yml | 8 + demos/Demo.vue | 68 - demos/index.js | 11 - docs/.vuepress/components/DemoWrapper.vue | 54 + .../components/demos/CustomTracking.vue | 100 + docs/.vuepress/components/demos/DecodeAll.vue | 58 + docs/.vuepress/components/demos/DragDrop.vue | 80 + docs/.vuepress/components/demos/Fallback.vue | 47 + .../.vuepress/components/demos/Fullscreen.vue | 115 + .../components/demos/LoadingIndicator.vue | 61 + .../components/demos/SwitchCamera.vue | 82 + docs/.vuepress/components/demos/Torch.vue | 64 + docs/.vuepress/components/demos/Upload.vue | 28 + docs/.vuepress/components/demos/Validate.vue | 118 + docs/.vuepress/config.js | 41 + docs/.vuepress/dist/404.html | 19 + docs/.vuepress/dist/api/QrcodeCapture.html | 72 + docs/.vuepress/dist/api/QrcodeDropZone.html | 93 + docs/.vuepress/dist/api/QrcodeStream.html | 176 ++ docs/.vuepress/dist/api/index.html | 29 + .../dist/assets/css/0.styles.7c500507.css | 1 + .../dist/assets/img/search.83621669.svg | 1 + docs/.vuepress/dist/assets/js/1.0988ae21.js | 1 + docs/.vuepress/dist/assets/js/10.fa2c1a72.js | 1 + docs/.vuepress/dist/assets/js/11.112a7f99.js | 1 + docs/.vuepress/dist/assets/js/12.8152fef2.js | 1 + docs/.vuepress/dist/assets/js/13.9f4eed03.js | 1 + docs/.vuepress/dist/assets/js/14.f2097559.js | 1 + docs/.vuepress/dist/assets/js/15.5c95ecde.js | 1 + docs/.vuepress/dist/assets/js/16.2af95416.js | 1 + docs/.vuepress/dist/assets/js/17.d888f8ec.js | 1 + docs/.vuepress/dist/assets/js/18.22bea4c6.js | 1 + docs/.vuepress/dist/assets/js/19.0d3a33dd.js | 1 + docs/.vuepress/dist/assets/js/2.9a6316b6.js | 1 + docs/.vuepress/dist/assets/js/20.cf251e7a.js | 1 + docs/.vuepress/dist/assets/js/21.6a220a62.js | 1 + docs/.vuepress/dist/assets/js/22.b0d9e2e8.js | 1 + docs/.vuepress/dist/assets/js/23.bdb0e1be.js | 1 + docs/.vuepress/dist/assets/js/24.f67dd732.js | 1 + docs/.vuepress/dist/assets/js/25.2ab6abbf.js | 1 + docs/.vuepress/dist/assets/js/26.8cb58252.js | 1 + docs/.vuepress/dist/assets/js/27.e9e323ea.js | 1 + docs/.vuepress/dist/assets/js/28.5974f8d5.js | 1 + docs/.vuepress/dist/assets/js/29.e5ba1ad3.js | 1 + docs/.vuepress/dist/assets/js/30.64bce4f2.js | 1 + docs/.vuepress/dist/assets/js/31.2bf05fbc.js | 1 + docs/.vuepress/dist/assets/js/32.0659e1f9.js | 1 + docs/.vuepress/dist/assets/js/33.bd147296.js | 1 + docs/.vuepress/dist/assets/js/34.e6383e68.js | 1 + docs/.vuepress/dist/assets/js/35.2c0d47f6.js | 1 + docs/.vuepress/dist/assets/js/4.4a03c7db.js | 1 + docs/.vuepress/dist/assets/js/5.b5d9a75a.js | 1 + docs/.vuepress/dist/assets/js/6.345faa18.js | 1 + docs/.vuepress/dist/assets/js/7.1ee96706.js | 1 + docs/.vuepress/dist/assets/js/8.05a3d033.js | 1 + docs/.vuepress/dist/assets/js/9.5d740816.js | 1 + docs/.vuepress/dist/assets/js/app.bccf8f60.js | 8 + docs/.vuepress/dist/camera-switch.svg | 1 + docs/.vuepress/dist/demos/CustomTracking.html | 140 ++ docs/.vuepress/dist/demos/DecodeAll.html | 96 + docs/.vuepress/dist/demos/DragDrop.html | 119 ++ docs/.vuepress/dist/demos/Fallback.html | 82 + docs/.vuepress/dist/demos/Fullscreen.html | 154 ++ .../dist/demos/LoadingIndicator.html | 99 + docs/.vuepress/dist/demos/Simple.html | 34 + docs/.vuepress/dist/demos/SwitchCamera.html | 120 ++ docs/.vuepress/dist/demos/Torch.html | 103 + docs/.vuepress/dist/demos/Upload.html | 68 + docs/.vuepress/dist/demos/Validate.html | 157 ++ docs/.vuepress/dist/demos/index.html | 29 + docs/.vuepress/dist/flash-off.svg | 1 + docs/.vuepress/dist/flash-on.svg | 1 + docs/.vuepress/dist/fullscreen-exit.svg | 1 + docs/.vuepress/dist/fullscreen.svg | 1 + docs/.vuepress/dist/index.html | 37 + docs/.vuepress/dist/logo.png | Bin 0 -> 22337 bytes docs/.vuepress/public/camera-switch.svg | 1 + docs/.vuepress/public/flash-off.svg | 1 + docs/.vuepress/public/flash-on.svg | 1 + docs/.vuepress/public/fullscreen-exit.svg | 1 + docs/.vuepress/public/fullscreen.svg | 1 + docs/.vuepress/public/logo.png | Bin 0 -> 22337 bytes docs/README.md | 7 + docs/api/QrcodeCapture.md | 85 + docs/api/QrcodeDropZone.md | 108 + docs/api/QrcodeStream.md | 282 +++ docs/api/README.md | 0 docs/demos/CustomTracking.md | 16 + docs/demos/DecodeAll.md | 12 + docs/demos/DragDrop.md | 13 + docs/demos/Fallback.md | 13 + docs/demos/Fullscreen.md | 13 + docs/demos/LoadingIndicator.md | 14 + docs/demos/README.md | 0 docs/demos/Simple.md | 8 + docs/demos/SwitchCamera.md | 12 + docs/demos/Torch.md | 15 + docs/demos/Upload.md | 16 + docs/demos/Validate.md | 13 + package-lock.json | 1900 ++++++++++++++++- package.json | 12 +- public/index.html | 13 - tests/e2e/.eslintrc.js | 10 - tests/e2e/plugins/index.js | 25 - tests/e2e/specs/test.js | 8 - tests/e2e/support/commands.js | 25 - tests/e2e/support/index.js | 20 - tests/unit/example.spec.js | 13 - 108 files changed, 5038 insertions(+), 231 deletions(-) delete mode 100644 demos/Demo.vue delete mode 100644 demos/index.js create mode 100644 docs/.vuepress/components/DemoWrapper.vue create mode 100644 docs/.vuepress/components/demos/CustomTracking.vue create mode 100644 docs/.vuepress/components/demos/DecodeAll.vue create mode 100644 docs/.vuepress/components/demos/DragDrop.vue create mode 100644 docs/.vuepress/components/demos/Fallback.vue create mode 100644 docs/.vuepress/components/demos/Fullscreen.vue create mode 100644 docs/.vuepress/components/demos/LoadingIndicator.vue create mode 100644 docs/.vuepress/components/demos/SwitchCamera.vue create mode 100644 docs/.vuepress/components/demos/Torch.vue create mode 100644 docs/.vuepress/components/demos/Upload.vue create mode 100644 docs/.vuepress/components/demos/Validate.vue create mode 100644 docs/.vuepress/config.js create mode 100644 docs/.vuepress/dist/404.html create mode 100644 docs/.vuepress/dist/api/QrcodeCapture.html create mode 100644 docs/.vuepress/dist/api/QrcodeDropZone.html create mode 100644 docs/.vuepress/dist/api/QrcodeStream.html create mode 100644 docs/.vuepress/dist/api/index.html create mode 100644 docs/.vuepress/dist/assets/css/0.styles.7c500507.css create mode 100644 docs/.vuepress/dist/assets/img/search.83621669.svg create mode 100644 docs/.vuepress/dist/assets/js/1.0988ae21.js create mode 100644 docs/.vuepress/dist/assets/js/10.fa2c1a72.js create mode 100644 docs/.vuepress/dist/assets/js/11.112a7f99.js create mode 100644 docs/.vuepress/dist/assets/js/12.8152fef2.js create mode 100644 docs/.vuepress/dist/assets/js/13.9f4eed03.js create mode 100644 docs/.vuepress/dist/assets/js/14.f2097559.js create mode 100644 docs/.vuepress/dist/assets/js/15.5c95ecde.js create mode 100644 docs/.vuepress/dist/assets/js/16.2af95416.js create mode 100644 docs/.vuepress/dist/assets/js/17.d888f8ec.js create mode 100644 docs/.vuepress/dist/assets/js/18.22bea4c6.js create mode 100644 docs/.vuepress/dist/assets/js/19.0d3a33dd.js create mode 100644 docs/.vuepress/dist/assets/js/2.9a6316b6.js create mode 100644 docs/.vuepress/dist/assets/js/20.cf251e7a.js create mode 100644 docs/.vuepress/dist/assets/js/21.6a220a62.js create mode 100644 docs/.vuepress/dist/assets/js/22.b0d9e2e8.js create mode 100644 docs/.vuepress/dist/assets/js/23.bdb0e1be.js create mode 100644 docs/.vuepress/dist/assets/js/24.f67dd732.js create mode 100644 docs/.vuepress/dist/assets/js/25.2ab6abbf.js create mode 100644 docs/.vuepress/dist/assets/js/26.8cb58252.js create mode 100644 docs/.vuepress/dist/assets/js/27.e9e323ea.js create mode 100644 docs/.vuepress/dist/assets/js/28.5974f8d5.js create mode 100644 docs/.vuepress/dist/assets/js/29.e5ba1ad3.js create mode 100644 docs/.vuepress/dist/assets/js/30.64bce4f2.js create mode 100644 docs/.vuepress/dist/assets/js/31.2bf05fbc.js create mode 100644 docs/.vuepress/dist/assets/js/32.0659e1f9.js create mode 100644 docs/.vuepress/dist/assets/js/33.bd147296.js create mode 100644 docs/.vuepress/dist/assets/js/34.e6383e68.js create mode 100644 docs/.vuepress/dist/assets/js/35.2c0d47f6.js create mode 100644 docs/.vuepress/dist/assets/js/4.4a03c7db.js create mode 100644 docs/.vuepress/dist/assets/js/5.b5d9a75a.js create mode 100644 docs/.vuepress/dist/assets/js/6.345faa18.js create mode 100644 docs/.vuepress/dist/assets/js/7.1ee96706.js create mode 100644 docs/.vuepress/dist/assets/js/8.05a3d033.js create mode 100644 docs/.vuepress/dist/assets/js/9.5d740816.js create mode 100644 docs/.vuepress/dist/assets/js/app.bccf8f60.js create mode 100644 docs/.vuepress/dist/camera-switch.svg create mode 100644 docs/.vuepress/dist/demos/CustomTracking.html create mode 100644 docs/.vuepress/dist/demos/DecodeAll.html create mode 100644 docs/.vuepress/dist/demos/DragDrop.html create mode 100644 docs/.vuepress/dist/demos/Fallback.html create mode 100644 docs/.vuepress/dist/demos/Fullscreen.html create mode 100644 docs/.vuepress/dist/demos/LoadingIndicator.html create mode 100644 docs/.vuepress/dist/demos/Simple.html create mode 100644 docs/.vuepress/dist/demos/SwitchCamera.html create mode 100644 docs/.vuepress/dist/demos/Torch.html create mode 100644 docs/.vuepress/dist/demos/Upload.html create mode 100644 docs/.vuepress/dist/demos/Validate.html create mode 100644 docs/.vuepress/dist/demos/index.html create mode 100644 docs/.vuepress/dist/flash-off.svg create mode 100644 docs/.vuepress/dist/flash-on.svg create mode 100644 docs/.vuepress/dist/fullscreen-exit.svg create mode 100644 docs/.vuepress/dist/fullscreen.svg create mode 100644 docs/.vuepress/dist/index.html create mode 100644 docs/.vuepress/dist/logo.png create mode 100644 docs/.vuepress/public/camera-switch.svg create mode 100644 docs/.vuepress/public/flash-off.svg create mode 100644 docs/.vuepress/public/flash-on.svg create mode 100644 docs/.vuepress/public/fullscreen-exit.svg create mode 100644 docs/.vuepress/public/fullscreen.svg create mode 100644 docs/.vuepress/public/logo.png create mode 100644 docs/README.md create mode 100644 docs/api/QrcodeCapture.md create mode 100644 docs/api/QrcodeDropZone.md create mode 100644 docs/api/QrcodeStream.md create mode 100644 docs/api/README.md create mode 100644 docs/demos/CustomTracking.md create mode 100644 docs/demos/DecodeAll.md create mode 100644 docs/demos/DragDrop.md create mode 100644 docs/demos/Fallback.md create mode 100644 docs/demos/Fullscreen.md create mode 100644 docs/demos/LoadingIndicator.md create mode 100644 docs/demos/README.md create mode 100644 docs/demos/Simple.md create mode 100644 docs/demos/SwitchCamera.md create mode 100644 docs/demos/Torch.md create mode 100644 docs/demos/Upload.md create mode 100644 docs/demos/Validate.md delete mode 100644 public/index.html delete mode 100644 tests/e2e/.eslintrc.js delete mode 100644 tests/e2e/plugins/index.js delete mode 100644 tests/e2e/specs/test.js delete mode 100644 tests/e2e/support/commands.js delete mode 100644 tests/e2e/support/index.js delete mode 100644 tests/unit/example.spec.js diff --git a/.travis.yml b/.travis.yml index d780a0be..02db55b5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ install: script: - npm run build + - npm run build:docs cache: npm @@ -17,3 +18,10 @@ deploy: condition: $TRAVIS_BRANCH =~ ^(master|alpha)$ script: - npx semantic-release + - provider: pages + skip_cleanup: true + keep_history: true + github_token: $GITHUB_TOKEN + on: + branch: master + local_dir: /docs/.vuepress/dist diff --git a/demos/Demo.vue b/demos/Demo.vue deleted file mode 100644 index a8b2a24e..00000000 --- a/demos/Demo.vue +++ /dev/null @@ -1,68 +0,0 @@ - - - diff --git a/demos/index.js b/demos/index.js deleted file mode 100644 index 9c155e58..00000000 --- a/demos/index.js +++ /dev/null @@ -1,11 +0,0 @@ -import Vue from 'vue' -import Demo from './Demo' - -Vue.config.productionTip = false - -/* eslint-disable no-new */ -new Vue({ - el: '#app', - render: h => h(Demo), - components: { Demo }, -}) diff --git a/docs/.vuepress/components/DemoWrapper.vue b/docs/.vuepress/components/DemoWrapper.vue new file mode 100644 index 00000000..79fba548 --- /dev/null +++ b/docs/.vuepress/components/DemoWrapper.vue @@ -0,0 +1,54 @@ + + + + + diff --git a/docs/.vuepress/components/demos/CustomTracking.vue b/docs/.vuepress/components/demos/CustomTracking.vue new file mode 100644 index 00000000..a6824032 --- /dev/null +++ b/docs/.vuepress/components/demos/CustomTracking.vue @@ -0,0 +1,100 @@ + + + diff --git a/docs/.vuepress/components/demos/DecodeAll.vue b/docs/.vuepress/components/demos/DecodeAll.vue new file mode 100644 index 00000000..45d9c2d7 --- /dev/null +++ b/docs/.vuepress/components/demos/DecodeAll.vue @@ -0,0 +1,58 @@ + + + + + diff --git a/docs/.vuepress/components/demos/DragDrop.vue b/docs/.vuepress/components/demos/DragDrop.vue new file mode 100644 index 00000000..73a6de4e --- /dev/null +++ b/docs/.vuepress/components/demos/DragDrop.vue @@ -0,0 +1,80 @@ + + + + + diff --git a/docs/.vuepress/components/demos/Fallback.vue b/docs/.vuepress/components/demos/Fallback.vue new file mode 100644 index 00000000..ad49538b --- /dev/null +++ b/docs/.vuepress/components/demos/Fallback.vue @@ -0,0 +1,47 @@ + + + diff --git a/docs/.vuepress/components/demos/Fullscreen.vue b/docs/.vuepress/components/demos/Fullscreen.vue new file mode 100644 index 00000000..f01c2ac2 --- /dev/null +++ b/docs/.vuepress/components/demos/Fullscreen.vue @@ -0,0 +1,115 @@ + + + + + diff --git a/docs/.vuepress/components/demos/LoadingIndicator.vue b/docs/.vuepress/components/demos/LoadingIndicator.vue new file mode 100644 index 00000000..ae5bfe52 --- /dev/null +++ b/docs/.vuepress/components/demos/LoadingIndicator.vue @@ -0,0 +1,61 @@ + + + + + diff --git a/docs/.vuepress/components/demos/SwitchCamera.vue b/docs/.vuepress/components/demos/SwitchCamera.vue new file mode 100644 index 00000000..8de0ea9d --- /dev/null +++ b/docs/.vuepress/components/demos/SwitchCamera.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/docs/.vuepress/components/demos/Torch.vue b/docs/.vuepress/components/demos/Torch.vue new file mode 100644 index 00000000..6f063b0e --- /dev/null +++ b/docs/.vuepress/components/demos/Torch.vue @@ -0,0 +1,64 @@ + + + + + diff --git a/docs/.vuepress/components/demos/Upload.vue b/docs/.vuepress/components/demos/Upload.vue new file mode 100644 index 00000000..83c071a0 --- /dev/null +++ b/docs/.vuepress/components/demos/Upload.vue @@ -0,0 +1,28 @@ + + + diff --git a/docs/.vuepress/components/demos/Validate.vue b/docs/.vuepress/components/demos/Validate.vue new file mode 100644 index 00000000..11e7c570 --- /dev/null +++ b/docs/.vuepress/components/demos/Validate.vue @@ -0,0 +1,118 @@ + + + + + diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js new file mode 100644 index 00000000..09beb248 --- /dev/null +++ b/docs/.vuepress/config.js @@ -0,0 +1,41 @@ +module.exports = { + title: 'Vue Qrcode Reader', + description: 'A set of Vue.js components for detecting and decoding QR codes.', + + // base: '/vue-qrcode-reader/', + + extraWatchFiles: [ + '../src/' + ], + + themeConfig: { + repo: 'gruhn/vue-qrcode-reader', + + sidebar: { + '/demos/': [ + 'Simple', + 'DecodeAll', + 'CustomTracking', + 'LoadingIndicator', + 'Validate', + 'SwitchCamera', + 'Fullscreen', + 'Torch', + 'DragDrop', + 'Upload', + 'Fallback' + ], + + '/api/': [ + 'QrcodeStream', + 'QrcodeDropZone', + 'QrcodeCapture' + ], + }, + + nav: [ + { text: 'Demos', link: '/demos/DecodeAll' }, + { text: 'Component APIs', link: '/api/QrcodeStream' } + ] + } +} diff --git a/docs/.vuepress/dist/404.html b/docs/.vuepress/dist/404.html new file mode 100644 index 00000000..39df154e --- /dev/null +++ b/docs/.vuepress/dist/404.html @@ -0,0 +1,19 @@ + + + + + + Vue Qrcode Reader + + + + + + + +

404

How did we get here?
+ Take me home. +
+ + + diff --git a/docs/.vuepress/dist/api/QrcodeCapture.html b/docs/.vuepress/dist/api/QrcodeCapture.html new file mode 100644 index 00000000..9be45720 --- /dev/null +++ b/docs/.vuepress/dist/api/QrcodeCapture.html @@ -0,0 +1,72 @@ + + + + + + QrcodeCapture | Vue Qrcode Reader + + + + + + + +

# QrcodeCapture

# Events

# decode

  • Payload Type: String

The component renders to a simple file picker input element. Clicking opens a file dialog. On supporting mobile devices the camera is started to take a picture. The selected images are directly scanned and positive results are indicated by the decode event. You can also select multiple images at the same time (still one event per image though).

However, if no QR code is pictured or an error occurs, decode silently fails.

<qrcode-capture @decode="onDecode" />
+
methods: {
+  onDecode (decodedString) {
+    // ...
+  }
+}
+

# detect

  • Payload Type: Promise<Object>

The detect event is basically a verbose version of decode. detect is emitted as soon as you confirm your file selection or the foto you took with your camera. detect carries a Promise which resolves when scanning the images has finished. The Promise rejects in case of errors. Additionally, detect gives you the unprocessed raw image data and the coordinates of the QR code in the image.

<qrcode-capture @detect="onDetect" />
+
methods: {
+  async onDetect (promise) {
+    try {
+      const {
+        imageData,    // raw image data of image/frame
+        content,      // decoded String or null
+        location      // QR code coordinates or null
+      } = await promise
+
+      if (content === null) {
+         // decoded nothing
+      } else {
+         // ...
+      }
+    } catch (error) {
+      // ...
+    }
+  }
+}
+

# Props

QrcodeCapture has no explicitly defined props. +However, checkout the components template:

<template lang="html">
+  <input
+    @change="onChangeInput"
+    type="file"
+    name="image"
+    accept="image/*"
+    capture="environment"
+    multiple
+  />
+</template>
+

Because the input element is the root element of the component and because Vue components accept non-prop attributes you can make use of any valid input attribute:

<qrcode-capture disabled />
+

You can even remove or replace already defined attributes:

<qrcode-capture :multiple="false" capture="user" />
+

# Slots

no slots

+ + + diff --git a/docs/.vuepress/dist/api/QrcodeDropZone.html b/docs/.vuepress/dist/api/QrcodeDropZone.html new file mode 100644 index 00000000..59cb7d2f --- /dev/null +++ b/docs/.vuepress/dist/api/QrcodeDropZone.html @@ -0,0 +1,93 @@ + + + + + + QrcodeDropZone | Vue Qrcode Reader + + + + + + + +

# QrcodeDropZone

# Events

# decode

  • Payload Type: String

You can drag-and-drop image files from your desktop or images embedded into other web pages anywhere in the area the component occupies. The images are directly scanned and positive results are indicated by the decode event. You can also drop multiple images at the same time (still one event per image though).

However, if no QR code is pictured or an error occurs, decode silently fails.

<qrcode-drop-zone @decode="onDecode">
+   <!-- ... -->
+</qrcode-drop-zone>
+
methods: {
+  onDecode (decodedString) {
+    // ...
+  }
+}
+

# detect

  • Payload Type: Promise<Object>

The detect event is basically a verbose version of decode. detect is emitted as soon as you drop an image. It carries a Promise which resolves when scanning the dropped image has finished. The Promise rejects in case of errors. Additionally, detect gives you the unprocessed raw image data and the coordinates of the QR code in the image.

<qrcode-drop-zone @detect="onDetect">
+   <!-- ... -->
+</qrcode-drop-zone>
+
methods: {
+  async onDetect (promise) {
+    try {
+      const {
+        imageData,    // raw image data of image/frame
+        content,      // decoded String or null
+        location      // QR code coordinates or null
+      } = await promise
+
+      if (content === null) {
+         // decoded nothing
+      } else {
+         // ...
+      }
+    } catch (error) {
+      if (error.name === 'DropImageFetchError') {
+        // drag-and-dropped URL (probably just an <img> element) from different
+        // domain without CORS header caused same-origin-policy violation
+      } else if (error.name === 'DropImageDecodeError') {
+        // drag-and-dropped file is not of type image and can't be decoded
+      } else {
+        // idk, open an issue ¯\_(ツ)_/¯
+      }
+    }
+  }
+}
+

# dragover

  • Payload Type: Boolean

When the user is dragging something over the the component you might want to apply some emphasizing styling. Do that by reacting to the dragover event.

<qrcode-drop-zone @dragover="onDragOver">
+  <div :class="{ highlight: draggingOver }">
+    <!-- ... -->
+  </div>
+</qrcode-drop-zone>
+
data () {
+  return {
+    draggingOver: false
+  }
+},
+
+methods: {
+  onDragOver (draggingOver) {
+    this.draggingOver = draggingOver
+  }
+}
+

WARNING

This is a custom event not to be confused with native dragover. If you really need to listen for the DOM event instead, use Vues native event modifier.

# Props

no props

# Slots

# default

This component merely renders a wrapper div. Its height is defined by the content inside so it will have zero height if you don't provide any content.

<qrcode-drop-zone>
+  <b>put anything here</b>
+</qrcode-drop-zone>
+
+ + + diff --git a/docs/.vuepress/dist/api/QrcodeStream.html b/docs/.vuepress/dist/api/QrcodeStream.html new file mode 100644 index 00000000..ee238201 --- /dev/null +++ b/docs/.vuepress/dist/api/QrcodeStream.html @@ -0,0 +1,176 @@ + + + + + + QrcodeStream | Vue Qrcode Reader + + + + + + + +

# QrcodeStream

# Events

# decode

  • Payload Type: String

Once a stream from the users camera is loaded, it's displayed and continuously scanned for QR codes. Results are indicated by the decode event.

<qrcode-stream @decode="onDecode"></qrcode-stream>
+
methods: {
+  onDecode (decodedString) {
+    // ...
+  }
+}
+

TIP

If you scan the same QR code multiple times in a row, decode is still only emitted once. When you hold a QR code in the camera, frames are actually decoded multiple times a second but you don't want to be flooded with decode events that often. That's why the last decoded QR code is always cached and only new results are propagated. However changing the value of camera resets this internal cache.

# detect

  • Payload Type: Promise<Object>

The detect event is basically a verbose version of decode. decode only gives you the string encoded by QR codes. detect on the other hand ...

  • is always emitted before decode
  • gives you the unprocessed raw image data
  • gives you the coordinates of the QR code in the camera frame
  • does NOT silently fail in case of errors
<qrcode-stream @detect="onDetect"></qrcode-stream>
+
methods: {
+  async onDetect (promise) {
+    try {
+      const {
+        imageData,    // raw image data of image/frame
+        content,      // decoded String
+        location      // QR code coordinates
+      } = await promise
+
+      // ...
+    } catch (error) {
+      // ...
+    }
+  }
+}
+

# init

  • Payload Type: Promise<MediaTrackCapabilities>

It might take a while before the component is ready and the scanning process starts. The user has to be asked for camera access permission first and the camera stream has to be loaded.

If you want to show a loading indicator, you can listen for the init event. It's emitted as soon as the component is mounted. It carries a promise which resolves with the cameras MediaTrackCapabilities when everything is ready. The promise is rejected if initialization fails. This can have a couple of reasons.

WARNING

In Chrome you can't prompt users for permissions a second time. Once denied, users can only manually grant them. Make sure your users understand why you need access to their camera before you mount this component. Otherwise they might panic and deny and then get frustrated because they don't know how to change their decision.

<qrcode-stream @init="onInit"></qrcode-stream>
+
methods: {
+  async onInit (promise) {
+    // show loading indicator
+
+    try {
+      const { capabilities } = await promise
+
+      // successfully initialized
+    } catch (error) {
+      if (error.name === 'NotAllowedError') {
+        // user denied camera access permisson
+      } else if (error.name === 'NotFoundError') {
+        // no suitable camera device installed
+      } else if (error.name === 'NotSupportedError') {
+        // page is not served over HTTPS (or localhost)
+      } else if (error.name === 'NotReadableError') {
+        // maybe camera is already in use
+      } else if (error.name === 'OverconstrainedError') {
+        // did you requested the front camera although there is none?
+      } else if (error.name === 'StreamApiNotSupportedError') {
+        // browser seems to be lacking features
+      }
+    } finally {
+      // hide loading indicator
+    }
+  }
+}
+

# Props

# track

  • Input Type: Boolean, Function
  • Default: true

By default detected QR codes are visually highlighted. A transparent canvas overlays the camera stream. When a QR code is detected, its location is painted to the canvas. You can enable/disable this feature by passing true/false via the track prop. If tracking is disabled the camera stream is scanned much less frequently. So if you encounter performance problems on your target device, this might help.

You can also pass a function with track to customize the way the location is painted. This function is called to produce each frame. It receives the location object as the first argument and a CanvasRenderingContext2D instance as the second argument.

WARNING

Avoid access to reactive properties in this function (like stuff in data, computed or your Vuex store). The function is called several times a second and might cause memory leaks. To be safe don't access this at all.

Say you want to paint in a different color that better fits your overall page theme.

<qrcode-stream :track="repaint"></qrcode-stream>
+
methods: {
+  repaint (location, ctx) {
+    const {
+      topLeftCorner,
+      topRightCorner,
+      bottomLeftCorner,
+      bottomRightCorner,
+      // topLeftFinderPattern,
+      // topRightFinderPattern,
+      // bottomLeftFinderPattern
+    } = location
+
+    ctx.strokeStyle = 'blue' // instead of red
+
+    ctx.beginPath()
+    ctx.moveTo(topLeftCorner.x, topLeftCorner.y)
+    ctx.lineTo(bottomLeftCorner.x, bottomLeftCorner.y)
+    ctx.lineTo(bottomRightCorner.x, bottomRightCorner.y)
+    ctx.lineTo(topRightCorner.x, topRightCorner.y)
+    ctx.lineTo(topLeftCorner.x, topLeftCorner.y)
+    ctx.closePath()
+
+    ctx.stroke()
+  }
+}
+

# camera

  • Input Type: String
  • Default: auto
  • Valid Inputs: auto, rear, front, off

With the camera prop you can control which camera to access on the users device.

  • Use front or rear to force request the front or rear camera respectively.
  • If you choose auto the rear camera is requested by default. +But if a device like a laptop has only a front camera installed, auto will fallback to that.
  • Use off to not request a camera at all or in other words: turn the camera off.

Every time the camera prop is modified, a new camera stream is requested so the init event is emitted again. +That way you can catch errors. +For example when the front camera is requested on a device that doesn't have one.

<qrcode-stream :camera="camera" @init="onCameraChange"></qrcode-stream>
+
data () {
+  return {
+    camera: 'auto'
+  }
+},
+
+methods: {
+  startFrontCamera () {
+    this.camera = 'front'
+  },
+
+  onCameraChange (promise) {
+    promise.catch(error => {
+      const cameraMissingError = error.name === 'OverconstrainedError'
+      const triedFrontCamera = this.camera === 'front'
+
+      if (triedFrontCamera && cameraMissingError) {
+        // no front camera on this device
+      }
+    })
+  }
+}
+

# torch

  • Input Type: Boolean
  • Default: false

With the torch prop you can turn a devices flashlight on/off. +This is not consistently supported by all devices and browsers. +Support can even vary on the same device with the same browser. +For example the rear camera often has a flashlight but the front camera doesn't. +We can only tell if flashlight control is supported once the camera is loaded and the init event has been emitted. +At the moment, torch silently fails on unsupported devices. +But from the init events payload you can access the MediaTrackCapabilities object. +This will tell you whether or not torch is supported.

Due to API limitations the camera stream must be reloaded when turning the torch on/off. +That means the init event will be emitted again.

<qrcode-stream :torch="true" @init="onInit"></qrcode-stream>
+
methods: {
+  async onInit (promise) {
+    const { capabilities } = await promise
+
+    const TORCH_IS_SUPPORTED = !!capabilities.torch
+  }
+}
+

# worker experimental

TIP

So far vue-qrcode-reader could only process QR codes. +However, many people requested support for different code types +(bar codes, data matrix, color inverted QR codes, ...) though. +With this prop we try to meet these demands.

Please share your successful or unsuccessful implementation attempts at +#109. +Your feedback is greatly appreciated.

By default, QrcodeStream will only detect QR codes. +Processing image data is expensive so a web worker is doing the heavy lifting. +Because the worker is the only QR code specific part of the library though, +you can replace the default worker and get a component that can scan whatever you want.

First of all you need to create a custom worker class:

class MyWorkerClass extends Worker {
+  constructor() {
+    super("path/to/worker.js")
+  }
+}
+

(Internally, vue-qrcode-reader leverages worker-loader +to makes this slightly more convenient)

To get your worker.js right, check out the default implementation.

Now, pass the worker class via the worker prop. +Don't pass a class instance, we need the class itself!

<qrcode-stream :worker="Worker"></qrcode-stream>
+
data() {
+  return {
+    Worker: MyWorkerClass // Don't do: new MyWorkerClass()
+  }
+}
+

TIP

QrcodeCapture and QrcodeDropZone too expose the worker prop. +Dedicated API documentation is missing so far but usage should be similar.

# Slots

# default

Any distributed content overlays the camera stream, wrapped in a position: absolute container.

<qrcode-stream>
+  <b>stuff here overlays the camera stream</b>
+</qrcode-stream>
+
+ + + diff --git a/docs/.vuepress/dist/api/index.html b/docs/.vuepress/dist/api/index.html new file mode 100644 index 00000000..4eb7caa3 --- /dev/null +++ b/docs/.vuepress/dist/api/index.html @@ -0,0 +1,29 @@ + + + + + + Vue Qrcode Reader + + + + + + + +
+ + + diff --git a/docs/.vuepress/dist/assets/css/0.styles.7c500507.css b/docs/.vuepress/dist/assets/css/0.styles.7c500507.css new file mode 100644 index 00000000..f064e13c --- /dev/null +++ b/docs/.vuepress/dist/assets/css/0.styles.7c500507.css @@ -0,0 +1 @@ +code[class*=language-],pre[class*=language-]{color:#ccc;background:none;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#2d2d2d}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#999}.token.punctuation{color:#ccc}.token.attr-name,.token.deleted,.token.namespace,.token.tag{color:#e2777a}.token.function-name{color:#6196cc}.token.boolean,.token.function,.token.number{color:#f08d49}.token.class-name,.token.constant,.token.property,.token.symbol{color:#f8c555}.token.atrule,.token.builtin,.token.important,.token.keyword,.token.selector{color:#cc99cd}.token.attr-value,.token.char,.token.regex,.token.string,.token.variable{color:#7ec699}.token.entity,.token.operator,.token.url{color:#67cdcc}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:green}.theme-default-content code{color:#476582;padding:.25rem .5rem;margin:0;font-size:.85em;background-color:rgba(27,31,35,.05);border-radius:3px}.theme-default-content code .token.deleted{color:#ec5975}.theme-default-content code .token.inserted{color:#3eaf7c}.theme-default-content pre,.theme-default-content pre[class*=language-]{line-height:1.4;padding:1.25rem 1.5rem;margin:.85rem 0;background-color:#282c34;border-radius:6px;overflow:auto}.theme-default-content pre[class*=language-] code,.theme-default-content pre code{color:#fff;padding:0;background-color:transparent;border-radius:0}div[class*=language-]{position:relative;background-color:#282c34;border-radius:6px}div[class*=language-] .highlight-lines{-webkit-user-select:none;-ms-user-select:none;user-select:none;padding-top:1.3rem;position:absolute;top:0;left:0;width:100%;line-height:1.4}div[class*=language-] .highlight-lines .highlighted{background-color:rgba(0,0,0,.66)}div[class*=language-] pre,div[class*=language-] pre[class*=language-]{background:transparent;position:relative;z-index:1}div[class*=language-]:before{position:absolute;z-index:3;top:.8em;right:1em;font-size:.75rem;color:hsla(0,0%,100%,.4)}div[class*=language-]:not(.line-numbers-mode) .line-numbers-wrapper{display:none}div[class*=language-].line-numbers-mode .highlight-lines .highlighted{position:relative}div[class*=language-].line-numbers-mode .highlight-lines .highlighted:before{content:" ";position:absolute;z-index:3;left:0;top:0;display:block;width:3.5rem;height:100%;background-color:rgba(0,0,0,.66)}div[class*=language-].line-numbers-mode pre{padding-left:4.5rem;vertical-align:middle}div[class*=language-].line-numbers-mode .line-numbers-wrapper{position:absolute;top:0;width:3.5rem;text-align:center;color:hsla(0,0%,100%,.3);padding:1.25rem 0;line-height:1.4}div[class*=language-].line-numbers-mode .line-numbers-wrapper br{-webkit-user-select:none;-ms-user-select:none;user-select:none}div[class*=language-].line-numbers-mode .line-numbers-wrapper .line-number{position:relative;z-index:4;-webkit-user-select:none;-ms-user-select:none;user-select:none;font-size:.85em}div[class*=language-].line-numbers-mode:after{content:"";position:absolute;z-index:2;top:0;left:0;width:3.5rem;height:100%;border-radius:6px 0 0 6px;border-right:1px solid rgba(0,0,0,.66);background-color:#282c34}div[class~=language-js]:before{content:"js"}div[class~=language-ts]:before{content:"ts"}div[class~=language-html]:before{content:"html"}div[class~=language-md]:before{content:"md"}div[class~=language-vue]:before{content:"vue"}div[class~=language-css]:before{content:"css"}div[class~=language-sass]:before{content:"sass"}div[class~=language-scss]:before{content:"scss"}div[class~=language-less]:before{content:"less"}div[class~=language-stylus]:before{content:"stylus"}div[class~=language-go]:before{content:"go"}div[class~=language-java]:before{content:"java"}div[class~=language-c]:before{content:"c"}div[class~=language-sh]:before{content:"sh"}div[class~=language-yaml]:before{content:"yaml"}div[class~=language-py]:before{content:"py"}div[class~=language-docker]:before{content:"docker"}div[class~=language-dockerfile]:before{content:"dockerfile"}div[class~=language-makefile]:before{content:"makefile"}div[class~=language-javascript]:before{content:"js"}div[class~=language-typescript]:before{content:"ts"}div[class~=language-markup]:before{content:"html"}div[class~=language-markdown]:before{content:"md"}div[class~=language-json]:before{content:"json"}div[class~=language-ruby]:before{content:"rb"}div[class~=language-python]:before{content:"py"}div[class~=language-bash]:before{content:"sh"}div[class~=language-php]:before{content:"php"}.custom-block .custom-block-title{font-weight:600;margin-bottom:-.4rem}.custom-block.danger,.custom-block.tip,.custom-block.warning{padding:.1rem 1.5rem;border-left-width:.5rem;border-left-style:solid;margin:1rem 0}.custom-block.tip{background-color:#f3f5f7;border-color:#42b983}.custom-block.warning{background-color:rgba(255,229,100,.3);border-color:#e7c000;color:#6b5900}.custom-block.warning .custom-block-title{color:#b29400}.custom-block.warning a{color:#2c3e50}.custom-block.danger{background-color:#ffe6e6;border-color:#c00;color:#4d0000}.custom-block.danger .custom-block-title{color:#900}.custom-block.danger a{color:#2c3e50}.custom-block.details{display:block;position:relative;border-radius:2px;margin:1.6em 0;padding:1.6em;background-color:#eee}.custom-block.details h4{margin-top:0}.custom-block.details figure:last-child,.custom-block.details p:last-child{margin-bottom:0;padding-bottom:0}.custom-block.details summary{outline:none;cursor:pointer}.arrow{display:inline-block;width:0;height:0}.arrow.up{border-bottom:6px solid #ccc}.arrow.down,.arrow.up{border-left:4px solid transparent;border-right:4px solid transparent}.arrow.down{border-top:6px solid #ccc}.arrow.right{border-left:6px solid #ccc}.arrow.left,.arrow.right{border-top:4px solid transparent;border-bottom:4px solid transparent}.arrow.left{border-right:6px solid #ccc}.theme-default-content:not(.custom){max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.theme-default-content:not(.custom){padding:2rem}}@media (max-width:419px){.theme-default-content:not(.custom){padding:1.5rem}}.table-of-contents .badge{vertical-align:middle}body,html{padding:0;margin:0;background-color:#fff}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:16px;color:#2c3e50}.page{padding-left:20rem}.navbar{z-index:20;right:0;height:3.6rem;background-color:#fff;box-sizing:border-box;border-bottom:1px solid #eaecef}.navbar,.sidebar-mask{position:fixed;top:0;left:0}.sidebar-mask{z-index:9;width:100vw;height:100vh;display:none}.sidebar{font-size:16px;background-color:#fff;width:20rem;position:fixed;z-index:10;margin:0;top:3.6rem;left:0;bottom:0;box-sizing:border-box;border-right:1px solid #eaecef;overflow-y:auto}.theme-default-content:not(.custom)>:first-child{margin-top:3.6rem}.theme-default-content:not(.custom) a:hover{text-decoration:underline}.theme-default-content:not(.custom) p.demo{padding:1rem 1.5rem;border:1px solid #ddd;border-radius:4px}.theme-default-content:not(.custom) img{max-width:100%}.theme-default-content.custom{padding:0;margin:0}.theme-default-content.custom img{max-width:100%}a{font-weight:500;text-decoration:none}a,p a code{color:#3eaf7c}p a code{font-weight:400}kbd{background:#eee;border:.15rem solid #ddd;border-bottom:.25rem solid #ddd;border-radius:.15rem;padding:0 .15em}blockquote{font-size:1rem;color:#999;border-left:.2rem solid #dfe2e5;margin:1rem 0;padding:.25rem 0 .25rem 1rem}blockquote>p{margin:0}ol,ul{padding-left:1.2em}strong{font-weight:600}h1,h2,h3,h4,h5,h6{font-weight:600;line-height:1.25}.theme-default-content:not(.custom)>h1,.theme-default-content:not(.custom)>h2,.theme-default-content:not(.custom)>h3,.theme-default-content:not(.custom)>h4,.theme-default-content:not(.custom)>h5,.theme-default-content:not(.custom)>h6{margin-top:-3.1rem;padding-top:4.6rem;margin-bottom:0}.theme-default-content:not(.custom)>h1:first-child,.theme-default-content:not(.custom)>h2:first-child,.theme-default-content:not(.custom)>h3:first-child,.theme-default-content:not(.custom)>h4:first-child,.theme-default-content:not(.custom)>h5:first-child,.theme-default-content:not(.custom)>h6:first-child{margin-top:-1.5rem;margin-bottom:1rem}.theme-default-content:not(.custom)>h1:first-child+.custom-block,.theme-default-content:not(.custom)>h1:first-child+p,.theme-default-content:not(.custom)>h1:first-child+pre,.theme-default-content:not(.custom)>h2:first-child+.custom-block,.theme-default-content:not(.custom)>h2:first-child+p,.theme-default-content:not(.custom)>h2:first-child+pre,.theme-default-content:not(.custom)>h3:first-child+.custom-block,.theme-default-content:not(.custom)>h3:first-child+p,.theme-default-content:not(.custom)>h3:first-child+pre,.theme-default-content:not(.custom)>h4:first-child+.custom-block,.theme-default-content:not(.custom)>h4:first-child+p,.theme-default-content:not(.custom)>h4:first-child+pre,.theme-default-content:not(.custom)>h5:first-child+.custom-block,.theme-default-content:not(.custom)>h5:first-child+p,.theme-default-content:not(.custom)>h5:first-child+pre,.theme-default-content:not(.custom)>h6:first-child+.custom-block,.theme-default-content:not(.custom)>h6:first-child+p,.theme-default-content:not(.custom)>h6:first-child+pre{margin-top:2rem}h1:hover .header-anchor,h2:hover .header-anchor,h3:hover .header-anchor,h4:hover .header-anchor,h5:hover .header-anchor,h6:hover .header-anchor{opacity:1}h1{font-size:2.2rem}h2{font-size:1.65rem;padding-bottom:.3rem;border-bottom:1px solid #eaecef}h3{font-size:1.35rem}a.header-anchor{font-size:.85em;float:left;margin-left:-.87em;padding-right:.23em;margin-top:.125em;opacity:0}a.header-anchor:hover{text-decoration:none}.line-number,code,kbd{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}ol,p,ul{line-height:1.7}hr{border:0;border-top:1px solid #eaecef}table{border-collapse:collapse;margin:1rem 0;display:block;overflow-x:auto}tr{border-top:1px solid #dfe2e5}tr:nth-child(2n){background-color:#f6f8fa}td,th{border:1px solid #dfe2e5;padding:.6em 1em}.theme-container.sidebar-open .sidebar-mask{display:block}.theme-container.no-navbar .theme-default-content:not(.custom)>h1,.theme-container.no-navbar h2,.theme-container.no-navbar h3,.theme-container.no-navbar h4,.theme-container.no-navbar h5,.theme-container.no-navbar h6{margin-top:1.5rem;padding-top:0}.theme-container.no-navbar .sidebar{top:0}@media (min-width:720px){.theme-container.no-sidebar .sidebar{display:none}.theme-container.no-sidebar .page{padding-left:0}}@media (max-width:959px){.sidebar{font-size:15px;width:16.4rem}.page{padding-left:16.4rem}}@media (max-width:719px){.sidebar{top:0;padding-top:3.6rem;transform:translateX(-100%);transition:transform .2s ease}.page{padding-left:0}.theme-container.sidebar-open .sidebar{transform:translateX(0)}.theme-container.no-navbar .sidebar{padding-top:0}}@media (max-width:419px){h1{font-size:1.9rem}.theme-default-content div[class*=language-]{margin:.85rem -1.5rem;border-radius:0}}#nprogress{pointer-events:none}#nprogress .bar{background:#3eaf7c;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;-webkit-box-shadow:0 0 10px #3eaf7c,0 0 5px #3eaf7c;box-shadow:0 0 10px #3eaf7c,0 0 5px #3eaf7c;opacity:1;-webkit-transform:rotate(3deg) translateY(-4px);transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;-webkit-box-sizing:border-box;box-sizing:border-box;border-color:#3eaf7c transparent transparent #3eaf7c;border-style:solid;border-width:2px;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.icon.outbound{color:#aaa;display:inline-block;vertical-align:middle;position:relative;top:-1px}.home{padding:3.6rem 2rem 0;max-width:960px;margin:0 auto;display:block}.home .hero{text-align:center}.home .hero img{max-width:100%;max-height:280px;display:block;margin:3rem auto 1.5rem}.home .hero h1{font-size:3rem}.home .hero .action,.home .hero .description,.home .hero h1{margin:1.8rem auto}.home .hero .description{max-width:35rem;font-size:1.6rem;line-height:1.3;color:#6a8bad}.home .hero .action-button{display:inline-block;font-size:1.2rem;color:#fff;background-color:#3eaf7c;padding:.8rem 1.6rem;border-radius:4px;-webkit-transition:background-color .1s ease;transition:background-color .1s ease;-webkit-box-sizing:border-box;box-sizing:border-box;border-bottom:1px solid #389d70}.home .hero .action-button:hover{background-color:#4abf8a}.home .features{border-top:1px solid #eaecef;padding:1.2rem 0;margin-top:2.5rem;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-ms-flex-line-pack:stretch;align-content:stretch;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.home .feature{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:30%;flex-basis:30%;max-width:30%}.home .feature h2{font-size:1.4rem;font-weight:500;border-bottom:none;padding-bottom:0;color:#3a5169}.home .feature p{color:#4e6e8e}.home .footer{padding:2.5rem;border-top:1px solid #eaecef;text-align:center;color:#4e6e8e}@media (max-width:719px){.home .features{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.home .feature{max-width:100%;padding:0 2.5rem}}@media (max-width:419px){.home{padding-left:1.5rem;padding-right:1.5rem}.home .hero img{max-height:210px;margin:2rem auto 1.2rem}.home .hero h1{font-size:2rem}.home .hero .action,.home .hero .description,.home .hero h1{margin:1.2rem auto}.home .hero .description{font-size:1.2rem}.home .hero .action-button{font-size:1rem;padding:.6rem 1.2rem}.home .feature h2{font-size:1.25rem}}.search-box{display:inline-block;position:relative;margin-right:1rem}.search-box input{cursor:text;width:10rem;height:2rem;color:#4e6e8e;display:inline-block;border:1px solid #cfd4db;border-radius:2rem;font-size:.9rem;line-height:2rem;padding:0 .5rem 0 2rem;outline:none;-webkit-transition:all .2s ease;transition:all .2s ease;background:#fff url(/assets/img/search.83621669.svg) .6rem .5rem no-repeat;background-size:1rem}.search-box input:focus{cursor:auto;border-color:#3eaf7c}.search-box .suggestions{background:#fff;width:20rem;position:absolute;top:2rem;border:1px solid #cfd4db;border-radius:6px;padding:.4rem;list-style-type:none}.search-box .suggestions.align-right{right:0}.search-box .suggestion{line-height:1.4;padding:.4rem .6rem;border-radius:4px;cursor:pointer}.search-box .suggestion a{white-space:normal;color:#5d82a6}.search-box .suggestion a .page-title{font-weight:600}.search-box .suggestion a .header{font-size:.9em;margin-left:.25em}.search-box .suggestion.focused{background-color:#f3f4f5}.search-box .suggestion.focused a{color:#3eaf7c}@media (max-width:959px){.search-box input{cursor:pointer;width:0;border-color:transparent;position:relative}.search-box input:focus{cursor:text;left:0;width:10rem}}@media (-ms-high-contrast:none){.search-box input{height:2rem}}@media (max-width:959px) and (min-width:719px){.search-box .suggestions{left:0}}@media (max-width:719px){.search-box{margin-right:0}.search-box input{left:1rem}.search-box .suggestions{right:0}}@media (max-width:419px){.search-box .suggestions{width:calc(100vw - 4rem)}.search-box input:focus{width:8rem}}.sidebar-button{cursor:pointer;display:none;width:1.25rem;height:1.25rem;position:absolute;padding:.6rem;top:.6rem;left:1rem}.sidebar-button .icon{display:block;width:1.25rem;height:1.25rem}@media (max-width:719px){.sidebar-button{display:block}}.dropdown-enter,.dropdown-leave-to{height:0!important}.dropdown-wrapper{cursor:pointer}.dropdown-wrapper .dropdown-title{display:block;font-size:.9rem;font-family:inherit;cursor:inherit;padding:inherit;line-height:1.4rem;background:transparent;border:none;font-weight:500;color:#2c3e50}.dropdown-wrapper .dropdown-title:hover{border-color:transparent}.dropdown-wrapper .dropdown-title .arrow{vertical-align:middle;margin-top:-1px;margin-left:.4rem}.dropdown-wrapper .nav-dropdown .dropdown-item{color:inherit;line-height:1.7rem}.dropdown-wrapper .nav-dropdown .dropdown-item h4{margin:.45rem 0 0;border-top:1px solid #eee;padding:.45rem 1.5rem 0 1.25rem}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem-wrapper{padding:0;list-style:none}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem-wrapper .dropdown-subitem{font-size:.9em}.dropdown-wrapper .nav-dropdown .dropdown-item a{display:block;line-height:1.7rem;position:relative;border-bottom:none;font-weight:400;margin-bottom:0;padding:0 1.5rem 0 1.25rem}.dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active,.dropdown-wrapper .nav-dropdown .dropdown-item a:hover{color:#3eaf7c}.dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active:after{content:"";width:0;height:0;border-left:5px solid #3eaf7c;border-top:3px solid transparent;border-bottom:3px solid transparent;position:absolute;top:calc(50% - 2px);left:9px}.dropdown-wrapper .nav-dropdown .dropdown-item:first-child h4{margin-top:0;padding-top:0;border-top:0}@media (max-width:719px){.dropdown-wrapper.open .dropdown-title{margin-bottom:.5rem}.dropdown-wrapper .dropdown-title{font-weight:600;font-size:inherit}.dropdown-wrapper .dropdown-title:hover{color:#3eaf7c}.dropdown-wrapper .nav-dropdown{-webkit-transition:height .1s ease-out;transition:height .1s ease-out;overflow:hidden}.dropdown-wrapper .nav-dropdown .dropdown-item h4{border-top:0;margin-top:0;padding-top:0}.dropdown-wrapper .nav-dropdown .dropdown-item>a,.dropdown-wrapper .nav-dropdown .dropdown-item h4{font-size:15px;line-height:2rem}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem{font-size:14px;padding-left:1rem}}@media (min-width:719px){.dropdown-wrapper{height:1.8rem}.dropdown-wrapper.open .nav-dropdown,.dropdown-wrapper:hover .nav-dropdown{display:block!important}.dropdown-wrapper.open:blur{display:none}.dropdown-wrapper .dropdown-title .arrow{border-left:4px solid transparent;border-right:4px solid transparent;border-top:6px solid #ccc;border-bottom:0}.dropdown-wrapper .nav-dropdown{display:none;height:auto!important;-webkit-box-sizing:border-box;box-sizing:border-box;max-height:calc(100vh - 2.7rem);overflow-y:auto;position:absolute;top:100%;right:0;background-color:#fff;padding:.6rem 0;border:1px solid;border-color:#ddd #ddd #ccc;text-align:left;border-radius:.25rem;white-space:nowrap;margin:0}}.nav-links{display:inline-block}.nav-links a{line-height:1.4rem;color:inherit}.nav-links a.router-link-active,.nav-links a:hover{color:#3eaf7c}.nav-links .nav-item{position:relative;display:inline-block;margin-left:1.5rem;line-height:2rem}.nav-links .nav-item:first-child{margin-left:0}.nav-links .repo-link{margin-left:1.5rem}@media (max-width:719px){.nav-links .nav-item,.nav-links .repo-link{margin-left:0}}@media (min-width:719px){.nav-links a.router-link-active,.nav-links a:hover{color:#2c3e50}.nav-item>a:not(.external).router-link-active,.nav-item>a:not(.external):hover{margin-bottom:-2px;border-bottom:2px solid #46bd87}}.navbar{padding:.7rem 1.5rem;line-height:2.2rem}.navbar a,.navbar img,.navbar span{display:inline-block}.navbar .logo{height:2.2rem;min-width:2.2rem;margin-right:.8rem;vertical-align:top}.navbar .site-name{font-size:1.3rem;font-weight:600;color:#2c3e50;position:relative}.navbar .links{padding-left:1.5rem;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#fff;white-space:nowrap;font-size:.9rem;position:absolute;right:1.5rem;top:.7rem;display:-webkit-box;display:-ms-flexbox;display:flex}.navbar .links .search-box{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;vertical-align:top}@media (max-width:719px){.navbar{padding-left:4rem}.navbar .can-hide{display:none}.navbar .links{padding-left:1.5rem}.navbar .site-name{width:calc(100vw - 9.4rem);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}.page-edit{max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.page-edit{padding:2rem}}@media (max-width:419px){.page-edit{padding:1.5rem}}.page-edit{padding-top:1rem;padding-bottom:1rem;overflow:auto}.page-edit .edit-link{display:inline-block}.page-edit .edit-link a{color:#4e6e8e;margin-right:.25rem}.page-edit .last-updated{float:right;font-size:.9em}.page-edit .last-updated .prefix{font-weight:500;color:#4e6e8e}.page-edit .last-updated .time{font-weight:400;color:#aaa}@media (max-width:719px){.page-edit .edit-link{margin-bottom:.5rem}.page-edit .last-updated{font-size:.8em;float:none;text-align:left}}.page-nav{max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.page-nav{padding:2rem}}@media (max-width:419px){.page-nav{padding:1.5rem}}.page-nav{padding-top:1rem;padding-bottom:0}.page-nav .inner{min-height:2rem;margin-top:0;border-top:1px solid #eaecef;padding-top:1rem;overflow:auto}.page-nav .next{float:right}.page{padding-bottom:2rem;display:block}.sidebar-group .sidebar-group{padding-left:.5em}.sidebar-group:not(.collapsable) .sidebar-heading:not(.clickable){cursor:auto;color:inherit}.sidebar-group.is-sub-group{padding-left:0}.sidebar-group.is-sub-group>.sidebar-heading{font-size:.95em;line-height:1.4;font-weight:400;padding-left:2rem}.sidebar-group.is-sub-group>.sidebar-heading:not(.clickable){opacity:.5}.sidebar-group.is-sub-group>.sidebar-group-items{padding-left:1rem}.sidebar-group.is-sub-group>.sidebar-group-items>li>.sidebar-link{font-size:.95em;border-left:none}.sidebar-group.depth-2>.sidebar-heading{border-left:none}.sidebar-heading{color:#2c3e50;-webkit-transition:color .15s ease;transition:color .15s ease;cursor:pointer;font-size:1.1em;font-weight:700;padding:.35rem 1.5rem .35rem 1.25rem;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;border-left:.25rem solid transparent}.sidebar-heading.open,.sidebar-heading:hover{color:inherit}.sidebar-heading .arrow{position:relative;top:-.12em;left:.5em}.sidebar-heading.clickable.active{font-weight:600;color:#3eaf7c;border-left-color:#3eaf7c}.sidebar-heading.clickable:hover{color:#3eaf7c}.sidebar-group-items{-webkit-transition:height .1s ease-out;transition:height .1s ease-out;font-size:.95em;overflow:hidden}.sidebar .sidebar-sub-headers{padding-left:1rem;font-size:.95em}a.sidebar-link{font-size:1em;font-weight:400;display:inline-block;color:#2c3e50;border-left:.25rem solid transparent;padding:.35rem 1rem .35rem 1.25rem;line-height:1.4;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}a.sidebar-link:hover{color:#3eaf7c}a.sidebar-link.active{font-weight:600;color:#3eaf7c;border-left-color:#3eaf7c}.sidebar-group a.sidebar-link{padding-left:2rem}.sidebar-sub-headers a.sidebar-link{padding-top:.25rem;padding-bottom:.25rem;border-left:none}.sidebar-sub-headers a.sidebar-link.active{font-weight:500}.sidebar ul{padding:0;margin:0;list-style-type:none}.sidebar a{display:inline-block}.sidebar .nav-links{display:none;border-bottom:1px solid #eaecef;padding:.5rem 0 .75rem}.sidebar .nav-links a{font-weight:600}.sidebar .nav-links .nav-item,.sidebar .nav-links .repo-link{display:block;line-height:1.25rem;font-size:1.1em;padding:.5rem 0 .5rem 1.5rem}.sidebar>.sidebar-links{padding:1.5rem 0}.sidebar>.sidebar-links>li>a.sidebar-link{font-size:1.1em;line-height:1.7;font-weight:700}.sidebar>.sidebar-links>li:not(:first-child){margin-top:.75rem}@media (max-width:719px){.sidebar .nav-links{display:block}.sidebar .nav-links .dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active:after{top:calc(1rem - 2px)}.sidebar>.sidebar-links{padding:1rem 0}}.wrapper[data-v-e0ba7c1e]{position:relative;z-index:0;width:100%;height:100%}.overlay[data-v-e0ba7c1e],.tracking-layer[data-v-e0ba7c1e]{position:absolute;width:100%;height:100%;top:0;left:0}.camera[data-v-e0ba7c1e],.pause-frame[data-v-e0ba7c1e]{display:block;-o-object-fit:cover;object-fit:cover;width:100%;height:100%}.error[data-v-18b412d2]{font-weight:700;color:red}button[data-v-7f62d3b6]{position:absolute;left:10px;top:10px}.error[data-v-7f62d3b6]{color:red;font-weight:700}.drop-area{height:300px;color:#fff;text-align:center;font-weight:700;padding:10px;background-color:rgba(0,0,0,.5)}.dragover{background-color:rgba(0,0,0,.8)}.drop-error{color:red;font-weight:700}.fullscreen[data-v-01e794aa]{position:fixed;z-index:1000;top:0;bottom:0;right:0;left:0}.fullscreen-button[data-v-01e794aa]{background-color:#fff;position:absolute;bottom:0;right:0;margin:1rem}.fullscreen-button img[data-v-01e794aa]{width:2rem}button[data-v-74036290]{margin-bottom:20px}.loading-indicator[data-v-74036290]{font-weight:700;font-size:2rem;text-align:center}button[data-v-11199bde]{position:absolute;left:10px;top:10px}.error[data-v-11199bde]{color:red;font-weight:700}.validation-failure[data-v-7ed9dbb2],.validation-pending[data-v-7ed9dbb2],.validation-success[data-v-7ed9dbb2]{position:absolute;width:100%;height:100%;background-color:hsla(0,0%,100%,.8);text-align:center;font-weight:700;font-size:1.4rem;padding:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-flow:column nowrap;flex-flow:column nowrap;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.validation-success[data-v-7ed9dbb2]{color:green}.validation-failure[data-v-7ed9dbb2]{color:red}.decode-result{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.badge[data-v-15b7b770]{display:inline-block;font-size:14px;height:18px;line-height:18px;border-radius:3px;padding:0 6px;color:#fff}.badge.green[data-v-15b7b770],.badge.tip[data-v-15b7b770],.badge[data-v-15b7b770]{background-color:#42b983}.badge.error[data-v-15b7b770]{background-color:#da5961}.badge.warn[data-v-15b7b770],.badge.warning[data-v-15b7b770],.badge.yellow[data-v-15b7b770]{background-color:#e7c000}.badge+.badge[data-v-15b7b770]{margin-left:5px} \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/img/search.83621669.svg b/docs/.vuepress/dist/assets/img/search.83621669.svg new file mode 100644 index 00000000..03d83913 --- /dev/null +++ b/docs/.vuepress/dist/assets/img/search.83621669.svg @@ -0,0 +1 @@ + diff --git a/docs/.vuepress/dist/assets/js/1.0988ae21.js b/docs/.vuepress/dist/assets/js/1.0988ae21.js new file mode 100644 index 00000000..4ef4e975 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/1.0988ae21.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{308:function(e,t,r){"use strict";r.d(t,"f",(function(){return o})),r.d(t,"i",(function(){return a})),r.d(t,"d",(function(){return s})),r.d(t,"e",(function(){return c})),r.d(t,"h",(function(){return d})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return u})),r.d(t,"a",(function(){return l})),r.d(t,"g",(function(){return h}));let n=!0,i=!0;function o(e,t,r){const n=e.match(t);return n&&n.length>=r&&parseInt(n[r],10)}function a(e,t,r){if(!e.RTCPeerConnection)return;const n=e.RTCPeerConnection.prototype,i=n.addEventListener;n.addEventListener=function(e,n){if(e!==t)return i.apply(this,arguments);const o=e=>{const t=r(e);t&&(n.handleEvent?n.handleEvent(t):n(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(n,o),i.apply(this,[e,o])};const o=n.removeEventListener;n.removeEventListener=function(e,r){if(e!==t||!this._eventMap||!this._eventMap[t])return o.apply(this,arguments);if(!this._eventMap[t].has(r))return o.apply(this,arguments);const n=this._eventMap[t].get(r);return this._eventMap[t].delete(r),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,o.apply(this,[e,n])},Object.defineProperty(n,"on"+t,{get(){return this["_on"+t]},set(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}function s(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(n=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function c(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(i=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function d(){if("object"==typeof window){if(n)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function p(e,t){i&&console.warn(e+" is deprecated, please use "+t+" instead.")}function u(e){const{navigator:t}=e,r={browser:null,version:null};if(void 0===e||!e.navigator)return r.browser="Not a browser.",r;if(t.mozGetUserMedia)r.browser="firefox",r.version=o(t.userAgent,/Firefox\/(\d+)\./,1);else if(t.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection&&!e.RTCIceGatherer)r.browser="chrome",r.version=o(t.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(t.mediaDevices&&t.userAgent.match(/Edge\/(\d+).(\d+)$/))r.browser="edge",r.version=o(t.userAgent,/Edge\/(\d+).(\d+)$/,2);else{if(!e.RTCPeerConnection||!t.userAgent.match(/AppleWebKit\/(\d+)\./))return r.browser="Not a supported browser.",r;r.browser="safari",r.version=o(t.userAgent,/AppleWebKit\/(\d+)\./,1),r.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype}return r}function f(e){return"[object Object]"===Object.prototype.toString.call(e)}function l(e){return f(e)?Object.keys(e).reduce((function(t,r){const n=f(e[r]),i=n?l(e[r]):e[r],o=n&&!Object.keys(i).length;return void 0===i||o?t:Object.assign(t,{[r]:i})}),{}):e}function h(e,t,r){const n=r?"outbound-rtp":"inbound-rtp",i=new Map;if(null===t)return i;const o=[];return e.forEach(e=>{"track"===e.type&&e.trackIdentifier===t.id&&o.push(e)}),o.forEach(t=>{e.forEach(r=>{r.type===n&&r.trackId===t.id&&function e(t,r,n){r&&!n.has(r.id)&&(n.set(r.id,r),Object.keys(r).forEach(i=>{i.endsWith("Id")?e(t,t.get(r[i]),n):i.endsWith("Ids")&&r[i].forEach(r=>{e(t,t.get(r),n)})}))}(e,r,i)})}),i}},317:function(e,t,r){"use strict";var n=r(176),i=r(5),o=r(12),a=r(23),s=r(177),c=r(178);n("match",1,(function(e,t,r){return[function(t){var r=a(this),n=null==t?void 0:t[e];return void 0!==n?n.call(t,r):new RegExp(t)[e](String(r))},function(e){var n=r(t,e,this);if(n.done)return n.value;var a=i(e),d=String(this);if(!a.global)return c(a,d);var p=a.unicode;a.lastIndex=0;for(var u,f=[],l=0;null!==(u=c(a,d));){var h=String(u[0]);f[l]=h,""===h&&(a.lastIndex=s(d,o(a.lastIndex),p)),l++}return 0===l?null:f}]}))},318:function(e,t){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},319:function(e,t,r){"use strict";var n=r(0),i=r(321).trim;n({target:"String",proto:!0,forced:r(322)("trim")},{trim:function(){return i(this)}})},321:function(e,t,r){var n=r(23),i="["+r(318)+"]",o=RegExp("^"+i+i+"*"),a=RegExp(i+i+"*$"),s=function(e){return function(t){var r=String(n(t));return 1&e&&(r=r.replace(o,"")),2&e&&(r=r.replace(a,"")),r}};e.exports={start:s(1),end:s(2),trim:s(3)}},322:function(e,t,r){var n=r(1),i=r(318);e.exports=function(e){return n((function(){return!!i[e]()||"​…᠎"!="​…᠎"[e]()||i[e].name!==e}))}},323:function(e,t,r){var n=r(4),i=r(103);e.exports=function(e,t,r){var o,a;return i&&"function"==typeof(o=t.constructor)&&o!==r&&n(a=o.prototype)&&a!==r.prototype&&i(e,a),e}},336:function(e,t,r){"use strict";function n(e,t,r){var n,i;void 0===r&&(r="error");var o=new Promise((function(e,t){n=e,i=t}));return e.addEventListener(t,n),e.addEventListener(r,i),o.finally((function(){e.removeEventListener(t,n),e.removeEventListener(r,i)})),o}function i(e){return new Promise((function(t){return setTimeout(t,e)}))}r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i}))},350:function(e,t,r){"use strict";r(25);var n,i=r(0),o=r(7),a=r(351),s=r(3),c=r(187),d=r(13),p=r(172),u=r(6),f=r(189),l=r(192),h=r(111).codeAt,m=r(386),v=r(44),g=r(387),y=r(29),C=s.URL,S=g.URLSearchParams,T=g.getState,R=y.set,P=y.getterFor("URL"),b=Math.floor,E=Math.pow,k=/[A-Za-z]/,w=/[\d+-.A-Za-z]/,_=/\d/,x=/^(0x|0X)/,D=/^[0-7]+$/,I=/^\d+$/,O=/^[\dA-Fa-f]+$/,M=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,L=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,j=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,A=/[\u0009\u000A\u000D]/g,U=function(e,t){var r,n,i;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return"Invalid host";if(!(r=F(t.slice(1,-1))))return"Invalid host";e.host=r}else if(K(e)){if(t=m(t),M.test(t))return"Invalid host";if(null===(r=N(t)))return"Invalid host";e.host=r}else{if(L.test(t))return"Invalid host";for(r="",n=l(t),i=0;i4)return e;for(r=[],n=0;n1&&"0"==i.charAt(0)&&(o=x.test(i)?16:8,i=i.slice(8==o?1:2)),""===i)a=0;else{if(!(10==o?I:8==o?D:O).test(i))return e;a=parseInt(i,o)}r.push(a)}for(n=0;n=E(256,5-t))return null}else if(a>255)return null;for(s=r.pop(),n=0;n6)return;for(n=0;f();){if(i=null,n>0){if(!("."==f()&&n<4))return;u++}if(!_.test(f()))return;for(;_.test(f());){if(o=parseInt(f(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;u++}c[d]=256*c[d]+i,2!=++n&&4!=n||d++}if(4!=n)return;break}if(":"==f()){if(u++,!f())return}else if(f())return;c[d++]=t}else{if(null!==p)return;u++,p=++d}}if(null!==p)for(a=d-p,d=7;0!=d&&a>0;)s=c[d],c[d--]=c[p+a-1],c[p+--a]=s;else if(8!=d)return;return c},G=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)t.unshift(e%256),e=b(e/256);return t.join(".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,o=0;o<8;o++)0!==e[o]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=o),++i);return i>r&&(t=n,r=i),t}(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=e[r].toString(16),r<7&&(t+=":")));return"["+t+"]"}return e},z={},B=f({},z,{" ":1,'"':1,"<":1,">":1,"`":1}),q=f({},B,{"#":1,"?":1,"{":1,"}":1}),J=f({},q,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),V=function(e,t){var r=h(e,0);return r>32&&r<127&&!u(t,e)?e:encodeURIComponent(e)},W={ftp:21,file:null,http:80,https:443,ws:80,wss:443},K=function(e){return u(W,e.scheme)},$=function(e){return""!=e.username||""!=e.password},H=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},X=function(e,t){var r;return 2==e.length&&k.test(e.charAt(0))&&(":"==(r=e.charAt(1))||!t&&"|"==r)},Z=function(e){var t;return e.length>1&&X(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},Q=function(e){var t=e.path,r=t.length;!r||"file"==e.scheme&&1==r&&X(t[0],!0)||t.pop()},Y=function(e){return"."===e||"%2e"===e.toLowerCase()},ee={},te={},re={},ne={},ie={},oe={},ae={},se={},ce={},de={},pe={},ue={},fe={},le={},he={},me={},ve={},ge={},ye={},Ce={},Se={},Te=function(e,t,r,i){var o,a,s,c,d,p=r||ee,f=0,h="",m=!1,v=!1,g=!1;for(r||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(j,"")),t=t.replace(A,""),o=l(t);f<=o.length;){switch(a=o[f],p){case ee:if(!a||!k.test(a)){if(r)return"Invalid scheme";p=re;continue}h+=a.toLowerCase(),p=te;break;case te:if(a&&(w.test(a)||"+"==a||"-"==a||"."==a))h+=a.toLowerCase();else{if(":"!=a){if(r)return"Invalid scheme";h="",p=re,f=0;continue}if(r&&(K(e)!=u(W,h)||"file"==h&&($(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=h,r)return void(K(e)&&W[e.scheme]==e.port&&(e.port=null));h="","file"==e.scheme?p=le:K(e)&&i&&i.scheme==e.scheme?p=ne:K(e)?p=se:"/"==o[f+1]?(p=ie,f++):(e.cannotBeABaseURL=!0,e.path.push(""),p=ye)}break;case re:if(!i||i.cannotBeABaseURL&&"#"!=a)return"Invalid scheme";if(i.cannotBeABaseURL&&"#"==a){e.scheme=i.scheme,e.path=i.path.slice(),e.query=i.query,e.fragment="",e.cannotBeABaseURL=!0,p=Se;break}p="file"==i.scheme?le:oe;continue;case ne:if("/"!=a||"/"!=o[f+1]){p=oe;continue}p=ce,f++;break;case ie:if("/"==a){p=de;break}p=ge;continue;case oe:if(e.scheme=i.scheme,a==n)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query;else if("/"==a||"\\"==a&&K(e))p=ae;else if("?"==a)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query="",p=Ce;else{if("#"!=a){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.path.pop(),p=ge;continue}e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query,e.fragment="",p=Se}break;case ae:if(!K(e)||"/"!=a&&"\\"!=a){if("/"!=a){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,p=ge;continue}p=de}else p=ce;break;case se:if(p=ce,"/"!=a||"/"!=h.charAt(f+1))continue;f++;break;case ce:if("/"!=a&&"\\"!=a){p=de;continue}break;case de:if("@"==a){m&&(h="%40"+h),m=!0,s=l(h);for(var y=0;y65535)return"Invalid port";e.port=K(e)&&T===W[e.scheme]?null:T,h=""}if(r)return;p=ve;continue}return"Invalid port"}h+=a;break;case le:if(e.scheme="file","/"==a||"\\"==a)p=he;else{if(!i||"file"!=i.scheme){p=ge;continue}if(a==n)e.host=i.host,e.path=i.path.slice(),e.query=i.query;else if("?"==a)e.host=i.host,e.path=i.path.slice(),e.query="",p=Ce;else{if("#"!=a){Z(o.slice(f).join(""))||(e.host=i.host,e.path=i.path.slice(),Q(e)),p=ge;continue}e.host=i.host,e.path=i.path.slice(),e.query=i.query,e.fragment="",p=Se}}break;case he:if("/"==a||"\\"==a){p=me;break}i&&"file"==i.scheme&&!Z(o.slice(f).join(""))&&(X(i.path[0],!0)?e.path.push(i.path[0]):e.host=i.host),p=ge;continue;case me:if(a==n||"/"==a||"\\"==a||"?"==a||"#"==a){if(!r&&X(h))p=ge;else if(""==h){if(e.host="",r)return;p=ve}else{if(c=U(e,h))return c;if("localhost"==e.host&&(e.host=""),r)return;h="",p=ve}continue}h+=a;break;case ve:if(K(e)){if(p=ge,"/"!=a&&"\\"!=a)continue}else if(r||"?"!=a)if(r||"#"!=a){if(a!=n&&(p=ge,"/"!=a))continue}else e.fragment="",p=Se;else e.query="",p=Ce;break;case ge:if(a==n||"/"==a||"\\"==a&&K(e)||!r&&("?"==a||"#"==a)){if(".."===(d=(d=h).toLowerCase())||"%2e."===d||".%2e"===d||"%2e%2e"===d?(Q(e),"/"==a||"\\"==a&&K(e)||e.path.push("")):Y(h)?"/"==a||"\\"==a&&K(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&X(h)&&(e.host&&(e.host=""),h=h.charAt(0)+":"),e.path.push(h)),h="","file"==e.scheme&&(a==n||"?"==a||"#"==a))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==a?(e.query="",p=Ce):"#"==a&&(e.fragment="",p=Se)}else h+=V(a,q);break;case ye:"?"==a?(e.query="",p=Ce):"#"==a?(e.fragment="",p=Se):a!=n&&(e.path[0]+=V(a,z));break;case Ce:r||"#"!=a?a!=n&&("'"==a&&K(e)?e.query+="%27":e.query+="#"==a?"%23":V(a,z)):(e.fragment="",p=Se);break;case Se:a!=n&&(e.fragment+=V(a,B))}f++}},Re=function(e){var t,r,n=p(this,Re,"URL"),i=arguments.length>1?arguments[1]:void 0,a=String(e),s=R(n,{type:"URL"});if(void 0!==i)if(i instanceof Re)t=P(i);else if(r=Te(t={},String(i)))throw TypeError(r);if(r=Te(s,a,null,t))throw TypeError(r);var c=s.searchParams=new S,d=T(c);d.updateSearchParams(s.query),d.updateURL=function(){s.query=String(c)||null},o||(n.href=be.call(n),n.origin=Ee.call(n),n.protocol=ke.call(n),n.username=we.call(n),n.password=_e.call(n),n.host=xe.call(n),n.hostname=De.call(n),n.port=Ie.call(n),n.pathname=Oe.call(n),n.search=Me.call(n),n.searchParams=Le.call(n),n.hash=je.call(n))},Pe=Re.prototype,be=function(){var e=P(this),t=e.scheme,r=e.username,n=e.password,i=e.host,o=e.port,a=e.path,s=e.query,c=e.fragment,d=t+":";return null!==i?(d+="//",$(e)&&(d+=r+(n?":"+n:"")+"@"),d+=G(i),null!==o&&(d+=":"+o)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==s&&(d+="?"+s),null!==c&&(d+="#"+c),d},Ee=function(){var e=P(this),t=e.scheme,r=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&K(e)?t+"://"+G(e.host)+(null!==r?":"+r:""):"null"},ke=function(){return P(this).scheme+":"},we=function(){return P(this).username},_e=function(){return P(this).password},xe=function(){var e=P(this),t=e.host,r=e.port;return null===t?"":null===r?G(t):G(t)+":"+r},De=function(){var e=P(this).host;return null===e?"":G(e)},Ie=function(){var e=P(this).port;return null===e?"":String(e)},Oe=function(){var e=P(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Me=function(){var e=P(this).query;return e?"?"+e:""},Le=function(){return P(this).searchParams},je=function(){var e=P(this).fragment;return e?"#"+e:""},Ae=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(o&&c(Pe,{href:Ae(be,(function(e){var t=P(this),r=String(e),n=Te(t,r);if(n)throw TypeError(n);T(t.searchParams).updateSearchParams(t.query)})),origin:Ae(Ee),protocol:Ae(ke,(function(e){var t=P(this);Te(t,String(e)+":",ee)})),username:Ae(we,(function(e){var t=P(this),r=l(String(e));if(!H(t)){t.username="";for(var n=0;n0?t[0].split("/")[1]:"sendrecv",uri:t[1]}},n.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+"\r\n"},n.parseFmtp=function(e){for(var t,r={},n=e.substr(e.indexOf(" ")+1).split(";"),i=0;i-1?(r.attribute=e.substr(t+1,n-t-1),r.value=e.substr(n+1)):r.attribute=e.substr(t+1),r},n.parseSsrcGroup=function(e){var t=e.substr(13).split(" ");return{semantics:t.shift(),ssrcs:t.map((function(e){return parseInt(e,10)}))}},n.getMid=function(e){var t=n.matchPrefix(e,"a=mid:")[0];if(t)return t.substr(6)},n.parseFingerprint=function(e){var t=e.substr(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1]}},n.getDtlsParameters=function(e,t){return{role:"auto",fingerprints:n.matchPrefix(e+t,"a=fingerprint:").map(n.parseFingerprint)}},n.writeDtlsParameters=function(e,t){var r="a=setup:"+t+"\r\n";return e.fingerprints.forEach((function(e){r+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"})),r},n.parseCryptoLine=function(e){var t=e.substr(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},n.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?n.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},n.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;var t=e.substr(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},n.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},n.getCryptoParameters=function(e,t){return n.matchPrefix(e+t,"a=crypto:").map(n.parseCryptoLine)},n.getIceParameters=function(e,t){var r=n.matchPrefix(e+t,"a=ice-ufrag:")[0],i=n.matchPrefix(e+t,"a=ice-pwd:")[0];return r&&i?{usernameFragment:r.substr(12),password:i.substr(10)}:null},n.writeIceParameters=function(e){return"a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n"},n.parseRtpParameters=function(e){for(var t={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=n.splitLines(e)[0].split(" "),i=3;i0?"9":"0",r+=" UDP/TLS/RTP/SAVPF ",r+=t.codecs.map((function(e){return void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType})).join(" ")+"\r\n",r+="c=IN IP4 0.0.0.0\r\n",r+="a=rtcp:9 IN IP4 0.0.0.0\r\n",t.codecs.forEach((function(e){r+=n.writeRtpMap(e),r+=n.writeFmtp(e),r+=n.writeRtcpFb(e)}));var i=0;return t.codecs.forEach((function(e){e.maxptime>i&&(i=e.maxptime)})),i>0&&(r+="a=maxptime:"+i+"\r\n"),r+="a=rtcp-mux\r\n",t.headerExtensions&&t.headerExtensions.forEach((function(e){r+=n.writeExtmap(e)})),r},n.parseRtpEncodingParameters=function(e){var t,r=[],i=n.parseRtpParameters(e),o=-1!==i.fecMechanisms.indexOf("RED"),a=-1!==i.fecMechanisms.indexOf("ULPFEC"),s=n.matchPrefix(e,"a=ssrc:").map((function(e){return n.parseSsrcMedia(e)})).filter((function(e){return"cname"===e.attribute})),c=s.length>0&&s[0].ssrc,d=n.matchPrefix(e,"a=ssrc-group:FID").map((function(e){return e.substr(17).split(" ").map((function(e){return parseInt(e,10)}))}));d.length>0&&d[0].length>1&&d[0][0]===c&&(t=d[0][1]),i.codecs.forEach((function(e){if("RTX"===e.name.toUpperCase()&&e.parameters.apt){var n={ssrc:c,codecPayloadType:parseInt(e.parameters.apt,10)};c&&t&&(n.rtx={ssrc:t}),r.push(n),o&&((n=JSON.parse(JSON.stringify(n))).fec={ssrc:c,mechanism:a?"red+ulpfec":"red"},r.push(n))}})),0===r.length&&c&&r.push({ssrc:c});var p=n.matchPrefix(e,"b=");return p.length&&(p=0===p[0].indexOf("b=TIAS:")?parseInt(p[0].substr(7),10):0===p[0].indexOf("b=AS:")?1e3*parseInt(p[0].substr(5),10)*.95-16e3:void 0,r.forEach((function(e){e.maxBitrate=p}))),r},n.parseRtcpParameters=function(e){var t={},r=n.matchPrefix(e,"a=ssrc:").map((function(e){return n.parseSsrcMedia(e)})).filter((function(e){return"cname"===e.attribute}))[0];r&&(t.cname=r.value,t.ssrc=r.ssrc);var i=n.matchPrefix(e,"a=rtcp-rsize");t.reducedSize=i.length>0,t.compound=0===i.length;var o=n.matchPrefix(e,"a=rtcp-mux");return t.mux=o.length>0,t},n.parseMsid=function(e){var t,r=n.matchPrefix(e,"a=msid:");if(1===r.length)return{stream:(t=r[0].substr(7).split(" "))[0],track:t[1]};var i=n.matchPrefix(e,"a=ssrc:").map((function(e){return n.parseSsrcMedia(e)})).filter((function(e){return"msid"===e.attribute}));return i.length>0?{stream:(t=i[0].value.split(" "))[0],track:t[1]}:void 0},n.parseSctpDescription=function(e){var t,r=n.parseMLine(e),i=n.matchPrefix(e,"a=max-message-size:");i.length>0&&(t=parseInt(i[0].substr(19),10)),isNaN(t)&&(t=65536);var o=n.matchPrefix(e,"a=sctp-port:");if(o.length>0)return{port:parseInt(o[0].substr(12),10),protocol:r.fmt,maxMessageSize:t};if(n.matchPrefix(e,"a=sctpmap:").length>0){var a=n.matchPrefix(e,"a=sctpmap:")[0].substr(10).split(" ");return{port:parseInt(a[0],10),protocol:a[1],maxMessageSize:t}}},n.writeSctpDescription=function(e,t){var r=[];return r="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&r.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),r.join("")},n.generateSessionId=function(){return Math.random().toString().substr(2,21)},n.writeSessionBoilerplate=function(e,t,r){var i=void 0!==t?t:2;return"v=0\r\no="+(r||"thisisadapterortc")+" "+(e||n.generateSessionId())+" "+i+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},n.writeMediaSection=function(e,t,r,i){var o=n.writeRtpDescription(e.kind,t);if(o+=n.writeIceParameters(e.iceGatherer.getLocalParameters()),o+=n.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===r?"actpass":"active"),o+="a=mid:"+e.mid+"\r\n",e.direction?o+="a="+e.direction+"\r\n":e.rtpSender&&e.rtpReceiver?o+="a=sendrecv\r\n":e.rtpSender?o+="a=sendonly\r\n":e.rtpReceiver?o+="a=recvonly\r\n":o+="a=inactive\r\n",e.rtpSender){var a="msid:"+i.id+" "+e.rtpSender.track.id+"\r\n";o+="a="+a,o+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+a,e.sendEncodingParameters[0].rtx&&(o+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+a,o+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return o+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+n.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(o+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+n.localCName+"\r\n"),o},n.getDirection=function(e,t){for(var r=n.splitLines(e),i=0;iPromise.reject(function(e){return{name:{PermissionDeniedError:"NotAllowedError"}[e.name]||e.name,message:e.message,constraint:e.constraint,toString(){return this.name}}}(e)))}}function f(e){"getDisplayMedia"in e.navigator&&e.navigator.mediaDevices&&(e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||(e.navigator.mediaDevices.getDisplayMedia=e.navigator.getDisplayMedia.bind(e.navigator)))}function l(e){const t=s.c(e);if(e.RTCIceGatherer&&(e.RTCIceCandidate||(e.RTCIceCandidate=function(e){return e}),e.RTCSessionDescription||(e.RTCSessionDescription=function(e){return e}),t.version<15025)){const t=Object.getOwnPropertyDescriptor(e.MediaStreamTrack.prototype,"enabled");Object.defineProperty(e.MediaStreamTrack.prototype,"enabled",{set(e){t.set.call(this,e);const r=new Event("enabled");r.enabled=e,this.dispatchEvent(r)}})}e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)&&Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=new e.RTCDtmfSender(this):"video"===this.track.kind&&(this._dtmf=null)),this._dtmf}}),e.RTCDtmfSender&&!e.RTCDTMFSender&&(e.RTCDTMFSender=e.RTCDtmfSender);const r=p()(e,t.version);e.RTCPeerConnection=function(e){return e&&e.iceServers&&(e.iceServers=function(e,t){let r=!1;return(e=JSON.parse(JSON.stringify(e))).filter(e=>{if(e&&(e.urls||e.url)){var t=e.urls||e.url;e.url&&!e.urls&&s.b("RTCIceServer.url","RTCIceServer.urls");const n="string"==typeof t;return n&&(t=[t]),t=t.filter(e=>{if(0===e.indexOf("stun:"))return!1;const t=e.startsWith("turn")&&!e.startsWith("turn:[")&&e.includes("transport=udp");return t&&!r?(r=!0,!0):t&&!r}),delete e.url,e.urls=n?t[0]:t,!!t.length}})}(e.iceServers,t.version),s.h("ICE servers after filtering:",e.iceServers)),new r(e)},e.RTCPeerConnection.prototype=r.prototype}function h(e){e.RTCRtpSender&&!("replaceTrack"in e.RTCRtpSender.prototype)&&(e.RTCRtpSender.prototype.replaceTrack=e.RTCRtpSender.prototype.setTrack)}function m(e){const t=s.c(e),r=e&&e.navigator,n=e&&e.MediaStreamTrack;if(r.getUserMedia=function(e,t,n){s.b("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),r.mediaDevices.getUserMedia(e).then(t,n)},!(t.version>55&&"autoGainControl"in r.mediaDevices.getSupportedConstraints())){const e=function(e,t,r){t in e&&!(r in e)&&(e[r]=e[t],delete e[t])},t=r.mediaDevices.getUserMedia.bind(r.mediaDevices);if(r.mediaDevices.getUserMedia=function(r){return"object"==typeof r&&"object"==typeof r.audio&&(r=JSON.parse(JSON.stringify(r)),e(r.audio,"autoGainControl","mozAutoGainControl"),e(r.audio,"noiseSuppression","mozNoiseSuppression")),t(r)},n&&n.prototype.getSettings){const t=n.prototype.getSettings;n.prototype.getSettings=function(){const r=t.apply(this,arguments);return e(r,"mozAutoGainControl","autoGainControl"),e(r,"mozNoiseSuppression","noiseSuppression"),r}}if(n&&n.prototype.applyConstraints){const t=n.prototype.applyConstraints;n.prototype.applyConstraints=function(r){return"audio"===this.kind&&"object"==typeof r&&(r=JSON.parse(JSON.stringify(r)),e(r,"autoGainControl","mozAutoGainControl"),e(r,"noiseSuppression","mozNoiseSuppression")),t.apply(this,[r])}}}}function v(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(r){if(!r||!r.video){const e=new DOMException("getDisplayMedia without video constraints is undefined");return e.name="NotFoundError",e.code=8,Promise.reject(e)}return!0===r.video?r.video={mediaSource:t}:r.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(r)})}function g(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function y(e){const t=s.c(e);if("object"!=typeof e||!e.RTCPeerConnection&&!e.mozRTCPeerConnection)return;if(!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){const r=e.RTCPeerConnection.prototype[t],n={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),r.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=n[t]})),t.version<68){const t=e.RTCPeerConnection.prototype.addIceCandidate;e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?arguments[0]&&""===arguments[0].candidate?Promise.resolve():t.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}const r={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},n=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,i,o]=arguments;return n.apply(this,[e||null]).then(e=>{if(t.version<53&&!i)try{e.forEach(e=>{e.type=r[e.type]||e.type})}catch(t){if("TypeError"!==t.name)throw t;e.forEach((t,n)=>{e.set(n,Object.assign({},t,{type:r[t.type]||t.type}))})}return e}).then(i,o)}}function C(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const r=e.RTCPeerConnection.prototype.addTrack;r&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=r.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function S(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),s.i(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function T(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){s.b("removeStream","removeTrack"),this.getSenders().forEach(t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)})})}function R(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function P(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];const e=arguments[1],r=e&&"sendEncodings"in e;r&&e.sendEncodings.forEach(e=>{if("rid"in e){if(!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const n=t.apply(this,arguments);if(r){const{sender:t}=n,r=t.getParameters();"encodings"in r||(r.encodings=e.sendEncodings,t.sendEncodings=e.sendEncodings,this.setParametersPromises.push(t.setParameters(r).then(()=>{delete t.sendEncodings}).catch(()=>{delete t.sendEncodings})))}return n})}function b(e){if("object"!=typeof e||!e.RTCRtpSender)return;const t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){var e=t.apply(this,arguments);return"sendEncodings"in this?Object.assign({},{encodings:this.sendEncodings},e):e})}function E(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}function k(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}function w(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach(r=>t.call(this,r,e)),e.getVideoTracks().forEach(r=>t.call(this,r,e))},e.RTCPeerConnection.prototype.addTrack=function(e,...r){return r&&r.forEach(e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]}),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);const t=this._localStreams.indexOf(e);if(-1===t)return;this._localStreams.splice(t,1);const r=e.getTracks();this.getSenders().forEach(e=>{r.includes(e.track)&&this.removeTrack(e)})})}}function _(e){if("object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach(e=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(e))return;this._remoteStreams.push(e);const t=new Event("addstream");t.stream=e,this.dispatchEvent(t)})})}});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach(t=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);const r=new Event("addstream");r.stream=t,e.dispatchEvent(r)})}),t.apply(e,arguments)}}}function x(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,r=t.createOffer,n=t.createAnswer,i=t.setLocalDescription,o=t.setRemoteDescription,a=t.addIceCandidate;t.createOffer=function(e,t){const n=arguments.length>=2?arguments[2]:arguments[0],i=r.apply(this,[n]);return t?(i.then(e,t),Promise.resolve()):i},t.createAnswer=function(e,t){const r=arguments.length>=2?arguments[2]:arguments[0],i=n.apply(this,[r]);return t?(i.then(e,t),Promise.resolve()):i};let s=function(e,t,r){const n=i.apply(this,[e]);return r?(n.then(t,r),Promise.resolve()):n};t.setLocalDescription=s,s=function(e,t,r){const n=o.apply(this,[e]);return r?(n.then(t,r),Promise.resolve()):n},t.setRemoteDescription=s,s=function(e,t,r){const n=a.apply(this,[e]);return r?(n.then(t,r),Promise.resolve()):n},t.addIceCandidate=s}function D(e){const t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){const e=t.mediaDevices,r=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>r(I(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,r,n){t.mediaDevices.getUserMedia(e).then(r,n)}.bind(t))}function I(e){return e&&void 0!==e.video?Object.assign({},e,{video:s.a(e.video)}):e}function O(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,r){if(e&&e.iceServers){const t=[];for(let r=0;rt.generateCertificate})}function M(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function L(e){const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);const t=this.getTransceivers().find(e=>"audio"===e.receiver.track.kind);!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":"recvonly"===t.direction&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio"),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);const r=this.getTransceivers().find(e=>"video"===e.receiver.track.kind);!1===e.offerToReceiveVideo&&r?"sendrecv"===r.direction?r.setDirection?r.setDirection("sendonly"):r.direction="sendonly":"recvonly"===r.direction&&(r.setDirection?r.setDirection("inactive"):r.direction="inactive"):!0!==e.offerToReceiveVideo||r||this.addTransceiver("video")}return t.apply(this,arguments)}}function j(e){"object"!=typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var A=r(352),U=r.n(A);function N(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;const t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"==typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substr(2)),e.candidate&&e.candidate.length){const r=new t(e),n=U.a.parseCandidate(e.candidate),i=Object.assign(r,n);return i.toJSON=function(){return{candidate:i.candidate,sdpMid:i.sdpMid,sdpMLineIndex:i.sdpMLineIndex,usernameFragment:i.usernameFragment}},i}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,s.i(e,"icecandidate",t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t))}function F(e){if(!e.RTCPeerConnection)return;const t=s.c(e);"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return void 0===this._sctp?null:this._sctp}});const r=function(e){if(!e||!e.sdp)return!1;const t=U.a.splitSections(e.sdp);return t.shift(),t.some(e=>{const t=U.a.parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")})},n=function(e){const t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;const r=parseInt(t[1],10);return r!=r?-1:r},i=function(e){let r=65536;return"firefox"===t.browser&&(r=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),r},o=function(e,r){let n=65536;"firefox"===t.browser&&57===t.version&&(n=65535);const i=U.a.matchPrefix(e.sdp,"a=max-message-size:");return i.length>0?n=parseInt(i[0].substr(19),10):"firefox"===t.browser&&-1!==r&&(n=2147483637),n},a=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){const{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(r(arguments[0])){const e=n(arguments[0]),t=i(e),r=o(arguments[0],e);let a;a=0===t&&0===r?Number.POSITIVE_INFINITY:0===t||0===r?Math.max(t,r):Math.min(t,r);const s={};Object.defineProperty(s,"maxMessageSize",{get:()=>a}),this._sctp=s}return a.apply(this,arguments)}}function G(e){if(!e.RTCPeerConnection||!("createDataChannel"in e.RTCPeerConnection.prototype))return;function t(e,t){const r=e.send;e.send=function(){const n=arguments[0],i=n.length||n.size||n.byteLength;if("open"===e.readyState&&t.sctp&&i>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return r.apply(e,arguments)}}const r=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){const e=r.apply(this,arguments);return t(e,this),e},s.i(e,"datachannel",e=>(t(e.channel,e.target),e))}function z(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;const t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(e=>{const r=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{const t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;const r=new Event("connectionstatechange",e);t.dispatchEvent(r)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),r.apply(this,arguments)}})}function B(e){if(!e.RTCPeerConnection)return;const t=s.c(e);if("chrome"===t.browser&&t.version>=71)return;if("safari"===t.browser&&t.version>=605)return;const r=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(e){return e&&e.sdp&&-1!==e.sdp.indexOf("\na=extmap-allow-mixed")&&(e.sdp=e.sdp.split("\n").filter(e=>"a=extmap-allow-mixed"!==e.trim()).join("\n")),r.apply(this,arguments)}}function q({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimEdge:!0,shimSafari:!0}){const r=s.h,d=s.c(e),p={browserDetails:d,commonShim:a,extractVersion:s.f,disableLog:s.d,disableWarnings:s.e};switch(d.browser){case"chrome":if(!c||!c.shimPeerConnection||!t.shimChrome)return r("Chrome shim is not included in this adapter release."),p;if(null===d.version)return r("Chrome shim can not determine version, not shimming."),p;r("adapter.js shimming chrome."),p.browserShim=c,c.shimGetUserMedia(e),c.shimMediaStream(e),c.shimPeerConnection(e),c.shimOnTrack(e),c.shimAddTrackRemoveTrack(e),c.shimGetSendersWithDtmf(e),c.shimGetStats(e),c.shimSenderReceiverGetStats(e),c.fixNegotiationNeeded(e),N(e),z(e),F(e),G(e),B(e);break;case"firefox":if(!i||!y||!t.shimFirefox)return r("Firefox shim is not included in this adapter release."),p;r("adapter.js shimming firefox."),p.browserShim=i,m(e),y(e),g(e),T(e),C(e),S(e),R(e),P(e),b(e),E(e),k(e),N(e),z(e),F(e),G(e);break;case"edge":if(!n||!l||!t.shimEdge)return r("MS edge shim is not included in this adapter release."),p;r("adapter.js shimming edge."),p.browserShim=n,u(e),f(e),l(e),h(e),F(e),G(e);break;case"safari":if(!o||!t.shimSafari)return r("Safari shim is not included in this adapter release."),p;r("adapter.js shimming safari."),p.browserShim=o,O(e),L(e),x(e),w(e),_(e),M(e),D(e),j(e),N(e),F(e),G(e),B(e);break;default:r("Unsupported browser!")}return p}},366:function(e,t,r){"use strict";r.r(t),r.d(t,"shimGetUserMedia",(function(){return o})),r.d(t,"shimGetDisplayMedia",(function(){return a})),r.d(t,"shimMediaStream",(function(){return s})),r.d(t,"shimOnTrack",(function(){return c})),r.d(t,"shimGetSendersWithDtmf",(function(){return d})),r.d(t,"shimGetStats",(function(){return p})),r.d(t,"shimSenderReceiverGetStats",(function(){return u})),r.d(t,"shimAddTrackRemoveTrackWithNative",(function(){return f})),r.d(t,"shimAddTrackRemoveTrack",(function(){return l})),r.d(t,"shimPeerConnection",(function(){return h})),r.d(t,"fixNegotiationNeeded",(function(){return m}));var n=r(308);const i=n.h;function o(e){const t=e&&e.navigator;if(!t.mediaDevices)return;const r=n.c(e),o=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;const t={};return Object.keys(e).forEach(r=>{if("require"===r||"advanced"===r||"mediaSource"===r)return;const n="object"==typeof e[r]?e[r]:{ideal:e[r]};void 0!==n.exact&&"number"==typeof n.exact&&(n.min=n.max=n.exact);const i=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==n.ideal){t.optional=t.optional||[];let e={};"number"==typeof n.ideal?(e[i("min",r)]=n.ideal,t.optional.push(e),e={},e[i("max",r)]=n.ideal,t.optional.push(e)):(e[i("",r)]=n.ideal,t.optional.push(e))}void 0!==n.exact&&"number"!=typeof n.exact?(t.mandatory=t.mandatory||{},t.mandatory[i("",r)]=n.exact):["min","max"].forEach(e=>{void 0!==n[e]&&(t.mandatory=t.mandatory||{},t.mandatory[i(e,r)]=n[e])})}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},a=function(e,n){if(r.version>=61)return n(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"==typeof e.audio){const t=function(e,t,r){t in e&&!(r in e)&&(e[r]=e[t],delete e[t])};t((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),t(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=o(e.audio)}if(e&&"object"==typeof e.video){let a=e.video.facingMode;a=a&&("object"==typeof a?a:{ideal:a});const s=r.version<66;if(a&&("user"===a.exact||"environment"===a.exact||"user"===a.ideal||"environment"===a.ideal)&&(!t.mediaDevices.getSupportedConstraints||!t.mediaDevices.getSupportedConstraints().facingMode||s)){let r;if(delete e.video.facingMode,"environment"===a.exact||"environment"===a.ideal?r=["back","rear"]:"user"!==a.exact&&"user"!==a.ideal||(r=["front"]),r)return t.mediaDevices.enumerateDevices().then(t=>{let s=(t=t.filter(e=>"videoinput"===e.kind)).find(e=>r.some(t=>e.label.toLowerCase().includes(t)));return!s&&t.length&&r.includes("back")&&(s=t[t.length-1]),s&&(e.video.deviceId=a.exact?{exact:s.deviceId}:{ideal:s.deviceId}),e.video=o(e.video),i("chrome: "+JSON.stringify(e)),n(e)})}e.video=o(e.video)}return i("chrome: "+JSON.stringify(e)),n(e)},s=function(e){return r.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(t.getUserMedia=function(e,r,n){a(e,e=>{t.webkitGetUserMedia(e,r,e=>{n&&n(s(e))})})}.bind(t),t.mediaDevices.getUserMedia){const e=t.mediaDevices.getUserMedia.bind(t.mediaDevices);t.mediaDevices.getUserMedia=function(t){return a(t,t=>e(t).then(e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(e=>{e.stop()}),new DOMException("","NotFoundError");return e},e=>Promise.reject(s(e))))}}}function a(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&("function"==typeof t?e.navigator.mediaDevices.getDisplayMedia=function(r){return t(r).then(t=>{const n=r.video&&r.video.width,i=r.video&&r.video.height,o=r.video&&r.video.frameRate;return r.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t,maxFrameRate:o||3}},n&&(r.video.mandatory.maxWidth=n),i&&(r.video.mandatory.maxHeight=i),e.navigator.mediaDevices.getUserMedia(r)})}:console.error("shimGetDisplayMedia: getSourceId argument is not a function"))}function s(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function c(e){if("object"==typeof e&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener("addtrack",r=>{let n;n=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===r.track.id):{track:r.track};const i=new Event("track");i.track=r.track,i.receiver=n,i.transceiver={receiver:n},i.streams=[t.stream],this.dispatchEvent(i)}),t.stream.getTracks().forEach(r=>{let n;n=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===r.id):{track:r};const i=new Event("track");i.track=r,i.receiver=n,i.transceiver={receiver:n},i.streams=[t.stream],this.dispatchEvent(i)})},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else n.i(e,"track",e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}function d(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const r=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){let i=r.apply(this,arguments);return i||(i=t(this,e),this._senders.push(i)),i};const n=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){n.apply(this,arguments);const t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}const r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach(e=>{this._senders.push(t(this,e))})};const n=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach(e=>{const t=this._senders.find(t=>t.track===e);t&&this._senders.splice(this._senders.indexOf(t),1)})}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function p(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,r,n]=arguments;if(arguments.length>0&&"function"==typeof e)return t.apply(this,arguments);if(0===t.length&&(0===arguments.length||"function"!=typeof e))return t.apply(this,[]);const i=function(e){const t={};return e.result().forEach(e=>{const r={id:e.id,timestamp:e.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[e.type]||e.type};e.names().forEach(t=>{r[t]=e.stat(t)}),t[r.id]=r}),t},o=function(e){return new Map(Object.keys(e).map(t=>[t,e[t]]))};if(arguments.length>=2){const n=function(e){r(o(i(e)))};return t.apply(this,[n,e])}return new Promise((e,r)=>{t.apply(this,[function(t){e(o(i(t)))},r])}).then(r,n)}}function u(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const r=e.RTCPeerConnection.prototype.addTrack;r&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=r.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>n.g(t,e.track,!0))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),n.i(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>n.g(t,e.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype)||!("getStats"in e.RTCRtpReceiver.prototype))return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const e=arguments[0];let t,r,n;return this.getSenders().forEach(r=>{r.track===e&&(t?n=!0:t=r)}),this.getReceivers().forEach(t=>(t.track===e&&(r?n=!0:r=t),t.track===e)),n||t&&r?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():r?r.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function f(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(e=>this._shimmedLocalStreams[e][0])};const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){if(!r)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const n=t.apply(this,arguments);return this._shimmedLocalStreams[r.id]?-1===this._shimmedLocalStreams[r.id].indexOf(n)&&this._shimmedLocalStreams[r.id].push(n):this._shimmedLocalStreams[r.id]=[r,n],n};const r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException("Track already exists.","InvalidAccessError")});const t=this.getSenders();r.apply(this,arguments);const n=this.getSenders().filter(e=>-1===t.indexOf(e));this._shimmedLocalStreams[e.id]=[e].concat(n)};const n=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],n.apply(this,arguments)};const i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach(t=>{const r=this._shimmedLocalStreams[t].indexOf(e);-1!==r&&this._shimmedLocalStreams[t].splice(r,1),1===this._shimmedLocalStreams[t].length&&delete this._shimmedLocalStreams[t]}),i.apply(this,arguments)}}function l(e){if(!e.RTCPeerConnection)return;const t=n.c(e);if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return f(e);const r=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const e=r.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map(e=>this._reverseStreams[e.id])};const i=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[t.id]){const r=new e.MediaStream(t.getTracks());this._streams[t.id]=r,this._reverseStreams[r.id]=t,t=r}i.apply(this,[t])};const o=e.RTCPeerConnection.prototype.removeStream;function a(e,t){let r=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const n=e._reverseStreams[t],i=e._streams[n.id];r=r.replace(new RegExp(i.id,"g"),n.id)}),new RTCSessionDescription({type:t.type,sdp:r})}function s(e,t){let r=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const n=e._reverseStreams[t],i=e._streams[n.id];r=r.replace(new RegExp(n.id,"g"),i.id)}),new RTCSessionDescription({type:t.type,sdp:r})}e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},o.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,r){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const n=[].slice.call(arguments,1);if(1!==n.length||!n[0].getTracks().find(e=>e===t))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");const i=this.getSenders().find(e=>e.track===t);if(i)throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const o=this._streams[r.id];if(o)o.addTrack(t),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const n=new e.MediaStream([t]);this._streams[r.id]=n,this._reverseStreams[n.id]=r,this.addStream(n)}return this.getSenders().find(e=>e.track===t)},["createOffer","createAnswer"].forEach((function(t){const r=e.RTCPeerConnection.prototype[t],n={[t](){const e=arguments;return arguments.length&&"function"==typeof arguments[0]?r.apply(this,[t=>{const r=a(this,t);e[0].apply(null,[r])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):r.apply(this,arguments).then(e=>a(this,e))}};e.RTCPeerConnection.prototype[t]=n[t]}));const c=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=s(this,arguments[0]),c.apply(this,arguments)):c.apply(this,arguments)};const d=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const e=d.get.apply(this);return""===e.type?e:a(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(e._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let t;this._streams=this._streams||{},Object.keys(this._streams).forEach(r=>{this._streams[r].getTracks().find(t=>e.track===t)&&(t=this._streams[r])}),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function h(e){const t=n.c(e);if(!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),!e.RTCPeerConnection)return;const r=0===e.RTCPeerConnection.prototype.addIceCandidate.length;t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){const r=e.RTCPeerConnection.prototype[t],n={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),r.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=n[t]}));const i=e.RTCPeerConnection.prototype.addIceCandidate;e.RTCPeerConnection.prototype.addIceCandidate=function(){return r||arguments[0]?t.version<78&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():i.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}function m(e){const t=n.c(e);n.i(e,"negotiationneeded",e=>{const r=e.target;if(!(t.version<72||r.getConfiguration&&"plan-b"===r.getConfiguration().sdpSemantics)||"stable"===r.signalingState)return e})}},386:function(e,t,r){"use strict";var n=/[^\0-\u007E]/,i=/[.\u3002\uFF0E\uFF61]/g,o="Overflow: input needs wider integers to process",a=Math.floor,s=String.fromCharCode,c=function(e){return e+22+75*(e<26)},d=function(e,t,r){var n=0;for(e=r?a(e/700):e>>1,e+=a(e/t);e>455;n+=36)e=a(e/35);return a(n+36*e/(e+38))},p=function(e){var t,r,n=[],i=(e=function(e){for(var t=[],r=0,n=e.length;r=55296&&i<=56319&&r=p&&ra((2147483647-u)/v))throw RangeError(o);for(u+=(m-p)*v,p=m,t=0;t2147483647)throw RangeError(o);if(r==p){for(var g=u,y=36;;y+=36){var C=y<=f?1:y>=f+26?26:y-f;if(g0?arguments[0]:void 0,p=this,l=[];if(E(p,{type:"URLSearchParams",entries:l,updateURL:function(){},updateSearchParams:N}),void 0!==d)if(v(d))if("function"==typeof(e=S(d)))for(r=(t=e.call(d)).next;!(n=r.call(t)).done;){if((a=(o=(i=C(m(n.value))).next).call(i)).done||(s=o.call(i)).done||!o.call(i).done)throw TypeError("Expected sequence with length 2");l.push({key:a.value+"",value:s.value+""})}else for(c in d)f(d,c)&&l.push({key:c,value:d[c]+""});else U(l,"string"==typeof d?"?"===d.charAt(0)?d.slice(1):d:d+"")},B=z.prototype;s(B,{append:function(e,t){F(arguments.length,2);var r=k(this);r.entries.push({key:e+"",value:t+""}),r.updateURL()},delete:function(e){F(arguments.length,1);for(var t=k(this),r=t.entries,n=e+"",i=0;ie.key){i.splice(t,0,e);break}t===r&&i.push(e)}n.updateURL()},forEach:function(e){for(var t,r=k(this).entries,n=l(e,arguments.length>1?arguments[1]:void 0,3),i=0;i1&&(v(t=arguments[1])&&(r=t.body,"URLSearchParams"===h(r)&&((n=t.headers?new P(t.headers):new P).has("content-type")||n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=g(t,{body:y(0,String(r)),headers:y(0,n)}))),i.push(t)),R.apply(this,i)}}),e.exports={URLSearchParams:z,getState:k}},388:function(e,t,r){var n=r(5),i=r(104);e.exports=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return n(t.call(e))}},389:function(e,t,r){var n=r(0),i=r(1),o=r(14),a=r(26).f,s=r(7),c=i((function(){a(1)}));n({target:"Object",stat:!0,forced:!s||c,sham:!s},{getOwnPropertyDescriptor:function(e,t){return a(o(e),t)}})},390:function(e,t,r){"use strict";var n=r(352);function i(e,t,r,i,o){var a=n.writeRtpDescription(e.kind,t);if(a+=n.writeIceParameters(e.iceGatherer.getLocalParameters()),a+=n.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===r?"actpass":o||"active"),a+="a=mid:"+e.mid+"\r\n",e.rtpSender&&e.rtpReceiver?a+="a=sendrecv\r\n":e.rtpSender?a+="a=sendonly\r\n":e.rtpReceiver?a+="a=recvonly\r\n":a+="a=inactive\r\n",e.rtpSender){var s=e.rtpSender._initialTrackId||e.rtpSender.track.id;e.rtpSender._initialTrackId=s;var c="msid:"+(i?i.id:"-")+" "+s+"\r\n";a+="a="+c,a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+c,e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+c,a+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+n.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+n.localCName+"\r\n"),a}function o(e,t){var r={codecs:[],headerExtensions:[],fecMechanisms:[]},n=function(e,t){e=parseInt(e,10);for(var r=0;r=14393&&-1===e.indexOf("?transport=udp")})),delete e.url,e.urls=i?n[0]:n,!!n.length}}))}(r.iceServers||[],t),this._iceGatherers=[],r.iceCandidatePoolSize)for(var a=r.iceCandidatePoolSize;a>0;a--)this._iceGatherers.push(new e.RTCIceGatherer({iceServers:r.iceServers,gatherPolicy:r.iceTransportPolicy}));else r.iceCandidatePoolSize=0;this._config=r,this.transceivers=[],this._sdpSessionId=n.generateSessionId(),this._sdpSessionVersion=0,this._dtlsRole=void 0,this._isClosed=!1};Object.defineProperty(p.prototype,"localDescription",{configurable:!0,get:function(){return this._localDescription}}),Object.defineProperty(p.prototype,"remoteDescription",{configurable:!0,get:function(){return this._remoteDescription}}),p.prototype.onicecandidate=null,p.prototype.onaddstream=null,p.prototype.ontrack=null,p.prototype.onremovestream=null,p.prototype.onsignalingstatechange=null,p.prototype.oniceconnectionstatechange=null,p.prototype.onconnectionstatechange=null,p.prototype.onicegatheringstatechange=null,p.prototype.onnegotiationneeded=null,p.prototype.ondatachannel=null,p.prototype._dispatchEvent=function(e,t){this._isClosed||(this.dispatchEvent(t),"function"==typeof this["on"+e]&&this["on"+e](t))},p.prototype._emitGatheringStateChange=function(){var e=new Event("icegatheringstatechange");this._dispatchEvent("icegatheringstatechange",e)},p.prototype.getConfiguration=function(){return this._config},p.prototype.getLocalStreams=function(){return this.localStreams},p.prototype.getRemoteStreams=function(){return this.remoteStreams},p.prototype._createTransceiver=function(e,t){var r=this.transceivers.length>0,n={track:null,iceGatherer:null,iceTransport:null,dtlsTransport:null,localCapabilities:null,remoteCapabilities:null,rtpSender:null,rtpReceiver:null,kind:e,mid:null,sendEncodingParameters:null,recvEncodingParameters:null,stream:null,associatedRemoteMediaStreams:[],wantReceive:!0};if(this.usingBundle&&r)n.iceTransport=this.transceivers[0].iceTransport,n.dtlsTransport=this.transceivers[0].dtlsTransport;else{var i=this._createIceAndDtlsTransports();n.iceTransport=i.iceTransport,n.dtlsTransport=i.dtlsTransport}return t||this.transceivers.push(n),n},p.prototype.addTrack=function(t,r){if(this._isClosed)throw c("InvalidStateError","Attempted to call addTrack on a closed peerconnection.");var n;if(this.transceivers.find((function(e){return e.track===t})))throw c("InvalidAccessError","Track already exists.");for(var i=0;i=15025)e.getTracks().forEach((function(t){r.addTrack(t,e)}));else{var n=e.clone();e.getTracks().forEach((function(e,t){var r=n.getTracks()[t];e.addEventListener("enabled",(function(e){r.enabled=e.enabled}))})),n.getTracks().forEach((function(e){r.addTrack(e,n)}))}},p.prototype.removeTrack=function(t){if(this._isClosed)throw c("InvalidStateError","Attempted to call removeTrack on a closed peerconnection.");if(!(t instanceof e.RTCRtpSender))throw new TypeError("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.");var r=this.transceivers.find((function(e){return e.rtpSender===t}));if(!r)throw c("InvalidAccessError","Sender was not created by this connection.");var n=r.stream;r.rtpSender.stop(),r.rtpSender=null,r.track=null,r.stream=null,-1===this.transceivers.map((function(e){return e.stream})).indexOf(n)&&this.localStreams.indexOf(n)>-1&&this.localStreams.splice(this.localStreams.indexOf(n),1),this._maybeFireNegotiationNeeded()},p.prototype.removeStream=function(e){var t=this;e.getTracks().forEach((function(e){var r=t.getSenders().find((function(t){return t.track===e}));r&&t.removeTrack(r)}))},p.prototype.getSenders=function(){return this.transceivers.filter((function(e){return!!e.rtpSender})).map((function(e){return e.rtpSender}))},p.prototype.getReceivers=function(){return this.transceivers.filter((function(e){return!!e.rtpReceiver})).map((function(e){return e.rtpReceiver}))},p.prototype._createIceGatherer=function(t,r){var n=this;if(r&&t>0)return this.transceivers[0].iceGatherer;if(this._iceGatherers.length)return this._iceGatherers.shift();var i=new e.RTCIceGatherer({iceServers:this._config.iceServers,gatherPolicy:this._config.iceTransportPolicy});return Object.defineProperty(i,"state",{value:"new",writable:!0}),this.transceivers[t].bufferedCandidateEvents=[],this.transceivers[t].bufferCandidates=function(e){var r=!e.candidate||0===Object.keys(e.candidate).length;i.state=r?"completed":"gathering",null!==n.transceivers[t].bufferedCandidateEvents&&n.transceivers[t].bufferedCandidateEvents.push(e)},i.addEventListener("localcandidate",this.transceivers[t].bufferCandidates),i},p.prototype._gather=function(t,r){var i=this,o=this.transceivers[r].iceGatherer;if(!o.onlocalcandidate){var a=this.transceivers[r].bufferedCandidateEvents;this.transceivers[r].bufferedCandidateEvents=null,o.removeEventListener("localcandidate",this.transceivers[r].bufferCandidates),o.onlocalcandidate=function(e){if(!(i.usingBundle&&r>0)){var a=new Event("icecandidate");a.candidate={sdpMid:t,sdpMLineIndex:r};var s=e.candidate,c=!s||0===Object.keys(s).length;if(c)"new"!==o.state&&"gathering"!==o.state||(o.state="completed");else{"new"===o.state&&(o.state="gathering"),s.component=1,s.ufrag=o.getLocalParameters().usernameFragment;var d=n.writeCandidate(s);a.candidate=Object.assign(a.candidate,n.parseCandidate(d)),a.candidate.candidate=d,a.candidate.toJSON=function(){return{candidate:a.candidate.candidate,sdpMid:a.candidate.sdpMid,sdpMLineIndex:a.candidate.sdpMLineIndex,usernameFragment:a.candidate.usernameFragment}}}var p=n.getMediaSections(i._localDescription.sdp);p[a.candidate.sdpMLineIndex]+=c?"a=end-of-candidates\r\n":"a="+a.candidate.candidate+"\r\n",i._localDescription.sdp=n.getDescription(i._localDescription.sdp)+p.join("");var u=i.transceivers.every((function(e){return e.iceGatherer&&"completed"===e.iceGatherer.state}));"gathering"!==i.iceGatheringState&&(i.iceGatheringState="gathering",i._emitGatheringStateChange()),c||i._dispatchEvent("icecandidate",a),u&&(i._dispatchEvent("icecandidate",new Event("icecandidate")),i.iceGatheringState="complete",i._emitGatheringStateChange())}},e.setTimeout((function(){a.forEach((function(e){o.onlocalcandidate(e)}))}),0)}},p.prototype._createIceAndDtlsTransports=function(){var t=this,r=new e.RTCIceTransport(null);r.onicestatechange=function(){t._updateIceConnectionState(),t._updateConnectionState()};var n=new e.RTCDtlsTransport(r);return n.ondtlsstatechange=function(){t._updateConnectionState()},n.onerror=function(){Object.defineProperty(n,"state",{value:"failed",writable:!0}),t._updateConnectionState()},{iceTransport:r,dtlsTransport:n}},p.prototype._disposeIceAndDtlsTransports=function(e){var t=this.transceivers[e].iceGatherer;t&&(delete t.onlocalcandidate,delete this.transceivers[e].iceGatherer);var r=this.transceivers[e].iceTransport;r&&(delete r.onicestatechange,delete this.transceivers[e].iceTransport);var n=this.transceivers[e].dtlsTransport;n&&(delete n.ondtlsstatechange,delete n.onerror,delete this.transceivers[e].dtlsTransport)},p.prototype._transceive=function(e,r,i){var a=o(e.localCapabilities,e.remoteCapabilities);r&&e.rtpSender&&(a.encodings=e.sendEncodingParameters,a.rtcp={cname:n.localCName,compound:e.rtcpParameters.compound},e.recvEncodingParameters.length&&(a.rtcp.ssrc=e.recvEncodingParameters[0].ssrc),e.rtpSender.send(a)),i&&e.rtpReceiver&&a.codecs.length>0&&("video"===e.kind&&e.recvEncodingParameters&&t<15019&&e.recvEncodingParameters.forEach((function(e){delete e.rtx})),e.recvEncodingParameters.length?a.encodings=e.recvEncodingParameters:a.encodings=[{}],a.rtcp={compound:e.rtcpParameters.compound},e.rtcpParameters.cname&&(a.rtcp.cname=e.rtcpParameters.cname),e.sendEncodingParameters.length&&(a.rtcp.ssrc=e.sendEncodingParameters[0].ssrc),e.rtpReceiver.receive(a))},p.prototype.setLocalDescription=function(e){var t,r,i=this;if(-1===["offer","answer"].indexOf(e.type))return Promise.reject(c("TypeError",'Unsupported type "'+e.type+'"'));if(!a("setLocalDescription",e.type,i.signalingState)||i._isClosed)return Promise.reject(c("InvalidStateError","Can not set local "+e.type+" in state "+i.signalingState));if("offer"===e.type)t=n.splitSections(e.sdp),r=t.shift(),t.forEach((function(e,t){var r=n.parseRtpParameters(e);i.transceivers[t].localCapabilities=r})),i.transceivers.forEach((function(e,t){i._gather(e.mid,t)}));else if("answer"===e.type){t=n.splitSections(i._remoteDescription.sdp),r=t.shift();var s=n.matchPrefix(r,"a=ice-lite").length>0;t.forEach((function(e,t){var a=i.transceivers[t],c=a.iceGatherer,d=a.iceTransport,p=a.dtlsTransport,u=a.localCapabilities,f=a.remoteCapabilities;if(!(n.isRejected(e)&&0===n.matchPrefix(e,"a=bundle-only").length)&&!a.rejected){var l=n.getIceParameters(e,r),h=n.getDtlsParameters(e,r);s&&(h.role="server"),i.usingBundle&&0!==t||(i._gather(a.mid,t),"new"===d.state&&d.start(c,l,s?"controlling":"controlled"),"new"===p.state&&p.start(h));var m=o(u,f);i._transceive(a,m.codecs.length>0,!1)}}))}return i._localDescription={type:e.type,sdp:e.sdp},"offer"===e.type?i._updateSignalingState("have-local-offer"):i._updateSignalingState("stable"),Promise.resolve()},p.prototype.setRemoteDescription=function(i){var p=this;if(-1===["offer","answer"].indexOf(i.type))return Promise.reject(c("TypeError",'Unsupported type "'+i.type+'"'));if(!a("setRemoteDescription",i.type,p.signalingState)||p._isClosed)return Promise.reject(c("InvalidStateError","Can not set remote "+i.type+" in state "+p.signalingState));var u={};p.remoteStreams.forEach((function(e){u[e.id]=e}));var f=[],l=n.splitSections(i.sdp),h=l.shift(),m=n.matchPrefix(h,"a=ice-lite").length>0,v=n.matchPrefix(h,"a=group:BUNDLE ").length>0;p.usingBundle=v;var g=n.matchPrefix(h,"a=ice-options:")[0];return p.canTrickleIceCandidates=!!g&&g.substr(14).split(" ").indexOf("trickle")>=0,l.forEach((function(a,c){var d=n.splitLines(a),l=n.getKind(a),g=n.isRejected(a)&&0===n.matchPrefix(a,"a=bundle-only").length,y=d[0].substr(2).split(" ")[2],C=n.getDirection(a,h),S=n.parseMsid(a),T=n.getMid(a)||n.generateIdentifier();if(g||"application"===l&&("DTLS/SCTP"===y||"UDP/DTLS/SCTP"===y))p.transceivers[c]={mid:T,kind:l,protocol:y,rejected:!0};else{var R,P,b,E,k,w,_,x,D;!g&&p.transceivers[c]&&p.transceivers[c].rejected&&(p.transceivers[c]=p._createTransceiver(l,!0));var I,O,M=n.parseRtpParameters(a);g||(I=n.getIceParameters(a,h),(O=n.getDtlsParameters(a,h)).role="client"),_=n.parseRtpEncodingParameters(a);var L=n.parseRtcpParameters(a),j=n.matchPrefix(a,"a=end-of-candidates",h).length>0,A=n.matchPrefix(a,"a=candidate:").map((function(e){return n.parseCandidate(e)})).filter((function(e){return 1===e.component}));if(("offer"===i.type||"answer"===i.type)&&!g&&v&&c>0&&p.transceivers[c]&&(p._disposeIceAndDtlsTransports(c),p.transceivers[c].iceGatherer=p.transceivers[0].iceGatherer,p.transceivers[c].iceTransport=p.transceivers[0].iceTransport,p.transceivers[c].dtlsTransport=p.transceivers[0].dtlsTransport,p.transceivers[c].rtpSender&&p.transceivers[c].rtpSender.setTransport(p.transceivers[0].dtlsTransport),p.transceivers[c].rtpReceiver&&p.transceivers[c].rtpReceiver.setTransport(p.transceivers[0].dtlsTransport)),"offer"!==i.type||g){if("answer"===i.type&&!g){P=(R=p.transceivers[c]).iceGatherer,b=R.iceTransport,E=R.dtlsTransport,k=R.rtpReceiver,w=R.sendEncodingParameters,x=R.localCapabilities,p.transceivers[c].recvEncodingParameters=_,p.transceivers[c].remoteCapabilities=M,p.transceivers[c].rtcpParameters=L,A.length&&"new"===b.state&&(!m&&!j||v&&0!==c?A.forEach((function(e){s(R.iceTransport,e)})):b.setRemoteCandidates(A)),v&&0!==c||("new"===b.state&&b.start(P,I,"controlling"),"new"===E.state&&E.start(O)),!o(R.localCapabilities,R.remoteCapabilities).codecs.filter((function(e){return"rtx"===e.name.toLowerCase()})).length&&R.sendEncodingParameters[0].rtx&&delete R.sendEncodingParameters[0].rtx,p._transceive(R,"sendrecv"===C||"recvonly"===C,"sendrecv"===C||"sendonly"===C),!k||"sendrecv"!==C&&"sendonly"!==C?delete R.rtpReceiver:(D=k.track,S?(u[S.stream]||(u[S.stream]=new e.MediaStream),r(D,u[S.stream]),f.push([D,k,u[S.stream]])):(u.default||(u.default=new e.MediaStream),r(D,u.default),f.push([D,k,u.default])))}}else{(R=p.transceivers[c]||p._createTransceiver(l)).mid=T,R.iceGatherer||(R.iceGatherer=p._createIceGatherer(c,v)),A.length&&"new"===R.iceTransport.state&&(!j||v&&0!==c?A.forEach((function(e){s(R.iceTransport,e)})):R.iceTransport.setRemoteCandidates(A)),x=e.RTCRtpReceiver.getCapabilities(l),t<15019&&(x.codecs=x.codecs.filter((function(e){return"rtx"!==e.name}))),w=R.sendEncodingParameters||[{ssrc:1001*(2*c+2)}];var U,N=!1;if("sendrecv"===C||"sendonly"===C){if(N=!R.rtpReceiver,k=R.rtpReceiver||new e.RTCRtpReceiver(R.dtlsTransport,l),N)D=k.track,S&&"-"===S.stream||(S?(u[S.stream]||(u[S.stream]=new e.MediaStream,Object.defineProperty(u[S.stream],"id",{get:function(){return S.stream}})),Object.defineProperty(D,"id",{get:function(){return S.track}}),U=u[S.stream]):(u.default||(u.default=new e.MediaStream),U=u.default)),U&&(r(D,U),R.associatedRemoteMediaStreams.push(U)),f.push([D,k,U])}else R.rtpReceiver&&R.rtpReceiver.track&&(R.associatedRemoteMediaStreams.forEach((function(t){var r=t.getTracks().find((function(e){return e.id===R.rtpReceiver.track.id}));r&&function(t,r){r.removeTrack(t),r.dispatchEvent(new e.MediaStreamTrackEvent("removetrack",{track:t}))}(r,t)})),R.associatedRemoteMediaStreams=[]);R.localCapabilities=x,R.remoteCapabilities=M,R.rtpReceiver=k,R.rtcpParameters=L,R.sendEncodingParameters=w,R.recvEncodingParameters=_,p._transceive(p.transceivers[c],!1,N)}}})),void 0===p._dtlsRole&&(p._dtlsRole="offer"===i.type?"active":"passive"),p._remoteDescription={type:i.type,sdp:i.sdp},"offer"===i.type?p._updateSignalingState("have-remote-offer"):p._updateSignalingState("stable"),Object.keys(u).forEach((function(t){var r=u[t];if(r.getTracks().length){if(-1===p.remoteStreams.indexOf(r)){p.remoteStreams.push(r);var n=new Event("addstream");n.stream=r,e.setTimeout((function(){p._dispatchEvent("addstream",n)}))}f.forEach((function(e){var t=e[0],n=e[1];r.id===e[2].id&&d(p,t,n,[r])}))}})),f.forEach((function(e){e[2]||d(p,e[0],e[1],[])})),e.setTimeout((function(){p&&p.transceivers&&p.transceivers.forEach((function(e){e.iceTransport&&"new"===e.iceTransport.state&&e.iceTransport.getRemoteCandidates().length>0&&(console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification"),e.iceTransport.addRemoteCandidate({}))}))}),4e3),Promise.resolve()},p.prototype.close=function(){this.transceivers.forEach((function(e){e.iceTransport&&e.iceTransport.stop(),e.dtlsTransport&&e.dtlsTransport.stop(),e.rtpSender&&e.rtpSender.stop(),e.rtpReceiver&&e.rtpReceiver.stop()})),this._isClosed=!0,this._updateSignalingState("closed")},p.prototype._updateSignalingState=function(e){this.signalingState=e;var t=new Event("signalingstatechange");this._dispatchEvent("signalingstatechange",t)},p.prototype._maybeFireNegotiationNeeded=function(){var t=this;"stable"===this.signalingState&&!0!==this.needNegotiation&&(this.needNegotiation=!0,e.setTimeout((function(){if(t.needNegotiation){t.needNegotiation=!1;var e=new Event("negotiationneeded");t._dispatchEvent("negotiationneeded",e)}}),0))},p.prototype._updateIceConnectionState=function(){var e,t={new:0,closed:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach((function(e){e.iceTransport&&!e.rejected&&t[e.iceTransport.state]++})),e="new",t.failed>0?e="failed":t.checking>0?e="checking":t.disconnected>0?e="disconnected":t.new>0?e="new":t.connected>0?e="connected":t.completed>0&&(e="completed"),e!==this.iceConnectionState){this.iceConnectionState=e;var r=new Event("iceconnectionstatechange");this._dispatchEvent("iceconnectionstatechange",r)}},p.prototype._updateConnectionState=function(){var e,t={new:0,closed:0,connecting:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach((function(e){e.iceTransport&&e.dtlsTransport&&!e.rejected&&(t[e.iceTransport.state]++,t[e.dtlsTransport.state]++)})),t.connected+=t.completed,e="new",t.failed>0?e="failed":t.connecting>0?e="connecting":t.disconnected>0?e="disconnected":t.new>0?e="new":t.connected>0&&(e="connected"),e!==this.connectionState){this.connectionState=e;var r=new Event("connectionstatechange");this._dispatchEvent("connectionstatechange",r)}},p.prototype.createOffer=function(){var r=this;if(r._isClosed)return Promise.reject(c("InvalidStateError","Can not call createOffer after close"));var o=r.transceivers.filter((function(e){return"audio"===e.kind})).length,a=r.transceivers.filter((function(e){return"video"===e.kind})).length,s=arguments[0];if(s){if(s.mandatory||s.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==s.offerToReceiveAudio&&(o=!0===s.offerToReceiveAudio?1:!1===s.offerToReceiveAudio?0:s.offerToReceiveAudio),void 0!==s.offerToReceiveVideo&&(a=!0===s.offerToReceiveVideo?1:!1===s.offerToReceiveVideo?0:s.offerToReceiveVideo)}for(r.transceivers.forEach((function(e){"audio"===e.kind?--o<0&&(e.wantReceive=!1):"video"===e.kind&&--a<0&&(e.wantReceive=!1)}));o>0||a>0;)o>0&&(r._createTransceiver("audio"),o--),a>0&&(r._createTransceiver("video"),a--);var d=n.writeSessionBoilerplate(r._sdpSessionId,r._sdpSessionVersion++);r.transceivers.forEach((function(i,o){var a=i.track,s=i.kind,c=i.mid||n.generateIdentifier();i.mid=c,i.iceGatherer||(i.iceGatherer=r._createIceGatherer(o,r.usingBundle));var d=e.RTCRtpSender.getCapabilities(s);t<15019&&(d.codecs=d.codecs.filter((function(e){return"rtx"!==e.name}))),d.codecs.forEach((function(e){"H264"===e.name&&void 0===e.parameters["level-asymmetry-allowed"]&&(e.parameters["level-asymmetry-allowed"]="1"),i.remoteCapabilities&&i.remoteCapabilities.codecs&&i.remoteCapabilities.codecs.forEach((function(t){e.name.toLowerCase()===t.name.toLowerCase()&&e.clockRate===t.clockRate&&(e.preferredPayloadType=t.payloadType)}))})),d.headerExtensions.forEach((function(e){(i.remoteCapabilities&&i.remoteCapabilities.headerExtensions||[]).forEach((function(t){e.uri===t.uri&&(e.id=t.id)}))}));var p=i.sendEncodingParameters||[{ssrc:1001*(2*o+1)}];a&&t>=15019&&"video"===s&&!p[0].rtx&&(p[0].rtx={ssrc:p[0].ssrc+1}),i.wantReceive&&(i.rtpReceiver=new e.RTCRtpReceiver(i.dtlsTransport,s)),i.localCapabilities=d,i.sendEncodingParameters=p})),"max-compat"!==r._config.bundlePolicy&&(d+="a=group:BUNDLE "+r.transceivers.map((function(e){return e.mid})).join(" ")+"\r\n"),d+="a=ice-options:trickle\r\n",r.transceivers.forEach((function(e,t){d+=i(e,e.localCapabilities,"offer",e.stream,r._dtlsRole),d+="a=rtcp-rsize\r\n",!e.iceGatherer||"new"===r.iceGatheringState||0!==t&&r.usingBundle||(e.iceGatherer.getLocalCandidates().forEach((function(e){e.component=1,d+="a="+n.writeCandidate(e)+"\r\n"})),"completed"===e.iceGatherer.state&&(d+="a=end-of-candidates\r\n"))}));var p=new e.RTCSessionDescription({type:"offer",sdp:d});return Promise.resolve(p)},p.prototype.createAnswer=function(){var r=this;if(r._isClosed)return Promise.reject(c("InvalidStateError","Can not call createAnswer after close"));if("have-remote-offer"!==r.signalingState&&"have-local-pranswer"!==r.signalingState)return Promise.reject(c("InvalidStateError","Can not call createAnswer in signalingState "+r.signalingState));var a=n.writeSessionBoilerplate(r._sdpSessionId,r._sdpSessionVersion++);r.usingBundle&&(a+="a=group:BUNDLE "+r.transceivers.map((function(e){return e.mid})).join(" ")+"\r\n"),a+="a=ice-options:trickle\r\n";var s=n.getMediaSections(r._remoteDescription.sdp).length;r.transceivers.forEach((function(e,n){if(!(n+1>s)){if(e.rejected)return"application"===e.kind?"DTLS/SCTP"===e.protocol?a+="m=application 0 DTLS/SCTP 5000\r\n":a+="m=application 0 "+e.protocol+" webrtc-datachannel\r\n":"audio"===e.kind?a+="m=audio 0 UDP/TLS/RTP/SAVPF 0\r\na=rtpmap:0 PCMU/8000\r\n":"video"===e.kind&&(a+="m=video 0 UDP/TLS/RTP/SAVPF 120\r\na=rtpmap:120 VP8/90000\r\n"),void(a+="c=IN IP4 0.0.0.0\r\na=inactive\r\na=mid:"+e.mid+"\r\n");var c;if(e.stream)"audio"===e.kind?c=e.stream.getAudioTracks()[0]:"video"===e.kind&&(c=e.stream.getVideoTracks()[0]),c&&t>=15019&&"video"===e.kind&&!e.sendEncodingParameters[0].rtx&&(e.sendEncodingParameters[0].rtx={ssrc:e.sendEncodingParameters[0].ssrc+1});var d=o(e.localCapabilities,e.remoteCapabilities);!d.codecs.filter((function(e){return"rtx"===e.name.toLowerCase()})).length&&e.sendEncodingParameters[0].rtx&&delete e.sendEncodingParameters[0].rtx,a+=i(e,d,"answer",e.stream,r._dtlsRole),e.rtcpParameters&&e.rtcpParameters.reducedSize&&(a+="a=rtcp-rsize\r\n")}}));var d=new e.RTCSessionDescription({type:"answer",sdp:a});return Promise.resolve(d)},p.prototype.addIceCandidate=function(e){var t,r=this;return e&&void 0===e.sdpMLineIndex&&!e.sdpMid?Promise.reject(new TypeError("sdpMLineIndex or sdpMid required")):new Promise((function(i,o){if(!r._remoteDescription)return o(c("InvalidStateError","Can not add ICE candidate without a remote description"));if(e&&""!==e.candidate){var a=e.sdpMLineIndex;if(e.sdpMid)for(var d=0;d0?n.parseCandidate(e.candidate):{};if("tcp"===u.protocol&&(0===u.port||9===u.port))return i();if(u.component&&1!==u.component)return i();if((0===a||a>0&&p.iceTransport!==r.transceivers[0].iceTransport)&&!s(p.iceTransport,u))return o(c("OperationError","Can not add ICE candidate"));var f=e.candidate.trim();0===f.indexOf("a=")&&(f=f.substr(2)),(t=n.getMediaSections(r._remoteDescription.sdp))[a]+="a="+(u.type?f:"end-of-candidates")+"\r\n",r._remoteDescription.sdp=n.getDescription(r._remoteDescription.sdp)+t.join("")}else for(var l=0;l1?arguments[1]:void 0,3);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!g(this,e)}}),o(p.prototype,r?{get:function(e){var t=g(this,e);return t&&t.value},set:function(e,t){return v(this,0===e?0:e,t)}}:{add:function(e){return v(this,e=0===e?0:e,e)}}),u&&n(p.prototype,"size",{get:function(){return l(this).size}}),p},setStrong:function(e,t,r){var n=t+" Iterator",i=m(t),o=m(n);d(e,t,(function(e,t){h(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),p(t)}}},397:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));r(391),r(9),r(25),r(30);var n=r(95),i=r(115);r(173),r(100);r(116);var o=r(167);function a(e,t,r){return(a=Object(o.a)()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&Object(i.a)(o,r.prototype),o}).apply(null,arguments)}function s(e){var t="function"==typeof Map?new Map:void 0;return(s=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,o)}function o(){return a(e,arguments,Object(n.a)(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Object(i.a)(o,e)})(e)}},398:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));r(47),r(24),r(98),r(389),r(190),r(101),r(99);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t")])]),t._v("\n")])])]),s("div",{staticClass:"language-javascript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-javascript"}},[s("code",[t._v("methods"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("onDecode")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("decodedString")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ...")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"detect"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#detect"}},[t._v("#")]),t._v(" "),s("code",[t._v("detect")])]),t._v(" "),s("ul",[s("li",[s("strong",[t._v("Payload Type:")]),t._v(" "),s("code",[t._v("Promise")])])]),t._v(" "),s("p",[t._v("The "),s("code",[t._v("detect")]),t._v(" event is basically a verbose version of "),s("code",[t._v("decode")]),t._v(". "),s("code",[t._v("detect")]),t._v(" is emitted as soon as you confirm your file selection or the foto you took with your camera. "),s("code",[t._v("detect")]),t._v(" carries a Promise which resolves when scanning the images has finished. The Promise rejects in case of errors. Additionally, "),s("code",[t._v("detect")]),t._v(" gives you the unprocessed raw image data and the coordinates of the QR code in the image.")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-capture")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@detect")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onDetect"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("/>")])]),t._v("\n")])])]),s("div",{staticClass:"language-javascript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-javascript"}},[s("code",[t._v("methods"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("onDetect")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("promise")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n imageData"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// raw image data of image/frame")]),t._v("\n content"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// decoded String or null")]),t._v("\n location "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// QR code coordinates or null")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" promise\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("content "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("null")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// decoded nothing")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ...")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ...")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h2",{attrs:{id:"props"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#props"}},[t._v("#")]),t._v(" Props")]),t._v(" "),s("p",[s("code",[t._v("QrcodeCapture")]),t._v(" has no explicitly defined props.\nHowever, checkout the components template:")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("template")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("lang")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("html"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("input")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@change")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onChangeInput"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("type")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("file"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("image"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("accept")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("image/*"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("capture")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("environment"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("multiple")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("/>")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("p",[t._v("Because the "),s("code",[t._v("input")]),t._v(" element is the root element of the component and because Vue components accept "),s("a",{attrs:{href:"https://vuejs.org/v2/guide/components-props.html#Non-Prop-Attributes",target:"_blank",rel:"noopener noreferrer"}},[t._v("non-prop attributes"),s("OutboundLink")],1),t._v(" you can make use of any valid "),s("code",[t._v("input")]),t._v(" attribute:")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-capture")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("disabled")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("/>")])]),t._v("\n")])])]),s("p",[t._v("You can even remove or replace already defined attributes:")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-capture")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v(":multiple")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("false"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("capture")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("user"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("/>")])]),t._v("\n")])])]),s("h2",{attrs:{id:"slots"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#slots"}},[t._v("#")]),t._v(" Slots")]),t._v(" "),s("blockquote",[s("p",[t._v("no slots")])])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/2.9a6316b6.js b/docs/.vuepress/dist/assets/js/2.9a6316b6.js new file mode 100644 index 00000000..02d4ce88 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/2.9a6316b6.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{307:function(e,t,r){"use strict";r.d(t,"c",(function(){return A})),r.d(t,"a",(function(){return V})),r.d(t,"b",(function(){return N}));r(175),r(9),r(97);var n=r(42),a=r(336);function i(e,t){return o.apply(this,arguments)}function o(){return(o=Object(n.a)(regeneratorRuntime.mark((function e(t,r){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=new t).postMessage(r,[r.data.buffer]),e.next=4,Object(a.a)(n,"message");case 4:return i=e.sent,n.terminate(),e.abrupt("return",i.data);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}r(24),r(98),r(25),r(99),r(30),r(350);var c=r(398),s=r(96),u=r(28),l=r(63),d=(r(354),r(68),r(165)),f=r(168),p=r(397),h=function(e){Object(d.a)(r,e);var t=Object(f.a)(r);function r(){var e;return Object(u.a)(this,r),(e=t.call(this,"can't process cross-origin image")).name="DropImageFetchError",e}return r}(Object(p.a)(Error)),m=function(e){Object(d.a)(r,e);var t=Object(f.a)(r);function r(){var e;return Object(u.a)(this,r),(e=t.call(this,"drag-and-dropped file is not of type image and can't be decoded")).name="DropImageDecodeError",e}return r}(Object(p.a)(Error)),v=function(e){Object(d.a)(r,e);var t=Object(f.a)(r);function r(){var e;return Object(u.a)(this,r),(e=t.call(this,"this browser has no Stream API support")).name="StreamApiNotSupportedError",e}return r}(Object(p.a)(Error)),g=function(e){Object(d.a)(r,e);var t=Object(f.a)(r);function r(){var e;return Object(u.a)(this,r),(e=t.call(this,"camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.")).name="InsecureContextError",e}return r}(Object(p.a)(Error)),b=(r(185),r(174),document.createElement("canvas")),w=b.getContext("2d");function x(e,t,r){var n=Math.min(1,b.width/t,b.height/r),a=n*t,i=n*r;return w.drawImage(e,0,0,a,i),w.getImageData(0,0,a,i)}function k(e){return x(e,e.naturalWidth,e.naturalHeight)}function j(e){return y.apply(this,arguments)}function y(){return(y=Object(n.a)(regeneratorRuntime.mark((function e(t){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.startsWith("http")||!1!==t.includes(location.host)){e.next=2;break}throw new h;case 2:return(r=document.createElement("img")).src=t,e.next=6,Object(a.a)(r,"load");case 6:return e.abrupt("return",k(r));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e){return R.apply(this,arguments)}function R(){return(R=Object(n.a)(regeneratorRuntime.mark((function e(t){var r,n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!/image.*/.test(t.type)){e.next=10;break}return(r=new FileReader).readAsDataURL(t),e.next=5,Object(a.a)(r,"load");case 5:return n=e.sent,i=n.target.result,e.abrupt("return",j(i));case 10:throw new m;case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}b.width=1920,b.height=1080;r(366);var D,F,C,I=function(){function e(t,r){Object(u.a)(this,e),this.videoEl=t,this.stream=r}return Object(l.a)(e,[{key:"stop",value:function(){this.stream.getTracks().forEach((function(e){return e.stop()}))}},{key:"captureFrame",value:function(){return x(e=this.videoEl,e.videoWidth,e.videoHeight);var e}},{key:"getCapabilities",value:function(){var e=this.stream.getVideoTracks();return Object(s.a)(e,1)[0].getCapabilities()}}]),e}(),S=function(){var e=Object(n.a)(regeneratorRuntime.mark((function e(t){var r,n,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.mediaDevices.enumerateDevices();case 2:if(!((r=e.sent.filter((function(e){return"videoinput"===e.kind}))).length>2)){e.next=15;break}n=r[0],a=r[r.length-1],e.t0=t,e.next="auto"===e.t0?9:"rear"===e.t0?10:"front"===e.t0?11:12;break;case 9:case 10:return e.abrupt("return",{deviceId:{exact:a.deviceId}});case 11:return e.abrupt("return",{deviceId:{exact:n.deviceId}});case 12:return e.abrupt("return",void 0);case 13:e.next=22;break;case 15:e.t1=t,e.next="auto"===e.t1?18:"rear"===e.t1?19:"front"===e.t1?20:21;break;case 18:return e.abrupt("return",{facingMode:{ideal:"environment"}});case 19:return e.abrupt("return",{facingMode:{exact:"environment"}});case 20:return e.abrupt("return",{facingMode:{exact:"user"}});case 21:return e.abrupt("return",void 0);case 22:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),L=!0!==window.isSecureContext,E=!(navigator&&(navigator.getUserMedia||navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)),T=(D=function(){return r.e(35).then(r.bind(null,399))},F=!1,C=void 0,function(){return F||(C=D.apply(void 0,arguments),F=!0),C}),U=function(e,t){return P.apply(this,arguments)};function P(){return(P=Object(n.a)(regeneratorRuntime.mark((function e(t,r){var n,i,o,u,l,d,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.camera,i=r.torch,!L){e.next=3;break}throw new g;case 3:if(!E){e.next=5;break}throw new v;case 5:return e.next=7,T();case 7:return e.t0=c.a,e.t1={width:{min:360,ideal:640,max:1920},height:{min:240,ideal:480,max:1080}},e.next=11,S(n);case 11:return e.t2=e.sent,e.t3=(0,e.t0)(e.t1,e.t2),o={audio:!1,video:e.t3},e.next=16,navigator.mediaDevices.getUserMedia(o);case 16:return u=e.sent,void 0!==t.srcObject?t.srcObject=u:void 0!==t.mozSrcObject?t.mozSrcObject=u:window.URL.createObjectURL?t.src=window.URL.createObjectURL(u):window.webkitURL?t.src=window.webkitURL.createObjectURL(u):t.src=u,e.next=20,Object(a.a)(t,"loadeddata");case 20:return e.next=22,Object(a.b)(500);case 22:return i&&(l=u.getVideoTracks(),d=Object(s.a)(l,1),f=d[0],f.getCapabilities().torch?f.applyConstraints({advanced:[{torch:!0}]}):console.warn("device does not support torch capability")),e.abrupt("return",new I(t,u));case 24:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var $={methods:{onDetect:function(e){var t=this;return Object(n.a)(regeneratorRuntime.mark((function r(){var n,a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t.$emit("detect",e),r.prev=1,r.next=4,e;case 4:n=r.sent,null!==(a=n.content)&&t.$emit("decode",a),r.next=11;break;case 9:r.prev=9,r.t0=r.catch(1);case 11:case"end":return r.stop()}}),r,null,[[1,9]])})))()}}},M=r(41),q=Object(M.a)($,void 0,void 0,!1,null,null,null).exports,_=(r(43),r(100),r(317),r(319),function(){return e=function(){self.importScripts("https://cdn.jsdelivr.net/npm/jsqr@1.2.0/dist/jsQR.min.js"),self.addEventListener("message",(function(e){var t=e.data,r=jsQR(t.data,t.width,t.height),n=null,a=null;null!==r&&(n=r.data,a=r.location);var i={content:n,location:a,imageData:t};self.postMessage(i,[t.data.buffer])}))}.toString().trim().match(/^function\s*\w*\s*\([\w\s,]*\)\s*{([\w\W]*?)}$/)[1],new Worker(URL.createObjectURL(new Blob([e],{type:"text/javascript"})));var e}),H={name:"qrcode-stream",mixins:[q],props:{camera:{type:String,default:"auto",validator:function(e){return["auto","rear","front","off"].includes(e)}},torch:{type:Boolean,default:!1},track:{type:[Function,Boolean],default:!0},worker:{type:Function,default:_}},data:function(){return{cameraInstance:null,destroyed:!1,stopScanning:function(){}}},computed:{shouldStream:function(){return!1===this.destroyed&&"off"!==this.camera},shouldScan:function(){return!0===this.shouldStream&&null!==this.cameraInstance},scanInterval:function(){return!1===this.track?500:40},trackRepaintFunction:function(){return!0===this.track?(e={color:"#ff0000"}.color,function(t,r){var n=t.topLeftCorner,a=t.topRightCorner,i=t.bottomLeftCorner,o=t.bottomRightCorner;r.strokeStyle=e,r.beginPath(),r.moveTo(n.x,n.y),r.lineTo(i.x,i.y),r.lineTo(o.x,o.y),r.lineTo(a.x,a.y),r.lineTo(n.x,n.y),r.closePath(),r.stroke()}):!1===this.track?void 0:this.track;var e}},watch:{shouldStream:function(e){if(!e){var t=this.cameraInstance.captureFrame();this.paintPauseFrame(t)}},shouldScan:function(e){e?(this.clearPauseFrame(),this.clearTrackingLayer(),this.startScanning()):this.stopScanning()},torch:function(){this.init()},camera:function(){this.init()}},mounted:function(){this.init()},beforeDestroy:function(){this.beforeResetCamera(),this.stopScanning(),this.destroyed=!0},methods:{init:function(){var e=this,t=Object(n.a)(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.beforeResetCamera(),"off"!==e.camera){t.next=6;break}return e.cameraInstance=null,t.abrupt("return",{capabilities:{}});case 6:return t.next=8,U(e.$refs.video,{camera:e.camera,torch:e.torch});case 8:return e.cameraInstance=t.sent,r=e.cameraInstance.getCapabilities(),e.destroyed&&e.cameraInstance.stop(),t.abrupt("return",{capabilities:r});case 12:case"end":return t.stop()}}),t)})))();this.$emit("init",t)},startScanning:function(){var e=this;this.stopScanning=function(e,t,r){var n=r.detectHandler,a=r.locateHandler,i=r.minDelay,o=null,c=null,s=performance.now(),u=new e,l=!1,d=!0;return u.onmessage=function(e){l=!1;var t=e.data,r=t.content,i=t.location;null!==r&&r!==o&&n(e.data),i!==c&&a(i),o=r||o,c=i},function e(r){if(d){if(window.requestAnimationFrame(e),r-s>=i&&(s=r,!1===l)){l=!0;var n=t.captureFrame();u.postMessage(n,[n.data.buffer])}}else u.terminate()}(),function(){d=!1}}(this.worker,this.cameraInstance,{detectHandler:function(t){e.onDetect(Promise.resolve(t))},locateHandler:this.onLocate,minDelay:this.scanInterval})},beforeResetCamera:function(){null!==this.cameraInstance&&(this.cameraInstance.stop(),this.cameraInstance=null)},onLocate:function(e){void 0===this.trackRepaintFunction||null===e?this.clearTrackingLayer():this.repaintTrackingLayer(e)},repaintTrackingLayer:function(e){var t=this,r=this.$refs.video,n=this.$refs.trackingLayer,a=n.getContext("2d"),i=r.offsetWidth,o=r.offsetHeight,c=r.videoWidth,s=r.videoHeight,u=Math.max(i/c,o/s),l=c*u,d=s*u,f=l/c,p=d/s,h=(i-l)/2,m=(o-d)/2,v={};for(var g in e)v[g]={x:Math.floor(e[g].x*f+h),y:Math.floor(e[g].y*p+m)};window.requestAnimationFrame((function(){n.width=i,n.height=o,t.trackRepaintFunction(v,a)}))},clearTrackingLayer:function(){var e=this.$refs.trackingLayer,t=e.getContext("2d");window.requestAnimationFrame((function(){t.clearRect(0,0,e.width,e.height)}))},paintPauseFrame:function(e){var t=this.$refs.pauseFrame,r=t.getContext("2d");window.requestAnimationFrame((function(){t.width=e.width,t.height=e.height,r.putImageData(e,0,0)}))},clearPauseFrame:function(){var e=this.$refs.pauseFrame,t=e.getContext("2d");window.requestAnimationFrame((function(){t.clearRect(0,0,e.width,e.height)}))}}},A=(r(394),Object(M.a)(H,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"wrapper"},[t("video",{directives:[{name:"show",rawName:"v-show",value:this.shouldScan,expression:"shouldScan"}],ref:"video",staticClass:"camera",attrs:{autoplay:"",muted:"",playsinline:""},domProps:{muted:!0}}),this._v(" "),t("canvas",{directives:[{name:"show",rawName:"v-show",value:!this.shouldScan,expression:"!shouldScan"}],ref:"pauseFrame",staticClass:"pause-frame"}),this._v(" "),t("canvas",{ref:"trackingLayer",staticClass:"tracking-layer"}),this._v(" "),t("div",{staticClass:"overlay"},[this._t("default")],2)])}),[],!1,null,"e0ba7c1e",null).exports),W=(r(69),r(39)),z={name:"qrcode-capture",mixins:[q],props:{worker:{type:Function,default:_}},methods:{onChangeInput:function(e){Object(W.a)(e.target.files).map(this.processFile).forEach(this.onDetect)},processFile:function(e){var t=this;return Object(n.a)(regeneratorRuntime.mark((function r(){var n,a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,O(e);case 2:return n=r.sent,r.next=5,i(t.worker,n);case 5:return a=r.sent,r.abrupt("return",a);case 7:case"end":return r.stop()}}),r)})))()}}},V=Object(M.a)(z,(function(){var e=this.$createElement;return(this._self._c||e)("input",{attrs:{type:"file",name:"image",accept:"image/*",capture:"environment",multiple:""},on:{change:this.onChangeInput}})}),[],!1,null,null,null).exports,B={name:"qrcode-drop-zone",mixins:[q],props:{worker:{type:Function,default:_}},methods:{onDragOver:function(e){this.$emit("dragover",e)},onDrop:function(e){var t=this,r=e.dataTransfer;this.onDragOver(!1);var n=Object(W.a)(r.files),a=r.getData("text/uri-list");n.forEach((function(e){t.onDetect(t.processFile(e))})),""!==a&&this.onDetect(this.processUrl(a))},processFile:function(e){var t=this;return Object(n.a)(regeneratorRuntime.mark((function r(){var n,a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,O(e);case 2:return n=r.sent,r.next=5,i(t.worker,n);case 5:return a=r.sent,r.abrupt("return",a);case 7:case"end":return r.stop()}}),r)})))()},processUrl:function(e){var t=this;return Object(n.a)(regeneratorRuntime.mark((function r(){var n,a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,j(e);case 2:return n=r.sent,r.next=5,i(t.worker,n);case 5:return a=r.sent,r.abrupt("return",a);case 7:case"end":return r.stop()}}),r)})))()}}},N=Object(M.a)(B,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{on:{drop:function(t){return t.preventDefault(),t.stopPropagation(),e.onDrop(t)},dragenter:function(t){return t.preventDefault(),t.stopPropagation(),e.onDragOver(!0)},dragleave:function(t){return t.preventDefault(),t.stopPropagation(),e.onDragOver(!1)},dragover:function(e){e.preventDefault(),e.stopPropagation()}}},[e._t("default")],2)}),[],!1,null,null,null).exports;var J={install:function(e){e.component("qrcode-stream",A),e.component("qrcode-capture",V),e.component("qrcode-drop-zone",N)}},Q=null;"undefined"!=typeof window?Q=window.Vue:"undefined"!=typeof global&&(Q=global.Vue),Q&&Q.use(J)},337:function(e,t,r){},394:function(e,t,r){"use strict";var n=r(337);r.n(n).a}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/20.cf251e7a.js b/docs/.vuepress/dist/assets/js/20.cf251e7a.js new file mode 100644 index 00000000..4076670a --- /dev/null +++ b/docs/.vuepress/dist/assets/js/20.cf251e7a.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{407:function(t,a,s){"use strict";s.r(a);var e=s(41),n=Object(e.a)({},(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"qrcodedropzone"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#qrcodedropzone"}},[t._v("#")]),t._v(" QrcodeDropZone")]),t._v(" "),s("h2",{attrs:{id:"events"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#events"}},[t._v("#")]),t._v(" Events")]),t._v(" "),s("h3",{attrs:{id:"decode"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#decode"}},[t._v("#")]),t._v(" "),s("code",[t._v("decode")])]),t._v(" "),s("ul",[s("li",[s("strong",[t._v("Payload Type:")]),t._v(" "),s("code",[t._v("String")])])]),t._v(" "),s("p",[t._v("You can drag-and-drop image files from your desktop or images embedded into other web pages anywhere in the area the component occupies. The images are directly scanned and positive results are indicated by the "),s("code",[t._v("decode")]),t._v(" event. You can also drop multiple images at the same time (still one event per image though).")]),t._v(" "),s("p",[t._v("However, if no QR code is pictured or an error occurs, "),s("code",[t._v("decode")]),t._v(" silently fails.")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-drop-zone")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@decode")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onDecode"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("\x3c!-- ... --\x3e")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("div",{staticClass:"language-javascript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-javascript"}},[s("code",[t._v("methods"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("onDecode")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("decodedString")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ...")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"detect"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#detect"}},[t._v("#")]),t._v(" "),s("code",[t._v("detect")])]),t._v(" "),s("ul",[s("li",[s("strong",[t._v("Payload Type:")]),t._v(" "),s("code",[t._v("Promise")])])]),t._v(" "),s("p",[t._v("The "),s("code",[t._v("detect")]),t._v(" event is basically a verbose version of "),s("code",[t._v("decode")]),t._v(". "),s("code",[t._v("detect")]),t._v(" is emitted as soon as you drop an image. It carries a Promise which resolves when scanning the dropped image has finished. The Promise rejects in case of errors. Additionally, "),s("code",[t._v("detect")]),t._v(" gives you the unprocessed raw image data and the coordinates of the QR code in the image.")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-drop-zone")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@detect")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onDetect"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("\x3c!-- ... --\x3e")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("div",{staticClass:"language-javascript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-javascript"}},[s("code",[t._v("methods"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("onDetect")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("promise")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n imageData"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// raw image data of image/frame")]),t._v("\n content"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// decoded String or null")]),t._v("\n location "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// QR code coordinates or null")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" promise\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("content "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("null")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// decoded nothing")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ...")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'DropImageFetchError'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// drag-and-dropped URL (probably just an element) from different")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// domain without CORS header caused same-origin-policy violation")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'DropImageDecodeError'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// drag-and-dropped file is not of type image and can't be decoded")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// idk, open an issue ¯\\_(ツ)_/¯")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"dragover"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#dragover"}},[t._v("#")]),t._v(" "),s("code",[t._v("dragover")])]),t._v(" "),s("ul",[s("li",[s("strong",[t._v("Payload Type:")]),t._v(" "),s("code",[t._v("Boolean")])])]),t._v(" "),s("p",[t._v("When the user is dragging something over the the component you might want to apply some emphasizing styling. Do that by reacting to the "),s("code",[t._v("dragover")]),t._v(" event.")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-drop-zone")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@dragover")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onDragOver"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v(":class")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("{ highlight: draggingOver }"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("\x3c!-- ... --\x3e")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("div",{staticClass:"language-javascript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-javascript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n draggingOver"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\nmethods"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("onDragOver")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("draggingOver")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("draggingOver "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" draggingOver\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("This is a custom event not to be confused with "),s("a",{attrs:{href:"https://developer.mozilla.org/en-US/docs/Web/Events/dragover",target:"_blank",rel:"noopener noreferrer"}},[t._v("native "),s("code",[t._v("dragover")]),s("OutboundLink")],1),t._v(". If you really need to listen for the DOM event instead, use "),s("a",{attrs:{href:"https://vuejs.org/v2/guide/components-custom-events.html#Binding-Native-Events-to-Components",target:"_blank",rel:"noopener noreferrer"}},[t._v("Vues "),s("code",[t._v("native")]),t._v(" event modifier"),s("OutboundLink")],1),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"props"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#props"}},[t._v("#")]),t._v(" Props")]),t._v(" "),s("blockquote",[s("p",[t._v("no props")])]),t._v(" "),s("h2",{attrs:{id:"slots"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#slots"}},[t._v("#")]),t._v(" Slots")]),t._v(" "),s("h3",{attrs:{id:"default"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#default"}},[t._v("#")]),t._v(" default")]),t._v(" "),s("p",[t._v("This component merely renders a wrapper "),s("code",[t._v("div")]),t._v(". Its height is defined by the content inside so it will have zero height if you don't provide any content.")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-drop-zone")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("b")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("put anything here"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/21.6a220a62.js b/docs/.vuepress/dist/assets/js/21.6a220a62.js new file mode 100644 index 00000000..33a66930 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/21.6a220a62.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{406:function(t,a,s){"use strict";s.r(a);var e=s(41),n=Object(e.a)({},(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"qrcodestream"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#qrcodestream"}},[t._v("#")]),t._v(" QrcodeStream")]),t._v(" "),s("h2",{attrs:{id:"events"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#events"}},[t._v("#")]),t._v(" Events")]),t._v(" "),s("h3",{attrs:{id:"decode"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#decode"}},[t._v("#")]),t._v(" "),s("code",[t._v("decode")])]),t._v(" "),s("ul",[s("li",[s("strong",[t._v("Payload Type:")]),t._v(" "),s("code",[t._v("String")])])]),t._v(" "),s("p",[t._v("Once a stream from the users camera is loaded, it's displayed and continuously scanned for QR codes. Results are indicated by the "),s("code",[t._v("decode")]),t._v(" event.")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-stream")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@decode")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onDecode"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("div",{staticClass:"language-javascript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-javascript"}},[s("code",[t._v("methods"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("onDecode")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("decodedString")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ...")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),s("p",[t._v("If you scan the same QR code multiple times in a row, "),s("code",[t._v("decode")]),t._v(" is still only emitted once. When you hold a QR code in the camera, frames are actually decoded multiple times a second but you don't want to be flooded with "),s("code",[t._v("decode")]),t._v(" events that often. That's why the last decoded QR code is always cached and only new results are propagated. However changing the value of "),s("code",[t._v("camera")]),t._v(" resets this internal cache.")])]),t._v(" "),s("h3",{attrs:{id:"detect"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#detect"}},[t._v("#")]),t._v(" "),s("code",[t._v("detect")])]),t._v(" "),s("ul",[s("li",[s("strong",[t._v("Payload Type:")]),t._v(" "),s("code",[t._v("Promise")])])]),t._v(" "),s("p",[t._v("The "),s("code",[t._v("detect")]),t._v(" event is basically a verbose version of "),s("code",[t._v("decode")]),t._v(". "),s("code",[t._v("decode")]),t._v(" only gives you the string encoded by QR codes. "),s("code",[t._v("detect")]),t._v(" on the other hand ...")]),t._v(" "),s("ul",[s("li",[t._v("is always emitted before "),s("code",[t._v("decode")])]),t._v(" "),s("li",[t._v("gives you the unprocessed raw image data")]),t._v(" "),s("li",[t._v("gives you the coordinates of the QR code in the camera frame")]),t._v(" "),s("li",[t._v("does NOT silently fail in case of errors")])]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-stream")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@detect")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onDetect"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("div",{staticClass:"language-javascript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-javascript"}},[s("code",[t._v("methods"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("onDetect")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("promise")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n imageData"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// raw image data of image/frame")]),t._v("\n content"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// decoded String")]),t._v("\n location "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// QR code coordinates")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" promise\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ...")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ...")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"init"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#init"}},[t._v("#")]),t._v(" "),s("code",[t._v("init")])]),t._v(" "),s("ul",[s("li",[s("strong",[t._v("Payload Type:")]),t._v(" "),s("code",[t._v("Promise")])])]),t._v(" "),s("p",[t._v("It might take a while before the component is ready and the scanning process starts. The user has to be asked for camera access permission first and the camera stream has to be loaded.")]),t._v(" "),s("p",[t._v("If you want to show a loading indicator, you can listen for the "),s("code",[t._v("init")]),t._v(" event. It's emitted as soon as the component is mounted. It carries a promise which resolves with the cameras "),s("a",{attrs:{href:"https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/getCapabilities",target:"_blank",rel:"noopener noreferrer"}},[t._v("MediaTrackCapabilities"),s("OutboundLink")],1),t._v(" when everything is ready. The promise is rejected if initialization fails. This can have "),s("a",{attrs:{href:"https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#Exceptions",target:"_blank",rel:"noopener noreferrer"}},[t._v("a couple of reasons"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("In Chrome you can't prompt users for permissions a second time. Once denied, users can only manually grant them. Make sure your users understand why you need access to their camera "),s("strong",[t._v("before")]),t._v(" you mount this component. Otherwise they might panic and deny and then get frustrated because they don't know how to change their decision.")])]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-stream")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@init")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onInit"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("div",{staticClass:"language-javascript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-javascript"}},[s("code",[t._v("methods"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("onInit")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("promise")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// show loading indicator")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" capabilities "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" promise\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// successfully initialized")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'NotAllowedError'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// user denied camera access permisson")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'NotFoundError'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// no suitable camera device installed")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'NotSupportedError'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// page is not served over HTTPS (or localhost)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'NotReadableError'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// maybe camera is already in use")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'OverconstrainedError'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// did you requested the front camera although there is none?")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'StreamApiNotSupportedError'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// browser seems to be lacking features")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("finally")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// hide loading indicator")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h2",{attrs:{id:"props"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#props"}},[t._v("#")]),t._v(" Props")]),t._v(" "),s("h3",{attrs:{id:"track"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#track"}},[t._v("#")]),t._v(" "),s("code",[t._v("track")])]),t._v(" "),s("ul",[s("li",[s("strong",[t._v("Input Type:")]),t._v(" "),s("code",[t._v("Boolean")]),t._v(", "),s("code",[t._v("Function")])]),t._v(" "),s("li",[s("strong",[t._v("Default:")]),t._v(" "),s("code",[t._v("true")])])]),t._v(" "),s("p",[t._v("By default detected QR codes are visually highlighted. A transparent canvas overlays the camera stream. When a QR code is detected, its location is painted to the canvas. You can enable/disable this feature by passing "),s("code",[t._v("true")]),t._v("/"),s("code",[t._v("false")]),t._v(" via the "),s("code",[t._v("track")]),t._v(" prop. If tracking is disabled the camera stream is scanned much less frequently. So if you encounter performance problems on your target device, this might help.")]),t._v(" "),s("p",[t._v("You can also pass a function with "),s("code",[t._v("track")]),t._v(" to customize the way the location is painted. This function is called to produce each frame. It receives the location object as the first argument and a "),s("code",[t._v("CanvasRenderingContext2D")]),t._v(" instance as the second argument.")]),t._v(" "),s("div",{staticClass:"custom-block danger"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("Avoid access to reactive properties in this function (like stuff in "),s("code",[t._v("data")]),t._v(", "),s("code",[t._v("computed")]),t._v(" or your Vuex store). The function is called several times a second and might cause memory leaks. To be safe don't access "),s("code",[t._v("this")]),t._v(" at all.")])]),t._v(" "),s("p",[t._v("Say you want to paint in a different color that better fits your overall page theme.")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-stream")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v(":track")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("repaint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("div",{staticClass:"language-javascript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-javascript"}},[s("code",[t._v("methods"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("repaint")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("location"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ctx")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n topLeftCorner"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n topRightCorner"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bottomLeftCorner"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bottomRightCorner"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// topLeftFinderPattern,")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// topRightFinderPattern,")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// bottomLeftFinderPattern")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" location\n\n ctx"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("strokeStyle "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'blue'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// instead of red")]),t._v("\n\n ctx"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("beginPath")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n ctx"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("moveTo")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("topLeftCorner"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("x"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" topLeftCorner"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("y"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n ctx"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("lineTo")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("bottomLeftCorner"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("x"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" bottomLeftCorner"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("y"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n ctx"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("lineTo")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("bottomRightCorner"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("x"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" bottomRightCorner"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("y"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n ctx"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("lineTo")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("topRightCorner"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("x"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" topRightCorner"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("y"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n ctx"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("lineTo")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("topLeftCorner"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("x"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" topLeftCorner"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("y"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n ctx"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("closePath")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n ctx"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stroke")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"camera"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#camera"}},[t._v("#")]),t._v(" "),s("code",[t._v("camera")])]),t._v(" "),s("ul",[s("li",[s("strong",[t._v("Input Type:")]),t._v(" "),s("code",[t._v("String")])]),t._v(" "),s("li",[s("strong",[t._v("Default:")]),t._v(" "),s("code",[t._v("auto")])]),t._v(" "),s("li",[s("strong",[t._v("Valid Inputs:")]),t._v(" "),s("code",[t._v("auto")]),t._v(", "),s("code",[t._v("rear")]),t._v(", "),s("code",[t._v("front")]),t._v(", "),s("code",[t._v("off")])])]),t._v(" "),s("p",[t._v("With the "),s("code",[t._v("camera")]),t._v(" prop you can control which camera to access on the users device.")]),t._v(" "),s("ul",[s("li",[t._v("Use "),s("code",[t._v("front")]),t._v(" or "),s("code",[t._v("rear")]),t._v(" to force request the front or rear camera respectively.")]),t._v(" "),s("li",[t._v("If you choose "),s("code",[t._v("auto")]),t._v(" the rear camera is requested by default.\nBut if a device like a laptop has only a front camera installed, "),s("code",[t._v("auto")]),t._v(" will fallback to that.")]),t._v(" "),s("li",[t._v("Use "),s("code",[t._v("off")]),t._v(" to not request a camera at all or in other words: turn the camera off.")])]),t._v(" "),s("p",[t._v("Every time the camera prop is modified, a new camera stream is requested so the "),s("code",[t._v("init")]),t._v(" event is emitted again.\nThat way you can catch errors.\nFor example when the front camera is requested on a device that doesn't have one.")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-stream")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v(":camera")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("camera"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@init")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onCameraChange"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n camera"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'auto'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\nmethods"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("startFrontCamera")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("camera "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'front'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("onCameraChange")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("promise")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n promise"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("catch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("error")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" cameraMissingError "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'OverconstrainedError'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" triedFrontCamera "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("camera "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'front'")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("triedFrontCamera "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" cameraMissingError"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// no front camera on this device")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"torch"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#torch"}},[t._v("#")]),t._v(" "),s("code",[t._v("torch")])]),t._v(" "),s("ul",[s("li",[s("strong",[t._v("Input Type:")]),t._v(" "),s("code",[t._v("Boolean")])]),t._v(" "),s("li",[s("strong",[t._v("Default:")]),t._v(" "),s("code",[t._v("false")])])]),t._v(" "),s("p",[t._v("With the "),s("code",[t._v("torch")]),t._v(" prop you can turn a devices flashlight on/off.\nThis is not consistently supported by all devices and browsers.\nSupport can even vary on the same device with the same browser.\nFor example the rear camera often has a flashlight but the front camera doesn't.\nWe can only tell if flashlight control is supported once the camera is loaded and the "),s("code",[t._v("init")]),t._v(" event has been emitted.\nAt the moment, "),s("code",[t._v("torch")]),t._v(" silently fails on unsupported devices.\nBut from the "),s("code",[t._v("init")]),t._v(" events payload you can access the "),s("a",{attrs:{href:"https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/getCapabilities",target:"_blank",rel:"noopener noreferrer"}},[t._v("MediaTrackCapabilities"),s("OutboundLink")],1),t._v(" object.\nThis will tell you whether or not "),s("code",[t._v("torch")]),t._v(" is supported.")]),t._v(" "),s("p",[t._v("Due to API limitations the camera stream must be reloaded when turning the torch on/off.\nThat means the "),s("code",[t._v("init")]),t._v(" event will be emitted again.")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-stream")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v(":torch")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("true"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@init")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onInit"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("methods"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("onInit")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("promise")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" capabilities "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" promise\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("TORCH_IS_SUPPORTED")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("capabilities"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("torch\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"worker"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#worker"}},[t._v("#")]),t._v(" "),s("code",[t._v("worker")]),t._v(" "),s("Badge",{attrs:{text:"experimental",type:"error"}})],1),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),s("p",[t._v("So far "),s("em",[t._v("vue-qrcode-reader")]),t._v(" could only process QR codes.\nHowever, many people requested support for different code types\n(bar codes, data matrix, color inverted QR codes, ...) though.\nWith this prop we try to meet these demands.")]),t._v(" "),s("p",[t._v("Please share your successful or unsuccessful implementation attempts at\n"),s("a",{attrs:{href:"https://github.com/gruhn/vue-qrcode-reader/issues/109",target:"_blank",rel:"noopener noreferrer"}},[t._v("#109"),s("OutboundLink")],1),t._v(".\nYour feedback is greatly appreciated.")])]),t._v(" "),s("p",[t._v("By default, "),s("em",[t._v("QrcodeStream")]),t._v(" will only detect QR codes.\nProcessing image data is expensive so a web worker is doing the heavy lifting.\nBecause the worker is the only QR code specific part of the library though,\nyou can replace the default worker and get a component that can scan whatever you want.")]),t._v(" "),s("p",[t._v("First of all you need to create a custom worker class:")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("class")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("MyWorkerClass")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Worker")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("constructor")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("super")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"path/to/worker.js"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("(Internally, "),s("em",[t._v("vue-qrcode-reader")]),t._v(" leverages "),s("a",{attrs:{href:"https://github.com/webpack-contrib/worker-loader",target:"_blank",rel:"noopener noreferrer"}},[t._v("worker-loader"),s("OutboundLink")],1),t._v("\nto makes this slightly more convenient)")]),t._v(" "),s("p",[t._v("To get your "),s("code",[t._v("worker.js")]),t._v(" right, check out "),s("a",{attrs:{href:"https://github.com/gruhn/vue-qrcode-reader/blob/91ee3fc8bf2f7fab96ac3f0a5d84d2d4c09b012f/src/worker/jsqr.js",target:"_blank",rel:"noopener noreferrer"}},[t._v("the default implementation"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("Now, pass the worker class via the "),s("code",[t._v("worker")]),t._v(" prop.\nDon't pass a class instance, we need the class itself!")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-stream")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v(":worker")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("Worker"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("data")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n Worker"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" MyWorkerClass "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Don't do: new MyWorkerClass()")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),s("p",[s("code",[t._v("QrcodeCapture")]),t._v(" and "),s("code",[t._v("QrcodeDropZone")]),t._v(" too expose the "),s("code",[t._v("worker")]),t._v(" prop.\nDedicated API documentation is missing so far but usage should be similar.")])]),t._v(" "),s("h2",{attrs:{id:"slots"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#slots"}},[t._v("#")]),t._v(" Slots")]),t._v(" "),s("h3",{attrs:{id:"default"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#default"}},[t._v("#")]),t._v(" default")]),t._v(" "),s("p",[t._v("Any distributed content overlays the camera stream, wrapped in a "),s("code",[t._v("position: absolute")]),t._v(" container.")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-stream")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("b")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("stuff here overlays the camera stream"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/22.b0d9e2e8.js b/docs/.vuepress/dist/assets/js/22.b0d9e2e8.js new file mode 100644 index 00000000..7b5e5966 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/22.b0d9e2e8.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{404:function(t,e,n){"use strict";n.r(e);var s=n(41),l=Object(s.a)({},(function(){var t=this.$createElement;return(this._self._c||t)("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}})}),[],!1,null,null,null);e.default=l.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/23.bdb0e1be.js b/docs/.vuepress/dist/assets/js/23.bdb0e1be.js new file mode 100644 index 00000000..f6f80db9 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/23.bdb0e1be.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{408:function(t,s,a){"use strict";a.r(s);var n=a(41),e=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"customize-tracking"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#customize-tracking"}},[t._v("#")]),t._v(" Customize Tracking")]),t._v(" "),a("p",[t._v("You don't like the red square around detected QR codes?\nNo problem, you can also completely customize how visual tracking should look like!")]),t._v(" "),a("p",[t._v("Also check out the "),a("code",[t._v("None")]),t._v(" option.\nFrames are scanned less frequently if tracking is disabled.\nSo this a way to improve performance for your target devices.")]),t._v(" "),a("ClientOnly",[a("DemoWrapper",{attrs:{component:"CustomTracking"}})],1),t._v(" "),a("h3",{attrs:{id:"source"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#source"}},[t._v("#")]),t._v(" Source")]),t._v(" "),a("div",{staticClass:"language-vue extra-class"},[a("pre",{pre:!0,attrs:{class:"language-vue"}},[a("code",[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("template")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n Track function:\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("select")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("v-model")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("selected"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("option")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("v-for")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("option in options"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v(":value")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("option"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n {{ option.text }}\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("class")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("decode-result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n Last result: "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("b")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ result }}"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-stream")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v(":key")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("_uid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v(":track")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("selected.value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@decode")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onDecode"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@init")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("logErrors"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("/>")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token script"}},[a("span",{pre:!0,attrs:{class:"token language-javascript"}},[t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" QrcodeStream "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'../../../../src'")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n components"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" QrcodeStream "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("data")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" options "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" text"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"None"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" text"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Red square (default)"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" text"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Green text"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("paintGreenText "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" text"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Blue dots"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("paintBlueDots "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" selected "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" options"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" selected"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" options"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" result"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("null")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n methods"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("paintBlueDots")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("location"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ctx")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n topLeftFinderPattern"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n topRightFinderPattern"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bottomLeftFinderPattern\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" location\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" pointArray "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n topLeftFinderPattern"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n topRightFinderPattern"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bottomLeftFinderPattern\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n\n ctx"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("fillStyle "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'#007bff'")]),t._v("\n\n pointArray"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("forEach")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" x"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" y "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n ctx"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("fillRect")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("x "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("-")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" y "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("-")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("paintGreenText")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("location"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ctx")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n topLeftCorner"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n topRightCorner"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bottomLeftCorner"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bottomRightCorner\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" location\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" pointArray "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n topLeftCorner"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n topRightCorner"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bottomLeftCorner"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bottomRightCorner\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" centerX "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" pointArray"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("reduce")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("sum"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" x "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" x "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" sum"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("4")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" centerY "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" pointArray"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("reduce")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("sum"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" y "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" y "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" sum"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("4")]),t._v("\n\n ctx"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("font "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bold 24px sans-serif"')]),t._v("\n ctx"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("textAlign "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"center"')]),t._v("\n\n ctx"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("lineWidth "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),t._v("\n ctx"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("strokeStyle "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'#35495e'")]),t._v("\n ctx"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("strokeText")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" centerX"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" centerY"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n ctx"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("fillStyle "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'#5cb984'")]),t._v("\n ctx"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("fillText")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" centerX"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" centerY"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("onDecode")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("result")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("result "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" result\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("logErrors")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("promise")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n promise"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("catch")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])])],1)}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/24.f67dd732.js b/docs/.vuepress/dist/assets/js/24.f67dd732.js new file mode 100644 index 00000000..497fee68 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/24.f67dd732.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{409:function(t,s,a){"use strict";a.r(s);var n=a(41),r=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"decode-continuously"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#decode-continuously"}},[t._v("#")]),t._v(" Decode Continuously")]),t._v(" "),a("p",[t._v("Hold a QR code in the camera and see what happens. Note, you can't scan the same\nQR code multiple time in a row.")]),t._v(" "),a("ClientOnly",[a("DemoWrapper",{attrs:{component:"DecodeAll"}})],1),t._v(" "),a("h3",{attrs:{id:"source"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#source"}},[t._v("#")]),t._v(" Source")]),t._v(" "),a("div",{staticClass:"language-vue extra-class"},[a("pre",{pre:!0,attrs:{class:"language-vue"}},[a("code",[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("template")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("class")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ error }}"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("class")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("decode-result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("Last result: "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("b")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ result }}"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-stream")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@decode")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onDecode"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@init")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onInit"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("/>")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token script"}},[a("span",{pre:!0,attrs:{class:"token language-javascript"}},[t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" QrcodeStream "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'../../../../src'")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n components"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" QrcodeStream "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("data")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n result"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("''")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n error"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("''")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n methods"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("onDecode")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("result")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("result "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" result\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("onInit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("promise")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" promise\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'NotAllowedError'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("error "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ERROR: you need to grant camera access permisson"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'NotFoundError'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("error "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ERROR: no camera on this device"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'NotSupportedError'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("error "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ERROR: secure context required (HTTPS, localhost)"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'NotReadableError'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("error "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ERROR: is the camera already in use?"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'OverconstrainedError'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("error "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ERROR: installed cameras are not suitable"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'StreamApiNotSupportedError'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("error "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ERROR: Stream API is not supported in this browser"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("style")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("scoped")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token style"}},[a("span",{pre:!0,attrs:{class:"token language-css"}},[t._v("\n"),a("span",{pre:!0,attrs:{class:"token selector"}},[t._v(".error")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("font-weight")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" bold"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("color")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" red"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])])],1)}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/25.2ab6abbf.js b/docs/.vuepress/dist/assets/js/25.2ab6abbf.js new file mode 100644 index 00000000..a353676f --- /dev/null +++ b/docs/.vuepress/dist/assets/js/25.2ab6abbf.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[25],{410:function(t,s,a){"use strict";a.r(s);var n=a(41),r=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"decode-by-drag-drop"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#decode-by-drag-drop"}},[t._v("#")]),t._v(" Decode by Drag&Drop")]),t._v(" "),a("p",[t._v("With the "),a("code",[t._v("QrcodeDropZone")]),t._v(" component you can also drag-and-drop images that\nshould be scanned. Use it as a standalone feature or as a fallback for desktop\nusers.")]),t._v(" "),a("ClientOnly",[a("DemoWrapper",{attrs:{component:"DragDrop"}})],1),t._v(" "),a("h3",{attrs:{id:"source"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#source"}},[t._v("#")]),t._v(" Source")]),t._v(" "),a("div",{staticClass:"language-vue extra-class"},[a("pre",{pre:!0,attrs:{class:"language-vue"}},[a("code",[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("template")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("class")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("decode-result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("Last result: "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("b")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ result }}"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("v-if")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("error !== null"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("class")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("drop-error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n {{ error }}\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-drop-zone")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@detect")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onDetect"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@dragover")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onDragOver"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@init")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("logErrors"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("class")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("drop-area"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v(":class")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("{ 'dragover': dragover }"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n DROP SOME IMAGES HERE\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token script"}},[a("span",{pre:!0,attrs:{class:"token language-javascript"}},[t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" QrcodeDropZone "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'../../../../src'")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n components"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" QrcodeDropZone "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("data")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n result"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n error"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n dragover"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n methods"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("onDetect")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("promise")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" content "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" promise\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("result "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" content\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("error "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("null")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'DropImageFetchError'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("error "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Sorry, you can\\'t load cross-origin images :/'")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'DropImageDecodeError'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("error "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Ok, that\\'s not an image. That can\\'t be decoded.'")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("error "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Ups, what kind of error is this?! '")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("message\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("logErrors")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("promise")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n promise"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("catch")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("onDragOver")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("isDraggingOver")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("dragover "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" isDraggingOver\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("style")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token style"}},[a("span",{pre:!0,attrs:{class:"token language-css"}},[t._v("\n"),a("span",{pre:!0,attrs:{class:"token selector"}},[t._v(".drop-area")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("height")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 300px"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("color")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" #fff"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("text-align")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" center"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("font-weight")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" bold"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("padding")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 10px"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("background-color")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("rgba")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("0"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("0"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("0"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(".5"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token selector"}},[t._v(".dragover")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("background-color")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("rgba")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("0"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("0"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("0"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(".8"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token selector"}},[t._v(".drop-error")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("color")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" red"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("font-weight")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" bold"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])])],1)}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/26.8cb58252.js b/docs/.vuepress/dist/assets/js/26.8cb58252.js new file mode 100644 index 00000000..d3c140b2 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/26.8cb58252.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{412:function(t,s,a){"use strict";a.r(s);var n=a(41),e=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"fallback-for-desktop-mobile"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#fallback-for-desktop-mobile"}},[t._v("#")]),t._v(" Fallback for desktop/mobile")]),t._v(" "),a("p",[t._v("This demo combines all "),a("i",[t._v("vue-qrcode-reader")]),t._v(" components to provide\nfallbacks for both desktop users without a camera and legacy mobile users\nwithout Stream API support.")]),t._v(" "),a("ClientOnly",[a("DemoWrapper",{attrs:{component:"Fallback"}})],1),t._v(" "),a("h3",{attrs:{id:"source"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#source"}},[t._v("#")]),t._v(" Source")]),t._v(" "),a("div",{staticClass:"language-vue extra-class"},[a("pre",{pre:!0,attrs:{class:"language-vue"}},[a("code",[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("template")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("class")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("decode-result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("Last result: "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("b")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ result }}"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-drop-zone")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@decode")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onDecode"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@init")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("logErrors"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-stream")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@decode")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onDecode"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@init")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onInit"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("/>")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-capture")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("v-if")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("noStreamApiSupport"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@decode")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onDecode"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("/>")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token script"}},[a("span",{pre:!0,attrs:{class:"token language-javascript"}},[t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" QrcodeStream"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" QrcodeDropZone"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" QrcodeCapture "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'../../../../src'")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n components"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" QrcodeStream"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" QrcodeDropZone"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" QrcodeCapture "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("data")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n result"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("''")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n noStreamApiSupport"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n methods"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("onDecode")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("result")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("result "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" result\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("logErrors")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("promise")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n promise"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("catch")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("onInit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("promise")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" promise\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'StreamApiNotSupportedError'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("noStreamApiSupport "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])])],1)}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/27.e9e323ea.js b/docs/.vuepress/dist/assets/js/27.e9e323ea.js new file mode 100644 index 00000000..ad4e0d80 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/27.e9e323ea.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[27],{414:function(t,s,n){"use strict";n.r(s);var a=n(41),e=Object(a.a)({},(function(){var t=this,s=t.$createElement,n=t._self._c||s;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"fullscreen"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#fullscreen"}},[t._v("#")]),t._v(" Fullscreen")]),t._v(" "),n("p",[n("code",[t._v("QrcodeStream")]),t._v(" always covers the entire space available.\nNot more, not less.\nSo to go fullscreen, simply put the component in a wrapper element that occupies the entire screen.")]),t._v(" "),n("ClientOnly",[n("DemoWrapper",{attrs:{component:"Fullscreen"}})],1),t._v(" "),n("h3",{attrs:{id:"source"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#source"}},[t._v("#")]),t._v(" Source")]),t._v(" "),n("div",{staticClass:"language-vue extra-class"},[n("pre",{pre:!0,attrs:{class:"language-vue"}},[n("code",[n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("template")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v(":class")]),n("span",{pre:!0,attrs:{class:"token attr-value"}},[n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("{ 'fullscreen': fullscreen }"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),n("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ref")]),n("span",{pre:!0,attrs:{class:"token attr-value"}},[n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("wrapper"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),n("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@fullscreenchange")]),n("span",{pre:!0,attrs:{class:"token attr-value"}},[n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onFullscreenChange"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-stream")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@init")]),n("span",{pre:!0,attrs:{class:"token attr-value"}},[n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("logErrors"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("button")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@click")]),n("span",{pre:!0,attrs:{class:"token attr-value"}},[n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("fullscreen = !fullscreen"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),n("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("class")]),n("span",{pre:!0,attrs:{class:"token attr-value"}},[n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("fullscreen-button"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("img")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v(":src")]),n("span",{pre:!0,attrs:{class:"token attr-value"}},[n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("$withBase(fullscreenIcon)"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),n("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("alt")]),n("span",{pre:!0,attrs:{class:"token attr-value"}},[n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("toggle fullscreen"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("/>")])]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),n("span",{pre:!0,attrs:{class:"token script"}},[n("span",{pre:!0,attrs:{class:"token language-javascript"}},[t._v("\n"),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" QrcodeStream "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v("'../../../../src'")]),t._v("\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// NOTE: calling `requestFullscreen` might prompt the user with another")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// permission dialog. You already asked for camera access permission so this is")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// a rather invasive move.")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Even without calling `requestFullscreen` the entire viewport is covered")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// by the camera stream. So consider skipping `requestFullscreen` in your")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// implementation.")]),t._v("\n\n"),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("export")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n components"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" QrcodeStream "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("data")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n fullscreen"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n computed"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("fullscreenIcon")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("fullscreen"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/fullscreen-exit.svg"')]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/fullscreen.svg"')]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n watch"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("fullscreen")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("enterFullscreen")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("enterFullscreen"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("requestFullscreen")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("exitFullscreen")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n methods"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("onFullscreenChange")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("event")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This becomes important when the user doesn't use the button to exit")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// fullscreen but hits ESC on desktop, pushes a physical back button on")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// mobile etc.")]),t._v("\n\n "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("fullscreen "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" document"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("fullscreenElement "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!==")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("null")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("requestFullscreen")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" elem "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("$refs"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("wrapper\n\n "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("elem"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("requestFullscreen"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n elem"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("requestFullscreen")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("elem"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("mozRequestFullScreen"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/* Firefox */")]),t._v("\n elem"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("mozRequestFullScreen")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("elem"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("webkitRequestFullscreen"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/* Chrome, Safari and Opera */")]),t._v("\n elem"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("webkitRequestFullscreen")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("elem"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("msRequestFullscreen"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/* IE/Edge */")]),t._v("\n elem"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("msRequestFullscreen")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("exitFullscreen")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("document"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("exitFullscreen"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n document"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("exitFullscreen")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("document"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("mozCancelFullScreen"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/* Firefox */")]),t._v("\n document"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("mozCancelFullScreen")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("document"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("webkitExitFullscreen"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/* Chrome, Safari and Opera */")]),t._v("\n document"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("webkitExitFullscreen")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("document"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("msExitFullscreen"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/* IE/Edge */")]),t._v("\n document"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("msExitFullscreen")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("logErrors")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("promise")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n promise"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("catch")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("console"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("error"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("style")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("scoped")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),n("span",{pre:!0,attrs:{class:"token style"}},[n("span",{pre:!0,attrs:{class:"token language-css"}},[t._v("\n"),n("span",{pre:!0,attrs:{class:"token selector"}},[t._v(".fullscreen")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token property"}},[t._v("position")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" fixed"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token property"}},[t._v("z-index")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 1000"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token property"}},[t._v("top")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 0"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token property"}},[t._v("bottom")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 0"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token property"}},[t._v("right")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 0"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token property"}},[t._v("left")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 0"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),n("span",{pre:!0,attrs:{class:"token selector"}},[t._v(".fullscreen-button")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token property"}},[t._v("background-color")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" white"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token property"}},[t._v("position")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" absolute"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token property"}},[t._v("bottom")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 0"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token property"}},[t._v("right")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 0"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token property"}},[t._v("margin")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 1rem"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token selector"}},[t._v(".fullscreen-button img")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token property"}},[t._v("width")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 2rem"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token tag"}},[n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])])],1)}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/28.5974f8d5.js b/docs/.vuepress/dist/assets/js/28.5974f8d5.js new file mode 100644 index 00000000..ca6152b3 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/28.5974f8d5.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{413:function(t,s,a){"use strict";a.r(s);var n=a(41),e=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"show-loading-indicator"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#show-loading-indicator"}},[t._v("#")]),t._v(" Show Loading Indicator")]),t._v(" "),a("p",[t._v("There is some delay between mounting the component and the camera stream\nbecoming visible. Listen for the "),a("code",[t._v("init")]),t._v(" event to show a loading indicator.")]),t._v(" "),a("p",[t._v("Push the button below to force destroy and re-create the component.")]),t._v(" "),a("ClientOnly",[a("DemoWrapper",{attrs:{component:"LoadingIndicator"}})],1),t._v(" "),a("h3",{attrs:{id:"source"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#source"}},[t._v("#")]),t._v(" Source")]),t._v(" "),a("div",{staticClass:"language-vue extra-class"},[a("pre",{pre:!0,attrs:{class:"language-vue"}},[a("code",[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("template")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("button")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@click")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("reload"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("Destroy And Re-Create Component"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-stream")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@init")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onInit"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("v-if")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("!destroyed"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("class")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("loading-indicator"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("v-if")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("loading"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n Loading...\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token script"}},[a("span",{pre:!0,attrs:{class:"token language-javascript"}},[t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" QrcodeStream "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'../../../../src'")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n components"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" QrcodeStream "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("data")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n loading"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n destroyed"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n methods"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("onInit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("promise")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("loading "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" promise\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("error")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("finally")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("loading "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("reload")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("destroyed "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("$nextTick")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("destroyed "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("style")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("scoped")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token style"}},[a("span",{pre:!0,attrs:{class:"token language-css"}},[t._v("\n"),a("span",{pre:!0,attrs:{class:"token selector"}},[t._v("button")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("margin-bottom")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 20px"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token selector"}},[t._v(".loading-indicator")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("font-weight")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" bold"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("font-size")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 2rem"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("text-align")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" center"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])])],1)}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/29.e5ba1ad3.js b/docs/.vuepress/dist/assets/js/29.e5ba1ad3.js new file mode 100644 index 00000000..b47143d8 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/29.e5ba1ad3.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{411:function(t,e,n){"use strict";n.r(e);var s=n(41),l=Object(s.a)({},(function(){var t=this.$createElement;return(this._self._c||t)("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}})}),[],!1,null,null,null);e.default=l.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/30.64bce4f2.js b/docs/.vuepress/dist/assets/js/30.64bce4f2.js new file mode 100644 index 00000000..4380957e --- /dev/null +++ b/docs/.vuepress/dist/assets/js/30.64bce4f2.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{415:function(e,t,r){"use strict";r.r(t);var n=r(41),o=Object(n.a)({},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"simple"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#simple"}},[e._v("#")]),e._v(" Simple")]),e._v(" "),r("p",[e._v("All demos on this page utilize "),r("a",{attrs:{href:"https://vuejs.org/v2/guide/single-file-components.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("single-file components"),r("OutboundLink")],1),e._v(".\nTo use them in your project you need a bundler like webpack.")]),e._v(" "),r("p",[e._v("For simpler example that works without a build step and right in the browser, checkout "),r("a",{attrs:{href:"https://jsfiddle.net/vqg8to36/1/",target:"_blank",rel:"noopener noreferrer"}},[e._v("this fiddle"),r("OutboundLink")],1),e._v(".")])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/31.2bf05fbc.js b/docs/.vuepress/dist/assets/js/31.2bf05fbc.js new file mode 100644 index 00000000..229518ef --- /dev/null +++ b/docs/.vuepress/dist/assets/js/31.2bf05fbc.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{416:function(t,a,s){"use strict";s.r(a);var n=s(41),r=Object(n.a)({},(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"switch-to-front-camera"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#switch-to-front-camera"}},[t._v("#")]),t._v(" Switch to Front Camera")]),t._v(" "),s("p",[t._v("You can also allow users to choose the front or rear camera on their\ndevice.")]),t._v(" "),s("ClientOnly",[s("DemoWrapper",{attrs:{component:"SwitchCamera"}})],1),t._v(" "),s("h3",{attrs:{id:"source"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#source"}},[t._v("#")]),t._v(" Source")]),t._v(" "),s("div",{staticClass:"language-vue extra-class"},[s("pre",{pre:!0,attrs:{class:"language-vue"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("template")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("class")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("v-if")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("noFrontCamera"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n You don't seem to have a front camera on your device\n "),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("class")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("v-if")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("noRearCamera"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n You don't seem to have a rear camera on your device\n "),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-stream")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v(":camera")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("camera"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@init")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onInit"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("button")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@click")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("switchCamera"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("img")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v(":src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("$withBase('/camera-switch.svg')"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("alt")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("switch camera"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}},[s("span",{pre:!0,attrs:{class:"token language-javascript"}},[t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" QrcodeStream "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'../../../../src'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("export")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n components"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" QrcodeStream "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n camera"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'rear'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n noRearCamera"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n noFrontCamera"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n methods"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("switchCamera")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("switch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("camera"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("case")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'front'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("camera "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'rear'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("break")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("case")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'rear'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("camera "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'front'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("break")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("onInit")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("promise")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" promise\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" triedFrontCamera "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("camera "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'front'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" triedRearCamera "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("camera "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'rear'")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" cameraMissingError "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'OverconstrainedError'")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("triedRearCamera "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" cameraMissingError"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("noRearCamera "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("triedFrontCamera "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" cameraMissingError"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("noFrontCamera "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("error")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("style")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("scoped")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token style"}},[s("span",{pre:!0,attrs:{class:"token language-css"}},[t._v("\n"),s("span",{pre:!0,attrs:{class:"token selector"}},[t._v("button")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v("position")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" absolute"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v("left")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 10px"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v("top")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 10px"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token selector"}},[t._v(".error")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v("color")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" red"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v("font-weight")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" bold"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])])],1)}),[],!1,null,null,null);a.default=r.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/32.0659e1f9.js b/docs/.vuepress/dist/assets/js/32.0659e1f9.js new file mode 100644 index 00000000..f6a0b200 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/32.0659e1f9.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[32],{417:function(t,s,a){"use strict";a.r(s);var n=a(41),p=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"torch-flashlight"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#torch-flashlight"}},[t._v("#")]),t._v(" Torch (Flashlight)")]),t._v(" "),a("p",[t._v("In low-light conditions you might want to make use of the cameras flashlight.\nUsing the "),a("code",[t._v("torch")]),t._v(" prop, you can turn the flashlight on/off.\nNote that support is inconsistent across devices and browers.")]),t._v(" "),a("p",[t._v("Feature sponsored by "),a("a",{attrs:{href:"https://aeschbacher.ch",target:"_blank",rel:"noopener noreferrer"}},[t._v("aeschbacher.ch"),a("OutboundLink")],1)]),t._v(" "),a("ClientOnly",[a("DemoWrapper",{attrs:{component:"Torch"}})],1),t._v(" "),a("h3",{attrs:{id:"source"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#source"}},[t._v("#")]),t._v(" Source")]),t._v(" "),a("div",{staticClass:"language-vue extra-class"},[a("pre",{pre:!0,attrs:{class:"language-vue"}},[a("code",[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("template")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("v-if")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("torchNotSupported"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("class")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n Torch not supported for active camera\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-stream")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v(":torch")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("torchActive"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@init")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onInit"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("button")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@click")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("torchActive = !torchActive"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v(":disabled")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("torchNotSupported"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("img")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v(":src")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("$withBase(icon)"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("alt")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("toggle torch"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token script"}},[a("span",{pre:!0,attrs:{class:"token language-javascript"}},[t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" QrcodeStream "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'../../../../src'")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n components"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" QrcodeStream "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("data")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n torchActive"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n torchNotSupported"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n computed"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("icon")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("torchActive"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/flash-off.svg'")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/flash-on.svg'")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n methods"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("onInit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("promise")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" capabilities "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" promise\n\n console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("capabilities"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("torchNotSupported "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("capabilities"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("torch\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("error")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("style")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("scoped")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token style"}},[a("span",{pre:!0,attrs:{class:"token language-css"}},[t._v("\n"),a("span",{pre:!0,attrs:{class:"token selector"}},[t._v("button")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("position")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" absolute"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("left")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 10px"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("top")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 10px"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token selector"}},[t._v(".error")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("color")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" red"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("font-weight")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" bold"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])])],1)}),[],!1,null,null,null);s.default=p.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/33.bd147296.js b/docs/.vuepress/dist/assets/js/33.bd147296.js new file mode 100644 index 00000000..089f5393 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/33.bd147296.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[33],{418:function(t,a,s){"use strict";s.r(a);var n=s(41),e=Object(n.a)({},(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"decode-by-upload"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#decode-by-upload"}},[t._v("#")]),t._v(" Decode by Upload")]),t._v(" "),s("p",[t._v("Finally, with "),s("code",[t._v("QrcodeCapture")]),t._v(" comes another component which allows image scanning via classic file upload.\nIf you are on mobile and your browser supports it,\nyour are not prompted with a file dialog but with your camera.\nSo you can directly take the picture to be uploaded.")]),t._v(" "),s("p",[t._v("Note that nothing is actually uploaded. Everything is happening client-side.")]),t._v(" "),s("ClientOnly",[s("DemoWrapper",{attrs:{component:"Upload"}})],1),t._v(" "),s("h3",{attrs:{id:"source"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#source"}},[t._v("#")]),t._v(" Source")]),t._v(" "),s("div",{staticClass:"language-vue extra-class"},[s("pre",{pre:!0,attrs:{class:"language-vue"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("template")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("class")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("decode-result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("Last result: "),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("b")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ result }}"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-capture")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@decode")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onDecode"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("/>")])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}},[s("span",{pre:!0,attrs:{class:"token language-javascript"}},[t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" QrcodeCapture "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'../../../../src'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("export")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n components"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" QrcodeCapture "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n result"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("''")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n methods"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("onDecode")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("result")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("result "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" result\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])])],1)}),[],!1,null,null,null);a.default=e.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/34.e6383e68.js b/docs/.vuepress/dist/assets/js/34.e6383e68.js new file mode 100644 index 00000000..3690965c --- /dev/null +++ b/docs/.vuepress/dist/assets/js/34.e6383e68.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[34],{419:function(t,s,a){"use strict";a.r(s);var n=a(41),p=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"pause-validate"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#pause-validate"}},[t._v("#")]),t._v(" Pause & Validate")]),t._v(" "),a("p",[t._v("By turning off the camera you can process each scanned QR-code one at a time.\nThe last received frame is still displayed so it just looks like the stream is\npaused.")]),t._v(" "),a("ClientOnly",[a("DemoWrapper",{attrs:{component:"Validate"}})],1),t._v(" "),a("h3",{attrs:{id:"source"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#source"}},[t._v("#")]),t._v(" Source")]),t._v(" "),a("div",{staticClass:"language-vue extra-class"},[a("pre",{pre:!0,attrs:{class:"language-vue"}},[a("code",[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("template")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("class")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("decode-result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("Last result: "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("b")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ result }}"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("qrcode-stream")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v(":camera")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("camera"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@decode")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onDecode"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("@init")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("onInit"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("v-if")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("validationSuccess"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("class")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("validation-success"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n This is a URL\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("v-if")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("validationFailure"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("class")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("validation-failure"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n This is NOT a URL!\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("v-if")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("validationPending"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("class")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("validation-pending"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n Long validation in progress...\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token script"}},[a("span",{pre:!0,attrs:{class:"token language-javascript"}},[t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" QrcodeStream "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'../../../../src'")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n components"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" QrcodeStream "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("data")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n isValid"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n camera"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'auto'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n result"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n computed"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("validationPending")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("isValid "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("camera "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'off'")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("validationSuccess")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("isValid "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("validationFailure")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("isValid "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n methods"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("onInit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("promise")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n promise\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("catch")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("error"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("resetValidationState"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("resetValidationState")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("isValid "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("onDecode")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("content")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("result "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" content\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("turnCameraOff")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// pretend it's taking really long")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("timeout")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("isValid "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" content"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("startsWith")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'http'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// some more delay, so users have time to read the message")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("timeout")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("turnCameraOn")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("turnCameraOn")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("camera "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'auto'")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("turnCameraOff")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("camera "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'off'")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("timeout")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("ms")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Promise")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("resolve")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n window"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("setTimeout")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("resolve"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ms"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("style")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("scoped")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token style"}},[a("span",{pre:!0,attrs:{class:"token language-css"}},[t._v("\n"),a("span",{pre:!0,attrs:{class:"token selector"}},[t._v(".validation-success,\n.validation-failure,\n.validation-pending")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("position")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" absolute"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("width")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 100%"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("height")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 100%"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("background-color")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("rgba")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("255"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" 255"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" 255"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" .8"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("text-align")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" center"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("font-weight")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" bold"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("font-size")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 1.4rem"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("padding")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 10px"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("display")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" flex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("flex-flow")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" column nowrap"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("justify-content")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" center"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token selector"}},[t._v(".validation-success")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("color")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" green"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token selector"}},[t._v(".validation-failure")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v("color")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" red"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])])],1)}),[],!1,null,null,null);s.default=p.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/35.2c0d47f6.js b/docs/.vuepress/dist/assets/js/35.2c0d47f6.js new file mode 100644 index 00000000..98af15d1 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/35.2c0d47f6.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[35],{399:function(w,n,o){"use strict";o.r(n);var c=o(354);const i=Object(c.a)({window:window});n.default=i}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/4.4a03c7db.js b/docs/.vuepress/dist/assets/js/4.4a03c7db.js new file mode 100644 index 00000000..bfeb524f --- /dev/null +++ b/docs/.vuepress/dist/assets/js/4.4a03c7db.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{309:function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return a})),n.d(e,"i",(function(){return s})),n.d(e,"f",(function(){return u})),n.d(e,"g",(function(){return l})),n.d(e,"h",(function(){return c})),n.d(e,"b",(function(){return h})),n.d(e,"e",(function(){return f})),n.d(e,"k",(function(){return p})),n.d(e,"l",(function(){return d})),n.d(e,"c",(function(){return v})),n.d(e,"j",(function(){return m}));n(24),n(98),n(173),n(186),n(69),n(43),n(317),n(70),n(347),n(99);var i=/#.*$/,r=/\.(md|html)$/,a=/\/$/,s=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(i,"").replace(r,"")}function u(t){return s.test(t)}function l(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function h(t){if(u(t))return t;var e=t.match(i),n=e?e[0]:"",r=o(t);return a.test(r)?t:r+".html"+n}function f(t,e){var n=decodeURIComponent(t.hash),r=function(t){var e=t.match(i);if(e)return e[0]}(e);return(!r||n===r)&&o(t.path)===o(e)}function p(t,e,n){if(u(e))return{type:"external",path:e};n&&(e=function(t,e,n){var i=t.charAt(0);if("/"===i)return t;if("?"===i||"#"===i)return e+t;var r=e.split("/");n&&r[r.length-1]||r.pop();for(var a=t.replace(/^\//,"").split("/"),s=0;s3&&void 0!==arguments[3]?arguments[3]:1;if("string"==typeof e)return p(n,e,i);if(Array.isArray(e))return Object.assign(p(n,e[0],i),{title:e[1]});var a=e.children||[];return 0===a.length&&e.path?Object.assign(p(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,children:a.map((function(e){return t(e,n,i,r+1)})),collapsable:!1!==e.collapsable}}(t,r,l)})):[]}return[]}function g(t){var e=v(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map((function(e){return{type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}}))}]}function v(t){var e;return(t=t.map((function(t){return Object.assign({},t)}))).forEach((function(t){2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)})),t.filter((function(t){return 2===t.level}))}function m(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},317:function(t,e,n){"use strict";var i=n(176),r=n(5),a=n(12),s=n(23),o=n(177),u=n(178);i("match",1,(function(t,e,n){return[function(e){var n=s(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,n):new RegExp(e)[t](String(n))},function(t){var i=n(e,t,this);if(i.done)return i.value;var s=r(t),l=String(this);if(!s.global)return u(s,l);var c=s.unicode;s.lastIndex=0;for(var h,f=[],p=0;null!==(h=u(s,l));){var d=String(h[0]);f[p]=d,""===d&&(s.lastIndex=o(l,a(s.lastIndex),c)),p++}return 0===p?null:f}]}))},318:function(t,e){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},319:function(t,e,n){"use strict";var i=n(0),r=n(321).trim;i({target:"String",proto:!0,forced:n(322)("trim")},{trim:function(){return r(this)}})},320:function(t,e,n){},321:function(t,e,n){var i=n(23),r="["+n(318)+"]",a=RegExp("^"+r+r+"*"),s=RegExp(r+r+"*$"),o=function(t){return function(e){var n=String(i(e));return 1&t&&(n=n.replace(a,"")),2&t&&(n=n.replace(s,"")),n}};t.exports={start:o(1),end:o(2),trim:o(3)}},322:function(t,e,n){var i=n(1),r=n(318);t.exports=function(t){return i((function(){return!!r[t]()||"​…᠎"!="​…᠎"[t]()||r[t].name!==t}))}},323:function(t,e,n){var i=n(4),r=n(103);t.exports=function(t,e,n){var a,s;return r&&"function"==typeof(a=e.constructor)&&a!==n&&i(s=a.prototype)&&s!==n.prototype&&r(t,s),t}},324:function(t,e,n){},325:function(t,e,n){},326:function(t,e,n){},327:function(t,e,n){},328:function(t,e,n){},329:function(t,e,n){},330:function(t,e,n){},331:function(t,e,n){},332:function(t,e,n){},333:function(t,e,n){},334:function(t,e,n){},335:function(t,e,n){},347:function(t,e,n){"use strict";var i=n(176),r=n(184),a=n(5),s=n(23),o=n(110),u=n(177),l=n(12),c=n(178),h=n(72),f=n(1),p=[].push,d=Math.min,g=!f((function(){return!RegExp(4294967295,"y")}));i("split",2,(function(t,e,n){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var i=String(s(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===t)return[i];if(!r(t))return e.call(i,t,a);for(var o,u,l,c=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),d=0,g=new RegExp(t.source,f+"g");(o=h.call(g,i))&&!((u=g.lastIndex)>d&&(c.push(i.slice(d,o.index)),o.length>1&&o.index=a));)g.lastIndex===o.index&&g.lastIndex++;return d===i.length?!l&&g.test("")||c.push(""):c.push(i.slice(d)),c.length>a?c.slice(0,a):c}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var r=s(this),a=null==e?void 0:e[t];return void 0!==a?a.call(e,r,n):i.call(String(r),e,n)},function(t,r){var s=n(i,t,this,r,i!==e);if(s.done)return s.value;var h=a(t),f=String(this),p=o(h,RegExp),v=h.unicode,m=(h.ignoreCase?"i":"")+(h.multiline?"m":"")+(h.unicode?"u":"")+(g?"y":"g"),b=new p(g?h:"^(?:"+h.source+")",m),k=void 0===r?4294967295:r>>>0;if(0===k)return[];if(0===f.length)return null===c(b,f)?[f]:[];for(var _=0,x=0,C=[];x-1)&&(e=e.replace(/y/g,""));var o=s(x?new m(t,e):m(t,e),i?this:b,$);return C&&n&&d(o,{sticky:n}),o},y=function(t){t in $||o($,t,{configurable:!0,get:function(){return m[t]},set:function(e){m[t]=e}})},L=u(m),w=0;L.length>w;)y(L[w++]);b.constructor=$,$.prototype=b,f(r,"RegExp",$)}g("RegExp")},349:function(t,e){t.exports=function(t){return null==t}},353:function(t,e,n){"use strict";n.r(e);n(171);var i=n(309),r={name:"SidebarGroup",components:{DropdownTransition:n(365).a},props:["item","open","collapsable","depth"],beforeCreate:function(){this.$options.components.SidebarLinks=n(353).default},methods:{isActive:i.e}},a=(n(382),n(41)),s=Object(a.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",{staticClass:"sidebar-group",class:[{collapsable:t.collapsable,"is-sub-group":0!==t.depth},"depth-"+t.depth]},[t.item.path?n("RouterLink",{staticClass:"sidebar-heading clickable",class:{open:t.open,active:t.isActive(t.$route,t.item.path)},attrs:{to:t.item.path},nativeOn:{click:function(e){return t.$emit("toggle")}}},[n("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?n("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]):n("p",{staticClass:"sidebar-heading",class:{open:t.open},on:{click:function(e){return t.$emit("toggle")}}},[n("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?n("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]),t._v(" "),n("DropdownTransition",[t.open||!t.collapsable?n("SidebarLinks",{staticClass:"sidebar-group-items",attrs:{items:t.item.children,"sidebar-depth":t.item.sidebarDepth,depth:t.depth+1}}):t._e()],1)],1)}),[],!1,null,null,null).exports;n(383),n(69);function o(t,e,n,i,r){var a={props:{to:e,activeClass:"",exactActiveClass:""},class:{active:i,"sidebar-link":!0}};return r>2&&(a.style={"padding-left":r+"rem"}),t("RouterLink",a,n)}function u(t,e,n,r,a){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1;return!e||s>a?null:t("ul",{class:"sidebar-sub-headers"},e.map((function(e){var l=Object(i.e)(r,n+"#"+e.slug);return t("li",{class:"sidebar-sub-header"},[o(t,n+"#"+e.slug,e.title,l,e.level-1),u(t,e.children,n,r,a,s+1)])})))}var l={functional:!0,props:["item","sidebarDepth"],render:function(t,e){var n=e.parent,r=n.$page,a=(n.$site,n.$route),s=n.$themeConfig,l=n.$themeLocaleConfig,c=e.props,h=c.item,f=c.sidebarDepth,p=Object(i.e)(a,h.path),d="auto"===h.type?p||h.children.some((function(t){return Object(i.e)(a,h.basePath+"#"+t.slug)})):p,g="external"===h.type?function(t,e,n){return t("a",{attrs:{href:e,target:"_blank",rel:"noopener noreferrer"},class:{"sidebar-link":!0}},[n,t("OutboundLink")])}(t,h.path,h.title||h.path):o(t,h.path,h.title||h.path,d),v=[r.frontmatter.sidebarDepth,f,l.sidebarDepth,s.sidebarDepth,1].find((function(t){return void 0!==t})),m=l.displayAllHeaders||s.displayAllHeaders;return"auto"===h.type?[g,u(t,h.children,h.basePath,a,v)]:(d||m)&&h.headers&&!i.d.test(h.path)?[g,u(t,Object(i.c)(h.headers),h.path,a,v)]:g}};n(384);function c(t,e){return"group"===e.type&&e.children.some((function(e){return"group"===e.type?c(t,e):"page"===e.type&&Object(i.e)(t,e.path)}))}var h={name:"SidebarLinks",components:{SidebarGroup:s,SidebarLink:Object(a.a)(l,void 0,void 0,!1,null,null,null).exports},props:["items","depth","sidebarDepth"],data:function(){return{openGroupIndex:0}},watch:{$route:function(){this.refreshIndex()}},created:function(){this.refreshIndex()},methods:{refreshIndex:function(){var t=function(t,e){for(var n=0;n-1&&(this.openGroupIndex=t)},toggleGroup:function(t){this.openGroupIndex=t===this.openGroupIndex?-1:t},isActive:function(t){return Object(i.e)(this.$route,t.regularPath)}}},f=Object(a.a)(h,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.items.length?n("ul",{staticClass:"sidebar-links"},t._l(t.items,(function(e,i){return n("li",{key:i},["group"===e.type?n("SidebarGroup",{attrs:{item:e,open:i===t.openGroupIndex,collapsable:e.collapsable||e.collapsible,depth:t.depth},on:{toggle:function(e){return t.toggleGroup(i)}}}):n("SidebarLink",{attrs:{"sidebar-depth":t.sidebarDepth,item:e}})],1)})),0):t._e()}),[],!1,null,null,null);e.default=f.exports},365:function(t,e,n){"use strict";var i={name:"DropdownTransition",methods:{setHeight:function(t){t.style.height=t.scrollHeight+"px"},unsetHeight:function(t){t.style.height=""}}},r=(n(374),n(41)),a=Object(r.a)(i,(function(){var t=this.$createElement;return(this._self._c||t)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.a=a.exports},367:function(t,e,n){"use strict";var i=n(0),r=n(368);i({target:"String",proto:!0,forced:n(369)("link")},{link:function(t){return r(this,"a","href",t)}})},368:function(t,e,n){var i=n(23),r=/"/g;t.exports=function(t,e,n,a){var s=String(i(t)),o="<"+e;return""!==n&&(o+=" "+n+'="'+String(a).replace(r,""")+'"'),o+">"+s+""}},369:function(t,e,n){var i=n(1);t.exports=function(t){return i((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},370:function(t,e,n){"use strict";var i=n(320);n.n(i).a},371:function(t,e,n){"use strict";var i,r=n(0),a=n(26).f,s=n(12),o=n(112),u=n(23),l=n(113),c=n(20),h="".endsWith,f=Math.min,p=l("endsWith");r({target:"String",proto:!0,forced:!!(c||p||(i=a(String.prototype,"endsWith"),!i||i.writable))&&!p},{endsWith:function(t){var e=String(u(this));o(t);var n=arguments.length>1?arguments[1]:void 0,i=s(e.length),r=void 0===n?i:f(s(n),i),a=String(t);return h?h.call(e,a,r):e.slice(r-a.length,r)===a}})},372:function(t,e,n){"use strict";var i=n(324);n.n(i).a},373:function(t,e,n){"use strict";var i=n(325);n.n(i).a},374:function(t,e,n){"use strict";var i=n(326);n.n(i).a},375:function(t,e,n){"use strict";var i=n(327);n.n(i).a},376:function(t,e,n){"use strict";var i=n(328);n.n(i).a},377:function(t,e,n){"use strict";var i=n(329);n.n(i).a},378:function(t,e,n){"use strict";var i=n(330);n.n(i).a},379:function(t,e,n){var i=n(33),r=n(15),a=n(27);t.exports=function(t){return"string"==typeof t||!r(t)&&a(t)&&"[object String]"==i(t)}},380:function(t,e,n){"use strict";var i=n(331);n.n(i).a},381:function(t,e,n){"use strict";var i=n(332);n.n(i).a},382:function(t,e,n){"use strict";var i=n(333);n.n(i).a},383:function(t,e,n){"use strict";var i=n(0),r=n(32).find,a=n(106),s=n(18),o=!0,u=s("find");"find"in[]&&Array(1).find((function(){o=!1})),i({target:"Array",proto:!0,forced:o||!u},{find:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),a("find")},384:function(t,e,n){"use strict";var i=n(334);n.n(i).a},385:function(t,e,n){"use strict";var i=n(335);n.n(i).a},400:function(t,e,n){"use strict";n.r(e);n(171),n(101),n(367);var i=n(309),r={name:"NavLink",props:{item:{required:!0}},computed:{link:function(){return Object(i.b)(this.item.link)},exact:function(){var t=this;return this.$site.locales?Object.keys(this.$site.locales).some((function(e){return e===t.link})):"/"===this.link},isNonHttpURI:function(){return Object(i.g)(this.link)||Object(i.h)(this.link)},isBlankTarget:function(){return"_blank"===this.target},isInternal:function(){return!Object(i.f)(this.link)&&!this.isBlankTarget},target:function(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(i.f)(this.link)?"_blank":""},rel:function(){return this.isNonHttpURI?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":""}},methods:{focusoutAction:function(){this.$emit("focusout")}}},a=n(41),s=Object(a.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isInternal?n("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction(e)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):n("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?n("OutboundLink"):t._e()],1)}),[],!1,null,null,null).exports,o={name:"Home",components:{NavLink:s},computed:{data:function(){return this.$page.frontmatter},actionLink:function(){return{link:this.data.actionLink,text:this.data.actionText}}}},u=(n(370),Object(a.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("main",{staticClass:"home",attrs:{"aria-labelledby":"main-title"}},[n("header",{staticClass:"hero"},[t.data.heroImage?n("img",{attrs:{src:t.$withBase(t.data.heroImage),alt:t.data.heroAlt||"hero"}}):t._e(),t._v(" "),null!==t.data.heroText?n("h1",{attrs:{id:"main-title"}},[t._v("\n "+t._s(t.data.heroText||t.$title||"Hello")+"\n ")]):t._e(),t._v(" "),null!==t.data.tagline?n("p",{staticClass:"description"},[t._v("\n "+t._s(t.data.tagline||t.$description||"Welcome to your VuePress site")+"\n ")]):t._e(),t._v(" "),t.data.actionText&&t.data.actionLink?n("p",{staticClass:"action"},[n("NavLink",{staticClass:"action-button",attrs:{item:t.actionLink}})],1):t._e()]),t._v(" "),t.data.features&&t.data.features.length?n("div",{staticClass:"features"},t._l(t.data.features,(function(e,i){return n("div",{key:i,staticClass:"feature"},[n("h2",[t._v(t._s(e.title))]),t._v(" "),n("p",[t._v(t._s(e.details))])])})),0):t._e(),t._v(" "),n("Content",{staticClass:"theme-default-content custom"}),t._v(" "),t.data.footer?n("div",{staticClass:"footer"},[t._v("\n "+t._s(t.data.footer)+"\n ")]):t._e()],1)}),[],!1,null,null,null).exports),l=(n(24),n(175),n(173),n(43),n(185),n(317),n(319),n(186),n(69),n(348),n(100),n(371),n(70),n(347),n(194)),c=n.n(l),h=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=c()(e,"title","");return c()(e,"frontmatter.tags")&&(i+=" ".concat(e.frontmatter.tags.join(" "))),n&&(i+=" ".concat(n)),f(t,i)},f=function(t,e){var n=function(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},i=new RegExp("[^\0-]"),r=t.split(/\s+/g).map((function(t){return t.trim()})).filter((function(t){return!!t}));if(i.test(t))return r.some((function(t){return e.toLowerCase().indexOf(t)>-1}));var a=t.endsWith(" ");return new RegExp(r.map((function(t,e){return r.length!==e+1||a?"(?=.*\\b".concat(n(t),"\\b)"):"(?=.*\\b".concat(n(t),")")})).join("")+".+","gi").test(e)},p={name:"SearchBox",data:function(){return{query:"",focused:!1,focusIndex:0,placeholder:void 0}},computed:{showSuggestions:function(){return this.focused&&this.suggestions&&this.suggestions.length},suggestions:function(){var t=this.query.trim().toLowerCase();if(t){for(var e=this.$site.pages,n=this.$site.themeConfig.searchMaxSuggestions||5,i=this.$localePath,r=[],a=0;a=n);a++){var s=e[a];if(this.getPageLocalePath(s)===i&&this.isSearchable(s))if(h(t,s))r.push(s);else if(s.headers)for(var o=0;o=n);o++){var u=s.headers[o];u.title&&h(t,s,u.title)&&r.push(Object.assign({},s,{path:s.path+"#"+u.slug,header:u}))}}return r}},alignRight:function(){return(this.$site.themeConfig.nav||[]).length+(this.$site.repo?1:0)<=2}},mounted:function(){this.placeholder=this.$site.themeConfig.searchPlaceholder||"",document.addEventListener("keydown",this.onHotkey)},beforeDestroy:function(){document.removeEventListener("keydown",this.onHotkey)},methods:{getPageLocalePath:function(t){for(var e in this.$site.locales||{})if("/"!==e&&0===t.path.indexOf(e))return e;return"/"},isSearchable:function(t){var e=null;return null===e||(e=Array.isArray(e)?e:new Array(e)).filter((function(e){return t.path.match(e)})).length>0},onHotkey:function(t){t.srcElement===document.body&&["s","/"].includes(t.key)&&(this.$refs.input.focus(),t.preventDefault())},onUp:function(){this.showSuggestions&&(this.focusIndex>0?this.focusIndex--:this.focusIndex=this.suggestions.length-1)},onDown:function(){this.showSuggestions&&(this.focusIndex "+t._s(e.header.title))]):t._e()])])})),0):t._e()])}),[],!1,null,null,null).exports),g=(n(373),Object(a.a)({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"sidebar-button",on:{click:function(e){return t.$emit("toggle-sidebar")}}},[n("svg",{staticClass:"icon",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",viewBox:"0 0 448 512"}},[n("path",{attrs:{fill:"currentColor",d:"M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"}})])])}),[],!1,null,null,null).exports),v=(n(193),n(39)),m=n(365),b=n(195),k=n.n(b),_={name:"DropdownLink",components:{NavLink:s,DropdownTransition:m.a},props:{item:{required:!0}},data:function(){return{open:!1}},computed:{dropdownAriaLabel:function(){return this.item.ariaLabel||this.item.text}},watch:{$route:function(){this.open=!1}},methods:{setOpen:function(t){this.open=t},isLastItemOfArray:function(t,e){return k()(e)===t}}},x=(n(375),{name:"NavLinks",components:{NavLink:s,DropdownLink:Object(a.a)(_,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[n("button",{staticClass:"dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:function(e){return t.setOpen(!t.open)}}},[n("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),n("span",{staticClass:"arrow",class:t.open?"down":"right"})]),t._v(" "),n("DropdownTransition",[n("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,(function(e,i){return n("li",{key:e.link||i,staticClass:"dropdown-item"},["links"===e.type?n("h4",[t._v("\n "+t._s(e.text)+"\n ")]):t._e(),t._v(" "),"links"===e.type?n("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(e.items,(function(i){return n("li",{key:i.link,staticClass:"dropdown-subitem"},[n("NavLink",{attrs:{item:i},on:{focusout:function(n){t.isLastItemOfArray(i,e.items)&&t.isLastItemOfArray(e,t.item.items)&&t.setOpen(!1)}}})],1)})),0):n("NavLink",{attrs:{item:e},on:{focusout:function(n){t.isLastItemOfArray(e,t.item.items)&&t.setOpen(!1)}}})],1)})),0)])],1)}),[],!1,null,null,null).exports},computed:{userNav:function(){return this.$themeLocaleConfig.nav||this.$site.themeConfig.nav||[]},nav:function(){var t=this,e=this.$site.locales;if(e&&Object.keys(e).length>1){var n=this.$page.path,i=this.$router.options.routes,r=this.$site.themeConfig.locales||{},a={text:this.$themeLocaleConfig.selectText||"Languages",ariaLabel:this.$themeLocaleConfig.ariaLabel||"Select language",items:Object.keys(e).map((function(a){var s,o=e[a],u=r[a]&&r[a].label||o.lang;return o.lang===t.$lang?s=n:(s=n.replace(t.$localeConfig.path,a),i.some((function(t){return t.path===s}))||(s=a)),{text:u,link:s}}))};return[].concat(Object(v.a)(this.userNav),[a])}return this.userNav},userLinks:function(){return(this.nav||[]).map((function(t){return Object.assign(Object(i.j)(t),{items:(t.items||[]).map(i.j)})}))},repoLink:function(){var t=this.$site.themeConfig.repo;return t?/^https?:/.test(t)?t:"https://github.com/".concat(t):null},repoLabel:function(){if(this.repoLink){if(this.$site.themeConfig.repoLabel)return this.$site.themeConfig.repoLabel;for(var t=this.repoLink.match(/^https?:\/\/[^/]+/)[0],e=["GitHub","GitLab","Bitbucket"],n=0;nMath.abs(n)&&Math.abs(e)>40&&(e>0&&this.touchStart.x<=80?this.toggleSidebar(!0):this.toggleSidebar(!1))}}}),B=Object(a.a)(W,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"theme-container",class:t.pageClasses,on:{touchstart:t.onTouchStart,touchend:t.onTouchEnd}},[t.shouldShowNavbar?n("Navbar",{on:{"toggle-sidebar":t.toggleSidebar}}):t._e(),t._v(" "),n("div",{staticClass:"sidebar-mask",on:{click:function(e){return t.toggleSidebar(!1)}}}),t._v(" "),n("Sidebar",{attrs:{items:t.sidebarItems},on:{"toggle-sidebar":t.toggleSidebar},scopedSlots:t._u([{key:"top",fn:function(){return[t._t("sidebar-top")]},proxy:!0},{key:"bottom",fn:function(){return[t._t("sidebar-bottom")]},proxy:!0}],null,!0)}),t._v(" "),t.$page.frontmatter.home?n("Home"):n("Page",{attrs:{"sidebar-items":t.sidebarItems},scopedSlots:t._u([{key:"top",fn:function(){return[t._t("page-top")]},proxy:!0},{key:"bottom",fn:function(){return[t._t("page-bottom")]},proxy:!0}],null,!0)})],1)}),[],!1,null,null,null);e.default=B.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/5.b5d9a75a.js b/docs/.vuepress/dist/assets/js/5.b5d9a75a.js new file mode 100644 index 00000000..ab117b86 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/5.b5d9a75a.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[5,6,7,8,9,10,11,12,14,15,16],{310:function(e,t,r){},311:function(e,t,r){},312:function(e,t,r){},313:function(e,t,r){},314:function(e,t,r){},315:function(e,t,r){},316:function(e,t,r){},338:function(e,t,r){"use strict";var n=r(310);r.n(n).a},339:function(e,t,r){"use strict";var n=r(311);r.n(n).a},340:function(e,t,r){"use strict";var n=r(312);r.n(n).a},341:function(e,t,r){"use strict";var n=r(313);r.n(n).a},342:function(e,t,r){"use strict";var n=r(314);r.n(n).a},343:function(e,t,r){"use strict";var n=r(315);r.n(n).a},344:function(e,t,r){"use strict";var n=r(316);r.n(n).a},345:function(e,t,r){},355:function(e,t,r){"use strict";r.r(t);r(98),r(182),r(99);var n={components:{QrcodeStream:r(307).c},data:function(){var e=[{text:"None",value:!1},{text:"Red square (default)",value:!0},{text:"Green text",value:this.paintGreenText},{text:"Blue dots",value:this.paintBlueDots}];return{selected:e[2],options:e,result:null}},methods:{paintBlueDots:function(e,t){var r=[e.topLeftFinderPattern,e.topRightFinderPattern,e.bottomLeftFinderPattern];t.fillStyle="#007bff",r.forEach((function(e){var r=e.x,n=e.y;t.fillRect(r-5,n-5,10,10)}))},paintGreenText:function(e,t){var r=[e.topLeftCorner,e.topRightCorner,e.bottomLeftCorner,e.bottomRightCorner],n=r.reduce((function(e,t){return t.x+e}),0)/4,o=r.reduce((function(e,t){return t.y+e}),0)/4;t.font="bold 24px sans-serif",t.textAlign="center",t.lineWidth=3,t.strokeStyle="#35495e",t.strokeText(this.result,n,o),t.fillStyle="#5cb984",t.fillText(this.result,n,o)},onDecode:function(e){this.result=e},logErrors:function(e){e.catch(console.error)}}},o=r(41),a=Object(o.a)(n,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("p",[e._v("\n Track function:\n "),r("select",{directives:[{name:"model",rawName:"v-model",value:e.selected,expression:"selected"}],on:{change:function(t){var r=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selected=t.target.multiple?r:r[0]}}},e._l(e.options,(function(t){return r("option",{domProps:{value:t}},[e._v("\n "+e._s(t.text)+"\n ")])})),0)]),e._v(" "),r("p",{staticClass:"decode-result"},[e._v("\n Last result: "),r("b",[e._v(e._s(e.result))])]),e._v(" "),r("qrcode-stream",{key:e._uid,attrs:{track:e.selected.value},on:{decode:e.onDecode,init:e.logErrors}})],1)}),[],!1,null,null,null);t.default=a.exports},356:function(e,t,r){"use strict";r.r(t);r(68),r(97);var n=r(42),o={components:{QrcodeStream:r(307).c},data:function(){return{result:"",error:""}},methods:{onDecode:function(e){this.result=e},onInit:function(e){var t=this;return Object(n.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,e;case 3:r.next=8;break;case 5:r.prev=5,r.t0=r.catch(0),"NotAllowedError"===r.t0.name?t.error="ERROR: you need to grant camera access permisson":"NotFoundError"===r.t0.name?t.error="ERROR: no camera on this device":"NotSupportedError"===r.t0.name?t.error="ERROR: secure context required (HTTPS, localhost)":"NotReadableError"===r.t0.name?t.error="ERROR: is the camera already in use?":"OverconstrainedError"===r.t0.name?t.error="ERROR: installed cameras are not suitable":"StreamApiNotSupportedError"===r.t0.name&&(t.error="ERROR: Stream API is not supported in this browser");case 8:case"end":return r.stop()}}),r,null,[[0,5]])})))()}}},a=(r(338),r(41)),c=Object(a.a)(o,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("p",{staticClass:"error"},[e._v(e._s(e.error))]),e._v(" "),r("p",{staticClass:"decode-result"},[e._v("Last result: "),r("b",[e._v(e._s(e.result))])]),e._v(" "),r("qrcode-stream",{on:{decode:e.onDecode,init:e.onInit}})],1)}),[],!1,null,"18b412d2",null);t.default=c.exports},357:function(e,t,r){"use strict";r.r(t);r(68),r(97);var n=r(42),o={components:{QrcodeStream:r(307).c},data:function(){return{camera:"rear",noRearCamera:!1,noFrontCamera:!1}},methods:{switchCamera:function(){switch(this.camera){case"front":this.camera="rear";break;case"rear":this.camera="front"}},onInit:function(e){var t=this;return Object(n.a)(regeneratorRuntime.mark((function r(){var n,o,a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,e;case 3:r.next=13;break;case 5:r.prev=5,r.t0=r.catch(0),n="front"===t.camera,o="rear"===t.camera,a="OverconstrainedError"===r.t0.name,o&&a&&(t.noRearCamera=!0),n&&a&&(t.noFrontCamera=!0),console.error(r.t0);case 13:case"end":return r.stop()}}),r,null,[[0,5]])})))()}}},a=(r(339),r(41)),c=Object(a.a)(o,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[e.noFrontCamera?r("p",{staticClass:"error"},[e._v("\n You don't seem to have a front camera on your device\n ")]):e._e(),e._v(" "),e.noRearCamera?r("p",{staticClass:"error"},[e._v("\n You don't seem to have a rear camera on your device\n ")]):e._e(),e._v(" "),r("qrcode-stream",{attrs:{camera:e.camera},on:{init:e.onInit}},[r("button",{on:{click:e.switchCamera}},[r("img",{attrs:{src:e.$withBase("/camera-switch.svg"),alt:"switch camera"}})])])],1)}),[],!1,null,"7f62d3b6",null);t.default=c.exports},358:function(e,t,r){"use strict";r.r(t);r(68),r(97);var n=r(42),o={components:{QrcodeDropZone:r(307).b},data:function(){return{result:null,error:null,dragover:!1}},methods:{onDetect:function(e){var t=this;return Object(n.a)(regeneratorRuntime.mark((function r(){var n,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,e;case 3:n=r.sent,o=n.content,t.result=o,t.error=null,r.next=12;break;case 9:r.prev=9,r.t0=r.catch(0),"DropImageFetchError"===r.t0.name?t.error="Sorry, you can't load cross-origin images :/":"DropImageDecodeError"===r.t0.name?t.error="Ok, that's not an image. That can't be decoded.":t.error="Ups, what kind of error is this?! "+r.t0.message;case 12:case"end":return r.stop()}}),r,null,[[0,9]])})))()},logErrors:function(e){e.catch(console.error)},onDragOver:function(e){this.dragover=e}}},a=(r(340),r(41)),c=Object(a.a)(o,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("p",{staticClass:"decode-result"},[e._v("Last result: "),r("b",[e._v(e._s(e.result))])]),e._v(" "),null!==e.error?r("p",{staticClass:"drop-error"},[e._v("\n "+e._s(e.error)+"\n ")]):e._e(),e._v(" "),r("qrcode-drop-zone",{on:{detect:e.onDetect,dragover:e.onDragOver,init:e.logErrors}},[r("div",{staticClass:"drop-area",class:{dragover:e.dragover}},[e._v("\n DROP SOME IMAGES HERE\n ")])])],1)}),[],!1,null,null,null);t.default=c.exports},359:function(e,t,r){"use strict";r.r(t);var n={components:{QrcodeCapture:r(307).a},data:function(){return{result:""}},methods:{onDecode:function(e){this.result=e}}},o=r(41),a=Object(o.a)(n,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("p",{staticClass:"decode-result"},[this._v("Last result: "),t("b",[this._v(this._s(this.result))])]),this._v(" "),t("qrcode-capture",{on:{decode:this.onDecode}})],1)}),[],!1,null,null,null);t.default=a.exports},360:function(e,t,r){"use strict";r.r(t);r(68),r(97);var n=r(42),o=r(307),a={components:{QrcodeStream:o.c,QrcodeDropZone:o.b,QrcodeCapture:o.a},data:function(){return{result:"",noStreamApiSupport:!1}},methods:{onDecode:function(e){this.result=e},logErrors:function(e){e.catch(console.error)},onInit:function(e){var t=this;return Object(n.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,e;case 3:r.next=8;break;case 5:r.prev=5,r.t0=r.catch(0),"StreamApiNotSupportedError"===r.t0.name&&(t.noStreamApiSupport=!0);case 8:case"end":return r.stop()}}),r,null,[[0,5]])})))()}}},c=r(41),s=Object(c.a)(a,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("p",{staticClass:"decode-result"},[e._v("Last result: "),r("b",[e._v(e._s(e.result))])]),e._v(" "),r("qrcode-drop-zone",{on:{decode:e.onDecode,init:e.logErrors}},[r("qrcode-stream",{on:{decode:e.onDecode,init:e.onInit}})],1),e._v(" "),e.noStreamApiSupport?r("qrcode-capture",{on:{decode:e.onDecode}}):e._e()],1)}),[],!1,null,null,null);t.default=s.exports},361:function(e,t,r){"use strict";r.r(t);var n={components:{QrcodeStream:r(307).c},data:function(){return{fullscreen:!1}},computed:{fullscreenIcon:function(){return this.fullscreen?"/fullscreen-exit.svg":"/fullscreen.svg"}},watch:{fullscreen:function(e){e?this.requestFullscreen():this.exitFullscreen()}},methods:{onFullscreenChange:function(e){this.fullscreen=null!==document.fullscreenElement},requestFullscreen:function(){var e=this.$refs.wrapper;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()},exitFullscreen:function(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},logErrors:function(e){e.catch(console.error)}}},o=(r(341),r(41)),a=Object(o.a)(n,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{ref:"wrapper",class:{fullscreen:e.fullscreen},on:{fullscreenchange:e.onFullscreenChange}},[r("qrcode-stream",{on:{init:e.logErrors}},[r("button",{staticClass:"fullscreen-button",on:{click:function(t){e.fullscreen=!e.fullscreen}}},[r("img",{attrs:{src:e.$withBase(e.fullscreenIcon),alt:"toggle fullscreen"}})])])],1)}),[],!1,null,"01e794aa",null);t.default=a.exports},362:function(e,t,r){"use strict";r.r(t);r(97);var n=r(42),o={components:{QrcodeStream:r(307).c},data:function(){return{loading:!1,destroyed:!1}},methods:{onInit:function(e){var t=this;return Object(n.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t.loading=!0,r.prev=1,r.next=4,e;case 4:r.next=9;break;case 6:r.prev=6,r.t0=r.catch(1),console.error(r.t0);case 9:return r.prev=9,t.loading=!1,r.finish(9);case 12:case"end":return r.stop()}}),r,null,[[1,6,9,12]])})))()},reload:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.destroyed=!0,t.next=3,e.$nextTick();case 3:e.destroyed=!1;case 4:case"end":return t.stop()}}),t)})))()}}},a=(r(342),r(41)),c=Object(a.a)(o,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("button",{on:{click:e.reload}},[e._v("Destroy And Re-Create Component")]),e._v(" "),e.destroyed?e._e():r("qrcode-stream",{on:{init:e.onInit}},[e.loading?r("div",{staticClass:"loading-indicator"},[e._v("\n Loading...\n ")]):e._e()])],1)}),[],!1,null,"74036290",null);t.default=c.exports},363:function(e,t,r){"use strict";r.r(t);r(97);var n=r(42),o={components:{QrcodeStream:r(307).c},data:function(){return{torchActive:!1,torchNotSupported:!1}},computed:{icon:function(){return this.torchActive?"/flash-off.svg":"/flash-on.svg"}},methods:{onInit:function(e){var t=this;return Object(n.a)(regeneratorRuntime.mark((function r(){var n,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,e;case 3:n=r.sent,o=n.capabilities,console.log(o),t.torchNotSupported=!o.torch,r.next=12;break;case 9:r.prev=9,r.t0=r.catch(0),console.error(r.t0);case 12:case"end":return r.stop()}}),r,null,[[0,9]])})))()}}},a=(r(343),r(41)),c=Object(a.a)(o,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[e.torchNotSupported?r("p",{staticClass:"error"},[e._v("\n Torch not supported for active camera\n ")]):e._e(),e._v(" "),r("qrcode-stream",{attrs:{torch:e.torchActive},on:{init:e.onInit}},[r("button",{attrs:{disabled:e.torchNotSupported},on:{click:function(t){e.torchActive=!e.torchActive}}},[r("img",{attrs:{src:e.$withBase(e.icon),alt:"toggle torch"}})])])],1)}),[],!1,null,"11199bde",null);t.default=c.exports},364:function(e,t,r){"use strict";r.r(t);r(9),r(174),r(97);var n=r(42),o={components:{QrcodeStream:r(307).c},data:function(){return{isValid:void 0,camera:"auto",result:null}},computed:{validationPending:function(){return void 0===this.isValid&&"off"===this.camera},validationSuccess:function(){return!0===this.isValid},validationFailure:function(){return!1===this.isValid}},methods:{onInit:function(e){e.catch(console.error).then(this.resetValidationState)},resetValidationState:function(){this.isValid=void 0},onDecode:function(e){var t=this;return Object(n.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t.result=e,t.turnCameraOff(),r.next=4,t.timeout(3e3);case 4:return t.isValid=e.startsWith("http"),r.next=7,t.timeout(2e3);case 7:t.turnCameraOn();case 8:case"end":return r.stop()}}),r)})))()},turnCameraOn:function(){this.camera="auto"},turnCameraOff:function(){this.camera="off"},timeout:function(e){return new Promise((function(t){window.setTimeout(t,e)}))}}},a=(r(344),r(41)),c=Object(a.a)(o,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("p",{staticClass:"decode-result"},[e._v("Last result: "),r("b",[e._v(e._s(e.result))])]),e._v(" "),r("qrcode-stream",{attrs:{camera:e.camera},on:{decode:e.onDecode,init:e.onInit}},[e.validationSuccess?r("div",{staticClass:"validation-success"},[e._v("\n This is a URL\n ")]):e._e(),e._v(" "),e.validationFailure?r("div",{staticClass:"validation-failure"},[e._v("\n This is NOT a URL!\n ")]):e._e(),e._v(" "),e.validationPending?r("div",{staticClass:"validation-pending"},[e._v("\n Long validation in progress...\n ")]):e._e()])],1)}),[],!1,null,"7ed9dbb2",null);t.default=c.exports},395:function(e,t,r){"use strict";var n=r(345);r.n(n).a},402:function(e,t,r){"use strict";r.r(t);var n=r(355),o=r(356),a=r(357),c=r(358),s=r(359),i=r(360),u=r(361),l=r(362),d=r(363),f=r(364),m={components:{DecodeAll:o.default,CustomTracking:n.default,SwitchCamera:a.default,DragDrop:c.default,Upload:s.default,Fallback:i.default,Fullscreen:u.default,LoadingIndicator:l.default,Torch:d.default,Validate:f.default},props:{component:String},data:function(){return{currentDemo:null}},mounted:function(){this.currentDemo=this.component}},v=(r(395),r(41)),p=Object(v.a)(m,(function(){var e=this.$createElement;return(this._self._c||e)(this.currentDemo,{tag:"component"})}),[],!1,null,null,null);t.default=p.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/6.345faa18.js b/docs/.vuepress/dist/assets/js/6.345faa18.js new file mode 100644 index 00000000..6dc6f62a --- /dev/null +++ b/docs/.vuepress/dist/assets/js/6.345faa18.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{310:function(r,e,t){},338:function(r,e,t){"use strict";var n=t(310);t.n(n).a},356:function(r,e,t){"use strict";t.r(e);t(68),t(97);var n=t(42),o={components:{QrcodeStream:t(307).c},data:function(){return{result:"",error:""}},methods:{onDecode:function(r){this.result=r},onInit:function(r){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r;case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0),"NotAllowedError"===t.t0.name?e.error="ERROR: you need to grant camera access permisson":"NotFoundError"===t.t0.name?e.error="ERROR: no camera on this device":"NotSupportedError"===t.t0.name?e.error="ERROR: secure context required (HTTPS, localhost)":"NotReadableError"===t.t0.name?e.error="ERROR: is the camera already in use?":"OverconstrainedError"===t.t0.name?e.error="ERROR: installed cameras are not suitable":"StreamApiNotSupportedError"===t.t0.name&&(e.error="ERROR: Stream API is not supported in this browser");case 8:case"end":return t.stop()}}),t,null,[[0,5]])})))()}}},a=(t(338),t(41)),s=Object(a.a)(o,(function(){var r=this,e=r.$createElement,t=r._self._c||e;return t("div",[t("p",{staticClass:"error"},[r._v(r._s(r.error))]),r._v(" "),t("p",{staticClass:"decode-result"},[r._v("Last result: "),t("b",[r._v(r._s(r.result))])]),r._v(" "),t("qrcode-stream",{on:{decode:r.onDecode,init:r.onInit}})],1)}),[],!1,null,"18b412d2",null);e.default=s.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/7.1ee96706.js b/docs/.vuepress/dist/assets/js/7.1ee96706.js new file mode 100644 index 00000000..36b84ab7 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/7.1ee96706.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{312:function(r,e,t){},340:function(r,e,t){"use strict";var n=t(312);t.n(n).a},358:function(r,e,t){"use strict";t.r(e);t(68),t(97);var n=t(42),o={components:{QrcodeDropZone:t(307).b},data:function(){return{result:null,error:null,dragover:!1}},methods:{onDetect:function(r){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){var n,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r;case 3:n=t.sent,o=n.content,e.result=o,e.error=null,t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),"DropImageFetchError"===t.t0.name?e.error="Sorry, you can't load cross-origin images :/":"DropImageDecodeError"===t.t0.name?e.error="Ok, that's not an image. That can't be decoded.":e.error="Ups, what kind of error is this?! "+t.t0.message;case 12:case"end":return t.stop()}}),t,null,[[0,9]])})))()},logErrors:function(r){r.catch(console.error)},onDragOver:function(r){this.dragover=r}}},a=(t(340),t(41)),s=Object(a.a)(o,(function(){var r=this,e=r.$createElement,t=r._self._c||e;return t("div",[t("p",{staticClass:"decode-result"},[r._v("Last result: "),t("b",[r._v(r._s(r.result))])]),r._v(" "),null!==r.error?t("p",{staticClass:"drop-error"},[r._v("\n "+r._s(r.error)+"\n ")]):r._e(),r._v(" "),t("qrcode-drop-zone",{on:{detect:r.onDetect,dragover:r.onDragOver,init:r.logErrors}},[t("div",{staticClass:"drop-area",class:{dragover:r.dragover}},[r._v("\n DROP SOME IMAGES HERE\n ")])])],1)}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/8.05a3d033.js b/docs/.vuepress/dist/assets/js/8.05a3d033.js new file mode 100644 index 00000000..208ade09 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/8.05a3d033.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{313:function(e,n,l){},341:function(e,n,l){"use strict";var c=l(313);l.n(c).a},361:function(e,n,l){"use strict";l.r(n);var c={components:{QrcodeStream:l(307).c},data:function(){return{fullscreen:!1}},computed:{fullscreenIcon:function(){return this.fullscreen?"/fullscreen-exit.svg":"/fullscreen.svg"}},watch:{fullscreen:function(e){e?this.requestFullscreen():this.exitFullscreen()}},methods:{onFullscreenChange:function(e){this.fullscreen=null!==document.fullscreenElement},requestFullscreen:function(){var e=this.$refs.wrapper;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()},exitFullscreen:function(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},logErrors:function(e){e.catch(console.error)}}},t=(l(341),l(41)),u=Object(t.a)(c,(function(){var e=this,n=e.$createElement,l=e._self._c||n;return l("div",{ref:"wrapper",class:{fullscreen:e.fullscreen},on:{fullscreenchange:e.onFullscreenChange}},[l("qrcode-stream",{on:{init:e.logErrors}},[l("button",{staticClass:"fullscreen-button",on:{click:function(n){e.fullscreen=!e.fullscreen}}},[l("img",{attrs:{src:e.$withBase(e.fullscreenIcon),alt:"toggle fullscreen"}})])])],1)}),[],!1,null,"01e794aa",null);n.default=u.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/9.5d740816.js b/docs/.vuepress/dist/assets/js/9.5d740816.js new file mode 100644 index 00000000..39613144 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/9.5d740816.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{314:function(e,n,t){},342:function(e,n,t){"use strict";var r=t(314);t.n(r).a},362:function(e,n,t){"use strict";t.r(n);t(97);var r=t(42),o={components:{QrcodeStream:t(307).c},data:function(){return{loading:!1,destroyed:!1}},methods:{onInit:function(e){var n=this;return Object(r.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.loading=!0,t.prev=1,t.next=4,e;case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),console.error(t.t0);case 9:return t.prev=9,n.loading=!1,t.finish(9);case 12:case"end":return t.stop()}}),t,null,[[1,6,9,12]])})))()},reload:function(){var e=this;return Object(r.a)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e.destroyed=!0,n.next=3,e.$nextTick();case 3:e.destroyed=!1;case 4:case"end":return n.stop()}}),n)})))()}}},a=(t(342),t(41)),c=Object(a.a)(o,(function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[t("button",{on:{click:e.reload}},[e._v("Destroy And Re-Create Component")]),e._v(" "),e.destroyed?e._e():t("qrcode-stream",{on:{init:e.onInit}},[e.loading?t("div",{staticClass:"loading-indicator"},[e._v("\n Loading...\n ")]):e._e()])],1)}),[],!1,null,"74036290",null);n.default=c.exports}}]); \ No newline at end of file diff --git a/docs/.vuepress/dist/assets/js/app.bccf8f60.js b/docs/.vuepress/dist/assets/js/app.bccf8f60.js new file mode 100644 index 00000000..12829cb3 --- /dev/null +++ b/docs/.vuepress/dist/assets/js/app.bccf8f60.js @@ -0,0 +1,8 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[]]);!function(t){function e(e){for(var r,a,c=e[0],u=e[1],s=e[2],l=0,p=[];l0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(3),o=n(10),i=n(6),a=n(74),c=n(79),u=n(29),s=u.get,f=u.enforce,l=String(String).split("String");(t.exports=function(t,e,n,c){var u=!!c&&!!c.unsafe,s=!!c&&!!c.enumerable,p=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof e||i(n,"name")||o(n,"name",e),f(n).source=l.join("string"==typeof e?e:"")),t!==r?(u?!p&&t[e]&&(s=!0):delete t[e],s?t[e]=n:o(t,e,n)):s?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&s(this).source||c(this)}))},function(t,e,n){var r=n(34),o=n(23);t.exports=function(t){return r(o(t))}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(145),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e,n){var r=n(123),o=n(3),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t])||i(o[t]):r[t]&&r[t][e]||o[t]&&o[t][e]}},function(t,e,n){var r=n(7),o=n(1),i=n(6),a=Object.defineProperty,c={},u=function(t){throw t};t.exports=function(t,e){if(i(c,t))return c[t];e||(e={});var n=[][t],s=!!i(e,"ACCESSORS")&&e.ACCESSORS,f=i(e,0)?e[0]:u,l=i(e,1)?e[1]:void 0;return c[t]=!!n&&!o((function(){if(s&&!r)return!0;var t={length:-1};s?a(t,1,{enumerable:!0,get:u}):t[1]=1,n.call(t,f,l)}))}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=!1},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,e,n){var r=n(227),o=n(230);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){"use strict";var r=n(0),o=n(32).filter,i=n(54),a=n(18),c=i("filter"),u=a("filter");r({target:"Array",proto:!0,forced:!c||!u},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(111).charAt,o=n(29),i=n(107),a=o.set,c=o.getterFor("String Iterator");i(String,"String",(function(t){a(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=c(this),n=e.string,o=e.index;return o>=n.length?{value:void 0,done:!0}:(t=r(n,o),e.index+=t.length,{value:t,done:!1})}))},function(t,e,n){var r=n(7),o=n(80),i=n(31),a=n(14),c=n(48),u=n(6),s=n(118),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=c(e,!0),s)try{return f(t,e)}catch(t){}if(u(t,e))return i(!o.f.call(t,e),t[e])}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return r}))},function(t,e,n){var r,o,i,a=n(197),c=n(3),u=n(4),s=n(10),f=n(6),l=n(52),p=n(35),d=c.WeakMap;if(a){var h=new d,v=h.get,y=h.has,m=h.set;r=function(t,e){return m.call(h,t,e),e},o=function(t){return v.call(h,t)||{}},i=function(t){return y.call(h,t)}}else{var g=l("state");p[g]=!0,r=function(t,e){return s(t,g,e),e},o=function(t){return f(t,g)?t[g]:{}},i=function(t){return f(t,g)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){var r=n(3),o=n(137),i=n(105),a=n(10),c=n(2),u=c("iterator"),s=c("toStringTag"),f=i.values;for(var l in o){var p=r[l],d=p&&p.prototype;if(d){if(d[u]!==f)try{a(d,u,f)}catch(t){d[u]=f}if(d[s]||a(d,s,l),o[l])for(var h in i)if(d[h]!==i[h])try{a(d,h,i[h])}catch(t){d[h]=i[h]}}}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(46),o=n(34),i=n(11),a=n(12),c=n(136),u=[].push,s=function(t){var e=1==t,n=2==t,s=3==t,f=4==t,l=6==t,p=5==t||l;return function(d,h,v,y){for(var m,g,b=i(d),_=o(b),x=r(h,v,3),w=a(_.length),O=0,S=y||c,j=e?S(d,w):n?S(d,0):void 0;w>O;O++)if((p||O in _)&&(g=x(m=_[O],O,b),t))if(e)j[O]=g;else if(g)switch(t){case 3:return!0;case 5:return m;case 6:return O;case 2:u.call(j,m)}else if(f)return!1;return l?-1:s||f?f:j}};t.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6)}},function(t,e,n){var r=n(38),o=n(212),i=n(213),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?o(t):i(t)}},function(t,e,n){var r=n(1),o=n(19),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,e){t.exports={}},function(t,e){t.exports={}},function(t,e,n){"use strict";var r=n(1);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},function(t,e,n){var r=n(16).Symbol;t.exports=r},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(40);n(47),n(57),n(85),n(143),n(9),n(25),n(30);var o=n(66);function i(t){return function(t){if(Array.isArray(t))return Object(r.a)(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||Object(o.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n"+t+"<\/script>"},h=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;h=r?function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e}(r):((e=s("iframe")).style.display="none",u.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F);for(var n=a.length;n--;)delete h.prototype[a[n]];return h()};c[l]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(p.prototype=o(t),n=new p,p.prototype=null,n[l]=t):n=h(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(21);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){"use strict";var r=n(0),o=n(3),i=n(17),a=n(20),c=n(7),u=n(76),s=n(119),f=n(1),l=n(6),p=n(53),d=n(4),h=n(5),v=n(11),y=n(14),m=n(48),g=n(31),b=n(45),_=n(50),x=n(71),w=n(208),O=n(81),S=n(26),j=n(8),E=n(80),A=n(10),C=n(13),k=n(73),$=n(52),P=n(35),T=n(49),L=n(2),R=n(141),I=n(142),D=n(44),M=n(29),N=n(32).forEach,F=$("hidden"),U=L("toPrimitive"),z=M.set,V=M.getterFor("Symbol"),B=Object.prototype,q=o.Symbol,H=i("JSON","stringify"),W=S.f,G=j.f,Q=w.f,K=E.f,X=k("symbols"),Y=k("op-symbols"),J=k("string-to-symbol-registry"),Z=k("symbol-to-string-registry"),tt=k("wks"),et=o.QObject,nt=!et||!et.prototype||!et.prototype.findChild,rt=c&&f((function(){return 7!=b(G({},"a",{get:function(){return G(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=W(B,e);r&&delete B[e],G(t,e,n),r&&t!==B&&G(B,e,r)}:G,ot=function(t,e){var n=X[t]=b(q.prototype);return z(n,{type:"Symbol",tag:t,description:e}),c||(n.description=e),n},it=s?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof q},at=function(t,e,n){t===B&&at(Y,e,n),h(t);var r=m(e,!0);return h(n),l(X,r)?(n.enumerable?(l(t,F)&&t[F][r]&&(t[F][r]=!1),n=b(n,{enumerable:g(0,!1)})):(l(t,F)||G(t,F,g(1,{})),t[F][r]=!0),rt(t,r,n)):G(t,r,n)},ct=function(t,e){h(t);var n=y(e),r=_(n).concat(lt(n));return N(r,(function(e){c&&!ut.call(n,e)||at(t,e,n[e])})),t},ut=function(t){var e=m(t,!0),n=K.call(this,e);return!(this===B&&l(X,e)&&!l(Y,e))&&(!(n||!l(this,e)||!l(X,e)||l(this,F)&&this[F][e])||n)},st=function(t,e){var n=y(t),r=m(e,!0);if(n!==B||!l(X,r)||l(Y,r)){var o=W(n,r);return!o||!l(X,r)||l(n,F)&&n[F][r]||(o.enumerable=!0),o}},ft=function(t){var e=Q(y(t)),n=[];return N(e,(function(t){l(X,t)||l(P,t)||n.push(t)})),n},lt=function(t){var e=t===B,n=Q(e?Y:y(t)),r=[];return N(n,(function(t){!l(X,t)||e&&!l(B,t)||r.push(X[t])})),r};(u||(C((q=function(){if(this instanceof q)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=T(t),n=function(t){this===B&&n.call(Y,t),l(this,F)&&l(this[F],e)&&(this[F][e]=!1),rt(this,e,g(1,t))};return c&&nt&&rt(B,e,{configurable:!0,set:n}),ot(e,t)}).prototype,"toString",(function(){return V(this).tag})),C(q,"withoutSetter",(function(t){return ot(T(t),t)})),E.f=ut,j.f=at,S.f=st,x.f=w.f=ft,O.f=lt,R.f=function(t){return ot(L(t),t)},c&&(G(q.prototype,"description",{configurable:!0,get:function(){return V(this).description}}),a||C(B,"propertyIsEnumerable",ut,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:q}),N(_(tt),(function(t){I(t)})),r({target:"Symbol",stat:!0,forced:!u},{for:function(t){var e=String(t);if(l(J,e))return J[e];var n=q(e);return J[e]=n,Z[n]=e,n},keyFor:function(t){if(!it(t))throw TypeError(t+" is not a symbol");if(l(Z,t))return Z[t]},useSetter:function(){nt=!0},useSimple:function(){nt=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!c},{create:function(t,e){return void 0===e?b(t):ct(b(t),e)},defineProperty:at,defineProperties:ct,getOwnPropertyDescriptor:st}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:ft,getOwnPropertySymbols:lt}),r({target:"Object",stat:!0,forced:f((function(){O.f(1)}))},{getOwnPropertySymbols:function(t){return O.f(v(t))}}),H)&&r({target:"JSON",stat:!0,forced:!u||f((function(){var t=q();return"[null]"!=H([t])||"{}"!=H({a:t})||"{}"!=H(Object(t))}))},{stringify:function(t,e,n){for(var r,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(r=e,(d(e)||void 0!==t)&&!it(t))return p(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!it(e))return e}),o[1]=e,H.apply(null,o)}});q.prototype[U]||A(q.prototype,U,q.prototype.valueOf),D(q,"Symbol"),P[F]=!0},function(t,e,n){var r=n(4);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},function(t,e,n){var r=n(120),o=n(78);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(73),o=n(49),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,n){var r=n(19);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(1),o=n(2),i=n(84),a=o("species");t.exports=function(t){return i>=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,n){"use strict";var r=n(0),o=n(4),i=n(53),a=n(121),c=n(12),u=n(14),s=n(56),f=n(2),l=n(54),p=n(18),d=l("slice"),h=p("slice",{ACCESSORS:!0,0:0,1:2}),v=f("species"),y=[].slice,m=Math.max;r({target:"Array",proto:!0,forced:!d||!h},{slice:function(t,e){var n,r,f,l=u(this),p=c(l.length),d=a(t,p),h=a(void 0===e?p:e,p);if(i(l)&&("function"!=typeof(n=l.constructor)||n!==Array&&!i(n.prototype)?o(n)&&null===(n=n[v])&&(n=void 0):n=void 0,n===Array||void 0===n))return y.call(l,d,h);for(r=new(void 0===n?Array:n)(m(h-d,0)),f=0;d
'};function o(t,e,n){return tn?n:t}function i(t){return 100*(-1+t)}n.configure=function(t){var e,n;for(e in t)void 0!==(n=t[e])&&t.hasOwnProperty(e)&&(r[e]=n);return this},n.status=null,n.set=function(t){var e=n.isStarted();t=o(t,r.minimum,1),n.status=1===t?null:t;var u=n.render(!e),s=u.querySelector(r.barSelector),f=r.speed,l=r.easing;return u.offsetWidth,a((function(e){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),c(s,function(t,e,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+i(t)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+i(t)+"%,0)"}:{"margin-left":i(t)+"%"}).transition="all "+e+"ms "+n,o}(t,f,l)),1===t?(c(u,{transition:"none",opacity:1}),u.offsetWidth,setTimeout((function(){c(u,{transition:"all "+f+"ms linear",opacity:0}),setTimeout((function(){n.remove(),e()}),f)}),f)):setTimeout(e,f)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var t=function(){setTimeout((function(){n.status&&(n.trickle(),t())}),r.trickleSpeed)};return r.trickle&&t(),this},n.done=function(t){return t||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(t){var e=n.status;return e?("number"!=typeof t&&(t=(1-e)*o(Math.random()*e,.1,.95)),e=o(e+t,0,.994),n.set(e)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},t=0,e=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===e&&n.start(),t++,e++,r.always((function(){0==--e?(t=0,n.done()):n.set((t-e)/t)})),this):this},n.render=function(t){if(n.isRendered())return document.getElementById("nprogress");s(document.documentElement,"nprogress-busy");var e=document.createElement("div");e.id="nprogress",e.innerHTML=r.template;var o,a=e.querySelector(r.barSelector),u=t?"-100":i(n.status||0),f=document.querySelector(r.parent);return c(a,{transition:"all 0 linear",transform:"translate3d("+u+"%,0,0)"}),r.showSpinner||(o=e.querySelector(r.spinnerSelector))&&p(o),f!=document.body&&s(f,"nprogress-custom-parent"),f.appendChild(e),e},n.remove=function(){f(document.documentElement,"nprogress-busy"),f(document.querySelector(r.parent),"nprogress-custom-parent");var t=document.getElementById("nprogress");t&&p(t)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var t=document.body.style,e="WebkitTransform"in t?"Webkit":"MozTransform"in t?"Moz":"msTransform"in t?"ms":"OTransform"in t?"O":"";return e+"Perspective"in t?"translate3d":e+"Transform"in t?"translate":"margin"};var a=function(){var t=[];function e(){var n=t.shift();n&&n(e)}return function(n){t.push(n),1==t.length&&e()}}(),c=function(){var t=["Webkit","O","Moz","ms"],e={};function n(n){return n=n.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(t,e){return e.toUpperCase()})),e[n]||(e[n]=function(e){var n=document.body.style;if(e in n)return e;for(var r,o=t.length,i=e.charAt(0).toUpperCase()+e.slice(1);o--;)if((r=t[o]+i)in n)return r;return e}(n))}function r(t,e,r){e=n(e),t.style[e]=r}return function(t,e){var n,o,i=arguments;if(2==i.length)for(n in e)void 0!==(o=e[n])&&e.hasOwnProperty(n)&&r(t,n,o);else r(t,i[1],i[2])}}();function u(t,e){return("string"==typeof t?t:l(t)).indexOf(" "+e+" ")>=0}function s(t,e){var n=l(t),r=n+e;u(n,e)||(t.className=r.substring(1))}function f(t,e){var n,r=l(t);u(t,e)&&(n=r.replace(" "+e+" "," "),t.className=n.substring(1,n.length-1))}function l(t){return(" "+(t.className||"")+" ").replace(/\s+/gi," ")}function p(t){t&&t.parentNode&&t.parentNode.removeChild(t)}return n})?r.call(e,n,e,t):r)||(t.exports=o)},function(t,e,n){var r=n(7),o=n(8).f,i=Function.prototype,a=i.toString,c=/^\s*function ([^ (]*)/;r&&!("name"in i)&&o(i,"name",{configurable:!0,get:function(){try{return a.call(this).match(c)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var r=n(0),o=n(32).map,i=n(54),a=n(18),c=i("map"),u=a("map");r({target:"Array",proto:!0,forced:!c||!u},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(176),o=n(5),i=n(11),a=n(12),c=n(51),u=n(23),s=n(177),f=n(178),l=Math.max,p=Math.min,d=Math.floor,h=/\$([$&'`]|\d\d?|<[^>]*>)/g,v=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(t,e,n,r){var y=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,m=r.REPLACE_KEEPS_$0,g=y?"$":"$0";return[function(n,r){var o=u(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,o,r):e.call(String(o),n,r)},function(t,r){if(!y&&m||"string"==typeof r&&-1===r.indexOf(g)){var i=n(e,t,this,r);if(i.done)return i.value}var u=o(t),d=String(this),h="function"==typeof r;h||(r=String(r));var v=u.global;if(v){var _=u.unicode;u.lastIndex=0}for(var x=[];;){var w=f(u,d);if(null===w)break;if(x.push(w),!v)break;""===String(w[0])&&(u.lastIndex=s(d,a(u.lastIndex),_))}for(var O,S="",j=0,E=0;E=j&&(S+=d.slice(j,C)+L,j=C+A.length)}return S+d.slice(j)}];function b(t,n,r,o,a,c){var u=r+t.length,s=o.length,f=v;return void 0!==a&&(a=i(a),f=h),e.call(c,f,(function(e,i){var c;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(u);case"<":c=a[i.slice(1,-1)];break;default:var f=+i;if(0===f)return e;if(f>s){var l=d(f/10);return 0===l?e:l<=s?void 0===o[l-1]?i.charAt(1):o[l-1]+i.charAt(1):e}c=o[f-1]}return void 0===c?"":c}))}}))},function(t,e,n){var r=n(120),o=n(78).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){"use strict";var r,o,i=n(114),a=n(191),c=RegExp.prototype.exec,u=String.prototype.replace,s=c,f=(r=/a/,o=/b*/g,c.call(r,"a"),c.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),l=a.UNSUPPORTED_Y||a.BROKEN_CARET,p=void 0!==/()??/.exec("")[1];(f||p||l)&&(s=function(t){var e,n,r,o,a=this,s=l&&a.sticky,d=i.call(a),h=a.source,v=0,y=t;return s&&(-1===(d=d.replace("y","")).indexOf("g")&&(d+="g"),y=String(t).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==t[a.lastIndex-1])&&(h="(?: "+h+")",y=" "+y,v++),n=new RegExp("^(?:"+h+")",d)),p&&(n=new RegExp("^"+h+"$(?!\\s)",d)),f&&(e=a.lastIndex),r=c.call(s?n:a,y),s?r?(r.input=r.input.slice(v),r[0]=r[0].slice(v),r.index=a.lastIndex,a.lastIndex+=r[0].length):a.lastIndex=0:f&&r&&(a.lastIndex=a.global?r.index+r[0].length:e),p&&r&&r.length>1&&u.call(r[0],n,(function(){for(o=1;of;)if((c=u[f++])!=c)return!0}else for(;s>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,n){var r=n(117),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return o.call(t)}),t.exports=r.inspectSource},function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(6),o=n(11),i=n(52),a=n(127),c=i("IE_PROTO"),u=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){return t=o(t),r(t,c)?t[c]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,e,n){var r={};r[n(2)("toStringTag")]="z",t.exports="[object z]"===String(r)},function(t,e,n){var r,o,i=n(3),a=n(133),c=i.process,u=c&&c.versions,s=u&&u.v8;s?o=(r=s.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,e,n){n(142)("iterator")},function(t,e,n){var r=n(211),o=n(27),i=Object.prototype,a=i.hasOwnProperty,c=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return o(t)&&a.call(t,"callee")&&!c.call(t,"callee")};t.exports=u},function(t,e,n){var r=n(22)(n(16),"Map");t.exports=r},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(231),o=n(238),i=n(240),a=n(241),c=n(242);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){var r=n(15),o=n(93),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!o(t))||(a.test(t)||!i.test(t)||null!=e&&t in Object(e))}},function(t,e,n){var r=n(33),o=n(27);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},function(t,e){t.exports=function(t){return t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));n(140),n(166);function r(t){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));n(47),n(57),n(85),n(9),n(25),n(30);var r=n(66);function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(t,e)||Object(r.a)(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new w(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return S()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=b(a,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var f=u(t,e,n);if("normal"===f.type){if(r=n.done?"completed":"suspendedYield",f.arg===s)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(r="completed",n.method="throw",n.arg=f.arg)}}}(t,n,a),i}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var s={};function f(){}function l(){}function p(){}var d={};d[o]=function(){return this};var h=Object.getPrototypeOf,v=h&&h(h(O([])));v&&v!==e&&n.call(v,o)&&(d=v);var y=p.prototype=f.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function g(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,c)}))}c(s.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function b(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=u(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function O(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){"use strict";var r=n(0),o=n(138);r({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},function(t,e,n){var r=n(3),o=n(137),i=n(138),a=n(10);for(var c in o){var u=r[c],s=u&&u.prototype;if(s&&s.forEach!==i)try{a(s,"forEach",i)}catch(t){s.forEach=i}}},function(t,e,n){"use strict";var r=n(13),o=n(5),i=n(1),a=n(114),c=RegExp.prototype,u=c.toString,s=i((function(){return"/a/b"!=u.call({source:"a",flags:"b"})})),f="toString"!=u.name;(s||f)&&r(RegExp.prototype,"toString",(function(){var t=o(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(void 0===n&&t instanceof RegExp&&!("flags"in c)?a.call(t):n)}),{unsafe:!0})},function(t,e,n){var r=n(0),o=n(11),i=n(50);r({target:"Object",stat:!0,forced:n(1)((function(){i(1)}))},{keys:function(t){return i(o(t))}})},function(t,e,n){var r=n(1),o=/#|\.prototype\./,i=function(t,e){var n=c[a(t)];return n==s||n!=u&&("function"==typeof e?r(e):!!e)},a=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=i.data={},u=i.NATIVE="N",s=i.POLYFILL="P";t.exports=i},function(t,e,n){var r=n(5),o=n(198);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,i){return r(n),o(i),e?t.call(n,i):n.__proto__=i,n}}():void 0)},function(t,e,n){var r=n(108),o=n(36),i=n(2)("iterator");t.exports=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){"use strict";var r=n(14),o=n(106),i=n(36),a=n(29),c=n(107),u=a.set,s=a.getterFor("Array Iterator");t.exports=c(Array,"Array",(function(t,e){u(this,{type:"Array Iterator",target:r(t),index:0,kind:e})}),(function(){var t=s(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e,n){var r=n(2),o=n(45),i=n(8),a=r("unscopables"),c=Array.prototype;null==c[a]&&i.f(c,a,{configurable:!0,value:o(null)}),t.exports=function(t){c[a][t]=!0}},function(t,e,n){"use strict";var r=n(0),o=n(188),i=n(82),a=n(103),c=n(44),u=n(10),s=n(13),f=n(2),l=n(20),p=n(36),d=n(126),h=d.IteratorPrototype,v=d.BUGGY_SAFARI_ITERATORS,y=f("iterator"),m=function(){return this};t.exports=function(t,e,n,f,d,g,b){o(n,e,f);var _,x,w,O=function(t){if(t===d&&C)return C;if(!v&&t in E)return E[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},S=e+" Iterator",j=!1,E=t.prototype,A=E[y]||E["@@iterator"]||d&&E[d],C=!v&&A||O(d),k="Array"==e&&E.entries||A;if(k&&(_=i(k.call(new t)),h!==Object.prototype&&_.next&&(l||i(_)===h||(a?a(_,h):"function"!=typeof _[y]&&u(_,y,m)),c(_,S,!0,!0),l&&(p[S]=m))),"values"==d&&A&&"values"!==A.name&&(j=!0,C=function(){return A.call(this)}),l&&!b||E[y]===C||u(E,y,C),p[e]=C,d)if(x={values:O("values"),keys:g?C:O("keys"),entries:O("entries")},b)for(w in x)(v||j||!(w in E))&&s(E,w,x[w]);else r({target:e,proto:!0,forced:v||j},x);return x}},function(t,e,n){var r=n(83),o=n(19),i=n(2)("toStringTag"),a="Arguments"==o(function(){return arguments}());t.exports=r?o:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:a?o(e):"Object"==(r=o(e))&&"function"==typeof e.callee?"Arguments":r}},function(t,e,n){var r=n(2)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(t){}return n}},function(t,e,n){var r=n(5),o=n(21),i=n(2)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[i])?e:o(n)}},function(t,e,n){var r=n(51),o=n(23),i=function(t){return function(e,n){var i,a,c=String(o(e)),u=r(n),s=c.length;return u<0||u>=s?t?"":void 0:(i=c.charCodeAt(u))<55296||i>56319||u+1===s||(a=c.charCodeAt(u+1))<56320||a>57343?t?c.charAt(u):i:t?c.slice(u,u+2):a-56320+(i-55296<<10)+65536}};t.exports={codeAt:i(!1),charAt:i(!0)}},function(t,e,n){var r=n(184);t.exports=function(t){if(r(t))throw TypeError("The method doesn't accept regular expressions");return t}},function(t,e,n){var r=n(2)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,"/./"[t](e)}catch(t){}}return!1}},function(t,e,n){"use strict";var r=n(5);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));n(166);function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}},function(t,e,n){var r=n(0),o=n(17),i=n(21),a=n(5),c=n(4),u=n(45),s=n(304),f=n(1),l=o("Reflect","construct"),p=f((function(){function t(){}return!(l((function(){}),[],t)instanceof t)})),d=!f((function(){l((function(){}))})),h=p||d;r({target:"Reflect",stat:!0,forced:h,sham:h},{construct:function(t,e){i(t),a(e);var n=arguments.length<3?t:i(arguments[2]);if(d&&!p)return l(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(s.apply(t,r))}var o=n.prototype,f=u(c(o)?o:Object.prototype),h=Function.apply.call(t,f,e);return c(h)?h:f}})},function(t,e,n){var r=n(3),o=n(74),i=r["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,e,n){var r=n(7),o=n(1),i=n(75);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(76);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,n){var r=n(6),o=n(14),i=n(77).indexOf,a=n(35);t.exports=function(t,e){var n,c=o(t),u=0,s=[];for(n in c)!r(a,n)&&r(c,n)&&s.push(n);for(;e.length>u;)r(c,n=e[u++])&&(~i(s,n)||s.push(n));return s}},function(t,e,n){var r=n(51),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},function(t,e,n){var r=n(17);t.exports=r("document","documentElement")},function(t,e,n){var r=n(3);t.exports=r},function(t,e,n){var r=n(6),o=n(125),i=n(26),a=n(8);t.exports=function(t,e){for(var n=o(e),c=a.f,u=i.f,s=0;sn;)e.push(arguments[n++]);return _[++b]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},r(b),b},v=function(t){delete _[t]},"process"==u(y)?r=function(t){y.nextTick(w(t))}:g&&g.now?r=function(t){g.now(w(t))}:m&&!p?(i=(o=new m).port2,o.port1.onmessage=O,r=s(i.postMessage,i,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||c(S)||"file:"===d.protocol?r="onreadystatechange"in l("script")?function(t){f.appendChild(l("script")).onreadystatechange=function(){f.removeChild(this),x(t)}}:function(t){setTimeout(w(t),0)}:(r=S,a.addEventListener("message",O,!1))),t.exports={set:h,clear:v}},function(t,e,n){var r=n(133);t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},function(t,e,n){var r=n(17);t.exports=r("navigator","userAgent")||""},function(t,e,n){var r=n(5),o=n(4),i=n(135);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var r=n(21),o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},function(t,e,n){var r=n(4),o=n(53),i=n(2)("species");t.exports=function(t,e){var n;return o(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!o(n.prototype)?r(n)&&null===(n=n[i])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,n){"use strict";var r=n(32).forEach,o=n(37),i=n(18),a=o("forEach"),c=i("forEach");t.exports=a&&c?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,n){var r=n(1);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,e,n){var r=n(0),o=n(1),i=n(11),a=n(82),c=n(127);r({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!c},{getPrototypeOf:function(t){return a(i(t))}})},function(t,e,n){var r=n(2);e.f=r},function(t,e,n){var r=n(123),o=n(6),i=n(141),a=n(8).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},function(t,e,n){var r=n(0),o=n(192);r({target:"Array",stat:!0,forced:!n(109)((function(t){Array.from(t)}))},{from:o})},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,o=t.length;++nf))return!1;var p=u.get(t);if(p&&u.get(e))return p==e;var d=-1,h=!0,v=2&n?new r:void 0;for(u.set(t,e),u.set(e,t);++d-1&&t%1==0&&t=e||n<0||y&&t-s>=i}function x(){var t=d();if(_(t))return w(t);c=setTimeout(x,function(t){var n=e-(t-u);return y?p(n,i-(t-s)):n}(t))}function w(t){return c=void 0,m&&r?g(t):(r=o=void 0,a)}function O(){var t=d(),n=_(t);if(r=arguments,o=this,u=t,n){if(void 0===c)return b(u);if(y)return c=setTimeout(x,e),g(u)}return void 0===c&&(c=setTimeout(x,e)),a}return e=v(e)||0,h(n)&&(f=!!n.leading,i=(y="maxWait"in n)?l(v(n.maxWait)||0,e):i,m="trailing"in n?!!n.trailing:m),O.cancel=function(){void 0!==c&&clearTimeout(c),s=0,r=u=o=c=void 0},O.flush=function(){return void 0===c?a:w(d())},O}},function(t,e,n){"use strict";var r=n(0),o=n(32).some,i=n(37),a=n(18),c=i("some"),u=a("some");r({target:"Array",proto:!0,forced:!c||!u},{some:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},function(t,e,n){"use strict";var r=n(0),o=n(77).indexOf,i=n(37),a=n(18),c=[].indexOf,u=!!c&&1/[1].indexOf(1,-0)<0,s=i("indexOf"),f=a("indexOf",{ACCESSORS:!0,1:0});r({target:"Array",proto:!0,forced:u||!s||!f},{indexOf:function(t){return u?c.apply(this,arguments)||0:o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r,o=n(0),i=n(26).f,a=n(12),c=n(112),u=n(23),s=n(113),f=n(20),l="".startsWith,p=Math.min,d=s("startsWith");o({target:"String",proto:!0,forced:!!(f||d||(r=i(String.prototype,"startsWith"),!r||r.writable))&&!d},{startsWith:function(t){var e=String(u(this));c(t);var n=a(p(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return l?l.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";var r=n(0),o=n(77).includes,i=n(106);r({target:"Array",proto:!0,forced:!n(18)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},function(t,e,n){"use strict";n(43);var r=n(13),o=n(1),i=n(2),a=n(72),c=n(10),u=i("species"),s=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),f="$0"==="a".replace(/./,"$0"),l=i("replace"),p=!!/./[l]&&""===/./[l]("a","$0"),d=!o((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));t.exports=function(t,e,n,l){var h=i(t),v=!o((function(){var e={};return e[h]=function(){return 7},7!=""[t](e)})),y=v&&!o((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return e=!0,null},n[h](""),!e}));if(!v||!y||"replace"===t&&(!s||!f||p)||"split"===t&&!d){var m=/./[h],g=n(h,""[t],(function(t,e,n,r,o){return e.exec===a?v&&!o?{done:!0,value:m.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:f,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:p}),b=g[0],_=g[1];r(String.prototype,t,b),r(RegExp.prototype,h,2==e?function(t,e){return _.call(t,this,e)}:function(t){return _.call(t,this)})}l&&c(RegExp.prototype[h],"sham",!0)}},function(t,e,n){"use strict";var r=n(111).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){var r=n(19),o=n(72);t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var i=n.call(t,e);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},function(t,e,n){var r=n(13);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},function(t,e,n){"use strict";var r=n(17),o=n(8),i=n(2),a=n(7),c=i("species");t.exports=function(t){var e=r(t),n=o.f;a&&e&&!e[c]&&n(e,c,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(5),o=n(129),i=n(12),a=n(46),c=n(104),u=n(130),s=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,e,n,f,l){var p,d,h,v,y,m,g,b=a(e,n,f?2:1);if(l)p=t;else{if("function"!=typeof(d=c(t)))throw TypeError("Target is not iterable");if(o(d)){for(h=0,v=i(t.length);v>h;h++)if((y=f?b(r(g=t[h])[0],g[1]):b(t[h]))&&y instanceof s)return y;return new s(!1)}p=d.call(t)}for(m=p.next;!(g=m.call(p)).done;)if("object"==typeof(y=u(p,b,g.value,f))&&y&&y instanceof s)return y;return new s(!1)}).stop=function(t){return new s(!0,t)}},function(t,e,n){"use strict";var r=n(0),o=n(206).left,i=n(37),a=n(18),c=i("reduce"),u=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!c||!u},{reduce:function(t){return o(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(35),o=n(4),i=n(6),a=n(8).f,c=n(49),u=n(139),s=c("meta"),f=0,l=Object.isExtensible||function(){return!0},p=function(t){a(t,s,{value:{objectID:"O"+ ++f,weakData:{}}})},d=t.exports={REQUIRED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,s)){if(!l(t))return"F";if(!e)return"E";p(t)}return t[s].objectID},getWeakData:function(t,e){if(!i(t,s)){if(!l(t))return!0;if(!e)return!1;p(t)}return t[s].weakData},onFreeze:function(t){return u&&d.REQUIRED&&l(t)&&!i(t,s)&&p(t),t}};r[s]=!0},function(t,e,n){var r=n(4),o=n(19),i=n(2)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,n){"use strict";var r=n(0),o=n(112),i=n(23);r({target:"String",proto:!0,forced:!n(113)("includes")},{includes:function(t){return!!~String(i(this)).indexOf(o(t),arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(0),o=n(34),i=n(14),a=n(37),c=[].join,u=o!=Object,s=a("join",",");r({target:"Array",proto:!0,forced:u||!s},{join:function(t){return c.call(i(this),void 0===t?",":t)}})},function(t,e,n){var r=n(7),o=n(8),i=n(5),a=n(50);t.exports=r?Object.defineProperties:function(t,e){i(t);for(var n,r=a(e),c=r.length,u=0;c>u;)o.f(t,n=r[u++],e[n]);return t}},function(t,e,n){"use strict";var r=n(126).IteratorPrototype,o=n(45),i=n(31),a=n(44),c=n(36),u=function(){return this};t.exports=function(t,e,n){var s=e+" Iterator";return t.prototype=o(r,{next:i(1,n)}),a(t,s,!1,!0),c[s]=u,t}},function(t,e,n){"use strict";var r=n(7),o=n(1),i=n(50),a=n(81),c=n(80),u=n(11),s=n(34),f=Object.assign,l=Object.defineProperty;t.exports=!f||o((function(){if(r&&1!==f({b:1},f(l({},"a",{enumerable:!0,get:function(){l(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol();return t[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=f({},t)[n]||"abcdefghijklmnopqrst"!=i(f({},e)).join("")}))?function(t,e){for(var n=u(t),o=arguments.length,f=1,l=a.f,p=c.f;o>f;)for(var d,h=s(arguments[f++]),v=l?i(h).concat(l(h)):i(h),y=v.length,m=0;y>m;)d=v[m++],r&&!p.call(h,d)||(n[d]=h[d]);return n}:f},function(t,e,n){var r=n(0),o=n(7),i=n(125),a=n(14),c=n(26),u=n(56);r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var e,n,r=a(t),o=c.f,s=i(r),f={},l=0;s.length>l;)void 0!==(n=o(r,e=s[l++]))&&u(f,e,n);return f}})},function(t,e,n){"use strict";var r=n(1);function o(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=r((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=r((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},function(t,e,n){"use strict";var r=n(46),o=n(11),i=n(130),a=n(129),c=n(12),u=n(56),s=n(104);t.exports=function(t){var e,n,f,l,p,d,h=o(t),v="function"==typeof this?this:Array,y=arguments.length,m=y>1?arguments[1]:void 0,g=void 0!==m,b=s(h),_=0;if(g&&(m=r(m,y>2?arguments[2]:void 0,2)),null==b||v==Array&&a(b))for(n=new v(e=c(h.length));e>_;_++)d=g?m(h[_],_):h[_],u(n,_,d);else for(p=(l=b.call(h)).next,n=new v;!(f=p.call(l)).done;_++)d=g?i(l,m,[f.value,_],!0):f.value,u(n,_,d);return n.length=_,n}},function(t,e,n){"use strict";var r=n(0),o=n(1),i=n(53),a=n(4),c=n(11),u=n(12),s=n(56),f=n(136),l=n(54),p=n(2),d=n(84),h=p("isConcatSpreadable"),v=d>=51||!o((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),y=l("concat"),m=function(t){if(!a(t))return!1;var e=t[h];return void 0!==e?!!e:i(t)};r({target:"Array",proto:!0,forced:!v||!y},{concat:function(t){var e,n,r,o,i,a=c(this),l=f(a,0),p=0;for(e=-1,r=arguments.length;e9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw TypeError("Maximum allowed index exceeded");s(l,p++,i)}return l.length=p,l}})},function(t,e,n){var r=n(163);t.exports=function(t,e,n){var o=null==t?void 0:r(t,e);return void 0===o?n:o}},function(t,e){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},function(t,e,n){t.exports=n(306)},function(t,e,n){var r=n(3),o=n(79),i=r.WeakMap;t.exports="function"==typeof i&&/native code/.test(o(i))},function(t,e,n){var r=n(4);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},function(t,e,n){"use strict";var r,o,i,a,c=n(0),u=n(20),s=n(3),f=n(17),l=n(128),p=n(13),d=n(179),h=n(44),v=n(180),y=n(4),m=n(21),g=n(172),b=n(19),_=n(79),x=n(181),w=n(109),O=n(110),S=n(131).set,j=n(200),E=n(134),A=n(201),C=n(135),k=n(202),$=n(29),P=n(102),T=n(2),L=n(84),R=T("species"),I="Promise",D=$.get,M=$.set,N=$.getterFor(I),F=l,U=s.TypeError,z=s.document,V=s.process,B=f("fetch"),q=C.f,H=q,W="process"==b(V),G=!!(z&&z.createEvent&&s.dispatchEvent),Q=P(I,(function(){if(!(_(F)!==String(F))){if(66===L)return!0;if(!W&&"function"!=typeof PromiseRejectionEvent)return!0}if(u&&!F.prototype.finally)return!0;if(L>=51&&/native code/.test(F))return!1;var t=F.resolve(1),e=function(t){t((function(){}),(function(){}))};return(t.constructor={})[R]=e,!(t.then((function(){}))instanceof e)})),K=Q||!w((function(t){F.all(t).catch((function(){}))})),X=function(t){var e;return!(!y(t)||"function"!=typeof(e=t.then))&&e},Y=function(t,e,n){if(!e.notified){e.notified=!0;var r=e.reactions;j((function(){for(var o=e.value,i=1==e.state,a=0;r.length>a;){var c,u,s,f=r[a++],l=i?f.ok:f.fail,p=f.resolve,d=f.reject,h=f.domain;try{l?(i||(2===e.rejection&&et(t,e),e.rejection=1),!0===l?c=o:(h&&h.enter(),c=l(o),h&&(h.exit(),s=!0)),c===f.promise?d(U("Promise-chain cycle")):(u=X(c))?u.call(c,p,d):p(c)):d(o)}catch(t){h&&!s&&h.exit(),d(t)}}e.reactions=[],e.notified=!1,n&&!e.rejection&&Z(t,e)}))}},J=function(t,e,n){var r,o;G?((r=z.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),s.dispatchEvent(r)):r={promise:e,reason:n},(o=s["on"+t])?o(r):"unhandledrejection"===t&&A("Unhandled promise rejection",n)},Z=function(t,e){S.call(s,(function(){var n,r=e.value;if(tt(e)&&(n=k((function(){W?V.emit("unhandledRejection",r,t):J("unhandledrejection",t,r)})),e.rejection=W||tt(e)?2:1,n.error))throw n.value}))},tt=function(t){return 1!==t.rejection&&!t.parent},et=function(t,e){S.call(s,(function(){W?V.emit("rejectionHandled",t):J("rejectionhandled",t,e.value)}))},nt=function(t,e,n,r){return function(o){t(e,n,o,r)}},rt=function(t,e,n,r){e.done||(e.done=!0,r&&(e=r),e.value=n,e.state=2,Y(t,e,!0))},ot=function(t,e,n,r){if(!e.done){e.done=!0,r&&(e=r);try{if(t===n)throw U("Promise can't be resolved itself");var o=X(n);o?j((function(){var r={done:!1};try{o.call(n,nt(ot,t,r,e),nt(rt,t,r,e))}catch(n){rt(t,r,n,e)}})):(e.value=n,e.state=1,Y(t,e,!1))}catch(n){rt(t,{done:!1},n,e)}}};Q&&(F=function(t){g(this,F,I),m(t),r.call(this);var e=D(this);try{t(nt(ot,this,e),nt(rt,this,e))}catch(t){rt(this,e,t)}},(r=function(t){M(this,{type:I,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(F.prototype,{then:function(t,e){var n=N(this),r=q(O(this,F));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=W?V.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&Y(this,n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r,e=D(t);this.promise=t,this.resolve=nt(ot,t,e),this.reject=nt(rt,t,e)},C.f=q=function(t){return t===F||t===i?new o(t):H(t)},u||"function"!=typeof l||(a=l.prototype.then,p(l.prototype,"then",(function(t,e){var n=this;return new F((function(t,e){a.call(n,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof B&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return E(F,B.apply(s,arguments))}}))),c({global:!0,wrap:!0,forced:Q},{Promise:F}),h(F,I,!1,!0),v(I),i=f(I),c({target:I,stat:!0,forced:Q},{reject:function(t){var e=q(this);return e.reject.call(void 0,t),e.promise}}),c({target:I,stat:!0,forced:u||Q},{resolve:function(t){return E(u&&this===i?F:this,t)}}),c({target:I,stat:!0,forced:K},{all:function(t){var e=this,n=q(e),r=n.resolve,o=n.reject,i=k((function(){var n=m(e.resolve),i=[],a=0,c=1;x(t,(function(t){var u=a++,s=!1;i.push(void 0),c++,n.call(e,t).then((function(t){s||(s=!0,i[u]=t,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=q(e),r=n.reject,o=k((function(){var o=m(e.resolve);x(t,(function(t){o.call(e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},function(t,e,n){var r,o,i,a,c,u,s,f,l=n(3),p=n(26).f,d=n(19),h=n(131).set,v=n(132),y=l.MutationObserver||l.WebKitMutationObserver,m=l.process,g=l.Promise,b="process"==d(m),_=p(l,"queueMicrotask"),x=_&&_.value;x||(r=function(){var t,e;for(b&&(t=m.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},b?a=function(){m.nextTick(r)}:y&&!v?(c=!0,u=document.createTextNode(""),new y(r).observe(u,{characterData:!0}),a=function(){u.data=c=!c}):g&&g.resolve?(s=g.resolve(void 0),f=s.then,a=function(){f.call(s,r)}):a=function(){h.call(l,r)}),t.exports=x||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},function(t,e,n){var r=n(3);t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,e,n){var r=n(0),o=n(189);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(t,e,n){"use strict";var r=n(0),o=n(20),i=n(128),a=n(1),c=n(17),u=n(110),s=n(134),f=n(13);r({target:"Promise",proto:!0,real:!0,forced:!!i&&a((function(){i.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=u(this,c("Promise")),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then((function(){return n}))}:t,n?function(n){return s(e,t()).then((function(){throw n}))}:t)}}),o||"function"!=typeof i||i.prototype.finally||f(i.prototype,"finally",c("Promise").prototype.finally)},function(t,e,n){"use strict";var r=n(83),o=n(108);t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},function(t,e,n){var r=n(21),o=n(11),i=n(34),a=n(12),c=function(t){return function(e,n,c,u){r(n);var s=o(e),f=i(s),l=a(s.length),p=t?l-1:0,d=t?-1:1;if(c<2)for(;;){if(p in f){u=f[p],p+=d;break}if(p+=d,t?p<0:l<=p)throw TypeError("Reduce of empty array with no initial value")}for(;t?p>=0:l>p;p+=d)p in f&&(u=n(u,f[p],p,s));return u}};t.exports={left:c(!1),right:c(!0)}},function(t,e,n){var r=n(0),o=n(139),i=n(1),a=n(4),c=n(183).onFreeze,u=Object.freeze;r({target:"Object",stat:!0,forced:i((function(){u(1)})),sham:!o},{freeze:function(t){return u&&a(t)?u(c(t)):t}})},function(t,e,n){var r=n(14),o=n(71).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return a.slice()}}(t):o(r(t))}},function(t,e,n){var r=n(144),o=n(210);t.exports=function t(e,n,i,a,c){var u=-1,s=e.length;for(i||(i=o),c||(c=[]);++u0&&i(f)?n>1?t(f,n-1,i,a,c):r(c,f):a||(c[c.length]=f)}return c}},function(t,e,n){var r=n(38),o=n(86),i=n(15),a=r?r.isConcatSpreadable:void 0;t.exports=function(t){return i(t)||o(t)||!!(a&&t&&t[a])}},function(t,e,n){var r=n(33),o=n(27);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},function(t,e,n){var r=n(38),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,c=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,c),n=t[c];try{t[c]=void 0;var r=!0}catch(t){}var o=a.call(t);return r&&(e?t[c]=n:delete t[c]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r=n(215),o=n(271),i=n(94),a=n(15),c=n(281);t.exports=function(t){return"function"==typeof t?t:null==t?i:"object"==typeof t?a(t)?o(t[0],t[1]):r(t):c(t)}},function(t,e,n){var r=n(216),o=n(270),i=n(162);t.exports=function(t){var e=o(t);return 1==e.length&&e[0][2]?i(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},function(t,e,n){var r=n(146),o=n(150);t.exports=function(t,e,n,i){var a=n.length,c=a,u=!i;if(null==t)return!c;for(t=Object(t);a--;){var s=n[a];if(u&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++a-1}},function(t,e,n){var r=n(59);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},function(t,e,n){var r=n(58);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(58),o=n(87),i=n(89);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(148),o=n(228),i=n(88),a=n(149),c=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,f=u.toString,l=s.hasOwnProperty,p=RegExp("^"+f.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?p:c).test(a(t))}},function(t,e,n){var r,o=n(229),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},function(t,e,n){var r=n(16)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(232),o=n(58),i=n(87);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(t,e,n){var r=n(233),o=n(234),i=n(235),a=n(236),c=n(237);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(152),o=n(293),i=n(298),a=n(153),c=n(299),u=n(90);t.exports=function(t,e,n){var s=-1,f=o,l=t.length,p=!0,d=[],h=d;if(n)p=!1,f=i;else if(l>=200){var v=e?null:c(t);if(v)return u(v);p=!1,f=a,h=new r}else h=e?[]:d;t:for(;++s-1}},function(t,e,n){var r=n(295),o=n(296),i=n(297);t.exports=function(t,e,n){return e==e?i(t,e,n):r(t,o,n)}},function(t,e){t.exports=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i=0&&Math.floor(e)===e&&isFinite(t)}function h(t){return a(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function v(t){return null==t?"":Array.isArray(t)||l(t)&&t.toString===f?JSON.stringify(t,null,2):String(t)}function y(t){var e=parseFloat(t);return isNaN(e)?t:e}function m(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(n,1)}}var _=Object.prototype.hasOwnProperty;function x(t,e){return _.call(t,e)}function w(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var O=/-(\w)/g,S=w((function(t){return t.replace(O,(function(t,e){return e?e.toUpperCase():""}))})),j=w((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),E=/\B([A-Z])/g,A=w((function(t){return t.replace(E,"-$1").toLowerCase()}));var C=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function k(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function $(t,e){for(var n in e)t[n]=e[n];return t}function P(t){for(var e={},n=0;n0,J=K&&K.indexOf("edge/")>0,Z=(K&&K.indexOf("android"),K&&/iphone|ipad|ipod|ios/.test(K)||"ios"===Q),tt=(K&&/chrome\/\d+/.test(K),K&&/phantomjs/.test(K),K&&K.match(/firefox\/(\d+)/)),et={}.watch,nt=!1;if(W)try{var rt={};Object.defineProperty(rt,"passive",{get:function(){nt=!0}}),window.addEventListener("test-passive",null,rt)}catch(t){}var ot=function(){return void 0===q&&(q=!W&&!G&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),q},it=W&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function at(t){return"function"==typeof t&&/native code/.test(t.toString())}var ct,ut="undefined"!=typeof Symbol&&at(Symbol)&&"undefined"!=typeof Reflect&&at(Reflect.ownKeys);ct="undefined"!=typeof Set&&at(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var st=T,ft=0,lt=function(){this.id=ft++,this.subs=[]};lt.prototype.addSub=function(t){this.subs.push(t)},lt.prototype.removeSub=function(t){b(this.subs,t)},lt.prototype.depend=function(){lt.target&<.target.addDep(this)},lt.prototype.notify=function(){var t=this.subs.slice();for(var e=0,n=t.length;e-1)if(i&&!x(o,"default"))a=!1;else if(""===a||a===A(t)){var u=Vt(String,o.type);(u<0||c0&&(le((o=t(o,(n||"")+"_"+r))[0])&&le(f)&&(l[s]=gt(f.text+o[0].text),o.shift()),l.push.apply(l,o)):u(o)?le(f)?l[s]=gt(f.text+o):""!==o&&l.push(gt(o)):le(o)&&le(f)?l[s]=gt(f.text+o.text):(c(e._isVList)&&a(o.tag)&&i(o.key)&&a(n)&&(o.key="__vlist"+n+"_"+r+"__"),l.push(o)));return l}(t):void 0}function le(t){return a(t)&&a(t.text)&&!1===t.isComment}function pe(t,e){if(t){for(var n=Object.create(null),r=ut?Reflect.ownKeys(t):Object.keys(t),o=0;o0,a=t?!!t.$stable:!i,c=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&n&&n!==o&&c===n.$key&&!i&&!n.$hasNormal)return n;for(var u in r={},t)t[u]&&"$"!==u[0]&&(r[u]=ye(e,u,t[u]))}else r={};for(var s in e)s in r||(r[s]=me(e,s));return t&&Object.isExtensible(t)&&(t._normalized=r),V(r,"$stable",a),V(r,"$key",c),V(r,"$hasNormal",i),r}function ye(t,e,n){var r=function(){var t=arguments.length?n.apply(null,arguments):n({});return(t=t&&"object"==typeof t&&!Array.isArray(t)?[t]:fe(t))&&(0===t.length||1===t.length&&t[0].isComment)?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0}),r}function me(t,e){return function(){return t[e]}}function ge(t,e){var n,r,o,i,c;if(Array.isArray(t)||"string"==typeof t)for(n=new Array(t.length),r=0,o=t.length;rdocument.createEvent("Event").timeStamp&&(sn=function(){return fn.now()})}function ln(){var t,e;for(un=sn(),an=!0,en.sort((function(t,e){return t.id-e.id})),cn=0;cncn&&en[n].id>t.id;)n--;en.splice(n+1,0,t)}else en.push(t);on||(on=!0,ne(ln))}}(this)},dn.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||s(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){Bt(t,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},dn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},dn.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},dn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||b(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var hn={enumerable:!0,configurable:!0,get:T,set:T};function vn(t,e,n){hn.get=function(){return this[e][n]},hn.set=function(t){this[e][n]=t},Object.defineProperty(t,n,hn)}function yn(t){t._watchers=[];var e=t.$options;e.props&&function(t,e){var n=t.$options.propsData||{},r=t._props={},o=t.$options._propKeys=[];t.$parent&&St(!1);var i=function(i){o.push(i);var a=Ft(i,e,n,t);At(r,i,a),i in t||vn(t,"_props",i)};for(var a in e)i(a);St(!0)}(t,e.props),e.methods&&function(t,e){t.$options.props;for(var n in e)t[n]="function"!=typeof e[n]?T:C(e[n],t)}(t,e.methods),e.data?function(t){var e=t.$options.data;l(e=t._data="function"==typeof e?function(t,e){dt();try{return t.call(e,e)}catch(t){return Bt(t,e,"data()"),{}}finally{ht()}}(e,t):e||{})||(e={});var n=Object.keys(e),r=t.$options.props,o=(t.$options.methods,n.length);for(;o--;){var i=n[o];0,r&&x(r,i)||(a=void 0,36!==(a=(i+"").charCodeAt(0))&&95!==a&&vn(t,"_data",i))}var a;Et(e,!0)}(t):Et(t._data={},!0),e.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),r=ot();for(var o in e){var i=e[o],a="function"==typeof i?i:i.get;0,r||(n[o]=new dn(t,a||T,T,mn)),o in t||gn(t,o,i)}}(t,e.computed),e.watch&&e.watch!==et&&function(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var o=0;o-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!p(t)&&t.test(e)}function Cn(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var c=En(a.componentOptions);c&&!e(c)&&kn(n,i,r,o)}}}function kn(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,b(n,e)}Sn.prototype._init=function(t){var e=this;e._uid=wn++,e._isVue=!0,t&&t._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(e,t):e.$options=Mt(On(e.constructor),t||{},e),e._renderProxy=e,e._self=e,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(e),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Ke(t,e)}(e),function(t){t._vnode=null,t._staticTrees=null;var e=t.$options,n=t.$vnode=e._parentVnode,r=n&&n.context;t.$slots=de(e._renderChildren,r),t.$scopedSlots=o,t._c=function(e,n,r,o){return Ue(t,e,n,r,o,!1)},t.$createElement=function(e,n,r,o){return Ue(t,e,n,r,o,!0)};var i=n&&n.data;At(t,"$attrs",i&&i.attrs||o,null,!0),At(t,"$listeners",e._parentListeners||o,null,!0)}(e),tn(e,"beforeCreate"),function(t){var e=pe(t.$options.inject,t);e&&(St(!1),Object.keys(e).forEach((function(n){At(t,n,e[n])})),St(!0))}(e),yn(e),function(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}(e),tn(e,"created"),e.$options.el&&e.$mount(e.$options.el)},function(t){var e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=Ct,t.prototype.$delete=kt,t.prototype.$watch=function(t,e,n){if(l(e))return xn(this,t,e,n);(n=n||{}).user=!0;var r=new dn(this,t,e,n);if(n.immediate)try{e.call(this,r.value)}catch(t){Bt(t,this,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}}}(Sn),function(t){var e=/^hook:/;t.prototype.$on=function(t,n){var r=this;if(Array.isArray(t))for(var o=0,i=t.length;o1?k(n):n;for(var r=k(arguments,1),o='event handler for "'+t+'"',i=0,a=n.length;iparseInt(this.max)&&kn(a,c[0],c,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return U}};Object.defineProperty(t,"config",e),t.util={warn:st,extend:$,mergeOptions:Mt,defineReactive:At},t.set=Ct,t.delete=kt,t.nextTick=ne,t.observable=function(t){return Et(t),t},t.options=Object.create(null),N.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,$(t.options.components,Pn),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=k(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Mt(this.options,t),this}}(t),jn(t),function(t){N.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&l(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(Sn),Object.defineProperty(Sn.prototype,"$isServer",{get:ot}),Object.defineProperty(Sn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Sn,"FunctionalRenderContext",{value:Le}),Sn.version="2.6.11";var Tn=m("style,class"),Ln=m("input,textarea,option,select,progress"),Rn=m("contenteditable,draggable,spellcheck"),In=m("events,caret,typing,plaintext-only"),Dn=m("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Mn="http://www.w3.org/1999/xlink",Nn=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Fn=function(t){return Nn(t)?t.slice(6,t.length):""},Un=function(t){return null==t||!1===t};function zn(t){for(var e=t.data,n=t,r=t;a(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(e=Vn(r.data,e));for(;a(n=n.parent);)n&&n.data&&(e=Vn(e,n.data));return function(t,e){if(a(t)||a(e))return Bn(t,qn(e));return""}(e.staticClass,e.class)}function Vn(t,e){return{staticClass:Bn(t.staticClass,e.staticClass),class:a(t.class)?[t.class,e.class]:e.class}}function Bn(t,e){return t?e?t+" "+e:t:e||""}function qn(t){return Array.isArray(t)?function(t){for(var e,n="",r=0,o=t.length;r-1?dr(t,e,n):Dn(e)?Un(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Rn(e)?t.setAttribute(e,function(t,e){return Un(e)||"false"===e?"false":"contenteditable"===t&&In(e)?e:"true"}(e,n)):Nn(e)?Un(n)?t.removeAttributeNS(Mn,Fn(e)):t.setAttributeNS(Mn,e,n):dr(t,e,n)}function dr(t,e,n){if(Un(n))t.removeAttribute(e);else{if(X&&!Y&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var hr={create:lr,update:lr};function vr(t,e){var n=e.elm,r=e.data,o=t.data;if(!(i(r.staticClass)&&i(r.class)&&(i(o)||i(o.staticClass)&&i(o.class)))){var c=zn(e),u=n._transitionClasses;a(u)&&(c=Bn(c,qn(u))),c!==n._prevClass&&(n.setAttribute("class",c),n._prevClass=c)}}var yr,mr={create:vr,update:vr};function gr(t,e,n){var r=yr;return function o(){var i=e.apply(null,arguments);null!==i&&xr(t,o,n,r)}}var br=Qt&&!(tt&&Number(tt[1])<=53);function _r(t,e,n,r){if(br){var o=un,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}yr.addEventListener(t,e,nt?{capture:n,passive:r}:n)}function xr(t,e,n,r){(r||yr).removeEventListener(t,e._wrapper||e,n)}function wr(t,e){if(!i(t.data.on)||!i(e.data.on)){var n=e.data.on||{},r=t.data.on||{};yr=e.elm,function(t){if(a(t.__r)){var e=X?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}a(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(n),ce(n,r,_r,xr,gr,e.context),yr=void 0}}var Or,Sr={create:wr,update:wr};function jr(t,e){if(!i(t.data.domProps)||!i(e.data.domProps)){var n,r,o=e.elm,c=t.data.domProps||{},u=e.data.domProps||{};for(n in a(u.__ob__)&&(u=e.data.domProps=$({},u)),c)n in u||(o[n]="");for(n in u){if(r=u[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),r===c[n])continue;1===o.childNodes.length&&o.removeChild(o.childNodes[0])}if("value"===n&&"PROGRESS"!==o.tagName){o._value=r;var s=i(r)?"":String(r);Er(o,s)&&(o.value=s)}else if("innerHTML"===n&&Gn(o.tagName)&&i(o.innerHTML)){(Or=Or||document.createElement("div")).innerHTML=""+r+"";for(var f=Or.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;f.firstChild;)o.appendChild(f.firstChild)}else if(r!==c[n])try{o[n]=r}catch(t){}}}}function Er(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,r=t._vModifiers;if(a(r)){if(r.number)return y(n)!==y(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var Ar={create:jr,update:jr},Cr=w((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function kr(t){var e=$r(t.style);return t.staticStyle?$(t.staticStyle,e):e}function $r(t){return Array.isArray(t)?P(t):"string"==typeof t?Cr(t):t}var Pr,Tr=/^--/,Lr=/\s*!important$/,Rr=function(t,e,n){if(Tr.test(e))t.style.setProperty(e,n);else if(Lr.test(n))t.style.setProperty(A(e),n.replace(Lr,""),"important");else{var r=Dr(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(Fr).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function zr(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(Fr).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function Vr(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&$(e,Br(t.name||"v")),$(e,t),e}return"string"==typeof t?Br(t):void 0}}var Br=w((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),qr=W&&!Y,Hr="transition",Wr="transitionend",Gr="animation",Qr="animationend";qr&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Hr="WebkitTransition",Wr="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Gr="WebkitAnimation",Qr="webkitAnimationEnd"));var Kr=W?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Xr(t){Kr((function(){Kr(t)}))}function Yr(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),Ur(t,e))}function Jr(t,e){t._transitionClasses&&b(t._transitionClasses,e),zr(t,e)}function Zr(t,e,n){var r=eo(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var c="transition"===o?Wr:Qr,u=0,s=function(){t.removeEventListener(c,f),n()},f=function(e){e.target===t&&++u>=a&&s()};setTimeout((function(){u0&&(n="transition",f=a,l=i.length):"animation"===e?s>0&&(n="animation",f=s,l=u.length):l=(n=(f=Math.max(a,s))>0?a>s?"transition":"animation":null)?"transition"===n?i.length:u.length:0,{type:n,timeout:f,propCount:l,hasTransform:"transition"===n&&to.test(r[Hr+"Property"])}}function no(t,e){for(;t.length1}function uo(t,e){!0!==e.data.show&&oo(e)}var so=function(t){var e,n,r={},o=t.modules,s=t.nodeOps;for(e=0;eh?b(t,i(n[m+1])?null:n[m+1].elm,n,d,m,r):d>m&&x(e,p,h)}(p,y,m,n,f):a(m)?(a(t.text)&&s.setTextContent(p,""),b(p,null,m,0,m.length-1,n)):a(y)?x(y,0,y.length-1):a(t.text)&&s.setTextContent(p,""):t.text!==e.text&&s.setTextContent(p,e.text),a(h)&&a(d=h.hook)&&a(d=d.postpatch)&&d(t,e)}}}function j(t,e,n){if(c(n)&&a(t.parent))t.parent.data.pendingInsert=e;else for(var r=0;r-1,a.selected!==i&&(a.selected=i);else if(I(vo(a),r))return void(t.selectedIndex!==c&&(t.selectedIndex=c));o||(t.selectedIndex=-1)}}function ho(t,e){return e.every((function(e){return!I(e,t)}))}function vo(t){return"_value"in t?t._value:t.value}function yo(t){t.target.composing=!0}function mo(t){t.target.composing&&(t.target.composing=!1,go(t.target,"input"))}function go(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function bo(t){return!t.componentInstance||t.data&&t.data.transition?t:bo(t.componentInstance._vnode)}var _o={model:fo,show:{bind:function(t,e,n){var r=e.value,o=(n=bo(n)).data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,oo(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=bo(n)).data&&n.data.transition?(n.data.show=!0,r?oo(n,(function(){t.style.display=t.__vOriginalDisplay})):io(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}}},xo={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function wo(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?wo(He(e.children)):t}function Oo(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var i in o)e[S(i)]=o[i];return e}function So(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var jo=function(t){return t.tag||qe(t)},Eo=function(t){return"show"===t.name},Ao={name:"transition",props:xo,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(jo)).length){0;var r=this.mode;0;var o=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return o;var i=wo(o);if(!i)return o;if(this._leaving)return So(t,o);var a="__transition-"+this._uid+"-";i.key=null==i.key?i.isComment?a+"comment":a+i.tag:u(i.key)?0===String(i.key).indexOf(a)?i.key:a+i.key:i.key;var c=(i.data||(i.data={})).transition=Oo(this),s=this._vnode,f=wo(s);if(i.data.directives&&i.data.directives.some(Eo)&&(i.data.show=!0),f&&f.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(i,f)&&!qe(f)&&(!f.componentInstance||!f.componentInstance._vnode.isComment)){var l=f.data.transition=$({},c);if("out-in"===r)return this._leaving=!0,ue(l,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),So(t,o);if("in-out"===r){if(qe(i))return s;var p,d=function(){p()};ue(c,"afterEnter",d),ue(c,"enterCancelled",d),ue(l,"delayLeave",(function(t){p=t}))}}return o}}},Co=$({tag:String,moveClass:String},xo);function ko(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function $o(t){t.data.newPos=t.elm.getBoundingClientRect()}function Po(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,o=e.top-n.top;if(r||o){t.data.moved=!0;var i=t.elm.style;i.transform=i.WebkitTransform="translate("+r+"px,"+o+"px)",i.transitionDuration="0s"}}delete Co.mode;var To={Transition:Ao,TransitionGroup:{props:Co,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Ye(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=Oo(this),c=0;c-1?Kn[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Kn[t]=/HTMLUnknownElement/.test(e.toString())},$(Sn.options.directives,_o),$(Sn.options.components,To),Sn.prototype.__patch__=W?so:T,Sn.prototype.$mount=function(t,e){return function(t,e,n){var r;return t.$el=e,t.$options.render||(t.$options.render=mt),tn(t,"beforeMount"),r=function(){t._update(t._render(),n)},new dn(t,r,T,{before:function(){t._isMounted&&!t._isDestroyed&&tn(t,"beforeUpdate")}},!0),n=!1,null==t.$vnode&&(t._isMounted=!0,tn(t,"mounted")),t}(this,t=t&&W?function(t){if("string"==typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}(t):void 0,e)},W&&setTimeout((function(){U.devtools&&it&&it.emit("init",Sn)}),0);var Lo=Sn; +/*! + * vue-router v3.3.4 + * (c) 2020 Evan You + * @license MIT + */function Ro(t){return Object.prototype.toString.call(t).indexOf("Error")>-1}function Io(t,e){return Ro(t)&&t._isRouter&&(null==e||t.type===e)}function Do(t,e){for(var n in e)t[n]=e[n];return t}var Mo={name:"RouterView",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,e){var n=e.props,r=e.children,o=e.parent,i=e.data;i.routerView=!0;for(var a=o.$createElement,c=n.name,u=o.$route,s=o._routerViewCache||(o._routerViewCache={}),f=0,l=!1;o&&o._routerRoot!==o;){var p=o.$vnode?o.$vnode.data:{};p.routerView&&f++,p.keepAlive&&o._directInactive&&o._inactive&&(l=!0),o=o.$parent}if(i.routerViewDepth=f,l){var d=s[c],h=d&&d.component;return h?(d.configProps&&No(h,i,d.route,d.configProps),a(h,i,r)):a()}var v=u.matched[f],y=v&&v.components[c];if(!v||!y)return s[c]=null,a();s[c]={component:y},i.registerRouteInstance=function(t,e){var n=v.instances[c];(e&&n!==t||!e&&n===t)&&(v.instances[c]=e)},(i.hook||(i.hook={})).prepatch=function(t,e){v.instances[c]=e.componentInstance},i.hook.init=function(t){t.data.keepAlive&&t.componentInstance&&t.componentInstance!==v.instances[c]&&(v.instances[c]=t.componentInstance)};var m=v.props&&v.props[c];return m&&(Do(s[c],{route:u,configProps:m}),No(y,i,u,m)),a(y,i,r)}};function No(t,e,n,r){var o=e.props=function(t,e){switch(typeof e){case"undefined":return;case"object":return e;case"function":return e(t);case"boolean":return e?t.params:void 0;default:0}}(n,r);if(o){o=e.props=Do({},o);var i=e.attrs=e.attrs||{};for(var a in o)t.props&&a in t.props||(i[a]=o[a],delete o[a])}}var Fo=/[!'()*]/g,Uo=function(t){return"%"+t.charCodeAt(0).toString(16)},zo=/%2C/g,Vo=function(t){return encodeURIComponent(t).replace(Fo,Uo).replace(zo,",")},Bo=decodeURIComponent;function qo(t){var e={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach((function(t){var n=t.replace(/\+/g," ").split("="),r=Bo(n.shift()),o=n.length>0?Bo(n.join("=")):null;void 0===e[r]?e[r]=o:Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]})),e):e}function Ho(t){var e=t?Object.keys(t).map((function(e){var n=t[e];if(void 0===n)return"";if(null===n)return Vo(e);if(Array.isArray(n)){var r=[];return n.forEach((function(t){void 0!==t&&(null===t?r.push(Vo(e)):r.push(Vo(e)+"="+Vo(t)))})),r.join("&")}return Vo(e)+"="+Vo(n)})).filter((function(t){return t.length>0})).join("&"):null;return e?"?"+e:""}var Wo=/\/?$/;function Go(t,e,n,r){var o=r&&r.options.stringifyQuery,i=e.query||{};try{i=Qo(i)}catch(t){}var a={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:i,params:e.params||{},fullPath:Yo(e,o),matched:t?Xo(t):[]};return n&&(a.redirectedFrom=Yo(n,o)),Object.freeze(a)}function Qo(t){if(Array.isArray(t))return t.map(Qo);if(t&&"object"==typeof t){var e={};for(var n in t)e[n]=Qo(t[n]);return e}return t}var Ko=Go(null,{path:"/"});function Xo(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function Yo(t,e){var n=t.path,r=t.query;void 0===r&&(r={});var o=t.hash;return void 0===o&&(o=""),(n||"/")+(e||Ho)(r)+o}function Jo(t,e){return e===Ko?t===e:!!e&&(t.path&&e.path?t.path.replace(Wo,"")===e.path.replace(Wo,"")&&t.hash===e.hash&&Zo(t.query,e.query):!(!t.name||!e.name)&&(t.name===e.name&&t.hash===e.hash&&Zo(t.query,e.query)&&Zo(t.params,e.params)))}function Zo(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every((function(n){var r=t[n],o=e[n];return"object"==typeof r&&"object"==typeof o?Zo(r,o):String(r)===String(o)}))}function ti(t,e,n){var r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return e+t;var o=e.split("/");n&&o[o.length-1]||o.pop();for(var i=t.replace(/^\//,"").split("/"),a=0;a=0&&(e=t.slice(r),t=t.slice(0,r));var o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}(o.path||""),s=e&&e.path||"/",f=u.path?ti(u.path,s,n||o.append):s,l=function(t,e,n){void 0===e&&(e={});var r,o=n||qo;try{r=o(t||"")}catch(t){r={}}for(var i in e)r[i]=e[i];return r}(u.query,o.query,r&&r.options.parseQuery),p=o.hash||u.hash;return p&&"#"!==p.charAt(0)&&(p="#"+p),{_normalized:!0,path:f,query:l,hash:p}}var xi,wi=function(){},Oi={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(t){var e=this,n=this.$router,r=this.$route,o=n.resolve(this.to,r,this.append),i=o.location,a=o.route,c=o.href,u={},s=n.options.linkActiveClass,f=n.options.linkExactActiveClass,l=null==s?"router-link-active":s,p=null==f?"router-link-exact-active":f,d=null==this.activeClass?l:this.activeClass,h=null==this.exactActiveClass?p:this.exactActiveClass,v=a.redirectedFrom?Go(null,_i(a.redirectedFrom),null,n):a;u[h]=Jo(r,v),u[d]=this.exact?u[h]:function(t,e){return 0===t.path.replace(Wo,"/").indexOf(e.path.replace(Wo,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var n in e)if(!(n in t))return!1;return!0}(t.query,e.query)}(r,v);var y=u[h]?this.ariaCurrentValue:null,m=function(t){Si(t)&&(e.replace?n.replace(i,wi):n.push(i,wi))},g={click:Si};Array.isArray(this.event)?this.event.forEach((function(t){g[t]=m})):g[this.event]=m;var b={class:u},_=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:c,route:a,navigate:m,isActive:u[d],isExactActive:u[h]});if(_){if(1===_.length)return _[0];if(_.length>1||!_.length)return 0===_.length?t():t("span",{},_)}if("a"===this.tag)b.on=g,b.attrs={href:c,"aria-current":y};else{var x=function t(e){var n;if(e)for(var r=0;r-1&&(c.params[p]=n.params[p]);return c.path=bi(f.path,c.params),u(f,c,a)}if(c.path){c.params={};for(var d=0;d=t.length?n():t[o]?e(t[o],(function(){r(o+1)})):r(o+1)};r(0)}function Xi(t){return function(e,n,r){var o=!1,i=0,a=null;Yi(t,(function(t,e,n,c){if("function"==typeof t&&void 0===t.cid){o=!0,i++;var u,s=ta((function(e){var o;((o=e).__esModule||Zi&&"Module"===o[Symbol.toStringTag])&&(e=e.default),t.resolved="function"==typeof e?e:xi.extend(e),n.components[c]=e,--i<=0&&r()})),f=ta((function(t){var e="Failed to resolve async component "+c+": "+t;a||(a=Ro(t)?t:new Error(e),r(a))}));try{u=t(s,f)}catch(t){f(t)}if(u)if("function"==typeof u.then)u.then(s,f);else{var l=u.component;l&&"function"==typeof l.then&&l.then(s,f)}}})),o||r()}}function Yi(t,e){return Ji(t.map((function(t){return Object.keys(t.components).map((function(n){return e(t.components[n],t.instances[n],t,n)}))})))}function Ji(t){return Array.prototype.concat.apply([],t)}var Zi="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function ta(t){var e=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}var ea=1,na=2,ra=3,oa=4;function ia(t,e){return ca(t,e,ea,'Redirected when going from "'+t.fullPath+'" to "'+function(t){if("string"==typeof t)return t;if("path"in t)return t.path;var e={};return ua.forEach((function(n){n in t&&(e[n]=t[n])})),JSON.stringify(e,null,2)}(e)+'" via a navigation guard.')}function aa(t,e){return ca(t,e,ra,'Navigation cancelled from "'+t.fullPath+'" to "'+e.fullPath+'" with a new navigation.')}function ca(t,e,n,r){var o=new Error(r);return o._isRouter=!0,o.from=t,o.to=e,o.type=n,o}var ua=["params","query","hash"];var sa=function(t,e){this.router=t,this.base=function(t){if(!t)if(ji){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";"/"!==t.charAt(0)&&(t="/"+t);return t.replace(/\/$/,"")}(e),this.current=Ko,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function fa(t,e,n,r){var o=Yi(t,(function(t,r,o,i){var a=function(t,e){"function"!=typeof t&&(t=xi.extend(t));return t.options[e]}(t,e);if(a)return Array.isArray(a)?a.map((function(t){return n(t,r,o,i)})):n(a,r,o,i)}));return Ji(r?o.reverse():o)}function la(t,e){if(e)return function(){return t.apply(e,arguments)}}sa.prototype.listen=function(t){this.cb=t},sa.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},sa.prototype.onError=function(t){this.errorCbs.push(t)},sa.prototype.transitionTo=function(t,e,n){var r=this,o=this.router.match(t,this.current);this.confirmTransition(o,(function(){var t=r.current;r.updateRoute(o),e&&e(o),r.ensureURL(),r.router.afterHooks.forEach((function(e){e&&e(o,t)})),r.ready||(r.ready=!0,r.readyCbs.forEach((function(t){t(o)})))}),(function(t){n&&n(t),t&&!r.ready&&(r.ready=!0,Io(t,ea)?r.readyCbs.forEach((function(t){t(o)})):r.readyErrorCbs.forEach((function(e){e(t)})))}))},sa.prototype.confirmTransition=function(t,e,n){var r,o=this,i=this.current,a=function(t){!Io(t)&&Ro(t)&&(o.errorCbs.length?o.errorCbs.forEach((function(e){e(t)})):console.error(t)),n&&n(t)},c=t.matched.length-1,u=i.matched.length-1;if(Jo(t,i)&&c===u&&t.matched[c]===i.matched[u])return this.ensureURL(),a(ca(r=i,t,oa,'Avoided redundant navigation to current location: "'+r.fullPath+'".'));var s=function(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n0)){var e=this.router,n=e.options.scrollBehavior,r=Wi&&n;r&&this.listeners.push(Di());var o=function(){var n=t.current,o=da(t.base);t.current===Ko&&o===t._startLocation||t.transitionTo(o,(function(t){r&&Mi(e,t,n,!0)}))};window.addEventListener("popstate",o),this.listeners.push((function(){window.removeEventListener("popstate",o)}))}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){Gi(ei(r.base+t.fullPath)),Mi(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){Qi(ei(r.base+t.fullPath)),Mi(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.ensureURL=function(t){if(da(this.base)!==this.current.fullPath){var e=ei(this.base+this.current.fullPath);t?Gi(e):Qi(e)}},e.prototype.getCurrentLocation=function(){return da(this.base)},e}(sa);function da(t){var e=decodeURI(window.location.pathname);return t&&0===e.toLowerCase().indexOf(t.toLowerCase())&&(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var ha=function(t){function e(e,n,r){t.call(this,e,n),r&&function(t){var e=da(t);if(!/^\/#/.test(e))return window.location.replace(ei(t+"/#"+e)),!0}(this.base)||va()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router.options.scrollBehavior,n=Wi&&e;n&&this.listeners.push(Di());var r=function(){var e=t.current;va()&&t.transitionTo(ya(),(function(r){n&&Mi(t.router,r,e,!0),Wi||ba(r.fullPath)}))},o=Wi?"popstate":"hashchange";window.addEventListener(o,r),this.listeners.push((function(){window.removeEventListener(o,r)}))}},e.prototype.push=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){ga(t.fullPath),Mi(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){ba(t.fullPath),Mi(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;ya()!==e&&(t?ga(e):ba(e))},e.prototype.getCurrentLocation=function(){return ya()},e}(sa);function va(){var t=ya();return"/"===t.charAt(0)||(ba("/"+t),!1)}function ya(){var t=window.location.href,e=t.indexOf("#");if(e<0)return"";var n=(t=t.slice(e+1)).indexOf("?");if(n<0){var r=t.indexOf("#");t=r>-1?decodeURI(t.slice(0,r))+t.slice(r):decodeURI(t)}else t=decodeURI(t.slice(0,n))+t.slice(n);return t}function ma(t){var e=window.location.href,n=e.indexOf("#");return(n>=0?e.slice(0,n):e)+"#"+t}function ga(t){Wi?Gi(ma(t)):window.location.hash=t}function ba(t){Wi?Qi(ma(t)):window.location.replace(ma(t))}var _a=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)}),n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){e.index=n,e.updateRoute(r)}),(function(t){Io(t,oa)&&(e.index=n)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(sa),xa=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=Ci(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!Wi&&!1!==t.fallback,this.fallback&&(e="hash"),ji||(e="abstract"),this.mode=e,e){case"history":this.history=new pa(this,t.base);break;case"hash":this.history=new ha(this,t.base,this.fallback);break;case"abstract":this.history=new _a(this,t.base);break;default:0}},wa={currentRoute:{configurable:!0}};function Oa(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}xa.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},wa.currentRoute.get=function(){return this.history&&this.history.current},xa.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",(function(){var n=e.apps.indexOf(t);n>-1&&e.apps.splice(n,1),e.app===t&&(e.app=e.apps[0]||null),e.app||e.history.teardownListeners()})),!this.app){this.app=t;var n=this.history;if(n instanceof pa||n instanceof ha){var r=function(){n.setupListeners()};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen((function(t){e.apps.forEach((function(e){e._route=t}))}))}},xa.prototype.beforeEach=function(t){return Oa(this.beforeHooks,t)},xa.prototype.beforeResolve=function(t){return Oa(this.resolveHooks,t)},xa.prototype.afterEach=function(t){return Oa(this.afterHooks,t)},xa.prototype.onReady=function(t,e){this.history.onReady(t,e)},xa.prototype.onError=function(t){this.history.onError(t)},xa.prototype.push=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.push(t,e,n)}));this.history.push(t,e,n)},xa.prototype.replace=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.replace(t,e,n)}));this.history.replace(t,e,n)},xa.prototype.go=function(t){this.history.go(t)},xa.prototype.back=function(){this.go(-1)},xa.prototype.forward=function(){this.go(1)},xa.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},xa.prototype.resolve=function(t,e,n){var r=_i(t,e=e||this.history.current,n,this),o=this.match(r,e),i=o.redirectedFrom||o.fullPath;return{location:r,route:o,href:function(t,e,n){var r="hash"===n?"#"+e:e;return t?ei(t+"/"+r):r}(this.history.base,i,this.mode),normalizedTo:r,resolved:o}},xa.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==Ko&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(xa.prototype,wa),xa.install=function t(e){if(!t.installed||xi!==e){t.installed=!0,xi=e;var n=function(t){return void 0!==t},r=function(t,e){var r=t.$options._parentVnode;n(r)&&n(r=r.data)&&n(r=r.registerRouteInstance)&&r(t,e)};e.mixin({beforeCreate:function(){n(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),e.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(e.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(e.prototype,"$route",{get:function(){return this._routerRoot._route}}),e.component("RouterView",Mo),e.component("RouterLink",Oi);var o=e.config.optionMergeStrategies;o.beforeRouteEnter=o.beforeRouteLeave=o.beforeRouteUpdate=o.created}},xa.version="3.3.4",ji&&window.Vue&&window.Vue.use(xa);var Sa=xa;n(98),n(182),n(207),n(190),n(140),n(101),n(174),n(99);function ja(t){t.locales&&Object.keys(t.locales).forEach((function(e){t.locales[e].path=e})),Object.freeze(t)}n(175),n(43),n(185),n(70),n(65);var Ea=n(39),Aa={NotFound:function(){return n.e(17).then(n.bind(null,401))},Layout:function(){return Promise.all([n.e(0),n.e(4)]).then(n.bind(null,400))}},Ca={"v-2cc6791b":function(){return n.e(19).then(n.bind(null,403))},"v-6936a70a":function(){return n.e(22).then(n.bind(null,404))},"v-d6cf5dc0":function(){return n.e(18).then(n.bind(null,405))},"v-dc45acbe":function(){return n.e(21).then(n.bind(null,406))},"v-981f522a":function(){return n.e(20).then(n.bind(null,407))},"v-cd49acce":function(){return n.e(23).then(n.bind(null,408))},"v-7a69ebfb":function(){return n.e(24).then(n.bind(null,409))},"v-82b0023a":function(){return n.e(25).then(n.bind(null,410))},"v-29bccb9e":function(){return n.e(29).then(n.bind(null,411))},"v-4d872625":function(){return n.e(26).then(n.bind(null,412))},"v-a13085fa":function(){return n.e(28).then(n.bind(null,413))},"v-45878c73":function(){return n.e(27).then(n.bind(null,414))},"v-b8546b76":function(){return n.e(30).then(n.bind(null,415))},"v-7844b977":function(){return n.e(31).then(n.bind(null,416))},"v-03aad3ca":function(){return n.e(32).then(n.bind(null,417))},"v-fec6fb32":function(){return n.e(33).then(n.bind(null,418))},"v-6f4f7086":function(){return n.e(34).then(n.bind(null,419))}};function ka(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var $a=/-(\w)/g,Pa=ka((function(t){return t.replace($a,(function(t,e){return e?e.toUpperCase():""}))})),Ta=/\B([A-Z])/g,La=ka((function(t){return t.replace(Ta,"-$1").toLowerCase()})),Ra=ka((function(t){return t.charAt(0).toUpperCase()+t.slice(1)}));function Ia(t,e){if(e)return t(e)?t(e):e.includes("-")?t(Ra(Pa(e))):t(Ra(e))||t(La(e))}var Da=Object.assign({},Aa,Ca),Ma=function(t){return Da[t]},Na=function(t){return Ca[t]},Fa=function(t){return Aa[t]},Ua=function(t){return Lo.component(t)};function za(t){return Ia(Na,t)}function Va(t){return Ia(Fa,t)}function Ba(t){return Ia(Ma,t)}function qa(t){return Ia(Ua,t)}function Ha(){for(var t=arguments.length,e=new Array(t),n=0;n"})).join("\n "):""}var e},mounted:function(){this.currentMetaTags=Object(Ea.a)(document.querySelectorAll("meta")),this.updateMeta()},methods:{updateMeta:function(){document.title=this.$title,document.documentElement.lang=this.$lang;var t=this.getMergedMetaTags();this.currentMetaTags=Ya(t,this.currentMetaTags)},getMergedMetaTags:function(){var t=this.$page.frontmatter.meta||[];return Ka()([{name:"description",content:this.$description}],t,this.siteMeta,Ja)}},watch:{$page:function(){this.updateMeta()}},beforeDestroy:function(){Ya(null,this.currentMetaTags)}};function Ya(t,e){if(e&&Object(Ea.a)(e).filter((function(t){return t.parentNode===document.head})).forEach((function(t){return document.head.removeChild(t)})),t)return t.map((function(t){var e=document.createElement("meta");return Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])})),document.head.appendChild(e),e}))}function Ja(t){for(var e=0,n=["name","property","itemprop"];e=c.parentElement.offsetTop+10&&(!u||r0}var bc={props:{pageKey:String,slotKey:{type:String,default:"default"}},render:function(t){var e=this.pageKey||this.$parent.$page.key;return Wa("pageKey",e),Lo.component(e)||Lo.component(e,za(e)),Lo.component(e)?t(e):t("")}},_c={functional:!0,props:{slotKey:String,required:!0},render:function(t,e){var n=e.props,r=e.slots;return t("div",{class:["content__".concat(n.slotKey)]},r()[n.slotKey])}},xc=(n(305),Object(ic.a)({},(function(t,e){var n=e._c;return n("svg",{staticClass:"icon outbound",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",x:"0px",y:"0px",viewBox:"0 0 100 100",width:"15",height:"15"}},[n("path",{attrs:{fill:"currentColor",d:"M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"}}),e._v(" "),n("polygon",{attrs:{fill:"currentColor",points:"45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"}})])}),[],!0,null,null,null).exports);function wc(){return(wc=Object(r.a)(regeneratorRuntime.mark((function t(e){var n,r,o,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="undefined"!=typeof window&&window.__VUEPRESS_ROUTER_BASE__?window.__VUEPRESS_ROUTER_BASE__:uc.routerBase||uc.base,mc(r=new Sa({base:n,mode:"history",fallback:!1,routes:cc,scrollBehavior:function(t,e,n){return n||(t.hash?!Lo.$vuepress.$get("disableScrollBehavior")&&{selector:t.hash}:{x:0,y:0})}})),o={},t.prev=4,t.next=7,Promise.all(sc.filter((function(t){return"function"==typeof t})).map((function(t){return t({Vue:Lo,options:o,router:r,siteData:uc,isServer:e})})));case 7:t.next=12;break;case 9:t.prev=9,t.t0=t.catch(4),console.error(t.t0);case 12:return i=new Lo(Object.assign(o,{router:r,render:function(t){return t("div",{attrs:{id:"app"}},[t("RouterView",{ref:"layout"}),t("div",{class:"global-ui"},fc.map((function(e){return t(e)})))])}})),t.abrupt("return",{app:i,router:r});case 14:case"end":return t.stop()}}),t,null,[[4,9]])})))).apply(this,arguments)}Lo.config.productionTip=!1,Lo.use(Sa),Lo.use(yc),Lo.mixin(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Lo;ja(e),n.$vuepress.$set("siteData",e);var r=t(n.$vuepress.$get("siteData")),o=new r,i=Object.getOwnPropertyDescriptors(Object.getPrototypeOf(o)),a={};return Object.keys(i).reduce((function(t,e){return e.startsWith("$")&&(t[e]=i[e].get),t}),a),{computed:a}}((function(t){return function(){function e(){Object(lc.a)(this,e)}return Object(pc.a)(e,[{key:"setPage",value:function(t){this.__page=t}},{key:"$site",get:function(){return t}},{key:"$themeConfig",get:function(){return this.$site.themeConfig}},{key:"$frontmatter",get:function(){return this.$page.frontmatter}},{key:"$localeConfig",get:function(){var t,e,n=this.$site.locales,r=void 0===n?{}:n;for(var o in r)"/"===o?e=r[o]:0===this.$page.path.indexOf(o)&&(t=r[o]);return t||e||{}}},{key:"$siteTitle",get:function(){return this.$localeConfig.title||this.$site.title||""}},{key:"$title",get:function(){var t=this.$page,e=this.$page.frontmatter.metaTitle;if("string"==typeof e)return e;var n=this.$siteTitle,r=t.frontmatter.home?null:t.frontmatter.title||t.title;return n?r?r+" | "+n:n:r||"VuePress"}},{key:"$description",get:function(){var t=function(t){if(t){var e=t.filter((function(t){return"description"===t.name}))[0];if(e)return e.content}}(this.$page.frontmatter.meta);return t||(this.$page.frontmatter.description||this.$localeConfig.description||this.$site.description||"")}},{key:"$lang",get:function(){return this.$page.frontmatter.lang||this.$localeConfig.lang||"en-US"}},{key:"$localePath",get:function(){return this.$localeConfig.path||"/"}},{key:"$themeLocaleConfig",get:function(){return(this.$site.themeConfig.locales||{})[this.$localePath]||{}}},{key:"$page",get:function(){return this.__page?this.__page:function(t,e){for(var n=0;n \ No newline at end of file diff --git a/docs/.vuepress/dist/demos/CustomTracking.html b/docs/.vuepress/dist/demos/CustomTracking.html new file mode 100644 index 00000000..34ae333e --- /dev/null +++ b/docs/.vuepress/dist/demos/CustomTracking.html @@ -0,0 +1,140 @@ + + + + + + Customize Tracking | Vue Qrcode Reader + + + + + + + +

# Customize Tracking

You don't like the red square around detected QR codes? +No problem, you can also completely customize how visual tracking should look like!

Also check out the None option. +Frames are scanned less frequently if tracking is disabled. +So this a way to improve performance for your target devices.

# Source

<template>
+  <div>
+    <p>
+      Track function:
+      <select v-model="selected">
+        <option v-for="option in options" :value="option">
+          {{ option.text }}
+        </option>
+      </select>
+    </p>
+
+    <p class="decode-result">
+      Last result: <b>{{ result }}</b>
+    </p>
+
+    <qrcode-stream :key="_uid" :track="selected.value" @decode="onDecode" @init="logErrors" />
+  </div>
+</template>
+
+<script>
+import { QrcodeStream } from '../../../../src'
+
+export default {
+
+  components: { QrcodeStream },
+
+  data () {
+    const options = [
+      { text: "None", value: false },
+      { text: "Red square (default)", value: true },
+      { text: "Green text", value: this.paintGreenText },
+      { text: "Blue dots", value: this.paintBlueDots },
+    ]
+
+    const selected = options[2]
+
+    return { selected, options, result: null }
+  },
+
+  methods: {
+    paintBlueDots (location, ctx) {
+      const {
+        topLeftFinderPattern,
+        topRightFinderPattern,
+        bottomLeftFinderPattern
+      } = location
+
+      const pointArray = [
+        topLeftFinderPattern,
+        topRightFinderPattern,
+        bottomLeftFinderPattern
+      ]
+
+      ctx.fillStyle = '#007bff'
+
+      pointArray.forEach(({ x, y }) => {
+        ctx.fillRect(x - 5, y - 5, 10, 10)
+      })
+    },
+
+    paintGreenText (location, ctx) {
+      const {
+        topLeftCorner,
+        topRightCorner,
+        bottomLeftCorner,
+        bottomRightCorner
+      } = location
+
+      const pointArray = [
+        topLeftCorner,
+        topRightCorner,
+        bottomLeftCorner,
+        bottomRightCorner
+      ]
+
+      const centerX = pointArray.reduce((sum, { x }) => x + sum, 0) / 4
+      const centerY = pointArray.reduce((sum, { y }) => y + sum, 0) / 4
+
+      ctx.font = "bold 24px sans-serif"
+      ctx.textAlign = "center"
+
+      ctx.lineWidth = 3
+      ctx.strokeStyle = '#35495e'
+      ctx.strokeText(this.result, centerX, centerY)
+
+      ctx.fillStyle = '#5cb984'
+      ctx.fillText(this.result, centerX, centerY)
+    },
+
+    onDecode (result) {
+      this.result = result
+    },
+
+    logErrors (promise) {
+      promise.catch(console.error)
+    }
+  }
+
+}
+</script>
+
+ + + diff --git a/docs/.vuepress/dist/demos/DecodeAll.html b/docs/.vuepress/dist/demos/DecodeAll.html new file mode 100644 index 00000000..6b1193c9 --- /dev/null +++ b/docs/.vuepress/dist/demos/DecodeAll.html @@ -0,0 +1,96 @@ + + + + + + Decode Continuously | Vue Qrcode Reader + + + + + + + +

# Decode Continuously

Hold a QR code in the camera and see what happens. Note, you can't scan the same +QR code multiple time in a row.

# Source

<template>
+  <div>
+    <p class="error">{{ error }}</p>
+
+    <p class="decode-result">Last result: <b>{{ result }}</b></p>
+
+    <qrcode-stream @decode="onDecode" @init="onInit" />
+  </div>
+</template>
+
+<script>
+import { QrcodeStream } from '../../../../src'
+
+export default {
+
+  components: { QrcodeStream },
+
+  data () {
+    return {
+      result: '',
+      error: ''
+    }
+  },
+
+  methods: {
+    onDecode (result) {
+      this.result = result
+    },
+
+    async onInit (promise) {
+      try {
+        await promise
+      } catch (error) {
+        if (error.name === 'NotAllowedError') {
+          this.error = "ERROR: you need to grant camera access permisson"
+        } else if (error.name === 'NotFoundError') {
+          this.error = "ERROR: no camera on this device"
+        } else if (error.name === 'NotSupportedError') {
+          this.error = "ERROR: secure context required (HTTPS, localhost)"
+        } else if (error.name === 'NotReadableError') {
+          this.error = "ERROR: is the camera already in use?"
+        } else if (error.name === 'OverconstrainedError') {
+          this.error = "ERROR: installed cameras are not suitable"
+        } else if (error.name === 'StreamApiNotSupportedError') {
+          this.error = "ERROR: Stream API is not supported in this browser"
+        }
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+.error {
+  font-weight: bold;
+  color: red;
+}
+</style>
+
+ + + diff --git a/docs/.vuepress/dist/demos/DragDrop.html b/docs/.vuepress/dist/demos/DragDrop.html new file mode 100644 index 00000000..781d822c --- /dev/null +++ b/docs/.vuepress/dist/demos/DragDrop.html @@ -0,0 +1,119 @@ + + + + + + Decode by Drag&Drop | Vue Qrcode Reader + + + + + + + +

# Decode by Drag&Drop

With the QrcodeDropZone component you can also drag-and-drop images that +should be scanned. Use it as a standalone feature or as a fallback for desktop +users.

# Source

<template>
+  <div>
+    <p class="decode-result">Last result: <b>{{ result }}</b></p>
+
+    <p v-if="error !== null" class="drop-error">
+      {{ error }}
+    </p>
+
+    <qrcode-drop-zone @detect="onDetect" @dragover="onDragOver" @init="logErrors">
+      <div class="drop-area" :class="{ 'dragover': dragover }">
+        DROP SOME IMAGES HERE
+      </div>
+    </qrcode-drop-zone>
+  </div>
+</template>
+
+<script>
+import { QrcodeDropZone } from '../../../../src'
+
+export default {
+
+  components: { QrcodeDropZone },
+
+  data () {
+    return {
+      result: null,
+      error: null,
+      dragover: false
+    }
+  },
+
+  methods: {
+    async onDetect (promise) {
+      try {
+        const { content } = await promise
+
+        this.result = content
+        this.error = null
+      } catch (error) {
+        if (error.name === 'DropImageFetchError') {
+          this.error = 'Sorry, you can\'t load cross-origin images :/'
+        } else if (error.name === 'DropImageDecodeError') {
+          this.error = 'Ok, that\'s not an image. That can\'t be decoded.'
+        } else {
+          this.error = 'Ups, what kind of error is this?! ' + error.message
+        }
+      }
+    },
+
+    logErrors (promise) {
+      promise.catch(console.error)
+    },
+
+    onDragOver (isDraggingOver) {
+      this.dragover = isDraggingOver
+    }
+  }
+}
+</script>
+
+<style>
+.drop-area {
+  height: 300px;
+  color: #fff;
+  text-align: center;
+  font-weight: bold;
+  padding: 10px;
+
+  background-color: rgba(0,0,0,.5);
+}
+
+.dragover {
+  background-color: rgba(0,0,0,.8);
+}
+
+.drop-error {
+  color: red;
+  font-weight: bold;
+}
+</style>
+
+ + + diff --git a/docs/.vuepress/dist/demos/Fallback.html b/docs/.vuepress/dist/demos/Fallback.html new file mode 100644 index 00000000..9b9b9fc1 --- /dev/null +++ b/docs/.vuepress/dist/demos/Fallback.html @@ -0,0 +1,82 @@ + + + + + + Fallback for desktop/mobile | Vue Qrcode Reader + + + + + + + +

# Fallback for desktop/mobile

This demo combines all vue-qrcode-reader components to provide +fallbacks for both desktop users without a camera and legacy mobile users +without Stream API support.

# Source

<template>
+  <div>
+    <p class="decode-result">Last result: <b>{{ result }}</b></p>
+
+    <qrcode-drop-zone @decode="onDecode" @init="logErrors">
+      <qrcode-stream @decode="onDecode" @init="onInit" />
+    </qrcode-drop-zone>
+
+    <qrcode-capture v-if="noStreamApiSupport" @decode="onDecode" />
+  </div>
+</template>
+
+<script>
+import { QrcodeStream, QrcodeDropZone, QrcodeCapture } from '../../../../src'
+
+export default {
+
+  components: { QrcodeStream, QrcodeDropZone, QrcodeCapture },
+
+  data () {
+    return {
+      result: '',
+      noStreamApiSupport: false
+    }
+  },
+
+  methods: {
+    onDecode (result) {
+      this.result = result
+    },
+
+    logErrors (promise) {
+      promise.catch(console.error)
+    },
+
+    async onInit (promise) {
+      try {
+        await promise
+      } catch (error) {
+        if (error.name === 'StreamApiNotSupportedError') {
+          this.noStreamApiSupport = true
+        }
+      }
+    }
+  }
+}
+</script>
+
+ + + diff --git a/docs/.vuepress/dist/demos/Fullscreen.html b/docs/.vuepress/dist/demos/Fullscreen.html new file mode 100644 index 00000000..8b9c0c38 --- /dev/null +++ b/docs/.vuepress/dist/demos/Fullscreen.html @@ -0,0 +1,154 @@ + + + + + + Fullscreen | Vue Qrcode Reader + + + + + + + +

# Fullscreen

QrcodeStream always covers the entire space available. +Not more, not less. +So to go fullscreen, simply put the component in a wrapper element that occupies the entire screen.

# Source

<template>
+  <div :class="{ 'fullscreen': fullscreen }" ref="wrapper" @fullscreenchange="onFullscreenChange">
+    <qrcode-stream @init="logErrors">
+      <button @click="fullscreen = !fullscreen" class="fullscreen-button">
+        <img :src="$withBase(fullscreenIcon)" alt="toggle fullscreen" />
+      </button>
+    </qrcode-stream>
+  </div>
+</template>
+
+<script>
+import { QrcodeStream } from '../../../../src'
+
+// NOTE: calling `requestFullscreen` might prompt the user with another
+// permission dialog. You already asked for camera access permission so this is
+// a rather invasive move.
+//
+// Even without calling `requestFullscreen` the entire viewport is covered
+// by the camera stream. So consider skipping `requestFullscreen` in your
+// implementation.
+
+export default {
+
+  components: { QrcodeStream },
+
+  data () {
+    return {
+      fullscreen: false
+    }
+  },
+
+  computed: {
+    fullscreenIcon() {
+      if (this.fullscreen) {
+        return "/fullscreen-exit.svg"
+      } else {
+        return "/fullscreen.svg"
+      }
+    }
+  },
+
+  watch: {
+    fullscreen(enterFullscreen) {
+      if (enterFullscreen) {
+        this.requestFullscreen()
+      } else {
+        this.exitFullscreen()
+      }
+    }
+  },
+
+  methods: {
+    onFullscreenChange(event) {
+      // This becomes important when the user doesn't use the button to exit
+      // fullscreen but hits ESC on desktop, pushes a physical back button on
+      // mobile etc.
+
+      this.fullscreen = document.fullscreenElement !== null
+    },
+
+    requestFullscreen() {
+      const elem = this.$refs.wrapper
+
+      if (elem.requestFullscreen) {
+        elem.requestFullscreen();
+      } else if (elem.mozRequestFullScreen) { /* Firefox */
+        elem.mozRequestFullScreen();
+      } else if (elem.webkitRequestFullscreen) { /* Chrome, Safari and Opera */
+        elem.webkitRequestFullscreen();
+      } else if (elem.msRequestFullscreen) { /* IE/Edge */
+        elem.msRequestFullscreen();
+      }
+    },
+
+    exitFullscreen() {
+      if (document.exitFullscreen) {
+        document.exitFullscreen();
+      } else if (document.mozCancelFullScreen) { /* Firefox */
+        document.mozCancelFullScreen();
+      } else if (document.webkitExitFullscreen) { /* Chrome, Safari and Opera */
+        document.webkitExitFullscreen();
+      } else if (document.msExitFullscreen) { /* IE/Edge */
+        document.msExitFullscreen();
+      }
+    },
+
+    logErrors (promise) {
+      promise.catch(console.error)
+    }
+  }
+
+}
+</script>
+
+<style scoped>
+.fullscreen {
+  position: fixed;
+  z-index: 1000;
+  top: 0;
+  bottom: 0;
+  right: 0;
+  left: 0;
+}
+
+.fullscreen-button {
+  background-color: white;
+  position: absolute;
+  bottom: 0;
+  right: 0;
+  margin: 1rem;
+}
+.fullscreen-button img {
+  width: 2rem;
+}
+</style>
+
+ + + diff --git a/docs/.vuepress/dist/demos/LoadingIndicator.html b/docs/.vuepress/dist/demos/LoadingIndicator.html new file mode 100644 index 00000000..387e9945 --- /dev/null +++ b/docs/.vuepress/dist/demos/LoadingIndicator.html @@ -0,0 +1,99 @@ + + + + + + Show Loading Indicator | Vue Qrcode Reader + + + + + + + +

# Show Loading Indicator

There is some delay between mounting the component and the camera stream +becoming visible. Listen for the init event to show a loading indicator.

Push the button below to force destroy and re-create the component.

# Source

<template>
+  <div>
+    <button @click="reload">Destroy And Re-Create Component</button>
+
+    <qrcode-stream @init="onInit" v-if="!destroyed">
+      <div class="loading-indicator" v-if="loading">
+        Loading...
+      </div>
+    </qrcode-stream>
+  </div>
+</template>
+
+<script>
+import { QrcodeStream } from '../../../../src'
+
+export default {
+
+  components: { QrcodeStream },
+
+  data () {
+    return {
+      loading: false,
+      destroyed: false
+    }
+  },
+
+  methods: {
+    async onInit (promise) {
+      this.loading = true
+
+      try {
+        await promise
+      } catch (error) {
+        console.error(error)
+      } finally {
+        this.loading = false
+      }
+    },
+
+    async reload () {
+      this.destroyed = true
+
+      await this.$nextTick()
+
+      this.destroyed = false
+    }
+  }
+}
+</script>
+
+<style scoped>
+button {
+  margin-bottom: 20px;
+}
+
+.loading-indicator {
+  font-weight: bold;
+  font-size: 2rem;
+  text-align: center;
+}
+</style>
+
+ + + diff --git a/docs/.vuepress/dist/demos/Simple.html b/docs/.vuepress/dist/demos/Simple.html new file mode 100644 index 00000000..52671e2c --- /dev/null +++ b/docs/.vuepress/dist/demos/Simple.html @@ -0,0 +1,34 @@ + + + + + + Simple | Vue Qrcode Reader + + + + + + + + + + + diff --git a/docs/.vuepress/dist/demos/SwitchCamera.html b/docs/.vuepress/dist/demos/SwitchCamera.html new file mode 100644 index 00000000..218e7ae3 --- /dev/null +++ b/docs/.vuepress/dist/demos/SwitchCamera.html @@ -0,0 +1,120 @@ + + + + + + Switch to Front Camera | Vue Qrcode Reader + + + + + + + +

# Switch to Front Camera

You can also allow users to choose the front or rear camera on their +device.

# Source

<template>
+  <div>
+    <p class="error" v-if="noFrontCamera">
+      You don't seem to have a front camera on your device
+    </p>
+
+    <p class="error" v-if="noRearCamera">
+      You don't seem to have a rear camera on your device
+    </p>
+
+    <qrcode-stream :camera="camera" @init="onInit">
+      <button @click="switchCamera">
+        <img :src="$withBase('/camera-switch.svg')" alt="switch camera">
+      </button>
+    </qrcode-stream>
+  </div>
+</template>
+
+<script>
+import { QrcodeStream } from '../../../../src'
+
+export default {
+
+  components: { QrcodeStream },
+
+  data () {
+    return {
+      camera: 'rear',
+
+      noRearCamera: false,
+      noFrontCamera: false
+    }
+  },
+
+  methods: {
+    switchCamera () {
+      switch (this.camera) {
+        case 'front':
+          this.camera = 'rear'
+          break
+        case 'rear':
+          this.camera = 'front'
+          break
+      }
+    },
+
+    async onInit (promise) {
+      try {
+        await promise
+      } catch (error) {
+        const triedFrontCamera = this.camera === 'front'
+        const triedRearCamera = this.camera === 'rear'
+
+        const cameraMissingError = error.name === 'OverconstrainedError'
+
+        if (triedRearCamera && cameraMissingError) {
+          this.noRearCamera = true
+        }
+
+        if (triedFrontCamera && cameraMissingError) {
+          this.noFrontCamera = true
+        }
+
+        console.error(error)
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+button {
+  position: absolute;
+  left: 10px;
+  top: 10px;
+}
+
+.error {
+  color: red;
+  font-weight: bold;
+}
+</style>
+
+ + + diff --git a/docs/.vuepress/dist/demos/Torch.html b/docs/.vuepress/dist/demos/Torch.html new file mode 100644 index 00000000..bc676aa8 --- /dev/null +++ b/docs/.vuepress/dist/demos/Torch.html @@ -0,0 +1,103 @@ + + + + + + Torch (Flashlight) | Vue Qrcode Reader + + + + + + + +

# Torch (Flashlight)

In low-light conditions you might want to make use of the cameras flashlight. +Using the torch prop, you can turn the flashlight on/off. +Note that support is inconsistent across devices and browers.

Feature sponsored by aeschbacher.ch

# Source

<template>
+  <div>
+    <p v-if="torchNotSupported" class="error">
+      Torch not supported for active camera
+    </p>
+
+    <qrcode-stream :torch="torchActive" @init="onInit">
+      <button @click="torchActive = !torchActive" :disabled="torchNotSupported">
+        <img :src="$withBase(icon)" alt="toggle torch">
+      </button>
+    </qrcode-stream>
+  </div>
+</template>
+
+<script>
+import { QrcodeStream } from '../../../../src'
+
+export default {
+
+  components: { QrcodeStream },
+
+  data () {
+    return {
+      torchActive: false,
+      torchNotSupported: false
+    }
+  },
+
+  computed: {
+    icon() {
+      if (this.torchActive)
+        return '/flash-off.svg'
+      else
+        return '/flash-on.svg'
+    }
+  },
+
+  methods: {
+    async onInit (promise) {
+      try {
+        const { capabilities } = await promise
+
+        console.log(capabilities);
+
+        this.torchNotSupported = !capabilities.torch
+      } catch (error) {
+        console.error(error)
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+button {
+  position: absolute;
+  left: 10px;
+  top: 10px;
+}
+.error {
+  color: red;
+  font-weight: bold;
+}
+</style>
+
+ + + diff --git a/docs/.vuepress/dist/demos/Upload.html b/docs/.vuepress/dist/demos/Upload.html new file mode 100644 index 00000000..19d78515 --- /dev/null +++ b/docs/.vuepress/dist/demos/Upload.html @@ -0,0 +1,68 @@ + + + + + + Decode by Upload | Vue Qrcode Reader + + + + + + + +

# Decode by Upload

Finally, with QrcodeCapture comes another component which allows image scanning via classic file upload. +If you are on mobile and your browser supports it, +your are not prompted with a file dialog but with your camera. +So you can directly take the picture to be uploaded.

Note that nothing is actually uploaded. Everything is happening client-side.

# Source

<template>
+  <div>
+    <p class="decode-result">Last result: <b>{{ result }}</b></p>
+
+    <qrcode-capture @decode="onDecode" />
+  </div>
+</template>
+
+<script>
+import { QrcodeCapture } from '../../../../src'
+
+export default {
+
+  components: { QrcodeCapture },
+
+  data () {
+    return {
+      result: ''
+    }
+  },
+
+  methods: {
+    onDecode (result) {
+      this.result = result
+    }
+  }
+}
+</script>
+
+ + + diff --git a/docs/.vuepress/dist/demos/Validate.html b/docs/.vuepress/dist/demos/Validate.html new file mode 100644 index 00000000..d4e57def --- /dev/null +++ b/docs/.vuepress/dist/demos/Validate.html @@ -0,0 +1,157 @@ + + + + + + Pause & Validate | Vue Qrcode Reader + + + + + + + +

# Pause & Validate

By turning off the camera you can process each scanned QR-code one at a time. +The last received frame is still displayed so it just looks like the stream is +paused.

# Source

<template>
+  <div>
+    <p class="decode-result">Last result: <b>{{ result }}</b></p>
+
+    <qrcode-stream :camera="camera" @decode="onDecode" @init="onInit">
+      <div v-if="validationSuccess" class="validation-success">
+        This is a URL
+      </div>
+
+      <div v-if="validationFailure" class="validation-failure">
+        This is NOT a URL!
+      </div>
+
+      <div v-if="validationPending" class="validation-pending">
+        Long validation in progress...
+      </div>
+    </qrcode-stream>
+  </div>
+</template>
+
+<script>
+import { QrcodeStream } from '../../../../src'
+
+export default {
+
+  components: { QrcodeStream },
+
+  data () {
+    return {
+      isValid: undefined,
+      camera: 'auto',
+      result: null,
+    }
+  },
+
+  computed: {
+    validationPending () {
+      return this.isValid === undefined
+        && this.camera === 'off'
+    },
+
+    validationSuccess () {
+      return this.isValid === true
+    },
+
+    validationFailure () {
+      return this.isValid === false
+    }
+  },
+
+  methods: {
+
+    onInit (promise) {
+      promise
+        .catch(console.error)
+        .then(this.resetValidationState)
+    },
+
+    resetValidationState () {
+      this.isValid = undefined
+    },
+
+    async onDecode (content) {
+      this.result = content
+      this.turnCameraOff()
+
+      // pretend it's taking really long
+      await this.timeout(3000)
+      this.isValid = content.startsWith('http')
+
+      // some more delay, so users have time to read the message
+      await this.timeout(2000)
+
+      this.turnCameraOn()
+    },
+
+    turnCameraOn () {
+      this.camera = 'auto'
+    },
+
+    turnCameraOff () {
+      this.camera = 'off'
+    },
+
+    timeout (ms) {
+      return new Promise(resolve => {
+        window.setTimeout(resolve, ms)
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+.validation-success,
+.validation-failure,
+.validation-pending {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+
+  background-color: rgba(255, 255, 255, .8);
+  text-align: center;
+  font-weight: bold;
+  font-size: 1.4rem;
+  padding: 10px;
+
+  display: flex;
+  flex-flow: column nowrap;
+  justify-content: center;
+}
+.validation-success {
+  color: green;
+}
+.validation-failure {
+  color: red;
+}
+</style>
+
+ + + diff --git a/docs/.vuepress/dist/demos/index.html b/docs/.vuepress/dist/demos/index.html new file mode 100644 index 00000000..f809f8a6 --- /dev/null +++ b/docs/.vuepress/dist/demos/index.html @@ -0,0 +1,29 @@ + + + + + + Vue Qrcode Reader + + + + + + + + + + + diff --git a/docs/.vuepress/dist/flash-off.svg b/docs/.vuepress/dist/flash-off.svg new file mode 100644 index 00000000..2d34c96f --- /dev/null +++ b/docs/.vuepress/dist/flash-off.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/.vuepress/dist/flash-on.svg b/docs/.vuepress/dist/flash-on.svg new file mode 100644 index 00000000..9d0d023a --- /dev/null +++ b/docs/.vuepress/dist/flash-on.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/.vuepress/dist/fullscreen-exit.svg b/docs/.vuepress/dist/fullscreen-exit.svg new file mode 100644 index 00000000..85e2eaaa --- /dev/null +++ b/docs/.vuepress/dist/fullscreen-exit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/.vuepress/dist/fullscreen.svg b/docs/.vuepress/dist/fullscreen.svg new file mode 100644 index 00000000..08d4f2cf --- /dev/null +++ b/docs/.vuepress/dist/fullscreen.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/.vuepress/dist/index.html b/docs/.vuepress/dist/index.html new file mode 100644 index 00000000..18ff0e64 --- /dev/null +++ b/docs/.vuepress/dist/index.html @@ -0,0 +1,37 @@ + + + + + + Vue Qrcode Reader + + + + + + + +
hero

+ Vue Qrcode Reader +

+ A set of Vue.js components for detecting and decoding QR codes. +

+ See Demos → +

+ + + diff --git a/docs/.vuepress/dist/logo.png b/docs/.vuepress/dist/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..bbd815d01af0fdd664c8272090b5b6308163a55e GIT binary patch literal 22337 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 AXaE2J literal 0 HcmV?d00001 diff --git a/docs/.vuepress/public/camera-switch.svg b/docs/.vuepress/public/camera-switch.svg new file mode 100644 index 00000000..aee2cd71 --- /dev/null +++ b/docs/.vuepress/public/camera-switch.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/.vuepress/public/flash-off.svg b/docs/.vuepress/public/flash-off.svg new file mode 100644 index 00000000..2d34c96f --- /dev/null +++ b/docs/.vuepress/public/flash-off.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/.vuepress/public/flash-on.svg b/docs/.vuepress/public/flash-on.svg new file mode 100644 index 00000000..9d0d023a --- /dev/null +++ b/docs/.vuepress/public/flash-on.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/.vuepress/public/fullscreen-exit.svg b/docs/.vuepress/public/fullscreen-exit.svg new file mode 100644 index 00000000..85e2eaaa --- /dev/null +++ b/docs/.vuepress/public/fullscreen-exit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/.vuepress/public/fullscreen.svg b/docs/.vuepress/public/fullscreen.svg new file mode 100644 index 00000000..08d4f2cf --- /dev/null +++ b/docs/.vuepress/public/fullscreen.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/.vuepress/public/logo.png b/docs/.vuepress/public/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..bbd815d01af0fdd664c8272090b5b6308163a55e GIT binary patch literal 22337 zcmb5W2|Sd2+c&NvMW~Q1q=ZHY*~3Ma?CTi&$dYC3`!*Cw_Uzf0v5sMELv|5Dc4jiR zB>TQ+H2hE3`@GNn-0%N=p7*{#eI}j5m^sh$_dAa7b`+tlsZ2$|OhH0ILZ$LTL6?N& zvf;(!+Ew70)>j{=fiG7r)sz)T&M*GtwiG7<&s=wXVdMe40(bGaB+rxK3p`2gsiL7s z{`30v8~pcXg*Sm;b&o_vK~CQnzcJ(YiQC9*`D93f`+iXWjQbD@KIg*|X=Y7-lkTQ{ z7k1Z;?Mq?!r7EYY!?bL-@mo`?yJ^KvIwm@|HcJg|*_e_TJ?6pYBXc8-t3j|lr2A0w zluN{7=E;JOi>~D5<1YfjK_~sEK@-m}4JEog`1vKmL&oj?UXaE$j%&aNAsJ=ZYK8<8-n12R6n*WzVc2}1l;j893!?`7I4d*0zPi6)EKoG*s+5pYsg zq1BHkmfJkzwi=HwU0l=O=S{omyq*gpkl~y0^21EGDt#4!8=%SJr;~YWS?=Pj?^#?T zA-VaV=k;$L{(bNM@!Eg?@bCMs8Tporai|`?!Z7a5MCF#gmfBD;<=q;zxWqmzk1doF z{juVzD7zPTZq(oP*WlCr8?UTA?J7&={LkXnQnFH=kViqMwn0!IHn>9C%x~AbbOra| zLyAKqab_oxrIK@9&BZ?O`MASHL|kd&6YuPbtKbT)pk;y4o1~~-`zCd#)X|&895tf1 z3b8R~G@{ead>KerFyd0#rmj)V$(;$|^>J_e^4H16Qpv23F`Ap4;GRN?X?OAGyOB3- zQLaCs?_H#rok4`-q#Tl#8~?&JxO_(gSVe#R$Ho81CWjamA$d(GQ55fuc>ETVz^VRf z&Y`jXov4GVSZ}Q{b*p5@&|Z_U#t2mh0sgRg7E4-&B(VBCj}$+~CZl)W5z^A~EY#>c#fr4Cxs2YK2j_QALqUCuV4oI|KKh&)p; zHzN)b*++C|r|7go8U!%KEsAZY9qbS>dqo%75{j17Et-}2#ZZSyYlosXWdrKf`mNJ| zays}!?}ajN@J_l0zR_mcMvuOdb2Unt4SRYNBu_+s5N0_y=6subf|81VO;7hU(feSu zredr?cuN0?chDI5@21#i`9o~}+R13c-uo6#39k$9@ggohA|xk(mTHf0!wip}qLIm6 zydIW0&ZX+)-c6&uZkyVu(Bf{$YjN0@*BtUKiSMx?lMS}q3|60KVaJ)AXKbR8)^Yv2 zVWFrFQ^;*AvAge-%e)iQB;~KIHKw!@Q83TdKWtZfsDA&+YXRZR8A4uTu1BZT0Y&8F zeSKPDcFzl;R~~_zFEz1G9E)~R0`UzQ?~f$)LNF2EEfQ>5>GVmv2V)oq1Ov-N8_30g zb@Fd)FJH-hfjaYbl`-v7Dw0c4DpJ0z8v+_eyYsouqobzyNqw9HN5+UFK841dMN3L< z(2#W~U@f`Rn1j0}qRwZT?*6{&yxOMSP=A_#)YPD%lgrTR^du{A$8@H=O_6m24)uqX zAWzRv_Zf6P8Bzex8{e(y>yL}n{27fgJ-}_1t~LyEkZ!Jh>t{9>zg6kl2fY0%6+67X zF`o82XD67xdDeHt<1i7@;;v_k0Qq_)sJk?;Nca=UhRi7qS!`n_wqZ%1O$Meu z3$*g{yk?k1)0R^sS;m&RTY6HqkFCvGHrF7$JmW^SEU?=R`zsF!BU7^ov(1wdugcuq zFNPRL&6v*cy?x>@Z73}6>lfBI*3Nj!TIP~{&2~V`e9&-!Gp$htW{GBY^Y3@ecOFd; z@kW|oXE87+z8weqzqc;etKxbxtK9!wkN>HjxE3*%J&9u?mOrA!^!j`Cxt+IyvvMpI z=I{J4LEPbRjbu#2#EI|!BR*lZG0T1RvH zCeZE=yOlPjY7R7Bza~?Ep*>tR9|;tLiL$*CCn^3h%h@qbhh~G%>k$)(z0YN(SDwIV z&n9P_*3?yQ?W4(KbCn^~FfOMoo~;%gvs8N%m_h2`w$ANa#vvhe1y1D+_@0&z11lYq zSx`A76x5VU?wHOAD3Cdb4U z!lE|6rHxhdYa7qU&=D=@v00--e}kS^mIrhVC=F6Jq7l@FVdw(_rOQZ0;}C>C@ZhYz z{uPYGf`y(t<7CRG~LY7ii;$tE`nW?&|?7tnKzU zle#6BFc32h)~4&QIeMo$*xin#qnkg*8|Ksdy*fowwTON@_gP6ufZO+vcJe{8GN6R64O^%TrgvY~x`xoM|KJ5XjvE)c zafS4;1+D)OWsts%`Ve!Nux1>ZZPdgiAWmrce!b`(M+tOkgrkhYe1>zZt$~p2zjUOA z(WTBeNa*|F&^FJqSSm=;_fJR8P5NzTi!{j1 z(bCc`M$Q3FC*oSonMmjrpslV+xxDHbXWicoRHWhChD_OvOfjo;e`%|vUR)0ernHD=?2W*9 zI@W67vbhZNytwjv>66;O3k1(3R2S9DS0BB&O-C2PlRL`uoK}4z>zOnT<|z>V$Y~w3 zAT~C>6rD->_^E#<_;WwGtjLvW8gq^(+E2Z$OzsqCBs6%U9zA*c1pKCpyjN?r<*qzq zOvY^A$5rugkgxomOOzU`TzoCN`OBc1F}ITre7pBd-F}1bt=7N|olP^mfW7`FKSXAg zKQh=6^c-7EGmX9yx)8}1e3!1asYP*U3a(gA+}dWxEz@j*=hcjAcD-x5?F^Hdll;m% z@P+6Dr+^CV;88Outkh8NI!8&CwVt0=d7RvszJ=6rVWUdarTEujT;B>=iNC<;%t7uK zyL%1@nX_NggfVzdLcGqmY1WV=TQ(R@ZS?RjO zVd`Wm=45XoYO-!GWhdE|n5HI)$EL@u@y^>%VUvxE%O|66uO~4Ve}@Py)Oxn{HKad+(`mpx`7_Bn$Iu7tG{uaC(8z|K4E#&EfCVodEVr zPq-}lb~2{9MI}F$q}yf~^*R!2((n}!66ElKg2KIfC1f&7(&tqGqG$d2 zFxF8?K>Ab?d}|&~SAhaBvjAI=p-qW3XlXwvUQp?h#KA1xcSlBjByf0I$F zZC6Be4gCD%2e&AIW1m!kW0LdHi_OYbjus^!f0692L(g(k_JYPa^~ul%32Wi}@c3EJ zk$q+YBA)=nhu&DT`r~MCKrz5Y*K^?4B&n&f9S>~~g z=!lfesrii8uUkO-V3bvgvvK*fGfAl8h3c$-mxb>H5$9*M>z9TC@``CsO3 zF=Tx2Ye<1mku5#ZuyH^MrSjDDzI)JVx5&j)b$FU8Y>=k$%S_wSalBPHL$h{(Z?59a zYqHEoS|M(oC;Bw!96NZ)q6Rw8>f5Ceze72q+eCK{f*dpna+fn$+KK?S_OBNFdlqs( z8CY^!aW)6*xB<@`IZqm4?mWG8$9NB&@v z(%P@0B}GLTe{FnvSu>(eZNl4r;S|$t7Yi;ay=D{&!l?>=5M;@rDUYV6PN56Inc~6y z52@Je0gSzLIRt3s;?hP|$qk<-R39Mf)HsFx%PD`*&E!12MB>Olukiiy|K^SV!3_SN zhp$~?*Xl?#*&J?NE{@i5Xy~#Ox8kmLvdr8=>bLbJU#*|t?E3*!Ni3sc!zN>o*@>!O zNxteVBhz8ODF>-nLbN7%CX(si+jgrd#@XLA=Q?~%yPqds7(XKS-#i%_J@-9Pvumd! ze9I$0xY(-IU+cCY4Hbss%G-_ehv{lkm?Pp9_H!yedg(Ogcn9sI*TQ`mn6I2lg;CB z)23(Ecf;Yo+6h7@DnZ3tl4N9u{dsrxvpf86zJGSys0y`z1dW-U)1B30qZqJd<+Gmo z-MY$Ke&;zKJ<<5(r!5I`l{B>pw=_xqpoe|TWrglf???m?$Wb?y-sF`aBR1y3bGt0T z5ttF8f5K++=_-rzHA8Vh@owr5uTb{ZiS@ODBk1Sf6ygZ$=dqi5dQ)oO#?XoO&8c6^ z*{!~P>|w$V`rO7nj-HXl#lb1wy~ZqLPFLZtAFks!Z9dv_MZ`@51?K+{t^S9@;m5S6 zwkL|+dhVEZk@S=Yg-|Oio@C)7(C-!ba_|mqS&UeDNC@%=pdpAfgJ=8ohMGr8x!>lF z27vP-w-&M5FF+M7J+Ly#1)QXq(i=PWpUUl(-pz@~Gs_t8YMC(+k8+~9eCNKWX;F$A zW;fkJ$)+S}oQEPnl2Jb_@Y+bH|A!>wvT^LX`yeAGK|f97{*ee;ZU%apc~-y2bd41vt^(ziMsv<|{cokwH0aYB0(Ah=@qLko^>8Z&~Ed;H5s$AuM{ zvbLb1<8%0*C`n1v82`u{urg+xlQeW_(#x-$X#S*0Pu6oaDnBP(4Qj6(V9uA}j12P2 zZ7XRDJlIz?tC5>!M)1~UmY3CK(wf=TZR!#at$bD@W^Y|hp;E^Sjl!d}R){o2gg=;# zUNrDpy2cbCn=*$Mo)ujX1YU_d4iX~BRZ*A=tEd4@+kbP_QHSZLyz*iT8&m=%YZzEP zDc}9F_VS?>q*Y$jy)D8`a#*%PYpV^S{Ek<(_+Xxy6xH3b`g7R@xlfEzmMsR9A7v`% zmrja{r~LkM<*(^Ev!rUwTpCyWJU>z4=VU96r_Wz{C8F}KL;K)`VW=`_+hXwW;S_(# zp~seZvlh_zr#F5{6ru_OVx^0Q?grj-7!?z`c+;GQGcW&sdVw;`wj6k+g(gTn;{KJC zV}~Yn0jX0-GoiL(Y-{l9pzK)Av%rixYvB=I3(P+F13y$;ZJSsZtOq*<@WkpMBF-*2 zIR3R_`{gqmlNu&KcIXFjS&*IFe41G2pf&qG5w9RMwGTtTPPhLoqz}jrePz{0LnZQE zWO2Sbc1`N63_j3uTR~W~zl}NXTblcjZ`rNehd7+quU7q~OmCk%Pcyv7$BR+sa{Knh zM@MCgt_MUOc*bk8z?w=rdF}Ub#jnc50cdIE?3#x3B6`yWrSg`kWKf!^{xhx(E)>JQ zuJT7BuR+IVyuN3OMLJ-A9xd{3h&i?-L5Wh#!sTuKGmMDC;PlBHE^}SPU_&f^l{51+ zq9tR6O*96Mnr(=k>t2{m^xBF@^k7e;<+kkbJh-`kurF4W_xZ`!_jC8O+B--)H0>Tg zLB(-Jqz&FL2CAg-HwX)rA;5IkASVizr8MR}d)e|kENs~^@f1+|4|hP_C5oRu9((#$ z9t;%~#`HSo^OZB5{3r%Bv$IzqcWkWm@bKBOv>e;HaI9QO@hUH$H=7=ATsjjNoB{rJ;@^Hx8`jg<7U z<5%|)9J};^3ML;}%|hQgUWd&zuU&T7+;X({6#2ru+TX)A!oEp->kfTdx10~cG}VC7 zlG|JuGvoE*=FN17yNguCB`ug}55D)kg#U;ivgdNr8feLcgq<5FDSBzy#G4|6LfE+rS~qdB&$n z=HNFgAhnx*5uv0oe$nKA9yMpa{xOErcKz^{Eh@We!E(m%!P5e){oI}$0Do?gm5z`X zm6tQM{6@jJMtQU5^;@Az-Hyc-fe1DN!{O?&uq8y!{-GA27;v&s22kIsDrO6`* z(8E3$qdh9!u<*DK{zwmTtxDJ+q6!l`9iA(sKeC(-DO81Oc(5iL%QKpBFFTnAoTxSk z6jwK7Rxuka;&;QTa`r1hi=k+<0z6Z32c!?qp_q~e^oN^&zTnH8JwIaGt7L+VtPq17 z7oF}BDe94{^(Pd!L0knry9f)lx{^|qBHAF#6Bg|bb=dx?xA!?NMET1H2hJ?9rsp;G zQbDgpl$6PN{i}oZBO)k$!8`c$ffdx2Xxhis{uh8K6XwyB{GAYmfl8l=fMYa6l)?nO zX1`GbRS=6j6-})3>O7*Hs8$)r+FZO+6V-nBfHxcfE-;Pb@bG^BqY5>V3~wcHlGrEv zw#T&y5p+PDY~EyTi%g-jZ=0H;Rx1C-NcP~JhWF%g_v}~H1~R|fTE90Kj{h9V29-vQ zbLr5S@ujYn&I*R5lU4Ws!1&m=T?MmwWrc*?Uhq8Ipaz7l?o-_4OnGC_6j^n=5BNhZ zMx+dA1+Cb=mz~R|Wa!C)a*tPa06^zz)A;iC=H-FmW}0UNKVlB_gx3b!rIo9+)@bmn zX3tJ?hoY}cSLUdi1%U{CNIdlUlR3ENSnf5*?*Au>klb`8KV?#Lt1}VM3=Z-8E?6zI zQ+$MJ+4ji_8bE9!20yTji04E_;wj5q$#&}xBU(zS#2pXlZ!7rLuz6R~s(H>%cGEfq z@uzSb8XL4NLnsNFj|xV1<%>CNQ+W>y`3@Ab5?9q`^J4p%oyq_qqF-4S4Qx&6J2kC96Hcqf1Wl~=R zz;11w+YGmxx0*ahrul*Me@l;25oyM(aT>L}eyA8;hNgL?Esa z-5O*BzdTq2)eQJd*7YYf`J)wKWGGCXrl?M(aq6Tso&LA(2L{?7Lh=pb&Kjmu9U2r^ za}>$&Li)hJLP0LiEMmHE6>BDxE{rNc*O^sjIL`vJP?G#+CJipWA}_yf?jt2fu!10H z>EdX2H%+F@@2~KXZz>I&8B*90l3QHkn#EmR4%Ha3ZL^njhr=(ibxdsoKiR!B9dB_3 z`Dl*iiWP=LN31`{IMKZNpOVQxxXJ&(SYHY=5oLa=5IYrOqlt_xd6t()A>~2*J8>qGDPq98_?Mbr@VJUY=6)c)R673glJv>V{L?xSC1DjQ zq{ZHtQ}3(V;-;I2*KTu$0a&GWF%-Ak%z)W+#E-gKj- z<=U4ux8|(}ZO9Z2L`S5c(nYPCTyd2takqr_qDlTE3t%SRqy{u8n?}d^$H_8V5wca9 z=ToW96ANX^_ZfNzA|@h6Bzm&FJ_u{_rSgzEeJYQM2IxNkQxQ3ByD{lyOyWU57TWR( z^KmOkt82PT({|di&z7fC8@<<02wi|JTMlO*f*c+V{b@CbY|V6I!Pm#@Fo6cRoLY!@ z+)B|V!vy}=a@NFzDI#a*n12&D6uhfdTP{-e@#R3pOk5Z`pIs99LnN{GAbYtDY{HTq z4Zw)!adUY-bHq!Vjzh}qr{cU4HTKGFry=Z+w!2Eu;+No+b3z|<{j7_7!rSOUk5lvr zKrLsz56ceH_gyLug#n4#v+^!6cZnX5>uc;yBJ5?XFAPd7IUBM0RigK}xX?kE%uaQ1 z59bgC_Sa*EEA;$l6K{3)(ZL<~zl2l0@^d<{0KDN9G05+hS|0h8#js23(smaKS=!S( zqE8h>K&nHL?`K8Ps)zTvTZ4swHUMnx&p} zZ&>efe8q_$xknB$iQC9Mu=7ai6MSZK8!!TyR5(b>>8=1mC4GFDmI;46`-6KngO5bY zm2yfl-2e<(YVwsruFo`o{L{)2D6mvB=6-WK6YEp!BuJq_-MFZs;%e!&Z2dlPo} zUVr2A?}ZT>KETx6avaezJ!GZz`|iIT%8rZwTzwmch@I(MiBAq)`xLGD7w{o|MT6VE z9d2xBp#*&2%ZFIS!aj=vKz^!zL^gfhP<%qm4a+#d zRgM{Xc=S$K#AS4(71>V3w*PAq?M~mS%Pd@S`S&}y!cAQ-Q|6X(8ej=#4=jRLbB>#!_C!zkHe=d|o7l8f zk>7zZ>^$?#$bh6 zn*%GW7N}u8#70Wz5t9mEqw<{HWUIJUEw;0y+g2>_YWMCnHRWT#yFc*ibIec8_GmE= z8l*D5dz8Oa(2?5c>s;@RVX$U49|W`w^xXh;o05FI1(v8{9U$BF)~ ztEHHh?yO^gZb|pBLtbSBINzX9jUL0845b1t2o3pS>v){`2?fv;goEZdR(@FM&v~fvjZI1r?D_| zgjtp!*I$?Kq%&gSJ0n_I>sr(6mn;Z__;KoIi5(0sRX9WLj)|vc%f=kj;~6VjsjWua zgy_}>=~xEtSC;I`Lb2)(&hE@}(PoRrYrvX2(%7m*d&uiv(FQ4fn=wI8yoX#^{;i8w z*#3r3e@Ddr0iXUahr^sfBRqfxxIm^cB|ywrx-Z+_HjU`yieh~u#h7sobFGKI|B-2v8*D&TM5Y~3lfXq+B!Q;^zAydtils5`o zd;X7;rQ;GJkZ|!53OTLAxYC_Mpi$f<7drXjMLePehpE=(r83!+Jk9Zbno$RH+I~LV znj9+m)KK5jbi59zn&ISX$c+5|z1WcNb8cD3Ot=dUKj0+?=(c;&B!hBX#obXoqSeSI zfV%)jY?S~s&q0B?KTF0_@ZS+lhwIRjT;0T{N7l5Qn_G`p_#n-wqaj})U8WU~O8u1W z271Q7HE1<$8HYcbU%Wz~@%bah`uJVn^wP>+KR3tsC>aCxkij+Q5rOH0ZsTRb@3oi2KC|FF z@;f=B>Iou^?~aRUf>ncSk7?7jnj(#)@9Kwb`OcsPduc0+hK3nvKdN`*e(4?cjtY33 z+_V-QVTL=<0%r@PMM~(~?k53&GI8o@483)X&X!tvN@oNqYO)qs^KYiH$_OPAl_1rHRxh4Da$(1{a=w4?Bwyst8X{F*bpT-Q#y2Hw^kq#BRllM6< zzx~<#n~dK0 zNI&^}VBQjQ*RFJswXGTo8=XN#M8^E^4X}o|$)##c+LwdK1<9g9v zYh^cfE7PW=*7yd3BA$f_h)n@tVvn}bfLJ|jISc8h*Aa7lqTBy)?Ynw*E+!8)gLYqR zO^VpCGM6I?pN{ysl<$cBcJq2`J#5txcyn`S%*(V!1lrU;lgxglY<< zsAca;ml$xAWLP)ad8fV_^DbX#_3J5=ba@r7t`54Pdrc0Ig?-rJ`V9gs0Bc3X-bnG< zk5v;n2+I_ViFV^4ec0X08$H+nVlnxm7Ci=RD)*uj0TOrU+DP(qz-No4^pi^;zymTC zQZHHR1%5VtjM5uQKhYLl04(bDdb8XVHHVyi2%sS}gMMyNs-$UnPW~~%<0Av?jOY3R zrEt?k;=5tqiWd;sDSU96-+|&hxd}k;)Nk7(rUQa@nXP`k)6Sc#&Jk=^rmCx*3z6KPD!OGy8l zpuMrSvbz5KIu`u~{>-VuoaVLUM$7pP;~wIb)MjmPNq#D$P{zswt=aP6(+1h`6vv_} z@&>u&^}aBVgIE|8;hi8-mv7BU1utzo!L#}=FQ5H2RXwT1ZvOmQpXq-6v4h}n`KdEb zmhCrkDN%D=!i0$mt|JisE|>C^_gWUN)u3$giT|iegThP!cs(<9zcpxowrwKsv+l3H zm&28y!wQz!+_L&igwXG=>5yr$%0AlrI+BZ;gv@qar*-*8Y21Urc;_?*e$#KyxVbAXgS{XK+n>@j|iOp~x3w8IP?LX?~b?49&55$Kr z;d#{OFp?ewuEgPSPu(rDExUg`gQ*@X(G?stCQ4@)h+nOh(F+>jE+Q**FVfX!Layuy zBp<`3)ScghTH^Q}q-M`RCpUkIPSz+4m((hw9Lk|#fV;l;8Ev+Vtnx?>Y5oJ$7*w() zQvM-}`nX%_XDuh48KK`Rf+eObp=&99RYEWke%L``?n+3{x%FH(5{P#0mIXNt-?Q~K z%jm_;_JZFFM=tB4;96Mf#e`e*{H)#Z&(>K^vR zRqM?`2ZM&?Nmr=)nnzr{tSeE@qgY2g(?n^M-Ts&F5p;_(OvhN$QJwyWZp8kSbd@P% zkUxOwV)zNBD6+dI3xXqGfuIpUb^FTh``=~MZ@4p>wh|1qL_&5 z><(vZd%oRzdIdi@>w7LFB>BvAG|u$wcFW0624tc&rUHnvJ#=^oveUok|7d$%tc_6b z?|bss!FPL3z!3+82(Id2!iAbNu361&Wjky%Qw~Tkfo&-dy3zMaGip7zt9lMIfKy{L zkwAI>k{~DJvldomrv3>?$vMrxS=IMY01P@ibHkWTlK>P4lXMK*9%C+ZDxZwV+y?x0 z>VrE7uDRTM+b!-;P*ugQl@E4p#T5(yu0BW8)NRP~lSctzH8SxSvpX|lJvK2Truek4 zem-VJK)A_Zo?(34%8DKYaA+r|0lOgiW$Ei!Mkm<7#H_dA_G<5}pjV0U33fK;gmH9}6JhTos8jG|XRD5RN*p{VS~M0JF2BG1QHgL79A1JcM3t56Nh?B>%*p5oG{yt3* zaryd0I-KHPuLXbeU{?yVK{nfIuvt^ZAJ8$uspsV94aKUw>oazPcn$AC-G0rYrYs&F zmNnL6_0bBYKU;F_1&F2RIXxcJ~} z?eM?X&TI3q+^kJM;iF*WH0LE^eLFd%G2=^GN*A1)95~*sdT!eDlsfv z2StgQ{&pNF&UznV=Lt@U%sz{2I+y1?`HR2$8eurq|5RkIG-}z~C4JXL)M>pKed>JJ zH;)hfOPDse$EMM1ZWAD$5SwV7Z)U(!)N8RKObRq>&7PJ}i=tGs#%3zm8~zjmRn1Il zYWT&rbA!V9P-hOdC%aL3=5091Wh~c^=!p>^3r(GpU(W|G^suc%&*YBnn|Hhb$j0c| z*=__%y8zoeeysq@I1}(^cV!d#0|;z5&-z7F;N6|e7iK53O`7`LaQ<|laA4Hp!3d7$ zI2rJi^~Y~~RxGJ?ScWxj}eb^$}ic_NAe4|E0EqSjt zr)|dM>;rrXsePRkrP0Y;hU!kJ5m7458th++PR{6nK#XFJDni&#CH+qDQ_NOLX_BX6 zeU7?PjVw$Lv5!0=gfg6cMZTgoeQuXkcSjrCRfD2i%CsM0G}AN?5Eb6_9{Q;l?FDf6G?Jxh(zn&>;S3LGU?F)t~V>9#L88i~7-OZ2@ z;{(F7+F5H$94HrC(E*8^=v#y8HYVj5$diQYV;+MXsKc>O>#W_aeYDL696XugQY4%4SE-9bRj&_D76 z1?BJSM1eVyI*r44?rnn&T}^H6{)hgD4MQbf(|+I;J@Rcp^^8m?`EUnFZ!T{%nl5|R z1A70ViNJ^Wh}Pn6rt9y(c^-{Zz?$b4nwzd9-ekIn%buQZlx=L^Fevo+ zotC|6mWMNju+zUOLNWF9@xk&66)?nck%AcB`0^y9?rMfynH~VlIc>B zvnk;ko$W+^plRI|d!>W`1DYgl1G6w;8$?Rqiu3{+wdP`rU}7BxA>Af=z016E*!NTV zn%mcl2_5?)$9_fB##OQb+Zn+lSglCLNX1dJqzdoPL?Bi+>~6oQV>kMHHtTiR*qM^> z2>VUml5X2rTkMb9Ty;ZVrO9cDgyZO4t+U(Y>~AvnmZ(K!K0wclY@-7#4}|FsJ+N&a zl%AC8{m*aw*EzTUS6)$F7Kps$M^hB0mvnULzW=jdy!5I3+m|@2=RFRdxBCbvXz|E- z?BucaF04_G{n91MjNz(4u<}(kpQ730TYb|; zr8#O~SZRtDR-?V}QZVx>&BuEdFDaVOLQH^JCT5Y=3f#>m=k*hjE8z#2i3fy(&!>pU z(Te^uT_95|LGf8@;7g0~4X;h?zO_b6{qF!tlLIWTdBu1aeI&IU5VUpy0G~>y;^!&; ziNqGGLvG^r)#T^!jnV*M`BcaEm=jblve&>^mGX8yg*l+X4%^a5m&5|h)~P`sDp{?S zd@RBhjA#ZOeC}z@yO4v5-`cpWRCza28f1saf(N5S%5F7OHi&>Ax}h^DU$yaq^t+y_m^aD6FB51p{Y z7(rw+FwNu1bGO{{4j~lSIKSx)5V^Ud5LFl{l`Trf?T7h{_fBgSg=SgzZ?DfAgT|NC z5~yiX4j^%G^ElL9-6@+N)sK($nFjHw!RCdS(?s@X|X0X<~!?}+x z4%zFntd#OG9sRGqNx82z9=#=m8?|Y^B#JfUoH_M;RcTNE1jGOVtJ(RfZ8ToRARq_J z$Y;&!WyeP5Q(Ym+pB3p1lZcd#n^~66 zO`zWy2pm!l)=*P)vD9kQ=!2I6(Jum8;E&q?=VqzoQB#}@vOZ`{8b4wF-SwVmLP}(- zxhGb{e`*4at;0Gl^bli*S|L7n{S3?ByNVi92@)U-vRW5zI_Bu~Vq?ns?koVA0{suv zed%MtaBacoZ{k+5%Fe06yK$y6q*U-*Ei-^jT?5QZ<}}Sy;m2k=UN=TmhL8nP zI;B23UM#w1I4BN)`k*u|vvy`P#A+gQS!{ojB01`wRQGj;R{a?Wc#NQL{ub%YUe#T) z@N@22(kw4V^U6@<@T*ScEs`h6H#A(+>p#we{+?g|M=S&2GAg2NY$POi>Ms6Yfd4v0 z_BYM>uRr-(INcB5_C{~yvwBR-N__ijjPcv{`VXhNe&DanV=t&gA3P#`RAqqOx#3yF z8weCwRlH$Lo6b37a?O#I=L;CmuhF-aSnS|1mh`cL(YJtTo#K;~rRWKDJd*gW4TuMg zb2_*O)^;Ny)FPSHm%BMg56es&(AFBJIzMiPyh^OQy)Fu7FneKJi;zY?{@L7#Z_9Gq z`wVNitFTprcnJon=Q?_51M_P7^nvA7HS5Nz#U*i!R{FnHTZC}AeIf@o8ybZTDBgaB z=k0jM*~2i|Y-9#pSTNy#jUcRWSNx#{^bcd%Wma7CtEWs)OBQvBi-?@Do}5PI&+0?# zxj?K@*6+6{e0S$LU{0}Qx5q@sE|#4`1CE(JjKFhlf9kQbr_%yta-uwY*4B@B56+;)>&3)Iwnw;g+H_w{!w%aX7voInSAHI(xH$S7qx6XHX zdF8Y&SL0x%D@s}|7`6H;rml(rI^8m`5r z|6t(hyNG*NUl^(>9#4KQL8UtVj;OkOw$z;z!Z~(sLZ;{{`N`FkChJ*lnz7o;_T>)7 zRl@+yeLvfonIeHSys`fje80zYE`l3_kq~w@5uo`am!^?CY5mJ5h0;7=Id)}Uk9@Rsw=OW9uOZ_)ekG_4DB=$Hx_2*#&;oE%^{ zMaq^f_cKIf0@bw`A^^5)e5EHLa2UujcFtWSRrl&dxR0(((73__;>*px3+N|{v%Tc# zilO9FeEV^|pptZ|@+QqhazJsmKvE;;+U&-OY0&$Q&CVSTo^9DU#JES7Hb3(?_~Aab{9Xh-v!tp{YWt2)ES}`MGC}CiUz=3VKGu$ixlF;?%*+V%b?g z;@-?{x2OW_+K-Ow@W3IQzS>W=-EW2i%d9hhzHF+-BtsZ|#dqZZD-e?9Q5v)rQl{@) zEQcG7E{GlSnjCMKK7g6>mae~Z!mX*hJgRo}_&{SmC1x(3(z}CQiVm_p&8Yq8Bhn{g z$&e{JZd_P@z9vkwKGkzn65maqu_aMVv-K&KCFM1kPlgm2<6;?V(v|g?UF-`*=mdRD z!ekft|M_-{c$(<5X6=)w%WD+ogNGCB;m+qRlEo6N^sRAqLo3~oRul9LA+fM=j|yW@ z`j9*gWIcB-=4JQc>UW#(*FIXBK_SHbR z*|_JWrpcoUy zA@vSLZVPaHJY7=2)qFWmGo96KBpF}uLcp-_lb1V>k2=_V{yfb|ooNScg`0m}W}ges zvHweCkLSPoW&gv>2C#sGID>jwecv#pEv5%uIZp~OrD|tC=CF}*D1o{yapx*?DbOu+ z6Iw(x+Snsk-+n@0Gc2(nx5W-LTm|NMvQ~g$ePP#93Sb&)Q@FZ23Hh9dk6}D(^IKUm zHowF8S^^Mv!x(rn1RUWttq-eekM*%1(1t37FSEnHarI-^dv3BsmoDj<1|0cCy7<91 z4ADMDiaV0CSrCCwCGRKs-LF2rj3o%?)E}a?rt{LvyB8@F#^mXrI({CT(0Pp!H76%Mr3#gH?&0iI zxGKTIYqsb{;bLwVm49n|jvg_%r~LWz#k=2ZE= z!IZAipH&2i_mifK!`VDTrZl!HJ zTKQ1w&RK4mf+DJUq#1dm6#PbvN@jfGg;3g2nc9y7ZC;2W@9vX9Sgwf9Fn>4;J@n1Iu8R(d(}{KhE`Ww7}-KLJAg*CPJiC{Y{}5^vwn|JKRBV z@H!ImGM#x;nv!KVecJ7!)~s=N*Nax|>JrbRCSqc8GH9T5&DULaGq+I`9`Se^nm7p{U-fd7HFpch5DO8IQQs#3^E+VuRu4opU2WSg zu$eTBT2Selqe@dO{H$vst`5uuDk63X)m?WCpTgvU#AJBW@_Tj8fb$7-BN1ZXhwAdJ3YeKecC!=9LUcYf{Og9>a5HtB{exgl;=PDDhr{}4u~VjhPbR9gH* z9Cj^BAM)YtiUy5)X)x>;-rZ!2ZGCYLBI~AO@6X0P)yyE{gLbRwd&`A$38`=|S0;)z z^kO$rX)FpmyZaXHHpbt*X*NW5vYy0my0E)>;Q2Iwabe=Z(j(KSEm-wBMCO&4v5j-F z?Nqyu19hK}u4VAMyqtzMdu3Gs9$Yy^jLla6l(5aCfSR)0N@;Rg++ywT`*n^6HE^?A z0k)It8IbSr)+ohH)7CF1sz$oCGO^PYatlLRxU%JAi5N=m7^==ckke3L)j7cp#z>!F*l#$_U8p?rJdrvM54_e|*j+H5?GV}c2WYfO*!z5A{; zUTE(9Z8)5{ATx=d-3V~8yd`>mA&;YOs`ShKi!~uHXM<%TpA}QhoRe}QmE^C_rENO7 zM)SC&=9$Srg3s1r99Qlg=4R|l9BJ(Q!E-o8Bll_$NX=1yd+FXlVClqV0vM^}<^()I z-tD;n$pRmqcD*NbVJEr2+Z| z^2=CA-4LO(?)Ml>SjM<;LuGu9*Q`o_PCaiwc*zpucgqZb(TvFD|;oju8WDv@ivtKt)%*V z{&zG^3)*qRur42`C`VvNW!B_VQA4={<)wXrhXg_z=Hn0Dnwtvt%nQ_GS+N#19EIo7cih|CG4{1tB7(9U)O41`Q%W0BzVy*U15Ca$xQtj#){LuE{Vvc z;_|9_obK4ZxBLwV8(I)?$y+Ofa#gC)Wevz(@ZkLJ;Wk=1;i(91`mqqWfE*UFgX@lg zfOSI|n!3H$Z5&aB^YR_t<%3G2a|HsctS$EHj{5zB5mV)(j@>}X(l%)FDixP?CmH5|H=`E^K6b<3-`7e-lTy5&iF zAV)vznskv=^`5S#ZHqTeSJwJTE>JeCJP=Y;} zdIFcjNd6CY^mhyk-O5c3!DH85&H31fJZEC*P|6tr^lwvblXW=6vk1g@MK6q!~ zn}nHxn=-qe+?6ANHnowCRS%ZLyEcFAcXBu z7-K7m9cKfm{Wr;a?*v_T!cbSGdLJl_KU^``ZM)RTg{p}eU_>SD0GDk@e2MJ$!r%6` zzv5XaLYp#AFW=>S1T)tOuYJ=RnVa+U%)obFO}pk3iZ@PylqBU1x^!x1xYX`Dl~gI8 zTHpubxC?IMR8pFY#J6h8J=vYX-JtorpuMLBJ}&#%B?G9<#kjnEdGUB6%mWqZci>o4 zKTtkNb0)t`oOSX=&LW6L&8<^XP%A4nGjqX%DVCmnBJ_*oGXT!ybAG|$M2x+lO=%TS zr-rFs48qn++xm!mMZjDF4H;m}(5y6%HKmD$yd1dGl9(O)v{f5%T`qhjLn3FmI%?k zelFl+Q$i!?3~NLtGw1!Qh(M~lxXB%W!|prD`RiuXAqIQ|e;ivhRO)JM7 z^s<$YUuf0PepvWe`?X-iX_M{>8?TZ%#+KnDofT`Ev%)R+LvptA4bS+!0iKPbaLs-} z0SE2T@zgW;&+QjPrF*4(DupUaRI|CK+h1Q#v%lT1c0q6)s^z@=v-3hx7P6W_AbI+1 z-9#p2zuN!@*mzL35~GO8bZWnHQ`or?d*Pxe#m9Q!;F6QK>Jr}6X9&V)F739h=#v?ZNGKS{+}L z?w|BIUAH*=x`V}fwY2f*hUbeyMeOdKK0Wjq18h?iVm_OAZ(H~ebe0a5hd>Ej>Oxc>CQVkcQqHWrrIIYj?<7UC3ofT? zrV>Ze)Xyf2ifJVS8VDWhTaotdBg9eU9wZsCt7d ztJQXE2JO#P(8?^3g+%^5qr2{jECm=*FdB>nbOW!>hD+Crvtt)W7+;;J%JFI0w>T#a z9vip_@3k`Saq{-lAmKV3)D@k4mad-9*Zypr4Ea&KQ_3u$ns@y9ThlSyUzfSL>69 zv5vPpozr(yDA{1lAz)q0G=9Vtd++)LxxJxjZq24biH8&xyWh7x1)xgc2NS zH?1w+nU+=*j$s!@H#{ET9vEF%MF;@iF4A9%76S_e`c!QvDr`S*yv(E1BdfwjZO_Pj zD@sp;fE+$fM@*<(BZM!AM0)w2dia5Y3QS&p&<=9wn0eCM!r728!IoSfK4lCe(AU1) zj58{2n@g29OmQRZszt4K(EBL|`JR2M@7j&^c)uF(VyXqu@~XxFKZ>a7KgbpTl|Ju( zjgbG-arnPdJ-(Z~ADT#MPE!SHRiWufwW400p#E8p3OJbY=y-LWczaY|*m7HpbUHw` zuy2uT(B}6$o2<8R0rK_}(Qc_u@}_utiudMiW4||1lBvPZRUI$?@@5{_vK* z+u#4y{4)a=>fO`7nIKjtR4>lQ2TnsO8ZH4As-hYG9LCFm0Eg>Gck%J{^aI6CKWhN% z;Z6`A{2MRXpDX@rL>ZX$*Udjq;=djn_1WG5?CSRVazTkA@F_mCD>p9J8{bO!J3p~i AXaE2J literal 0 HcmV?d00001 diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..eb0dea2c --- /dev/null +++ b/docs/README.md @@ -0,0 +1,7 @@ +--- +home: true +heroImage: /logo.png +actionText: See Demos → +actionLink: /demos/DecodeAll +footer: MIT Licensed | Copyright © 2017-present Niklas Gruhn +--- diff --git a/docs/api/QrcodeCapture.md b/docs/api/QrcodeCapture.md new file mode 100644 index 00000000..329b03c8 --- /dev/null +++ b/docs/api/QrcodeCapture.md @@ -0,0 +1,85 @@ +# QrcodeCapture + +## Events + +### `decode` +* **Payload Type:** `String` + +The component renders to a simple file picker `input` element. Clicking opens a file dialog. On supporting mobile devices the camera is started to take a picture. The selected images are directly scanned and positive results are indicated by the `decode` event. You can also select multiple images at the same time (still one event per image though). + +However, if no QR code is pictured or an error occurs, `decode` silently fails. + +```html + +``` +```javascript +methods: { + onDecode (decodedString) { + // ... + } +} +``` + +### `detect` +* **Payload Type:** `Promise` + +The `detect` event is basically a verbose version of `decode`. `detect` is emitted as soon as you confirm your file selection or the foto you took with your camera. `detect` carries a Promise which resolves when scanning the images has finished. The Promise rejects in case of errors. Additionally, `detect` gives you the unprocessed raw image data and the coordinates of the QR code in the image. + +```html + +``` +```javascript +methods: { + async onDetect (promise) { + try { + const { + imageData, // raw image data of image/frame + content, // decoded String or null + location // QR code coordinates or null + } = await promise + + if (content === null) { + // decoded nothing + } else { + // ... + } + } catch (error) { + // ... + } + } +} +``` + +## Props + +`QrcodeCapture` has no explicitly defined props. +However, checkout the components template: + +```html + +``` + +Because the `input` element is the root element of the component and because Vue components accept [non-prop attributes](https://vuejs.org/v2/guide/components-props.html#Non-Prop-Attributes) you can make use of any valid `input` attribute: + +```html + +``` + +You can even remove or replace already defined attributes: + +```html + +``` + +## Slots + +> no slots diff --git a/docs/api/QrcodeDropZone.md b/docs/api/QrcodeDropZone.md new file mode 100644 index 00000000..ffc68199 --- /dev/null +++ b/docs/api/QrcodeDropZone.md @@ -0,0 +1,108 @@ +# QrcodeDropZone + +## Events + +### `decode` +* **Payload Type:** `String` + +You can drag-and-drop image files from your desktop or images embedded into other web pages anywhere in the area the component occupies. The images are directly scanned and positive results are indicated by the `decode` event. You can also drop multiple images at the same time (still one event per image though). + +However, if no QR code is pictured or an error occurs, `decode` silently fails. + +```html + + + +``` +```javascript +methods: { + onDecode (decodedString) { + // ... + } +} +``` + +### `detect` +* **Payload Type:** `Promise` + +The `detect` event is basically a verbose version of `decode`. `detect` is emitted as soon as you drop an image. It carries a Promise which resolves when scanning the dropped image has finished. The Promise rejects in case of errors. Additionally, `detect` gives you the unprocessed raw image data and the coordinates of the QR code in the image. + +```html + + + +``` +```javascript +methods: { + async onDetect (promise) { + try { + const { + imageData, // raw image data of image/frame + content, // decoded String or null + location // QR code coordinates or null + } = await promise + + if (content === null) { + // decoded nothing + } else { + // ... + } + } catch (error) { + if (error.name === 'DropImageFetchError') { + // drag-and-dropped URL (probably just an element) from different + // domain without CORS header caused same-origin-policy violation + } else if (error.name === 'DropImageDecodeError') { + // drag-and-dropped file is not of type image and can't be decoded + } else { + // idk, open an issue ¯\_(ツ)_/¯ + } + } + } +} +``` + +### `dragover` +* **Payload Type:** `Boolean` + +When the user is dragging something over the the component you might want to apply some emphasizing styling. Do that by reacting to the `dragover` event. + +```html + +
+ +
+
+``` +```javascript +data () { + return { + draggingOver: false + } +}, + +methods: { + onDragOver (draggingOver) { + this.draggingOver = draggingOver + } +} +``` + +::: warning +This is a custom event not to be confused with [native `dragover`](https://developer.mozilla.org/en-US/docs/Web/Events/dragover). If you really need to listen for the DOM event instead, use [Vues `native` event modifier](https://vuejs.org/v2/guide/components-custom-events.html#Binding-Native-Events-to-Components). +::: + +## Props + +> no props + +## Slots + +### default + +This component merely renders a wrapper `div`. Its height is defined by the content inside so it will have zero height if you don't provide any content. + +```html + + put anything here + +``` diff --git a/docs/api/QrcodeStream.md b/docs/api/QrcodeStream.md new file mode 100644 index 00000000..49ee5a13 --- /dev/null +++ b/docs/api/QrcodeStream.md @@ -0,0 +1,282 @@ +# QrcodeStream + +## Events + +### `decode` +* **Payload Type:** `String` + +Once a stream from the users camera is loaded, it's displayed and continuously scanned for QR codes. Results are indicated by the `decode` event. + +```html + +``` +```javascript +methods: { + onDecode (decodedString) { + // ... + } +} +``` + +::: tip +If you scan the same QR code multiple times in a row, `decode` is still only emitted once. When you hold a QR code in the camera, frames are actually decoded multiple times a second but you don't want to be flooded with `decode` events that often. That's why the last decoded QR code is always cached and only new results are propagated. However changing the value of `camera` resets this internal cache. +::: + +### `detect` +* **Payload Type:** `Promise` + +The `detect` event is basically a verbose version of `decode`. `decode` only gives you the string encoded by QR codes. `detect` on the other hand ... + +* is always emitted before `decode` +* gives you the unprocessed raw image data +* gives you the coordinates of the QR code in the camera frame +* does NOT silently fail in case of errors + +```html + +``` +```javascript +methods: { + async onDetect (promise) { + try { + const { + imageData, // raw image data of image/frame + content, // decoded String + location // QR code coordinates + } = await promise + + // ... + } catch (error) { + // ... + } + } +} +``` + +### `init` +* **Payload Type:** `Promise` + +It might take a while before the component is ready and the scanning process starts. The user has to be asked for camera access permission first and the camera stream has to be loaded. + +If you want to show a loading indicator, you can listen for the `init` event. It's emitted as soon as the component is mounted. It carries a promise which resolves with the cameras [MediaTrackCapabilities](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/getCapabilities) when everything is ready. The promise is rejected if initialization fails. This can have [a couple of reasons](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#Exceptions). + +::: warning +In Chrome you can't prompt users for permissions a second time. Once denied, users can only manually grant them. Make sure your users understand why you need access to their camera **before** you mount this component. Otherwise they might panic and deny and then get frustrated because they don't know how to change their decision. +::: + +```html + +``` +```javascript +methods: { + async onInit (promise) { + // show loading indicator + + try { + const { capabilities } = await promise + + // successfully initialized + } catch (error) { + if (error.name === 'NotAllowedError') { + // user denied camera access permisson + } else if (error.name === 'NotFoundError') { + // no suitable camera device installed + } else if (error.name === 'NotSupportedError') { + // page is not served over HTTPS (or localhost) + } else if (error.name === 'NotReadableError') { + // maybe camera is already in use + } else if (error.name === 'OverconstrainedError') { + // did you requested the front camera although there is none? + } else if (error.name === 'StreamApiNotSupportedError') { + // browser seems to be lacking features + } + } finally { + // hide loading indicator + } + } +} +``` + +## Props + +### `track` +* **Input Type:** `Boolean`, `Function` +* **Default:** `true` + +By default detected QR codes are visually highlighted. A transparent canvas overlays the camera stream. When a QR code is detected, its location is painted to the canvas. You can enable/disable this feature by passing `true`/`false` via the `track` prop. If tracking is disabled the camera stream is scanned much less frequently. So if you encounter performance problems on your target device, this might help. + +You can also pass a function with `track` to customize the way the location is painted. This function is called to produce each frame. It receives the location object as the first argument and a `CanvasRenderingContext2D` instance as the second argument. + +::: danger +Avoid access to reactive properties in this function (like stuff in `data`, `computed` or your Vuex store). The function is called several times a second and might cause memory leaks. To be safe don't access `this` at all. +::: + +Say you want to paint in a different color that better fits your overall page theme. + +```html + +``` +```javascript +methods: { + repaint (location, ctx) { + const { + topLeftCorner, + topRightCorner, + bottomLeftCorner, + bottomRightCorner, + // topLeftFinderPattern, + // topRightFinderPattern, + // bottomLeftFinderPattern + } = location + + ctx.strokeStyle = 'blue' // instead of red + + ctx.beginPath() + ctx.moveTo(topLeftCorner.x, topLeftCorner.y) + ctx.lineTo(bottomLeftCorner.x, bottomLeftCorner.y) + ctx.lineTo(bottomRightCorner.x, bottomRightCorner.y) + ctx.lineTo(topRightCorner.x, topRightCorner.y) + ctx.lineTo(topLeftCorner.x, topLeftCorner.y) + ctx.closePath() + + ctx.stroke() + } +} +``` + +### `camera` +* **Input Type:** `String` +* **Default:** `auto` +* **Valid Inputs:** `auto`, `rear`, `front`, `off` + +With the `camera` prop you can control which camera to access on the users device. + + * Use `front` or `rear` to force request the front or rear camera respectively. + * If you choose `auto` the rear camera is requested by default. +But if a device like a laptop has only a front camera installed, `auto` will fallback to that. + * Use `off` to not request a camera at all or in other words: turn the camera off. + +Every time the camera prop is modified, a new camera stream is requested so the `init` event is emitted again. +That way you can catch errors. +For example when the front camera is requested on a device that doesn't have one. + +```html + +``` +```js +data () { + return { + camera: 'auto' + } +}, + +methods: { + startFrontCamera () { + this.camera = 'front' + }, + + onCameraChange (promise) { + promise.catch(error => { + const cameraMissingError = error.name === 'OverconstrainedError' + const triedFrontCamera = this.camera === 'front' + + if (triedFrontCamera && cameraMissingError) { + // no front camera on this device + } + }) + } +} +``` + +### `torch` +* **Input Type:** `Boolean` +* **Default:** `false` + +With the `torch` prop you can turn a devices flashlight on/off. +This is not consistently supported by all devices and browsers. +Support can even vary on the same device with the same browser. +For example the rear camera often has a flashlight but the front camera doesn't. +We can only tell if flashlight control is supported once the camera is loaded and the `init` event has been emitted. +At the moment, `torch` silently fails on unsupported devices. +But from the `init` events payload you can access the [MediaTrackCapabilities](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/getCapabilities) object. +This will tell you whether or not `torch` is supported. + +Due to API limitations the camera stream must be reloaded when turning the torch on/off. +That means the `init` event will be emitted again. + + +```html + +``` +```js +methods: { + async onInit (promise) { + const { capabilities } = await promise + + const TORCH_IS_SUPPORTED = !!capabilities.torch + } +} +``` + +### `worker` + +::: tip +So far *vue-qrcode-reader* could only process QR codes. +However, many people requested support for different code types +(bar codes, data matrix, color inverted QR codes, ...) though. +With this prop we try to meet these demands. + +Please share your successful or unsuccessful implementation attempts at +[#109](https://github.com/gruhn/vue-qrcode-reader/issues/109). +Your feedback is greatly appreciated. +::: + +By default, *QrcodeStream* will only detect QR codes. +Processing image data is expensive so a web worker is doing the heavy lifting. +Because the worker is the only QR code specific part of the library though, +you can replace the default worker and get a component that can scan whatever you want. + +First of all you need to create a custom worker class: + +```js +class MyWorkerClass extends Worker { + constructor() { + super("path/to/worker.js") + } +} +``` +(Internally, *vue-qrcode-reader* leverages [worker-loader](https://github.com/webpack-contrib/worker-loader) +to makes this slightly more convenient) + +To get your `worker.js` right, check out [the default implementation](https://github.com/gruhn/vue-qrcode-reader/blob/91ee3fc8bf2f7fab96ac3f0a5d84d2d4c09b012f/src/worker/jsqr.js). + +Now, pass the worker class via the `worker` prop. +Don't pass a class instance, we need the class itself! + +```html + +``` +```js +data() { + return { + Worker: MyWorkerClass // Don't do: new MyWorkerClass() + } +} +``` + +:::tip +`QrcodeCapture` and `QrcodeDropZone` too expose the `worker` prop. +Dedicated API documentation is missing so far but usage should be similar. +::: + +## Slots + +### default + +Any distributed content overlays the camera stream, wrapped in a `position: absolute` container. + +```html + + stuff here overlays the camera stream + +``` diff --git a/docs/api/README.md b/docs/api/README.md new file mode 100644 index 00000000..e69de29b diff --git a/docs/demos/CustomTracking.md b/docs/demos/CustomTracking.md new file mode 100644 index 00000000..2495e4c0 --- /dev/null +++ b/docs/demos/CustomTracking.md @@ -0,0 +1,16 @@ +# Customize Tracking + +You don't like the red square around detected QR codes? +No problem, you can also completely customize how visual tracking should look like! + +Also check out the `None` option. +Frames are scanned less frequently if tracking is disabled. +So this a way to improve performance for your target devices. + + + + + +### Source + +<<< @/docs/.vuepress/components/demos/CustomTracking.vue diff --git a/docs/demos/DecodeAll.md b/docs/demos/DecodeAll.md new file mode 100644 index 00000000..adaac67e --- /dev/null +++ b/docs/demos/DecodeAll.md @@ -0,0 +1,12 @@ +# Decode Continuously + +Hold a QR code in the camera and see what happens. Note, you can't scan the same +QR code multiple time in a row. + + + + + +### Source + +<<< @/docs/.vuepress/components/demos/DecodeAll.vue diff --git a/docs/demos/DragDrop.md b/docs/demos/DragDrop.md new file mode 100644 index 00000000..ce045c53 --- /dev/null +++ b/docs/demos/DragDrop.md @@ -0,0 +1,13 @@ +# Decode by Drag&Drop + +With the `QrcodeDropZone` component you can also drag-and-drop images that +should be scanned. Use it as a standalone feature or as a fallback for desktop +users. + + + + + +### Source + +<<< @/docs/.vuepress/components/demos/DragDrop.vue diff --git a/docs/demos/Fallback.md b/docs/demos/Fallback.md new file mode 100644 index 00000000..ab2f86d3 --- /dev/null +++ b/docs/demos/Fallback.md @@ -0,0 +1,13 @@ +# Fallback for desktop/mobile + +This demo combines all vue-qrcode-reader components to provide +fallbacks for both desktop users without a camera and legacy mobile users +without Stream API support. + + + + + +### Source + +<<< @/docs/.vuepress/components/demos/Fallback.vue diff --git a/docs/demos/Fullscreen.md b/docs/demos/Fullscreen.md new file mode 100644 index 00000000..c61d445c --- /dev/null +++ b/docs/demos/Fullscreen.md @@ -0,0 +1,13 @@ +# Fullscreen + +`QrcodeStream` always covers the entire space available. +Not more, not less. +So to go fullscreen, simply put the component in a wrapper element that occupies the entire screen. + + + + + +### Source + +<<< @/docs/.vuepress/components/demos/Fullscreen.vue diff --git a/docs/demos/LoadingIndicator.md b/docs/demos/LoadingIndicator.md new file mode 100644 index 00000000..3e7ca256 --- /dev/null +++ b/docs/demos/LoadingIndicator.md @@ -0,0 +1,14 @@ +# Show Loading Indicator + +There is some delay between mounting the component and the camera stream +becoming visible. Listen for the `init` event to show a loading indicator. + +Push the button below to force destroy and re-create the component. + + + + + +### Source + +<<< @/docs/.vuepress/components/demos/LoadingIndicator.vue diff --git a/docs/demos/README.md b/docs/demos/README.md new file mode 100644 index 00000000..e69de29b diff --git a/docs/demos/Simple.md b/docs/demos/Simple.md new file mode 100644 index 00000000..6d0d6c30 --- /dev/null +++ b/docs/demos/Simple.md @@ -0,0 +1,8 @@ +# Simple + +All demos on this page utilize [single-file components](https://vuejs.org/v2/guide/single-file-components.html). +To use them in your project you need a bundler like webpack. + +For simpler example that works without a build step and right in the browser, checkout [this fiddle](https://jsfiddle.net/vqg8to36/1/). + + diff --git a/docs/demos/SwitchCamera.md b/docs/demos/SwitchCamera.md new file mode 100644 index 00000000..0be6c996 --- /dev/null +++ b/docs/demos/SwitchCamera.md @@ -0,0 +1,12 @@ +# Switch to Front Camera + +You can also allow users to choose the front or rear camera on their +device. + + + + + +### Source + +<<< @/docs/.vuepress/components/demos/SwitchCamera.vue diff --git a/docs/demos/Torch.md b/docs/demos/Torch.md new file mode 100644 index 00000000..c2278098 --- /dev/null +++ b/docs/demos/Torch.md @@ -0,0 +1,15 @@ +# Torch (Flashlight) + +In low-light conditions you might want to make use of the cameras flashlight. +Using the `torch` prop, you can turn the flashlight on/off. +Note that support is inconsistent across devices and browers. + +Feature sponsored by [aeschbacher.ch](https://aeschbacher.ch) + + + + + +### Source + +<<< @/docs/.vuepress/components/demos/Torch.vue diff --git a/docs/demos/Upload.md b/docs/demos/Upload.md new file mode 100644 index 00000000..151c9122 --- /dev/null +++ b/docs/demos/Upload.md @@ -0,0 +1,16 @@ +# Decode by Upload + +Finally, with `QrcodeCapture` comes another component which allows image scanning via classic file upload. +If you are on mobile and your browser supports it, +your are not prompted with a file dialog but with your camera. +So you can directly take the picture to be uploaded. + +Note that nothing is actually uploaded. Everything is happening client-side. + + + + + +### Source + +<<< @/docs/.vuepress/components/demos/Upload.vue diff --git a/docs/demos/Validate.md b/docs/demos/Validate.md new file mode 100644 index 00000000..6e501951 --- /dev/null +++ b/docs/demos/Validate.md @@ -0,0 +1,13 @@ +# Pause & Validate + +By turning off the camera you can process each scanned QR-code one at a time. +The last received frame is still displayed so it just looks like the stream is +paused. + + + + + +### Source + +<<< @/docs/.vuepress/components/demos/Validate.vue diff --git a/package-lock.json b/package-lock.json index bb9f8016..ad7acef1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1847,6 +1847,12 @@ } } }, + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "dev": true + }, "@soda/friendly-errors-webpack-plugin": { "version": "1.7.1", "resolved": "https://registry.npm.taobao.org/@soda/friendly-errors-webpack-plugin/download/@soda/friendly-errors-webpack-plugin-1.7.1.tgz", @@ -1939,6 +1945,15 @@ "integrity": "sha1-pTUV2yXYA4N0OBtzryC7Ty5QjYc=", "dev": true }, + "@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "dev": true, + "requires": { + "defer-to-connect": "^1.0.1" + } + }, "@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -2590,6 +2605,421 @@ "integrity": "sha1-uw5G8VhafiibTuYGfcxaauYvHdE=", "dev": true }, + "@vuepress/core": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@vuepress/core/-/core-1.5.2.tgz", + "integrity": "sha512-DaRLzShuT116mu6ObsgfFXk+BX2c0W1Zp+BcIg1W5HrRhMZFnMvncdx9iiIjJhXdhVcaBYrVa3Y2624V113TBA==", + "dev": true, + "requires": { + "@babel/core": "^7.8.4", + "@vue/babel-preset-app": "^4.1.2", + "@vuepress/markdown": "1.5.2", + "@vuepress/markdown-loader": "1.5.2", + "@vuepress/plugin-last-updated": "1.5.2", + "@vuepress/plugin-register-components": "1.5.2", + "@vuepress/shared-utils": "1.5.2", + "autoprefixer": "^9.5.1", + "babel-loader": "^8.0.4", + "cache-loader": "^3.0.0", + "chokidar": "^2.0.3", + "connect-history-api-fallback": "^1.5.0", + "copy-webpack-plugin": "^5.0.2", + "core-js": "^3.6.4", + "cross-spawn": "^6.0.5", + "css-loader": "^2.1.1", + "file-loader": "^3.0.1", + "js-yaml": "^3.13.1", + "lru-cache": "^5.1.1", + "mini-css-extract-plugin": "0.6.0", + "optimize-css-assets-webpack-plugin": "^5.0.1", + "portfinder": "^1.0.13", + "postcss-loader": "^3.0.0", + "postcss-safe-parser": "^4.0.1", + "toml": "^3.0.0", + "url-loader": "^1.0.1", + "vue": "^2.6.10", + "vue-loader": "^15.7.1", + "vue-router": "^3.1.3", + "vue-server-renderer": "^2.6.10", + "vue-template-compiler": "^2.6.10", + "vuepress-html-webpack-plugin": "^3.2.0", + "vuepress-plugin-container": "^2.0.2", + "webpack": "^4.8.1", + "webpack-chain": "^6.0.0", + "webpack-dev-server": "^3.5.1", + "webpack-merge": "^4.1.2", + "webpackbar": "3.2.0" + }, + "dependencies": { + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true + }, + "cache-loader": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/cache-loader/-/cache-loader-3.0.1.tgz", + "integrity": "sha512-HzJIvGiGqYsFUrMjAJNDbVZoG7qQA+vy9AIoKs7s9DscNfki0I589mf2w6/tW+kkFH3zyiknoWV5Jdynu6b/zw==", + "dev": true, + "requires": { + "buffer-json": "^2.0.0", + "find-cache-dir": "^2.1.0", + "loader-utils": "^1.2.3", + "mkdirp": "^0.5.1", + "neo-async": "^2.6.1", + "schema-utils": "^1.0.0" + } + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, + "css-loader": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-2.1.1.tgz", + "integrity": "sha512-OcKJU/lt232vl1P9EEDamhoO9iKY3tIjY5GU+XDLblAykTdgs6Ux9P1hTHve8nFKy5KPpOXOsVI/hIwi3841+w==", + "dev": true, + "requires": { + "camelcase": "^5.2.0", + "icss-utils": "^4.1.0", + "loader-utils": "^1.2.3", + "normalize-path": "^3.0.0", + "postcss": "^7.0.14", + "postcss-modules-extract-imports": "^2.0.0", + "postcss-modules-local-by-default": "^2.0.6", + "postcss-modules-scope": "^2.1.0", + "postcss-modules-values": "^2.0.0", + "postcss-value-parser": "^3.3.0", + "schema-utils": "^1.0.0" + } + }, + "file-loader": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-3.0.1.tgz", + "integrity": "sha512-4sNIOXgtH/9WZq4NvlfU3Opn5ynUsqBwSLyM+I7UOwdGigTBYfVVQEwe/msZNX/j4pCJTIM14Fsw66Svo1oVrw==", + "dev": true, + "requires": { + "loader-utils": "^1.0.2", + "schema-utils": "^1.0.0" + } + }, + "fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "dev": true, + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "mini-css-extract-plugin": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.6.0.tgz", + "integrity": "sha512-79q5P7YGI6rdnVyIAV4NXpBQJFWdkzJxCim3Kog4078fM0piAaFlwocqbejdWtLW1cEzCexPrh6EdyFsPgVdAw==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "normalize-url": "^2.0.1", + "schema-utils": "^1.0.0", + "webpack-sources": "^1.1.0" + } + }, + "normalize-url": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", + "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", + "dev": true, + "requires": { + "prepend-http": "^2.0.0", + "query-string": "^5.0.1", + "sort-keys": "^2.0.0" + } + }, + "postcss-modules-local-by-default": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-2.0.6.tgz", + "integrity": "sha512-oLUV5YNkeIBa0yQl7EYnxMgy4N6noxmiwZStaEJUSe2xPMcdNc8WmBQuQCx18H5psYbVxz8zoHk0RAAYZXP9gA==", + "dev": true, + "requires": { + "postcss": "^7.0.6", + "postcss-selector-parser": "^6.0.0", + "postcss-value-parser": "^3.3.1" + } + }, + "postcss-modules-values": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-2.0.0.tgz", + "integrity": "sha512-Ki7JZa7ff1N3EIMlPnGTZfUMe69FFwiQPnVSXC9mnn3jozCRBYIxiZd44yJOV2AmabOo4qFf8s0dC/+lweG7+w==", + "dev": true, + "requires": { + "icss-replace-symbols": "^1.1.0", + "postcss": "^7.0.6" + } + }, + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true + }, + "query-string": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "dev": true, + "requires": { + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "sort-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", + "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", + "dev": true, + "requires": { + "is-plain-obj": "^1.0.0" + } + }, + "url-loader": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-1.1.2.tgz", + "integrity": "sha512-dXHkKmw8FhPqu8asTc1puBfe3TehOCo2+RmOOev5suNCIYBcT626kxiWg1NBVkwc4rO8BGa7gP70W7VXuqHrjg==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "mime": "^2.0.3", + "schema-utils": "^1.0.0" + } + } + } + }, + "@vuepress/markdown": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@vuepress/markdown/-/markdown-1.5.2.tgz", + "integrity": "sha512-736fVRZh4x3QOORWhhz2IzCdrOKOnGL7KpWQ59Y+lg7SYNETRvxGxGXTFGrfd+hR9GugThj952BaWWpUCrO7fw==", + "dev": true, + "requires": { + "@vuepress/shared-utils": "1.5.2", + "markdown-it": "^8.4.1", + "markdown-it-anchor": "^5.0.2", + "markdown-it-chain": "^1.3.0", + "markdown-it-emoji": "^1.4.0", + "markdown-it-table-of-contents": "^0.4.0", + "prismjs": "^1.13.0" + } + }, + "@vuepress/markdown-loader": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@vuepress/markdown-loader/-/markdown-loader-1.5.2.tgz", + "integrity": "sha512-ZRW/sQk5EK1yNKjWFNdfLmdlQXgT8GUBrnWQDV6FRwh5r+NmSJsgEYISmewGgGGzlUY+GUJKiUjGhe7itztB2Q==", + "dev": true, + "requires": { + "@vuepress/markdown": "1.5.2", + "loader-utils": "^1.1.0", + "lru-cache": "^5.1.1" + } + }, + "@vuepress/plugin-active-header-links": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@vuepress/plugin-active-header-links/-/plugin-active-header-links-1.5.2.tgz", + "integrity": "sha512-bZP/0jpouVSvMypixx2/I7kxWFUV4HfwLNx7UxbtuDrykQzXnA2cz6yTra8Y1ZoXACbRp6TIqGlWpCUafBzyww==", + "dev": true, + "requires": { + "lodash.debounce": "^4.0.8" + } + }, + "@vuepress/plugin-last-updated": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@vuepress/plugin-last-updated/-/plugin-last-updated-1.5.2.tgz", + "integrity": "sha512-wTq1reNSpGTSPJcnUHFfg+qpZBg88yXv3fZNWnEGSdiuUnbF4bFMTUr9tSaWHzMgtajvzY2B8VnTmrhy2ABfsA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.5" + } + }, + "@vuepress/plugin-nprogress": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@vuepress/plugin-nprogress/-/plugin-nprogress-1.5.2.tgz", + "integrity": "sha512-PtiV5u9hHZJNPmyKs7s++f4GCJTuvPP25aIASi06vKACr/+Ier5XC7PvOwUvS1LbG6HAGRbQpokmeP1aVbrI6w==", + "dev": true, + "requires": { + "nprogress": "^0.2.0" + } + }, + "@vuepress/plugin-register-components": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@vuepress/plugin-register-components/-/plugin-register-components-1.5.2.tgz", + "integrity": "sha512-e0GYZG6KXa7axy8GO9sNtLaZNW+lXlidWCURg61/gfKISG5yzKr71n75j5V7pyEJ/idAV/sAakunp7+6nsShDg==", + "dev": true, + "requires": { + "@vuepress/shared-utils": "1.5.2" + } + }, + "@vuepress/plugin-search": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@vuepress/plugin-search/-/plugin-search-1.5.2.tgz", + "integrity": "sha512-/n0W7lQhBCj7vrIhU6VL8ZlUnWBru83W4w0gGNxzXDzZ1AMRJRnQDamBjKAWNd+WMYz8LA2LbJy1rCCds1Mu2Q==", + "dev": true + }, + "@vuepress/shared-utils": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@vuepress/shared-utils/-/shared-utils-1.5.2.tgz", + "integrity": "sha512-msDE6Mpof9JDVZQDHYUbsKmQm4aT/CUlUnItlORF+0J4xrIzv96dldJb8pvloDNUjyvB3DXeDJrV4V1XzpwsIA==", + "dev": true, + "requires": { + "chalk": "^2.3.2", + "diacritics": "^1.3.0", + "escape-html": "^1.0.3", + "fs-extra": "^7.0.1", + "globby": "^9.2.0", + "gray-matter": "^4.0.1", + "hash-sum": "^1.0.2", + "semver": "^6.0.0", + "upath": "^1.1.0" + }, + "dependencies": { + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "hash-sum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz", + "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "@vuepress/theme-default": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@vuepress/theme-default/-/theme-default-1.5.2.tgz", + "integrity": "sha512-sO44ExAoO+pNO5qJJvlFin1vaBjxYkTO5oiBu53sYoInAoN3liG1uraMpyaGmhdmzCSlGQpqH+ojtnISTmfAcg==", + "dev": true, + "requires": { + "@vuepress/plugin-active-header-links": "1.5.2", + "@vuepress/plugin-nprogress": "1.5.2", + "@vuepress/plugin-search": "1.5.2", + "docsearch.js": "^2.5.2", + "lodash": "^4.17.15", + "stylus": "^0.54.5", + "stylus-loader": "^3.0.2", + "vuepress-plugin-container": "^2.0.2", + "vuepress-plugin-smooth-scroll": "^0.0.3" + } + }, "@webassemblyjs/ast": { "version": "1.9.0", "resolved": "https://registry.npm.taobao.org/@webassemblyjs/ast/download/@webassemblyjs/ast-1.9.0.tgz", @@ -2852,6 +3282,12 @@ "debug": "4" } }, + "agentkeepalive": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-2.2.0.tgz", + "integrity": "sha1-xdG9SxKQCPEWPyNvhuX66iAm4u8=", + "dev": true + }, "aggregate-error": { "version": "3.0.1", "resolved": "https://registry.npm.taobao.org/aggregate-error/download/aggregate-error-3.0.1.tgz", @@ -2894,12 +3330,107 @@ "integrity": "sha1-uDyonF1C1pAx9CTK1JqtoCNsaVc=", "dev": true }, + "algoliasearch": { + "version": "3.35.1", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-3.35.1.tgz", + "integrity": "sha512-K4yKVhaHkXfJ/xcUnil04xiSrB8B8yHZoFEhWNpXg23eiCnqvTZw1tn/SqvdsANlYHLJlKl0qi3I/Q2Sqo7LwQ==", + "dev": true, + "requires": { + "agentkeepalive": "^2.2.0", + "debug": "^2.6.9", + "envify": "^4.0.0", + "es6-promise": "^4.1.0", + "events": "^1.1.0", + "foreach": "^2.0.5", + "global": "^4.3.2", + "inherits": "^2.0.1", + "isarray": "^2.0.1", + "load-script": "^1.0.0", + "object-keys": "^1.0.11", + "querystring-es3": "^0.2.1", + "reduce": "^1.0.1", + "semver": "^5.1.0", + "tunnel-agent": "^0.6.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "dev": true + }, + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, "alphanum-sort": { "version": "1.0.2", "resolved": "https://registry.npm.taobao.org/alphanum-sort/download/alphanum-sort-1.0.2.tgz", "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", "dev": true }, + "ansi-align": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", + "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", + "dev": true, + "requires": { + "string-width": "^3.0.0" + }, + "dependencies": { + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, "ansi-colors": { "version": "3.2.3", "resolved": "https://registry.npm.taobao.org/ansi-colors/download/ansi-colors-3.2.3.tgz", @@ -3170,6 +3701,15 @@ "integrity": "sha1-bZUX654DDSQ2ZmZR6GvZ9vE1M8k=", "dev": true }, + "autocomplete.js": { + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/autocomplete.js/-/autocomplete.js-0.36.0.tgz", + "integrity": "sha512-jEwUXnVMeCHHutUt10i/8ZiRaCb0Wo+ZyKxeGsYwBDtw6EJHqEeDrq4UwZRD8YBSvp3g6klP678il2eeiVXN2Q==", + "dev": true, + "requires": { + "immediate": "^3.2.3" + } + }, "autoprefixer": { "version": "9.8.5", "resolved": "https://registry.npm.taobao.org/autoprefixer/download/autoprefixer-9.8.5.tgz?cache=0&sync_timestamp=1594444791143&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fautoprefixer%2Fdownload%2Fautoprefixer-9.8.5.tgz", @@ -3443,6 +3983,97 @@ "integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==", "dev": true }, + "boxen": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", + "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==", + "dev": true, + "requires": { + "ansi-align": "^3.0.0", + "camelcase": "^5.3.1", + "chalk": "^3.0.0", + "cli-boxes": "^2.2.0", + "string-width": "^4.1.0", + "term-size": "^2.1.0", + "type-fest": "^0.8.1", + "widest-line": "^3.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz", @@ -3665,6 +4296,12 @@ "integrity": "sha1-9s95M6Ng4FiPqf3oVlHNx/gF0fY=", "dev": true }, + "cac": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.6.1.tgz", + "integrity": "sha512-uhki4T3Ax68hw7Dufi0bATVAF8ayBSwOKUEJHjObPrUN4tlQ8Lf7oljpTje/mArLxYN0D743c2zJt4C1bVTCqg==", + "dev": true + }, "cacache": { "version": "12.0.4", "resolved": "https://registry.npm.taobao.org/cacache/download/cacache-12.0.4.tgz?cache=0&sync_timestamp=1594429684526&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-12.0.4.tgz", @@ -3790,6 +4427,44 @@ } } }, + "cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "dev": true, + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "dependencies": { + "get-stream": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", + "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true + }, + "normalize-url": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", + "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", + "dev": true + } + } + }, "cachedir": { "version": "1.3.0", "resolved": "https://registry.npm.taobao.org/cachedir/download/cachedir-1.3.0.tgz", @@ -4083,6 +4758,12 @@ "integrity": "sha1-7oRy27Ep5yezHooQpCfe6d/kAIs=", "dev": true }, + "cli-boxes": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.0.tgz", + "integrity": "sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w==", + "dev": true + }, "cli-cursor": { "version": "2.1.0", "resolved": "https://registry.npm.taobao.org/cli-cursor/download/cli-cursor-2.1.0.tgz", @@ -4297,6 +4978,18 @@ "integrity": "sha1-ovSEN6LKqaIkNueUvwceyeYc7fY=", "dev": true }, + "clipboard": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.6.tgz", + "integrity": "sha512-g5zbiixBRk/wyKakSwCKd7vQXDjFnAMGHoEyBogG/bw9kTD9GvdAvaoRR1ALcEzt3pVKxZR0pViekPMIS0QyGg==", + "dev": true, + "optional": true, + "requires": { + "good-listener": "^1.2.2", + "select": "^1.1.2", + "tiny-emitter": "^2.0.0" + } + }, "clipboardy": { "version": "2.3.0", "resolved": "https://registry.npm.taobao.org/clipboardy/download/clipboardy-2.3.0.tgz", @@ -4370,6 +5063,15 @@ "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", "dev": true }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, "coa": { "version": "2.0.2", "resolved": "https://registry.npm.taobao.org/coa/download/coa-2.0.2.tgz", @@ -4610,12 +5312,49 @@ "proto-list": "~1.2.1" } }, + "configstore": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "graceful-fs": "^4.1.2", + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" + }, + "dependencies": { + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, "connect-history-api-fallback": { "version": "1.6.0", "resolved": "https://registry.npm.taobao.org/connect-history-api-fallback/download/connect-history-api-fallback-1.6.0.tgz", "integrity": "sha1-izIIk1kwjRERFdgcrT/Oq4iPl7w=", "dev": true }, + "consola": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/consola/-/consola-2.14.0.tgz", + "integrity": "sha512-A2j1x4u8d6SIVikhZROfpFJxQZie+cZOfQMyI/tu2+hWXe8iAv7R6FW6s6x04/7zBCst94lPddztot/d6GJiuQ==", + "dev": true + }, "console-browserify": { "version": "1.2.0", "resolved": "https://registry.npm.taobao.org/console-browserify/download/console-browserify-1.2.0.tgz", @@ -5004,6 +5743,26 @@ "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", "dev": true }, + "css": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz", + "integrity": "sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "source-map": "^0.6.1", + "source-map-resolve": "^0.5.2", + "urix": "^0.1.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "css-color-names": { "version": "0.0.4", "resolved": "https://registry.npm.taobao.org/css-color-names/download/css-color-names-0.0.4.tgz", @@ -5049,6 +5808,15 @@ } } }, + "css-parse": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-2.0.0.tgz", + "integrity": "sha1-pGjuZnwW2BzPBcWMONKpfHgNv9Q=", + "dev": true, + "requires": { + "css": "^2.0.0" + } + }, "css-select": { "version": "2.1.0", "resolved": "https://registry.npm.taobao.org/css-select/download/css-select-2.1.0.tgz", @@ -5454,6 +6222,15 @@ "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", "dev": true }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, "dedent": { "version": "0.7.0", "resolved": "https://registry.npm.taobao.org/dedent/download/dedent-0.7.0.tgz", @@ -5625,6 +6402,12 @@ "clone": "^1.0.2" } }, + "defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "dev": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npm.taobao.org/define-properties/download/define-properties-1.1.3.tgz", @@ -5725,6 +6508,13 @@ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, + "delegate": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", + "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==", + "dev": true, + "optional": true + }, "depd": { "version": "1.1.2", "resolved": "https://registry.npm.taobao.org/depd/download/depd-1.1.2.tgz", @@ -5759,6 +6549,12 @@ "integrity": "sha1-AU7o+PZpxcWAI9pkuBecCDooxGw=", "dev": true }, + "diacritics": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/diacritics/-/diacritics-1.3.0.tgz", + "integrity": "sha1-PvqHMj67hj5mls67AILUj/PW96E=", + "dev": true + }, "diff": { "version": "3.5.0", "resolved": "https://registry.npm.taobao.org/diff/download/diff-3.5.0.tgz?cache=0&sync_timestamp=1589251002624&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdiff%2Fdownload%2Fdiff-3.5.0.tgz", @@ -5818,6 +6614,21 @@ "buffer-indexof": "^1.0.0" } }, + "docsearch.js": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/docsearch.js/-/docsearch.js-2.6.3.tgz", + "integrity": "sha512-GN+MBozuyz664ycpZY0ecdQE0ND/LSgJKhTLA0/v3arIS3S1Rpf2OJz6A35ReMsm91V5apcmzr5/kM84cvUg+A==", + "dev": true, + "requires": { + "algoliasearch": "^3.24.5", + "autocomplete.js": "0.36.0", + "hogan.js": "^3.0.2", + "request": "^2.87.0", + "stack-utils": "^1.0.1", + "to-factory": "^1.0.0", + "zepto": "^1.2.0" + } + }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npm.taobao.org/doctrine/download/doctrine-3.0.0.tgz", @@ -5860,6 +6671,12 @@ } } }, + "dom-walk": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", + "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==", + "dev": true + }, "domain-browser": { "version": "1.2.0", "resolved": "https://registry.npm.taobao.org/domain-browser/download/domain-browser-1.2.0.tgz?cache=0&sync_timestamp=1593752811901&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdomain-browser%2Fdownload%2Fdomain-browser-1.2.0.tgz", @@ -5936,6 +6753,12 @@ "readable-stream": "^2.0.2" } }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, "duplexify": { "version": "3.7.1", "resolved": "https://registry.npm.taobao.org/duplexify/download/duplexify-3.7.1.tgz", @@ -6206,6 +7029,22 @@ } } }, + "envify": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/envify/-/envify-4.1.0.tgz", + "integrity": "sha512-IKRVVoAYr4pIx4yIWNsz9mOsboxlNXiu7TNBnem/K/uTHdkyzXWDzHCK7UTolqBbgaBz0tQHsD3YNls0uIIjiw==", + "dev": true, + "requires": { + "esprima": "^4.0.0", + "through": "~2.3.4" + } + }, + "envinfo": { + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.5.1.tgz", + "integrity": "sha512-hQBkDf2iO4Nv0CNHpCuSBeaSrveU6nThVxFGTrq/eDlV716UQk09zChaJae4mZRsos1x4YLY2TaH3LHUae3ZmQ==", + "dev": true + }, "errno": { "version": "0.1.7", "resolved": "https://registry.npm.taobao.org/errno/download/errno-0.1.7.tgz", @@ -6263,12 +7102,24 @@ "is-symbol": "^1.0.2" } }, + "es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "dev": true + }, "escalade": { "version": "3.0.2", "resolved": "https://registry.npm.taobao.org/escalade/download/escalade-3.0.2.tgz?cache=0&sync_timestamp=1594743030008&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescalade%2Fdownload%2Fescalade-3.0.2.tgz", "integrity": "sha1-algNcO24eIDyK0yR0NVgeN9pYsQ=", "dev": true }, + "escape-goat": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "dev": true + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz", @@ -7209,6 +8060,12 @@ "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", "dev": true }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", + "dev": true + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npm.taobao.org/forever-agent/download/forever-agent-0.6.1.tgz", @@ -7431,6 +8288,16 @@ "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", "dev": true }, + "global": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", + "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", + "dev": true, + "requires": { + "min-document": "^2.19.0", + "process": "^0.11.10" + } + }, "global-dirs": { "version": "0.1.1", "resolved": "https://registry.npm.taobao.org/global-dirs/download/global-dirs-0.1.1.tgz", @@ -7462,12 +8329,53 @@ "slash": "^2.0.0" } }, + "good-listener": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", + "integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=", + "dev": true, + "optional": true, + "requires": { + "delegate": "^3.1.2" + } + }, + "got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "dev": true, + "requires": { + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + } + }, "graceful-fs": { "version": "4.2.4", "resolved": "https://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.2.4.tgz", "integrity": "sha1-Ila94U02MpWMRl68ltxGfKB6Kfs=", "dev": true }, + "gray-matter": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.2.tgz", + "integrity": "sha512-7hB/+LxrOjq/dd8APlK0r24uL/67w7SkYnfwhNFwg/VDIGWGmduTDYf3WNstLW2fbbmRwrDGCVSJ2isuf2+4Hw==", + "dev": true, + "requires": { + "js-yaml": "^3.11.0", + "kind-of": "^6.0.2", + "section-matter": "^1.0.0", + "strip-bom-string": "^1.0.0" + } + }, "growl": { "version": "1.10.5", "resolved": "https://registry.npm.taobao.org/growl/download/growl-1.10.5.tgz", @@ -7603,6 +8511,12 @@ } } }, + "has-yarn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", + "dev": true + }, "hash-base": { "version": "3.1.0", "resolved": "https://registry.npm.taobao.org/hash-base/download/hash-base-3.1.0.tgz", @@ -7678,6 +8592,33 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "hogan.js": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/hogan.js/-/hogan.js-3.0.2.tgz", + "integrity": "sha1-TNnhq9QpQUbnZ55B14mHMrAse/0=", + "dev": true, + "requires": { + "mkdirp": "0.3.0", + "nopt": "1.0.10" + }, + "dependencies": { + "mkdirp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", + "integrity": "sha1-G79asbqCevI1dRQ0kEJkVfSB/h4=", + "dev": true + }, + "nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", + "dev": true, + "requires": { + "abbrev": "1" + } + } + } + }, "hook-std": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/hook-std/-/hook-std-2.0.0.tgz", @@ -7866,6 +8807,12 @@ } } }, + "http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "dev": true + }, "http-deceiver": { "version": "1.2.7", "resolved": "https://registry.npm.taobao.org/http-deceiver/download/http-deceiver-1.2.7.tgz", @@ -7969,6 +8916,12 @@ "safer-buffer": ">= 2.1.2 < 3" } }, + "icss-replace-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", + "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=", + "dev": true + }, "icss-utils": { "version": "4.1.1", "resolved": "https://registry.npm.taobao.org/icss-utils/download/icss-utils-4.1.1.tgz", @@ -7996,6 +8949,12 @@ "integrity": "sha1-dQ49tYYgh7RzfrrIIH/9HvJ7Jfw=", "dev": true }, + "immediate": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.3.0.tgz", + "integrity": "sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q==", + "dev": true + }, "import-cwd": { "version": "2.1.0", "resolved": "https://registry.npm.taobao.org/import-cwd/download/import-cwd-2.1.0.tgz", @@ -8024,6 +8983,12 @@ "resolve-from": "^3.0.0" } }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true + }, "import-local": { "version": "2.0.0", "resolved": "https://registry.npm.taobao.org/import-local/download/import-local-2.0.0.tgz", @@ -8491,6 +9456,12 @@ "is-path-inside": "^1.0.0" } }, + "is-npm": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz", + "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==", + "dev": true + }, "is-number": { "version": "3.0.0", "resolved": "https://registry.npm.taobao.org/is-number/download/is-number-3.0.0.tgz", @@ -8668,6 +9639,12 @@ "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", "dev": true }, + "is-yarn-global": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", + "dev": true + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", @@ -8867,6 +9844,12 @@ "integrity": "sha1-gFZNLkg9rPbo7yCWUKZ98/DCg6Q=", "dev": true }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npm.taobao.org/json-parse-better-errors/download/json-parse-better-errors-1.0.2.tgz", @@ -8939,6 +9922,15 @@ "verror": "1.10.0" } }, + "keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "dev": true, + "requires": { + "json-buffer": "3.0.0" + } + }, "killable": { "version": "1.0.1", "resolved": "https://registry.npm.taobao.org/killable/download/killable-1.0.1.tgz", @@ -8951,6 +9943,25 @@ "integrity": "sha1-B8BQNKbDSfoG4k+jWqdttFgM5N0=", "dev": true }, + "last-call-webpack-plugin": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/last-call-webpack-plugin/-/last-call-webpack-plugin-3.0.0.tgz", + "integrity": "sha512-7KI2l2GIZa9p2spzPIVZBYyNKkN+e/SQPpnjlTiPhdbDW3F86tdKKELxKpzJ5sgU19wQWsACULZmpTPYHeWO5w==", + "dev": true, + "requires": { + "lodash": "^4.17.5", + "webpack-sources": "^1.1.0" + } + }, + "latest-version": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", + "dev": true, + "requires": { + "package-json": "^6.3.0" + } + }, "launch-editor": { "version": "2.2.1", "resolved": "https://registry.npm.taobao.org/launch-editor/download/launch-editor-2.2.1.tgz", @@ -9007,6 +10018,15 @@ "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", "dev": true }, + "linkify-it": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", + "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", + "dev": true, + "requires": { + "uc.micro": "^1.0.1" + } + }, "lint-staged": { "version": "9.5.0", "resolved": "https://registry.npm.taobao.org/lint-staged/download/lint-staged-9.5.0.tgz", @@ -9814,6 +10834,12 @@ } } }, + "load-script": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/load-script/-/load-script-1.0.0.tgz", + "integrity": "sha1-BJGTngvuVkPuSUp+PaPSuscMbKQ=", + "dev": true + }, "loader-fs-cache": { "version": "1.0.3", "resolved": "https://registry.npm.taobao.org/loader-fs-cache/download/loader-fs-cache-1.0.3.tgz", @@ -9909,12 +10935,30 @@ "integrity": "sha1-5I3e2+MLMyF4PFtDAfvTU7weSks=", "dev": true }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, "lodash.capitalize": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/lodash.capitalize/-/lodash.capitalize-4.2.1.tgz", "integrity": "sha1-+CbJtOKoUR2E46yinbBeGk87cqk=", "dev": true }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, "lodash.defaultsdeep": { "version": "4.6.1", "resolved": "https://registry.npm.taobao.org/lodash.defaultsdeep/download/lodash.defaultsdeep-4.6.1.tgz", @@ -9975,6 +11019,25 @@ "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", "dev": true }, + "lodash.template": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", + "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0", + "lodash.templatesettings": "^4.0.0" + } + }, + "lodash.templatesettings": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz", + "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0" + } + }, "lodash.toarray": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz", @@ -10066,6 +11129,12 @@ "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", "dev": true }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-5.1.1.tgz?cache=0&sync_timestamp=1594427614275&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-5.1.1.tgz", @@ -10112,6 +11181,78 @@ "object-visit": "^1.0.0" } }, + "markdown-it": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", + "integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "entities": "~1.1.1", + "linkify-it": "^2.0.0", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + }, + "dependencies": { + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "dev": true + } + } + }, + "markdown-it-anchor": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-5.3.0.tgz", + "integrity": "sha512-/V1MnLL/rgJ3jkMWo84UR+K+jF1cxNG1a+KwqeXqTIJ+jtA8aWSHuigx8lTzauiIjBDbwF3NcWQMotd0Dm39jA==", + "dev": true + }, + "markdown-it-chain": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/markdown-it-chain/-/markdown-it-chain-1.3.0.tgz", + "integrity": "sha512-XClV8I1TKy8L2qsT9iX3qiV+50ZtcInGXI80CA+DP62sMs7hXlyV/RM3hfwy5O3Ad0sJm9xIwQELgANfESo8mQ==", + "dev": true, + "requires": { + "webpack-chain": "^4.9.0" + }, + "dependencies": { + "javascript-stringify": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/javascript-stringify/-/javascript-stringify-1.6.0.tgz", + "integrity": "sha1-FC0RHzpuPa6PSpr9d9RYVbWpzOM=", + "dev": true + }, + "webpack-chain": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/webpack-chain/-/webpack-chain-4.12.1.tgz", + "integrity": "sha512-BCfKo2YkDe2ByqkEWe1Rw+zko4LsyS75LVr29C6xIrxAg9JHJ4pl8kaIZ396SUSNp6b4815dRZPSTAS8LlURRQ==", + "dev": true, + "requires": { + "deepmerge": "^1.5.2", + "javascript-stringify": "^1.6.0" + } + } + } + }, + "markdown-it-container": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/markdown-it-container/-/markdown-it-container-2.0.0.tgz", + "integrity": "sha1-ABm0P9Au7+zi8ZYKKJX7qBpARpU=", + "dev": true + }, + "markdown-it-emoji": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/markdown-it-emoji/-/markdown-it-emoji-1.4.0.tgz", + "integrity": "sha1-m+4OmpkKljupbfaYDE/dsF37Tcw=", + "dev": true + }, + "markdown-it-table-of-contents": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/markdown-it-table-of-contents/-/markdown-it-table-of-contents-0.4.4.tgz", + "integrity": "sha512-TAIHTHPwa9+ltKvKPWulm/beozQU41Ab+FIefRaQV1NRnpzwcV9QOe6wXQS5WLivm5Q/nlo0rl6laGkMDZE7Gw==", + "dev": true + }, "marked": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/marked/-/marked-1.1.1.tgz", @@ -10216,6 +11357,12 @@ "integrity": "sha1-aZs8OKxvHXKAkaZGULZdOIUC/Vs=", "dev": true }, + "mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", + "dev": true + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npm.taobao.org/media-typer/download/media-typer-0.3.0.tgz", @@ -10392,6 +11539,21 @@ "integrity": "sha1-ggyGo5M0ZA6ZUWkovQP8qIBX0CI=", "dev": true }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true + }, + "min-document": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", + "dev": true, + "requires": { + "dom-walk": "^0.1.0" + } + }, "min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", @@ -14768,6 +15930,12 @@ "path-key": "^2.0.0" } }, + "nprogress": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/nprogress/-/nprogress-0.2.0.tgz", + "integrity": "sha1-y480xTIT2JVyP8urkH6UIq28r7E=", + "dev": true + }, "nth-check": { "version": "1.0.2", "resolved": "https://registry.npm.taobao.org/nth-check/download/nth-check-1.0.2.tgz", @@ -14966,6 +16134,12 @@ "is-wsl": "^1.1.0" } }, + "opencollective-postinstall": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz", + "integrity": "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==", + "dev": true + }, "opener": { "version": "1.5.1", "resolved": "https://registry.npm.taobao.org/opener/download/opener-1.5.1.tgz", @@ -14981,6 +16155,16 @@ "is-wsl": "^1.1.0" } }, + "optimize-css-assets-webpack-plugin": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/optimize-css-assets-webpack-plugin/-/optimize-css-assets-webpack-plugin-5.0.3.tgz", + "integrity": "sha512-q9fbvCRS6EYtUKKSwI87qm2IxlyJK5b4dygW1rKUBT6mMDhdG5e5bZT63v6tnJR9F9FB/H5a0HTmtw+laUBxKA==", + "dev": true, + "requires": { + "cssnano": "^4.1.10", + "last-call-webpack-plugin": "^3.0.0" + } + }, "optionator": { "version": "0.8.3", "resolved": "https://registry.npm.taobao.org/optionator/download/optionator-0.8.3.tgz", @@ -15067,6 +16251,12 @@ "os-tmpdir": "^1.0.0" } }, + "p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "dev": true + }, "p-each-series": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.1.0.tgz", @@ -15147,6 +16337,26 @@ "integrity": "sha1-yyhoVA4xPWHeWPr741zpAE1VQOY=", "dev": true }, + "package-json": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", + "dev": true, + "requires": { + "got": "^9.6.0", + "registry-auth-token": "^4.0.0", + "registry-url": "^5.0.0", + "semver": "^6.2.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, "pako": { "version": "1.0.11", "resolved": "https://registry.npm.taobao.org/pako/download/pako-1.0.11.tgz", @@ -16035,6 +17245,15 @@ } } }, + "postcss-safe-parser": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-4.0.2.tgz", + "integrity": "sha512-Uw6ekxSWNLCPesSv/cmqf2bY/77z11O7jZGPax3ycZMFU/oi2DMH9i89AdHc1tRwFg/arFoEwX0IS3LCUxJh1g==", + "dev": true, + "requires": { + "postcss": "^7.0.26" + } + }, "postcss-selector-parser": { "version": "6.0.2", "resolved": "https://registry.npm.taobao.org/postcss-selector-parser/download/postcss-selector-parser-6.0.2.tgz", @@ -16142,6 +17361,21 @@ "utila": "~0.4" } }, + "pretty-time": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pretty-time/-/pretty-time-1.1.0.tgz", + "integrity": "sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==", + "dev": true + }, + "prismjs": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.20.0.tgz", + "integrity": "sha512-AEDjSrVNkynnw6A+B1DsFkd6AVdTnp+/WoUixFRULlCLZVRZlVQMVWio/16jv7G1FscUxQxOQhWwApgbnxr6kQ==", + "dev": true, + "requires": { + "clipboard": "^2.0.0" + } + }, "process": { "version": "0.11.10", "resolved": "https://registry.npm.taobao.org/process/download/process-0.11.10.tgz", @@ -16261,6 +17495,15 @@ "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew=", "dev": true }, + "pupa": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.0.1.tgz", + "integrity": "sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA==", + "dev": true, + "requires": { + "escape-goat": "^2.0.0" + } + }, "q": { "version": "1.5.1", "resolved": "https://registry.npm.taobao.org/q/download/q-1.5.1.tgz", @@ -16488,6 +17731,15 @@ "esprima": "~4.0.0" } }, + "reduce": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/reduce/-/reduce-1.0.2.tgz", + "integrity": "sha512-xX7Fxke/oHO5IfZSk77lvPa/7bjMh9BuCk4OOoX5XTXrM7s0Z+MkPfSDfz0q7r91BhhGSs8gii/VEN/7zhCPpQ==", + "dev": true, + "requires": { + "object-keys": "^1.1.0" + } + }, "regenerate": { "version": "1.4.1", "resolved": "https://registry.npm.taobao.org/regenerate/download/regenerate-1.4.1.tgz", @@ -16567,6 +17819,15 @@ "rc": "^1.2.8" } }, + "registry-url": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", + "dev": true, + "requires": { + "rc": "^1.2.8" + } + }, "regjsgen": { "version": "0.5.2", "resolved": "https://registry.npm.taobao.org/regjsgen/download/regjsgen-0.5.2.tgz", @@ -16786,6 +18047,15 @@ "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", "dev": true }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "requires": { + "lowercase-keys": "^1.0.0" + } + }, "restore-cursor": { "version": "2.0.0", "resolved": "https://registry.npm.taobao.org/restore-cursor/download/restore-cursor-2.0.0.tgz", @@ -16935,6 +18205,34 @@ "resolved": "https://registry.npmjs.org/sdp/-/sdp-2.12.0.tgz", "integrity": "sha512-jhXqQAQVM+8Xj5EjJGVweuEzgtGWb3tmEEpl3CLP3cStInSbVHSg0QWOGQzNq8pSID4JkpeV2mPqlMDLrm0/Vw==" }, + "section-matter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", + "integrity": "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "kind-of": "^6.0.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "select": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", + "integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=", + "dev": true, + "optional": true + }, "select-hose": { "version": "2.0.0", "resolved": "https://registry.npm.taobao.org/select-hose/download/select-hose-2.0.0.tgz", @@ -17636,6 +18934,12 @@ "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", "dev": true }, + "smoothscroll-polyfill": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/smoothscroll-polyfill/-/smoothscroll-polyfill-0.4.4.tgz", + "integrity": "sha512-TK5ZA9U5RqCwMpfoMq/l1mrH0JAR7y7KRvOBx0n2869aLxch+gT9GhN3yUfjiw+d/DiF1mKo14+hd62JyMmoBg==", + "dev": true + }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npm.taobao.org/snapdragon/download/snapdragon-0.8.2.tgz", @@ -18004,6 +19308,12 @@ "integrity": "sha1-g26zyDgv4pNv6vVEYxAXzn1Ho88=", "dev": true }, + "stack-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.2.tgz", + "integrity": "sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA==", + "dev": true + }, "stackframe": { "version": "1.2.0", "resolved": "https://registry.npm.taobao.org/stackframe/download/stackframe-1.2.0.tgz", @@ -18037,6 +19347,15 @@ "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", "dev": true }, + "std-env": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-2.2.1.tgz", + "integrity": "sha512-IjYQUinA3lg5re/YMlwlfhqNRTzMZMqE+pezevdcTaHceqx8ngEi1alX9nNCk9Sc81fy1fLDeQoaCzeiW1yBOQ==", + "dev": true, + "requires": { + "ci-info": "^1.6.0" + } + }, "stealthy-require": { "version": "1.1.1", "resolved": "https://registry.npm.taobao.org/stealthy-require/download/stealthy-require-1.1.1.tgz", @@ -18209,6 +19528,12 @@ "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true }, + "strip-bom-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", + "integrity": "sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI=", + "dev": true + }, "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npm.taobao.org/strip-eof/download/strip-eof-1.0.0.tgz", @@ -18257,6 +19582,68 @@ } } }, + "stylus": { + "version": "0.54.8", + "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.8.tgz", + "integrity": "sha512-vr54Or4BZ7pJafo2mpf0ZcwA74rpuYCZbxrHBsH8kbcXOwSfvBFwsRfpGO5OD5fhG5HDCFW737PKaawI7OqEAg==", + "dev": true, + "requires": { + "css-parse": "~2.0.0", + "debug": "~3.1.0", + "glob": "^7.1.6", + "mkdirp": "~1.0.4", + "safer-buffer": "^2.1.2", + "sax": "~1.2.4", + "semver": "^6.3.0", + "source-map": "^0.7.3" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + } + } + }, + "stylus-loader": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-3.0.2.tgz", + "integrity": "sha512-+VomPdZ6a0razP+zinir61yZgpw2NfljeSsdUF5kJuEzlo3khXhY19Fn6l8QQz1GRJGtMCo8nG5C04ePyV7SUA==", + "dev": true, + "requires": { + "loader-utils": "^1.0.2", + "lodash.clonedeep": "^4.5.0", + "when": "~3.6.x" + } + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", @@ -18427,6 +19814,12 @@ } } }, + "term-size": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.0.tgz", + "integrity": "sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw==", + "dev": true + }, "terser": { "version": "4.8.0", "resolved": "https://registry.npm.taobao.org/terser/download/terser-4.8.0.tgz?cache=0&sync_timestamp=1593953906158&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser%2Fdownload%2Fterser-4.8.0.tgz", @@ -18566,6 +19959,13 @@ "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", "dev": true }, + "tiny-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", + "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==", + "dev": true, + "optional": true + }, "tmp": { "version": "0.1.0", "resolved": "https://registry.npm.taobao.org/tmp/download/tmp-0.1.0.tgz", @@ -18581,6 +19981,12 @@ "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", "dev": true }, + "to-factory": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-factory/-/to-factory-1.0.0.tgz", + "integrity": "sha1-hzivi9lxIK0dQEeXKtpVY7+UebE=", + "dev": true + }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npm.taobao.org/to-fast-properties/download/to-fast-properties-2.0.0.tgz", @@ -18607,6 +20013,12 @@ } } }, + "to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "dev": true + }, "to-regex": { "version": "3.0.2", "resolved": "https://registry.npm.taobao.org/to-regex/download/to-regex-3.0.2.tgz", @@ -18635,6 +20047,12 @@ "integrity": "sha1-fhvjRw8ed5SLxD2Uo8j013UrpVM=", "dev": true }, + "toml": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz", + "integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==", + "dev": true + }, "toposort": { "version": "2.0.2", "resolved": "https://registry.npm.taobao.org/toposort/download/toposort-2.0.2.tgz", @@ -18754,6 +20172,21 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "requires": { + "is-typedarray": "^1.0.0" + } + }, + "uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "dev": true + }, "uglify-js": { "version": "3.4.10", "resolved": "https://registry.npm.taobao.org/uglify-js/download/uglify-js-3.4.10.tgz", @@ -18900,42 +20333,155 @@ "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "dev": true, "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/isobject/download/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npm.taobao.org/isobject/download/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npm.taobao.org/has-values/download/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "untildify": { + "version": "3.0.3", + "resolved": "https://registry.npm.taobao.org/untildify/download/untildify-3.0.3.tgz", + "integrity": "sha1-HntCsUC8/ZIrIucMoSZb/jY0x8k=", + "dev": true + }, + "upath": { + "version": "1.2.0", + "resolved": "https://registry.npm.taobao.org/upath/download/upath-1.2.0.tgz", + "integrity": "sha1-j2bbzVWog6za5ECK+LA1pQRMGJQ=", + "dev": true + }, + "update-notifier": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.0.tgz", + "integrity": "sha512-w3doE1qtI0/ZmgeoDoARmI5fjDoT93IfKgEGqm26dGUOh8oNpaSTsGNdYRN/SjOuo10jcJGwkEL3mroKzktkew==", + "dev": true, + "requires": { + "boxen": "^4.2.0", + "chalk": "^3.0.0", + "configstore": "^5.0.1", + "has-yarn": "^2.1.0", + "import-lazy": "^2.1.0", + "is-ci": "^2.0.0", + "is-installed-globally": "^0.3.1", + "is-npm": "^4.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.0.0", + "pupa": "^2.0.1", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "global-dirs": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.0.1.tgz", + "integrity": "sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==", + "dev": true, + "requires": { + "ini": "^1.3.5" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, + "requires": { + "ci-info": "^2.0.0" } }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/has-values/download/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "is-installed-globally": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", + "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==", + "dev": true, + "requires": { + "global-dirs": "^2.0.1", + "is-path-inside": "^3.0.1" + } + }, + "is-path-inside": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz", + "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==", "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, - "untildify": { - "version": "3.0.3", - "resolved": "https://registry.npm.taobao.org/untildify/download/untildify-3.0.3.tgz", - "integrity": "sha1-HntCsUC8/ZIrIucMoSZb/jY0x8k=", - "dev": true - }, - "upath": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/upath/download/upath-1.2.0.tgz", - "integrity": "sha1-j2bbzVWog6za5ECK+LA1pQRMGJQ=", - "dev": true - }, "upper-case": { "version": "1.1.3", "resolved": "https://registry.npm.taobao.org/upper-case/download/upper-case-1.1.3.tgz", @@ -19002,6 +20548,23 @@ "requires-port": "^1.0.0" } }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, + "requires": { + "prepend-http": "^2.0.0" + }, + "dependencies": { + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true + } + } + }, "use": { "version": "3.1.1", "resolved": "https://registry.npm.taobao.org/use/download/use-3.1.1.tgz", @@ -19164,6 +20727,88 @@ } } }, + "vue-router": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.3.4.tgz", + "integrity": "sha512-SdKRBeoXUjaZ9R/8AyxsdTqkOfMcI5tWxPZOUX5Ie1BTL5rPSZ0O++pbiZCeYeythiZIdLEfkDiQPKIaWk5hDg==", + "dev": true + }, + "vue-server-renderer": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/vue-server-renderer/-/vue-server-renderer-2.6.11.tgz", + "integrity": "sha512-V3faFJHr2KYfdSIalL+JjinZSHYUhlrvJ9pzCIjjwSh77+pkrsXpK4PucdPcng57+N77pd1LrKqwbqjQdktU1A==", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "hash-sum": "^1.0.2", + "he": "^1.1.0", + "lodash.template": "^4.5.0", + "lodash.uniq": "^4.5.0", + "resolve": "^1.2.0", + "serialize-javascript": "^2.1.2", + "source-map": "0.5.6" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "hash-sum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz", + "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=", + "dev": true + }, + "serialize-javascript": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", + "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==", + "dev": true + }, + "source-map": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, "vue-style-loader": { "version": "4.1.2", "resolved": "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-4.1.2.tgz", @@ -19198,6 +20843,101 @@ "integrity": "sha1-HuO8mhbsv1EYvjNLsV+cRvgvWCU=", "dev": true }, + "vuepress": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/vuepress/-/vuepress-1.5.2.tgz", + "integrity": "sha512-buscwFfIqvCcUAaRdbBWENmCSBZzr510fch1BhQZwVaQy28mF8H6Mvb+UDdwHQ7jon0d9qauXs9M0k4XHIWviw==", + "dev": true, + "requires": { + "@vuepress/core": "1.5.2", + "@vuepress/theme-default": "1.5.2", + "cac": "^6.5.6", + "envinfo": "^7.2.0", + "opencollective-postinstall": "^2.0.2", + "update-notifier": "^4.0.0" + } + }, + "vuepress-html-webpack-plugin": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/vuepress-html-webpack-plugin/-/vuepress-html-webpack-plugin-3.2.0.tgz", + "integrity": "sha512-BebAEl1BmWlro3+VyDhIOCY6Gef2MCBllEVAP3NUAtMguiyOwo/dClbwJ167WYmcxHJKLl7b0Chr9H7fpn1d0A==", + "dev": true, + "requires": { + "html-minifier": "^3.2.3", + "loader-utils": "^0.2.16", + "lodash": "^4.17.3", + "pretty-error": "^2.0.2", + "tapable": "^1.0.0", + "toposort": "^1.0.0", + "util.promisify": "1.0.0" + }, + "dependencies": { + "big.js": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", + "dev": true + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "loader-utils": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", + "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0", + "object-assign": "^4.0.1" + } + }, + "toposort": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.7.tgz", + "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=", + "dev": true + }, + "util.promisify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "object.getownpropertydescriptors": "^2.0.3" + } + } + } + }, + "vuepress-plugin-container": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/vuepress-plugin-container/-/vuepress-plugin-container-2.1.4.tgz", + "integrity": "sha512-l+EkeL+rC6DJch1wAZUFIkNDaz2TNOg4NQTHa3yMAsYkC+QaSRubGdN6YwOSmfjxVmM9s9D3gwBWw0O7OBhqRg==", + "dev": true, + "requires": { + "markdown-it-container": "^2.0.0" + } + }, + "vuepress-plugin-smooth-scroll": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/vuepress-plugin-smooth-scroll/-/vuepress-plugin-smooth-scroll-0.0.3.tgz", + "integrity": "sha512-qsQkDftLVFLe8BiviIHaLV0Ea38YLZKKonDGsNQy1IE0wllFpFIEldWD8frWZtDFdx6b/O3KDMgVQ0qp5NjJCg==", + "dev": true, + "requires": { + "smoothscroll-polyfill": "^0.4.3" + } + }, "w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npm.taobao.org/w3c-hr-time/download/w3c-hr-time-1.0.2.tgz", @@ -19719,6 +21459,48 @@ } } }, + "webpackbar": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/webpackbar/-/webpackbar-3.2.0.tgz", + "integrity": "sha512-PC4o+1c8gWWileUfwabe0gqptlXUDJd5E0zbpr2xHP1VSOVlZVPBZ8j6NCR8zM5zbKdxPhctHXahgpNK1qFDPw==", + "dev": true, + "requires": { + "ansi-escapes": "^4.1.0", + "chalk": "^2.4.1", + "consola": "^2.6.0", + "figures": "^3.0.0", + "pretty-time": "^1.1.0", + "std-env": "^2.2.1", + "text-table": "^0.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-escapes": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", + "dev": true, + "requires": { + "type-fest": "^0.11.0" + } + }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "dev": true + } + } + }, "webrtc-adapter": { "version": "7.6.3", "resolved": "https://registry.npmjs.org/webrtc-adapter/-/webrtc-adapter-7.6.3.tgz", @@ -19769,6 +21551,12 @@ "webidl-conversions": "^4.0.2" } }, + "when": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/when/-/when-3.6.4.tgz", + "integrity": "sha1-RztRfsFZ4rhQBUl6E5g/CVQS404=", + "dev": true + }, "which": { "version": "1.3.1", "resolved": "https://registry.npm.taobao.org/which/download/which-1.3.1.tgz", @@ -19793,6 +21581,34 @@ "string-width": "^1.0.2 || 2" } }, + "widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "requires": { + "string-width": "^4.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + } + } + }, "windows-release": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-3.3.1.tgz", @@ -19883,12 +21699,30 @@ "mkdirp": "^0.5.1" } }, + "write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, "ws": { "version": "7.3.1", "resolved": "https://registry.npm.taobao.org/ws/download/ws-7.3.1.tgz?cache=0&sync_timestamp=1593925660500&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fws%2Fdownload%2Fws-7.3.1.tgz", "integrity": "sha1-0FR79n985PEqct/jEmLGjX3FUcg=", "dev": true }, + "xdg-basedir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", + "dev": true + }, "xml-name-validator": { "version": "3.0.0", "resolved": "https://registry.npm.taobao.org/xml-name-validator/download/xml-name-validator-3.0.0.tgz", @@ -20086,6 +21920,12 @@ "dev": true } } + }, + "zepto": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/zepto/-/zepto-1.2.0.tgz", + "integrity": "sha1-4Se9nmb9hGvl6rSME5SIL3wOT5g=", + "dev": true } } } diff --git a/package.json b/package.json index 107d3100..de3c8b49 100644 --- a/package.json +++ b/package.json @@ -22,10 +22,9 @@ ], "license": "MIT", "scripts": { - "serve": "vue-cli-service serve demos/index.js", + "dev": "vuepress dev docs", + "build:docs": "vuepress build docs", "build": "vue-cli-service build --target lib --name VueQrcodeReader src/index.js", - "test:unit": "vue-cli-service test:unit", - "test:e2e": "vue-cli-service test:e2e", "lint": "vue-cli-service lint" }, "dependencies": { @@ -36,21 +35,18 @@ }, "devDependencies": { "@vue/cli-plugin-babel": "~4.4.0", - "@vue/cli-plugin-e2e-cypress": "~4.4.0", "@vue/cli-plugin-eslint": "~4.4.0", - "@vue/cli-plugin-unit-mocha": "~4.4.0", "@vue/cli-service": "~4.4.0", "@vue/eslint-config-prettier": "^6.0.0", - "@vue/test-utils": "^1.0.3", "babel-eslint": "^10.1.0", - "chai": "^4.1.2", "eslint": "^6.7.2", "eslint-plugin-prettier": "^3.1.3", "eslint-plugin-vue": "^6.2.2", "lint-staged": "^9.5.0", "prettier": "^1.19.1", "semantic-release": "^17.1.1", - "vue-template-compiler": "^2.6.11" + "vue-template-compiler": "^2.6.11", + "vuepress": "^1.5.2" }, "gitHooks": { "pre-commit": "lint-staged" diff --git a/public/index.html b/public/index.html deleted file mode 100644 index 13550073..00000000 --- a/public/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Vue Qrcode Reader - - -
- - - diff --git a/tests/e2e/.eslintrc.js b/tests/e2e/.eslintrc.js deleted file mode 100644 index 053c39f0..00000000 --- a/tests/e2e/.eslintrc.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = { - plugins: ["cypress"], - env: { - mocha: true, - "cypress/globals": true - }, - rules: { - strict: "off" - } -}; diff --git a/tests/e2e/plugins/index.js b/tests/e2e/plugins/index.js deleted file mode 100644 index 6bc65209..00000000 --- a/tests/e2e/plugins/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/* eslint-disable arrow-body-style */ -// https://docs.cypress.io/guides/guides/plugins-guide.html - -// if you need a custom webpack configuration you can uncomment the following import -// and then use the `file:preprocessor` event -// as explained in the cypress docs -// https://docs.cypress.io/api/plugins/preprocessors-api.html#Examples - -// /* eslint-disable import/no-extraneous-dependencies, global-require */ -// const webpack = require('@cypress/webpack-preprocessor') - -module.exports = (on, config) => { - // on('file:preprocessor', webpack({ - // webpackOptions: require('@vue/cli-service/webpack.config'), - // watchOptions: {} - // })) - - return Object.assign({}, config, { - fixturesFolder: "tests/e2e/fixtures", - integrationFolder: "tests/e2e/specs", - screenshotsFolder: "tests/e2e/screenshots", - videosFolder: "tests/e2e/videos", - supportFile: "tests/e2e/support/index.js" - }); -}; diff --git a/tests/e2e/specs/test.js b/tests/e2e/specs/test.js deleted file mode 100644 index 1d749846..00000000 --- a/tests/e2e/specs/test.js +++ /dev/null @@ -1,8 +0,0 @@ -// https://docs.cypress.io/api/introduction/api.html - -describe("My First Test", () => { - it("Visits the app root url", () => { - cy.visit("/"); - cy.contains("h1", "Welcome to Your Vue.js App"); - }); -}); diff --git a/tests/e2e/support/commands.js b/tests/e2e/support/commands.js deleted file mode 100644 index c1f5a772..00000000 --- a/tests/e2e/support/commands.js +++ /dev/null @@ -1,25 +0,0 @@ -// *********************************************** -// This example commands.js shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** -// -// -// -- This is a parent command -- -// Cypress.Commands.add("login", (email, password) => { ... }) -// -// -// -- This is a child command -- -// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) -// -// -// -- This is a dual command -- -// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) -// -// -// -- This is will overwrite an existing command -- -// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) diff --git a/tests/e2e/support/index.js b/tests/e2e/support/index.js deleted file mode 100644 index d076cec9..00000000 --- a/tests/e2e/support/index.js +++ /dev/null @@ -1,20 +0,0 @@ -// *********************************************************** -// This example support/index.js is processed and -// loaded automatically before your test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import "./commands"; - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/tests/unit/example.spec.js b/tests/unit/example.spec.js deleted file mode 100644 index 234c39d0..00000000 --- a/tests/unit/example.spec.js +++ /dev/null @@ -1,13 +0,0 @@ -import { expect } from "chai"; -import { shallowMount } from "@vue/test-utils"; -import HelloWorld from "@/components/HelloWorld.vue"; - -describe("HelloWorld.vue", () => { - it("renders props.msg when passed", () => { - const msg = "new message"; - const wrapper = shallowMount(HelloWorld, { - propsData: { msg } - }); - expect(wrapper.text()).to.include(msg); - }); -});