update dxf dwg importer
This commit is contained in:
parent
9b6c3d3235
commit
9e205c0d1b
@ -6,7 +6,7 @@
|
|||||||
<page name="tab_general" gui-text="Input / General">
|
<page name="tab_general" gui-text="Input / General">
|
||||||
<label>The parser is the heart of your input-output chain because depending on the selection your result will greatly vary. You might receive no or bad results (e.g. wrong scalings, aborted imports, missing lines, duplicated lines, wrong rotations and other issues. Serious tip: ask the person who gave the input file to you about some measurement which you can compare with the processed file to ensure correct sizes)</label>
|
<label>The parser is the heart of your input-output chain because depending on the selection your result will greatly vary. You might receive no or bad results (e.g. wrong scalings, aborted imports, missing lines, duplicated lines, wrong rotations and other issues. Serious tip: ask the person who gave the input file to you about some measurement which you can compare with the processed file to ensure correct sizes)</label>
|
||||||
<param name="dxf_to_svg_parser" gui-text="DXF to SVG parser" type="optiongroup" appearance="combo">
|
<param name="dxf_to_svg_parser" gui-text="DXF to SVG parser" type="optiongroup" appearance="combo">
|
||||||
<option value="bjnortier">bjnortier DXF (good quality, some polygon artifacts)</option>
|
<option value="skymakerolof">skymakerolof DXF (good quality, some polygon artifacts)</option>
|
||||||
<option value="sk1">sk1 UniConverter (best output, but fails for all unknown/unfiltered entities)</option>
|
<option value="sk1">sk1 UniConverter (best output, but fails for all unknown/unfiltered entities)</option>
|
||||||
<option value="ezdxf">ezdxf (higher quality, many single nodes)</option>
|
<option value="ezdxf">ezdxf (higher quality, many single nodes)</option>
|
||||||
<option value="kabeja">kabeja (Java library)</option>
|
<option value="kabeja">kabeja (Java library)</option>
|
||||||
@ -151,7 +151,7 @@
|
|||||||
<page name="tab_about" gui-text="About">
|
<page name="tab_about" gui-text="About">
|
||||||
<label appearance="header">DXF/DWG Importer</label>
|
<label appearance="header">DXF/DWG Importer</label>
|
||||||
<label>A strange looking ODA File Converter/sk1 UniConverter/ezdxf tool chain. But it works! The most versatile tool to import much hated AutoCAD data for InkScape yet.</label>
|
<label>A strange looking ODA File Converter/sk1 UniConverter/ezdxf tool chain. But it works! The most versatile tool to import much hated AutoCAD data for InkScape yet.</label>
|
||||||
<label>2020 - 2023 / written by Mario Voigt (Stadtfabrikanten e.V. / FabLab Chemnitz)</label>
|
<label>2020 - 2024 / written by Mario Voigt (Stadtfabrikanten e.V. / FabLab Chemnitz)</label>
|
||||||
<spacer/>
|
<spacer/>
|
||||||
<label appearance="header">Online Documentation</label>
|
<label appearance="header">Online Documentation</label>
|
||||||
<label appearance="url">https://y.stadtfabrikanten.org/dxfdwgimporter</label>
|
<label appearance="url">https://y.stadtfabrikanten.org/dxfdwgimporter</label>
|
||||||
@ -163,7 +163,7 @@
|
|||||||
<label appearance="header">Third Party Modules</label>
|
<label appearance="header">Third Party Modules</label>
|
||||||
<label appearance="url">https://github.com/mozman/ezdxf</label>
|
<label appearance="url">https://github.com/mozman/ezdxf</label>
|
||||||
<label appearance="url">http://kabeja.sourceforge.net</label>
|
<label appearance="url">http://kabeja.sourceforge.net</label>
|
||||||
<label appearance="url">https://github.com/bjnortier/dxf</label>
|
<label appearance="url">https://github.com/skymakerolof/dxf</label>
|
||||||
<label appearance="url">https://github.com/sk1project/uniconvertor</label>
|
<label appearance="url">https://github.com/sk1project/uniconvertor</label>
|
||||||
<label appearance="url">https://github.com/abey79/vpype</label>
|
<label appearance="url">https://github.com/abey79/vpype</label>
|
||||||
<label appearance="url">https://github.com/tatarize/vpype-dxf</label>
|
<label appearance="url">https://github.com/tatarize/vpype-dxf</label>
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Extension for InkScape 1.0
|
Extension for InkScape 1.3
|
||||||
|
|
||||||
Import any DWG or DXF file using ODA File Converter, sk1 UniConvertor, ezdxf and more tools.
|
Import any DWG or DXF file using ODA File Converter, sk1 UniConvertor, ezdxf and more tools.
|
||||||
|
|
||||||
Author: Mario Voigt / FabLab Chemnitz
|
Author: Mario Voigt / FabLab Chemnitz
|
||||||
Mail: mario.voigt@stadtfabrikanten.org
|
Mail: mario.voigt@stadtfabrikanten.org
|
||||||
Date: 23.08.2020
|
Date: 23.08.2020
|
||||||
Last patch: 04.04.2021
|
Last patch: 09.02.2024
|
||||||
License: GNU GPL v3
|
License: GNU GPL v3
|
||||||
|
|
||||||
Module licenses
|
Module licenses
|
||||||
- ezdxf (https://github.com/mozman/ezdxf) - MIT License
|
- ezdxf (https://github.com/mozman/ezdxf) - MIT License
|
||||||
- node.js (https://raw.githubusercontent.com/nodejs/node/master/LICENSE) - MIT License
|
- node.js (https://raw.githubusercontent.com/nodejs/node/master/LICENSE) - MIT License
|
||||||
- https://github.com/bjnortier/dxf - MIT License
|
- https://github.com/skymakerolof/dxf - MIT License
|
||||||
- ODA File Converter - not bundled (due to restrictions by vendor)
|
- ODA File Converter - not bundled (due to restrictions by vendor)
|
||||||
- sk1 UniConvertor (https://github.com/sk1project/uniconvertor) - AGPL v3.0 - not bundled
|
- sk1 UniConvertor (https://github.com/sk1project/uniconvertor) - AGPL v3.0 - not bundled
|
||||||
- kabeja (http://kabeja.sourceforge.net/) - Apache v2
|
- kabeja (http://kabeja.sourceforge.net/) - Apache v2
|
||||||
@ -56,7 +56,7 @@ class DXFDWGImport(inkex.EffectExtension):
|
|||||||
|
|
||||||
#general
|
#general
|
||||||
pars.add_argument("--inputfile")
|
pars.add_argument("--inputfile")
|
||||||
pars.add_argument("--dxf_to_svg_parser", default="bjnortier", help="Choose a DXF to SVG parser")
|
pars.add_argument("--dxf_to_svg_parser", default="skymakerolof", help="Choose a DXF to SVG parser")
|
||||||
pars.add_argument("--resizetoimport", type=inkex.Boolean, default=True, help="Resize the canvas to the imported drawing's bounding box")
|
pars.add_argument("--resizetoimport", type=inkex.Boolean, default=True, help="Resize the canvas to the imported drawing's bounding box")
|
||||||
pars.add_argument("--extraborder", type=float, default=0.0)
|
pars.add_argument("--extraborder", type=float, default=0.0)
|
||||||
pars.add_argument("--extraborder_units")
|
pars.add_argument("--extraborder_units")
|
||||||
@ -302,14 +302,14 @@ class DXFDWGImport(inkex.EffectExtension):
|
|||||||
if self.options.opendironerror:
|
if self.options.opendironerror:
|
||||||
self.openExplorer(temp_output_dir)
|
self.openExplorer(temp_output_dir)
|
||||||
|
|
||||||
elif self.options.dxf_to_svg_parser == "bjnortier":
|
elif self.options.dxf_to_svg_parser == "skymakerolof":
|
||||||
if which("node") is None:
|
if which("node") is None:
|
||||||
self.msg("NodeJS executable not found on path. Please check your installation.")
|
self.msg("NodeJS executable not found on path. Please check your installation.")
|
||||||
exit(1)
|
exit(1)
|
||||||
else:
|
else:
|
||||||
bjnortier_cmd = ["node", os.path.join("node_modules","dxf","lib","cli.js"), dxf_file, svg_file]
|
skymakerolof_cmd = ["node", os.path.join("node_modules","dxf","lib","cli.js"), dxf_file, svg_file]
|
||||||
#self.msg(bjnortier_cmd)
|
#self.msg(skymakerolof_cmd)
|
||||||
proc = subprocess.Popen(bjnortier_cmd, shell=False, stdout=PIPE, stderr=PIPE)
|
proc = subprocess.Popen(skymakerolof_cmd, shell=False, stdout=PIPE, stderr=PIPE)
|
||||||
stdout, stderr = proc.communicate()
|
stdout, stderr = proc.communicate()
|
||||||
if proc.returncode != 0:
|
if proc.returncode != 0:
|
||||||
self.msg("node.js DXF to SVG conversion failed: %d %s %s" % (proc.returncode, stdout, stderr))
|
self.msg("node.js DXF to SVG conversion failed: %d %s %s" % (proc.returncode, stdout, stderr))
|
||||||
@ -421,7 +421,7 @@ class DXFDWGImport(inkex.EffectExtension):
|
|||||||
for element in doc.getchildren():
|
for element in doc.getchildren():
|
||||||
docGroup.append(element)
|
docGroup.append(element)
|
||||||
|
|
||||||
#get children of the doc and move them one group above - we don't do this for bjnortier tool because this has different structure which we don't want to disturb
|
#get children of the doc and move them one group above - we don't do this for skymakerolof tool because this has different structure which we don't want to disturb
|
||||||
if self.options.dxf_to_svg_parser == "sk1":
|
if self.options.dxf_to_svg_parser == "sk1":
|
||||||
elements = []
|
elements = []
|
||||||
emptyGroup = None
|
emptyGroup = None
|
||||||
|
16
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/.eslintrc.json
generated
vendored
16
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/.eslintrc.json
generated
vendored
@ -5,7 +5,10 @@
|
|||||||
"node": true
|
"node": true
|
||||||
},
|
},
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:react/recommended", "standard", "standard-react"
|
"plugin:react/recommended",
|
||||||
|
"standard",
|
||||||
|
"standard-react",
|
||||||
|
"prettier"
|
||||||
],
|
],
|
||||||
"globals": {
|
"globals": {
|
||||||
"Atomics": "readonly",
|
"Atomics": "readonly",
|
||||||
@ -18,18 +21,19 @@
|
|||||||
"afterEach": "readonly"
|
"afterEach": "readonly"
|
||||||
},
|
},
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
|
"babelOptions": {
|
||||||
|
"presets": ["@babel/preset-react"]
|
||||||
|
},
|
||||||
"ecmaFeatures": {
|
"ecmaFeatures": {
|
||||||
"jsx": true
|
"jsx": true
|
||||||
},
|
},
|
||||||
"ecmaVersion": 2018,
|
"ecmaVersion": 2018,
|
||||||
"sourceType": "module"
|
"sourceType": "module"
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": ["react"],
|
||||||
"react", "babel"
|
"parser": "@babel/eslint-parser",
|
||||||
],
|
|
||||||
"parser": "babel-eslint",
|
|
||||||
"rules": {
|
"rules": {
|
||||||
"jest/valid-describe": 0
|
"no-lone-blocks": "off"
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"react": {
|
"react": {
|
||||||
|
10
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/.gitignore
generated
vendored
Normal file
10
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/.gitignore
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
node_modules/
|
||||||
|
lib/
|
||||||
|
dist/
|
||||||
|
test/resources/#*
|
||||||
|
examples/example.es5.svg
|
||||||
|
examples/example.es6.svg
|
||||||
|
.DS_Store
|
||||||
|
*~
|
||||||
|
#*
|
||||||
|
.idea
|
2
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/.npmignore
generated
vendored
Normal file
2
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/.npmignore
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
babel.config.js
|
||||||
|
test/
|
1
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/.prettierignore
generated
vendored
Normal file
1
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/.prettierignore
generated
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
CHANGELOG.md
|
6
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/.prettierrc.json
generated
vendored
Normal file
6
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/.prettierrc.json
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"jsxSingleQuote": true,
|
||||||
|
"semi": false,
|
||||||
|
"singleQuote": true,
|
||||||
|
"trailingComma": "all"
|
||||||
|
}
|
4
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/.travis.yml
generated
vendored
4
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/.travis.yml
generated
vendored
@ -1,6 +1,6 @@
|
|||||||
language: node_js
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- "8"
|
- '8'
|
||||||
- "10"
|
- '10'
|
||||||
install: npm install
|
install: npm install
|
||||||
sudo: false
|
sudo: false
|
||||||
|
119
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/CHANGELOG.md
generated
vendored
Normal file
119
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/CHANGELOG.md
generated
vendored
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||||
|
|
||||||
|
## [5.1.0](https://github.com/skymakerolof/dxf/compare/v5.0.1...v5.1.0) (2023-08-08)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add support for polyfaceMesh outline rendering ([#138](https://github.com/skymakerolof/dxf/issues/138)) ([38fd3a6](https://github.com/skymakerolof/dxf/commit/38fd3a695644f1b142789d1d3e3828ee8a458d1f))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* spline boundary path data ([#134](https://github.com/skymakerolof/dxf/issues/134)) ([4ea2312](https://github.com/skymakerolof/dxf/commit/4ea2312892ef73eed3690fc772ec0f2f8619beef))
|
||||||
|
|
||||||
|
### [5.0.1](https://github.com/skymakerolof/dxf/compare/v5.0.0...v5.0.1) (2023-06-08)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* hatch with polyline points only returning y coordinate ([#132](https://github.com/skymakerolof/dxf/issues/132)) ([948dbbc](https://github.com/skymakerolof/dxf/commit/948dbbcd5e03ac064020b9c1d0b231dced895e7a)), closes [#130](https://github.com/skymakerolof/dxf/issues/130)
|
||||||
|
|
||||||
|
## [5.0.0](https://github.com/skymakerolof/dxf/compare/v4.7.0...v5.0.0) (2022-12-05)
|
||||||
|
|
||||||
|
|
||||||
|
### ⚠ BREAKING CHANGES
|
||||||
|
|
||||||
|
* **Hatch:** Renamed hatch split property points to controlPoints
|
||||||
|
* **Hatch:** Renamed polyline "has bulge flag" from bulge to hasBulge
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Hatch:** rename hatch->spline points to controlPoints ([#117](https://github.com/skymakerolof/dxf/issues/117)) ([70e9a5d](https://github.com/skymakerolof/dxf/commit/70e9a5d46906f2f1984366df24adf80fd97c454b))
|
||||||
|
* LTYPE table parsing ([#121](https://github.com/skymakerolof/dxf/issues/121)) ([6178746](https://github.com/skymakerolof/dxf/commit/6178746ee887eb1fbacb060cfc952d07d5264173))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Hatch:** bulge value for each point instead of only writing it in the loop level ([#122](https://github.com/skymakerolof/dxf/issues/122)) ([879808c](https://github.com/skymakerolof/dxf/commit/879808cde1d369b36c731b85ac4596f7ed032efe))
|
||||||
|
* **Hatch:** rename bulge to hasBulge ([#118](https://github.com/skymakerolof/dxf/issues/118)) ([3cf60c6](https://github.com/skymakerolof/dxf/commit/3cf60c6a1f5cc1711a315222a87a75fc5677041a))
|
||||||
|
|
||||||
|
## [4.7.0](https://github.com/skymakerolof/dxf/compare/v4.6.3...v4.7.0) (2022-09-22)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- add hatch entity to parser ([#107](https://github.com/skymakerolof/dxf/issues/107)) ([362e23a](https://github.com/skymakerolof/dxf/commit/362e23a2cc9e34ecfd1345d576a2138c375fcecb))
|
||||||
|
- add layout & paper space to parser ([#106](https://github.com/skymakerolof/dxf/issues/106)) ([d0a6d19](https://github.com/skymakerolof/dxf/commit/d0a6d19e34645aad208642105d381a76f97c5902))
|
||||||
|
- attrib & attdef parsing ([#109](https://github.com/skymakerolof/dxf/issues/109)) ([7a10e4b](https://github.com/skymakerolof/dxf/commit/7a10e4bd7a752a6adbd72f3a0b0e5e5ec7110f3d))
|
||||||
|
- viewport & vport parsing ([#108](https://github.com/skymakerolof/dxf/issues/108)) ([f26642e](https://github.com/skymakerolof/dxf/commit/f26642e8e338c4e85cbc1ab135e0c7f0f68029f6))
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- handle color value 256 ([#104](https://github.com/skymakerolof/dxf/issues/104)) ([80e9fa1](https://github.com/skymakerolof/dxf/commit/80e9fa119afaf5b3e5f4dcd73583c4a63b0876a8))
|
||||||
|
|
||||||
|
## 4.6.3
|
||||||
|
|
||||||
|
- Remove dependency on pretty-data (#85)
|
||||||
|
|
||||||
|
## 4.6.2
|
||||||
|
|
||||||
|
- Remove import of unused parts of lodash
|
||||||
|
|
||||||
|
## 4.4.4
|
||||||
|
|
||||||
|
- Fix typo in README
|
||||||
|
|
||||||
|
## 4.3.0
|
||||||
|
|
||||||
|
- #51 Fix bug when transforming empty bounding box
|
||||||
|
|
||||||
|
## 4.2.4
|
||||||
|
|
||||||
|
- #50 Fix knot piecewise beziers
|
||||||
|
|
||||||
|
## 4.2.3
|
||||||
|
|
||||||
|
- More accurate bounding boxes for arcs and ellipses (#48)
|
||||||
|
|
||||||
|
## 4.2.2
|
||||||
|
|
||||||
|
- Bump eslint-utils from 1.3.1 to 1.4.2
|
||||||
|
- Add HATCH to unsupported SVG entities in README
|
||||||
|
|
||||||
|
## 4.2.1
|
||||||
|
|
||||||
|
- Use main lodash package due to security issue(s)
|
||||||
|
|
||||||
|
## 4.2.0
|
||||||
|
|
||||||
|
- README updates
|
||||||
|
|
||||||
|
## 4.1.1
|
||||||
|
|
||||||
|
- #issue42 support entities that have extrusionZ === -1 defined on the entity itself (as opposed to the transform).
|
||||||
|
|
||||||
|
## 4.1.0
|
||||||
|
|
||||||
|
- CIRCLE DXF entities now produce native <circle /> SVG elements.
|
||||||
|
- ELLIPSE DXF entities now produce native <path d="A..."/> or <ellipse /> SVG elements.
|
||||||
|
- ARC DXF entities now produce native <path d="A..."/> or <ellipse /> SVG elements.
|
||||||
|
|
||||||
|
## 4.0.1
|
||||||
|
|
||||||
|
- Browser example uses Helper
|
||||||
|
|
||||||
|
## 4.0.0
|
||||||
|
|
||||||
|
- Use ES6 string interpolation in SVG generation.
|
||||||
|
- Use native SVG <circle /> elements for CIRCLE entities.
|
||||||
|
- Use SVG <g/> elements with a transform attribute for native and interpolated entities.
|
||||||
|
- Add a Helper object to simplify the workflow.
|
||||||
|
- The SVG output uses a root transform to flip the Y coordinates.
|
||||||
|
|
||||||
|
## 3.6.0
|
||||||
|
|
||||||
|
- NPM audit fixes.
|
||||||
|
- Remove support for Node v6 in Travis.
|
||||||
|
- Node engine is now >= 8.9.0.
|
23
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/README.md
generated
vendored
23
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/README.md
generated
vendored
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
DXF parser for node/browser.
|
DXF parser for node/browser.
|
||||||
|
|
||||||
Uses several ES6 features in the source code (import, classes, let, const, arrows) but is packaged using babel so you can use it legacy JS environments.
|
Uses several ES6 features in the source code (import, classes, let, const, arrows) but is packaged using babel so you can use it in legacy JS environments.
|
||||||
|
|
||||||
Version 2.0 is a complete rewrite from the first attempt to write it in a SAX style, which wasn't really appropriate for a document with nested references (e.g inserts referencing blocks, nested inserts).
|
Version 2.0 is a complete rewrite from the first attempt to write it in a SAX style, which wasn't really appropriate for a document with nested references (e.g inserts referencing blocks, nested inserts).
|
||||||
|
|
||||||
@ -14,16 +14,16 @@ Version 4.x is in progress and the aim is to use native SVG elements where possi
|
|||||||
|
|
||||||
At this point in time, the important geometric entities are supported, but notably:
|
At this point in time, the important geometric entities are supported, but notably:
|
||||||
|
|
||||||
* MTEXT
|
- MTEXT
|
||||||
* DIMENSION
|
- DIMENSION
|
||||||
* STYLE
|
- STYLE
|
||||||
* HATCH
|
- HATCH
|
||||||
|
|
||||||
and some others are **parsed**, but are **not supported for SVG rendering** (see section below on SVG rendering)
|
and some others are **parsed**, but are **not supported for SVG rendering** (see section below on SVG rendering)
|
||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
|
|
||||||
There is an ES5 and ES6 example in the ```examples/``` directory that show how to use the library. There are exposed functions for advanced users, but for the majority of users you can use the `Helper` object to get the data you're interested in (or convert to SVG):
|
There is an ES5 and ES6 example in the `examples/` directory that show how to use the library. There are exposed functions for advanced users, but for the majority of users you can use the `Helper` object to get the data you're interested in (or convert to SVG):
|
||||||
|
|
||||||
```
|
```
|
||||||
const helper = new Helper(<DXF String>)
|
const helper = new Helper(<DXF String>)
|
||||||
@ -64,9 +64,9 @@ $ open examples/dxf.html
|
|||||||
|
|
||||||
## SVG
|
## SVG
|
||||||
|
|
||||||
Geometric elements are supported, but dimensions, text, hatches and styles (except for line colors) are ***not***.
|
Geometric elements are supported, but dimensions, text, hatches and styles (except for line colors) are **_not_**.
|
||||||
|
|
||||||
Native SVG elements are used as far as possible for curved entities (`<circle />`, `<ellipse/>` etc.), ***except for the SPLINE entity***, which is interpolated.
|
Native SVG elements are used as far as possible for curved entities (`<circle />`, `<ellipse/>` etc.), **_except for the SPLINE entity_**, which is interpolated.
|
||||||
|
|
||||||
Here's an example you will find in the functional test output:
|
Here's an example you will find in the functional test output:
|
||||||
|
|
||||||
@ -76,12 +76,10 @@ Here's an example you will find in the functional test output:
|
|||||||
|
|
||||||
The library supports outputting DXFs as interpolated polylines for custom rendering (e.g. WebGL) or other applications, by using:
|
The library supports outputting DXFs as interpolated polylines for custom rendering (e.g. WebGL) or other applications, by using:
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
> helper.toPolylines()
|
> helper.toPolylines()
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Command line
|
## Command line
|
||||||
|
|
||||||
There is a command-line utility (courtesy of [@Joge97](https://github.com/Joge97)) for converting DXF files to SVG:
|
There is a command-line utility (courtesy of [@Joge97](https://github.com/Joge97)) for converting DXF files to SVG:
|
||||||
@ -105,11 +103,11 @@ $ dxf-to-svg
|
|||||||
|
|
||||||
Running
|
Running
|
||||||
|
|
||||||
```$ npm test```
|
`$ npm test`
|
||||||
|
|
||||||
will execute the unit tests.
|
will execute the unit tests.
|
||||||
|
|
||||||
```$ npm run test:functional``` will run the functional tests in a browser. Please open `toSVG.html` when the file listing loads in the browser (or open `http://localhost:8030/toSVG.html#/`).
|
`$ npm run test:functional` will run the functional tests in a browser. Please open `toSVG.html` when the file listing loads in the browser (or open `http://localhost:8030/toSVG.html#/`).
|
||||||
|
|
||||||
### Contributors
|
### Contributors
|
||||||
|
|
||||||
@ -124,3 +122,4 @@ will execute the unit tests.
|
|||||||
- Teja https://github.com/hungerpirat
|
- Teja https://github.com/hungerpirat
|
||||||
- Jakob Pallhuber https://github.com/Joge97
|
- Jakob Pallhuber https://github.com/Joge97
|
||||||
- Eric Mansfield https://github.com/ericman314
|
- Eric Mansfield https://github.com/ericman314
|
||||||
|
- Kristofer https://github.com/kriffe
|
||||||
|
41
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/RELEASE.md
generated
vendored
41
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/RELEASE.md
generated
vendored
@ -1,41 +0,0 @@
|
|||||||
4.3.0
|
|
||||||
- #51 Fix bug when transforming empty bounding box
|
|
||||||
|
|
||||||
4.2.4
|
|
||||||
- #50 Fix knot piecewise beziers
|
|
||||||
|
|
||||||
4.2.3
|
|
||||||
- More accurate bounding boxes for arcs and ellipses (#48)
|
|
||||||
|
|
||||||
4.2.2
|
|
||||||
- Bump eslint-utils from 1.3.1 to 1.4.2
|
|
||||||
- Add HATCH to unsupported SVG entities in README
|
|
||||||
|
|
||||||
4.2.1
|
|
||||||
- Use main lodash package due to security issue(s)
|
|
||||||
|
|
||||||
4.2.0
|
|
||||||
- README updates
|
|
||||||
|
|
||||||
4.1.1
|
|
||||||
- #issue42 support entities that have extrusionZ === -1 defined on the entity itself (as opposed to the transform).
|
|
||||||
|
|
||||||
4.1.0
|
|
||||||
- CIRCLE DXF entities now produce native <circle /> SVG elements.
|
|
||||||
- ELLIPSE DXF entities now produce native <path d="A..."/> or <ellipse /> SVG elements.
|
|
||||||
- ARC DXF entities now produce native <path d="A..."/> or <ellipse /> SVG elements.
|
|
||||||
|
|
||||||
4.0.1
|
|
||||||
- Browser example uses Helper
|
|
||||||
|
|
||||||
4.0.0
|
|
||||||
- Use ES6 string interpolation in SVG generation.
|
|
||||||
- Use native SVG <circle /> elements for CIRCLE entities.
|
|
||||||
- Use SVG <g/> elements with a transform attribute for native and interpolated entities.
|
|
||||||
- Add a Helper object to simplify the workflow.
|
|
||||||
- The SVG output uses a root transform to flip the Y coordinates.
|
|
||||||
|
|
||||||
3.6.0
|
|
||||||
- NPM audit fixes.
|
|
||||||
- Remove support for Node v6 in Travis.
|
|
||||||
- Node engine is now >= 8.9.0.
|
|
3
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/babel.config.js
generated
vendored
Normal file
3
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/babel.config.js
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
const presets = ['@babel/env']
|
||||||
|
|
||||||
|
module.exports = { presets }
|
21602
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/dist/dxf.js
generated
vendored
21602
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/dist/dxf.js
generated
vendored
File diff suppressed because it is too large
Load Diff
12
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/examples/dxf.html
generated
vendored
12
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/examples/dxf.html
generated
vendored
@ -1,13 +1,13 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang='en'>
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset='UTF-8'>
|
<meta charset="UTF-8" />
|
||||||
<title>DXF Browser Example</title>
|
<title>DXF Browser Example</title>
|
||||||
<script src='https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.2/require.min.js'></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.2/require.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<input type='file' id='file'/>
|
<input type="file" id="file" />
|
||||||
<div>Number of entities:<span id='numberOfEntities'>-</span></div>
|
<div>Number of entities:<span id="numberOfEntities">-</span></div>
|
||||||
<div id="svg"></div>
|
<div id="svg"></div>
|
||||||
<script>
|
<script>
|
||||||
var numberOfEntities = document.getElementById('numberOfEntities')
|
var numberOfEntities = document.getElementById('numberOfEntities')
|
||||||
@ -30,7 +30,7 @@
|
|||||||
}
|
}
|
||||||
reader.readAsBinaryString(file)
|
reader.readAsBinaryString(file)
|
||||||
})
|
})
|
||||||
});
|
})
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
7
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/examples/example.es5.js
generated
vendored
7
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/examples/example.es5.js
generated
vendored
@ -3,8 +3,9 @@ const join = require('path').join
|
|||||||
|
|
||||||
const Helper = require('..').Helper
|
const Helper = require('..').Helper
|
||||||
|
|
||||||
const helper = new Helper(fs.readFileSync(
|
const helper = new Helper(
|
||||||
'./test/resources/Ceco.NET-Architecture-Tm-53.dxf', 'utf-8'))
|
fs.readFileSync('./test/resources/Ceco.NET-Architecture-Tm-53.dxf', 'utf-8'),
|
||||||
|
)
|
||||||
|
|
||||||
// The parsed entities
|
// The parsed entities
|
||||||
const { blocks, entities } = helper.parsed
|
const { blocks, entities } = helper.parsed
|
||||||
@ -18,7 +19,7 @@ console.log(`denormalised: ${helper.denormalised.length} entities.\n`)
|
|||||||
const groups = helper.groups
|
const groups = helper.groups
|
||||||
console.log('grouped entities')
|
console.log('grouped entities')
|
||||||
console.log('----------------')
|
console.log('----------------')
|
||||||
Object.keys(groups).forEach(layer => {
|
Object.keys(groups).forEach((layer) => {
|
||||||
console.log(`${layer}: ${groups[layer].length}`)
|
console.log(`${layer}: ${groups[layer].length}`)
|
||||||
})
|
})
|
||||||
console.log('\n')
|
console.log('\n')
|
||||||
|
7
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/examples/example.es6.js
generated
vendored
7
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/examples/example.es6.js
generated
vendored
@ -3,8 +3,9 @@ import { join } from 'path'
|
|||||||
|
|
||||||
import { Helper } from '../src'
|
import { Helper } from '../src'
|
||||||
|
|
||||||
const helper = new Helper(fs.readFileSync(
|
const helper = new Helper(
|
||||||
'./test/resources/Ceco.NET-Architecture-Tm-53.dxf', 'utf-8'))
|
fs.readFileSync('./test/resources/Ceco.NET-Architecture-Tm-53.dxf', 'utf-8'),
|
||||||
|
)
|
||||||
|
|
||||||
// The parsed entities
|
// The parsed entities
|
||||||
const { blocks, entities } = helper.parsed
|
const { blocks, entities } = helper.parsed
|
||||||
@ -18,7 +19,7 @@ console.log(`denormalised: ${helper.denormalised.length} entities.\n`)
|
|||||||
const groups = helper.groups
|
const groups = helper.groups
|
||||||
console.log('grouped entities')
|
console.log('grouped entities')
|
||||||
console.log('----------------')
|
console.log('----------------')
|
||||||
Object.keys(groups).forEach(layer => {
|
Object.keys(groups).forEach((layer) => {
|
||||||
console.log(`${layer}: ${groups[layer].length}`)
|
console.log(`${layer}: ${groups[layer].length}`)
|
||||||
})
|
})
|
||||||
console.log('\n')
|
console.log('\n')
|
||||||
|
78
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/Helper.js
generated
vendored
78
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/Helper.js
generated
vendored
@ -4,56 +4,57 @@ Object.defineProperty(exports, "__esModule", {
|
|||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = void 0;
|
exports["default"] = void 0;
|
||||||
|
|
||||||
var _logger = _interopRequireDefault(require("./util/logger"));
|
var _logger = _interopRequireDefault(require("./util/logger"));
|
||||||
|
|
||||||
var _parseString = _interopRequireDefault(require("./parseString"));
|
var _parseString = _interopRequireDefault(require("./parseString"));
|
||||||
|
|
||||||
var _denormalise2 = _interopRequireDefault(require("./denormalise"));
|
var _denormalise2 = _interopRequireDefault(require("./denormalise"));
|
||||||
|
|
||||||
var _toSVG2 = _interopRequireDefault(require("./toSVG"));
|
var _toSVG2 = _interopRequireDefault(require("./toSVG"));
|
||||||
|
|
||||||
var _toPolylines2 = _interopRequireDefault(require("./toPolylines"));
|
var _toPolylines2 = _interopRequireDefault(require("./toPolylines"));
|
||||||
|
|
||||||
var _groupEntitiesByLayer = _interopRequireDefault(require("./groupEntitiesByLayer"));
|
var _groupEntitiesByLayer = _interopRequireDefault(require("./groupEntitiesByLayer"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
||||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||||
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
||||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
||||||
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
||||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
||||||
|
|
||||||
var Helper = /*#__PURE__*/function () {
|
var Helper = /*#__PURE__*/function () {
|
||||||
function Helper(contents) {
|
function Helper(contents) {
|
||||||
_classCallCheck(this, Helper);
|
_classCallCheck(this, Helper);
|
||||||
|
|
||||||
if (!(typeof contents === 'string')) {
|
if (!(typeof contents === 'string')) {
|
||||||
throw Error('Helper constructor expects a DXF string');
|
throw Error('Helper constructor expects a DXF string');
|
||||||
}
|
}
|
||||||
|
|
||||||
this._contents = contents;
|
this._contents = contents;
|
||||||
this._parsed = null;
|
this._parsed = null;
|
||||||
this._denormalised = null;
|
this._denormalised = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
_createClass(Helper, [{
|
_createClass(Helper, [{
|
||||||
key: "parse",
|
key: "parse",
|
||||||
value: function parse() {
|
value: function parse() {
|
||||||
this._parsed = (0, _parseString["default"])(this._contents);
|
this._parsed = (0, _parseString["default"])(this._contents);
|
||||||
|
|
||||||
_logger["default"].info('parsed:', this.parsed);
|
_logger["default"].info('parsed:', this.parsed);
|
||||||
|
return this._parsed;
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: "parsed",
|
||||||
|
get: function get() {
|
||||||
|
if (this._parsed === null) {
|
||||||
|
this.parse();
|
||||||
|
}
|
||||||
return this._parsed;
|
return this._parsed;
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
key: "denormalise",
|
key: "denormalise",
|
||||||
value: function denormalise() {
|
value: function denormalise() {
|
||||||
this._denormalised = (0, _denormalise2["default"])(this.parsed);
|
this._denormalised = (0, _denormalise2["default"])(this.parsed);
|
||||||
|
|
||||||
_logger["default"].info('denormalised:', this._denormalised);
|
_logger["default"].info('denormalised:', this._denormalised);
|
||||||
|
return this._denormalised;
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: "denormalised",
|
||||||
|
get: function get() {
|
||||||
|
if (!this._denormalised) {
|
||||||
|
this.denormalise();
|
||||||
|
}
|
||||||
return this._denormalised;
|
return this._denormalised;
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
@ -61,6 +62,14 @@ var Helper = /*#__PURE__*/function () {
|
|||||||
value: function group() {
|
value: function group() {
|
||||||
this._groups = (0, _groupEntitiesByLayer["default"])(this.denormalised);
|
this._groups = (0, _groupEntitiesByLayer["default"])(this.denormalised);
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
key: "groups",
|
||||||
|
get: function get() {
|
||||||
|
if (!this._groups) {
|
||||||
|
this.group();
|
||||||
|
}
|
||||||
|
return this._groups;
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
key: "toSVG",
|
key: "toSVG",
|
||||||
value: function toSVG() {
|
value: function toSVG() {
|
||||||
@ -71,36 +80,7 @@ var Helper = /*#__PURE__*/function () {
|
|||||||
value: function toPolylines() {
|
value: function toPolylines() {
|
||||||
return (0, _toPolylines2["default"])(this.parsed);
|
return (0, _toPolylines2["default"])(this.parsed);
|
||||||
}
|
}
|
||||||
}, {
|
|
||||||
key: "parsed",
|
|
||||||
get: function get() {
|
|
||||||
if (this._parsed === null) {
|
|
||||||
this.parse();
|
|
||||||
}
|
|
||||||
|
|
||||||
return this._parsed;
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
key: "denormalised",
|
|
||||||
get: function get() {
|
|
||||||
if (!this._denormalised) {
|
|
||||||
this.denormalise();
|
|
||||||
}
|
|
||||||
|
|
||||||
return this._denormalised;
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
key: "groups",
|
|
||||||
get: function get() {
|
|
||||||
if (!this._groups) {
|
|
||||||
this.group();
|
|
||||||
}
|
|
||||||
|
|
||||||
return this._groups;
|
|
||||||
}
|
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
return Helper;
|
return Helper;
|
||||||
}();
|
}();
|
||||||
|
|
||||||
exports["default"] = Helper;
|
exports["default"] = Helper;
|
13
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/applyTransforms.js
generated
vendored
13
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/applyTransforms.js
generated
vendored
@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = void 0;
|
exports["default"] = void 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply the transforms to the polyline.
|
* Apply the transforms to the polyline.
|
||||||
*
|
*
|
||||||
@ -17,38 +16,30 @@ var _default = function _default(polyline, transforms) {
|
|||||||
polyline = polyline.map(function (p) {
|
polyline = polyline.map(function (p) {
|
||||||
// Use a copy to avoid side effects
|
// Use a copy to avoid side effects
|
||||||
var p2 = [p[0], p[1]];
|
var p2 = [p[0], p[1]];
|
||||||
|
|
||||||
if (transform.scaleX) {
|
if (transform.scaleX) {
|
||||||
p2[0] = p2[0] * transform.scaleX;
|
p2[0] = p2[0] * transform.scaleX;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (transform.scaleY) {
|
if (transform.scaleY) {
|
||||||
p2[1] = p2[1] * transform.scaleY;
|
p2[1] = p2[1] * transform.scaleY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (transform.rotation) {
|
if (transform.rotation) {
|
||||||
var angle = transform.rotation / 180 * Math.PI;
|
var angle = transform.rotation / 180 * Math.PI;
|
||||||
p2 = [p2[0] * Math.cos(angle) - p2[1] * Math.sin(angle), p2[1] * Math.cos(angle) + p2[0] * Math.sin(angle)];
|
p2 = [p2[0] * Math.cos(angle) - p2[1] * Math.sin(angle), p2[1] * Math.cos(angle) + p2[0] * Math.sin(angle)];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (transform.x) {
|
if (transform.x) {
|
||||||
p2[0] = p2[0] + transform.x;
|
p2[0] = p2[0] + transform.x;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (transform.y) {
|
if (transform.y) {
|
||||||
p2[1] = p2[1] + transform.y;
|
p2[1] = p2[1] + transform.y;
|
||||||
} // Observed once in a sample DXF - some cad applications
|
}
|
||||||
|
// Observed once in a sample DXF - some cad applications
|
||||||
// use negative extruxion Z for flipping
|
// use negative extruxion Z for flipping
|
||||||
|
|
||||||
|
|
||||||
if (transform.extrusionZ === -1) {
|
if (transform.extrusionZ === -1) {
|
||||||
p2[0] = -p2[0];
|
p2[0] = -p2[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
return p2;
|
return p2;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return polyline;
|
return polyline;
|
||||||
};
|
};
|
||||||
|
|
||||||
exports["default"] = _default;
|
exports["default"] = _default;
|
7
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/cli.js
generated
vendored
7
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/cli.js
generated
vendored
@ -2,16 +2,11 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var _commander = _interopRequireDefault(require("commander"));
|
var _commander = _interopRequireDefault(require("commander"));
|
||||||
|
|
||||||
var _fs = _interopRequireDefault(require("fs"));
|
var _fs = _interopRequireDefault(require("fs"));
|
||||||
|
|
||||||
var _ = require("./");
|
var _ = require("./");
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
_commander["default"].version(require('../package.json').version).description('Converts a dxf file to a svg file.').arguments('<dxfFile> [svgFile]').option('-v --verbose', 'Verbose output').action(function (dxfFile, svgFile, options) {
|
_commander["default"].version(require('../package.json').version).description('Converts a dxf file to a svg file.').arguments('<dxfFile> [svgFile]').option('-v --verbose', 'Verbose output').action(function (dxfFile, svgFile, options) {
|
||||||
var parsed = (0, _.parseString)(_fs["default"].readFileSync(dxfFile, 'utf-8'));
|
var parsed = (0, _.parseString)(_fs["default"].readFileSync(dxfFile, 'utf-8'));
|
||||||
|
|
||||||
if (options.verbose) {
|
if (options.verbose) {
|
||||||
var groups = (0, _.groupEntitiesByLayer)((0, _.denormalise)(parsed));
|
var groups = (0, _.groupEntitiesByLayer)((0, _.denormalise)(parsed));
|
||||||
console.log('[layer : number of entities]');
|
console.log('[layer : number of entities]');
|
||||||
@ -19,10 +14,8 @@ _commander["default"].version(require('../package.json').version).description('C
|
|||||||
console.log("".concat(layer, " : ").concat(groups[layer].length));
|
console.log("".concat(layer, " : ").concat(groups[layer].length));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
_fs["default"].writeFileSync(svgFile || "".concat(dxfFile.split('.').slice(0, -1).join('.'), ".svg"), (0, _.toSVG)(parsed), 'utf-8');
|
_fs["default"].writeFileSync(svgFile || "".concat(dxfFile.split('.').slice(0, -1).join('.'), ".svg"), (0, _.toSVG)(parsed), 'utf-8');
|
||||||
}).parse(process.argv);
|
}).parse(process.argv);
|
||||||
|
|
||||||
if (!process.argv.slice(2).length) {
|
if (!process.argv.slice(2).length) {
|
||||||
_commander["default"].help();
|
_commander["default"].help();
|
||||||
}
|
}
|
50
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/denormalise.js
generated
vendored
50
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/denormalise.js
generated
vendored
@ -4,47 +4,33 @@ Object.defineProperty(exports, "__esModule", {
|
|||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = void 0;
|
exports["default"] = void 0;
|
||||||
|
var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
|
||||||
var _lodash = require("lodash");
|
|
||||||
|
|
||||||
var _logger = _interopRequireDefault(require("./util/logger"));
|
var _logger = _interopRequireDefault(require("./util/logger"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
||||||
|
|
||||||
var _default = function _default(parseResult) {
|
var _default = function _default(parseResult) {
|
||||||
var blocksByName = parseResult.blocks.reduce(function (acc, b) {
|
var blocksByName = parseResult.blocks.reduce(function (acc, b) {
|
||||||
acc[b.name] = b;
|
acc[b.name] = b;
|
||||||
return acc;
|
return acc;
|
||||||
}, {});
|
}, {});
|
||||||
|
|
||||||
var gatherEntities = function gatherEntities(entities, transforms) {
|
var gatherEntities = function gatherEntities(entities, transforms) {
|
||||||
var current = [];
|
var current = [];
|
||||||
entities.forEach(function (e) {
|
entities.forEach(function (e) {
|
||||||
if (e.type === 'INSERT') {
|
if (e.type === 'INSERT') {
|
||||||
var _ret = function () {
|
|
||||||
var _insert$rowCount, _insert$columnCount, _insert$rowSpacing, _insert$columnSpacing, _insert$rotation;
|
var _insert$rowCount, _insert$columnCount, _insert$rowSpacing, _insert$columnSpacing, _insert$rotation;
|
||||||
|
|
||||||
var insert = e;
|
var insert = e;
|
||||||
var block = blocksByName[insert.block];
|
var block = blocksByName[insert.block];
|
||||||
|
|
||||||
if (!block) {
|
if (!block) {
|
||||||
_logger["default"].error('no block found for insert. block:', insert.block);
|
_logger["default"].error('no block found for insert. block:', insert.block);
|
||||||
|
return;
|
||||||
return {
|
|
||||||
v: void 0
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var rowCount = (_insert$rowCount = insert.rowCount) !== null && _insert$rowCount !== void 0 ? _insert$rowCount : 1;
|
var rowCount = (_insert$rowCount = insert.rowCount) !== null && _insert$rowCount !== void 0 ? _insert$rowCount : 1;
|
||||||
var columnCount = (_insert$columnCount = insert.columnCount) !== null && _insert$columnCount !== void 0 ? _insert$columnCount : 1;
|
var columnCount = (_insert$columnCount = insert.columnCount) !== null && _insert$columnCount !== void 0 ? _insert$columnCount : 1;
|
||||||
var rowSpacing = (_insert$rowSpacing = insert.rowSpacing) !== null && _insert$rowSpacing !== void 0 ? _insert$rowSpacing : 0;
|
var rowSpacing = (_insert$rowSpacing = insert.rowSpacing) !== null && _insert$rowSpacing !== void 0 ? _insert$rowSpacing : 0;
|
||||||
var columnSpacing = (_insert$columnSpacing = insert.columnSpacing) !== null && _insert$columnSpacing !== void 0 ? _insert$columnSpacing : 0;
|
var columnSpacing = (_insert$columnSpacing = insert.columnSpacing) !== null && _insert$columnSpacing !== void 0 ? _insert$columnSpacing : 0;
|
||||||
var rotation = (_insert$rotation = insert.rotation) !== null && _insert$rotation !== void 0 ? _insert$rotation : 0; // It appears that the rectangular array is affected by rotation, but NOT by scale.
|
var rotation = (_insert$rotation = insert.rotation) !== null && _insert$rotation !== void 0 ? _insert$rotation : 0;
|
||||||
|
|
||||||
|
// It appears that the rectangular array is affected by rotation, but NOT by scale.
|
||||||
var rowVec, colVec;
|
var rowVec, colVec;
|
||||||
|
|
||||||
if (rowCount > 1 || columnCount > 1) {
|
if (rowCount > 1 || columnCount > 1) {
|
||||||
var cos = Math.cos(rotation * Math.PI / 180);
|
var cos = Math.cos(rotation * Math.PI / 180);
|
||||||
var sin = Math.sin(rotation * Math.PI / 180);
|
var sin = Math.sin(rotation * Math.PI / 180);
|
||||||
@ -65,9 +51,9 @@ var _default = function _default(parseResult) {
|
|||||||
x: 0,
|
x: 0,
|
||||||
y: 0
|
y: 0
|
||||||
};
|
};
|
||||||
} // For rectangular arrays, add the block entities for each location in the array
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// For rectangular arrays, add the block entities for each location in the array
|
||||||
for (var r = 0; r < rowCount; r++) {
|
for (var r = 0; r < rowCount; r++) {
|
||||||
for (var c = 0; c < columnCount; c++) {
|
for (var c = 0; c < columnCount; c++) {
|
||||||
// Adjust insert transform by row and column for rectangular arrays
|
// Adjust insert transform by row and column for rectangular arrays
|
||||||
@ -81,19 +67,20 @@ var _default = function _default(parseResult) {
|
|||||||
extrusionY: insert.extrusionY,
|
extrusionY: insert.extrusionY,
|
||||||
extrusionZ: insert.extrusionZ,
|
extrusionZ: insert.extrusionZ,
|
||||||
rotation: insert.rotation
|
rotation: insert.rotation
|
||||||
}; // Add the insert transform and recursively add entities
|
};
|
||||||
|
// Add the insert transform and recursively add entities
|
||||||
var transforms2 = transforms.slice(0);
|
var transforms2 = transforms.slice(0);
|
||||||
transforms2.push(t); // Use the insert layer
|
transforms2.push(t);
|
||||||
|
|
||||||
|
// Use the insert layer
|
||||||
var blockEntities = block.entities.map(function (be) {
|
var blockEntities = block.entities.map(function (be) {
|
||||||
var be2 = (0, _lodash.cloneDeep)(be);
|
var be2 = (0, _cloneDeep["default"])(be);
|
||||||
be2.layer = insert.layer; // https://github.com/bjnortier/dxf/issues/52
|
be2.layer = insert.layer;
|
||||||
|
// https://github.com/bjnortier/dxf/issues/52
|
||||||
// See Issue 52. If we don't modify the
|
// See Issue 52. If we don't modify the
|
||||||
// entity coordinates here it creates an issue with the
|
// entity coordinates here it creates an issue with the
|
||||||
// transformation matrices (which are only applied AFTER
|
// transformation matrices (which are only applied AFTER
|
||||||
// block insertion modifications has been applied).
|
// block insertion modifications has been applied).
|
||||||
|
|
||||||
switch (be2.type) {
|
switch (be2.type) {
|
||||||
case 'LINE':
|
case 'LINE':
|
||||||
{
|
{
|
||||||
@ -103,7 +90,6 @@ var _default = function _default(parseResult) {
|
|||||||
be2.end.y -= block.y;
|
be2.end.y -= block.y;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'LWPOLYLINE':
|
case 'LWPOLYLINE':
|
||||||
case 'POLYLINE':
|
case 'POLYLINE':
|
||||||
{
|
{
|
||||||
@ -113,7 +99,6 @@ var _default = function _default(parseResult) {
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'CIRCLE':
|
case 'CIRCLE':
|
||||||
case 'ELLIPSE':
|
case 'ELLIPSE':
|
||||||
case 'ARC':
|
case 'ARC':
|
||||||
@ -122,7 +107,6 @@ var _default = function _default(parseResult) {
|
|||||||
be2.y -= block.y;
|
be2.y -= block.y;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'SPLINE':
|
case 'SPLINE':
|
||||||
{
|
{
|
||||||
be2.controlPoints.forEach(function (cp) {
|
be2.controlPoints.forEach(function (cp) {
|
||||||
@ -132,29 +116,23 @@ var _default = function _default(parseResult) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return be2;
|
return be2;
|
||||||
});
|
});
|
||||||
current = current.concat(gatherEntities(blockEntities, transforms2));
|
current = current.concat(gatherEntities(blockEntities, transforms2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}();
|
|
||||||
|
|
||||||
if (_typeof(_ret) === "object") return _ret.v;
|
|
||||||
} else {
|
} else {
|
||||||
// Top-level entity. Clone and add the transforms
|
// Top-level entity. Clone and add the transforms
|
||||||
// The transforms are reversed so they occur in
|
// The transforms are reversed so they occur in
|
||||||
// order of application - i.e. the transform of the
|
// order of application - i.e. the transform of the
|
||||||
// top-level insert is applied last
|
// top-level insert is applied last
|
||||||
var e2 = (0, _lodash.cloneDeep)(e);
|
var e2 = (0, _cloneDeep["default"])(e);
|
||||||
e2.transforms = transforms.slice().reverse();
|
e2.transforms = transforms.slice().reverse();
|
||||||
current.push(e2);
|
current.push(e2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return current;
|
return current;
|
||||||
};
|
};
|
||||||
|
|
||||||
return gatherEntities(parseResult.entities, []);
|
return gatherEntities(parseResult.entities, []);
|
||||||
};
|
};
|
||||||
|
|
||||||
exports["default"] = _default;
|
exports["default"] = _default;
|
187
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/entityToPolyline.js
generated
vendored
187
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/entityToPolyline.js
generated
vendored
@ -3,16 +3,18 @@
|
|||||||
Object.defineProperty(exports, "__esModule", {
|
Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = exports.interpolateBSpline = void 0;
|
exports.polyfaceOutline = exports.interpolateBSpline = exports["default"] = void 0;
|
||||||
|
|
||||||
var _bSpline = _interopRequireDefault(require("./util/bSpline"));
|
var _bSpline = _interopRequireDefault(require("./util/bSpline"));
|
||||||
|
|
||||||
var _logger = _interopRequireDefault(require("./util/logger"));
|
var _logger = _interopRequireDefault(require("./util/logger"));
|
||||||
|
|
||||||
var _createArcForLWPolyline = _interopRequireDefault(require("./util/createArcForLWPolyline"));
|
var _createArcForLWPolyline = _interopRequireDefault(require("./util/createArcForLWPolyline"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
||||||
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
||||||
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
||||||
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
||||||
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
||||||
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
||||||
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
||||||
/**
|
/**
|
||||||
* Rotate a set of points.
|
* Rotate a set of points.
|
||||||
*
|
*
|
||||||
@ -24,6 +26,7 @@ var rotate = function rotate(points, angle) {
|
|||||||
return [p[0] * Math.cos(angle) - p[1] * Math.sin(angle), p[1] * Math.cos(angle) + p[0] * Math.sin(angle)];
|
return [p[0] * Math.cos(angle) - p[1] * Math.sin(angle), p[1] * Math.cos(angle) + p[0] * Math.sin(angle)];
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interpolate an ellipse
|
* Interpolate an ellipse
|
||||||
* @param cx center X
|
* @param cx center X
|
||||||
@ -33,35 +36,34 @@ var rotate = function rotate(points, angle) {
|
|||||||
* @param start start angle in radians
|
* @param start start angle in radians
|
||||||
* @param start end angle in radians
|
* @param start end angle in radians
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
var interpolateEllipse = function interpolateEllipse(cx, cy, rx, ry, start, end, rotationAngle) {
|
var interpolateEllipse = function interpolateEllipse(cx, cy, rx, ry, start, end, rotationAngle) {
|
||||||
if (end < start) {
|
if (end < start) {
|
||||||
end += Math.PI * 2;
|
end += Math.PI * 2;
|
||||||
} // ----- Relative points -----
|
}
|
||||||
|
|
||||||
|
// ----- Relative points -----
|
||||||
|
|
||||||
// Start point
|
// Start point
|
||||||
|
|
||||||
|
|
||||||
var points = [];
|
var points = [];
|
||||||
var dTheta = Math.PI * 2 / 72;
|
var dTheta = Math.PI * 2 / 72;
|
||||||
var EPS = 1e-6;
|
var EPS = 1e-6;
|
||||||
|
|
||||||
for (var theta = start; theta < end - EPS; theta += dTheta) {
|
for (var theta = start; theta < end - EPS; theta += dTheta) {
|
||||||
points.push([Math.cos(theta) * rx, Math.sin(theta) * ry]);
|
points.push([Math.cos(theta) * rx, Math.sin(theta) * ry]);
|
||||||
}
|
}
|
||||||
|
points.push([Math.cos(end) * rx, Math.sin(end) * ry]);
|
||||||
|
|
||||||
points.push([Math.cos(end) * rx, Math.sin(end) * ry]); // ----- Rotate -----
|
// ----- Rotate -----
|
||||||
|
|
||||||
if (rotationAngle) {
|
if (rotationAngle) {
|
||||||
points = rotate(points, rotationAngle);
|
points = rotate(points, rotationAngle);
|
||||||
} // ----- Offset center -----
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ----- Offset center -----
|
||||||
points = points.map(function (p) {
|
points = points.map(function (p) {
|
||||||
return [cx + p[0], cy + p[1]];
|
return [cx + p[0], cy + p[1]];
|
||||||
});
|
});
|
||||||
return points;
|
return points;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interpolate a b-spline. The algorithm examins the knot vector
|
* Interpolate a b-spline. The algorithm examins the knot vector
|
||||||
* to create segments for interpolation. The parameterisation value
|
* to create segments for interpolation. The parameterisation value
|
||||||
@ -73,77 +75,165 @@ var interpolateEllipse = function interpolateEllipse(cx, cy, rx, ry, start, end,
|
|||||||
* @param knots the knot vector
|
* @param knots the knot vector
|
||||||
* @returns the polyline
|
* @returns the polyline
|
||||||
*/
|
*/
|
||||||
|
var interpolateBSpline = function interpolateBSpline(controlPoints, degree, knots, interpolationsPerSplineSegment, weights) {
|
||||||
|
|
||||||
var interpolateBSpline = function interpolateBSpline(controlPoints, degree, knots, interpolationsPerSplineSegment) {
|
|
||||||
var polyline = [];
|
var polyline = [];
|
||||||
var controlPointsForLib = controlPoints.map(function (p) {
|
var controlPointsForLib = controlPoints.map(function (p) {
|
||||||
return [p.x, p.y];
|
return [p.x, p.y];
|
||||||
});
|
});
|
||||||
var segmentTs = [knots[degree]];
|
var segmentTs = [knots[degree]];
|
||||||
var domain = [knots[degree], knots[knots.length - 1 - degree]];
|
var domain = [knots[degree], knots[knots.length - 1 - degree]];
|
||||||
|
|
||||||
for (var k = degree + 1; k < knots.length - degree; ++k) {
|
for (var k = degree + 1; k < knots.length - degree; ++k) {
|
||||||
if (segmentTs[segmentTs.length - 1] !== knots[k]) {
|
if (segmentTs[segmentTs.length - 1] !== knots[k]) {
|
||||||
segmentTs.push(knots[k]);
|
segmentTs.push(knots[k]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
interpolationsPerSplineSegment = interpolationsPerSplineSegment || 25;
|
interpolationsPerSplineSegment = interpolationsPerSplineSegment || 25;
|
||||||
|
|
||||||
for (var i = 1; i < segmentTs.length; ++i) {
|
for (var i = 1; i < segmentTs.length; ++i) {
|
||||||
var uMin = segmentTs[i - 1];
|
var uMin = segmentTs[i - 1];
|
||||||
var uMax = segmentTs[i];
|
var uMax = segmentTs[i];
|
||||||
|
|
||||||
for (var _k = 0; _k <= interpolationsPerSplineSegment; ++_k) {
|
for (var _k = 0; _k <= interpolationsPerSplineSegment; ++_k) {
|
||||||
var u = _k / interpolationsPerSplineSegment * (uMax - uMin) + uMin; // Clamp t to 0, 1 to handle numerical precision issues
|
var u = _k / interpolationsPerSplineSegment * (uMax - uMin) + uMin;
|
||||||
|
// Clamp t to 0, 1 to handle numerical precision issues
|
||||||
var t = (u - domain[0]) / (domain[1] - domain[0]);
|
var t = (u - domain[0]) / (domain[1] - domain[0]);
|
||||||
t = Math.max(t, 0);
|
t = Math.max(t, 0);
|
||||||
t = Math.min(t, 1);
|
t = Math.min(t, 1);
|
||||||
var p = (0, _bSpline["default"])(t, degree, controlPointsForLib, knots);
|
var p = (0, _bSpline["default"])(t, degree, controlPointsForLib, knots, weights);
|
||||||
polyline.push(p);
|
polyline.push(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return polyline;
|
return polyline;
|
||||||
};
|
};
|
||||||
|
exports.interpolateBSpline = interpolateBSpline;
|
||||||
|
var polyfaceOutline = function polyfaceOutline(entity) {
|
||||||
|
var vertices = [];
|
||||||
|
var faces = [];
|
||||||
|
var _iterator = _createForOfIteratorHelper(entity.vertices),
|
||||||
|
_step;
|
||||||
|
try {
|
||||||
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
||||||
|
var v = _step.value;
|
||||||
|
if (v.faces) {
|
||||||
|
var _face = {
|
||||||
|
indices: [],
|
||||||
|
hiddens: []
|
||||||
|
};
|
||||||
|
var _iterator3 = _createForOfIteratorHelper(v.faces),
|
||||||
|
_step3;
|
||||||
|
try {
|
||||||
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
||||||
|
var i = _step3.value;
|
||||||
|
if (i === 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// Negative indices signify hidden edges
|
||||||
|
_face.indices.push(i < 0 ? -i - 1 : i - 1);
|
||||||
|
_face.hiddens.push(i < 0);
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
_iterator3.e(err);
|
||||||
|
} finally {
|
||||||
|
_iterator3.f();
|
||||||
|
}
|
||||||
|
if ([3, 4].includes(_face.indices.length)) faces.push(_face);
|
||||||
|
} else {
|
||||||
|
vertices.push({
|
||||||
|
x: v.x,
|
||||||
|
y: v.y
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If a segment starts at the end of a previous line, continue it
|
||||||
|
} catch (err) {
|
||||||
|
_iterator.e(err);
|
||||||
|
} finally {
|
||||||
|
_iterator.f();
|
||||||
|
}
|
||||||
|
var polylines = [];
|
||||||
|
var segment = function segment(a, b) {
|
||||||
|
for (var _i = 0, _polylines = polylines; _i < _polylines.length; _i++) {
|
||||||
|
var prev = _polylines[_i];
|
||||||
|
if (prev.slice(-1)[0] === a) {
|
||||||
|
return prev.push(b);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
polylines.push([a, b]);
|
||||||
|
};
|
||||||
|
for (var _i2 = 0, _faces = faces; _i2 < _faces.length; _i2++) {
|
||||||
|
var face = _faces[_i2];
|
||||||
|
for (var beg = 0; beg < face.indices.length; beg++) {
|
||||||
|
if (face.hiddens[beg]) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
var end = (beg + 1) % face.indices.length;
|
||||||
|
segment(face.indices[beg], face.indices[end]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sometimes segments are not sequential, in that case
|
||||||
|
// we need to find if they can mend gaps between others
|
||||||
|
for (var _i3 = 0, _polylines2 = polylines; _i3 < _polylines2.length; _i3++) {
|
||||||
|
var a = _polylines2[_i3];
|
||||||
|
var _iterator2 = _createForOfIteratorHelper(polylines),
|
||||||
|
_step2;
|
||||||
|
try {
|
||||||
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
||||||
|
var b = _step2.value;
|
||||||
|
if (a !== b && a[0] === b.slice(-1)[0]) {
|
||||||
|
b.push.apply(b, _toConsumableArray(a.slice(1)));
|
||||||
|
a.splice(0, a.length);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
_iterator2.e(err);
|
||||||
|
} finally {
|
||||||
|
_iterator2.f();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return polylines.filter(function (l) {
|
||||||
|
return l.length;
|
||||||
|
}).map(function (l) {
|
||||||
|
return l.map(function (i) {
|
||||||
|
return vertices[i];
|
||||||
|
}).map(function (v) {
|
||||||
|
return [v.x, v.y];
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert a parsed DXF entity to a polyline. These can be used to render the
|
* Convert a parsed DXF entity to a polyline. These can be used to render the
|
||||||
* the DXF in SVG, Canvas, WebGL etc., without depending on native support
|
* the DXF in SVG, Canvas, WebGL etc., without depending on native support
|
||||||
* of primitive objects (ellispe, spline etc.)
|
* of primitive objects (ellispe, spline etc.)
|
||||||
*/
|
*/
|
||||||
|
exports.polyfaceOutline = polyfaceOutline;
|
||||||
|
|
||||||
exports.interpolateBSpline = interpolateBSpline;
|
|
||||||
|
|
||||||
var _default = function _default(entity, options) {
|
var _default = function _default(entity, options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
var polyline;
|
var polyline;
|
||||||
|
|
||||||
if (entity.type === 'LINE') {
|
if (entity.type === 'LINE') {
|
||||||
polyline = [[entity.start.x, entity.start.y], [entity.end.x, entity.end.y]];
|
polyline = [[entity.start.x, entity.start.y], [entity.end.x, entity.end.y]];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.type === 'LWPOLYLINE' || entity.type === 'POLYLINE') {
|
if (entity.type === 'LWPOLYLINE' || entity.type === 'POLYLINE') {
|
||||||
polyline = [];
|
polyline = [];
|
||||||
|
if (entity.polyfaceMesh) {
|
||||||
if (entity.polygonMesh || entity.polyfaceMesh) {// Do not attempt to render meshes
|
var _polyline;
|
||||||
|
// Only return the first polyline because we can't return many
|
||||||
|
(_polyline = polyline).push.apply(_polyline, _toConsumableArray(polyfaceOutline(entity)[0]));
|
||||||
|
} else if (entity.polygonMesh) {
|
||||||
|
// Do not attempt to render polygon meshes
|
||||||
} else if (entity.vertices.length) {
|
} else if (entity.vertices.length) {
|
||||||
if (entity.closed) {
|
if (entity.closed) {
|
||||||
entity.vertices = entity.vertices.concat(entity.vertices[0]);
|
entity.vertices = entity.vertices.concat(entity.vertices[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0, il = entity.vertices.length; i < il - 1; ++i) {
|
for (var i = 0, il = entity.vertices.length; i < il - 1; ++i) {
|
||||||
var from = [entity.vertices[i].x, entity.vertices[i].y];
|
var from = [entity.vertices[i].x, entity.vertices[i].y];
|
||||||
var to = [entity.vertices[i + 1].x, entity.vertices[i + 1].y];
|
var to = [entity.vertices[i + 1].x, entity.vertices[i + 1].y];
|
||||||
polyline.push(from);
|
polyline.push(from);
|
||||||
|
|
||||||
if (entity.vertices[i].bulge) {
|
if (entity.vertices[i].bulge) {
|
||||||
polyline = polyline.concat((0, _createArcForLWPolyline["default"])(from, to, entity.vertices[i].bulge));
|
polyline = polyline.concat((0, _createArcForLWPolyline["default"])(from, to, entity.vertices[i].bulge));
|
||||||
} // The last iteration of the for loop
|
}
|
||||||
|
// The last iteration of the for loop
|
||||||
|
|
||||||
if (i === il - 2) {
|
if (i === il - 2) {
|
||||||
polyline.push(to);
|
polyline.push(to);
|
||||||
}
|
}
|
||||||
@ -152,54 +242,45 @@ var _default = function _default(entity, options) {
|
|||||||
_logger["default"].warn('Polyline entity with no vertices');
|
_logger["default"].warn('Polyline entity with no vertices');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.type === 'CIRCLE') {
|
if (entity.type === 'CIRCLE') {
|
||||||
polyline = interpolateEllipse(entity.x, entity.y, entity.r, entity.r, 0, Math.PI * 2);
|
polyline = interpolateEllipse(entity.x, entity.y, entity.r, entity.r, 0, Math.PI * 2);
|
||||||
|
|
||||||
if (entity.extrusionZ === -1) {
|
if (entity.extrusionZ === -1) {
|
||||||
polyline = polyline.map(function (p) {
|
polyline = polyline.map(function (p) {
|
||||||
return [-p[0], p[1]];
|
return [-p[0], p[1]];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.type === 'ELLIPSE') {
|
if (entity.type === 'ELLIPSE') {
|
||||||
var rx = Math.sqrt(entity.majorX * entity.majorX + entity.majorY * entity.majorY);
|
var rx = Math.sqrt(entity.majorX * entity.majorX + entity.majorY * entity.majorY);
|
||||||
var ry = entity.axisRatio * rx;
|
var ry = entity.axisRatio * rx;
|
||||||
var majorAxisRotation = -Math.atan2(-entity.majorY, entity.majorX);
|
var majorAxisRotation = -Math.atan2(-entity.majorY, entity.majorX);
|
||||||
polyline = interpolateEllipse(entity.x, entity.y, rx, ry, entity.startAngle, entity.endAngle, majorAxisRotation);
|
polyline = interpolateEllipse(entity.x, entity.y, rx, ry, entity.startAngle, entity.endAngle, majorAxisRotation);
|
||||||
|
|
||||||
if (entity.extrusionZ === -1) {
|
if (entity.extrusionZ === -1) {
|
||||||
polyline = polyline.map(function (p) {
|
polyline = polyline.map(function (p) {
|
||||||
return [-p[0], p[1]];
|
return [-p[0], p[1]];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.type === 'ARC') {
|
if (entity.type === 'ARC') {
|
||||||
// Why on earth DXF has degree start & end angles for arc,
|
// Why on earth DXF has degree start & end angles for arc,
|
||||||
// and radian start & end angles for ellipses is a mystery
|
// and radian start & end angles for ellipses is a mystery
|
||||||
polyline = interpolateEllipse(entity.x, entity.y, entity.r, entity.r, entity.startAngle, entity.endAngle, undefined, false); // I kid you not, ARCs and ELLIPSEs handle this differently,
|
polyline = interpolateEllipse(entity.x, entity.y, entity.r, entity.r, entity.startAngle, entity.endAngle, undefined, false);
|
||||||
// as evidenced by how AutoCAD actually renders these entities
|
|
||||||
|
|
||||||
|
// I kid you not, ARCs and ELLIPSEs handle this differently,
|
||||||
|
// as evidenced by how AutoCAD actually renders these entities
|
||||||
if (entity.extrusionZ === -1) {
|
if (entity.extrusionZ === -1) {
|
||||||
polyline = polyline.map(function (p) {
|
polyline = polyline.map(function (p) {
|
||||||
return [-p[0], p[1]];
|
return [-p[0], p[1]];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.type === 'SPLINE') {
|
if (entity.type === 'SPLINE') {
|
||||||
polyline = interpolateBSpline(entity.controlPoints, entity.degree, entity.knots, options.interpolationsPerSplineSegment);
|
polyline = interpolateBSpline(entity.controlPoints, entity.degree, entity.knots, options.interpolationsPerSplineSegment, entity.weights);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!polyline) {
|
if (!polyline) {
|
||||||
_logger["default"].warn('unsupported entity for converting to polyline:', entity.type);
|
_logger["default"].warn('unsupported entity for converting to polyline:', entity.type);
|
||||||
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
return polyline;
|
return polyline;
|
||||||
};
|
};
|
||||||
|
|
||||||
exports["default"] = _default;
|
exports["default"] = _default;
|
12
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/getRGBForEntity.js
generated
vendored
12
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/getRGBForEntity.js
generated
vendored
@ -4,32 +4,24 @@ Object.defineProperty(exports, "__esModule", {
|
|||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = void 0;
|
exports["default"] = void 0;
|
||||||
|
|
||||||
var _colors = _interopRequireDefault(require("./util/colors"));
|
var _colors = _interopRequireDefault(require("./util/colors"));
|
||||||
|
|
||||||
var _logger = _interopRequireDefault(require("./util/logger"));
|
var _logger = _interopRequireDefault(require("./util/logger"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
var _default = function _default(layers, entity) {
|
var _default = function _default(layers, entity) {
|
||||||
var layerTable = layers[entity.layer];
|
var layerTable = layers[entity.layer];
|
||||||
|
|
||||||
if (layerTable) {
|
if (layerTable) {
|
||||||
var colorNumber = 'colorNumber' in entity ? entity.colorNumber : layerTable.colorNumber;
|
var colorDefinedInEntity = 'colorNumber' in entity && entity.colorNumber !== 256;
|
||||||
|
var colorNumber = colorDefinedInEntity ? entity.colorNumber : layerTable.colorNumber;
|
||||||
var rgb = _colors["default"][colorNumber];
|
var rgb = _colors["default"][colorNumber];
|
||||||
|
|
||||||
if (rgb) {
|
if (rgb) {
|
||||||
return rgb;
|
return rgb;
|
||||||
} else {
|
} else {
|
||||||
_logger["default"].warn('Color index', colorNumber, 'invalid, defaulting to black');
|
_logger["default"].warn('Color index', colorNumber, 'invalid, defaulting to black');
|
||||||
|
|
||||||
return [0, 0, 0];
|
return [0, 0, 0];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
_logger["default"].warn('no layer table for layer:' + entity.layer);
|
_logger["default"].warn('no layer table for layer:' + entity.layer);
|
||||||
|
|
||||||
return [0, 0, 0];
|
return [0, 0, 0];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
exports["default"] = _default;
|
exports["default"] = _default;
|
@ -4,18 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = void 0;
|
exports["default"] = void 0;
|
||||||
|
|
||||||
var _default = function _default(entities) {
|
var _default = function _default(entities) {
|
||||||
return entities.reduce(function (acc, entity) {
|
return entities.reduce(function (acc, entity) {
|
||||||
var layer = entity.layer;
|
var layer = entity.layer;
|
||||||
|
|
||||||
if (!acc[layer]) {
|
if (!acc[layer]) {
|
||||||
acc[layer] = [];
|
acc[layer] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
acc[layer].push(entity);
|
acc[layer].push(entity);
|
||||||
return acc;
|
return acc;
|
||||||
}, {});
|
}, {});
|
||||||
};
|
};
|
||||||
|
|
||||||
exports["default"] = _default;
|
exports["default"] = _default;
|
19
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/handlers/blocks.js
generated
vendored
19
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/handlers/blocks.js
generated
vendored
@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = void 0;
|
exports["default"] = void 0;
|
||||||
|
|
||||||
var _entities = _interopRequireDefault(require("./entities"));
|
var _entities = _interopRequireDefault(require("./entities"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
var _default = function _default(tuples) {
|
var _default = function _default(tuples) {
|
||||||
var state;
|
var state;
|
||||||
var blocks = [];
|
var blocks = [];
|
||||||
@ -17,7 +14,6 @@ var _default = function _default(tuples) {
|
|||||||
tuples.forEach(function (tuple) {
|
tuples.forEach(function (tuple) {
|
||||||
var type = tuple[0];
|
var type = tuple[0];
|
||||||
var value = tuple[1];
|
var value = tuple[1];
|
||||||
|
|
||||||
if (value === 'BLOCK') {
|
if (value === 'BLOCK') {
|
||||||
state = 'block';
|
state = 'block';
|
||||||
block = {};
|
block = {};
|
||||||
@ -29,7 +25,6 @@ var _default = function _default(tuples) {
|
|||||||
} else {
|
} else {
|
||||||
block.entities = [];
|
block.entities = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
entitiesTuples = undefined;
|
entitiesTuples = undefined;
|
||||||
state = undefined;
|
state = undefined;
|
||||||
} else if (state === 'block' && type !== 0) {
|
} else if (state === 'block' && type !== 0) {
|
||||||
@ -37,23 +32,26 @@ var _default = function _default(tuples) {
|
|||||||
case 1:
|
case 1:
|
||||||
block.xref = value;
|
block.xref = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
block.name = value;
|
block.name = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 10:
|
case 10:
|
||||||
block.x = value;
|
block.x = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 20:
|
case 20:
|
||||||
block.y = value;
|
block.y = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 30:
|
case 30:
|
||||||
block.z = value;
|
block.z = value;
|
||||||
break;
|
break;
|
||||||
|
case 67:
|
||||||
|
{
|
||||||
|
if (value !== 0) block.paperSpace = value;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 410:
|
||||||
|
block.layout = value;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -66,5 +64,4 @@ var _default = function _default(tuples) {
|
|||||||
});
|
});
|
||||||
return blocks;
|
return blocks;
|
||||||
};
|
};
|
||||||
|
|
||||||
exports["default"] = _default;
|
exports["default"] = _default;
|
36
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/handlers/entities.js
generated
vendored
36
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/handlers/entities.js
generated
vendored
@ -4,68 +4,55 @@ Object.defineProperty(exports, "__esModule", {
|
|||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = void 0;
|
exports["default"] = void 0;
|
||||||
|
|
||||||
var _logger = _interopRequireDefault(require("../util/logger"));
|
var _logger = _interopRequireDefault(require("../util/logger"));
|
||||||
|
|
||||||
var _point = _interopRequireDefault(require("./entity/point"));
|
var _point = _interopRequireDefault(require("./entity/point"));
|
||||||
|
|
||||||
var _line = _interopRequireDefault(require("./entity/line"));
|
var _line = _interopRequireDefault(require("./entity/line"));
|
||||||
|
|
||||||
var _lwpolyline = _interopRequireDefault(require("./entity/lwpolyline"));
|
var _lwpolyline = _interopRequireDefault(require("./entity/lwpolyline"));
|
||||||
|
|
||||||
var _polyline = _interopRequireDefault(require("./entity/polyline"));
|
var _polyline = _interopRequireDefault(require("./entity/polyline"));
|
||||||
|
|
||||||
var _vertex = _interopRequireDefault(require("./entity/vertex"));
|
var _vertex = _interopRequireDefault(require("./entity/vertex"));
|
||||||
|
|
||||||
var _circle = _interopRequireDefault(require("./entity/circle"));
|
var _circle = _interopRequireDefault(require("./entity/circle"));
|
||||||
|
|
||||||
var _arc = _interopRequireDefault(require("./entity/arc"));
|
var _arc = _interopRequireDefault(require("./entity/arc"));
|
||||||
|
|
||||||
var _ellipse = _interopRequireDefault(require("./entity/ellipse"));
|
var _ellipse = _interopRequireDefault(require("./entity/ellipse"));
|
||||||
|
|
||||||
var _spline = _interopRequireDefault(require("./entity/spline"));
|
var _spline = _interopRequireDefault(require("./entity/spline"));
|
||||||
|
|
||||||
var _solid = _interopRequireDefault(require("./entity/solid"));
|
var _solid = _interopRequireDefault(require("./entity/solid"));
|
||||||
|
var _hatch = _interopRequireDefault(require("./entity/hatch"));
|
||||||
var _mtext = _interopRequireDefault(require("./entity/mtext"));
|
var _mtext = _interopRequireDefault(require("./entity/mtext"));
|
||||||
|
var _attdef = _interopRequireDefault(require("./entity/attdef"));
|
||||||
|
var _attrib = _interopRequireDefault(require("./entity/attrib"));
|
||||||
var _insert = _interopRequireDefault(require("./entity/insert"));
|
var _insert = _interopRequireDefault(require("./entity/insert"));
|
||||||
|
|
||||||
var _threeDFace = _interopRequireDefault(require("./entity/threeDFace"));
|
var _threeDFace = _interopRequireDefault(require("./entity/threeDFace"));
|
||||||
|
var _dimension = _interopRequireDefault(require("./entity/dimension"));
|
||||||
|
var _text = _interopRequireDefault(require("./entity/text"));
|
||||||
|
var _viewport = _interopRequireDefault(require("./entity/viewport"));
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
var handlers = [_point["default"], _line["default"], _lwpolyline["default"], _polyline["default"], _vertex["default"], _circle["default"], _arc["default"], _ellipse["default"], _spline["default"], _solid["default"], _hatch["default"], _mtext["default"], _attdef["default"], _attrib["default"], _text["default"], _insert["default"], _dimension["default"], _threeDFace["default"], _viewport["default"]].reduce(function (acc, mod) {
|
||||||
var handlers = [_point["default"], _line["default"], _lwpolyline["default"], _polyline["default"], _vertex["default"], _circle["default"], _arc["default"], _ellipse["default"], _spline["default"], _solid["default"], _mtext["default"], _insert["default"], _threeDFace["default"]].reduce(function (acc, mod) {
|
|
||||||
acc[mod.TYPE] = mod;
|
acc[mod.TYPE] = mod;
|
||||||
return acc;
|
return acc;
|
||||||
}, {});
|
}, {});
|
||||||
|
|
||||||
var _default = function _default(tuples) {
|
var _default = function _default(tuples) {
|
||||||
var entities = [];
|
var entities = [];
|
||||||
var entityGroups = [];
|
var entityGroups = [];
|
||||||
var currentEntityTuples; // First group them together for easy processing
|
var currentEntityTuples;
|
||||||
|
|
||||||
|
// First group them together for easy processing
|
||||||
tuples.forEach(function (tuple) {
|
tuples.forEach(function (tuple) {
|
||||||
var type = tuple[0];
|
var type = tuple[0];
|
||||||
|
|
||||||
if (type === 0) {
|
if (type === 0) {
|
||||||
currentEntityTuples = [];
|
currentEntityTuples = [];
|
||||||
entityGroups.push(currentEntityTuples);
|
entityGroups.push(currentEntityTuples);
|
||||||
}
|
}
|
||||||
|
|
||||||
currentEntityTuples.push(tuple);
|
currentEntityTuples.push(tuple);
|
||||||
});
|
});
|
||||||
var currentPolyline;
|
var currentPolyline;
|
||||||
entityGroups.forEach(function (tuples) {
|
entityGroups.forEach(function (tuples) {
|
||||||
var entityType = tuples[0][1];
|
var entityType = tuples[0][1];
|
||||||
var contentTuples = tuples.slice(1);
|
var contentTuples = tuples.slice(1);
|
||||||
|
|
||||||
if (handlers[entityType] !== undefined) {
|
if (handlers[entityType] !== undefined) {
|
||||||
var e = handlers[entityType].process(contentTuples); // "POLYLINE" cannot be parsed in isolation, it is followed by
|
var e = handlers[entityType].process(contentTuples);
|
||||||
|
// "POLYLINE" cannot be parsed in isolation, it is followed by
|
||||||
// N "VERTEX" entities and ended with a "SEQEND" entity.
|
// N "VERTEX" entities and ended with a "SEQEND" entity.
|
||||||
// Essentially we convert POLYLINE to LWPOLYLINE - the extra
|
// Essentially we convert POLYLINE to LWPOLYLINE - the extra
|
||||||
// vertex flags are not supported
|
// vertex flags are not supported
|
||||||
|
|
||||||
if (entityType === 'POLYLINE') {
|
if (entityType === 'POLYLINE') {
|
||||||
currentPolyline = e;
|
currentPolyline = e;
|
||||||
entities.push(e);
|
entities.push(e);
|
||||||
@ -87,5 +74,4 @@ var _default = function _default(tuples) {
|
|||||||
});
|
});
|
||||||
return entities;
|
return entities;
|
||||||
};
|
};
|
||||||
|
|
||||||
exports["default"] = _default;
|
exports["default"] = _default;
|
16
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/handlers/entity/arc.js
generated
vendored
16
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/handlers/entity/arc.js
generated
vendored
@ -3,62 +3,48 @@
|
|||||||
Object.defineProperty(exports, "__esModule", {
|
Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = exports.process = exports.TYPE = void 0;
|
exports.process = exports["default"] = exports.TYPE = void 0;
|
||||||
|
|
||||||
var _common = _interopRequireDefault(require("./common"));
|
var _common = _interopRequireDefault(require("./common"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
var TYPE = 'ARC';
|
var TYPE = 'ARC';
|
||||||
exports.TYPE = TYPE;
|
exports.TYPE = TYPE;
|
||||||
|
|
||||||
var process = function process(tuples) {
|
var process = function process(tuples) {
|
||||||
return tuples.reduce(function (entity, tuple) {
|
return tuples.reduce(function (entity, tuple) {
|
||||||
var type = tuple[0];
|
var type = tuple[0];
|
||||||
var value = tuple[1];
|
var value = tuple[1];
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 10:
|
case 10:
|
||||||
entity.x = value;
|
entity.x = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 20:
|
case 20:
|
||||||
entity.y = value;
|
entity.y = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 30:
|
case 30:
|
||||||
entity.z = value;
|
entity.z = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 39:
|
case 39:
|
||||||
entity.thickness = value;
|
entity.thickness = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 40:
|
case 40:
|
||||||
entity.r = value;
|
entity.r = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 50:
|
case 50:
|
||||||
// *Someone* decided that ELLIPSE angles are in radians but
|
// *Someone* decided that ELLIPSE angles are in radians but
|
||||||
// ARC angles are in degrees
|
// ARC angles are in degrees
|
||||||
entity.startAngle = value / 180 * Math.PI;
|
entity.startAngle = value / 180 * Math.PI;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 51:
|
case 51:
|
||||||
entity.endAngle = value / 180 * Math.PI;
|
entity.endAngle = value / 180 * Math.PI;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Object.assign(entity, (0, _common["default"])(type, value));
|
Object.assign(entity, (0, _common["default"])(type, value));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
}, {
|
}, {
|
||||||
type: TYPE
|
type: TYPE
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.process = process;
|
exports.process = process;
|
||||||
var _default = {
|
var _default = {
|
||||||
TYPE: TYPE,
|
TYPE: TYPE,
|
||||||
|
@ -3,48 +3,37 @@
|
|||||||
Object.defineProperty(exports, "__esModule", {
|
Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = exports.process = exports.TYPE = void 0;
|
exports.process = exports["default"] = exports.TYPE = void 0;
|
||||||
|
|
||||||
var _common = _interopRequireDefault(require("./common"));
|
var _common = _interopRequireDefault(require("./common"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
var TYPE = 'CIRCLE';
|
var TYPE = 'CIRCLE';
|
||||||
exports.TYPE = TYPE;
|
exports.TYPE = TYPE;
|
||||||
|
|
||||||
var process = function process(tuples) {
|
var process = function process(tuples) {
|
||||||
return tuples.reduce(function (entity, tuple) {
|
return tuples.reduce(function (entity, tuple) {
|
||||||
var type = tuple[0];
|
var type = tuple[0];
|
||||||
var value = tuple[1];
|
var value = tuple[1];
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 10:
|
case 10:
|
||||||
entity.x = value;
|
entity.x = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 20:
|
case 20:
|
||||||
entity.y = value;
|
entity.y = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 30:
|
case 30:
|
||||||
entity.z = value;
|
entity.z = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 40:
|
case 40:
|
||||||
entity.r = value;
|
entity.r = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Object.assign(entity, (0, _common["default"])(type, value));
|
Object.assign(entity, (0, _common["default"])(type, value));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
}, {
|
}, {
|
||||||
type: TYPE
|
type: TYPE
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.process = process;
|
exports.process = process;
|
||||||
var _default = {
|
var _default = {
|
||||||
TYPE: TYPE,
|
TYPE: TYPE,
|
||||||
|
@ -4,9 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = void 0;
|
exports["default"] = void 0;
|
||||||
|
|
||||||
var _default = function _default(type, value) {
|
var _default = function _default(type, value) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
case 5:
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
handle: value
|
||||||
|
};
|
||||||
|
}
|
||||||
case 6:
|
case 6:
|
||||||
// Linetype name (present if not BYLAYER).
|
// Linetype name (present if not BYLAYER).
|
||||||
// The special name BYBLOCK indicates a
|
// The special name BYBLOCK indicates a
|
||||||
@ -14,24 +19,20 @@ var _default = function _default(type, value) {
|
|||||||
return {
|
return {
|
||||||
lineTypeName: value
|
lineTypeName: value
|
||||||
};
|
};
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
return {
|
return {
|
||||||
layer: value
|
layer: value
|
||||||
};
|
};
|
||||||
|
|
||||||
case 48:
|
case 48:
|
||||||
// Linetype scale (optional)
|
// Linetype scale (optional)
|
||||||
return {
|
return {
|
||||||
lineTypeScale: value
|
lineTypeScale: value
|
||||||
};
|
};
|
||||||
|
|
||||||
case 60:
|
case 60:
|
||||||
// Object visibility (optional): 0 = visible, 1 = invisible.
|
// Object visibility (optional): 0 = visible, 1 = invisible.
|
||||||
return {
|
return {
|
||||||
visible: value === 0
|
visible: value === 0
|
||||||
};
|
};
|
||||||
|
|
||||||
case 62:
|
case 62:
|
||||||
// Color number (present if not BYLAYER).
|
// Color number (present if not BYLAYER).
|
||||||
// Zero indicates the BYBLOCK (floating) color.
|
// Zero indicates the BYBLOCK (floating) color.
|
||||||
@ -40,25 +41,40 @@ var _default = function _default(type, value) {
|
|||||||
return {
|
return {
|
||||||
colorNumber: value
|
colorNumber: value
|
||||||
};
|
};
|
||||||
|
case 67:
|
||||||
|
// Paper space or sheet.
|
||||||
|
// Absent or zero indicates entity is in model space. 1 indicates entity is in paper space (optional)
|
||||||
|
return value === 0 ? {} : {
|
||||||
|
paperSpace: value
|
||||||
|
};
|
||||||
|
case 68:
|
||||||
|
// Identifies whether viewport is on but fully off screen, is not active, or is off
|
||||||
|
return {
|
||||||
|
viewportOn: value
|
||||||
|
};
|
||||||
|
case 69:
|
||||||
|
// Viewport identification number
|
||||||
|
return {
|
||||||
|
viewport: value
|
||||||
|
};
|
||||||
case 210:
|
case 210:
|
||||||
return {
|
return {
|
||||||
extrusionX: value
|
extrusionX: value
|
||||||
};
|
};
|
||||||
|
|
||||||
case 220:
|
case 220:
|
||||||
return {
|
return {
|
||||||
extrusionY: value
|
extrusionY: value
|
||||||
};
|
};
|
||||||
|
|
||||||
case 230:
|
case 230:
|
||||||
return {
|
return {
|
||||||
extrusionZ: value
|
extrusionZ: value
|
||||||
};
|
};
|
||||||
|
case 410:
|
||||||
|
return {
|
||||||
|
layout: value
|
||||||
|
};
|
||||||
default:
|
default:
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
exports["default"] = _default;
|
exports["default"] = _default;
|
@ -3,68 +3,52 @@
|
|||||||
Object.defineProperty(exports, "__esModule", {
|
Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = exports.process = exports.TYPE = void 0;
|
exports.process = exports["default"] = exports.TYPE = void 0;
|
||||||
|
|
||||||
var _common = _interopRequireDefault(require("./common"));
|
var _common = _interopRequireDefault(require("./common"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
var TYPE = 'ELLIPSE';
|
var TYPE = 'ELLIPSE';
|
||||||
exports.TYPE = TYPE;
|
exports.TYPE = TYPE;
|
||||||
|
|
||||||
var process = function process(tuples) {
|
var process = function process(tuples) {
|
||||||
return tuples.reduce(function (entity, tuple) {
|
return tuples.reduce(function (entity, tuple) {
|
||||||
var type = tuple[0];
|
var type = tuple[0];
|
||||||
var value = tuple[1];
|
var value = tuple[1];
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 10:
|
case 10:
|
||||||
entity.x = value;
|
entity.x = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 11:
|
case 11:
|
||||||
entity.majorX = value;
|
entity.majorX = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 20:
|
case 20:
|
||||||
entity.y = value;
|
entity.y = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 21:
|
case 21:
|
||||||
entity.majorY = value;
|
entity.majorY = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 30:
|
case 30:
|
||||||
entity.z = value;
|
entity.z = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 31:
|
case 31:
|
||||||
entity.majorZ = value;
|
entity.majorZ = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 40:
|
case 40:
|
||||||
entity.axisRatio = value;
|
entity.axisRatio = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 41:
|
case 41:
|
||||||
entity.startAngle = value;
|
entity.startAngle = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 42:
|
case 42:
|
||||||
entity.endAngle = value;
|
entity.endAngle = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Object.assign(entity, (0, _common["default"])(type, value));
|
Object.assign(entity, (0, _common["default"])(type, value));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
}, {
|
}, {
|
||||||
type: TYPE
|
type: TYPE
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.process = process;
|
exports.process = process;
|
||||||
var _default = {
|
var _default = {
|
||||||
TYPE: TYPE,
|
TYPE: TYPE,
|
||||||
|
@ -3,92 +3,70 @@
|
|||||||
Object.defineProperty(exports, "__esModule", {
|
Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = exports.process = exports.TYPE = void 0;
|
exports.process = exports["default"] = exports.TYPE = void 0;
|
||||||
|
|
||||||
var _common = _interopRequireDefault(require("./common"));
|
var _common = _interopRequireDefault(require("./common"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
var TYPE = 'INSERT';
|
var TYPE = 'INSERT';
|
||||||
exports.TYPE = TYPE;
|
exports.TYPE = TYPE;
|
||||||
|
|
||||||
var process = function process(tuples) {
|
var process = function process(tuples) {
|
||||||
return tuples.reduce(function (entity, tuple) {
|
return tuples.reduce(function (entity, tuple) {
|
||||||
var type = tuple[0];
|
var type = tuple[0];
|
||||||
var value = tuple[1];
|
var value = tuple[1];
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 2:
|
case 2:
|
||||||
entity.block = value;
|
entity.block = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 10:
|
case 10:
|
||||||
entity.x = value;
|
entity.x = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 20:
|
case 20:
|
||||||
entity.y = value;
|
entity.y = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 30:
|
case 30:
|
||||||
entity.z = value;
|
entity.z = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 41:
|
case 41:
|
||||||
entity.scaleX = value;
|
entity.scaleX = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 42:
|
case 42:
|
||||||
entity.scaleY = value;
|
entity.scaleY = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 43:
|
case 43:
|
||||||
entity.scaleZ = value;
|
entity.scaleZ = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 44:
|
case 44:
|
||||||
entity.columnSpacing = value;
|
entity.columnSpacing = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 45:
|
case 45:
|
||||||
entity.rowSpacing = value;
|
entity.rowSpacing = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 50:
|
case 50:
|
||||||
entity.rotation = value;
|
entity.rotation = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 70:
|
case 70:
|
||||||
entity.columnCount = value;
|
entity.columnCount = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 71:
|
case 71:
|
||||||
entity.rowCount = value;
|
entity.rowCount = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 210:
|
case 210:
|
||||||
entity.extrusionX = value;
|
entity.extrusionX = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 220:
|
case 220:
|
||||||
entity.extrusionY = value;
|
entity.extrusionY = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 230:
|
case 230:
|
||||||
entity.extrusionZ = value;
|
entity.extrusionZ = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Object.assign(entity, (0, _common["default"])(type, value));
|
Object.assign(entity, (0, _common["default"])(type, value));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
}, {
|
}, {
|
||||||
type: TYPE
|
type: TYPE
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.process = process;
|
exports.process = process;
|
||||||
var _default = {
|
var _default = {
|
||||||
TYPE: TYPE,
|
TYPE: TYPE,
|
||||||
|
16
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/handlers/entity/line.js
generated
vendored
16
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/handlers/entity/line.js
generated
vendored
@ -3,54 +3,41 @@
|
|||||||
Object.defineProperty(exports, "__esModule", {
|
Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = exports.process = exports.TYPE = void 0;
|
exports.process = exports["default"] = exports.TYPE = void 0;
|
||||||
|
|
||||||
var _common = _interopRequireDefault(require("./common"));
|
var _common = _interopRequireDefault(require("./common"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
var TYPE = 'LINE';
|
var TYPE = 'LINE';
|
||||||
exports.TYPE = TYPE;
|
exports.TYPE = TYPE;
|
||||||
|
|
||||||
var process = function process(tuples) {
|
var process = function process(tuples) {
|
||||||
return tuples.reduce(function (entity, tuple) {
|
return tuples.reduce(function (entity, tuple) {
|
||||||
var type = tuple[0];
|
var type = tuple[0];
|
||||||
var value = tuple[1];
|
var value = tuple[1];
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 10:
|
case 10:
|
||||||
entity.start.x = value;
|
entity.start.x = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 20:
|
case 20:
|
||||||
entity.start.y = value;
|
entity.start.y = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 30:
|
case 30:
|
||||||
entity.start.z = value;
|
entity.start.z = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 39:
|
case 39:
|
||||||
entity.thickness = value;
|
entity.thickness = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 11:
|
case 11:
|
||||||
entity.end.x = value;
|
entity.end.x = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 21:
|
case 21:
|
||||||
entity.end.y = value;
|
entity.end.y = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 31:
|
case 31:
|
||||||
entity.end.z = value;
|
entity.end.z = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Object.assign(entity, (0, _common["default"])(type, value));
|
Object.assign(entity, (0, _common["default"])(type, value));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
}, {
|
}, {
|
||||||
type: TYPE,
|
type: TYPE,
|
||||||
@ -58,7 +45,6 @@ var process = function process(tuples) {
|
|||||||
end: {}
|
end: {}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.process = process;
|
exports.process = process;
|
||||||
var _default = {
|
var _default = {
|
||||||
TYPE: TYPE,
|
TYPE: TYPE,
|
||||||
|
@ -3,26 +3,20 @@
|
|||||||
Object.defineProperty(exports, "__esModule", {
|
Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = exports.process = exports.TYPE = void 0;
|
exports.process = exports["default"] = exports.TYPE = void 0;
|
||||||
|
|
||||||
var _common = _interopRequireDefault(require("./common"));
|
var _common = _interopRequireDefault(require("./common"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
var TYPE = 'LWPOLYLINE';
|
var TYPE = 'LWPOLYLINE';
|
||||||
exports.TYPE = TYPE;
|
exports.TYPE = TYPE;
|
||||||
|
|
||||||
var process = function process(tuples) {
|
var process = function process(tuples) {
|
||||||
var vertex;
|
var vertex;
|
||||||
return tuples.reduce(function (entity, tuple) {
|
return tuples.reduce(function (entity, tuple) {
|
||||||
var type = tuple[0];
|
var type = tuple[0];
|
||||||
var value = tuple[1];
|
var value = tuple[1];
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 70:
|
case 70:
|
||||||
entity.closed = (value & 1) === 1;
|
entity.closed = (value & 1) === 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 10:
|
case 10:
|
||||||
vertex = {
|
vertex = {
|
||||||
x: value,
|
x: value,
|
||||||
@ -30,32 +24,26 @@ var process = function process(tuples) {
|
|||||||
};
|
};
|
||||||
entity.vertices.push(vertex);
|
entity.vertices.push(vertex);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 20:
|
case 20:
|
||||||
vertex.y = value;
|
vertex.y = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 39:
|
case 39:
|
||||||
entity.thickness = value;
|
entity.thickness = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 42:
|
case 42:
|
||||||
// Bulge (multiple entries; one entry for each vertex) (optional; default = 0).
|
// Bulge (multiple entries; one entry for each vertex) (optional; default = 0).
|
||||||
vertex.bulge = value;
|
vertex.bulge = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Object.assign(entity, (0, _common["default"])(type, value));
|
Object.assign(entity, (0, _common["default"])(type, value));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
}, {
|
}, {
|
||||||
type: TYPE,
|
type: TYPE,
|
||||||
vertices: []
|
vertices: []
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.process = process;
|
exports.process = process;
|
||||||
var _default = {
|
var _default = {
|
||||||
TYPE: TYPE,
|
TYPE: TYPE,
|
||||||
|
27
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/handlers/entity/mtext.js
generated
vendored
27
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/handlers/entity/mtext.js
generated
vendored
@ -3,12 +3,9 @@
|
|||||||
Object.defineProperty(exports, "__esModule", {
|
Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = exports.process = exports.TYPE = void 0;
|
exports.process = exports["default"] = exports.assign = exports.TYPE = void 0;
|
||||||
|
|
||||||
var _common = _interopRequireDefault(require("./common"));
|
var _common = _interopRequireDefault(require("./common"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
var TYPE = 'MTEXT';
|
var TYPE = 'MTEXT';
|
||||||
exports.TYPE = TYPE;
|
exports.TYPE = TYPE;
|
||||||
var simpleCodes = {
|
var simpleCodes = {
|
||||||
@ -59,12 +56,19 @@ var simpleCodes = {
|
|||||||
49: 'columnGutter',
|
49: 'columnGutter',
|
||||||
50: 'columnHeights'
|
50: 'columnHeights'
|
||||||
};
|
};
|
||||||
|
|
||||||
var process = function process(tuples) {
|
var process = function process(tuples) {
|
||||||
return tuples.reduce(function (entity, tuple) {
|
return tuples.reduce(function (entity, tuple) {
|
||||||
var type = tuple[0];
|
var type = tuple[0];
|
||||||
var value = tuple[1];
|
var value = tuple[1];
|
||||||
|
assign(entity, type, value);
|
||||||
|
return entity;
|
||||||
|
}, {
|
||||||
|
type: TYPE,
|
||||||
|
string: ''
|
||||||
|
});
|
||||||
|
};
|
||||||
|
exports.process = process;
|
||||||
|
var assign = function assign(entity, type, value) {
|
||||||
if (simpleCodes[type] !== undefined) {
|
if (simpleCodes[type] !== undefined) {
|
||||||
entity[simpleCodes[type]] = value;
|
entity[simpleCodes[type]] = value;
|
||||||
} else if (type === 1 || type === 3) {
|
} else if (type === 1 || type === 3) {
|
||||||
@ -76,17 +80,12 @@ var process = function process(tuples) {
|
|||||||
} else {
|
} else {
|
||||||
Object.assign(entity, (0, _common["default"])(type, value));
|
Object.assign(entity, (0, _common["default"])(type, value));
|
||||||
}
|
}
|
||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
}, {
|
|
||||||
type: TYPE,
|
|
||||||
string: ''
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
exports.assign = assign;
|
||||||
exports.process = process;
|
|
||||||
var _default = {
|
var _default = {
|
||||||
TYPE: TYPE,
|
TYPE: TYPE,
|
||||||
process: process
|
process: process,
|
||||||
|
assign: assign
|
||||||
};
|
};
|
||||||
exports["default"] = _default;
|
exports["default"] = _default;
|
13
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/handlers/entity/point.js
generated
vendored
13
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/handlers/entity/point.js
generated
vendored
@ -3,48 +3,37 @@
|
|||||||
Object.defineProperty(exports, "__esModule", {
|
Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = exports.process = exports.TYPE = void 0;
|
exports.process = exports["default"] = exports.TYPE = void 0;
|
||||||
|
|
||||||
var _common = _interopRequireDefault(require("./common"));
|
var _common = _interopRequireDefault(require("./common"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
var TYPE = 'POINT';
|
var TYPE = 'POINT';
|
||||||
exports.TYPE = TYPE;
|
exports.TYPE = TYPE;
|
||||||
|
|
||||||
var process = function process(tuples) {
|
var process = function process(tuples) {
|
||||||
return tuples.reduce(function (entity, tuple) {
|
return tuples.reduce(function (entity, tuple) {
|
||||||
var type = tuple[0];
|
var type = tuple[0];
|
||||||
var value = tuple[1];
|
var value = tuple[1];
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 10:
|
case 10:
|
||||||
entity.x = value;
|
entity.x = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 20:
|
case 20:
|
||||||
entity.y = value;
|
entity.y = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 30:
|
case 30:
|
||||||
entity.z = value;
|
entity.z = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 39:
|
case 39:
|
||||||
entity.thickness = value;
|
entity.thickness = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Object.assign(entity, (0, _common["default"])(type, value));
|
Object.assign(entity, (0, _common["default"])(type, value));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
}, {
|
}, {
|
||||||
type: TYPE
|
type: TYPE
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.process = process;
|
exports.process = process;
|
||||||
var _default = {
|
var _default = {
|
||||||
TYPE: TYPE,
|
TYPE: TYPE,
|
||||||
|
@ -3,43 +3,34 @@
|
|||||||
Object.defineProperty(exports, "__esModule", {
|
Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = exports.process = exports.TYPE = void 0;
|
exports.process = exports["default"] = exports.TYPE = void 0;
|
||||||
|
|
||||||
var _common = _interopRequireDefault(require("./common"));
|
var _common = _interopRequireDefault(require("./common"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
var TYPE = 'POLYLINE';
|
var TYPE = 'POLYLINE';
|
||||||
exports.TYPE = TYPE;
|
exports.TYPE = TYPE;
|
||||||
|
|
||||||
var process = function process(tuples) {
|
var process = function process(tuples) {
|
||||||
return tuples.reduce(function (entity, tuple) {
|
return tuples.reduce(function (entity, tuple) {
|
||||||
var type = tuple[0];
|
var type = tuple[0];
|
||||||
var value = tuple[1];
|
var value = tuple[1];
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 70:
|
case 70:
|
||||||
entity.closed = (value & 1) === 1;
|
entity.closed = (value & 1) === 1;
|
||||||
entity.polygonMesh = (value & 16) === 16;
|
entity.polygonMesh = (value & 16) === 16;
|
||||||
entity.polyfaceMesh = (value & 64) === 64;
|
entity.polyfaceMesh = (value & 64) === 64;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 39:
|
case 39:
|
||||||
entity.thickness = value;
|
entity.thickness = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Object.assign(entity, (0, _common["default"])(type, value));
|
Object.assign(entity, (0, _common["default"])(type, value));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
}, {
|
}, {
|
||||||
type: TYPE,
|
type: TYPE,
|
||||||
vertices: []
|
vertices: []
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.process = process;
|
exports.process = process;
|
||||||
var _default = {
|
var _default = {
|
||||||
TYPE: TYPE,
|
TYPE: TYPE,
|
||||||
|
22
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/handlers/entity/solid.js
generated
vendored
22
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/handlers/entity/solid.js
generated
vendored
@ -3,85 +3,65 @@
|
|||||||
Object.defineProperty(exports, "__esModule", {
|
Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = exports.process = exports.TYPE = void 0;
|
exports.process = exports["default"] = exports.TYPE = void 0;
|
||||||
|
|
||||||
var _common = _interopRequireDefault(require("./common"));
|
var _common = _interopRequireDefault(require("./common"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
var TYPE = 'SOLID';
|
var TYPE = 'SOLID';
|
||||||
exports.TYPE = TYPE;
|
exports.TYPE = TYPE;
|
||||||
|
|
||||||
var process = function process(tuples) {
|
var process = function process(tuples) {
|
||||||
return tuples.reduce(function (entity, tuple) {
|
return tuples.reduce(function (entity, tuple) {
|
||||||
var type = tuple[0];
|
var type = tuple[0];
|
||||||
var value = tuple[1];
|
var value = tuple[1];
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 10:
|
case 10:
|
||||||
entity.corners[0].x = value;
|
entity.corners[0].x = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 20:
|
case 20:
|
||||||
entity.corners[0].y = value;
|
entity.corners[0].y = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 30:
|
case 30:
|
||||||
entity.corners[0].z = value;
|
entity.corners[0].z = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 11:
|
case 11:
|
||||||
entity.corners[1].x = value;
|
entity.corners[1].x = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 21:
|
case 21:
|
||||||
entity.corners[1].y = value;
|
entity.corners[1].y = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 31:
|
case 31:
|
||||||
entity.corners[1].z = value;
|
entity.corners[1].z = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 12:
|
case 12:
|
||||||
entity.corners[2].x = value;
|
entity.corners[2].x = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 22:
|
case 22:
|
||||||
entity.corners[2].y = value;
|
entity.corners[2].y = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 32:
|
case 32:
|
||||||
entity.corners[2].z = value;
|
entity.corners[2].z = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 13:
|
case 13:
|
||||||
entity.corners[3].x = value;
|
entity.corners[3].x = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 23:
|
case 23:
|
||||||
entity.corners[3].y = value;
|
entity.corners[3].y = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 33:
|
case 33:
|
||||||
entity.corners[3].z = value;
|
entity.corners[3].z = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 39:
|
case 39:
|
||||||
entity.thickness = value;
|
entity.thickness = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Object.assign(entity, (0, _common["default"])(type, value));
|
Object.assign(entity, (0, _common["default"])(type, value));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
}, {
|
}, {
|
||||||
type: TYPE,
|
type: TYPE,
|
||||||
corners: [{}, {}, {}, {}]
|
corners: [{}, {}, {}, {}]
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.process = process;
|
exports.process = process;
|
||||||
var _default = {
|
var _default = {
|
||||||
TYPE: TYPE,
|
TYPE: TYPE,
|
||||||
|
@ -3,21 +3,16 @@
|
|||||||
Object.defineProperty(exports, "__esModule", {
|
Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = exports.process = exports.TYPE = void 0;
|
exports.process = exports["default"] = exports.TYPE = void 0;
|
||||||
|
|
||||||
var _common = _interopRequireDefault(require("./common"));
|
var _common = _interopRequireDefault(require("./common"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
var TYPE = 'SPLINE';
|
var TYPE = 'SPLINE';
|
||||||
exports.TYPE = TYPE;
|
exports.TYPE = TYPE;
|
||||||
|
|
||||||
var process = function process(tuples) {
|
var process = function process(tuples) {
|
||||||
var controlPoint;
|
var controlPoint;
|
||||||
return tuples.reduce(function (entity, tuple) {
|
return tuples.reduce(function (entity, tuple) {
|
||||||
var type = tuple[0];
|
var type = tuple[0];
|
||||||
var value = tuple[1];
|
var value = tuple[1];
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 10:
|
case 10:
|
||||||
controlPoint = {
|
controlPoint = {
|
||||||
@ -26,31 +21,29 @@ var process = function process(tuples) {
|
|||||||
};
|
};
|
||||||
entity.controlPoints.push(controlPoint);
|
entity.controlPoints.push(controlPoint);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 20:
|
case 20:
|
||||||
controlPoint.y = value;
|
controlPoint.y = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 30:
|
case 30:
|
||||||
controlPoint.z = value;
|
controlPoint.z = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 40:
|
case 40:
|
||||||
entity.knots.push(value);
|
entity.knots.push(value);
|
||||||
break;
|
break;
|
||||||
|
case 41:
|
||||||
|
// Only create weights if needed
|
||||||
|
if (!entity.weights) entity.weights = [];
|
||||||
|
entity.weights.push(value);
|
||||||
|
break;
|
||||||
case 42:
|
case 42:
|
||||||
entity.knotTolerance = value;
|
entity.knotTolerance = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 43:
|
case 43:
|
||||||
entity.controlPointTolerance = value;
|
entity.controlPointTolerance = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 44:
|
case 44:
|
||||||
entity.fitTolerance = value;
|
entity.fitTolerance = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 70:
|
case 70:
|
||||||
// Spline flag (bit coded):
|
// Spline flag (bit coded):
|
||||||
// 1 = Closed spline
|
// 1 = Closed spline
|
||||||
@ -61,28 +54,22 @@ var process = function process(tuples) {
|
|||||||
entity.flag = value;
|
entity.flag = value;
|
||||||
entity.closed = (value & 1) === 1;
|
entity.closed = (value & 1) === 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 71:
|
case 71:
|
||||||
entity.degree = value;
|
entity.degree = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 72:
|
case 72:
|
||||||
entity.numberOfKnots = value;
|
entity.numberOfKnots = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 73:
|
case 73:
|
||||||
entity.numberOfControlPoints = value;
|
entity.numberOfControlPoints = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 74:
|
case 74:
|
||||||
entity.numberOfFitPoints = value;
|
entity.numberOfFitPoints = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Object.assign(entity, (0, _common["default"])(type, value));
|
Object.assign(entity, (0, _common["default"])(type, value));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
}, {
|
}, {
|
||||||
type: TYPE,
|
type: TYPE,
|
||||||
@ -90,7 +77,6 @@ var process = function process(tuples) {
|
|||||||
knots: []
|
knots: []
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.process = process;
|
exports.process = process;
|
||||||
var _default = {
|
var _default = {
|
||||||
TYPE: TYPE,
|
TYPE: TYPE,
|
||||||
|
@ -3,81 +3,62 @@
|
|||||||
Object.defineProperty(exports, "__esModule", {
|
Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = exports.process = exports.TYPE = void 0;
|
exports.process = exports["default"] = exports.TYPE = void 0;
|
||||||
|
|
||||||
var _common = _interopRequireDefault(require("./common"));
|
var _common = _interopRequireDefault(require("./common"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
var TYPE = '3DFACE';
|
var TYPE = '3DFACE';
|
||||||
exports.TYPE = TYPE;
|
exports.TYPE = TYPE;
|
||||||
|
|
||||||
var process = function process(tuples) {
|
var process = function process(tuples) {
|
||||||
return tuples.reduce(function (entity, tuple) {
|
return tuples.reduce(function (entity, tuple) {
|
||||||
var type = tuple[0];
|
var type = tuple[0];
|
||||||
var value = tuple[1];
|
var value = tuple[1];
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 10:
|
case 10:
|
||||||
entity.vertices[0].x = value;
|
entity.vertices[0].x = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 20:
|
case 20:
|
||||||
entity.vertices[0].y = value;
|
entity.vertices[0].y = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 30:
|
case 30:
|
||||||
entity.vertices[0].z = value;
|
entity.vertices[0].z = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 11:
|
case 11:
|
||||||
entity.vertices[1].x = value;
|
entity.vertices[1].x = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 21:
|
case 21:
|
||||||
entity.vertices[1].y = value;
|
entity.vertices[1].y = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 31:
|
case 31:
|
||||||
entity.vertices[1].z = value;
|
entity.vertices[1].z = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 12:
|
case 12:
|
||||||
entity.vertices[2].x = value;
|
entity.vertices[2].x = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 22:
|
case 22:
|
||||||
entity.vertices[2].y = value;
|
entity.vertices[2].y = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 32:
|
case 32:
|
||||||
entity.vertices[2].z = value;
|
entity.vertices[2].z = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 13:
|
case 13:
|
||||||
entity.vertices[3].x = value;
|
entity.vertices[3].x = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 23:
|
case 23:
|
||||||
entity.vertices[3].y = value;
|
entity.vertices[3].y = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 33:
|
case 33:
|
||||||
entity.vertices[3].z = value;
|
entity.vertices[3].z = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Object.assign(entity, (0, _common["default"])(type, value));
|
Object.assign(entity, (0, _common["default"])(type, value));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
}, {
|
}, {
|
||||||
type: TYPE,
|
type: TYPE,
|
||||||
vertices: [{}, {}, {}, {}]
|
vertices: [{}, {}, {}, {}]
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.process = process;
|
exports.process = process;
|
||||||
var _default = {
|
var _default = {
|
||||||
TYPE: TYPE,
|
TYPE: TYPE,
|
||||||
|
@ -3,40 +3,54 @@
|
|||||||
Object.defineProperty(exports, "__esModule", {
|
Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = exports.process = exports.TYPE = void 0;
|
exports.process = exports["default"] = exports.TYPE = void 0;
|
||||||
var TYPE = 'VERTEX';
|
var TYPE = 'VERTEX';
|
||||||
exports.TYPE = TYPE;
|
exports.TYPE = TYPE;
|
||||||
|
var ensureFaces = function ensureFaces(entity) {
|
||||||
|
entity.faces = entity.faces || [];
|
||||||
|
if ('x' in entity && !entity.x) delete entity.x;
|
||||||
|
if ('y' in entity && !entity.y) delete entity.y;
|
||||||
|
if ('z' in entity && !entity.z) delete entity.z;
|
||||||
|
};
|
||||||
var process = function process(tuples) {
|
var process = function process(tuples) {
|
||||||
return tuples.reduce(function (entity, tuple) {
|
return tuples.reduce(function (entity, tuple) {
|
||||||
var type = tuple[0];
|
var type = tuple[0];
|
||||||
var value = tuple[1];
|
var value = tuple[1];
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 10:
|
case 10:
|
||||||
entity.x = value;
|
entity.x = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 20:
|
case 20:
|
||||||
entity.y = value;
|
entity.y = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 30:
|
case 30:
|
||||||
entity.z = value;
|
entity.z = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 42:
|
case 42:
|
||||||
entity.bulge = value;
|
entity.bulge = value;
|
||||||
break;
|
break;
|
||||||
|
case 71:
|
||||||
|
ensureFaces(entity);
|
||||||
|
entity.faces[0] = value;
|
||||||
|
break;
|
||||||
|
case 72:
|
||||||
|
ensureFaces(entity);
|
||||||
|
entity.faces[1] = value;
|
||||||
|
break;
|
||||||
|
case 73:
|
||||||
|
ensureFaces(entity);
|
||||||
|
entity.faces[2] = value;
|
||||||
|
break;
|
||||||
|
case 74:
|
||||||
|
ensureFaces(entity);
|
||||||
|
entity.faces[3] = value;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
}, {});
|
}, {});
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.process = process;
|
exports.process = process;
|
||||||
var _default = {
|
var _default = {
|
||||||
TYPE: TYPE,
|
TYPE: TYPE,
|
||||||
|
29
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/handlers/header.js
generated
vendored
29
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/handlers/header.js
generated
vendored
@ -4,37 +4,35 @@ Object.defineProperty(exports, "__esModule", {
|
|||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = void 0;
|
exports["default"] = void 0;
|
||||||
|
|
||||||
var _default = function _default(tuples) {
|
var _default = function _default(tuples) {
|
||||||
var state;
|
var state;
|
||||||
var header = {};
|
var header = {};
|
||||||
tuples.forEach(function (tuple) {
|
tuples.forEach(function (tuple) {
|
||||||
var type = tuple[0];
|
var type = tuple[0];
|
||||||
var value = tuple[1];
|
var value = tuple[1];
|
||||||
|
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case '$MEASUREMENT':
|
case '$MEASUREMENT':
|
||||||
{
|
{
|
||||||
state = 'measurement';
|
state = 'measurement';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case '$INSUNITS':
|
case '$INSUNITS':
|
||||||
{
|
{
|
||||||
state = 'insUnits';
|
state = 'insUnits';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case '$EXTMIN':
|
case '$EXTMIN':
|
||||||
header.extMin = {};
|
header.extMin = {};
|
||||||
state = 'extMin';
|
state = 'extMin';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '$EXTMAX':
|
case '$EXTMAX':
|
||||||
header.extMax = {};
|
header.extMax = {};
|
||||||
state = 'extMax';
|
state = 'extMax';
|
||||||
break;
|
break;
|
||||||
|
case '$DIMASZ':
|
||||||
|
header.dimArrowSize = {};
|
||||||
|
state = 'dimArrowSize';
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case 'extMin':
|
case 'extMin':
|
||||||
@ -44,20 +42,16 @@ var _default = function _default(tuples) {
|
|||||||
case 10:
|
case 10:
|
||||||
header[state].x = value;
|
header[state].x = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 20:
|
case 20:
|
||||||
header[state].y = value;
|
header[state].y = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 30:
|
case 30:
|
||||||
header[state].z = value;
|
header[state].z = value;
|
||||||
state = undefined;
|
state = undefined;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'measurement':
|
case 'measurement':
|
||||||
case 'insUnits':
|
case 'insUnits':
|
||||||
{
|
{
|
||||||
@ -69,14 +63,23 @@ var _default = function _default(tuples) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'dimArrowSize':
|
||||||
|
{
|
||||||
|
switch (type) {
|
||||||
|
case 40:
|
||||||
|
{
|
||||||
|
header[state] = value;
|
||||||
|
state = undefined;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return header;
|
return header;
|
||||||
};
|
};
|
||||||
|
|
||||||
exports["default"] = _default;
|
exports["default"] = _default;
|
242
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/handlers/tables.js
generated
vendored
242
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/handlers/tables.js
generated
vendored
@ -4,108 +4,281 @@ Object.defineProperty(exports, "__esModule", {
|
|||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = void 0;
|
exports["default"] = void 0;
|
||||||
|
|
||||||
var _logger = _interopRequireDefault(require("../util/logger"));
|
var _logger = _interopRequireDefault(require("../util/logger"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
var ltypeHandler = function ltypeHandler(tuples) {
|
||||||
var layerHandler = function layerHandler(tuples) {
|
var element = null;
|
||||||
|
var offset = null;
|
||||||
return tuples.reduce(function (layer, tuple) {
|
return tuples.reduce(function (layer, tuple) {
|
||||||
var type = tuple[0];
|
var type = tuple[0];
|
||||||
var value = tuple[1]; // https://www.autodesk.com/techpubs/autocad/acad2000/dxf/layer_dxf_04.htm
|
var value = tuple[1];
|
||||||
|
// https://documentation.help/AutoCAD-DXF/WS1a9193826455f5ff18cb41610ec0a2e719-7a4f.htm
|
||||||
|
switch (type) {
|
||||||
|
case 2:
|
||||||
|
layer.name = value;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
layer.description = value;
|
||||||
|
break;
|
||||||
|
case 70:
|
||||||
|
// Standard flag values (bit-coded values):
|
||||||
|
// 16 = If set, table entry is externally dependent on an xref
|
||||||
|
// 32 = If both this bit and bit 16 are set, the externally dependent xref has been successfully resolved
|
||||||
|
// 64 = If set, the table entry was referenced by at least one entity in the drawing the last time the drawing was edited. (This flag is for the benefit of AutoCAD commands. It can be ignored by most programs that read DXF files and need not be set by programs that write DXF files)
|
||||||
|
layer.flag = value;
|
||||||
|
break;
|
||||||
|
case 72:
|
||||||
|
// Alignment code (value is always 65, the ASCII code for A):
|
||||||
|
layer.alignment = value;
|
||||||
|
break;
|
||||||
|
case 73:
|
||||||
|
layer.elementCount = parseInt(value);
|
||||||
|
break;
|
||||||
|
case 40:
|
||||||
|
layer.patternLength = value;
|
||||||
|
break;
|
||||||
|
case 49:
|
||||||
|
{
|
||||||
|
element = Object.create({
|
||||||
|
scales: [],
|
||||||
|
offset: []
|
||||||
|
});
|
||||||
|
element.length = value;
|
||||||
|
layer.pattern.push(element);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 74:
|
||||||
|
// Complex linetype element type (one per element). Default is 0 (no embedded shape/text) (bit-coded values)
|
||||||
|
// 1 = If set, code 50 specifies an absolute rotation; if not set, code 50 specifies a relative rotation
|
||||||
|
// 2 = Embedded element is a text string
|
||||||
|
// 4 = Embedded element is a shape
|
||||||
|
element.shape = value;
|
||||||
|
break;
|
||||||
|
case 75:
|
||||||
|
element.shapeNumber = value;
|
||||||
|
break;
|
||||||
|
case 340:
|
||||||
|
element.styleHandle = value;
|
||||||
|
break;
|
||||||
|
case 46:
|
||||||
|
element.scales.push(value);
|
||||||
|
break;
|
||||||
|
case 50:
|
||||||
|
element.rotation = value;
|
||||||
|
break;
|
||||||
|
case 44:
|
||||||
|
offset = Object.create({
|
||||||
|
x: value,
|
||||||
|
y: 0
|
||||||
|
});
|
||||||
|
element.offset.push(offset);
|
||||||
|
break;
|
||||||
|
case 45:
|
||||||
|
offset.y = value;
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
element.text = value;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
return layer;
|
||||||
|
}, {
|
||||||
|
type: 'LTYPE',
|
||||||
|
pattern: []
|
||||||
|
});
|
||||||
|
};
|
||||||
|
var layerHandler = function layerHandler(tuples) {
|
||||||
|
return tuples.reduce(function (layer, tuple) {
|
||||||
|
var type = tuple[0];
|
||||||
|
var value = tuple[1];
|
||||||
|
// https://www.autodesk.com/techpubs/autocad/acad2000/dxf/layer_dxf_04.htm
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 2:
|
case 2:
|
||||||
layer.name = value;
|
layer.name = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
layer.lineTypeName = value;
|
layer.lineTypeName = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 62:
|
case 62:
|
||||||
layer.colorNumber = value;
|
layer.colorNumber = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 70:
|
case 70:
|
||||||
layer.flags = value;
|
layer.flags = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 290:
|
case 290:
|
||||||
layer.plot = parseInt(value) !== 0;
|
layer.plot = parseInt(value) !== 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 370:
|
case 370:
|
||||||
layer.lineWeightEnum = value;
|
layer.lineWeightEnum = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|
||||||
return layer;
|
return layer;
|
||||||
}, {
|
}, {
|
||||||
type: 'LAYER'
|
type: 'LAYER'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var styleHandler = function styleHandler(tuples) {
|
var styleHandler = function styleHandler(tuples) {
|
||||||
return tuples.reduce(function (style, tuple) {
|
return tuples.reduce(function (style, tuple) {
|
||||||
var type = tuple[0];
|
var type = tuple[0];
|
||||||
var value = tuple[1];
|
var value = tuple[1];
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 2:
|
case 2:
|
||||||
style.name = value;
|
style.name = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
style.lineTypeName = value;
|
style.lineTypeName = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 40:
|
case 40:
|
||||||
style.fixedTextHeight = value;
|
style.fixedTextHeight = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 41:
|
case 41:
|
||||||
style.widthFactor = value;
|
style.widthFactor = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 50:
|
case 50:
|
||||||
style.obliqueAngle = value;
|
style.obliqueAngle = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 71:
|
case 71:
|
||||||
style.flags = value;
|
style.flags = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 42:
|
case 42:
|
||||||
style.lastHeightUsed = value;
|
style.lastHeightUsed = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
style.primaryFontFileName = value;
|
style.primaryFontFileName = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
style.bigFontFileName = value;
|
style.bigFontFileName = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|
||||||
return style;
|
return style;
|
||||||
}, {
|
}, {
|
||||||
type: 'STYLE'
|
type: 'STYLE'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
var vPortHandler = function vPortHandler(tuples) {
|
||||||
|
return tuples.reduce(function (vport, tuple) {
|
||||||
|
var type = tuple[0];
|
||||||
|
var value = tuple[1];
|
||||||
|
switch (type) {
|
||||||
|
case 2:
|
||||||
|
vport.name = value;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
vport.handle = value;
|
||||||
|
break;
|
||||||
|
case 70:
|
||||||
|
vport.flags = value;
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
vport.lowerLeft.x = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 20:
|
||||||
|
vport.lowerLeft.y = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
vport.upperRight.x = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 21:
|
||||||
|
vport.upperRight.y = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
vport.center.x = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 22:
|
||||||
|
vport.center.y = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
vport.snapSpacing.x = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 24:
|
||||||
|
vport.snapSpacing.y = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
vport.gridSpacing.x = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 25:
|
||||||
|
vport.gridSpacing.y = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
vport.direction.x = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 26:
|
||||||
|
vport.direction.y = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 36:
|
||||||
|
vport.direction.z = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 17:
|
||||||
|
vport.target.x = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 27:
|
||||||
|
vport.target.y = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 37:
|
||||||
|
vport.target.z = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 45:
|
||||||
|
vport.height = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 50:
|
||||||
|
vport.snapAngle = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 51:
|
||||||
|
vport.angle = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 110:
|
||||||
|
vport.x = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 120:
|
||||||
|
vport.y = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 130:
|
||||||
|
vport.z = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 111:
|
||||||
|
vport.xAxisX = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 121:
|
||||||
|
vport.xAxisY = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 131:
|
||||||
|
vport.xAxisZ = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 112:
|
||||||
|
vport.xAxisX = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 122:
|
||||||
|
vport.xAxisY = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 132:
|
||||||
|
vport.xAxisZ = parseFloat(value);
|
||||||
|
break;
|
||||||
|
case 146:
|
||||||
|
vport.elevation = parseFloat(value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
return vport;
|
||||||
|
}, {
|
||||||
|
type: 'VPORT',
|
||||||
|
center: {},
|
||||||
|
lowerLeft: {},
|
||||||
|
upperRight: {},
|
||||||
|
snap: {},
|
||||||
|
snapSpacing: {},
|
||||||
|
gridSpacing: {},
|
||||||
|
direction: {},
|
||||||
|
target: {}
|
||||||
|
});
|
||||||
|
};
|
||||||
var tableHandler = function tableHandler(tuples, tableType, handler) {
|
var tableHandler = function tableHandler(tuples, tableType, handler) {
|
||||||
var tableRowsTuples = [];
|
var tableRowsTuples = [];
|
||||||
var tableRowTuples;
|
var tableRowTuples;
|
||||||
tuples.forEach(function (tuple) {
|
tuples.forEach(function (tuple) {
|
||||||
var type = tuple[0];
|
var type = tuple[0];
|
||||||
var value = tuple[1];
|
var value = tuple[1];
|
||||||
|
|
||||||
if ((type === 0 || type === 2) && value === tableType) {
|
if ((type === 0 || type === 2) && value === tableType) {
|
||||||
tableRowTuples = [];
|
tableRowTuples = [];
|
||||||
tableRowsTuples.push(tableRowTuples);
|
tableRowsTuples.push(tableRowTuples);
|
||||||
@ -115,24 +288,20 @@ var tableHandler = function tableHandler(tuples, tableType, handler) {
|
|||||||
});
|
});
|
||||||
return tableRowsTuples.reduce(function (acc, rowTuples) {
|
return tableRowsTuples.reduce(function (acc, rowTuples) {
|
||||||
var tableRow = handler(rowTuples);
|
var tableRow = handler(rowTuples);
|
||||||
|
|
||||||
if (tableRow.name) {
|
if (tableRow.name) {
|
||||||
acc[tableRow.name] = tableRow;
|
acc[tableRow.name] = tableRow;
|
||||||
} else {
|
} else {
|
||||||
_logger["default"].warn('table row without name:', tableRow);
|
_logger["default"].warn('table row without name:', tableRow);
|
||||||
}
|
}
|
||||||
|
|
||||||
return acc;
|
return acc;
|
||||||
}, {});
|
}, {});
|
||||||
};
|
};
|
||||||
|
|
||||||
var _default = function _default(tuples) {
|
var _default = function _default(tuples) {
|
||||||
var tableGroups = [];
|
var tableGroups = [];
|
||||||
var tableTuples;
|
var tableTuples;
|
||||||
tuples.forEach(function (tuple) {
|
tuples.forEach(function (tuple) {
|
||||||
// const type = tuple[0];
|
// const type = tuple[0];
|
||||||
var value = tuple[1];
|
var value = tuple[1];
|
||||||
|
|
||||||
if (value === 'TABLE') {
|
if (value === 'TABLE') {
|
||||||
tableTuples = [];
|
tableTuples = [];
|
||||||
tableGroups.push(tableTuples);
|
tableGroups.push(tableTuples);
|
||||||
@ -144,19 +313,24 @@ var _default = function _default(tuples) {
|
|||||||
});
|
});
|
||||||
var stylesTuples = [];
|
var stylesTuples = [];
|
||||||
var layersTuples = [];
|
var layersTuples = [];
|
||||||
|
var vPortTuples = [];
|
||||||
|
var ltypeTuples = [];
|
||||||
tableGroups.forEach(function (group) {
|
tableGroups.forEach(function (group) {
|
||||||
if (group[0][1] === 'STYLE') {
|
if (group[0][1] === 'STYLE') {
|
||||||
stylesTuples = group;
|
stylesTuples = group;
|
||||||
} else if (group[0][1] === 'LTYPE') {
|
} else if (group[0][1] === 'LTYPE') {
|
||||||
_logger["default"].warn('LTYPE in tables not supported');
|
ltypeTuples = group;
|
||||||
} else if (group[0][1] === 'LAYER') {
|
} else if (group[0][1] === 'LAYER') {
|
||||||
layersTuples = group;
|
layersTuples = group;
|
||||||
|
} else if (group[0][1] === 'VPORT') {
|
||||||
|
vPortTuples = group;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
layers: tableHandler(layersTuples, 'LAYER', layerHandler),
|
layers: tableHandler(layersTuples, 'LAYER', layerHandler),
|
||||||
styles: tableHandler(stylesTuples, 'STYLE', styleHandler)
|
styles: tableHandler(stylesTuples, 'STYLE', styleHandler),
|
||||||
|
vports: tableHandler(vPortTuples, 'VPORT', vPortHandler),
|
||||||
|
ltypes: tableHandler(ltypeTuples, 'LTYPE', ltypeHandler)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
exports["default"] = _default;
|
exports["default"] = _default;
|
45
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/index.js
generated
vendored
45
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/index.js
generated
vendored
@ -3,18 +3,24 @@
|
|||||||
Object.defineProperty(exports, "__esModule", {
|
Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
|
Object.defineProperty(exports, "Helper", {
|
||||||
|
enumerable: true,
|
||||||
|
get: function get() {
|
||||||
|
return _Helper["default"];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Object.defineProperty(exports, "colors", {
|
||||||
|
enumerable: true,
|
||||||
|
get: function get() {
|
||||||
|
return _colors["default"];
|
||||||
|
}
|
||||||
|
});
|
||||||
Object.defineProperty(exports, "config", {
|
Object.defineProperty(exports, "config", {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function get() {
|
get: function get() {
|
||||||
return _config["default"];
|
return _config["default"];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Object.defineProperty(exports, "parseString", {
|
|
||||||
enumerable: true,
|
|
||||||
get: function get() {
|
|
||||||
return _parseString["default"];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Object.defineProperty(exports, "denormalise", {
|
Object.defineProperty(exports, "denormalise", {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function get() {
|
get: function get() {
|
||||||
@ -27,6 +33,12 @@ Object.defineProperty(exports, "groupEntitiesByLayer", {
|
|||||||
return _groupEntitiesByLayer["default"];
|
return _groupEntitiesByLayer["default"];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Object.defineProperty(exports, "parseString", {
|
||||||
|
enumerable: true,
|
||||||
|
get: function get() {
|
||||||
|
return _parseString["default"];
|
||||||
|
}
|
||||||
|
});
|
||||||
Object.defineProperty(exports, "toPolylines", {
|
Object.defineProperty(exports, "toPolylines", {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function get() {
|
get: function get() {
|
||||||
@ -39,33 +51,12 @@ Object.defineProperty(exports, "toSVG", {
|
|||||||
return _toSVG["default"];
|
return _toSVG["default"];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Object.defineProperty(exports, "colors", {
|
|
||||||
enumerable: true,
|
|
||||||
get: function get() {
|
|
||||||
return _colors["default"];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Object.defineProperty(exports, "Helper", {
|
|
||||||
enumerable: true,
|
|
||||||
get: function get() {
|
|
||||||
return _Helper["default"];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var _config = _interopRequireDefault(require("./config"));
|
var _config = _interopRequireDefault(require("./config"));
|
||||||
|
|
||||||
var _parseString = _interopRequireDefault(require("./parseString"));
|
var _parseString = _interopRequireDefault(require("./parseString"));
|
||||||
|
|
||||||
var _denormalise = _interopRequireDefault(require("./denormalise"));
|
var _denormalise = _interopRequireDefault(require("./denormalise"));
|
||||||
|
|
||||||
var _groupEntitiesByLayer = _interopRequireDefault(require("./groupEntitiesByLayer"));
|
var _groupEntitiesByLayer = _interopRequireDefault(require("./groupEntitiesByLayer"));
|
||||||
|
|
||||||
var _toPolylines = _interopRequireDefault(require("./toPolylines"));
|
var _toPolylines = _interopRequireDefault(require("./toPolylines"));
|
||||||
|
|
||||||
var _toSVG = _interopRequireDefault(require("./toSVG"));
|
var _toSVG = _interopRequireDefault(require("./toSVG"));
|
||||||
|
|
||||||
var _colors = _interopRequireDefault(require("./util/colors"));
|
var _colors = _interopRequireDefault(require("./util/colors"));
|
||||||
|
|
||||||
var _Helper = _interopRequireDefault(require("./Helper"));
|
var _Helper = _interopRequireDefault(require("./Helper"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
49
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/parseString.js
generated
vendored
49
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/parseString.js
generated
vendored
@ -4,25 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = void 0;
|
exports["default"] = void 0;
|
||||||
|
|
||||||
var _header = _interopRequireDefault(require("./handlers/header"));
|
var _header = _interopRequireDefault(require("./handlers/header"));
|
||||||
|
|
||||||
var _tables = _interopRequireDefault(require("./handlers/tables"));
|
var _tables = _interopRequireDefault(require("./handlers/tables"));
|
||||||
|
|
||||||
var _blocks = _interopRequireDefault(require("./handlers/blocks"));
|
var _blocks = _interopRequireDefault(require("./handlers/blocks"));
|
||||||
|
|
||||||
var _entities = _interopRequireDefault(require("./handlers/entities"));
|
var _entities = _interopRequireDefault(require("./handlers/entities"));
|
||||||
|
var _objects = _interopRequireDefault(require("./handlers/objects"));
|
||||||
var _logger = _interopRequireDefault(require("./util/logger"));
|
var _logger = _interopRequireDefault(require("./util/logger"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
||||||
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
||||||
|
|
||||||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
||||||
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
||||||
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
||||||
|
|
||||||
// Parse the value into the native representation
|
// Parse the value into the native representation
|
||||||
var parseValue = function parseValue(type, value) {
|
var parseValue = function parseValue(type, value) {
|
||||||
if (type >= 10 && type < 60) {
|
if (type >= 10 && type < 60) {
|
||||||
@ -34,21 +25,18 @@ var parseValue = function parseValue(type, value) {
|
|||||||
} else {
|
} else {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
}; // Content lines are alternate lines of type and value
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Content lines are alternate lines of type and value
|
||||||
var convertToTypesAndValues = function convertToTypesAndValues(contentLines) {
|
var convertToTypesAndValues = function convertToTypesAndValues(contentLines) {
|
||||||
var state = 'type';
|
var state = 'type';
|
||||||
var type;
|
var type;
|
||||||
var typesAndValues = [];
|
var typesAndValues = [];
|
||||||
|
|
||||||
var _iterator = _createForOfIteratorHelper(contentLines),
|
var _iterator = _createForOfIteratorHelper(contentLines),
|
||||||
_step;
|
_step;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
||||||
var line = _step.value;
|
var line = _step.value;
|
||||||
|
|
||||||
if (state === 'type') {
|
if (state === 'type') {
|
||||||
type = parseInt(line, 10);
|
type = parseInt(line, 10);
|
||||||
state = 'value';
|
state = 'value';
|
||||||
@ -62,10 +50,8 @@ var convertToTypesAndValues = function convertToTypesAndValues(contentLines) {
|
|||||||
} finally {
|
} finally {
|
||||||
_iterator.f();
|
_iterator.f();
|
||||||
}
|
}
|
||||||
|
|
||||||
return typesAndValues;
|
return typesAndValues;
|
||||||
};
|
};
|
||||||
|
|
||||||
var separateSections = function separateSections(tuples) {
|
var separateSections = function separateSections(tuples) {
|
||||||
var sectionTuples;
|
var sectionTuples;
|
||||||
return tuples.reduce(function (sections, tuple) {
|
return tuples.reduce(function (sections, tuple) {
|
||||||
@ -77,42 +63,36 @@ var separateSections = function separateSections(tuples) {
|
|||||||
} else if (sectionTuples !== undefined) {
|
} else if (sectionTuples !== undefined) {
|
||||||
sectionTuples.push(tuple);
|
sectionTuples.push(tuple);
|
||||||
}
|
}
|
||||||
|
|
||||||
return sections;
|
return sections;
|
||||||
}, []);
|
}, []);
|
||||||
}; // Each section start with the type tuple, then proceeds
|
};
|
||||||
|
|
||||||
|
// Each section start with the type tuple, then proceeds
|
||||||
// with the contents of the section
|
// with the contents of the section
|
||||||
|
|
||||||
|
|
||||||
var reduceSection = function reduceSection(acc, section) {
|
var reduceSection = function reduceSection(acc, section) {
|
||||||
var sectionType = section[0][1];
|
var sectionType = section[0][1];
|
||||||
var contentTuples = section.slice(1);
|
var contentTuples = section.slice(1);
|
||||||
|
|
||||||
switch (sectionType) {
|
switch (sectionType) {
|
||||||
case 'HEADER':
|
case 'HEADER':
|
||||||
acc.header = (0, _header["default"])(contentTuples);
|
acc.header = (0, _header["default"])(contentTuples);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'TABLES':
|
case 'TABLES':
|
||||||
acc.tables = (0, _tables["default"])(contentTuples);
|
acc.tables = (0, _tables["default"])(contentTuples);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'BLOCKS':
|
case 'BLOCKS':
|
||||||
acc.blocks = (0, _blocks["default"])(contentTuples);
|
acc.blocks = (0, _blocks["default"])(contentTuples);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'ENTITIES':
|
case 'ENTITIES':
|
||||||
acc.entities = (0, _entities["default"])(contentTuples);
|
acc.entities = (0, _entities["default"])(contentTuples);
|
||||||
break;
|
break;
|
||||||
|
case 'OBJECTS':
|
||||||
|
acc.objects = (0, _objects["default"])(contentTuples);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
_logger["default"].warn("Unsupported section: ".concat(sectionType));
|
_logger["default"].warn("Unsupported section: ".concat(sectionType));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return acc;
|
return acc;
|
||||||
};
|
};
|
||||||
|
|
||||||
var _default = function _default(string) {
|
var _default = function _default(string) {
|
||||||
var lines = string.split(/\r\n|\r|\n/g);
|
var lines = string.split(/\r\n|\r|\n/g);
|
||||||
var tuples = convertToTypesAndValues(lines);
|
var tuples = convertToTypesAndValues(lines);
|
||||||
@ -122,12 +102,15 @@ var _default = function _default(string) {
|
|||||||
header: {},
|
header: {},
|
||||||
blocks: [],
|
blocks: [],
|
||||||
entities: [],
|
entities: [],
|
||||||
|
objects: {
|
||||||
|
layouts: []
|
||||||
|
},
|
||||||
tables: {
|
tables: {
|
||||||
layers: {},
|
layers: {},
|
||||||
styles: {}
|
styles: {},
|
||||||
|
ltypes: {}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
exports["default"] = _default;
|
exports["default"] = _default;
|
14
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/toPolylines.js
generated
vendored
14
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/toPolylines.js
generated
vendored
@ -4,42 +4,29 @@ Object.defineProperty(exports, "__esModule", {
|
|||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = void 0;
|
exports["default"] = void 0;
|
||||||
|
|
||||||
var _vecks = require("vecks");
|
var _vecks = require("vecks");
|
||||||
|
|
||||||
var _colors = _interopRequireDefault(require("./util/colors"));
|
var _colors = _interopRequireDefault(require("./util/colors"));
|
||||||
|
|
||||||
var _denormalise = _interopRequireDefault(require("./denormalise"));
|
var _denormalise = _interopRequireDefault(require("./denormalise"));
|
||||||
|
|
||||||
var _entityToPolyline = _interopRequireDefault(require("./entityToPolyline"));
|
var _entityToPolyline = _interopRequireDefault(require("./entityToPolyline"));
|
||||||
|
|
||||||
var _applyTransforms = _interopRequireDefault(require("./applyTransforms"));
|
var _applyTransforms = _interopRequireDefault(require("./applyTransforms"));
|
||||||
|
|
||||||
var _logger = _interopRequireDefault(require("./util/logger"));
|
var _logger = _interopRequireDefault(require("./util/logger"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
var _default = function _default(parsed) {
|
var _default = function _default(parsed) {
|
||||||
var entities = (0, _denormalise["default"])(parsed);
|
var entities = (0, _denormalise["default"])(parsed);
|
||||||
var polylines = entities.map(function (entity) {
|
var polylines = entities.map(function (entity) {
|
||||||
var layerTable = parsed.tables.layers[entity.layer];
|
var layerTable = parsed.tables.layers[entity.layer];
|
||||||
var rgb;
|
var rgb;
|
||||||
|
|
||||||
if (layerTable) {
|
if (layerTable) {
|
||||||
var colorNumber = 'colorNumber' in entity ? entity.colorNumber : layerTable.colorNumber;
|
var colorNumber = 'colorNumber' in entity ? entity.colorNumber : layerTable.colorNumber;
|
||||||
rgb = _colors["default"][colorNumber];
|
rgb = _colors["default"][colorNumber];
|
||||||
|
|
||||||
if (rgb === undefined) {
|
if (rgb === undefined) {
|
||||||
_logger["default"].warn('Color index', colorNumber, 'invalid, defaulting to black');
|
_logger["default"].warn('Color index', colorNumber, 'invalid, defaulting to black');
|
||||||
|
|
||||||
rgb = [0, 0, 0];
|
rgb = [0, 0, 0];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
_logger["default"].warn('no layer table for layer:' + entity.layer);
|
_logger["default"].warn('no layer table for layer:' + entity.layer);
|
||||||
|
|
||||||
rgb = [0, 0, 0];
|
rgb = [0, 0, 0];
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
rgb: rgb,
|
rgb: rgb,
|
||||||
vertices: (0, _applyTransforms["default"])((0, _entityToPolyline["default"])(entity), entity.transforms)
|
vertices: (0, _applyTransforms["default"])((0, _entityToPolyline["default"])(entity), entity.transforms)
|
||||||
@ -59,5 +46,4 @@ var _default = function _default(parsed) {
|
|||||||
polylines: polylines
|
polylines: polylines
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
exports["default"] = _default;
|
exports["default"] = _default;
|
143
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/toSVG.js
generated
vendored
143
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/toSVG.js
generated
vendored
@ -1,54 +1,31 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", {
|
Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = exports.piecewiseToPaths = void 0;
|
exports.piecewiseToPaths = exports["default"] = void 0;
|
||||||
|
|
||||||
var _prettyData = require("pretty-data");
|
|
||||||
|
|
||||||
var _vecks = require("vecks");
|
var _vecks = require("vecks");
|
||||||
|
|
||||||
var _entityToPolyline = _interopRequireDefault(require("./entityToPolyline"));
|
var _entityToPolyline = _interopRequireDefault(require("./entityToPolyline"));
|
||||||
|
|
||||||
var _denormalise = _interopRequireDefault(require("./denormalise"));
|
var _denormalise = _interopRequireDefault(require("./denormalise"));
|
||||||
|
|
||||||
var _getRGBForEntity = _interopRequireDefault(require("./getRGBForEntity"));
|
var _getRGBForEntity = _interopRequireDefault(require("./getRGBForEntity"));
|
||||||
|
|
||||||
var _logger = _interopRequireDefault(require("./util/logger"));
|
var _logger = _interopRequireDefault(require("./util/logger"));
|
||||||
|
|
||||||
var _rotate = _interopRequireDefault(require("./util/rotate"));
|
var _rotate = _interopRequireDefault(require("./util/rotate"));
|
||||||
|
|
||||||
var _rgbToColorAttribute = _interopRequireDefault(require("./util/rgbToColorAttribute"));
|
var _rgbToColorAttribute = _interopRequireDefault(require("./util/rgbToColorAttribute"));
|
||||||
|
|
||||||
var _toPiecewiseBezier = _interopRequireWildcard(require("./util/toPiecewiseBezier"));
|
var _toPiecewiseBezier = _interopRequireWildcard(require("./util/toPiecewiseBezier"));
|
||||||
|
|
||||||
var _transformBoundingBoxAndElement = _interopRequireDefault(require("./util/transformBoundingBoxAndElement"));
|
var _transformBoundingBoxAndElement = _interopRequireDefault(require("./util/transformBoundingBoxAndElement"));
|
||||||
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
||||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||||
|
|
||||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
||||||
|
|
||||||
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
||||||
|
|
||||||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
||||||
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
||||||
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
||||||
|
|
||||||
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
||||||
|
|
||||||
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
||||||
|
|
||||||
var addFlipXIfApplicable = function addFlipXIfApplicable(entity, _ref) {
|
var addFlipXIfApplicable = function addFlipXIfApplicable(entity, _ref) {
|
||||||
var bbox = _ref.bbox,
|
var bbox = _ref.bbox,
|
||||||
element = _ref.element;
|
element = _ref.element;
|
||||||
|
|
||||||
if (entity.extrusionZ === -1) {
|
if (entity.extrusionZ === -1) {
|
||||||
return {
|
return {
|
||||||
bbox: new _vecks.Box2().expandByPoint({
|
bbox: new _vecks.Box2().expandByPoint({
|
||||||
@ -67,18 +44,16 @@ var addFlipXIfApplicable = function addFlipXIfApplicable(entity, _ref) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a <path /> element. Interpolates curved entities.
|
* Create a <path /> element. Interpolates curved entities.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
var polyline = function polyline(entity) {
|
var polyline = function polyline(entity) {
|
||||||
var vertices = (0, _entityToPolyline["default"])(entity);
|
var vertices = (0, _entityToPolyline["default"])(entity);
|
||||||
var bbox = vertices.reduce(function (acc, _ref2) {
|
var bbox = vertices.reduce(function (acc, _ref2) {
|
||||||
var _ref3 = _slicedToArray(_ref2, 2),
|
var _ref3 = _slicedToArray(_ref2, 2),
|
||||||
x = _ref3[0],
|
x = _ref3[0],
|
||||||
y = _ref3[1];
|
y = _ref3[1];
|
||||||
|
|
||||||
return acc.expandByPoint({
|
return acc.expandByPoint({
|
||||||
x: x,
|
x: x,
|
||||||
y: y
|
y: y
|
||||||
@ -88,15 +63,14 @@ var polyline = function polyline(entity) {
|
|||||||
acc += i === 0 ? 'M' : 'L';
|
acc += i === 0 ? 'M' : 'L';
|
||||||
acc += point[0] + ',' + point[1];
|
acc += point[0] + ',' + point[1];
|
||||||
return acc;
|
return acc;
|
||||||
}, ''); // Empirically it appears that flipping horzontally does not apply to polyline
|
}, '');
|
||||||
|
// Empirically it appears that flipping horzontally does not apply to polyline
|
||||||
return (0, _transformBoundingBoxAndElement["default"])(bbox, "<path d=\"".concat(d, "\" />"), entity.transforms);
|
return (0, _transformBoundingBoxAndElement["default"])(bbox, "<path d=\"".concat(d, "\" />"), entity.transforms);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a <circle /> element for the CIRCLE entity.
|
* Create a <circle /> element for the CIRCLE entity.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
var circle = function circle(entity) {
|
var circle = function circle(entity) {
|
||||||
var bbox0 = new _vecks.Box2().expandByPoint({
|
var bbox0 = new _vecks.Box2().expandByPoint({
|
||||||
x: entity.x + entity.r,
|
x: entity.x + entity.r,
|
||||||
@ -106,28 +80,24 @@ var circle = function circle(entity) {
|
|||||||
y: entity.y - entity.r
|
y: entity.y - entity.r
|
||||||
});
|
});
|
||||||
var element0 = "<circle cx=\"".concat(entity.x, "\" cy=\"").concat(entity.y, "\" r=\"").concat(entity.r, "\" />");
|
var element0 = "<circle cx=\"".concat(entity.x, "\" cy=\"").concat(entity.y, "\" r=\"").concat(entity.r, "\" />");
|
||||||
|
|
||||||
var _addFlipXIfApplicable = addFlipXIfApplicable(entity, {
|
var _addFlipXIfApplicable = addFlipXIfApplicable(entity, {
|
||||||
bbox: bbox0,
|
bbox: bbox0,
|
||||||
element: element0
|
element: element0
|
||||||
}),
|
}),
|
||||||
bbox = _addFlipXIfApplicable.bbox,
|
bbox = _addFlipXIfApplicable.bbox,
|
||||||
element = _addFlipXIfApplicable.element;
|
element = _addFlipXIfApplicable.element;
|
||||||
|
|
||||||
return (0, _transformBoundingBoxAndElement["default"])(bbox, element, entity.transforms);
|
return (0, _transformBoundingBoxAndElement["default"])(bbox, element, entity.transforms);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a a <path d="A..." /> or <ellipse /> element for the ARC or ELLIPSE
|
* Create a a <path d="A..." /> or <ellipse /> element for the ARC or ELLIPSE
|
||||||
* DXF entity (<ellipse /> if start and end point are the same).
|
* DXF entity (<ellipse /> if start and end point are the same).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
var ellipseOrArc = function ellipseOrArc(cx, cy, majorX, majorY, axisRatio, startAngle, endAngle, flipX) {
|
var ellipseOrArc = function ellipseOrArc(cx, cy, majorX, majorY, axisRatio, startAngle, endAngle, flipX) {
|
||||||
var rx = Math.sqrt(majorX * majorX + majorY * majorY);
|
var rx = Math.sqrt(majorX * majorX + majorY * majorY);
|
||||||
var ry = axisRatio * rx;
|
var ry = axisRatio * rx;
|
||||||
var rotationAngle = -Math.atan2(-majorY, majorX);
|
var rotationAngle = -Math.atan2(-majorY, majorX);
|
||||||
var bbox = bboxEllipseOrArc(cx, cy, majorX, majorY, axisRatio, startAngle, endAngle, flipX);
|
var bbox = bboxEllipseOrArc(cx, cy, majorX, majorY, axisRatio, startAngle, endAngle, flipX);
|
||||||
|
|
||||||
if (Math.abs(startAngle - endAngle) < 1e-9 || Math.abs(startAngle - endAngle + Math.PI * 2) < 1e-9) {
|
if (Math.abs(startAngle - endAngle) < 1e-9 || Math.abs(startAngle - endAngle + Math.PI * 2) < 1e-9) {
|
||||||
// Use a native <ellipse> when start and end angles are the same, and
|
// Use a native <ellipse> when start and end angles are the same, and
|
||||||
// arc paths with same start and end points don't render (at least on Safari)
|
// arc paths with same start and end points don't render (at least on Safari)
|
||||||
@ -156,37 +126,29 @@ var ellipseOrArc = function ellipseOrArc(cx, cy, majorX, majorY, axisRatio, star
|
|||||||
var adjustedEndAngle = endAngle < startAngle ? endAngle + Math.PI * 2 : endAngle;
|
var adjustedEndAngle = endAngle < startAngle ? endAngle + Math.PI * 2 : endAngle;
|
||||||
var largeArcFlag = adjustedEndAngle - startAngle < Math.PI ? 0 : 1;
|
var largeArcFlag = adjustedEndAngle - startAngle < Math.PI ? 0 : 1;
|
||||||
var d = "M ".concat(startPoint.x, " ").concat(startPoint.y, " A ").concat(rx, " ").concat(ry, " ").concat(rotationAngle / Math.PI * 180, " ").concat(largeArcFlag, " 1 ").concat(endPoint.x, " ").concat(endPoint.y);
|
var d = "M ".concat(startPoint.x, " ").concat(startPoint.y, " A ").concat(rx, " ").concat(ry, " ").concat(rotationAngle / Math.PI * 180, " ").concat(largeArcFlag, " 1 ").concat(endPoint.x, " ").concat(endPoint.y);
|
||||||
|
|
||||||
var _element = "<path d=\"".concat(d, "\" />");
|
var _element = "<path d=\"".concat(d, "\" />");
|
||||||
|
|
||||||
return {
|
return {
|
||||||
bbox: bbox,
|
bbox: bbox,
|
||||||
element: _element
|
element: _element
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compute the bounding box of an elliptical arc, given the DXF entity parameters
|
* Compute the bounding box of an elliptical arc, given the DXF entity parameters
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
var bboxEllipseOrArc = function bboxEllipseOrArc(cx, cy, majorX, majorY, axisRatio, startAngle, endAngle, flipX) {
|
var bboxEllipseOrArc = function bboxEllipseOrArc(cx, cy, majorX, majorY, axisRatio, startAngle, endAngle, flipX) {
|
||||||
// The bounding box will be defined by the starting point of the ellipse, and ending point,
|
// The bounding box will be defined by the starting point of the ellipse, and ending point,
|
||||||
// and any extrema on the ellipse that are between startAngle and endAngle.
|
// and any extrema on the ellipse that are between startAngle and endAngle.
|
||||||
// The extrema are found by setting either the x or y component of the ellipse's
|
// The extrema are found by setting either the x or y component of the ellipse's
|
||||||
// tangent vector to zero and solving for the angle.
|
// tangent vector to zero and solving for the angle.
|
||||||
|
|
||||||
// Ensure start and end angles are > 0 and well-ordered
|
// Ensure start and end angles are > 0 and well-ordered
|
||||||
while (startAngle < 0) {
|
while (startAngle < 0) startAngle += Math.PI * 2;
|
||||||
startAngle += Math.PI * 2;
|
while (endAngle <= startAngle) endAngle += Math.PI * 2;
|
||||||
}
|
|
||||||
|
|
||||||
while (endAngle <= startAngle) {
|
|
||||||
endAngle += Math.PI * 2;
|
|
||||||
} // When rotated, the extrema of the ellipse will be found at these angles
|
|
||||||
|
|
||||||
|
|
||||||
|
// When rotated, the extrema of the ellipse will be found at these angles
|
||||||
var angles = [];
|
var angles = [];
|
||||||
|
|
||||||
if (Math.abs(majorX) < 1e-12 || Math.abs(majorY) < 1e-12) {
|
if (Math.abs(majorX) < 1e-12 || Math.abs(majorY) < 1e-12) {
|
||||||
// Special case for majorX or majorY = 0
|
// Special case for majorX or majorY = 0
|
||||||
for (var i = 0; i < 4; i++) {
|
for (var i = 0; i < 4; i++) {
|
||||||
@ -195,113 +157,100 @@ var bboxEllipseOrArc = function bboxEllipseOrArc(cx, cy, majorX, majorY, axisRat
|
|||||||
} else {
|
} else {
|
||||||
// reference https://github.com/bjnortier/dxf/issues/47#issuecomment-545915042
|
// reference https://github.com/bjnortier/dxf/issues/47#issuecomment-545915042
|
||||||
angles[0] = Math.atan(-majorY * axisRatio / majorX) - Math.PI; // Ensure angles < 0
|
angles[0] = Math.atan(-majorY * axisRatio / majorX) - Math.PI; // Ensure angles < 0
|
||||||
|
|
||||||
angles[1] = Math.atan(majorX * axisRatio / majorY) - Math.PI;
|
angles[1] = Math.atan(majorX * axisRatio / majorY) - Math.PI;
|
||||||
angles[2] = angles[0] - Math.PI;
|
angles[2] = angles[0] - Math.PI;
|
||||||
angles[3] = angles[1] - Math.PI;
|
angles[3] = angles[1] - Math.PI;
|
||||||
} // Remove angles not falling between start and end
|
|
||||||
|
|
||||||
|
|
||||||
for (var _i2 = 4; _i2 >= 0; _i2--) {
|
|
||||||
while (angles[_i2] < startAngle) {
|
|
||||||
angles[_i2] += Math.PI * 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove angles not falling between start and end
|
||||||
|
for (var _i2 = 4; _i2 >= 0; _i2--) {
|
||||||
|
while (angles[_i2] < startAngle) angles[_i2] += Math.PI * 2;
|
||||||
if (angles[_i2] > endAngle) {
|
if (angles[_i2] > endAngle) {
|
||||||
angles.splice(_i2, 1);
|
angles.splice(_i2, 1);
|
||||||
}
|
}
|
||||||
} // Also to consider are the starting and ending points:
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Also to consider are the starting and ending points:
|
||||||
angles.push(startAngle);
|
angles.push(startAngle);
|
||||||
angles.push(endAngle); // Compute points lying on the unit circle at these angles
|
angles.push(endAngle);
|
||||||
|
|
||||||
|
// Compute points lying on the unit circle at these angles
|
||||||
var pts = angles.map(function (a) {
|
var pts = angles.map(function (a) {
|
||||||
return {
|
return {
|
||||||
x: Math.cos(a),
|
x: Math.cos(a),
|
||||||
y: Math.sin(a)
|
y: Math.sin(a)
|
||||||
};
|
};
|
||||||
}); // Transformation matrix, formed by the major and minor axes
|
});
|
||||||
|
|
||||||
var M = [[majorX, -majorY * axisRatio], [majorY, majorX * axisRatio]]; // Rotate, scale, and translate points
|
// Transformation matrix, formed by the major and minor axes
|
||||||
|
var M = [[majorX, -majorY * axisRatio], [majorY, majorX * axisRatio]];
|
||||||
|
|
||||||
|
// Rotate, scale, and translate points
|
||||||
var rotatedPts = pts.map(function (p) {
|
var rotatedPts = pts.map(function (p) {
|
||||||
return {
|
return {
|
||||||
x: p.x * M[0][0] + p.y * M[0][1] + cx,
|
x: p.x * M[0][0] + p.y * M[0][1] + cx,
|
||||||
y: p.x * M[1][0] + p.y * M[1][1] + cy
|
y: p.x * M[1][0] + p.y * M[1][1] + cy
|
||||||
};
|
};
|
||||||
}); // Compute extents of bounding box
|
});
|
||||||
|
|
||||||
|
// Compute extents of bounding box
|
||||||
var bbox = rotatedPts.reduce(function (acc, p) {
|
var bbox = rotatedPts.reduce(function (acc, p) {
|
||||||
acc.expandByPoint(p);
|
acc.expandByPoint(p);
|
||||||
return acc;
|
return acc;
|
||||||
}, new _vecks.Box2());
|
}, new _vecks.Box2());
|
||||||
return bbox;
|
return bbox;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An ELLIPSE is defined by the major axis, convert to X and Y radius with
|
* An ELLIPSE is defined by the major axis, convert to X and Y radius with
|
||||||
* a rotation angle
|
* a rotation angle
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
var ellipse = function ellipse(entity) {
|
var ellipse = function ellipse(entity) {
|
||||||
var _ellipseOrArc = ellipseOrArc(entity.x, entity.y, entity.majorX, entity.majorY, entity.axisRatio, entity.startAngle, entity.endAngle),
|
var _ellipseOrArc = ellipseOrArc(entity.x, entity.y, entity.majorX, entity.majorY, entity.axisRatio, entity.startAngle, entity.endAngle),
|
||||||
bbox0 = _ellipseOrArc.bbox,
|
bbox0 = _ellipseOrArc.bbox,
|
||||||
element0 = _ellipseOrArc.element;
|
element0 = _ellipseOrArc.element;
|
||||||
|
|
||||||
var _addFlipXIfApplicable2 = addFlipXIfApplicable(entity, {
|
var _addFlipXIfApplicable2 = addFlipXIfApplicable(entity, {
|
||||||
bbox: bbox0,
|
bbox: bbox0,
|
||||||
element: element0
|
element: element0
|
||||||
}),
|
}),
|
||||||
bbox = _addFlipXIfApplicable2.bbox,
|
bbox = _addFlipXIfApplicable2.bbox,
|
||||||
element = _addFlipXIfApplicable2.element;
|
element = _addFlipXIfApplicable2.element;
|
||||||
|
|
||||||
return (0, _transformBoundingBoxAndElement["default"])(bbox, element, entity.transforms);
|
return (0, _transformBoundingBoxAndElement["default"])(bbox, element, entity.transforms);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An ARC is an ellipse with equal radii
|
* An ARC is an ellipse with equal radii
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
var arc = function arc(entity) {
|
var arc = function arc(entity) {
|
||||||
var _ellipseOrArc2 = ellipseOrArc(entity.x, entity.y, entity.r, 0, 1, entity.startAngle, entity.endAngle, entity.extrusionZ === -1),
|
var _ellipseOrArc2 = ellipseOrArc(entity.x, entity.y, entity.r, 0, 1, entity.startAngle, entity.endAngle, entity.extrusionZ === -1),
|
||||||
bbox0 = _ellipseOrArc2.bbox,
|
bbox0 = _ellipseOrArc2.bbox,
|
||||||
element0 = _ellipseOrArc2.element;
|
element0 = _ellipseOrArc2.element;
|
||||||
|
|
||||||
var _addFlipXIfApplicable3 = addFlipXIfApplicable(entity, {
|
var _addFlipXIfApplicable3 = addFlipXIfApplicable(entity, {
|
||||||
bbox: bbox0,
|
bbox: bbox0,
|
||||||
element: element0
|
element: element0
|
||||||
}),
|
}),
|
||||||
bbox = _addFlipXIfApplicable3.bbox,
|
bbox = _addFlipXIfApplicable3.bbox,
|
||||||
element = _addFlipXIfApplicable3.element;
|
element = _addFlipXIfApplicable3.element;
|
||||||
|
|
||||||
return (0, _transformBoundingBoxAndElement["default"])(bbox, element, entity.transforms);
|
return (0, _transformBoundingBoxAndElement["default"])(bbox, element, entity.transforms);
|
||||||
};
|
};
|
||||||
|
|
||||||
var piecewiseToPaths = function piecewiseToPaths(k, knots, controlPoints) {
|
var piecewiseToPaths = function piecewiseToPaths(k, knots, controlPoints) {
|
||||||
var paths = [];
|
var paths = [];
|
||||||
var controlPointIndex = 0;
|
var controlPointIndex = 0;
|
||||||
var knotIndex = k;
|
var knotIndex = k;
|
||||||
|
|
||||||
while (knotIndex < knots.length - k + 1) {
|
while (knotIndex < knots.length - k + 1) {
|
||||||
var m = (0, _toPiecewiseBezier.multiplicity)(knots, knotIndex);
|
var m = (0, _toPiecewiseBezier.multiplicity)(knots, knotIndex);
|
||||||
var cp = controlPoints.slice(controlPointIndex, controlPointIndex + k);
|
var cp = controlPoints.slice(controlPointIndex, controlPointIndex + k);
|
||||||
|
|
||||||
if (k === 4) {
|
if (k === 4) {
|
||||||
paths.push("<path d=\"M ".concat(cp[0].x, " ").concat(cp[0].y, " C ").concat(cp[1].x, " ").concat(cp[1].y, " ").concat(cp[2].x, " ").concat(cp[2].y, " ").concat(cp[3].x, " ").concat(cp[3].y, "\" />"));
|
paths.push("<path d=\"M ".concat(cp[0].x, " ").concat(cp[0].y, " C ").concat(cp[1].x, " ").concat(cp[1].y, " ").concat(cp[2].x, " ").concat(cp[2].y, " ").concat(cp[3].x, " ").concat(cp[3].y, "\" />"));
|
||||||
} else if (k === 3) {
|
} else if (k === 3) {
|
||||||
paths.push("<path d=\"M ".concat(cp[0].x, " ").concat(cp[0].y, " Q ").concat(cp[1].x, " ").concat(cp[1].y, " ").concat(cp[2].x, " ").concat(cp[2].y, "\" />"));
|
paths.push("<path d=\"M ".concat(cp[0].x, " ").concat(cp[0].y, " Q ").concat(cp[1].x, " ").concat(cp[1].y, " ").concat(cp[2].x, " ").concat(cp[2].y, "\" />"));
|
||||||
}
|
}
|
||||||
|
|
||||||
controlPointIndex += m;
|
controlPointIndex += m;
|
||||||
knotIndex += m;
|
knotIndex += m;
|
||||||
}
|
}
|
||||||
|
|
||||||
return paths;
|
return paths;
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.piecewiseToPaths = piecewiseToPaths;
|
exports.piecewiseToPaths = piecewiseToPaths;
|
||||||
|
|
||||||
var bezier = function bezier(entity) {
|
var bezier = function bezier(entity) {
|
||||||
var bbox = new _vecks.Box2();
|
var bbox = new _vecks.Box2();
|
||||||
entity.controlPoints.forEach(function (p) {
|
entity.controlPoints.forEach(function (p) {
|
||||||
@ -313,26 +262,25 @@ var bezier = function bezier(entity) {
|
|||||||
var element = "<g>".concat(paths.join(''), "</g>");
|
var element = "<g>".concat(paths.join(''), "</g>");
|
||||||
return (0, _transformBoundingBoxAndElement["default"])(bbox, element, entity.transforms);
|
return (0, _transformBoundingBoxAndElement["default"])(bbox, element, entity.transforms);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Switcth the appropriate function on entity type. CIRCLE, ARC and ELLIPSE
|
* Switcth the appropriate function on entity type. CIRCLE, ARC and ELLIPSE
|
||||||
* produce native SVG elements, the rest produce interpolated polylines.
|
* produce native SVG elements, the rest produce interpolated polylines.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
var entityToBoundsAndElement = function entityToBoundsAndElement(entity) {
|
var entityToBoundsAndElement = function entityToBoundsAndElement(entity) {
|
||||||
switch (entity.type) {
|
switch (entity.type) {
|
||||||
case 'CIRCLE':
|
case 'CIRCLE':
|
||||||
return circle(entity);
|
return circle(entity);
|
||||||
|
|
||||||
case 'ELLIPSE':
|
case 'ELLIPSE':
|
||||||
return ellipse(entity);
|
return ellipse(entity);
|
||||||
|
|
||||||
case 'ARC':
|
case 'ARC':
|
||||||
return arc(entity);
|
return arc(entity);
|
||||||
|
|
||||||
case 'SPLINE':
|
case 'SPLINE':
|
||||||
{
|
{
|
||||||
if (entity.degree === 2 || entity.degree === 3) {
|
var hasWeights = entity.weights && entity.weights.some(function (w) {
|
||||||
|
return w !== 1;
|
||||||
|
});
|
||||||
|
if ((entity.degree === 2 || entity.degree === 3) && !hasWeights) {
|
||||||
try {
|
try {
|
||||||
return bezier(entity);
|
return bezier(entity);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@ -342,40 +290,33 @@ var entityToBoundsAndElement = function entityToBoundsAndElement(entity) {
|
|||||||
return polyline(entity);
|
return polyline(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'LINE':
|
case 'LINE':
|
||||||
case 'LWPOLYLINE':
|
case 'LWPOLYLINE':
|
||||||
case 'POLYLINE':
|
case 'POLYLINE':
|
||||||
{
|
{
|
||||||
return polyline(entity);
|
return polyline(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
_logger["default"].warn('entity type not supported in SVG rendering:', entity.type);
|
_logger["default"].warn('entity type not supported in SVG rendering:', entity.type);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var _default = function _default(parsed) {
|
var _default = function _default(parsed) {
|
||||||
var entities = (0, _denormalise["default"])(parsed);
|
var entities = (0, _denormalise["default"])(parsed);
|
||||||
|
|
||||||
var _entities$reduce = entities.reduce(function (acc, entity, i) {
|
var _entities$reduce = entities.reduce(function (acc, entity, i) {
|
||||||
var rgb = (0, _getRGBForEntity["default"])(parsed.tables.layers, entity);
|
var rgb = (0, _getRGBForEntity["default"])(parsed.tables.layers, entity);
|
||||||
var boundsAndElement = entityToBoundsAndElement(entity); // Ignore entities like MTEXT that don't produce SVG elements
|
var boundsAndElement = entityToBoundsAndElement(entity);
|
||||||
|
// Ignore entities like MTEXT that don't produce SVG elements
|
||||||
if (boundsAndElement) {
|
if (boundsAndElement) {
|
||||||
var _bbox = boundsAndElement.bbox,
|
var _bbox = boundsAndElement.bbox,
|
||||||
element = boundsAndElement.element; // Ignore invalid bounding boxes
|
element = boundsAndElement.element;
|
||||||
|
// Ignore invalid bounding boxes
|
||||||
if (_bbox.valid) {
|
if (_bbox.valid) {
|
||||||
acc.bbox.expandByPoint(_bbox.min);
|
acc.bbox.expandByPoint(_bbox.min);
|
||||||
acc.bbox.expandByPoint(_bbox.max);
|
acc.bbox.expandByPoint(_bbox.max);
|
||||||
}
|
}
|
||||||
|
|
||||||
acc.elements.push("<g stroke=\"".concat((0, _rgbToColorAttribute["default"])(rgb), "\">").concat(element, "</g>"));
|
acc.elements.push("<g stroke=\"".concat((0, _rgbToColorAttribute["default"])(rgb), "\">").concat(element, "</g>"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return acc;
|
return acc;
|
||||||
}, {
|
}, {
|
||||||
bbox: new _vecks.Box2(),
|
bbox: new _vecks.Box2(),
|
||||||
@ -383,7 +324,6 @@ var _default = function _default(parsed) {
|
|||||||
}),
|
}),
|
||||||
bbox = _entities$reduce.bbox,
|
bbox = _entities$reduce.bbox,
|
||||||
elements = _entities$reduce.elements;
|
elements = _entities$reduce.elements;
|
||||||
|
|
||||||
var viewBox = bbox.valid ? {
|
var viewBox = bbox.valid ? {
|
||||||
x: bbox.min.x,
|
x: bbox.min.x,
|
||||||
y: -bbox.max.y,
|
y: -bbox.max.y,
|
||||||
@ -395,7 +335,6 @@ var _default = function _default(parsed) {
|
|||||||
width: 0,
|
width: 0,
|
||||||
height: 0
|
height: 0
|
||||||
};
|
};
|
||||||
return "<?xml version=\"1.0\"?>\n<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\"\n preserveAspectRatio=\"xMinYMin meet\"\n viewBox=\"".concat(viewBox.x, " ").concat(viewBox.y, " ").concat(viewBox.width, " ").concat(viewBox.height, "\"\n width=\"100%\" height=\"100%\"\n>\n <g stroke=\"#000000\" stroke-width=\"0.1%\" fill=\"none\" transform=\"matrix(1,0,0,-1,0,0)\">\n ").concat(_prettyData.pd.xml(elements.join('\n')), "\n </g>\n</svg>");
|
return "<?xml version=\"1.0\"?>\n<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\"\n preserveAspectRatio=\"xMinYMin meet\"\n viewBox=\"".concat(viewBox.x, " ").concat(viewBox.y, " ").concat(viewBox.width, " ").concat(viewBox.height, "\"\n width=\"100%\" height=\"100%\"\n>\n <g stroke=\"#000000\" stroke-width=\"0.1%\" fill=\"none\" transform=\"matrix(1,0,0,-1,0,0)\">\n ").concat(elements.join('\n'), "\n </g>\n</svg>");
|
||||||
};
|
};
|
||||||
|
|
||||||
exports["default"] = _default;
|
exports["default"] = _default;
|
52
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/util/bSpline.js
generated
vendored
52
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/util/bSpline.js
generated
vendored
@ -4,9 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = void 0;
|
exports["default"] = void 0;
|
||||||
|
var _round = _interopRequireDefault(require("./round10"));
|
||||||
var _round = require("round10");
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copied and ported to code standard as the b-spline library is not maintained any longer.
|
* Copied and ported to code standard as the b-spline library is not maintained any longer.
|
||||||
* Source:
|
* Source:
|
||||||
@ -15,90 +14,79 @@ var _round = require("round10");
|
|||||||
*/
|
*/
|
||||||
var _default = function _default(t, degree, points, knots, weights) {
|
var _default = function _default(t, degree, points, knots, weights) {
|
||||||
var n = points.length; // points count
|
var n = points.length; // points count
|
||||||
|
|
||||||
var d = points[0].length; // point dimensionality
|
var d = points[0].length; // point dimensionality
|
||||||
|
|
||||||
if (t < 0 || t > 1) {
|
if (t < 0 || t > 1) {
|
||||||
throw new Error('t out of bounds [0,1]: ' + t);
|
throw new Error('t out of bounds [0,1]: ' + t);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (degree < 1) throw new Error('degree must be at least 1 (linear)');
|
if (degree < 1) throw new Error('degree must be at least 1 (linear)');
|
||||||
if (degree > n - 1) throw new Error('degree must be less than or equal to point count - 1');
|
if (degree > n - 1) throw new Error('degree must be less than or equal to point count - 1');
|
||||||
|
|
||||||
if (!weights) {
|
if (!weights) {
|
||||||
// build weight vector of length [n]
|
// build weight vector of length [n]
|
||||||
weights = [];
|
weights = [];
|
||||||
|
|
||||||
for (var i = 0; i < n; i++) {
|
for (var i = 0; i < n; i++) {
|
||||||
weights[i] = 1;
|
weights[i] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!knots) {
|
if (!knots) {
|
||||||
// build knot vector of length [n + degree + 1]
|
// build knot vector of length [n + degree + 1]
|
||||||
knots = [];
|
knots = [];
|
||||||
|
|
||||||
for (var _i = 0; _i < n + degree + 1; _i++) {
|
for (var _i = 0; _i < n + degree + 1; _i++) {
|
||||||
knots[_i] = _i;
|
knots[_i] = _i;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (knots.length !== n + degree + 1) throw new Error('bad knot vector length');
|
if (knots.length !== n + degree + 1) throw new Error('bad knot vector length');
|
||||||
}
|
}
|
||||||
|
var domain = [degree, knots.length - 1 - degree];
|
||||||
|
|
||||||
var domain = [degree, knots.length - 1 - degree]; // remap t to the domain where the spline is defined
|
// remap t to the domain where the spline is defined
|
||||||
|
|
||||||
var low = knots[domain[0]];
|
var low = knots[domain[0]];
|
||||||
var high = knots[domain[1]];
|
var high = knots[domain[1]];
|
||||||
t = t * (high - low) + low; // Clamp to the upper & lower bounds instead of
|
t = t * (high - low) + low;
|
||||||
|
|
||||||
|
// Clamp to the upper & lower bounds instead of
|
||||||
// throwing an error like in the original lib
|
// throwing an error like in the original lib
|
||||||
// https://github.com/bjnortier/dxf/issues/28
|
// https://github.com/bjnortier/dxf/issues/28
|
||||||
|
|
||||||
t = Math.max(t, low);
|
t = Math.max(t, low);
|
||||||
t = Math.min(t, high); // find s (the spline segment) for the [t] value provided
|
t = Math.min(t, high);
|
||||||
|
|
||||||
|
// find s (the spline segment) for the [t] value provided
|
||||||
var s;
|
var s;
|
||||||
|
|
||||||
for (s = domain[0]; s < domain[1]; s++) {
|
for (s = domain[0]; s < domain[1]; s++) {
|
||||||
if (t >= knots[s] && t <= knots[s + 1]) {
|
if (t >= knots[s] && t <= knots[s + 1]) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} // convert points to homogeneous coordinates
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// convert points to homogeneous coordinates
|
||||||
var v = [];
|
var v = [];
|
||||||
|
|
||||||
for (var _i2 = 0; _i2 < n; _i2++) {
|
for (var _i2 = 0; _i2 < n; _i2++) {
|
||||||
v[_i2] = [];
|
v[_i2] = [];
|
||||||
|
|
||||||
for (var j = 0; j < d; j++) {
|
for (var j = 0; j < d; j++) {
|
||||||
v[_i2][j] = points[_i2][j] * weights[_i2];
|
v[_i2][j] = points[_i2][j] * weights[_i2];
|
||||||
}
|
}
|
||||||
|
|
||||||
v[_i2][d] = weights[_i2];
|
v[_i2][d] = weights[_i2];
|
||||||
} // l (level) goes from 1 to the curve degree + 1
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// l (level) goes from 1 to the curve degree + 1
|
||||||
var alpha;
|
var alpha;
|
||||||
|
|
||||||
for (var l = 1; l <= degree + 1; l++) {
|
for (var l = 1; l <= degree + 1; l++) {
|
||||||
// build level l of the pyramid
|
// build level l of the pyramid
|
||||||
for (var _i3 = s; _i3 > s - degree - 1 + l; _i3--) {
|
for (var _i3 = s; _i3 > s - degree - 1 + l; _i3--) {
|
||||||
alpha = (t - knots[_i3]) / (knots[_i3 + degree + 1 - l] - knots[_i3]); // interpolate each component
|
alpha = (t - knots[_i3]) / (knots[_i3 + degree + 1 - l] - knots[_i3]);
|
||||||
|
|
||||||
|
// interpolate each component
|
||||||
for (var _j = 0; _j < d + 1; _j++) {
|
for (var _j = 0; _j < d + 1; _j++) {
|
||||||
v[_i3][_j] = (1 - alpha) * v[_i3 - 1][_j] + alpha * v[_i3][_j];
|
v[_i3][_j] = (1 - alpha) * v[_i3 - 1][_j] + alpha * v[_i3][_j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // convert back to cartesian and return
|
|
||||||
|
|
||||||
|
|
||||||
var result = [];
|
|
||||||
|
|
||||||
for (var _i4 = 0; _i4 < d; _i4++) {
|
|
||||||
result[_i4] = (0, _round.round10)(v[s][_i4] / v[s][d], -9);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// convert back to cartesian and return
|
||||||
|
var result = [];
|
||||||
|
for (var _i4 = 0; _i4 < d; _i4++) {
|
||||||
|
result[_i4] = (0, _round["default"])(v[s][_i4] / v[s][d], -9);
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
exports["default"] = _default;
|
exports["default"] = _default;
|
@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = void 0;
|
exports["default"] = void 0;
|
||||||
|
|
||||||
var _vecks = require("vecks");
|
var _vecks = require("vecks");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create the arcs point for a LWPOLYLINE. The start and end are excluded
|
* Create the arcs point for a LWPOLYLINE. The start and end are excluded
|
||||||
*
|
*
|
||||||
@ -16,15 +14,14 @@ var _default = function _default(from, to, bulge, resolution) {
|
|||||||
// Resolution in degrees
|
// Resolution in degrees
|
||||||
if (!resolution) {
|
if (!resolution) {
|
||||||
resolution = 5;
|
resolution = 5;
|
||||||
} // If the bulge is < 0, the arc goes clockwise. So we simply
|
}
|
||||||
|
|
||||||
|
// If the bulge is < 0, the arc goes clockwise. So we simply
|
||||||
// reverse a and b and invert sign
|
// reverse a and b and invert sign
|
||||||
// Bulge = tan(theta/4)
|
// Bulge = tan(theta/4)
|
||||||
|
|
||||||
|
|
||||||
var theta;
|
var theta;
|
||||||
var a;
|
var a;
|
||||||
var b;
|
var b;
|
||||||
|
|
||||||
if (bulge < 0) {
|
if (bulge < 0) {
|
||||||
theta = Math.atan(-bulge) * 4;
|
theta = Math.atan(-bulge) * 4;
|
||||||
a = new _vecks.V2(from[0], from[1]);
|
a = new _vecks.V2(from[0], from[1]);
|
||||||
@ -35,51 +32,44 @@ var _default = function _default(from, to, bulge, resolution) {
|
|||||||
a = new _vecks.V2(to[0], to[1]);
|
a = new _vecks.V2(to[0], to[1]);
|
||||||
b = new _vecks.V2(from[0], from[1]);
|
b = new _vecks.V2(from[0], from[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
var ab = b.sub(a);
|
var ab = b.sub(a);
|
||||||
var lengthAB = ab.length();
|
var lengthAB = ab.length();
|
||||||
var c = a.add(ab.multiply(0.5)); // Distance from center of arc to line between form and to points
|
var c = a.add(ab.multiply(0.5));
|
||||||
|
|
||||||
|
// Distance from center of arc to line between form and to points
|
||||||
var lengthCD = Math.abs(lengthAB / 2 / Math.tan(theta / 2));
|
var lengthCD = Math.abs(lengthAB / 2 / Math.tan(theta / 2));
|
||||||
var normAB = ab.norm();
|
var normAB = ab.norm();
|
||||||
var d;
|
var d;
|
||||||
|
|
||||||
if (theta < Math.PI) {
|
if (theta < Math.PI) {
|
||||||
var normDC = new _vecks.V2(normAB.x * Math.cos(Math.PI / 2) - normAB.y * Math.sin(Math.PI / 2), normAB.y * Math.cos(Math.PI / 2) + normAB.x * Math.sin(Math.PI / 2)); // D is the center of the arc
|
var normDC = new _vecks.V2(normAB.x * Math.cos(Math.PI / 2) - normAB.y * Math.sin(Math.PI / 2), normAB.y * Math.cos(Math.PI / 2) + normAB.x * Math.sin(Math.PI / 2));
|
||||||
|
// D is the center of the arc
|
||||||
d = c.add(normDC.multiply(-lengthCD));
|
d = c.add(normDC.multiply(-lengthCD));
|
||||||
} else {
|
} else {
|
||||||
var normCD = new _vecks.V2(normAB.x * Math.cos(Math.PI / 2) - normAB.y * Math.sin(Math.PI / 2), normAB.y * Math.cos(Math.PI / 2) + normAB.x * Math.sin(Math.PI / 2)); // D is the center of the arc
|
var normCD = new _vecks.V2(normAB.x * Math.cos(Math.PI / 2) - normAB.y * Math.sin(Math.PI / 2), normAB.y * Math.cos(Math.PI / 2) + normAB.x * Math.sin(Math.PI / 2));
|
||||||
|
// D is the center of the arc
|
||||||
d = c.add(normCD.multiply(lengthCD));
|
d = c.add(normCD.multiply(lengthCD));
|
||||||
} // Add points between start start and eng angle relative
|
}
|
||||||
|
|
||||||
|
// Add points between start start and eng angle relative
|
||||||
// to the center point
|
// to the center point
|
||||||
|
|
||||||
|
|
||||||
var startAngle = Math.atan2(b.y - d.y, b.x - d.x) / Math.PI * 180;
|
var startAngle = Math.atan2(b.y - d.y, b.x - d.x) / Math.PI * 180;
|
||||||
var endAngle = Math.atan2(a.y - d.y, a.x - d.x) / Math.PI * 180;
|
var endAngle = Math.atan2(a.y - d.y, a.x - d.x) / Math.PI * 180;
|
||||||
|
|
||||||
if (endAngle < startAngle) {
|
if (endAngle < startAngle) {
|
||||||
endAngle += 360;
|
endAngle += 360;
|
||||||
}
|
}
|
||||||
|
|
||||||
var r = b.sub(d).length();
|
var r = b.sub(d).length();
|
||||||
var startInter = Math.floor(startAngle / resolution) * resolution + resolution;
|
var startInter = Math.floor(startAngle / resolution) * resolution + resolution;
|
||||||
var endInter = Math.ceil(endAngle / resolution) * resolution - resolution;
|
var endInter = Math.ceil(endAngle / resolution) * resolution - resolution;
|
||||||
var points = [];
|
var points = [];
|
||||||
|
|
||||||
for (var i = startInter; i <= endInter; i += resolution) {
|
for (var i = startInter; i <= endInter; i += resolution) {
|
||||||
points.push(d.add(new _vecks.V2(Math.cos(i / 180 * Math.PI) * r, Math.sin(i / 180 * Math.PI) * r)));
|
points.push(d.add(new _vecks.V2(Math.cos(i / 180 * Math.PI) * r, Math.sin(i / 180 * Math.PI) * r)));
|
||||||
} // Maintain the right ordering to join the from and to points
|
}
|
||||||
|
// Maintain the right ordering to join the from and to points
|
||||||
|
|
||||||
if (bulge < 0) {
|
if (bulge < 0) {
|
||||||
points.reverse();
|
points.reverse();
|
||||||
}
|
}
|
||||||
|
|
||||||
return points.map(function (p) {
|
return points.map(function (p) {
|
||||||
return [p.x, p.y];
|
return [p.x, p.y];
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
exports["default"] = _default;
|
exports["default"] = _default;
|
10
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/util/insertKnot.js
generated
vendored
10
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/util/insertKnot.js
generated
vendored
@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = void 0;
|
exports["default"] = void 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Knot insertion is known as "Boehm's algorithm"
|
* Knot insertion is known as "Boehm's algorithm"
|
||||||
*
|
*
|
||||||
@ -17,7 +16,6 @@ var _default = function _default(k, controlPoints, knots, newKnot) {
|
|||||||
var n = controlPoints.length;
|
var n = controlPoints.length;
|
||||||
var i = 0;
|
var i = 0;
|
||||||
var foundIndex = false;
|
var foundIndex = false;
|
||||||
|
|
||||||
for (var j = 0; j < n + k; j++) {
|
for (var j = 0; j < n + k; j++) {
|
||||||
if (newKnot > x[j] && newKnot <= x[j + 1]) {
|
if (newKnot > x[j] && newKnot <= x[j + 1]) {
|
||||||
i = j;
|
i = j;
|
||||||
@ -25,13 +23,10 @@ var _default = function _default(k, controlPoints, knots, newKnot) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!foundIndex) {
|
if (!foundIndex) {
|
||||||
throw new Error('invalid new knot');
|
throw new Error('invalid new knot');
|
||||||
}
|
}
|
||||||
|
|
||||||
var xHat = [];
|
var xHat = [];
|
||||||
|
|
||||||
for (var _j = 0; _j < n + k + 1; _j++) {
|
for (var _j = 0; _j < n + k + 1; _j++) {
|
||||||
if (_j <= i) {
|
if (_j <= i) {
|
||||||
xHat[_j] = x[_j];
|
xHat[_j] = x[_j];
|
||||||
@ -41,10 +36,8 @@ var _default = function _default(k, controlPoints, knots, newKnot) {
|
|||||||
xHat[_j] = x[_j - 1];
|
xHat[_j] = x[_j - 1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var alpha;
|
var alpha;
|
||||||
var bHat = [];
|
var bHat = [];
|
||||||
|
|
||||||
for (var _j2 = 0; _j2 < n + 1; _j2++) {
|
for (var _j2 = 0; _j2 < n + 1; _j2++) {
|
||||||
if (_j2 <= i - k + 1) {
|
if (_j2 <= i - k + 1) {
|
||||||
alpha = 1;
|
alpha = 1;
|
||||||
@ -57,7 +50,6 @@ var _default = function _default(k, controlPoints, knots, newKnot) {
|
|||||||
} else {
|
} else {
|
||||||
alpha = 0;
|
alpha = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (alpha === 0) {
|
if (alpha === 0) {
|
||||||
bHat[_j2] = b[_j2 - 1];
|
bHat[_j2] = b[_j2 - 1];
|
||||||
} else if (alpha === 1) {
|
} else if (alpha === 1) {
|
||||||
@ -69,11 +61,9 @@ var _default = function _default(k, controlPoints, knots, newKnot) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
controlPoints: bHat,
|
controlPoints: bHat,
|
||||||
knots: xHat
|
knots: xHat
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
exports["default"] = _default;
|
exports["default"] = _default;
|
6
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/util/logger.js
generated
vendored
6
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/util/logger.js
generated
vendored
@ -4,27 +4,21 @@ Object.defineProperty(exports, "__esModule", {
|
|||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = void 0;
|
exports["default"] = void 0;
|
||||||
|
|
||||||
var _config = _interopRequireDefault(require("../config"));
|
var _config = _interopRequireDefault(require("../config"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
function info() {
|
function info() {
|
||||||
if (_config["default"].verbose) {
|
if (_config["default"].verbose) {
|
||||||
console.info.apply(undefined, arguments);
|
console.info.apply(undefined, arguments);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function warn() {
|
function warn() {
|
||||||
if (_config["default"].verbose) {
|
if (_config["default"].verbose) {
|
||||||
console.warn.apply(undefined, arguments);
|
console.warn.apply(undefined, arguments);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function error() {
|
function error() {
|
||||||
console.error.apply(undefined, arguments);
|
console.error.apply(undefined, arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
var _default = {
|
var _default = {
|
||||||
info: info,
|
info: info,
|
||||||
warn: warn,
|
warn: warn,
|
||||||
|
@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = void 0;
|
exports["default"] = void 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert an RGB array to a CSS string definition.
|
* Convert an RGB array to a CSS string definition.
|
||||||
* Converts white lines to black as the default.
|
* Converts white lines to black as the default.
|
||||||
@ -16,5 +15,4 @@ var _default = function _default(rgb) {
|
|||||||
return "rgb(".concat(rgb[0], ", ").concat(rgb[1], ", ").concat(rgb[2], ")");
|
return "rgb(".concat(rgb[0], ", ").concat(rgb[1], ", ").concat(rgb[2], ")");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
exports["default"] = _default;
|
exports["default"] = _default;
|
2
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/util/rotate.js
generated
vendored
2
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/util/rotate.js
generated
vendored
@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = void 0;
|
exports["default"] = void 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rotate a points by the given angle.
|
* Rotate a points by the given angle.
|
||||||
*
|
*
|
||||||
@ -17,5 +16,4 @@ var _default = function _default(p, angle) {
|
|||||||
y: p.y * Math.cos(angle) + p.x * Math.sin(angle)
|
y: p.y * Math.cos(angle) + p.x * Math.sin(angle)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
exports["default"] = _default;
|
exports["default"] = _default;
|
@ -3,12 +3,9 @@
|
|||||||
Object.defineProperty(exports, "__esModule", {
|
Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = exports.computeInsertions = exports.multiplicity = exports.checkPinned = void 0;
|
exports.multiplicity = exports["default"] = exports.computeInsertions = exports.checkPinned = void 0;
|
||||||
|
|
||||||
var _insertKnot = _interopRequireDefault(require("./insertKnot"));
|
var _insertKnot = _interopRequireDefault(require("./insertKnot"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For a pinned spline, the knots have to be repeated k times
|
* For a pinned spline, the knots have to be repeated k times
|
||||||
* (where k is the order), at both the beginning and the end
|
* (where k is the order), at both the beginning and the end
|
||||||
@ -19,21 +16,17 @@ var checkPinned = function checkPinned(k, knots) {
|
|||||||
if (knots[i] !== knots[0]) {
|
if (knots[i] !== knots[0]) {
|
||||||
throw Error("not pinned. order: ".concat(k, " knots: ").concat(knots));
|
throw Error("not pinned. order: ".concat(k, " knots: ").concat(knots));
|
||||||
}
|
}
|
||||||
} // Pinned at the end
|
}
|
||||||
|
// Pinned at the end
|
||||||
|
|
||||||
for (var _i = knots.length - 2; _i > knots.length - k - 1; --_i) {
|
for (var _i = knots.length - 2; _i > knots.length - k - 1; --_i) {
|
||||||
if (knots[_i] !== knots[knots.length - 1]) {
|
if (knots[_i] !== knots[knots.length - 1]) {
|
||||||
throw Error("not pinned. order: ".concat(k, " knots: ").concat(knots));
|
throw Error("not pinned. order: ".concat(k, " knots: ").concat(knots));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.checkPinned = checkPinned;
|
exports.checkPinned = checkPinned;
|
||||||
|
|
||||||
var multiplicity = function multiplicity(knots, index) {
|
var multiplicity = function multiplicity(knots, index) {
|
||||||
var m = 1;
|
var m = 1;
|
||||||
|
|
||||||
for (var i = index + 1; i < knots.length; ++i) {
|
for (var i = index + 1; i < knots.length; ++i) {
|
||||||
if (knots[i] === knots[index]) {
|
if (knots[i] === knots[index]) {
|
||||||
++m;
|
++m;
|
||||||
@ -41,9 +34,9 @@ var multiplicity = function multiplicity(knots, index) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return m;
|
return m;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* https://saccade.com/writing/graphics/KnotVectors.pdf
|
* https://saccade.com/writing/graphics/KnotVectors.pdf
|
||||||
* A quadratic piecewise Bézier knot vector with seven control points
|
* A quadratic piecewise Bézier knot vector with seven control points
|
||||||
@ -52,30 +45,21 @@ var multiplicity = function multiplicity(knots, index) {
|
|||||||
* then each subsequent group of k-1 knots is the same,
|
* then each subsequent group of k-1 knots is the same,
|
||||||
* until you get to the end.
|
* until you get to the end.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
exports.multiplicity = multiplicity;
|
exports.multiplicity = multiplicity;
|
||||||
|
|
||||||
var computeInsertions = function computeInsertions(k, knots) {
|
var computeInsertions = function computeInsertions(k, knots) {
|
||||||
var inserts = [];
|
var inserts = [];
|
||||||
var i = k;
|
var i = k;
|
||||||
|
|
||||||
while (i < knots.length - k) {
|
while (i < knots.length - k) {
|
||||||
var knot = knots[i];
|
var knot = knots[i];
|
||||||
var m = multiplicity(knots, i);
|
var m = multiplicity(knots, i);
|
||||||
|
|
||||||
for (var j = 0; j < k - m - 1; ++j) {
|
for (var j = 0; j < k - m - 1; ++j) {
|
||||||
inserts.push(knot);
|
inserts.push(knot);
|
||||||
}
|
}
|
||||||
|
|
||||||
i = i + m;
|
i = i + m;
|
||||||
}
|
}
|
||||||
|
|
||||||
return inserts;
|
return inserts;
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.computeInsertions = computeInsertions;
|
exports.computeInsertions = computeInsertions;
|
||||||
|
|
||||||
var _default = function _default(k, controlPoints, knots) {
|
var _default = function _default(k, controlPoints, knots) {
|
||||||
checkPinned(k, knots);
|
checkPinned(k, knots);
|
||||||
var insertions = computeInsertions(k, knots);
|
var insertions = computeInsertions(k, knots);
|
||||||
@ -86,5 +70,4 @@ var _default = function _default(k, controlPoints, knots) {
|
|||||||
knots: knots
|
knots: knots
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
exports["default"] = _default;
|
exports["default"] = _default;
|
@ -4,21 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports["default"] = void 0;
|
exports["default"] = void 0;
|
||||||
|
|
||||||
var _vecks = require("vecks");
|
var _vecks = require("vecks");
|
||||||
|
|
||||||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
||||||
|
|
||||||
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
||||||
|
|
||||||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
||||||
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
||||||
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
||||||
|
|
||||||
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
||||||
|
|
||||||
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transform the bounding box and the SVG element by the given
|
* Transform the bounding box and the SVG element by the given
|
||||||
* transforms. The <g> element are created in reverse transform
|
* transforms. The <g> element are created in reverse transform
|
||||||
@ -35,8 +27,8 @@ var _default = function _default(bbox, element, transforms) {
|
|||||||
var angle = (transform.rotation || 0) / 180 * Math.PI;
|
var angle = (transform.rotation || 0) / 180 * Math.PI;
|
||||||
var cos = Math.cos,
|
var cos = Math.cos,
|
||||||
sin = Math.sin;
|
sin = Math.sin;
|
||||||
var a, b, c, d, e, f; // In DXF an extrusionZ value of -1 denote a tranform around the Y axis.
|
var a, b, c, d, e, f;
|
||||||
|
// In DXF an extrusionZ value of -1 denote a tranform around the Y axis.
|
||||||
if (transform.extrusionZ === -1) {
|
if (transform.extrusionZ === -1) {
|
||||||
a = -sx * cos(angle);
|
a = -sx * cos(angle);
|
||||||
b = sx * sin(angle);
|
b = sx * sin(angle);
|
||||||
@ -52,12 +44,11 @@ var _default = function _default(bbox, element, transforms) {
|
|||||||
e = tx;
|
e = tx;
|
||||||
f = ty;
|
f = ty;
|
||||||
}
|
}
|
||||||
|
|
||||||
return [a, b, c, d, e, f];
|
return [a, b, c, d, e, f];
|
||||||
}); // Only transform the bounding box is it is valid (i.e. not Infinity)
|
});
|
||||||
|
|
||||||
|
// Only transform the bounding box is it is valid (i.e. not Infinity)
|
||||||
var transformedBBox = new _vecks.Box2();
|
var transformedBBox = new _vecks.Box2();
|
||||||
|
|
||||||
if (bbox.valid) {
|
if (bbox.valid) {
|
||||||
var bboxPoints = [{
|
var bboxPoints = [{
|
||||||
x: bbox.min.x,
|
x: bbox.min.x,
|
||||||
@ -80,7 +71,6 @@ var _default = function _default(bbox, element, transforms) {
|
|||||||
d = _ref2[3],
|
d = _ref2[3],
|
||||||
e = _ref2[4],
|
e = _ref2[4],
|
||||||
f = _ref2[5];
|
f = _ref2[5];
|
||||||
|
|
||||||
bboxPoints = bboxPoints.map(function (point) {
|
bboxPoints = bboxPoints.map(function (point) {
|
||||||
return {
|
return {
|
||||||
x: point.x * a + point.y * c + e,
|
x: point.x * a + point.y * c + e,
|
||||||
@ -92,7 +82,6 @@ var _default = function _default(bbox, element, transforms) {
|
|||||||
return acc.expandByPoint(point);
|
return acc.expandByPoint(point);
|
||||||
}, new _vecks.Box2());
|
}, new _vecks.Box2());
|
||||||
}
|
}
|
||||||
|
|
||||||
matrices.reverse();
|
matrices.reverse();
|
||||||
matrices.forEach(function (_ref3) {
|
matrices.forEach(function (_ref3) {
|
||||||
var _ref4 = _slicedToArray(_ref3, 6),
|
var _ref4 = _slicedToArray(_ref3, 6),
|
||||||
@ -102,7 +91,6 @@ var _default = function _default(bbox, element, transforms) {
|
|||||||
d = _ref4[3],
|
d = _ref4[3],
|
||||||
e = _ref4[4],
|
e = _ref4[4],
|
||||||
f = _ref4[5];
|
f = _ref4[5];
|
||||||
|
|
||||||
transformedElement += "<g transform=\"matrix(".concat(a, " ").concat(b, " ").concat(c, " ").concat(d, " ").concat(e, " ").concat(f, ")\">");
|
transformedElement += "<g transform=\"matrix(".concat(a, " ").concat(b, " ").concat(c, " ").concat(d, " ").concat(e, " ").concat(f, ")\">");
|
||||||
});
|
});
|
||||||
transformedElement += element;
|
transformedElement += element;
|
||||||
@ -114,5 +102,4 @@ var _default = function _default(bbox, element, transforms) {
|
|||||||
element: transformedElement
|
element: transformedElement
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
exports["default"] = _default;
|
exports["default"] = _default;
|
@ -1,38 +1,30 @@
|
|||||||
{
|
{
|
||||||
"_from": "commander@^2.20.3",
|
|
||||||
"_id": "commander@2.20.3",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
|
|
||||||
"_location": "/dxf/commander",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "commander@^2.20.3",
|
|
||||||
"name": "commander",
|
"name": "commander",
|
||||||
"escapedName": "commander",
|
"version": "2.20.3",
|
||||||
"rawSpec": "^2.20.3",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^2.20.3"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/dxf"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
|
||||||
"_shasum": "fd485e84c03eb4881c20722ba48035e8531aeb33",
|
|
||||||
"_spec": "commander@^2.20.3",
|
|
||||||
"_where": "C:\\node-v10.18.0-win-x64\\node_modules\\dxf",
|
|
||||||
"author": {
|
|
||||||
"name": "TJ Holowaychuk",
|
|
||||||
"email": "tj@vision-media.ca"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/tj/commander.js/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"dependencies": {},
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "the complete solution for node.js command-line programs",
|
"description": "the complete solution for node.js command-line programs",
|
||||||
|
"keywords": [
|
||||||
|
"commander",
|
||||||
|
"command",
|
||||||
|
"option",
|
||||||
|
"parser"
|
||||||
|
],
|
||||||
|
"author": "TJ Holowaychuk <tj@vision-media.ca>",
|
||||||
|
"license": "MIT",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/tj/commander.js.git"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"lint": "eslint index.js",
|
||||||
|
"test": "node test/run.js && npm run test-typings",
|
||||||
|
"test-typings": "tsc -p tsconfig.json"
|
||||||
|
},
|
||||||
|
"main": "index",
|
||||||
|
"files": [
|
||||||
|
"index.js",
|
||||||
|
"typings/index.d.ts"
|
||||||
|
],
|
||||||
|
"dependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^12.7.8",
|
"@types/node": "^12.7.8",
|
||||||
"eslint": "^6.4.0",
|
"eslint": "^6.4.0",
|
||||||
@ -42,29 +34,5 @@
|
|||||||
"ts-node": "^8.4.1",
|
"ts-node": "^8.4.1",
|
||||||
"typescript": "^3.6.3"
|
"typescript": "^3.6.3"
|
||||||
},
|
},
|
||||||
"files": [
|
"typings": "typings/index.d.ts"
|
||||||
"index.js",
|
|
||||||
"typings/index.d.ts"
|
|
||||||
],
|
|
||||||
"homepage": "https://github.com/tj/commander.js#readme",
|
|
||||||
"keywords": [
|
|
||||||
"commander",
|
|
||||||
"command",
|
|
||||||
"option",
|
|
||||||
"parser"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"main": "index",
|
|
||||||
"name": "commander",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/tj/commander.js.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"lint": "eslint index.js",
|
|
||||||
"test": "node test/run.js && npm run test-typings",
|
|
||||||
"test-typings": "tsc -p tsconfig.json"
|
|
||||||
},
|
|
||||||
"typings": "typings/index.d.ts",
|
|
||||||
"version": "2.20.3"
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# lodash v4.17.20
|
# lodash v4.17.21
|
||||||
|
|
||||||
The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules.
|
The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules.
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ var at = require('lodash/at');
|
|||||||
var curryN = require('lodash/fp/curryN');
|
var curryN = require('lodash/fp/curryN');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/tree/4.17.20-npm) for more details.
|
See the [package source](https://github.com/lodash/lodash/tree/4.17.21-npm) for more details.
|
||||||
|
|
||||||
**Note:**<br>
|
**Note:**<br>
|
||||||
Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL.
|
Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL.
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
var undefined;
|
var undefined;
|
||||||
|
|
||||||
/** Used as the semantic version number. */
|
/** Used as the semantic version number. */
|
||||||
var VERSION = '4.17.20';
|
var VERSION = '4.17.21';
|
||||||
|
|
||||||
/** Error message constants. */
|
/** Error message constants. */
|
||||||
var FUNC_ERROR_TEXT = 'Expected a function';
|
var FUNC_ERROR_TEXT = 'Expected a function';
|
||||||
|
@ -3,28 +3,27 @@
|
|||||||
* Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
* Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
||||||
* Build: `lodash core -o ./dist/lodash.core.js`
|
* Build: `lodash core -o ./dist/lodash.core.js`
|
||||||
*/
|
*/
|
||||||
;(function(){function n(n,t){return n.push.apply(n,t),n}function t(n,t,r,e){for(var u=n.length,o=r+(e?1:-1);e?o--:++o<u;)if(t(n[o],o,n))return o;return-1}function r(n){return function(t){return null==t?nt:t[n]}}function e(n){return function(t){return null==n?nt:n[t]}}function u(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function o(n,t){return E(t,function(t){return n[t]})}function i(n,t){return function(r){return n(t(r))}}function c(n){return n instanceof f?n:new f(n)}function f(n,t){
|
;(function(){function n(n){return H(n)&&pn.call(n,"callee")&&!yn.call(n,"callee")}function t(n,t){return n.push.apply(n,t),n}function r(n){return function(t){return null==t?Z:t[n]}}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return j(t,function(t){return n[t]})}function o(n){return n instanceof i?n:new i(n)}function i(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function c(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");
|
||||||
this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function a(n,t,r){var e=n[t];Rt.call(n,t)&&wn(e,r)&&(r!==nt||t in n)||l(n,t,r)}function l(n,t,r){n[t]=r}function p(n,t,r){if(typeof n!="function")throw new TypeError(rt);return setTimeout(function(){n.apply(nt,r)},t)}function s(n,t){var r=true;return Ut(n,function(n,e,u){return r=!!t(n,e,u)}),r}function h(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===nt?i===i&&true:r(i,c)))var c=i,f=o}return f}function v(n,t){var r=[];
|
return setTimeout(function(){n.apply(Z,r)},t)}function f(n,t){var r=true;return mn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function a(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===Z?i===i:r(i,c)))var c=i,f=o}return f}function l(n,t){var r=[];return mn(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function p(n,r,e,u,o){var i=-1,c=n.length;for(e||(e=R),o||(o=[]);++i<c;){var f=n[i];0<r&&e(f)?1<r?p(f,r-1,e,u,o):t(o,f):u||(o[o.length]=f)}return o}function s(n,t){return n&&On(n,t,Dn);
|
||||||
return Ut(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function y(t,r,e,u,o){var i=-1,c=t.length;for(e||(e=H),o||(o=[]);++i<c;){var f=t[i];r>0&&e(f)?r>1?y(f,r-1,e,u,o):n(o,f):u||(o[o.length]=f)}return o}function g(n,t){return n&&Vt(n,t,cr)}function _(n,t){return v(t,function(t){return Tn(n[t])})}function b(n){return W(n)}function j(n,t){return n>t}function d(n){return In(n)&&b(n)==ht}function m(n,t,r,e,u){return n===t||(null==n||null==t||!In(n)&&!In(t)?n!==n&&t!==t:O(n,t,r,e,m,u))}function O(n,t,r,e,u,o){
|
}function h(n,t){return l(t,function(t){return U(n[t])})}function v(n,t){return n>t}function b(n,t,r,e,u){return n===t||(null==n||null==t||!H(n)&&!H(t)?n!==n&&t!==t:y(n,t,r,e,b,u))}function y(n,t,r,e,u,o){var i=Nn(n),c=Nn(t),f=i?"[object Array]":hn.call(n),a=c?"[object Array]":hn.call(t),f="[object Arguments]"==f?"[object Object]":f,a="[object Arguments]"==a?"[object Object]":a,l="[object Object]"==f,c="[object Object]"==a,a=f==a;o||(o=[]);var p=An(o,function(t){return t[0]==n}),s=An(o,function(n){
|
||||||
var i=Zt(n),c=Zt(t),f=i?lt:b(n),a=c?lt:b(t);f=f==at?bt:f,a=a==at?bt:a;var l=f==bt,p=a==bt,s=f==a;o||(o=[]);var h=Lt(o,function(t){return t[0]==n}),v=Lt(o,function(n){return n[0]==t});if(h&&v)return h[1]==t;if(o.push([n,t]),o.push([t,n]),s&&!l){var y=i?J(n,t,r,e,u,o):M(n,t,f,r,e,u,o);return o.pop(),y}if(!(r&et)){var g=l&&Rt.call(n,"__wrapped__"),_=p&&Rt.call(t,"__wrapped__");if(g||_){var j=g?n.value():n,d=_?t.value():t,y=u(j,d,r,e,o);return o.pop(),y}}if(!s)return false;var y=U(n,t,r,e,u,o);return o.pop(),
|
return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=T(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=J(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 1&r||(i=l&&pn.call(n,"__wrapped__"),f=c&&pn.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=B(n,t,r,e,u,o),o.pop(),r):(i=i?n.value():n,f=f?t.value():t,
|
||||||
y}function x(n){return In(n)&&b(n)==dt}function w(n){return typeof n=="function"?n:null==n?Hn:(typeof n=="object"?N:r)(n)}function A(n,t){return n<t}function E(n,t){var r=-1,e=An(n)?Array(n.length):[];return Ut(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function N(n){var t=Gt(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&m(n[u],r[u],et|ut)))return false}return true}}function k(n,t){return n=Object(n),gn(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}
|
r=u(i,f,r,e,o),o.pop(),r)}function g(n){return typeof n=="function"?n:null==n?X:(typeof n=="object"?d:r)(n)}function _(n,t){return n<t}function j(n,t){var r=-1,e=M(n)?Array(n.length):[];return mn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function d(n){var t=_n(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&b(n[u],r[u],3)))return false}return true}}function m(n,t){return n=Object(n),C(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function O(n){return xn(I(n,void 0,X),n+"");
|
||||||
function F(n,t){return Kt(X(n,t,Hn),n+"")}function T(n,t,r){var e=-1,u=n.length;t<0&&(t=-t>u?0:u+t),r=r>u?u:r,r<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(u);++e<u;)o[e]=n[e+t];return o}function S(n){return T(n,0,n.length)}function B(n,t){var r;return Ut(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function I(t,r){var e=t;return gn(r,function(t,r){return r.func.apply(r.thisArg,n([t],r.args))},e)}function R(n,t){if(n!==t){var r=n!==nt,e=null===n,u=n===n,o=false,i=t!==nt,c=null===t,f=t===t,a=false;if(!c&&!a&&!o&&n>t||o&&i&&f&&!c&&!a||e&&i&&f||!r&&f||!u)return 1;
|
}function x(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function A(n){return x(n,0,n.length)}function E(n,t){var r;return mn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function w(n,r){return C(r,function(n,r){return r.func.apply(r.thisArg,t([n],r.args))},n)}function k(n,t,r){var e=!r;r||(r={});for(var u=-1,o=t.length;++u<o;){var i=t[u],c=Z;if(c===Z&&(c=n[i]),e)r[i]=c;else{var f=r,a=f[i];pn.call(f,i)&&J(a,c)&&(c!==Z||i in f)||(f[i]=c);
|
||||||
if(!e&&!o&&!a&&n<t||a&&r&&u&&!e&&!o||c&&r&&u||!i&&u||!f)return-1}return 0}function $(n,t,r,e){var u=!r;r||(r={});for(var o=-1,i=t.length;++o<i;){var c=t[o],f=e?e(r[c],n[c],c,r,n):nt;f===nt&&(f=n[c]),u?l(r,c,f):a(r,c,f)}return r}function q(n){return F(function(t,r){var e=-1,u=r.length,o=u>1?r[u-1]:nt;for(o=n.length>3&&typeof o=="function"?(u--,o):nt,t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function D(n,t){return function(r,e){if(null==r)return r;if(!An(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&e(i[o],o,i)!==false;);
|
}}return r}function N(n){return O(function(t,r){var e=-1,u=r.length,o=1<u?r[u-1]:Z,o=3<n.length&&typeof o=="function"?(u--,o):Z;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function F(n){return function(){var t=arguments,r=dn(n.prototype),t=n.apply(r,t);return V(t)?t:r}}function S(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==on&&this instanceof e?u:n;++c<f;)a[c]=r[c];for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");
|
||||||
return r}}function P(n){return function(t,r,e){for(var u=-1,o=Object(t),i=e(t),c=i.length;c--;){var f=i[n?c:++u];if(r(o[f],f,o)===false)break}return t}}function z(n){return function(){var t=arguments,r=Mt(n.prototype),e=n.apply(r,t);return Bn(e)?e:r}}function C(n){return function(t,r,e){var u=Object(t);if(!An(t)){var o=w(r,3);t=cr(t),r=function(n){return o(u[n],n,u)}}var i=n(t,r,e);return i>-1?u[o?t[i]:i]:nt}}function G(n,t,r,e){function u(){for(var t=-1,c=arguments.length,f=-1,a=e.length,l=Array(a+c),p=this&&this!==kt&&this instanceof u?i:n;++f<a;)l[f]=e[f];
|
var u=F(n);return e}function T(n,t,r,e,u,o){var i=n.length,c=t.length;if(i!=c&&!(1&r&&c>i))return false;var c=o.get(n),f=o.get(t);if(c&&f)return c==t&&f==n;for(var c=-1,f=true,a=2&r?[]:Z;++c<i;){var l=n[c],p=t[c];if(void 0!==Z){f=false;break}if(a){if(!E(t,function(n,t){if(!P(a,t)&&(l===n||u(l,n,r,e,o)))return a.push(t)})){f=false;break}}else if(l!==p&&!u(l,p,r,e,o)){f=false;break}}return f}function B(n,t,r,e,u,o){var i=1&r,c=Dn(n),f=c.length,a=Dn(t).length;if(f!=a&&!i)return false;for(a=f;a--;){var l=c[a];if(!(i?l in t:pn.call(t,l)))return false;
|
||||||
for(;c--;)l[f++]=arguments[++t];return p.apply(o?r:this,l)}if(typeof n!="function")throw new TypeError(rt);var o=t&ot,i=z(n);return u}function J(n,t,r,e,u,o){var i=r&et,c=n.length,f=t.length;if(c!=f&&!(i&&f>c))return false;var a=o.get(n),l=o.get(t);if(a&&l)return a==t&&l==n;for(var p=-1,s=true,h=r&ut?[]:nt;++p<c;){var v,y=n[p],g=t[p];if(v!==nt){if(v)continue;s=false;break}if(h){if(!B(t,function(n,t){if(!un(h,t)&&(y===n||u(y,n,r,e,o)))return h.push(t)})){s=false;break}}else if(y!==g&&!u(y,g,r,e,o)){s=false;break;
|
}var p=o.get(n),l=o.get(t);if(p&&l)return p==t&&l==n;for(p=true;++a<f;){var l=c[a],s=n[l],h=t[l];if(void 0!==Z||s!==h&&!u(s,h,r,e,o)){p=false;break}i||(i="constructor"==l)}return p&&!i&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(p=false)),p}function R(t){return Nn(t)||n(t)}function D(n){var t=[];if(null!=n)for(var r in Object(n))t.push(r);return t}function I(n,t,r){return t=jn(t===Z?n.length-1:t,0),
|
||||||
}}return s}function M(n,t,r,e,u,o,i){switch(r){case st:case ht:case _t:return wn(+n,+t);case vt:return n.name==t.name&&n.message==t.message;case dt:case mt:return n==t+""}return false}function U(n,t,r,e,u,o){var i=r&et,c=cr(n),f=c.length;if(f!=cr(t).length&&!i)return false;for(var a=f;a--;){var l=c[a];if(!(i?l in t:Rt.call(t,l)))return false}var p=o.get(n),s=o.get(t);if(p&&s)return p==t&&s==n;for(var h=true,v=i;++a<f;){l=c[a];var y,g=n[l],_=t[l];if(!(y===nt?g===_||u(g,_,r,e,o):y)){h=false;break}v||(v="constructor"==l);
|
function(){for(var e=arguments,u=-1,o=jn(e.length-t,0),i=Array(o);++u<o;)i[u]=e[t+u];for(u=-1,o=Array(t+1);++u<t;)o[u]=e[u];return o[t]=r(i),n.apply(this,o)}}function $(n){return(null==n?0:n.length)?p(n,1):[]}function q(n){return n&&n.length?n[0]:Z}function P(n,t,r){var e=null==n?0:n.length;r=typeof r=="number"?0>r?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1}function z(n,t){return mn(n,g(t))}function C(n,t,r){return e(n,g(t),r,3>arguments.length,mn);
|
||||||
}if(h&&!v){var b=n.constructor,j=t.constructor;b!=j&&"constructor"in n&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof j=="function"&&j instanceof j)&&(h=false)}return h}function V(n){return Kt(X(n,nt,tn),n+"")}function H(n){return Zt(n)||Yt(n)}function K(n,t){var r=typeof n;return t=null==t?ft:t,!!t&&("number"==r||"symbol"!=r&&wt.test(n))&&n>-1&&n%1==0&&n<t}function L(n,t,r){if(!Bn(r))return false;var e=typeof t;return!!("number"==e?An(r)&&K(t,r.length):"string"==e&&t in r)&&wn(r[t],n);
|
}function G(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Fn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=Z),r}}function J(n,t){return n===t||n!==n&&t!==t}function M(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1<t&&0==t%1&&9007199254740991>=t),t&&!U(n)}function U(n){return!!V(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function V(n){var t=typeof n;
|
||||||
}function Q(n){var t=[];if(null!=n)for(var r in Object(n))t.push(r);return t}function W(n){return qt.call(n)}function X(n,t,r){return t=Jt(t===nt?n.length-1:t,0),function(){for(var e=arguments,u=-1,o=Jt(e.length-t,0),i=Array(o);++u<o;)i[u]=e[t+u];u=-1;for(var c=Array(t+1);++u<t;)c[u]=e[u];return c[t]=r(i),n.apply(this,c)}}function Y(n){return v(n,Boolean)}function Z(){var t=arguments.length;if(!t)return[];for(var r=Array(t-1),e=arguments[0],u=t;u--;)r[u-1]=arguments[u];return n(Zt(e)?S(e):[e],y(r,1));
|
return null!=n&&("object"==t||"function"==t)}function H(n){return null!=n&&typeof n=="object"}function K(n){return typeof n=="number"||H(n)&&"[object Number]"==hn.call(n)}function L(n){return typeof n=="string"||!Nn(n)&&H(n)&&"[object String]"==hn.call(n)}function Q(n){return typeof n=="string"?n:null==n?"":n+""}function W(n){return null==n?[]:u(n,Dn(n))}function X(n){return n}function Y(n,r,e){var u=Dn(r),o=h(r,u);null!=e||V(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=h(r,Dn(r)));var i=!(V(e)&&"chain"in e&&!e.chain),c=U(n);
|
||||||
}function nn(n,r,e){var u=null==n?0:n.length;if(!u)return-1;var o=null==e?0:rr(e);return o<0&&(o=Jt(u+o,0)),t(n,w(r,3),o)}function tn(n){return(null==n?0:n.length)?y(n,1):[]}function rn(n){return(null==n?0:n.length)?y(n,ct):[]}function en(n){return n&&n.length?n[0]:nt}function un(n,t,r){var e=null==n?0:n.length;r=typeof r=="number"?r<0?Jt(e+r,0):r:0;for(var u=(r||0)-1,o=t===t;++u<e;){var i=n[u];if(o?i===t:i!==i)return u}return-1}function on(n){var t=null==n?0:n.length;return t?n[t-1]:nt}function cn(n,t,r){
|
return mn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=n(this.__wrapped__);return(e.__actions__=A(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var Z,nn=1/0,tn=/[&<>"']/g,rn=RegExp(tn.source),en=/^(?:0|[1-9]\d*)$/,un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){
|
||||||
var e=null==n?0:n.length;return t=null==t?0:+t,r=r===nt?e:+r,e?T(n,t,r):[]}function fn(n){var t=c(n);return t.__chain__=true,t}function an(n,t){return t(n),n}function ln(n,t){return t(n)}function pn(){return I(this.__wrapped__,this.__actions__)}function sn(n,t,r){return t=r?nt:t,s(n,w(t))}function hn(n,t){return v(n,w(t))}function vn(n,t){return Ut(n,w(t))}function yn(n,t){return E(n,w(t))}function gn(n,t,r){return u(n,w(t),r,arguments.length<3,Ut)}function _n(n){return null==n?0:(n=An(n)?n:Gt(n),n.length);
|
return function(t){return null==n?Z:n[t]}}({"&":"&","<":"<",">":">",'"':""","'":"'"}),an=Array.prototype,ln=Object.prototype,pn=ln.hasOwnProperty,sn=0,hn=ln.toString,vn=on._,bn=Object.create,yn=ln.propertyIsEnumerable,gn=on.isFinite,_n=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),jn=Math.max,dn=function(){function n(){}return function(t){return V(t)?bn?bn(t):(n.prototype=t,t=new n,n.prototype=Z,t):{}}}();i.prototype=dn(o.prototype),i.prototype.constructor=i;
|
||||||
}function bn(n,t,r){return t=r?nt:t,B(n,w(t))}function jn(n,t){var e=0;return t=w(t),E(E(n,function(n,r,u){return{value:n,index:e++,criteria:t(n,r,u)}}).sort(function(n,t){return R(n.criteria,t.criteria)||n.index-t.index}),r("value"))}function dn(n,t){var r;if(typeof t!="function")throw new TypeError(rt);return n=rr(n),function(){return--n>0&&(r=t.apply(this,arguments)),n<=1&&(t=nt),r}}function mn(n){if(typeof n!="function")throw new TypeError(rt);return function(){return!n.apply(this,arguments)};
|
var mn=function(n,t){return function(r,e){if(null==r)return r;if(!M(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(s),On=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}(),xn=X,An=function(n){return function(t,r,e){var u=Object(t);if(!M(t)){var o=g(r);t=Dn(t),r=function(n){return o(u[n],n,u)}}return r=n(t,r,e),-1<r?u[o?t[r]:r]:Z}}(function(n,t,r){var e=null==n?0:n.length;
|
||||||
}function On(n){return dn(2,n)}function xn(n){return Bn(n)?Zt(n)?S(n):$(n,Gt(n)):n}function wn(n,t){return n===t||n!==n&&t!==t}function An(n){return null!=n&&Sn(n.length)&&!Tn(n)}function En(n){return n===true||n===false||In(n)&&b(n)==st}function Nn(n){return An(n)&&(Zt(n)||Dn(n)||Tn(n.splice)||Yt(n))?!n.length:!Gt(n).length}function kn(n,t){return m(n,t)}function Fn(n){return typeof n=="number"&&Ct(n)}function Tn(n){if(!Bn(n))return false;var t=b(n);return t==yt||t==gt||t==pt||t==jt}function Sn(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=ft;
|
if(!e)return-1;r=null==r?0:Fn(r),0>r&&(r=jn(e+r,0));n:{for(t=g(t),e=n.length,r+=-1;++r<e;)if(t(n[r],r,n)){n=r;break n}n=-1}return n}),En=O(function(n,t,r){return S(n,t,r)}),wn=O(function(n,t){return c(n,1,t)}),kn=O(function(n,t,r){return c(n,Sn(t)||0,r)}),Nn=Array.isArray,Fn=Number,Sn=Number,Tn=N(function(n,t){k(t,_n(t),n)}),Bn=N(function(n,t){k(t,D(t),n)}),Rn=O(function(n,t){n=Object(n);var r,e=-1,u=t.length,o=2<u?t[2]:Z;if(r=o){r=t[0];var i=t[1];if(V(o)){var c=typeof i;if("number"==c){if(c=M(o))var c=o.length,f=typeof i,c=null==c?9007199254740991:c,c=!!c&&("number"==f||"symbol"!=f&&en.test(i))&&-1<i&&0==i%1&&i<c;
|
||||||
}function Bn(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function In(n){return null!=n&&typeof n=="object"}function Rn(n){return qn(n)&&n!=+n}function $n(n){return null===n}function qn(n){return typeof n=="number"||In(n)&&b(n)==_t}function Dn(n){return typeof n=="string"||!Zt(n)&&In(n)&&b(n)==mt}function Pn(n){return n===nt}function zn(n){return An(n)?n.length?S(n):[]:Un(n)}function Cn(n){return typeof n=="string"?n:null==n?"":n+""}function Gn(n,t){var r=Mt(n);return null==t?r:ur(r,t);
|
}else c="string"==c&&i in o;r=!!c&&J(o[i],r)}else r=false}for(r&&(u=1);++e<u;)for(o=t[e],r=In(o),i=-1,c=r.length;++i<c;){var f=r[i],a=n[f];(a===Z||J(a,ln[f])&&!pn.call(n,f))&&(n[f]=o[f])}return n}),Dn=_n,In=D,$n=function(n){return xn(I(n,Z,$),n+"")}(function(n,t){return null==n?{}:m(n,t)});o.assignIn=Bn,o.before=G,o.bind=En,o.chain=function(n){return n=o(n),n.__chain__=true,n},o.compact=function(n){return l(n,Boolean)},o.concat=function(){var n=arguments.length;if(!n)return[];for(var r=Array(n-1),e=arguments[0];n--;)r[n-1]=arguments[n];
|
||||||
}function Jn(n,t){return null!=n&&Rt.call(n,t)}function Mn(n,t,r){var e=null==n?nt:n[t];return e===nt&&(e=r),Tn(e)?e.call(n):e}function Un(n){return null==n?[]:o(n,cr(n))}function Vn(n){return n=Cn(n),n&&xt.test(n)?n.replace(Ot,St):n}function Hn(n){return n}function Kn(n){return N(ur({},n))}function Ln(t,r,e){var u=cr(r),o=_(r,u);null!=e||Bn(r)&&(o.length||!u.length)||(e=r,r=t,t=this,o=_(r,cr(r)));var i=!(Bn(e)&&"chain"in e&&!e.chain),c=Tn(t);return Ut(o,function(e){var u=r[e];t[e]=u,c&&(t.prototype[e]=function(){
|
return t(Nn(e)?A(e):[e],p(r,1))},o.create=function(n,t){var r=dn(n);return null==t?r:Tn(r,t)},o.defaults=Rn,o.defer=wn,o.delay=kn,o.filter=function(n,t){return l(n,g(t))},o.flatten=$,o.flattenDeep=function(n){return(null==n?0:n.length)?p(n,nn):[]},o.iteratee=g,o.keys=Dn,o.map=function(n,t){return j(n,g(t))},o.matches=function(n){return d(Tn({},n))},o.mixin=Y,o.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},o.once=function(n){
|
||||||
var r=this.__chain__;if(i||r){var e=t(this.__wrapped__);return(e.__actions__=S(this.__actions__)).push({func:u,args:arguments,thisArg:t}),e.__chain__=r,e}return u.apply(t,n([this.value()],arguments))})}),t}function Qn(){return kt._===this&&(kt._=Dt),this}function Wn(){}function Xn(n){var t=++$t;return Cn(n)+t}function Yn(n){return n&&n.length?h(n,Hn,j):nt}function Zn(n){return n&&n.length?h(n,Hn,A):nt}var nt,tt="4.17.20",rt="Expected a function",et=1,ut=2,ot=1,it=32,ct=1/0,ft=9007199254740991,at="[object Arguments]",lt="[object Array]",pt="[object AsyncFunction]",st="[object Boolean]",ht="[object Date]",vt="[object Error]",yt="[object Function]",gt="[object GeneratorFunction]",_t="[object Number]",bt="[object Object]",jt="[object Proxy]",dt="[object RegExp]",mt="[object String]",Ot=/[&<>"']/g,xt=RegExp(Ot.source),wt=/^(?:0|[1-9]\d*)$/,At={
|
return G(2,n)},o.pick=$n,o.slice=function(n,t,r){var e=null==n?0:n.length;return r=r===Z?e:+r,e?x(n,null==t?0:+t,r):[]},o.sortBy=function(n,t){var e=0;return t=g(t),j(j(n,function(n,r,u){return{value:n,index:e++,criteria:t(n,r,u)}}).sort(function(n,t){var r;n:{r=n.criteria;var e=t.criteria;if(r!==e){var u=r!==Z,o=null===r,i=r===r,c=e!==Z,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r<e||f&&u&&i||!c&&i||!a){r=-1;break n}}r=0}return r||n.index-t.index}),r("value"))},o.tap=function(n,t){
|
||||||
"&":"&","<":"<",">":">",'"':""","'":"'"},Et=typeof global=="object"&&global&&global.Object===Object&&global,Nt=typeof self=="object"&&self&&self.Object===Object&&self,kt=Et||Nt||Function("return this")(),Ft=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Tt=Ft&&typeof module=="object"&&module&&!module.nodeType&&module,St=e(At),Bt=Array.prototype,It=Object.prototype,Rt=It.hasOwnProperty,$t=0,qt=It.toString,Dt=kt._,Pt=Object.create,zt=It.propertyIsEnumerable,Ct=kt.isFinite,Gt=i(Object.keys,Object),Jt=Math.max,Mt=function(){
|
return t(n),n},o.thru=function(n,t){return t(n)},o.toArray=function(n){return M(n)?n.length?A(n):[]:W(n)},o.values=W,o.extend=Bn,Y(o,o),o.clone=function(n){return V(n)?Nn(n)?A(n):k(n,_n(n)):n},o.escape=function(n){return(n=Q(n))&&rn.test(n)?n.replace(tn,fn):n},o.every=function(n,t,r){return t=r?Z:t,f(n,g(t))},o.find=An,o.forEach=z,o.has=function(n,t){return null!=n&&pn.call(n,t)},o.head=q,o.identity=X,o.indexOf=P,o.isArguments=n,o.isArray=Nn,o.isBoolean=function(n){return true===n||false===n||H(n)&&"[object Boolean]"==hn.call(n);
|
||||||
function n(){}return function(t){if(!Bn(t))return{};if(Pt)return Pt(t);n.prototype=t;var r=new n;return n.prototype=nt,r}}();f.prototype=Mt(c.prototype),f.prototype.constructor=f;var Ut=D(g),Vt=P(),Ht=Wn,Kt=Hn,Lt=C(nn),Qt=F(function(n,t,r){return G(n,ot|it,t,r)}),Wt=F(function(n,t){return p(n,1,t)}),Xt=F(function(n,t,r){return p(n,er(t)||0,r)}),Yt=Ht(function(){return arguments}())?Ht:function(n){return In(n)&&Rt.call(n,"callee")&&!zt.call(n,"callee")},Zt=Array.isArray,nr=d,tr=x,rr=Number,er=Number,ur=q(function(n,t){
|
},o.isDate=function(n){return H(n)&&"[object Date]"==hn.call(n)},o.isEmpty=function(t){return M(t)&&(Nn(t)||L(t)||U(t.splice)||n(t))?!t.length:!_n(t).length},o.isEqual=function(n,t){return b(n,t)},o.isFinite=function(n){return typeof n=="number"&&gn(n)},o.isFunction=U,o.isNaN=function(n){return K(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=K,o.isObject=V,o.isRegExp=function(n){return H(n)&&"[object RegExp]"==hn.call(n)},o.isString=L,o.isUndefined=function(n){return n===Z},o.last=function(n){
|
||||||
$(t,Gt(t),n)}),or=q(function(n,t){$(t,Q(t),n)}),ir=F(function(n,t){n=Object(n);var r=-1,e=t.length,u=e>2?t[2]:nt;for(u&&L(t[0],t[1],u)&&(e=1);++r<e;)for(var o=t[r],i=fr(o),c=-1,f=i.length;++c<f;){var a=i[c],l=n[a];(l===nt||wn(l,It[a])&&!Rt.call(n,a))&&(n[a]=o[a])}return n}),cr=Gt,fr=Q,ar=V(function(n,t){return null==n?{}:k(n,t)}),lr=w;c.assignIn=or,c.before=dn,c.bind=Qt,c.chain=fn,c.compact=Y,c.concat=Z,c.create=Gn,c.defaults=ir,c.defer=Wt,c.delay=Xt,c.filter=hn,c.flatten=tn,c.flattenDeep=rn,c.iteratee=lr,
|
var t=null==n?0:n.length;return t?n[t-1]:Z},o.max=function(n){return n&&n.length?a(n,X,v):Z},o.min=function(n){return n&&n.length?a(n,X,_):Z},o.noConflict=function(){return on._===this&&(on._=vn),this},o.noop=function(){},o.reduce=C,o.result=function(n,t,r){return t=null==n?Z:n[t],t===Z&&(t=r),U(t)?t.call(n):t},o.size=function(n){return null==n?0:(n=M(n)?n:_n(n),n.length)},o.some=function(n,t,r){return t=r?Z:t,E(n,g(t))},o.uniqueId=function(n){var t=++sn;return Q(n)+t},o.each=z,o.first=q,Y(o,function(){
|
||||||
c.keys=cr,c.map=yn,c.matches=Kn,c.mixin=Ln,c.negate=mn,c.once=On,c.pick=ar,c.slice=cn,c.sortBy=jn,c.tap=an,c.thru=ln,c.toArray=zn,c.values=Un,c.extend=or,Ln(c,c),c.clone=xn,c.escape=Vn,c.every=sn,c.find=Lt,c.forEach=vn,c.has=Jn,c.head=en,c.identity=Hn,c.indexOf=un,c.isArguments=Yt,c.isArray=Zt,c.isBoolean=En,c.isDate=nr,c.isEmpty=Nn,c.isEqual=kn,c.isFinite=Fn,c.isFunction=Tn,c.isNaN=Rn,c.isNull=$n,c.isNumber=qn,c.isObject=Bn,c.isRegExp=tr,c.isString=Dn,c.isUndefined=Pn,c.last=on,c.max=Yn,c.min=Zn,
|
var n={};return s(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.17.21",mn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:an)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);o.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Nn(u)?u:[],n)}return this[r](function(r){return t.apply(Nn(r)?r:[],n);
|
||||||
c.noConflict=Qn,c.noop=Wn,c.reduce=gn,c.result=Mn,c.size=_n,c.some=bn,c.uniqueId=Xn,c.each=vn,c.first=en,Ln(c,function(){var n={};return g(c,function(t,r){Rt.call(c.prototype,r)||(n[r]=t)}),n}(),{chain:false}),c.VERSION=tt,Ut(["pop","join","replace","reverse","split","push","shift","sort","splice","unshift"],function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:Bt)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);c.prototype[n]=function(){var n=arguments;
|
})}}),o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=function(){return w(this.__wrapped__,this.__actions__)},typeof define=="function"&&typeof define.amd=="object"&&define.amd?(on._=o, define(function(){return o})):cn?((cn.exports=o)._=o,un._=o):on._=o}).call(this);
|
||||||
if(e&&!this.__chain__){var u=this.value();return t.apply(Zt(u)?u:[],n)}return this[r](function(r){return t.apply(Zt(r)?r:[],n)})}}),c.prototype.toJSON=c.prototype.valueOf=c.prototype.value=pn,typeof define=="function"&&typeof define.amd=="object"&&define.amd?(kt._=c, define(function(){return c})):Tt?((Tt.exports=c)._=c,Ft._=c):kt._=c}).call(this);
|
|
@ -12,14 +12,15 @@
|
|||||||
var undefined;
|
var undefined;
|
||||||
|
|
||||||
/** Used as the semantic version number. */
|
/** Used as the semantic version number. */
|
||||||
var VERSION = '4.17.20';
|
var VERSION = '4.17.21';
|
||||||
|
|
||||||
/** Used as the size to enable large array optimizations. */
|
/** Used as the size to enable large array optimizations. */
|
||||||
var LARGE_ARRAY_SIZE = 200;
|
var LARGE_ARRAY_SIZE = 200;
|
||||||
|
|
||||||
/** Error message constants. */
|
/** Error message constants. */
|
||||||
var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
|
var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
|
||||||
FUNC_ERROR_TEXT = 'Expected a function';
|
FUNC_ERROR_TEXT = 'Expected a function',
|
||||||
|
INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
|
||||||
|
|
||||||
/** Used to stand-in for `undefined` hash values. */
|
/** Used to stand-in for `undefined` hash values. */
|
||||||
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
||||||
@ -152,10 +153,11 @@
|
|||||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
|
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
|
||||||
reHasRegExpChar = RegExp(reRegExpChar.source);
|
reHasRegExpChar = RegExp(reRegExpChar.source);
|
||||||
|
|
||||||
/** Used to match leading and trailing whitespace. */
|
/** Used to match leading whitespace. */
|
||||||
var reTrim = /^\s+|\s+$/g,
|
var reTrimStart = /^\s+/;
|
||||||
reTrimStart = /^\s+/,
|
|
||||||
reTrimEnd = /\s+$/;
|
/** Used to match a single whitespace character. */
|
||||||
|
var reWhitespace = /\s/;
|
||||||
|
|
||||||
/** Used to match wrap detail comments. */
|
/** Used to match wrap detail comments. */
|
||||||
var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
|
var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
|
||||||
@ -165,6 +167,18 @@
|
|||||||
/** Used to match words composed of alphanumeric characters. */
|
/** Used to match words composed of alphanumeric characters. */
|
||||||
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to validate the `validate` option in `_.template` variable.
|
||||||
|
*
|
||||||
|
* Forbids characters which could potentially change the meaning of the function argument definition:
|
||||||
|
* - "()," (modification of function parameters)
|
||||||
|
* - "=" (default value)
|
||||||
|
* - "[]{}" (destructuring of function parameters)
|
||||||
|
* - "/" (beginning of a comment)
|
||||||
|
* - whitespace
|
||||||
|
*/
|
||||||
|
var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
|
||||||
|
|
||||||
/** Used to match backslashes in property paths. */
|
/** Used to match backslashes in property paths. */
|
||||||
var reEscapeChar = /\\(\\)?/g;
|
var reEscapeChar = /\\(\\)?/g;
|
||||||
|
|
||||||
@ -993,6 +1007,19 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.trim`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {string} string The string to trim.
|
||||||
|
* @returns {string} Returns the trimmed string.
|
||||||
|
*/
|
||||||
|
function baseTrim(string) {
|
||||||
|
return string
|
||||||
|
? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
|
||||||
|
: string;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.unary` without support for storing metadata.
|
* The base implementation of `_.unary` without support for storing metadata.
|
||||||
*
|
*
|
||||||
@ -1326,6 +1353,21 @@
|
|||||||
: asciiToArray(string);
|
: asciiToArray(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
|
||||||
|
* character of `string`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {string} string The string to inspect.
|
||||||
|
* @returns {number} Returns the index of the last non-whitespace character.
|
||||||
|
*/
|
||||||
|
function trimmedEndIndex(string) {
|
||||||
|
var index = string.length;
|
||||||
|
|
||||||
|
while (index-- && reWhitespace.test(string.charAt(index))) {}
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used by `_.unescape` to convert HTML entities to characters.
|
* Used by `_.unescape` to convert HTML entities to characters.
|
||||||
*
|
*
|
||||||
@ -12494,7 +12536,7 @@
|
|||||||
if (typeof value != 'string') {
|
if (typeof value != 'string') {
|
||||||
return value === 0 ? value : +value;
|
return value === 0 ? value : +value;
|
||||||
}
|
}
|
||||||
value = value.replace(reTrim, '');
|
value = baseTrim(value);
|
||||||
var isBinary = reIsBinary.test(value);
|
var isBinary = reIsBinary.test(value);
|
||||||
return (isBinary || reIsOctal.test(value))
|
return (isBinary || reIsOctal.test(value))
|
||||||
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
||||||
@ -14866,6 +14908,12 @@
|
|||||||
if (!variable) {
|
if (!variable) {
|
||||||
source = 'with (obj) {\n' + source + '\n}\n';
|
source = 'with (obj) {\n' + source + '\n}\n';
|
||||||
}
|
}
|
||||||
|
// Throw an error if a forbidden character was found in `variable`, to prevent
|
||||||
|
// potential command injection attacks.
|
||||||
|
else if (reForbiddenIdentifierChars.test(variable)) {
|
||||||
|
throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
|
||||||
|
}
|
||||||
|
|
||||||
// Cleanup code by stripping empty strings.
|
// Cleanup code by stripping empty strings.
|
||||||
source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
|
source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
|
||||||
.replace(reEmptyStringMiddle, '$1')
|
.replace(reEmptyStringMiddle, '$1')
|
||||||
@ -14979,7 +15027,7 @@
|
|||||||
function trim(string, chars, guard) {
|
function trim(string, chars, guard) {
|
||||||
string = toString(string);
|
string = toString(string);
|
||||||
if (string && (guard || chars === undefined)) {
|
if (string && (guard || chars === undefined)) {
|
||||||
return string.replace(reTrim, '');
|
return baseTrim(string);
|
||||||
}
|
}
|
||||||
if (!string || !(chars = baseToString(chars))) {
|
if (!string || !(chars = baseToString(chars))) {
|
||||||
return string;
|
return string;
|
||||||
@ -15014,7 +15062,7 @@
|
|||||||
function trimEnd(string, chars, guard) {
|
function trimEnd(string, chars, guard) {
|
||||||
string = toString(string);
|
string = toString(string);
|
||||||
if (string && (guard || chars === undefined)) {
|
if (string && (guard || chars === undefined)) {
|
||||||
return string.replace(reTrimEnd, '');
|
return string.slice(0, trimmedEndIndex(string) + 1);
|
||||||
}
|
}
|
||||||
if (!string || !(chars = baseToString(chars))) {
|
if (!string || !(chars = baseToString(chars))) {
|
||||||
return string;
|
return string;
|
||||||
|
@ -8,132 +8,133 @@
|
|||||||
*/
|
*/
|
||||||
(function(){function n(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function t(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function r(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&t(n[r],r,n)!==!1;);return n}function e(n,t){for(var r=null==n?0:n.length;r--&&t(n[r],r,n)!==!1;);return n}function u(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return!1;
|
(function(){function n(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function t(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function r(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&t(n[r],r,n)!==!1;);return n}function e(n,t){for(var r=null==n?0:n.length;r--&&t(n[r],r,n)!==!1;);return n}function u(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return!1;
|
||||||
return!0}function i(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function o(n,t){return!!(null==n?0:n.length)&&y(n,t,0)>-1}function f(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return!0;return!1}function c(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function a(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function l(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);
|
return!0}function i(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function o(n,t){return!!(null==n?0:n.length)&&y(n,t,0)>-1}function f(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return!0;return!1}function c(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function a(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function l(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);
|
||||||
return r}function s(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function h(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return!0;return!1}function p(n){return n.split("")}function _(n){return n.match(Bt)||[]}function v(n,t,r){var e;return r(n,function(n,r,u){if(t(n,r,u))return e=r,!1}),e}function g(n,t,r,e){for(var u=n.length,i=r+(e?1:-1);e?i--:++i<u;)if(t(n[i],i,n))return i;return-1}function y(n,t,r){return t===t?q(n,t,r):g(n,b,r)}function d(n,t,r,e){
|
return r}function s(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function h(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return!0;return!1}function p(n){return n.split("")}function _(n){return n.match($t)||[]}function v(n,t,r){var e;return r(n,function(n,r,u){if(t(n,r,u))return e=r,!1}),e}function g(n,t,r,e){for(var u=n.length,i=r+(e?1:-1);e?i--:++i<u;)if(t(n[i],i,n))return i;return-1}function y(n,t,r){return t===t?Z(n,t,r):g(n,b,r)}function d(n,t,r,e){
|
||||||
for(var u=r-1,i=n.length;++u<i;)if(e(n[u],t))return u;return-1}function b(n){return n!==n}function w(n,t){var r=null==n?0:n.length;return r?k(n,t)/r:Sn}function m(n){return function(t){return null==t?Y:t[n]}}function x(n){return function(t){return null==n?Y:n[t]}}function j(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=!1,n):t(r,n,u,i)}),r}function A(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].value;return n}function k(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==Y&&(r=r===Y?i:r+i);
|
for(var u=r-1,i=n.length;++u<i;)if(e(n[u],t))return u;return-1}function b(n){return n!==n}function w(n,t){var r=null==n?0:n.length;return r?k(n,t)/r:Cn}function m(n){return function(t){return null==t?X:t[n]}}function x(n){return function(t){return null==n?X:n[t]}}function j(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=!1,n):t(r,n,u,i)}),r}function A(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].value;return n}function k(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==X&&(r=r===X?i:r+i);
|
||||||
}return r}function O(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function I(n,t){return c(t,function(t){return[t,n[t]]})}function R(n){return function(t){return n(t)}}function z(n,t){return c(t,function(t){return n[t]})}function E(n,t){return n.has(t)}function S(n,t){for(var r=-1,e=n.length;++r<e&&y(t,n[r],0)>-1;);return r}function W(n,t){for(var r=n.length;r--&&y(t,n[r],0)>-1;);return r}function L(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;return e}function C(n){return"\\"+Gr[n]}function U(n,t){
|
}return r}function O(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function I(n,t){return c(t,function(t){return[t,n[t]]})}function R(n){return n?n.slice(0,H(n)+1).replace(Lt,""):n}function z(n){return function(t){return n(t)}}function E(n,t){return c(t,function(t){return n[t]})}function S(n,t){return n.has(t)}function W(n,t){for(var r=-1,e=n.length;++r<e&&y(t,n[r],0)>-1;);return r}function L(n,t){for(var r=n.length;r--&&y(t,n[r],0)>-1;);return r}function C(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;
|
||||||
return null==n?Y:n[t]}function B(n){return Dr.test(n)}function T(n){return Mr.test(n)}function $(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function D(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function M(n,t){return function(r){return n(t(r))}}function F(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r];o!==t&&o!==un||(n[r]=un,i[u++]=r)}return i}function N(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}function P(n){
|
return e}function U(n){return"\\"+Yr[n]}function B(n,t){return null==n?X:n[t]}function T(n){return Nr.test(n)}function $(n){return Pr.test(n)}function D(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function M(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function F(n,t){return function(r){return n(t(r))}}function N(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r];o!==t&&o!==cn||(n[r]=cn,i[u++]=r)}return i}function P(n){var t=-1,r=Array(n.size);
|
||||||
var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function q(n,t,r){for(var e=r-1,u=n.length;++e<u;)if(n[e]===t)return e;return-1}function Z(n,t,r){for(var e=r+1;e--;)if(n[e]===t)return e;return e}function K(n){return B(n)?G(n):se(n)}function V(n){return B(n)?H(n):p(n)}function G(n){for(var t=Tr.lastIndex=0;Tr.test(n);)++t;return t}function H(n){return n.match(Tr)||[]}function J(n){return n.match($r)||[]}var Y,Q="4.17.20",X=200,nn="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",tn="Expected a function",rn="__lodash_hash_undefined__",en=500,un="__lodash_placeholder__",on=1,fn=2,cn=4,an=1,ln=2,sn=1,hn=2,pn=4,_n=8,vn=16,gn=32,yn=64,dn=128,bn=256,wn=512,mn=30,xn="...",jn=800,An=16,kn=1,On=2,In=3,Rn=1/0,zn=9007199254740991,En=1.7976931348623157e308,Sn=NaN,Wn=4294967295,Ln=Wn-1,Cn=Wn>>>1,Un=[["ary",dn],["bind",sn],["bindKey",hn],["curry",_n],["curryRight",vn],["flip",wn],["partial",gn],["partialRight",yn],["rearg",bn]],Bn="[object Arguments]",Tn="[object Array]",$n="[object AsyncFunction]",Dn="[object Boolean]",Mn="[object Date]",Fn="[object DOMException]",Nn="[object Error]",Pn="[object Function]",qn="[object GeneratorFunction]",Zn="[object Map]",Kn="[object Number]",Vn="[object Null]",Gn="[object Object]",Hn="[object Promise]",Jn="[object Proxy]",Yn="[object RegExp]",Qn="[object Set]",Xn="[object String]",nt="[object Symbol]",tt="[object Undefined]",rt="[object WeakMap]",et="[object WeakSet]",ut="[object ArrayBuffer]",it="[object DataView]",ot="[object Float32Array]",ft="[object Float64Array]",ct="[object Int8Array]",at="[object Int16Array]",lt="[object Int32Array]",st="[object Uint8Array]",ht="[object Uint8ClampedArray]",pt="[object Uint16Array]",_t="[object Uint32Array]",vt=/\b__p \+= '';/g,gt=/\b(__p \+=) '' \+/g,yt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,dt=/&(?:amp|lt|gt|quot|#39);/g,bt=/[&<>"']/g,wt=RegExp(dt.source),mt=RegExp(bt.source),xt=/<%-([\s\S]+?)%>/g,jt=/<%([\s\S]+?)%>/g,At=/<%=([\s\S]+?)%>/g,kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ot=/^\w*$/,It=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rt=/[\\^$.*+?()[\]{}|]/g,zt=RegExp(Rt.source),Et=/^\s+|\s+$/g,St=/^\s+/,Wt=/\s+$/,Lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ct=/\{\n\/\* \[wrapped with (.+)\] \*/,Ut=/,? & /,Bt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Tt=/\\(\\)?/g,$t=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Dt=/\w*$/,Mt=/^[-+]0x[0-9a-f]+$/i,Ft=/^0b[01]+$/i,Nt=/^\[object .+?Constructor\]$/,Pt=/^0o[0-7]+$/i,qt=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Kt=/($^)/,Vt=/['\n\r\u2028\u2029\\]/g,Gt="\\ud800-\\udfff",Ht="\\u0300-\\u036f",Jt="\\ufe20-\\ufe2f",Yt="\\u20d0-\\u20ff",Qt=Ht+Jt+Yt,Xt="\\u2700-\\u27bf",nr="a-z\\xdf-\\xf6\\xf8-\\xff",tr="\\xac\\xb1\\xd7\\xf7",rr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",er="\\u2000-\\u206f",ur=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ir="A-Z\\xc0-\\xd6\\xd8-\\xde",or="\\ufe0e\\ufe0f",fr=tr+rr+er+ur,cr="['\u2019]",ar="["+Gt+"]",lr="["+fr+"]",sr="["+Qt+"]",hr="\\d+",pr="["+Xt+"]",_r="["+nr+"]",vr="[^"+Gt+fr+hr+Xt+nr+ir+"]",gr="\\ud83c[\\udffb-\\udfff]",yr="(?:"+sr+"|"+gr+")",dr="[^"+Gt+"]",br="(?:\\ud83c[\\udde6-\\uddff]){2}",wr="[\\ud800-\\udbff][\\udc00-\\udfff]",mr="["+ir+"]",xr="\\u200d",jr="(?:"+_r+"|"+vr+")",Ar="(?:"+mr+"|"+vr+")",kr="(?:"+cr+"(?:d|ll|m|re|s|t|ve))?",Or="(?:"+cr+"(?:D|LL|M|RE|S|T|VE))?",Ir=yr+"?",Rr="["+or+"]?",zr="(?:"+xr+"(?:"+[dr,br,wr].join("|")+")"+Rr+Ir+")*",Er="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Sr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wr=Rr+Ir+zr,Lr="(?:"+[pr,br,wr].join("|")+")"+Wr,Cr="(?:"+[dr+sr+"?",sr,br,wr,ar].join("|")+")",Ur=RegExp(cr,"g"),Br=RegExp(sr,"g"),Tr=RegExp(gr+"(?="+gr+")|"+Cr+Wr,"g"),$r=RegExp([mr+"?"+_r+"+"+kr+"(?="+[lr,mr,"$"].join("|")+")",Ar+"+"+Or+"(?="+[lr,mr+jr,"$"].join("|")+")",mr+"?"+jr+"+"+kr,mr+"+"+Or,Sr,Er,hr,Lr].join("|"),"g"),Dr=RegExp("["+xr+Gt+Qt+or+"]"),Mr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Nr=-1,Pr={};
|
return n.forEach(function(n){r[++t]=n}),r}function q(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function Z(n,t,r){for(var e=r-1,u=n.length;++e<u;)if(n[e]===t)return e;return-1}function K(n,t,r){for(var e=r+1;e--;)if(n[e]===t)return e;return e}function V(n){return T(n)?J(n):_e(n)}function G(n){return T(n)?Y(n):p(n)}function H(n){for(var t=n.length;t--&&Ct.test(n.charAt(t)););return t}function J(n){for(var t=Mr.lastIndex=0;Mr.test(n);)++t;return t}function Y(n){return n.match(Mr)||[];
|
||||||
Pr[ot]=Pr[ft]=Pr[ct]=Pr[at]=Pr[lt]=Pr[st]=Pr[ht]=Pr[pt]=Pr[_t]=!0,Pr[Bn]=Pr[Tn]=Pr[ut]=Pr[Dn]=Pr[it]=Pr[Mn]=Pr[Nn]=Pr[Pn]=Pr[Zn]=Pr[Kn]=Pr[Gn]=Pr[Yn]=Pr[Qn]=Pr[Xn]=Pr[rt]=!1;var qr={};qr[Bn]=qr[Tn]=qr[ut]=qr[it]=qr[Dn]=qr[Mn]=qr[ot]=qr[ft]=qr[ct]=qr[at]=qr[lt]=qr[Zn]=qr[Kn]=qr[Gn]=qr[Yn]=qr[Qn]=qr[Xn]=qr[nt]=qr[st]=qr[ht]=qr[pt]=qr[_t]=!0,qr[Nn]=qr[Pn]=qr[rt]=!1;var Zr={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a",
|
}function Q(n){return n.match(Fr)||[]}var X,nn="4.17.21",tn=200,rn="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",en="Expected a function",un="Invalid `variable` option passed into `_.template`",on="__lodash_hash_undefined__",fn=500,cn="__lodash_placeholder__",an=1,ln=2,sn=4,hn=1,pn=2,_n=1,vn=2,gn=4,yn=8,dn=16,bn=32,wn=64,mn=128,xn=256,jn=512,An=30,kn="...",On=800,In=16,Rn=1,zn=2,En=3,Sn=1/0,Wn=9007199254740991,Ln=1.7976931348623157e308,Cn=NaN,Un=4294967295,Bn=Un-1,Tn=Un>>>1,$n=[["ary",mn],["bind",_n],["bindKey",vn],["curry",yn],["curryRight",dn],["flip",jn],["partial",bn],["partialRight",wn],["rearg",xn]],Dn="[object Arguments]",Mn="[object Array]",Fn="[object AsyncFunction]",Nn="[object Boolean]",Pn="[object Date]",qn="[object DOMException]",Zn="[object Error]",Kn="[object Function]",Vn="[object GeneratorFunction]",Gn="[object Map]",Hn="[object Number]",Jn="[object Null]",Yn="[object Object]",Qn="[object Promise]",Xn="[object Proxy]",nt="[object RegExp]",tt="[object Set]",rt="[object String]",et="[object Symbol]",ut="[object Undefined]",it="[object WeakMap]",ot="[object WeakSet]",ft="[object ArrayBuffer]",ct="[object DataView]",at="[object Float32Array]",lt="[object Float64Array]",st="[object Int8Array]",ht="[object Int16Array]",pt="[object Int32Array]",_t="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",dt=/\b__p \+= '';/g,bt=/\b(__p \+=) '' \+/g,wt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mt=/&(?:amp|lt|gt|quot|#39);/g,xt=/[&<>"']/g,jt=RegExp(mt.source),At=RegExp(xt.source),kt=/<%-([\s\S]+?)%>/g,Ot=/<%([\s\S]+?)%>/g,It=/<%=([\s\S]+?)%>/g,Rt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zt=/^\w*$/,Et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,St=/[\\^$.*+?()[\]{}|]/g,Wt=RegExp(St.source),Lt=/^\s+/,Ct=/\s/,Ut=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Bt=/\{\n\/\* \[wrapped with (.+)\] \*/,Tt=/,? & /,$t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Dt=/[()=,{}\[\]\/\s]/,Mt=/\\(\\)?/g,Ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Nt=/\w*$/,Pt=/^[-+]0x[0-9a-f]+$/i,qt=/^0b[01]+$/i,Zt=/^\[object .+?Constructor\]$/,Kt=/^0o[0-7]+$/i,Vt=/^(?:0|[1-9]\d*)$/,Gt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ht=/($^)/,Jt=/['\n\r\u2028\u2029\\]/g,Yt="\\ud800-\\udfff",Qt="\\u0300-\\u036f",Xt="\\ufe20-\\ufe2f",nr="\\u20d0-\\u20ff",tr=Qt+Xt+nr,rr="\\u2700-\\u27bf",er="a-z\\xdf-\\xf6\\xf8-\\xff",ur="\\xac\\xb1\\xd7\\xf7",ir="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",or="\\u2000-\\u206f",fr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",cr="A-Z\\xc0-\\xd6\\xd8-\\xde",ar="\\ufe0e\\ufe0f",lr=ur+ir+or+fr,sr="['\u2019]",hr="["+Yt+"]",pr="["+lr+"]",_r="["+tr+"]",vr="\\d+",gr="["+rr+"]",yr="["+er+"]",dr="[^"+Yt+lr+vr+rr+er+cr+"]",br="\\ud83c[\\udffb-\\udfff]",wr="(?:"+_r+"|"+br+")",mr="[^"+Yt+"]",xr="(?:\\ud83c[\\udde6-\\uddff]){2}",jr="[\\ud800-\\udbff][\\udc00-\\udfff]",Ar="["+cr+"]",kr="\\u200d",Or="(?:"+yr+"|"+dr+")",Ir="(?:"+Ar+"|"+dr+")",Rr="(?:"+sr+"(?:d|ll|m|re|s|t|ve))?",zr="(?:"+sr+"(?:D|LL|M|RE|S|T|VE))?",Er=wr+"?",Sr="["+ar+"]?",Wr="(?:"+kr+"(?:"+[mr,xr,jr].join("|")+")"+Sr+Er+")*",Lr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Cr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ur=Sr+Er+Wr,Br="(?:"+[gr,xr,jr].join("|")+")"+Ur,Tr="(?:"+[mr+_r+"?",_r,xr,jr,hr].join("|")+")",$r=RegExp(sr,"g"),Dr=RegExp(_r,"g"),Mr=RegExp(br+"(?="+br+")|"+Tr+Ur,"g"),Fr=RegExp([Ar+"?"+yr+"+"+Rr+"(?="+[pr,Ar,"$"].join("|")+")",Ir+"+"+zr+"(?="+[pr,Ar+Or,"$"].join("|")+")",Ar+"?"+Or+"+"+Rr,Ar+"+"+zr,Cr,Lr,vr,Br].join("|"),"g"),Nr=RegExp("["+kr+Yt+tr+ar+"]"),Pr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,qr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Zr=-1,Kr={};
|
||||||
|
Kr[at]=Kr[lt]=Kr[st]=Kr[ht]=Kr[pt]=Kr[_t]=Kr[vt]=Kr[gt]=Kr[yt]=!0,Kr[Dn]=Kr[Mn]=Kr[ft]=Kr[Nn]=Kr[ct]=Kr[Pn]=Kr[Zn]=Kr[Kn]=Kr[Gn]=Kr[Hn]=Kr[Yn]=Kr[nt]=Kr[tt]=Kr[rt]=Kr[it]=!1;var Vr={};Vr[Dn]=Vr[Mn]=Vr[ft]=Vr[ct]=Vr[Nn]=Vr[Pn]=Vr[at]=Vr[lt]=Vr[st]=Vr[ht]=Vr[pt]=Vr[Gn]=Vr[Hn]=Vr[Yn]=Vr[nt]=Vr[tt]=Vr[rt]=Vr[et]=Vr[_t]=Vr[vt]=Vr[gt]=Vr[yt]=!0,Vr[Zn]=Vr[Kn]=Vr[it]=!1;var Gr={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a",
|
||||||
"\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae",
|
"\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae",
|
||||||
"\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g",
|
"\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g",
|
||||||
"\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O",
|
"\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O",
|
||||||
"\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w",
|
"\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w",
|
||||||
"\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"},Kr={"&":"&","<":"<",">":">",'"':""","'":"'"},Vr={"&":"&","<":"<",">":">",""":'"',"'":"'"},Gr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Hr=parseFloat,Jr=parseInt,Yr="object"==typeof global&&global&&global.Object===Object&&global,Qr="object"==typeof self&&self&&self.Object===Object&&self,Xr=Yr||Qr||Function("return this")(),ne="object"==typeof exports&&exports&&!exports.nodeType&&exports,te=ne&&"object"==typeof module&&module&&!module.nodeType&&module,re=te&&te.exports===ne,ee=re&&Yr.process,ue=function(){
|
"\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"},Hr={"&":"&","<":"<",">":">",'"':""","'":"'"},Jr={"&":"&","<":"<",">":">",""":'"',"'":"'"},Yr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Qr=parseFloat,Xr=parseInt,ne="object"==typeof global&&global&&global.Object===Object&&global,te="object"==typeof self&&self&&self.Object===Object&&self,re=ne||te||Function("return this")(),ee="object"==typeof exports&&exports&&!exports.nodeType&&exports,ue=ee&&"object"==typeof module&&module&&!module.nodeType&&module,ie=ue&&ue.exports===ee,oe=ie&&ne.process,fe=function(){
|
||||||
try{var n=te&&te.require&&te.require("util").types;return n?n:ee&&ee.binding&&ee.binding("util")}catch(n){}}(),ie=ue&&ue.isArrayBuffer,oe=ue&&ue.isDate,fe=ue&&ue.isMap,ce=ue&&ue.isRegExp,ae=ue&&ue.isSet,le=ue&&ue.isTypedArray,se=m("length"),he=x(Zr),pe=x(Kr),_e=x(Vr),ve=function p(x){function q(n){if(oc(n)&&!yh(n)&&!(n instanceof Bt)){if(n instanceof H)return n;if(yl.call(n,"__wrapped__"))return to(n)}return new H(n)}function G(){}function H(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,
|
try{var n=ue&&ue.require&&ue.require("util").types;return n?n:oe&&oe.binding&&oe.binding("util")}catch(n){}}(),ce=fe&&fe.isArrayBuffer,ae=fe&&fe.isDate,le=fe&&fe.isMap,se=fe&&fe.isRegExp,he=fe&&fe.isSet,pe=fe&&fe.isTypedArray,_e=m("length"),ve=x(Gr),ge=x(Hr),ye=x(Jr),de=function p(x){function Z(n){if(cc(n)&&!bh(n)&&!(n instanceof Ct)){if(n instanceof Y)return n;if(bl.call(n,"__wrapped__"))return eo(n)}return new Y(n)}function J(){}function Y(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,
|
||||||
this.__index__=0,this.__values__=Y}function Bt(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Wn,this.__views__=[]}function Gt(){var n=new Bt(this.__wrapped__);return n.__actions__=Uu(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Uu(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Uu(this.__views__),n}function Ht(){if(this.__filtered__){var n=new Bt(this);n.__dir__=-1,
|
this.__index__=0,this.__values__=X}function Ct(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Un,this.__views__=[]}function $t(){var n=new Ct(this.__wrapped__);return n.__actions__=Tu(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Tu(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Tu(this.__views__),n}function Yt(){if(this.__filtered__){var n=new Ct(this);n.__dir__=-1,
|
||||||
n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function Jt(){var n=this.__wrapped__.value(),t=this.__dir__,r=yh(n),e=t<0,u=r?n.length:0,i=Ai(0,u,this.__views__),o=i.start,f=i.end,c=f-o,a=e?f:o-1,l=this.__iteratees__,s=l.length,h=0,p=Vl(c,this.__takeCount__);if(!r||!e&&u==c&&p==c)return du(n,this.__actions__);var _=[];n:for(;c--&&h<p;){a+=t;for(var v=-1,g=n[a];++v<s;){var y=l[v],d=y.iteratee,b=y.type,w=d(g);if(b==On)g=w;else if(!w){if(b==kn)continue n;break n}}_[h++]=g}return _}function Yt(n){
|
n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function Qt(){var n=this.__wrapped__.value(),t=this.__dir__,r=bh(n),e=t<0,u=r?n.length:0,i=Oi(0,u,this.__views__),o=i.start,f=i.end,c=f-o,a=e?f:o-1,l=this.__iteratees__,s=l.length,h=0,p=Hl(c,this.__takeCount__);if(!r||!e&&u==c&&p==c)return wu(n,this.__actions__);var _=[];n:for(;c--&&h<p;){a+=t;for(var v=-1,g=n[a];++v<s;){var y=l[v],d=y.iteratee,b=y.type,w=d(g);if(b==zn)g=w;else if(!w){if(b==Rn)continue n;break n}}_[h++]=g}return _}function Xt(n){
|
||||||
var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Qt(){this.__data__=es?es(null):{},this.size=0}function Xt(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}function nr(n){var t=this.__data__;if(es){var r=t[n];return r===rn?Y:r}return yl.call(t,n)?t[n]:Y}function tr(n){var t=this.__data__;return es?t[n]!==Y:yl.call(t,n)}function rr(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=es&&t===Y?rn:t,this}function er(n){
|
var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function nr(){this.__data__=is?is(null):{},this.size=0}function tr(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}function rr(n){var t=this.__data__;if(is){var r=t[n];return r===on?X:r}return bl.call(t,n)?t[n]:X}function er(n){var t=this.__data__;return is?t[n]!==X:bl.call(t,n)}function ur(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=is&&t===X?on:t,this}function ir(n){
|
||||||
var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function ur(){this.__data__=[],this.size=0}function ir(n){var t=this.__data__,r=Er(t,n);return!(r<0)&&(r==t.length-1?t.pop():Sl.call(t,r,1),--this.size,!0)}function or(n){var t=this.__data__,r=Er(t,n);return r<0?Y:t[r][1]}function fr(n){return Er(this.__data__,n)>-1}function cr(n,t){var r=this.__data__,e=Er(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this}function ar(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){
|
var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function or(){this.__data__=[],this.size=0}function fr(n){var t=this.__data__,r=Wr(t,n);return!(r<0)&&(r==t.length-1?t.pop():Ll.call(t,r,1),--this.size,!0)}function cr(n){var t=this.__data__,r=Wr(t,n);return r<0?X:t[r][1]}function ar(n){return Wr(this.__data__,n)>-1}function lr(n,t){var r=this.__data__,e=Wr(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this}function sr(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){
|
||||||
var e=n[t];this.set(e[0],e[1])}}function lr(){this.size=0,this.__data__={hash:new Yt,map:new(Xl||er),string:new Yt}}function sr(n){var t=wi(this,n).delete(n);return this.size-=t?1:0,t}function hr(n){return wi(this,n).get(n)}function pr(n){return wi(this,n).has(n)}function _r(n,t){var r=wi(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this}function vr(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new ar;++t<r;)this.add(n[t])}function gr(n){return this.__data__.set(n,rn),this}function yr(n){
|
var e=n[t];this.set(e[0],e[1])}}function hr(){this.size=0,this.__data__={hash:new Xt,map:new(ts||ir),string:new Xt}}function pr(n){var t=xi(this,n).delete(n);return this.size-=t?1:0,t}function _r(n){return xi(this,n).get(n)}function vr(n){return xi(this,n).has(n)}function gr(n,t){var r=xi(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this}function yr(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new sr;++t<r;)this.add(n[t])}function dr(n){return this.__data__.set(n,on),this}function br(n){
|
||||||
return this.__data__.has(n)}function dr(n){this.size=(this.__data__=new er(n)).size}function br(){this.__data__=new er,this.size=0}function wr(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r}function mr(n){return this.__data__.get(n)}function xr(n){return this.__data__.has(n)}function jr(n,t){var r=this.__data__;if(r instanceof er){var e=r.__data__;if(!Xl||e.length<X-1)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new ar(e)}return r.set(n,t),this.size=r.size,this}function Ar(n,t){
|
return this.__data__.has(n)}function wr(n){this.size=(this.__data__=new ir(n)).size}function mr(){this.__data__=new ir,this.size=0}function xr(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r}function jr(n){return this.__data__.get(n)}function Ar(n){return this.__data__.has(n)}function kr(n,t){var r=this.__data__;if(r instanceof ir){var e=r.__data__;if(!ts||e.length<tn-1)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new sr(e)}return r.set(n,t),this.size=r.size,this}function Or(n,t){
|
||||||
var r=yh(n),e=!r&&gh(n),u=!r&&!e&&bh(n),i=!r&&!e&&!u&&Ah(n),o=r||e||u||i,f=o?O(n.length,ll):[],c=f.length;for(var a in n)!t&&!yl.call(n,a)||o&&("length"==a||u&&("offset"==a||"parent"==a)||i&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||Wi(a,c))||f.push(a);return f}function kr(n){var t=n.length;return t?n[Xe(0,t-1)]:Y}function Or(n,t){return Yi(Uu(n),$r(t,0,n.length))}function Ir(n){return Yi(Uu(n))}function Rr(n,t,r){(r===Y||Kf(n[t],r))&&(r!==Y||t in n)||Cr(n,t,r)}function zr(n,t,r){var e=n[t];
|
var r=bh(n),e=!r&&dh(n),u=!r&&!e&&mh(n),i=!r&&!e&&!u&&Oh(n),o=r||e||u||i,f=o?O(n.length,hl):[],c=f.length;for(var a in n)!t&&!bl.call(n,a)||o&&("length"==a||u&&("offset"==a||"parent"==a)||i&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||Ci(a,c))||f.push(a);return f}function Ir(n){var t=n.length;return t?n[tu(0,t-1)]:X}function Rr(n,t){return Xi(Tu(n),Mr(t,0,n.length))}function zr(n){return Xi(Tu(n))}function Er(n,t,r){(r===X||Gf(n[t],r))&&(r!==X||t in n)||Br(n,t,r)}function Sr(n,t,r){var e=n[t];
|
||||||
yl.call(n,t)&&Kf(e,r)&&(r!==Y||t in n)||Cr(n,t,r)}function Er(n,t){for(var r=n.length;r--;)if(Kf(n[r][0],t))return r;return-1}function Sr(n,t,r,e){return vs(n,function(n,u,i){t(e,n,r(n),i)}),e}function Wr(n,t){return n&&Bu(t,Fc(t),n)}function Lr(n,t){return n&&Bu(t,Nc(t),n)}function Cr(n,t,r){"__proto__"==t&&Ul?Ul(n,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):n[t]=r}function Tr(n,t){for(var r=-1,e=t.length,u=el(e),i=null==n;++r<e;)u[r]=i?Y:$c(n,t[r]);return u}function $r(n,t,r){return n===n&&(r!==Y&&(n=n<=r?n:r),
|
bl.call(n,t)&&Gf(e,r)&&(r!==X||t in n)||Br(n,t,r)}function Wr(n,t){for(var r=n.length;r--;)if(Gf(n[r][0],t))return r;return-1}function Lr(n,t,r,e){return ys(n,function(n,u,i){t(e,n,r(n),i)}),e}function Cr(n,t){return n&&$u(t,Pc(t),n)}function Ur(n,t){return n&&$u(t,qc(t),n)}function Br(n,t,r){"__proto__"==t&&Tl?Tl(n,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):n[t]=r}function Tr(n,t){for(var r=-1,e=t.length,u=il(e),i=null==n;++r<e;)u[r]=i?X:Mc(n,t[r]);return u}function Mr(n,t,r){return n===n&&(r!==X&&(n=n<=r?n:r),
|
||||||
t!==Y&&(n=n>=t?n:t)),n}function Dr(n,t,e,u,i,o){var f,c=t&on,a=t&fn,l=t&cn;if(e&&(f=i?e(n,u,i,o):e(n)),f!==Y)return f;if(!ic(n))return n;var s=yh(n);if(s){if(f=Ii(n),!c)return Uu(n,f)}else{var h=Is(n),p=h==Pn||h==qn;if(bh(n))return ku(n,c);if(h==Gn||h==Bn||p&&!i){if(f=a||p?{}:Ri(n),!c)return a?$u(n,Lr(f,n)):Tu(n,Wr(f,n))}else{if(!qr[h])return i?n:{};f=zi(n,h,c)}}o||(o=new dr);var _=o.get(n);if(_)return _;o.set(n,f),jh(n)?n.forEach(function(r){f.add(Dr(r,t,e,r,n,o))}):mh(n)&&n.forEach(function(r,u){
|
t!==X&&(n=n>=t?n:t)),n}function Fr(n,t,e,u,i,o){var f,c=t&an,a=t&ln,l=t&sn;if(e&&(f=i?e(n,u,i,o):e(n)),f!==X)return f;if(!fc(n))return n;var s=bh(n);if(s){if(f=zi(n),!c)return Tu(n,f)}else{var h=zs(n),p=h==Kn||h==Vn;if(mh(n))return Iu(n,c);if(h==Yn||h==Dn||p&&!i){if(f=a||p?{}:Ei(n),!c)return a?Mu(n,Ur(f,n)):Du(n,Cr(f,n))}else{if(!Vr[h])return i?n:{};f=Si(n,h,c)}}o||(o=new wr);var _=o.get(n);if(_)return _;o.set(n,f),kh(n)?n.forEach(function(r){f.add(Fr(r,t,e,r,n,o))}):jh(n)&&n.forEach(function(r,u){
|
||||||
f.set(u,Dr(r,t,e,u,n,o))});var v=l?a?gi:vi:a?Nc:Fc,g=s?Y:v(n);return r(g||n,function(r,u){g&&(u=r,r=n[u]),zr(f,u,Dr(r,t,e,u,n,o))}),f}function Mr(n){var t=Fc(n);return function(r){return Zr(r,n,t)}}function Zr(n,t,r){var e=r.length;if(null==n)return!e;for(n=cl(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===Y&&!(u in n)||!i(o))return!1}return!0}function Kr(n,t,r){if("function"!=typeof n)throw new sl(tn);return Es(function(){n.apply(Y,r)},t)}function Vr(n,t,r,e){var u=-1,i=o,a=!0,l=n.length,s=[],h=t.length;
|
f.set(u,Fr(r,t,e,u,n,o))});var v=l?a?di:yi:a?qc:Pc,g=s?X:v(n);return r(g||n,function(r,u){g&&(u=r,r=n[u]),Sr(f,u,Fr(r,t,e,u,n,o))}),f}function Nr(n){var t=Pc(n);return function(r){return Pr(r,n,t)}}function Pr(n,t,r){var e=r.length;if(null==n)return!e;for(n=ll(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===X&&!(u in n)||!i(o))return!1}return!0}function Gr(n,t,r){if("function"!=typeof n)throw new pl(en);return Ws(function(){n.apply(X,r)},t)}function Hr(n,t,r,e){var u=-1,i=o,a=!0,l=n.length,s=[],h=t.length;
|
||||||
if(!l)return s;r&&(t=c(t,R(r))),e?(i=f,a=!1):t.length>=X&&(i=E,a=!1,t=new vr(t));n:for(;++u<l;){var p=n[u],_=null==r?p:r(p);if(p=e||0!==p?p:0,a&&_===_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function Gr(n,t){var r=!0;return vs(n,function(n,e,u){return r=!!t(n,e,u)}),r}function Yr(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===Y?o===o&&!yc(o):r(o,f)))var f=o,c=i}return c}function Qr(n,t,r,e){var u=n.length;for(r=jc(r),r<0&&(r=-r>u?0:u+r),
|
if(!l)return s;r&&(t=c(t,z(r))),e?(i=f,a=!1):t.length>=tn&&(i=S,a=!1,t=new yr(t));n:for(;++u<l;){var p=n[u],_=null==r?p:r(p);if(p=e||0!==p?p:0,a&&_===_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function Jr(n,t){var r=!0;return ys(n,function(n,e,u){return r=!!t(n,e,u)}),r}function Yr(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===X?o===o&&!bc(o):r(o,f)))var f=o,c=i}return c}function ne(n,t,r,e){var u=n.length;for(r=kc(r),r<0&&(r=-r>u?0:u+r),
|
||||||
e=e===Y||e>u?u:jc(e),e<0&&(e+=u),e=r>e?0:Ac(e);r<e;)n[r++]=t;return n}function ne(n,t){var r=[];return vs(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function te(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=Si),u||(u=[]);++i<o;){var f=n[i];t>0&&r(f)?t>1?te(f,t-1,r,e,u):a(u,f):e||(u[u.length]=f)}return u}function ee(n,t){return n&&ys(n,t,Fc)}function ue(n,t){return n&&ds(n,t,Fc)}function se(n,t){return i(t,function(t){return rc(n[t])})}function ve(n,t){t=ju(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[Qi(t[r++])];
|
e=e===X||e>u?u:kc(e),e<0&&(e+=u),e=r>e?0:Oc(e);r<e;)n[r++]=t;return n}function te(n,t){var r=[];return ys(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function ee(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=Li),u||(u=[]);++i<o;){var f=n[i];t>0&&r(f)?t>1?ee(f,t-1,r,e,u):a(u,f):e||(u[u.length]=f)}return u}function ue(n,t){return n&&bs(n,t,Pc)}function oe(n,t){return n&&ws(n,t,Pc)}function fe(n,t){return i(t,function(t){return uc(n[t])})}function _e(n,t){t=ku(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[no(t[r++])];
|
||||||
return r&&r==e?n:Y}function ye(n,t,r){var e=t(n);return yh(n)?e:a(e,r(n))}function de(n){return null==n?n===Y?tt:Vn:Cl&&Cl in cl(n)?ji(n):qi(n)}function be(n,t){return n>t}function we(n,t){return null!=n&&yl.call(n,t)}function me(n,t){return null!=n&&t in cl(n)}function xe(n,t,r){return n>=Vl(t,r)&&n<Kl(t,r)}function je(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=el(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,R(t))),s=Vl(p.length,s),l[a]=!r&&(t||u>=120&&p.length>=120)?new vr(a&&p):Y}p=n[0];
|
return r&&r==e?n:X}function de(n,t,r){var e=t(n);return bh(n)?e:a(e,r(n))}function we(n){return null==n?n===X?ut:Jn:Bl&&Bl in ll(n)?ki(n):Ki(n)}function me(n,t){return n>t}function xe(n,t){return null!=n&&bl.call(n,t)}function je(n,t){return null!=n&&t in ll(n)}function Ae(n,t,r){return n>=Hl(t,r)&&n<Gl(t,r)}function ke(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=il(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,z(t))),s=Hl(p.length,s),l[a]=!r&&(t||u>=120&&p.length>=120)?new yr(a&&p):X}p=n[0];
|
||||||
var _=-1,v=l[0];n:for(;++_<u&&h.length<s;){var g=p[_],y=t?t(g):g;if(g=r||0!==g?g:0,!(v?E(v,y):e(h,y,r))){for(a=i;--a;){var d=l[a];if(!(d?E(d,y):e(n[a],y,r)))continue n}v&&v.push(y),h.push(g)}}return h}function Ae(n,t,r,e){return ee(n,function(n,u,i){t(e,r(n),u,i)}),e}function ke(t,r,e){r=ju(r,t),t=Ki(t,r);var u=null==t?t:t[Qi(mo(r))];return null==u?Y:n(u,t,e)}function Oe(n){return oc(n)&&de(n)==Bn}function Ie(n){return oc(n)&&de(n)==ut}function Re(n){return oc(n)&&de(n)==Mn}function ze(n,t,r,e,u){
|
var _=-1,v=l[0];n:for(;++_<u&&h.length<s;){var g=p[_],y=t?t(g):g;if(g=r||0!==g?g:0,!(v?S(v,y):e(h,y,r))){for(a=i;--a;){var d=l[a];if(!(d?S(d,y):e(n[a],y,r)))continue n}v&&v.push(y),h.push(g)}}return h}function Oe(n,t,r,e){return ue(n,function(n,u,i){t(e,r(n),u,i)}),e}function Ie(t,r,e){r=ku(r,t),t=Gi(t,r);var u=null==t?t:t[no(jo(r))];return null==u?X:n(u,t,e)}function Re(n){return cc(n)&&we(n)==Dn}function ze(n){return cc(n)&&we(n)==ft}function Ee(n){return cc(n)&&we(n)==Pn}function Se(n,t,r,e,u){
|
||||||
return n===t||(null==n||null==t||!oc(n)&&!oc(t)?n!==n&&t!==t:Ee(n,t,r,e,ze,u))}function Ee(n,t,r,e,u,i){var o=yh(n),f=yh(t),c=o?Tn:Is(n),a=f?Tn:Is(t);c=c==Bn?Gn:c,a=a==Bn?Gn:a;var l=c==Gn,s=a==Gn,h=c==a;if(h&&bh(n)){if(!bh(t))return!1;o=!0,l=!1}if(h&&!l)return i||(i=new dr),o||Ah(n)?si(n,t,r,e,u,i):hi(n,t,c,r,e,u,i);if(!(r&an)){var p=l&&yl.call(n,"__wrapped__"),_=s&&yl.call(t,"__wrapped__");if(p||_){var v=p?n.value():n,g=_?t.value():t;return i||(i=new dr),u(v,g,r,e,i)}}return!!h&&(i||(i=new dr),pi(n,t,r,e,u,i));
|
return n===t||(null==n||null==t||!cc(n)&&!cc(t)?n!==n&&t!==t:We(n,t,r,e,Se,u))}function We(n,t,r,e,u,i){var o=bh(n),f=bh(t),c=o?Mn:zs(n),a=f?Mn:zs(t);c=c==Dn?Yn:c,a=a==Dn?Yn:a;var l=c==Yn,s=a==Yn,h=c==a;if(h&&mh(n)){if(!mh(t))return!1;o=!0,l=!1}if(h&&!l)return i||(i=new wr),o||Oh(n)?pi(n,t,r,e,u,i):_i(n,t,c,r,e,u,i);if(!(r&hn)){var p=l&&bl.call(n,"__wrapped__"),_=s&&bl.call(t,"__wrapped__");if(p||_){var v=p?n.value():n,g=_?t.value():t;return i||(i=new wr),u(v,g,r,e,i)}}return!!h&&(i||(i=new wr),vi(n,t,r,e,u,i));
|
||||||
}function Se(n){return oc(n)&&Is(n)==Zn}function We(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=cl(n);u--;){var f=r[u];if(o&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return!1}for(;++u<i;){f=r[u];var c=f[0],a=n[c],l=f[1];if(o&&f[2]){if(a===Y&&!(c in n))return!1}else{var s=new dr;if(e)var h=e(a,l,c,n,t,s);if(!(h===Y?ze(l,a,an|ln,e,s):h))return!1}}return!0}function Le(n){return!(!ic(n)||Ti(n))&&(rc(n)?jl:Nt).test(Xi(n))}function Ce(n){return oc(n)&&de(n)==Yn}function Ue(n){return oc(n)&&Is(n)==Qn;
|
}function Le(n){return cc(n)&&zs(n)==Gn}function Ce(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=ll(n);u--;){var f=r[u];if(o&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return!1}for(;++u<i;){f=r[u];var c=f[0],a=n[c],l=f[1];if(o&&f[2]){if(a===X&&!(c in n))return!1}else{var s=new wr;if(e)var h=e(a,l,c,n,t,s);if(!(h===X?Se(l,a,hn|pn,e,s):h))return!1}}return!0}function Ue(n){return!(!fc(n)||Di(n))&&(uc(n)?kl:Zt).test(to(n))}function Be(n){return cc(n)&&we(n)==nt}function Te(n){return cc(n)&&zs(n)==tt;
|
||||||
}function Be(n){return oc(n)&&uc(n.length)&&!!Pr[de(n)]}function Te(n){return"function"==typeof n?n:null==n?Sa:"object"==typeof n?yh(n)?Pe(n[0],n[1]):Ne(n):Da(n)}function $e(n){if(!$i(n))return Zl(n);var t=[];for(var r in cl(n))yl.call(n,r)&&"constructor"!=r&&t.push(r);return t}function De(n){if(!ic(n))return Pi(n);var t=$i(n),r=[];for(var e in n)("constructor"!=e||!t&&yl.call(n,e))&&r.push(e);return r}function Me(n,t){return n<t}function Fe(n,t){var r=-1,e=Vf(n)?el(n.length):[];return vs(n,function(n,u,i){
|
}function $e(n){return cc(n)&&oc(n.length)&&!!Kr[we(n)]}function De(n){return"function"==typeof n?n:null==n?La:"object"==typeof n?bh(n)?Ze(n[0],n[1]):qe(n):Fa(n)}function Me(n){if(!Mi(n))return Vl(n);var t=[];for(var r in ll(n))bl.call(n,r)&&"constructor"!=r&&t.push(r);return t}function Fe(n){if(!fc(n))return Zi(n);var t=Mi(n),r=[];for(var e in n)("constructor"!=e||!t&&bl.call(n,e))&&r.push(e);return r}function Ne(n,t){return n<t}function Pe(n,t){var r=-1,e=Hf(n)?il(n.length):[];return ys(n,function(n,u,i){
|
||||||
e[++r]=t(n,u,i)}),e}function Ne(n){var t=mi(n);return 1==t.length&&t[0][2]?Mi(t[0][0],t[0][1]):function(r){return r===n||We(r,n,t)}}function Pe(n,t){return Ci(n)&&Di(t)?Mi(Qi(n),t):function(r){var e=$c(r,n);return e===Y&&e===t?Mc(r,n):ze(t,e,an|ln)}}function qe(n,t,r,e,u){n!==t&&ys(t,function(i,o){if(u||(u=new dr),ic(i))Ze(n,t,o,r,qe,e,u);else{var f=e?e(Gi(n,o),i,o+"",n,t,u):Y;f===Y&&(f=i),Rr(n,o,f)}},Nc)}function Ze(n,t,r,e,u,i,o){var f=Gi(n,r),c=Gi(t,r),a=o.get(c);if(a)return Rr(n,r,a),Y;var l=i?i(f,c,r+"",n,t,o):Y,s=l===Y;
|
e[++r]=t(n,u,i)}),e}function qe(n){var t=ji(n);return 1==t.length&&t[0][2]?Ni(t[0][0],t[0][1]):function(r){return r===n||Ce(r,n,t)}}function Ze(n,t){return Bi(n)&&Fi(t)?Ni(no(n),t):function(r){var e=Mc(r,n);return e===X&&e===t?Nc(r,n):Se(t,e,hn|pn)}}function Ke(n,t,r,e,u){n!==t&&bs(t,function(i,o){if(u||(u=new wr),fc(i))Ve(n,t,o,r,Ke,e,u);else{var f=e?e(Ji(n,o),i,o+"",n,t,u):X;f===X&&(f=i),Er(n,o,f)}},qc)}function Ve(n,t,r,e,u,i,o){var f=Ji(n,r),c=Ji(t,r),a=o.get(c);if(a)return Er(n,r,a),X;var l=i?i(f,c,r+"",n,t,o):X,s=l===X;
|
||||||
if(s){var h=yh(c),p=!h&&bh(c),_=!h&&!p&&Ah(c);l=c,h||p||_?yh(f)?l=f:Gf(f)?l=Uu(f):p?(s=!1,l=ku(c,!0)):_?(s=!1,l=Eu(c,!0)):l=[]:_c(c)||gh(c)?(l=f,gh(f)?l=Oc(f):ic(f)&&!rc(f)||(l=Ri(c))):s=!1}s&&(o.set(c,l),u(l,c,e,i,o),o.delete(c)),Rr(n,r,l)}function Ke(n,t){var r=n.length;if(r)return t+=t<0?r:0,Wi(t,r)?n[t]:Y}function Ve(n,t,r){t=t.length?c(t,function(n){return yh(n)?function(t){return ve(t,1===n.length?n[0]:n)}:n}):[Sa];var e=-1;return t=c(t,R(bi())),A(Fe(n,function(n,r,u){return{criteria:c(t,function(t){
|
if(s){var h=bh(c),p=!h&&mh(c),_=!h&&!p&&Oh(c);l=c,h||p||_?bh(f)?l=f:Jf(f)?l=Tu(f):p?(s=!1,l=Iu(c,!0)):_?(s=!1,l=Wu(c,!0)):l=[]:gc(c)||dh(c)?(l=f,dh(f)?l=Rc(f):fc(f)&&!uc(f)||(l=Ei(c))):s=!1}s&&(o.set(c,l),u(l,c,e,i,o),o.delete(c)),Er(n,r,l)}function Ge(n,t){var r=n.length;if(r)return t+=t<0?r:0,Ci(t,r)?n[t]:X}function He(n,t,r){t=t.length?c(t,function(n){return bh(n)?function(t){return _e(t,1===n.length?n[0]:n)}:n}):[La];var e=-1;return t=c(t,z(mi())),A(Pe(n,function(n,r,u){return{criteria:c(t,function(t){
|
||||||
return t(n)}),index:++e,value:n}}),function(n,t){return Wu(n,t,r)})}function Ge(n,t){return He(n,t,function(t,r){return Mc(n,r)})}function He(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=ve(n,o);r(f,o)&&iu(i,ju(o,n),f)}return i}function Je(n){return function(t){return ve(t,n)}}function Ye(n,t,r,e){var u=e?d:y,i=-1,o=t.length,f=n;for(n===t&&(t=Uu(t)),r&&(f=c(n,R(r)));++i<o;)for(var a=0,l=t[i],s=r?r(l):l;(a=u(f,s,a,e))>-1;)f!==n&&Sl.call(f,a,1),Sl.call(n,a,1);return n}function Qe(n,t){for(var r=n?t.length:0,e=r-1;r--;){
|
return t(n)}),index:++e,value:n}}),function(n,t){return Cu(n,t,r)})}function Je(n,t){return Ye(n,t,function(t,r){return Nc(n,r)})}function Ye(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=_e(n,o);r(f,o)&&fu(i,ku(o,n),f)}return i}function Qe(n){return function(t){return _e(t,n)}}function Xe(n,t,r,e){var u=e?d:y,i=-1,o=t.length,f=n;for(n===t&&(t=Tu(t)),r&&(f=c(n,z(r)));++i<o;)for(var a=0,l=t[i],s=r?r(l):l;(a=u(f,s,a,e))>-1;)f!==n&&Ll.call(f,a,1),Ll.call(n,a,1);return n}function nu(n,t){for(var r=n?t.length:0,e=r-1;r--;){
|
||||||
var u=t[r];if(r==e||u!==i){var i=u;Wi(u)?Sl.call(n,u,1):vu(n,u)}}return n}function Xe(n,t){return n+Ml(Jl()*(t-n+1))}function nu(n,t,r,e){for(var u=-1,i=Kl(Dl((t-n)/(r||1)),0),o=el(i);i--;)o[e?i:++u]=n,n+=r;return o}function tu(n,t){var r="";if(!n||t<1||t>zn)return r;do t%2&&(r+=n),t=Ml(t/2),t&&(n+=n);while(t);return r}function ru(n,t){return Ss(Zi(n,t,Sa),n+"")}function eu(n){return kr(na(n))}function uu(n,t){var r=na(n);return Yi(r,$r(t,0,r.length))}function iu(n,t,r,e){if(!ic(n))return n;t=ju(t,n);
|
var u=t[r];if(r==e||u!==i){var i=u;Ci(u)?Ll.call(n,u,1):yu(n,u)}}return n}function tu(n,t){return n+Nl(Ql()*(t-n+1))}function ru(n,t,r,e){for(var u=-1,i=Gl(Fl((t-n)/(r||1)),0),o=il(i);i--;)o[e?i:++u]=n,n+=r;return o}function eu(n,t){var r="";if(!n||t<1||t>Wn)return r;do t%2&&(r+=n),t=Nl(t/2),t&&(n+=n);while(t);return r}function uu(n,t){return Ls(Vi(n,t,La),n+"")}function iu(n){return Ir(ra(n))}function ou(n,t){var r=ra(n);return Xi(r,Mr(t,0,r.length))}function fu(n,t,r,e){if(!fc(n))return n;t=ku(t,n);
|
||||||
for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++u<i;){var c=Qi(t[u]),a=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return n;if(u!=o){var l=f[c];a=e?e(l,c,f):Y,a===Y&&(a=ic(l)?l:Wi(t[u+1])?[]:{})}zr(f,c,a),f=f[c]}return n}function ou(n){return Yi(na(n))}function fu(n,t,r){var e=-1,u=n.length;t<0&&(t=-t>u?0:u+t),r=r>u?u:r,r<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=el(u);++e<u;)i[e]=n[e+t];return i}function cu(n,t){var r;return vs(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function au(n,t,r){
|
for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++u<i;){var c=no(t[u]),a=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return n;if(u!=o){var l=f[c];a=e?e(l,c,f):X,a===X&&(a=fc(l)?l:Ci(t[u+1])?[]:{})}Sr(f,c,a),f=f[c]}return n}function cu(n){return Xi(ra(n))}function au(n,t,r){var e=-1,u=n.length;t<0&&(t=-t>u?0:u+t),r=r>u?u:r,r<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=il(u);++e<u;)i[e]=n[e+t];return i}function lu(n,t){var r;return ys(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function su(n,t,r){
|
||||||
var e=0,u=null==n?e:n.length;if("number"==typeof t&&t===t&&u<=Cn){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!yc(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return lu(n,t,Sa,r)}function lu(n,t,r,e){var u=0,i=null==n?0:n.length;if(0===i)return 0;t=r(t);for(var o=t!==t,f=null===t,c=yc(t),a=t===Y;u<i;){var l=Ml((u+i)/2),s=r(n[l]),h=s!==Y,p=null===s,_=s===s,v=yc(s);if(o)var g=e||_;else g=a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):!p&&!v&&(e?s<=t:s<t);g?u=l+1:i=l}return Vl(i,Ln)}function su(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){
|
var e=0,u=null==n?e:n.length;if("number"==typeof t&&t===t&&u<=Tn){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!bc(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return hu(n,t,La,r)}function hu(n,t,r,e){var u=0,i=null==n?0:n.length;if(0===i)return 0;t=r(t);for(var o=t!==t,f=null===t,c=bc(t),a=t===X;u<i;){var l=Nl((u+i)/2),s=r(n[l]),h=s!==X,p=null===s,_=s===s,v=bc(s);if(o)var g=e||_;else g=a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):!p&&!v&&(e?s<=t:s<t);g?u=l+1:i=l}return Hl(i,Bn)}function pu(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){
|
||||||
var o=n[r],f=t?t(o):o;if(!r||!Kf(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function hu(n){return"number"==typeof n?n:yc(n)?Sn:+n}function pu(n){if("string"==typeof n)return n;if(yh(n))return c(n,pu)+"";if(yc(n))return ps?ps.call(n):"";var t=n+"";return"0"==t&&1/n==-Rn?"-0":t}function _u(n,t,r){var e=-1,u=o,i=n.length,c=!0,a=[],l=a;if(r)c=!1,u=f;else if(i>=X){var s=t?null:js(n);if(s)return N(s);c=!1,u=E,l=new vr}else l=t?[]:a;n:for(;++e<i;){var h=n[e],p=t?t(h):h;if(h=r||0!==h?h:0,c&&p===p){for(var _=l.length;_--;)if(l[_]===p)continue n;
|
var o=n[r],f=t?t(o):o;if(!r||!Gf(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function _u(n){return"number"==typeof n?n:bc(n)?Cn:+n}function vu(n){if("string"==typeof n)return n;if(bh(n))return c(n,vu)+"";if(bc(n))return vs?vs.call(n):"";var t=n+"";return"0"==t&&1/n==-Sn?"-0":t}function gu(n,t,r){var e=-1,u=o,i=n.length,c=!0,a=[],l=a;if(r)c=!1,u=f;else if(i>=tn){var s=t?null:ks(n);if(s)return P(s);c=!1,u=S,l=new yr}else l=t?[]:a;n:for(;++e<i;){var h=n[e],p=t?t(h):h;if(h=r||0!==h?h:0,c&&p===p){for(var _=l.length;_--;)if(l[_]===p)continue n;
|
||||||
t&&l.push(p),a.push(h)}else u(l,p,r)||(l!==a&&l.push(p),a.push(h))}return a}function vu(n,t){return t=ju(t,n),n=Ki(n,t),null==n||delete n[Qi(mo(t))]}function gu(n,t,r,e){return iu(n,t,r(ve(n,t)),e)}function yu(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?fu(n,e?0:i,e?i+1:u):fu(n,e?i+1:0,e?u:i)}function du(n,t){var r=n;return r instanceof Bt&&(r=r.value()),l(t,function(n,t){return t.func.apply(t.thisArg,a([n],t.args))},r)}function bu(n,t,r){var e=n.length;if(e<2)return e?_u(n[0]):[];
|
t&&l.push(p),a.push(h)}else u(l,p,r)||(l!==a&&l.push(p),a.push(h))}return a}function yu(n,t){return t=ku(t,n),n=Gi(n,t),null==n||delete n[no(jo(t))]}function du(n,t,r,e){return fu(n,t,r(_e(n,t)),e)}function bu(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?au(n,e?0:i,e?i+1:u):au(n,e?i+1:0,e?u:i)}function wu(n,t){var r=n;return r instanceof Ct&&(r=r.value()),l(t,function(n,t){return t.func.apply(t.thisArg,a([n],t.args))},r)}function mu(n,t,r){var e=n.length;if(e<2)return e?gu(n[0]):[];
|
||||||
for(var u=-1,i=el(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=Vr(i[u]||o,n[f],t,r));return _u(te(i,1),t,r)}function wu(n,t,r){for(var e=-1,u=n.length,i=t.length,o={};++e<u;){r(o,n[e],e<i?t[e]:Y)}return o}function mu(n){return Gf(n)?n:[]}function xu(n){return"function"==typeof n?n:Sa}function ju(n,t){return yh(n)?n:Ci(n,t)?[n]:Ws(Rc(n))}function Au(n,t,r){var e=n.length;return r=r===Y?e:r,!t&&r>=e?n:fu(n,t,r)}function ku(n,t){if(t)return n.slice();var r=n.length,e=Il?Il(r):new n.constructor(r);
|
for(var u=-1,i=il(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=Hr(i[u]||o,n[f],t,r));return gu(ee(i,1),t,r)}function xu(n,t,r){for(var e=-1,u=n.length,i=t.length,o={};++e<u;){r(o,n[e],e<i?t[e]:X)}return o}function ju(n){return Jf(n)?n:[]}function Au(n){return"function"==typeof n?n:La}function ku(n,t){return bh(n)?n:Bi(n,t)?[n]:Cs(Ec(n))}function Ou(n,t,r){var e=n.length;return r=r===X?e:r,!t&&r>=e?n:au(n,t,r)}function Iu(n,t){if(t)return n.slice();var r=n.length,e=zl?zl(r):new n.constructor(r);
|
||||||
return n.copy(e),e}function Ou(n){var t=new n.constructor(n.byteLength);return new Ol(t).set(new Ol(n)),t}function Iu(n,t){return new n.constructor(t?Ou(n.buffer):n.buffer,n.byteOffset,n.byteLength)}function Ru(n){var t=new n.constructor(n.source,Dt.exec(n));return t.lastIndex=n.lastIndex,t}function zu(n){return hs?cl(hs.call(n)):{}}function Eu(n,t){return new n.constructor(t?Ou(n.buffer):n.buffer,n.byteOffset,n.length)}function Su(n,t){if(n!==t){var r=n!==Y,e=null===n,u=n===n,i=yc(n),o=t!==Y,f=null===t,c=t===t,a=yc(t);
|
return n.copy(e),e}function Ru(n){var t=new n.constructor(n.byteLength);return new Rl(t).set(new Rl(n)),t}function zu(n,t){return new n.constructor(t?Ru(n.buffer):n.buffer,n.byteOffset,n.byteLength)}function Eu(n){var t=new n.constructor(n.source,Nt.exec(n));return t.lastIndex=n.lastIndex,t}function Su(n){return _s?ll(_s.call(n)):{}}function Wu(n,t){return new n.constructor(t?Ru(n.buffer):n.buffer,n.byteOffset,n.length)}function Lu(n,t){if(n!==t){var r=n!==X,e=null===n,u=n===n,i=bc(n),o=t!==X,f=null===t,c=t===t,a=bc(t);
|
||||||
if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n<t||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Wu(n,t,r){for(var e=-1,u=n.criteria,i=t.criteria,o=u.length,f=r.length;++e<o;){var c=Su(u[e],i[e]);if(c){if(e>=f)return c;return c*("desc"==r[e]?-1:1)}}return n.index-t.index}function Lu(n,t,r,e){for(var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Kl(i-o,0),l=el(c+a),s=!e;++f<c;)l[f]=t[f];for(;++u<o;)(s||u<i)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l;
|
if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n<t||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Cu(n,t,r){for(var e=-1,u=n.criteria,i=t.criteria,o=u.length,f=r.length;++e<o;){var c=Lu(u[e],i[e]);if(c){if(e>=f)return c;return c*("desc"==r[e]?-1:1)}}return n.index-t.index}function Uu(n,t,r,e){for(var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Gl(i-o,0),l=il(c+a),s=!e;++f<c;)l[f]=t[f];for(;++u<o;)(s||u<i)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l;
|
||||||
}function Cu(n,t,r,e){for(var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Kl(i-f,0),s=el(l+a),h=!e;++u<l;)s[u]=n[u];for(var p=u;++c<a;)s[p+c]=t[c];for(;++o<f;)(h||u<i)&&(s[p+r[o]]=n[u++]);return s}function Uu(n,t){var r=-1,e=n.length;for(t||(t=el(e));++r<e;)t[r]=n[r];return t}function Bu(n,t,r,e){var u=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var f=t[i],c=e?e(r[f],n[f],f,r,n):Y;c===Y&&(c=n[f]),u?Cr(r,f,c):zr(r,f,c)}return r}function Tu(n,t){return Bu(n,ks(n),t)}function $u(n,t){return Bu(n,Os(n),t);
|
}function Bu(n,t,r,e){for(var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Gl(i-f,0),s=il(l+a),h=!e;++u<l;)s[u]=n[u];for(var p=u;++c<a;)s[p+c]=t[c];for(;++o<f;)(h||u<i)&&(s[p+r[o]]=n[u++]);return s}function Tu(n,t){var r=-1,e=n.length;for(t||(t=il(e));++r<e;)t[r]=n[r];return t}function $u(n,t,r,e){var u=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var f=t[i],c=e?e(r[f],n[f],f,r,n):X;c===X&&(c=n[f]),u?Br(r,f,c):Sr(r,f,c)}return r}function Du(n,t){return $u(n,Is(n),t)}function Mu(n,t){return $u(n,Rs(n),t);
|
||||||
}function Du(n,r){return function(e,u){var i=yh(e)?t:Sr,o=r?r():{};return i(e,n,bi(u,2),o)}}function Mu(n){return ru(function(t,r){var e=-1,u=r.length,i=u>1?r[u-1]:Y,o=u>2?r[2]:Y;for(i=n.length>3&&"function"==typeof i?(u--,i):Y,o&&Li(r[0],r[1],o)&&(i=u<3?Y:i,u=1),t=cl(t);++e<u;){var f=r[e];f&&n(t,f,e,i)}return t})}function Fu(n,t){return function(r,e){if(null==r)return r;if(!Vf(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=cl(r);(t?i--:++i<u)&&e(o[i],i,o)!==!1;);return r}}function Nu(n){return function(t,r,e){
|
}function Fu(n,r){return function(e,u){var i=bh(e)?t:Lr,o=r?r():{};return i(e,n,mi(u,2),o)}}function Nu(n){return uu(function(t,r){var e=-1,u=r.length,i=u>1?r[u-1]:X,o=u>2?r[2]:X;for(i=n.length>3&&"function"==typeof i?(u--,i):X,o&&Ui(r[0],r[1],o)&&(i=u<3?X:i,u=1),t=ll(t);++e<u;){var f=r[e];f&&n(t,f,e,i)}return t})}function Pu(n,t){return function(r,e){if(null==r)return r;if(!Hf(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=ll(r);(t?i--:++i<u)&&e(o[i],i,o)!==!1;);return r}}function qu(n){return function(t,r,e){
|
||||||
for(var u=-1,i=cl(t),o=e(t),f=o.length;f--;){var c=o[n?f:++u];if(r(i[c],c,i)===!1)break}return t}}function Pu(n,t,r){function e(){return(this&&this!==Xr&&this instanceof e?i:n).apply(u?r:this,arguments)}var u=t&sn,i=Ku(n);return e}function qu(n){return function(t){t=Rc(t);var r=B(t)?V(t):Y,e=r?r[0]:t.charAt(0),u=r?Au(r,1).join(""):t.slice(1);return e[n]()+u}}function Zu(n){return function(t){return l(Oa(oa(t).replace(Ur,"")),n,"")}}function Ku(n){return function(){var t=arguments;switch(t.length){
|
for(var u=-1,i=ll(t),o=e(t),f=o.length;f--;){var c=o[n?f:++u];if(r(i[c],c,i)===!1)break}return t}}function Zu(n,t,r){function e(){return(this&&this!==re&&this instanceof e?i:n).apply(u?r:this,arguments)}var u=t&_n,i=Gu(n);return e}function Ku(n){return function(t){t=Ec(t);var r=T(t)?G(t):X,e=r?r[0]:t.charAt(0),u=r?Ou(r,1).join(""):t.slice(1);return e[n]()+u}}function Vu(n){return function(t){return l(Ra(ca(t).replace($r,"")),n,"")}}function Gu(n){return function(){var t=arguments;switch(t.length){
|
||||||
case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=_s(n.prototype),e=n.apply(r,t);return ic(e)?e:r}}function Vu(t,r,e){function u(){for(var o=arguments.length,f=el(o),c=o,a=di(u);c--;)f[c]=arguments[c];var l=o<3&&f[0]!==a&&f[o-1]!==a?[]:F(f,a);
|
case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=gs(n.prototype),e=n.apply(r,t);return fc(e)?e:r}}function Hu(t,r,e){function u(){for(var o=arguments.length,f=il(o),c=o,a=wi(u);c--;)f[c]=arguments[c];var l=o<3&&f[0]!==a&&f[o-1]!==a?[]:N(f,a);
|
||||||
return o-=l.length,o<e?ui(t,r,Ju,u.placeholder,Y,f,l,Y,Y,e-o):n(this&&this!==Xr&&this instanceof u?i:t,this,f)}var i=Ku(t);return u}function Gu(n){return function(t,r,e){var u=cl(t);if(!Vf(t)){var i=bi(r,3);t=Fc(t),r=function(n){return i(u[n],n,u)}}var o=n(t,r,e);return o>-1?u[i?t[o]:o]:Y}}function Hu(n){return _i(function(t){var r=t.length,e=r,u=H.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if("function"!=typeof i)throw new sl(tn);if(u&&!o&&"wrapper"==yi(i))var o=new H([],!0)}for(e=o?e:r;++e<r;){
|
return o-=l.length,o<e?oi(t,r,Qu,u.placeholder,X,f,l,X,X,e-o):n(this&&this!==re&&this instanceof u?i:t,this,f)}var i=Gu(t);return u}function Ju(n){return function(t,r,e){var u=ll(t);if(!Hf(t)){var i=mi(r,3);t=Pc(t),r=function(n){return i(u[n],n,u)}}var o=n(t,r,e);return o>-1?u[i?t[o]:o]:X}}function Yu(n){return gi(function(t){var r=t.length,e=r,u=Y.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if("function"!=typeof i)throw new pl(en);if(u&&!o&&"wrapper"==bi(i))var o=new Y([],!0)}for(e=o?e:r;++e<r;){
|
||||||
i=t[e];var f=yi(i),c="wrapper"==f?As(i):Y;o=c&&Bi(c[0])&&c[1]==(dn|_n|gn|bn)&&!c[4].length&&1==c[9]?o[yi(c[0])].apply(o,c[3]):1==i.length&&Bi(i)?o[f]():o.thru(i)}return function(){var n=arguments,e=n[0];if(o&&1==n.length&&yh(e))return o.plant(e).value();for(var u=0,i=r?t[u].apply(this,n):e;++u<r;)i=t[u].call(this,i);return i}})}function Ju(n,t,r,e,u,i,o,f,c,a){function l(){for(var y=arguments.length,d=el(y),b=y;b--;)d[b]=arguments[b];if(_)var w=di(l),m=L(d,w);if(e&&(d=Lu(d,e,u,_)),i&&(d=Cu(d,i,o,_)),
|
i=t[e];var f=bi(i),c="wrapper"==f?Os(i):X;o=c&&$i(c[0])&&c[1]==(mn|yn|bn|xn)&&!c[4].length&&1==c[9]?o[bi(c[0])].apply(o,c[3]):1==i.length&&$i(i)?o[f]():o.thru(i)}return function(){var n=arguments,e=n[0];if(o&&1==n.length&&bh(e))return o.plant(e).value();for(var u=0,i=r?t[u].apply(this,n):e;++u<r;)i=t[u].call(this,i);return i}})}function Qu(n,t,r,e,u,i,o,f,c,a){function l(){for(var y=arguments.length,d=il(y),b=y;b--;)d[b]=arguments[b];if(_)var w=wi(l),m=C(d,w);if(e&&(d=Uu(d,e,u,_)),i&&(d=Bu(d,i,o,_)),
|
||||||
y-=m,_&&y<a){return ui(n,t,Ju,l.placeholder,r,d,F(d,w),f,c,a-y)}var x=h?r:this,j=p?x[n]:n;return y=d.length,f?d=Vi(d,f):v&&y>1&&d.reverse(),s&&c<y&&(d.length=c),this&&this!==Xr&&this instanceof l&&(j=g||Ku(j)),j.apply(x,d)}var s=t&dn,h=t&sn,p=t&hn,_=t&(_n|vn),v=t&wn,g=p?Y:Ku(n);return l}function Yu(n,t){return function(r,e){return Ae(r,n,t(e),{})}}function Qu(n,t){return function(r,e){var u;if(r===Y&&e===Y)return t;if(r!==Y&&(u=r),e!==Y){if(u===Y)return e;"string"==typeof r||"string"==typeof e?(r=pu(r),
|
y-=m,_&&y<a){return oi(n,t,Qu,l.placeholder,r,d,N(d,w),f,c,a-y)}var x=h?r:this,j=p?x[n]:n;return y=d.length,f?d=Hi(d,f):v&&y>1&&d.reverse(),s&&c<y&&(d.length=c),this&&this!==re&&this instanceof l&&(j=g||Gu(j)),j.apply(x,d)}var s=t&mn,h=t&_n,p=t&vn,_=t&(yn|dn),v=t&jn,g=p?X:Gu(n);return l}function Xu(n,t){return function(r,e){return Oe(r,n,t(e),{})}}function ni(n,t){return function(r,e){var u;if(r===X&&e===X)return t;if(r!==X&&(u=r),e!==X){if(u===X)return e;"string"==typeof r||"string"==typeof e?(r=vu(r),
|
||||||
e=pu(e)):(r=hu(r),e=hu(e)),u=n(r,e)}return u}}function Xu(t){return _i(function(r){return r=c(r,R(bi())),ru(function(e){var u=this;return t(r,function(t){return n(t,u,e)})})})}function ni(n,t){t=t===Y?" ":pu(t);var r=t.length;if(r<2)return r?tu(t,n):t;var e=tu(t,Dl(n/K(t)));return B(t)?Au(V(e),0,n).join(""):e.slice(0,n)}function ti(t,r,e,u){function i(){for(var r=-1,c=arguments.length,a=-1,l=u.length,s=el(l+c),h=this&&this!==Xr&&this instanceof i?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++r];
|
e=vu(e)):(r=_u(r),e=_u(e)),u=n(r,e)}return u}}function ti(t){return gi(function(r){return r=c(r,z(mi())),uu(function(e){var u=this;return t(r,function(t){return n(t,u,e)})})})}function ri(n,t){t=t===X?" ":vu(t);var r=t.length;if(r<2)return r?eu(t,n):t;var e=eu(t,Fl(n/V(t)));return T(t)?Ou(G(e),0,n).join(""):e.slice(0,n)}function ei(t,r,e,u){function i(){for(var r=-1,c=arguments.length,a=-1,l=u.length,s=il(l+c),h=this&&this!==re&&this instanceof i?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++r];
|
||||||
return n(h,o?e:this,s)}var o=r&sn,f=Ku(t);return i}function ri(n){return function(t,r,e){return e&&"number"!=typeof e&&Li(t,r,e)&&(r=e=Y),t=xc(t),r===Y?(r=t,t=0):r=xc(r),e=e===Y?t<r?1:-1:xc(e),nu(t,r,e,n)}}function ei(n){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=kc(t),r=kc(r)),n(t,r)}}function ui(n,t,r,e,u,i,o,f,c,a){var l=t&_n,s=l?o:Y,h=l?Y:o,p=l?i:Y,_=l?Y:i;t|=l?gn:yn,t&=~(l?yn:gn),t&pn||(t&=~(sn|hn));var v=[n,t,u,p,s,_,h,f,c,a],g=r.apply(Y,v);return Bi(n)&&zs(g,v),g.placeholder=e,
|
return n(h,o?e:this,s)}var o=r&_n,f=Gu(t);return i}function ui(n){return function(t,r,e){return e&&"number"!=typeof e&&Ui(t,r,e)&&(r=e=X),t=Ac(t),r===X?(r=t,t=0):r=Ac(r),e=e===X?t<r?1:-1:Ac(e),ru(t,r,e,n)}}function ii(n){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=Ic(t),r=Ic(r)),n(t,r)}}function oi(n,t,r,e,u,i,o,f,c,a){var l=t&yn,s=l?o:X,h=l?X:o,p=l?i:X,_=l?X:i;t|=l?bn:wn,t&=~(l?wn:bn),t&gn||(t&=~(_n|vn));var v=[n,t,u,p,s,_,h,f,c,a],g=r.apply(X,v);return $i(n)&&Ss(g,v),g.placeholder=e,
|
||||||
Hi(g,n,t)}function ii(n){var t=fl[n];return function(n,r){if(n=kc(n),r=null==r?0:Vl(jc(r),292),r&&Pl(n)){var e=(Rc(n)+"e").split("e");return e=(Rc(t(e[0]+"e"+(+e[1]+r)))+"e").split("e"),+(e[0]+"e"+(+e[1]-r))}return t(n)}}function oi(n){return function(t){var r=Is(t);return r==Zn?D(t):r==Qn?P(t):I(t,n(t))}}function fi(n,t,r,e,u,i,o,f){var c=t&hn;if(!c&&"function"!=typeof n)throw new sl(tn);var a=e?e.length:0;if(a||(t&=~(gn|yn),e=u=Y),o=o===Y?o:Kl(jc(o),0),f=f===Y?f:jc(f),a-=u?u.length:0,t&yn){var l=e,s=u;
|
Yi(g,n,t)}function fi(n){var t=al[n];return function(n,r){if(n=Ic(n),r=null==r?0:Hl(kc(r),292),r&&Zl(n)){var e=(Ec(n)+"e").split("e");return e=(Ec(t(e[0]+"e"+(+e[1]+r)))+"e").split("e"),+(e[0]+"e"+(+e[1]-r))}return t(n)}}function ci(n){return function(t){var r=zs(t);return r==Gn?M(t):r==tt?q(t):I(t,n(t))}}function ai(n,t,r,e,u,i,o,f){var c=t&vn;if(!c&&"function"!=typeof n)throw new pl(en);var a=e?e.length:0;if(a||(t&=~(bn|wn),e=u=X),o=o===X?o:Gl(kc(o),0),f=f===X?f:kc(f),a-=u?u.length:0,t&wn){var l=e,s=u;
|
||||||
e=u=Y}var h=c?Y:As(n),p=[n,t,r,e,u,l,s,i,o,f];if(h&&Ni(p,h),n=p[0],t=p[1],r=p[2],e=p[3],u=p[4],f=p[9]=p[9]===Y?c?0:n.length:Kl(p[9]-a,0),!f&&t&(_n|vn)&&(t&=~(_n|vn)),t&&t!=sn)_=t==_n||t==vn?Vu(n,t,f):t!=gn&&t!=(sn|gn)||u.length?Ju.apply(Y,p):ti(n,t,r,e);else var _=Pu(n,t,r);return Hi((h?bs:zs)(_,p),n,t)}function ci(n,t,r,e){return n===Y||Kf(n,_l[r])&&!yl.call(e,r)?t:n}function ai(n,t,r,e,u,i){return ic(n)&&ic(t)&&(i.set(t,n),qe(n,t,Y,ai,i),i.delete(t)),n}function li(n){return _c(n)?Y:n}function si(n,t,r,e,u,i){
|
e=u=X}var h=c?X:Os(n),p=[n,t,r,e,u,l,s,i,o,f];if(h&&qi(p,h),n=p[0],t=p[1],r=p[2],e=p[3],u=p[4],f=p[9]=p[9]===X?c?0:n.length:Gl(p[9]-a,0),!f&&t&(yn|dn)&&(t&=~(yn|dn)),t&&t!=_n)_=t==yn||t==dn?Hu(n,t,f):t!=bn&&t!=(_n|bn)||u.length?Qu.apply(X,p):ei(n,t,r,e);else var _=Zu(n,t,r);return Yi((h?ms:Ss)(_,p),n,t)}function li(n,t,r,e){return n===X||Gf(n,gl[r])&&!bl.call(e,r)?t:n}function si(n,t,r,e,u,i){return fc(n)&&fc(t)&&(i.set(t,n),Ke(n,t,X,si,i),i.delete(t)),n}function hi(n){return gc(n)?X:n}function pi(n,t,r,e,u,i){
|
||||||
var o=r&an,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return!1;var a=i.get(n),l=i.get(t);if(a&&l)return a==t&&l==n;var s=-1,p=!0,_=r&ln?new vr:Y;for(i.set(n,t),i.set(t,n);++s<f;){var v=n[s],g=t[s];if(e)var y=o?e(g,v,s,t,n,i):e(v,g,s,n,t,i);if(y!==Y){if(y)continue;p=!1;break}if(_){if(!h(t,function(n,t){if(!E(_,t)&&(v===n||u(v,n,r,e,i)))return _.push(t)})){p=!1;break}}else if(v!==g&&!u(v,g,r,e,i)){p=!1;break}}return i.delete(n),i.delete(t),p}function hi(n,t,r,e,u,i,o){switch(r){case it:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;
|
var o=r&hn,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return!1;var a=i.get(n),l=i.get(t);if(a&&l)return a==t&&l==n;var s=-1,p=!0,_=r&pn?new yr:X;for(i.set(n,t),i.set(t,n);++s<f;){var v=n[s],g=t[s];if(e)var y=o?e(g,v,s,t,n,i):e(v,g,s,n,t,i);if(y!==X){if(y)continue;p=!1;break}if(_){if(!h(t,function(n,t){if(!S(_,t)&&(v===n||u(v,n,r,e,i)))return _.push(t)})){p=!1;break}}else if(v!==g&&!u(v,g,r,e,i)){p=!1;break}}return i.delete(n),i.delete(t),p}function _i(n,t,r,e,u,i,o){switch(r){case ct:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;
|
||||||
n=n.buffer,t=t.buffer;case ut:return!(n.byteLength!=t.byteLength||!i(new Ol(n),new Ol(t)));case Dn:case Mn:case Kn:return Kf(+n,+t);case Nn:return n.name==t.name&&n.message==t.message;case Yn:case Xn:return n==t+"";case Zn:var f=D;case Qn:var c=e&an;if(f||(f=N),n.size!=t.size&&!c)return!1;var a=o.get(n);if(a)return a==t;e|=ln,o.set(n,t);var l=si(f(n),f(t),e,u,i,o);return o.delete(n),l;case nt:if(hs)return hs.call(n)==hs.call(t)}return!1}function pi(n,t,r,e,u,i){var o=r&an,f=vi(n),c=f.length;if(c!=vi(t).length&&!o)return!1;
|
n=n.buffer,t=t.buffer;case ft:return!(n.byteLength!=t.byteLength||!i(new Rl(n),new Rl(t)));case Nn:case Pn:case Hn:return Gf(+n,+t);case Zn:return n.name==t.name&&n.message==t.message;case nt:case rt:return n==t+"";case Gn:var f=M;case tt:var c=e&hn;if(f||(f=P),n.size!=t.size&&!c)return!1;var a=o.get(n);if(a)return a==t;e|=pn,o.set(n,t);var l=pi(f(n),f(t),e,u,i,o);return o.delete(n),l;case et:if(_s)return _s.call(n)==_s.call(t)}return!1}function vi(n,t,r,e,u,i){var o=r&hn,f=yi(n),c=f.length;if(c!=yi(t).length&&!o)return!1;
|
||||||
for(var a=c;a--;){var l=f[a];if(!(o?l in t:yl.call(t,l)))return!1}var s=i.get(n),h=i.get(t);if(s&&h)return s==t&&h==n;var p=!0;i.set(n,t),i.set(t,n);for(var _=o;++a<c;){l=f[a];var v=n[l],g=t[l];if(e)var y=o?e(g,v,l,t,n,i):e(v,g,l,n,t,i);if(!(y===Y?v===g||u(v,g,r,e,i):y)){p=!1;break}_||(_="constructor"==l)}if(p&&!_){var d=n.constructor,b=t.constructor;d!=b&&"constructor"in n&&"constructor"in t&&!("function"==typeof d&&d instanceof d&&"function"==typeof b&&b instanceof b)&&(p=!1)}return i.delete(n),
|
for(var a=c;a--;){var l=f[a];if(!(o?l in t:bl.call(t,l)))return!1}var s=i.get(n),h=i.get(t);if(s&&h)return s==t&&h==n;var p=!0;i.set(n,t),i.set(t,n);for(var _=o;++a<c;){l=f[a];var v=n[l],g=t[l];if(e)var y=o?e(g,v,l,t,n,i):e(v,g,l,n,t,i);if(!(y===X?v===g||u(v,g,r,e,i):y)){p=!1;break}_||(_="constructor"==l)}if(p&&!_){var d=n.constructor,b=t.constructor;d!=b&&"constructor"in n&&"constructor"in t&&!("function"==typeof d&&d instanceof d&&"function"==typeof b&&b instanceof b)&&(p=!1)}return i.delete(n),
|
||||||
i.delete(t),p}function _i(n){return Ss(Zi(n,Y,ho),n+"")}function vi(n){return ye(n,Fc,ks)}function gi(n){return ye(n,Nc,Os)}function yi(n){for(var t=n.name+"",r=is[t],e=yl.call(is,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function di(n){return(yl.call(q,"placeholder")?q:n).placeholder}function bi(){var n=q.iteratee||Wa;return n=n===Wa?Te:n,arguments.length?n(arguments[0],arguments[1]):n}function wi(n,t){var r=n.__data__;return Ui(t)?r["string"==typeof t?"string":"hash"]:r.map;
|
i.delete(t),p}function gi(n){return Ls(Vi(n,X,_o),n+"")}function yi(n){return de(n,Pc,Is)}function di(n){return de(n,qc,Rs)}function bi(n){for(var t=n.name+"",r=fs[t],e=bl.call(fs,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function wi(n){return(bl.call(Z,"placeholder")?Z:n).placeholder}function mi(){var n=Z.iteratee||Ca;return n=n===Ca?De:n,arguments.length?n(arguments[0],arguments[1]):n}function xi(n,t){var r=n.__data__;return Ti(t)?r["string"==typeof t?"string":"hash"]:r.map;
|
||||||
}function mi(n){for(var t=Fc(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,Di(u)]}return t}function xi(n,t){var r=U(n,t);return Le(r)?r:Y}function ji(n){var t=yl.call(n,Cl),r=n[Cl];try{n[Cl]=Y;var e=!0}catch(n){}var u=wl.call(n);return e&&(t?n[Cl]=r:delete n[Cl]),u}function Ai(n,t,r){for(var e=-1,u=r.length;++e<u;){var i=r[e],o=i.size;switch(i.type){case"drop":n+=o;break;case"dropRight":t-=o;break;case"take":t=Vl(t,n+o);break;case"takeRight":n=Kl(n,t-o)}}return{start:n,end:t}}function ki(n){var t=n.match(Ct);
|
}function ji(n){for(var t=Pc(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,Fi(u)]}return t}function Ai(n,t){var r=B(n,t);return Ue(r)?r:X}function ki(n){var t=bl.call(n,Bl),r=n[Bl];try{n[Bl]=X;var e=!0}catch(n){}var u=xl.call(n);return e&&(t?n[Bl]=r:delete n[Bl]),u}function Oi(n,t,r){for(var e=-1,u=r.length;++e<u;){var i=r[e],o=i.size;switch(i.type){case"drop":n+=o;break;case"dropRight":t-=o;break;case"take":t=Hl(t,n+o);break;case"takeRight":n=Gl(n,t-o)}}return{start:n,end:t}}function Ii(n){var t=n.match(Bt);
|
||||||
return t?t[1].split(Ut):[]}function Oi(n,t,r){t=ju(t,n);for(var e=-1,u=t.length,i=!1;++e<u;){var o=Qi(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:(u=null==n?0:n.length,!!u&&uc(u)&&Wi(o,u)&&(yh(n)||gh(n)))}function Ii(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&yl.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Ri(n){return"function"!=typeof n.constructor||$i(n)?{}:_s(Rl(n))}function zi(n,t,r){var e=n.constructor;switch(t){case ut:return Ou(n);
|
return t?t[1].split(Tt):[]}function Ri(n,t,r){t=ku(t,n);for(var e=-1,u=t.length,i=!1;++e<u;){var o=no(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:(u=null==n?0:n.length,!!u&&oc(u)&&Ci(o,u)&&(bh(n)||dh(n)))}function zi(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&bl.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Ei(n){return"function"!=typeof n.constructor||Mi(n)?{}:gs(El(n))}function Si(n,t,r){var e=n.constructor;switch(t){case ft:return Ru(n);
|
||||||
case Dn:case Mn:return new e(+n);case it:return Iu(n,r);case ot:case ft:case ct:case at:case lt:case st:case ht:case pt:case _t:return Eu(n,r);case Zn:return new e;case Kn:case Xn:return new e(n);case Yn:return Ru(n);case Qn:return new e;case nt:return zu(n)}}function Ei(n,t){var r=t.length;if(!r)return n;var e=r-1;return t[e]=(r>1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(Lt,"{\n/* [wrapped with "+t+"] */\n")}function Si(n){return yh(n)||gh(n)||!!(Wl&&n&&n[Wl])}function Wi(n,t){var r=typeof n;
|
case Nn:case Pn:return new e(+n);case ct:return zu(n,r);case at:case lt:case st:case ht:case pt:case _t:case vt:case gt:case yt:return Wu(n,r);case Gn:return new e;case Hn:case rt:return new e(n);case nt:return Eu(n);case tt:return new e;case et:return Su(n)}}function Wi(n,t){var r=t.length;if(!r)return n;var e=r-1;return t[e]=(r>1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(Ut,"{\n/* [wrapped with "+t+"] */\n")}function Li(n){return bh(n)||dh(n)||!!(Cl&&n&&n[Cl])}function Ci(n,t){var r=typeof n;
|
||||||
return t=null==t?zn:t,!!t&&("number"==r||"symbol"!=r&&qt.test(n))&&n>-1&&n%1==0&&n<t}function Li(n,t,r){if(!ic(r))return!1;var e=typeof t;return!!("number"==e?Vf(r)&&Wi(t,r.length):"string"==e&&t in r)&&Kf(r[t],n)}function Ci(n,t){if(yh(n))return!1;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!yc(n))||(Ot.test(n)||!kt.test(n)||null!=t&&n in cl(t))}function Ui(n){var t=typeof n;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==n:null===n}function Bi(n){
|
return t=null==t?Wn:t,!!t&&("number"==r||"symbol"!=r&&Vt.test(n))&&n>-1&&n%1==0&&n<t}function Ui(n,t,r){if(!fc(r))return!1;var e=typeof t;return!!("number"==e?Hf(r)&&Ci(t,r.length):"string"==e&&t in r)&&Gf(r[t],n)}function Bi(n,t){if(bh(n))return!1;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!bc(n))||(zt.test(n)||!Rt.test(n)||null!=t&&n in ll(t))}function Ti(n){var t=typeof n;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==n:null===n}function $i(n){
|
||||||
var t=yi(n),r=q[t];if("function"!=typeof r||!(t in Bt.prototype))return!1;if(n===r)return!0;var e=As(r);return!!e&&n===e[0]}function Ti(n){return!!bl&&bl in n}function $i(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||_l)}function Di(n){return n===n&&!ic(n)}function Mi(n,t){return function(r){return null!=r&&(r[n]===t&&(t!==Y||n in cl(r)))}}function Fi(n){var t=Wf(n,function(n){return r.size===en&&r.clear(),n}),r=t.cache;return t}function Ni(n,t){var r=n[1],e=t[1],u=r|e,i=u<(sn|hn|dn),o=e==dn&&r==_n||e==dn&&r==bn&&n[7].length<=t[8]||e==(dn|bn)&&t[7].length<=t[8]&&r==_n;
|
var t=bi(n),r=Z[t];if("function"!=typeof r||!(t in Ct.prototype))return!1;if(n===r)return!0;var e=Os(r);return!!e&&n===e[0]}function Di(n){return!!ml&&ml in n}function Mi(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||gl)}function Fi(n){return n===n&&!fc(n)}function Ni(n,t){return function(r){return null!=r&&(r[n]===t&&(t!==X||n in ll(r)))}}function Pi(n){var t=Cf(n,function(n){return r.size===fn&&r.clear(),n}),r=t.cache;return t}function qi(n,t){var r=n[1],e=t[1],u=r|e,i=u<(_n|vn|mn),o=e==mn&&r==yn||e==mn&&r==xn&&n[7].length<=t[8]||e==(mn|xn)&&t[7].length<=t[8]&&r==yn;
|
||||||
if(!i&&!o)return n;e&sn&&(n[2]=t[2],u|=r&sn?0:pn);var f=t[3];if(f){var c=n[3];n[3]=c?Lu(c,f,t[4]):f,n[4]=c?F(n[3],un):t[4]}return f=t[5],f&&(c=n[5],n[5]=c?Cu(c,f,t[6]):f,n[6]=c?F(n[5],un):t[6]),f=t[7],f&&(n[7]=f),e&dn&&(n[8]=null==n[8]?t[8]:Vl(n[8],t[8])),null==n[9]&&(n[9]=t[9]),n[0]=t[0],n[1]=u,n}function Pi(n){var t=[];if(null!=n)for(var r in cl(n))t.push(r);return t}function qi(n){return wl.call(n)}function Zi(t,r,e){return r=Kl(r===Y?t.length-1:r,0),function(){for(var u=arguments,i=-1,o=Kl(u.length-r,0),f=el(o);++i<o;)f[i]=u[r+i];
|
if(!i&&!o)return n;e&_n&&(n[2]=t[2],u|=r&_n?0:gn);var f=t[3];if(f){var c=n[3];n[3]=c?Uu(c,f,t[4]):f,n[4]=c?N(n[3],cn):t[4]}return f=t[5],f&&(c=n[5],n[5]=c?Bu(c,f,t[6]):f,n[6]=c?N(n[5],cn):t[6]),f=t[7],f&&(n[7]=f),e&mn&&(n[8]=null==n[8]?t[8]:Hl(n[8],t[8])),null==n[9]&&(n[9]=t[9]),n[0]=t[0],n[1]=u,n}function Zi(n){var t=[];if(null!=n)for(var r in ll(n))t.push(r);return t}function Ki(n){return xl.call(n)}function Vi(t,r,e){return r=Gl(r===X?t.length-1:r,0),function(){for(var u=arguments,i=-1,o=Gl(u.length-r,0),f=il(o);++i<o;)f[i]=u[r+i];
|
||||||
i=-1;for(var c=el(r+1);++i<r;)c[i]=u[i];return c[r]=e(f),n(t,this,c)}}function Ki(n,t){return t.length<2?n:ve(n,fu(t,0,-1))}function Vi(n,t){for(var r=n.length,e=Vl(t.length,r),u=Uu(n);e--;){var i=t[e];n[e]=Wi(i,r)?u[i]:Y}return n}function Gi(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t]}function Hi(n,t,r){var e=t+"";return Ss(n,Ei(e,no(ki(e),r)))}function Ji(n){var t=0,r=0;return function(){var e=Gl(),u=An-(e-r);if(r=e,u>0){if(++t>=jn)return arguments[0]}else t=0;
|
i=-1;for(var c=il(r+1);++i<r;)c[i]=u[i];return c[r]=e(f),n(t,this,c)}}function Gi(n,t){return t.length<2?n:_e(n,au(t,0,-1))}function Hi(n,t){for(var r=n.length,e=Hl(t.length,r),u=Tu(n);e--;){var i=t[e];n[e]=Ci(i,r)?u[i]:X}return n}function Ji(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t]}function Yi(n,t,r){var e=t+"";return Ls(n,Wi(e,ro(Ii(e),r)))}function Qi(n){var t=0,r=0;return function(){var e=Jl(),u=In-(e-r);if(r=e,u>0){if(++t>=On)return arguments[0]}else t=0;
|
||||||
return n.apply(Y,arguments)}}function Yi(n,t){var r=-1,e=n.length,u=e-1;for(t=t===Y?e:t;++r<t;){var i=Xe(r,u),o=n[i];n[i]=n[r],n[r]=o}return n.length=t,n}function Qi(n){if("string"==typeof n||yc(n))return n;var t=n+"";return"0"==t&&1/n==-Rn?"-0":t}function Xi(n){if(null!=n){try{return gl.call(n)}catch(n){}try{return n+""}catch(n){}}return""}function no(n,t){return r(Un,function(r){var e="_."+r[0];t&r[1]&&!o(n,e)&&n.push(e)}),n.sort()}function to(n){if(n instanceof Bt)return n.clone();var t=new H(n.__wrapped__,n.__chain__);
|
return n.apply(X,arguments)}}function Xi(n,t){var r=-1,e=n.length,u=e-1;for(t=t===X?e:t;++r<t;){var i=tu(r,u),o=n[i];n[i]=n[r],n[r]=o}return n.length=t,n}function no(n){if("string"==typeof n||bc(n))return n;var t=n+"";return"0"==t&&1/n==-Sn?"-0":t}function to(n){if(null!=n){try{return dl.call(n)}catch(n){}try{return n+""}catch(n){}}return""}function ro(n,t){return r($n,function(r){var e="_."+r[0];t&r[1]&&!o(n,e)&&n.push(e)}),n.sort()}function eo(n){if(n instanceof Ct)return n.clone();var t=new Y(n.__wrapped__,n.__chain__);
|
||||||
return t.__actions__=Uu(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function ro(n,t,r){t=(r?Li(n,t,r):t===Y)?1:Kl(jc(t),0);var e=null==n?0:n.length;if(!e||t<1)return[];for(var u=0,i=0,o=el(Dl(e/t));u<e;)o[i++]=fu(n,u,u+=t);return o}function eo(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){var i=n[t];i&&(u[e++]=i)}return u}function uo(){var n=arguments.length;if(!n)return[];for(var t=el(n-1),r=arguments[0],e=n;e--;)t[e-1]=arguments[e];return a(yh(r)?Uu(r):[r],te(t,1));
|
return t.__actions__=Tu(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function uo(n,t,r){t=(r?Ui(n,t,r):t===X)?1:Gl(kc(t),0);var e=null==n?0:n.length;if(!e||t<1)return[];for(var u=0,i=0,o=il(Fl(e/t));u<e;)o[i++]=au(n,u,u+=t);return o}function io(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){var i=n[t];i&&(u[e++]=i)}return u}function oo(){var n=arguments.length;if(!n)return[];for(var t=il(n-1),r=arguments[0],e=n;e--;)t[e-1]=arguments[e];return a(bh(r)?Tu(r):[r],ee(t,1));
|
||||||
}function io(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===Y?1:jc(t),fu(n,t<0?0:t,e)):[]}function oo(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===Y?1:jc(t),t=e-t,fu(n,0,t<0?0:t)):[]}function fo(n,t){return n&&n.length?yu(n,bi(t,3),!0,!0):[]}function co(n,t){return n&&n.length?yu(n,bi(t,3),!0):[]}function ao(n,t,r,e){var u=null==n?0:n.length;return u?(r&&"number"!=typeof r&&Li(n,t,r)&&(r=0,e=u),Qr(n,t,r,e)):[]}function lo(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:jc(r);
|
}function fo(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),au(n,t<0?0:t,e)):[]}function co(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),t=e-t,au(n,0,t<0?0:t)):[]}function ao(n,t){return n&&n.length?bu(n,mi(t,3),!0,!0):[]}function lo(n,t){return n&&n.length?bu(n,mi(t,3),!0):[]}function so(n,t,r,e){var u=null==n?0:n.length;return u?(r&&"number"!=typeof r&&Ui(n,t,r)&&(r=0,e=u),ne(n,t,r,e)):[]}function ho(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:kc(r);
|
||||||
return u<0&&(u=Kl(e+u,0)),g(n,bi(t,3),u)}function so(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==Y&&(u=jc(r),u=r<0?Kl(e+u,0):Vl(u,e-1)),g(n,bi(t,3),u,!0)}function ho(n){return(null==n?0:n.length)?te(n,1):[]}function po(n){return(null==n?0:n.length)?te(n,Rn):[]}function _o(n,t){return(null==n?0:n.length)?(t=t===Y?1:jc(t),te(n,t)):[]}function vo(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){var u=n[t];e[u[0]]=u[1]}return e}function go(n){return n&&n.length?n[0]:Y}function yo(n,t,r){
|
return u<0&&(u=Gl(e+u,0)),g(n,mi(t,3),u)}function po(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==X&&(u=kc(r),u=r<0?Gl(e+u,0):Hl(u,e-1)),g(n,mi(t,3),u,!0)}function _o(n){return(null==n?0:n.length)?ee(n,1):[]}function vo(n){return(null==n?0:n.length)?ee(n,Sn):[]}function go(n,t){return(null==n?0:n.length)?(t=t===X?1:kc(t),ee(n,t)):[]}function yo(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){var u=n[t];e[u[0]]=u[1]}return e}function bo(n){return n&&n.length?n[0]:X}function wo(n,t,r){
|
||||||
var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:jc(r);return u<0&&(u=Kl(e+u,0)),y(n,t,u)}function bo(n){return(null==n?0:n.length)?fu(n,0,-1):[]}function wo(n,t){return null==n?"":ql.call(n,t)}function mo(n){var t=null==n?0:n.length;return t?n[t-1]:Y}function xo(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;return r!==Y&&(u=jc(r),u=u<0?Kl(e+u,0):Vl(u,e-1)),t===t?Z(n,t,u):g(n,b,u,!0)}function jo(n,t){return n&&n.length?Ke(n,jc(t)):Y}function Ao(n,t){return n&&n.length&&t&&t.length?Ye(n,t):n;
|
var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:kc(r);return u<0&&(u=Gl(e+u,0)),y(n,t,u)}function mo(n){return(null==n?0:n.length)?au(n,0,-1):[]}function xo(n,t){return null==n?"":Kl.call(n,t)}function jo(n){var t=null==n?0:n.length;return t?n[t-1]:X}function Ao(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;return r!==X&&(u=kc(r),u=u<0?Gl(e+u,0):Hl(u,e-1)),t===t?K(n,t,u):g(n,b,u,!0)}function ko(n,t){return n&&n.length?Ge(n,kc(t)):X}function Oo(n,t){return n&&n.length&&t&&t.length?Xe(n,t):n;
|
||||||
}function ko(n,t,r){return n&&n.length&&t&&t.length?Ye(n,t,bi(r,2)):n}function Oo(n,t,r){return n&&n.length&&t&&t.length?Ye(n,t,Y,r):n}function Io(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=bi(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),u.push(e))}return Qe(n,u),r}function Ro(n){return null==n?n:Yl.call(n)}function zo(n,t,r){var e=null==n?0:n.length;return e?(r&&"number"!=typeof r&&Li(n,t,r)?(t=0,r=e):(t=null==t?0:jc(t),r=r===Y?e:jc(r)),fu(n,t,r)):[]}function Eo(n,t){
|
}function Io(n,t,r){return n&&n.length&&t&&t.length?Xe(n,t,mi(r,2)):n}function Ro(n,t,r){return n&&n.length&&t&&t.length?Xe(n,t,X,r):n}function zo(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=mi(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),u.push(e))}return nu(n,u),r}function Eo(n){return null==n?n:Xl.call(n)}function So(n,t,r){var e=null==n?0:n.length;return e?(r&&"number"!=typeof r&&Ui(n,t,r)?(t=0,r=e):(t=null==t?0:kc(t),r=r===X?e:kc(r)),au(n,t,r)):[]}function Wo(n,t){
|
||||||
return au(n,t)}function So(n,t,r){return lu(n,t,bi(r,2))}function Wo(n,t){var r=null==n?0:n.length;if(r){var e=au(n,t);if(e<r&&Kf(n[e],t))return e}return-1}function Lo(n,t){return au(n,t,!0)}function Co(n,t,r){return lu(n,t,bi(r,2),!0)}function Uo(n,t){if(null==n?0:n.length){var r=au(n,t,!0)-1;if(Kf(n[r],t))return r}return-1}function Bo(n){return n&&n.length?su(n):[]}function To(n,t){return n&&n.length?su(n,bi(t,2)):[]}function $o(n){var t=null==n?0:n.length;return t?fu(n,1,t):[]}function Do(n,t,r){
|
return su(n,t)}function Lo(n,t,r){return hu(n,t,mi(r,2))}function Co(n,t){var r=null==n?0:n.length;if(r){var e=su(n,t);if(e<r&&Gf(n[e],t))return e}return-1}function Uo(n,t){return su(n,t,!0)}function Bo(n,t,r){return hu(n,t,mi(r,2),!0)}function To(n,t){if(null==n?0:n.length){var r=su(n,t,!0)-1;if(Gf(n[r],t))return r}return-1}function $o(n){return n&&n.length?pu(n):[]}function Do(n,t){return n&&n.length?pu(n,mi(t,2)):[]}function Mo(n){var t=null==n?0:n.length;return t?au(n,1,t):[]}function Fo(n,t,r){
|
||||||
return n&&n.length?(t=r||t===Y?1:jc(t),fu(n,0,t<0?0:t)):[]}function Mo(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===Y?1:jc(t),t=e-t,fu(n,t<0?0:t,e)):[]}function Fo(n,t){return n&&n.length?yu(n,bi(t,3),!1,!0):[]}function No(n,t){return n&&n.length?yu(n,bi(t,3)):[]}function Po(n){return n&&n.length?_u(n):[]}function qo(n,t){return n&&n.length?_u(n,bi(t,2)):[]}function Zo(n,t){return t="function"==typeof t?t:Y,n&&n.length?_u(n,Y,t):[]}function Ko(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){
|
return n&&n.length?(t=r||t===X?1:kc(t),au(n,0,t<0?0:t)):[]}function No(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),t=e-t,au(n,t<0?0:t,e)):[]}function Po(n,t){return n&&n.length?bu(n,mi(t,3),!1,!0):[]}function qo(n,t){return n&&n.length?bu(n,mi(t,3)):[]}function Zo(n){return n&&n.length?gu(n):[]}function Ko(n,t){return n&&n.length?gu(n,mi(t,2)):[]}function Vo(n,t){return t="function"==typeof t?t:X,n&&n.length?gu(n,X,t):[]}function Go(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){
|
||||||
if(Gf(n))return t=Kl(n.length,t),!0}),O(t,function(t){return c(n,m(t))})}function Vo(t,r){if(!t||!t.length)return[];var e=Ko(t);return null==r?e:c(e,function(t){return n(r,Y,t)})}function Go(n,t){return wu(n||[],t||[],zr)}function Ho(n,t){return wu(n||[],t||[],iu)}function Jo(n){var t=q(n);return t.__chain__=!0,t}function Yo(n,t){return t(n),n}function Qo(n,t){return t(n)}function Xo(){return Jo(this)}function nf(){return new H(this.value(),this.__chain__)}function tf(){this.__values__===Y&&(this.__values__=mc(this.value()));
|
if(Jf(n))return t=Gl(n.length,t),!0}),O(t,function(t){return c(n,m(t))})}function Ho(t,r){if(!t||!t.length)return[];var e=Go(t);return null==r?e:c(e,function(t){return n(r,X,t)})}function Jo(n,t){return xu(n||[],t||[],Sr)}function Yo(n,t){return xu(n||[],t||[],fu)}function Qo(n){var t=Z(n);return t.__chain__=!0,t}function Xo(n,t){return t(n),n}function nf(n,t){return t(n)}function tf(){return Qo(this)}function rf(){return new Y(this.value(),this.__chain__)}function ef(){this.__values__===X&&(this.__values__=jc(this.value()));
|
||||||
var n=this.__index__>=this.__values__.length;return{done:n,value:n?Y:this.__values__[this.__index__++]}}function rf(){return this}function ef(n){for(var t,r=this;r instanceof G;){var e=to(r);e.__index__=0,e.__values__=Y,t?u.__wrapped__=e:t=e;var u=e;r=r.__wrapped__}return u.__wrapped__=n,t}function uf(){var n=this.__wrapped__;if(n instanceof Bt){var t=n;return this.__actions__.length&&(t=new Bt(this)),t=t.reverse(),t.__actions__.push({func:Qo,args:[Ro],thisArg:Y}),new H(t,this.__chain__)}return this.thru(Ro);
|
var n=this.__index__>=this.__values__.length;return{done:n,value:n?X:this.__values__[this.__index__++]}}function uf(){return this}function of(n){for(var t,r=this;r instanceof J;){var e=eo(r);e.__index__=0,e.__values__=X,t?u.__wrapped__=e:t=e;var u=e;r=r.__wrapped__}return u.__wrapped__=n,t}function ff(){var n=this.__wrapped__;if(n instanceof Ct){var t=n;return this.__actions__.length&&(t=new Ct(this)),t=t.reverse(),t.__actions__.push({func:nf,args:[Eo],thisArg:X}),new Y(t,this.__chain__)}return this.thru(Eo);
|
||||||
}function of(){return du(this.__wrapped__,this.__actions__)}function ff(n,t,r){var e=yh(n)?u:Gr;return r&&Li(n,t,r)&&(t=Y),e(n,bi(t,3))}function cf(n,t){return(yh(n)?i:ne)(n,bi(t,3))}function af(n,t){return te(vf(n,t),1)}function lf(n,t){return te(vf(n,t),Rn)}function sf(n,t,r){return r=r===Y?1:jc(r),te(vf(n,t),r)}function hf(n,t){return(yh(n)?r:vs)(n,bi(t,3))}function pf(n,t){return(yh(n)?e:gs)(n,bi(t,3))}function _f(n,t,r,e){n=Vf(n)?n:na(n),r=r&&!e?jc(r):0;var u=n.length;return r<0&&(r=Kl(u+r,0)),
|
}function cf(){return wu(this.__wrapped__,this.__actions__)}function af(n,t,r){var e=bh(n)?u:Jr;return r&&Ui(n,t,r)&&(t=X),e(n,mi(t,3))}function lf(n,t){return(bh(n)?i:te)(n,mi(t,3))}function sf(n,t){return ee(yf(n,t),1)}function hf(n,t){return ee(yf(n,t),Sn)}function pf(n,t,r){return r=r===X?1:kc(r),ee(yf(n,t),r)}function _f(n,t){return(bh(n)?r:ys)(n,mi(t,3))}function vf(n,t){return(bh(n)?e:ds)(n,mi(t,3))}function gf(n,t,r,e){n=Hf(n)?n:ra(n),r=r&&!e?kc(r):0;var u=n.length;return r<0&&(r=Gl(u+r,0)),
|
||||||
gc(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&y(n,t,r)>-1}function vf(n,t){return(yh(n)?c:Fe)(n,bi(t,3))}function gf(n,t,r,e){return null==n?[]:(yh(t)||(t=null==t?[]:[t]),r=e?Y:r,yh(r)||(r=null==r?[]:[r]),Ve(n,t,r))}function yf(n,t,r){var e=yh(n)?l:j,u=arguments.length<3;return e(n,bi(t,4),r,u,vs)}function df(n,t,r){var e=yh(n)?s:j,u=arguments.length<3;return e(n,bi(t,4),r,u,gs)}function bf(n,t){return(yh(n)?i:ne)(n,Lf(bi(t,3)))}function wf(n){return(yh(n)?kr:eu)(n)}function mf(n,t,r){return t=(r?Li(n,t,r):t===Y)?1:jc(t),
|
dc(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&y(n,t,r)>-1}function yf(n,t){return(bh(n)?c:Pe)(n,mi(t,3))}function df(n,t,r,e){return null==n?[]:(bh(t)||(t=null==t?[]:[t]),r=e?X:r,bh(r)||(r=null==r?[]:[r]),He(n,t,r))}function bf(n,t,r){var e=bh(n)?l:j,u=arguments.length<3;return e(n,mi(t,4),r,u,ys)}function wf(n,t,r){var e=bh(n)?s:j,u=arguments.length<3;return e(n,mi(t,4),r,u,ds)}function mf(n,t){return(bh(n)?i:te)(n,Uf(mi(t,3)))}function xf(n){return(bh(n)?Ir:iu)(n)}function jf(n,t,r){return t=(r?Ui(n,t,r):t===X)?1:kc(t),
|
||||||
(yh(n)?Or:uu)(n,t)}function xf(n){return(yh(n)?Ir:ou)(n)}function jf(n){if(null==n)return 0;if(Vf(n))return gc(n)?K(n):n.length;var t=Is(n);return t==Zn||t==Qn?n.size:$e(n).length}function Af(n,t,r){var e=yh(n)?h:cu;return r&&Li(n,t,r)&&(t=Y),e(n,bi(t,3))}function kf(n,t){if("function"!=typeof t)throw new sl(tn);return n=jc(n),function(){if(--n<1)return t.apply(this,arguments)}}function Of(n,t,r){return t=r?Y:t,t=n&&null==t?n.length:t,fi(n,dn,Y,Y,Y,Y,t)}function If(n,t){var r;if("function"!=typeof t)throw new sl(tn);
|
(bh(n)?Rr:ou)(n,t)}function Af(n){return(bh(n)?zr:cu)(n)}function kf(n){if(null==n)return 0;if(Hf(n))return dc(n)?V(n):n.length;var t=zs(n);return t==Gn||t==tt?n.size:Me(n).length}function Of(n,t,r){var e=bh(n)?h:lu;return r&&Ui(n,t,r)&&(t=X),e(n,mi(t,3))}function If(n,t){if("function"!=typeof t)throw new pl(en);return n=kc(n),function(){if(--n<1)return t.apply(this,arguments)}}function Rf(n,t,r){return t=r?X:t,t=n&&null==t?n.length:t,ai(n,mn,X,X,X,X,t)}function zf(n,t){var r;if("function"!=typeof t)throw new pl(en);
|
||||||
return n=jc(n),function(){return--n>0&&(r=t.apply(this,arguments)),n<=1&&(t=Y),r}}function Rf(n,t,r){t=r?Y:t;var e=fi(n,_n,Y,Y,Y,Y,Y,t);return e.placeholder=Rf.placeholder,e}function zf(n,t,r){t=r?Y:t;var e=fi(n,vn,Y,Y,Y,Y,Y,t);return e.placeholder=zf.placeholder,e}function Ef(n,t,r){function e(t){var r=h,e=p;return h=p=Y,d=t,v=n.apply(e,r)}function u(n){return d=n,g=Es(f,t),b?e(n):v}function i(n){var r=n-y,e=n-d,u=t-r;return w?Vl(u,_-e):u}function o(n){var r=n-y,e=n-d;return y===Y||r>=t||r<0||w&&e>=_;
|
return n=kc(n),function(){return--n>0&&(r=t.apply(this,arguments)),n<=1&&(t=X),r}}function Ef(n,t,r){t=r?X:t;var e=ai(n,yn,X,X,X,X,X,t);return e.placeholder=Ef.placeholder,e}function Sf(n,t,r){t=r?X:t;var e=ai(n,dn,X,X,X,X,X,t);return e.placeholder=Sf.placeholder,e}function Wf(n,t,r){function e(t){var r=h,e=p;return h=p=X,d=t,v=n.apply(e,r)}function u(n){return d=n,g=Ws(f,t),b?e(n):v}function i(n){var r=n-y,e=n-d,u=t-r;return w?Hl(u,_-e):u}function o(n){var r=n-y,e=n-d;return y===X||r>=t||r<0||w&&e>=_;
|
||||||
}function f(){var n=ih();return o(n)?c(n):(g=Es(f,i(n)),Y)}function c(n){return g=Y,m&&h?e(n):(h=p=Y,v)}function a(){g!==Y&&xs(g),d=0,h=y=p=g=Y}function l(){return g===Y?v:c(ih())}function s(){var n=ih(),r=o(n);if(h=arguments,p=this,y=n,r){if(g===Y)return u(y);if(w)return xs(g),g=Es(f,t),e(y)}return g===Y&&(g=Es(f,t)),v}var h,p,_,v,g,y,d=0,b=!1,w=!1,m=!0;if("function"!=typeof n)throw new sl(tn);return t=kc(t)||0,ic(r)&&(b=!!r.leading,w="maxWait"in r,_=w?Kl(kc(r.maxWait)||0,t):_,m="trailing"in r?!!r.trailing:m),
|
}function f(){var n=fh();return o(n)?c(n):(g=Ws(f,i(n)),X)}function c(n){return g=X,m&&h?e(n):(h=p=X,v)}function a(){g!==X&&As(g),d=0,h=y=p=g=X}function l(){return g===X?v:c(fh())}function s(){var n=fh(),r=o(n);if(h=arguments,p=this,y=n,r){if(g===X)return u(y);if(w)return As(g),g=Ws(f,t),e(y)}return g===X&&(g=Ws(f,t)),v}var h,p,_,v,g,y,d=0,b=!1,w=!1,m=!0;if("function"!=typeof n)throw new pl(en);return t=Ic(t)||0,fc(r)&&(b=!!r.leading,w="maxWait"in r,_=w?Gl(Ic(r.maxWait)||0,t):_,m="trailing"in r?!!r.trailing:m),
|
||||||
s.cancel=a,s.flush=l,s}function Sf(n){return fi(n,wn)}function Wf(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new sl(tn);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(Wf.Cache||ar),r}function Lf(n){if("function"!=typeof n)throw new sl(tn);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:
|
s.cancel=a,s.flush=l,s}function Lf(n){return ai(n,jn)}function Cf(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new pl(en);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(Cf.Cache||sr),r}function Uf(n){if("function"!=typeof n)throw new pl(en);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:
|
||||||
return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function Cf(n){return If(2,n)}function Uf(n,t){if("function"!=typeof n)throw new sl(tn);return t=t===Y?t:jc(t),ru(n,t)}function Bf(t,r){if("function"!=typeof t)throw new sl(tn);return r=null==r?0:Kl(jc(r),0),ru(function(e){var u=e[r],i=Au(e,0,r);return u&&a(i,u),n(t,this,i)})}function Tf(n,t,r){var e=!0,u=!0;if("function"!=typeof n)throw new sl(tn);return ic(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),
|
return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function Bf(n){return zf(2,n)}function Tf(n,t){if("function"!=typeof n)throw new pl(en);return t=t===X?t:kc(t),uu(n,t)}function $f(t,r){if("function"!=typeof t)throw new pl(en);return r=null==r?0:Gl(kc(r),0),uu(function(e){var u=e[r],i=Ou(e,0,r);return u&&a(i,u),n(t,this,i)})}function Df(n,t,r){var e=!0,u=!0;if("function"!=typeof n)throw new pl(en);return fc(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),
|
||||||
Ef(n,t,{leading:e,maxWait:t,trailing:u})}function $f(n){return Of(n,1)}function Df(n,t){return sh(xu(t),n)}function Mf(){if(!arguments.length)return[];var n=arguments[0];return yh(n)?n:[n]}function Ff(n){return Dr(n,cn)}function Nf(n,t){return t="function"==typeof t?t:Y,Dr(n,cn,t)}function Pf(n){return Dr(n,on|cn)}function qf(n,t){return t="function"==typeof t?t:Y,Dr(n,on|cn,t)}function Zf(n,t){return null==t||Zr(n,t,Fc(t))}function Kf(n,t){return n===t||n!==n&&t!==t}function Vf(n){return null!=n&&uc(n.length)&&!rc(n);
|
Wf(n,t,{leading:e,maxWait:t,trailing:u})}function Mf(n){return Rf(n,1)}function Ff(n,t){return ph(Au(t),n)}function Nf(){if(!arguments.length)return[];var n=arguments[0];return bh(n)?n:[n]}function Pf(n){return Fr(n,sn)}function qf(n,t){return t="function"==typeof t?t:X,Fr(n,sn,t)}function Zf(n){return Fr(n,an|sn)}function Kf(n,t){return t="function"==typeof t?t:X,Fr(n,an|sn,t)}function Vf(n,t){return null==t||Pr(n,t,Pc(t))}function Gf(n,t){return n===t||n!==n&&t!==t}function Hf(n){return null!=n&&oc(n.length)&&!uc(n);
|
||||||
}function Gf(n){return oc(n)&&Vf(n)}function Hf(n){return n===!0||n===!1||oc(n)&&de(n)==Dn}function Jf(n){return oc(n)&&1===n.nodeType&&!_c(n)}function Yf(n){if(null==n)return!0;if(Vf(n)&&(yh(n)||"string"==typeof n||"function"==typeof n.splice||bh(n)||Ah(n)||gh(n)))return!n.length;var t=Is(n);if(t==Zn||t==Qn)return!n.size;if($i(n))return!$e(n).length;for(var r in n)if(yl.call(n,r))return!1;return!0}function Qf(n,t){return ze(n,t)}function Xf(n,t,r){r="function"==typeof r?r:Y;var e=r?r(n,t):Y;return e===Y?ze(n,t,Y,r):!!e;
|
}function Jf(n){return cc(n)&&Hf(n)}function Yf(n){return n===!0||n===!1||cc(n)&&we(n)==Nn}function Qf(n){return cc(n)&&1===n.nodeType&&!gc(n)}function Xf(n){if(null==n)return!0;if(Hf(n)&&(bh(n)||"string"==typeof n||"function"==typeof n.splice||mh(n)||Oh(n)||dh(n)))return!n.length;var t=zs(n);if(t==Gn||t==tt)return!n.size;if(Mi(n))return!Me(n).length;for(var r in n)if(bl.call(n,r))return!1;return!0}function nc(n,t){return Se(n,t)}function tc(n,t,r){r="function"==typeof r?r:X;var e=r?r(n,t):X;return e===X?Se(n,t,X,r):!!e;
|
||||||
}function nc(n){if(!oc(n))return!1;var t=de(n);return t==Nn||t==Fn||"string"==typeof n.message&&"string"==typeof n.name&&!_c(n)}function tc(n){return"number"==typeof n&&Pl(n)}function rc(n){if(!ic(n))return!1;var t=de(n);return t==Pn||t==qn||t==$n||t==Jn}function ec(n){return"number"==typeof n&&n==jc(n)}function uc(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=zn}function ic(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function oc(n){return null!=n&&"object"==typeof n}function fc(n,t){
|
}function rc(n){if(!cc(n))return!1;var t=we(n);return t==Zn||t==qn||"string"==typeof n.message&&"string"==typeof n.name&&!gc(n)}function ec(n){return"number"==typeof n&&Zl(n)}function uc(n){if(!fc(n))return!1;var t=we(n);return t==Kn||t==Vn||t==Fn||t==Xn}function ic(n){return"number"==typeof n&&n==kc(n)}function oc(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=Wn}function fc(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function cc(n){return null!=n&&"object"==typeof n}function ac(n,t){
|
||||||
return n===t||We(n,t,mi(t))}function cc(n,t,r){return r="function"==typeof r?r:Y,We(n,t,mi(t),r)}function ac(n){return pc(n)&&n!=+n}function lc(n){if(Rs(n))throw new il(nn);return Le(n)}function sc(n){return null===n}function hc(n){return null==n}function pc(n){return"number"==typeof n||oc(n)&&de(n)==Kn}function _c(n){if(!oc(n)||de(n)!=Gn)return!1;var t=Rl(n);if(null===t)return!0;var r=yl.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&gl.call(r)==ml}function vc(n){
|
return n===t||Ce(n,t,ji(t))}function lc(n,t,r){return r="function"==typeof r?r:X,Ce(n,t,ji(t),r)}function sc(n){return vc(n)&&n!=+n}function hc(n){if(Es(n))throw new fl(rn);return Ue(n)}function pc(n){return null===n}function _c(n){return null==n}function vc(n){return"number"==typeof n||cc(n)&&we(n)==Hn}function gc(n){if(!cc(n)||we(n)!=Yn)return!1;var t=El(n);if(null===t)return!0;var r=bl.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&dl.call(r)==jl}function yc(n){
|
||||||
return ec(n)&&n>=-zn&&n<=zn}function gc(n){return"string"==typeof n||!yh(n)&&oc(n)&&de(n)==Xn}function yc(n){return"symbol"==typeof n||oc(n)&&de(n)==nt}function dc(n){return n===Y}function bc(n){return oc(n)&&Is(n)==rt}function wc(n){return oc(n)&&de(n)==et}function mc(n){if(!n)return[];if(Vf(n))return gc(n)?V(n):Uu(n);if(Ll&&n[Ll])return $(n[Ll]());var t=Is(n);return(t==Zn?D:t==Qn?N:na)(n)}function xc(n){if(!n)return 0===n?n:0;if(n=kc(n),n===Rn||n===-Rn){return(n<0?-1:1)*En}return n===n?n:0}function jc(n){
|
return ic(n)&&n>=-Wn&&n<=Wn}function dc(n){return"string"==typeof n||!bh(n)&&cc(n)&&we(n)==rt}function bc(n){return"symbol"==typeof n||cc(n)&&we(n)==et}function wc(n){return n===X}function mc(n){return cc(n)&&zs(n)==it}function xc(n){return cc(n)&&we(n)==ot}function jc(n){if(!n)return[];if(Hf(n))return dc(n)?G(n):Tu(n);if(Ul&&n[Ul])return D(n[Ul]());var t=zs(n);return(t==Gn?M:t==tt?P:ra)(n)}function Ac(n){if(!n)return 0===n?n:0;if(n=Ic(n),n===Sn||n===-Sn){return(n<0?-1:1)*Ln}return n===n?n:0}function kc(n){
|
||||||
var t=xc(n),r=t%1;return t===t?r?t-r:t:0}function Ac(n){return n?$r(jc(n),0,Wn):0}function kc(n){if("number"==typeof n)return n;if(yc(n))return Sn;if(ic(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=ic(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=n.replace(Et,"");var r=Ft.test(n);return r||Pt.test(n)?Jr(n.slice(2),r?2:8):Mt.test(n)?Sn:+n}function Oc(n){return Bu(n,Nc(n))}function Ic(n){return n?$r(jc(n),-zn,zn):0===n?n:0}function Rc(n){return null==n?"":pu(n)}function zc(n,t){var r=_s(n);
|
var t=Ac(n),r=t%1;return t===t?r?t-r:t:0}function Oc(n){return n?Mr(kc(n),0,Un):0}function Ic(n){if("number"==typeof n)return n;if(bc(n))return Cn;if(fc(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=fc(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=R(n);var r=qt.test(n);return r||Kt.test(n)?Xr(n.slice(2),r?2:8):Pt.test(n)?Cn:+n}function Rc(n){return $u(n,qc(n))}function zc(n){return n?Mr(kc(n),-Wn,Wn):0===n?n:0}function Ec(n){return null==n?"":vu(n)}function Sc(n,t){var r=gs(n);return null==t?r:Cr(r,t);
|
||||||
return null==t?r:Wr(r,t)}function Ec(n,t){return v(n,bi(t,3),ee)}function Sc(n,t){return v(n,bi(t,3),ue)}function Wc(n,t){return null==n?n:ys(n,bi(t,3),Nc)}function Lc(n,t){return null==n?n:ds(n,bi(t,3),Nc)}function Cc(n,t){return n&&ee(n,bi(t,3))}function Uc(n,t){return n&&ue(n,bi(t,3))}function Bc(n){return null==n?[]:se(n,Fc(n))}function Tc(n){return null==n?[]:se(n,Nc(n))}function $c(n,t,r){var e=null==n?Y:ve(n,t);return e===Y?r:e}function Dc(n,t){return null!=n&&Oi(n,t,we)}function Mc(n,t){return null!=n&&Oi(n,t,me);
|
}function Wc(n,t){return v(n,mi(t,3),ue)}function Lc(n,t){return v(n,mi(t,3),oe)}function Cc(n,t){return null==n?n:bs(n,mi(t,3),qc)}function Uc(n,t){return null==n?n:ws(n,mi(t,3),qc)}function Bc(n,t){return n&&ue(n,mi(t,3))}function Tc(n,t){return n&&oe(n,mi(t,3))}function $c(n){return null==n?[]:fe(n,Pc(n))}function Dc(n){return null==n?[]:fe(n,qc(n))}function Mc(n,t,r){var e=null==n?X:_e(n,t);return e===X?r:e}function Fc(n,t){return null!=n&&Ri(n,t,xe)}function Nc(n,t){return null!=n&&Ri(n,t,je);
|
||||||
}function Fc(n){return Vf(n)?Ar(n):$e(n)}function Nc(n){return Vf(n)?Ar(n,!0):De(n)}function Pc(n,t){var r={};return t=bi(t,3),ee(n,function(n,e,u){Cr(r,t(n,e,u),n)}),r}function qc(n,t){var r={};return t=bi(t,3),ee(n,function(n,e,u){Cr(r,e,t(n,e,u))}),r}function Zc(n,t){return Kc(n,Lf(bi(t)))}function Kc(n,t){if(null==n)return{};var r=c(gi(n),function(n){return[n]});return t=bi(t),He(n,r,function(n,r){return t(n,r[0])})}function Vc(n,t,r){t=ju(t,n);var e=-1,u=t.length;for(u||(u=1,n=Y);++e<u;){var i=null==n?Y:n[Qi(t[e])];
|
}function Pc(n){return Hf(n)?Or(n):Me(n)}function qc(n){return Hf(n)?Or(n,!0):Fe(n)}function Zc(n,t){var r={};return t=mi(t,3),ue(n,function(n,e,u){Br(r,t(n,e,u),n)}),r}function Kc(n,t){var r={};return t=mi(t,3),ue(n,function(n,e,u){Br(r,e,t(n,e,u))}),r}function Vc(n,t){return Gc(n,Uf(mi(t)))}function Gc(n,t){if(null==n)return{};var r=c(di(n),function(n){return[n]});return t=mi(t),Ye(n,r,function(n,r){return t(n,r[0])})}function Hc(n,t,r){t=ku(t,n);var e=-1,u=t.length;for(u||(u=1,n=X);++e<u;){var i=null==n?X:n[no(t[e])];
|
||||||
i===Y&&(e=u,i=r),n=rc(i)?i.call(n):i}return n}function Gc(n,t,r){return null==n?n:iu(n,t,r)}function Hc(n,t,r,e){return e="function"==typeof e?e:Y,null==n?n:iu(n,t,r,e)}function Jc(n,t,e){var u=yh(n),i=u||bh(n)||Ah(n);if(t=bi(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:ic(n)&&rc(o)?_s(Rl(n)):{}}return(i?r:ee)(n,function(n,r,u){return t(e,n,r,u)}),e}function Yc(n,t){return null==n||vu(n,t)}function Qc(n,t,r){return null==n?n:gu(n,t,xu(r))}function Xc(n,t,r,e){return e="function"==typeof e?e:Y,
|
i===X&&(e=u,i=r),n=uc(i)?i.call(n):i}return n}function Jc(n,t,r){return null==n?n:fu(n,t,r)}function Yc(n,t,r,e){return e="function"==typeof e?e:X,null==n?n:fu(n,t,r,e)}function Qc(n,t,e){var u=bh(n),i=u||mh(n)||Oh(n);if(t=mi(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:fc(n)&&uc(o)?gs(El(n)):{}}return(i?r:ue)(n,function(n,r,u){return t(e,n,r,u)}),e}function Xc(n,t){return null==n||yu(n,t)}function na(n,t,r){return null==n?n:du(n,t,Au(r))}function ta(n,t,r,e){return e="function"==typeof e?e:X,
|
||||||
null==n?n:gu(n,t,xu(r),e)}function na(n){return null==n?[]:z(n,Fc(n))}function ta(n){return null==n?[]:z(n,Nc(n))}function ra(n,t,r){return r===Y&&(r=t,t=Y),r!==Y&&(r=kc(r),r=r===r?r:0),t!==Y&&(t=kc(t),t=t===t?t:0),$r(kc(n),t,r)}function ea(n,t,r){return t=xc(t),r===Y?(r=t,t=0):r=xc(r),n=kc(n),xe(n,t,r)}function ua(n,t,r){if(r&&"boolean"!=typeof r&&Li(n,t,r)&&(t=r=Y),r===Y&&("boolean"==typeof t?(r=t,t=Y):"boolean"==typeof n&&(r=n,n=Y)),n===Y&&t===Y?(n=0,t=1):(n=xc(n),t===Y?(t=n,n=0):t=xc(t)),n>t){
|
null==n?n:du(n,t,Au(r),e)}function ra(n){return null==n?[]:E(n,Pc(n))}function ea(n){return null==n?[]:E(n,qc(n))}function ua(n,t,r){return r===X&&(r=t,t=X),r!==X&&(r=Ic(r),r=r===r?r:0),t!==X&&(t=Ic(t),t=t===t?t:0),Mr(Ic(n),t,r)}function ia(n,t,r){return t=Ac(t),r===X?(r=t,t=0):r=Ac(r),n=Ic(n),Ae(n,t,r)}function oa(n,t,r){if(r&&"boolean"!=typeof r&&Ui(n,t,r)&&(t=r=X),r===X&&("boolean"==typeof t?(r=t,t=X):"boolean"==typeof n&&(r=n,n=X)),n===X&&t===X?(n=0,t=1):(n=Ac(n),t===X?(t=n,n=0):t=Ac(t)),n>t){
|
||||||
var e=n;n=t,t=e}if(r||n%1||t%1){var u=Jl();return Vl(n+u*(t-n+Hr("1e-"+((u+"").length-1))),t)}return Xe(n,t)}function ia(n){return Jh(Rc(n).toLowerCase())}function oa(n){return n=Rc(n),n&&n.replace(Zt,he).replace(Br,"")}function fa(n,t,r){n=Rc(n),t=pu(t);var e=n.length;r=r===Y?e:$r(jc(r),0,e);var u=r;return r-=t.length,r>=0&&n.slice(r,u)==t}function ca(n){return n=Rc(n),n&&mt.test(n)?n.replace(bt,pe):n}function aa(n){return n=Rc(n),n&&zt.test(n)?n.replace(Rt,"\\$&"):n}function la(n,t,r){n=Rc(n),t=jc(t);
|
var e=n;n=t,t=e}if(r||n%1||t%1){var u=Ql();return Hl(n+u*(t-n+Qr("1e-"+((u+"").length-1))),t)}return tu(n,t)}function fa(n){return Qh(Ec(n).toLowerCase())}function ca(n){return n=Ec(n),n&&n.replace(Gt,ve).replace(Dr,"")}function aa(n,t,r){n=Ec(n),t=vu(t);var e=n.length;r=r===X?e:Mr(kc(r),0,e);var u=r;return r-=t.length,r>=0&&n.slice(r,u)==t}function la(n){return n=Ec(n),n&&At.test(n)?n.replace(xt,ge):n}function sa(n){return n=Ec(n),n&&Wt.test(n)?n.replace(St,"\\$&"):n}function ha(n,t,r){n=Ec(n),t=kc(t);
|
||||||
var e=t?K(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return ni(Ml(u),r)+n+ni(Dl(u),r)}function sa(n,t,r){n=Rc(n),t=jc(t);var e=t?K(n):0;return t&&e<t?n+ni(t-e,r):n}function ha(n,t,r){n=Rc(n),t=jc(t);var e=t?K(n):0;return t&&e<t?ni(t-e,r)+n:n}function pa(n,t,r){return r||null==t?t=0:t&&(t=+t),Hl(Rc(n).replace(St,""),t||0)}function _a(n,t,r){return t=(r?Li(n,t,r):t===Y)?1:jc(t),tu(Rc(n),t)}function va(){var n=arguments,t=Rc(n[0]);return n.length<3?t:t.replace(n[1],n[2])}function ga(n,t,r){return r&&"number"!=typeof r&&Li(n,t,r)&&(t=r=Y),
|
var e=t?V(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return ri(Nl(u),r)+n+ri(Fl(u),r)}function pa(n,t,r){n=Ec(n),t=kc(t);var e=t?V(n):0;return t&&e<t?n+ri(t-e,r):n}function _a(n,t,r){n=Ec(n),t=kc(t);var e=t?V(n):0;return t&&e<t?ri(t-e,r)+n:n}function va(n,t,r){return r||null==t?t=0:t&&(t=+t),Yl(Ec(n).replace(Lt,""),t||0)}function ga(n,t,r){return t=(r?Ui(n,t,r):t===X)?1:kc(t),eu(Ec(n),t)}function ya(){var n=arguments,t=Ec(n[0]);return n.length<3?t:t.replace(n[1],n[2])}function da(n,t,r){return r&&"number"!=typeof r&&Ui(n,t,r)&&(t=r=X),
|
||||||
(r=r===Y?Wn:r>>>0)?(n=Rc(n),n&&("string"==typeof t||null!=t&&!xh(t))&&(t=pu(t),!t&&B(n))?Au(V(n),0,r):n.split(t,r)):[]}function ya(n,t,r){return n=Rc(n),r=null==r?0:$r(jc(r),0,n.length),t=pu(t),n.slice(r,r+t.length)==t}function da(n,t,r){var e=q.templateSettings;r&&Li(n,t,r)&&(t=Y),n=Rc(n),t=zh({},t,e,ci);var u,i,o=zh({},t.imports,e.imports,ci),f=Fc(o),c=z(o,f),a=0,l=t.interpolate||Kt,s="__p += '",h=al((t.escape||Kt).source+"|"+l.source+"|"+(l===At?$t:Kt).source+"|"+(t.evaluate||Kt).source+"|$","g"),p="//# sourceURL="+(yl.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Nr+"]")+"\n";
|
(r=r===X?Un:r>>>0)?(n=Ec(n),n&&("string"==typeof t||null!=t&&!Ah(t))&&(t=vu(t),!t&&T(n))?Ou(G(n),0,r):n.split(t,r)):[]}function ba(n,t,r){return n=Ec(n),r=null==r?0:Mr(kc(r),0,n.length),t=vu(t),n.slice(r,r+t.length)==t}function wa(n,t,r){var e=Z.templateSettings;r&&Ui(n,t,r)&&(t=X),n=Ec(n),t=Sh({},t,e,li);var u,i,o=Sh({},t.imports,e.imports,li),f=Pc(o),c=E(o,f),a=0,l=t.interpolate||Ht,s="__p += '",h=sl((t.escape||Ht).source+"|"+l.source+"|"+(l===It?Ft:Ht).source+"|"+(t.evaluate||Ht).source+"|$","g"),p="//# sourceURL="+(bl.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Zr+"]")+"\n";
|
||||||
n.replace(h,function(t,r,e,o,f,c){return e||(e=o),s+=n.slice(a,c).replace(Vt,C),r&&(u=!0,s+="' +\n__e("+r+") +\n'"),f&&(i=!0,s+="';\n"+f+";\n__p += '"),e&&(s+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),a=c+t.length,t}),s+="';\n";var _=yl.call(t,"variable")&&t.variable;_||(s="with (obj) {\n"+s+"\n}\n"),s=(i?s.replace(vt,""):s).replace(gt,"$1").replace(yt,"$1;"),s="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+s+"return __p\n}";
|
n.replace(h,function(t,r,e,o,f,c){return e||(e=o),s+=n.slice(a,c).replace(Jt,U),r&&(u=!0,s+="' +\n__e("+r+") +\n'"),f&&(i=!0,s+="';\n"+f+";\n__p += '"),e&&(s+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),a=c+t.length,t}),s+="';\n";var _=bl.call(t,"variable")&&t.variable;if(_){if(Dt.test(_))throw new fl(un)}else s="with (obj) {\n"+s+"\n}\n";s=(i?s.replace(dt,""):s).replace(bt,"$1").replace(wt,"$1;"),s="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+s+"return __p\n}";
|
||||||
var v=Yh(function(){return ol(f,p+"return "+s).apply(Y,c)});if(v.source=s,nc(v))throw v;return v}function ba(n){return Rc(n).toLowerCase()}function wa(n){return Rc(n).toUpperCase()}function ma(n,t,r){if(n=Rc(n),n&&(r||t===Y))return n.replace(Et,"");if(!n||!(t=pu(t)))return n;var e=V(n),u=V(t);return Au(e,S(e,u),W(e,u)+1).join("")}function xa(n,t,r){if(n=Rc(n),n&&(r||t===Y))return n.replace(Wt,"");if(!n||!(t=pu(t)))return n;var e=V(n);return Au(e,0,W(e,V(t))+1).join("")}function ja(n,t,r){if(n=Rc(n),
|
var v=Xh(function(){return cl(f,p+"return "+s).apply(X,c)});if(v.source=s,rc(v))throw v;return v}function ma(n){return Ec(n).toLowerCase()}function xa(n){return Ec(n).toUpperCase()}function ja(n,t,r){if(n=Ec(n),n&&(r||t===X))return R(n);if(!n||!(t=vu(t)))return n;var e=G(n),u=G(t);return Ou(e,W(e,u),L(e,u)+1).join("")}function Aa(n,t,r){if(n=Ec(n),n&&(r||t===X))return n.slice(0,H(n)+1);if(!n||!(t=vu(t)))return n;var e=G(n);return Ou(e,0,L(e,G(t))+1).join("")}function ka(n,t,r){if(n=Ec(n),n&&(r||t===X))return n.replace(Lt,"");
|
||||||
n&&(r||t===Y))return n.replace(St,"");if(!n||!(t=pu(t)))return n;var e=V(n);return Au(e,S(e,V(t))).join("")}function Aa(n,t){var r=mn,e=xn;if(ic(t)){var u="separator"in t?t.separator:u;r="length"in t?jc(t.length):r,e="omission"in t?pu(t.omission):e}n=Rc(n);var i=n.length;if(B(n)){var o=V(n);i=o.length}if(r>=i)return n;var f=r-K(e);if(f<1)return e;var c=o?Au(o,0,f).join(""):n.slice(0,f);if(u===Y)return c+e;if(o&&(f+=c.length-f),xh(u)){if(n.slice(f).search(u)){var a,l=c;for(u.global||(u=al(u.source,Rc(Dt.exec(u))+"g")),
|
if(!n||!(t=vu(t)))return n;var e=G(n);return Ou(e,W(e,G(t))).join("")}function Oa(n,t){var r=An,e=kn;if(fc(t)){var u="separator"in t?t.separator:u;r="length"in t?kc(t.length):r,e="omission"in t?vu(t.omission):e}n=Ec(n);var i=n.length;if(T(n)){var o=G(n);i=o.length}if(r>=i)return n;var f=r-V(e);if(f<1)return e;var c=o?Ou(o,0,f).join(""):n.slice(0,f);if(u===X)return c+e;if(o&&(f+=c.length-f),Ah(u)){if(n.slice(f).search(u)){var a,l=c;for(u.global||(u=sl(u.source,Ec(Nt.exec(u))+"g")),u.lastIndex=0;a=u.exec(l);)var s=a.index;
|
||||||
u.lastIndex=0;a=u.exec(l);)var s=a.index;c=c.slice(0,s===Y?f:s)}}else if(n.indexOf(pu(u),f)!=f){var h=c.lastIndexOf(u);h>-1&&(c=c.slice(0,h))}return c+e}function ka(n){return n=Rc(n),n&&wt.test(n)?n.replace(dt,_e):n}function Oa(n,t,r){return n=Rc(n),t=r?Y:t,t===Y?T(n)?J(n):_(n):n.match(t)||[]}function Ia(t){var r=null==t?0:t.length,e=bi();return t=r?c(t,function(n){if("function"!=typeof n[1])throw new sl(tn);return[e(n[0]),n[1]]}):[],ru(function(e){for(var u=-1;++u<r;){var i=t[u];if(n(i[0],this,e))return n(i[1],this,e);
|
c=c.slice(0,s===X?f:s)}}else if(n.indexOf(vu(u),f)!=f){var h=c.lastIndexOf(u);h>-1&&(c=c.slice(0,h))}return c+e}function Ia(n){return n=Ec(n),n&&jt.test(n)?n.replace(mt,ye):n}function Ra(n,t,r){return n=Ec(n),t=r?X:t,t===X?$(n)?Q(n):_(n):n.match(t)||[]}function za(t){var r=null==t?0:t.length,e=mi();return t=r?c(t,function(n){if("function"!=typeof n[1])throw new pl(en);return[e(n[0]),n[1]]}):[],uu(function(e){for(var u=-1;++u<r;){var i=t[u];if(n(i[0],this,e))return n(i[1],this,e)}})}function Ea(n){
|
||||||
}})}function Ra(n){return Mr(Dr(n,on))}function za(n){return function(){return n}}function Ea(n,t){return null==n||n!==n?t:n}function Sa(n){return n}function Wa(n){return Te("function"==typeof n?n:Dr(n,on))}function La(n){return Ne(Dr(n,on))}function Ca(n,t){return Pe(n,Dr(t,on))}function Ua(n,t,e){var u=Fc(t),i=se(t,u);null!=e||ic(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=se(t,Fc(t)));var o=!(ic(e)&&"chain"in e&&!e.chain),f=rc(n);return r(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){
|
return Nr(Fr(n,an))}function Sa(n){return function(){return n}}function Wa(n,t){return null==n||n!==n?t:n}function La(n){return n}function Ca(n){return De("function"==typeof n?n:Fr(n,an))}function Ua(n){return qe(Fr(n,an))}function Ba(n,t){return Ze(n,Fr(t,an))}function Ta(n,t,e){var u=Pc(t),i=fe(t,u);null!=e||fc(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=fe(t,Pc(t)));var o=!(fc(e)&&"chain"in e&&!e.chain),f=uc(n);return r(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;
|
||||||
var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Uu(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})}),n}function Ba(){return Xr._===this&&(Xr._=xl),this}function Ta(){}function $a(n){return n=jc(n),ru(function(t){return Ke(t,n)})}function Da(n){return Ci(n)?m(Qi(n)):Je(n)}function Ma(n){return function(t){return null==n?Y:ve(n,t)}}function Fa(){return[]}function Na(){return!1}function Pa(){return{};
|
if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Tu(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})}),n}function $a(){return re._===this&&(re._=Al),this}function Da(){}function Ma(n){return n=kc(n),uu(function(t){return Ge(t,n)})}function Fa(n){return Bi(n)?m(no(n)):Qe(n)}function Na(n){return function(t){return null==n?X:_e(n,t)}}function Pa(){return[]}function qa(){return!1}function Za(){return{}}function Ka(){return"";
|
||||||
}function qa(){return""}function Za(){return!0}function Ka(n,t){if(n=jc(n),n<1||n>zn)return[];var r=Wn,e=Vl(n,Wn);t=bi(t),n-=Wn;for(var u=O(e,t);++r<n;)t(r);return u}function Va(n){return yh(n)?c(n,Qi):yc(n)?[n]:Uu(Ws(Rc(n)))}function Ga(n){var t=++dl;return Rc(n)+t}function Ha(n){return n&&n.length?Yr(n,Sa,be):Y}function Ja(n,t){return n&&n.length?Yr(n,bi(t,2),be):Y}function Ya(n){return w(n,Sa)}function Qa(n,t){return w(n,bi(t,2))}function Xa(n){return n&&n.length?Yr(n,Sa,Me):Y}function nl(n,t){
|
}function Va(){return!0}function Ga(n,t){if(n=kc(n),n<1||n>Wn)return[];var r=Un,e=Hl(n,Un);t=mi(t),n-=Un;for(var u=O(e,t);++r<n;)t(r);return u}function Ha(n){return bh(n)?c(n,no):bc(n)?[n]:Tu(Cs(Ec(n)))}function Ja(n){var t=++wl;return Ec(n)+t}function Ya(n){return n&&n.length?Yr(n,La,me):X}function Qa(n,t){return n&&n.length?Yr(n,mi(t,2),me):X}function Xa(n){return w(n,La)}function nl(n,t){return w(n,mi(t,2))}function tl(n){return n&&n.length?Yr(n,La,Ne):X}function rl(n,t){return n&&n.length?Yr(n,mi(t,2),Ne):X;
|
||||||
return n&&n.length?Yr(n,bi(t,2),Me):Y}function tl(n){return n&&n.length?k(n,Sa):0}function rl(n,t){return n&&n.length?k(n,bi(t,2)):0}x=null==x?Xr:ge.defaults(Xr.Object(),x,ge.pick(Xr,Fr));var el=x.Array,ul=x.Date,il=x.Error,ol=x.Function,fl=x.Math,cl=x.Object,al=x.RegExp,ll=x.String,sl=x.TypeError,hl=el.prototype,pl=ol.prototype,_l=cl.prototype,vl=x["__core-js_shared__"],gl=pl.toString,yl=_l.hasOwnProperty,dl=0,bl=function(){var n=/[^.]+$/.exec(vl&&vl.keys&&vl.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:"";
|
}function el(n){return n&&n.length?k(n,La):0}function ul(n,t){return n&&n.length?k(n,mi(t,2)):0}x=null==x?re:be.defaults(re.Object(),x,be.pick(re,qr));var il=x.Array,ol=x.Date,fl=x.Error,cl=x.Function,al=x.Math,ll=x.Object,sl=x.RegExp,hl=x.String,pl=x.TypeError,_l=il.prototype,vl=cl.prototype,gl=ll.prototype,yl=x["__core-js_shared__"],dl=vl.toString,bl=gl.hasOwnProperty,wl=0,ml=function(){var n=/[^.]+$/.exec(yl&&yl.keys&&yl.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),xl=gl.toString,jl=dl.call(ll),Al=re._,kl=sl("^"+dl.call(bl).replace(St,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ol=ie?x.Buffer:X,Il=x.Symbol,Rl=x.Uint8Array,zl=Ol?Ol.allocUnsafe:X,El=F(ll.getPrototypeOf,ll),Sl=ll.create,Wl=gl.propertyIsEnumerable,Ll=_l.splice,Cl=Il?Il.isConcatSpreadable:X,Ul=Il?Il.iterator:X,Bl=Il?Il.toStringTag:X,Tl=function(){
|
||||||
}(),wl=_l.toString,ml=gl.call(cl),xl=Xr._,jl=al("^"+gl.call(yl).replace(Rt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Al=re?x.Buffer:Y,kl=x.Symbol,Ol=x.Uint8Array,Il=Al?Al.allocUnsafe:Y,Rl=M(cl.getPrototypeOf,cl),zl=cl.create,El=_l.propertyIsEnumerable,Sl=hl.splice,Wl=kl?kl.isConcatSpreadable:Y,Ll=kl?kl.iterator:Y,Cl=kl?kl.toStringTag:Y,Ul=function(){try{var n=xi(cl,"defineProperty");return n({},"",{}),n}catch(n){}}(),Bl=x.clearTimeout!==Xr.clearTimeout&&x.clearTimeout,Tl=ul&&ul.now!==Xr.Date.now&&ul.now,$l=x.setTimeout!==Xr.setTimeout&&x.setTimeout,Dl=fl.ceil,Ml=fl.floor,Fl=cl.getOwnPropertySymbols,Nl=Al?Al.isBuffer:Y,Pl=x.isFinite,ql=hl.join,Zl=M(cl.keys,cl),Kl=fl.max,Vl=fl.min,Gl=ul.now,Hl=x.parseInt,Jl=fl.random,Yl=hl.reverse,Ql=xi(x,"DataView"),Xl=xi(x,"Map"),ns=xi(x,"Promise"),ts=xi(x,"Set"),rs=xi(x,"WeakMap"),es=xi(cl,"create"),us=rs&&new rs,is={},os=Xi(Ql),fs=Xi(Xl),cs=Xi(ns),as=Xi(ts),ls=Xi(rs),ss=kl?kl.prototype:Y,hs=ss?ss.valueOf:Y,ps=ss?ss.toString:Y,_s=function(){
|
try{var n=Ai(ll,"defineProperty");return n({},"",{}),n}catch(n){}}(),$l=x.clearTimeout!==re.clearTimeout&&x.clearTimeout,Dl=ol&&ol.now!==re.Date.now&&ol.now,Ml=x.setTimeout!==re.setTimeout&&x.setTimeout,Fl=al.ceil,Nl=al.floor,Pl=ll.getOwnPropertySymbols,ql=Ol?Ol.isBuffer:X,Zl=x.isFinite,Kl=_l.join,Vl=F(ll.keys,ll),Gl=al.max,Hl=al.min,Jl=ol.now,Yl=x.parseInt,Ql=al.random,Xl=_l.reverse,ns=Ai(x,"DataView"),ts=Ai(x,"Map"),rs=Ai(x,"Promise"),es=Ai(x,"Set"),us=Ai(x,"WeakMap"),is=Ai(ll,"create"),os=us&&new us,fs={},cs=to(ns),as=to(ts),ls=to(rs),ss=to(es),hs=to(us),ps=Il?Il.prototype:X,_s=ps?ps.valueOf:X,vs=ps?ps.toString:X,gs=function(){
|
||||||
function n(){}return function(t){if(!ic(t))return{};if(zl)return zl(t);n.prototype=t;var r=new n;return n.prototype=Y,r}}();q.templateSettings={escape:xt,evaluate:jt,interpolate:At,variable:"",imports:{_:q}},q.prototype=G.prototype,q.prototype.constructor=q,H.prototype=_s(G.prototype),H.prototype.constructor=H,Bt.prototype=_s(G.prototype),Bt.prototype.constructor=Bt,Yt.prototype.clear=Qt,Yt.prototype.delete=Xt,Yt.prototype.get=nr,Yt.prototype.has=tr,Yt.prototype.set=rr,er.prototype.clear=ur,er.prototype.delete=ir,
|
function n(){}return function(t){if(!fc(t))return{};if(Sl)return Sl(t);n.prototype=t;var r=new n;return n.prototype=X,r}}();Z.templateSettings={escape:kt,evaluate:Ot,interpolate:It,variable:"",imports:{_:Z}},Z.prototype=J.prototype,Z.prototype.constructor=Z,Y.prototype=gs(J.prototype),Y.prototype.constructor=Y,Ct.prototype=gs(J.prototype),Ct.prototype.constructor=Ct,Xt.prototype.clear=nr,Xt.prototype.delete=tr,Xt.prototype.get=rr,Xt.prototype.has=er,Xt.prototype.set=ur,ir.prototype.clear=or,ir.prototype.delete=fr,
|
||||||
er.prototype.get=or,er.prototype.has=fr,er.prototype.set=cr,ar.prototype.clear=lr,ar.prototype.delete=sr,ar.prototype.get=hr,ar.prototype.has=pr,ar.prototype.set=_r,vr.prototype.add=vr.prototype.push=gr,vr.prototype.has=yr,dr.prototype.clear=br,dr.prototype.delete=wr,dr.prototype.get=mr,dr.prototype.has=xr,dr.prototype.set=jr;var vs=Fu(ee),gs=Fu(ue,!0),ys=Nu(),ds=Nu(!0),bs=us?function(n,t){return us.set(n,t),n}:Sa,ws=Ul?function(n,t){return Ul(n,"toString",{configurable:!0,enumerable:!1,value:za(t),
|
ir.prototype.get=cr,ir.prototype.has=ar,ir.prototype.set=lr,sr.prototype.clear=hr,sr.prototype.delete=pr,sr.prototype.get=_r,sr.prototype.has=vr,sr.prototype.set=gr,yr.prototype.add=yr.prototype.push=dr,yr.prototype.has=br,wr.prototype.clear=mr,wr.prototype.delete=xr,wr.prototype.get=jr,wr.prototype.has=Ar,wr.prototype.set=kr;var ys=Pu(ue),ds=Pu(oe,!0),bs=qu(),ws=qu(!0),ms=os?function(n,t){return os.set(n,t),n}:La,xs=Tl?function(n,t){return Tl(n,"toString",{configurable:!0,enumerable:!1,value:Sa(t),
|
||||||
writable:!0})}:Sa,ms=ru,xs=Bl||function(n){return Xr.clearTimeout(n)},js=ts&&1/N(new ts([,-0]))[1]==Rn?function(n){return new ts(n)}:Ta,As=us?function(n){return us.get(n)}:Ta,ks=Fl?function(n){return null==n?[]:(n=cl(n),i(Fl(n),function(t){return El.call(n,t)}))}:Fa,Os=Fl?function(n){for(var t=[];n;)a(t,ks(n)),n=Rl(n);return t}:Fa,Is=de;(Ql&&Is(new Ql(new ArrayBuffer(1)))!=it||Xl&&Is(new Xl)!=Zn||ns&&Is(ns.resolve())!=Hn||ts&&Is(new ts)!=Qn||rs&&Is(new rs)!=rt)&&(Is=function(n){var t=de(n),r=t==Gn?n.constructor:Y,e=r?Xi(r):"";
|
writable:!0})}:La,js=uu,As=$l||function(n){return re.clearTimeout(n)},ks=es&&1/P(new es([,-0]))[1]==Sn?function(n){return new es(n)}:Da,Os=os?function(n){return os.get(n)}:Da,Is=Pl?function(n){return null==n?[]:(n=ll(n),i(Pl(n),function(t){return Wl.call(n,t)}))}:Pa,Rs=Pl?function(n){for(var t=[];n;)a(t,Is(n)),n=El(n);return t}:Pa,zs=we;(ns&&zs(new ns(new ArrayBuffer(1)))!=ct||ts&&zs(new ts)!=Gn||rs&&zs(rs.resolve())!=Qn||es&&zs(new es)!=tt||us&&zs(new us)!=it)&&(zs=function(n){var t=we(n),r=t==Yn?n.constructor:X,e=r?to(r):"";
|
||||||
if(e)switch(e){case os:return it;case fs:return Zn;case cs:return Hn;case as:return Qn;case ls:return rt}return t});var Rs=vl?rc:Na,zs=Ji(bs),Es=$l||function(n,t){return Xr.setTimeout(n,t)},Ss=Ji(ws),Ws=Fi(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(It,function(n,r,e,u){t.push(e?u.replace(Tt,"$1"):r||n)}),t}),Ls=ru(function(n,t){return Gf(n)?Vr(n,te(t,1,Gf,!0)):[]}),Cs=ru(function(n,t){var r=mo(t);return Gf(r)&&(r=Y),Gf(n)?Vr(n,te(t,1,Gf,!0),bi(r,2)):[]}),Us=ru(function(n,t){
|
if(e)switch(e){case cs:return ct;case as:return Gn;case ls:return Qn;case ss:return tt;case hs:return it}return t});var Es=yl?uc:qa,Ss=Qi(ms),Ws=Ml||function(n,t){return re.setTimeout(n,t)},Ls=Qi(xs),Cs=Pi(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(Et,function(n,r,e,u){t.push(e?u.replace(Mt,"$1"):r||n)}),t}),Us=uu(function(n,t){return Jf(n)?Hr(n,ee(t,1,Jf,!0)):[]}),Bs=uu(function(n,t){var r=jo(t);return Jf(r)&&(r=X),Jf(n)?Hr(n,ee(t,1,Jf,!0),mi(r,2)):[]}),Ts=uu(function(n,t){
|
||||||
var r=mo(t);return Gf(r)&&(r=Y),Gf(n)?Vr(n,te(t,1,Gf,!0),Y,r):[]}),Bs=ru(function(n){var t=c(n,mu);return t.length&&t[0]===n[0]?je(t):[]}),Ts=ru(function(n){var t=mo(n),r=c(n,mu);return t===mo(r)?t=Y:r.pop(),r.length&&r[0]===n[0]?je(r,bi(t,2)):[]}),$s=ru(function(n){var t=mo(n),r=c(n,mu);return t="function"==typeof t?t:Y,t&&r.pop(),r.length&&r[0]===n[0]?je(r,Y,t):[]}),Ds=ru(Ao),Ms=_i(function(n,t){var r=null==n?0:n.length,e=Tr(n,t);return Qe(n,c(t,function(n){return Wi(n,r)?+n:n}).sort(Su)),e}),Fs=ru(function(n){
|
var r=jo(t);return Jf(r)&&(r=X),Jf(n)?Hr(n,ee(t,1,Jf,!0),X,r):[]}),$s=uu(function(n){var t=c(n,ju);return t.length&&t[0]===n[0]?ke(t):[]}),Ds=uu(function(n){var t=jo(n),r=c(n,ju);return t===jo(r)?t=X:r.pop(),r.length&&r[0]===n[0]?ke(r,mi(t,2)):[]}),Ms=uu(function(n){var t=jo(n),r=c(n,ju);return t="function"==typeof t?t:X,t&&r.pop(),r.length&&r[0]===n[0]?ke(r,X,t):[]}),Fs=uu(Oo),Ns=gi(function(n,t){var r=null==n?0:n.length,e=Tr(n,t);return nu(n,c(t,function(n){return Ci(n,r)?+n:n}).sort(Lu)),e}),Ps=uu(function(n){
|
||||||
return _u(te(n,1,Gf,!0))}),Ns=ru(function(n){var t=mo(n);return Gf(t)&&(t=Y),_u(te(n,1,Gf,!0),bi(t,2))}),Ps=ru(function(n){var t=mo(n);return t="function"==typeof t?t:Y,_u(te(n,1,Gf,!0),Y,t)}),qs=ru(function(n,t){return Gf(n)?Vr(n,t):[]}),Zs=ru(function(n){return bu(i(n,Gf))}),Ks=ru(function(n){var t=mo(n);return Gf(t)&&(t=Y),bu(i(n,Gf),bi(t,2))}),Vs=ru(function(n){var t=mo(n);return t="function"==typeof t?t:Y,bu(i(n,Gf),Y,t)}),Gs=ru(Ko),Hs=ru(function(n){var t=n.length,r=t>1?n[t-1]:Y;return r="function"==typeof r?(n.pop(),
|
return gu(ee(n,1,Jf,!0))}),qs=uu(function(n){var t=jo(n);return Jf(t)&&(t=X),gu(ee(n,1,Jf,!0),mi(t,2))}),Zs=uu(function(n){var t=jo(n);return t="function"==typeof t?t:X,gu(ee(n,1,Jf,!0),X,t)}),Ks=uu(function(n,t){return Jf(n)?Hr(n,t):[]}),Vs=uu(function(n){return mu(i(n,Jf))}),Gs=uu(function(n){var t=jo(n);return Jf(t)&&(t=X),mu(i(n,Jf),mi(t,2))}),Hs=uu(function(n){var t=jo(n);return t="function"==typeof t?t:X,mu(i(n,Jf),X,t)}),Js=uu(Go),Ys=uu(function(n){var t=n.length,r=t>1?n[t-1]:X;return r="function"==typeof r?(n.pop(),
|
||||||
r):Y,Vo(n,r)}),Js=_i(function(n){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return Tr(t,n)};return!(t>1||this.__actions__.length)&&e instanceof Bt&&Wi(r)?(e=e.slice(r,+r+(t?1:0)),e.__actions__.push({func:Qo,args:[u],thisArg:Y}),new H(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(Y),n})):this.thru(u)}),Ys=Du(function(n,t,r){yl.call(n,r)?++n[r]:Cr(n,r,1)}),Qs=Gu(lo),Xs=Gu(so),nh=Du(function(n,t,r){yl.call(n,r)?n[r].push(t):Cr(n,r,[t])}),th=ru(function(t,r,e){var u=-1,i="function"==typeof r,o=Vf(t)?el(t.length):[];
|
r):X,Ho(n,r)}),Qs=gi(function(n){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return Tr(t,n)};return!(t>1||this.__actions__.length)&&e instanceof Ct&&Ci(r)?(e=e.slice(r,+r+(t?1:0)),e.__actions__.push({func:nf,args:[u],thisArg:X}),new Y(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(X),n})):this.thru(u)}),Xs=Fu(function(n,t,r){bl.call(n,r)?++n[r]:Br(n,r,1)}),nh=Ju(ho),th=Ju(po),rh=Fu(function(n,t,r){bl.call(n,r)?n[r].push(t):Br(n,r,[t])}),eh=uu(function(t,r,e){var u=-1,i="function"==typeof r,o=Hf(t)?il(t.length):[];
|
||||||
return vs(t,function(t){o[++u]=i?n(r,t,e):ke(t,r,e)}),o}),rh=Du(function(n,t,r){Cr(n,r,t)}),eh=Du(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),uh=ru(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Li(n,t[0],t[1])?t=[]:r>2&&Li(t[0],t[1],t[2])&&(t=[t[0]]),Ve(n,te(t,1),[])}),ih=Tl||function(){return Xr.Date.now()},oh=ru(function(n,t,r){var e=sn;if(r.length){var u=F(r,di(oh));e|=gn}return fi(n,e,t,r,u)}),fh=ru(function(n,t,r){var e=sn|hn;if(r.length){var u=F(r,di(fh));e|=gn;
|
return ys(t,function(t){o[++u]=i?n(r,t,e):Ie(t,r,e)}),o}),uh=Fu(function(n,t,r){Br(n,r,t)}),ih=Fu(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),oh=uu(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Ui(n,t[0],t[1])?t=[]:r>2&&Ui(t[0],t[1],t[2])&&(t=[t[0]]),He(n,ee(t,1),[])}),fh=Dl||function(){return re.Date.now()},ch=uu(function(n,t,r){var e=_n;if(r.length){var u=N(r,wi(ch));e|=bn}return ai(n,e,t,r,u)}),ah=uu(function(n,t,r){var e=_n|vn;if(r.length){var u=N(r,wi(ah));e|=bn;
|
||||||
}return fi(t,e,n,r,u)}),ch=ru(function(n,t){return Kr(n,1,t)}),ah=ru(function(n,t,r){return Kr(n,kc(t)||0,r)});Wf.Cache=ar;var lh=ms(function(t,r){r=1==r.length&&yh(r[0])?c(r[0],R(bi())):c(te(r,1),R(bi()));var e=r.length;return ru(function(u){for(var i=-1,o=Vl(u.length,e);++i<o;)u[i]=r[i].call(this,u[i]);return n(t,this,u)})}),sh=ru(function(n,t){return fi(n,gn,Y,t,F(t,di(sh)))}),hh=ru(function(n,t){return fi(n,yn,Y,t,F(t,di(hh)))}),ph=_i(function(n,t){return fi(n,bn,Y,Y,Y,t)}),_h=ei(be),vh=ei(function(n,t){
|
}return ai(t,e,n,r,u)}),lh=uu(function(n,t){return Gr(n,1,t)}),sh=uu(function(n,t,r){return Gr(n,Ic(t)||0,r)});Cf.Cache=sr;var hh=js(function(t,r){r=1==r.length&&bh(r[0])?c(r[0],z(mi())):c(ee(r,1),z(mi()));var e=r.length;return uu(function(u){for(var i=-1,o=Hl(u.length,e);++i<o;)u[i]=r[i].call(this,u[i]);return n(t,this,u)})}),ph=uu(function(n,t){return ai(n,bn,X,t,N(t,wi(ph)))}),_h=uu(function(n,t){return ai(n,wn,X,t,N(t,wi(_h)))}),vh=gi(function(n,t){return ai(n,xn,X,X,X,t)}),gh=ii(me),yh=ii(function(n,t){
|
||||||
return n>=t}),gh=Oe(function(){return arguments}())?Oe:function(n){return oc(n)&&yl.call(n,"callee")&&!El.call(n,"callee")},yh=el.isArray,dh=ie?R(ie):Ie,bh=Nl||Na,wh=oe?R(oe):Re,mh=fe?R(fe):Se,xh=ce?R(ce):Ce,jh=ae?R(ae):Ue,Ah=le?R(le):Be,kh=ei(Me),Oh=ei(function(n,t){return n<=t}),Ih=Mu(function(n,t){if($i(t)||Vf(t))return Bu(t,Fc(t),n),Y;for(var r in t)yl.call(t,r)&&zr(n,r,t[r])}),Rh=Mu(function(n,t){Bu(t,Nc(t),n)}),zh=Mu(function(n,t,r,e){Bu(t,Nc(t),n,e)}),Eh=Mu(function(n,t,r,e){Bu(t,Fc(t),n,e);
|
return n>=t}),dh=Re(function(){return arguments}())?Re:function(n){return cc(n)&&bl.call(n,"callee")&&!Wl.call(n,"callee")},bh=il.isArray,wh=ce?z(ce):ze,mh=ql||qa,xh=ae?z(ae):Ee,jh=le?z(le):Le,Ah=se?z(se):Be,kh=he?z(he):Te,Oh=pe?z(pe):$e,Ih=ii(Ne),Rh=ii(function(n,t){return n<=t}),zh=Nu(function(n,t){if(Mi(t)||Hf(t))return $u(t,Pc(t),n),X;for(var r in t)bl.call(t,r)&&Sr(n,r,t[r])}),Eh=Nu(function(n,t){$u(t,qc(t),n)}),Sh=Nu(function(n,t,r,e){$u(t,qc(t),n,e)}),Wh=Nu(function(n,t,r,e){$u(t,Pc(t),n,e);
|
||||||
}),Sh=_i(Tr),Wh=ru(function(n,t){n=cl(n);var r=-1,e=t.length,u=e>2?t[2]:Y;for(u&&Li(t[0],t[1],u)&&(e=1);++r<e;)for(var i=t[r],o=Nc(i),f=-1,c=o.length;++f<c;){var a=o[f],l=n[a];(l===Y||Kf(l,_l[a])&&!yl.call(n,a))&&(n[a]=i[a])}return n}),Lh=ru(function(t){return t.push(Y,ai),n($h,Y,t)}),Ch=Yu(function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=wl.call(t)),n[t]=r},za(Sa)),Uh=Yu(function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=wl.call(t)),yl.call(n,t)?n[t].push(r):n[t]=[r]},bi),Bh=ru(ke),Th=Mu(function(n,t,r){
|
}),Lh=gi(Tr),Ch=uu(function(n,t){n=ll(n);var r=-1,e=t.length,u=e>2?t[2]:X;for(u&&Ui(t[0],t[1],u)&&(e=1);++r<e;)for(var i=t[r],o=qc(i),f=-1,c=o.length;++f<c;){var a=o[f],l=n[a];(l===X||Gf(l,gl[a])&&!bl.call(n,a))&&(n[a]=i[a])}return n}),Uh=uu(function(t){return t.push(X,si),n(Mh,X,t)}),Bh=Xu(function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=xl.call(t)),n[t]=r},Sa(La)),Th=Xu(function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=xl.call(t)),bl.call(n,t)?n[t].push(r):n[t]=[r]},mi),$h=uu(Ie),Dh=Nu(function(n,t,r){
|
||||||
qe(n,t,r)}),$h=Mu(function(n,t,r,e){qe(n,t,r,e)}),Dh=_i(function(n,t){var r={};if(null==n)return r;var e=!1;t=c(t,function(t){return t=ju(t,n),e||(e=t.length>1),t}),Bu(n,gi(n),r),e&&(r=Dr(r,on|fn|cn,li));for(var u=t.length;u--;)vu(r,t[u]);return r}),Mh=_i(function(n,t){return null==n?{}:Ge(n,t)}),Fh=oi(Fc),Nh=oi(Nc),Ph=Zu(function(n,t,r){return t=t.toLowerCase(),n+(r?ia(t):t)}),qh=Zu(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Zh=Zu(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Kh=qu("toLowerCase"),Vh=Zu(function(n,t,r){
|
Ke(n,t,r)}),Mh=Nu(function(n,t,r,e){Ke(n,t,r,e)}),Fh=gi(function(n,t){var r={};if(null==n)return r;var e=!1;t=c(t,function(t){return t=ku(t,n),e||(e=t.length>1),t}),$u(n,di(n),r),e&&(r=Fr(r,an|ln|sn,hi));for(var u=t.length;u--;)yu(r,t[u]);return r}),Nh=gi(function(n,t){return null==n?{}:Je(n,t)}),Ph=ci(Pc),qh=ci(qc),Zh=Vu(function(n,t,r){return t=t.toLowerCase(),n+(r?fa(t):t)}),Kh=Vu(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Vh=Vu(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Gh=Ku("toLowerCase"),Hh=Vu(function(n,t,r){
|
||||||
return n+(r?"_":"")+t.toLowerCase()}),Gh=Zu(function(n,t,r){return n+(r?" ":"")+Jh(t)}),Hh=Zu(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Jh=qu("toUpperCase"),Yh=ru(function(t,r){try{return n(t,Y,r)}catch(n){return nc(n)?n:new il(n)}}),Qh=_i(function(n,t){return r(t,function(t){t=Qi(t),Cr(n,t,oh(n[t],n))}),n}),Xh=Hu(),np=Hu(!0),tp=ru(function(n,t){return function(r){return ke(r,n,t)}}),rp=ru(function(n,t){return function(r){return ke(n,r,t)}}),ep=Xu(c),up=Xu(u),ip=Xu(h),op=ri(),fp=ri(!0),cp=Qu(function(n,t){
|
return n+(r?"_":"")+t.toLowerCase()}),Jh=Vu(function(n,t,r){return n+(r?" ":"")+Qh(t)}),Yh=Vu(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Qh=Ku("toUpperCase"),Xh=uu(function(t,r){try{return n(t,X,r)}catch(n){return rc(n)?n:new fl(n)}}),np=gi(function(n,t){return r(t,function(t){t=no(t),Br(n,t,ch(n[t],n))}),n}),tp=Yu(),rp=Yu(!0),ep=uu(function(n,t){return function(r){return Ie(r,n,t)}}),up=uu(function(n,t){return function(r){return Ie(n,r,t)}}),ip=ti(c),op=ti(u),fp=ti(h),cp=ui(),ap=ui(!0),lp=ni(function(n,t){
|
||||||
return n+t},0),ap=ii("ceil"),lp=Qu(function(n,t){return n/t},1),sp=ii("floor"),hp=Qu(function(n,t){return n*t},1),pp=ii("round"),_p=Qu(function(n,t){return n-t},0);return q.after=kf,q.ary=Of,q.assign=Ih,q.assignIn=Rh,q.assignInWith=zh,q.assignWith=Eh,q.at=Sh,q.before=If,q.bind=oh,q.bindAll=Qh,q.bindKey=fh,q.castArray=Mf,q.chain=Jo,q.chunk=ro,q.compact=eo,q.concat=uo,q.cond=Ia,q.conforms=Ra,q.constant=za,q.countBy=Ys,q.create=zc,q.curry=Rf,q.curryRight=zf,q.debounce=Ef,q.defaults=Wh,q.defaultsDeep=Lh,
|
return n+t},0),sp=fi("ceil"),hp=ni(function(n,t){return n/t},1),pp=fi("floor"),_p=ni(function(n,t){return n*t},1),vp=fi("round"),gp=ni(function(n,t){return n-t},0);return Z.after=If,Z.ary=Rf,Z.assign=zh,Z.assignIn=Eh,Z.assignInWith=Sh,Z.assignWith=Wh,Z.at=Lh,Z.before=zf,Z.bind=ch,Z.bindAll=np,Z.bindKey=ah,Z.castArray=Nf,Z.chain=Qo,Z.chunk=uo,Z.compact=io,Z.concat=oo,Z.cond=za,Z.conforms=Ea,Z.constant=Sa,Z.countBy=Xs,Z.create=Sc,Z.curry=Ef,Z.curryRight=Sf,Z.debounce=Wf,Z.defaults=Ch,Z.defaultsDeep=Uh,
|
||||||
q.defer=ch,q.delay=ah,q.difference=Ls,q.differenceBy=Cs,q.differenceWith=Us,q.drop=io,q.dropRight=oo,q.dropRightWhile=fo,q.dropWhile=co,q.fill=ao,q.filter=cf,q.flatMap=af,q.flatMapDeep=lf,q.flatMapDepth=sf,q.flatten=ho,q.flattenDeep=po,q.flattenDepth=_o,q.flip=Sf,q.flow=Xh,q.flowRight=np,q.fromPairs=vo,q.functions=Bc,q.functionsIn=Tc,q.groupBy=nh,q.initial=bo,q.intersection=Bs,q.intersectionBy=Ts,q.intersectionWith=$s,q.invert=Ch,q.invertBy=Uh,q.invokeMap=th,q.iteratee=Wa,q.keyBy=rh,q.keys=Fc,q.keysIn=Nc,
|
Z.defer=lh,Z.delay=sh,Z.difference=Us,Z.differenceBy=Bs,Z.differenceWith=Ts,Z.drop=fo,Z.dropRight=co,Z.dropRightWhile=ao,Z.dropWhile=lo,Z.fill=so,Z.filter=lf,Z.flatMap=sf,Z.flatMapDeep=hf,Z.flatMapDepth=pf,Z.flatten=_o,Z.flattenDeep=vo,Z.flattenDepth=go,Z.flip=Lf,Z.flow=tp,Z.flowRight=rp,Z.fromPairs=yo,Z.functions=$c,Z.functionsIn=Dc,Z.groupBy=rh,Z.initial=mo,Z.intersection=$s,Z.intersectionBy=Ds,Z.intersectionWith=Ms,Z.invert=Bh,Z.invertBy=Th,Z.invokeMap=eh,Z.iteratee=Ca,Z.keyBy=uh,Z.keys=Pc,Z.keysIn=qc,
|
||||||
q.map=vf,q.mapKeys=Pc,q.mapValues=qc,q.matches=La,q.matchesProperty=Ca,q.memoize=Wf,q.merge=Th,q.mergeWith=$h,q.method=tp,q.methodOf=rp,q.mixin=Ua,q.negate=Lf,q.nthArg=$a,q.omit=Dh,q.omitBy=Zc,q.once=Cf,q.orderBy=gf,q.over=ep,q.overArgs=lh,q.overEvery=up,q.overSome=ip,q.partial=sh,q.partialRight=hh,q.partition=eh,q.pick=Mh,q.pickBy=Kc,q.property=Da,q.propertyOf=Ma,q.pull=Ds,q.pullAll=Ao,q.pullAllBy=ko,q.pullAllWith=Oo,q.pullAt=Ms,q.range=op,q.rangeRight=fp,q.rearg=ph,q.reject=bf,q.remove=Io,q.rest=Uf,
|
Z.map=yf,Z.mapKeys=Zc,Z.mapValues=Kc,Z.matches=Ua,Z.matchesProperty=Ba,Z.memoize=Cf,Z.merge=Dh,Z.mergeWith=Mh,Z.method=ep,Z.methodOf=up,Z.mixin=Ta,Z.negate=Uf,Z.nthArg=Ma,Z.omit=Fh,Z.omitBy=Vc,Z.once=Bf,Z.orderBy=df,Z.over=ip,Z.overArgs=hh,Z.overEvery=op,Z.overSome=fp,Z.partial=ph,Z.partialRight=_h,Z.partition=ih,Z.pick=Nh,Z.pickBy=Gc,Z.property=Fa,Z.propertyOf=Na,Z.pull=Fs,Z.pullAll=Oo,Z.pullAllBy=Io,Z.pullAllWith=Ro,Z.pullAt=Ns,Z.range=cp,Z.rangeRight=ap,Z.rearg=vh,Z.reject=mf,Z.remove=zo,Z.rest=Tf,
|
||||||
q.reverse=Ro,q.sampleSize=mf,q.set=Gc,q.setWith=Hc,q.shuffle=xf,q.slice=zo,q.sortBy=uh,q.sortedUniq=Bo,q.sortedUniqBy=To,q.split=ga,q.spread=Bf,q.tail=$o,q.take=Do,q.takeRight=Mo,q.takeRightWhile=Fo,q.takeWhile=No,q.tap=Yo,q.throttle=Tf,q.thru=Qo,q.toArray=mc,q.toPairs=Fh,q.toPairsIn=Nh,q.toPath=Va,q.toPlainObject=Oc,q.transform=Jc,q.unary=$f,q.union=Fs,q.unionBy=Ns,q.unionWith=Ps,q.uniq=Po,q.uniqBy=qo,q.uniqWith=Zo,q.unset=Yc,q.unzip=Ko,q.unzipWith=Vo,q.update=Qc,q.updateWith=Xc,q.values=na,q.valuesIn=ta,
|
Z.reverse=Eo,Z.sampleSize=jf,Z.set=Jc,Z.setWith=Yc,Z.shuffle=Af,Z.slice=So,Z.sortBy=oh,Z.sortedUniq=$o,Z.sortedUniqBy=Do,Z.split=da,Z.spread=$f,Z.tail=Mo,Z.take=Fo,Z.takeRight=No,Z.takeRightWhile=Po,Z.takeWhile=qo,Z.tap=Xo,Z.throttle=Df,Z.thru=nf,Z.toArray=jc,Z.toPairs=Ph,Z.toPairsIn=qh,Z.toPath=Ha,Z.toPlainObject=Rc,Z.transform=Qc,Z.unary=Mf,Z.union=Ps,Z.unionBy=qs,Z.unionWith=Zs,Z.uniq=Zo,Z.uniqBy=Ko,Z.uniqWith=Vo,Z.unset=Xc,Z.unzip=Go,Z.unzipWith=Ho,Z.update=na,Z.updateWith=ta,Z.values=ra,Z.valuesIn=ea,
|
||||||
q.without=qs,q.words=Oa,q.wrap=Df,q.xor=Zs,q.xorBy=Ks,q.xorWith=Vs,q.zip=Gs,q.zipObject=Go,q.zipObjectDeep=Ho,q.zipWith=Hs,q.entries=Fh,q.entriesIn=Nh,q.extend=Rh,q.extendWith=zh,Ua(q,q),q.add=cp,q.attempt=Yh,q.camelCase=Ph,q.capitalize=ia,q.ceil=ap,q.clamp=ra,q.clone=Ff,q.cloneDeep=Pf,q.cloneDeepWith=qf,q.cloneWith=Nf,q.conformsTo=Zf,q.deburr=oa,q.defaultTo=Ea,q.divide=lp,q.endsWith=fa,q.eq=Kf,q.escape=ca,q.escapeRegExp=aa,q.every=ff,q.find=Qs,q.findIndex=lo,q.findKey=Ec,q.findLast=Xs,q.findLastIndex=so,
|
Z.without=Ks,Z.words=Ra,Z.wrap=Ff,Z.xor=Vs,Z.xorBy=Gs,Z.xorWith=Hs,Z.zip=Js,Z.zipObject=Jo,Z.zipObjectDeep=Yo,Z.zipWith=Ys,Z.entries=Ph,Z.entriesIn=qh,Z.extend=Eh,Z.extendWith=Sh,Ta(Z,Z),Z.add=lp,Z.attempt=Xh,Z.camelCase=Zh,Z.capitalize=fa,Z.ceil=sp,Z.clamp=ua,Z.clone=Pf,Z.cloneDeep=Zf,Z.cloneDeepWith=Kf,Z.cloneWith=qf,Z.conformsTo=Vf,Z.deburr=ca,Z.defaultTo=Wa,Z.divide=hp,Z.endsWith=aa,Z.eq=Gf,Z.escape=la,Z.escapeRegExp=sa,Z.every=af,Z.find=nh,Z.findIndex=ho,Z.findKey=Wc,Z.findLast=th,Z.findLastIndex=po,
|
||||||
q.findLastKey=Sc,q.floor=sp,q.forEach=hf,q.forEachRight=pf,q.forIn=Wc,q.forInRight=Lc,q.forOwn=Cc,q.forOwnRight=Uc,q.get=$c,q.gt=_h,q.gte=vh,q.has=Dc,q.hasIn=Mc,q.head=go,q.identity=Sa,q.includes=_f,q.indexOf=yo,q.inRange=ea,q.invoke=Bh,q.isArguments=gh,q.isArray=yh,q.isArrayBuffer=dh,q.isArrayLike=Vf,q.isArrayLikeObject=Gf,q.isBoolean=Hf,q.isBuffer=bh,q.isDate=wh,q.isElement=Jf,q.isEmpty=Yf,q.isEqual=Qf,q.isEqualWith=Xf,q.isError=nc,q.isFinite=tc,q.isFunction=rc,q.isInteger=ec,q.isLength=uc,q.isMap=mh,
|
Z.findLastKey=Lc,Z.floor=pp,Z.forEach=_f,Z.forEachRight=vf,Z.forIn=Cc,Z.forInRight=Uc,Z.forOwn=Bc,Z.forOwnRight=Tc,Z.get=Mc,Z.gt=gh,Z.gte=yh,Z.has=Fc,Z.hasIn=Nc,Z.head=bo,Z.identity=La,Z.includes=gf,Z.indexOf=wo,Z.inRange=ia,Z.invoke=$h,Z.isArguments=dh,Z.isArray=bh,Z.isArrayBuffer=wh,Z.isArrayLike=Hf,Z.isArrayLikeObject=Jf,Z.isBoolean=Yf,Z.isBuffer=mh,Z.isDate=xh,Z.isElement=Qf,Z.isEmpty=Xf,Z.isEqual=nc,Z.isEqualWith=tc,Z.isError=rc,Z.isFinite=ec,Z.isFunction=uc,Z.isInteger=ic,Z.isLength=oc,Z.isMap=jh,
|
||||||
q.isMatch=fc,q.isMatchWith=cc,q.isNaN=ac,q.isNative=lc,q.isNil=hc,q.isNull=sc,q.isNumber=pc,q.isObject=ic,q.isObjectLike=oc,q.isPlainObject=_c,q.isRegExp=xh,q.isSafeInteger=vc,q.isSet=jh,q.isString=gc,q.isSymbol=yc,q.isTypedArray=Ah,q.isUndefined=dc,q.isWeakMap=bc,q.isWeakSet=wc,q.join=wo,q.kebabCase=qh,q.last=mo,q.lastIndexOf=xo,q.lowerCase=Zh,q.lowerFirst=Kh,q.lt=kh,q.lte=Oh,q.max=Ha,q.maxBy=Ja,q.mean=Ya,q.meanBy=Qa,q.min=Xa,q.minBy=nl,q.stubArray=Fa,q.stubFalse=Na,q.stubObject=Pa,q.stubString=qa,
|
Z.isMatch=ac,Z.isMatchWith=lc,Z.isNaN=sc,Z.isNative=hc,Z.isNil=_c,Z.isNull=pc,Z.isNumber=vc,Z.isObject=fc,Z.isObjectLike=cc,Z.isPlainObject=gc,Z.isRegExp=Ah,Z.isSafeInteger=yc,Z.isSet=kh,Z.isString=dc,Z.isSymbol=bc,Z.isTypedArray=Oh,Z.isUndefined=wc,Z.isWeakMap=mc,Z.isWeakSet=xc,Z.join=xo,Z.kebabCase=Kh,Z.last=jo,Z.lastIndexOf=Ao,Z.lowerCase=Vh,Z.lowerFirst=Gh,Z.lt=Ih,Z.lte=Rh,Z.max=Ya,Z.maxBy=Qa,Z.mean=Xa,Z.meanBy=nl,Z.min=tl,Z.minBy=rl,Z.stubArray=Pa,Z.stubFalse=qa,Z.stubObject=Za,Z.stubString=Ka,
|
||||||
q.stubTrue=Za,q.multiply=hp,q.nth=jo,q.noConflict=Ba,q.noop=Ta,q.now=ih,q.pad=la,q.padEnd=sa,q.padStart=ha,q.parseInt=pa,q.random=ua,q.reduce=yf,q.reduceRight=df,q.repeat=_a,q.replace=va,q.result=Vc,q.round=pp,q.runInContext=p,q.sample=wf,q.size=jf,q.snakeCase=Vh,q.some=Af,q.sortedIndex=Eo,q.sortedIndexBy=So,q.sortedIndexOf=Wo,q.sortedLastIndex=Lo,q.sortedLastIndexBy=Co,q.sortedLastIndexOf=Uo,q.startCase=Gh,q.startsWith=ya,q.subtract=_p,q.sum=tl,q.sumBy=rl,q.template=da,q.times=Ka,q.toFinite=xc,q.toInteger=jc,
|
Z.stubTrue=Va,Z.multiply=_p,Z.nth=ko,Z.noConflict=$a,Z.noop=Da,Z.now=fh,Z.pad=ha,Z.padEnd=pa,Z.padStart=_a,Z.parseInt=va,Z.random=oa,Z.reduce=bf,Z.reduceRight=wf,Z.repeat=ga,Z.replace=ya,Z.result=Hc,Z.round=vp,Z.runInContext=p,Z.sample=xf,Z.size=kf,Z.snakeCase=Hh,Z.some=Of,Z.sortedIndex=Wo,Z.sortedIndexBy=Lo,Z.sortedIndexOf=Co,Z.sortedLastIndex=Uo,Z.sortedLastIndexBy=Bo,Z.sortedLastIndexOf=To,Z.startCase=Jh,Z.startsWith=ba,Z.subtract=gp,Z.sum=el,Z.sumBy=ul,Z.template=wa,Z.times=Ga,Z.toFinite=Ac,Z.toInteger=kc,
|
||||||
q.toLength=Ac,q.toLower=ba,q.toNumber=kc,q.toSafeInteger=Ic,q.toString=Rc,q.toUpper=wa,q.trim=ma,q.trimEnd=xa,q.trimStart=ja,q.truncate=Aa,q.unescape=ka,q.uniqueId=Ga,q.upperCase=Hh,q.upperFirst=Jh,q.each=hf,q.eachRight=pf,q.first=go,Ua(q,function(){var n={};return ee(q,function(t,r){yl.call(q.prototype,r)||(n[r]=t)}),n}(),{chain:!1}),q.VERSION=Q,r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){q[n].placeholder=q}),r(["drop","take"],function(n,t){Bt.prototype[n]=function(r){
|
Z.toLength=Oc,Z.toLower=ma,Z.toNumber=Ic,Z.toSafeInteger=zc,Z.toString=Ec,Z.toUpper=xa,Z.trim=ja,Z.trimEnd=Aa,Z.trimStart=ka,Z.truncate=Oa,Z.unescape=Ia,Z.uniqueId=Ja,Z.upperCase=Yh,Z.upperFirst=Qh,Z.each=_f,Z.eachRight=vf,Z.first=bo,Ta(Z,function(){var n={};return ue(Z,function(t,r){bl.call(Z.prototype,r)||(n[r]=t)}),n}(),{chain:!1}),Z.VERSION=nn,r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){Z[n].placeholder=Z}),r(["drop","take"],function(n,t){Ct.prototype[n]=function(r){
|
||||||
r=r===Y?1:Kl(jc(r),0);var e=this.__filtered__&&!t?new Bt(this):this.clone();return e.__filtered__?e.__takeCount__=Vl(r,e.__takeCount__):e.__views__.push({size:Vl(r,Wn),type:n+(e.__dir__<0?"Right":"")}),e},Bt.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){var r=t+1,e=r==kn||r==In;Bt.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:bi(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){
|
r=r===X?1:Gl(kc(r),0);var e=this.__filtered__&&!t?new Ct(this):this.clone();return e.__filtered__?e.__takeCount__=Hl(r,e.__takeCount__):e.__views__.push({size:Hl(r,Un),type:n+(e.__dir__<0?"Right":"")}),e},Ct.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){var r=t+1,e=r==Rn||r==En;Ct.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:mi(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){
|
||||||
var r="take"+(t?"Right":"");Bt.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Bt.prototype[n]=function(){return this.__filtered__?new Bt(this):this[r](1)}}),Bt.prototype.compact=function(){return this.filter(Sa)},Bt.prototype.find=function(n){return this.filter(n).head()},Bt.prototype.findLast=function(n){return this.reverse().find(n)},Bt.prototype.invokeMap=ru(function(n,t){return"function"==typeof n?new Bt(this):this.map(function(r){
|
var r="take"+(t?"Right":"");Ct.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Ct.prototype[n]=function(){return this.__filtered__?new Ct(this):this[r](1)}}),Ct.prototype.compact=function(){return this.filter(La)},Ct.prototype.find=function(n){return this.filter(n).head()},Ct.prototype.findLast=function(n){return this.reverse().find(n)},Ct.prototype.invokeMap=uu(function(n,t){return"function"==typeof n?new Ct(this):this.map(function(r){
|
||||||
return ke(r,n,t)})}),Bt.prototype.reject=function(n){return this.filter(Lf(bi(n)))},Bt.prototype.slice=function(n,t){n=jc(n);var r=this;return r.__filtered__&&(n>0||t<0)?new Bt(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==Y&&(t=jc(t),r=t<0?r.dropRight(-t):r.take(t-n)),r)},Bt.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Bt.prototype.toArray=function(){return this.take(Wn)},ee(Bt.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=q[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);
|
return Ie(r,n,t)})}),Ct.prototype.reject=function(n){return this.filter(Uf(mi(n)))},Ct.prototype.slice=function(n,t){n=kc(n);var r=this;return r.__filtered__&&(n>0||t<0)?new Ct(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==X&&(t=kc(t),r=t<0?r.dropRight(-t):r.take(t-n)),r)},Ct.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Ct.prototype.toArray=function(){return this.take(Un)},ue(Ct.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=Z[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);
|
||||||
u&&(q.prototype[t]=function(){var t=this.__wrapped__,o=e?[1]:arguments,f=t instanceof Bt,c=o[0],l=f||yh(t),s=function(n){var t=u.apply(q,a([n],o));return e&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(f=l=!1);var h=this.__chain__,p=!!this.__actions__.length,_=i&&!h,v=f&&!p;if(!i&&l){t=v?t:new Bt(this);var g=n.apply(t,o);return g.__actions__.push({func:Qo,args:[s],thisArg:Y}),new H(g,h)}return _&&v?n.apply(this,o):(g=this.thru(s),_?e?g.value()[0]:g.value():g)})}),r(["pop","push","shift","sort","splice","unshift"],function(n){
|
u&&(Z.prototype[t]=function(){var t=this.__wrapped__,o=e?[1]:arguments,f=t instanceof Ct,c=o[0],l=f||bh(t),s=function(n){var t=u.apply(Z,a([n],o));return e&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(f=l=!1);var h=this.__chain__,p=!!this.__actions__.length,_=i&&!h,v=f&&!p;if(!i&&l){t=v?t:new Ct(this);var g=n.apply(t,o);return g.__actions__.push({func:nf,args:[s],thisArg:X}),new Y(g,h)}return _&&v?n.apply(this,o):(g=this.thru(s),_?e?g.value()[0]:g.value():g)})}),r(["pop","push","shift","sort","splice","unshift"],function(n){
|
||||||
var t=hl[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);q.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(yh(u)?u:[],n)}return this[r](function(r){return t.apply(yh(r)?r:[],n)})}}),ee(Bt.prototype,function(n,t){var r=q[t];if(r){var e=r.name+"";yl.call(is,e)||(is[e]=[]),is[e].push({name:t,func:r})}}),is[Ju(Y,hn).name]=[{name:"wrapper",func:Y}],Bt.prototype.clone=Gt,Bt.prototype.reverse=Ht,Bt.prototype.value=Jt,q.prototype.at=Js,
|
var t=_l[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);Z.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(bh(u)?u:[],n)}return this[r](function(r){return t.apply(bh(r)?r:[],n)})}}),ue(Ct.prototype,function(n,t){var r=Z[t];if(r){var e=r.name+"";bl.call(fs,e)||(fs[e]=[]),fs[e].push({name:t,func:r})}}),fs[Qu(X,vn).name]=[{name:"wrapper",func:X}],Ct.prototype.clone=$t,Ct.prototype.reverse=Yt,Ct.prototype.value=Qt,Z.prototype.at=Qs,
|
||||||
q.prototype.chain=Xo,q.prototype.commit=nf,q.prototype.next=tf,q.prototype.plant=ef,q.prototype.reverse=uf,q.prototype.toJSON=q.prototype.valueOf=q.prototype.value=of,q.prototype.first=q.prototype.head,Ll&&(q.prototype[Ll]=rf),q},ge=ve();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Xr._=ge,define(function(){return ge})):te?((te.exports=ge)._=ge,ne._=ge):Xr._=ge}).call(this);
|
Z.prototype.chain=tf,Z.prototype.commit=rf,Z.prototype.next=ef,Z.prototype.plant=of,Z.prototype.reverse=ff,Z.prototype.toJSON=Z.prototype.valueOf=Z.prototype.value=cf,Z.prototype.first=Z.prototype.head,Ul&&(Z.prototype[Ul]=uf),Z},be=de();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(re._=be,define(function(){return be})):ue?((ue.exports=be)._=be,ee._=be):re._=be}).call(this);
|
@ -1,63 +1,17 @@
|
|||||||
{
|
{
|
||||||
"_from": "lodash@^4.17.15",
|
|
||||||
"_id": "lodash@4.17.20",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
|
|
||||||
"_location": "/dxf/lodash",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "lodash@^4.17.15",
|
|
||||||
"name": "lodash",
|
"name": "lodash",
|
||||||
"escapedName": "lodash",
|
"version": "4.17.21",
|
||||||
"rawSpec": "^4.17.15",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^4.17.15"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/dxf"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
|
|
||||||
"_shasum": "b44a9b6297bcb698f1c51a3545a2b3b368d59c52",
|
|
||||||
"_spec": "lodash@^4.17.15",
|
|
||||||
"_where": "C:\\node-v10.18.0-win-x64\\node_modules\\dxf",
|
|
||||||
"author": {
|
|
||||||
"name": "John-David Dalton",
|
|
||||||
"email": "john.david.dalton@gmail.com"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/lodash/lodash/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"contributors": [
|
|
||||||
{
|
|
||||||
"name": "John-David Dalton",
|
|
||||||
"email": "john.david.dalton@gmail.com"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Mathias Bynens",
|
|
||||||
"email": "mathias@qiwi.be"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "Lodash modular utilities.",
|
"description": "Lodash modular utilities.",
|
||||||
|
"keywords": "modules, stdlib, util",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
|
"repository": "lodash/lodash",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
"keywords": [
|
|
||||||
"modules",
|
|
||||||
"stdlib",
|
|
||||||
"util"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "lodash.js",
|
"main": "lodash.js",
|
||||||
"name": "lodash",
|
"author": "John-David Dalton <john.david.dalton@gmail.com>",
|
||||||
"repository": {
|
"contributors": [
|
||||||
"type": "git",
|
"John-David Dalton <john.david.dalton@gmail.com>",
|
||||||
"url": "git+https://github.com/lodash/lodash.git"
|
"Mathias Bynens <mathias@qiwi.be>"
|
||||||
},
|
],
|
||||||
"scripts": {
|
"scripts": { "test": "echo \"See https://travis-ci.org/lodash-archive/lodash-cli for testing details.\"" }
|
||||||
"test": "echo \"See https://travis-ci.org/lodash-archive/lodash-cli for testing details.\""
|
|
||||||
},
|
|
||||||
"version": "4.17.20"
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
var root = require('./_root'),
|
var root = require('./_root'),
|
||||||
toString = require('./toString');
|
toString = require('./toString');
|
||||||
|
|
||||||
/** Used to match leading and trailing whitespace. */
|
/** Used to match leading whitespace. */
|
||||||
var reTrimStart = /^\s+/;
|
var reTrimStart = /^\s+/;
|
||||||
|
|
||||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||||
|
@ -10,11 +10,26 @@ var assignInWith = require('./assignInWith'),
|
|||||||
templateSettings = require('./templateSettings'),
|
templateSettings = require('./templateSettings'),
|
||||||
toString = require('./toString');
|
toString = require('./toString');
|
||||||
|
|
||||||
|
/** Error message constants. */
|
||||||
|
var INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
|
||||||
|
|
||||||
/** Used to match empty string literals in compiled template source. */
|
/** Used to match empty string literals in compiled template source. */
|
||||||
var reEmptyStringLeading = /\b__p \+= '';/g,
|
var reEmptyStringLeading = /\b__p \+= '';/g,
|
||||||
reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
|
reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
|
||||||
reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
|
reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to validate the `validate` option in `_.template` variable.
|
||||||
|
*
|
||||||
|
* Forbids characters which could potentially change the meaning of the function argument definition:
|
||||||
|
* - "()," (modification of function parameters)
|
||||||
|
* - "=" (default value)
|
||||||
|
* - "[]{}" (destructuring of function parameters)
|
||||||
|
* - "/" (beginning of a comment)
|
||||||
|
* - whitespace
|
||||||
|
*/
|
||||||
|
var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to match
|
* Used to match
|
||||||
* [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
|
* [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
|
||||||
@ -210,6 +225,12 @@ function template(string, options, guard) {
|
|||||||
if (!variable) {
|
if (!variable) {
|
||||||
source = 'with (obj) {\n' + source + '\n}\n';
|
source = 'with (obj) {\n' + source + '\n}\n';
|
||||||
}
|
}
|
||||||
|
// Throw an error if a forbidden character was found in `variable`, to prevent
|
||||||
|
// potential command injection attacks.
|
||||||
|
else if (reForbiddenIdentifierChars.test(variable)) {
|
||||||
|
throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
|
||||||
|
}
|
||||||
|
|
||||||
// Cleanup code by stripping empty strings.
|
// Cleanup code by stripping empty strings.
|
||||||
source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
|
source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
|
||||||
.replace(reEmptyStringMiddle, '$1')
|
.replace(reEmptyStringMiddle, '$1')
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
var isObject = require('./isObject'),
|
var baseTrim = require('./_baseTrim'),
|
||||||
|
isObject = require('./isObject'),
|
||||||
isSymbol = require('./isSymbol');
|
isSymbol = require('./isSymbol');
|
||||||
|
|
||||||
/** Used as references for various `Number` constants. */
|
/** Used as references for various `Number` constants. */
|
||||||
var NAN = 0 / 0;
|
var NAN = 0 / 0;
|
||||||
|
|
||||||
/** Used to match leading and trailing whitespace. */
|
|
||||||
var reTrim = /^\s+|\s+$/g;
|
|
||||||
|
|
||||||
/** Used to detect bad signed hexadecimal string values. */
|
/** Used to detect bad signed hexadecimal string values. */
|
||||||
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
||||||
|
|
||||||
@ -56,7 +54,7 @@ function toNumber(value) {
|
|||||||
if (typeof value != 'string') {
|
if (typeof value != 'string') {
|
||||||
return value === 0 ? value : +value;
|
return value === 0 ? value : +value;
|
||||||
}
|
}
|
||||||
value = value.replace(reTrim, '');
|
value = baseTrim(value);
|
||||||
var isBinary = reIsBinary.test(value);
|
var isBinary = reIsBinary.test(value);
|
||||||
return (isBinary || reIsOctal.test(value))
|
return (isBinary || reIsOctal.test(value))
|
||||||
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
var baseToString = require('./_baseToString'),
|
var baseToString = require('./_baseToString'),
|
||||||
|
baseTrim = require('./_baseTrim'),
|
||||||
castSlice = require('./_castSlice'),
|
castSlice = require('./_castSlice'),
|
||||||
charsEndIndex = require('./_charsEndIndex'),
|
charsEndIndex = require('./_charsEndIndex'),
|
||||||
charsStartIndex = require('./_charsStartIndex'),
|
charsStartIndex = require('./_charsStartIndex'),
|
||||||
stringToArray = require('./_stringToArray'),
|
stringToArray = require('./_stringToArray'),
|
||||||
toString = require('./toString');
|
toString = require('./toString');
|
||||||
|
|
||||||
/** Used to match leading and trailing whitespace. */
|
|
||||||
var reTrim = /^\s+|\s+$/g;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes leading and trailing whitespace or specified characters from `string`.
|
* Removes leading and trailing whitespace or specified characters from `string`.
|
||||||
*
|
*
|
||||||
@ -33,7 +31,7 @@ var reTrim = /^\s+|\s+$/g;
|
|||||||
function trim(string, chars, guard) {
|
function trim(string, chars, guard) {
|
||||||
string = toString(string);
|
string = toString(string);
|
||||||
if (string && (guard || chars === undefined)) {
|
if (string && (guard || chars === undefined)) {
|
||||||
return string.replace(reTrim, '');
|
return baseTrim(string);
|
||||||
}
|
}
|
||||||
if (!string || !(chars = baseToString(chars))) {
|
if (!string || !(chars = baseToString(chars))) {
|
||||||
return string;
|
return string;
|
||||||
|
@ -2,10 +2,8 @@ var baseToString = require('./_baseToString'),
|
|||||||
castSlice = require('./_castSlice'),
|
castSlice = require('./_castSlice'),
|
||||||
charsEndIndex = require('./_charsEndIndex'),
|
charsEndIndex = require('./_charsEndIndex'),
|
||||||
stringToArray = require('./_stringToArray'),
|
stringToArray = require('./_stringToArray'),
|
||||||
toString = require('./toString');
|
toString = require('./toString'),
|
||||||
|
trimmedEndIndex = require('./_trimmedEndIndex');
|
||||||
/** Used to match leading and trailing whitespace. */
|
|
||||||
var reTrimEnd = /\s+$/;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes trailing whitespace or specified characters from `string`.
|
* Removes trailing whitespace or specified characters from `string`.
|
||||||
@ -29,7 +27,7 @@ var reTrimEnd = /\s+$/;
|
|||||||
function trimEnd(string, chars, guard) {
|
function trimEnd(string, chars, guard) {
|
||||||
string = toString(string);
|
string = toString(string);
|
||||||
if (string && (guard || chars === undefined)) {
|
if (string && (guard || chars === undefined)) {
|
||||||
return string.replace(reTrimEnd, '');
|
return string.slice(0, trimmedEndIndex(string) + 1);
|
||||||
}
|
}
|
||||||
if (!string || !(chars = baseToString(chars))) {
|
if (!string || !(chars = baseToString(chars))) {
|
||||||
return string;
|
return string;
|
||||||
|
@ -4,7 +4,7 @@ var baseToString = require('./_baseToString'),
|
|||||||
stringToArray = require('./_stringToArray'),
|
stringToArray = require('./_stringToArray'),
|
||||||
toString = require('./toString');
|
toString = require('./toString');
|
||||||
|
|
||||||
/** Used to match leading and trailing whitespace. */
|
/** Used to match leading whitespace. */
|
||||||
var reTrimStart = /^\s+/;
|
var reTrimStart = /^\s+/;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,78 +0,0 @@
|
|||||||
# pretty-data - Nodejs plugin
|
|
||||||
|
|
||||||
nodejs plugin to **pretty-print** or **minify**
|
|
||||||
text in **XML**, **JSON**, **CSS** and **SQL** formats.
|
|
||||||
|
|
||||||
**Version** - 0.40.0
|
|
||||||
|
|
||||||
**Copyright** (c) 2012 Vadim Kiryukhin ( vkiryukhin @ gmail.com )
|
|
||||||
|
|
||||||
**Home page:** [http://www.eslinstructor.net/pretty-data/](http://www.eslinstructor.net/pretty-data/)
|
|
||||||
|
|
||||||
**License:** Dual licensed under
|
|
||||||
the MIT and GPL licenses:
|
|
||||||
|
|
||||||
[http://www.opensource.org/licenses/mit-license.php](http://www.opensource.org/licenses/mit-license.php)
|
|
||||||
|
|
||||||
[http://www.gnu.org/licenses/gpl.html](http://www.gnu.org/licenses/gpl.html)
|
|
||||||
|
|
||||||
##Description
|
|
||||||
|
|
||||||
* `pd.xml(data )` - pretty print XML;
|
|
||||||
|
|
||||||
* `pd.json(data)` - pretty print JSON;
|
|
||||||
|
|
||||||
* `pd.css(data )` - pretty print CSS;
|
|
||||||
|
|
||||||
* `pd.sql(data )` - pretty print SQL;
|
|
||||||
|
|
||||||
* `pd.xmlmin(data [, preserveComments]) ` - minify XML;
|
|
||||||
|
|
||||||
* `pd.jsonmin(data)` - minify JSON text;
|
|
||||||
|
|
||||||
* `pd.cssmin(data [, preserveComments] )` - minify CSS text;
|
|
||||||
|
|
||||||
* `pd.sqlmin(data)` - minify JSON text;
|
|
||||||
|
|
||||||
**PARAMETERS:**
|
|
||||||
|
|
||||||
`@data` - String; XML, JSON, CSS or SQL text to beautify;
|
|
||||||
|
|
||||||
`@preserveComments` - Bool (optional, used in npp.minxml and npp.mincss only);
|
|
||||||
Set this flag to true to prevent removing comments from @data;
|
|
||||||
|
|
||||||
`@Return` - String;
|
|
||||||
|
|
||||||
|
|
||||||
**USAGE:**
|
|
||||||
|
|
||||||
`var pd = require('pretty-data').pd; `
|
|
||||||
|
|
||||||
`var xml_pp = pd.xml(data); `
|
|
||||||
|
|
||||||
`var xml_min = pd.xmlmin(data [,true]);`
|
|
||||||
|
|
||||||
`var json_pp = pd.json(data);`
|
|
||||||
|
|
||||||
`var json_min = pd.jsonmin(data);`
|
|
||||||
|
|
||||||
`var css_pp = pd.css(data); `
|
|
||||||
|
|
||||||
`var css_min = pd.cssmin(data [, true]);`
|
|
||||||
|
|
||||||
`var sql_pp = pd.sql(data);`
|
|
||||||
|
|
||||||
`var sql_min = pd.sqlmin(data);`
|
|
||||||
|
|
||||||
**TEST:**
|
|
||||||
|
|
||||||
`node ./test/test_xml
|
|
||||||
|
|
||||||
`node ./test/test_json
|
|
||||||
|
|
||||||
`node ./test/test_css
|
|
||||||
|
|
||||||
`node ./test/test_sql
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,65 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "pretty-data@^0.40.0",
|
|
||||||
"_id": "pretty-data@0.40.0",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha1-Vyqo6iNGdGerlLa1Jmpv2cj93XI=",
|
|
||||||
"_location": "/dxf/pretty-data",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "pretty-data@^0.40.0",
|
|
||||||
"name": "pretty-data",
|
|
||||||
"escapedName": "pretty-data",
|
|
||||||
"rawSpec": "^0.40.0",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^0.40.0"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/dxf"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/pretty-data/-/pretty-data-0.40.0.tgz",
|
|
||||||
"_shasum": "572aa8ea23467467ab94b6b5266a6fd9c8fddd72",
|
|
||||||
"_spec": "pretty-data@^0.40.0",
|
|
||||||
"_where": "C:\\node-v10.18.0-win-x64\\node_modules\\dxf",
|
|
||||||
"author": {
|
|
||||||
"name": "Vadim Kiryukhin",
|
|
||||||
"email": "vkiryukhin@gmail.com"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/vkiryukhin/pretty-data/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"contributors": [
|
|
||||||
{
|
|
||||||
"name": "Vadim Kiryukhin",
|
|
||||||
"email": "vkiryukhin@gmail.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "plugin to pretty-print or minify XML, JSON, CSS and SQL files",
|
|
||||||
"engine": {
|
|
||||||
"node": ">=0.4.9"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "*"
|
|
||||||
},
|
|
||||||
"homepage": "https://github.com/vkiryukhin/pretty-data#readme",
|
|
||||||
"keywords": [
|
|
||||||
"pretty print",
|
|
||||||
"beautify",
|
|
||||||
"minify",
|
|
||||||
"XML",
|
|
||||||
"JSON",
|
|
||||||
"CSS",
|
|
||||||
"SQL"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"main": "./pretty-data",
|
|
||||||
"name": "pretty-data",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+ssh://git@github.com/vkiryukhin/pretty-data.git"
|
|
||||||
},
|
|
||||||
"version": "0.40.0"
|
|
||||||
}
|
|
@ -1,344 +0,0 @@
|
|||||||
/**
|
|
||||||
* pretty-data - nodejs plugin to pretty-print or minify data in XML, JSON and CSS formats.
|
|
||||||
*
|
|
||||||
* Version - 0.40.0
|
|
||||||
* Copyright (c) 2012 Vadim Kiryukhin
|
|
||||||
* vkiryukhin @ gmail.com
|
|
||||||
* http://www.eslinstructor.net/pretty-data/
|
|
||||||
*
|
|
||||||
* Dual licensed under the MIT and GPL licenses:
|
|
||||||
* http://www.opensource.org/licenses/mit-license.php
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* pd.xml(data ) - pretty print XML;
|
|
||||||
* pd.json(data) - pretty print JSON;
|
|
||||||
* pd.css(data ) - pretty print CSS;
|
|
||||||
* pd.sql(data) - pretty print SQL;
|
|
||||||
*
|
|
||||||
* pd.xmlmin(data [, preserveComments] ) - minify XML;
|
|
||||||
* pd.jsonmin(data) - minify JSON;
|
|
||||||
* pd.cssmin(data [, preserveComments] ) - minify CSS;
|
|
||||||
* pd.sqlmin(data) - minify SQL;
|
|
||||||
*
|
|
||||||
* PARAMETERS:
|
|
||||||
*
|
|
||||||
* @data - String; XML, JSON, CSS or SQL text to beautify;
|
|
||||||
* @preserveComments - Bool (optional, used in minxml and mincss only);
|
|
||||||
* Set this flag to true to prevent removing comments from @text;
|
|
||||||
* @Return - String;
|
|
||||||
*
|
|
||||||
* USAGE:
|
|
||||||
*
|
|
||||||
* var pd = require('pretty-data').pd;
|
|
||||||
*
|
|
||||||
* var xml_pp = pd.xml(xml_text);
|
|
||||||
* var xml_min = pd.xmlmin(xml_text [,true]);
|
|
||||||
* var json_pp = pd.json(json_text);
|
|
||||||
* var json_min = pd.jsonmin(json_text);
|
|
||||||
* var css_pp = pd.css(css_text);
|
|
||||||
* var css_min = pd.cssmin(css_text [, true]);
|
|
||||||
* var sql_pp = pd.sql(sql_text);
|
|
||||||
* var sql_min = pd.sqlmin(sql_text);
|
|
||||||
*
|
|
||||||
* TEST:
|
|
||||||
* comp-name:pretty-data$ node ./test/test_xml
|
|
||||||
* comp-name:pretty-data$ node ./test/test_json
|
|
||||||
* comp-name:pretty-data$ node ./test/test_css
|
|
||||||
* comp-name:pretty-data$ node ./test/test_sql
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
function pp() {
|
|
||||||
this.shift = ['\n']; // array of shifts
|
|
||||||
this.step = ' ', // 2 spaces
|
|
||||||
maxdeep = 100, // nesting level
|
|
||||||
ix = 0;
|
|
||||||
|
|
||||||
// initialize array with shifts //
|
|
||||||
for(ix=0;ix<maxdeep;ix++){
|
|
||||||
this.shift.push(this.shift[ix]+this.step);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
// ----------------------- XML section ----------------------------------------------------
|
|
||||||
|
|
||||||
pp.prototype.xml = function(text) {
|
|
||||||
|
|
||||||
var ar = text.replace(/>\s{0,}</g,"><")
|
|
||||||
.replace(/</g,"~::~<")
|
|
||||||
.replace(/xmlns\:/g,"~::~xmlns:")
|
|
||||||
.replace(/xmlns\=/g,"~::~xmlns=")
|
|
||||||
.split('~::~'),
|
|
||||||
len = ar.length,
|
|
||||||
inComment = false,
|
|
||||||
deep = 0,
|
|
||||||
str = '',
|
|
||||||
ix = 0;
|
|
||||||
|
|
||||||
for(ix=0;ix<len;ix++) {
|
|
||||||
// start comment or <![CDATA[...]]> or <!DOCTYPE //
|
|
||||||
if(ar[ix].search(/<!/) > -1) {
|
|
||||||
str += this.shift[deep]+ar[ix];
|
|
||||||
inComment = true;
|
|
||||||
// end comment or <![CDATA[...]]> //
|
|
||||||
if(ar[ix].search(/-->/) > -1 || ar[ix].search(/\]>/) > -1 || ar[ix].search(/!DOCTYPE/) > -1 ) {
|
|
||||||
inComment = false;
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
// end comment or <![CDATA[...]]> //
|
|
||||||
if(ar[ix].search(/-->/) > -1 || ar[ix].search(/\]>/) > -1) {
|
|
||||||
str += ar[ix];
|
|
||||||
inComment = false;
|
|
||||||
} else
|
|
||||||
// <elm></elm> //
|
|
||||||
if( /^<\w/.exec(ar[ix-1]) && /^<\/\w/.exec(ar[ix]) &&
|
|
||||||
/^<[\w:\-\.\,]+/.exec(ar[ix-1]) == /^<\/[\w:\-\.\,]+/.exec(ar[ix])[0].replace('/','')) {
|
|
||||||
str += ar[ix];
|
|
||||||
if(!inComment) deep--;
|
|
||||||
} else
|
|
||||||
// <elm> //
|
|
||||||
if(ar[ix].search(/<\w/) > -1 && ar[ix].search(/<\//) == -1 && ar[ix].search(/\/>/) == -1 ) {
|
|
||||||
str = !inComment ? str += this.shift[deep++]+ar[ix] : str += ar[ix];
|
|
||||||
} else
|
|
||||||
// <elm>...</elm> //
|
|
||||||
if(ar[ix].search(/<\w/) > -1 && ar[ix].search(/<\//) > -1) {
|
|
||||||
str = !inComment ? str += this.shift[deep]+ar[ix] : str += ar[ix];
|
|
||||||
} else
|
|
||||||
// </elm> //
|
|
||||||
if(ar[ix].search(/<\//) > -1) {
|
|
||||||
str = !inComment ? str += this.shift[--deep]+ar[ix] : str += ar[ix];
|
|
||||||
} else
|
|
||||||
// <elm/> //
|
|
||||||
if(ar[ix].search(/\/>/) > -1 ) {
|
|
||||||
str = !inComment ? str += this.shift[deep]+ar[ix] : str += ar[ix];
|
|
||||||
} else
|
|
||||||
// <? xml ... ?> //
|
|
||||||
if(ar[ix].search(/<\?/) > -1) {
|
|
||||||
str += this.shift[deep]+ar[ix];
|
|
||||||
} else
|
|
||||||
// xmlns //
|
|
||||||
if( ar[ix].search(/xmlns\:/) > -1 || ar[ix].search(/xmlns\=/) > -1) {
|
|
||||||
str += this.shift[deep]+ar[ix];
|
|
||||||
}
|
|
||||||
|
|
||||||
else {
|
|
||||||
str += ar[ix];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return (str[0] == '\n') ? str.slice(1) : str;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------- JSON section ----------------------------------------------------
|
|
||||||
|
|
||||||
pp.prototype.json = function(text) {
|
|
||||||
|
|
||||||
if ( typeof text === "string" ) {
|
|
||||||
return JSON.stringify(JSON.parse(text), null, this.step);
|
|
||||||
}
|
|
||||||
if ( typeof text === "object" ) {
|
|
||||||
return JSON.stringify(text, null, this.step);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------- CSS section ----------------------------------------------------
|
|
||||||
|
|
||||||
pp.prototype.css = function(text) {
|
|
||||||
|
|
||||||
var ar = text.replace(/\s{1,}/g,' ')
|
|
||||||
.replace(/\{/g,"{~::~")
|
|
||||||
.replace(/\}/g,"~::~}~::~")
|
|
||||||
.replace(/\;/g,";~::~")
|
|
||||||
.replace(/\/\*/g,"~::~/*")
|
|
||||||
.replace(/\*\//g,"*/~::~")
|
|
||||||
.replace(/~::~\s{0,}~::~/g,"~::~")
|
|
||||||
.split('~::~'),
|
|
||||||
len = ar.length,
|
|
||||||
deep = 0,
|
|
||||||
str = '',
|
|
||||||
ix = 0;
|
|
||||||
|
|
||||||
for(ix=0;ix<len;ix++) {
|
|
||||||
|
|
||||||
if( /\{/.exec(ar[ix])) {
|
|
||||||
str += this.shift[deep++]+ar[ix];
|
|
||||||
} else
|
|
||||||
if( /\}/.exec(ar[ix])) {
|
|
||||||
str += this.shift[--deep]+ar[ix];
|
|
||||||
} else
|
|
||||||
if( /\*\\/.exec(ar[ix])) {
|
|
||||||
str += this.shift[deep]+ar[ix];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
str += this.shift[deep]+ar[ix];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return str.replace(/^\n{1,}/,'');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------- SQL section ----------------------------------------------------
|
|
||||||
|
|
||||||
function isSubquery(str, parenthesisLevel) {
|
|
||||||
return parenthesisLevel - (str.replace(/\(/g,'').length - str.replace(/\)/g,'').length )
|
|
||||||
}
|
|
||||||
|
|
||||||
function split_sql(str, tab) {
|
|
||||||
|
|
||||||
return str.replace(/\s{1,}/g," ")
|
|
||||||
|
|
||||||
.replace(/ AND /ig,"~::~"+tab+tab+"AND ")
|
|
||||||
.replace(/ BETWEEN /ig,"~::~"+tab+"BETWEEN ")
|
|
||||||
.replace(/ CASE /ig,"~::~"+tab+"CASE ")
|
|
||||||
.replace(/ ELSE /ig,"~::~"+tab+"ELSE ")
|
|
||||||
.replace(/ END /ig,"~::~"+tab+"END ")
|
|
||||||
.replace(/ FROM /ig,"~::~FROM ")
|
|
||||||
.replace(/ GROUP\s{1,}BY/ig,"~::~GROUP BY ")
|
|
||||||
.replace(/ HAVING /ig,"~::~HAVING ")
|
|
||||||
//.replace(/ IN /ig,"~::~"+tab+"IN ")
|
|
||||||
.replace(/ IN /ig," IN ")
|
|
||||||
.replace(/ JOIN /ig,"~::~JOIN ")
|
|
||||||
.replace(/ CROSS~::~{1,}JOIN /ig,"~::~CROSS JOIN ")
|
|
||||||
.replace(/ INNER~::~{1,}JOIN /ig,"~::~INNER JOIN ")
|
|
||||||
.replace(/ LEFT~::~{1,}JOIN /ig,"~::~LEFT JOIN ")
|
|
||||||
.replace(/ RIGHT~::~{1,}JOIN /ig,"~::~RIGHT JOIN ")
|
|
||||||
.replace(/ ON /ig,"~::~"+tab+"ON ")
|
|
||||||
.replace(/ OR /ig,"~::~"+tab+tab+"OR ")
|
|
||||||
.replace(/ ORDER\s{1,}BY/ig,"~::~ORDER BY ")
|
|
||||||
.replace(/ OVER /ig,"~::~"+tab+"OVER ")
|
|
||||||
.replace(/\(\s{0,}SELECT /ig,"~::~(SELECT ")
|
|
||||||
.replace(/\)\s{0,}SELECT /ig,")~::~SELECT ")
|
|
||||||
.replace(/ THEN /ig," THEN~::~"+tab+"")
|
|
||||||
.replace(/ UNION /ig,"~::~UNION~::~")
|
|
||||||
.replace(/ USING /ig,"~::~USING ")
|
|
||||||
.replace(/ WHEN /ig,"~::~"+tab+"WHEN ")
|
|
||||||
.replace(/ WHERE /ig,"~::~WHERE ")
|
|
||||||
.replace(/ WITH /ig,"~::~WITH ")
|
|
||||||
//.replace(/\,\s{0,}\(/ig,",~::~( ")
|
|
||||||
//.replace(/\,/ig,",~::~"+tab+tab+"")
|
|
||||||
.replace(/ ALL /ig," ALL ")
|
|
||||||
.replace(/ AS /ig," AS ")
|
|
||||||
.replace(/ ASC /ig," ASC ")
|
|
||||||
.replace(/ DESC /ig," DESC ")
|
|
||||||
.replace(/ DISTINCT /ig," DISTINCT ")
|
|
||||||
.replace(/ EXISTS /ig," EXISTS ")
|
|
||||||
.replace(/ NOT /ig," NOT ")
|
|
||||||
.replace(/ NULL /ig," NULL ")
|
|
||||||
.replace(/ LIKE /ig," LIKE ")
|
|
||||||
.replace(/\s{0,}SELECT /ig,"SELECT ")
|
|
||||||
.replace(/~::~{1,}/g,"~::~")
|
|
||||||
.split('~::~');
|
|
||||||
}
|
|
||||||
|
|
||||||
pp.prototype.sql = function(text) {
|
|
||||||
|
|
||||||
var ar_by_quote = text.replace(/\s{1,}/g," ")
|
|
||||||
.replace(/\'/ig,"~::~\'")
|
|
||||||
.split('~::~'),
|
|
||||||
len = ar_by_quote.length,
|
|
||||||
ar = [],
|
|
||||||
deep = 0,
|
|
||||||
tab = this.step,//+this.step,
|
|
||||||
inComment = true,
|
|
||||||
inQuote = false,
|
|
||||||
parenthesisLevel = 0,
|
|
||||||
str = '',
|
|
||||||
ix = 0;
|
|
||||||
|
|
||||||
for(ix=0;ix<len;ix++) {
|
|
||||||
|
|
||||||
if(ix%2) {
|
|
||||||
ar = ar.concat(ar_by_quote[ix]);
|
|
||||||
} else {
|
|
||||||
ar = ar.concat(split_sql(ar_by_quote[ix], tab) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
len = ar.length;
|
|
||||||
for(ix=0;ix<len;ix++) {
|
|
||||||
|
|
||||||
parenthesisLevel = isSubquery(ar[ix], parenthesisLevel);
|
|
||||||
|
|
||||||
if( /\s{0,}\s{0,}SELECT\s{0,}/.exec(ar[ix])) {
|
|
||||||
ar[ix] = ar[ix].replace(/\,/g,",\n"+tab+tab+"")
|
|
||||||
}
|
|
||||||
|
|
||||||
if( /\s{0,}\(\s{0,}SELECT\s{0,}/.exec(ar[ix])) {
|
|
||||||
deep++;
|
|
||||||
str += this.shift[deep]+ar[ix];
|
|
||||||
} else
|
|
||||||
if( /\'/.exec(ar[ix]) ) {
|
|
||||||
if(parenthesisLevel<1 && deep) {
|
|
||||||
deep--;
|
|
||||||
}
|
|
||||||
str += ar[ix];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
str += this.shift[deep]+ar[ix];
|
|
||||||
if(parenthesisLevel<1 && deep) {
|
|
||||||
deep--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
str = str.replace(/^\n{1,}/,'').replace(/\n{1,}/g,"\n");
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------- min section ----------------------------------------------------
|
|
||||||
|
|
||||||
pp.prototype.xmlmin = function(text, preserveComments) {
|
|
||||||
|
|
||||||
var str = preserveComments ? text
|
|
||||||
: text.replace(/\<![ \r\n\t]*(--([^\-]|[\r\n]|-[^\-])*--[ \r\n\t]*)\>/g,"");
|
|
||||||
return str.replace(/>\s{0,}</g,"><");
|
|
||||||
}
|
|
||||||
|
|
||||||
pp.prototype.jsonmin = function(text) {
|
|
||||||
|
|
||||||
return text.replace(/\s{0,}\{\s{0,}/g,"{")
|
|
||||||
.replace(/\s{0,}\[$/g,"[")
|
|
||||||
.replace(/\[\s{0,}/g,"[")
|
|
||||||
.replace(/:\s{0,}\[/g,':[')
|
|
||||||
.replace(/\s{0,}\}\s{0,}/g,"}")
|
|
||||||
.replace(/\s{0,}\]\s{0,}/g,"]")
|
|
||||||
.replace(/\"\s{0,}\,/g,'",')
|
|
||||||
.replace(/\,\s{0,}\"/g,',"')
|
|
||||||
.replace(/\"\s{0,}:/g,'":')
|
|
||||||
.replace(/:\s{0,}\"/g,':"')
|
|
||||||
.replace(/:\s{0,}\[/g,':[')
|
|
||||||
.replace(/\,\s{0,}\[/g,',[')
|
|
||||||
.replace(/\,\s{2,}/g,', ')
|
|
||||||
.replace(/\]\s{0,},\s{0,}\[/g,'],[');
|
|
||||||
}
|
|
||||||
|
|
||||||
pp.prototype.cssmin = function(text, preserveComments) {
|
|
||||||
|
|
||||||
var str = preserveComments ? text
|
|
||||||
: text.replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\//g,"") ;
|
|
||||||
return str.replace(/\s{1,}/g,' ')
|
|
||||||
.replace(/\{\s{1,}/g,"{")
|
|
||||||
.replace(/\}\s{1,}/g,"}")
|
|
||||||
.replace(/\;\s{1,}/g,";")
|
|
||||||
.replace(/\/\*\s{1,}/g,"/*")
|
|
||||||
.replace(/\*\/\s{1,}/g,"*/");
|
|
||||||
}
|
|
||||||
|
|
||||||
pp.prototype.sqlmin = function(text) {
|
|
||||||
return text.replace(/\s{1,}/g," ").replace(/\s{1,}\(/,"(").replace(/\s{1,}\)/,")");
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
exports.pd= new pp;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
|
|
||||||
var css = '.headbg{margin:0 8px;display:none; }a:link,a:focus{ color:#00c }\n /* comment */ a:active{ color:red }',
|
|
||||||
pp_css = require('../pretty-data').pd.css(css),
|
|
||||||
pp_cssmin_com = require('../pretty-data').pd.cssmin(css,true),
|
|
||||||
pp_cssmin = require('../pretty-data').pd.cssmin(css);
|
|
||||||
|
|
||||||
console.log('\n==============================================================================\n');
|
|
||||||
console.log('\n/*------- Original CSS string: -------*/\n\n' + css + '\n');
|
|
||||||
console.log('\n/*------- Beautified original CSS -------------*/\n\n' + pp_css + '\n');
|
|
||||||
console.log('\n/*------- Minified original CSS with preserved comments: -------*/\n\n' + pp_cssmin_com + '\n');
|
|
||||||
console.log('\n/*------- Minified original CSS with deleted comments: ---------*/\n\n' + pp_cssmin + '\n');
|
|
||||||
console.log('\n===============================================================================\n');
|
|
@ -1,10 +0,0 @@
|
|||||||
|
|
||||||
var json = '{"menu":{"id": "file","value": \n[[1,2,3],[4,5,6] ],\n"popup":{"menuitem":[{"value": ["one","two"],\n"onclick":"CreateNewDoc()"},{"value":"Close","onclick":"CloseDoc()"}]}}}',
|
|
||||||
json_pp = require('../pretty-data').pd.json(json),
|
|
||||||
json_min = require('../pretty-data').pd.jsonmin(json);
|
|
||||||
|
|
||||||
console.log('\n==============================================================================\n');
|
|
||||||
console.log('\n/*------- Original JSON string: -------*/\n\n' + json + '\n');
|
|
||||||
console.log('\n/*------- Beautified JSON: -------------*/\n\n' + json_pp + '\n');
|
|
||||||
console.log('\n/*------- Minified JSON: ---------------*/\n\n' + json_min + '\n');
|
|
||||||
console.log('\n===============================================================================\n');
|
|
@ -1,10 +0,0 @@
|
|||||||
|
|
||||||
var sql = "select ca.proj_id as proj_id, ca.ca_name as proj_name, ca.ca_date_start as proj_start, ca.ca_date_end AS proj_end,\n(select COUNT(*) from rotations r \nwhere r.proj_id = proj_id and r.r_status = 'R' \ngroup by r.proj_id) r_count, \n(select count(*) from rotations r \nwhere r.proj_id = proj_id and r.channel_id = 24) r_rtb_count \nfrom projs ca, clients c, proj_auth caa \nwhere ca.client_id = 12345 and ca.client_id = c.client_id and ca_type = 'zzz' \nand c.agency_id = 0 and ca.client_id = NVL( caa.client_id, ca.client_id) \nand proj_id = NVL( caa.proj_id, proj_id) and caa.contact_id = 7890";
|
|
||||||
var sql_pp = require('../pretty-data').pd.sql(sql);
|
|
||||||
var sql_min = require('../pretty-data').pd.sqlmin(sql);
|
|
||||||
|
|
||||||
console.log('\n==============================================================================\n');
|
|
||||||
console.log('\n/*------- Original SQL string: -------*/\n\n' + sql + '\n');
|
|
||||||
console.log('\n/*------- Beautified SQL: -------------*/\n\n' + sql_pp + '\n');
|
|
||||||
console.log('\n/*------- Minified SQL: ---------------*/\n\n' + sql_min + '\n');
|
|
||||||
console.log('\n===============================================================================\n');
|
|
@ -1,12 +0,0 @@
|
|||||||
|
|
||||||
var xml = '<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE foo SYSTEM "Foo.dtd"><a> <b>bbb</b> <!-- comment --><c/><d><soapenv:Envelope xmlns:soapenv="http://xxx" xmlns:xsd="http://yyy" xmlns:xsi="http://zzz"></soapenv> </d><e> <![CDATA[ <z></z> ]]></e><f><g></g></f></a>',
|
|
||||||
pp_xml = require('../pretty-data').pd.xml(xml),
|
|
||||||
pp_xmlmin_com = require('../pretty-data').pd.xmlmin(xml,true),
|
|
||||||
pp_xmlmin = require('../pretty-data').pd.xmlmin(xml);
|
|
||||||
|
|
||||||
console.log('\n==============================================================================\n');
|
|
||||||
console.log('\n/*------- Original XML string: -------*/\n\n' + xml + '\n');
|
|
||||||
console.log('\n/*------- Beautified XML -------------*/\n\n' + pp_xml + '\n');
|
|
||||||
console.log('\n/*------- Minified XML with preserved comments: -------*/\n\n' + pp_xmlmin_com + '\n');
|
|
||||||
console.log('\n/*------- Minified XML with deleted comments: ---------*/\n\n' + pp_xmlmin + '\n');
|
|
||||||
console.log('\n===============================================================================\n');
|
|
@ -1 +0,0 @@
|
|||||||
node_modules/
|
|
@ -1,46 +0,0 @@
|
|||||||
Inspired by [Decimal rounding polyfill by MDN](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Math/round#Decimal_rounding).
|
|
||||||
|
|
||||||
__Installation__
|
|
||||||
|
|
||||||
Install using npm:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ npm install round10
|
|
||||||
```
|
|
||||||
|
|
||||||
__Usage__
|
|
||||||
|
|
||||||
Use in your project:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ npm install --save round10
|
|
||||||
```
|
|
||||||
|
|
||||||
and in your code:
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
var round10 = require('round10').round10;
|
|
||||||
round10(55.55, -1); // 55.6
|
|
||||||
```
|
|
||||||
|
|
||||||
Optionally, you may use the polyfill which extends the global Math object:
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
require('round10').polyfill();
|
|
||||||
Math.round10(55.55, -1); // 55.6
|
|
||||||
```
|
|
||||||
|
|
||||||
__Check out the code__
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ git clone git@github.com:jhohlfeld/round10.git
|
|
||||||
$ cd round10
|
|
||||||
$ npm install
|
|
||||||
```
|
|
||||||
|
|
||||||
Test using [mocha](http://mochajs.org/):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ npm install -g mocha
|
|
||||||
$ mocha test/test.js
|
|
||||||
```
|
|
@ -1,64 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "round10@^1.0.3",
|
|
||||||
"_id": "round10@1.0.3",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha1-hhEPRqEIdKGTHaf91eBtGFeo5NA=",
|
|
||||||
"_location": "/dxf/round10",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "round10@^1.0.3",
|
|
||||||
"name": "round10",
|
|
||||||
"escapedName": "round10",
|
|
||||||
"rawSpec": "^1.0.3",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^1.0.3"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/dxf"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/round10/-/round10-1.0.3.tgz",
|
|
||||||
"_shasum": "86110f46a10874a1931da7fdd5e06d1857a8e4d0",
|
|
||||||
"_spec": "round10@^1.0.3",
|
|
||||||
"_where": "C:\\node-v10.18.0-win-x64\\node_modules\\dxf",
|
|
||||||
"author": {
|
|
||||||
"name": "Jakob Hohlfeld",
|
|
||||||
"email": "jhohlfeld@polyban.io"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/jhohlfeld/round10/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"dependencies": {},
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "Brings decimal adjustment to the Math object.",
|
|
||||||
"devDependencies": {
|
|
||||||
"should": "^7.0.2"
|
|
||||||
},
|
|
||||||
"directories": {
|
|
||||||
"test": "test"
|
|
||||||
},
|
|
||||||
"homepage": "https://github.com/jhohlfeld/round10#readme",
|
|
||||||
"keywords": [
|
|
||||||
"round",
|
|
||||||
"round10",
|
|
||||||
"mdn",
|
|
||||||
"Math",
|
|
||||||
"Math.round",
|
|
||||||
"precision",
|
|
||||||
"decimal",
|
|
||||||
"adjustment"
|
|
||||||
],
|
|
||||||
"license": "CC-BY-SA-2.5",
|
|
||||||
"main": "round10.js",
|
|
||||||
"name": "round10",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/jhohlfeld/round10.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "mocha test/test.js"
|
|
||||||
},
|
|
||||||
"version": "1.0.3"
|
|
||||||
}
|
|
@ -1,53 +0,0 @@
|
|||||||
/**
|
|
||||||
* Decimal adjustment of a number.
|
|
||||||
*
|
|
||||||
* @param {String} type The type of adjustment.
|
|
||||||
* @param {Number} value The number.
|
|
||||||
* @param {Integer} exp The exponent (the 10 logarithm of the adjustment base).
|
|
||||||
* @returns {Number} The adjusted value.
|
|
||||||
*/
|
|
||||||
var decimalAdjust = exports.decimalAdjust = function(type, value, exp) {
|
|
||||||
// If the exp is undefined or zero...
|
|
||||||
if (typeof exp === 'undefined' || +exp === 0) {
|
|
||||||
return Math[type](value);
|
|
||||||
}
|
|
||||||
value = +value;
|
|
||||||
exp = +exp;
|
|
||||||
// If the value is not a number or the exp is not an integer...
|
|
||||||
if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0)) {
|
|
||||||
return NaN;
|
|
||||||
}
|
|
||||||
// Shift
|
|
||||||
value = value.toString().split('e');
|
|
||||||
value = Math[type](+(value[0] + 'e' + (value[1] ? (+value[1] - exp) : -exp)));
|
|
||||||
// Shift back
|
|
||||||
value = value.toString().split('e');
|
|
||||||
return +(value[0] + 'e' + (value[1] ? (+value[1] + exp) : exp));
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
round10: function(value, exp) {
|
|
||||||
return decimalAdjust('round', value, exp);
|
|
||||||
},
|
|
||||||
floor10: function(value, exp) {
|
|
||||||
return decimalAdjust('floor', value, exp);
|
|
||||||
},
|
|
||||||
ceil10: function(value, exp) {
|
|
||||||
return decimalAdjust('ceil', value, exp);
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports.polyfill = function() {
|
|
||||||
// Decimal round
|
|
||||||
if (!Math.round10) {
|
|
||||||
Math.round10 = module.exports.round10;
|
|
||||||
}
|
|
||||||
// Decimal floor
|
|
||||||
if (!Math.floor10) {
|
|
||||||
Math.floor10 = module.exports.floor10;
|
|
||||||
}
|
|
||||||
// Decimal ceil
|
|
||||||
if (!Math.ceil10) {
|
|
||||||
Math.ceil10 = module.exports.ceil10;
|
|
||||||
}
|
|
||||||
};
|
|
@ -1,53 +0,0 @@
|
|||||||
var should = require('should');
|
|
||||||
var round10 = require('../round10');
|
|
||||||
|
|
||||||
describe('round10.polyfill', function() {
|
|
||||||
|
|
||||||
before(function() {
|
|
||||||
round10.polyfill()
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should add #round10 to Math', function() {
|
|
||||||
// Round
|
|
||||||
Math.round10.should.be.a.Function();
|
|
||||||
});
|
|
||||||
it('should add #floor10 to Math', function() {
|
|
||||||
// Floor
|
|
||||||
Math.floor10.should.be.a.Function();
|
|
||||||
});
|
|
||||||
it('should add #ceil10 to Math', function() {
|
|
||||||
// Ceil
|
|
||||||
Math.ceil10.should.be.a.Function();
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('round10', function() {
|
|
||||||
|
|
||||||
it('should have #round10', function() {
|
|
||||||
// Round
|
|
||||||
round10.round10(55.55, -1).should.equal(55.6);
|
|
||||||
round10.round10(55.549, -1).should.equal(55.5);
|
|
||||||
round10.round10(55, 1).should.equal(60);
|
|
||||||
round10.round10(54.9, 1).should.equal(50);
|
|
||||||
round10.round10(-55.55, -1).should.equal(-55.5);
|
|
||||||
round10.round10(-55.551, -1).should.equal(-55.6);
|
|
||||||
round10.round10(-55, 1).should.equal(-50);
|
|
||||||
round10.round10(-55.1, 1).should.equal(-60);
|
|
||||||
round10.round10(1.005, -2).should.equal(1.01);
|
|
||||||
});
|
|
||||||
it('should have #floor10', function() {
|
|
||||||
// Floor
|
|
||||||
round10.floor10(55.59, -1).should.equal(55.5);
|
|
||||||
round10.floor10(59, 1).should.equal(50);
|
|
||||||
round10.floor10(-55.51, -1).should.equal(-55.6);
|
|
||||||
round10.floor10(-51, 1).should.equal(-60);
|
|
||||||
});
|
|
||||||
it('should have #ceil10', function() {
|
|
||||||
// Ceil
|
|
||||||
round10.ceil10(55.51, -1).should.equal(55.6);
|
|
||||||
round10.ceil10(51, 1).should.equal(60);
|
|
||||||
round10.ceil10(-55.59, -1).should.equal(-55.5);
|
|
||||||
round10.ceil10(-59, 1).should.equal(-50);
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,38 +1,26 @@
|
|||||||
{
|
{
|
||||||
"_from": "vecks@^3.9.0",
|
|
||||||
"_id": "vecks@3.9.2",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha512-ubOo1KoOrPu3llYmlE4SH60JWcR+YDaObP+1Kzpbcl09dKIf0fbBweW8Xyg+6Nk2Rrnyit6Jxw9bx2LOYpMQMA==",
|
|
||||||
"_location": "/dxf/vecks",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "vecks@^3.9.0",
|
|
||||||
"name": "vecks",
|
"name": "vecks",
|
||||||
"escapedName": "vecks",
|
"version": "3.9.2",
|
||||||
"rawSpec": "^3.9.0",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^3.9.0"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/dxf"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/vecks/-/vecks-3.9.2.tgz",
|
|
||||||
"_shasum": "b3f20c9d928d85488fe73ec25ba3b48859594d47",
|
|
||||||
"_spec": "vecks@^3.9.0",
|
|
||||||
"_where": "C:\\node-v10.18.0-win-x64\\node_modules\\dxf",
|
|
||||||
"author": {
|
|
||||||
"name": "Ben Nortier",
|
|
||||||
"email": "ben@bjnortier.com"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/bjnortier/vecks/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"dependencies": {},
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "2D and 3D Vector Algebra library",
|
"description": "2D and 3D Vector Algebra library",
|
||||||
|
"keywords": [
|
||||||
|
"vector",
|
||||||
|
"algebra"
|
||||||
|
],
|
||||||
|
"main": "lib/index.js",
|
||||||
|
"scripts": {
|
||||||
|
"test:lint": "eslint --fix src test",
|
||||||
|
"test:unit": "mocha --require @babel/register --recursive test/*.js",
|
||||||
|
"test:unit:watch": "npm run test:unit -- --watch",
|
||||||
|
"test": "npm run test:lint && npm run test:unit",
|
||||||
|
"compile": "babel -d lib/ src/",
|
||||||
|
"prepublishOnly": "npm audit && rimraf lib/ && npm run compile"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git@github.com:bjnortier/vecks.git"
|
||||||
|
},
|
||||||
|
"author": "Ben Nortier <ben@bjnortier.com>",
|
||||||
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.8.4",
|
"@babel/cli": "^7.8.4",
|
||||||
"@babel/core": "^7.8.7",
|
"@babel/core": "^7.8.7",
|
||||||
@ -49,26 +37,7 @@
|
|||||||
"mocha": "^6.2.2",
|
"mocha": "^6.2.2",
|
||||||
"rimraf": "^2.7.1"
|
"rimraf": "^2.7.1"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/bjnortier/vecks#readme",
|
"dependencies": {},
|
||||||
"keywords": [
|
|
||||||
"vector",
|
|
||||||
"algebra"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"main": "lib/index.js",
|
|
||||||
"name": "vecks",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+ssh://git@github.com/bjnortier/vecks.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"compile": "babel -d lib/ src/",
|
|
||||||
"prepublishOnly": "npm audit && rimraf lib/ && npm run compile",
|
|
||||||
"test": "npm run test:lint && npm run test:unit",
|
|
||||||
"test:lint": "eslint --fix src test",
|
|
||||||
"test:unit": "mocha --require @babel/register --recursive test/*.js",
|
|
||||||
"test:unit:watch": "npm run test:unit -- --watch"
|
|
||||||
},
|
|
||||||
"standard": {
|
"standard": {
|
||||||
"globals": [
|
"globals": [
|
||||||
"describe",
|
"describe",
|
||||||
@ -80,6 +49,5 @@
|
|||||||
"ignore": [
|
"ignore": [
|
||||||
"lib/"
|
"lib/"
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
"version": "3.9.2"
|
|
||||||
}
|
}
|
||||||
|
12707
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/package-lock.json
generated
vendored
Normal file
12707
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/package-lock.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
152
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/package.json
generated
vendored
152
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/package.json
generated
vendored
@ -1,107 +1,78 @@
|
|||||||
{
|
{
|
||||||
"_from": "dxf",
|
|
||||||
"_id": "dxf@4.4.2",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha512-iTq0mMBtukS8wNcrfTIC3ESUvcgiFgBzw528Qoxyep+XryqJfJkc58HhGixNPZSI2xGq1IC6eOwC741VZ6hMBQ==",
|
|
||||||
"_location": "/dxf",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "tag",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "dxf",
|
|
||||||
"name": "dxf",
|
"name": "dxf",
|
||||||
"escapedName": "dxf",
|
"version": "5.1.0",
|
||||||
"rawSpec": "",
|
"description": "DXF parser for node/browser",
|
||||||
"saveSpec": null,
|
"main": "lib/index.js",
|
||||||
"fetchSpec": "latest"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"#USER"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/dxf/-/dxf-4.4.2.tgz",
|
|
||||||
"_shasum": "c8d7e213311a729905b179fbba9c179ea03951b4",
|
|
||||||
"_spec": "dxf",
|
|
||||||
"_where": "C:\\Users\\mario\\Downloads\\dxf-master",
|
|
||||||
"author": {
|
|
||||||
"name": "Ben Nortier",
|
|
||||||
"email": "ben@bjnortier.com"
|
|
||||||
},
|
|
||||||
"bin": {
|
"bin": {
|
||||||
"dxf-to-svg": "lib/cli.js"
|
"dxf-to-svg": "lib/cli.js"
|
||||||
},
|
},
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/bjnortier/dxf/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"dependencies": {
|
|
||||||
"commander": "^2.20.3",
|
|
||||||
"lodash": "^4.17.15",
|
|
||||||
"pretty-data": "^0.40.0",
|
|
||||||
"round10": "^1.0.3",
|
|
||||||
"vecks": "^3.9.0"
|
|
||||||
},
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "DXF parser for node/browser",
|
|
||||||
"devDependencies": {
|
|
||||||
"@babel/cli": "^7.8.4",
|
|
||||||
"@babel/core": "^7.8.7",
|
|
||||||
"@babel/node": "^7.8.7",
|
|
||||||
"@babel/preset-env": "^7.8.7",
|
|
||||||
"@babel/preset-react": "^7.8.3",
|
|
||||||
"@babel/register": "^7.8.6",
|
|
||||||
"acorn": "^6.0.0",
|
|
||||||
"babel-eslint": "^10.1.0",
|
|
||||||
"babel-loader": "^8.0.6",
|
|
||||||
"browserify": "^16.5.0",
|
|
||||||
"eslint": "^6.8.0",
|
|
||||||
"eslint-config-standard": "^14.1.0",
|
|
||||||
"eslint-config-standard-react": "^9.2.0",
|
|
||||||
"eslint-plugin-babel": "^5.3.0",
|
|
||||||
"eslint-plugin-import": "^2.20.1",
|
|
||||||
"eslint-plugin-jest": "^22.20.0",
|
|
||||||
"eslint-plugin-node": "^10.0.0",
|
|
||||||
"eslint-plugin-promise": "^4.2.1",
|
|
||||||
"eslint-plugin-react": "^7.19.0",
|
|
||||||
"eslint-plugin-standard": "^4.0.1",
|
|
||||||
"expect": "^24.9.0",
|
|
||||||
"mocha": "^7.1.1",
|
|
||||||
"open": "^7.0.3",
|
|
||||||
"raw-loader": "^1.0.0",
|
|
||||||
"react": "^16.13.0",
|
|
||||||
"react-dom": "^16.13.0",
|
|
||||||
"react-router": "^5.1.2",
|
|
||||||
"react-router-dom": "^5.1.2",
|
|
||||||
"rimraf": "^2.7.1",
|
|
||||||
"webpack": "^4.43.0",
|
|
||||||
"webpack-cli": "^3.3.11",
|
|
||||||
"webpack-dev-server": "^3.10.3",
|
|
||||||
"xml2js": "^0.4.23"
|
|
||||||
},
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8.9.0"
|
"node": ">=8.9.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/bjnortier/dxf",
|
"scripts": {
|
||||||
|
"compile": "babel -d lib/ src/",
|
||||||
|
"dist": "browserify lib/index.js --standalone dxf -o dist/dxf.js",
|
||||||
|
"lint": "eslint src test",
|
||||||
|
"prepublishOnly": "npm run lint && npm run test && rimraf dist/ lib/ && npm run compile && npm run dist",
|
||||||
|
"prettier": "prettier --write .",
|
||||||
|
"test": "npm run test:unit",
|
||||||
|
"test:functional": "cd test/functional && webpack-dev-server",
|
||||||
|
"test:unit": "mocha --require @babel/register --recursive test/unit/**",
|
||||||
|
"test:unit:watch": "npm run test:unit -- --watch"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git://github.com/skymakerolof/dxf.git"
|
||||||
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"DXF",
|
"DXF",
|
||||||
"Parser",
|
"Parser",
|
||||||
"SVG"
|
"SVG"
|
||||||
],
|
],
|
||||||
|
"author": "Ben Nortier <ben@bjnortier.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "lib/index.js",
|
"bugs": {
|
||||||
"name": "dxf",
|
"url": "https://github.com/skymakerolof/dxf/issues"
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git://github.com/bjnortier/dxf.git"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"homepage": "https://github.com/skymakerolof/dxf",
|
||||||
"compile": "babel -d lib/ src/",
|
"devDependencies": {
|
||||||
"dist": "mkdir -p dist && browserify lib/index.js --standalone dxf -o dist/dxf.js",
|
"@babel/cli": "^7.22.10",
|
||||||
"prepublishOnly": "rimraf dist/ lib/ && npm run compile && npm run dist",
|
"@babel/core": "^7.22.10",
|
||||||
"test": "npm run test:lint && npm run test:unit",
|
"@babel/eslint-parser": "^7.22.10",
|
||||||
"test:functional": "cd test/functional && webpack-dev-server",
|
"@babel/preset-env": "^7.22.10",
|
||||||
"test:lint": "eslint --fix src test",
|
"@babel/preset-react": "^7.22.5",
|
||||||
"test:unit": "mocha --require @babel/register --recursive test/unit/**",
|
"@babel/register": "^7.22.5",
|
||||||
"test:unit:watch": "npm run test:unit -- --watch"
|
"babel-loader": "^9.1.3",
|
||||||
|
"browserify": "^16.5.2",
|
||||||
|
"eslint": "^8.46.0",
|
||||||
|
"eslint-config-prettier": "^8.8.0",
|
||||||
|
"eslint-config-standard": "^17.1.0",
|
||||||
|
"eslint-config-standard-react": "^13.0.0",
|
||||||
|
"eslint-plugin-import": "^2.28.0",
|
||||||
|
"eslint-plugin-n": "^16.0.1",
|
||||||
|
"eslint-plugin-promise": "^6.1.1",
|
||||||
|
"eslint-plugin-react": "^7.33.1",
|
||||||
|
"eslint-plugin-react-hooks": "^4.6.0",
|
||||||
|
"expect": "^29.6.2",
|
||||||
|
"mocha": "^10.2.0",
|
||||||
|
"prettier": "^2.8.8",
|
||||||
|
"prop-types": "^15.8.1",
|
||||||
|
"raw-loader": "^4.0.2",
|
||||||
|
"react": "^16.14.0",
|
||||||
|
"react-dom": "^16.14.0",
|
||||||
|
"react-router-dom": "^5.3.4",
|
||||||
|
"rimraf": "^5.0.1",
|
||||||
|
"standard-version": "^9.5.0",
|
||||||
|
"webpack": "^5.88.2",
|
||||||
|
"webpack-cli": "^5.1.4",
|
||||||
|
"webpack-dev-server": "^4.15.1",
|
||||||
|
"xml2js": "^0.6.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"babel": "^6.23.0",
|
||||||
|
"commander": "^2.20.3",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
|
"vecks": "^3.9.2"
|
||||||
},
|
},
|
||||||
"standard": {
|
"standard": {
|
||||||
"globals": [
|
"globals": [
|
||||||
@ -115,6 +86,5 @@
|
|||||||
"lib/",
|
"lib/",
|
||||||
"dist/"
|
"dist/"
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
"version": "4.4.2"
|
|
||||||
}
|
}
|
||||||
|
7
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/applyTransforms.js
generated
vendored
7
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/applyTransforms.js
generated
vendored
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply the transforms to the polyline.
|
* Apply the transforms to the polyline.
|
||||||
*
|
*
|
||||||
@ -7,7 +6,7 @@
|
|||||||
* @returns the transformed polyline
|
* @returns the transformed polyline
|
||||||
*/
|
*/
|
||||||
export default (polyline, transforms) => {
|
export default (polyline, transforms) => {
|
||||||
transforms.forEach(transform => {
|
transforms.forEach((transform) => {
|
||||||
polyline = polyline.map(function (p) {
|
polyline = polyline.map(function (p) {
|
||||||
// Use a copy to avoid side effects
|
// Use a copy to avoid side effects
|
||||||
let p2 = [p[0], p[1]]
|
let p2 = [p[0], p[1]]
|
||||||
@ -18,10 +17,10 @@ export default (polyline, transforms) => {
|
|||||||
p2[1] = p2[1] * transform.scaleY
|
p2[1] = p2[1] * transform.scaleY
|
||||||
}
|
}
|
||||||
if (transform.rotation) {
|
if (transform.rotation) {
|
||||||
const angle = transform.rotation / 180 * Math.PI
|
const angle = (transform.rotation / 180) * Math.PI
|
||||||
p2 = [
|
p2 = [
|
||||||
p2[0] * Math.cos(angle) - p2[1] * Math.sin(angle),
|
p2[0] * Math.cos(angle) - p2[1] * Math.sin(angle),
|
||||||
p2[1] * Math.cos(angle) + p2[0] * Math.sin(angle)
|
p2[1] * Math.cos(angle) + p2[0] * Math.sin(angle),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
if (transform.x) {
|
if (transform.x) {
|
||||||
|
8
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/cli.js
generated
vendored
8
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/cli.js
generated
vendored
@ -15,12 +15,16 @@ commander
|
|||||||
if (options.verbose) {
|
if (options.verbose) {
|
||||||
const groups = groupEntitiesByLayer(denormalise(parsed))
|
const groups = groupEntitiesByLayer(denormalise(parsed))
|
||||||
console.log('[layer : number of entities]')
|
console.log('[layer : number of entities]')
|
||||||
Object.keys(groups).forEach(layer => {
|
Object.keys(groups).forEach((layer) => {
|
||||||
console.log(`${layer} : ${groups[layer].length}`)
|
console.log(`${layer} : ${groups[layer].length}`)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fs.writeFileSync(svgFile || `${dxfFile.split('.').slice(0, -1).join('.')}.svg`, toSVG(parsed), 'utf-8')
|
fs.writeFileSync(
|
||||||
|
svgFile || `${dxfFile.split('.').slice(0, -1).join('.')}.svg`,
|
||||||
|
toSVG(parsed),
|
||||||
|
'utf-8',
|
||||||
|
)
|
||||||
})
|
})
|
||||||
.parse(process.argv)
|
.parse(process.argv)
|
||||||
|
|
||||||
|
2
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/config.js
generated
vendored
2
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/config.js
generated
vendored
@ -1,3 +1,3 @@
|
|||||||
export default {
|
export default {
|
||||||
verbose: false
|
verbose: false,
|
||||||
}
|
}
|
||||||
|
2
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/constants.js
generated
vendored
2
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/constants.js
generated
vendored
@ -3,5 +3,5 @@ export const ZERO_TRANSFORM = {
|
|||||||
y: 0,
|
y: 0,
|
||||||
xScale: 1,
|
xScale: 1,
|
||||||
yScale: 1,
|
yScale: 1,
|
||||||
rotation: 0
|
rotation: 0,
|
||||||
}
|
}
|
||||||
|
12
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/denormalise.js
generated
vendored
12
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/denormalise.js
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
import { cloneDeep } from 'lodash'
|
import cloneDeep from 'lodash/cloneDeep'
|
||||||
|
|
||||||
import logger from './util/logger'
|
import logger from './util/logger'
|
||||||
|
|
||||||
@ -28,8 +28,8 @@ export default (parseResult) => {
|
|||||||
// It appears that the rectangular array is affected by rotation, but NOT by scale.
|
// It appears that the rectangular array is affected by rotation, but NOT by scale.
|
||||||
let rowVec, colVec
|
let rowVec, colVec
|
||||||
if (rowCount > 1 || columnCount > 1) {
|
if (rowCount > 1 || columnCount > 1) {
|
||||||
const cos = Math.cos(rotation * Math.PI / 180)
|
const cos = Math.cos((rotation * Math.PI) / 180)
|
||||||
const sin = Math.sin(rotation * Math.PI / 180)
|
const sin = Math.sin((rotation * Math.PI) / 180)
|
||||||
rowVec = { x: -sin * rowSpacing, y: cos * rowSpacing }
|
rowVec = { x: -sin * rowSpacing, y: cos * rowSpacing }
|
||||||
colVec = { x: cos * columnSpacing, y: sin * columnSpacing }
|
colVec = { x: cos * columnSpacing, y: sin * columnSpacing }
|
||||||
} else {
|
} else {
|
||||||
@ -50,7 +50,7 @@ export default (parseResult) => {
|
|||||||
extrusionX: insert.extrusionX,
|
extrusionX: insert.extrusionX,
|
||||||
extrusionY: insert.extrusionY,
|
extrusionY: insert.extrusionY,
|
||||||
extrusionZ: insert.extrusionZ,
|
extrusionZ: insert.extrusionZ,
|
||||||
rotation: insert.rotation
|
rotation: insert.rotation,
|
||||||
}
|
}
|
||||||
// Add the insert transform and recursively add entities
|
// Add the insert transform and recursively add entities
|
||||||
const transforms2 = transforms.slice(0)
|
const transforms2 = transforms.slice(0)
|
||||||
@ -75,7 +75,7 @@ export default (parseResult) => {
|
|||||||
}
|
}
|
||||||
case 'LWPOLYLINE':
|
case 'LWPOLYLINE':
|
||||||
case 'POLYLINE': {
|
case 'POLYLINE': {
|
||||||
be2.vertices.forEach(v => {
|
be2.vertices.forEach((v) => {
|
||||||
v.x -= block.x
|
v.x -= block.x
|
||||||
v.y -= block.y
|
v.y -= block.y
|
||||||
})
|
})
|
||||||
@ -89,7 +89,7 @@ export default (parseResult) => {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
case 'SPLINE': {
|
case 'SPLINE': {
|
||||||
be2.controlPoints.forEach(cp => {
|
be2.controlPoints.forEach((cp) => {
|
||||||
cp.x -= block.x
|
cp.x -= block.x
|
||||||
cp.y -= block.y
|
cp.y -= block.y
|
||||||
})
|
})
|
||||||
|
143
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/entityToPolyline.js
generated
vendored
143
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/entityToPolyline.js
generated
vendored
@ -12,7 +12,7 @@ const rotate = (points, angle) => {
|
|||||||
return points.map(function (p) {
|
return points.map(function (p) {
|
||||||
return [
|
return [
|
||||||
p[0] * Math.cos(angle) - p[1] * Math.sin(angle),
|
p[0] * Math.cos(angle) - p[1] * Math.sin(angle),
|
||||||
p[1] * Math.cos(angle) + p[0] * Math.sin(angle)
|
p[1] * Math.cos(angle) + p[0] * Math.sin(angle),
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -35,18 +35,12 @@ const interpolateEllipse = (cx, cy, rx, ry, start, end, rotationAngle) => {
|
|||||||
|
|
||||||
// Start point
|
// Start point
|
||||||
let points = []
|
let points = []
|
||||||
const dTheta = Math.PI * 2 / 72
|
const dTheta = (Math.PI * 2) / 72
|
||||||
const EPS = 1e-6
|
const EPS = 1e-6
|
||||||
for (let theta = start; theta < end - EPS; theta += dTheta) {
|
for (let theta = start; theta < end - EPS; theta += dTheta) {
|
||||||
points.push([
|
points.push([Math.cos(theta) * rx, Math.sin(theta) * ry])
|
||||||
Math.cos(theta) * rx,
|
|
||||||
Math.sin(theta) * ry
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
points.push([
|
points.push([Math.cos(end) * rx, Math.sin(end) * ry])
|
||||||
Math.cos(end) * rx,
|
|
||||||
Math.sin(end) * ry
|
|
||||||
])
|
|
||||||
|
|
||||||
// ----- Rotate -----
|
// ----- Rotate -----
|
||||||
if (rotationAngle) {
|
if (rotationAngle) {
|
||||||
@ -72,7 +66,13 @@ const interpolateEllipse = (cx, cy, rx, ry, start, end, rotationAngle) => {
|
|||||||
* @param knots the knot vector
|
* @param knots the knot vector
|
||||||
* @returns the polyline
|
* @returns the polyline
|
||||||
*/
|
*/
|
||||||
export const interpolateBSpline = (controlPoints, degree, knots, interpolationsPerSplineSegment) => {
|
export const interpolateBSpline = (
|
||||||
|
controlPoints,
|
||||||
|
degree,
|
||||||
|
knots,
|
||||||
|
interpolationsPerSplineSegment,
|
||||||
|
weights,
|
||||||
|
) => {
|
||||||
const polyline = []
|
const polyline = []
|
||||||
const controlPointsForLib = controlPoints.map(function (p) {
|
const controlPointsForLib = controlPoints.map(function (p) {
|
||||||
return [p.x, p.y]
|
return [p.x, p.y]
|
||||||
@ -92,18 +92,77 @@ export const interpolateBSpline = (controlPoints, degree, knots, interpolationsP
|
|||||||
const uMin = segmentTs[i - 1]
|
const uMin = segmentTs[i - 1]
|
||||||
const uMax = segmentTs[i]
|
const uMax = segmentTs[i]
|
||||||
for (let k = 0; k <= interpolationsPerSplineSegment; ++k) {
|
for (let k = 0; k <= interpolationsPerSplineSegment; ++k) {
|
||||||
const u = k / interpolationsPerSplineSegment * (uMax - uMin) + uMin
|
const u = (k / interpolationsPerSplineSegment) * (uMax - uMin) + uMin
|
||||||
// Clamp t to 0, 1 to handle numerical precision issues
|
// Clamp t to 0, 1 to handle numerical precision issues
|
||||||
let t = (u - domain[0]) / (domain[1] - domain[0])
|
let t = (u - domain[0]) / (domain[1] - domain[0])
|
||||||
t = Math.max(t, 0)
|
t = Math.max(t, 0)
|
||||||
t = Math.min(t, 1)
|
t = Math.min(t, 1)
|
||||||
const p = bSpline(t, degree, controlPointsForLib, knots)
|
const p = bSpline(t, degree, controlPointsForLib, knots, weights)
|
||||||
polyline.push(p)
|
polyline.push(p)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return polyline
|
return polyline
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const polyfaceOutline = (entity) => {
|
||||||
|
const vertices = []
|
||||||
|
const faces = []
|
||||||
|
|
||||||
|
for (const v of entity.vertices) {
|
||||||
|
if (v.faces) {
|
||||||
|
const face = { indices: [], hiddens: [] }
|
||||||
|
for (const i of v.faces) {
|
||||||
|
if (i === 0) {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
// Negative indices signify hidden edges
|
||||||
|
face.indices.push(i < 0 ? -i - 1 : i - 1)
|
||||||
|
face.hiddens.push(i < 0)
|
||||||
|
}
|
||||||
|
if ([3, 4].includes(face.indices.length)) faces.push(face)
|
||||||
|
} else {
|
||||||
|
vertices.push({ x: v.x, y: v.y })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If a segment starts at the end of a previous line, continue it
|
||||||
|
const polylines = []
|
||||||
|
const segment = (a, b) => {
|
||||||
|
for (const prev of polylines) {
|
||||||
|
if (prev.slice(-1)[0] === a) {
|
||||||
|
return prev.push(b)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
polylines.push([a, b])
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const face of faces) {
|
||||||
|
for (let beg = 0; beg < face.indices.length; beg++) {
|
||||||
|
if (face.hiddens[beg]) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
const end = (beg + 1) % face.indices.length
|
||||||
|
segment(face.indices[beg], face.indices[end])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sometimes segments are not sequential, in that case
|
||||||
|
// we need to find if they can mend gaps between others
|
||||||
|
for (const a of polylines) {
|
||||||
|
for (const b of polylines) {
|
||||||
|
if (a !== b && a[0] === b.slice(-1)[0]) {
|
||||||
|
b.push(...a.slice(1))
|
||||||
|
a.splice(0, a.length)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return polylines
|
||||||
|
.filter((l) => l.length)
|
||||||
|
.map((l) => l.map((i) => vertices[i]).map((v) => [v.x, v.y]))
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert a parsed DXF entity to a polyline. These can be used to render the
|
* Convert a parsed DXF entity to a polyline. These can be used to render the
|
||||||
* the DXF in SVG, Canvas, WebGL etc., without depending on native support
|
* the DXF in SVG, Canvas, WebGL etc., without depending on native support
|
||||||
@ -115,21 +174,18 @@ export default (entity, options) => {
|
|||||||
|
|
||||||
if (entity.type === 'LINE') {
|
if (entity.type === 'LINE') {
|
||||||
polyline = [
|
polyline = [
|
||||||
[
|
[entity.start.x, entity.start.y],
|
||||||
entity.start.x,
|
[entity.end.x, entity.end.y],
|
||||||
entity.start.y
|
|
||||||
],
|
|
||||||
[
|
|
||||||
entity.end.x,
|
|
||||||
entity.end.y
|
|
||||||
]
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((entity.type === 'LWPOLYLINE') || (entity.type === 'POLYLINE')) {
|
if (entity.type === 'LWPOLYLINE' || entity.type === 'POLYLINE') {
|
||||||
polyline = []
|
polyline = []
|
||||||
if (entity.polygonMesh || entity.polyfaceMesh) {
|
if (entity.polyfaceMesh) {
|
||||||
// Do not attempt to render meshes
|
// Only return the first polyline because we can't return many
|
||||||
|
polyline.push(...polyfaceOutline(entity)[0])
|
||||||
|
} else if (entity.polygonMesh) {
|
||||||
|
// Do not attempt to render polygon meshes
|
||||||
} else if (entity.vertices.length) {
|
} else if (entity.vertices.length) {
|
||||||
if (entity.closed) {
|
if (entity.closed) {
|
||||||
entity.vertices = entity.vertices.concat(entity.vertices[0])
|
entity.vertices = entity.vertices.concat(entity.vertices[0])
|
||||||
@ -140,7 +196,8 @@ export default (entity, options) => {
|
|||||||
polyline.push(from)
|
polyline.push(from)
|
||||||
if (entity.vertices[i].bulge) {
|
if (entity.vertices[i].bulge) {
|
||||||
polyline = polyline.concat(
|
polyline = polyline.concat(
|
||||||
createArcForLWPolyine(from, to, entity.vertices[i].bulge))
|
createArcForLWPolyine(from, to, entity.vertices[i].bulge),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
// The last iteration of the for loop
|
// The last iteration of the for loop
|
||||||
if (i === il - 2) {
|
if (i === il - 2) {
|
||||||
@ -154,9 +211,13 @@ export default (entity, options) => {
|
|||||||
|
|
||||||
if (entity.type === 'CIRCLE') {
|
if (entity.type === 'CIRCLE') {
|
||||||
polyline = interpolateEllipse(
|
polyline = interpolateEllipse(
|
||||||
entity.x, entity.y,
|
entity.x,
|
||||||
entity.r, entity.r,
|
entity.y,
|
||||||
0, Math.PI * 2)
|
entity.r,
|
||||||
|
entity.r,
|
||||||
|
0,
|
||||||
|
Math.PI * 2,
|
||||||
|
)
|
||||||
if (entity.extrusionZ === -1) {
|
if (entity.extrusionZ === -1) {
|
||||||
polyline = polyline.map(function (p) {
|
polyline = polyline.map(function (p) {
|
||||||
return [-p[0], p[1]]
|
return [-p[0], p[1]]
|
||||||
@ -165,15 +226,20 @@ export default (entity, options) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (entity.type === 'ELLIPSE') {
|
if (entity.type === 'ELLIPSE') {
|
||||||
const rx = Math.sqrt(entity.majorX * entity.majorX + entity.majorY * entity.majorY)
|
const rx = Math.sqrt(
|
||||||
|
entity.majorX * entity.majorX + entity.majorY * entity.majorY,
|
||||||
|
)
|
||||||
const ry = entity.axisRatio * rx
|
const ry = entity.axisRatio * rx
|
||||||
const majorAxisRotation = -Math.atan2(-entity.majorY, entity.majorX)
|
const majorAxisRotation = -Math.atan2(-entity.majorY, entity.majorX)
|
||||||
polyline = interpolateEllipse(
|
polyline = interpolateEllipse(
|
||||||
entity.x, entity.y,
|
entity.x,
|
||||||
rx, ry,
|
entity.y,
|
||||||
|
rx,
|
||||||
|
ry,
|
||||||
entity.startAngle,
|
entity.startAngle,
|
||||||
entity.endAngle,
|
entity.endAngle,
|
||||||
majorAxisRotation)
|
majorAxisRotation,
|
||||||
|
)
|
||||||
if (entity.extrusionZ === -1) {
|
if (entity.extrusionZ === -1) {
|
||||||
polyline = polyline.map(function (p) {
|
polyline = polyline.map(function (p) {
|
||||||
return [-p[0], p[1]]
|
return [-p[0], p[1]]
|
||||||
@ -185,12 +251,15 @@ export default (entity, options) => {
|
|||||||
// Why on earth DXF has degree start & end angles for arc,
|
// Why on earth DXF has degree start & end angles for arc,
|
||||||
// and radian start & end angles for ellipses is a mystery
|
// and radian start & end angles for ellipses is a mystery
|
||||||
polyline = interpolateEllipse(
|
polyline = interpolateEllipse(
|
||||||
entity.x, entity.y,
|
entity.x,
|
||||||
entity.r, entity.r,
|
entity.y,
|
||||||
|
entity.r,
|
||||||
|
entity.r,
|
||||||
entity.startAngle,
|
entity.startAngle,
|
||||||
entity.endAngle,
|
entity.endAngle,
|
||||||
undefined,
|
undefined,
|
||||||
false)
|
false,
|
||||||
|
)
|
||||||
|
|
||||||
// I kid you not, ARCs and ELLIPSEs handle this differently,
|
// I kid you not, ARCs and ELLIPSEs handle this differently,
|
||||||
// as evidenced by how AutoCAD actually renders these entities
|
// as evidenced by how AutoCAD actually renders these entities
|
||||||
@ -206,7 +275,9 @@ export default (entity, options) => {
|
|||||||
entity.controlPoints,
|
entity.controlPoints,
|
||||||
entity.degree,
|
entity.degree,
|
||||||
entity.knots,
|
entity.knots,
|
||||||
options.interpolationsPerSplineSegment)
|
options.interpolationsPerSplineSegment,
|
||||||
|
entity.weights,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!polyline) {
|
if (!polyline) {
|
||||||
|
6
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/getRGBForEntity.js
generated
vendored
6
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/getRGBForEntity.js
generated
vendored
@ -4,7 +4,11 @@ import logger from './util/logger'
|
|||||||
export default (layers, entity) => {
|
export default (layers, entity) => {
|
||||||
const layerTable = layers[entity.layer]
|
const layerTable = layers[entity.layer]
|
||||||
if (layerTable) {
|
if (layerTable) {
|
||||||
const colorNumber = ('colorNumber' in entity) ? entity.colorNumber : layerTable.colorNumber
|
const colorDefinedInEntity =
|
||||||
|
'colorNumber' in entity && entity.colorNumber !== 256
|
||||||
|
const colorNumber = colorDefinedInEntity
|
||||||
|
? entity.colorNumber
|
||||||
|
: layerTable.colorNumber
|
||||||
const rgb = colors[colorNumber]
|
const rgb = colors[colorNumber]
|
||||||
if (rgb) {
|
if (rgb) {
|
||||||
return rgb
|
return rgb
|
||||||
|
12
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/handlers/blocks.js
generated
vendored
12
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/handlers/blocks.js
generated
vendored
@ -23,7 +23,7 @@ export default (tuples) => {
|
|||||||
}
|
}
|
||||||
entitiesTuples = undefined
|
entitiesTuples = undefined
|
||||||
state = undefined
|
state = undefined
|
||||||
} else if ((state === 'block') && (type !== 0)) {
|
} else if (state === 'block' && type !== 0) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 1:
|
case 1:
|
||||||
block.xref = value
|
block.xref = value
|
||||||
@ -40,10 +40,18 @@ export default (tuples) => {
|
|||||||
case 30:
|
case 30:
|
||||||
block.z = value
|
block.z = value
|
||||||
break
|
break
|
||||||
|
case 67:
|
||||||
|
{
|
||||||
|
if (value !== 0) block.paperSpace = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 410:
|
||||||
|
block.layout = value
|
||||||
|
break
|
||||||
default:
|
default:
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
} else if ((state === 'block') && (type === 0)) {
|
} else if (state === 'block' && type === 0) {
|
||||||
state = 'entities'
|
state = 'entities'
|
||||||
entitiesTuples.push(tuple)
|
entitiesTuples.push(tuple)
|
||||||
} else if (state === 'entities') {
|
} else if (state === 'entities') {
|
||||||
|
14
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/handlers/entities.js
generated
vendored
14
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/handlers/entities.js
generated
vendored
@ -9,9 +9,15 @@ import arc from './entity/arc'
|
|||||||
import ellipse from './entity/ellipse'
|
import ellipse from './entity/ellipse'
|
||||||
import spline from './entity/spline'
|
import spline from './entity/spline'
|
||||||
import solid from './entity/solid'
|
import solid from './entity/solid'
|
||||||
|
import hatch from './entity/hatch'
|
||||||
import mtext from './entity/mtext'
|
import mtext from './entity/mtext'
|
||||||
|
import attdef from './entity/attdef'
|
||||||
|
import attrib from './entity/attrib'
|
||||||
import insert from './entity/insert'
|
import insert from './entity/insert'
|
||||||
import threeDFace from './entity/threeDFace'
|
import threeDFace from './entity/threeDFace'
|
||||||
|
import dimension from './entity/dimension'
|
||||||
|
import text from './entity/text'
|
||||||
|
import viewport from './entity/viewport'
|
||||||
|
|
||||||
const handlers = [
|
const handlers = [
|
||||||
point,
|
point,
|
||||||
@ -24,9 +30,15 @@ const handlers = [
|
|||||||
ellipse,
|
ellipse,
|
||||||
spline,
|
spline,
|
||||||
solid,
|
solid,
|
||||||
|
hatch,
|
||||||
mtext,
|
mtext,
|
||||||
|
attdef,
|
||||||
|
attrib,
|
||||||
|
text,
|
||||||
insert,
|
insert,
|
||||||
threeDFace
|
dimension,
|
||||||
|
threeDFace,
|
||||||
|
viewport,
|
||||||
].reduce((acc, mod) => {
|
].reduce((acc, mod) => {
|
||||||
acc[mod.TYPE] = mod
|
acc[mod.TYPE] = mod
|
||||||
return acc
|
return acc
|
||||||
|
15
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/handlers/entity/arc.js
generated
vendored
15
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/handlers/entity/arc.js
generated
vendored
@ -3,7 +3,8 @@ import common from './common'
|
|||||||
export const TYPE = 'ARC'
|
export const TYPE = 'ARC'
|
||||||
|
|
||||||
export const process = (tuples) => {
|
export const process = (tuples) => {
|
||||||
return tuples.reduce((entity, tuple) => {
|
return tuples.reduce(
|
||||||
|
(entity, tuple) => {
|
||||||
const type = tuple[0]
|
const type = tuple[0]
|
||||||
const value = tuple[1]
|
const value = tuple[1]
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@ -25,19 +26,21 @@ export const process = (tuples) => {
|
|||||||
case 50:
|
case 50:
|
||||||
// *Someone* decided that ELLIPSE angles are in radians but
|
// *Someone* decided that ELLIPSE angles are in radians but
|
||||||
// ARC angles are in degrees
|
// ARC angles are in degrees
|
||||||
entity.startAngle = value / 180 * Math.PI
|
entity.startAngle = (value / 180) * Math.PI
|
||||||
break
|
break
|
||||||
case 51:
|
case 51:
|
||||||
entity.endAngle = value / 180 * Math.PI
|
entity.endAngle = (value / 180) * Math.PI
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
Object.assign(entity, common(type, value))
|
Object.assign(entity, common(type, value))
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
return entity
|
return entity
|
||||||
}, {
|
},
|
||||||
type: TYPE
|
{
|
||||||
})
|
type: TYPE,
|
||||||
|
},
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { TYPE, process }
|
export default { TYPE, process }
|
||||||
|
319
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/handlers/entity/attdef.js
generated
vendored
Normal file
319
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/handlers/entity/attdef.js
generated
vendored
Normal file
@ -0,0 +1,319 @@
|
|||||||
|
import common from './common'
|
||||||
|
import { assign as assignMTEXT } from './mtext'
|
||||||
|
import { assign as assignTEXT } from './text'
|
||||||
|
|
||||||
|
export const TYPE = 'ATTDEF'
|
||||||
|
|
||||||
|
export const process = (tuples) => {
|
||||||
|
return tuples.reduce(
|
||||||
|
(entity, tuple) => {
|
||||||
|
const type = tuple[0]
|
||||||
|
const value = tuple[1]
|
||||||
|
|
||||||
|
assign(entity, type, value)
|
||||||
|
|
||||||
|
return entity
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: TYPE,
|
||||||
|
subclassMarker: 'AcDbText',
|
||||||
|
thickness: 0,
|
||||||
|
scaleX: 1,
|
||||||
|
mtext: {},
|
||||||
|
text: {},
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export const assign = (entity, type, value) => {
|
||||||
|
switch (type) {
|
||||||
|
case 100: {
|
||||||
|
entity.subclassMarker = value
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 1:
|
||||||
|
switch (entity.subclassMarker) {
|
||||||
|
case 'AcDbText':
|
||||||
|
assignTEXT(entity.text, type, value)
|
||||||
|
break
|
||||||
|
case 'AcDbMText':
|
||||||
|
assignMTEXT(entity.mtext, type, value)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 2:
|
||||||
|
switch (entity.subclassMarker) {
|
||||||
|
case 'AcDbAttributeDefinition':
|
||||||
|
case 'AcDbAttribute':
|
||||||
|
entity.tag = value
|
||||||
|
break
|
||||||
|
case 'AcDbXrecord':
|
||||||
|
entity.attdefFlag = value
|
||||||
|
break
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
switch (entity.subclassMarker) {
|
||||||
|
case 'AcDbAttributeDefinition':
|
||||||
|
entity.prompt = value
|
||||||
|
break
|
||||||
|
case 'AcDbMText':
|
||||||
|
assignMTEXT(entity.mtext, type, value)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 7:
|
||||||
|
switch (entity.subclassMarker) {
|
||||||
|
case 'AcDbAttributeDefinition':
|
||||||
|
case 'AcDbAttribute':
|
||||||
|
assignTEXT(entity.text, type, value)
|
||||||
|
break
|
||||||
|
case 'AcDbMText':
|
||||||
|
assignMTEXT(entity.mtext, type, value)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 10:
|
||||||
|
switch (entity.subclassMarker) {
|
||||||
|
case 'AcDbText':
|
||||||
|
assignTEXT(entity.text, type, value)
|
||||||
|
break
|
||||||
|
case 'AcDbMText':
|
||||||
|
assignMTEXT(entity.mtext, type, value)
|
||||||
|
break
|
||||||
|
case 'AcDbXrecord':
|
||||||
|
entity.x = value
|
||||||
|
break
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 20:
|
||||||
|
switch (entity.subclassMarker) {
|
||||||
|
case 'AcDbText':
|
||||||
|
assignTEXT(entity.text, type, value)
|
||||||
|
break
|
||||||
|
case 'AcDbMText':
|
||||||
|
assignMTEXT(entity.mtext, type, value)
|
||||||
|
break
|
||||||
|
case 'AcDbXrecord':
|
||||||
|
entity.y = value
|
||||||
|
break
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 30:
|
||||||
|
switch (entity.subclassMarker) {
|
||||||
|
case 'AcDbText':
|
||||||
|
assignTEXT(entity.text, type, value)
|
||||||
|
break
|
||||||
|
case 'AcDbMText':
|
||||||
|
assignMTEXT(entity.mtext, type, value)
|
||||||
|
break
|
||||||
|
case 'AcDbXrecord':
|
||||||
|
entity.z = value
|
||||||
|
break
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 11:
|
||||||
|
switch (entity.subclassMarker) {
|
||||||
|
case 'AcDbAttributeDefinition':
|
||||||
|
case 'AcDbAttribute':
|
||||||
|
entity.x2 = value
|
||||||
|
break
|
||||||
|
case 'AcDbMText':
|
||||||
|
assignMTEXT(entity.mtext, type, value)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 21:
|
||||||
|
switch (entity.subclassMarker) {
|
||||||
|
case 'AcDbAttributeDefinition':
|
||||||
|
case 'AcDbAttribute':
|
||||||
|
entity.y2 = value
|
||||||
|
break
|
||||||
|
case 'AcDbMText':
|
||||||
|
assignMTEXT(entity.mtext, type, value)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 31:
|
||||||
|
switch (entity.subclassMarker) {
|
||||||
|
case 'AcDbAttributeDefinition':
|
||||||
|
case 'AcDbAttribute':
|
||||||
|
entity.z2 = value
|
||||||
|
break
|
||||||
|
case 'AcDbMText':
|
||||||
|
assignMTEXT(entity.mtext, type, value)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 39:
|
||||||
|
assignTEXT(entity.text, type, value)
|
||||||
|
break
|
||||||
|
case 40:
|
||||||
|
switch (entity.subclassMarker) {
|
||||||
|
case 'AcDbText':
|
||||||
|
assignTEXT(entity.text, type, value)
|
||||||
|
break
|
||||||
|
case 'AcDbMText':
|
||||||
|
assignMTEXT(entity.mtext, type, value)
|
||||||
|
break
|
||||||
|
case 'AcDbXrecord':
|
||||||
|
entity.annotationScale = value
|
||||||
|
break
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 41:
|
||||||
|
switch (entity.subclassMarker) {
|
||||||
|
case 'AcDbAttributeDefinition':
|
||||||
|
case 'AcDbAttribute':
|
||||||
|
assignTEXT(entity.text, type, value)
|
||||||
|
break
|
||||||
|
case 'AcDbMText':
|
||||||
|
assignMTEXT(entity.mtext, type, value)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 42:
|
||||||
|
case 43:
|
||||||
|
case 44:
|
||||||
|
case 45:
|
||||||
|
assignMTEXT(entity.mtext, type, value)
|
||||||
|
break
|
||||||
|
case 46:
|
||||||
|
entity.mtext.annotationHeight = value
|
||||||
|
break
|
||||||
|
case 48:
|
||||||
|
case 49:
|
||||||
|
assignMTEXT(entity.mtext, type, value)
|
||||||
|
break
|
||||||
|
case 50:
|
||||||
|
switch (entity.subclassMarker) {
|
||||||
|
case 'AcDbAttributeDefinition':
|
||||||
|
case 'AcDbAttribute':
|
||||||
|
assignTEXT(entity.text, type, value)
|
||||||
|
break
|
||||||
|
case 'AcDbMText':
|
||||||
|
{
|
||||||
|
assignMTEXT(entity.mtext, type, value)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 51:
|
||||||
|
assignTEXT(entity.text, type, value)
|
||||||
|
break
|
||||||
|
case 63:
|
||||||
|
assignMTEXT(entity.mtext, type, value)
|
||||||
|
break
|
||||||
|
case 70:
|
||||||
|
{
|
||||||
|
switch (entity.subclassMarker) {
|
||||||
|
case 'AcDbAttributeDefinition':
|
||||||
|
case 'AcDbAttribute':
|
||||||
|
entity.attributeFlags = value
|
||||||
|
break
|
||||||
|
case 'AcDbXrecord':
|
||||||
|
{
|
||||||
|
if (typeof entity.mTextFlag === 'undefined')
|
||||||
|
entity.mTextFlag = value
|
||||||
|
else if (typeof entity.isReallyLocked === 'undefined')
|
||||||
|
entity.isReallyLocked = value
|
||||||
|
else entity.secondaryAttdefCount = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 71:
|
||||||
|
case 72:
|
||||||
|
switch (entity.subclassMarker) {
|
||||||
|
case 'AcDbAttributeDefinition':
|
||||||
|
case 'AcDbAttribute':
|
||||||
|
assignTEXT(entity.text, type, value)
|
||||||
|
break
|
||||||
|
case 'AcDbMText':
|
||||||
|
assignMTEXT(entity.mtext, type, value)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 73:
|
||||||
|
switch (entity.subclassMarker) {
|
||||||
|
case 'AcDbAttributeDefinition':
|
||||||
|
case 'AcDbAttribute':
|
||||||
|
entity.fieldLength = value
|
||||||
|
break
|
||||||
|
case 'AcDbMText':
|
||||||
|
assignMTEXT(entity.mtext, type, value)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 74:
|
||||||
|
assignTEXT(entity.text, 73, value)
|
||||||
|
break
|
||||||
|
case 75:
|
||||||
|
case 76:
|
||||||
|
case 78:
|
||||||
|
case 79:
|
||||||
|
assignMTEXT(entity.mtext, type, value)
|
||||||
|
break
|
||||||
|
case 90:
|
||||||
|
assignMTEXT(entity.mtext, type, value)
|
||||||
|
break
|
||||||
|
case 210:
|
||||||
|
case 220:
|
||||||
|
case 230:
|
||||||
|
switch (entity.subclassMarker) {
|
||||||
|
case 'AcDbAttributeDefinition':
|
||||||
|
case 'AcDbAttribute':
|
||||||
|
assignTEXT(entity.mtext, type, value)
|
||||||
|
break
|
||||||
|
case 'AcDbMText':
|
||||||
|
assignMTEXT(entity.mtext, type, value)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 280:
|
||||||
|
{
|
||||||
|
switch (entity.subclassMarker) {
|
||||||
|
case 'AcDbAttributeDefinition':
|
||||||
|
case 'AcDbAttribute':
|
||||||
|
entity.lock = value
|
||||||
|
break
|
||||||
|
case 'AcDbXrecord':
|
||||||
|
entity.clone = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 340:
|
||||||
|
entity.attdefHandle = value
|
||||||
|
break
|
||||||
|
case 420:
|
||||||
|
case 421:
|
||||||
|
case 422:
|
||||||
|
case 423:
|
||||||
|
case 424:
|
||||||
|
case 425:
|
||||||
|
case 426:
|
||||||
|
case 427:
|
||||||
|
case 428:
|
||||||
|
case 429:
|
||||||
|
case 430:
|
||||||
|
case 431:
|
||||||
|
case 432:
|
||||||
|
case 433:
|
||||||
|
case 434:
|
||||||
|
case 435:
|
||||||
|
case 436:
|
||||||
|
case 437:
|
||||||
|
case 438:
|
||||||
|
case 439:
|
||||||
|
case 441:
|
||||||
|
assignMTEXT(entity.mtext, type, value)
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
Object.assign(entity, common(type, value))
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { TYPE, process, assign }
|
26
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/handlers/entity/attrib.js
generated
vendored
Normal file
26
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/handlers/entity/attrib.js
generated
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
import { assign } from './attdef'
|
||||||
|
|
||||||
|
export const TYPE = 'ATTRIB'
|
||||||
|
|
||||||
|
export const process = (tuples) => {
|
||||||
|
return tuples.reduce(
|
||||||
|
(entity, tuple) => {
|
||||||
|
const type = tuple[0]
|
||||||
|
const value = tuple[1]
|
||||||
|
|
||||||
|
assign(entity, type, value)
|
||||||
|
|
||||||
|
return entity
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: TYPE,
|
||||||
|
subclassMarker: 'AcDbText',
|
||||||
|
thickness: 0,
|
||||||
|
scaleX: 1,
|
||||||
|
mtext: {},
|
||||||
|
text: {},
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { TYPE, process }
|
@ -3,7 +3,8 @@ import common from './common'
|
|||||||
export const TYPE = 'CIRCLE'
|
export const TYPE = 'CIRCLE'
|
||||||
|
|
||||||
export const process = (tuples) => {
|
export const process = (tuples) => {
|
||||||
return tuples.reduce((entity, tuple) => {
|
return tuples.reduce(
|
||||||
|
(entity, tuple) => {
|
||||||
const type = tuple[0]
|
const type = tuple[0]
|
||||||
const value = tuple[1]
|
const value = tuple[1]
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@ -24,9 +25,11 @@ export const process = (tuples) => {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
return entity
|
return entity
|
||||||
}, {
|
},
|
||||||
type: TYPE
|
{
|
||||||
})
|
type: TYPE,
|
||||||
|
},
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { TYPE, process }
|
export default { TYPE, process }
|
||||||
|
@ -1,25 +1,30 @@
|
|||||||
export default (type, value) => {
|
export default (type, value) => {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
case 5: {
|
||||||
|
return {
|
||||||
|
handle: value,
|
||||||
|
}
|
||||||
|
}
|
||||||
case 6:
|
case 6:
|
||||||
// Linetype name (present if not BYLAYER).
|
// Linetype name (present if not BYLAYER).
|
||||||
// The special name BYBLOCK indicates a
|
// The special name BYBLOCK indicates a
|
||||||
// floating linetype. (optional)
|
// floating linetype. (optional)
|
||||||
return {
|
return {
|
||||||
lineTypeName: value
|
lineTypeName: value,
|
||||||
}
|
}
|
||||||
case 8:
|
case 8:
|
||||||
return {
|
return {
|
||||||
layer: value
|
layer: value,
|
||||||
}
|
}
|
||||||
case 48:
|
case 48:
|
||||||
// Linetype scale (optional)
|
// Linetype scale (optional)
|
||||||
return {
|
return {
|
||||||
lineTypeScale: value
|
lineTypeScale: value,
|
||||||
}
|
}
|
||||||
case 60:
|
case 60:
|
||||||
// Object visibility (optional): 0 = visible, 1 = invisible.
|
// Object visibility (optional): 0 = visible, 1 = invisible.
|
||||||
return {
|
return {
|
||||||
visible: value === 0
|
visible: value === 0,
|
||||||
}
|
}
|
||||||
case 62:
|
case 62:
|
||||||
// Color number (present if not BYLAYER).
|
// Color number (present if not BYLAYER).
|
||||||
@ -27,19 +32,41 @@ export default (type, value) => {
|
|||||||
// 256 indicates BYLAYER.
|
// 256 indicates BYLAYER.
|
||||||
// A negative value indicates that the layer is turned off. (optional)
|
// A negative value indicates that the layer is turned off. (optional)
|
||||||
return {
|
return {
|
||||||
colorNumber: value
|
colorNumber: value,
|
||||||
|
}
|
||||||
|
case 67:
|
||||||
|
// Paper space or sheet.
|
||||||
|
// Absent or zero indicates entity is in model space. 1 indicates entity is in paper space (optional)
|
||||||
|
return value === 0
|
||||||
|
? {}
|
||||||
|
: {
|
||||||
|
paperSpace: value,
|
||||||
|
}
|
||||||
|
case 68:
|
||||||
|
// Identifies whether viewport is on but fully off screen, is not active, or is off
|
||||||
|
return {
|
||||||
|
viewportOn: value,
|
||||||
|
}
|
||||||
|
case 69:
|
||||||
|
// Viewport identification number
|
||||||
|
return {
|
||||||
|
viewport: value,
|
||||||
}
|
}
|
||||||
case 210:
|
case 210:
|
||||||
return {
|
return {
|
||||||
extrusionX: value
|
extrusionX: value,
|
||||||
}
|
}
|
||||||
case 220:
|
case 220:
|
||||||
return {
|
return {
|
||||||
extrusionY: value
|
extrusionY: value,
|
||||||
}
|
}
|
||||||
case 230:
|
case 230:
|
||||||
return {
|
return {
|
||||||
extrusionZ: value
|
extrusionZ: value,
|
||||||
|
}
|
||||||
|
case 410:
|
||||||
|
return {
|
||||||
|
layout: value,
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return {}
|
return {}
|
||||||
|
163
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/handlers/entity/dimension.js
generated
vendored
Normal file
163
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/handlers/entity/dimension.js
generated
vendored
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
import common from './common'
|
||||||
|
|
||||||
|
export const TYPE = 'DIMENSION'
|
||||||
|
|
||||||
|
export const process = (tuples) => {
|
||||||
|
return tuples.reduce(
|
||||||
|
(entity, tuple) => {
|
||||||
|
const type = tuple[0]
|
||||||
|
const value = tuple[1]
|
||||||
|
switch (type) {
|
||||||
|
case 2:
|
||||||
|
entity.block = value
|
||||||
|
break
|
||||||
|
case 10:
|
||||||
|
entity.start.x = value
|
||||||
|
break
|
||||||
|
case 20:
|
||||||
|
entity.start.y = value
|
||||||
|
break
|
||||||
|
case 30:
|
||||||
|
entity.start.z = value
|
||||||
|
break
|
||||||
|
case 11:
|
||||||
|
entity.textMidpoint.x = value
|
||||||
|
break
|
||||||
|
case 21:
|
||||||
|
entity.textMidpoint.y = value
|
||||||
|
break
|
||||||
|
case 31:
|
||||||
|
entity.textMidpoint.z = value
|
||||||
|
break
|
||||||
|
case 13:
|
||||||
|
entity.measureStart.x = value
|
||||||
|
break
|
||||||
|
case 23:
|
||||||
|
entity.measureStart.y = value
|
||||||
|
break
|
||||||
|
case 33:
|
||||||
|
entity.measureStart.z = value
|
||||||
|
break
|
||||||
|
case 14:
|
||||||
|
entity.measureEnd.x = value
|
||||||
|
break
|
||||||
|
case 24:
|
||||||
|
entity.measureEnd.y = value
|
||||||
|
break
|
||||||
|
case 34:
|
||||||
|
entity.measureEnd.z = value
|
||||||
|
break
|
||||||
|
case 50:
|
||||||
|
entity.rotation = value
|
||||||
|
break
|
||||||
|
case 51:
|
||||||
|
entity.horizonRotation = value
|
||||||
|
break
|
||||||
|
case 52:
|
||||||
|
entity.extensionRotation = value
|
||||||
|
break
|
||||||
|
case 53:
|
||||||
|
entity.textRotation = value
|
||||||
|
break
|
||||||
|
case 70: {
|
||||||
|
const dimType = parseBitCombinationsFromValue(value)
|
||||||
|
if (dimType.ordinateType) {
|
||||||
|
entity.ordinateType = true
|
||||||
|
}
|
||||||
|
if (dimType.uniqueBlockReference) {
|
||||||
|
entity.uniqueBlockReference = true
|
||||||
|
}
|
||||||
|
if (dimType.userDefinedLocation) {
|
||||||
|
entity.userDefinedLocation = true
|
||||||
|
}
|
||||||
|
entity.dimensionType = dimType.dimensionType
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 71:
|
||||||
|
entity.attachementPoint = value
|
||||||
|
break
|
||||||
|
case 210:
|
||||||
|
entity.extrudeDirection = entity.extrudeDirection || {}
|
||||||
|
entity.extrudeDirection.x = value
|
||||||
|
break
|
||||||
|
case 220:
|
||||||
|
entity.extrudeDirection = entity.extrudeDirection || {}
|
||||||
|
entity.extrudeDirection.y = value
|
||||||
|
break
|
||||||
|
case 230:
|
||||||
|
entity.extrudeDirection = entity.extrudeDirection || {}
|
||||||
|
entity.extrudeDirection.z = value
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
Object.assign(entity, common(type, value))
|
||||||
|
break
|
||||||
|
}
|
||||||
|
return entity
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: TYPE,
|
||||||
|
start: { x: 0, y: 0, z: 0 },
|
||||||
|
measureStart: { x: 0, y: 0, z: 0 },
|
||||||
|
measureEnd: { x: 0, y: 0, z: 0 },
|
||||||
|
textMidpoint: { x: 0, y: 0, z: 0 },
|
||||||
|
attachementPoint: 1,
|
||||||
|
dimensionType: 0,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* From DXF Reference for DIMENSION
|
||||||
|
* Values 0-6 are integer values that represent the dimension type. Values 32, 64, and 128
|
||||||
|
* are bit values, which are added to the integer values (value 32 is always set in R13 and
|
||||||
|
* later releases)
|
||||||
|
* 0 = Rotated, horizontal, or vertical; 1 = Aligned
|
||||||
|
* 2 = Angular; 3 = Diameter; 4 = Radius
|
||||||
|
* 5 = Angular 3 point; 6 = Ordinate
|
||||||
|
* 32 = Indicates that the block reference (group code 2) is referenced by this dimension only
|
||||||
|
* 64 = Ordinate type. This is a bit value (bit 7) used only with integer value 6. If set, ordinate is X-type; if not set, ordinate is Y-type
|
||||||
|
* 128 = This is a bit value (bit 8) added to the other group 70 values if the dimension text has been positioned at a user-defined location rather than at the default location
|
||||||
|
*/
|
||||||
|
function parseBitCombinationsFromValue(value) {
|
||||||
|
let uniqueBlockReference = false
|
||||||
|
let ordinateType = false
|
||||||
|
let userDefinedLocation = false
|
||||||
|
|
||||||
|
// ToDo: Solve in some more clever way??
|
||||||
|
if (value > 6) {
|
||||||
|
const alt1 = value - 32
|
||||||
|
const alt2 = value - 64
|
||||||
|
const alt3 = value - 32 - 64
|
||||||
|
const alt4 = value - 32 - 128
|
||||||
|
const alt5 = value - 32 - 64 - 128
|
||||||
|
|
||||||
|
if (alt1 >= 0 && alt1 <= 6) {
|
||||||
|
uniqueBlockReference = true
|
||||||
|
value = alt1
|
||||||
|
} else if (alt2 >= 0 && alt2 <= 6) {
|
||||||
|
ordinateType = true
|
||||||
|
value = alt2
|
||||||
|
} else if (alt3 >= 0 && alt3 <= 6) {
|
||||||
|
uniqueBlockReference = true
|
||||||
|
ordinateType = true
|
||||||
|
value = alt3
|
||||||
|
} else if (alt4 >= 0 && alt4 <= 6) {
|
||||||
|
uniqueBlockReference = true
|
||||||
|
userDefinedLocation = true
|
||||||
|
value = alt4
|
||||||
|
} else if (alt5 >= 0 && alt5 <= 6) {
|
||||||
|
uniqueBlockReference = true
|
||||||
|
ordinateType = true
|
||||||
|
userDefinedLocation = true
|
||||||
|
value = alt5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
dimensionType: value,
|
||||||
|
uniqueBlockReference,
|
||||||
|
ordinateType,
|
||||||
|
userDefinedLocation,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { TYPE, process }
|
@ -3,7 +3,8 @@ import common from './common'
|
|||||||
export const TYPE = 'ELLIPSE'
|
export const TYPE = 'ELLIPSE'
|
||||||
|
|
||||||
export const process = (tuples) => {
|
export const process = (tuples) => {
|
||||||
return tuples.reduce((entity, tuple) => {
|
return tuples.reduce(
|
||||||
|
(entity, tuple) => {
|
||||||
const type = tuple[0]
|
const type = tuple[0]
|
||||||
const value = tuple[1]
|
const value = tuple[1]
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@ -39,9 +40,11 @@ export const process = (tuples) => {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
return entity
|
return entity
|
||||||
}, {
|
},
|
||||||
type: TYPE
|
{
|
||||||
})
|
type: TYPE,
|
||||||
|
},
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { TYPE, process }
|
export default { TYPE, process }
|
||||||
|
500
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/handlers/entity/hatch.js
generated
vendored
Normal file
500
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/handlers/entity/hatch.js
generated
vendored
Normal file
@ -0,0 +1,500 @@
|
|||||||
|
import common from './common'
|
||||||
|
|
||||||
|
export const TYPE = 'HATCH'
|
||||||
|
|
||||||
|
let status = 'IDLE'
|
||||||
|
let drawEntity = {}
|
||||||
|
let drawType = 0
|
||||||
|
let isPolyline = false
|
||||||
|
let seed = null
|
||||||
|
let loop = { references: [], entities: [] }
|
||||||
|
let polyPoint = null
|
||||||
|
|
||||||
|
export const process = (tuples) => {
|
||||||
|
return tuples.reduce(
|
||||||
|
(entity, tuple) => {
|
||||||
|
const type = tuple[0]
|
||||||
|
const value = tuple[1]
|
||||||
|
|
||||||
|
switch (type) {
|
||||||
|
case 100:
|
||||||
|
status = 'IDLE'
|
||||||
|
break
|
||||||
|
case 2:
|
||||||
|
entity.patternName = value
|
||||||
|
break
|
||||||
|
case 10:
|
||||||
|
{
|
||||||
|
if (status === 'IDLE') entity.elevation.x = parseFloat(value)
|
||||||
|
else if (status === 'POLYLINE') {
|
||||||
|
polyPoint = {
|
||||||
|
x: parseFloat(value),
|
||||||
|
y: 0,
|
||||||
|
bulge: 0,
|
||||||
|
}
|
||||||
|
loop.entities[0].points.push(polyPoint)
|
||||||
|
} else if (status === 'SEED') {
|
||||||
|
if (!seed) {
|
||||||
|
seed = { x: 0, y: 0 }
|
||||||
|
entity.seeds.seeds.push(seed)
|
||||||
|
}
|
||||||
|
seed.x = parseFloat(value)
|
||||||
|
} else fillDrawEntity(type, drawType, parseFloat(value))
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 20:
|
||||||
|
{
|
||||||
|
if (status === 'IDLE') entity.elevation.y = parseFloat(value)
|
||||||
|
else if (status === 'POLYLINE') polyPoint.y = parseFloat(value)
|
||||||
|
else if (status === 'SEED') {
|
||||||
|
seed.y = parseFloat(value)
|
||||||
|
seed = null
|
||||||
|
} else fillDrawEntity(type, drawType, parseFloat(value))
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 30:
|
||||||
|
entity.elevation.z = parseFloat(value)
|
||||||
|
break
|
||||||
|
case 63:
|
||||||
|
entity.fillColor = value
|
||||||
|
break
|
||||||
|
case 70:
|
||||||
|
entity.fillType = parseFloat(value) === 1 ? 'SOLID' : 'PATTERN'
|
||||||
|
break
|
||||||
|
case 210:
|
||||||
|
entity.extrusionDir.x = parseFloat(value)
|
||||||
|
break
|
||||||
|
case 220:
|
||||||
|
entity.extrusionDir.y = parseFloat(value)
|
||||||
|
break
|
||||||
|
case 230:
|
||||||
|
entity.extrusionDir.z = parseFloat(value)
|
||||||
|
break
|
||||||
|
case 91:
|
||||||
|
{
|
||||||
|
// LOOP COUNT
|
||||||
|
entity.boundary.count = parseFloat(value)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 92:
|
||||||
|
{
|
||||||
|
// 0 = Default; 1 = External; 2 = Polyline; 4 = Derived; 8 = Textbox; 16 = Outermost
|
||||||
|
loop = { references: [], entities: [] }
|
||||||
|
entity.boundary.loops.push(loop)
|
||||||
|
loop.type = parseFloat(value)
|
||||||
|
isPolyline = (loop.type & 2) === 2
|
||||||
|
if (isPolyline) {
|
||||||
|
const ent = {
|
||||||
|
type: 'POLYLINE',
|
||||||
|
points: [],
|
||||||
|
}
|
||||||
|
loop.entities.push(ent)
|
||||||
|
status = 'POLYLINE'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 93:
|
||||||
|
{
|
||||||
|
if (status === 'IDLE') status = 'ENT'
|
||||||
|
loop.count = parseFloat(value)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 11:
|
||||||
|
case 21:
|
||||||
|
case 40:
|
||||||
|
case 50:
|
||||||
|
case 51:
|
||||||
|
case 74:
|
||||||
|
case 94:
|
||||||
|
case 95:
|
||||||
|
case 96:
|
||||||
|
if (drawType === 4) status = 'SPLINE'
|
||||||
|
fillDrawEntity(type, drawType, parseFloat(value))
|
||||||
|
break
|
||||||
|
case 42:
|
||||||
|
{
|
||||||
|
if (isPolyline) polyPoint.bulge = parseFloat(value)
|
||||||
|
else fillDrawEntity(type, drawType, parseFloat(value))
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 72:
|
||||||
|
{
|
||||||
|
// !Polyline --> 1 = Line; 2 = Circular arc; 3 = Elliptic arc; 4 = Spline
|
||||||
|
// Polyline --> hasBulge
|
||||||
|
drawType = parseFloat(value)
|
||||||
|
loop[isPolyline ? 'hasBulge' : 'edgeType'] = drawType
|
||||||
|
if (!isPolyline) {
|
||||||
|
drawEntity = createDrawEntity(drawType)
|
||||||
|
loop.entities.push(drawEntity)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 73:
|
||||||
|
{
|
||||||
|
if (status === 'IDLE' || isPolyline) loop.entities[0].closed = value
|
||||||
|
else fillDrawEntity(type, drawType, parseFloat(value))
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 75:
|
||||||
|
{
|
||||||
|
// END OF BOUNDARY PATH DATA
|
||||||
|
status = 'IDLE'
|
||||||
|
|
||||||
|
// 0 = Hatch “odd parity” area (Normal style)
|
||||||
|
// 1 = Hatch outermost area only (Outer style)
|
||||||
|
// 2 = Hatch through entire area (Ignore style)
|
||||||
|
entity.style = parseFloat(value)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 76:
|
||||||
|
// 0 = User-defined; 1 = Predefined; 2 = Custom
|
||||||
|
entity.hatchType = parseFloat(value)
|
||||||
|
break
|
||||||
|
case 97:
|
||||||
|
{
|
||||||
|
status = 'IDLE'
|
||||||
|
isPolyline = false
|
||||||
|
loop.sourceObjects = parseFloat(value)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 98:
|
||||||
|
{
|
||||||
|
status = 'SEED'
|
||||||
|
entity.seeds.count = parseFloat(value)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 52:
|
||||||
|
entity.shadowPatternAngle = parseFloat(value)
|
||||||
|
break
|
||||||
|
case 41:
|
||||||
|
entity.spacing = parseFloat(value)
|
||||||
|
break
|
||||||
|
case 77:
|
||||||
|
entity.double = parseFloat(value) === 1
|
||||||
|
break
|
||||||
|
case 78:
|
||||||
|
entity.pattern.lineCount = parseFloat(value)
|
||||||
|
break
|
||||||
|
case 53:
|
||||||
|
entity.pattern.angle = parseFloat(value)
|
||||||
|
break
|
||||||
|
case 43:
|
||||||
|
entity.pattern.x = parseFloat(value)
|
||||||
|
break
|
||||||
|
case 44:
|
||||||
|
entity.pattern.y = parseFloat(value)
|
||||||
|
break
|
||||||
|
case 45:
|
||||||
|
entity.pattern.offsetX = parseFloat(value)
|
||||||
|
break
|
||||||
|
case 46:
|
||||||
|
entity.pattern.offsetY = parseFloat(value)
|
||||||
|
break
|
||||||
|
case 79:
|
||||||
|
entity.pattern.dashCount = parseFloat(value)
|
||||||
|
break
|
||||||
|
case 49:
|
||||||
|
entity.pattern.length.push(value)
|
||||||
|
break
|
||||||
|
case 330:
|
||||||
|
loop.references.push(value)
|
||||||
|
break
|
||||||
|
case 450:
|
||||||
|
entity.solidOrGradient =
|
||||||
|
parseFloat(value) === 0 ? 'SOLID' : 'GRADIENT'
|
||||||
|
break
|
||||||
|
case 453:
|
||||||
|
// 0 = Solid; 2 = Gradient
|
||||||
|
entity.color.count = parseFloat(value)
|
||||||
|
break
|
||||||
|
case 460:
|
||||||
|
entity.color.rotation = value
|
||||||
|
break
|
||||||
|
case 461:
|
||||||
|
entity.color.gradient = value
|
||||||
|
break
|
||||||
|
case 462:
|
||||||
|
entity.color.tint = value
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
Object.assign(entity, common(type, value))
|
||||||
|
break
|
||||||
|
}
|
||||||
|
return entity
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: TYPE,
|
||||||
|
elevation: {},
|
||||||
|
extrusionDir: { x: 0, y: 0, z: 1 },
|
||||||
|
pattern: { length: [] },
|
||||||
|
boundary: { loops: [] },
|
||||||
|
seeds: { count: 0, seeds: [] },
|
||||||
|
color: {},
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { TYPE, process }
|
||||||
|
|
||||||
|
function createDrawEntity(type) {
|
||||||
|
if (isPolyline) return {}
|
||||||
|
|
||||||
|
// 1 = Line; 2 = Circular arc; 3 = Elliptic arc; 4 = Spline
|
||||||
|
switch (type) {
|
||||||
|
case 1:
|
||||||
|
return {
|
||||||
|
type: 'LINE',
|
||||||
|
start: { x: 0, y: 0 },
|
||||||
|
end: { x: 0, y: 0 },
|
||||||
|
}
|
||||||
|
case 2:
|
||||||
|
return {
|
||||||
|
type: 'ARC',
|
||||||
|
center: { x: 0, y: 0 },
|
||||||
|
radius: 0,
|
||||||
|
startAngle: 0,
|
||||||
|
endAngle: 0,
|
||||||
|
counterClockWise: false,
|
||||||
|
}
|
||||||
|
case 3:
|
||||||
|
return {
|
||||||
|
type: 'ELLIPSE',
|
||||||
|
center: { x: 0, y: 0 },
|
||||||
|
startAngle: 0,
|
||||||
|
endAngle: 0,
|
||||||
|
counterClockWise: false,
|
||||||
|
major: { x: 0, y: 0 },
|
||||||
|
minor: 0,
|
||||||
|
}
|
||||||
|
case 4:
|
||||||
|
return {
|
||||||
|
type: 'SPLINE',
|
||||||
|
degree: 0,
|
||||||
|
rational: 0,
|
||||||
|
periodic: 0,
|
||||||
|
knots: { count: 0, knots: [] },
|
||||||
|
controlPoints: { count: 0, points: [] },
|
||||||
|
weights: 1,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
|
||||||
|
function fillDrawEntity(type, drawType, value) {
|
||||||
|
switch (type) {
|
||||||
|
case 10:
|
||||||
|
{
|
||||||
|
switch (drawType) {
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
drawEntity.start.x = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
drawEntity.center.x = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
{
|
||||||
|
drawEntity.center.x = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 4:
|
||||||
|
{
|
||||||
|
drawEntity.controlPoints.points.push({ x: value, y: 0 })
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 20: {
|
||||||
|
switch (drawType) {
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
drawEntity.start.y = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
drawEntity.center.y = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
{
|
||||||
|
drawEntity.center.y = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 4:
|
||||||
|
{
|
||||||
|
drawEntity.controlPoints.points[
|
||||||
|
drawEntity.controlPoints.points.length - 1
|
||||||
|
].y = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 11:
|
||||||
|
{
|
||||||
|
switch (drawType) {
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
drawEntity.end.x = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
{
|
||||||
|
drawEntity.major.x = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 21: {
|
||||||
|
switch (drawType) {
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
drawEntity.end.y = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
{
|
||||||
|
drawEntity.major.y = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 40:
|
||||||
|
{
|
||||||
|
switch (drawType) {
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
drawEntity.radius = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
{
|
||||||
|
drawEntity.minor = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 4:
|
||||||
|
{
|
||||||
|
drawEntity.knots.knots.push(value)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 42:
|
||||||
|
{
|
||||||
|
switch (drawType) {
|
||||||
|
case 4:
|
||||||
|
{
|
||||||
|
drawEntity.weights = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 50:
|
||||||
|
{
|
||||||
|
switch (drawType) {
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
drawEntity.startAngle = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
{
|
||||||
|
drawEntity.startAngle = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 51:
|
||||||
|
{
|
||||||
|
switch (drawType) {
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
drawEntity.endAngle = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
{
|
||||||
|
drawEntity.endAngle = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 73:
|
||||||
|
{
|
||||||
|
switch (drawType) {
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
drawEntity.counterClockWise = parseFloat(value) === 1
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
{
|
||||||
|
drawEntity.counterClockWise = parseFloat(value) === 1
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 4:
|
||||||
|
{
|
||||||
|
drawEntity.rational = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 74:
|
||||||
|
{
|
||||||
|
switch (drawType) {
|
||||||
|
case 4:
|
||||||
|
{
|
||||||
|
drawEntity.periodic = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 94:
|
||||||
|
{
|
||||||
|
switch (drawType) {
|
||||||
|
case 4:
|
||||||
|
{
|
||||||
|
drawEntity.degree = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 95:
|
||||||
|
{
|
||||||
|
switch (drawType) {
|
||||||
|
case 4:
|
||||||
|
{
|
||||||
|
drawEntity.knots.count = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 96:
|
||||||
|
{
|
||||||
|
switch (drawType) {
|
||||||
|
case 4:
|
||||||
|
{
|
||||||
|
drawEntity.controlPoints.count = value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
@ -3,7 +3,8 @@ import common from './common'
|
|||||||
export const TYPE = 'INSERT'
|
export const TYPE = 'INSERT'
|
||||||
|
|
||||||
export const process = (tuples) => {
|
export const process = (tuples) => {
|
||||||
return tuples.reduce((entity, tuple) => {
|
return tuples.reduce(
|
||||||
|
(entity, tuple) => {
|
||||||
const type = tuple[0]
|
const type = tuple[0]
|
||||||
const value = tuple[1]
|
const value = tuple[1]
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@ -57,9 +58,11 @@ export const process = (tuples) => {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
return entity
|
return entity
|
||||||
}, {
|
},
|
||||||
type: TYPE
|
{
|
||||||
})
|
type: TYPE,
|
||||||
|
},
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { TYPE, process }
|
export default { TYPE, process }
|
||||||
|
11
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/handlers/entity/line.js
generated
vendored
11
extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/src/handlers/entity/line.js
generated
vendored
@ -3,7 +3,8 @@ import common from './common'
|
|||||||
export const TYPE = 'LINE'
|
export const TYPE = 'LINE'
|
||||||
|
|
||||||
export const process = (tuples) => {
|
export const process = (tuples) => {
|
||||||
return tuples.reduce((entity, tuple) => {
|
return tuples.reduce(
|
||||||
|
(entity, tuple) => {
|
||||||
const type = tuple[0]
|
const type = tuple[0]
|
||||||
const value = tuple[1]
|
const value = tuple[1]
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@ -33,11 +34,13 @@ export const process = (tuples) => {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
return entity
|
return entity
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
type: TYPE,
|
type: TYPE,
|
||||||
start: {},
|
start: {},
|
||||||
end: {}
|
end: {},
|
||||||
})
|
},
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { TYPE, process }
|
export default { TYPE, process }
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user