file_path
stringlengths 3
280
| file_language
stringclasses 66
values | content
stringlengths 1
1.04M
| repo_name
stringlengths 5
92
| repo_stars
int64 0
154k
| repo_description
stringlengths 0
402
| repo_primary_language
stringclasses 108
values | developer_username
stringlengths 1
25
| developer_name
stringlengths 0
30
| developer_company
stringlengths 0
82
|
|---|---|---|---|---|---|---|---|---|---|
test/utils.js
|
JavaScript
|
// SETUP & INITIALIZE
// ---------------------------------
global.Logger = console;
// Chai
global.expect = require('chai').expect;
// CONSTS & HELPER FUNCTIONS
// ---------------------------------
let utils = {
// Helper Functions
};
module.exports = {
utils,
};
|
zingchart/zingchart-react
| 93
|
Quickly create dynamic JavaScript charts with ZingChart & React.
|
JavaScript
|
zingchart
|
ZingChart
| |
.configs/.mocharc.js
|
JavaScript
|
'use strict';
// Here's a JavaScript-based config file.
// If you need conditional logic, you might want to use this type of config.
// Otherwise, JSON or YAML is recommended.
module.exports = {
diff: true,
extension: ['spec'],
opts: false,
exit: true, // end bash script when done
slow: 75,
timeout: 5000,
ui: 'bdd',
spec: ['test/*.spec.js'],
color: true,
output: 'test/test.js'
};
|
zingchart/zingchart-vue
| 25
|
A Vue component to create charts with ZingChart
|
Vue
|
zingchart
|
ZingChart
| |
index.html
|
HTML
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v3.0.1/dist/mini-default.min.css">
<title>ZingChart 2 Vue 3 Wrapper Demo</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
|
zingchart/zingchart-vue
| 25
|
A Vue component to create charts with ZingChart
|
Vue
|
zingchart
|
ZingChart
| |
src/App.vue
|
Vue
|
<script setup>
import {ref} from 'vue';
import MethodsView from './views/Methods.vue';
import EventsView from './views/Events.vue';
import DynamicView from './views/Dynamic.vue';
import SimpleView from './views/Simple.vue';
import LicenseView from './views/License.vue';
import ModulesView from './views/Modules.vue';
let activeDemo = ref('simple');
</script>
<template>
<div>
<h1>zingchart-vue playground</h1>
<p>A simple example of binding data, mutations with methods, and listening to events</p>
<header>
<a href="#" class="button" @click="activeDemo = 'simple'">Simple</a>
<a href="#" class="button" @click="activeDemo = 'dynamic'">Dynamic Config</a>
<a href="#" class="button" @click="activeDemo = 'methods'">Methods</a>
<a href="#" class="button" @click="activeDemo = 'events'">Events</a>
<a href="#" class="button" @click="activeDemo = 'license'">License</a>
<a href="#" class="button" @click="activeDemo = 'modules'">Modules</a>
</header>
<SimpleView v-show="activeDemo === 'simple'" />
<DynamicView v-show="activeDemo === 'dynamic'" />
<MethodsView v-show="activeDemo === 'methods'" />
<EventsView v-show="activeDemo === 'events'" />
<LicenseView v-show="activeDemo === 'license'" />
<ModulesView v-show="activeDemo === 'modules'" />
</div>
</template>
|
zingchart/zingchart-vue
| 25
|
A Vue component to create charts with ZingChart
|
Vue
|
zingchart
|
ZingChart
| |
src/ZingChart.vue
|
Vue
|
<script setup>
import { computed, onMounted, onUnmounted, ref, useAttrs, watch } from 'vue';
// import constants that define methods, events and default rendering parameters
import constants from 'zingchart-constants';
import zingchart from 'zingchart';
// One time setup globally to handle all zingchart-vue objects in the app space.
if (!window.ZCVUE) {
window.ZCVUE = {
instances: {},
count: 0
};
}
// PROPS
const props = defineProps({
data: {
type: Object,
required: true,
},
forceRender: {
type: String,
},
height: {
type: [String, Number],
default: constants.DEFAULT_HEIGHT,
},
id: {
type: [String],
required: false,
},
modules: {
type: [String, Array],
required: false
},
output: {
type: String,
default: constants.DEFAULT_OUTPUT,
},
series: {
type: Array,
required: false,
},
theme: {
type: Object,
required: false,
},
width: {
type: [String, Number],
default: constants.DEFAULT_WIDTH,
}
});
// DATA
const chart = ref();
let chartId = null;
let forceRenderOnChange = null;
let renderObject = null;
// Set the id for zingchart to render to
if (props.id) {
chartId = props.id;
} else {
chartId = 'zingchart-vue-' + window.ZCVUE.count++;
}
// COMPUTED
const chartData = computed(() => {
const data = props.data;
if (props.series) {
data['series'] = props.series;
}
return data;
});
// WATCHERS
watch(() => props.data, () => {
if (forceRenderOnChange) {
renderObject.data = chartData.value;
zingchart.render(renderObject);
} else {
zingchart.exec(chartId, 'setdata', {
data: chartData.value,
});
}
});
watch(() => props.height, () => {
resize();
});
watch(() => props.series, () => {
zingchart.exec(chartId, 'setseriesdata', {
data: chartData.series,
});
});
watch(() => props.width, () => {
resize();
});
// METHODS
function render() {
forceRenderOnChange = typeof props.forceRender !== 'undefined';
chart.value.style.width = props.width;
chart.value.style.height = props.height;
chart.value.setAttribute('id', chartId);
renderObject = {
id: chartId,
data: chartData.value,
height: props.height,
width: props.width,
output: props.output,
};
if (props.modules) {
renderObject.modules = typeof props.modules === 'string' ? props.modules : props.modules.toString();
}
if (props.theme) {
renderObject.defaults = props.theme;
}
// Render the chart
zingchart.render(renderObject);
}
function resize() {
chart.value.style.width = props.width;
chart.value.style.height = props.height;
zingchart.exec(chartId, 'resize', {
height: props.height,
width: props.width,
});
}
// LIFECYCLE HOOKS
onMounted(() => {
render();
});
onUnmounted(() => {
delete window.ZCVUE.instances[chartId];
zingchart.exec(chartId, 'destroy');
});
// EXPOSE
const toExpose = {};
// Apply all of ZingChart's methods directly to the Vue instance
constants.METHOD_NAMES.forEach(name => {
if (name.includes('zingchart.')) {
// Remove `zingchart.` from name
let members = name.split('.');
// Methods executed directly on zingchart object
if (members.length === 2) {
toExpose[`${members[1]}`] = () => {
return zingchart[members[1]]();
};
} else {
toExpose[`${members[1]}.${members[2]}`] = args => {
if (members[1] === 'maps') {
// Does not require chart id
return zingchart[members[1]][members[2]](args);
} else {
// Requires chart id in first arg
return zingchart[members[1]][members[2]](chartId, args);
}
};
}
} else {
toExpose[name] = args => {
// Methods executed through `zingchart.exec()`
return zingchart.exec(chartId, name, args);
};
}
});
// Pipe zingchart specific event listeners
const attrs = useAttrs();
Object.keys(attrs).forEach(attr => {
let eventName = attr.slice(2).replace(/(?:^|\.?)([A-Z])/g, function (x,y){return '_' + y.toLowerCase()}).replace(/^_/, '');
if (constants.EVENT_NAMES.includes(eventName)) {
// Filter through the provided events list, then register it to zingchart.
zingchart.bind(chartId, eventName, result => {
attrs[attr](result);
});
}
});
defineExpose(toExpose);
</script>
<template>
<div ref='chart' :data="chartData"></div>
</template>
|
zingchart/zingchart-vue
| 25
|
A Vue component to create charts with ZingChart
|
Vue
|
zingchart
|
ZingChart
| |
src/main.js
|
JavaScript
|
import { createApp } from 'vue';
import App from './App.vue';
createApp(App).mount('#app');
|
zingchart/zingchart-vue
| 25
|
A Vue component to create charts with ZingChart
|
Vue
|
zingchart
|
ZingChart
| |
src/views/Dynamic.vue
|
Vue
|
<script setup>
import { onMounted, ref } from 'vue';
import ZingChartVue from '../ZingChart.vue';
// Random numbers from 0-100
function randomData(count) {
return Array.from(new Array(count)).map(() => {
return Math.floor(Math.random() * 10);
});
}
function randomColor() {
const PLOT_COLORS = ['#f44336', '#e91e63', '#9c27b0', '#3f51b5', '#2196f3', '#4caf50', '#ffeb3b', '#ff9800', '#607d8b'];
return PLOT_COLORS[Math.floor(Math.random() * PLOT_COLORS.length)]
}
let chartData = ref(update());
function update() {
return {
type: 'bar',
series: [
{
values: randomData(10),
backgroundColor: randomColor(),
}
]
};
};
onMounted(() => {
setInterval( () => {
chartData.value = update();
}, 2000);
});
</script>
<template>
<div>
<h3>Dynamic config</h3>
<p>Everytime the configuration object changes, the component automatically re-renders. Below is an example of the dataset and color changing every 2 seconds without any additional code to re-render the chart. </p>
<ZingChartVue ref="chart" :data="chartData" />
<pre>
<ZingChartVue ref="chart" :data="chartData"/>
</pre>
<pre>
let chartData = ref(update());
function update() {
return {
type: 'bar',
series: [
{
values: randomData(10),
backgroundColor: randomColor(),
}
]
};
};
onMounted(() => {
setInterval( () => {
chartData.value = update();
}, 2000);
});
</pre>
</div>
</template>
|
zingchart/zingchart-vue
| 25
|
A Vue component to create charts with ZingChart
|
Vue
|
zingchart
|
ZingChart
| |
src/views/Events.vue
|
Vue
|
<script setup>
import { onMounted, ref } from 'vue';
import ZingChartVue from '../ZingChart.vue';
const chart = ref();
const output = ref(null);
const listOfEventListeners = ref([]);
const chartData = ref({
type: "line",
series: [
{
values: randomData(10)
}
]
});
function chartDone() {
output.value.innerHTML = `Event "Complete" - The chart is rendered\n`;
};
function nodeInfo(result) {
delete result.ev;
output.value.innerHTML = `Node Info \n` + JSON.stringify(result) + "\n";
};
// Random numbers from 0-100
function randomData(count) {
return Array.from(new Array(count)).map(() => {
return Math.floor(Math.random() * 10);
});
};
onMounted(() => {
listOfEventListeners.value = Object.keys(chart.value.$attrs);
});
</script>
<template>
<div>
<h3>Listening to the chart with ZingChart events</h3>
<p>Every event available to ZingChart is available on the component's instance.</p>
<ZingChartVue
ref="chart"
:data="chartData"
@complete="chartDone"
@nodeMouseover="nodeInfo" />
<pre><ZingChartVue ref="chart" :data="chartData" @complete="chartDone" @nodeMouseover="nodeInfo" /></pre>
<h2>Output from events</h2>
<h3>Events bound:</h3>
<ul>
<li v-for="(item, index) in listOfEventListeners" :key="index">{{item}}</li>
</ul>
<textarea ref="output" cols="50" rows="10"></textarea>
</div>
</template>
|
zingchart/zingchart-vue
| 25
|
A Vue component to create charts with ZingChart
|
Vue
|
zingchart
|
ZingChart
| |
src/views/License.vue
|
Vue
|
<script setup>
import { ref } from 'vue';
import ZingChartVue from '../ZingChart.vue';
// zingchart object for performance flags
zingchart.DEV.KEEPSOURCE = 0; // prevents lib from storing the original data package
zingchart.DEV.COPYDATA = 0; // prevents lib from creating a copy of the data package
// ZC object for license key
zingchart.LICENSE = ['abcdefghijklmnopqrstuvwxy'];
const chartData = ref({
/* Graphset array */
graphset: [
{ /* Object containing chart data */
type: 'line',
/* Size your chart using height/width attributes */
height: '200px',
width: '85%',
/* Position your chart using x/y attributes */
x: '5%',
y: '5%',
series:[
{
values:[76,23,15,85,13]
},
{
values:[36,53,65,25,45]
}
]
},
{ /* Object containing chart data */
type: 'funnel',
height: '55%',
width: '50%',
x: '5%',
y: '200px',
series:[
{values:[30]},
{values:[15]},
{values:[5]},
{values:[3]}
]
},
{
type: 'pie',
height: '55%',
width: '50%',
x: '50%',
y: '200px',
series:[
{values:[15]},
{values:[30]},
{values:[34]}
]
}
]
});
</script>
<template>
<div>
<h3>A graphset example with ZC and zingchart objects.</h3>
<ZingChartVue ref="chart" :data="chartData" />
<pre>
<ZingChartVue ref="chart" :data="chartData"/>
</pre>
<pre>
zingchart.LICENSE = ['abcdefghijklmnopqrstuvwxy'];
</pre>
</div>
</template>
|
zingchart/zingchart-vue
| 25
|
A Vue component to create charts with ZingChart
|
Vue
|
zingchart
|
ZingChart
| |
src/views/Methods.vue
|
Vue
|
<script setup>
import { ref } from 'vue';
import ZingChartVue from '../ZingChart.vue';
const chart = ref();
const chartData = ref({
type: "line",
series: [
{
values: randomData(10)
}
]
});
// Random numbers from 0-100
function randomData(count) {
return Array.from(new Array(count)).map(() => {
return Math.floor(Math.random() * 10);
});
};
function addPlot() {
chart.value.addplot({
data: {
values: randomData(10),
text: "My new plot"
}
});
};
</script>
<template>
<div>
<h3>Modifying the chart with ZingChart methods</h3>
<p>Every method available to ZingChart is available on the component's instance.</p>
<ZingChartVue ref="chart" :data="chartData" />
<h4>addPlot()</h4>
<p>Adding a plot</p>
<pre>
<ZingChartVue ref="chart" :data="chartData" />
</pre>
<pre>
const chart = ref();
// 'addplot' is a ZingChart method
chart.value.addplot({
data: {
values: randomData(10),
text: "My new plot"
}
});
</pre>
<button class="primary" @click="addPlot">Add a plot</button>
</div>
</template>
|
zingchart/zingchart-vue
| 25
|
A Vue component to create charts with ZingChart
|
Vue
|
zingchart
|
ZingChart
| |
src/views/Modules.vue
|
Vue
|
<script setup>
import { ref } from 'vue';
import 'zingchart/es6';
import ZingChartVue from '../ZingChart.vue';
// import chart modules used on that page
import 'zingchart/modules-es6/zingchart-maps.min.js';
import 'zingchart/modules-es6/zingchart-maps-usa.min.js';
const chartData = ref({
shapes: [
{
type: 'zingchart.maps',
options: {
name: 'usa',
ignore: ['AK','HI']
}
}
]
});
</script>
<template>
<div>
<h3>A maps module demo.</h3>
<ZingChartVue ref="chart" :data="chartData" height="700px" />
<pre>
<ZingChartVue ref="chart" :data="chartData"/>
</pre>
<pre>
// import chart modules used on that page
import 'zingchart/modules-es6/zingchart-maps.min.js';
import 'zingchart/modules-es6/zingchart-maps-usa.min.js';
const chartData = ref({
shapes: [
{
type: 'zingchart.maps',
options: {
name: 'usa',
ignore: ['AK','HI']
}
}
]
});
</pre>
</div>
</template>
|
zingchart/zingchart-vue
| 25
|
A Vue component to create charts with ZingChart
|
Vue
|
zingchart
|
ZingChart
| |
src/views/Simple.vue
|
Vue
|
<script setup>
import { ref } from 'vue';
import ZingChartVue from '../ZingChart.vue';
const chartData = {
type: "line",
series: [
{
values: [6,4,3,4,6,6,4]
}
]
};
</script>
<template>
<div>
<h3>A simple example with a line chart config</h3>
<ZingChartVue ref="chart" :data="chartData" />
<pre>
<ZingChartVue ref="chart" :data="chartData"/>
</pre>
<pre>
const chartData = {
type: "line",
series: [
{
values: [6,4,3,4,6,6,4]
}
]
};
</pre>
</div>
</template>
|
zingchart/zingchart-vue
| 25
|
A Vue component to create charts with ZingChart
|
Vue
|
zingchart
|
ZingChart
| |
test/build.spec.js
|
JavaScript
|
const utils = require('./utils.js');
const chai = require('chai');
chai.use(require('chai-fs'));
// server/controllers/api/card.js
describe('Build', function() {
describe('dist/ files exist', function() {
// verify the ZingChart object exists
it(`zingchartVue.cjs.js file should exist`, async function() {
let vueDistFilePath = 'dist/zingchartVue3.cjs.min.js';
expect(vueDistFilePath).to.be.a.path();
});
it(`zingchartVue.umd.js file should exist`, async function() {
let vueDistFilePath = 'dist/zingchartVue3.umd.min.js';
expect(vueDistFilePath).to.be.a.path();
});
});
});
|
zingchart/zingchart-vue
| 25
|
A Vue component to create charts with ZingChart
|
Vue
|
zingchart
|
ZingChart
| |
test/utils.js
|
JavaScript
|
// SETUP & INITIALIZE
// ---------------------------------
global.Logger = console;
// Chai
global.expect = require('chai').expect;
// CONSTS & HELPER FUNCTIONS
// ---------------------------------
let utils = {
// Helper Functions
};
module.exports = {
utils,
};
|
zingchart/zingchart-vue
| 25
|
A Vue component to create charts with ZingChart
|
Vue
|
zingchart
|
ZingChart
| |
vite.config.js
|
JavaScript
|
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import path from 'path';
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
build: {
lib: {
entry: path.resolve(__dirname, 'src/ZingChart.vue'),
name: 'ZingChart',
fileName: (format) => `zingchartVue3.${format}.min.js`,
},
rollupOptions: {
external: ['vue'],
output: [
{
format: 'cjs',
},
{
format: 'umd',
name: 'zingchartVue3',
},
]
},
},
plugins: [vue()],
});
|
zingchart/zingchart-vue
| 25
|
A Vue component to create charts with ZingChart
|
Vue
|
zingchart
|
ZingChart
| |
ZingChart.js
|
JavaScript
|
import {DEFAULT_HEIGHT, DEFAULT_WIDTH, METHOD_NAMES, EVENT_NAMES} from './constants.js';
// One time setup globally to handle all zingchart-react objects in the app space.
if (!window.ZCWC) {
window.ZCWC = {
instances: {},
count: 0
};
const wcStyle = document.createElement('style');
wcStyle.innerHTML = '.zingchart-wc > * {visibility: hidden;}';
document.head.appendChild(wcStyle);
}
class ZingChart extends HTMLElement {
constructor() {
super();
this.id = '';
this.observer = null;
this.ID_PREFIX = 'zingchart-wc';
// User properties
this.chartData = null;
this.palette = null;
this.series = null;
this.defaults = null;
// Add the webcomponent class
this.classList.add('zingchart-wc');
}
connectedCallback() {
this.setup();
this.parse();
this.render();
this.attachObservers();
}
attachObservers() {
const data = {
childList: true,
attributes: true,
subtree: true,
}
const callback = (mutationsList, observer) => {
for(let mutation of mutationsList) {
if(mutation.type === 'attributes') {
switch(mutation.attributeName) {
case 'data':
this.rerender();
break;
case 'height':
case 'width':
this.modifyDimensions();
break;
case 'values':
this.updateValues(mutation);
break;
case 'series' :
this.updateSeries(mutation);
break;
}
}
}
}
this.observer = new MutationObserver(callback);
this.observer.observe(this, data);
}
destroy() {
// Destroy zingchart
zingchart.exec(this.id, 'destroy');
// Deattach the mutation observer
this.observer.disconnect();
}
updateValues(mutation) {
let target = mutation.target;
const tagName = target.tagName.toLowerCase();
if(tagName.includes('zc-series')) {
const series = {
values: JSON.parse(target.getAttribute('values')),
}
// If the binding occurs on a series entry rather than the entire series, we need the index.
if(tagName.includes('zc-series-')) {
series.plotindex = tagName.replace('zc-series-', '');
}
this.setseriesvalues(series);
}
}
updateSeries(mutation) {
let target = mutation.target;
const tagName = target.tagName.toLowerCase();
if(tagName.includes('zc-series')) {
const config = {
data: JSON.parse(target.getAttribute('series'))
};
// If the binding occurs on a series entry rather than the entire series, we need the index.
if(tagName.includes('zc-series-')) {
config.plotindex = tagName.replace('zc-series-', '');
}
this.setseriesdata(config);
}
}
setup() {
// Set the id for ZingChart to bind to
this.id = `${this.ID_PREFIX}-${window.ZCWC.count++}`;
this.setAttribute('id', this.id);
// Apply all of ZingChart's methods directly to this element's instance
METHOD_NAMES.forEach(name => {
this[name] = args => {
return zingchart.exec(this.id, name, args);
};
});
// Attach given event names
Object.keys(this.attributes).forEach(index => {
const eventName = this.attributes[index].name;
const functionName = this.attributes[index].value;
// Bind all event names
if(EVENT_NAMES.includes(eventName)) {
zingchart.bind(this.id, eventName, result => {
window[functionName](result);
});
}
});
}
modifyDimensions() {
zingchart.exec(this.id, "resize", {
width: this.getAttribute('width') || DEFAULT_WIDTH,
height: this.getAttribute('height') || DEFAULT_HEIGHT,
});
}
rerender() {
let data = this.getAttribute('data');
try {
zingchart.exec(this.id, 'setdata', {
data: JSON.parse(data),
});
} catch(error) {
console.log(error);
console.error('Invalid chart configuration')
}
}
parse() {
// Check the user's properties
this.chartData = this.getAttribute('data');
let series = this.getAttribute('series');
// Parse to JSON.
if(this.chartData) {
try {
this.chartData = JSON.parse(this.chartData);
} catch(error) {
throw new Error('The provided data is not a proper JSON');
}
}
if(series) {
try {
series = JSON.parse(series);
} catch(error) {
throw new Error('The provided series is not a proper JSON');
}
}
// Merge the series and data
if(!this.chartData) {
this.chartData = {
series,
};
} else if(this.chartData && series) {
this.chartData.series = series;
}
// Inject the type from chart-specific components.
if(this.type) {
this.chartData.type = this.type;
}
this.defaults = this.getAttribute('defaults');
// Parse any innerhtml that the user provided that is prefixed with "zc" and convert it to json.
this.parseChildren();
}
parseChildren() {
return parse(this.children, this.chartData);
function parse(children, chartData) {
Array.from(children).forEach((element) => {
let path = element.tagName.toLowerCase().replace('zc-', '').split('-');
// Check the path for any -x/-y/-r etc properties. If there are, then we attach them back to the previous fragment.
path = path.reduce((acc, part, index) => {
if(part.length === 1) {
acc[index-1] += '-' + part;
} else {
acc.push(part);
}
return acc;
},[]);
/* For every path, we add it's attributes to the config object.
If there are children elements, we tail-end recurse.
Otherwise we append the text if found/appropriate*/
// Find the element
let configTarget;
if(Array.isArray(chartData)) {
configTarget = {};
chartData.push(configTarget);
} else {
configTarget = path.reduce((obj, tag) => {
// Determine if the missing object should be an array or object. Thank you zingchart and the english language for ending plurals with an 's'!
if(!obj[tag]) {
obj[tag] = (tag.slice(-1) === 's') ? [] : {};
}
return obj[tag];
}, chartData);
}
/*
Determine if the terminating target should be an array or object, or has text.
In the zingchart syntax, array based configs such as labels will have multiple instances.
*/
// Add the attributes from the current
Object.keys(element.attributes).forEach(index => {
const attribute = element.attributes[index].name;
let value = element.attributes[index].value;
// Skip over any event listeners and any zing-data- properties
if(!EVENT_NAMES.includes(attribute) && !attribute.includes('zing-data-')) {
// Parse values in the case of series.
if(typeof value === 'string' && value[0] === '[') {
value = JSON.parse(value);
}
configTarget[attribute] = value || true;
}
});
if(element.childNodes.length === 1 && element.childNodes[0].nodeName === '#text') {
configTarget.text = element.childNodes[0].textContent;
}
// Check to see if there are any children elements and recurse
if(element.children) {
parse(element.children, configTarget);
}
})
}
}
render() {
const config = {
id: this.id,
data: this.chartData,
width: this.getAttribute('width') || DEFAULT_WIDTH,
height: this.getAttribute('height') || DEFAULT_HEIGHT,
};
if(this.defaults) {
config.defaults = defaults;
}
zingchart.render(config);
// Only set the wrapper to visibility initial. We want to keep all other pseudo-components hidden
this.querySelector(`#${this.id}-wrapper`).style.visibility = 'initial';
}
}
export {ZingChart as default};
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCArea.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
class ZCArea extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-area';
this.type ='area';
}
parse() {
super.parse();
}
}
export default ZCArea;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCBar.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
class ZCBar extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-bar';
this.type ='bar';
}
parse() {
super.parse();
}
}
export default ZCBar;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCBoxplot.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
class ZCBoxplot extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-boxplot';
this.type ='boxplot';
}
parse() {
super.parse();
}
}
export default ZCBoxplot;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCBubble.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
class ZCBubble extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-bubble';
this.type ='bubble';
}
parse() {
super.parse();
}
}
export default ZCBubble;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCBubblePie.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-bubble-pie.min.js';
class ZCBubblePie extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-bubble-pie';
this.type ='bubble-pie';
}
parse() {
super.parse();
}
}
export default ZCBubblePie;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCBullet.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
class ZCBullet extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-bullet';
this.type ='bullet';
}
parse() {
super.parse();
}
}
export default ZCBullet;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCCalendar.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-calendar.min.js';
class ZCCalendar extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-calendar';
this.type ='calendar';
}
parse() {
super.parse();
}
}
export default ZCCalendar;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCChord.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-chord.min.js';
class ZCChord extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-chord';
this.type ='chord';
}
parse() {
super.parse();
}
}
export default ZCChord;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCColumn.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
class ZCColumn extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-column';
this.type ='column';
this.plot = {
vertical: true,
}
}
parse() {
super.parse();
}
}
export default ZCColumn;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCFunnel.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
class ZCFunnel extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-funnel';
this.type ='funnel';
}
parse() {
super.parse();
}
}
export default ZCFunnel;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCGauge.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
class ZCGauge extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-gauge';
this.type ='gauge';
}
parse() {
super.parse();
}
}
export default ZCGauge;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCHeatmap.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
class ZCHeatmap extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-heatmap';
this.type ='heatmap';
}
parse() {
super.parse();
}
}
export default ZCHeatmap;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCLine.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
class ZCLine extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-line';
this.type = 'line';
}
parse() {
super.parse();
}
}
export default ZCLine;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCMap.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-maps.min.js';
class ZCMap extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-map';
}
parse() {
super.parse();
}
render() {
// Load the current module
const name = this.getAttribute('name');
this.chartData.shapes = this.chartData.shapes || [];
import(`../node_modules/zingchart/modules-es6/zingchart-maps-${name}.min.js`)
.then((module) => {
this.chartData.shapes.push( {
type: 'zingchart.maps',
options: {
name: name
}
});
super.render();
});
}
}
export default ZCMap;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCNestedPie.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-nested-pie.min.js';
class ZCNestedPie extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-nested-pie';
this.type ='nested-pie';
}
parse() {
super.parse();
}
}
export default ZCNestedPie;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCNetworkDiagram.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-tree.min.js';
class ZCChord extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-network-diagram';
this.type ='tree';
}
parse() {
super.parse();
}
}
export default ZCNetworkDiagram;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCPareto.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-pareto.min.js';
class ZCPareto extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-pareto';
this.type ='pareto';
}
parse() {
super.parse();
}
}
export default ZCPareto;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCPie.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
class ZCPie extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-pie';
this.type = 'pie';
}
parse() {
super.parse();
}
}
export default ZCPie;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCPopulationPyramid.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-pop-pyramid.min.js';
class ZCPopulationPyramid extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-population-pyramid';
this.type = 'pop-pyramid';
}
parse() {
super.parse();
}
}
export default ZCPopulationPyramid;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCRadar.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
class ZCRadar extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-radar';
this.type = 'radar';
}
parse() {
super.parse();
}
}
export default ZCRadar;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCRankflow.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-rankflow.min.js';
class ZCRankflow extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-rankflow';
this.type = 'rankflow';
}
parse() {
super.parse();
}
}
export default ZCRankflow;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCScatter.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
class ZCScatter extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-scatter';
this.type = 'scatter';
}
parse() {
super.parse();
}
}
export default ZCScatter;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCStock.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-stock.min.js';
class ZCStock extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-stock';
this.type = 'stock';
}
parse() {
super.parse();
}
}
export default ZCStock;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCTreemap.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-treemap.min.js';
class ZCTreemap extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-treemap';
this.type = 'treemap';
}
parse() {
super.parse();
}
}
export default ZCTreemap;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCVenn.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-venn.min.js';
class ZCVenn extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-venn';
this.type = 'venn';
}
parse() {
super.parse();
}
}
export default ZCVenn;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCWaterfall.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-waterfall.min.js';
class ZCWaterfall extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-waterfall';
this.type = 'waterfall';
}
parse() {
super.parse();
}
}
export default ZCWaterfall;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
charts/ZCWordcloud.js
|
JavaScript
|
import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-wordcloud.min.js';
class ZCWordcloud extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-wordcloud';
this.type = 'wordcloud';
}
parse() {
super.parse();
}
}
export default ZCWordcloud;
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
constants.js
|
JavaScript
|
const EVENT_NAMES = [
'animation_end',
'animation_start',
'animation_step',
'modify',
'node_add',
'node_remove',
'plot_add',
'plot_modify',
'plot_remove',
'reload',
'setdata',
'data_export',
'image_save',
'print',
'feed_clear',
'feed_interval_modify',
'feed_start',
'feed_stop',
'beforedestroy',
'click',
'complete',
'dataparse',
'dataready',
'destroy',
'guide_mousemove',
'load',
'menu_item_click',
'resize',
'Graph Events',
'gcomplete',
'gload',
'History Events',
'history_back',
'history_forward',
'Interactive Events',
'node_deselect',
'node_select',
'plot_deselect',
'plot_select',
'legend_item_click',
'legend_marker_click',
'node_click',
'node_doubleclick',
'node_mouseout',
'node_mouseover',
'node_set',
'label_click',
'label_mousedown',
'label_mouseout',
'label_mouseover',
'label_mouseup',
'legend_marker_click',
'shape_click',
'shape_mousedown',
'shape_mouseout',
'shape_mouseover',
'shape_mouseup',
'plot_add',
'plot_click',
'plot_doubleclick',
'plot_modify',
'plot_mouseout',
'plot_mouseover',
'plot_remove',
'about_hide',
'about_show',
'bugreport_hide',
'bugreport_show',
'dimension_change',
'legend_hide',
'legend_maximize',
'legend_minimize',
'legend_show',
'lens_hide',
'lens_show',
'plot_hide',
'plot_show',
'source_hide',
'source_show'
];
const METHOD_NAMES = ["addplot", "appendseriesdata", "appendseriesvalues", "getseriesdata", "getseriesvalues", "modifyplot", "removenode", "removeplot", "set3dview", "setnodevalue", "setseriesdata", "setseriesvalues", "downloadCSV", "downloadXLS", "downloadRAW", "exportdata", "getimagedata", "print", "saveasimage", "exportimage", "addmenuitem", "addscalevalue", "destroy", "load", "modify", "reload", "removescalevalue", "resize", "setdata", "setguide", "update", "clearfeed", "getinterval", "setinterval", "startfeed", "stopfeed", "getcharttype", "getdata", "getgraphlength", "getnodelength", "getnodevalue", "getobjectinfo", "getplotlength", "getplotvalues", "getrender", "getrules", "getscales", "getversion", "getxyinfo", "get3dview", "goback", "goforward", "addnote", "removenote", "updatenote", "addobject", "removeobject", "repaintobjects", "updateobject", "addrule", "removerule", "updaterule", "Selection", "clearselection", "deselect", "getselection", "select", "setselection", "clicknode", "closemodal", "disable", "enable", "exitfullscreen", "fullscreen", "hideguide", "hidemenu", "hideplot/plothide", "legendmaximize", "legendminimize", "openmodal", "showhoverstate", "showguide", "showmenu", "showplot/plotshow", "toggleabout", "togglebugreport", "toggledimension", "togglelegend", "togglesource", "toggleplot", "hidetooltip", "locktooltip", "showtooltip", "unlocktooltip", "viewall", "zoomin", "zoomout", "zoomto", "zoomtovalues"];
const DEFAULT_WIDTH = '100%';
const DEFAULT_HEIGHT = 480;
export {DEFAULT_WIDTH, DEFAULT_HEIGHT, EVENT_NAMES, METHOD_NAMES};
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
example/index.html
|
HTML
|
<html>
<head>
<script type="module">
import '../node_modules/zingchart/es6.js';
import ZingChart from '../ZingChart.js';
customElements.define('zing-chart', ZingChart);
import ZCLine from '../charts/ZCLine.js';
customElements.define('zc-line', ZCLine);
import ZCMap from '../charts/ZCMap.js';
customElements.define('zc-map', ZCMap);
</script>
</head>
<body>
<zing-chart data='{"type": "bar", "series": [{"values": [1,2,3,4,5,6,4] }]}'></zing-chart>
<zing-chart data='{"type": "scatter", "series": [{"values": [1,2,3,4,5,6,4] }]}'></zing-chart>
<zc-line>
<zc-title font-family="Cursive">Hello World</zc-title>
<zc-labels>
<zc-label x="15%" y="50%" font-size="22px" border-width="1px" font-color="red">This is a Label</zc-label>
</zc-labels>
<zc-legend scrollable></zc-legend>
<zc-crosshair-x></zc-crosshair-x>
<zc-scale-x step="month" min-value="1264935600000">
<zc-label>Month/Year</zc-label>
<zc-transform type="date" all="%m/%y"></zc-transform>
</zc-scale-x>
<zc-series>
<zc-series-0 values="[3,4,3,2,4,3,3]"></zc-series-0>
</zc-series>
</zc-line>
<zc-map name="aus"></zc-map>
</body>
</html>
|
zingchart/zingchart-web-component
| 2
|
A web component wrapper for ZingChart
|
JavaScript
|
zingchart
|
ZingChart
| |
.eslintrc.js
|
JavaScript
|
module.exports = {
"extends": "google",
"installedESLint": true,
"env": {
"es6": true,
"browser": true
},
"ecmaFeatures": {
"modules": true
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"implicitStrict": false
}
}
};
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
index.js
|
JavaScript
|
const ZingTouch = require('./dist/zingtouch.min.js').default;
module.exports = ZingTouch;
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
karma.conf.js
|
JavaScript
|
let webpackConfig = require('./webpack.config');
process.env.CHROME_BIN = require('puppeteer').executablePath();
module.exports = function(config) {
config.set({
basePath: './',
frameworks: ['mocha', 'chai', 'webpack'],
files: [
'./src/core/main.js',
'./test/**/*.js',
],
plugings: ['karma-webpack', 'karma-mocha'],
exclude: [],
preprocessors: {
'./src/**/*.js': ['webpack', 'sourcemap'],
'./test/**/*.js': ['webpack', 'sourcemap'],
},
browsers: ['ChromeHeadlessNoSandbox'],
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: ['--no-sandbox'],
},
},
webpack: webpackConfig,
webpackMiddleware: {noInfo: true},
singleRun: true,
client: {
captureConsole: true,
},
});
};
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
src/ZingTouch.js
|
JavaScript
|
/**
* @file ZingTouch.js
* Main object containing API methods and Gesture constructors
*/
import Region from './core/classes/Region.js';
import Gesture from './gestures/Gesture.js';
import Pan from './gestures/Pan.js';
import Distance from './gestures/Distance.js';
import Rotate from './gestures/Rotate.js';
import Swipe from './gestures/Swipe.js';
import Tap from './gestures/Tap.js';
/**
* The global API interface for ZingTouch. Contains a constructor for the
* Region Object, and constructors for each predefined Gesture.
* @type {Object}
* @namespace ZingTouch
*/
let ZingTouch = {
_regions: [],
// Constructors
Gesture,
Pan,
Distance,
Rotate,
Swipe,
Tap,
Region: function(element, capture, preventDefault) {
let id = ZingTouch._regions.length;
let region = new Region(element, capture, preventDefault, id);
ZingTouch._regions.push(region);
return region;
},
};
export default ZingTouch;
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
src/core/arbiter.js
|
JavaScript
|
/**
* @file arbiter.js
* Contains logic for the dispatcher
*/
import dispatcher from './dispatcher.js';
import interpreter from './interpreter.js';
import util from './util.js';
/**
* Function that handles event flow, negotiating with the interpreter,
* and dispatcher.
* 1. Receiving all touch events in the window.
* 2. Determining which gestures are linked to the target element.
* 3. Negotiating with the Interpreter what event should occur.
* 4. Sending events to the dispatcher to emit events to the target.
* @param {Event} event - The event emitted from the window object.
* @param {Object} region - The region object of the current listener.
*/
function arbiter(event, region) {
const state = region.state;
const eventType = util.normalizeEvent[ event.type ];
/*
Return if a gesture is not in progress and won't be. Also catches the case
where a previous event is in a partial state (2 finger pan, waits for both
inputs to reach touchend)
*/
if (state.inputs.length === 0 && eventType !== 'start') {
return;
}
/*
Check for 'stale' or events that lost focus
(e.g. a pan goes off screen/off region.)
Does not affect mobile devices.
*/
if (typeof event.buttons !== 'undefined' &&
eventType !== 'end' &&
event.buttons === 0) {
state.resetInputs();
return;
}
// Update the state with the new events. If the event is stopped, return;
if (!state.updateInputs(event, region.element)) {
return;
}
// Retrieve the initial target from any one of the inputs
const bindings = state.retrieveBindingsByInitialPos();
if (bindings.length > 0) {
if (region.preventDefault) {
util.setMSPreventDefault(region.element);
util.preventDefault(event);
} else {
util.removeMSPreventDefault(region.element);
}
const toBeDispatched = {};
const gestures = interpreter(bindings, event, state);
/* Determine the deepest path index to emit the event
from, to avoid duplicate events being fired. */
const path = util.getPropagationPath(event);
gestures.forEach((gesture) => {
const id = gesture.binding.gesture.getId();
if (toBeDispatched[id]) {
if (util.getPathIndex(path, gesture.binding.element) <
util.getPathIndex(path, toBeDispatched[id].binding.element)) {
toBeDispatched[id] = gesture;
}
} else {
toBeDispatched[id] = gesture;
}
});
Object.keys(toBeDispatched).forEach((index) => {
const gesture = toBeDispatched[index];
dispatcher(gesture.binding, gesture.data, gesture.events);
});
}
let endCount = 0;
state.inputs.forEach((input) => {
if (input.getCurrentEventType() === 'end') {
endCount++;
}
});
if (endCount === state.inputs.length) {
state.resetInputs();
}
}
export default arbiter;
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
src/core/classes/Binder.js
|
JavaScript
|
/**
* @file Binder.js
*/
/**
* A chainable object that contains a single element to be bound upon.
* Called from ZingTouch.bind(), and is used to chain over gesture callbacks.
* @class
*/
class Binder {
/**
* Constructor function for the Binder class.
* @param {Element} element - The element to bind gestures to.
* @param {Boolean} bindOnce - Option to bind once and only emit
* the event once.
* @param {Object} state - The state of the Region that is being bound to.
* @return {Object} - Returns 'this' to be chained over and over again.
*/
constructor(element, bindOnce, state) {
/**
* The element to bind gestures to.
* @type {Element}
*/
this.element = element;
Object.keys(state.registeredGestures).forEach((key) => {
this[key] = (handler, capture) => {
state.addBinding(this.element, key, handler, capture, bindOnce);
return this;
};
});
}
}
export default Binder;
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
src/core/classes/Binding.js
|
JavaScript
|
/**
* @file Binding.js
*/
/**
* Responsible for creating a binding between an element and a gesture.
* @class Binding
*/
class Binding {
/**
* Constructor function for the Binding class.
* @param {Element} element - The element to associate the gesture to.
* @param {Gesture} gesture - A instance of the Gesture type.
* @param {Function} handler - The function handler to execute when a
* gesture is recognized
* on the associated element.
* @param {Boolean} [capture=false] - A boolean signifying if the event is
* to be emitted during
* the capture or bubble phase.
* @param {Boolean} [bindOnce=false] - A boolean flag
* used for the bindOnce syntax.
*/
constructor(element, gesture, handler, capture, bindOnce) {
/**
* The element to associate the gesture to.
* @type {Element}
*/
this.element = element;
/**
* A instance of the Gesture type.
* @type {Gesture}
*/
this.gesture = gesture;
/**
* The function handler to execute when a gesture is
* recognized on the associated element.
* @type {Function}
*/
this.handler = handler;
/**
* A boolean signifying if the event is to be
* emitted during the capture or bubble phase.
* @type {Boolean}
*/
this.capture = (typeof capture !== 'undefined') ? capture : false;
/**
* A boolean flag used for the bindOnce syntax.
* @type {Boolean}
*/
this.bindOnce = (typeof bindOnce !== 'undefined') ? bindOnce : false;
}
}
export default Binding;
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
src/core/classes/Input.js
|
JavaScript
|
/**
* @file Input.js
*/
import ZingEvent from './ZingEvent.js';
/**
* Tracks a single input and contains information about the
* current, previous, and initial events.
* Contains the progress of each Input and it's associated gestures.
* @class Input
*/
class Input {
/**
* Constructor function for the Input class.
* @param {Event} event - The Event object from the window
* @param {Number} [identifier=0] - The identifier for each input event
* (taken from event.changedTouches)
*/
constructor(event, identifier) {
let currentEvent = new ZingEvent(event, identifier);
/**
* Holds the initial event object. A touchstart/mousedown event.
* @type {ZingEvent}
*/
this.initial = currentEvent;
/**
* Holds the most current event for this Input, disregarding any other past,
* current, and future events that other Inputs participate in.
* e.g. This event ended in an 'end' event, but another Input is still
* participating in events -- this will not be updated in such cases.
* @type {ZingEvent}
*/
this.current = currentEvent;
/**
* Holds the previous event that took place.
* @type {ZingEvent}
*/
this.previous = currentEvent;
/**
* Refers to the event.touches index, or 0 if a simple mouse event occurred.
* @type {Number}
*/
this.identifier = (typeof identifier !== 'undefined') ? identifier : 0;
/**
* Stores internal state between events for
* each gesture based off of the gesture's id.
* @type {Object}
*/
this.progress = {};
}
/**
* Receives an input, updates the internal state of what the input has done.
* @param {Event} event - The event object to wrap with a ZingEvent.
* @param {Number} touchIdentifier - The index of inputs, from event.touches
*/
update(event, touchIdentifier) {
this.previous = this.current;
this.current = new ZingEvent(event, touchIdentifier);
}
/**
* Returns the progress of the specified gesture.
* @param {String} id - The identifier for each unique Gesture's progress.
* @return {Object} - The progress of the gesture.
* Creates an empty object if no progress has begun.
*/
getGestureProgress(id) {
if (!this.progress[id]) {
this.progress[id] = {};
}
return this.progress[id];
}
/**
* Returns the normalized current Event's type.
* @return {String} The current event's type ( start | move | end )
*/
getCurrentEventType() {
return this.current.type;
}
/**
* Resets a progress/state object of the specified gesture.
* @param {String} id - The identifier of the specified gesture
*/
resetProgress(id) {
this.progress[id] = {};
}
}
export default Input;
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
src/core/classes/Region.js
|
JavaScript
|
/**
* @file Region.js
*/
import Binder from './Binder.js';
import Gesture from './../../gestures/Gesture.js';
import arbiter from './../arbiter.js';
import State from './State.js';
/**
* Allows the user to specify a region to capture all events to feed ZingTouch
* into. This can be as narrow as the element itself, or as big as the document
* itself. The more specific an area, the better performant the overall
* application will perform. Contains API methods to bind/unbind specific
* elements to corresponding gestures. Also contains the ability to
* register/unregister new gestures.
* @class Region
*/
class Region {
/**
* Constructor function for the Region class.
* @param {Element} element - The element to capture all
* window events in that region to feed into ZingTouch.
* @param {boolean} [capture=false] - Whether the region listens for
* captures or bubbles.
* @param {boolean} [preventDefault=true] - Whether the default browser
* functionality should be disabled;
* @param {Number} id - The id of the region, assigned by the ZingTouch object
*/
constructor(element, capture, preventDefault, id) {
/**
* The identifier for the Region. This is assigned by the ZingTouch object
* and is used to hash gesture id for uniqueness.
* @type {Number}
*/
this.id = id;
/**
* The element being bound to.
* @type {Element}
*/
this.element = element;
/**
* Whether the region listens for captures or bubbles.
* @type {boolean}
*/
this.capture = (typeof capture !== 'undefined') ? capture : false;
/**
* Boolean to disable browser functionality such as scrolling and zooming
* over the region
* @type {boolean}
*/
this.preventDefault = (typeof preventDefault !== 'undefined') ?
preventDefault : true;
/**
* The internal state object for a Region.
* Keeps track of registered gestures, inputs, and events.
* @type {State}
*/
this.state = new State(id);
let eventNames = [];
if (window.PointerEvent && !window.TouchEvent) {
eventNames = [
'pointerdown',
'pointermove',
'pointerup',
];
} else {
eventNames = [
'mousedown',
'mousemove',
'mouseup',
'touchstart',
'touchmove',
'touchend',
];
}
// Bind detected browser events to the region element.
eventNames.forEach((name) => {
element.addEventListener(name, (e) => {
arbiter(e, this);
}, this.capture);
});
}
/**
* Bind an element to a registered/unregistered gesture with
* multiple function signatures.
* @example
* bind(element) - chainable
* @example
* bind(element, gesture, handler, [capture])
* @param {Element} element - The element object.
* @param {String|Object} [gesture] - Gesture key, or a Gesture object.
* @param {Function} [handler] - The function to execute when an event is
* emitted.
* @param {Boolean} [capture] - capture/bubble
* @param {Boolean} [bindOnce = false] - Option to bind once and
* only emit the event once.
* @return {Object} - a chainable object that has the same function as bind.
*/
bind(element, gesture, handler, capture, bindOnce) {
if (!element || (element && !element.tagName)) {
throw 'Bind must contain an element';
}
bindOnce = (typeof bindOnce !== 'undefined') ? bindOnce : false;
if (!gesture) {
return new Binder(element, bindOnce, this.state);
} else {
this.state.addBinding(element, gesture, handler, capture, bindOnce);
}
}
/**
* Bind an element and sets up actions to remove the binding once
* it has been emitted for the first time.
* 1. bind(element) - chainable
* 2. bind(element, gesture, handler, [capture])
* @param {Element} element - The element object.
* @param {String|Object} gesture - Gesture key, or a Gesture object.
* @param {Function} handler - The function to execute when an
* event is emitted.
* @param {Boolean} capture - capture/bubble
* @return {Object} - a chainable object that has the same function as bind.
*/
bindOnce(element, gesture, handler, capture) {
this.bind(element, gesture, handler, capture, true);
}
/**
* Unbinds an element from either the specified gesture
* or all if no element is specified.
* @param {Element} element -The element to remove.
* @param {String | Object} [gesture] - A String representing the gesture,
* or the actual object being used.
* @return {Array} - An array of Bindings that were unbound to the element;
*/
unbind(element, gesture) {
let bindings = this.state.retrieveBindingsByElement(element);
let unbound = [];
bindings.forEach((binding) => {
if (gesture) {
if (typeof gesture === 'string' &&
this.state.registeredGestures[gesture]) {
let registeredGesture = this.state.registeredGestures[gesture];
if (registeredGesture.id === binding.gesture.id) {
element.removeEventListener(
binding.gesture.getId(),
binding.handler, binding.capture);
unbound.push(binding);
}
}
} else {
element.removeEventListener(
binding.gesture.getId(),
binding.handler,
binding.capture);
unbound.push(binding);
}
});
return unbound;
}
/* unbind*/
/**
* Registers a new gesture with an assigned key
* @param {String} key - The key used to register an element to that gesture
* @param {Gesture} gesture - A gesture object
*/
register(key, gesture) {
if (typeof key !== 'string') {
throw new Error('Parameter key is an invalid string');
}
if (!gesture instanceof Gesture) {
throw new Error('Parameter gesture is an invalid Gesture object');
}
gesture.setType(key);
this.state.registerGesture(gesture, key);
}
/* register*/
/**
* Un-registers a gesture from the Region's state such that
* it is no longer emittable.
* Unbinds all events that were registered with the type.
* @param {String|Object} key - Gesture key that was used to
* register the object
* @return {Object} - The Gesture object that was unregistered
* or null if it could not be found.
*/
unregister(key) {
this.state.bindings.forEach((binding) => {
if (binding.gesture.getType() === key) {
binding.element.removeEventListener(binding.gesture.getId(),
binding.handler, binding.capture);
}
});
let registeredGesture = this.state.registeredGestures[key];
delete this.state.registeredGestures[key];
return registeredGesture;
}
}
export default Region;
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
src/core/classes/State.js
|
JavaScript
|
/**
* @file State.js
*/
import Gesture from './../../gestures/Gesture.js';
import Pan from './../../gestures/Pan.js';
import Distance from './../../gestures/Distance.js';
import Rotate from './../../gestures/Rotate.js';
import Swipe from './../../gestures/Swipe.js';
import Tap from './../../gestures/Tap.js';
import Binding from './Binding.js';
import Input from './Input.js';
import util from './../util.js';
const DEFAULT_MOUSE_ID = 0;
/**
* Creates an object related to a Region's state,
* and contains helper methods to update and clean up different states.
*/
class State {
/**
* Constructor for the State class.
* @param {String} regionId - The id the region this state is bound to.
*/
constructor(regionId) {
/**
* The id for the region this state is bound to.
* @type {String}
*/
this.regionId = regionId;
/**
* An array of current and recently inactive
* Input objects related to a gesture.
* @type {Input}
*/
this.inputs = [];
/**
* An array of Binding objects; The list of relations between elements,
* their gestures, and the handlers.
* @type {Binding}
*/
this.bindings = [];
/**
* The number of gestures that have been registered with this state
* @type {Number}
*/
this.numGestures = 0;
/**
* A key/value map all the registered gestures for the listener.
* Note: Can only have one gesture registered to one key.
* @type {Object}
*/
this.registeredGestures = {};
this.registerGesture(new Pan(), 'pan');
this.registerGesture(new Rotate(), 'rotate');
this.registerGesture(new Distance(), 'distance');
this.registerGesture(new Swipe(), 'swipe');
this.registerGesture(new Tap(), 'tap');
}
/**
* Creates a new binding with the given element and gesture object.
* If the gesture object provided is unregistered, it's reference
* will be saved in as a binding to be later referenced.
* @param {Element} element - The element the gesture is bound to.
* @param {String|Object} gesture - Either a name of a registered gesture,
* or an unregistered Gesture object.
* @param {Function} handler - The function handler to be called
* when the event is emitted. Used to bind/unbind.
* @param {Boolean} capture - Whether the gesture is to be
* detected in the capture of bubble phase. Used to bind/unbind.
* @param {Boolean} bindOnce - Option to bind once and
* only emit the event once.
*/
addBinding(element, gesture, handler, capture, bindOnce) {
let boundGesture;
// Error type checking.
if (element && typeof element.tagName === 'undefined') {
throw new Error('Parameter element is an invalid object.');
}
if (typeof handler !== 'function') {
throw new Error('Parameter handler is invalid.');
}
if (typeof gesture === 'string' &&
Object.keys(this.registeredGestures).indexOf(gesture) === -1) {
throw new Error('Parameter ' + gesture + ' is not a registered gesture');
} else if (typeof gesture === 'object' && !(gesture instanceof Gesture)) {
throw new Error('Parameter for the gesture is not of a Gesture type');
}
if (typeof gesture === 'string') {
boundGesture = this.registeredGestures[gesture];
} else {
boundGesture = gesture;
if (boundGesture.id === '') {
this.assignGestureId(boundGesture);
}
}
this.bindings.push(new Binding(element, boundGesture,
handler, capture, bindOnce));
element.addEventListener(boundGesture.getId(), handler, capture);
}
/**
* Retrieves the Binding by which an element is associated to.
* @param {Element} element - The element to find bindings to.
* @return {Array} - An array of Bindings to which that element is bound
*/
retrieveBindingsByElement(element) {
return this.bindings.filter( b => b.element === element );
}
/**
* Retrieves all bindings based upon the initial X/Y position of the inputs.
* e.g. if gesture started on the correct target element,
* but diverted away into the correct region, this would still be valid.
* @return {Array} - An array of Bindings to which that element is bound
*/
retrieveBindingsByInitialPos() {
return this.bindings.filter( binding => {
return this.inputs.some( input => {
return util.isInside(input.initial.x, input.initial.y, binding.element);
});
});
}
/**
* Updates the inputs with new information based upon a new event being fired.
* @param {Event} event - The event being captured.
* @param {Element} regionElement - The element where
* this current Region is bound to.
* @return {boolean} - returns true for a successful update,
* false if the event is invalid.
*/
updateInputs(event, regionElement) {
let eventType = (event.touches) ?
'TouchEvent' : ((event.pointerType) ? 'PointerEvent' : 'MouseEvent');
switch (eventType) {
case 'TouchEvent':
Array.from(event.changedTouches).forEach( touch => {
update(event, this, touch.identifier, regionElement);
});
break;
case 'PointerEvent':
update(event, this, event.pointerId, regionElement);
break;
case 'MouseEvent':
default:
update(event, this, DEFAULT_MOUSE_ID, regionElement);
break;
}
return true;
function update(event, state, identifier, regionElement) {
const eventType = util.normalizeEvent[ event.type ];
const input = findInputById(state.inputs, identifier);
// A starting input was not cleaned up properly and still exists.
if (eventType === 'start' && input) {
state.resetInputs();
return;
}
// An input has moved outside the region.
if (eventType !== 'start' &&
input &&
!util.isInside(input.current.x, input.current.y, regionElement)) {
state.resetInputs();
return;
}
if (eventType !== 'start' && !input) {
state.resetInputs();
return;
}
if (eventType === 'start') {
state.inputs.push(new Input(event, identifier));
} else {
input.update(event, identifier);
}
}
}
/**
* Removes all inputs from the state, allowing for a new gesture.
*/
resetInputs() {
this.inputs = [];
}
/**
* Counts the number of active inputs at any given time.
* @return {Number} - The number of active inputs.
*/
numActiveInputs() {
const endType = this.inputs.filter((input) => {
return input.current.type !== 'end';
});
return endType.length;
}
/**
* Register the gesture to the current region.
* @param {Object} gesture - The gesture to register
* @param {String} key - The key to define the new gesture as.
*/
registerGesture(gesture, key) {
this.assignGestureId(gesture);
this.registeredGestures[key] = gesture;
}
/**
* Tracks the gesture to this state object to become uniquely identifiable.
* Useful for nested Regions.
* @param {Gesture} gesture - The gesture to track
*/
assignGestureId(gesture) {
gesture.setId(this.regionId + '-' + this.numGestures++);
}
}
/**
* Searches through each input, comparing the browser's identifier key
* for touches, to the stored one in each input
* @param {Array} inputs - The array of inputs in state.
* @param {String} identifier - The identifier the browser has assigned.
* @return {Input} - The input object with the corresponding identifier,
* null if it did not find any.
*/
function findInputById(inputs, identifier) {
return inputs.find( i => i.identifier === identifier );
}
export default State;
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
src/core/classes/ZingEvent.js
|
JavaScript
|
/**
* @file ZingEvent.js
* Contains logic for ZingEvents
*/
import util from '../util.js';
const INITIAL_COORDINATE = 0;
/**
* An event wrapper that normalizes events across browsers and input devices
* @class ZingEvent
*/
class ZingEvent {
/**
* @constructor
* @param {Event} event - The event object being wrapped.
* @param {Array} event.touches - The number of touches on
* a screen (mobile only).
* @param {Object} event.changedTouches - The TouchList representing
* points that participated in the event.
* @param {Number} touchIdentifier - The index of touch if applicable
*/
constructor(event, touchIdentifier) {
/**
* The original event object.
* @type {Event}
*/
this.originalEvent = event;
/**
* The type of event or null if it is an event not predetermined.
* @see util.normalizeEvent
* @type {String | null}
*/
this.type = util.normalizeEvent[ event.type ];
/**
* The X coordinate for the event, based off of the client.
* @type {number}
*/
this.x = INITIAL_COORDINATE;
/**
* The Y coordinate for the event, based off of the client.
* @type {number}
*/
this.y = INITIAL_COORDINATE;
let eventObj;
if (event.touches && event.changedTouches) {
eventObj = Array.from(event.changedTouches).find( t => {
return t.identifier === touchIdentifier;
});
} else {
eventObj = event;
}
this.x = this.clientX = eventObj.clientX;
this.y = this.clientY = eventObj.clientY;
this.pageX = eventObj.pageX;
this.pageY = eventObj.pageY;
this.screenX = eventObj.screenX;
this.screenY = eventObj.screenY;
}
}
export default ZingEvent;
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
src/core/dispatcher.js
|
JavaScript
|
/**
* @file dispatcher.js
* Contains logic for the dispatcher
*/
/**
* Emits data at the target element if available, and bubbles up from
* the target to the parent until the document has been reached.
* Called from the arbiter.
* @param {Binding} binding - An object of type Binding
* @param {Object} data - The metadata computed by the gesture being emitted.
* @param {Array} events - An array of ZingEvents
* corresponding to the inputs on the screen.
*/
function dispatcher(binding, data, events) {
data.events = events;
const newEvent = new CustomEvent(binding.gesture.getId(), {
detail: data,
bubbles: true,
cancelable: true,
});
emitEvent(binding.element, newEvent, binding);
}
/**
* Emits the new event. Unbinds the event if the event was registered
* at bindOnce.
* @param {Element} target - Element object to emit the event to.
* @param {Event} event - The CustomEvent to emit.
* @param {Binding} binding - An object of type Binding
*/
function emitEvent(target, event, binding) {
target.dispatchEvent(event);
if (binding.bindOnce) {
ZingTouch.unbind(binding.element, binding.gesture.getType());
}
}
export default dispatcher;
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
src/core/interpreter.js
|
JavaScript
|
/**
* @file interpreter.js
* Contains logic for the interpreter
*/
import util from './util.js';
/**
* Receives an event and an array of Bindings (element -> gesture handler)
* to determine what event will be emitted. Called from the arbiter.
* @param {Array} bindings - An array containing Binding objects
* that associate the element to an event handler.
* @param {Object} event - The event emitted from the window.
* @param {Object} state - The state object of the current listener.
* @return {Object | null} - Returns an object containing a binding and
* metadata, or null if a gesture will not be emitted.
*/
function interpreter(bindings, event, state) {
const evType = util.normalizeEvent[ event.type ];
const events = state.inputs.map( input => input.current );
const candidates = bindings.reduce( (accumulator, binding) => {
const data = binding.gesture[evType](state.inputs, state, binding.element);
if (data) accumulator.push({ binding, data, events });
return accumulator;
}, []);
return candidates;
}
export default interpreter;
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
src/core/main.js
|
JavaScript
|
/**
* @file main.js
* Main file to setup event listeners on the document,
* and to expose the ZingTouch object
*/
import ZingTouch from './../ZingTouch.js';
if (typeof window !== 'undefined') {
window.ZingTouch = ZingTouch;
}
export default ZingTouch;
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
src/core/util.js
|
JavaScript
|
/**
* @file util.js
* Various accessor and mutator functions to handle state and validation.
*/
/**
* Contains generic helper functions
* @type {Object}
* @namespace util
*/
let util = {
/**
* Normalizes window events to be either of type start, move, or end.
* @param {String} type - The event type emitted by the browser
* @return {null|String} - The normalized event, or null if it is an
* event not predetermined.
*/
normalizeEvent: Object.freeze({
mousedown: 'start',
touchstart: 'start',
pointerdown: 'start',
mousemove: 'move',
touchmove: 'move',
pointermove: 'move',
mouseup: 'end',
touchend: 'end',
pointerup: 'end',
}),
/* normalizeEvent*/
/**
* Determines if the current and previous coordinates are within or
* up to a certain tolerance.
* @param {Number} currentX - Current event's x coordinate
* @param {Number} currentY - Current event's y coordinate
* @param {Number} previousX - Previous event's x coordinate
* @param {Number} previousY - Previous event's y coordinate
* @param {Number} tolerance - The tolerance in pixel value.
* @return {boolean} - true if the current coordinates are
* within the tolerance, false otherwise
*/
isWithin(currentX, currentY, previousX, previousY, tolerance) {
return ((Math.abs(currentY - previousY) <= tolerance) &&
(Math.abs(currentX - previousX) <= tolerance));
},
/* isWithin*/
/**
* Calculates the distance between two points.
* @param {Number} x0
* @param {Number} x1
* @param {Number} y0
* @param {Number} y1
* @return {number} The numerical value between two points
*/
distanceBetweenTwoPoints(x0, x1, y0, y1) {
return Math.hypot(x1 - x0, y1 - y0);
},
/**
* Calculates the midpoint coordinates between two points.
* @param {Number} x0
* @param {Number} x1
* @param {Number} y0
* @param {Number} y1
* @return {Object} The coordinates of the midpoint.
*/
getMidpoint(x0, x1, y0, y1) {
return {
x: ((x0 + x1) / 2),
y: ((y0 + y1) / 2),
};
},
/**
* Calculates the angle between the projection and an origin point.
* | (projectionX,projectionY)
* | /°
* | /
* | /
* | / θ
* | /__________
* ° (originX, originY)
* @param {number} originX
* @param {number} originY
* @param {number} projectionX
* @param {number} projectionY
* @return {number} - Radians along the unit circle where the projection lies
*/
getAngle(originX, originY, projectionX, projectionY) {
return Math.atan2(projectionY - originY, projectionX - originX);
},
/**
* Calculates the angular distance in radians between two angles along the
* unit circle
* @param {number} start - The starting point in radians
* @param {number} end - The ending point in radians
* @return {number} The number of radians between the starting point and
* ending point.
*/
getAngularDistance(start, end) {
return end - start;
},
/**
* Calculates the velocity of pixel/milliseconds between two points
* @param {Number} startX
* @param {Number} startY
* @param {Number} startTime
* @param {Number} endX
* @param {Number} endY
* @param {Number} endTime
* @return {Number} velocity of px/time
*/
getVelocity(startX, startY, startTime, endX, endY, endTime) {
let distance = this.distanceBetweenTwoPoints(startX, endX, startY, endY);
return (distance / (endTime - startTime));
},
/**
* Returns the farthest right input
* @param {Array} inputs
* @return {Object}
*/
getRightMostInput(inputs) {
let rightMost = null;
let distance = Number.MIN_VALUE;
inputs.forEach((input) => {
if (input.initial.x > distance) {
rightMost = input;
}
});
return rightMost;
},
/**
* Determines is the value is an integer and not a floating point
* @param {Mixed} value
* @return {boolean}
*/
isInteger(value) {
return (typeof value === 'number') && (value % 1 === 0);
},
/**
* Determines if the x,y position of the input is within then target.
* @param {Number} x -clientX
* @param {Number} y -clientY
* @param {Element} target
* @return {Boolean}
*/
isInside(x, y, target) {
const rect = target.getBoundingClientRect();
return ((x > rect.left && x < rect.left + rect.width) &&
(y > rect.top && y < rect.top + rect.height));
},
/**
* Polyfill for event.propagationPath
* @param {Event} event
* @return {Array}
*/
getPropagationPath(event) {
if (event.path) {
return event.path;
} else {
let path = [];
let node = event.target;
while (node != document) {
path.push(node);
node = node.parentNode;
}
return path;
}
},
/**
* Retrieve the index inside the path array
* @param {Array} path
* @param {Element} element
* @return {Element}
*/
getPathIndex(path, element) {
let index = path.length;
path.forEach((obj, i) => {
if (obj === element) {
index = i;
}
});
return index;
},
setMSPreventDefault(element) {
element.style['-ms-content-zooming'] = 'none';
element.style['touch-action'] = 'none';
},
removeMSPreventDefault(element) {
element.style['-ms-content-zooming'] = '';
element.style['touch-action'] = '';
},
preventDefault(event) {
if (event.preventDefault) {
event.preventDefault();
} else {
event.returnValue = false;
}
}
};
export default util;
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
src/gestures/Distance.js
|
JavaScript
|
/**
* @file Distance.js
* Contains the abstract Distance class
*/
import Gesture from './Gesture.js';
import util from './../core/util.js';
const DEFAULT_INPUTS = 2;
const DEFAULT_MIN_THRESHOLD = 1;
/**
* A Distance is defined as two inputs moving either together or apart.
* @class Distance
*/
class Distance extends Gesture {
/**
* Constructor function for the Distance class.
* @param {Object} options
* @param {Object} [options] - The options object.
* @param {Number} [options.threshold=1] - The minimum number of
* pixels the input has to move to trigger this gesture.
* @param {Function} [options.onStart] - The on start callback
* @param {Function} [options.onMove] - The on move callback
*/
constructor(options) {
super();
/**
* The type of the Gesture.
* @type {String}
*/
this.type = 'distance';
/**
* The minimum amount in pixels the inputs must move until it is fired.
* @type {Number}
*/
this.threshold = (options && options.threshold) ?
options.threshold : DEFAULT_MIN_THRESHOLD;
/**
* The on start callback
*/
if (options && options.onStart && typeof options.onStart === 'function') {
this.onStart = options.onStart
}
/**
* The on move callback
*/
if (options && options.onMove && typeof options.onMove === 'function') {
this.onMove = options.onMove
}
}
/**
* Event hook for the start of a gesture. Initialized the lastEmitted
* gesture and stores it in the first input for reference events.
* @param {Array} inputs
* @param {Object} state - The state object of the current region.
* @param {Element} element - The element associated to the binding.
*/
start(inputs, state, element) {
if(!this.isValid(inputs, state, element)) {
return null;
}
if (inputs.length === DEFAULT_INPUTS) {
// Store the progress in the first input.
const progress = inputs[0].getGestureProgress(this.getId());
progress.lastEmittedDistance = util.distanceBetweenTwoPoints(
inputs[0].current.x,
inputs[1].current.x,
inputs[0].current.y,
inputs[1].current.y);
}
if(this.onStart) {
this.onStart(inputs, state, element);
}
}
/**
* Event hook for the move of a gesture.
* Determines if the two points are moved in the expected direction relative
* to the current distance and the last distance.
* @param {Array} inputs - The array of Inputs on the screen.
* @param {Object} state - The state object of the current region.
* @param {Element} element - The element associated to the binding.
* @return {Object | null} - Returns the distance in pixels between two inputs
*/
move(inputs, state, element) {
if (state.numActiveInputs() === DEFAULT_INPUTS) {
const currentDistance = util.distanceBetweenTwoPoints(
inputs[0].current.x,
inputs[1].current.x,
inputs[0].current.y,
inputs[1].current.y);
const centerPoint = util.getMidpoint(
inputs[0].current.x,
inputs[1].current.x,
inputs[0].current.y,
inputs[1].current.y);
// Progress is stored in the first input.
const progress = inputs[0].getGestureProgress(this.getId());
const change = currentDistance - progress.lastEmittedDistance;
if (Math.abs(change) >= this.threshold) {
progress.lastEmittedDistance = currentDistance;
const movement = {
distance: currentDistance,
center: centerPoint,
change,
};
if(this.onMove) {
this.onMove(inputs, state, element, movement);
}
return movement;
}
}
return null;
}
}
export default Distance;
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
src/gestures/Gesture.js
|
JavaScript
|
/**
* @file Gesture.js
* Contains the Gesture class
*/
import util from './../core/util.js';
/**
* The Gesture class that all gestures inherit from.
*/
class Gesture {
/**
* Constructor function for the Gesture class.
* @class Gesture
*/
constructor() {
/**
* The generic string type of gesture ('expand'|'distance'|
* 'rotate'|'swipe'|'tap').
* @type {String}
*/
this.type = null;
/**
* The unique identifier for each gesture determined at bind time by the
* state object. This allows for distinctions across instance variables of
* Gestures that are created on the fly (e.g. Tap-1, Tap-2, etc).
* @type {String|null}
*/
this.id = null;
}
/**
* Set the type of the gesture to be called during an event
* @param {String} type - The unique identifier of the gesture being created.
*/
setType(type) {
this.type = type;
}
/**
* getType() - Returns the generic type of the gesture
* @return {String} - The type of gesture
*/
getType() {
return this.type;
}
/**
* Set the id of the gesture to be called during an event
* @param {String} id - The unique identifier of the gesture being created.
*/
setId(id) {
this.id = id;
}
/**
* Return the id of the event. If the id does not exist, return the type.
* @return {String}
*/
getId() {
return (this.id !== null) ? this.id : this.type;
}
/**
* Updates internal properties with new ones, only if the properties exist.
* @param {Object} object
*/
update(object) {
Object.keys(object).forEach( key => {
this[key] = object[key];
});
}
/**
* start() - Event hook for the start of a gesture
* @param {Array} inputs - The array of Inputs on the screen
* @param {Object} state - The state object of the current region.
* @param {Element} element - The element associated to the binding.
* @return {null|Object} - Default of null
*/
start(inputs, state, element) {
return null;
}
/**
* move() - Event hook for the move of a gesture
* @param {Array} inputs - The array of Inputs on the screen
* @param {Object} state - The state object of the current region.
* @param {Element} element - The element associated to the binding.
* @return {null|Object} - Default of null
*/
move(inputs, state, element) {
return null;
}
/**
* end() - Event hook for the move of a gesture
* @param {Array} inputs - The array of Inputs on the screen
* @return {null|Object} - Default of null
*/
end(inputs) {
return null;
}
/**
* isValid() - Pre-checks to ensure the invariants of a gesture are satisfied.
* @param {Array} inputs - The array of Inputs on the screen
* @param {Object} state - The state object of the current region.
* @param {Element} element - The element associated to the binding.
* @return {boolean} - If the gesture is valid
*/
isValid(inputs, state, element) {
return inputs.every( input => {
return util.isInside(input.initial.x, input.initial.y, element);
});
}
}
export default Gesture;
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
src/gestures/Pan.js
|
JavaScript
|
/**
* @file Pan.js
* Contains the Pan class
*/
import Gesture from './Gesture.js';
import util from './../core/util.js';
const DEFAULT_INPUTS = 1;
const DEFAULT_MIN_THRESHOLD = 1;
/**
* A Pan is defined as a normal movement in any direction on a screen.
* Pan gestures do not track start events and can interact with distance gestures
* @class Pan
*/
class Pan extends Gesture {
/**
* Constructor function for the Pan class.
* @param {Object} [options] - The options object.
* @param {Number} [options.numInputs=1] - Number of inputs for the
* Pan gesture.
* @param {Number} [options.threshold=1] - The minimum number of
* pixels the input has to move to trigger this gesture.
* @param {Function} [options.onStart] - The on start callback
* @param {Function} [options.onMove] - The on move callback
* @param {Function} [options.onEnd] - The on end callback
*/
constructor(options) {
super();
/**
* The type of the Gesture.
* @type {String}
*/
this.type = 'pan';
/**
* The number of inputs to trigger a Pan can be variable,
* and the maximum number being a factor of the browser.
* @type {Number}
*/
this.numInputs = (options && options.numInputs) ?
options.numInputs : DEFAULT_INPUTS;
/**
* The minimum amount in pixels the pan must move until it is fired.
* @type {Number}
*/
this.threshold = (options && options.threshold) ?
options.threshold : DEFAULT_MIN_THRESHOLD;
/**
* The on start callback
*/
if (options && options.onStart && typeof options.onStart === 'function') {
this.onStart = options.onStart
}
/**
* The on move callback
*/
if (options && options.onMove && typeof options.onMove === 'function') {
this.onMove = options.onMove
}
/**
* The on end callback
*/
if (options && options.onEnd && typeof options.onEnd === 'function') {
this.onEnd = options.onEnd
}
}
/**
* Event hook for the start of a gesture. Marks each input as active,
* so it can invalidate any end events.
* @param {Array} inputs
*/
start(inputs) {
inputs.forEach((input) => {
const progress = input.getGestureProgress(this.getId());
progress.active = true;
progress.lastEmitted = {
x: input.current.x,
y: input.current.y,
};
});
if(this.onStart) {
this.onStart(inputs);
}
}
/**
* move() - Event hook for the move of a gesture.
* Fired whenever the input length is met, and keeps a boolean flag that
* the gesture has fired at least once.
* @param {Array} inputs - The array of Inputs on the screen
* @param {Object} state - The state object of the current region.
* @param {Element} element - The element associated to the binding.
* @return {Object} - Returns the distance in pixels between the two inputs.
*/
move(inputs, state, element) {
if (this.numInputs !== inputs.length) return null;
const output = {
data: [],
};
inputs.forEach( (input, index) => {
const progress = input.getGestureProgress(this.getId());
const distanceFromLastEmit = util.distanceBetweenTwoPoints(
progress.lastEmitted.x,
input.current.x,
progress.lastEmitted.y,
input.current.y
);
const reachedThreshold = distanceFromLastEmit >= this.threshold;
if (progress.active && reachedThreshold) {
output.data[index] = packData( input, progress );
progress.lastEmitted.x = input.current.x;
progress.lastEmitted.y = input.current.y;
}
});
if(this.onMove) {
this.onMove(inputs, state, element, output);
}
return output;
function packData( input, progress ) {
const distanceFromOrigin = util.distanceBetweenTwoPoints(
input.initial.x,
input.current.x,
input.initial.y,
input.current.y
);
const currentDistance = util.distanceBetweenTwoPoints(
progress.lastEmitted.x,
input.current.x,
progress.lastEmitted.y,
input.current.y
);
const directionFromOrigin = util.getAngle(
input.initial.x,
input.initial.y,
input.current.x,
input.current.y
);
const currentDirection = util.getAngle(
progress.lastEmitted.x,
progress.lastEmitted.y,
input.current.x,
input.current.y
);
const change = {
x: input.current.x - progress.lastEmitted.x,
y: input.current.y - progress.lastEmitted.y,
};
const currentDegree = currentDirection * 180 / Math.PI
const degreeFromOrigin = directionFromOrigin * 180 / Math.PI
return {
distanceFromOrigin,
currentDistance,
directionFromOrigin,
currentDirection,
change,
degreeFromOrigin,
currentDegree
};
}
}
/* move*/
/**
* end() - Event hook for the end of a gesture. If the gesture has at least
* fired once, then it ends on the first end event such that any remaining
* inputs will not trigger the event until all inputs have reached the
* touchend event. Any touchend->touchstart events that occur before all
* inputs are fully off the screen should not fire.
* @param {Array} inputs - The array of Inputs on the screen
* @return {null} - null if the gesture is not to be emitted,
* Object with information otherwise.
*/
end(inputs) {
inputs.forEach((input) => {
const progress = input.getGestureProgress(this.getId());
progress.active = false;
});
if(this.onEnd) {
this.onEnd(inputs);
}
return null;
}
/* end*/
}
export default Pan;
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
src/gestures/Rotate.js
|
JavaScript
|
/**
* @file Rotate.js
* Contains the Rotate class
*/
import Gesture from './Gesture.js';
import util from './../core/util.js';
const DEFAULT_INPUTS = 2;
/**
* A Rotate is defined as two inputs moving about a circle,
* maintaining a relatively equal radius.
* @class Rotate
*/
class Rotate extends Gesture {
/**
* Constructor function for the Rotate class.
*/
constructor(options = {}) {
super();
/**
* The type of the Gesture.
* @type {String}
*/
this.type = 'rotate';
/**
* The number of touches required to emit Rotate events.
* @type {Number}
*/
this.numInputs = options.numInputs || DEFAULT_INPUTS;
/**
* The on move callback
*/
if (options && options.onMove && typeof options.onMove === 'function') {
this.onMove = options.onMove
}
}
/**
* move() - Event hook for the move of a gesture. Obtains the midpoint of two
* the two inputs and calculates the projection of the right most input along
* a unit circle to obtain an angle. This angle is compared to the previously
* calculated angle to output the change of distance, and is compared to the
* initial angle to output the distance from the initial angle to the current
* angle.
* @param {Array} inputs - The array of Inputs on the screen
* @param {Object} state - The state object of the current listener.
* @param {Element} element - The element associated to the binding.
* @return {null} - null if this event did not occur
* @return {Object} obj.angle - The current angle along the unit circle
* @return {Object} obj.distanceFromOrigin - The angular distance travelled
* from the initial right most point.
* @return {Object} obj.distanceFromLast - The change of angle between the
* last position and the current position.
*/
move(inputs, state, element) {
const numActiveInputs = state.numActiveInputs();
if (this.numInputs !== numActiveInputs) return null;
let currentPivot, initialPivot;
let input;
if (numActiveInputs === 1) {
const bRect = element.getBoundingClientRect();
currentPivot = {
x: bRect.left + bRect.width / 2,
y: bRect.top + bRect.height / 2,
};
initialPivot = currentPivot;
input = inputs[0];
} else {
currentPivot = util.getMidpoint(
inputs[0].current.x,
inputs[1].current.x,
inputs[0].current.y,
inputs[1].current.y);
input = util.getRightMostInput(inputs);
}
// Translate the current pivot point.
const currentAngle = util.getAngle(
currentPivot.x,
currentPivot.y,
input.current.x,
input.current.y);
const progress = input.getGestureProgress(this.getId());
if (!progress.initialAngle) {
progress.initialAngle = progress.previousAngle = currentAngle;
progress.distance = progress.change = 0;
} else {
progress.change = util.getAngularDistance(
progress.previousAngle,
currentAngle);
progress.distance = progress.distance + progress.change;
}
progress.previousAngle = currentAngle;
const rotate = {
angle: currentAngle,
distanceFromOrigin: progress.distance,
distanceFromLast: progress.change,
};
if(this.onMove) {
this.onMove(inputs, state, element, rotate);
}
return rotate;
}
/* move*/
}
export default Rotate;
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
src/gestures/Swipe.js
|
JavaScript
|
/**
* @file Swipe.js
* Contains the Swipe class
*/
import Gesture from './Gesture.js';
import util from './../core/util.js';
const DEFAULT_INPUTS = 1;
const DEFAULT_MAX_REST_TIME = 100;
const DEFAULT_ESCAPE_VELOCITY = 0.2;
const DEFAULT_TIME_DISTORTION = 100;
const DEFAULT_MAX_PROGRESS_STACK = 10;
/**
* A swipe is defined as input(s) moving in the same direction in an relatively
* increasing velocity and leaving the screen at some point before it drops
* below it's escape velocity.
* @class Swipe
*/
class Swipe extends Gesture {
/**
* Constructor function for the Swipe class.
* @param {Object} [options] - The options object.
* @param {Number} [options.numInputs] - The number of inputs to trigger a
* Swipe can be variable, and the maximum number being a factor of the browser
* move and current move events.
* @param {Number} [options.maxRestTime] - The maximum resting time a point
* has between it's last
* @param {Number} [options.escapeVelocity] - The minimum velocity the input
* has to be at to emit a swipe.
* @param {Number} [options.timeDistortion] - (EXPERIMENTAL) A value of time
* in milliseconds to distort between events.
* @param {Number} [options.maxProgressStack] - (EXPERIMENTAL)The maximum
* amount of move events to keep
* track of for a swipe.
*/
constructor(options) {
super();
/**
* The type of the Gesture
* @type {String}
*/
this.type = 'swipe';
/**
* The number of inputs to trigger a Swipe can be variable,
* and the maximum number being a factor of the browser.
* @type {Number}
*/
this.numInputs = (options && options.numInputs) ?
options.numInputs : DEFAULT_INPUTS;
/**
* The maximum resting time a point has between it's last move and
* current move events.
* @type {Number}
*/
this.maxRestTime = (options && options.maxRestTime) ?
options.maxRestTime : DEFAULT_MAX_REST_TIME;
/**
* The minimum velocity the input has to be at to emit a swipe.
* This is useful for determining the difference between
* a swipe and a pan gesture.
* @type {number}
*/
this.escapeVelocity = (options && options.escapeVelocity) ?
options.escapeVelocity : DEFAULT_ESCAPE_VELOCITY;
/**
* (EXPERIMENTAL) A value of time in milliseconds to distort between events.
* Browsers do not accurately measure time with the Date constructor in
* milliseconds, so consecutive events sometimes display the same timestamp
* but different x/y coordinates. This will distort a previous time
* in such cases by the timeDistortion's value.
* @type {number}
*/
this.timeDistortion = (options && options.timeDistortion) ?
options.timeDistortion : DEFAULT_TIME_DISTORTION;
/**
* (EXPERIMENTAL) The maximum amount of move events to keep track of for a
* swipe. This helps give a more accurate estimate of the user's velocity.
* @type {number}
*/
this.maxProgressStack = (options && options.maxProgressStack) ?
options.maxProgressStack : DEFAULT_MAX_PROGRESS_STACK;
/**
* The on move callback
*/
if (options && options.onMove && typeof options.onMove === 'function') {
this.onMove = options.onMove
}
/**
* The on end callback
*/
if (options && options.onEnd && typeof options.onEnd === 'function') {
this.onEnd = options.onEnd
}
}
/**
* Event hook for the move of a gesture. Captures an input's x/y coordinates
* and the time of it's event on a stack.
* @param {Array} inputs - The array of Inputs on the screen.
* @param {Object} state - The state object of the current region.
* @param {Element} element - The element associated to the binding.
* @return {null} - Swipe does not emit from a move.
*/
move(inputs, state, element) {
if (this.numInputs === inputs.length) {
for (let i = 0; i < inputs.length; i++) {
let progress = inputs[i].getGestureProgress(this.getId());
if (!progress.moves) {
progress.moves = [];
}
progress.moves.push({
time: new Date().getTime(),
x: inputs[i].current.x,
y: inputs[i].current.y,
});
if (progress.length > this.maxProgressStack) {
progress.moves.shift();
}
}
}
if(this.onMove) {
this.onMove(inputs, state, element);
}
return null;
}
/* move*/
/**
* Determines if the input's history validates a swipe motion.
* Determines if it did not come to a complete stop (maxRestTime), and if it
* had enough of a velocity to be considered (ESCAPE_VELOCITY).
* @param {Array} inputs - The array of Inputs on the screen
* @return {null|Object} - null if the gesture is not to be emitted,
* Object with information otherwise.
*/
end(inputs) {
if (this.numInputs === inputs.length) {
let output = {
data: [],
};
for (let i = 0; i < inputs.length; i++) {
// Determine if all input events are on the 'end' event.
if (inputs[i].current.type !== 'end') {
return;
}
let progress = inputs[i].getGestureProgress(this.getId());
if (progress.moves && progress.moves.length > 2) {
// CHECK : Return if the input has not moved in maxRestTime ms.
let currentMove = progress.moves.pop();
if ((new Date().getTime()) - currentMove.time > this.maxRestTime) {
return null;
}
let lastMove;
let index = progress.moves.length - 1;
/* Date is unreliable, so we retrieve the last move event where
the time is not the same. */
while (index !== -1) {
if (progress.moves[index].time !== currentMove.time) {
lastMove = progress.moves[index];
break;
}
index--;
}
/* If the date is REALLY unreliable, we apply a time distortion
to the last event.
*/
if (!lastMove) {
lastMove = progress.moves.pop();
lastMove.time += this.timeDistortion;
}
var velocity = util.getVelocity(lastMove.x, lastMove.y, lastMove.time,
currentMove.x, currentMove.y, currentMove.time);
output.data[i] = {
velocity: velocity,
distance: util.distanceBetweenTwoPoints(lastMove.x, currentMove.x, lastMove.y, currentMove.y),
duration: currentMove.time - lastMove.time,
currentDirection: util.getAngle(
lastMove.x,
lastMove.y,
currentMove.x,
currentMove.y),
};
}
}
for (var i = 0; i < output.data.length; i++) {
if (output.data[i].velocity < this.escapeVelocity) {
return null;
}
}
if (output.data.length > 0) {
if(this.onEnd) {
this.onEnd(inputs, output);
}
return output;
}
}
return null;
}
/* end*/
}
export default Swipe;
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
src/gestures/Tap.js
|
JavaScript
|
/**
* @file Tap.js
* Contains the Tap class
*/
import Gesture from './Gesture.js';
import util from './../core/util.js';
const DEFAULT_MIN_DELAY_MS = 0;
const DEFAULT_MAX_DELAY_MS = 300;
const DEFAULT_INPUTS = 1;
const DEFAULT_MOVE_PX_TOLERANCE = 10;
/**
* A Tap is defined as a touchstart to touchend event in quick succession.
* @class Tap
*/
class Tap extends Gesture {
/**
* Constructor function for the Tap class.
* @param {Object} [options] - The options object.
* @param {Number} [options.minDelay=0] - The minimum delay between a
* touchstart and touchend can be configured in milliseconds.
* @param {Number} [options.maxDelay=300] - The maximum delay between a
* touchstart and touchend can be configured in milliseconds.
* @param {Number} [options.numInputs=1] - Number of inputs for Tap gesture.
* @param {Number} [options.tolerance=10] - The tolerance in pixels
* a user can move.
* @param {Function} [options.onStart] - The on start callback
* @param {Function} [options.onMove] - The on move callback
* @param {Function} [options.onEnd] - The on end callback
*/
constructor(options) {
super();
/**
* The type of the Gesture.
* @type {String}
*/
this.type = 'tap';
/**
* The minimum amount between a touchstart and a touchend can be configured
* in milliseconds. The minimum delay starts to count down when the expected
* number of inputs are on the screen, and ends when ALL inputs are off the
* screen.
* @type {Number}
*/
this.minDelay = (options && options.minDelay) ?
options.minDelay : DEFAULT_MIN_DELAY_MS;
/**
* The maximum delay between a touchstart and touchend can be configured in
* milliseconds. The maximum delay starts to count down when the expected
* number of inputs are on the screen, and ends when ALL inputs are off the
* screen.
* @type {Number}
*/
this.maxDelay = (options && options.maxDelay) ?
options.maxDelay : DEFAULT_MAX_DELAY_MS;
/**
* The number of inputs to trigger a Tap can be variable,
* and the maximum number being a factor of the browser.
* @type {Number}
*/
this.numInputs = (options && options.numInputs) ?
options.numInputs : DEFAULT_INPUTS;
/**
* A move tolerance in pixels allows some slop between a user's start to end
* events. This allows the Tap gesture to be triggered more easily.
* @type {number}
*/
this.tolerance = (options && options.tolerance) ?
options.tolerance : DEFAULT_MOVE_PX_TOLERANCE;
/**
* The on end callback
*/
if (options && options.onEnd && typeof options.onEnd === 'function') {
this.onEnd = options.onEnd
}
}
/* constructor*/
/**
* Event hook for the start of a gesture. Keeps track of when the inputs
* trigger the start event.
* @param {Array} inputs - The array of Inputs on the screen.
* @return {null} - Tap does not trigger on a start event.
*/
start(inputs) {
if (inputs.length === this.numInputs) {
inputs.forEach((input) => {
let progress = input.getGestureProgress(this.getId());
progress.start = new Date().getTime();
});
}
return null;
}
/* start*/
/**
* Event hook for the move of a gesture. The Tap event reaches here if the
* user starts to move their input before an 'end' event is reached.
* @param {Array} inputs - The array of Inputs on the screen.
* @param {Object} state - The state object of the current region.
* @param {Element} element - The element associated to the binding.
* @return {null} - Tap does not trigger on a move event.
*/
move(inputs, state, element) {
for (let i = 0; i < inputs.length; i++) {
if (inputs[i].getCurrentEventType() === 'move') {
let current = inputs[i].current;
let previous = inputs[i].previous;
if (!util.isWithin(
current.x,
current.y,
previous.x,
previous.y,
this.tolerance)) {
let type = this.type;
inputs.forEach(function(input) {
input.resetProgress(type);
});
return null;
}
}
}
return null;
}
/* move*/
/**
* Event hook for the end of a gesture.
* Determines if this the tap event can be fired if the delay and tolerance
* constraints are met. Also waits for all of the inputs to be off the screen
* before determining if the gesture is triggered.
* @param {Array} inputs - The array of Inputs on the screen.
* @return {null|Object} - null if the gesture is not to be emitted,
* Object with information otherwise. Returns the interval time between start
* and end events.
*/
end(inputs) {
if (inputs.length !== this.numInputs) {
return null;
}
let startTime = Number.MAX_VALUE;
for (let i = 0; i < inputs.length; i++) {
if (inputs[i].getCurrentEventType() !== 'end') {
return null;
}
let progress = inputs[i].getGestureProgress(this.getId());
if (!progress.start) {
return null;
}
// Find the most recent input's startTime
if (progress.start < startTime) {
startTime = progress.start;
}
}
let interval = new Date().getTime() - startTime;
if ((this.minDelay <= interval) && (this.maxDelay >= interval)) {
const timing = { interval }
if(this.onEnd) {
this.onEnd(inputs, timing);
}
return timing;
} else {
let type = this.type;
inputs.forEach(function(input) {
input.resetProgress(type);
});
return null;
}
}
/* end*/
}
export default Tap;
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
test/ZingTouch.spec.js
|
JavaScript
|
import ZingTouch from './../src/ZingTouch.js';
/** @test {ZingTouch} */
describe('ZingTouch', function() {
it('should be instantiated', function() {
expect(ZingTouch).to.not.equal(null);
});
it('should have constructors for all of the gestures', function() {
let gestures = [
'Distance',
'Gesture',
'Pan',
'Rotate',
'Swipe',
'Tap',
];
Object.keys(ZingTouch).forEach((key) => {
expect(gestures.indexOf(key) !== -1);
});
});
});
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
test/core/classes/Binder.spec.js
|
JavaScript
|
'use strict';
/**
* @file Binder.js
* Tests Binder class
*/
import Binder from './../../../src/core/classes/Binder.js';
import State from './../../../src/core/classes/State.js';
/** @test {Binder} */
describe('Binder', function() {
it('should be instantiated', function() {
expect(Binder).to.not.equal(null);
});
it('should return a new object with a valid element parameter', function() {
let myState = new State();
let myBinder = new Binder(document.body, false, myState);
expect(myBinder).to.not.equal(null);
expect(myBinder.element).to.equal(document.body);
});
it(`should return a chainable object with all of the
current registered gestures`, function() {
let myState = new State();
let myBinder = new Binder(document.body, false, myState);
let gestures = Object.keys(myState.registeredGestures);
for (let key in myBinder) {
if (key !== 'element') {
expect(gestures.indexOf(key) >= 0).to.be.true;
}
}
});
});
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
test/core/classes/Binding.spec.js
|
JavaScript
|
'use strict';
/**
* @file Binding.js
* Tests Binding class
*/
import Binding from './../../../src/core/classes/Binding.js';
import Gesture from './../../../src/gestures/Gesture.js';
/** @test {Binding} */
describe('Binding', function() {
let gesture = new Gesture();
let element = document.createElement('div');
let binding = new Binding(element, gesture, function() {}, false, false);
it('should be instantiated', function() {
expect(Binding).to.not.equal(null);
});
it('should have an element as a member', function() {
expect(binding.element).to.exist;
});
it('should have an Gesture as a member', function() {
expect(binding.gesture).to.be.an.instanceof(Gesture);
});
it('should have an function as a member', function() {
expect(binding.handler).to.be.an.instanceof(Function);
});
});
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
test/core/classes/Input.spec.js
|
JavaScript
|
'use strict';
/**
* @file Binding.js
* Tests Binding class
*/
import Input from './../../../src/core/classes/Input.js';
import ZingEvent from './../../../src/core/classes/ZingEvent.js';
/** @test {Input} */
describe('Input', function() {
let event = document.createEvent('Event');
let input = new Input(event, 1234);
it('should be instantiated', function() {
expect(Input).to.not.equal(null);
});
it('should have an initial event', function() {
expect(input.initial).to.be.an.instanceof(ZingEvent);
});
it('should have an current event', function() {
expect(input.current).to.be.an.instanceof(ZingEvent);
expect(input.current).to.equal(input.current);
});
it('should have an previous event', function() {
expect(input.previous).to.be.an.instanceof(ZingEvent);
expect(input.previous).to.equal(input.current);
});
});
/** @test {Input.update} */
describe('Input.update', function() {
let event = document.createEvent('Event');
let input = new Input(event, 1234);
it('should update the current event', function() {
let newEvent = document.createEvent('MouseEvent');
input.update(newEvent, 4321);
expect(input.previous).to.not.equal(input.current);
});
});
/** @test {Input.getGestureProgress} */
describe('Input.getGestureProgress', function() {
let event = document.createEvent('Event');
let input = new Input(event, 1234);
it('should have no progress initially', function() {
expect(input.getGestureProgress('tap')).to.be.empty;
});
it(`should have be able to store metadata in the progress object.`,
function() {
expect(input.getGestureProgress('tap')).to.be.empty;
(input.getGestureProgress('tap')).foo = 8;
expect(input.getGestureProgress('tap').foo).to.equal(8);
});
});
/** @test {Input.getCurrentEventType} */
describe('Input.getCurrentEventType', function() {
it('should be null for an event it does not understand', function() {
let event = document.createEvent('Event');
let input = new Input(event, 1234);
expect(input.getCurrentEventType()).to.be.undefined;
});
});
/** @test {Input.getCurrentEventType} */
describe('Input.resetProgress', function() {
let event = document.createEvent('Event');
let input = new Input(event, 1234);
it('should reset the progress of an existing progress state', function() {
expect(input.getGestureProgress('tap')).to.be.empty;
(input.getGestureProgress('tap')).foo = 8;
expect(input.getGestureProgress('tap').foo).to.equal(8);
input.resetProgress('tap');
expect(input.getGestureProgress('tap')).to.be.empty;
});
});
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
test/core/classes/Region.spec.js
|
JavaScript
|
'use strict';
/**
* @file Region.spec..js
* Tests Region class
*/
import Region from './../../../src/core/classes/Region.js';
import Binder from './../../../src/core/classes/Binder.js';
/** @test {Region} */
describe('Region', function() {
it('should be instantiated', function() {
expect(Region).to.not.equal(null);
});
});
/** @test {Region.bind} */
describe('Region.bind(element)', function() {
let region = new Region(document.body);
it('should exist', function() {
expect(region.bind).to.exist;
});
it('should throw an error if the element parameter is invalid', function() {
expect(function() {
region.bind({});
}).to.throw('Bind must contain an element');
});
it(`should return a chainable Binder object if only an element parameter is
provided`, function() {
let ztBound = region.bind(document.body);
expect(ztBound).to.be.an.instanceof(Binder);
});
it(`should return a chainable Binder object that contains all of the
registered gestures`, function() {
let ztBound = region.bind(document.body);
let registeredGestures = Object.keys(region.state.registeredGestures);
for (let gesture in ztBound) {
if (gesture !== 'element') {
expect(registeredGestures).to.include(gesture);
}
}
});
});
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
test/core/classes/state.spec.js
|
JavaScript
|
'use strict';
import State from './../../../src/core/classes/State.js';
import Gesture from './../../../src/gestures/Gesture.js';
/** @test {State} */
describe('State', function() {
let state = new State();
it('should be instantiated', function() {
expect(state).to.not.equal(null);
});
it('should have no inputs', function() {
expect(state.inputs).to.be.empty;
});
it('should have no bindings', function() {
expect(state.bindings).to.be.empty;
});
it('should have instances of the 5 default gestures', function() {
let gestures = ['pan', 'distance', 'rotate', 'swipe', 'tap'];
for (let i = 0; i < state.registeredGestures.length; i++) {
expect(gestures.indexOf(state.registeredGestures[i].type))
.to.not.equal(-1);
}
});
});
/** @test {State.addBinding} */
describe('State.addBinding', function() {
it('should add a binding to a registered gesture', function() {
let state = new State();
state.addBinding(document.body, 'tap', function() {
}, false, false);
expect(state.bindings.length).to.equal(1);
});
it('should add a binding to a gesture instance', function() {
let state = new State();
state.addBinding(document.body, new Gesture(), function() {
}, false, false);
expect(state.bindings.length).to.equal(1);
});
it('should not add a binding to a non-registered gesture', function() {
expect(function() {
let state = new State();
state.addBinding(document.body, 'foobar', function() {
}, false, false);
}).to.throw('Parameter foobar is not a registered gesture');
});
it('should not add a binding to an object not of the Gesture type',
function() {
expect(function() {
let state = new State();
state.addBinding(document.body, {}, function() {
}, false, false);
}).to.throw('Parameter for the gesture is not of a Gesture type');
});
});
/** @test {State.retrieveBindings} */
describe('State.retrieveBindings', function() {
let state = new State();
state.addBinding(document.body, 'tap', function() {
}, false, false);
it('should retrieve no bindings for elements without any', function() {
expect(state.retrieveBindingsByElement(document)).to.be.empty;
});
it('should retrieve bindings for elements that are bound', function() {
expect(state.retrieveBindingsByElement(document.body)).to.not.be.empty;
});
});
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
test/core/util.spec.js
|
JavaScript
|
'use strict';
/**
* @file utils.js
* Tests the user-facing API, ensuring the object functions
* while not exposing private members.
*/
import util from './../../src/core/util.js';
/** @test {util} */
describe('util', function() {
it('should be instantiated', function() {
expect(util).to.not.equal(null);
});
});
/** @test {util.normalizeEvent} */
describe('util.normalizeEvent', function() {
it('should expect to emit start', function() {
expect(util.normalizeEvent[ 'mousedown' ]).to.equal('start');
expect(util.normalizeEvent[ 'touchstart' ]).to.equal('start');
});
it('should expect to emit move', function() {
expect(util.normalizeEvent[ 'mousemove' ]).to.equal('move');
expect(util.normalizeEvent[ 'touchmove' ]).to.equal('move');
});
it('should expect to emit end', function() {
expect(util.normalizeEvent[ 'mouseup' ]).to.equal('end');
expect(util.normalizeEvent[ 'touchend' ]).to.equal('end');
});
it('should expect to emit null for unknown events', function() {
expect(util.normalizeEvent[ 'foobar' ]).to.be.undefined;
});
});
/** @test {util.isWithin} */
describe('util.isWithin', function() {
it('should expect be true when points are within a tolerance', function() {
expect(util.isWithin(0, 0, 0, 0, 10)).to.be.true;
expect(util.isWithin(10, 10, 10, 10, 0)).to.be.true;
expect(util.isWithin(0, -10, 9, 0, 10)).to.be.true;
});
it('should expect be false when points are outside a tolerance', function() {
expect(util.isWithin(0, 0, 0, 0, -1)).to.be.false;
expect(util.isWithin(10, 10, 20, 20, 0)).to.be.false;
});
});
/** @test {util.distanceBetweenTwoPoints} */
describe('util.distanceBetweenTwoPoints', function() {
it('should return a distance of 5', function() {
expect(util.distanceBetweenTwoPoints(0, 4, 0, 3)).to.equal(5);
});
it('should return a distance of 0', function() {
expect(util.distanceBetweenTwoPoints(0, 0, 0, 0)).to.equal(0);
});
it('should return a distance of 0', function() {
expect(util.distanceBetweenTwoPoints('foo', 0, 0, 0)).to.be.NaN;
});
});
/** @test {util.getAngle} */
describe('util.getAngle', function() {
it('should return an angle of PI/4', function() {
expect(util.getAngle(0, 0, 3, 3)).to.equal(Math.PI / 4);
});
it('should return an angle of 0', function() {
expect(util.getAngle(0, 0, 0, 0)).to.equal(0);
});
it('should return an angle of PI', function() {
expect(util.getAngle(0, 0, -3, 0)).to.equal(Math.PI);
});
});
/** @test {util.getAngularDistance} */
describe('util.getAngularDistance', function() {
it('should return an angle of PI / 2', function() {
expect(util.getAngularDistance(Math.PI * 3/2, Math.PI * 2)).to.equal(
Math.PI / 2
);
});
it('should return an angle of PI', function() {
expect(util.getAngularDistance(0, Math.PI)).to.equal(Math.PI);
});
it('should return an angle of -PI', function() {
expect(util.getAngularDistance(Math.PI, 0)).to.equal(-Math.PI);
});
it('should return an angle of 0', function() {
expect(util.getAngularDistance(Math.PI, Math.PI)).to.equal(0);
});
});
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
test/gestures/Distance.spec.js
|
JavaScript
|
'use strict';
/**
* @file Tap.js
* Tests Tap class
*/
import Distance from './../../src/gestures/Distance.js';
/** @test {Distance} */
describe('Distance', function() {
it('should be instantiated', function() {
expect(Distance).to.not.equal(null);
});
it('should return a Tap object.', function() {
let _distance = new Distance();
expect(_distance instanceof Distance).to.be.true;
});
it('should return accept threshold and number of inputs as parameters',
function() {
let _distance = new Distance({
threshold: 2,
});
expect(_distance.threshold).to.equal(2);
});
it('should return onStart, onMove and onEnd as functions',
function() {
const onStart = () => {};
const onMove = () => {};
let _distance = new Distance({
onStart,
onMove
});
expect(typeof _distance.onStart).to.equal('function');
expect(typeof _distance.onMove).to.equal('function');
});
it('should return onStart, onMove and onEnd as undefined if they are not functions',
function() {
const onStart = 'hello';
const onMove = 23;
let _distance = new Distance({
onStart,
onMove
});
expect(typeof _distance.onStart).to.equal('undefined');
expect(typeof _distance.onMove).to.equal('undefined');
});
});
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
test/gestures/Gesture.spec.js
|
JavaScript
|
'use strict';
/**
* @file Gesture.js
* Tests Gesture class
*/
import Gesture from './../../src/gestures/Gesture.js';
/** @test {Gesture} */
describe('Gesture', function() {
it('should be instantiated', function() {
expect(Gesture).to.not.equal(null);
});
});
/** @test {Gesture.getType} */
describe('Gesture.getType', function() {
it('should return null for a generic gesture', function() {
let _gesture = new Gesture();
expect(_gesture.getType()).to.equal(null);
});
});
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
test/gestures/Pan.spec.js
|
JavaScript
|
'use strict';
/**
* @file Tap.js
* Tests Tap class
*/
import Pan from './../../src/gestures/Pan.js';
/** @test {Pan} */
describe('Pan', function() {
it('should be instantiated', function() {
expect(Pan).to.not.equal(null);
});
it('should return a Tap object.', function() {
let _pan = new Pan();
expect(_pan instanceof Pan).to.be.true;
});
it('should return accept threshold and number of inputs as parameters',
function() {
let _pan = new Pan({
threshold: 2,
numInputs: 2,
});
expect(_pan.numInputs).to.equal(2);
expect(_pan.threshold).to.equal(2);
});
it('should return onStart, onMove and onEnd as functions',
function() {
const onStart = () => {};
const onMove = () => {};
const onEnd = () => {};
let _pan = new Pan({
onStart,
onMove,
onEnd
});
expect(typeof _pan.onStart).to.equal('function');
expect(typeof _pan.onMove).to.equal('function');
expect(typeof _pan.onEnd).to.equal('function');
});
it('should return onStart, onMove and onEnd as undefined if they are not functions',
function() {
const onStart = 'hello';
const onMove = 23;
const onEnd = { happy: 'kitty'};
let _pan = new Pan({
onStart,
onMove,
onEnd
});
expect(typeof _pan.onStart).to.equal('undefined');
expect(typeof _pan.onMove).to.equal('undefined');
expect(typeof _pan.onEnd).to.equal('undefined');
});
});
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
test/gestures/Rotate.spec.js
|
JavaScript
|
'use strict';
/**
* @file Tap.js
* Tests Tap class
*/
import Rotate from './../../src/gestures/Rotate.js';
/** @test {Rotate} */
describe('Rotate', function() {
it('should be instantiated', function() {
expect(Rotate).to.not.equal(null);
});
it('should return a Tap object.', function() {
let _rotate = new Rotate();
expect(_rotate instanceof Rotate).to.be.true;
});
it('should return accept threshold and number of inputs as parameters',
function() {
let _rotate = new Rotate({
numInputs: 2,
});
expect(_rotate.numInputs).to.equal(2);
});
it('should return onStart, onMove and onEnd as functions',
function() {
const onMove = () => {};
let _rotate = new Rotate({
onMove
});
expect(typeof _rotate.onMove).to.equal('function');
});
it('should return onStart, onMove and onEnd as undefined if they are not functions',
function() {
const onMove = 23;
let _rotate = new Rotate({
onMove
});
expect(typeof _rotate.onMove).to.equal('undefined');
});
});
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
test/gestures/Swipe.spec.js
|
JavaScript
|
'use strict';
/**
* @file Tap.js
* Tests Tap class
*/
import Swipe from './../../src/gestures/Swipe.js';
/** @test {Swipe} */
describe('Swipe', function() {
it('should be instantiated', function() {
expect(Swipe).to.not.equal(null);
});
it('should return a Tap object.', function() {
let _swipe = new Swipe();
expect(_swipe instanceof Swipe).to.be.true;
});
it('should return accept threshold and number of inputs as parameters',
function() {
let _swipe = new Swipe({
numInputs: 2,
maxRestTime: 150,
escapeVelocity: 0.3,
timeDistortion: 200,
maxProgressStack: 20,
});
expect(_swipe.numInputs).to.equal(2);
expect(_swipe.maxRestTime).to.equal(150);
expect(_swipe.escapeVelocity).to.equal(0.3);
expect(_swipe.timeDistortion).to.equal(200);
expect(_swipe.maxProgressStack).to.equal(20);
});
it('should return onStart, onMove and onEnd as functions',
function() {
const onMove = () => {};
const onEnd = () => {};
let _swipe = new Swipe({
onMove,
onEnd
});
expect(typeof _swipe.onMove).to.equal('function');
expect(typeof _swipe.onEnd).to.equal('function');
});
it('should return onStart, onMove and onEnd as undefined if they are not functions',
function() {
const onMove = 23;
const onEnd = { happy: 'kitty'};
let _swipe = new Swipe({
onMove,
onEnd
});
expect(typeof _swipe.onMove).to.equal('undefined');
expect(typeof _swipe.onEnd).to.equal('undefined');
});
});
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
test/gestures/Tap.spec.js
|
JavaScript
|
'use strict';
/**
* @file Tap.js
* Tests Tap class
*/
import Tap from './../../src/gestures/Tap.js';
/** @test {Tap} */
describe('Tap', function() {
it('should be instantiated', function() {
expect(Tap).to.not.equal(null);
});
it('should return a Tap object.', function() {
let _tap = new Tap();
expect(_tap instanceof Tap).to.be.true;
});
it('should return accept delay and number of inputs as parameters',
function() {
let _tap = new Tap({
maxDelay: 2000,
numInputs: 2,
});
expect(_tap.maxDelay).to.equal(2000);
expect(_tap.numInputs).to.equal(2);
});
it('should return onStart, onMove and onEnd as functions',
function() {
const onEnd = () => {};
let _tap = new Tap({
onEnd
});
expect(typeof _tap.onEnd).to.equal('function');
});
it('should return onStart, onMove and onEnd as undefined if they are not functions',
function() {
const onEnd = { happy: 'kitty'};
let _tap = new Tap({
onEnd
});
expect(typeof _tap.onEnd).to.equal('undefined');
});
});
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
webpack.config.js
|
JavaScript
|
const webpack = require('webpack');
const minimize = process.argv.indexOf('--minimize') !== -1;
module.exports = (env, argv) => {
argv.mode = argv.mode || 'production';
const plugins = [];
const filename = (argv.mode === 'production') ? 'zingtouch.min.js' : 'zingtouch.js';
const config = {
mode: argv.mode,
entry: './src/core/main.js',
output: {
filename: filename,
library: 'ZingTouch',
libraryTarget: 'umd',
},
devtool: 'source-map',
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env']
}
}
}
]
},
plugins: plugins,
};
config.output.filename = filename;
plugins.push(new webpack.BannerPlugin(`
ZingTouch v${process.env.npm_package_version}
Author: ZingChart http://zingchart.com
License: MIT`
));
return config;
};
|
zingchart/zingtouch
| 2,149
|
A JavaScript touch gesture detection library for the modern web
|
JavaScript
|
zingchart
|
ZingChart
| |
_data/campaigns.cjs
|
JavaScript
|
const stargazerCampaigns = require("./stargazerCampaigns.json");
module.exports = stargazerCampaigns;
|
zkat/zkat.github.io
| 2
|
Web sight
|
TypeScript
|
zkat
|
Kat Marchán
|
Fastly, Inc
|
_data/campaigns.d.ts
|
TypeScript
|
// Campaign
export interface ICampaign {
id: string;
name: string;
description?: string;
slugline?: string;
// TODO
//sharedAssets: ISGAsset[];
characters: ICharacter[];
// TODO
// progressTracks: IProgressTrack[];
journal: IJournalEntry[];
lore: ILoreEntry[];
// TODO
//truths: ITruths;
// TODO
// sectors: ISector[];
factions: IFaction[];
}
//----- Character -----
// Character
export interface ICharacter {
name: string;
pronouns?: string;
callsign?: string;
characteristics?: string;
// TODO
// location: string;
stats?: IStats;
tracks?: ITracks;
impacts?: IImpacts;
legacies?: {
quests: ILegacyTrack;
bonds: ILegacyTrack;
discoveries: ILegacyTrack;
};
vows?: IProgressTrack[];
clocks?: IClock[];
gear?: string;
assets?: ISGAsset[];
}
// Stats and Tracks
export interface IStats {
edge: number;
heart: number;
iron: number;
shadow: number;
wits: number;
}
export interface IMomentum extends ITrack {
reset: number;
}
export interface ITrack {
value: number;
max: number;
min: number;
}
export interface ITracks {
health: ITrack;
spirit: ITrack;
supply: ITrack;
momentum: IMomentum;
}
// Conditions and debilities
export interface IImpact {
name: string;
marked: boolean;
}
export interface IImpacts {
[index: string]: IImpact[];
}
// Progress Tracks
export interface IDiff {
label: string;
mark: number;
harm: number;
}
export interface IProgressTrack {
name: string;
difficulty: number;
boxes: number[];
clocks: string[];
notes?: string;
}
export interface ILegacyBox {
ticks: number;
xp: boolean[];
}
export interface ILegacyTrack {
plus10: boolean;
boxes: ILegacyBox[];
}
export interface IClock {
id: string;
name: string;
segments: number;
filled: number;
advance: EAtO;
roll: number;
complete?: boolean;
}
export enum EAtO {
AlmostCertain = "Almost Certain",
Likely = "Likely",
FiftyFifty = "Fifty-fifty",
Unlikely = "Unlikely",
SmallChance = "Small Chance",
NoRoll = "No Roll",
}
// Assets
export interface ISGAssetInput {
label: string;
text: string;
}
export interface ISGAssetItem {
text: string;
marked: boolean;
input?: ISGAssetInput;
}
export interface ISGAsset {
id?: string;
icon?: string;
title: string;
subtitle?: string;
input?: ISGAssetInput;
type: string;
items: ISGAssetItem[];
track?: ITrack;
cursed?: boolean;
battered?: boolean;
}
// ----- Story ------
// Journal
export interface IJournalEntry {
title: string;
slugline?: string;
content: string;
pinned?: boolean;
image?: IImage;
}
// Lore
export interface ILoreEntry {
title: string;
slugline?: string;
tags: string[];
image?: IImage;
content: string;
notes?: string;
}
export interface IImage {
src: string;
alt?: string;
attribution?: string;
}
// ----- World -----
// Stars
export interface IStar {
name: string;
description: string;
}
// Truths
export interface ITruths {
[index: string]: string;
}
// Factions
export interface IFaction {
id: string;
name: string;
slugline?: string;
type: string;
influence: string;
leadership?: string;
sphere: string;
projects: string;
relationships: string;
quirks: string;
rumors: string;
notes: string;
colour: string;
}
export interface IRoll {
action: number,
stat?: number,
add?: number,
challenge1: number,
challenge2: number,
}
|
zkat/zkat.github.io
| 2
|
Web sight
|
TypeScript
|
zkat
|
Kat Marchán
|
Fastly, Inc
|
_data/journal_entries.cjs
|
JavaScript
|
const campaigns = require("./campaigns.cjs");
module.exports = function () {
return campaigns.reduce((acc, campaign) => {
campaign.journal.forEach(journal => {
acc.push({
campaignId: campaign.id,
campaignName: campaign.name,
...journal
});
})
return acc;
}, []);
}
|
zkat/zkat.github.io
| 2
|
Web sight
|
TypeScript
|
zkat
|
Kat Marchán
|
Fastly, Inc
|
_data/lore_entries.cjs
|
JavaScript
|
const campaigns = require("./campaigns.cjs");
module.exports = function () {
return campaigns.reduce((acc, campaign) => {
campaign.lore.forEach(lore => {
acc.push({
campaignId: campaign.id,
campaignName: campaign.name,
...lore
});
})
return acc;
}, []);
}
|
zkat/zkat.github.io
| 2
|
Web sight
|
TypeScript
|
zkat
|
Kat Marchán
|
Fastly, Inc
|
_data/metadata.cjs
|
JavaScript
|
module.exports = {
title: "FOSS and Adventures",
url: "https://zkat.tech/",
language: "en",
description: "Personal site, blog, and portfolio of Kat Marchán. Also a place to post TTRPG campaign journals!",
author: {
name: "Kat Marchán",
email: "kzm@zkat.tech",
url: "https://zkat.tech/about-me/",
},
};
|
zkat/zkat.github.io
| 2
|
Web sight
|
TypeScript
|
zkat
|
Kat Marchán
|
Fastly, Inc
|
content/blog/blog.11tydata.cjs
|
JavaScript
|
module.exports = {
tags: [
"posts",
],
"layout": "layouts/post.njk",
};
|
zkat/zkat.github.io
| 2
|
Web sight
|
TypeScript
|
zkat
|
Kat Marchán
|
Fastly, Inc
|
content/feed/feed.11tydata.cjs
|
JavaScript
|
module.exports = {
eleventyExcludeFromCollections: true,
};
|
zkat/zkat.github.io
| 2
|
Web sight
|
TypeScript
|
zkat
|
Kat Marchán
|
Fastly, Inc
|
eleventy.config.cjs
|
JavaScript
|
const { DateTime } = require("luxon");
const markdownItAnchor = require("markdown-it-anchor");
const pluginRss = require("@11ty/eleventy-plugin-rss");
const pluginSyntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
const pluginBundle = require("@11ty/eleventy-plugin-bundle");
const pluginNavigation = require("@11ty/eleventy-navigation");
const pluginTimeToRead = require("eleventy-plugin-time-to-read");
const pluginDrafts = require("./eleventy.config.drafts.cjs");
const pluginImages = require("./eleventy.config.images.cjs");
module.exports = async function (eleventyConfig) {
const { EleventyHtmlBasePlugin } = await import("@11ty/eleventy");
// Copy the contents of the `public` folder to the output folder
// For example, `./public/css/` ends up in `_site/css/`
eleventyConfig.addPassthroughCopy({
"./public/": "/",
"./node_modules/prismjs/themes/prism-okaidia.css": "/css/prism-okaidia.css",
});
eleventyConfig.addPassthroughCopy("CNAME");
// Run Eleventy when these files change:
// https://www.11ty.dev/docs/watch-serve/#add-your-own-watch-targets
// Watch content images for the image pipeline.
eleventyConfig.addWatchTarget("content/**/*.{svg,webp,png,jpeg}");
// App plugins
eleventyConfig.addPlugin(pluginDrafts);
eleventyConfig.addPlugin(pluginImages);
// Official plugins
eleventyConfig.addPlugin(pluginRss);
eleventyConfig.addPlugin(pluginSyntaxHighlight, {
preAttributes: { tabindex: 0 },
});
eleventyConfig.addPlugin(pluginNavigation);
eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
eleventyConfig.addPlugin(pluginBundle);
eleventyConfig.addPlugin(pluginTimeToRead, {
style: "short",
});
// Filters
eleventyConfig.addFilter("readableDate", (date, format, zone) => {
// Formatting tokens for Luxon: https://moment.github.io/luxon/#/formatting?id=table-of-tokens
const obj = typeof date === "string"
? DateTime.fromFormat(date, "yyyy-mm-dd", { zone: zone || "utc" })
: DateTime.fromJSDate(date, { zone: zone || "utc" });
return obj.toFormat(format || "dd LLLL yyyy");
});
eleventyConfig.addFilter("htmlDateString", (date) => {
// dateObj input: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-date-string
const obj = typeof date === "string"
? DateTime.fromFormat(date, "yyyy-mm-dd", { zone: "utc" })
: DateTime.fromJSDate(date, { zone: "utc" });
return obj.toFormat("yyyy-LL-dd");
});
// Get the first `n` elements of a collection.
eleventyConfig.addFilter("head", (array, n) => {
if (!Array.isArray(array) || array.length === 0) {
return [];
}
if (n < 0) {
return array.slice(n);
}
return array.slice(0, n);
});
// Return the smallest number argument
eleventyConfig.addFilter("min", (...numbers) => {
return Math.min.apply(null, numbers);
});
// Return all the tags used in a collection
eleventyConfig.addFilter("getAllTags", collection => {
let tagSet = new Set();
for (let item of collection) {
(item.data.tags || []).forEach(tag => tagSet.add(tag));
}
return Array.from(tagSet);
});
eleventyConfig.addFilter("getNextJournalEntry", function (collection) {
const currIndex = collection.findIndex(item =>
item.inputPath === this.page.inputPath
&& (item.outputPath === this.page.outputPath || item.url === this.page.url)
);
for (let i = currIndex; i < collection.length; i++) {
if (item.data.campaign === this.page.data.campaign) {
return item;
}
}
});
eleventyConfig.addFilter("getPrevJournalEntry", function (collection) {
const currIndex = collection.findIndex(item =>
item.inputPath === this.page.inputPath
&& (item.outputPath === this.page.outputPath || item.url === this.page.url)
);
for (let i = currIndex - 1; i <= 0; i--) {
if (item.data.campaign === this.page.data.campaign) {
return item;
}
}
});
eleventyConfig.addFilter("filterTagList", function filterTagList(tags) {
return (tags || []).filter(tag => ["all", "nav", "post", "posts"].indexOf(tag) === -1);
});
// Customize Markdown library settings:
eleventyConfig.amendLibrary("md", mdLib => {
mdLib.use(markdownItAnchor, {
permalink: markdownItAnchor.permalink.ariaHidden({
placement: "after",
class: "header-anchor",
symbol: "#",
ariaHidden: false,
}),
level: [1, 2, 3, 4],
slugify: eleventyConfig.getFilter("slugify"),
});
});
eleventyConfig.addShortcode("currentBuildDate", () => {
return (new Date()).toISOString();
});
// Features to make your build faster (when you need them)
// If your passthrough copy gets heavy and cumbersome, add this line
// to emulate the file copy on the dev server. Learn more:
// https://www.11ty.dev/docs/copy/#emulate-passthrough-copy-during-serve
// eleventyConfig.setServerPassthroughCopyBehavior("passthrough");
return {
// Control which files Eleventy will process
// e.g.: *.md, *.njk, *.html, *.liquid
templateFormats: [
"md",
"njk",
"html",
"liquid",
],
// Pre-process *.md files with: (default: `liquid`)
markdownTemplateEngine: "njk",
// Pre-process *.html files with: (default: `liquid`)
htmlTemplateEngine: "njk",
// These are all optional:
dir: {
input: "content", // default: "."
includes: "../_includes", // default: "_includes"
data: "../_data", // default: "_data"
output: "_site",
},
// -----------------------------------------------------------------
// Optional items:
// -----------------------------------------------------------------
// If your site deploys to a subdirectory, change `pathPrefix`.
// Read more: https://www.11ty.dev/docs/config/#deploy-to-a-subdirectory-with-a-path-prefix
// When paired with the HTML <base> plugin https://www.11ty.dev/docs/plugins/html-base/
// it will transform any absolute URLs in your HTML to include this
// folder name and does **not** affect where things go in the output folder.
pathPrefix: "/",
};
};
|
zkat/zkat.github.io
| 2
|
Web sight
|
TypeScript
|
zkat
|
Kat Marchán
|
Fastly, Inc
|
eleventy.config.drafts.cjs
|
JavaScript
|
function eleventyComputedPermalink() {
// When using `addGlobalData` and you *want* to return a function, you must nest functions like this.
// `addGlobalData` acts like a global data file and runs the top level function it receives.
return (data) => {
// Always skip during non-watch/serve builds
if (data.draft && !process.env.BUILD_DRAFTS) {
return false;
}
return data.permalink;
};
}
function eleventyComputedExcludeFromCollections() {
// When using `addGlobalData` and you *want* to return a function, you must nest functions like this.
// `addGlobalData` acts like a global data file and runs the top level function it receives.
return (data) => {
// Always exclude from non-watch/serve builds
if (data.draft && !process.env.BUILD_DRAFTS) {
return true;
}
return data.eleventyExcludeFromCollections;
};
}
module.exports.eleventyComputedPermalink = eleventyComputedPermalink;
module.exports.eleventyComputedExcludeFromCollections = eleventyComputedExcludeFromCollections;
module.exports = eleventyConfig => {
eleventyConfig.addGlobalData("eleventyComputed.permalink", eleventyComputedPermalink);
eleventyConfig.addGlobalData(
"eleventyComputed.eleventyExcludeFromCollections",
eleventyComputedExcludeFromCollections,
);
let logged = false;
eleventyConfig.on("eleventy.before", ({ runMode }) => {
let text = "Excluding";
// Only show drafts in serve/watch modes
if (runMode === "serve" || runMode === "watch") {
process.env.BUILD_DRAFTS = true;
text = "Including";
}
// Only log once.
if (!logged) {
console.log(`[11ty/eleventy-base-blog] ${text} drafts.`);
}
logged = true;
});
};
|
zkat/zkat.github.io
| 2
|
Web sight
|
TypeScript
|
zkat
|
Kat Marchán
|
Fastly, Inc
|
eleventy.config.images.cjs
|
JavaScript
|
const path = require("path");
const eleventyImage = require("@11ty/eleventy-img");
function relativeToInputPath(inputPath, relativeFilePath) {
let split = inputPath.split("/");
split.pop();
return path.resolve(split.join(path.sep), relativeFilePath);
}
function isFullUrl(url) {
try {
new URL(url);
return true;
} catch (e) {
return false;
}
}
module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(eleventyImage.eleventyImageTransformPlugin, {
// which file extensions to process
extensions: "html,css",
// Add any other Image utility options here:
// optional, output image formats
formats: ["webp", "jpeg"],
// formats: ["auto"],
// optional, output image widths
widths: ["auto"],
// optional, attributes assigned on <img> override these values.
defaultAttributes: {
loading: "lazy",
decoding: "async",
},
});
eleventyConfig.addAsyncFilter("image", async function imageFilter(src) {
let input;
if (isFullUrl(src)) {
input = src;
} else {
input = relativeToInputPath(this.page.inputPath, src);
}
let metadata = await eleventyImage(input, {
widths: ["auto"],
formats: ["auto"],
outputDir: path.join(eleventyConfig.dir.output, "img"),
});
let imageAttributes = {
alt: "",
loading: "lazy",
decoding: "async",
};
const obj = eleventyImage.generateObject(metadata, imageAttributes);
return obj.img.src;
});
// Eleventy Image shortcode
// https://www.11ty.dev/docs/plugins/image/
eleventyConfig.addAsyncShortcode("image", async function imageShortcode(src, alt, widths, sizes) {
// Full list of formats here: https://www.11ty.dev/docs/plugins/image/#output-formats
// Warning: Avif can be resource-intensive so take care!
let formats = ["webp", "auto"];
let input;
if (isFullUrl(src)) {
input = src;
} else {
input = relativeToInputPath(this.page.inputPath, src);
}
let metadata = await eleventyImage(input, {
widths: widths || ["auto"],
formats,
outputDir: path.join(eleventyConfig.dir.output, "img"), // Advanced usage note: `eleventyConfig.dir` works here because we’re using addPlugin.
});
// TODO loading=eager and fetchpriority=high
let imageAttributes = {
alt,
sizes,
loading: "lazy",
decoding: "async",
};
return eleventyImage.generateHTML(metadata, imageAttributes);
});
};
|
zkat/zkat.github.io
| 2
|
Web sight
|
TypeScript
|
zkat
|
Kat Marchán
|
Fastly, Inc
|
importers/crew_link.ts
|
TypeScript
|
import { writeFile } from "node:fs/promises";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import * as playwright from "playwright";
import inquirer from "inquirer";
import { ICampaign, ICharacter } from "../_data/campaigns";
const FILE_NAME = "crewLinkCampaigns.json";
const CREW_LINK_URL = "https://starforged-crew-link.scottbenton.dev";
if (process.argv.length < 2) {
console.error("Usage: tsx crew_link.ts email [filter]");
console.error(" email: crew link email for your account");
console.error(
" filter: Optional regular expression to filter campaigns by name."
);
process.exit(1);
} else {
await main(
process.argv[2],
process.argv[3] ? new RegExp(process.argv[3]) : undefined
);
}
async function main(email: string, filter?: RegExp): Promise<void> {
const browser = await playwright.firefox.launch({
headless: false,
slowMo: 1000,
});
const context = await browser.newContext();
const page = await logIn(context, email);
const campaigns = await scrapeCampaigns(page, filter);
await browser.close();
const destination = join(
dirname(fileURLToPath(import.meta.url)),
"..",
"_data",
FILE_NAME
);
await writeFile(destination, JSON.stringify(campaigns));
console.error("Wrote campaigns to", destination);
}
async function logIn(
context: playwright.BrowserContext,
email: string
): Promise<playwright.Page> {
const page = await context.newPage();
await page.goto(CREW_LINK_URL + "/login");
await page.fill("input[type='email']", email);
await (await page.$("main .MuiDivider-root ~ .MuiStack-root button")).click();
const { loginUrl } = await inquirer.prompt([
{
type: "input",
name: "loginUrl",
message: "Enter the login URL received at the provided email address",
},
]);
await page.goto(loginUrl);
await page.waitForURL("**/characters");
return page;
}
/// Scrapes all campaigns from the crew link site.
async function scrapeCampaigns(
page: playwright.Page,
filter?: RegExp
): Promise<ICampaign[]> {
await page.goto(CREW_LINK_URL + "/campaigns");
await page.waitForURL("**/campaigns");
const campaigns: ICampaign[] = [];
await page.locator("a[href^='/campaigns/']").nth(0).waitFor();
const campaignLinks = await page.locator("a[href^='/campaigns/']").all();
for (const campaignLink of campaignLinks) {
if (
!filter ||
filter.test(await campaignLink.locator("p:first-child").textContent())
) {
await page.goto(CREW_LINK_URL + "/campaigns");
await page.waitForURL("**/campaigns");
const cpn = await scrapeCampaign(page, campaignLink);
if (cpn) {
campaigns.push(cpn);
}
}
}
return campaigns;
}
/// Scrapes a single campaign from the crew link site.
async function scrapeCampaign(
page: playwright.Page,
campaignLink: playwright.Locator
): Promise<ICampaign> {
const campaign: ICampaign = {
id: "",
name: "",
characters: [],
journal: [],
lore: [],
factions: [],
};
const campaignUrl = await campaignLink.getAttribute("href");
campaign.id = campaignUrl.split("/").pop()!;
campaign.name = await (
await campaignLink.locator("p:first-child")
).textContent();
await scrapeCharacters(page, campaign);
return campaign;
}
async function scrapeCharacters(
page: playwright.Page,
campaign: ICampaign
): Promise<void> {
page.goto(
CREW_LINK_URL + "/campaigns/" + campaign.id + "/gm-screen?tab=characters"
);
page.waitForURL("**/gm-screen?tab=characters");
await page.waitForSelector("h6:has(~ h6):first-child");
await page.waitForTimeout(5000);
const characterNames = await page
.locator("h6:has(~ h6)")
.evaluateAll((chars) => chars.map((c) => c.textContent));
for (const c of characterNames) {
campaign.characters.push({
name: c,
});
}
console.log("found characters:", campaign.characters);
page.goto(
CREW_LINK_URL + "/campaigns/" + campaign.id + "/gm-screen?tab=tracks"
);
await page.waitForTimeout(10000);
const tracksSelector =
"div:not([class]) > div:not([class]):has(.MuiBox-root h6)";
const tracks = await page.locator(tracksSelector).all();
for (const track of tracks) {
const name = (await track.locator("h6").textContent())
.replace(/(.*?)'s Vows/, "$1")
.trim();
const vows = [];
const vowDifficulties = await track
.locator(
"> .MuiStack-root > .MuiBox-root > :nth-child(1) > :nth-child(1)"
)
.evaluateAll((difficulties) => difficulties.map((d) => d.textContent));
const vowTitles = await track
.locator(
"> .MuiStack-root > .MuiBox-root > :nth-child(1) > :nth-child(2)"
)
.evaluateAll((titles) => titles.map((t) => t.textContent));
const vowDescriptions = await track
.locator(
"> .MuiStack-root > .MuiBox-root > :nth-child(1) > :nth-child(3)"
)
.evaluateAll((descs) => descs.map((d) => d.textContent));
for (let i = 0; i < vowTitles.length; i++) {
vows.push({
name: `${vowTitles[i]}: ${vowDescriptions[i]}`,
title: vowTitles[i],
description: vowDescriptions[i],
difficulty: vowDifficulties[i],
});
}
console.log("setting vows for", name);
campaign.characters.find((c) => c.name === name)!.vows = vows;
}
}
|
zkat/zkat.github.io
| 2
|
Web sight
|
TypeScript
|
zkat
|
Kat Marchán
|
Fastly, Inc
|
importers/stargazer.ts
|
TypeScript
|
import { createWriteStream } from "node:fs";
import { mkdir, readFile, writeFile } from "node:fs/promises";
import { basename, dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import { Readable } from "node:stream";
import { finished } from "node:stream/promises";
import slugify from "slugify";
import type * as Datasworn from "@datasworn/core/dist/Datasworn";
import type { ReadableStream } from "node:stream/web";
import { JSDOM } from "jsdom";
import {
ICampaign,
IFaction,
IJournalEntry,
ILoreEntry,
IRoll,
} from "../_data/campaigns";
const FILE_NAME = "stargazerCampaigns.json";
const STARFORGED: Datasworn.RulesPackage = JSON.parse(
await readFile(
join(
dirname(fileURLToPath(import.meta.url)),
"..",
"node_modules",
"@datasworn/starforged/json/starforged.json"
),
"utf-8"
)
);
if (process.argv.length < 2) {
console.error("Usage: tsx stargazer.ts dump [filter]");
console.error(" dump: path to the Stargazer JSON dump to import from");
console.error(
" filter: Optional regular expression to filter campaigns by name."
);
process.exit(1);
} else {
await main(
process.argv[2],
process.argv[3] ? new RegExp(process.argv[3]) : undefined
);
}
async function main(dumpPath: string, filter?: RegExp): Promise<void> {
const campaigns: ICampaign[] = JSON.parse(await readFile(dumpPath, "utf-8"));
for (const campaign of campaigns) {
campaign.characters = [(campaign as any).character];
extractCampaignDescription(campaign);
const finalJournal: IJournalEntry[] = [];
const finalLore: ILoreEntry[] = [];
for (const faction of campaign.factions) {
finalLore.push(await loreFromFaction(faction));
}
for (const entry of campaign.journal) {
await cleanupJournalEntry(entry);
if (entry.title.startsWith("00 Lore")) {
finalLore.push({
title: entry.title.replace(/^00 Lore\s*-\s*/, ""),
content: entry.content,
image: entry.image,
tags: [],
});
} else {
finalJournal.push(entry);
}
}
campaign.journal = finalJournal;
campaign.lore = finalLore;
}
const destination = join(
dirname(fileURLToPath(import.meta.url)),
"..",
"_data",
FILE_NAME
);
await writeFile(destination, JSON.stringify(campaigns));
}
function extractCampaignDescription(campaign: ICampaign) {
const char = campaign.characters[0];
if (!char.gear) {
return;
}
let newNotes = "";
for (const paragraph of char.gear.split("\n")) {
if (paragraph.match(/^\(\(description:/i)) {
campaign.description = paragraph
.replace(/^\(\(description:\s*([^)]+?)\s*\)\).*/i, "$1")
.trim();
} else if (paragraph.match(/^\(\(slugline:/i)) {
campaign.slugline = paragraph
.replace(/^\(\(slugline:\s*([^)]+?)\s*\)\).*/i, "$1")
.trim();
} else {
newNotes += paragraph + "\n";
}
}
}
async function cleanupJournalEntry(entry: IJournalEntry): Promise<void> {
const dom = new JSDOM(entry.content);
const newDom = new JSDOM(`<!DOCTYPE html><html><body></body></html>`);
const document = newDom.window.document;
const newBody = newDom.window.document.body;
let currentAction = null;
let currentActionName = null;
for (const child of dom.window.document.body.childNodes) {
const nodes =
[...child.textContent.matchAll(/\[/g)].length > 1
? child.childNodes
: [child];
for (const el of nodes) {
if (el instanceof dom.window.HTMLImageElement) {
entry.image = {
src: await imageToFile(entry.title, el.src),
};
continue;
}
const text = el.textContent
.replaceAll(/( |\n|\r|<br>|<\/br>)/gm, "")
.trim();
if (text && entry.image && text.match(/^\s*\(\(credit:/i)) {
const attribution = text
.replace(/^\(\((?:Credit:\s*)?([^)]+?)\s*\)\).*/i, "$1")
.trim();
entry.image.attribution = attribution;
} else if (text && text.match(/^\s*\(\(slugline:/i)) {
const slugline = text
.replace(/^\(\((?:slugline:\s*)?([^)]+?)\s*\)\).*/i, "$1")
.trim();
entry.slugline = slugline;
} else if (text) {
if (text.startsWith("———")) {
const hr = document.createElement("hr");
newBody.appendChild(hr);
} else if (text.startsWith("[")) {
const actionText = text.replace(/^\[([^\]]+)\]/, "$1").trim();
const detectedActionName = isMove(actionText) || isAsset(actionText);
if (
!currentAction ||
(detectedActionName &&
!currentActionName.match(
new RegExp(`^${detectedActionName}`, "i")
))
) {
currentAction = document.createElement("aside");
currentActionName = detectedActionName;
currentAction.classList.add("action");
newBody.appendChild(currentAction);
const newItem = makeActionHeader(document, actionText);
currentAction.appendChild(newItem);
continue;
}
const newItem = makeActionItem(
document,
actionText.replace(
new RegExp(`^${currentActionName}:?\s*`, "i"),
""
)
);
currentAction.appendChild(newItem);
} else {
if (currentAction) {
currentActionName = null;
currentAction = null;
}
const note = document.createElement("p");
note.innerHTML =
el instanceof dom.window.HTMLElement
? el.innerHTML
: el.textContent;
newBody.appendChild(note);
}
}
}
}
entry.content = newBody.innerHTML;
}
function makeActionHeader(document: Document, actionText: string): HTMLElement {
const actionHeader = document.createElement("header");
actionHeader.textContent = actionText;
return actionHeader;
}
function makeActionItem(
document: Document,
actionText: string
): HTMLParagraphElement | HTMLDListElement {
const roll = parseRoll(actionText);
if (roll) {
const actionItem = document.createElement("dl");
actionItem.classList.add("roll");
let outcome;
const actionScore = Math.min(
10,
roll.action + (roll.stat ?? 0) + (roll.add ?? 0)
);
if (actionScore > roll.challenge1 && actionScore > roll.challenge2) {
actionItem.classList.add("strong-hit");
outcome = "Strong Hit";
} else if (actionScore > roll.challenge1 || actionScore > roll.challenge2) {
actionItem.classList.add("weak-hit");
outcome = "Weak Hit";
} else {
actionItem.classList.add("miss");
outcome = "Miss";
}
if (roll.challenge1 === roll.challenge2) {
actionItem.classList.add("match");
outcome += " With a Match";
}
if (roll.stat !== undefined && roll.add !== undefined) {
actionItem.innerHTML = `
<dt>Action</dt>
<dd class="action-die" data-value="${roll.action}">${roll.action}</dd>
<dt>Stat</dt>
<dd class="stat" data-value="${roll.stat}">${roll.stat}</dd>
<dt>Add</dt>
<dd class="add" data-value="${roll.add}">${roll.add}</dd>
<dt>Total</dt>
<dd class="total" data-value="${roll.action + roll.stat + roll.add}">${
roll.action + roll.stat + roll.add
}</dd>
<dt>Challenge Die 1</dt>
<dd class="challenge-die" data-value="${roll.challenge1}">${
roll.challenge1
}</dd>
<dt>Challenge Die 2</dt>
<dd class="challenge-die" data-value="${roll.challenge2}">${
roll.challenge2
}</dd>
<dt>Outcome</dt>
<dd class="outcome">${outcome}</dd>
`;
} else {
actionItem.classList.add("progress");
actionItem.innerHTML = `
<dt>Progress</dt>
<dd class="progress-score" data-value="${roll.action}">${roll.action}</dd>
<dt>Challenge Die 1</dt>
<dd class="challenge-die" data-value="${roll.challenge1}">${roll.challenge1}</dd>
<dt>Challenge Die 2</dt>
<dd class="challenge-die" data-value="${roll.challenge2}">${roll.challenge2}</dd>
<dt>Outcome</dt>
<dd class="outcome">${outcome}</dd>
`;
}
return actionItem;
} else {
const actionItem = document.createElement("p");
actionItem.classList.add("action-item");
actionItem.textContent = actionText;
return actionItem;
}
}
function isMove(text: string): string | undefined {
text = text.toLowerCase();
for (const category of Object.values(STARFORGED.moves)) {
for (const move of Object.values(category.contents ?? {})) {
const name = (move.canonical_name ?? move.name).toLowerCase();
if (text.startsWith(name)) {
return name;
}
}
}
}
function isAsset(text: string): string | undefined {
text = text.toLowerCase();
for (const collection of Object.values(STARFORGED.assets)) {
for (const asset of Object.values(collection.contents ?? {})) {
const name = (asset.canonical_name ?? asset.name).toLowerCase();
if (text.startsWith(name)) {
return name;
}
}
}
}
async function loreFromFaction(faction: IFaction): Promise<ILoreEntry> {
const dom = new JSDOM(`<!DOCTYPE html><html><body></body></html>`);
const doc = dom.window.document;
const table = doc.createElement("table");
table.classList.add("faction-traits");
doc.body.appendChild(table);
const rows = [
["Type", faction.type],
["Influence", faction.influence],
["Leadership", faction.leadership],
["Sphere", faction.sphere],
["Projects", faction.projects],
["Relationships", faction.relationships],
["Quirks", faction.quirks],
["Rumors", faction.rumors],
];
for (const [label, content] of rows) {
if (!content) {
continue;
}
const row = doc.createElement("tr");
const labelCell = doc.createElement("td");
labelCell.textContent = label;
const contentCell = doc.createElement("td");
contentCell.textContent = content;
row.appendChild(labelCell);
row.appendChild(contentCell);
table.appendChild(row);
}
const notes = doc.createElement("article");
notes.classList.add("faction-notes");
doc.body.appendChild(notes);
let img: string | undefined;
let credit: string | undefined;
let slugline: string | undefined;
for (const paragraph of faction.notes
.split("\n")
.map((p) => p.trim())
.filter((p) => !!p)) {
if (paragraph.match(/^\(\(image:/i)) {
img = paragraph.replace(/^\(\(Image:\s*([^)]+?)\s*\)\).*/i, "$1").trim();
} else if (paragraph.match(/\(\(credit:/i)) {
credit = paragraph
.replace(/^\(\(Credit:\s*([^)]+?)\s*\)\).*/i, "$1")
.trim();
} else if (paragraph.match(/^\(\(slugline:/i)) {
slugline = paragraph
.replace(/^\(\(slugline:\s*([^)]+?)\s*\)\).*/i, "$1")
.trim();
} else {
const notesParagraph = doc.createElement("p");
notesParagraph.textContent = paragraph;
notes.appendChild(notesParagraph);
}
}
return {
title: `Faction: ${faction.name}`,
content: dom.window.document.body.innerHTML,
tags: ["faction"],
image: img && {
src: await imageToFile(faction.name, img),
attribution: credit,
},
};
}
async function imageToFile(name: string, imgUri: string): Promise<string> {
if (imgUri.startsWith("data:")) {
const [base, data] = imgUri.split(",");
const ext = base.replace(/.*?image\/([a-zA-Z0-9]+).*/, ".$1");
const newUri = join("img", "campaigns", `${slug(name)}${ext}`);
const imgPath = join(
dirname(fileURLToPath(import.meta.url)),
"..",
"content",
newUri
);
await mkdir(dirname(imgPath), { recursive: true });
await writeFile(imgPath, Buffer.from(data, "base64"));
return join("/", newUri);
} else {
const filename = basename(imgUri);
const newUri = join("img", "campaigns", filename);
const imgPath = join(
dirname(fileURLToPath(import.meta.url)),
"..",
"content",
newUri
);
await mkdir(dirname(imgPath), { recursive: true });
const req = await fetch(imgUri);
if (req.status !== 200) {
console.error(
`Failed to fetch ${imgUri}. Proceeding and hoping we still have the image cached.`
);
return newUri;
}
const fileStream = createWriteStream(imgPath);
await finished(
Readable.fromWeb(req.body as ReadableStream<any>).pipe(fileStream)
);
return join("/", newUri);
}
}
function slug(text: string): string {
return slugify(text, { lower: true, strict: true, remove: /[*+~.()'"!:@]/g });
}
function parseRoll(text: string): IRoll | undefined {
const match = text.match(
/^\s*(?:miss|weak hit|strong hit).*?: (\d+) \+ (\d+) \+ (\d+) = \d+ vs (\d+) \| (\d+)\s*$/i
);
if (match) {
return {
action: parseInt(match[1]),
stat: parseInt(match[2]),
add: parseInt(match[3]),
challenge1: parseInt(match[4]),
challenge2: parseInt(match[5]),
};
}
const progressMatch = text.match(
/^\s*progress roll:.*?= (\d+) vs (\d+) \| (\d+)\s*$/i
);
if (progressMatch) {
return {
action: parseInt(progressMatch[1]),
challenge1: parseInt(progressMatch[2]),
challenge2: parseInt(progressMatch[3]),
};
}
}
|
zkat/zkat.github.io
| 2
|
Web sight
|
TypeScript
|
zkat
|
Kat Marchán
|
Fastly, Inc
|
importers/to_markdown.ts
|
TypeScript
|
import { mkdir, writeFile } from "node:fs/promises";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import { JSDOM } from "jsdom";
import slugify from "slugify";
import { ICampaign, IImage, IJournalEntry } from "../_data/campaigns";
const WRAP_WIDTH = 100;
const DIRNAME = dirname(fileURLToPath(import.meta.url));
await main();
async function main(): Promise<void> {
const campaigns: ICampaign[] = (
await import(join(DIRNAME, "..", "_data", "campaigns.cjs"))
).default;
for (const campaign of campaigns) {
const journalDir = join(
DIRNAME,
"..",
"export",
slugify(campaign.name),
"journals"
);
await mkdir(journalDir, { recursive: true });
for (const journal of campaign.journal) {
const journalPath = join(journalDir, `${journal.title}.md`);
await writeFile(journalPath, toMarkdown(journal));
}
const loreDir = join(
DIRNAME,
"..",
"export",
slugify(campaign.name),
"lore"
);
await mkdir(loreDir, { recursive: true });
for (const lore of campaign.lore) {
const lorePath = join(loreDir, `${lore.title}.md`);
await writeFile(lorePath, toMarkdown(lore));
}
}
}
function toMarkdown(journal: IJournalEntry): string {
let md = "---\n";
md += `title: ${JSON.stringify(journal.title.trim())}\n`;
if (journal.slugline) {
md += `slugline: ${JSON.stringify(journal.slugline.trim())}\n`;
}
if (journal.image) {
md += "image:\n";
md += ` src: ${JSON.stringify(imgSrc(journal.image))}\n`;
if (journal.image.alt) {
md += ` alt: ${JSON.stringify(journal.image.alt.trim())}\n`;
}
if (journal.image.attribution) {
md += ` attribution: ${JSON.stringify(
journal.image.attribution.trim()
)}\n`;
}
}
md += "---\n\n";
if (journal.image) {
md += `![[${imgSrc(journal.image)}|source: ${
journal.image.attribution
}]]\n\n`;
}
const dom = new JSDOM(journal.content);
const body = dom.window.document.body;
for (const child of body.children) {
md += elementToMarkdown(child);
md += "\n\n";
}
return md;
}
function elementToMarkdown(element: Element): string {
if (match("hr")) {
return "***";
} else if (match("aside.action")) {
return actionToMarkdown(element);
} else {
return element.textContent.trim();
}
function match(selector: string): boolean {
return element.matches(selector);
}
}
function actionToMarkdown(element: Element): string {
const header = element.querySelector(":scope > header");
let kdl = "```mechanics\n";
kdl += `move ${JSON.stringify(header.textContent.trim())} {\n`;
const i = " ";
for (const el of element.querySelectorAll(":scope > dl, :scope > p")) {
if (el.matches("dl.progress")) {
const score = val(el, ".progress-score");
const challengeDice = el.querySelectorAll(".challenge-die");
kdl +=
i +
`progress-roll score=${score} vs1=${challengeDice[0].getAttribute(
"data-value"
)} vs2=${challengeDice[1].getAttribute("data-value")}\n`;
} else if (el.matches("dl.roll")) {
const actionDie = val(el, ".action-die");
const stat = val(el, ".stat");
const adds = val(el, ".add");
const score = val(el, ".total");
const challengeDice = el.querySelectorAll(".challenge-die");
kdl +=
i +
`roll action=${actionDie} stat=${stat} adds=${adds} vs1=${challengeDice[0].getAttribute(
"data-value"
)} vs2=${challengeDice[1].getAttribute("data-value")}\n`;
} else {
kdl += i + `- ${JSON.stringify(el.textContent.trim())}\n`;
}
}
kdl += "}\n```";
return kdl;
function val(el: Element, selector: string): string {
return el.querySelector(selector).getAttribute("data-value");
}
}
function imgSrc(img: IImage): string {
return img.src.replace("/img/campaigns", "Images/Campaign");
}
|
zkat/zkat.github.io
| 2
|
Web sight
|
TypeScript
|
zkat
|
Kat Marchán
|
Fastly, Inc
|
public/css/index.css
|
CSS
|
/* Defaults */
:root {
--font-family: -apple-system, system-ui, sans-serif;
--font-family-monospace: Consolas, Menlo, Monaco, Andale Mono WT, Andale Mono,
Lucida Console, Lucida Sans Typewriter, DejaVu Sans Mono,
Bitstream Vera Sans Mono, Liberation Mono, Nimbus Mono L, Courier New,
Courier, monospace;
}
/* Theme colors */
:root {
--color-gray-20: #e0e0e0;
--color-gray-50: #c0c0c0;
--color-gray-90: #333;
--color-gray-30: #dad8d8;
--background-color: #fff;
--text-color: var(--color-gray-90);
--text-color-link: #082840;
--text-color-link-active: #5f2b48;
--text-color-link-visited: #17050f;
--syntax-tab-size: 2;
}
@media (prefers-color-scheme: dark) {
:root {
--text-color: var(--color-gray-30);
--text-color-link: #1493fb;
--text-color-link-active: #6969f7;
--text-color-link-visited: #a6a6f8;
--background-color: #15202b;
}
}
/* Global stylesheet */
* {
box-sizing: border-box;
}
html,
body {
padding: 0;
margin: 0 auto;
font-family: var(--font-family);
color: var(--text-color);
background-color: var(--background-color);
}
html {
overflow-y: scroll;
}
body {
max-width: 40em;
}
/* https://www.a11yproject.com/posts/how-to-hide-content/ */
.visually-hidden {
clip: rect(0 0 0 0);
clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}
p:last-child {
margin-bottom: 0;
}
p {
line-height: 1.5;
}
li {
line-height: 1.5;
}
a[href] {
color: var(--text-color-link);
}
a[href]:visited {
color: var(--text-color-link-visited);
}
a[href]:hover,
a[href]:active {
color: var(--text-color-link-active);
}
main {
padding: 1rem;
}
main :first-child {
margin-top: 0;
}
header {
border-bottom: 1px dashed var(--color-gray-20);
}
header:after {
content: "";
display: table;
clear: both;
}
.links-nextprev {
list-style: none;
border-top: 1px dashed var(--color-gray-20);
padding: 1em 0;
}
table {
margin: 1em 0;
}
table td,
table th {
padding-right: 1em;
}
pre,
code {
font-family: var(--font-family-monospace);
}
pre:not([class*="language-"]) {
margin: 0.5em 0;
line-height: 1.375; /* 22px /16 */
-moz-tab-size: var(--syntax-tab-size);
-o-tab-size: var(--syntax-tab-size);
tab-size: var(--syntax-tab-size);
-webkit-hyphens: none;
-ms-hyphens: none;
hyphens: none;
direction: ltr;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
}
code {
word-break: break-all;
}
/* Header */
header {
display: flex;
gap: 1em 0.5em;
flex-wrap: wrap;
align-items: center;
padding: 1em;
}
.home-link {
font-size: 1em; /* 16px /16 */
font-weight: 700;
margin-right: 2em;
}
.home-link:link:not(:hover) {
text-decoration: none;
}
/* Nav */
.nav {
display: flex;
padding: 0;
margin: 0;
list-style: none;
}
.nav-item {
display: inline-block;
margin-right: 1em;
}
.nav-item a[href]:not(:hover) {
text-decoration: none;
}
.nav a[href][aria-current="page"] {
text-decoration: underline;
}
/* Posts list */
.postlist {
list-style: none;
padding: 0;
padding-left: 1.5rem;
}
.postlist-item {
display: flex;
flex-wrap: wrap;
align-items: baseline;
counter-increment: start-from -1;
margin-bottom: 1em;
}
.postlist-item:before {
display: inline-block;
pointer-events: none;
content: "" counter(start-from, decimal-leading-zero) ". ";
line-height: 100%;
text-align: right;
margin-left: -1.5rem;
}
.postlist-date,
.postlist-item:before {
font-size: 0.8125em; /* 13px /16 */
color: var(--text-color);
}
.postlist-date {
word-spacing: -0.5px;
}
.postlist-link {
font-size: 1.1875em; /* 19px /16 */
font-weight: 700;
flex-basis: calc(100% - 1.5rem);
padding-left: 0.25em;
padding-right: 0.5em;
text-underline-position: from-font;
text-underline-offset: 0;
text-decoration-thickness: 1px;
}
.postlist-item-active .postlist-link {
font-weight: bold;
}
/* Tags */
.post-tag {
display: inline-flex;
align-items: center;
justify-content: center;
text-transform: capitalize;
font-style: italic;
}
.postlist-item > .post-tag {
align-self: center;
}
/* Tags list */
.post-metadata {
display: inline-flex;
flex-wrap: wrap;
gap: 0.5em;
list-style: none;
padding: 0;
margin: 0;
}
.post-metadata time {
margin-right: 1em;
}
/* Direct Links / Markdown Headers */
.header-anchor {
text-decoration: none;
font-style: normal;
font-size: 1em;
margin-left: 0.1em;
}
a[href].header-anchor,
a[href].header-anchor:visited {
color: transparent;
}
a[href].header-anchor:focus,
a[href].header-anchor:hover {
text-decoration: underline;
}
a[href].header-anchor:focus,
:hover > a[href].header-anchor {
color: #aaa;
}
h2 + .header-anchor {
font-size: 1.5em;
}
/* Campaigns */
table {
width: 100%;
border: 1px solid var(--color-gray-50);
border-collapse: collapse;
& td {
border: 1px solid var(--color-gray-50);
padding: 0.5em;
&:has(+ td) {
font-weight: bold;
}
}
}
article.entry-card {
color: var(--text-color);
position: relative;
overflow: hidden;
height: 100%;
aspect-ratio: 16 / 9;
border-radius: 12px;
object-fit: contain;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
transition: all 300ms;
@media (min-width: 320px) {
font-size: 1.4em;
}
@media (min-width: 768px) {
font-size: 1em;
}
@media (min-width: 1024px) {
font-size: 0.8em;
}
& header {
cursor: default;
border: none;
box-sizing: border-box;
width: 100%;
height: auto;
padding: 1.5em;
position: absolute;
bottom: 0;
color: #fff;
background: linear-gradient(transparent, rgba(0, 0, 0, 0.99));
&:after {
content: none;
display: inline;
}
}
& figure {
margin: 0;
width: 100%;
height: 100%;
object-fit: cover;
& figcaption {
display: none;
}
}
& img {
overflow: hidden;
object-fit: cover;
height: 100%;
width: 100%;
}
}
.entry-cards {
padding: 0;
gap: 0.5em;
list-style-type: none;
display: grid;
grid-template-columns: repeat(1, minmax(0, 1fr));
@media (min-width: 640px) {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 1024px) {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
& .entry-card:hover {
transform: translateY(-2px);
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
}
& .entry-card header {
cursor: pointer;
}
& a {
text-decoration: none;
color: var(--text-color);
&:visited {
color: var(--text-color);
}
}
}
aside.reading-time {
padding-top: 1em;
opacity: 75%;
display: inline;
&:before {
content: " — ";
}
}
article.campaign-entry {
& .entry-card header {
padding-bottom: 2em;
}
& footer {
text-align: center;
}
& p {
text-indent: 1em;
}
& hr {
max-width: 100%;
margin: 1.5em;
}
& figcaption {
font-size: 0.75em;
opacity: 0.75;
color: var(--text-color);
padding: 1em;
&:before {
content: "Credit: ";
}
}
& figure {
margin: 0;
}
& aside.action {
cursor: default;
background-color: var(--color-gray-20);
color: var(--color-gray-90);
margin: 1em;
border: 1px solid var(--color-gray-90);
border-radius: 10px;
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
& header {
display: block;
font-size: 1.2em;
border: none;
width: 100%;
padding: 1em;
text-align: center;
font-weight: bolder;
&:has(+ div) {
border-bottom: 1px dashed var(--color-gray-90);
}
}
& p {
margin: 1em;
font-weight: bold;
&:before {
content: "➡️";
margin-right: 0.5em;
}
}
& dl.roll {
margin: 1em;
padding-left: 1em;
display: flex;
flex-wrap: wrap;
@media (min-width: 640px) {
display: grid;
grid-template-columns: repeat(7, 1fr);
}
&.progress {
@media (min-width: 640px) {
grid-template-columns: repeat(8, 1fr);
}
}
& * {
filter: invert(1) hue-rotate(180deg);
}
& dt, & dd {
display: inline-block;
margin: auto;
height: 40px;
text-indent: -9999px;
background-position: center;
background-size: contain;
background-repeat: no-repeat;
text-align: center;
}
&:after {
font-size: 2em;
font-weight: bold;
text-align: center;
margin-right: auto;
}
&.strong-hit {
&:after {
content: "Strong Hit";
color: green;
}
&.match:after {
content: "Strong Hit (Match)";
}
& dd.outcome {
background-image: url("/img/Shortcut_Images/Outcomes/outcome-strong-hit.svg");
}
}
&.weak-hit {
&:after {
content: "Weak Hit";
color: goldenrod;
}
&.match:after {
content: "Weak Hit (Match)";
}
& dd.outcome {
background-image: url("/img/Shortcut_Images/Outcomes/outcome-weak-hit.svg");
}
}
&.miss {
&:after {
content: "Miss";
color: red;
}
&.match:after {
content: "Miss (Match)";
}
& dd.outcome {
background-image: url("/img/Shortcut_Images/Outcomes/outcome-miss.svg");
}
}
& dt {
margin: auto;
width: 30px;
flex-basis: 1em;
&:has(+ .action-die), &:has(+ .progress-score) {
width: 0;
height: 0;
display: none;
}
&:has(+ .stat) {
background-image: url("/img/Shortcut_Images/Words/plus-t.svg");
}
&:has(+ .add) {
background-image: url("/img/Shortcut_Images/Words/plus-t.svg");
}
&:has(+ .total) {
background-image: url("/img/Shortcut_Images/Words/equals-t.svg");
width: 100%;
flex-basis: initial;
&:before {
display: inline;
content: "\A";
}
}
&:has(+ .challenge-die) {
&:before {
display: inline;
content: "\A";
}
flex-basis: initial;
background-image: url("/img/Shortcut_Images/Words/vs-t.svg");
width: 100%;
& ~ dt:has(+ .challenge-die) {
&:before {
content: none;
}
background-image: url("/img/Shortcut_Images/Words/and-t.svg");
width: 60px;
}
}
&:has(+ .outcome) {
background-image: url("/img/Shortcut_Images/Words/equals-t.svg");
width: 100%;
flex-basis: initial;
&:before {
display: inline;
content: "\A";
}
}
}
& dd {
width: 60px;
&.action-die {
grid-column-start: 1;
&[data-value="1"] {
background-image: url("/img/Shortcut_Images/D6/d6-1-t.svg");
}
&[data-value="2"] {
background-image: url("/img/Shortcut_Images/D6/d6-2-t.svg");
}
&[data-value="3"] {
background-image: url("/img/Shortcut_Images/D6/d6-3-t.svg");
}
&[data-value="4"] {
background-image: url("/img/Shortcut_Images/D6/d6-4-t.svg");
}
&[data-value="5"] {
background-image: url("/img/Shortcut_Images/D6/d6-5-t.svg");
}
&[data-value="6"] {
background-image: url("/img/Shortcut_Images/D6/d6-6-t.svg");
}
}
&.stat {
&[data-value="1"] {
background-image: url("/img/Shortcut_Images/Stat/stat-1-t.svg");
}
&[data-value="2"] {
background-image: url("/img/Shortcut_Images/Stat/stat-2-t.svg");
}
&[data-value="3"] {
background-image: url("/img/Shortcut_Images/Stat/stat-3-t.svg");
}
&[data-value="4"] {
background-image: url("/img/Shortcut_Images/Stat/stat-4-t.svg");
}
&[data-value="5"] {
background-image: url("/img/Shortcut_Images/Stat/stat-5-t.svg");
}
}
&.add {
&[data-value="0"] {
background-image: url("/img/Shortcut_Images/Add/add-0-t.svg");
}
&[data-value="1"] {
background-image: url("/img/Shortcut_Images/Add/add-1-t.svg");
}
&[data-value="2"] {
background-image: url("/img/Shortcut_Images/Add/add-2-t.svg");
}
&[data-value="3"] {
background-image: url("/img/Shortcut_Images/Add/add-3-t.svg");
}
&[data-value="4"] {
background-image: url("/img/Shortcut_Images/Add/add-4-t.svg");
}
&[data-value="5"] {
background-image: url("/img/Shortcut_Images/Add/add-5-t.svg");
}
}
&.total {
&[data-value="0"] {
background-image: url("/img/Shortcut_Images/Total/total-0-t.svg");
}
&[data-value="1"] {
background-image: url("/img/Shortcut_Images/Total/total-1-t.svg");
}
&[data-value="2"] {
background-image: url("/img/Shortcut_Images/Total/total-2-t.svg");
}
&[data-value="3"] {
background-image: url("/img/Shortcut_Images/Total/total-3-t.svg");
}
&[data-value="4"] {
background-image: url("/img/Shortcut_Images/Total/total-4-t.svg");
}
&[data-value="5"] {
background-image: url("/img/Shortcut_Images/Total/total-5-t.svg");
}
&[data-value="6"] {
background-image: url("/img/Shortcut_Images/Total/total-6-t.svg");
}
&[data-value="7"] {
background-image: url("/img/Shortcut_Images/Total/total-7-t.svg");
}
&[data-value="8"] {
background-image: url("/img/Shortcut_Images/Total/total-8-t.svg");
}
&[data-value="9"] {
background-image: url("/img/Shortcut_Images/Total/total-9-t.svg");
}
&[data-value="10"] {
background-image: url("/img/Shortcut_Images/Total/total-10-t.svg");
}
}
&.challenge-die {
&[data-value="1"] {
background-image: url("/img/Shortcut_Images/D10/d10-1-t.svg");
}
&[data-value="2"] {
background-image: url("/img/Shortcut_Images/D10/d10-2-t.svg");
}
&[data-value="3"] {
background-image: url("/img/Shortcut_Images/D10/d10-3-t.svg");
}
&[data-value="4"] {
background-image: url("/img/Shortcut_Images/D10/d10-4-t.svg");
}
&[data-value="5"] {
background-image: url("/img/Shortcut_Images/D10/d10-5-t.svg");
}
&[data-value="6"] {
background-image: url("/img/Shortcut_Images/D10/d10-6-t.svg");
}
&[data-value="7"] {
background-image: url("/img/Shortcut_Images/D10/d10-7-t.svg");
}
&[data-value="8"] {
background-image: url("/img/Shortcut_Images/D10/d10-8-t.svg");
}
&[data-value="9"] {
background-image: url("/img/Shortcut_Images/D10/d10-9-t.svg");
}
&[data-value="10"] {
background-image: url("/img/Shortcut_Images/D10/d10-10-t.svg");
}
}
&.progress-score {
&[data-value="0"] {
background-image: url("/img/Shortcut_Images/Progress/progress-0-t.svg");
}
&[data-value="1"] {
background-image: url("/img/Shortcut_Images/Progress/progress-1-t.svg");
}
&[data-value="2"] {
background-image: url("/img/Shortcut_Images/Progress/progress-2-t.svg");
}
&[data-value="3"] {
background-image: url("/img/Shortcut_Images/Progress/progress-3-t.svg");
}
&[data-value="4"] {
background-image: url("/img/Shortcut_Images/Progress/progress-4-t.svg");
}
&[data-value="5"] {
background-image: url("/img/Shortcut_Images/Progress/progress-5-t.svg");
}
&[data-value="6"] {
background-image: url("/img/Shortcut_Images/Progress/progress-6-t.svg");
}
&[data-value="7"] {
background-image: url("/img/Shortcut_Images/Progress/progress-7-t.svg");
}
&[data-value="8"] {
background-image: url("/img/Shortcut_Images/Progress/progress-8-t.svg");
}
&[data-value="9"] {
background-image: url("/img/Shortcut_Images/Progress/progress-9-t.svg");
}
&[data-value="10"] {
background-image: url("/img/Shortcut_Images/Progress/progress-10-t.svg");
}
}
}
}
}
}
|
zkat/zkat.github.io
| 2
|
Web sight
|
TypeScript
|
zkat
|
Kat Marchán
|
Fastly, Inc
|
public/css/message-box.css
|
CSS
|
/* Message Box */
.message-box {
--color-message-box: #ffc;
display: block;
background-color: var(--color-message-box);
color: var(--color-gray-90);
padding: 1em 0.625em; /* 16px 10px /16 */
}
.message-box ol {
margin-top: 0;
}
@media (prefers-color-scheme: dark) {
.message-box {
--color-message-box: #082840;
}
}
|
zkat/zkat.github.io
| 2
|
Web sight
|
TypeScript
|
zkat
|
Kat Marchán
|
Fastly, Inc
|
public/css/prism-diff.css
|
CSS
|
/*
* New diff- syntax
*/
pre[class*="language-diff-"] {
--eleventy-code-padding: 1.25em;
padding-left: var(--eleventy-code-padding);
padding-right: var(--eleventy-code-padding);
}
.token.deleted {
background-color: hsl(0, 51%, 37%);
color: inherit;
}
.token.inserted {
background-color: hsl(126, 31%, 39%);
color: inherit;
}
/* Make the + and - characters unselectable for copy/paste */
.token.prefix.unchanged,
.token.prefix.inserted,
.token.prefix.deleted {
-webkit-user-select: none;
user-select: none;
display: inline-flex;
align-items: center;
justify-content: center;
padding-top: 2px;
padding-bottom: 2px;
}
.token.prefix.inserted,
.token.prefix.deleted {
width: var(--eleventy-code-padding);
background-color: rgba(0,0,0,.2);
}
/* Optional: full-width background color */
.token.inserted:not(.prefix),
.token.deleted:not(.prefix) {
display: block;
margin-left: calc(-1 * var(--eleventy-code-padding));
margin-right: calc(-1 * var(--eleventy-code-padding));
text-decoration: none; /* override del, ins, mark defaults */
color: inherit; /* override del, ins, mark defaults */
}
|
zkat/zkat.github.io
| 2
|
Web sight
|
TypeScript
|
zkat
|
Kat Marchán
|
Fastly, Inc
|
babel.config.js
|
JavaScript
|
'use strict';
module.exports = {
// use transforms which does not use ES5+ builtins
plugins: [
['@babel/transform-member-expression-literals'],
['@babel/transform-property-literals'],
['@babel/transform-arrow-functions'],
['@babel/transform-block-scoped-functions'],
['@babel/transform-block-scoping'],
// it seems `setClassMethods` unlike `loose` does not work
['@babel/transform-classes', { loose: true }],
// private instance props in IE8- only with polyfills
['@babel/transform-class-properties'],
['@babel/transform-class-static-block'],
['@babel/transform-computed-properties'],
['@babel/transform-destructuring'],
['@babel/transform-duplicate-named-capturing-groups-regex'],
['@babel/transform-explicit-resource-management'],
['@babel/transform-exponentiation-operator'],
['@babel/transform-for-of'],
['@babel/transform-literals'],
['@babel/transform-logical-assignment-operators'],
['@babel/transform-new-target'],
['@babel/transform-nullish-coalescing-operator'],
['@babel/transform-numeric-separator'],
['@babel/transform-object-rest-spread'],
['@babel/transform-object-super'],
['@babel/transform-optional-catch-binding'],
['@babel/transform-optional-chaining'],
['@babel/transform-parameters'],
['@babel/transform-private-methods'],
['@babel/transform-private-property-in-object'],
['@babel/transform-regenerator', { generators: true }],
['@babel/transform-regexp-modifiers'],
['@babel/transform-reserved-words'],
['@babel/transform-shorthand-properties'],
['@babel/transform-spread'],
['@babel/transform-template-literals'],
['@babel/transform-unicode-regex'],
// use it instead of webpack es modules for support engines without descriptors
['@babel/transform-modules-commonjs'],
],
assumptions: {
constantReexports: true,
constantSuper: true,
enumerableModuleMeta: true,
iterableIsArray: true,
mutableTemplateObject: false,
noClassCalls: true,
noDocumentAll: true,
noIncompleteNsImportDetection: true,
noNewArrows: true,
objectRestNoSymbols: true,
privateFieldsAsProperties: true,
setClassMethods: true,
setComputedProperties: true,
setPublicClassFields: true,
setSpreadProperties: true,
skipForOfIteratorClosing: true,
superIsCallableConstructor: true,
},
};
|
zloirock/core-js
| 25,418
|
Standard Library
|
JavaScript
|
zloirock
|
Denis Pushkarev
| |
deno/corejs/index.js
|
JavaScript
|
/**
* core-js 3.48.0
* © 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.
* license: https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE
* source: https://github.com/zloirock/core-js
*/
!function (undefined) { 'use strict'; /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ var __webpack_require__ = function (moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(1);
__webpack_require__(47);
__webpack_require__(48);
__webpack_require__(88);
__webpack_require__(89);
__webpack_require__(105);
__webpack_require__(106);
__webpack_require__(107);
__webpack_require__(109);
__webpack_require__(111);
__webpack_require__(112);
__webpack_require__(116);
__webpack_require__(118);
__webpack_require__(121);
__webpack_require__(122);
__webpack_require__(123);
__webpack_require__(124);
__webpack_require__(129);
__webpack_require__(134);
__webpack_require__(142);
__webpack_require__(143);
__webpack_require__(147);
__webpack_require__(149);
__webpack_require__(153);
__webpack_require__(154);
__webpack_require__(160);
__webpack_require__(161);
__webpack_require__(163);
__webpack_require__(164);
__webpack_require__(166);
__webpack_require__(167);
__webpack_require__(168);
__webpack_require__(169);
__webpack_require__(170);
__webpack_require__(171);
__webpack_require__(172);
__webpack_require__(173);
__webpack_require__(176);
__webpack_require__(178);
__webpack_require__(180);
__webpack_require__(182);
__webpack_require__(184);
__webpack_require__(186);
__webpack_require__(187);
__webpack_require__(190);
__webpack_require__(191);
__webpack_require__(192);
__webpack_require__(193);
__webpack_require__(194);
__webpack_require__(222);
__webpack_require__(223);
__webpack_require__(224);
__webpack_require__(225);
__webpack_require__(226);
__webpack_require__(227);
__webpack_require__(234);
__webpack_require__(235);
__webpack_require__(236);
__webpack_require__(237);
__webpack_require__(242);
__webpack_require__(245);
__webpack_require__(255);
__webpack_require__(257);
__webpack_require__(259);
__webpack_require__(261);
__webpack_require__(263);
__webpack_require__(266);
__webpack_require__(268);
__webpack_require__(269);
__webpack_require__(270);
__webpack_require__(274);
__webpack_require__(275);
__webpack_require__(277);
__webpack_require__(278);
__webpack_require__(279);
__webpack_require__(281);
__webpack_require__(282);
__webpack_require__(283);
__webpack_require__(286);
__webpack_require__(291);
__webpack_require__(293);
__webpack_require__(295);
__webpack_require__(296);
__webpack_require__(297);
__webpack_require__(298);
__webpack_require__(301);
__webpack_require__(303);
__webpack_require__(307);
__webpack_require__(309);
__webpack_require__(311);
__webpack_require__(313);
__webpack_require__(314);
__webpack_require__(315);
__webpack_require__(316);
__webpack_require__(317);
__webpack_require__(320);
__webpack_require__(321);
__webpack_require__(325);
__webpack_require__(326);
__webpack_require__(327);
__webpack_require__(328);
__webpack_require__(329);
__webpack_require__(331);
__webpack_require__(332);
__webpack_require__(334);
__webpack_require__(335);
__webpack_require__(336);
__webpack_require__(337);
__webpack_require__(338);
__webpack_require__(339);
__webpack_require__(340);
__webpack_require__(343);
__webpack_require__(357);
__webpack_require__(358);
__webpack_require__(359);
__webpack_require__(361);
__webpack_require__(363);
__webpack_require__(364);
__webpack_require__(365);
__webpack_require__(366);
__webpack_require__(367);
__webpack_require__(369);
__webpack_require__(370);
__webpack_require__(371);
__webpack_require__(372);
__webpack_require__(374);
__webpack_require__(375);
__webpack_require__(376);
__webpack_require__(380);
__webpack_require__(381);
__webpack_require__(382);
__webpack_require__(383);
__webpack_require__(384);
__webpack_require__(385);
__webpack_require__(386);
__webpack_require__(387);
__webpack_require__(389);
__webpack_require__(391);
__webpack_require__(392);
__webpack_require__(393);
__webpack_require__(394);
__webpack_require__(395);
__webpack_require__(396);
__webpack_require__(398);
__webpack_require__(399);
__webpack_require__(400);
__webpack_require__(401);
__webpack_require__(404);
__webpack_require__(405);
__webpack_require__(406);
__webpack_require__(409);
__webpack_require__(410);
__webpack_require__(411);
__webpack_require__(412);
__webpack_require__(413);
__webpack_require__(415);
__webpack_require__(416);
__webpack_require__(417);
__webpack_require__(421);
__webpack_require__(423);
__webpack_require__(424);
__webpack_require__(425);
__webpack_require__(426);
__webpack_require__(427);
__webpack_require__(428);
__webpack_require__(429);
__webpack_require__(430);
__webpack_require__(431);
__webpack_require__(432);
__webpack_require__(433);
__webpack_require__(436);
__webpack_require__(437);
__webpack_require__(438);
__webpack_require__(439);
__webpack_require__(440);
__webpack_require__(441);
__webpack_require__(442);
__webpack_require__(443);
__webpack_require__(444);
__webpack_require__(445);
__webpack_require__(446);
__webpack_require__(447);
__webpack_require__(448);
__webpack_require__(449);
__webpack_require__(450);
__webpack_require__(451);
__webpack_require__(453);
__webpack_require__(455);
__webpack_require__(457);
__webpack_require__(458);
__webpack_require__(460);
__webpack_require__(461);
__webpack_require__(463);
__webpack_require__(464);
__webpack_require__(465);
__webpack_require__(466);
__webpack_require__(467);
__webpack_require__(468);
__webpack_require__(469);
__webpack_require__(471);
__webpack_require__(472);
__webpack_require__(473);
__webpack_require__(474);
__webpack_require__(475);
__webpack_require__(476);
__webpack_require__(477);
__webpack_require__(478);
__webpack_require__(481);
__webpack_require__(482);
__webpack_require__(483);
__webpack_require__(484);
__webpack_require__(487);
__webpack_require__(488);
__webpack_require__(489);
__webpack_require__(493);
__webpack_require__(494);
__webpack_require__(495);
__webpack_require__(497);
__webpack_require__(498);
__webpack_require__(499);
module.exports = __webpack_require__(500);
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var defineWellKnownSymbol = __webpack_require__(3);
var defineProperty = __webpack_require__(23).f;
var getOwnPropertyDescriptor = __webpack_require__(41).f;
var Symbol = globalThis.Symbol;
// `Symbol.asyncDispose` well-known symbol
// https://github.com/tc39/proposal-async-explicit-resource-management
defineWellKnownSymbol('asyncDispose');
if (Symbol) {
var descriptor = getOwnPropertyDescriptor(Symbol, 'asyncDispose');
// workaround of NodeJS 20.4 bug
// https://github.com/nodejs/node/issues/48699
// and incorrect descriptor from some transpilers and userland helpers
if (descriptor.enumerable && descriptor.configurable && descriptor.writable) {
defineProperty(Symbol, 'asyncDispose', { value: descriptor.value, enumerable: false, configurable: false, writable: false });
}
}
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var check = function (it) {
return it && it.Math === Math && it;
};
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
module.exports =
// eslint-disable-next-line es/no-global-this -- safe
check(typeof globalThis == 'object' && globalThis) ||
check(typeof window == 'object' && window) ||
// eslint-disable-next-line no-restricted-globals -- safe
check(typeof self == 'object' && self) ||
check(typeof global == 'object' && global) ||
check(typeof this == 'object' && this) ||
// eslint-disable-next-line no-new-func -- fallback
(function () { return this; })() || Function('return this')();
/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var path = __webpack_require__(4);
var hasOwn = __webpack_require__(5);
var wrappedWellKnownSymbolModule = __webpack_require__(12);
var defineProperty = __webpack_require__(23).f;
module.exports = function (NAME) {
var Symbol = path.Symbol || (path.Symbol = {});
if (!hasOwn(Symbol, NAME)) defineProperty(Symbol, NAME, {
value: wrappedWellKnownSymbolModule.f(NAME)
});
};
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
module.exports = globalThis;
/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
var toObject = __webpack_require__(9);
var hasOwnProperty = uncurryThis({}.hasOwnProperty);
// `HasOwnProperty` abstract operation
// https://tc39.es/ecma262/#sec-hasownproperty
// eslint-disable-next-line es/no-object-hasown -- safe
module.exports = Object.hasOwn || function hasOwn(it, key) {
return hasOwnProperty(toObject(it), key);
};
/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var NATIVE_BIND = __webpack_require__(7);
var FunctionPrototype = Function.prototype;
var call = FunctionPrototype.call;
// eslint-disable-next-line es/no-function-prototype-bind -- safe
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
module.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
return function () {
return call.apply(fn, arguments);
};
};
/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(8);
module.exports = !fails(function () {
// eslint-disable-next-line es/no-function-prototype-bind -- safe
var test = (function () { /* empty */ }).bind();
// eslint-disable-next-line no-prototype-builtins -- safe
return typeof test != 'function' || test.hasOwnProperty('prototype');
});
/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = function (exec) {
try {
return !!exec();
} catch (error) {
return true;
}
};
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var requireObjectCoercible = __webpack_require__(10);
var $Object = Object;
// `ToObject` abstract operation
// https://tc39.es/ecma262/#sec-toobject
module.exports = function (argument) {
return $Object(requireObjectCoercible(argument));
};
/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isNullOrUndefined = __webpack_require__(11);
var $TypeError = TypeError;
// `RequireObjectCoercible` abstract operation
// https://tc39.es/ecma262/#sec-requireobjectcoercible
module.exports = function (it) {
if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it);
return it;
};
/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// we can't use just `it == null` since of `document.all` special case
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
module.exports = function (it) {
return it === null || it === undefined;
};
/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var wellKnownSymbol = __webpack_require__(13);
exports.f = wellKnownSymbol;
/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var shared = __webpack_require__(14);
var hasOwn = __webpack_require__(5);
var uid = __webpack_require__(18);
var NATIVE_SYMBOL = __webpack_require__(19);
var USE_SYMBOL_AS_UID = __webpack_require__(22);
var Symbol = globalThis.Symbol;
var WellKnownSymbolsStore = shared('wks');
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;
module.exports = function (name) {
if (!hasOwn(WellKnownSymbolsStore, name)) {
WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name)
? Symbol[name]
: createWellKnownSymbol('Symbol.' + name);
} return WellKnownSymbolsStore[name];
};
/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var store = __webpack_require__(15);
module.exports = function (key, value) {
return store[key] || (store[key] = value || {});
};
/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var IS_PURE = __webpack_require__(16);
var globalThis = __webpack_require__(2);
var defineGlobalProperty = __webpack_require__(17);
var SHARED = '__core-js_shared__';
var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
(store.versions || (store.versions = [])).push({
version: '3.48.0',
mode: IS_PURE ? 'pure' : 'global',
copyright: '© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.',
license: 'https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE',
source: 'https://github.com/zloirock/core-js'
});
/***/ }),
/* 16 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = false;
/***/ }),
/* 17 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
// eslint-disable-next-line es/no-object-defineproperty -- safe
var defineProperty = Object.defineProperty;
module.exports = function (key, value) {
try {
defineProperty(globalThis, key, { value: value, configurable: true, writable: true });
} catch (error) {
globalThis[key] = value;
} return value;
};
/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
var id = 0;
var postfix = Math.random();
var toString = uncurryThis(1.1.toString);
module.exports = function (key) {
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
};
/***/ }),
/* 19 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* eslint-disable es/no-symbol -- required for testing */
var V8_VERSION = __webpack_require__(20);
var fails = __webpack_require__(8);
var globalThis = __webpack_require__(2);
var $String = globalThis.String;
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
var symbol = Symbol('symbol detection');
// Chrome 38 Symbol has incorrect toString conversion
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
// of course, fail.
return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
});
/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var userAgent = __webpack_require__(21);
var process = globalThis.process;
var Deno = globalThis.Deno;
var versions = process && process.versions || Deno && Deno.version;
var v8 = versions && versions.v8;
var match, version;
if (v8) {
match = v8.split('.');
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
// but their correct versions are not interesting for us
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
}
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
// so check `userAgent` even if `.v8` exists, but 0
if (!version && userAgent) {
match = userAgent.match(/Edge\/(\d+)/);
if (!match || match[1] >= 74) {
match = userAgent.match(/Chrome\/(\d+)/);
if (match) version = +match[1];
}
}
module.exports = version;
/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var navigator = globalThis.navigator;
var userAgent = navigator && navigator.userAgent;
module.exports = userAgent ? String(userAgent) : '';
/***/ }),
/* 22 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* eslint-disable es/no-symbol -- required for testing */
var NATIVE_SYMBOL = __webpack_require__(19);
module.exports = NATIVE_SYMBOL &&
!Symbol.sham &&
typeof Symbol.iterator == 'symbol';
/***/ }),
/* 23 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(24);
var IE8_DOM_DEFINE = __webpack_require__(25);
var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(29);
var anObject = __webpack_require__(30);
var toPropertyKey = __webpack_require__(31);
var $TypeError = TypeError;
// eslint-disable-next-line es/no-object-defineproperty -- safe
var $defineProperty = Object.defineProperty;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var ENUMERABLE = 'enumerable';
var CONFIGURABLE = 'configurable';
var WRITABLE = 'writable';
// `Object.defineProperty` method
// https://tc39.es/ecma262/#sec-object.defineproperty
exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
anObject(O);
P = toPropertyKey(P);
anObject(Attributes);
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
var current = $getOwnPropertyDescriptor(O, P);
if (current && current[WRITABLE]) {
O[P] = Attributes.value;
Attributes = {
configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
writable: false
};
}
} return $defineProperty(O, P, Attributes);
} : $defineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPropertyKey(P);
anObject(Attributes);
if (IE8_DOM_DEFINE) try {
return $defineProperty(O, P, Attributes);
} catch (error) { /* empty */ }
if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');
if ('value' in Attributes) O[P] = Attributes.value;
return O;
};
/***/ }),
/* 24 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(8);
// Detect IE8's incomplete defineProperty implementation
module.exports = !fails(function () {
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
});
/***/ }),
/* 25 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(24);
var fails = __webpack_require__(8);
var createElement = __webpack_require__(26);
// Thanks to IE8 for its funny defineProperty
module.exports = !DESCRIPTORS && !fails(function () {
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
return Object.defineProperty(createElement('div'), 'a', {
get: function () { return 7; }
}).a !== 7;
});
/***/ }),
/* 26 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var isObject = __webpack_require__(27);
var document = globalThis.document;
// typeof document.createElement is 'object' in old IE
var EXISTS = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
return EXISTS ? document.createElement(it) : {};
};
/***/ }),
/* 27 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isCallable = __webpack_require__(28);
module.exports = function (it) {
return typeof it == 'object' ? it !== null : isCallable(it);
};
/***/ }),
/* 28 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
var documentAll = typeof document == 'object' && document.all;
// `IsCallable` abstract operation
// https://tc39.es/ecma262/#sec-iscallable
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
module.exports = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
return typeof argument == 'function' || argument === documentAll;
} : function (argument) {
return typeof argument == 'function';
};
/***/ }),
/* 29 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(24);
var fails = __webpack_require__(8);
// V8 ~ Chrome 36-
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
module.exports = DESCRIPTORS && fails(function () {
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
value: 42,
writable: false
}).prototype !== 42;
});
/***/ }),
/* 30 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isObject = __webpack_require__(27);
var $String = String;
var $TypeError = TypeError;
// `Assert: Type(argument) is Object`
module.exports = function (argument) {
if (isObject(argument)) return argument;
throw new $TypeError($String(argument) + ' is not an object');
};
/***/ }),
/* 31 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toPrimitive = __webpack_require__(32);
var isSymbol = __webpack_require__(34);
// `ToPropertyKey` abstract operation
// https://tc39.es/ecma262/#sec-topropertykey
module.exports = function (argument) {
var key = toPrimitive(argument, 'string');
return isSymbol(key) ? key : key + '';
};
/***/ }),
/* 32 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(33);
var isObject = __webpack_require__(27);
var isSymbol = __webpack_require__(34);
var getMethod = __webpack_require__(37);
var ordinaryToPrimitive = __webpack_require__(40);
var wellKnownSymbol = __webpack_require__(13);
var $TypeError = TypeError;
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
// `ToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-toprimitive
module.exports = function (input, pref) {
if (!isObject(input) || isSymbol(input)) return input;
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
var result;
if (exoticToPrim) {
if (pref === undefined) pref = 'default';
result = call(exoticToPrim, input, pref);
if (!isObject(result) || isSymbol(result)) return result;
throw new $TypeError("Can't convert object to primitive value");
}
if (pref === undefined) pref = 'number';
return ordinaryToPrimitive(input, pref);
};
/***/ }),
/* 33 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var NATIVE_BIND = __webpack_require__(7);
var call = Function.prototype.call;
// eslint-disable-next-line es/no-function-prototype-bind -- safe
module.exports = NATIVE_BIND ? call.bind(call) : function () {
return call.apply(call, arguments);
};
/***/ }),
/* 34 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var getBuiltIn = __webpack_require__(35);
var isCallable = __webpack_require__(28);
var isPrototypeOf = __webpack_require__(36);
var USE_SYMBOL_AS_UID = __webpack_require__(22);
var $Object = Object;
module.exports = USE_SYMBOL_AS_UID ? function (it) {
return typeof it == 'symbol';
} : function (it) {
var $Symbol = getBuiltIn('Symbol');
return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
};
/***/ }),
/* 35 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var isCallable = __webpack_require__(28);
var aFunction = function (argument) {
return isCallable(argument) ? argument : undefined;
};
module.exports = function (namespace, method) {
return arguments.length < 2 ? aFunction(globalThis[namespace]) : globalThis[namespace] && globalThis[namespace][method];
};
/***/ }),
/* 36 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
module.exports = uncurryThis({}.isPrototypeOf);
/***/ }),
/* 37 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var aCallable = __webpack_require__(38);
var isNullOrUndefined = __webpack_require__(11);
// `GetMethod` abstract operation
// https://tc39.es/ecma262/#sec-getmethod
module.exports = function (V, P) {
var func = V[P];
return isNullOrUndefined(func) ? undefined : aCallable(func);
};
/***/ }),
/* 38 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isCallable = __webpack_require__(28);
var tryToString = __webpack_require__(39);
var $TypeError = TypeError;
// `Assert: IsCallable(argument) is true`
module.exports = function (argument) {
if (isCallable(argument)) return argument;
throw new $TypeError(tryToString(argument) + ' is not a function');
};
/***/ }),
/* 39 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $String = String;
module.exports = function (argument) {
try {
return $String(argument);
} catch (error) {
return 'Object';
}
};
/***/ }),
/* 40 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(33);
var isCallable = __webpack_require__(28);
var isObject = __webpack_require__(27);
var $TypeError = TypeError;
// `OrdinaryToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
module.exports = function (input, pref) {
var fn, val;
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
throw new $TypeError("Can't convert object to primitive value");
};
/***/ }),
/* 41 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(24);
var call = __webpack_require__(33);
var propertyIsEnumerableModule = __webpack_require__(42);
var createPropertyDescriptor = __webpack_require__(43);
var toIndexedObject = __webpack_require__(44);
var toPropertyKey = __webpack_require__(31);
var hasOwn = __webpack_require__(5);
var IE8_DOM_DEFINE = __webpack_require__(25);
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// `Object.getOwnPropertyDescriptor` method
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
O = toIndexedObject(O);
P = toPropertyKey(P);
if (IE8_DOM_DEFINE) try {
return $getOwnPropertyDescriptor(O, P);
} catch (error) { /* empty */ }
if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
};
/***/ }),
/* 42 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $propertyIsEnumerable = {}.propertyIsEnumerable;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// Nashorn ~ JDK8 bug
var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
// `Object.prototype.propertyIsEnumerable` method implementation
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
var descriptor = getOwnPropertyDescriptor(this, V);
return !!descriptor && descriptor.enumerable;
} : $propertyIsEnumerable;
/***/ }),
/* 43 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
};
/***/ }),
/* 44 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// toObject with fallback for non-array-like ES3 strings
var IndexedObject = __webpack_require__(45);
var requireObjectCoercible = __webpack_require__(10);
module.exports = function (it) {
return IndexedObject(requireObjectCoercible(it));
};
/***/ }),
/* 45 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
var fails = __webpack_require__(8);
var classof = __webpack_require__(46);
var $Object = Object;
var split = uncurryThis(''.split);
// fallback for non-array-like ES3 and non-enumerable old V8 strings
module.exports = fails(function () {
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
// eslint-disable-next-line no-prototype-builtins -- safe
return !$Object('z').propertyIsEnumerable(0);
}) ? function (it) {
return classof(it) === 'String' ? split(it, '') : $Object(it);
} : $Object;
/***/ }),
/* 46 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
var toString = uncurryThis({}.toString);
var stringSlice = uncurryThis(''.slice);
module.exports = function (it) {
return stringSlice(toString(it), 8, -1);
};
/***/ }),
/* 47 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var defineWellKnownSymbol = __webpack_require__(3);
var defineProperty = __webpack_require__(23).f;
var getOwnPropertyDescriptor = __webpack_require__(41).f;
var Symbol = globalThis.Symbol;
// `Symbol.dispose` well-known symbol
// https://github.com/tc39/proposal-explicit-resource-management
defineWellKnownSymbol('dispose');
if (Symbol) {
var descriptor = getOwnPropertyDescriptor(Symbol, 'dispose');
// workaround of NodeJS 20.4 bug
// https://github.com/nodejs/node/issues/48699
// and incorrect descriptor from some transpilers and userland helpers
if (descriptor.enumerable && descriptor.configurable && descriptor.writable) {
defineProperty(Symbol, 'dispose', { value: descriptor.value, enumerable: false, configurable: false, writable: false });
}
}
/***/ }),
/* 48 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* eslint-disable no-unused-vars -- required for functions `.length` */
var $ = __webpack_require__(49);
var globalThis = __webpack_require__(2);
var apply = __webpack_require__(72);
var wrapErrorConstructorWithCause = __webpack_require__(73);
var WEB_ASSEMBLY = 'WebAssembly';
var WebAssembly = globalThis[WEB_ASSEMBLY];
// eslint-disable-next-line es/no-error-cause -- feature detection
var FORCED = new Error('e', { cause: 7 }).cause !== 7;
var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
var O = {};
// eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation
O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED);
$({ global: true, constructor: true, arity: 1, forced: FORCED }, O);
};
var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
if (WebAssembly && WebAssembly[ERROR_NAME]) {
var O = {};
// eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation
O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED);
$({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED }, O);
}
};
// https://tc39.es/ecma262/#sec-nativeerror
exportGlobalErrorCauseWrapper('Error', function (init) {
return function Error(message) { return apply(init, this, arguments); };
});
exportGlobalErrorCauseWrapper('EvalError', function (init) {
return function EvalError(message) { return apply(init, this, arguments); };
});
exportGlobalErrorCauseWrapper('RangeError', function (init) {
return function RangeError(message) { return apply(init, this, arguments); };
});
exportGlobalErrorCauseWrapper('ReferenceError', function (init) {
return function ReferenceError(message) { return apply(init, this, arguments); };
});
exportGlobalErrorCauseWrapper('SyntaxError', function (init) {
return function SyntaxError(message) { return apply(init, this, arguments); };
});
exportGlobalErrorCauseWrapper('TypeError', function (init) {
return function TypeError(message) { return apply(init, this, arguments); };
});
exportGlobalErrorCauseWrapper('URIError', function (init) {
return function URIError(message) { return apply(init, this, arguments); };
});
exportWebAssemblyErrorCauseWrapper('CompileError', function (init) {
return function CompileError(message) { return apply(init, this, arguments); };
});
exportWebAssemblyErrorCauseWrapper('LinkError', function (init) {
return function LinkError(message) { return apply(init, this, arguments); };
});
exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
return function RuntimeError(message) { return apply(init, this, arguments); };
});
/***/ }),
/* 49 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var getOwnPropertyDescriptor = __webpack_require__(41).f;
var createNonEnumerableProperty = __webpack_require__(50);
var defineBuiltIn = __webpack_require__(51);
var defineGlobalProperty = __webpack_require__(17);
var copyConstructorProperties = __webpack_require__(59);
var isForced = __webpack_require__(71);
/*
options.target - name of the target object
options.global - target is the global object
options.stat - export as static methods of target
options.proto - export as prototype methods of target
options.real - real prototype method for the `pure` version
options.forced - export even if the native feature is available
options.bind - bind methods to the target, required for the `pure` version
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
options.unsafe - use the simple assignment of property instead of delete + defineProperty
options.sham - add a flag to not completely full polyfills
options.enumerable - export as enumerable property
options.dontCallGetSet - prevent calling a getter on target
options.name - the .name of the function if it does not match the key
*/
module.exports = function (options, source) {
var TARGET = options.target;
var GLOBAL = options.global;
var STATIC = options.stat;
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
if (GLOBAL) {
target = globalThis;
} else if (STATIC) {
target = globalThis[TARGET] || defineGlobalProperty(TARGET, {});
} else {
target = globalThis[TARGET] && globalThis[TARGET].prototype;
}
if (target) for (key in source) {
sourceProperty = source[key];
if (options.dontCallGetSet) {
descriptor = getOwnPropertyDescriptor(target, key);
targetProperty = descriptor && descriptor.value;
} else targetProperty = target[key];
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
// contained in target
if (!FORCED && targetProperty !== undefined) {
if (typeof sourceProperty == typeof targetProperty) continue;
copyConstructorProperties(sourceProperty, targetProperty);
}
// add a flag to not completely full polyfills
if (options.sham || (targetProperty && targetProperty.sham)) {
createNonEnumerableProperty(sourceProperty, 'sham', true);
}
defineBuiltIn(target, key, sourceProperty, options);
}
};
/***/ }),
/* 50 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(24);
var definePropertyModule = __webpack_require__(23);
var createPropertyDescriptor = __webpack_require__(43);
module.exports = DESCRIPTORS ? function (object, key, value) {
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
};
/***/ }),
/* 51 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isCallable = __webpack_require__(28);
var definePropertyModule = __webpack_require__(23);
var makeBuiltIn = __webpack_require__(52);
var defineGlobalProperty = __webpack_require__(17);
module.exports = function (O, key, value, options) {
if (!options) options = {};
var simple = options.enumerable;
var name = options.name !== undefined ? options.name : key;
if (isCallable(value)) makeBuiltIn(value, name, options);
if (options.global) {
if (simple) O[key] = value;
else defineGlobalProperty(key, value);
} else {
try {
if (!options.unsafe) delete O[key];
else if (O[key]) simple = true;
} catch (error) { /* empty */ }
if (simple) O[key] = value;
else definePropertyModule.f(O, key, {
value: value,
enumerable: false,
configurable: !options.nonConfigurable,
writable: !options.nonWritable
});
} return O;
};
/***/ }),
/* 52 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
var fails = __webpack_require__(8);
var isCallable = __webpack_require__(28);
var hasOwn = __webpack_require__(5);
var DESCRIPTORS = __webpack_require__(24);
var CONFIGURABLE_FUNCTION_NAME = __webpack_require__(53).CONFIGURABLE;
var inspectSource = __webpack_require__(54);
var InternalStateModule = __webpack_require__(55);
var enforceInternalState = InternalStateModule.enforce;
var getInternalState = InternalStateModule.get;
var $String = String;
// eslint-disable-next-line es/no-object-defineproperty -- safe
var defineProperty = Object.defineProperty;
var stringSlice = uncurryThis(''.slice);
var replace = uncurryThis(''.replace);
var join = uncurryThis([].join);
var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {
return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
});
var TEMPLATE = String(String).split('String');
var makeBuiltIn = module.exports = function (value, name, options) {
if (stringSlice($String(name), 0, 7) === 'Symbol(') {
name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
}
if (options && options.getter) name = 'get ' + name;
if (options && options.setter) name = 'set ' + name;
if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });
else value.name = name;
}
if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {
defineProperty(value, 'length', { value: options.arity });
}
try {
if (options && hasOwn(options, 'constructor') && options.constructor) {
if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
} else if (value.prototype) value.prototype = undefined;
} catch (error) { /* empty */ }
var state = enforceInternalState(value);
if (!hasOwn(state, 'source')) {
state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
} return value;
};
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
// eslint-disable-next-line no-extend-native -- required
Function.prototype.toString = makeBuiltIn(function toString() {
return isCallable(this) && getInternalState(this).source || inspectSource(this);
}, 'toString');
/***/ }),
/* 53 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(24);
var hasOwn = __webpack_require__(5);
var FunctionPrototype = Function.prototype;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
var EXISTS = hasOwn(FunctionPrototype, 'name');
// additional protection from minified / mangled / dropped function names
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));
module.exports = {
EXISTS: EXISTS,
PROPER: PROPER,
CONFIGURABLE: CONFIGURABLE
};
/***/ }),
/* 54 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
var isCallable = __webpack_require__(28);
var store = __webpack_require__(15);
var functionToString = uncurryThis(Function.toString);
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
if (!isCallable(store.inspectSource)) {
store.inspectSource = function (it) {
return functionToString(it);
};
}
module.exports = store.inspectSource;
/***/ }),
/* 55 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var NATIVE_WEAK_MAP = __webpack_require__(56);
var globalThis = __webpack_require__(2);
var isObject = __webpack_require__(27);
var createNonEnumerableProperty = __webpack_require__(50);
var hasOwn = __webpack_require__(5);
var shared = __webpack_require__(15);
var sharedKey = __webpack_require__(57);
var hiddenKeys = __webpack_require__(58);
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
var TypeError = globalThis.TypeError;
var WeakMap = globalThis.WeakMap;
var set, get, has;
var enforce = function (it) {
return has(it) ? get(it) : set(it, {});
};
var getterFor = function (TYPE) {
return function (it) {
var state;
if (!isObject(it) || (state = get(it)).type !== TYPE) {
throw new TypeError('Incompatible receiver, ' + TYPE + ' required');
} return state;
};
};
if (NATIVE_WEAK_MAP || shared.state) {
var store = shared.state || (shared.state = new WeakMap());
/* eslint-disable no-self-assign -- prototype methods protection */
store.get = store.get;
store.has = store.has;
store.set = store.set;
/* eslint-enable no-self-assign -- prototype methods protection */
set = function (it, metadata) {
if (store.has(it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
metadata.facade = it;
store.set(it, metadata);
return metadata;
};
get = function (it) {
return store.get(it) || {};
};
has = function (it) {
return store.has(it);
};
} else {
var STATE = sharedKey('state');
hiddenKeys[STATE] = true;
set = function (it, metadata) {
if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
metadata.facade = it;
createNonEnumerableProperty(it, STATE, metadata);
return metadata;
};
get = function (it) {
return hasOwn(it, STATE) ? it[STATE] : {};
};
has = function (it) {
return hasOwn(it, STATE);
};
}
module.exports = {
set: set,
get: get,
has: has,
enforce: enforce,
getterFor: getterFor
};
/***/ }),
/* 56 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var isCallable = __webpack_require__(28);
var WeakMap = globalThis.WeakMap;
module.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));
/***/ }),
/* 57 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var shared = __webpack_require__(14);
var uid = __webpack_require__(18);
var keys = shared('keys');
module.exports = function (key) {
return keys[key] || (keys[key] = uid(key));
};
/***/ }),
/* 58 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = {};
/***/ }),
/* 59 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var hasOwn = __webpack_require__(5);
var ownKeys = __webpack_require__(60);
var getOwnPropertyDescriptorModule = __webpack_require__(41);
var definePropertyModule = __webpack_require__(23);
module.exports = function (target, source, exceptions) {
var keys = ownKeys(source);
var defineProperty = definePropertyModule.f;
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
}
}
};
/***/ }),
/* 60 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var getBuiltIn = __webpack_require__(35);
var uncurryThis = __webpack_require__(6);
var getOwnPropertyNamesModule = __webpack_require__(61);
var getOwnPropertySymbolsModule = __webpack_require__(70);
var anObject = __webpack_require__(30);
var concat = uncurryThis([].concat);
// all object keys, includes non-enumerable and symbols
module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
var keys = getOwnPropertyNamesModule.f(anObject(it));
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
};
/***/ }),
/* 61 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var internalObjectKeys = __webpack_require__(62);
var enumBugKeys = __webpack_require__(69);
var hiddenKeys = enumBugKeys.concat('length', 'prototype');
// `Object.getOwnPropertyNames` method
// https://tc39.es/ecma262/#sec-object.getownpropertynames
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
return internalObjectKeys(O, hiddenKeys);
};
/***/ }),
/* 62 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
var hasOwn = __webpack_require__(5);
var toIndexedObject = __webpack_require__(44);
var indexOf = __webpack_require__(63).indexOf;
var hiddenKeys = __webpack_require__(58);
var push = uncurryThis([].push);
module.exports = function (object, names) {
var O = toIndexedObject(object);
var i = 0;
var result = [];
var key;
for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
// Don't enum bug & hidden keys
while (names.length > i) if (hasOwn(O, key = names[i++])) {
~indexOf(result, key) || push(result, key);
}
return result;
};
/***/ }),
/* 63 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toIndexedObject = __webpack_require__(44);
var toAbsoluteIndex = __webpack_require__(64);
var lengthOfArrayLike = __webpack_require__(67);
// `Array.prototype.{ indexOf, includes }` methods implementation
var createMethod = function (IS_INCLUDES) {
return function ($this, el, fromIndex) {
var O = toIndexedObject($this);
var length = lengthOfArrayLike(O);
if (length === 0) return !IS_INCLUDES && -1;
var index = toAbsoluteIndex(fromIndex, length);
var value;
// Array#includes uses SameValueZero equality algorithm
// eslint-disable-next-line no-self-compare -- NaN check
if (IS_INCLUDES && el !== el) while (length > index) {
value = O[index++];
// eslint-disable-next-line no-self-compare -- NaN check
if (value !== value) return true;
// Array#indexOf ignores holes, Array#includes - not
} else for (;length > index; index++) {
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
} return !IS_INCLUDES && -1;
};
};
module.exports = {
// `Array.prototype.includes` method
// https://tc39.es/ecma262/#sec-array.prototype.includes
includes: createMethod(true),
// `Array.prototype.indexOf` method
// https://tc39.es/ecma262/#sec-array.prototype.indexof
indexOf: createMethod(false)
};
/***/ }),
/* 64 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toIntegerOrInfinity = __webpack_require__(65);
var max = Math.max;
var min = Math.min;
// Helper for a popular repeating case of the spec:
// Let integer be ? ToInteger(index).
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
module.exports = function (index, length) {
var integer = toIntegerOrInfinity(index);
return integer < 0 ? max(integer + length, 0) : min(integer, length);
};
/***/ }),
/* 65 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var trunc = __webpack_require__(66);
// `ToIntegerOrInfinity` abstract operation
// https://tc39.es/ecma262/#sec-tointegerorinfinity
module.exports = function (argument) {
var number = +argument;
// eslint-disable-next-line no-self-compare -- NaN check
return number !== number || number === 0 ? 0 : trunc(number);
};
/***/ }),
/* 66 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ceil = Math.ceil;
var floor = Math.floor;
// `Math.trunc` method
// https://tc39.es/ecma262/#sec-math.trunc
// eslint-disable-next-line es/no-math-trunc -- safe
module.exports = Math.trunc || function trunc(x) {
var n = +x;
return (n > 0 ? floor : ceil)(n);
};
/***/ }),
/* 67 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toLength = __webpack_require__(68);
// `LengthOfArrayLike` abstract operation
// https://tc39.es/ecma262/#sec-lengthofarraylike
module.exports = function (obj) {
return toLength(obj.length);
};
/***/ }),
/* 68 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toIntegerOrInfinity = __webpack_require__(65);
var min = Math.min;
// `ToLength` abstract operation
// https://tc39.es/ecma262/#sec-tolength
module.exports = function (argument) {
var len = toIntegerOrInfinity(argument);
return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
};
/***/ }),
/* 69 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// IE8- don't enum bug keys
module.exports = [
'constructor',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'toLocaleString',
'toString',
'valueOf'
];
/***/ }),
/* 70 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
exports.f = Object.getOwnPropertySymbols;
/***/ }),
/* 71 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(8);
var isCallable = __webpack_require__(28);
var replacement = /#|\.prototype\./;
var isForced = function (feature, detection) {
var value = data[normalize(feature)];
return value === POLYFILL ? true
: value === NATIVE ? false
: isCallable(detection) ? fails(detection)
: !!detection;
};
var normalize = isForced.normalize = function (string) {
return String(string).replace(replacement, '.').toLowerCase();
};
var data = isForced.data = {};
var NATIVE = isForced.NATIVE = 'N';
var POLYFILL = isForced.POLYFILL = 'P';
module.exports = isForced;
/***/ }),
/* 72 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var NATIVE_BIND = __webpack_require__(7);
var FunctionPrototype = Function.prototype;
var apply = FunctionPrototype.apply;
var call = FunctionPrototype.call;
// eslint-disable-next-line es/no-function-prototype-bind, es/no-reflect -- safe
module.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {
return call.apply(apply, arguments);
});
/***/ }),
/* 73 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var getBuiltIn = __webpack_require__(35);
var hasOwn = __webpack_require__(5);
var createNonEnumerableProperty = __webpack_require__(50);
var isPrototypeOf = __webpack_require__(36);
var setPrototypeOf = __webpack_require__(74);
var copyConstructorProperties = __webpack_require__(59);
var proxyAccessor = __webpack_require__(78);
var inheritIfRequired = __webpack_require__(79);
var normalizeStringArgument = __webpack_require__(80);
var installErrorCause = __webpack_require__(84);
var installErrorStack = __webpack_require__(85);
var DESCRIPTORS = __webpack_require__(24);
var IS_PURE = __webpack_require__(16);
module.exports = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
var STACK_TRACE_LIMIT = 'stackTraceLimit';
var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
var path = FULL_NAME.split('.');
var ERROR_NAME = path[path.length - 1];
var OriginalError = getBuiltIn.apply(null, path);
if (!OriginalError) return;
var OriginalErrorPrototype = OriginalError.prototype;
// V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
if (!IS_PURE && hasOwn(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
if (!FORCED) return OriginalError;
var BaseError = getBuiltIn('Error');
var WrappedError = wrapper(function (a, b) {
var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
if (message !== undefined) createNonEnumerableProperty(result, 'message', message);
installErrorStack(result, WrappedError, result.stack, 2);
if (this && isPrototypeOf(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);
if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
return result;
});
WrappedError.prototype = OriginalErrorPrototype;
if (ERROR_NAME !== 'Error') {
if (setPrototypeOf) setPrototypeOf(WrappedError, BaseError);
else copyConstructorProperties(WrappedError, BaseError, { name: true });
} else if (DESCRIPTORS && STACK_TRACE_LIMIT in OriginalError) {
proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);
proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');
}
copyConstructorProperties(WrappedError, OriginalError);
if (!IS_PURE) try {
// Safari 13- bug: WebAssembly errors does not have a proper `.name`
if (OriginalErrorPrototype.name !== ERROR_NAME) {
createNonEnumerableProperty(OriginalErrorPrototype, 'name', ERROR_NAME);
}
OriginalErrorPrototype.constructor = WrappedError;
} catch (error) { /* empty */ }
return WrappedError;
};
/***/ }),
/* 74 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* eslint-disable no-proto -- safe */
var uncurryThisAccessor = __webpack_require__(75);
var isObject = __webpack_require__(27);
var requireObjectCoercible = __webpack_require__(10);
var aPossiblePrototype = __webpack_require__(76);
// `Object.setPrototypeOf` method
// https://tc39.es/ecma262/#sec-object.setprototypeof
// Works with __proto__ only. Old v8 can't work with null proto objects.
// eslint-disable-next-line es/no-object-setprototypeof -- safe
module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
var CORRECT_SETTER = false;
var test = {};
var setter;
try {
setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
setter(test, []);
CORRECT_SETTER = test instanceof Array;
} catch (error) { /* empty */ }
return function setPrototypeOf(O, proto) {
requireObjectCoercible(O);
aPossiblePrototype(proto);
if (!isObject(O)) return O;
if (CORRECT_SETTER) setter(O, proto);
else O.__proto__ = proto;
return O;
};
}() : undefined);
/***/ }),
/* 75 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
var aCallable = __webpack_require__(38);
module.exports = function (object, key, method) {
try {
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
} catch (error) { /* empty */ }
};
/***/ }),
/* 76 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isPossiblePrototype = __webpack_require__(77);
var $String = String;
var $TypeError = TypeError;
module.exports = function (argument) {
if (isPossiblePrototype(argument)) return argument;
throw new $TypeError("Can't set " + $String(argument) + ' as a prototype');
};
/***/ }),
/* 77 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isObject = __webpack_require__(27);
module.exports = function (argument) {
return isObject(argument) || argument === null;
};
/***/ }),
/* 78 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var defineProperty = __webpack_require__(23).f;
module.exports = function (Target, Source, key) {
key in Target || defineProperty(Target, key, {
configurable: true,
get: function () { return Source[key]; },
set: function (it) { Source[key] = it; }
});
};
/***/ }),
/* 79 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isCallable = __webpack_require__(28);
var isObject = __webpack_require__(27);
var setPrototypeOf = __webpack_require__(74);
// makes subclassing work correct for wrapped built-ins
module.exports = function ($this, dummy, Wrapper) {
var NewTarget, NewTargetPrototype;
if (
// it can work only with native `setPrototypeOf`
setPrototypeOf &&
// we haven't completely correct pre-ES6 way for getting `new.target`, so use this
isCallable(NewTarget = dummy.constructor) &&
NewTarget !== Wrapper &&
isObject(NewTargetPrototype = NewTarget.prototype) &&
NewTargetPrototype !== Wrapper.prototype
) setPrototypeOf($this, NewTargetPrototype);
return $this;
};
/***/ }),
/* 80 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toString = __webpack_require__(81);
module.exports = function (argument, $default) {
return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);
};
/***/ }),
/* 81 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var classof = __webpack_require__(82);
var $String = String;
module.exports = function (argument) {
if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
return $String(argument);
};
/***/ }),
/* 82 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var TO_STRING_TAG_SUPPORT = __webpack_require__(83);
var isCallable = __webpack_require__(28);
var classofRaw = __webpack_require__(46);
var wellKnownSymbol = __webpack_require__(13);
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var $Object = Object;
// ES3 wrong here
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
// fallback for IE11 Script Access Denied error
var tryGet = function (it, key) {
try {
return it[key];
} catch (error) { /* empty */ }
};
// getting tag from ES6+ `Object.prototype.toString`
module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
var O, tag, result;
return it === undefined ? 'Undefined' : it === null ? 'Null'
// @@toStringTag case
: typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
// builtinTag case
: CORRECT_ARGUMENTS ? classofRaw(O)
// ES3 arguments fallback
: (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;
};
/***/ }),
/* 83 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var wellKnownSymbol = __webpack_require__(13);
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var test = {};
// eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation
test[TO_STRING_TAG] = 'z';
module.exports = String(test) === '[object z]';
/***/ }),
/* 84 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isObject = __webpack_require__(27);
var createNonEnumerableProperty = __webpack_require__(50);
// `InstallErrorCause` abstract operation
// https://tc39.es/ecma262/#sec-installerrorcause
module.exports = function (O, options) {
if (isObject(options) && 'cause' in options) {
createNonEnumerableProperty(O, 'cause', options.cause);
}
};
/***/ }),
/* 85 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var createNonEnumerableProperty = __webpack_require__(50);
var clearErrorStack = __webpack_require__(86);
var ERROR_STACK_INSTALLABLE = __webpack_require__(87);
// non-standard V8
// eslint-disable-next-line es/no-nonstandard-error-properties -- safe
var captureStackTrace = Error.captureStackTrace;
module.exports = function (error, C, stack, dropEntries) {
if (ERROR_STACK_INSTALLABLE) {
if (captureStackTrace) captureStackTrace(error, C);
else createNonEnumerableProperty(error, 'stack', clearErrorStack(stack, dropEntries));
}
};
/***/ }),
/* 86 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
var $Error = Error;
var replace = uncurryThis(''.replace);
var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');
// eslint-disable-next-line redos/no-vulnerable, sonarjs/slow-regex -- safe
var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
module.exports = function (stack, dropEntries) {
if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
} return stack;
};
/***/ }),
/* 87 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(8);
var createPropertyDescriptor = __webpack_require__(43);
module.exports = !fails(function () {
var error = new Error('a');
if (!('stack' in error)) return true;
// eslint-disable-next-line es/no-object-defineproperty -- safe
Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
return error.stack !== 7;
});
/***/ }),
/* 88 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var getBuiltIn = __webpack_require__(35);
var isObject = __webpack_require__(27);
var classof = __webpack_require__(82);
var fails = __webpack_require__(8);
var ERROR = 'Error';
var DOM_EXCEPTION = 'DOMException';
// eslint-disable-next-line es/no-object-setprototypeof, no-proto -- safe
var PROTOTYPE_SETTING_AVAILABLE = Object.setPrototypeOf || ({}).__proto__;
var DOMException = getBuiltIn(DOM_EXCEPTION);
var $Error = Error;
// eslint-disable-next-line es/no-error-iserror -- safe
var $isError = $Error.isError;
var FORCED = !$isError || !PROTOTYPE_SETTING_AVAILABLE || fails(function () {
// Bun, isNativeError-based implementations, some buggy structuredClone-based implementations, etc.
// https://github.com/oven-sh/bun/issues/15821
return (DOMException && !$isError(new DOMException(DOM_EXCEPTION))) ||
// structuredClone-based implementations
// eslint-disable-next-line es/no-error-cause -- detection
!$isError(new $Error(ERROR, { cause: function () { /* empty */ } })) ||
// instanceof-based and FF Error#stack-based implementations
$isError(getBuiltIn('Object', 'create')($Error.prototype));
});
// `Error.isError` method
// https://tc39.es/ecma262/#sec-error.iserror
$({ target: 'Error', stat: true, sham: true, forced: FORCED }, {
isError: function isError(arg) {
if (!isObject(arg)) return false;
var tag = classof(arg);
return tag === ERROR || tag === DOM_EXCEPTION;
}
});
/***/ }),
/* 89 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove this module from `core-js@4` since it's replaced to module below
__webpack_require__(90);
/***/ }),
/* 90 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var isPrototypeOf = __webpack_require__(36);
var getPrototypeOf = __webpack_require__(91);
var setPrototypeOf = __webpack_require__(74);
var copyConstructorProperties = __webpack_require__(59);
var create = __webpack_require__(93);
var createNonEnumerableProperty = __webpack_require__(50);
var createPropertyDescriptor = __webpack_require__(43);
var installErrorCause = __webpack_require__(84);
var installErrorStack = __webpack_require__(85);
var iterate = __webpack_require__(97);
var normalizeStringArgument = __webpack_require__(80);
var wellKnownSymbol = __webpack_require__(13);
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var $Error = Error;
var push = [].push;
var $AggregateError = function AggregateError(errors, message /* , options */) {
var isInstance = isPrototypeOf(AggregateErrorPrototype, this);
var that;
if (setPrototypeOf) {
that = setPrototypeOf(new $Error(), isInstance ? getPrototypeOf(this) : AggregateErrorPrototype);
} else {
that = isInstance ? this : create(AggregateErrorPrototype);
createNonEnumerableProperty(that, TO_STRING_TAG, 'Error');
}
if (message !== undefined) createNonEnumerableProperty(that, 'message', normalizeStringArgument(message));
installErrorStack(that, $AggregateError, that.stack, 1);
if (arguments.length > 2) installErrorCause(that, arguments[2]);
var errorsArray = [];
iterate(errors, push, { that: errorsArray });
createNonEnumerableProperty(that, 'errors', errorsArray);
return that;
};
if (setPrototypeOf) setPrototypeOf($AggregateError, $Error);
else copyConstructorProperties($AggregateError, $Error, { name: true });
var AggregateErrorPrototype = $AggregateError.prototype = create($Error.prototype, {
constructor: createPropertyDescriptor(1, $AggregateError),
message: createPropertyDescriptor(1, ''),
name: createPropertyDescriptor(1, 'AggregateError')
});
// `AggregateError` constructor
// https://tc39.es/ecma262/#sec-aggregate-error-constructor
$({ global: true, constructor: true, arity: 2 }, {
AggregateError: $AggregateError
});
/***/ }),
/* 91 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var hasOwn = __webpack_require__(5);
var isCallable = __webpack_require__(28);
var toObject = __webpack_require__(9);
var sharedKey = __webpack_require__(57);
var CORRECT_PROTOTYPE_GETTER = __webpack_require__(92);
var IE_PROTO = sharedKey('IE_PROTO');
var $Object = Object;
var ObjectPrototype = $Object.prototype;
// `Object.getPrototypeOf` method
// https://tc39.es/ecma262/#sec-object.getprototypeof
// eslint-disable-next-line es/no-object-getprototypeof -- safe
module.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
var object = toObject(O);
if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];
var constructor = object.constructor;
if (isCallable(constructor) && object instanceof constructor) {
return constructor.prototype;
} return object instanceof $Object ? ObjectPrototype : null;
};
/***/ }),
/* 92 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(8);
module.exports = !fails(function () {
function F() { /* empty */ }
F.prototype.constructor = null;
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
return Object.getPrototypeOf(new F()) !== F.prototype;
});
/***/ }),
/* 93 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* global ActiveXObject -- old IE, WSH */
var anObject = __webpack_require__(30);
var definePropertiesModule = __webpack_require__(94);
var enumBugKeys = __webpack_require__(69);
var hiddenKeys = __webpack_require__(58);
var html = __webpack_require__(96);
var documentCreateElement = __webpack_require__(26);
var sharedKey = __webpack_require__(57);
var GT = '>';
var LT = '<';
var PROTOTYPE = 'prototype';
var SCRIPT = 'script';
var IE_PROTO = sharedKey('IE_PROTO');
var EmptyConstructor = function () { /* empty */ };
var scriptTag = function (content) {
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
};
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
var NullProtoObjectViaActiveX = function (activeXDocument) {
activeXDocument.write(scriptTag(''));
activeXDocument.close();
var temp = activeXDocument.parentWindow.Object;
// eslint-disable-next-line no-useless-assignment -- avoid memory leak
activeXDocument = null;
return temp;
};
// Create object with fake `null` prototype: use iframe Object with cleared prototype
var NullProtoObjectViaIFrame = function () {
// Thrash, waste and sodomy: IE GC bug
var iframe = documentCreateElement('iframe');
var JS = 'java' + SCRIPT + ':';
var iframeDocument;
iframe.style.display = 'none';
html.appendChild(iframe);
// https://github.com/zloirock/core-js/issues/475
iframe.src = String(JS);
iframeDocument = iframe.contentWindow.document;
iframeDocument.open();
iframeDocument.write(scriptTag('document.F=Object'));
iframeDocument.close();
return iframeDocument.F;
};
// Check for document.domain and active x support
// No need to use active x approach when document.domain is not set
// see https://github.com/es-shims/es5-shim/issues/150
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
// avoid IE GC bug
var activeXDocument;
var NullProtoObject = function () {
try {
activeXDocument = new ActiveXObject('htmlfile');
} catch (error) { /* ignore */ }
NullProtoObject = typeof document != 'undefined'
? document.domain && activeXDocument
? NullProtoObjectViaActiveX(activeXDocument) // old IE
: NullProtoObjectViaIFrame()
: NullProtoObjectViaActiveX(activeXDocument); // WSH
var length = enumBugKeys.length;
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
return NullProtoObject();
};
hiddenKeys[IE_PROTO] = true;
// `Object.create` method
// https://tc39.es/ecma262/#sec-object.create
// eslint-disable-next-line es/no-object-create -- safe
module.exports = Object.create || function create(O, Properties) {
var result;
if (O !== null) {
EmptyConstructor[PROTOTYPE] = anObject(O);
result = new EmptyConstructor();
EmptyConstructor[PROTOTYPE] = null;
// add "__proto__" for Object.getPrototypeOf polyfill
result[IE_PROTO] = O;
} else result = NullProtoObject();
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
};
/***/ }),
/* 94 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(24);
var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(29);
var definePropertyModule = __webpack_require__(23);
var anObject = __webpack_require__(30);
var toIndexedObject = __webpack_require__(44);
var objectKeys = __webpack_require__(95);
// `Object.defineProperties` method
// https://tc39.es/ecma262/#sec-object.defineproperties
// eslint-disable-next-line es/no-object-defineproperties -- safe
exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
anObject(O);
var props = toIndexedObject(Properties);
var keys = objectKeys(Properties);
var length = keys.length;
var index = 0;
var key;
while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
return O;
};
/***/ }),
/* 95 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var internalObjectKeys = __webpack_require__(62);
var enumBugKeys = __webpack_require__(69);
// `Object.keys` method
// https://tc39.es/ecma262/#sec-object.keys
// eslint-disable-next-line es/no-object-keys -- safe
module.exports = Object.keys || function keys(O) {
return internalObjectKeys(O, enumBugKeys);
};
/***/ }),
/* 96 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var getBuiltIn = __webpack_require__(35);
module.exports = getBuiltIn('document', 'documentElement');
/***/ }),
/* 97 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var bind = __webpack_require__(98);
var call = __webpack_require__(33);
var anObject = __webpack_require__(30);
var tryToString = __webpack_require__(39);
var isArrayIteratorMethod = __webpack_require__(100);
var lengthOfArrayLike = __webpack_require__(67);
var isPrototypeOf = __webpack_require__(36);
var getIterator = __webpack_require__(102);
var getIteratorMethod = __webpack_require__(103);
var iteratorClose = __webpack_require__(104);
var $TypeError = TypeError;
var Result = function (stopped, result) {
this.stopped = stopped;
this.result = result;
};
var ResultPrototype = Result.prototype;
module.exports = function (iterable, unboundFunction, options) {
var that = options && options.that;
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
var IS_RECORD = !!(options && options.IS_RECORD);
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
var INTERRUPTED = !!(options && options.INTERRUPTED);
var fn = bind(unboundFunction, that);
var iterator, iterFn, index, length, result, next, step;
var stop = function (condition) {
if (iterator) iteratorClose(iterator, 'normal');
return new Result(true, condition);
};
var callFn = function (value) {
if (AS_ENTRIES) {
anObject(value);
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
} return INTERRUPTED ? fn(value, stop) : fn(value);
};
if (IS_RECORD) {
iterator = iterable.iterator;
} else if (IS_ITERATOR) {
iterator = iterable;
} else {
iterFn = getIteratorMethod(iterable);
if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable');
// optimisation for array iterators
if (isArrayIteratorMethod(iterFn)) {
for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
result = callFn(iterable[index]);
if (result && isPrototypeOf(ResultPrototype, result)) return result;
} return new Result(false);
}
iterator = getIterator(iterable, iterFn);
}
next = IS_RECORD ? iterable.next : iterator.next;
while (!(step = call(next, iterator)).done) {
try {
result = callFn(step.value);
} catch (error) {
iteratorClose(iterator, 'throw', error);
}
if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
} return new Result(false);
};
/***/ }),
/* 98 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(99);
var aCallable = __webpack_require__(38);
var NATIVE_BIND = __webpack_require__(7);
var bind = uncurryThis(uncurryThis.bind);
// optional / simple context binding
module.exports = function (fn, that) {
aCallable(fn);
return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {
return fn.apply(that, arguments);
};
};
/***/ }),
/* 99 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var classofRaw = __webpack_require__(46);
var uncurryThis = __webpack_require__(6);
module.exports = function (fn) {
// Nashorn bug:
// https://github.com/zloirock/core-js/issues/1128
// https://github.com/zloirock/core-js/issues/1130
if (classofRaw(fn) === 'Function') return uncurryThis(fn);
};
/***/ }),
/* 100 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var wellKnownSymbol = __webpack_require__(13);
var Iterators = __webpack_require__(101);
var ITERATOR = wellKnownSymbol('iterator');
var ArrayPrototype = Array.prototype;
// check on default Array iterator
module.exports = function (it) {
return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
};
/***/ }),
/* 101 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = {};
/***/ }),
/* 102 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(33);
var aCallable = __webpack_require__(38);
var anObject = __webpack_require__(30);
var tryToString = __webpack_require__(39);
var getIteratorMethod = __webpack_require__(103);
var $TypeError = TypeError;
module.exports = function (argument, usingIterator) {
var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument));
throw new $TypeError(tryToString(argument) + ' is not iterable');
};
/***/ }),
/* 103 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var classof = __webpack_require__(82);
var getMethod = __webpack_require__(37);
var isNullOrUndefined = __webpack_require__(11);
var Iterators = __webpack_require__(101);
var wellKnownSymbol = __webpack_require__(13);
var ITERATOR = wellKnownSymbol('iterator');
module.exports = function (it) {
if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR)
|| getMethod(it, '@@iterator')
|| Iterators[classof(it)];
};
/***/ }),
/* 104 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(33);
var anObject = __webpack_require__(30);
var getMethod = __webpack_require__(37);
module.exports = function (iterator, kind, value) {
var innerResult, innerError;
anObject(iterator);
try {
innerResult = getMethod(iterator, 'return');
if (!innerResult) {
if (kind === 'throw') throw value;
return value;
}
innerResult = call(innerResult, iterator);
} catch (error) {
innerError = true;
innerResult = error;
}
if (kind === 'throw') throw value;
if (innerError) throw innerResult;
anObject(innerResult);
return value;
};
/***/ }),
/* 105 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var getBuiltIn = __webpack_require__(35);
var apply = __webpack_require__(72);
var fails = __webpack_require__(8);
var wrapErrorConstructorWithCause = __webpack_require__(73);
var AGGREGATE_ERROR = 'AggregateError';
var $AggregateError = getBuiltIn(AGGREGATE_ERROR);
var FORCED = !fails(function () {
return $AggregateError([1]).errors[0] !== 1;
}) && fails(function () {
return $AggregateError([1], AGGREGATE_ERROR, { cause: 7 }).cause !== 7;
});
// https://tc39.es/ecma262/#sec-aggregate-error
$({ global: true, constructor: true, arity: 2, forced: FORCED }, {
AggregateError: wrapErrorConstructorWithCause(AGGREGATE_ERROR, function (init) {
// eslint-disable-next-line no-unused-vars -- required for functions `.length`
return function AggregateError(errors, message) { return apply(init, this, arguments); };
}, FORCED, true)
});
/***/ }),
/* 106 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var globalThis = __webpack_require__(2);
var isPrototypeOf = __webpack_require__(36);
var getPrototypeOf = __webpack_require__(91);
var setPrototypeOf = __webpack_require__(74);
var copyConstructorProperties = __webpack_require__(59);
var create = __webpack_require__(93);
var createNonEnumerableProperty = __webpack_require__(50);
var createPropertyDescriptor = __webpack_require__(43);
var installErrorStack = __webpack_require__(85);
var normalizeStringArgument = __webpack_require__(80);
var wellKnownSymbol = __webpack_require__(13);
var fails = __webpack_require__(8);
var IS_PURE = __webpack_require__(16);
var NativeSuppressedError = globalThis.SuppressedError;
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var $Error = Error;
// https://github.com/oven-sh/bun/issues/9282
var WRONG_ARITY = !!NativeSuppressedError && NativeSuppressedError.length !== 3;
// https://github.com/oven-sh/bun/issues/9283
var EXTRA_ARGS_SUPPORT = !!NativeSuppressedError && fails(function () {
return new NativeSuppressedError(1, 2, 3, { cause: 4 }).cause === 4;
});
var PATCH = WRONG_ARITY || EXTRA_ARGS_SUPPORT;
var $SuppressedError = function SuppressedError(error, suppressed, message) {
var isInstance = isPrototypeOf(SuppressedErrorPrototype, this);
var that;
if (setPrototypeOf) {
that = PATCH && (!isInstance || getPrototypeOf(this) === SuppressedErrorPrototype)
? new NativeSuppressedError()
: setPrototypeOf(new $Error(), isInstance ? getPrototypeOf(this) : SuppressedErrorPrototype);
} else {
that = isInstance ? this : create(SuppressedErrorPrototype);
createNonEnumerableProperty(that, TO_STRING_TAG, 'Error');
}
if (message !== undefined) createNonEnumerableProperty(that, 'message', normalizeStringArgument(message));
installErrorStack(that, $SuppressedError, that.stack, 1);
createNonEnumerableProperty(that, 'error', error);
createNonEnumerableProperty(that, 'suppressed', suppressed);
return that;
};
if (setPrototypeOf) setPrototypeOf($SuppressedError, $Error);
else copyConstructorProperties($SuppressedError, $Error, { name: true });
var SuppressedErrorPrototype = $SuppressedError.prototype = PATCH ? NativeSuppressedError.prototype : create($Error.prototype, {
constructor: createPropertyDescriptor(1, $SuppressedError),
message: createPropertyDescriptor(1, ''),
name: createPropertyDescriptor(1, 'SuppressedError')
});
if (PATCH && !IS_PURE) SuppressedErrorPrototype.constructor = $SuppressedError;
// `SuppressedError` constructor
// https://github.com/tc39/proposal-explicit-resource-management
$({ global: true, constructor: true, arity: 3, forced: PATCH }, {
SuppressedError: $SuppressedError
});
/***/ }),
/* 107 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var toObject = __webpack_require__(9);
var lengthOfArrayLike = __webpack_require__(67);
var toIntegerOrInfinity = __webpack_require__(65);
var addToUnscopables = __webpack_require__(108);
// `Array.prototype.at` method
// https://tc39.es/ecma262/#sec-array.prototype.at
$({ target: 'Array', proto: true }, {
at: function at(index) {
var O = toObject(this);
var len = lengthOfArrayLike(O);
var relativeIndex = toIntegerOrInfinity(index);
var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
return (k < 0 || k >= len) ? undefined : O[k];
}
});
addToUnscopables('at');
/***/ }),
/* 108 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var wellKnownSymbol = __webpack_require__(13);
var create = __webpack_require__(93);
var defineProperty = __webpack_require__(23).f;
var UNSCOPABLES = wellKnownSymbol('unscopables');
var ArrayPrototype = Array.prototype;
// Array.prototype[@@unscopables]
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
if (ArrayPrototype[UNSCOPABLES] === undefined) {
defineProperty(ArrayPrototype, UNSCOPABLES, {
configurable: true,
value: create(null)
});
}
// add a key to Array.prototype[@@unscopables]
module.exports = function (key) {
ArrayPrototype[UNSCOPABLES][key] = true;
};
/***/ }),
/* 109 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var $findLast = __webpack_require__(110).findLast;
var addToUnscopables = __webpack_require__(108);
// `Array.prototype.findLast` method
// https://tc39.es/ecma262/#sec-array.prototype.findlast
$({ target: 'Array', proto: true }, {
findLast: function findLast(callbackfn /* , that = undefined */) {
return $findLast(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
addToUnscopables('findLast');
/***/ }),
/* 110 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var bind = __webpack_require__(98);
var IndexedObject = __webpack_require__(45);
var toObject = __webpack_require__(9);
var lengthOfArrayLike = __webpack_require__(67);
// `Array.prototype.{ findLast, findLastIndex }` methods implementation
var createMethod = function (TYPE) {
var IS_FIND_LAST_INDEX = TYPE === 1;
return function ($this, callbackfn, that) {
var O = toObject($this);
var self = IndexedObject(O);
var index = lengthOfArrayLike(self);
var boundFunction = bind(callbackfn, that);
var value, result;
while (index-- > 0) {
value = self[index];
result = boundFunction(value, index, O);
if (result) switch (TYPE) {
case 0: return value; // findLast
case 1: return index; // findLastIndex
}
}
return IS_FIND_LAST_INDEX ? -1 : undefined;
};
};
module.exports = {
// `Array.prototype.findLast` method
// https://github.com/tc39/proposal-array-find-from-last
findLast: createMethod(0),
// `Array.prototype.findLastIndex` method
// https://github.com/tc39/proposal-array-find-from-last
findLastIndex: createMethod(1)
};
/***/ }),
/* 111 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var $findLastIndex = __webpack_require__(110).findLastIndex;
var addToUnscopables = __webpack_require__(108);
// `Array.prototype.findLastIndex` method
// https://tc39.es/ecma262/#sec-array.prototype.findlastindex
$({ target: 'Array', proto: true }, {
findLastIndex: function findLastIndex(callbackfn /* , that = undefined */) {
return $findLastIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
addToUnscopables('findLastIndex');
/***/ }),
/* 112 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var toObject = __webpack_require__(9);
var lengthOfArrayLike = __webpack_require__(67);
var setArrayLength = __webpack_require__(113);
var doesNotExceedSafeInteger = __webpack_require__(115);
var fails = __webpack_require__(8);
var INCORRECT_TO_LENGTH = fails(function () {
return [].push.call({ length: 0x100000000 }, 1) !== 4294967297;
});
// V8 <= 121 and Safari <= 15.4; FF < 23 throws InternalError
// https://bugs.chromium.org/p/v8/issues/detail?id=12681
var properErrorOnNonWritableLength = function () {
try {
// eslint-disable-next-line es/no-object-defineproperty -- safe
Object.defineProperty([], 'length', { writable: false }).push();
} catch (error) {
return error instanceof TypeError;
}
};
var FORCED = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
// `Array.prototype.push` method
// https://tc39.es/ecma262/#sec-array.prototype.push
$({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
// eslint-disable-next-line no-unused-vars -- required for `.length`
push: function push(item) {
var O = toObject(this);
var len = lengthOfArrayLike(O);
var argCount = arguments.length;
doesNotExceedSafeInteger(len + argCount);
for (var i = 0; i < argCount; i++) {
O[len] = arguments[i];
len++;
}
setArrayLength(O, len);
return len;
}
});
/***/ }),
/* 113 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(24);
var isArray = __webpack_require__(114);
var $TypeError = TypeError;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// Safari < 13 does not throw an error in this case
var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () {
// makes no sense without proper strict mode support
if (this !== undefined) return true;
try {
// eslint-disable-next-line es/no-object-defineproperty -- safe
Object.defineProperty([], 'length', { writable: false }).length = 1;
} catch (error) {
return error instanceof TypeError;
}
}();
module.exports = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
throw new $TypeError('Cannot set read only .length');
} return O.length = length;
} : function (O, length) {
return O.length = length;
};
/***/ }),
/* 114 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var classof = __webpack_require__(46);
// `IsArray` abstract operation
// https://tc39.es/ecma262/#sec-isarray
// eslint-disable-next-line es/no-array-isarray -- safe
module.exports = Array.isArray || function isArray(argument) {
return classof(argument) === 'Array';
};
/***/ }),
/* 115 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $TypeError = TypeError;
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
module.exports = function (it) {
if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');
return it;
};
/***/ }),
/* 116 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var lengthOfArrayLike = __webpack_require__(67);
var toIndexedObject = __webpack_require__(44);
var createProperty = __webpack_require__(117);
var addToUnscopables = __webpack_require__(108);
var $Array = Array;
// `Array.prototype.toReversed` method
// https://tc39.es/ecma262/#sec-array.prototype.toreversed
$({ target: 'Array', proto: true }, {
toReversed: function toReversed() {
var O = toIndexedObject(this);
var len = lengthOfArrayLike(O);
var A = new $Array(len);
var k = 0;
for (; k < len; k++) createProperty(A, k, O[len - k - 1]);
return A;
}
});
addToUnscopables('toReversed');
/***/ }),
/* 117 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(24);
var definePropertyModule = __webpack_require__(23);
var createPropertyDescriptor = __webpack_require__(43);
module.exports = function (object, key, value) {
if (DESCRIPTORS) definePropertyModule.f(object, key, createPropertyDescriptor(0, value));
else object[key] = value;
};
/***/ }),
/* 118 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var uncurryThis = __webpack_require__(6);
var aCallable = __webpack_require__(38);
var toIndexedObject = __webpack_require__(44);
var arrayFromConstructorAndList = __webpack_require__(119);
var getBuiltInPrototypeMethod = __webpack_require__(120);
var addToUnscopables = __webpack_require__(108);
var $Array = Array;
var sort = uncurryThis(getBuiltInPrototypeMethod('Array', 'sort'));
// `Array.prototype.toSorted` method
// https://tc39.es/ecma262/#sec-array.prototype.tosorted
$({ target: 'Array', proto: true }, {
toSorted: function toSorted(compareFn) {
if (compareFn !== undefined) aCallable(compareFn);
var O = toIndexedObject(this);
var A = arrayFromConstructorAndList($Array, O);
return sort(A, compareFn);
}
});
addToUnscopables('toSorted');
/***/ }),
/* 119 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var lengthOfArrayLike = __webpack_require__(67);
module.exports = function (Constructor, list, $length) {
var index = 0;
var length = arguments.length > 2 ? $length : lengthOfArrayLike(list);
var result = new Constructor(length);
while (length > index) result[index] = list[index++];
return result;
};
/***/ }),
/* 120 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
module.exports = function (CONSTRUCTOR, METHOD) {
var Constructor = globalThis[CONSTRUCTOR];
var Prototype = Constructor && Constructor.prototype;
return Prototype && Prototype[METHOD];
};
/***/ }),
/* 121 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var addToUnscopables = __webpack_require__(108);
var doesNotExceedSafeInteger = __webpack_require__(115);
var lengthOfArrayLike = __webpack_require__(67);
var toAbsoluteIndex = __webpack_require__(64);
var toIndexedObject = __webpack_require__(44);
var toIntegerOrInfinity = __webpack_require__(65);
var createProperty = __webpack_require__(117);
var $Array = Array;
var max = Math.max;
var min = Math.min;
// `Array.prototype.toSpliced` method
// https://tc39.es/ecma262/#sec-array.prototype.tospliced
$({ target: 'Array', proto: true }, {
toSpliced: function toSpliced(start, deleteCount /* , ...items */) {
var O = toIndexedObject(this);
var len = lengthOfArrayLike(O);
var actualStart = toAbsoluteIndex(start, len);
var argumentsLength = arguments.length;
var k = 0;
var insertCount, actualDeleteCount, newLen, A;
if (argumentsLength === 0) {
insertCount = actualDeleteCount = 0;
} else if (argumentsLength === 1) {
insertCount = 0;
actualDeleteCount = len - actualStart;
} else {
insertCount = argumentsLength - 2;
actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);
}
newLen = doesNotExceedSafeInteger(len + insertCount - actualDeleteCount);
A = $Array(newLen);
for (; k < actualStart; k++) createProperty(A, k, O[k]);
for (; k < actualStart + insertCount; k++) createProperty(A, k, arguments[k - actualStart + 2]);
for (; k < newLen; k++) createProperty(A, k, O[k + actualDeleteCount - insertCount]);
return A;
}
});
addToUnscopables('toSpliced');
/***/ }),
/* 122 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var lengthOfArrayLike = __webpack_require__(67);
var toIntegerOrInfinity = __webpack_require__(65);
var toIndexedObject = __webpack_require__(44);
var createProperty = __webpack_require__(117);
var $Array = Array;
var $RangeError = RangeError;
// Firefox bug
var INCORRECT_EXCEPTION_ON_COERCION_FAIL = (function () {
try {
// eslint-disable-next-line es/no-array-prototype-with, no-throw-literal -- needed for testing
[]['with']({ valueOf: function () { throw 4; } }, null);
} catch (error) {
return error !== 4;
}
})();
// `Array.prototype.with` method
// https://tc39.es/ecma262/#sec-array.prototype.with
$({ target: 'Array', proto: true, forced: INCORRECT_EXCEPTION_ON_COERCION_FAIL }, {
'with': function (index, value) {
var O = toIndexedObject(this);
var len = lengthOfArrayLike(O);
var relativeIndex = toIntegerOrInfinity(index);
var actualIndex = relativeIndex < 0 ? len + relativeIndex : relativeIndex;
if (actualIndex >= len || actualIndex < 0) throw new $RangeError('Incorrect index');
var A = new $Array(len);
var k = 0;
for (; k < len; k++) createProperty(A, k, k === actualIndex ? value : O[k]);
return A;
}
});
/***/ }),
/* 123 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var uncurryThis = __webpack_require__(6);
var pow = Math.pow;
var EXP_MASK16 = 31; // 2 ** 5 - 1
var SIGNIFICAND_MASK16 = 1023; // 2 ** 10 - 1
var MIN_SUBNORMAL16 = pow(2, -24); // 2 ** -10 * 2 ** -14
var SIGNIFICAND_DENOM16 = 0.0009765625; // 2 ** -10
var unpackFloat16 = function (bytes) {
var sign = bytes >>> 15;
var exponent = bytes >>> 10 & EXP_MASK16;
var significand = bytes & SIGNIFICAND_MASK16;
if (exponent === EXP_MASK16) return significand === 0 ? (sign === 0 ? Infinity : -Infinity) : NaN;
if (exponent === 0) return significand * (sign === 0 ? MIN_SUBNORMAL16 : -MIN_SUBNORMAL16);
return pow(2, exponent - 15) * (sign === 0 ? 1 + significand * SIGNIFICAND_DENOM16 : -1 - significand * SIGNIFICAND_DENOM16);
};
// eslint-disable-next-line es/no-typed-arrays -- safe
var getUint16 = uncurryThis(DataView.prototype.getUint16);
// `DataView.prototype.getFloat16` method
// https://tc39.es/ecma262/#sec-dataview.prototype.getfloat16
$({ target: 'DataView', proto: true }, {
getFloat16: function getFloat16(byteOffset /* , littleEndian */) {
return unpackFloat16(getUint16(this, byteOffset, arguments.length > 1 ? arguments[1] : false));
}
});
/***/ }),
/* 124 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var uncurryThis = __webpack_require__(6);
var aDataView = __webpack_require__(125);
var toIndex = __webpack_require__(126);
// TODO: Replace with module dependency in `core-js@4`
var log2 = __webpack_require__(127);
var roundTiesToEven = __webpack_require__(128);
var pow = Math.pow;
var MIN_INFINITY16 = 65520; // (2 - 2 ** -11) * 2 ** 15
var MIN_NORMAL16 = 0.000061005353927612305; // (1 - 2 ** -11) * 2 ** -14
var REC_MIN_SUBNORMAL16 = 16777216; // 2 ** 10 * 2 ** 14
var REC_SIGNIFICAND_DENOM16 = 1024; // 2 ** 10;
var packFloat16 = function (value) {
// eslint-disable-next-line no-self-compare -- NaN check
if (value !== value) return 0x7E00; // NaN
if (value === 0) return (1 / value === -Infinity) << 15; // +0 or -0
var neg = value < 0;
if (neg) value = -value;
if (value >= MIN_INFINITY16) return neg << 15 | 0x7C00; // Infinity
if (value < MIN_NORMAL16) return neg << 15 | roundTiesToEven(value * REC_MIN_SUBNORMAL16); // subnormal
// normal
var exponent = log2(value) | 0;
if (exponent === -15) {
// we round from a value between 2 ** -15 * (1 + 1022/1024) (the largest subnormal) and 2 ** -14 * (1 + 0/1024) (the smallest normal)
// to the latter (former impossible because of the subnormal check above)
return neg << 15 | REC_SIGNIFICAND_DENOM16;
}
var significand = roundTiesToEven((value * pow(2, -exponent) - 1) * REC_SIGNIFICAND_DENOM16);
if (significand === REC_SIGNIFICAND_DENOM16) {
// we round from a value between 2 ** n * (1 + 1023/1024) and 2 ** (n + 1) * (1 + 0/1024) to the latter
return neg << 15 | exponent + 16 << 10;
}
return neg << 15 | exponent + 15 << 10 | significand;
};
// eslint-disable-next-line es/no-typed-arrays -- safe
var setUint16 = uncurryThis(DataView.prototype.setUint16);
// `DataView.prototype.setFloat16` method
// https://tc39.es/ecma262/#sec-dataview.prototype.setfloat16
$({ target: 'DataView', proto: true }, {
setFloat16: function setFloat16(byteOffset, value /* , littleEndian */) {
setUint16(
aDataView(this),
toIndex(byteOffset),
packFloat16(+value),
arguments.length > 2 ? arguments[2] : false
);
}
});
/***/ }),
/* 125 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var classof = __webpack_require__(82);
var $TypeError = TypeError;
module.exports = function (argument) {
if (classof(argument) === 'DataView') return argument;
throw new $TypeError('Argument is not a DataView');
};
/***/ }),
/* 126 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toIntegerOrInfinity = __webpack_require__(65);
var toLength = __webpack_require__(68);
var $RangeError = RangeError;
// `ToIndex` abstract operation
// https://tc39.es/ecma262/#sec-toindex
module.exports = function (it) {
if (it === undefined) return 0;
var number = toIntegerOrInfinity(it);
var length = toLength(number);
if (number !== length) throw new $RangeError('Wrong length or index');
return length;
};
/***/ }),
/* 127 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var log = Math.log;
var LN2 = Math.LN2;
// `Math.log2` method
// https://tc39.es/ecma262/#sec-math.log2
// eslint-disable-next-line es/no-math-log2 -- safe
module.exports = Math.log2 || function log2(x) {
return log(x) / LN2;
};
/***/ }),
/* 128 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var EPSILON = 2.220446049250313e-16; // Number.EPSILON
var INVERSE_EPSILON = 1 / EPSILON;
module.exports = function (n) {
return n + INVERSE_EPSILON - INVERSE_EPSILON;
};
/***/ }),
/* 129 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(24);
var defineBuiltInAccessor = __webpack_require__(130);
var isDetached = __webpack_require__(131);
var ArrayBufferPrototype = ArrayBuffer.prototype;
// `ArrayBuffer.prototype.detached` getter
// https://tc39.es/ecma262/#sec-get-arraybuffer.prototype.detached
if (DESCRIPTORS && !('detached' in ArrayBufferPrototype)) {
defineBuiltInAccessor(ArrayBufferPrototype, 'detached', {
configurable: true,
get: function detached() {
return isDetached(this);
}
});
}
/***/ }),
/* 130 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var makeBuiltIn = __webpack_require__(52);
var defineProperty = __webpack_require__(23);
module.exports = function (target, name, descriptor) {
if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
return defineProperty.f(target, name, descriptor);
};
/***/ }),
/* 131 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var NATIVE_ARRAY_BUFFER = __webpack_require__(132);
var arrayBufferByteLength = __webpack_require__(133);
var DataView = globalThis.DataView;
module.exports = function (O) {
if (!NATIVE_ARRAY_BUFFER || arrayBufferByteLength(O) !== 0) return false;
try {
// eslint-disable-next-line no-new -- thrower
new DataView(O);
return false;
} catch (error) {
return true;
}
};
/***/ }),
/* 132 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// eslint-disable-next-line es/no-typed-arrays -- safe
module.exports = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
/***/ }),
/* 133 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var uncurryThisAccessor = __webpack_require__(75);
var classof = __webpack_require__(46);
var ArrayBuffer = globalThis.ArrayBuffer;
var TypeError = globalThis.TypeError;
// Includes
// - Perform ? RequireInternalSlot(O, [[ArrayBufferData]]).
// - If IsSharedArrayBuffer(O) is true, throw a TypeError exception.
module.exports = ArrayBuffer && uncurryThisAccessor(ArrayBuffer.prototype, 'byteLength', 'get') || function (O) {
if (classof(O) !== 'ArrayBuffer') throw new TypeError('ArrayBuffer expected');
return O.byteLength;
};
/***/ }),
/* 134 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var $transfer = __webpack_require__(135);
// `ArrayBuffer.prototype.transfer` method
// https://tc39.es/ecma262/#sec-arraybuffer.prototype.transfer
if ($transfer) $({ target: 'ArrayBuffer', proto: true }, {
transfer: function transfer() {
return $transfer(this, arguments.length ? arguments[0] : undefined, true);
}
});
/***/ }),
/* 135 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var uncurryThis = __webpack_require__(6);
var uncurryThisAccessor = __webpack_require__(75);
var toIndex = __webpack_require__(126);
var notDetached = __webpack_require__(136);
var arrayBufferByteLength = __webpack_require__(133);
var detachTransferable = __webpack_require__(137);
var PROPER_STRUCTURED_CLONE_TRANSFER = __webpack_require__(141);
var structuredClone = globalThis.structuredClone;
var ArrayBuffer = globalThis.ArrayBuffer;
var DataView = globalThis.DataView;
var min = Math.min;
var ArrayBufferPrototype = ArrayBuffer.prototype;
var DataViewPrototype = DataView.prototype;
var slice = uncurryThis(ArrayBufferPrototype.slice);
var isResizable = uncurryThisAccessor(ArrayBufferPrototype, 'resizable', 'get');
var maxByteLength = uncurryThisAccessor(ArrayBufferPrototype, 'maxByteLength', 'get');
var getInt8 = uncurryThis(DataViewPrototype.getInt8);
var setInt8 = uncurryThis(DataViewPrototype.setInt8);
module.exports = (PROPER_STRUCTURED_CLONE_TRANSFER || detachTransferable) && function (arrayBuffer, newLength, preserveResizability) {
var byteLength = arrayBufferByteLength(arrayBuffer);
var newByteLength = newLength === undefined ? byteLength : toIndex(newLength);
var fixedLength = !isResizable || !isResizable(arrayBuffer);
var newBuffer;
notDetached(arrayBuffer);
if (PROPER_STRUCTURED_CLONE_TRANSFER) {
arrayBuffer = structuredClone(arrayBuffer, { transfer: [arrayBuffer] });
if (byteLength === newByteLength && (preserveResizability || fixedLength)) return arrayBuffer;
}
if (byteLength >= newByteLength && (!preserveResizability || fixedLength)) {
newBuffer = slice(arrayBuffer, 0, newByteLength);
} else {
var options = preserveResizability && !fixedLength && maxByteLength ? { maxByteLength: maxByteLength(arrayBuffer) } : undefined;
newBuffer = new ArrayBuffer(newByteLength, options);
var a = new DataView(arrayBuffer);
var b = new DataView(newBuffer);
var copyLength = min(newByteLength, byteLength);
for (var i = 0; i < copyLength; i++) setInt8(b, i, getInt8(a, i));
}
if (!PROPER_STRUCTURED_CLONE_TRANSFER) detachTransferable(arrayBuffer);
return newBuffer;
};
/***/ }),
/* 136 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isDetached = __webpack_require__(131);
var $TypeError = TypeError;
module.exports = function (it) {
if (isDetached(it)) throw new $TypeError('ArrayBuffer is detached');
return it;
};
/***/ }),
/* 137 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var getBuiltInNodeModule = __webpack_require__(138);
var PROPER_STRUCTURED_CLONE_TRANSFER = __webpack_require__(141);
var structuredClone = globalThis.structuredClone;
var $ArrayBuffer = globalThis.ArrayBuffer;
var $MessageChannel = globalThis.MessageChannel;
var detach = false;
var WorkerThreads, channel, buffer, $detach;
if (PROPER_STRUCTURED_CLONE_TRANSFER) {
detach = function (transferable) {
structuredClone(transferable, { transfer: [transferable] });
};
} else if ($ArrayBuffer) try {
if (!$MessageChannel) {
WorkerThreads = getBuiltInNodeModule('worker_threads');
if (WorkerThreads) $MessageChannel = WorkerThreads.MessageChannel;
}
if ($MessageChannel) {
channel = new $MessageChannel();
buffer = new $ArrayBuffer(2);
$detach = function (transferable) {
channel.port1.postMessage(null, [transferable]);
};
if (buffer.byteLength === 2) {
$detach(buffer);
if (buffer.byteLength === 0) detach = $detach;
}
}
} catch (error) { /* empty */ }
module.exports = detach;
/***/ }),
/* 138 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var IS_NODE = __webpack_require__(139);
module.exports = function (name) {
if (IS_NODE) {
try {
return globalThis.process.getBuiltinModule(name);
} catch (error) { /* empty */ }
try {
// eslint-disable-next-line no-new-func -- safe
return Function('return require("' + name + '")')();
} catch (error) { /* empty */ }
}
};
/***/ }),
/* 139 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ENVIRONMENT = __webpack_require__(140);
module.exports = ENVIRONMENT === 'NODE';
/***/ }),
/* 140 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* global Bun, Deno -- detection */
var globalThis = __webpack_require__(2);
var userAgent = __webpack_require__(21);
var classof = __webpack_require__(46);
var userAgentStartsWith = function (string) {
return userAgent.slice(0, string.length) === string;
};
module.exports = (function () {
if (userAgentStartsWith('Bun/')) return 'BUN';
if (userAgentStartsWith('Cloudflare-Workers')) return 'CLOUDFLARE';
if (userAgentStartsWith('Deno/')) return 'DENO';
if (userAgentStartsWith('Node.js/')) return 'NODE';
if (globalThis.Bun && typeof Bun.version == 'string') return 'BUN';
if (globalThis.Deno && typeof Deno.version == 'object') return 'DENO';
if (classof(globalThis.process) === 'process') return 'NODE';
if (globalThis.window && globalThis.document) return 'BROWSER';
return 'REST';
})();
/***/ }),
/* 141 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var fails = __webpack_require__(8);
var V8 = __webpack_require__(20);
var ENVIRONMENT = __webpack_require__(140);
var structuredClone = globalThis.structuredClone;
module.exports = !!structuredClone && !fails(function () {
// prevent V8 ArrayBufferDetaching protector cell invalidation and performance degradation
// https://github.com/zloirock/core-js/issues/679
if ((ENVIRONMENT === 'DENO' && V8 > 92) || (ENVIRONMENT === 'NODE' && V8 > 94) || (ENVIRONMENT === 'BROWSER' && V8 > 97)) return false;
var buffer = new ArrayBuffer(8);
var clone = structuredClone(buffer, { transfer: [buffer] });
return buffer.byteLength !== 0 || clone.byteLength !== 8;
});
/***/ }),
/* 142 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var $transfer = __webpack_require__(135);
// `ArrayBuffer.prototype.transferToFixedLength` method
// https://tc39.es/ecma262/#sec-arraybuffer.prototype.transfertofixedlength
if ($transfer) $({ target: 'ArrayBuffer', proto: true }, {
transferToFixedLength: function transferToFixedLength() {
return $transfer(this, arguments.length ? arguments[0] : undefined, false);
}
});
/***/ }),
/* 143 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/tc39/proposal-explicit-resource-management
var $ = __webpack_require__(49);
var DESCRIPTORS = __webpack_require__(24);
var getBuiltIn = __webpack_require__(35);
var aCallable = __webpack_require__(38);
var anInstance = __webpack_require__(144);
var defineBuiltIn = __webpack_require__(51);
var defineBuiltIns = __webpack_require__(145);
var defineBuiltInAccessor = __webpack_require__(130);
var wellKnownSymbol = __webpack_require__(13);
var InternalStateModule = __webpack_require__(55);
var addDisposableResource = __webpack_require__(146);
var SuppressedError = getBuiltIn('SuppressedError');
var $ReferenceError = ReferenceError;
var DISPOSE = wellKnownSymbol('dispose');
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var DISPOSABLE_STACK = 'DisposableStack';
var setInternalState = InternalStateModule.set;
var getDisposableStackInternalState = InternalStateModule.getterFor(DISPOSABLE_STACK);
var HINT = 'sync-dispose';
var DISPOSED = 'disposed';
var PENDING = 'pending';
var getPendingDisposableStackInternalState = function (stack) {
var internalState = getDisposableStackInternalState(stack);
if (internalState.state === DISPOSED) throw new $ReferenceError(DISPOSABLE_STACK + ' already disposed');
return internalState;
};
var $DisposableStack = function DisposableStack() {
setInternalState(anInstance(this, DisposableStackPrototype), {
type: DISPOSABLE_STACK,
state: PENDING,
stack: []
});
if (!DESCRIPTORS) this.disposed = false;
};
var DisposableStackPrototype = $DisposableStack.prototype;
defineBuiltIns(DisposableStackPrototype, {
dispose: function dispose() {
var internalState = getDisposableStackInternalState(this);
if (internalState.state === DISPOSED) return;
internalState.state = DISPOSED;
if (!DESCRIPTORS) this.disposed = true;
var stack = internalState.stack;
var i = stack.length;
var thrown = false;
var suppressed;
while (i) {
var disposeMethod = stack[--i];
stack[i] = null;
try {
disposeMethod();
} catch (errorResult) {
if (thrown) {
suppressed = new SuppressedError(errorResult, suppressed);
} else {
thrown = true;
suppressed = errorResult;
}
}
}
internalState.stack = null;
if (thrown) throw suppressed;
},
use: function use(value) {
addDisposableResource(getPendingDisposableStackInternalState(this), value, HINT);
return value;
},
adopt: function adopt(value, onDispose) {
var internalState = getPendingDisposableStackInternalState(this);
aCallable(onDispose);
addDisposableResource(internalState, undefined, HINT, function () {
onDispose(value);
});
return value;
},
defer: function defer(onDispose) {
var internalState = getPendingDisposableStackInternalState(this);
aCallable(onDispose);
addDisposableResource(internalState, undefined, HINT, onDispose);
},
move: function move() {
var internalState = getPendingDisposableStackInternalState(this);
var newDisposableStack = new $DisposableStack();
getDisposableStackInternalState(newDisposableStack).stack = internalState.stack;
internalState.stack = [];
internalState.state = DISPOSED;
if (!DESCRIPTORS) this.disposed = true;
return newDisposableStack;
}
});
if (DESCRIPTORS) defineBuiltInAccessor(DisposableStackPrototype, 'disposed', {
configurable: true,
get: function disposed() {
return getDisposableStackInternalState(this).state === DISPOSED;
}
});
defineBuiltIn(DisposableStackPrototype, DISPOSE, DisposableStackPrototype.dispose, { name: 'dispose' });
defineBuiltIn(DisposableStackPrototype, TO_STRING_TAG, DISPOSABLE_STACK, { nonWritable: true });
$({ global: true, constructor: true }, {
DisposableStack: $DisposableStack
});
/***/ }),
/* 144 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isPrototypeOf = __webpack_require__(36);
var $TypeError = TypeError;
module.exports = function (it, Prototype) {
if (isPrototypeOf(Prototype, it)) return it;
throw new $TypeError('Incorrect invocation');
};
/***/ }),
/* 145 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var defineBuiltIn = __webpack_require__(51);
module.exports = function (target, src, options) {
for (var key in src) defineBuiltIn(target, key, src[key], options);
return target;
};
/***/ }),
/* 146 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var getBuiltIn = __webpack_require__(35);
var call = __webpack_require__(33);
var uncurryThis = __webpack_require__(6);
var bind = __webpack_require__(98);
var anObject = __webpack_require__(30);
var aCallable = __webpack_require__(38);
var isNullOrUndefined = __webpack_require__(11);
var getMethod = __webpack_require__(37);
var wellKnownSymbol = __webpack_require__(13);
var ASYNC_DISPOSE = wellKnownSymbol('asyncDispose');
var DISPOSE = wellKnownSymbol('dispose');
var push = uncurryThis([].push);
// `GetDisposeMethod` abstract operation
// https://tc39.es/proposal-explicit-resource-management/#sec-getdisposemethod
var getDisposeMethod = function (V, hint) {
if (hint === 'async-dispose') {
var method = getMethod(V, ASYNC_DISPOSE);
if (method !== undefined) return method;
method = getMethod(V, DISPOSE);
if (method === undefined) return method;
return function () {
var O = this;
var Promise = getBuiltIn('Promise');
return new Promise(function (resolve) {
call(method, O);
resolve(undefined);
});
};
} return getMethod(V, DISPOSE);
};
// `CreateDisposableResource` abstract operation
// https://tc39.es/proposal-explicit-resource-management/#sec-createdisposableresource
var createDisposableResource = function (V, hint, method) {
if (arguments.length < 3 && !isNullOrUndefined(V)) {
method = aCallable(getDisposeMethod(anObject(V), hint));
}
return method === undefined ? function () {
return undefined;
} : bind(method, V);
};
// `AddDisposableResource` abstract operation
// https://tc39.es/proposal-explicit-resource-management/#sec-adddisposableresource
module.exports = function (disposable, V, hint, method) {
var resource;
if (arguments.length < 4) {
// When `V`` is either `null` or `undefined` and hint is `async-dispose`,
// we record that the resource was evaluated to ensure we will still perform an `Await` when resources are later disposed.
if (isNullOrUndefined(V) && hint === 'sync-dispose') return;
resource = createDisposableResource(V, hint);
} else {
resource = createDisposableResource(undefined, hint, method);
}
push(disposable.stack, resource);
};
/***/ }),
/* 147 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var globalThis = __webpack_require__(2);
var anInstance = __webpack_require__(144);
var anObject = __webpack_require__(30);
var isCallable = __webpack_require__(28);
var getPrototypeOf = __webpack_require__(91);
var defineBuiltInAccessor = __webpack_require__(130);
var createProperty = __webpack_require__(117);
var fails = __webpack_require__(8);
var hasOwn = __webpack_require__(5);
var wellKnownSymbol = __webpack_require__(13);
var IteratorPrototype = __webpack_require__(148).IteratorPrototype;
var DESCRIPTORS = __webpack_require__(24);
var IS_PURE = __webpack_require__(16);
var CONSTRUCTOR = 'constructor';
var ITERATOR = 'Iterator';
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var $TypeError = TypeError;
var NativeIterator = globalThis[ITERATOR];
// FF56- have non-standard global helper `Iterator`
var FORCED = IS_PURE
|| !isCallable(NativeIterator)
|| NativeIterator.prototype !== IteratorPrototype
// FF44- non-standard `Iterator` passes previous tests
|| !fails(function () { NativeIterator({}); });
var IteratorConstructor = function Iterator() {
anInstance(this, IteratorPrototype);
if (getPrototypeOf(this) === IteratorPrototype) throw new $TypeError('Abstract class Iterator not directly constructable');
};
var defineIteratorPrototypeAccessor = function (key, value) {
if (DESCRIPTORS) {
defineBuiltInAccessor(IteratorPrototype, key, {
configurable: true,
get: function () {
return value;
},
set: function (replacement) {
anObject(this);
if (this === IteratorPrototype) throw new $TypeError("You can't redefine this property");
if (hasOwn(this, key)) this[key] = replacement;
else createProperty(this, key, replacement);
}
});
} else IteratorPrototype[key] = value;
};
if (!hasOwn(IteratorPrototype, TO_STRING_TAG)) defineIteratorPrototypeAccessor(TO_STRING_TAG, ITERATOR);
if (FORCED || !hasOwn(IteratorPrototype, CONSTRUCTOR) || IteratorPrototype[CONSTRUCTOR] === Object) {
defineIteratorPrototypeAccessor(CONSTRUCTOR, IteratorConstructor);
}
IteratorConstructor.prototype = IteratorPrototype;
// `Iterator` constructor
// https://tc39.es/ecma262/#sec-iterator
$({ global: true, constructor: true, forced: FORCED }, {
Iterator: IteratorConstructor
});
/***/ }),
/* 148 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(8);
var isCallable = __webpack_require__(28);
var isObject = __webpack_require__(27);
var create = __webpack_require__(93);
var getPrototypeOf = __webpack_require__(91);
var defineBuiltIn = __webpack_require__(51);
var wellKnownSymbol = __webpack_require__(13);
var IS_PURE = __webpack_require__(16);
var ITERATOR = wellKnownSymbol('iterator');
var BUGGY_SAFARI_ITERATORS = false;
// `%IteratorPrototype%` object
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
/* eslint-disable es/no-array-prototype-keys -- safe */
if ([].keys) {
arrayIterator = [].keys();
// Safari 8 has buggy iterators w/o `next`
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
else {
PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
}
}
var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype) || fails(function () {
var test = {};
// FF44- legacy iterators case
return IteratorPrototype[ITERATOR].call(test) !== test;
});
if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};
else if (IS_PURE) IteratorPrototype = create(IteratorPrototype);
// `%IteratorPrototype%[@@iterator]()` method
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
if (!isCallable(IteratorPrototype[ITERATOR])) {
defineBuiltIn(IteratorPrototype, ITERATOR, function () {
return this;
});
}
module.exports = {
IteratorPrototype: IteratorPrototype,
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
};
/***/ }),
/* 149 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var aCallable = __webpack_require__(38);
var anObject = __webpack_require__(30);
var getIteratorMethod = __webpack_require__(103);
var createIteratorProxy = __webpack_require__(150);
var $Array = Array;
var IteratorProxy = createIteratorProxy(function () {
while (true) {
var iterator = this.iterator;
if (!iterator) {
var iterableIndex = this.nextIterableIndex++;
var iterables = this.iterables;
if (iterableIndex >= iterables.length) {
this.done = true;
return;
}
var entry = iterables[iterableIndex];
this.iterables[iterableIndex] = null;
iterator = this.iterator = call(entry.method, entry.iterable);
this.next = iterator.next;
}
var result = anObject(call(this.next, iterator));
if (result.done) {
this.iterator = null;
this.next = null;
continue;
}
return result.value;
}
});
// `Iterator.concat` method
// https://github.com/tc39/proposal-iterator-sequencing
$({ target: 'Iterator', stat: true }, {
concat: function concat() {
var length = arguments.length;
var iterables = $Array(length);
for (var index = 0; index < length; index++) {
var item = anObject(arguments[index]);
iterables[index] = {
iterable: item,
method: aCallable(getIteratorMethod(item))
};
}
return new IteratorProxy({
iterables: iterables,
nextIterableIndex: 0,
iterator: null,
next: null
});
}
});
/***/ }),
/* 150 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(33);
var create = __webpack_require__(93);
var createNonEnumerableProperty = __webpack_require__(50);
var defineBuiltIns = __webpack_require__(145);
var wellKnownSymbol = __webpack_require__(13);
var InternalStateModule = __webpack_require__(55);
var getMethod = __webpack_require__(37);
var IteratorPrototype = __webpack_require__(148).IteratorPrototype;
var createIterResultObject = __webpack_require__(151);
var iteratorClose = __webpack_require__(104);
var iteratorCloseAll = __webpack_require__(152);
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var ITERATOR_HELPER = 'IteratorHelper';
var WRAP_FOR_VALID_ITERATOR = 'WrapForValidIterator';
var NORMAL = 'normal';
var THROW = 'throw';
var setInternalState = InternalStateModule.set;
var createIteratorProxyPrototype = function (IS_ITERATOR) {
var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER);
return defineBuiltIns(create(IteratorPrototype), {
next: function next() {
var state = getInternalState(this);
// for simplification:
// for `%WrapForValidIteratorPrototype%.next` or with `state.returnHandlerResult` our `nextHandler` returns `IterResultObject`
// for `%IteratorHelperPrototype%.next` - just a value
if (IS_ITERATOR) return state.nextHandler();
if (state.done) return createIterResultObject(undefined, true);
try {
var result = state.nextHandler();
return state.returnHandlerResult ? result : createIterResultObject(result, state.done);
} catch (error) {
state.done = true;
throw error;
}
},
'return': function () {
var state = getInternalState(this);
var iterator = state.iterator;
state.done = true;
if (IS_ITERATOR) {
var returnMethod = getMethod(iterator, 'return');
return returnMethod ? call(returnMethod, iterator) : createIterResultObject(undefined, true);
}
if (state.inner) try {
iteratorClose(state.inner.iterator, NORMAL);
} catch (error) {
return iteratorClose(iterator, THROW, error);
}
if (state.openIters) try {
iteratorCloseAll(state.openIters, NORMAL);
} catch (error) {
return iteratorClose(iterator, THROW, error);
}
if (iterator) iteratorClose(iterator, NORMAL);
return createIterResultObject(undefined, true);
}
});
};
var WrapForValidIteratorPrototype = createIteratorProxyPrototype(true);
var IteratorHelperPrototype = createIteratorProxyPrototype(false);
createNonEnumerableProperty(IteratorHelperPrototype, TO_STRING_TAG, 'Iterator Helper');
module.exports = function (nextHandler, IS_ITERATOR, RETURN_HANDLER_RESULT) {
var IteratorProxy = function Iterator(record, state) {
if (state) {
state.iterator = record.iterator;
state.next = record.next;
} else state = record;
state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER;
state.returnHandlerResult = !!RETURN_HANDLER_RESULT;
state.nextHandler = nextHandler;
state.counter = 0;
state.done = false;
setInternalState(this, state);
};
IteratorProxy.prototype = IS_ITERATOR ? WrapForValidIteratorPrototype : IteratorHelperPrototype;
return IteratorProxy;
};
/***/ }),
/* 151 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// `CreateIterResultObject` abstract operation
// https://tc39.es/ecma262/#sec-createiterresultobject
module.exports = function (value, done) {
return { value: value, done: done };
};
/***/ }),
/* 152 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var iteratorClose = __webpack_require__(104);
module.exports = function (iters, kind, value) {
for (var i = iters.length - 1; i >= 0; i--) {
if (iters[i] === undefined) continue;
try {
value = iteratorClose(iters[i].iterator, kind, value);
} catch (error) {
kind = 'throw';
value = error;
}
}
if (kind === 'throw') throw value;
return value;
};
/***/ }),
/* 153 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/tc39/proposal-explicit-resource-management
var call = __webpack_require__(33);
var defineBuiltIn = __webpack_require__(51);
var getMethod = __webpack_require__(37);
var hasOwn = __webpack_require__(5);
var wellKnownSymbol = __webpack_require__(13);
var IteratorPrototype = __webpack_require__(148).IteratorPrototype;
var DISPOSE = wellKnownSymbol('dispose');
if (!hasOwn(IteratorPrototype, DISPOSE)) {
defineBuiltIn(IteratorPrototype, DISPOSE, function () {
var $return = getMethod(this, 'return');
if ($return) call($return, this);
});
}
/***/ }),
/* 154 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var anObject = __webpack_require__(30);
var getIteratorDirect = __webpack_require__(155);
var notANaN = __webpack_require__(156);
var toPositiveInteger = __webpack_require__(157);
var iteratorClose = __webpack_require__(104);
var createIteratorProxy = __webpack_require__(150);
var iteratorHelperThrowsOnInvalidIterator = __webpack_require__(158);
var iteratorHelperWithoutClosingOnEarlyError = __webpack_require__(159);
var IS_PURE = __webpack_require__(16);
var DROP_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator('drop', 0);
var dropWithoutClosingOnEarlyError = !IS_PURE && !DROP_WITHOUT_THROWING_ON_INVALID_ITERATOR
&& iteratorHelperWithoutClosingOnEarlyError('drop', RangeError);
var FORCED = IS_PURE || DROP_WITHOUT_THROWING_ON_INVALID_ITERATOR || dropWithoutClosingOnEarlyError;
var IteratorProxy = createIteratorProxy(function () {
var iterator = this.iterator;
var next = this.next;
var result, done;
while (this.remaining) {
this.remaining--;
result = anObject(call(next, iterator));
done = this.done = !!result.done;
if (done) return;
}
result = anObject(call(next, iterator));
done = this.done = !!result.done;
if (!done) return result.value;
});
// `Iterator.prototype.drop` method
// https://tc39.es/ecma262/#sec-iterator.prototype.drop
$({ target: 'Iterator', proto: true, real: true, forced: FORCED }, {
drop: function drop(limit) {
anObject(this);
var remaining;
try {
remaining = toPositiveInteger(notANaN(+limit));
} catch (error) {
iteratorClose(this, 'throw', error);
}
if (dropWithoutClosingOnEarlyError) return call(dropWithoutClosingOnEarlyError, this, remaining);
return new IteratorProxy(getIteratorDirect(this), {
remaining: remaining
});
}
});
/***/ }),
/* 155 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// `GetIteratorDirect(obj)` abstract operation
// https://tc39.es/ecma262/#sec-getiteratordirect
module.exports = function (obj) {
return {
iterator: obj,
next: obj.next,
done: false
};
};
/***/ }),
/* 156 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $RangeError = RangeError;
module.exports = function (it) {
// eslint-disable-next-line no-self-compare -- NaN check
if (it === it) return it;
throw new $RangeError('NaN is not allowed');
};
/***/ }),
/* 157 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toIntegerOrInfinity = __webpack_require__(65);
var $RangeError = RangeError;
module.exports = function (it) {
var result = toIntegerOrInfinity(it);
if (result < 0) throw new $RangeError("The argument can't be less than 0");
return result;
};
/***/ }),
/* 158 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Should throw an error on invalid iterator
// https://issues.chromium.org/issues/336839115
module.exports = function (methodName, argument) {
// eslint-disable-next-line es/no-iterator -- required for testing
var method = typeof Iterator == 'function' && Iterator.prototype[methodName];
if (method) try {
method.call({ next: null }, argument).next();
} catch (error) {
return true;
}
};
/***/ }),
/* 159 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
// https://github.com/tc39/ecma262/pull/3467
module.exports = function (METHOD_NAME, ExpectedError) {
var Iterator = globalThis.Iterator;
var IteratorPrototype = Iterator && Iterator.prototype;
var method = IteratorPrototype && IteratorPrototype[METHOD_NAME];
var CLOSED = false;
if (method) try {
method.call({
next: function () { return { done: true }; },
'return': function () { CLOSED = true; }
}, -1);
} catch (error) {
// https://bugs.webkit.org/show_bug.cgi?id=291195
if (!(error instanceof ExpectedError)) CLOSED = false;
}
if (!CLOSED) return method;
};
/***/ }),
/* 160 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var iterate = __webpack_require__(97);
var aCallable = __webpack_require__(38);
var anObject = __webpack_require__(30);
var getIteratorDirect = __webpack_require__(155);
var iteratorClose = __webpack_require__(104);
var iteratorHelperWithoutClosingOnEarlyError = __webpack_require__(159);
var everyWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError('every', TypeError);
// `Iterator.prototype.every` method
// https://tc39.es/ecma262/#sec-iterator.prototype.every
$({ target: 'Iterator', proto: true, real: true, forced: everyWithoutClosingOnEarlyError }, {
every: function every(predicate) {
anObject(this);
try {
aCallable(predicate);
} catch (error) {
iteratorClose(this, 'throw', error);
}
if (everyWithoutClosingOnEarlyError) return call(everyWithoutClosingOnEarlyError, this, predicate);
var record = getIteratorDirect(this);
var counter = 0;
return !iterate(record, function (value, stop) {
if (!predicate(value, counter++)) return stop();
}, { IS_RECORD: true, INTERRUPTED: true }).stopped;
}
});
/***/ }),
/* 161 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var aCallable = __webpack_require__(38);
var anObject = __webpack_require__(30);
var getIteratorDirect = __webpack_require__(155);
var createIteratorProxy = __webpack_require__(150);
var callWithSafeIterationClosing = __webpack_require__(162);
var IS_PURE = __webpack_require__(16);
var iteratorClose = __webpack_require__(104);
var iteratorHelperThrowsOnInvalidIterator = __webpack_require__(158);
var iteratorHelperWithoutClosingOnEarlyError = __webpack_require__(159);
var FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator('filter', function () { /* empty */ });
var filterWithoutClosingOnEarlyError = !IS_PURE && !FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR
&& iteratorHelperWithoutClosingOnEarlyError('filter', TypeError);
var FORCED = IS_PURE || FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR || filterWithoutClosingOnEarlyError;
var IteratorProxy = createIteratorProxy(function () {
var iterator = this.iterator;
var predicate = this.predicate;
var next = this.next;
var result, done, value;
while (true) {
result = anObject(call(next, iterator));
done = this.done = !!result.done;
if (done) return;
value = result.value;
if (callWithSafeIterationClosing(iterator, predicate, [value, this.counter++], true)) return value;
}
});
// `Iterator.prototype.filter` method
// https://tc39.es/ecma262/#sec-iterator.prototype.filter
$({ target: 'Iterator', proto: true, real: true, forced: FORCED }, {
filter: function filter(predicate) {
anObject(this);
try {
aCallable(predicate);
} catch (error) {
iteratorClose(this, 'throw', error);
}
if (filterWithoutClosingOnEarlyError) return call(filterWithoutClosingOnEarlyError, this, predicate);
return new IteratorProxy(getIteratorDirect(this), {
predicate: predicate
});
}
});
/***/ }),
/* 162 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var anObject = __webpack_require__(30);
var iteratorClose = __webpack_require__(104);
// call something on iterator step with safe closing on error
module.exports = function (iterator, fn, value, ENTRIES) {
try {
return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
} catch (error) {
iteratorClose(iterator, 'throw', error);
}
};
/***/ }),
/* 163 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var iterate = __webpack_require__(97);
var aCallable = __webpack_require__(38);
var anObject = __webpack_require__(30);
var getIteratorDirect = __webpack_require__(155);
var iteratorClose = __webpack_require__(104);
var iteratorHelperWithoutClosingOnEarlyError = __webpack_require__(159);
var findWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError('find', TypeError);
// `Iterator.prototype.find` method
// https://tc39.es/ecma262/#sec-iterator.prototype.find
$({ target: 'Iterator', proto: true, real: true, forced: findWithoutClosingOnEarlyError }, {
find: function find(predicate) {
anObject(this);
try {
aCallable(predicate);
} catch (error) {
iteratorClose(this, 'throw', error);
}
if (findWithoutClosingOnEarlyError) return call(findWithoutClosingOnEarlyError, this, predicate);
var record = getIteratorDirect(this);
var counter = 0;
return iterate(record, function (value, stop) {
if (predicate(value, counter++)) return stop(value);
}, { IS_RECORD: true, INTERRUPTED: true }).result;
}
});
/***/ }),
/* 164 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var aCallable = __webpack_require__(38);
var anObject = __webpack_require__(30);
var getIteratorDirect = __webpack_require__(155);
var getIteratorFlattenable = __webpack_require__(165);
var createIteratorProxy = __webpack_require__(150);
var iteratorClose = __webpack_require__(104);
var IS_PURE = __webpack_require__(16);
var iteratorHelperThrowsOnInvalidIterator = __webpack_require__(158);
var iteratorHelperWithoutClosingOnEarlyError = __webpack_require__(159);
// Should not throw an error for an iterator without `return` method. Fixed in Safari 26.2
// https://bugs.webkit.org/show_bug.cgi?id=297532
function throwsOnIteratorWithoutReturn() {
try {
// eslint-disable-next-line es/no-map, es/no-iterator, es/no-iterator-prototype-flatmap -- required for testing
var it = Iterator.prototype.flatMap.call(new Map([[4, 5]]).entries(), function (v) { return v; });
it.next();
it['return']();
} catch (error) {
return true;
}
}
var FLAT_MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE
&& !iteratorHelperThrowsOnInvalidIterator('flatMap', function () { /* empty */ });
var flatMapWithoutClosingOnEarlyError = !IS_PURE && !FLAT_MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR
&& iteratorHelperWithoutClosingOnEarlyError('flatMap', TypeError);
var FORCED = IS_PURE || FLAT_MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR || flatMapWithoutClosingOnEarlyError
|| throwsOnIteratorWithoutReturn();
var IteratorProxy = createIteratorProxy(function () {
var iterator = this.iterator;
var mapper = this.mapper;
var result, inner;
while (true) {
if (inner = this.inner) try {
result = anObject(call(inner.next, inner.iterator));
if (!result.done) return result.value;
this.inner = null;
} catch (error) { iteratorClose(iterator, 'throw', error); }
result = anObject(call(this.next, iterator));
if (this.done = !!result.done) return;
try {
this.inner = getIteratorFlattenable(mapper(result.value, this.counter++), false);
} catch (error) { iteratorClose(iterator, 'throw', error); }
}
});
// `Iterator.prototype.flatMap` method
// https://tc39.es/ecma262/#sec-iterator.prototype.flatmap
$({ target: 'Iterator', proto: true, real: true, forced: FORCED }, {
flatMap: function flatMap(mapper) {
anObject(this);
try {
aCallable(mapper);
} catch (error) {
iteratorClose(this, 'throw', error);
}
if (flatMapWithoutClosingOnEarlyError) return call(flatMapWithoutClosingOnEarlyError, this, mapper);
return new IteratorProxy(getIteratorDirect(this), {
mapper: mapper,
inner: null
});
}
});
/***/ }),
/* 165 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(33);
var anObject = __webpack_require__(30);
var getIteratorDirect = __webpack_require__(155);
var getIteratorMethod = __webpack_require__(103);
module.exports = function (obj, stringHandling) {
if (!stringHandling || typeof obj !== 'string') anObject(obj);
var method = getIteratorMethod(obj);
return getIteratorDirect(anObject(method !== undefined ? call(method, obj) : obj));
};
/***/ }),
/* 166 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var iterate = __webpack_require__(97);
var aCallable = __webpack_require__(38);
var anObject = __webpack_require__(30);
var getIteratorDirect = __webpack_require__(155);
var iteratorClose = __webpack_require__(104);
var iteratorHelperWithoutClosingOnEarlyError = __webpack_require__(159);
var forEachWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError('forEach', TypeError);
// `Iterator.prototype.forEach` method
// https://tc39.es/ecma262/#sec-iterator.prototype.foreach
$({ target: 'Iterator', proto: true, real: true, forced: forEachWithoutClosingOnEarlyError }, {
forEach: function forEach(fn) {
anObject(this);
try {
aCallable(fn);
} catch (error) {
iteratorClose(this, 'throw', error);
}
if (forEachWithoutClosingOnEarlyError) return call(forEachWithoutClosingOnEarlyError, this, fn);
var record = getIteratorDirect(this);
var counter = 0;
iterate(record, function (value) {
fn(value, counter++);
}, { IS_RECORD: true });
}
});
/***/ }),
/* 167 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var toObject = __webpack_require__(9);
var isPrototypeOf = __webpack_require__(36);
var IteratorPrototype = __webpack_require__(148).IteratorPrototype;
var createIteratorProxy = __webpack_require__(150);
var getIteratorFlattenable = __webpack_require__(165);
var IS_PURE = __webpack_require__(16);
var FORCED = IS_PURE || function () {
// Should not throw when an underlying iterator's `return` method is null
// https://bugs.webkit.org/show_bug.cgi?id=288714
try {
// eslint-disable-next-line es/no-iterator -- required for testing
Iterator.from({ 'return': null })['return']();
} catch (error) {
return true;
}
}();
var IteratorProxy = createIteratorProxy(function () {
return call(this.next, this.iterator);
}, true);
// `Iterator.from` method
// https://tc39.es/ecma262/#sec-iterator.from
$({ target: 'Iterator', stat: true, forced: FORCED }, {
from: function from(O) {
var iteratorRecord = getIteratorFlattenable(typeof O == 'string' ? toObject(O) : O, true);
return isPrototypeOf(IteratorPrototype, iteratorRecord.iterator)
? iteratorRecord.iterator
: new IteratorProxy(iteratorRecord);
}
});
/***/ }),
/* 168 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var aCallable = __webpack_require__(38);
var anObject = __webpack_require__(30);
var getIteratorDirect = __webpack_require__(155);
var createIteratorProxy = __webpack_require__(150);
var callWithSafeIterationClosing = __webpack_require__(162);
var iteratorClose = __webpack_require__(104);
var iteratorHelperThrowsOnInvalidIterator = __webpack_require__(158);
var iteratorHelperWithoutClosingOnEarlyError = __webpack_require__(159);
var IS_PURE = __webpack_require__(16);
var MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator('map', function () { /* empty */ });
var mapWithoutClosingOnEarlyError = !IS_PURE && !MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR
&& iteratorHelperWithoutClosingOnEarlyError('map', TypeError);
var FORCED = IS_PURE || MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR || mapWithoutClosingOnEarlyError;
var IteratorProxy = createIteratorProxy(function () {
var iterator = this.iterator;
var result = anObject(call(this.next, iterator));
var done = this.done = !!result.done;
if (!done) return callWithSafeIterationClosing(iterator, this.mapper, [result.value, this.counter++], true);
});
// `Iterator.prototype.map` method
// https://tc39.es/ecma262/#sec-iterator.prototype.map
$({ target: 'Iterator', proto: true, real: true, forced: FORCED }, {
map: function map(mapper) {
anObject(this);
try {
aCallable(mapper);
} catch (error) {
iteratorClose(this, 'throw', error);
}
if (mapWithoutClosingOnEarlyError) return call(mapWithoutClosingOnEarlyError, this, mapper);
return new IteratorProxy(getIteratorDirect(this), {
mapper: mapper
});
}
});
/***/ }),
/* 169 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var iterate = __webpack_require__(97);
var aCallable = __webpack_require__(38);
var anObject = __webpack_require__(30);
var getIteratorDirect = __webpack_require__(155);
var iteratorClose = __webpack_require__(104);
var iteratorHelperWithoutClosingOnEarlyError = __webpack_require__(159);
var apply = __webpack_require__(72);
var fails = __webpack_require__(8);
var $TypeError = TypeError;
// https://bugs.webkit.org/show_bug.cgi?id=291651
var FAILS_ON_INITIAL_UNDEFINED = fails(function () {
// eslint-disable-next-line es/no-iterator-prototype-reduce, es/no-array-prototype-keys, array-callback-return -- required for testing
[].keys().reduce(function () { /* empty */ }, undefined);
});
var reduceWithoutClosingOnEarlyError = !FAILS_ON_INITIAL_UNDEFINED && iteratorHelperWithoutClosingOnEarlyError('reduce', $TypeError);
// `Iterator.prototype.reduce` method
// https://tc39.es/ecma262/#sec-iterator.prototype.reduce
$({ target: 'Iterator', proto: true, real: true, forced: FAILS_ON_INITIAL_UNDEFINED || reduceWithoutClosingOnEarlyError }, {
reduce: function reduce(reducer /* , initialValue */) {
anObject(this);
try {
aCallable(reducer);
} catch (error) {
iteratorClose(this, 'throw', error);
}
var noInitial = arguments.length < 2;
var accumulator = noInitial ? undefined : arguments[1];
if (reduceWithoutClosingOnEarlyError) {
return apply(reduceWithoutClosingOnEarlyError, this, noInitial ? [reducer] : [reducer, accumulator]);
}
var record = getIteratorDirect(this);
var counter = 0;
iterate(record, function (value) {
if (noInitial) {
noInitial = false;
accumulator = value;
} else {
accumulator = reducer(accumulator, value, counter);
}
counter++;
}, { IS_RECORD: true });
if (noInitial) throw new $TypeError('Reduce of empty iterator with no initial value');
return accumulator;
}
});
/***/ }),
/* 170 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var iterate = __webpack_require__(97);
var aCallable = __webpack_require__(38);
var anObject = __webpack_require__(30);
var getIteratorDirect = __webpack_require__(155);
var iteratorClose = __webpack_require__(104);
var iteratorHelperWithoutClosingOnEarlyError = __webpack_require__(159);
var someWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError('some', TypeError);
// `Iterator.prototype.some` method
// https://tc39.es/ecma262/#sec-iterator.prototype.some
$({ target: 'Iterator', proto: true, real: true, forced: someWithoutClosingOnEarlyError }, {
some: function some(predicate) {
anObject(this);
try {
aCallable(predicate);
} catch (error) {
iteratorClose(this, 'throw', error);
}
if (someWithoutClosingOnEarlyError) return call(someWithoutClosingOnEarlyError, this, predicate);
var record = getIteratorDirect(this);
var counter = 0;
return iterate(record, function (value, stop) {
if (predicate(value, counter++)) return stop();
}, { IS_RECORD: true, INTERRUPTED: true }).stopped;
}
});
/***/ }),
/* 171 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var anObject = __webpack_require__(30);
var getIteratorDirect = __webpack_require__(155);
var notANaN = __webpack_require__(156);
var toPositiveInteger = __webpack_require__(157);
var createIteratorProxy = __webpack_require__(150);
var iteratorClose = __webpack_require__(104);
var iteratorHelperWithoutClosingOnEarlyError = __webpack_require__(159);
var IS_PURE = __webpack_require__(16);
var takeWithoutClosingOnEarlyError = !IS_PURE && iteratorHelperWithoutClosingOnEarlyError('take', RangeError);
var IteratorProxy = createIteratorProxy(function () {
var iterator = this.iterator;
if (!this.remaining--) {
this.done = true;
return iteratorClose(iterator, 'normal', undefined);
}
var result = anObject(call(this.next, iterator));
var done = this.done = !!result.done;
if (!done) return result.value;
});
// `Iterator.prototype.take` method
// https://tc39.es/ecma262/#sec-iterator.prototype.take
$({ target: 'Iterator', proto: true, real: true, forced: IS_PURE || takeWithoutClosingOnEarlyError }, {
take: function take(limit) {
anObject(this);
var remaining;
try {
remaining = toPositiveInteger(notANaN(+limit));
} catch (error) {
iteratorClose(this, 'throw', error);
}
if (takeWithoutClosingOnEarlyError) return call(takeWithoutClosingOnEarlyError, this, remaining);
return new IteratorProxy(getIteratorDirect(this), {
remaining: remaining
});
}
});
/***/ }),
/* 172 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var anObject = __webpack_require__(30);
var createProperty = __webpack_require__(117);
var iterate = __webpack_require__(97);
var getIteratorDirect = __webpack_require__(155);
// `Iterator.prototype.toArray` method
// https://tc39.es/ecma262/#sec-iterator.prototype.toarray
$({ target: 'Iterator', proto: true, real: true }, {
toArray: function toArray() {
var result = [];
var index = 0;
iterate(getIteratorDirect(anObject(this)), function (element) {
createProperty(result, index++, element);
}, { IS_RECORD: true });
return result;
}
});
/***/ }),
/* 173 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var NATIVE_RAW_JSON = __webpack_require__(174);
var isRawJSON = __webpack_require__(175);
// `JSON.isRawJSON` method
// https://tc39.es/proposal-json-parse-with-source/#sec-json.israwjson
// https://github.com/tc39/proposal-json-parse-with-source
$({ target: 'JSON', stat: true, forced: !NATIVE_RAW_JSON }, {
isRawJSON: isRawJSON
});
/***/ }),
/* 174 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* eslint-disable es/no-json -- safe */
var fails = __webpack_require__(8);
module.exports = !fails(function () {
var unsafeInt = '9007199254740993';
// eslint-disable-next-line es/no-json-rawjson -- feature detection
var raw = JSON.rawJSON(unsafeInt);
// eslint-disable-next-line es/no-json-israwjson -- feature detection
return !JSON.isRawJSON(raw) || JSON.stringify(raw) !== unsafeInt;
});
/***/ }),
/* 175 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isObject = __webpack_require__(27);
var getInternalState = __webpack_require__(55).get;
module.exports = function isRawJSON(O) {
if (!isObject(O)) return false;
var state = getInternalState(O);
return !!state && state.type === 'RawJSON';
};
/***/ }),
/* 176 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var DESCRIPTORS = __webpack_require__(24);
var globalThis = __webpack_require__(2);
var getBuiltIn = __webpack_require__(35);
var uncurryThis = __webpack_require__(6);
var call = __webpack_require__(33);
var isCallable = __webpack_require__(28);
var isObject = __webpack_require__(27);
var isArray = __webpack_require__(114);
var hasOwn = __webpack_require__(5);
var toString = __webpack_require__(81);
var lengthOfArrayLike = __webpack_require__(67);
var createProperty = __webpack_require__(117);
var fails = __webpack_require__(8);
var parseJSONString = __webpack_require__(177);
var NATIVE_SYMBOL = __webpack_require__(19);
var JSON = globalThis.JSON;
var Number = globalThis.Number;
var SyntaxError = globalThis.SyntaxError;
var nativeParse = JSON && JSON.parse;
var enumerableOwnProperties = getBuiltIn('Object', 'keys');
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var at = uncurryThis(''.charAt);
var slice = uncurryThis(''.slice);
var exec = uncurryThis(/./.exec);
var push = uncurryThis([].push);
var IS_DIGIT = /^\d$/;
var IS_NON_ZERO_DIGIT = /^[1-9]$/;
var IS_NUMBER_START = /^[\d-]$/;
var IS_WHITESPACE = /^[\t\n\r ]$/;
var PRIMITIVE = 0;
var OBJECT = 1;
var $parse = function (source, reviver) {
source = toString(source);
var context = new Context(source, 0, '');
var root = context.parse();
var value = root.value;
var endIndex = context.skip(IS_WHITESPACE, root.end);
if (endIndex < source.length) {
throw new SyntaxError('Unexpected extra character: "' + at(source, endIndex) + '" after the parsed data at: ' + endIndex);
}
return isCallable(reviver) ? internalize({ '': value }, '', reviver, root) : value;
};
var internalize = function (holder, name, reviver, node) {
var val = holder[name];
var unmodified = node && val === node.value;
var context = unmodified && typeof node.source == 'string' ? { source: node.source } : {};
var elementRecordsLen, keys, len, i, P;
if (isObject(val)) {
var nodeIsArray = isArray(val);
var nodes = unmodified ? node.nodes : nodeIsArray ? [] : {};
if (nodeIsArray) {
elementRecordsLen = nodes.length;
len = lengthOfArrayLike(val);
for (i = 0; i < len; i++) {
internalizeProperty(val, i, internalize(val, '' + i, reviver, i < elementRecordsLen ? nodes[i] : undefined));
}
} else {
keys = enumerableOwnProperties(val);
len = lengthOfArrayLike(keys);
for (i = 0; i < len; i++) {
P = keys[i];
internalizeProperty(val, P, internalize(val, P, reviver, hasOwn(nodes, P) ? nodes[P] : undefined));
}
}
}
return call(reviver, holder, name, val, context);
};
var internalizeProperty = function (object, key, value) {
if (DESCRIPTORS) {
var descriptor = getOwnPropertyDescriptor(object, key);
if (descriptor && !descriptor.configurable) return;
}
if (value === undefined) delete object[key];
else createProperty(object, key, value);
};
var Node = function (value, end, source, nodes) {
this.value = value;
this.end = end;
this.source = source;
this.nodes = nodes;
};
var Context = function (source, index) {
this.source = source;
this.index = index;
};
// https://www.json.org/json-en.html
Context.prototype = {
fork: function (nextIndex) {
return new Context(this.source, nextIndex);
},
parse: function () {
var source = this.source;
var i = this.skip(IS_WHITESPACE, this.index);
var fork = this.fork(i);
var chr = at(source, i);
if (exec(IS_NUMBER_START, chr)) return fork.number();
switch (chr) {
case '{':
return fork.object();
case '[':
return fork.array();
case '"':
return fork.string();
case 't':
return fork.keyword(true);
case 'f':
return fork.keyword(false);
case 'n':
return fork.keyword(null);
} throw new SyntaxError('Unexpected character: "' + chr + '" at: ' + i);
},
node: function (type, value, start, end, nodes) {
return new Node(value, end, type ? null : slice(this.source, start, end), nodes);
},
object: function () {
var source = this.source;
var i = this.index + 1;
var expectKeypair = false;
var object = {};
var nodes = {};
while (i < source.length) {
i = this.until(['"', '}'], i);
if (at(source, i) === '}' && !expectKeypair) {
i++;
break;
}
// Parsing the key
var result = this.fork(i).string();
var key = result.value;
i = result.end;
i = this.until([':'], i) + 1;
// Parsing value
i = this.skip(IS_WHITESPACE, i);
result = this.fork(i).parse();
createProperty(nodes, key, result);
createProperty(object, key, result.value);
i = this.until([',', '}'], result.end);
var chr = at(source, i);
if (chr === ',') {
expectKeypair = true;
i++;
} else if (chr === '}') {
i++;
break;
}
}
return this.node(OBJECT, object, this.index, i, nodes);
},
array: function () {
var source = this.source;
var i = this.index + 1;
var expectElement = false;
var array = [];
var nodes = [];
while (i < source.length) {
i = this.skip(IS_WHITESPACE, i);
if (at(source, i) === ']' && !expectElement) {
i++;
break;
}
var result = this.fork(i).parse();
push(nodes, result);
push(array, result.value);
i = this.until([',', ']'], result.end);
if (at(source, i) === ',') {
expectElement = true;
i++;
} else if (at(source, i) === ']') {
i++;
break;
}
}
return this.node(OBJECT, array, this.index, i, nodes);
},
string: function () {
var index = this.index;
var parsed = parseJSONString(this.source, this.index + 1);
return this.node(PRIMITIVE, parsed.value, index, parsed.end);
},
number: function () {
var source = this.source;
var startIndex = this.index;
var i = startIndex;
if (at(source, i) === '-') i++;
if (at(source, i) === '0') i++;
else if (exec(IS_NON_ZERO_DIGIT, at(source, i))) i = this.skip(IS_DIGIT, i + 1);
else throw new SyntaxError('Failed to parse number at: ' + i);
if (at(source, i) === '.') i = this.skip(IS_DIGIT, i + 1);
if (at(source, i) === 'e' || at(source, i) === 'E') {
i++;
if (at(source, i) === '+' || at(source, i) === '-') i++;
var exponentStartIndex = i;
i = this.skip(IS_DIGIT, i);
if (exponentStartIndex === i) throw new SyntaxError("Failed to parse number's exponent value at: " + i);
}
return this.node(PRIMITIVE, Number(slice(source, startIndex, i)), startIndex, i);
},
keyword: function (value) {
var keyword = '' + value;
var index = this.index;
var endIndex = index + keyword.length;
if (slice(this.source, index, endIndex) !== keyword) throw new SyntaxError('Failed to parse value at: ' + index);
return this.node(PRIMITIVE, value, index, endIndex);
},
skip: function (regex, i) {
var source = this.source;
for (; i < source.length; i++) if (!exec(regex, at(source, i))) break;
return i;
},
until: function (array, i) {
i = this.skip(IS_WHITESPACE, i);
var chr = at(this.source, i);
for (var j = 0; j < array.length; j++) if (array[j] === chr) return i;
throw new SyntaxError('Unexpected character: "' + chr + '" at: ' + i);
}
};
var NO_SOURCE_SUPPORT = fails(function () {
var unsafeInt = '9007199254740993';
var source;
nativeParse(unsafeInt, function (key, value, context) {
source = context.source;
});
return source !== unsafeInt;
});
var PROPER_BASE_PARSE = NATIVE_SYMBOL && !fails(function () {
// Safari 9 bug
return 1 / nativeParse('-0 \t') !== -Infinity;
});
// `JSON.parse` method
// https://tc39.es/ecma262/#sec-json.parse
// https://github.com/tc39/proposal-json-parse-with-source
$({ target: 'JSON', stat: true, forced: NO_SOURCE_SUPPORT }, {
parse: function parse(text, reviver) {
return PROPER_BASE_PARSE && !isCallable(reviver) ? nativeParse(text) : $parse(text, reviver);
}
});
/***/ }),
/* 177 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
var hasOwn = __webpack_require__(5);
var $SyntaxError = SyntaxError;
var $parseInt = parseInt;
var fromCharCode = String.fromCharCode;
var at = uncurryThis(''.charAt);
var slice = uncurryThis(''.slice);
var exec = uncurryThis(/./.exec);
var codePoints = {
'\\"': '"',
'\\\\': '\\',
'\\/': '/',
'\\b': '\b',
'\\f': '\f',
'\\n': '\n',
'\\r': '\r',
'\\t': '\t'
};
var IS_4_HEX_DIGITS = /^[\da-f]{4}$/i;
// eslint-disable-next-line regexp/no-control-character -- safe
var IS_C0_CONTROL_CODE = /^[\u0000-\u001F]$/;
module.exports = function (source, i) {
var unterminated = true;
var value = '';
while (i < source.length) {
var chr = at(source, i);
if (chr === '\\') {
var twoChars = slice(source, i, i + 2);
if (hasOwn(codePoints, twoChars)) {
value += codePoints[twoChars];
i += 2;
} else if (twoChars === '\\u') {
i += 2;
var fourHexDigits = slice(source, i, i + 4);
if (!exec(IS_4_HEX_DIGITS, fourHexDigits)) throw new $SyntaxError('Bad Unicode escape at: ' + i);
value += fromCharCode($parseInt(fourHexDigits, 16));
i += 4;
} else throw new $SyntaxError('Unknown escape sequence: "' + twoChars + '"');
} else if (chr === '"') {
unterminated = false;
i++;
break;
} else {
if (exec(IS_C0_CONTROL_CODE, chr)) throw new $SyntaxError('Bad control character in string literal at: ' + i);
value += chr;
i++;
}
}
if (unterminated) throw new $SyntaxError('Unterminated string at: ' + i);
return { value: value, end: i };
};
/***/ }),
/* 178 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var FREEZING = __webpack_require__(179);
var NATIVE_RAW_JSON = __webpack_require__(174);
var getBuiltIn = __webpack_require__(35);
var uncurryThis = __webpack_require__(6);
var toString = __webpack_require__(81);
var createProperty = __webpack_require__(117);
var setInternalState = __webpack_require__(55).set;
var $SyntaxError = SyntaxError;
var parse = getBuiltIn('JSON', 'parse');
var create = getBuiltIn('Object', 'create');
var freeze = getBuiltIn('Object', 'freeze');
var at = uncurryThis(''.charAt);
var ERROR_MESSAGE = 'Unacceptable as raw JSON';
var isWhitespace = function (it) {
return it === ' ' || it === '\t' || it === '\n' || it === '\r';
};
// `JSON.rawJSON` method
// https://tc39.es/proposal-json-parse-with-source/#sec-json.rawjson
// https://github.com/tc39/proposal-json-parse-with-source
$({ target: 'JSON', stat: true, forced: !NATIVE_RAW_JSON }, {
rawJSON: function rawJSON(text) {
var jsonString = toString(text);
if (jsonString === '' || isWhitespace(at(jsonString, 0)) || isWhitespace(at(jsonString, jsonString.length - 1))) {
throw new $SyntaxError(ERROR_MESSAGE);
}
var parsed = parse(jsonString);
if (typeof parsed == 'object' && parsed !== null) throw new $SyntaxError(ERROR_MESSAGE);
var obj = create(null);
setInternalState(obj, { type: 'RawJSON' });
createProperty(obj, 'rawJSON', jsonString);
return FREEZING ? freeze(obj) : obj;
}
});
/***/ }),
/* 179 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(8);
module.exports = !fails(function () {
// eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing
return Object.isExtensible(Object.preventExtensions({}));
});
/***/ }),
/* 180 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var getBuiltIn = __webpack_require__(35);
var apply = __webpack_require__(72);
var call = __webpack_require__(33);
var uncurryThis = __webpack_require__(6);
var fails = __webpack_require__(8);
var isArray = __webpack_require__(114);
var isCallable = __webpack_require__(28);
var isRawJSON = __webpack_require__(175);
var isSymbol = __webpack_require__(34);
var classof = __webpack_require__(46);
var toString = __webpack_require__(81);
var arraySlice = __webpack_require__(181);
var parseJSONString = __webpack_require__(177);
var uid = __webpack_require__(18);
var NATIVE_SYMBOL = __webpack_require__(19);
var NATIVE_RAW_JSON = __webpack_require__(174);
var $String = String;
var $stringify = getBuiltIn('JSON', 'stringify');
var exec = uncurryThis(/./.exec);
var charAt = uncurryThis(''.charAt);
var charCodeAt = uncurryThis(''.charCodeAt);
var replace = uncurryThis(''.replace);
var slice = uncurryThis(''.slice);
var push = uncurryThis([].push);
var numberToString = uncurryThis(1.1.toString);
var surrogates = /[\uD800-\uDFFF]/g;
var lowSurrogates = /^[\uD800-\uDBFF]$/;
var hiSurrogates = /^[\uDC00-\uDFFF]$/;
var MARK = uid();
var MARK_LENGTH = MARK.length;
var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails(function () {
var symbol = getBuiltIn('Symbol')('stringify detection');
// MS Edge converts symbol values to JSON as {}
return $stringify([symbol]) !== '[null]'
// WebKit converts symbol values to JSON as null
|| $stringify({ a: symbol }) !== '{}'
// V8 throws on boxed symbols
|| $stringify(Object(symbol)) !== '{}';
});
// https://github.com/tc39/proposal-well-formed-stringify
var ILL_FORMED_UNICODE = fails(function () {
return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"'
|| $stringify('\uDEAD') !== '"\\udead"';
});
var stringifyWithProperSymbolsConversion = WRONG_SYMBOLS_CONVERSION ? function (it, replacer) {
var args = arraySlice(arguments);
var $replacer = getReplacerFunction(replacer);
if (!isCallable($replacer) && (it === undefined || isSymbol(it))) return; // IE8 returns string on undefined
args[1] = function (key, value) {
// some old implementations (like WebKit) could pass numbers as keys
if (isCallable($replacer)) value = call($replacer, this, $String(key), value);
if (!isSymbol(value)) return value;
};
return apply($stringify, null, args);
} : $stringify;
var fixIllFormedJSON = function (match, offset, string) {
var prev = charAt(string, offset - 1);
var next = charAt(string, offset + 1);
if ((exec(lowSurrogates, match) && !exec(hiSurrogates, next)) || (exec(hiSurrogates, match) && !exec(lowSurrogates, prev))) {
return '\\u' + numberToString(charCodeAt(match, 0), 16);
} return match;
};
var getReplacerFunction = function (replacer) {
if (isCallable(replacer)) return replacer;
if (!isArray(replacer)) return;
var rawLength = replacer.length;
var keys = [];
for (var i = 0; i < rawLength; i++) {
var element = replacer[i];
if (typeof element == 'string') push(keys, element);
else if (typeof element == 'number' || classof(element) === 'Number' || classof(element) === 'String') push(keys, toString(element));
}
var keysLength = keys.length;
var root = true;
return function (key, value) {
if (root) {
root = false;
return value;
}
if (isArray(this)) return value;
for (var j = 0; j < keysLength; j++) if (keys[j] === key) return value;
};
};
// `JSON.stringify` method
// https://tc39.es/ecma262/#sec-json.stringify
// https://github.com/tc39/proposal-json-parse-with-source
if ($stringify) $({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE || !NATIVE_RAW_JSON }, {
stringify: function stringify(text, replacer, space) {
var replacerFunction = getReplacerFunction(replacer);
var rawStrings = [];
var json = stringifyWithProperSymbolsConversion(text, function (key, value) {
// some old implementations (like WebKit) could pass numbers as keys
var v = isCallable(replacerFunction) ? call(replacerFunction, this, $String(key), value) : value;
return !NATIVE_RAW_JSON && isRawJSON(v) ? MARK + (push(rawStrings, v.rawJSON) - 1) : v;
}, space);
if (typeof json != 'string') return json;
if (ILL_FORMED_UNICODE) json = replace(json, surrogates, fixIllFormedJSON);
if (NATIVE_RAW_JSON) return json;
var result = '';
var length = json.length;
for (var i = 0; i < length; i++) {
var chr = charAt(json, i);
if (chr === '"') {
var end = parseJSONString(json, ++i).end - 1;
var string = slice(json, i, end);
result += slice(string, 0, MARK_LENGTH) === MARK
? rawStrings[slice(string, MARK_LENGTH)]
: '"' + string + '"';
i = end;
} else result += chr;
}
return result;
}
});
/***/ }),
/* 181 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
module.exports = uncurryThis([].slice);
/***/ }),
/* 182 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var uncurryThis = __webpack_require__(6);
var aCallable = __webpack_require__(38);
var requireObjectCoercible = __webpack_require__(10);
var iterate = __webpack_require__(97);
var MapHelpers = __webpack_require__(183);
var IS_PURE = __webpack_require__(16);
var fails = __webpack_require__(8);
var Map = MapHelpers.Map;
var has = MapHelpers.has;
var get = MapHelpers.get;
var set = MapHelpers.set;
var push = uncurryThis([].push);
// https://bugs.webkit.org/show_bug.cgi?id=271524
var DOES_NOT_WORK_WITH_PRIMITIVES = IS_PURE || fails(function () {
return Map.groupBy('ab', function (it) {
return it;
}).get('a').length !== 1;
});
// `Map.groupBy` method
// https://tc39.es/ecma262/#sec-map.groupby
$({ target: 'Map', stat: true, forced: IS_PURE || DOES_NOT_WORK_WITH_PRIMITIVES }, {
groupBy: function groupBy(items, callbackfn) {
requireObjectCoercible(items);
aCallable(callbackfn);
var map = new Map();
var k = 0;
iterate(items, function (value) {
var key = callbackfn(value, k++);
if (!has(map, key)) set(map, key, [value]);
else push(get(map, key), value);
});
return map;
}
});
/***/ }),
/* 183 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
// eslint-disable-next-line es/no-map -- safe
var MapPrototype = Map.prototype;
module.exports = {
// eslint-disable-next-line es/no-map -- safe
Map: Map,
set: uncurryThis(MapPrototype.set),
get: uncurryThis(MapPrototype.get),
has: uncurryThis(MapPrototype.has),
remove: uncurryThis(MapPrototype['delete']),
proto: MapPrototype
};
/***/ }),
/* 184 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var aMap = __webpack_require__(185);
var MapHelpers = __webpack_require__(183);
var IS_PURE = __webpack_require__(16);
var get = MapHelpers.get;
var has = MapHelpers.has;
var set = MapHelpers.set;
// `Map.prototype.getOrInsert` method
// https://github.com/tc39/proposal-upsert
$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {
getOrInsert: function getOrInsert(key, value) {
if (has(aMap(this), key)) return get(this, key);
set(this, key, value);
return value;
}
});
/***/ }),
/* 185 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var has = __webpack_require__(183).has;
// Perform ? RequireInternalSlot(M, [[MapData]])
module.exports = function (it) {
has(it);
return it;
};
/***/ }),
/* 186 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var aCallable = __webpack_require__(38);
var aMap = __webpack_require__(185);
var MapHelpers = __webpack_require__(183);
var IS_PURE = __webpack_require__(16);
var get = MapHelpers.get;
var has = MapHelpers.has;
var set = MapHelpers.set;
// `Map.prototype.getOrInsertComputed` method
// https://github.com/tc39/proposal-upsert
$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {
getOrInsertComputed: function getOrInsertComputed(key, callbackfn) {
aMap(this);
aCallable(callbackfn);
if (has(this, key)) return get(this, key);
// CanonicalizeKeyedCollectionKey
if (key === 0 && 1 / key === -Infinity) key = 0;
var value = callbackfn(key);
set(this, key, value);
return value;
}
});
/***/ }),
/* 187 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var floatRound = __webpack_require__(188);
var FLOAT16_EPSILON = 0.0009765625;
var FLOAT16_MAX_VALUE = 65504;
var FLOAT16_MIN_VALUE = 6.103515625e-05;
// `Math.f16round` method
// https://tc39.es/ecma262/#sec-math.f16round
$({ target: 'Math', stat: true }, {
f16round: function f16round(x) {
return floatRound(x, FLOAT16_EPSILON, FLOAT16_MAX_VALUE, FLOAT16_MIN_VALUE);
}
});
/***/ }),
/* 188 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var sign = __webpack_require__(189);
var roundTiesToEven = __webpack_require__(128);
var abs = Math.abs;
var EPSILON = 2.220446049250313e-16; // Number.EPSILON
module.exports = function (x, FLOAT_EPSILON, FLOAT_MAX_VALUE, FLOAT_MIN_VALUE) {
var n = +x;
var absolute = abs(n);
var s = sign(n);
if (absolute < FLOAT_MIN_VALUE) return s * roundTiesToEven(absolute / FLOAT_MIN_VALUE / FLOAT_EPSILON) * FLOAT_MIN_VALUE * FLOAT_EPSILON;
var a = (1 + FLOAT_EPSILON / EPSILON) * absolute;
var result = a - (a - absolute);
// eslint-disable-next-line no-self-compare -- NaN check
if (result > FLOAT_MAX_VALUE || result !== result) return s * Infinity;
return s * result;
};
/***/ }),
/* 189 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// `Math.sign` method implementation
// https://tc39.es/ecma262/#sec-math.sign
// eslint-disable-next-line es/no-math-sign -- safe
module.exports = Math.sign || function sign(x) {
var n = +x;
// eslint-disable-next-line no-self-compare -- NaN check
return n === 0 || n !== n ? n : n < 0 ? -1 : 1;
};
/***/ }),
/* 190 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// based on Shewchuk's algorithm for exactly floating point addition
// adapted from https://github.com/tc39/proposal-math-sum/blob/3513d58323a1ae25560e8700aa5294500c6c9287/polyfill/polyfill.mjs
var $ = __webpack_require__(49);
var uncurryThis = __webpack_require__(6);
var iterate = __webpack_require__(97);
var $RangeError = RangeError;
var $TypeError = TypeError;
var $Infinity = Infinity;
var $NaN = NaN;
var abs = Math.abs;
var pow = Math.pow;
var push = uncurryThis([].push);
var POW_2_1023 = pow(2, 1023);
var MAX_SAFE_INTEGER = pow(2, 53) - 1; // 2 ** 53 - 1 === 9007199254740992
var MAX_DOUBLE = Number.MAX_VALUE; // 2 ** 1024 - 2 ** (1023 - 52) === 1.79769313486231570815e+308
var MAX_ULP = pow(2, 971); // 2 ** (1023 - 52) === 1.99584030953471981166e+292
var NOT_A_NUMBER = {};
var MINUS_INFINITY = {};
var PLUS_INFINITY = {};
var MINUS_ZERO = {};
var FINITE = {};
// prerequisite: abs(x) >= abs(y)
var twosum = function (x, y) {
var hi = x + y;
var lo = y - (hi - x);
return { hi: hi, lo: lo };
};
// `Math.sumPrecise` method
// https://github.com/tc39/proposal-math-sum
$({ target: 'Math', stat: true }, {
// eslint-disable-next-line max-statements -- ok
sumPrecise: function sumPrecise(items) {
var numbers = [];
var count = 0;
var state = MINUS_ZERO;
iterate(items, function (n) {
if (++count >= MAX_SAFE_INTEGER) throw new $RangeError('Maximum allowed index exceeded');
if (typeof n != 'number') throw new $TypeError('Value is not a number');
if (state !== NOT_A_NUMBER) {
// eslint-disable-next-line no-self-compare -- NaN check
if (n !== n) state = NOT_A_NUMBER;
else if (n === $Infinity) state = state === MINUS_INFINITY ? NOT_A_NUMBER : PLUS_INFINITY;
else if (n === -$Infinity) state = state === PLUS_INFINITY ? NOT_A_NUMBER : MINUS_INFINITY;
else if ((n !== 0 || (1 / n) === $Infinity) && (state === MINUS_ZERO || state === FINITE)) {
state = FINITE;
push(numbers, n);
}
}
});
switch (state) {
case NOT_A_NUMBER: return $NaN;
case MINUS_INFINITY: return -$Infinity;
case PLUS_INFINITY: return $Infinity;
case MINUS_ZERO: return -0;
}
var partials = [];
var overflow = 0; // conceptually 2 ** 1024 times this value; the final partial is biased by this amount
var x, y, sum, hi, lo, tmp;
for (var i = 0; i < numbers.length; i++) {
x = numbers[i];
var actuallyUsedPartials = 0;
for (var j = 0; j < partials.length; j++) {
y = partials[j];
if (abs(x) < abs(y)) {
tmp = x;
x = y;
y = tmp;
}
sum = twosum(x, y);
hi = sum.hi;
lo = sum.lo;
if (abs(hi) === $Infinity) {
var sign = hi === $Infinity ? 1 : -1;
overflow += sign;
x = (x - (sign * POW_2_1023)) - (sign * POW_2_1023);
if (abs(x) < abs(y)) {
tmp = x;
x = y;
y = tmp;
}
sum = twosum(x, y);
hi = sum.hi;
lo = sum.lo;
}
if (lo !== 0) partials[actuallyUsedPartials++] = lo;
x = hi;
}
partials.length = actuallyUsedPartials;
if (x !== 0) push(partials, x);
}
// compute the exact sum of partials, stopping once we lose precision
var n = partials.length - 1;
hi = 0;
lo = 0;
if (overflow !== 0) {
var next = n >= 0 ? partials[n] : 0;
n--;
if (abs(overflow) > 1 || (overflow > 0 && next > 0) || (overflow < 0 && next < 0)) {
return overflow > 0 ? $Infinity : -$Infinity;
}
// here we actually have to do the arithmetic
// drop a factor of 2 so we can do it without overflow
// assert(abs(overflow) === 1)
sum = twosum(overflow * POW_2_1023, next / 2);
hi = sum.hi;
lo = sum.lo;
lo *= 2;
if (abs(2 * hi) === $Infinity) {
// rounding to the maximum value
if (hi > 0) {
return (hi === POW_2_1023 && lo === -(MAX_ULP / 2) && n >= 0 && partials[n] < 0) ? MAX_DOUBLE : $Infinity;
} return (hi === -POW_2_1023 && lo === (MAX_ULP / 2) && n >= 0 && partials[n] > 0) ? -MAX_DOUBLE : -$Infinity;
}
if (lo !== 0) {
partials[++n] = lo;
lo = 0;
}
hi *= 2;
}
while (n >= 0) {
sum = twosum(hi, partials[n--]);
hi = sum.hi;
lo = sum.lo;
if (lo !== 0) break;
}
if (n >= 0 && ((lo < 0 && partials[n] < 0) || (lo > 0 && partials[n] > 0))) {
y = lo * 2;
x = hi + y;
if (y === x - hi) hi = x;
}
return hi;
}
});
/***/ }),
/* 191 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var createProperty = __webpack_require__(117);
var getBuiltIn = __webpack_require__(35);
var uncurryThis = __webpack_require__(6);
var aCallable = __webpack_require__(38);
var requireObjectCoercible = __webpack_require__(10);
var toPropertyKey = __webpack_require__(31);
var iterate = __webpack_require__(97);
var fails = __webpack_require__(8);
// eslint-disable-next-line es/no-object-groupby -- testing
var nativeGroupBy = Object.groupBy;
var create = getBuiltIn('Object', 'create');
var push = uncurryThis([].push);
// https://bugs.webkit.org/show_bug.cgi?id=271524
var DOES_NOT_WORK_WITH_PRIMITIVES = !nativeGroupBy || fails(function () {
return nativeGroupBy('ab', function (it) {
return it;
}).a.length !== 1;
});
// `Object.groupBy` method
// https://tc39.es/ecma262/#sec-object.groupby
$({ target: 'Object', stat: true, forced: DOES_NOT_WORK_WITH_PRIMITIVES }, {
groupBy: function groupBy(items, callbackfn) {
requireObjectCoercible(items);
aCallable(callbackfn);
var obj = create(null);
var k = 0;
iterate(items, function (value) {
var key = toPropertyKey(callbackfn(value, k++));
// in some IE versions, `hasOwnProperty` returns incorrect result on integer keys
// but since it's a `null` prototype object, we can safely use `in`
if (key in obj) push(obj[key], value);
else createProperty(obj, key, [value]);
});
return obj;
}
});
/***/ }),
/* 192 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var hasOwn = __webpack_require__(5);
// `Object.hasOwn` method
// https://tc39.es/ecma262/#sec-object.hasown
$({ target: 'Object', stat: true }, {
hasOwn: hasOwn
});
/***/ }),
/* 193 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(24);
var defineBuiltInAccessor = __webpack_require__(130);
var isObject = __webpack_require__(27);
var isPossiblePrototype = __webpack_require__(77);
var toObject = __webpack_require__(9);
var requireObjectCoercible = __webpack_require__(10);
// eslint-disable-next-line es/no-object-getprototypeof -- safe
var getPrototypeOf = Object.getPrototypeOf;
// eslint-disable-next-line es/no-object-setprototypeof -- safe
var setPrototypeOf = Object.setPrototypeOf;
var ObjectPrototype = Object.prototype;
var PROTO = '__proto__';
// `Object.prototype.__proto__` accessor
// https://tc39.es/ecma262/#sec-object.prototype.__proto__
if (DESCRIPTORS && getPrototypeOf && setPrototypeOf && !(PROTO in ObjectPrototype)) try {
defineBuiltInAccessor(ObjectPrototype, PROTO, {
configurable: true,
get: function __proto__() {
return getPrototypeOf(toObject(this));
},
set: function __proto__(proto) {
var O = requireObjectCoercible(this);
if (isPossiblePrototype(proto) && isObject(O)) {
setPrototypeOf(O, proto);
}
}
});
} catch (error) { /* empty */ }
/***/ }),
/* 194 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove this module from `core-js@4` since it's split to modules listed below
__webpack_require__(195);
__webpack_require__(214);
__webpack_require__(217);
__webpack_require__(218);
__webpack_require__(219);
__webpack_require__(220);
/***/ }),
/* 195 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var IS_PURE = __webpack_require__(16);
var IS_NODE = __webpack_require__(139);
var globalThis = __webpack_require__(2);
var path = __webpack_require__(4);
var call = __webpack_require__(33);
var defineBuiltIn = __webpack_require__(51);
var setPrototypeOf = __webpack_require__(74);
var setToStringTag = __webpack_require__(196);
var setSpecies = __webpack_require__(197);
var aCallable = __webpack_require__(38);
var isCallable = __webpack_require__(28);
var isObject = __webpack_require__(27);
var anInstance = __webpack_require__(144);
var speciesConstructor = __webpack_require__(198);
var task = __webpack_require__(201).set;
var microtask = __webpack_require__(204);
var hostReportErrors = __webpack_require__(209);
var perform = __webpack_require__(210);
var Queue = __webpack_require__(206);
var InternalStateModule = __webpack_require__(55);
var NativePromiseConstructor = __webpack_require__(211);
var PromiseConstructorDetection = __webpack_require__(212);
var newPromiseCapabilityModule = __webpack_require__(213);
var PROMISE = 'Promise';
var FORCED_PROMISE_CONSTRUCTOR = PromiseConstructorDetection.CONSTRUCTOR;
var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
var setInternalState = InternalStateModule.set;
var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
var PromiseConstructor = NativePromiseConstructor;
var PromisePrototype = NativePromisePrototype;
var TypeError = globalThis.TypeError;
var document = globalThis.document;
var process = globalThis.process;
var newPromiseCapability = newPromiseCapabilityModule.f;
var newGenericPromiseCapability = newPromiseCapability;
var DISPATCH_EVENT = !!(document && document.createEvent && globalThis.dispatchEvent);
var UNHANDLED_REJECTION = 'unhandledrejection';
var REJECTION_HANDLED = 'rejectionhandled';
var PENDING = 0;
var FULFILLED = 1;
var REJECTED = 2;
var HANDLED = 1;
var UNHANDLED = 2;
var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
// helpers
var isThenable = function (it) {
var then;
return isObject(it) && isCallable(then = it.then) ? then : false;
};
var callReaction = function (reaction, state) {
var value = state.value;
var ok = state.state === FULFILLED;
var handler = ok ? reaction.ok : reaction.fail;
var resolve = reaction.resolve;
var reject = reaction.reject;
var domain = reaction.domain;
var result, then, exited;
try {
if (handler) {
if (!ok) {
if (state.rejection === UNHANDLED) onHandleUnhandled(state);
state.rejection = HANDLED;
}
if (handler === true) result = value;
else {
if (domain) domain.enter();
result = handler(value); // can throw
if (domain) {
domain.exit();
exited = true;
}
}
if (result === reaction.promise) {
reject(new TypeError('Promise-chain cycle'));
} else if (then = isThenable(result)) {
call(then, result, resolve, reject);
} else resolve(result);
} else reject(value);
} catch (error) {
if (domain && !exited) domain.exit();
reject(error);
}
};
var notify = function (state, isReject) {
if (state.notified) return;
state.notified = true;
microtask(function () {
var reactions = state.reactions;
var reaction;
while (reaction = reactions.get()) {
callReaction(reaction, state);
}
state.notified = false;
if (isReject && !state.rejection) onUnhandled(state);
});
};
var dispatchEvent = function (name, promise, reason) {
var event, handler;
if (DISPATCH_EVENT) {
event = document.createEvent('Event');
event.promise = promise;
event.reason = reason;
event.initEvent(name, false, true);
globalThis.dispatchEvent(event);
} else event = { promise: promise, reason: reason };
if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = globalThis['on' + name])) handler(event);
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
};
var onUnhandled = function (state) {
call(task, globalThis, function () {
var promise = state.facade;
var value = state.value;
var IS_UNHANDLED = isUnhandled(state);
var result;
if (IS_UNHANDLED) {
result = perform(function () {
if (IS_NODE) {
process.emit('unhandledRejection', value, promise);
} else dispatchEvent(UNHANDLED_REJECTION, promise, value);
});
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
if (result.error) throw result.value;
}
});
};
var isUnhandled = function (state) {
return state.rejection !== HANDLED && !state.parent;
};
var onHandleUnhandled = function (state) {
call(task, globalThis, function () {
var promise = state.facade;
if (IS_NODE) {
process.emit('rejectionHandled', promise);
} else dispatchEvent(REJECTION_HANDLED, promise, state.value);
});
};
var bind = function (fn, state, unwrap) {
return function (value) {
fn(state, value, unwrap);
};
};
var internalReject = function (state, value, unwrap) {
if (state.done) return;
state.done = true;
if (unwrap) state = unwrap;
state.value = value;
state.state = REJECTED;
notify(state, true);
};
var internalResolve = function (state, value, unwrap) {
if (state.done) return;
state.done = true;
if (unwrap) state = unwrap;
try {
if (state.facade === value) throw new TypeError("Promise can't be resolved itself");
var then = isThenable(value);
if (then) {
microtask(function () {
var wrapper = { done: false };
try {
call(then, value,
bind(internalResolve, wrapper, state),
bind(internalReject, wrapper, state)
);
} catch (error) {
internalReject(wrapper, error, state);
}
});
} else {
state.value = value;
state.state = FULFILLED;
notify(state, false);
}
} catch (error) {
internalReject({ done: false }, error, state);
}
};
// constructor polyfill
if (FORCED_PROMISE_CONSTRUCTOR) {
// 25.4.3.1 Promise(executor)
PromiseConstructor = function Promise(executor) {
anInstance(this, PromisePrototype);
aCallable(executor);
call(Internal, this);
var state = getInternalPromiseState(this);
try {
executor(bind(internalResolve, state), bind(internalReject, state));
} catch (error) {
internalReject(state, error);
}
};
PromisePrototype = PromiseConstructor.prototype;
// eslint-disable-next-line no-unused-vars -- required for `.length`
Internal = function Promise(executor) {
setInternalState(this, {
type: PROMISE,
done: false,
notified: false,
parent: false,
reactions: new Queue(),
rejection: false,
state: PENDING,
value: null
});
};
// `Promise.prototype.then` method
// https://tc39.es/ecma262/#sec-promise.prototype.then
Internal.prototype = defineBuiltIn(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
var state = getInternalPromiseState(this);
var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
state.parent = true;
reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;
reaction.fail = isCallable(onRejected) && onRejected;
reaction.domain = IS_NODE ? process.domain : undefined;
if (state.state === PENDING) state.reactions.add(reaction);
else microtask(function () {
callReaction(reaction, state);
});
return reaction.promise;
});
OwnPromiseCapability = function () {
var promise = new Internal();
var state = getInternalPromiseState(promise);
this.promise = promise;
this.resolve = bind(internalResolve, state);
this.reject = bind(internalReject, state);
};
newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
return C === PromiseConstructor || C === PromiseWrapper
? new OwnPromiseCapability(C)
: newGenericPromiseCapability(C);
};
if (!IS_PURE && isCallable(NativePromiseConstructor) && NativePromisePrototype !== Object.prototype) {
nativeThen = NativePromisePrototype.then;
if (!NATIVE_PROMISE_SUBCLASSING) {
// make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
defineBuiltIn(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
var that = this;
return new PromiseConstructor(function (resolve, reject) {
call(nativeThen, that, resolve, reject);
}).then(onFulfilled, onRejected);
// https://github.com/zloirock/core-js/issues/640
}, { unsafe: true });
}
// make `.constructor === Promise` work for native promise-based APIs
try {
delete NativePromisePrototype.constructor;
} catch (error) { /* empty */ }
// make `instanceof Promise` work for native promise-based APIs
if (setPrototypeOf) {
setPrototypeOf(NativePromisePrototype, PromisePrototype);
}
}
}
// `Promise` constructor
// https://tc39.es/ecma262/#sec-promise-executor
$({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
Promise: PromiseConstructor
});
PromiseWrapper = path.Promise;
setToStringTag(PromiseConstructor, PROMISE, false, true);
setSpecies(PROMISE);
/***/ }),
/* 196 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var defineProperty = __webpack_require__(23).f;
var hasOwn = __webpack_require__(5);
var wellKnownSymbol = __webpack_require__(13);
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
module.exports = function (target, TAG, STATIC) {
if (target && !STATIC) target = target.prototype;
if (target && !hasOwn(target, TO_STRING_TAG)) {
defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });
}
};
/***/ }),
/* 197 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var getBuiltIn = __webpack_require__(35);
var defineBuiltInAccessor = __webpack_require__(130);
var wellKnownSymbol = __webpack_require__(13);
var DESCRIPTORS = __webpack_require__(24);
var SPECIES = wellKnownSymbol('species');
module.exports = function (CONSTRUCTOR_NAME) {
var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
defineBuiltInAccessor(Constructor, SPECIES, {
configurable: true,
get: function () { return this; }
});
}
};
/***/ }),
/* 198 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var anObject = __webpack_require__(30);
var aConstructor = __webpack_require__(199);
var isNullOrUndefined = __webpack_require__(11);
var wellKnownSymbol = __webpack_require__(13);
var SPECIES = wellKnownSymbol('species');
// `SpeciesConstructor` abstract operation
// https://tc39.es/ecma262/#sec-speciesconstructor
module.exports = function (O, defaultConstructor) {
var C = anObject(O).constructor;
var S;
return C === undefined || isNullOrUndefined(S = anObject(C)[SPECIES]) ? defaultConstructor : aConstructor(S);
};
/***/ }),
/* 199 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isConstructor = __webpack_require__(200);
var tryToString = __webpack_require__(39);
var $TypeError = TypeError;
// `Assert: IsConstructor(argument) is true`
module.exports = function (argument) {
if (isConstructor(argument)) return argument;
throw new $TypeError(tryToString(argument) + ' is not a constructor');
};
/***/ }),
/* 200 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
var fails = __webpack_require__(8);
var isCallable = __webpack_require__(28);
var classof = __webpack_require__(82);
var getBuiltIn = __webpack_require__(35);
var inspectSource = __webpack_require__(54);
var noop = function () { /* empty */ };
var construct = getBuiltIn('Reflect', 'construct');
var constructorRegExp = /^\s*(?:class|function)\b/;
var exec = uncurryThis(constructorRegExp.exec);
var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
var isConstructorModern = function isConstructor(argument) {
if (!isCallable(argument)) return false;
try {
construct(noop, [], argument);
return true;
} catch (error) {
return false;
}
};
var isConstructorLegacy = function isConstructor(argument) {
if (!isCallable(argument)) return false;
switch (classof(argument)) {
case 'AsyncFunction':
case 'GeneratorFunction':
case 'AsyncGeneratorFunction': return false;
}
try {
// we can't check .prototype since constructors produced by .bind haven't it
// `Function#toString` throws on some built-it function in some legacy engines
// (for example, `DOMQuad` and similar in FF41-)
return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
} catch (error) {
return true;
}
};
isConstructorLegacy.sham = true;
// `IsConstructor` abstract operation
// https://tc39.es/ecma262/#sec-isconstructor
module.exports = !construct || fails(function () {
var called;
return isConstructorModern(isConstructorModern.call)
|| !isConstructorModern(Object)
|| !isConstructorModern(function () { called = true; })
|| called;
}) ? isConstructorLegacy : isConstructorModern;
/***/ }),
/* 201 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var apply = __webpack_require__(72);
var bind = __webpack_require__(98);
var isCallable = __webpack_require__(28);
var hasOwn = __webpack_require__(5);
var fails = __webpack_require__(8);
var html = __webpack_require__(96);
var arraySlice = __webpack_require__(181);
var createElement = __webpack_require__(26);
var validateArgumentsLength = __webpack_require__(202);
var IS_IOS = __webpack_require__(203);
var IS_NODE = __webpack_require__(139);
var set = globalThis.setImmediate;
var clear = globalThis.clearImmediate;
var process = globalThis.process;
var Dispatch = globalThis.Dispatch;
var Function = globalThis.Function;
var MessageChannel = globalThis.MessageChannel;
var String = globalThis.String;
var counter = 0;
var queue = {};
var ONREADYSTATECHANGE = 'onreadystatechange';
var $location, defer, channel, port;
fails(function () {
// Deno throws a ReferenceError on `location` access without `--location` flag
$location = globalThis.location;
});
var run = function (id) {
if (hasOwn(queue, id)) {
var fn = queue[id];
delete queue[id];
fn();
}
};
var runner = function (id) {
return function () {
run(id);
};
};
var eventListener = function (event) {
run(event.data);
};
var globalPostMessageDefer = function (id) {
// old engines have not location.origin
globalThis.postMessage(String(id), $location.protocol + '//' + $location.host);
};
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
if (!set || !clear) {
set = function setImmediate(handler) {
validateArgumentsLength(arguments.length, 1);
var fn = isCallable(handler) ? handler : Function(handler);
var args = arraySlice(arguments, 1);
queue[++counter] = function () {
apply(fn, undefined, args);
};
defer(counter);
return counter;
};
clear = function clearImmediate(id) {
delete queue[id];
};
// Node.js 0.8-
if (IS_NODE) {
defer = function (id) {
process.nextTick(runner(id));
};
// Sphere (JS game engine) Dispatch API
} else if (Dispatch && Dispatch.now) {
defer = function (id) {
Dispatch.now(runner(id));
};
// Browsers with MessageChannel, includes WebWorkers
// except iOS - https://github.com/zloirock/core-js/issues/624
} else if (MessageChannel && !IS_IOS) {
channel = new MessageChannel();
port = channel.port2;
channel.port1.onmessage = eventListener;
defer = bind(port.postMessage, port);
// Browsers with postMessage, skip WebWorkers
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
} else if (
globalThis.addEventListener &&
isCallable(globalThis.postMessage) &&
!globalThis.importScripts &&
$location && $location.protocol !== 'file:' &&
!fails(globalPostMessageDefer)
) {
defer = globalPostMessageDefer;
globalThis.addEventListener('message', eventListener, false);
// IE8-
} else if (ONREADYSTATECHANGE in createElement('script')) {
defer = function (id) {
html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
html.removeChild(this);
run(id);
};
};
// Rest old browsers
} else {
defer = function (id) {
setTimeout(runner(id), 0);
};
}
}
module.exports = {
set: set,
clear: clear
};
/***/ }),
/* 202 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $TypeError = TypeError;
module.exports = function (passed, required) {
if (passed < required) throw new $TypeError('Not enough arguments');
return passed;
};
/***/ }),
/* 203 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var userAgent = __webpack_require__(21);
// eslint-disable-next-line redos/no-vulnerable -- safe
module.exports = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent);
/***/ }),
/* 204 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var safeGetBuiltIn = __webpack_require__(205);
var bind = __webpack_require__(98);
var macrotask = __webpack_require__(201).set;
var Queue = __webpack_require__(206);
var IS_IOS = __webpack_require__(203);
var IS_IOS_PEBBLE = __webpack_require__(207);
var IS_WEBOS_WEBKIT = __webpack_require__(208);
var IS_NODE = __webpack_require__(139);
var MutationObserver = globalThis.MutationObserver || globalThis.WebKitMutationObserver;
var document = globalThis.document;
var process = globalThis.process;
var Promise = globalThis.Promise;
var microtask = safeGetBuiltIn('queueMicrotask');
var notify, toggle, node, promise, then;
// modern engines have queueMicrotask method
if (!microtask) {
var queue = new Queue();
var flush = function () {
var parent, fn;
if (IS_NODE && (parent = process.domain)) parent.exit();
while (fn = queue.get()) try {
fn();
} catch (error) {
if (queue.head) notify();
throw error;
}
if (parent) parent.enter();
};
// browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
// also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {
toggle = true;
node = document.createTextNode('');
new MutationObserver(flush).observe(node, { characterData: true });
notify = function () {
node.data = toggle = !toggle;
};
// environments with maybe non-completely correct, but existent Promise
} else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) {
// Promise.resolve without an argument throws an error in LG WebOS 2
promise = Promise.resolve(undefined);
// workaround of WebKit ~ iOS Safari 10.1 bug
promise.constructor = Promise;
then = bind(promise.then, promise);
notify = function () {
then(flush);
};
// Node.js without promises
} else if (IS_NODE) {
notify = function () {
process.nextTick(flush);
};
// for other environments - macrotask based on:
// - setImmediate
// - MessageChannel
// - window.postMessage
// - onreadystatechange
// - setTimeout
} else {
// `webpack` dev server bug on IE global methods - use bind(fn, global)
macrotask = bind(macrotask, globalThis);
notify = function () {
macrotask(flush);
};
}
microtask = function (fn) {
if (!queue.head) notify();
queue.add(fn);
};
}
module.exports = microtask;
/***/ }),
/* 205 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var DESCRIPTORS = __webpack_require__(24);
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// Avoid NodeJS experimental warning
module.exports = function (name) {
if (!DESCRIPTORS) return globalThis[name];
var descriptor = getOwnPropertyDescriptor(globalThis, name);
return descriptor && descriptor.value;
};
/***/ }),
/* 206 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var Queue = function () {
this.head = null;
this.tail = null;
};
Queue.prototype = {
add: function (item) {
var entry = { item: item, next: null };
var tail = this.tail;
if (tail) tail.next = entry;
else this.head = entry;
this.tail = entry;
},
get: function () {
var entry = this.head;
if (entry) {
var next = this.head = entry.next;
if (next === null) this.tail = null;
return entry.item;
}
}
};
module.exports = Queue;
/***/ }),
/* 207 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var userAgent = __webpack_require__(21);
module.exports = /ipad|iphone|ipod/i.test(userAgent) && typeof Pebble != 'undefined';
/***/ }),
/* 208 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var userAgent = __webpack_require__(21);
module.exports = /web0s(?!.*chrome)/i.test(userAgent);
/***/ }),
/* 209 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = function (a, b) {
try {
// eslint-disable-next-line no-console -- safe
arguments.length === 1 ? console.error(a) : console.error(a, b);
} catch (error) { /* empty */ }
};
/***/ }),
/* 210 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = function (exec) {
try {
return { error: false, value: exec() };
} catch (error) {
return { error: true, value: error };
}
};
/***/ }),
/* 211 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
module.exports = globalThis.Promise;
/***/ }),
/* 212 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var NativePromiseConstructor = __webpack_require__(211);
var isCallable = __webpack_require__(28);
var isForced = __webpack_require__(71);
var inspectSource = __webpack_require__(54);
var wellKnownSymbol = __webpack_require__(13);
var ENVIRONMENT = __webpack_require__(140);
var IS_PURE = __webpack_require__(16);
var V8_VERSION = __webpack_require__(20);
var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
var SPECIES = wellKnownSymbol('species');
var SUBCLASSING = false;
var NATIVE_PROMISE_REJECTION_EVENT = isCallable(globalThis.PromiseRejectionEvent);
var FORCED_PROMISE_CONSTRUCTOR = isForced('Promise', function () {
var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor);
var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor);
// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
// We can't detect it synchronously, so just check versions
if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
// We need Promise#{ catch, finally } in the pure version for preventing prototype pollution
if (IS_PURE && !(NativePromisePrototype['catch'] && NativePromisePrototype['finally'])) return true;
// We can't use @@species feature detection in V8 since it causes
// deoptimization and performance degradation
// https://github.com/zloirock/core-js/issues/679
if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
// Detect correctness of subclassing with @@species support
var promise = new NativePromiseConstructor(function (resolve) { resolve(1); });
var FakePromise = function (exec) {
exec(function () { /* empty */ }, function () { /* empty */ });
};
var constructor = promise.constructor = {};
constructor[SPECIES] = FakePromise;
SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
if (!SUBCLASSING) return true;
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
} return !GLOBAL_CORE_JS_PROMISE && (ENVIRONMENT === 'BROWSER' || ENVIRONMENT === 'DENO') && !NATIVE_PROMISE_REJECTION_EVENT;
});
module.exports = {
CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR,
REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT,
SUBCLASSING: SUBCLASSING
};
/***/ }),
/* 213 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var aCallable = __webpack_require__(38);
var $TypeError = TypeError;
var PromiseCapability = function (C) {
var resolve, reject;
this.promise = new C(function ($$resolve, $$reject) {
if (resolve !== undefined || reject !== undefined) throw new $TypeError('Bad Promise constructor');
resolve = $$resolve;
reject = $$reject;
});
this.resolve = aCallable(resolve);
this.reject = aCallable(reject);
};
// `NewPromiseCapability` abstract operation
// https://tc39.es/ecma262/#sec-newpromisecapability
module.exports.f = function (C) {
return new PromiseCapability(C);
};
/***/ }),
/* 214 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var aCallable = __webpack_require__(38);
var newPromiseCapabilityModule = __webpack_require__(213);
var perform = __webpack_require__(210);
var iterate = __webpack_require__(97);
var PROMISE_STATICS_INCORRECT_ITERATION = __webpack_require__(215);
// `Promise.all` method
// https://tc39.es/ecma262/#sec-promise.all
$({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
all: function all(iterable) {
var C = this;
var capability = newPromiseCapabilityModule.f(C);
var resolve = capability.resolve;
var reject = capability.reject;
var result = perform(function () {
var $promiseResolve = aCallable(C.resolve);
var values = [];
var counter = 0;
var remaining = 1;
iterate(iterable, function (promise) {
var index = counter++;
var alreadyCalled = false;
remaining++;
call($promiseResolve, C, promise).then(function (value) {
if (alreadyCalled) return;
alreadyCalled = true;
values[index] = value;
--remaining || resolve(values);
}, reject);
});
--remaining || resolve(values);
});
if (result.error) reject(result.value);
return capability.promise;
}
});
/***/ }),
/* 215 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var NativePromiseConstructor = __webpack_require__(211);
var checkCorrectnessOfIteration = __webpack_require__(216);
var FORCED_PROMISE_CONSTRUCTOR = __webpack_require__(212).CONSTRUCTOR;
module.exports = FORCED_PROMISE_CONSTRUCTOR || !checkCorrectnessOfIteration(function (iterable) {
NativePromiseConstructor.all(iterable).then(undefined, function () { /* empty */ });
});
/***/ }),
/* 216 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var wellKnownSymbol = __webpack_require__(13);
var ITERATOR = wellKnownSymbol('iterator');
var SAFE_CLOSING = false;
try {
var called = 0;
var iteratorWithReturn = {
next: function () {
return { done: !!called++ };
},
'return': function () {
SAFE_CLOSING = true;
}
};
// eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation
iteratorWithReturn[ITERATOR] = function () {
return this;
};
// eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
Array.from(iteratorWithReturn, function () { throw 2; });
} catch (error) { /* empty */ }
module.exports = function (exec, SKIP_CLOSING) {
try {
if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
} catch (error) { return false; } // workaround of old WebKit + `eval` bug
var ITERATION_SUPPORT = false;
try {
var object = {};
// eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation
object[ITERATOR] = function () {
return {
next: function () {
return { done: ITERATION_SUPPORT = true };
}
};
};
exec(object);
} catch (error) { /* empty */ }
return ITERATION_SUPPORT;
};
/***/ }),
/* 217 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var IS_PURE = __webpack_require__(16);
var FORCED_PROMISE_CONSTRUCTOR = __webpack_require__(212).CONSTRUCTOR;
var NativePromiseConstructor = __webpack_require__(211);
var getBuiltIn = __webpack_require__(35);
var isCallable = __webpack_require__(28);
var defineBuiltIn = __webpack_require__(51);
var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
// `Promise.prototype.catch` method
// https://tc39.es/ecma262/#sec-promise.prototype.catch
$({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR, real: true }, {
'catch': function (onRejected) {
return this.then(undefined, onRejected);
}
});
// makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
if (!IS_PURE && isCallable(NativePromiseConstructor)) {
var method = getBuiltIn('Promise').prototype['catch'];
if (NativePromisePrototype['catch'] !== method) {
defineBuiltIn(NativePromisePrototype, 'catch', method, { unsafe: true });
}
}
/***/ }),
/* 218 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var aCallable = __webpack_require__(38);
var newPromiseCapabilityModule = __webpack_require__(213);
var perform = __webpack_require__(210);
var iterate = __webpack_require__(97);
var PROMISE_STATICS_INCORRECT_ITERATION = __webpack_require__(215);
// `Promise.race` method
// https://tc39.es/ecma262/#sec-promise.race
$({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
race: function race(iterable) {
var C = this;
var capability = newPromiseCapabilityModule.f(C);
var reject = capability.reject;
var result = perform(function () {
var $promiseResolve = aCallable(C.resolve);
iterate(iterable, function (promise) {
call($promiseResolve, C, promise).then(capability.resolve, reject);
});
});
if (result.error) reject(result.value);
return capability.promise;
}
});
/***/ }),
/* 219 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var newPromiseCapabilityModule = __webpack_require__(213);
var FORCED_PROMISE_CONSTRUCTOR = __webpack_require__(212).CONSTRUCTOR;
// `Promise.reject` method
// https://tc39.es/ecma262/#sec-promise.reject
$({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
reject: function reject(r) {
var capability = newPromiseCapabilityModule.f(this);
var capabilityReject = capability.reject;
capabilityReject(r);
return capability.promise;
}
});
/***/ }),
/* 220 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var getBuiltIn = __webpack_require__(35);
var IS_PURE = __webpack_require__(16);
var NativePromiseConstructor = __webpack_require__(211);
var FORCED_PROMISE_CONSTRUCTOR = __webpack_require__(212).CONSTRUCTOR;
var promiseResolve = __webpack_require__(221);
var PromiseConstructorWrapper = getBuiltIn('Promise');
var CHECK_WRAPPER = IS_PURE && !FORCED_PROMISE_CONSTRUCTOR;
// `Promise.resolve` method
// https://tc39.es/ecma262/#sec-promise.resolve
$({ target: 'Promise', stat: true, forced: IS_PURE || FORCED_PROMISE_CONSTRUCTOR }, {
resolve: function resolve(x) {
return promiseResolve(CHECK_WRAPPER && this === PromiseConstructorWrapper ? NativePromiseConstructor : this, x);
}
});
/***/ }),
/* 221 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var anObject = __webpack_require__(30);
var isObject = __webpack_require__(27);
var newPromiseCapability = __webpack_require__(213);
module.exports = function (C, x) {
anObject(C);
if (isObject(x) && x.constructor === C) return x;
var promiseCapability = newPromiseCapability.f(C);
var resolve = promiseCapability.resolve;
resolve(x);
return promiseCapability.promise;
};
/***/ }),
/* 222 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var aCallable = __webpack_require__(38);
var newPromiseCapabilityModule = __webpack_require__(213);
var perform = __webpack_require__(210);
var iterate = __webpack_require__(97);
var PROMISE_STATICS_INCORRECT_ITERATION = __webpack_require__(215);
// `Promise.allSettled` method
// https://tc39.es/ecma262/#sec-promise.allsettled
$({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
allSettled: function allSettled(iterable) {
var C = this;
var capability = newPromiseCapabilityModule.f(C);
var resolve = capability.resolve;
var reject = capability.reject;
var result = perform(function () {
var promiseResolve = aCallable(C.resolve);
var values = [];
var counter = 0;
var remaining = 1;
iterate(iterable, function (promise) {
var index = counter++;
var alreadyCalled = false;
remaining++;
call(promiseResolve, C, promise).then(function (value) {
if (alreadyCalled) return;
alreadyCalled = true;
values[index] = { status: 'fulfilled', value: value };
--remaining || resolve(values);
}, function (error) {
if (alreadyCalled) return;
alreadyCalled = true;
values[index] = { status: 'rejected', reason: error };
--remaining || resolve(values);
});
});
--remaining || resolve(values);
});
if (result.error) reject(result.value);
return capability.promise;
}
});
/***/ }),
/* 223 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var aCallable = __webpack_require__(38);
var getBuiltIn = __webpack_require__(35);
var newPromiseCapabilityModule = __webpack_require__(213);
var perform = __webpack_require__(210);
var iterate = __webpack_require__(97);
var PROMISE_STATICS_INCORRECT_ITERATION = __webpack_require__(215);
var PROMISE_ANY_ERROR = 'No one promise resolved';
// `Promise.any` method
// https://tc39.es/ecma262/#sec-promise.any
$({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
any: function any(iterable) {
var C = this;
var AggregateError = getBuiltIn('AggregateError');
var capability = newPromiseCapabilityModule.f(C);
var resolve = capability.resolve;
var reject = capability.reject;
var result = perform(function () {
var promiseResolve = aCallable(C.resolve);
var errors = [];
var counter = 0;
var remaining = 1;
var alreadyResolved = false;
iterate(iterable, function (promise) {
var index = counter++;
var alreadyRejected = false;
remaining++;
call(promiseResolve, C, promise).then(function (value) {
if (alreadyRejected || alreadyResolved) return;
alreadyResolved = true;
resolve(value);
}, function (error) {
if (alreadyRejected || alreadyResolved) return;
alreadyRejected = true;
errors[index] = error;
--remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR));
});
});
--remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR));
});
if (result.error) reject(result.value);
return capability.promise;
}
});
/***/ }),
/* 224 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var IS_PURE = __webpack_require__(16);
var NativePromiseConstructor = __webpack_require__(211);
var fails = __webpack_require__(8);
var getBuiltIn = __webpack_require__(35);
var isCallable = __webpack_require__(28);
var speciesConstructor = __webpack_require__(198);
var promiseResolve = __webpack_require__(221);
var defineBuiltIn = __webpack_require__(51);
var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
// Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829
var NON_GENERIC = !!NativePromiseConstructor && fails(function () {
// eslint-disable-next-line unicorn/no-thenable -- required for testing
NativePromisePrototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });
});
// `Promise.prototype.finally` method
// https://tc39.es/ecma262/#sec-promise.prototype.finally
$({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {
'finally': function (onFinally) {
var C = speciesConstructor(this, getBuiltIn('Promise'));
var isFunction = isCallable(onFinally);
return this.then(
isFunction ? function (x) {
return promiseResolve(C, onFinally()).then(function () { return x; });
} : onFinally,
isFunction ? function (e) {
return promiseResolve(C, onFinally()).then(function () { throw e; });
} : onFinally
);
}
});
// makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then`
if (!IS_PURE && isCallable(NativePromiseConstructor)) {
var method = getBuiltIn('Promise').prototype['finally'];
if (NativePromisePrototype['finally'] !== method) {
defineBuiltIn(NativePromisePrototype, 'finally', method, { unsafe: true });
}
}
/***/ }),
/* 225 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var globalThis = __webpack_require__(2);
var apply = __webpack_require__(72);
var slice = __webpack_require__(181);
var newPromiseCapabilityModule = __webpack_require__(213);
var aCallable = __webpack_require__(38);
var perform = __webpack_require__(210);
var Promise = globalThis.Promise;
var ACCEPT_ARGUMENTS = false;
// Avoiding the use of polyfills of the previous iteration of this proposal
// that does not accept arguments of the callback
var FORCED = !Promise || !Promise['try'] || perform(function () {
Promise['try'](function (argument) {
ACCEPT_ARGUMENTS = argument === 8;
}, 8);
}).error || !ACCEPT_ARGUMENTS;
// `Promise.try` method
// https://tc39.es/ecma262/#sec-promise.try
$({ target: 'Promise', stat: true, forced: FORCED }, {
'try': function (callbackfn /* , ...args */) {
var args = arguments.length > 1 ? slice(arguments, 1) : [];
var promiseCapability = newPromiseCapabilityModule.f(this);
var result = perform(function () {
return apply(aCallable(callbackfn), undefined, args);
});
(result.error ? promiseCapability.reject : promiseCapability.resolve)(result.value);
return promiseCapability.promise;
}
});
/***/ }),
/* 226 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var newPromiseCapabilityModule = __webpack_require__(213);
// `Promise.withResolvers` method
// https://tc39.es/ecma262/#sec-promise.withResolvers
$({ target: 'Promise', stat: true }, {
withResolvers: function withResolvers() {
var promiseCapability = newPromiseCapabilityModule.f(this);
return {
promise: promiseCapability.promise,
resolve: promiseCapability.resolve,
reject: promiseCapability.reject
};
}
});
/***/ }),
/* 227 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var fromAsync = __webpack_require__(228);
var fails = __webpack_require__(8);
// eslint-disable-next-line es/no-array-fromasync -- safe
var nativeFromAsync = Array.fromAsync;
// https://bugs.webkit.org/show_bug.cgi?id=271703
var INCORRECT_CONSTRUCTURING = !nativeFromAsync || fails(function () {
var counter = 0;
nativeFromAsync.call(function () {
counter++;
return [];
}, { length: 0 });
return counter !== 1;
});
// `Array.fromAsync` method
// https://github.com/tc39/proposal-array-from-async
$({ target: 'Array', stat: true, forced: INCORRECT_CONSTRUCTURING }, {
fromAsync: fromAsync
});
/***/ }),
/* 228 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var bind = __webpack_require__(98);
var uncurryThis = __webpack_require__(6);
var toObject = __webpack_require__(9);
var isConstructor = __webpack_require__(200);
var getAsyncIterator = __webpack_require__(229);
var getIterator = __webpack_require__(102);
var getIteratorDirect = __webpack_require__(155);
var getIteratorMethod = __webpack_require__(103);
var getMethod = __webpack_require__(37);
var getBuiltIn = __webpack_require__(35);
var getBuiltInPrototypeMethod = __webpack_require__(120);
var wellKnownSymbol = __webpack_require__(13);
var AsyncFromSyncIterator = __webpack_require__(230);
var toArray = __webpack_require__(232).toArray;
var ASYNC_ITERATOR = wellKnownSymbol('asyncIterator');
var arrayIterator = uncurryThis(getBuiltInPrototypeMethod('Array', 'values'));
var arrayIteratorNext = uncurryThis(arrayIterator([]).next);
var safeArrayIterator = function () {
return new SafeArrayIterator(this);
};
var SafeArrayIterator = function (O) {
this.iterator = arrayIterator(O);
};
SafeArrayIterator.prototype.next = function () {
return arrayIteratorNext(this.iterator);
};
// `Array.fromAsync` method implementation
// https://github.com/tc39/proposal-array-from-async
module.exports = function fromAsync(asyncItems /* , mapfn = undefined, thisArg = undefined */) {
var C = this;
var argumentsLength = arguments.length;
var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
var thisArg = argumentsLength > 2 ? arguments[2] : undefined;
return new (getBuiltIn('Promise'))(function (resolve) {
var O = toObject(asyncItems);
if (mapfn !== undefined) mapfn = bind(mapfn, thisArg);
var usingAsyncIterator = getMethod(O, ASYNC_ITERATOR);
var usingSyncIterator = usingAsyncIterator ? undefined : getIteratorMethod(O) || safeArrayIterator;
var A = isConstructor(C) ? new C() : [];
var iterator = usingAsyncIterator
? getAsyncIterator(O, usingAsyncIterator)
: new AsyncFromSyncIterator(getIteratorDirect(getIterator(O, usingSyncIterator)));
resolve(toArray(iterator, mapfn, A));
});
};
/***/ }),
/* 229 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(33);
var AsyncFromSyncIterator = __webpack_require__(230);
var anObject = __webpack_require__(30);
var getIterator = __webpack_require__(102);
var getIteratorDirect = __webpack_require__(155);
var getMethod = __webpack_require__(37);
var wellKnownSymbol = __webpack_require__(13);
var ASYNC_ITERATOR = wellKnownSymbol('asyncIterator');
module.exports = function (it, usingIterator) {
var method = arguments.length < 2 ? getMethod(it, ASYNC_ITERATOR) : usingIterator;
return method ? anObject(call(method, it)) : new AsyncFromSyncIterator(getIteratorDirect(getIterator(it)));
};
/***/ }),
/* 230 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(33);
var anObject = __webpack_require__(30);
var create = __webpack_require__(93);
var getMethod = __webpack_require__(37);
var defineBuiltIns = __webpack_require__(145);
var InternalStateModule = __webpack_require__(55);
var iteratorClose = __webpack_require__(104);
var getBuiltIn = __webpack_require__(35);
var AsyncIteratorPrototype = __webpack_require__(231);
var createIterResultObject = __webpack_require__(151);
var Promise = getBuiltIn('Promise');
var ASYNC_FROM_SYNC_ITERATOR = 'AsyncFromSyncIterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(ASYNC_FROM_SYNC_ITERATOR);
var asyncFromSyncIteratorContinuation = function (result, resolve, reject, syncIterator, closeOnRejection) {
var done = result.done;
Promise.resolve(result.value).then(function (value) {
resolve(createIterResultObject(value, done));
}, function (error) {
if (!done && closeOnRejection) {
try {
iteratorClose(syncIterator, 'throw', error);
} catch (error2) {
error = error2;
}
}
reject(error);
});
};
var AsyncFromSyncIterator = function AsyncIterator(iteratorRecord) {
iteratorRecord.type = ASYNC_FROM_SYNC_ITERATOR;
setInternalState(this, iteratorRecord);
};
AsyncFromSyncIterator.prototype = defineBuiltIns(create(AsyncIteratorPrototype), {
next: function next() {
var state = getInternalState(this);
return new Promise(function (resolve, reject) {
var result = anObject(call(state.next, state.iterator));
asyncFromSyncIteratorContinuation(result, resolve, reject, state.iterator, true);
});
},
'return': function () {
var iterator = getInternalState(this).iterator;
return new Promise(function (resolve, reject) {
var $return = getMethod(iterator, 'return');
if ($return === undefined) return resolve(createIterResultObject(undefined, true));
var result = anObject(call($return, iterator));
asyncFromSyncIteratorContinuation(result, resolve, reject, iterator);
});
}
});
module.exports = AsyncFromSyncIterator;
/***/ }),
/* 231 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var shared = __webpack_require__(15);
var isCallable = __webpack_require__(28);
var create = __webpack_require__(93);
var getPrototypeOf = __webpack_require__(91);
var defineBuiltIn = __webpack_require__(51);
var wellKnownSymbol = __webpack_require__(13);
var IS_PURE = __webpack_require__(16);
var USE_FUNCTION_CONSTRUCTOR = 'USE_FUNCTION_CONSTRUCTOR';
var ASYNC_ITERATOR = wellKnownSymbol('asyncIterator');
var AsyncIterator = globalThis.AsyncIterator;
var PassedAsyncIteratorPrototype = shared.AsyncIteratorPrototype;
var AsyncIteratorPrototype, prototype;
if (PassedAsyncIteratorPrototype) {
AsyncIteratorPrototype = PassedAsyncIteratorPrototype;
} else if (isCallable(AsyncIterator)) {
AsyncIteratorPrototype = AsyncIterator.prototype;
} else if (shared[USE_FUNCTION_CONSTRUCTOR] || globalThis[USE_FUNCTION_CONSTRUCTOR]) {
try {
// eslint-disable-next-line no-new-func -- we have no alternatives without usage of modern syntax
prototype = getPrototypeOf(getPrototypeOf(getPrototypeOf(Function('return async function*(){}()')())));
if (getPrototypeOf(prototype) === Object.prototype) AsyncIteratorPrototype = prototype;
} catch (error) { /* empty */ }
}
if (!AsyncIteratorPrototype) AsyncIteratorPrototype = {};
else if (IS_PURE) AsyncIteratorPrototype = create(AsyncIteratorPrototype);
if (!isCallable(AsyncIteratorPrototype[ASYNC_ITERATOR])) {
defineBuiltIn(AsyncIteratorPrototype, ASYNC_ITERATOR, function () {
return this;
});
}
module.exports = AsyncIteratorPrototype;
/***/ }),
/* 232 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/tc39/proposal-async-iterator-helpers
// https://github.com/tc39/proposal-array-from-async
var call = __webpack_require__(33);
var aCallable = __webpack_require__(38);
var anObject = __webpack_require__(30);
var isObject = __webpack_require__(27);
var doesNotExceedSafeInteger = __webpack_require__(115);
var getBuiltIn = __webpack_require__(35);
var createProperty = __webpack_require__(117);
var setArrayLength = __webpack_require__(113);
var getIteratorDirect = __webpack_require__(155);
var closeAsyncIteration = __webpack_require__(233);
var createMethod = function (TYPE) {
var IS_TO_ARRAY = TYPE === 0;
var IS_FOR_EACH = TYPE === 1;
var IS_EVERY = TYPE === 2;
var IS_SOME = TYPE === 3;
return function (object, fn, target) {
anObject(object);
var MAPPING = fn !== undefined;
if (MAPPING || !IS_TO_ARRAY) aCallable(fn);
var record = getIteratorDirect(object);
var Promise = getBuiltIn('Promise');
var iterator = record.iterator;
var next = record.next;
var counter = 0;
return new Promise(function (resolve, reject) {
var ifAbruptCloseAsyncIterator = function (error) {
closeAsyncIteration(iterator, reject, error, reject);
};
var loop = function () {
try {
if (MAPPING) try {
doesNotExceedSafeInteger(counter);
} catch (error5) { ifAbruptCloseAsyncIterator(error5); }
Promise.resolve(anObject(call(next, iterator))).then(function (step) {
try {
if (anObject(step).done) {
if (IS_TO_ARRAY) {
setArrayLength(target, counter);
resolve(target);
} else resolve(IS_SOME ? false : IS_EVERY || undefined);
} else {
var value = step.value;
try {
if (MAPPING) {
var result = fn(value, counter);
var handler = function ($result) {
if (IS_FOR_EACH) {
loop();
} else if (IS_EVERY) {
$result ? loop() : closeAsyncIteration(iterator, resolve, false, reject);
} else if (IS_TO_ARRAY) {
try {
createProperty(target, counter++, $result);
loop();
} catch (error4) { ifAbruptCloseAsyncIterator(error4); }
} else {
$result ? closeAsyncIteration(iterator, resolve, IS_SOME || value, reject) : loop();
}
};
if (isObject(result)) Promise.resolve(result).then(handler, ifAbruptCloseAsyncIterator);
else handler(result);
} else {
createProperty(target, counter++, value);
loop();
}
} catch (error3) { ifAbruptCloseAsyncIterator(error3); }
}
} catch (error2) { reject(error2); }
}, reject);
} catch (error) { reject(error); }
};
loop();
});
};
};
module.exports = {
// `AsyncIterator.prototype.toArray` / `Array.fromAsync` methods
toArray: createMethod(0),
// `AsyncIterator.prototype.forEach` method
forEach: createMethod(1),
// `AsyncIterator.prototype.every` method
every: createMethod(2),
// `AsyncIterator.prototype.some` method
some: createMethod(3),
// `AsyncIterator.prototype.find` method
find: createMethod(4)
};
/***/ }),
/* 233 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(33);
var getBuiltIn = __webpack_require__(35);
var getMethod = __webpack_require__(37);
module.exports = function (iterator, method, argument, reject) {
try {
var returnMethod = getMethod(iterator, 'return');
if (returnMethod) {
return getBuiltIn('Promise').resolve(call(returnMethod, iterator)).then(function () {
method(argument);
}, function (error) {
reject(error);
});
}
} catch (error2) {
return reject(error2);
} method(argument);
};
/***/ }),
/* 234 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/tc39/proposal-async-explicit-resource-management
var $ = __webpack_require__(49);
var DESCRIPTORS = __webpack_require__(24);
var getBuiltIn = __webpack_require__(35);
var aCallable = __webpack_require__(38);
var anInstance = __webpack_require__(144);
var defineBuiltIn = __webpack_require__(51);
var defineBuiltIns = __webpack_require__(145);
var defineBuiltInAccessor = __webpack_require__(130);
var wellKnownSymbol = __webpack_require__(13);
var InternalStateModule = __webpack_require__(55);
var addDisposableResource = __webpack_require__(146);
var V8_VERSION = __webpack_require__(20);
var Promise = getBuiltIn('Promise');
var SuppressedError = getBuiltIn('SuppressedError');
var $ReferenceError = ReferenceError;
var ASYNC_DISPOSE = wellKnownSymbol('asyncDispose');
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var ASYNC_DISPOSABLE_STACK = 'AsyncDisposableStack';
var setInternalState = InternalStateModule.set;
var getAsyncDisposableStackInternalState = InternalStateModule.getterFor(ASYNC_DISPOSABLE_STACK);
var HINT = 'async-dispose';
var DISPOSED = 'disposed';
var PENDING = 'pending';
var getPendingAsyncDisposableStackInternalState = function (stack) {
var internalState = getAsyncDisposableStackInternalState(stack);
if (internalState.state === DISPOSED) throw new $ReferenceError(ASYNC_DISPOSABLE_STACK + ' already disposed');
return internalState;
};
var $AsyncDisposableStack = function AsyncDisposableStack() {
setInternalState(anInstance(this, AsyncDisposableStackPrototype), {
type: ASYNC_DISPOSABLE_STACK,
state: PENDING,
stack: []
});
if (!DESCRIPTORS) this.disposed = false;
};
var AsyncDisposableStackPrototype = $AsyncDisposableStack.prototype;
defineBuiltIns(AsyncDisposableStackPrototype, {
disposeAsync: function disposeAsync() {
var asyncDisposableStack = this;
return new Promise(function (resolve, reject) {
var internalState = getAsyncDisposableStackInternalState(asyncDisposableStack);
if (internalState.state === DISPOSED) return resolve(undefined);
internalState.state = DISPOSED;
if (!DESCRIPTORS) asyncDisposableStack.disposed = true;
var stack = internalState.stack;
var i = stack.length;
var thrown = false;
var suppressed;
var handleError = function (result) {
if (thrown) {
suppressed = new SuppressedError(result, suppressed);
} else {
thrown = true;
suppressed = result;
}
loop();
};
var loop = function () {
if (i) {
var disposeMethod = stack[--i];
stack[i] = null;
try {
Promise.resolve(disposeMethod()).then(loop, handleError);
} catch (error) {
handleError(error);
}
} else {
internalState.stack = null;
thrown ? reject(suppressed) : resolve(undefined);
}
};
loop();
});
},
use: function use(value) {
addDisposableResource(getPendingAsyncDisposableStackInternalState(this), value, HINT);
return value;
},
adopt: function adopt(value, onDispose) {
var internalState = getPendingAsyncDisposableStackInternalState(this);
aCallable(onDispose);
addDisposableResource(internalState, undefined, HINT, function () {
return onDispose(value);
});
return value;
},
defer: function defer(onDispose) {
var internalState = getPendingAsyncDisposableStackInternalState(this);
aCallable(onDispose);
addDisposableResource(internalState, undefined, HINT, onDispose);
},
move: function move() {
var internalState = getPendingAsyncDisposableStackInternalState(this);
var newAsyncDisposableStack = new $AsyncDisposableStack();
getAsyncDisposableStackInternalState(newAsyncDisposableStack).stack = internalState.stack;
internalState.stack = [];
internalState.state = DISPOSED;
if (!DESCRIPTORS) this.disposed = true;
return newAsyncDisposableStack;
}
});
if (DESCRIPTORS) defineBuiltInAccessor(AsyncDisposableStackPrototype, 'disposed', {
configurable: true,
get: function disposed() {
return getAsyncDisposableStackInternalState(this).state === DISPOSED;
}
});
defineBuiltIn(AsyncDisposableStackPrototype, ASYNC_DISPOSE, AsyncDisposableStackPrototype.disposeAsync, { name: 'disposeAsync' });
defineBuiltIn(AsyncDisposableStackPrototype, TO_STRING_TAG, ASYNC_DISPOSABLE_STACK, { nonWritable: true });
// https://github.com/tc39/proposal-explicit-resource-management/issues/256
// can't be detected synchronously
var SYNC_DISPOSE_RETURNING_PROMISE_RESOLUTION_BUG = V8_VERSION && V8_VERSION < 136;
$({ global: true, constructor: true, forced: SYNC_DISPOSE_RETURNING_PROMISE_RESOLUTION_BUG }, {
AsyncDisposableStack: $AsyncDisposableStack
});
/***/ }),
/* 235 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/tc39/proposal-async-explicit-resource-management
var call = __webpack_require__(33);
var defineBuiltIn = __webpack_require__(51);
var getBuiltIn = __webpack_require__(35);
var getMethod = __webpack_require__(37);
var hasOwn = __webpack_require__(5);
var wellKnownSymbol = __webpack_require__(13);
var AsyncIteratorPrototype = __webpack_require__(231);
var ASYNC_DISPOSE = wellKnownSymbol('asyncDispose');
var Promise = getBuiltIn('Promise');
if (!hasOwn(AsyncIteratorPrototype, ASYNC_DISPOSE)) {
defineBuiltIn(AsyncIteratorPrototype, ASYNC_DISPOSE, function () {
var O = this;
return new Promise(function (resolve, reject) {
var $return = getMethod(O, 'return');
if ($return) {
Promise.resolve(call($return, O)).then(function () {
resolve(undefined);
}, reject);
} else resolve(undefined);
});
});
}
/***/ }),
/* 236 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var globalThis = __webpack_require__(2);
var setToStringTag = __webpack_require__(196);
$({ global: true }, { Reflect: {} });
// Reflect[@@toStringTag] property
// https://tc39.es/ecma262/#sec-reflect-@@tostringtag
setToStringTag(globalThis.Reflect, 'Reflect', true);
/***/ }),
/* 237 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var uncurryThis = __webpack_require__(6);
var aString = __webpack_require__(238);
var hasOwn = __webpack_require__(5);
var padStart = __webpack_require__(239).start;
var WHITESPACES = __webpack_require__(241);
var $Array = Array;
var $escape = RegExp.escape;
var charAt = uncurryThis(''.charAt);
var charCodeAt = uncurryThis(''.charCodeAt);
var numberToString = uncurryThis(1.1.toString);
var join = uncurryThis([].join);
var FIRST_DIGIT_OR_ASCII = /^[0-9a-z]/i;
var SYNTAX_SOLIDUS = /^[$()*+./?[\\\]^{|}]/;
var OTHER_PUNCTUATORS_AND_WHITESPACES = RegExp('^[!"#%&\',\\-:;<=>@`~' + WHITESPACES + ']');
var exec = uncurryThis(FIRST_DIGIT_OR_ASCII.exec);
var ControlEscape = {
'\u0009': 't',
'\u000A': 'n',
'\u000B': 'v',
'\u000C': 'f',
'\u000D': 'r'
};
var escapeChar = function (chr) {
var hex = numberToString(charCodeAt(chr, 0), 16);
return hex.length < 3 ? '\\x' + padStart(hex, 2, '0') : '\\u' + padStart(hex, 4, '0');
};
// Avoiding the use of polyfills of the previous iteration of this proposal
var FORCED = !$escape || $escape('ab') !== '\\x61b';
// `RegExp.escape` method
// https://tc39.es/ecma262/#sec-regexp.escape
$({ target: 'RegExp', stat: true, forced: FORCED }, {
escape: function escape(S) {
aString(S);
var length = S.length;
var result = $Array(length);
for (var i = 0; i < length; i++) {
var chr = charAt(S, i);
if (i === 0 && exec(FIRST_DIGIT_OR_ASCII, chr)) {
result[i] = escapeChar(chr);
} else if (hasOwn(ControlEscape, chr)) {
result[i] = '\\' + ControlEscape[chr];
} else if (exec(SYNTAX_SOLIDUS, chr)) {
result[i] = '\\' + chr;
} else if (exec(OTHER_PUNCTUATORS_AND_WHITESPACES, chr)) {
result[i] = escapeChar(chr);
} else {
var charCode = charCodeAt(chr, 0);
// single UTF-16 code unit
if ((charCode & 0xF800) !== 0xD800) result[i] = chr;
// unpaired surrogate
else if (charCode >= 0xDC00 || i + 1 >= length || (charCodeAt(S, i + 1) & 0xFC00) !== 0xDC00) result[i] = escapeChar(chr);
// surrogate pair
else {
result[i] = chr;
result[++i] = charAt(S, i);
}
}
}
return join(result, '');
}
});
/***/ }),
/* 238 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $TypeError = TypeError;
module.exports = function (argument) {
if (typeof argument == 'string') return argument;
throw new $TypeError('Argument is not a string');
};
/***/ }),
/* 239 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
var toLength = __webpack_require__(68);
var toString = __webpack_require__(81);
var $repeat = __webpack_require__(240);
var requireObjectCoercible = __webpack_require__(10);
var repeat = uncurryThis($repeat);
var stringSlice = uncurryThis(''.slice);
var ceil = Math.ceil;
// `String.prototype.{ padStart, padEnd }` methods implementation
var createMethod = function (IS_END) {
return function ($this, maxLength, fillString) {
var S = toString(requireObjectCoercible($this));
var intMaxLength = toLength(maxLength);
var stringLength = S.length;
var fillStr = fillString === undefined ? ' ' : toString(fillString);
var fillLen, stringFiller;
if (intMaxLength <= stringLength || fillStr === '') return S;
fillLen = intMaxLength - stringLength;
stringFiller = repeat(fillStr, ceil(fillLen / fillStr.length));
if (stringFiller.length > fillLen) stringFiller = stringSlice(stringFiller, 0, fillLen);
return IS_END ? S + stringFiller : stringFiller + S;
};
};
module.exports = {
// `String.prototype.padStart` method
// https://tc39.es/ecma262/#sec-string.prototype.padstart
start: createMethod(false),
// `String.prototype.padEnd` method
// https://tc39.es/ecma262/#sec-string.prototype.padend
end: createMethod(true)
};
/***/ }),
/* 240 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toIntegerOrInfinity = __webpack_require__(65);
var toString = __webpack_require__(81);
var requireObjectCoercible = __webpack_require__(10);
var $RangeError = RangeError;
// `String.prototype.repeat` method implementation
// https://tc39.es/ecma262/#sec-string.prototype.repeat
module.exports = function repeat(count) {
var str = toString(requireObjectCoercible(this));
var result = '';
var n = toIntegerOrInfinity(count);
if (n < 0 || n === Infinity) throw new $RangeError('Wrong number of repetitions');
for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;
return result;
};
/***/ }),
/* 241 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// a string of all valid unicode whitespaces
module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
/***/ }),
/* 242 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(24);
var defineBuiltInAccessor = __webpack_require__(130);
var regExpFlagsDetection = __webpack_require__(243);
var regExpFlagsGetterImplementation = __webpack_require__(244);
// `RegExp.prototype.flags` getter
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
if (DESCRIPTORS && !regExpFlagsDetection.correct) {
defineBuiltInAccessor(RegExp.prototype, 'flags', {
configurable: true,
get: regExpFlagsGetterImplementation
});
regExpFlagsDetection.correct = true;
}
/***/ }),
/* 243 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var fails = __webpack_require__(8);
// babel-minify and Closure Compiler transpiles RegExp('.', 'd') -> /./d and it causes SyntaxError
var RegExp = globalThis.RegExp;
var FLAGS_GETTER_IS_CORRECT = !fails(function () {
var INDICES_SUPPORT = true;
try {
RegExp('.', 'd');
} catch (error) {
INDICES_SUPPORT = false;
}
var O = {};
// modern V8 bug
var calls = '';
var expected = INDICES_SUPPORT ? 'dgimsy' : 'gimsy';
var addGetter = function (key, chr) {
// eslint-disable-next-line es/no-object-defineproperty -- safe
Object.defineProperty(O, key, { get: function () {
calls += chr;
return true;
} });
};
var pairs = {
dotAll: 's',
global: 'g',
ignoreCase: 'i',
multiline: 'm',
sticky: 'y'
};
if (INDICES_SUPPORT) pairs.hasIndices = 'd';
for (var key in pairs) addGetter(key, pairs[key]);
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var result = Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags').get.call(O);
return result !== expected || calls !== expected;
});
module.exports = { correct: FLAGS_GETTER_IS_CORRECT };
/***/ }),
/* 244 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var anObject = __webpack_require__(30);
// `RegExp.prototype.flags` getter implementation
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
module.exports = function () {
var that = anObject(this);
var result = '';
if (that.hasIndices) result += 'd';
if (that.global) result += 'g';
if (that.ignoreCase) result += 'i';
if (that.multiline) result += 'm';
if (that.dotAll) result += 's';
if (that.unicode) result += 'u';
if (that.unicodeSets) result += 'v';
if (that.sticky) result += 'y';
return result;
};
/***/ }),
/* 245 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var difference = __webpack_require__(246);
var fails = __webpack_require__(8);
var setMethodAcceptSetLike = __webpack_require__(254);
var SET_LIKE_INCORRECT_BEHAVIOR = !setMethodAcceptSetLike('difference', function (result) {
return result.size === 0;
});
var FORCED = SET_LIKE_INCORRECT_BEHAVIOR || fails(function () {
// https://bugs.webkit.org/show_bug.cgi?id=288595
var setLike = {
size: 1,
has: function () { return true; },
keys: function () {
var index = 0;
return {
next: function () {
var done = index++ > 1;
if (baseSet.has(1)) baseSet.clear();
return { done: done, value: 2 };
}
};
}
};
// eslint-disable-next-line es/no-set -- testing
var baseSet = new Set([1, 2, 3, 4]);
// eslint-disable-next-line es/no-set-prototype-difference -- testing
return baseSet.difference(setLike).size !== 3;
});
// `Set.prototype.difference` method
// https://tc39.es/ecma262/#sec-set.prototype.difference
$({ target: 'Set', proto: true, real: true, forced: FORCED }, {
difference: difference
});
/***/ }),
/* 246 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var aSet = __webpack_require__(247);
var SetHelpers = __webpack_require__(248);
var clone = __webpack_require__(249);
var size = __webpack_require__(252);
var getSetRecord = __webpack_require__(253);
var iterateSet = __webpack_require__(250);
var iterateSimple = __webpack_require__(251);
var has = SetHelpers.has;
var remove = SetHelpers.remove;
// `Set.prototype.difference` method
// https://tc39.es/ecma262/#sec-set.prototype.difference
module.exports = function difference(other) {
var O = aSet(this);
var otherRec = getSetRecord(other);
var result = clone(O);
if (size(O) <= otherRec.size) iterateSet(O, function (e) {
if (otherRec.includes(e)) remove(result, e);
});
else iterateSimple(otherRec.getIterator(), function (e) {
if (has(result, e)) remove(result, e);
});
return result;
};
/***/ }),
/* 247 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var has = __webpack_require__(248).has;
// Perform ? RequireInternalSlot(M, [[SetData]])
module.exports = function (it) {
has(it);
return it;
};
/***/ }),
/* 248 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
// eslint-disable-next-line es/no-set -- safe
var SetPrototype = Set.prototype;
module.exports = {
// eslint-disable-next-line es/no-set -- safe
Set: Set,
add: uncurryThis(SetPrototype.add),
has: uncurryThis(SetPrototype.has),
remove: uncurryThis(SetPrototype['delete']),
proto: SetPrototype
};
/***/ }),
/* 249 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var SetHelpers = __webpack_require__(248);
var iterate = __webpack_require__(250);
var Set = SetHelpers.Set;
var add = SetHelpers.add;
module.exports = function (set) {
var result = new Set();
iterate(set, function (it) {
add(result, it);
});
return result;
};
/***/ }),
/* 250 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
var iterateSimple = __webpack_require__(251);
var SetHelpers = __webpack_require__(248);
var Set = SetHelpers.Set;
var SetPrototype = SetHelpers.proto;
var forEach = uncurryThis(SetPrototype.forEach);
var keys = uncurryThis(SetPrototype.keys);
var next = keys(new Set()).next;
module.exports = function (set, fn, interruptible) {
return interruptible ? iterateSimple({ iterator: keys(set), next: next }, fn) : forEach(set, fn);
};
/***/ }),
/* 251 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(33);
module.exports = function (record, fn, ITERATOR_INSTEAD_OF_RECORD) {
var iterator = ITERATOR_INSTEAD_OF_RECORD ? record : record.iterator;
var next = record.next;
var step, result;
while (!(step = call(next, iterator)).done) {
result = fn(step.value);
if (result !== undefined) return result;
}
};
/***/ }),
/* 252 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThisAccessor = __webpack_require__(75);
var SetHelpers = __webpack_require__(248);
module.exports = uncurryThisAccessor(SetHelpers.proto, 'size', 'get') || function (set) {
return set.size;
};
/***/ }),
/* 253 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var aCallable = __webpack_require__(38);
var anObject = __webpack_require__(30);
var call = __webpack_require__(33);
var toIntegerOrInfinity = __webpack_require__(65);
var getIteratorDirect = __webpack_require__(155);
var INVALID_SIZE = 'Invalid size';
var $RangeError = RangeError;
var $TypeError = TypeError;
var max = Math.max;
var SetRecord = function (set, intSize) {
this.set = set;
this.size = max(intSize, 0);
this.has = aCallable(set.has);
this.keys = aCallable(set.keys);
};
SetRecord.prototype = {
getIterator: function () {
return getIteratorDirect(anObject(call(this.keys, this.set)));
},
includes: function (it) {
return call(this.has, this.set, it);
}
};
// `GetSetRecord` abstract operation
// https://tc39.es/proposal-set-methods/#sec-getsetrecord
module.exports = function (obj) {
anObject(obj);
var numSize = +obj.size;
// NOTE: If size is undefined, then numSize will be NaN
// eslint-disable-next-line no-self-compare -- NaN check
if (numSize !== numSize) throw new $TypeError(INVALID_SIZE);
var intSize = toIntegerOrInfinity(numSize);
if (intSize < 0) throw new $RangeError(INVALID_SIZE);
return new SetRecord(obj, intSize);
};
/***/ }),
/* 254 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var getBuiltIn = __webpack_require__(35);
var createSetLike = function (size) {
return {
size: size,
has: function () {
return false;
},
keys: function () {
return {
next: function () {
return { done: true };
}
};
}
};
};
var createSetLikeWithInfinitySize = function (size) {
return {
size: size,
has: function () {
return true;
},
keys: function () {
throw new Error('e');
}
};
};
module.exports = function (name, callback) {
var Set = getBuiltIn('Set');
try {
new Set()[name](createSetLike(0));
try {
// late spec change, early WebKit ~ Safari 17 implementation does not pass it
// https://github.com/tc39/proposal-set-methods/pull/88
// also covered engines with
// https://bugs.webkit.org/show_bug.cgi?id=272679
new Set()[name](createSetLike(-1));
return false;
} catch (error2) {
if (!callback) return true;
// early V8 implementation bug
// https://issues.chromium.org/issues/351332634
try {
new Set()[name](createSetLikeWithInfinitySize(-Infinity));
return false;
} catch (error) {
var set = new Set([1, 2]);
return callback(set[name](createSetLikeWithInfinitySize(Infinity)));
}
}
} catch (error) {
return false;
}
};
/***/ }),
/* 255 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var fails = __webpack_require__(8);
var intersection = __webpack_require__(256);
var setMethodAcceptSetLike = __webpack_require__(254);
var INCORRECT = !setMethodAcceptSetLike('intersection', function (result) {
return result.size === 2 && result.has(1) && result.has(2);
}) || fails(function () {
// eslint-disable-next-line es/no-array-from, es/no-set, es/no-set-prototype-intersection -- testing
return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2';
});
// `Set.prototype.intersection` method
// https://tc39.es/ecma262/#sec-set.prototype.intersection
$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
intersection: intersection
});
/***/ }),
/* 256 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var aSet = __webpack_require__(247);
var SetHelpers = __webpack_require__(248);
var size = __webpack_require__(252);
var getSetRecord = __webpack_require__(253);
var iterateSet = __webpack_require__(250);
var iterateSimple = __webpack_require__(251);
var Set = SetHelpers.Set;
var add = SetHelpers.add;
var has = SetHelpers.has;
// `Set.prototype.intersection` method
// https://tc39.es/ecma262/#sec-set.prototype.intersection
module.exports = function intersection(other) {
var O = aSet(this);
var otherRec = getSetRecord(other);
var result = new Set();
if (size(O) > otherRec.size) {
iterateSimple(otherRec.getIterator(), function (e) {
if (has(O, e)) add(result, e);
});
} else {
iterateSet(O, function (e) {
if (otherRec.includes(e)) add(result, e);
});
}
return result;
};
/***/ }),
/* 257 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var isDisjointFrom = __webpack_require__(258);
var setMethodAcceptSetLike = __webpack_require__(254);
var INCORRECT = !setMethodAcceptSetLike('isDisjointFrom', function (result) {
return !result;
});
// `Set.prototype.isDisjointFrom` method
// https://tc39.es/ecma262/#sec-set.prototype.isdisjointfrom
$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
isDisjointFrom: isDisjointFrom
});
/***/ }),
/* 258 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var aSet = __webpack_require__(247);
var has = __webpack_require__(248).has;
var size = __webpack_require__(252);
var getSetRecord = __webpack_require__(253);
var iterateSet = __webpack_require__(250);
var iterateSimple = __webpack_require__(251);
var iteratorClose = __webpack_require__(104);
// `Set.prototype.isDisjointFrom` method
// https://tc39.es/ecma262/#sec-set.prototype.isdisjointfrom
module.exports = function isDisjointFrom(other) {
var O = aSet(this);
var otherRec = getSetRecord(other);
if (size(O) <= otherRec.size) return iterateSet(O, function (e) {
if (otherRec.includes(e)) return false;
}, true) !== false;
var iterator = otherRec.getIterator();
return iterateSimple(iterator, function (e) {
if (has(O, e)) return iteratorClose(iterator, 'normal', false);
}) !== false;
};
/***/ }),
/* 259 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var isSubsetOf = __webpack_require__(260);
var setMethodAcceptSetLike = __webpack_require__(254);
var INCORRECT = !setMethodAcceptSetLike('isSubsetOf', function (result) {
return result;
});
// `Set.prototype.isSubsetOf` method
// https://tc39.es/ecma262/#sec-set.prototype.issubsetof
$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
isSubsetOf: isSubsetOf
});
/***/ }),
/* 260 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var aSet = __webpack_require__(247);
var size = __webpack_require__(252);
var iterate = __webpack_require__(250);
var getSetRecord = __webpack_require__(253);
// `Set.prototype.isSubsetOf` method
// https://tc39.es/ecma262/#sec-set.prototype.issubsetof
module.exports = function isSubsetOf(other) {
var O = aSet(this);
var otherRec = getSetRecord(other);
if (size(O) > otherRec.size) return false;
return iterate(O, function (e) {
if (!otherRec.includes(e)) return false;
}, true) !== false;
};
/***/ }),
/* 261 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var isSupersetOf = __webpack_require__(262);
var setMethodAcceptSetLike = __webpack_require__(254);
var INCORRECT = !setMethodAcceptSetLike('isSupersetOf', function (result) {
return !result;
});
// `Set.prototype.isSupersetOf` method
// https://tc39.es/ecma262/#sec-set.prototype.issupersetof
$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
isSupersetOf: isSupersetOf
});
/***/ }),
/* 262 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var aSet = __webpack_require__(247);
var has = __webpack_require__(248).has;
var size = __webpack_require__(252);
var getSetRecord = __webpack_require__(253);
var iterateSimple = __webpack_require__(251);
var iteratorClose = __webpack_require__(104);
// `Set.prototype.isSupersetOf` method
// https://tc39.es/ecma262/#sec-set.prototype.issupersetof
module.exports = function isSupersetOf(other) {
var O = aSet(this);
var otherRec = getSetRecord(other);
if (size(O) < otherRec.size) return false;
var iterator = otherRec.getIterator();
return iterateSimple(iterator, function (e) {
if (!has(O, e)) return iteratorClose(iterator, 'normal', false);
}) !== false;
};
/***/ }),
/* 263 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var symmetricDifference = __webpack_require__(264);
var setMethodGetKeysBeforeCloning = __webpack_require__(265);
var setMethodAcceptSetLike = __webpack_require__(254);
var FORCED = !setMethodAcceptSetLike('symmetricDifference') || !setMethodGetKeysBeforeCloning('symmetricDifference');
// `Set.prototype.symmetricDifference` method
// https://tc39.es/ecma262/#sec-set.prototype.symmetricdifference
$({ target: 'Set', proto: true, real: true, forced: FORCED }, {
symmetricDifference: symmetricDifference
});
/***/ }),
/* 264 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var aSet = __webpack_require__(247);
var SetHelpers = __webpack_require__(248);
var clone = __webpack_require__(249);
var getSetRecord = __webpack_require__(253);
var iterateSimple = __webpack_require__(251);
var add = SetHelpers.add;
var has = SetHelpers.has;
var remove = SetHelpers.remove;
// `Set.prototype.symmetricDifference` method
// https://tc39.es/ecma262/#sec-set.prototype.symmetricdifference
module.exports = function symmetricDifference(other) {
var O = aSet(this);
var keysIter = getSetRecord(other).getIterator();
var result = clone(O);
iterateSimple(keysIter, function (e) {
if (has(O, e)) remove(result, e);
else add(result, e);
});
return result;
};
/***/ }),
/* 265 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Should get iterator record of a set-like object before cloning this
// https://bugs.webkit.org/show_bug.cgi?id=289430
module.exports = function (METHOD_NAME) {
try {
// eslint-disable-next-line es/no-set -- needed for test
var baseSet = new Set();
var setLike = {
size: 0,
has: function () { return true; },
keys: function () {
// eslint-disable-next-line es/no-object-defineproperty -- needed for test
return Object.defineProperty({}, 'next', {
get: function () {
baseSet.clear();
baseSet.add(4);
return function () {
return { done: true };
};
}
});
}
};
var result = baseSet[METHOD_NAME](setLike);
return result.size === 1 && result.values().next().value === 4;
} catch (error) {
return false;
}
};
/***/ }),
/* 266 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var union = __webpack_require__(267);
var setMethodGetKeysBeforeCloning = __webpack_require__(265);
var setMethodAcceptSetLike = __webpack_require__(254);
var FORCED = !setMethodAcceptSetLike('union') || !setMethodGetKeysBeforeCloning('union');
// `Set.prototype.union` method
// https://tc39.es/ecma262/#sec-set.prototype.union
$({ target: 'Set', proto: true, real: true, forced: FORCED }, {
union: union
});
/***/ }),
/* 267 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var aSet = __webpack_require__(247);
var add = __webpack_require__(248).add;
var clone = __webpack_require__(249);
var getSetRecord = __webpack_require__(253);
var iterateSimple = __webpack_require__(251);
// `Set.prototype.union` method
// https://tc39.es/ecma262/#sec-set.prototype.union
module.exports = function union(other) {
var O = aSet(this);
var keysIter = getSetRecord(other).getIterator();
var result = clone(O);
iterateSimple(keysIter, function (it) {
add(result, it);
});
return result;
};
/***/ }),
/* 268 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var uncurryThis = __webpack_require__(6);
var requireObjectCoercible = __webpack_require__(10);
var toIntegerOrInfinity = __webpack_require__(65);
var toString = __webpack_require__(81);
var fails = __webpack_require__(8);
var charAt = uncurryThis(''.charAt);
var FORCED = fails(function () {
// eslint-disable-next-line es/no-string-prototype-at -- safe
return '𠮷'.at(-2) !== '\uD842';
});
// `String.prototype.at` method
// https://tc39.es/ecma262/#sec-string.prototype.at
$({ target: 'String', proto: true, forced: FORCED }, {
at: function at(index) {
var S = toString(requireObjectCoercible(this));
var len = S.length;
var relativeIndex = toIntegerOrInfinity(index);
var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
return (k < 0 || k >= len) ? undefined : charAt(S, k);
}
});
/***/ }),
/* 269 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var uncurryThis = __webpack_require__(6);
var requireObjectCoercible = __webpack_require__(10);
var toString = __webpack_require__(81);
var charCodeAt = uncurryThis(''.charCodeAt);
// `String.prototype.isWellFormed` method
// https://tc39.es/ecma262/#sec-string.prototype.iswellformed
$({ target: 'String', proto: true }, {
isWellFormed: function isWellFormed() {
var S = toString(requireObjectCoercible(this));
var length = S.length;
for (var i = 0; i < length; i++) {
var charCode = charCodeAt(S, i);
// single UTF-16 code unit
if ((charCode & 0xF800) !== 0xD800) continue;
// unpaired surrogate
if (charCode >= 0xDC00 || ++i >= length || (charCodeAt(S, i) & 0xFC00) !== 0xDC00) return false;
} return true;
}
});
/***/ }),
/* 270 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var uncurryThis = __webpack_require__(6);
var requireObjectCoercible = __webpack_require__(10);
var isCallable = __webpack_require__(28);
var isObject = __webpack_require__(27);
var isRegExp = __webpack_require__(271);
var toString = __webpack_require__(81);
var getMethod = __webpack_require__(37);
var getRegExpFlags = __webpack_require__(272);
var getSubstitution = __webpack_require__(273);
var wellKnownSymbol = __webpack_require__(13);
var IS_PURE = __webpack_require__(16);
var REPLACE = wellKnownSymbol('replace');
var $TypeError = TypeError;
var indexOf = uncurryThis(''.indexOf);
var replace = uncurryThis(''.replace);
var stringSlice = uncurryThis(''.slice);
var max = Math.max;
// `String.prototype.replaceAll` method
// https://tc39.es/ecma262/#sec-string.prototype.replaceall
$({ target: 'String', proto: true }, {
replaceAll: function replaceAll(searchValue, replaceValue) {
var O = requireObjectCoercible(this);
var IS_REG_EXP, flags, replacer, string, searchString, functionalReplace, searchLength, advanceBy, position, replacement;
var endOfLastMatch = 0;
var result = '';
if (isObject(searchValue)) {
IS_REG_EXP = isRegExp(searchValue);
if (IS_REG_EXP) {
flags = toString(requireObjectCoercible(getRegExpFlags(searchValue)));
if (!~indexOf(flags, 'g')) throw new $TypeError('`.replaceAll` does not allow non-global regexes');
}
replacer = getMethod(searchValue, REPLACE);
if (replacer) return call(replacer, searchValue, O, replaceValue);
if (IS_PURE && IS_REG_EXP) return replace(toString(O), searchValue, replaceValue);
}
string = toString(O);
searchString = toString(searchValue);
functionalReplace = isCallable(replaceValue);
if (!functionalReplace) replaceValue = toString(replaceValue);
searchLength = searchString.length;
advanceBy = max(1, searchLength);
position = indexOf(string, searchString);
while (position !== -1) {
replacement = functionalReplace
? toString(replaceValue(searchString, position, string))
: getSubstitution(searchString, string, position, [], undefined, replaceValue);
result += stringSlice(string, endOfLastMatch, position) + replacement;
endOfLastMatch = position + searchLength;
position = position + advanceBy > string.length ? -1 : indexOf(string, searchString, position + advanceBy);
}
if (endOfLastMatch < string.length) {
result += stringSlice(string, endOfLastMatch);
}
return result;
}
});
/***/ }),
/* 271 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isObject = __webpack_require__(27);
var classof = __webpack_require__(46);
var wellKnownSymbol = __webpack_require__(13);
var MATCH = wellKnownSymbol('match');
// `IsRegExp` abstract operation
// https://tc39.es/ecma262/#sec-isregexp
module.exports = function (it) {
var isRegExp;
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) === 'RegExp');
};
/***/ }),
/* 272 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(33);
var hasOwn = __webpack_require__(5);
var isPrototypeOf = __webpack_require__(36);
var regExpFlagsDetection = __webpack_require__(243);
var regExpFlagsGetterImplementation = __webpack_require__(244);
var RegExpPrototype = RegExp.prototype;
module.exports = regExpFlagsDetection.correct ? function (it) {
return it.flags;
} : function (it) {
return (!regExpFlagsDetection.correct && isPrototypeOf(RegExpPrototype, it) && !hasOwn(it, 'flags'))
? call(regExpFlagsGetterImplementation, it)
: it.flags;
};
/***/ }),
/* 273 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
var toObject = __webpack_require__(9);
var floor = Math.floor;
var charAt = uncurryThis(''.charAt);
var replace = uncurryThis(''.replace);
var stringSlice = uncurryThis(''.slice);
// eslint-disable-next-line redos/no-vulnerable -- safe
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
// `GetSubstitution` abstract operation
// https://tc39.es/ecma262/#sec-getsubstitution
module.exports = function (matched, str, position, captures, namedCaptures, replacement) {
var tailPos = position + matched.length;
var m = captures.length;
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
if (namedCaptures !== undefined) {
namedCaptures = toObject(namedCaptures);
symbols = SUBSTITUTION_SYMBOLS;
}
return replace(replacement, symbols, function (match, ch) {
var capture;
switch (charAt(ch, 0)) {
case '$': return '$';
case '&': return matched;
case '`': return stringSlice(str, 0, position);
case "'": return stringSlice(str, tailPos);
case '<':
capture = namedCaptures[stringSlice(ch, 1, -1)];
break;
default: // \d\d?
var n = +ch;
if (n === 0) return match;
if (n > m) {
var f = floor(n / 10);
if (f === 0) return match;
if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
return match;
}
capture = captures[n - 1];
}
return capture === undefined ? '' : capture;
});
};
/***/ }),
/* 274 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var uncurryThis = __webpack_require__(6);
var requireObjectCoercible = __webpack_require__(10);
var toString = __webpack_require__(81);
var fails = __webpack_require__(8);
var $Array = Array;
var charAt = uncurryThis(''.charAt);
var charCodeAt = uncurryThis(''.charCodeAt);
var join = uncurryThis([].join);
// eslint-disable-next-line es/no-string-prototype-towellformed -- safe
var $toWellFormed = ''.toWellFormed;
var REPLACEMENT_CHARACTER = '\uFFFD';
// Safari bug
var TO_STRING_CONVERSION_BUG = $toWellFormed && fails(function () {
return call($toWellFormed, 1) !== '1';
});
// `String.prototype.toWellFormed` method
// https://tc39.es/ecma262/#sec-string.prototype.towellformed
$({ target: 'String', proto: true, forced: TO_STRING_CONVERSION_BUG }, {
toWellFormed: function toWellFormed() {
var S = toString(requireObjectCoercible(this));
if (TO_STRING_CONVERSION_BUG) return call($toWellFormed, S);
var length = S.length;
var result = $Array(length);
for (var i = 0; i < length; i++) {
var charCode = charCodeAt(S, i);
// single UTF-16 code unit
if ((charCode & 0xF800) !== 0xD800) result[i] = charAt(S, i);
// unpaired surrogate
else if (charCode >= 0xDC00 || i + 1 >= length || (charCodeAt(S, i + 1) & 0xFC00) !== 0xDC00) result[i] = REPLACEMENT_CHARACTER;
// surrogate pair
else {
result[i] = charAt(S, i);
result[++i] = charAt(S, i);
}
} return join(result, '');
}
});
/***/ }),
/* 275 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(276);
var lengthOfArrayLike = __webpack_require__(67);
var toIntegerOrInfinity = __webpack_require__(65);
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.at` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.at
exportTypedArrayMethod('at', function at(index) {
var O = aTypedArray(this);
var len = lengthOfArrayLike(O);
var relativeIndex = toIntegerOrInfinity(index);
var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
return (k < 0 || k >= len) ? undefined : O[k];
});
/***/ }),
/* 276 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var NATIVE_ARRAY_BUFFER = __webpack_require__(132);
var DESCRIPTORS = __webpack_require__(24);
var globalThis = __webpack_require__(2);
var isCallable = __webpack_require__(28);
var isObject = __webpack_require__(27);
var hasOwn = __webpack_require__(5);
var classof = __webpack_require__(82);
var tryToString = __webpack_require__(39);
var createNonEnumerableProperty = __webpack_require__(50);
var defineBuiltIn = __webpack_require__(51);
var defineBuiltInAccessor = __webpack_require__(130);
var isPrototypeOf = __webpack_require__(36);
var getPrototypeOf = __webpack_require__(91);
var setPrototypeOf = __webpack_require__(74);
var wellKnownSymbol = __webpack_require__(13);
var uid = __webpack_require__(18);
var InternalStateModule = __webpack_require__(55);
var enforceInternalState = InternalStateModule.enforce;
var getInternalState = InternalStateModule.get;
var Int8Array = globalThis.Int8Array;
var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
var Uint8ClampedArray = globalThis.Uint8ClampedArray;
var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;
var TypedArray = Int8Array && getPrototypeOf(Int8Array);
var TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);
var ObjectPrototype = Object.prototype;
var TypeError = globalThis.TypeError;
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
var TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';
// Fixing native typed arrays in Opera Presto crashes the browser, see #595
var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(globalThis.opera) !== 'Opera';
var TYPED_ARRAY_TAG_REQUIRED = false;
var NAME, Constructor, Prototype;
var TypedArrayConstructorsList = {
Int8Array: 1,
Uint8Array: 1,
Uint8ClampedArray: 1,
Int16Array: 2,
Uint16Array: 2,
Int32Array: 4,
Uint32Array: 4,
Float32Array: 4,
Float64Array: 8
};
var BigIntArrayConstructorsList = {
BigInt64Array: 8,
BigUint64Array: 8
};
var isView = function isView(it) {
if (!isObject(it)) return false;
var klass = classof(it);
return klass === 'DataView'
|| hasOwn(TypedArrayConstructorsList, klass)
|| hasOwn(BigIntArrayConstructorsList, klass);
};
var getTypedArrayConstructor = function (it) {
var proto = getPrototypeOf(it);
if (!isObject(proto)) return;
var state = getInternalState(proto);
return (state && hasOwn(state, TYPED_ARRAY_CONSTRUCTOR)) ? state[TYPED_ARRAY_CONSTRUCTOR] : getTypedArrayConstructor(proto);
};
var isTypedArray = function (it) {
if (!isObject(it)) return false;
var klass = classof(it);
return hasOwn(TypedArrayConstructorsList, klass)
|| hasOwn(BigIntArrayConstructorsList, klass);
};
var aTypedArray = function (it) {
if (isTypedArray(it)) return it;
throw new TypeError('Target is not a typed array');
};
var aTypedArrayConstructor = function (C) {
if (isCallable(C) && (!setPrototypeOf || isPrototypeOf(TypedArray, C))) return C;
throw new TypeError(tryToString(C) + ' is not a typed array constructor');
};
var exportTypedArrayMethod = function (KEY, property, forced, options) {
if (!DESCRIPTORS) return;
if (forced) for (var ARRAY in TypedArrayConstructorsList) {
var TypedArrayConstructor = globalThis[ARRAY];
if (TypedArrayConstructor && hasOwn(TypedArrayConstructor.prototype, KEY)) try {
delete TypedArrayConstructor.prototype[KEY];
} catch (error) {
// old WebKit bug - some methods are non-configurable
try {
TypedArrayConstructor.prototype[KEY] = property;
} catch (error2) { /* empty */ }
}
}
if (!TypedArrayPrototype[KEY] || forced) {
defineBuiltIn(TypedArrayPrototype, KEY, forced ? property
: NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property, options);
}
};
var exportTypedArrayStaticMethod = function (KEY, property, forced) {
var ARRAY, TypedArrayConstructor;
if (!DESCRIPTORS) return;
if (setPrototypeOf) {
if (forced) for (ARRAY in TypedArrayConstructorsList) {
TypedArrayConstructor = globalThis[ARRAY];
if (TypedArrayConstructor && hasOwn(TypedArrayConstructor, KEY)) try {
delete TypedArrayConstructor[KEY];
} catch (error) { /* empty */ }
}
if (!TypedArray[KEY] || forced) {
// V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable
try {
return defineBuiltIn(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);
} catch (error) { /* empty */ }
} else return;
}
for (ARRAY in TypedArrayConstructorsList) {
TypedArrayConstructor = globalThis[ARRAY];
if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {
defineBuiltIn(TypedArrayConstructor, KEY, property);
}
}
};
for (NAME in TypedArrayConstructorsList) {
Constructor = globalThis[NAME];
Prototype = Constructor && Constructor.prototype;
if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;
else NATIVE_ARRAY_BUFFER_VIEWS = false;
}
for (NAME in BigIntArrayConstructorsList) {
Constructor = globalThis[NAME];
Prototype = Constructor && Constructor.prototype;
if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;
}
// WebKit bug - typed arrays constructors prototype is Object.prototype
if (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {
// eslint-disable-next-line no-shadow -- safe
TypedArray = function TypedArray() {
throw new TypeError('Incorrect invocation');
};
if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
if (globalThis[NAME]) setPrototypeOf(globalThis[NAME], TypedArray);
}
}
if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {
TypedArrayPrototype = TypedArray.prototype;
if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
if (globalThis[NAME]) setPrototypeOf(globalThis[NAME].prototype, TypedArrayPrototype);
}
}
// WebKit bug - one more object in Uint8ClampedArray prototype chain
if (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
}
if (DESCRIPTORS && !hasOwn(TypedArrayPrototype, TO_STRING_TAG)) {
TYPED_ARRAY_TAG_REQUIRED = true;
defineBuiltInAccessor(TypedArrayPrototype, TO_STRING_TAG, {
configurable: true,
get: function () {
return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
}
});
for (NAME in TypedArrayConstructorsList) if (globalThis[NAME]) {
createNonEnumerableProperty(globalThis[NAME], TYPED_ARRAY_TAG, NAME);
}
}
module.exports = {
NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQUIRED && TYPED_ARRAY_TAG,
aTypedArray: aTypedArray,
aTypedArrayConstructor: aTypedArrayConstructor,
exportTypedArrayMethod: exportTypedArrayMethod,
exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
getTypedArrayConstructor: getTypedArrayConstructor,
isView: isView,
isTypedArray: isTypedArray,
TypedArray: TypedArray,
TypedArrayPrototype: TypedArrayPrototype
};
/***/ }),
/* 277 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(276);
var $findLast = __webpack_require__(110).findLast;
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.findLast` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.findlast
exportTypedArrayMethod('findLast', function findLast(predicate /* , thisArg */) {
return $findLast(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
});
/***/ }),
/* 278 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(276);
var $findLastIndex = __webpack_require__(110).findLastIndex;
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.findLastIndex` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.findlastindex
exportTypedArrayMethod('findLastIndex', function findLastIndex(predicate /* , thisArg */) {
return $findLastIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
});
/***/ }),
/* 279 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var call = __webpack_require__(33);
var ArrayBufferViewCore = __webpack_require__(276);
var lengthOfArrayLike = __webpack_require__(67);
var toOffset = __webpack_require__(280);
var toIndexedObject = __webpack_require__(9);
var fails = __webpack_require__(8);
var RangeError = globalThis.RangeError;
var Int8Array = globalThis.Int8Array;
var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
var $set = Int8ArrayPrototype && Int8ArrayPrototype.set;
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS = !fails(function () {
// eslint-disable-next-line es/no-typed-arrays -- required for testing
var array = new Uint8ClampedArray(2);
call($set, array, { length: 1, 0: 3 }, 1);
return array[1] !== 3;
});
// https://bugs.chromium.org/p/v8/issues/detail?id=11294 and other
var TO_OBJECT_BUG = WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS && ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS && fails(function () {
var array = new Int8Array(2);
array.set(1);
array.set('2', 1);
return array[0] !== 0 || array[1] !== 2;
});
// `%TypedArray%.prototype.set` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set
exportTypedArrayMethod('set', function set(arrayLike /* , offset */) {
aTypedArray(this);
var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
var src = toIndexedObject(arrayLike);
if (WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS) return call($set, this, src, offset);
var length = this.length;
var len = lengthOfArrayLike(src);
var index = 0;
if (len + offset > length) throw new RangeError('Wrong length');
while (index < len) this[offset + index] = src[index++];
}, !WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS || TO_OBJECT_BUG);
/***/ }),
/* 280 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toPositiveInteger = __webpack_require__(157);
var $RangeError = RangeError;
module.exports = function (it, BYTES) {
var offset = toPositiveInteger(it);
if (offset % BYTES) throw new $RangeError('Wrong offset');
return offset;
};
/***/ }),
/* 281 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var lengthOfArrayLike = __webpack_require__(67);
var ArrayBufferViewCore = __webpack_require__(276);
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;
// `%TypedArray%.prototype.toReversed` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.toreversed
exportTypedArrayMethod('toReversed', function toReversed() {
var O = aTypedArray(this);
var len = lengthOfArrayLike(O);
var A = new (getTypedArrayConstructor(O))(len);
var k = 0;
for (; k < len; k++) A[k] = O[len - k - 1];
return A;
});
/***/ }),
/* 282 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(276);
var uncurryThis = __webpack_require__(6);
var aCallable = __webpack_require__(38);
var arrayFromConstructorAndList = __webpack_require__(119);
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var sort = uncurryThis(ArrayBufferViewCore.TypedArrayPrototype.sort);
// `%TypedArray%.prototype.toSorted` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tosorted
exportTypedArrayMethod('toSorted', function toSorted(compareFn) {
if (compareFn !== undefined) aCallable(compareFn);
var O = aTypedArray(this);
var A = arrayFromConstructorAndList(getTypedArrayConstructor(O), O);
return sort(A, compareFn);
});
/***/ }),
/* 283 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(276);
var isBigIntArray = __webpack_require__(284);
var lengthOfArrayLike = __webpack_require__(67);
var toIntegerOrInfinity = __webpack_require__(65);
var toBigInt = __webpack_require__(285);
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var $RangeError = RangeError;
var PROPER_ORDER = function () {
try {
// eslint-disable-next-line no-throw-literal, es/no-typed-arrays, es/no-array-prototype-with -- required for testing
new Int8Array(1)['with'](2, { valueOf: function () { throw 8; } });
} catch (error) {
// some early implementations, like WebKit, does not follow the final semantic
// https://github.com/tc39/proposal-change-array-by-copy/pull/86
return error === 8;
}
}();
// Bug in WebKit. It should truncate a negative fractional index to zero, but instead throws an error
var THROW_ON_NEGATIVE_FRACTIONAL_INDEX = PROPER_ORDER && function () {
try {
// eslint-disable-next-line es/no-typed-arrays, es/no-array-prototype-with -- required for testing
new Int8Array(1)['with'](-0.5, 1);
} catch (error) {
return true;
}
}();
// `%TypedArray%.prototype.with` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.with
exportTypedArrayMethod('with', { 'with': function (index, value) {
var O = aTypedArray(this);
var len = lengthOfArrayLike(O);
var relativeIndex = toIntegerOrInfinity(index);
var actualIndex = relativeIndex < 0 ? len + relativeIndex : relativeIndex;
var numericValue = isBigIntArray(O) ? toBigInt(value) : +value;
if (actualIndex >= len || actualIndex < 0) throw new $RangeError('Incorrect index');
var A = new (getTypedArrayConstructor(O))(len);
var k = 0;
for (; k < len; k++) A[k] = k === actualIndex ? numericValue : O[k];
return A;
} }['with'], !PROPER_ORDER || THROW_ON_NEGATIVE_FRACTIONAL_INDEX);
/***/ }),
/* 284 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var classof = __webpack_require__(82);
module.exports = function (it) {
var klass = classof(it);
return klass === 'BigInt64Array' || klass === 'BigUint64Array';
};
/***/ }),
/* 285 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toPrimitive = __webpack_require__(32);
var $TypeError = TypeError;
// `ToBigInt` abstract operation
// https://tc39.es/ecma262/#sec-tobigint
module.exports = function (argument) {
var prim = toPrimitive(argument, 'number');
if (typeof prim == 'number') throw new $TypeError("Can't convert number to bigint");
// eslint-disable-next-line es/no-bigint -- safe
return BigInt(prim);
};
/***/ }),
/* 286 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var globalThis = __webpack_require__(2);
var arrayFromConstructorAndList = __webpack_require__(119);
var $fromBase64 = __webpack_require__(287);
var Uint8Array = globalThis.Uint8Array;
var INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS = !Uint8Array || !Uint8Array.fromBase64 || !function () {
// Webkit not throw an error on odd length string
try {
Uint8Array.fromBase64('a');
return;
} catch (error) { /* empty */ }
try {
Uint8Array.fromBase64('', null);
} catch (error) {
return true;
}
}();
// `Uint8Array.fromBase64` method
// https://github.com/tc39/proposal-arraybuffer-base64
if (Uint8Array) $({ target: 'Uint8Array', stat: true, forced: INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS }, {
fromBase64: function fromBase64(string /* , options */) {
var result = $fromBase64(string, arguments.length > 1 ? arguments[1] : undefined, null, 0x1FFFFFFFFFFFFF);
return arrayFromConstructorAndList(Uint8Array, result.bytes);
}
});
/***/ }),
/* 287 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var uncurryThis = __webpack_require__(6);
var anObjectOrUndefined = __webpack_require__(288);
var aString = __webpack_require__(238);
var hasOwn = __webpack_require__(5);
var base64Map = __webpack_require__(289);
var getAlphabetOption = __webpack_require__(290);
var notDetached = __webpack_require__(136);
var base64Alphabet = base64Map.c2i;
var base64UrlAlphabet = base64Map.c2iUrl;
var SyntaxError = globalThis.SyntaxError;
var TypeError = globalThis.TypeError;
var at = uncurryThis(''.charAt);
var skipAsciiWhitespace = function (string, index) {
var length = string.length;
for (;index < length; index++) {
var chr = at(string, index);
if (chr !== ' ' && chr !== '\t' && chr !== '\n' && chr !== '\f' && chr !== '\r') break;
} return index;
};
var decodeBase64Chunk = function (chunk, alphabet, throwOnExtraBits) {
var chunkLength = chunk.length;
if (chunkLength < 4) {
chunk += chunkLength === 2 ? 'AA' : 'A';
}
var triplet = (alphabet[at(chunk, 0)] << 18)
+ (alphabet[at(chunk, 1)] << 12)
+ (alphabet[at(chunk, 2)] << 6)
+ alphabet[at(chunk, 3)];
var chunkBytes = [
(triplet >> 16) & 255,
(triplet >> 8) & 255,
triplet & 255
];
if (chunkLength === 2) {
if (throwOnExtraBits && chunkBytes[1] !== 0) {
throw new SyntaxError('Extra bits');
}
return [chunkBytes[0]];
}
if (chunkLength === 3) {
if (throwOnExtraBits && chunkBytes[2] !== 0) {
throw new SyntaxError('Extra bits');
}
return [chunkBytes[0], chunkBytes[1]];
}
return chunkBytes;
};
var writeBytes = function (bytes, elements, written) {
var elementsLength = elements.length;
for (var index = 0; index < elementsLength; index++) {
bytes[written + index] = elements[index];
}
return written + elementsLength;
};
/* eslint-disable max-statements, max-depth -- TODO */
module.exports = function (string, options, into, maxLength) {
aString(string);
anObjectOrUndefined(options);
var alphabet = getAlphabetOption(options) === 'base64' ? base64Alphabet : base64UrlAlphabet;
var lastChunkHandling = options ? options.lastChunkHandling : undefined;
if (lastChunkHandling === undefined) lastChunkHandling = 'loose';
if (lastChunkHandling !== 'loose' && lastChunkHandling !== 'strict' && lastChunkHandling !== 'stop-before-partial') {
throw new TypeError('Incorrect `lastChunkHandling` option');
}
if (into) notDetached(into.buffer);
var stringLength = string.length;
var bytes = into || [];
var written = 0;
var read = 0;
var chunk = '';
var index = 0;
if (maxLength) while (true) {
index = skipAsciiWhitespace(string, index);
if (index === stringLength) {
if (chunk.length > 0) {
if (lastChunkHandling === 'stop-before-partial') {
break;
}
if (lastChunkHandling === 'loose') {
if (chunk.length === 1) {
throw new SyntaxError('Malformed padding: exactly one additional character');
}
written = writeBytes(bytes, decodeBase64Chunk(chunk, alphabet, false), written);
} else {
throw new SyntaxError('Missing padding');
}
}
read = stringLength;
break;
}
var chr = at(string, index);
++index;
if (chr === '=') {
if (chunk.length < 2) {
throw new SyntaxError('Padding is too early');
}
index = skipAsciiWhitespace(string, index);
if (chunk.length === 2) {
if (index === stringLength) {
if (lastChunkHandling === 'stop-before-partial') {
break;
}
throw new SyntaxError('Malformed padding: only one =');
}
if (at(string, index) === '=') {
++index;
index = skipAsciiWhitespace(string, index);
}
}
if (index < stringLength) {
throw new SyntaxError('Unexpected character after padding');
}
written = writeBytes(bytes, decodeBase64Chunk(chunk, alphabet, lastChunkHandling === 'strict'), written);
read = stringLength;
break;
}
if (!hasOwn(alphabet, chr)) {
throw new SyntaxError('Unexpected character');
}
var remainingBytes = maxLength - written;
if (remainingBytes === 1 && chunk.length === 2 || remainingBytes === 2 && chunk.length === 3) {
// special case: we can fit exactly the number of bytes currently represented by chunk, so we were just checking for `=`
break;
}
chunk += chr;
if (chunk.length === 4) {
written = writeBytes(bytes, decodeBase64Chunk(chunk, alphabet, false), written);
chunk = '';
read = index;
if (written === maxLength) {
break;
}
}
}
return { bytes: bytes, read: read, written: written };
};
/***/ }),
/* 288 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isObject = __webpack_require__(27);
var $String = String;
var $TypeError = TypeError;
module.exports = function (argument) {
if (argument === undefined || isObject(argument)) return argument;
throw new $TypeError($String(argument) + ' is not an object or undefined');
};
/***/ }),
/* 289 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var commonAlphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
var base64Alphabet = commonAlphabet + '+/';
var base64UrlAlphabet = commonAlphabet + '-_';
var inverse = function (characters) {
// TODO: use `Object.create(null)` in `core-js@4`
var result = {};
var index = 0;
for (; index < 64; index++) result[characters.charAt(index)] = index;
return result;
};
module.exports = {
i2c: base64Alphabet,
c2i: inverse(base64Alphabet),
i2cUrl: base64UrlAlphabet,
c2iUrl: inverse(base64UrlAlphabet)
};
/***/ }),
/* 290 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $TypeError = TypeError;
module.exports = function (options) {
var alphabet = options && options.alphabet;
if (alphabet === undefined || alphabet === 'base64' || alphabet === 'base64url') return alphabet || 'base64';
throw new $TypeError('Incorrect `alphabet` option');
};
/***/ }),
/* 291 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var globalThis = __webpack_require__(2);
var aString = __webpack_require__(238);
var $fromHex = __webpack_require__(292);
// `Uint8Array.fromHex` method
// https://github.com/tc39/proposal-arraybuffer-base64
if (globalThis.Uint8Array) $({ target: 'Uint8Array', stat: true }, {
fromHex: function fromHex(string) {
return $fromHex(aString(string)).bytes;
}
});
/***/ }),
/* 292 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var uncurryThis = __webpack_require__(6);
var Uint8Array = globalThis.Uint8Array;
var SyntaxError = globalThis.SyntaxError;
var parseInt = globalThis.parseInt;
var min = Math.min;
var NOT_HEX = /[^\da-f]/i;
var exec = uncurryThis(NOT_HEX.exec);
var stringSlice = uncurryThis(''.slice);
module.exports = function (string, into) {
var stringLength = string.length;
if (stringLength % 2 !== 0) throw new SyntaxError('String should be an even number of characters');
var maxLength = into ? min(into.length, stringLength / 2) : stringLength / 2;
var bytes = into || new Uint8Array(maxLength);
var read = 0;
var written = 0;
while (written < maxLength) {
var hexits = stringSlice(string, read, read += 2);
if (exec(NOT_HEX, hexits)) throw new SyntaxError('String should only contain hex characters');
bytes[written++] = parseInt(hexits, 16);
}
return { bytes: bytes, read: read };
};
/***/ }),
/* 293 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var globalThis = __webpack_require__(2);
var $fromBase64 = __webpack_require__(287);
var anUint8Array = __webpack_require__(294);
var Uint8Array = globalThis.Uint8Array;
var INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS = !Uint8Array || !Uint8Array.prototype.setFromBase64 || !function () {
var target = new Uint8Array([255, 255, 255, 255, 255]);
try {
target.setFromBase64('', null);
return;
} catch (error) { /* empty */ }
// Webkit not throw an error on odd length string
try {
target.setFromBase64('a');
return;
} catch (error) { /* empty */ }
try {
target.setFromBase64('MjYyZg===');
} catch (error) {
return target[0] === 50 && target[1] === 54 && target[2] === 50 && target[3] === 255 && target[4] === 255;
}
}();
// `Uint8Array.prototype.setFromBase64` method
// https://github.com/tc39/proposal-arraybuffer-base64
if (Uint8Array) $({ target: 'Uint8Array', proto: true, forced: INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS }, {
setFromBase64: function setFromBase64(string /* , options */) {
anUint8Array(this);
var result = $fromBase64(string, arguments.length > 1 ? arguments[1] : undefined, this, this.length);
return { read: result.read, written: result.written };
}
});
/***/ }),
/* 294 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var classof = __webpack_require__(82);
var $TypeError = TypeError;
// Perform ? RequireInternalSlot(argument, [[TypedArrayName]])
// If argument.[[TypedArrayName]] is not "Uint8Array", throw a TypeError exception
module.exports = function (argument) {
if (classof(argument) === 'Uint8Array') return argument;
throw new $TypeError('Argument is not an Uint8Array');
};
/***/ }),
/* 295 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var globalThis = __webpack_require__(2);
var aString = __webpack_require__(238);
var anUint8Array = __webpack_require__(294);
var notDetached = __webpack_require__(136);
var $fromHex = __webpack_require__(292);
// Should not throw an error on length-tracking views over ResizableArrayBuffer
// https://issues.chromium.org/issues/454630441
function throwsOnLengthTrackingView() {
try {
// eslint-disable-next-line es/no-resizable-and-growable-arraybuffers -- required for testing
var rab = new ArrayBuffer(16, { maxByteLength: 1024 });
// eslint-disable-next-line es/no-uint8array-prototype-setfromhex, es/no-typed-arrays -- required for testing
new Uint8Array(rab).setFromHex('cafed00d');
} catch (error) {
return true;
}
}
// `Uint8Array.prototype.setFromHex` method
// https://github.com/tc39/proposal-arraybuffer-base64
if (globalThis.Uint8Array) $({ target: 'Uint8Array', proto: true, forced: throwsOnLengthTrackingView() }, {
setFromHex: function setFromHex(string) {
anUint8Array(this);
aString(string);
notDetached(this.buffer);
var read = $fromHex(string, this).read;
return { read: read, written: read / 2 };
}
});
/***/ }),
/* 296 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var globalThis = __webpack_require__(2);
var uncurryThis = __webpack_require__(6);
var anObjectOrUndefined = __webpack_require__(288);
var anUint8Array = __webpack_require__(294);
var notDetached = __webpack_require__(136);
var base64Map = __webpack_require__(289);
var getAlphabetOption = __webpack_require__(290);
var base64Alphabet = base64Map.i2c;
var base64UrlAlphabet = base64Map.i2cUrl;
var charAt = uncurryThis(''.charAt);
var Uint8Array = globalThis.Uint8Array;
var INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS = !Uint8Array || !Uint8Array.prototype.toBase64 || !function () {
try {
var target = new Uint8Array();
target.toBase64(null);
} catch (error) {
return true;
}
}();
// `Uint8Array.prototype.toBase64` method
// https://github.com/tc39/proposal-arraybuffer-base64
if (Uint8Array) $({ target: 'Uint8Array', proto: true, forced: INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS }, {
toBase64: function toBase64(/* options */) {
var array = anUint8Array(this);
var options = arguments.length ? anObjectOrUndefined(arguments[0]) : undefined;
var alphabet = getAlphabetOption(options) === 'base64' ? base64Alphabet : base64UrlAlphabet;
var omitPadding = !!options && !!options.omitPadding;
notDetached(this.buffer);
var result = '';
var i = 0;
var length = array.length;
var triplet;
var at = function (shift) {
return charAt(alphabet, (triplet >> (6 * shift)) & 63);
};
for (; i + 2 < length; i += 3) {
triplet = (array[i] << 16) + (array[i + 1] << 8) + array[i + 2];
result += at(3) + at(2) + at(1) + at(0);
}
if (i + 2 === length) {
triplet = (array[i] << 16) + (array[i + 1] << 8);
result += at(3) + at(2) + at(1) + (omitPadding ? '' : '=');
} else if (i + 1 === length) {
triplet = array[i] << 16;
result += at(3) + at(2) + (omitPadding ? '' : '==');
}
return result;
}
});
/***/ }),
/* 297 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var globalThis = __webpack_require__(2);
var uncurryThis = __webpack_require__(6);
var anUint8Array = __webpack_require__(294);
var notDetached = __webpack_require__(136);
var numberToString = uncurryThis(1.1.toString);
var Uint8Array = globalThis.Uint8Array;
var INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS = !Uint8Array || !Uint8Array.prototype.toHex || !(function () {
try {
var target = new Uint8Array([255, 255, 255, 255, 255, 255, 255, 255]);
return target.toHex() === 'ffffffffffffffff';
} catch (error) {
return false;
}
})();
// `Uint8Array.prototype.toHex` method
// https://github.com/tc39/proposal-arraybuffer-base64
if (Uint8Array) $({ target: 'Uint8Array', proto: true, forced: INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS }, {
toHex: function toHex() {
anUint8Array(this);
notDetached(this.buffer);
var result = '';
for (var i = 0, length = this.length; i < length; i++) {
var hex = numberToString(this[i], 16);
result += hex.length === 1 ? '0' + hex : hex;
}
return result;
}
});
/***/ }),
/* 298 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var aWeakMap = __webpack_require__(299);
var WeakMapHelpers = __webpack_require__(300);
var IS_PURE = __webpack_require__(16);
var get = WeakMapHelpers.get;
var has = WeakMapHelpers.has;
var set = WeakMapHelpers.set;
// `WeakMap.prototype.getOrInsert` method
// https://github.com/tc39/proposal-upsert
$({ target: 'WeakMap', proto: true, real: true, forced: IS_PURE }, {
getOrInsert: function getOrInsert(key, value) {
if (has(aWeakMap(this), key)) return get(this, key);
set(this, key, value);
return value;
}
});
/***/ }),
/* 299 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var has = __webpack_require__(300).has;
// Perform ? RequireInternalSlot(M, [[WeakMapData]])
module.exports = function (it) {
has(it);
return it;
};
/***/ }),
/* 300 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
// eslint-disable-next-line es/no-weak-map -- safe
var WeakMapPrototype = WeakMap.prototype;
module.exports = {
// eslint-disable-next-line es/no-weak-map -- safe
WeakMap: WeakMap,
set: uncurryThis(WeakMapPrototype.set),
get: uncurryThis(WeakMapPrototype.get),
has: uncurryThis(WeakMapPrototype.has),
remove: uncurryThis(WeakMapPrototype['delete'])
};
/***/ }),
/* 301 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var aCallable = __webpack_require__(38);
var aWeakMap = __webpack_require__(299);
var aWeakKey = __webpack_require__(302);
var WeakMapHelpers = __webpack_require__(300);
var IS_PURE = __webpack_require__(16);
var get = WeakMapHelpers.get;
var has = WeakMapHelpers.has;
var set = WeakMapHelpers.set;
var FORCED = IS_PURE || !function () {
try {
// eslint-disable-next-line es/no-weak-map, no-throw-literal -- testing
if (WeakMap.prototype.getOrInsertComputed) new WeakMap().getOrInsertComputed(1, function () { throw 1; });
} catch (error) {
// FF144 Nightly - Beta 3 bug
// https://bugzilla.mozilla.org/show_bug.cgi?id=1988369
return error instanceof TypeError;
}
}();
// `WeakMap.prototype.getOrInsertComputed` method
// https://github.com/tc39/proposal-upsert
$({ target: 'WeakMap', proto: true, real: true, forced: FORCED }, {
getOrInsertComputed: function getOrInsertComputed(key, callbackfn) {
aWeakMap(this);
aWeakKey(key);
aCallable(callbackfn);
if (has(this, key)) return get(this, key);
var value = callbackfn(key);
set(this, key, value);
return value;
}
});
/***/ }),
/* 302 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var WeakMapHelpers = __webpack_require__(300);
var weakmap = new WeakMapHelpers.WeakMap();
var set = WeakMapHelpers.set;
var remove = WeakMapHelpers.remove;
module.exports = function (key) {
set(weakmap, key, 1);
remove(weakmap, key);
return key;
};
/***/ }),
/* 303 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var $filterReject = __webpack_require__(304).filterReject;
var addToUnscopables = __webpack_require__(108);
// `Array.prototype.filterReject` method
// https://github.com/tc39/proposal-array-filtering
$({ target: 'Array', proto: true, forced: true }, {
filterReject: function filterReject(callbackfn /* , thisArg */) {
return $filterReject(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
addToUnscopables('filterReject');
/***/ }),
/* 304 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var bind = __webpack_require__(98);
var IndexedObject = __webpack_require__(45);
var toObject = __webpack_require__(9);
var lengthOfArrayLike = __webpack_require__(67);
var arraySpeciesCreate = __webpack_require__(305);
var createProperty = __webpack_require__(117);
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
var createMethod = function (TYPE) {
var IS_MAP = TYPE === 1;
var IS_FILTER = TYPE === 2;
var IS_SOME = TYPE === 3;
var IS_EVERY = TYPE === 4;
var IS_FIND_INDEX = TYPE === 6;
var IS_FILTER_REJECT = TYPE === 7;
var NO_HOLES = TYPE === 5 || IS_FIND_INDEX;
return function ($this, callbackfn, that) {
var O = toObject($this);
var self = IndexedObject(O);
var length = lengthOfArrayLike(self);
var boundFunction = bind(callbackfn, that);
var index = 0;
var resIndex = 0;
var target = IS_MAP ? arraySpeciesCreate($this, length) : IS_FILTER || IS_FILTER_REJECT ? arraySpeciesCreate($this, 0) : undefined;
var value, result;
for (;length > index; index++) if (NO_HOLES || index in self) {
value = self[index];
result = boundFunction(value, index, O);
if (TYPE) {
if (IS_MAP) createProperty(target, index, result); // map
else if (result) switch (TYPE) {
case 3: return true; // some
case 5: return value; // find
case 6: return index; // findIndex
case 2: createProperty(target, resIndex++, value); // filter
} else switch (TYPE) {
case 4: return false; // every
case 7: createProperty(target, resIndex++, value); // filterReject
}
}
}
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
};
};
module.exports = {
// `Array.prototype.forEach` method
// https://tc39.es/ecma262/#sec-array.prototype.foreach
forEach: createMethod(0),
// `Array.prototype.map` method
// https://tc39.es/ecma262/#sec-array.prototype.map
map: createMethod(1),
// `Array.prototype.filter` method
// https://tc39.es/ecma262/#sec-array.prototype.filter
filter: createMethod(2),
// `Array.prototype.some` method
// https://tc39.es/ecma262/#sec-array.prototype.some
some: createMethod(3),
// `Array.prototype.every` method
// https://tc39.es/ecma262/#sec-array.prototype.every
every: createMethod(4),
// `Array.prototype.find` method
// https://tc39.es/ecma262/#sec-array.prototype.find
find: createMethod(5),
// `Array.prototype.findIndex` method
// https://tc39.es/ecma262/#sec-array.prototype.findIndex
findIndex: createMethod(6),
// `Array.prototype.filterReject` method
// https://github.com/tc39/proposal-array-filtering
filterReject: createMethod(7)
};
/***/ }),
/* 305 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var arraySpeciesConstructor = __webpack_require__(306);
// `ArraySpeciesCreate` abstract operation
// https://tc39.es/ecma262/#sec-arrayspeciescreate
module.exports = function (originalArray, length) {
return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
};
/***/ }),
/* 306 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isArray = __webpack_require__(114);
var isConstructor = __webpack_require__(200);
var isObject = __webpack_require__(27);
var wellKnownSymbol = __webpack_require__(13);
var SPECIES = wellKnownSymbol('species');
var $Array = Array;
// a part of `ArraySpeciesCreate` abstract operation
// https://tc39.es/ecma262/#sec-arrayspeciescreate
module.exports = function (originalArray) {
var C;
if (isArray(originalArray)) {
C = originalArray.constructor;
// cross-realm fallback
if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
else if (isObject(C)) {
C = C[SPECIES];
if (C === null) C = undefined;
}
} return C === undefined ? $Array : C;
};
/***/ }),
/* 307 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var $group = __webpack_require__(308);
var addToUnscopables = __webpack_require__(108);
// `Array.prototype.group` method
// https://github.com/tc39/proposal-array-grouping
$({ target: 'Array', proto: true }, {
group: function group(callbackfn /* , thisArg */) {
var thisArg = arguments.length > 1 ? arguments[1] : undefined;
return $group(this, callbackfn, thisArg);
}
});
addToUnscopables('group');
/***/ }),
/* 308 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var bind = __webpack_require__(98);
var uncurryThis = __webpack_require__(6);
var IndexedObject = __webpack_require__(45);
var toObject = __webpack_require__(9);
var toPropertyKey = __webpack_require__(31);
var lengthOfArrayLike = __webpack_require__(67);
var objectCreate = __webpack_require__(93);
var arrayFromConstructorAndList = __webpack_require__(119);
var $Array = Array;
var push = uncurryThis([].push);
module.exports = function ($this, callbackfn, that, specificConstructor) {
var O = toObject($this);
var self = IndexedObject(O);
var boundFunction = bind(callbackfn, that);
var target = objectCreate(null);
var length = lengthOfArrayLike(self);
var index = 0;
var Constructor, key, value;
for (;length > index; index++) {
value = self[index];
key = toPropertyKey(boundFunction(value, index, O));
// in some IE versions, `hasOwnProperty` returns incorrect result on integer keys
// but since it's a `null` prototype object, we can safely use `in`
if (key in target) push(target[key], value);
else target[key] = [value];
}
// TODO: Remove this block from `core-js@4`
if (specificConstructor) {
Constructor = specificConstructor(O);
if (Constructor !== $Array) {
for (key in target) target[key] = arrayFromConstructorAndList(Constructor, target[key]);
}
} return target;
};
/***/ }),
/* 309 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove from `core-js@4`
var $ = __webpack_require__(49);
var $group = __webpack_require__(308);
var arrayMethodIsStrict = __webpack_require__(310);
var addToUnscopables = __webpack_require__(108);
// `Array.prototype.groupBy` method
// https://github.com/tc39/proposal-array-grouping
// https://bugs.webkit.org/show_bug.cgi?id=236541
$({ target: 'Array', proto: true, forced: !arrayMethodIsStrict('groupBy') }, {
groupBy: function groupBy(callbackfn /* , thisArg */) {
var thisArg = arguments.length > 1 ? arguments[1] : undefined;
return $group(this, callbackfn, thisArg);
}
});
addToUnscopables('groupBy');
/***/ }),
/* 310 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(8);
module.exports = function (METHOD_NAME, argument) {
var method = [][METHOD_NAME];
return !!method && fails(function () {
// eslint-disable-next-line no-useless-call -- required for testing
method.call(null, argument || function () { return 1; }, 1);
});
};
/***/ }),
/* 311 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove from `core-js@4`
var $ = __webpack_require__(49);
var arrayMethodIsStrict = __webpack_require__(310);
var addToUnscopables = __webpack_require__(108);
var $groupToMap = __webpack_require__(312);
var IS_PURE = __webpack_require__(16);
// `Array.prototype.groupByToMap` method
// https://github.com/tc39/proposal-array-grouping
// https://bugs.webkit.org/show_bug.cgi?id=236541
$({ target: 'Array', proto: true, name: 'groupToMap', forced: IS_PURE || !arrayMethodIsStrict('groupByToMap') }, {
groupByToMap: $groupToMap
});
addToUnscopables('groupByToMap');
/***/ }),
/* 312 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var bind = __webpack_require__(98);
var uncurryThis = __webpack_require__(6);
var IndexedObject = __webpack_require__(45);
var toObject = __webpack_require__(9);
var lengthOfArrayLike = __webpack_require__(67);
var MapHelpers = __webpack_require__(183);
var Map = MapHelpers.Map;
var mapGet = MapHelpers.get;
var mapHas = MapHelpers.has;
var mapSet = MapHelpers.set;
var push = uncurryThis([].push);
// `Array.prototype.groupToMap` method
// https://github.com/tc39/proposal-array-grouping
module.exports = function groupToMap(callbackfn /* , thisArg */) {
var O = toObject(this);
var self = IndexedObject(O);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
var map = new Map();
var length = lengthOfArrayLike(self);
var index = 0;
var key, value;
for (;length > index; index++) {
value = self[index];
key = boundFunction(value, index, O);
if (mapHas(map, key)) push(mapGet(map, key), value);
else mapSet(map, key, [value]);
} return map;
};
/***/ }),
/* 313 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var addToUnscopables = __webpack_require__(108);
var $groupToMap = __webpack_require__(312);
var IS_PURE = __webpack_require__(16);
// `Array.prototype.groupToMap` method
// https://github.com/tc39/proposal-array-grouping
$({ target: 'Array', proto: true, forced: IS_PURE }, {
groupToMap: $groupToMap
});
addToUnscopables('groupToMap');
/***/ }),
/* 314 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var isArray = __webpack_require__(114);
// eslint-disable-next-line es/no-object-isfrozen -- safe
var isFrozen = Object.isFrozen;
var isFrozenStringArray = function (array, allowUndefined) {
if (!isFrozen || !isArray(array) || !isFrozen(array)) return false;
var index = 0;
var length = array.length;
var element;
while (index < length) {
element = array[index++];
if (!(typeof element == 'string' || (allowUndefined && element === undefined))) {
return false;
}
} return length !== 0;
};
// `Array.isTemplateObject` method
// https://github.com/tc39/proposal-array-is-template-object
$({ target: 'Array', stat: true, sham: true, forced: true }, {
isTemplateObject: function isTemplateObject(value) {
if (!isFrozenStringArray(value, true)) return false;
var raw = value.raw;
return raw.length === value.length && isFrozenStringArray(raw, false);
}
});
/***/ }),
/* 315 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove from `core-js@4`
var DESCRIPTORS = __webpack_require__(24);
var addToUnscopables = __webpack_require__(108);
var toObject = __webpack_require__(9);
var lengthOfArrayLike = __webpack_require__(67);
var defineBuiltInAccessor = __webpack_require__(130);
// `Array.prototype.lastIndex` getter
// https://github.com/tc39/proposal-array-last
if (DESCRIPTORS) {
defineBuiltInAccessor(Array.prototype, 'lastIndex', {
configurable: true,
get: function lastIndex() {
var O = toObject(this);
var len = lengthOfArrayLike(O);
return len === 0 ? 0 : len - 1;
}
});
addToUnscopables('lastIndex');
}
/***/ }),
/* 316 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove from `core-js@4`
var DESCRIPTORS = __webpack_require__(24);
var addToUnscopables = __webpack_require__(108);
var toObject = __webpack_require__(9);
var lengthOfArrayLike = __webpack_require__(67);
var defineBuiltInAccessor = __webpack_require__(130);
// `Array.prototype.lastIndex` accessor
// https://github.com/tc39/proposal-array-last
if (DESCRIPTORS) {
defineBuiltInAccessor(Array.prototype, 'lastItem', {
configurable: true,
get: function lastItem() {
var O = toObject(this);
var len = lengthOfArrayLike(O);
return len === 0 ? undefined : O[len - 1];
},
set: function lastItem(value) {
var O = toObject(this);
var len = lengthOfArrayLike(O);
return O[len === 0 ? 0 : len - 1] = value;
}
});
addToUnscopables('lastItem');
}
/***/ }),
/* 317 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var addToUnscopables = __webpack_require__(108);
var uniqueBy = __webpack_require__(318);
// `Array.prototype.uniqueBy` method
// https://github.com/tc39/proposal-array-unique
$({ target: 'Array', proto: true, forced: true }, {
uniqueBy: uniqueBy
});
addToUnscopables('uniqueBy');
/***/ }),
/* 318 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var aCallable = __webpack_require__(38);
var isNullOrUndefined = __webpack_require__(11);
var lengthOfArrayLike = __webpack_require__(67);
var toObject = __webpack_require__(9);
var createProperty = __webpack_require__(117);
var MapHelpers = __webpack_require__(183);
var iterate = __webpack_require__(319);
var Map = MapHelpers.Map;
var mapHas = MapHelpers.has;
var mapSet = MapHelpers.set;
// `Array.prototype.uniqueBy` method
// https://github.com/tc39/proposal-array-unique
module.exports = function uniqueBy(resolver) {
var that = toObject(this);
var length = lengthOfArrayLike(that);
var result = [];
var map = new Map();
var resolverFunction = !isNullOrUndefined(resolver) ? aCallable(resolver) : function (value) {
return value;
};
var index, item, key;
for (index = 0; index < length; index++) {
item = that[index];
key = resolverFunction(item);
if (!mapHas(map, key)) mapSet(map, key, item);
}
index = 0;
iterate(map, function (value) {
createProperty(result, index++, value);
});
return result;
};
/***/ }),
/* 319 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
var iterateSimple = __webpack_require__(251);
var MapHelpers = __webpack_require__(183);
var Map = MapHelpers.Map;
var MapPrototype = MapHelpers.proto;
var forEach = uncurryThis(MapPrototype.forEach);
var entries = uncurryThis(MapPrototype.entries);
var next = entries(new Map()).next;
module.exports = function (map, fn, interruptible) {
return interruptible ? iterateSimple({ iterator: entries(map), next: next }, function (entry) {
return fn(entry[1], entry[0]);
}) : forEach(map, fn);
};
/***/ }),
/* 320 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var anInstance = __webpack_require__(144);
var getPrototypeOf = __webpack_require__(91);
var createNonEnumerableProperty = __webpack_require__(50);
var hasOwn = __webpack_require__(5);
var wellKnownSymbol = __webpack_require__(13);
var AsyncIteratorPrototype = __webpack_require__(231);
var IS_PURE = __webpack_require__(16);
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var $TypeError = TypeError;
var AsyncIteratorConstructor = function AsyncIterator() {
anInstance(this, AsyncIteratorPrototype);
if (getPrototypeOf(this) === AsyncIteratorPrototype) throw new $TypeError('Abstract class AsyncIterator not directly constructable');
};
AsyncIteratorConstructor.prototype = AsyncIteratorPrototype;
if (!hasOwn(AsyncIteratorPrototype, TO_STRING_TAG)) {
createNonEnumerableProperty(AsyncIteratorPrototype, TO_STRING_TAG, 'AsyncIterator');
}
if (IS_PURE || !hasOwn(AsyncIteratorPrototype, 'constructor') || AsyncIteratorPrototype.constructor === Object) {
createNonEnumerableProperty(AsyncIteratorPrototype, 'constructor', AsyncIteratorConstructor);
}
// `AsyncIterator` constructor
// https://github.com/tc39/proposal-async-iterator-helpers
$({ global: true, constructor: true, forced: IS_PURE }, {
AsyncIterator: AsyncIteratorConstructor
});
/***/ }),
/* 321 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove from `core-js@4`
var $ = __webpack_require__(49);
var indexed = __webpack_require__(322);
// `AsyncIterator.prototype.asIndexedPairs` method
// https://github.com/tc39/proposal-iterator-helpers
$({ target: 'AsyncIterator', name: 'indexed', proto: true, real: true, forced: true }, {
asIndexedPairs: indexed
});
/***/ }),
/* 322 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(33);
var map = __webpack_require__(323);
var callback = function (value, counter) {
return [counter, value];
};
// `AsyncIterator.prototype.indexed` method
// https://github.com/tc39/proposal-iterator-helpers
module.exports = function indexed() {
return call(map, this, callback);
};
/***/ }),
/* 323 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(33);
var aCallable = __webpack_require__(38);
var anObject = __webpack_require__(30);
var isObject = __webpack_require__(27);
var getIteratorDirect = __webpack_require__(155);
var createAsyncIteratorProxy = __webpack_require__(324);
var createIterResultObject = __webpack_require__(151);
var closeAsyncIteration = __webpack_require__(233);
var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise) {
var state = this;
var iterator = state.iterator;
var mapper = state.mapper;
return new Promise(function (resolve, reject) {
var doneAndReject = function (error) {
state.done = true;
reject(error);
};
var ifAbruptCloseAsyncIterator = function (error) {
closeAsyncIteration(iterator, doneAndReject, error, doneAndReject);
};
Promise.resolve(anObject(call(state.next, iterator))).then(function (step) {
try {
if (anObject(step).done) {
state.done = true;
resolve(createIterResultObject(undefined, true));
} else {
var value = step.value;
try {
var result = mapper(value, state.counter++);
var handler = function (mapped) {
resolve(createIterResultObject(mapped, false));
};
if (isObject(result)) Promise.resolve(result).then(handler, ifAbruptCloseAsyncIterator);
else handler(result);
} catch (error2) { ifAbruptCloseAsyncIterator(error2); }
}
} catch (error) { doneAndReject(error); }
}, doneAndReject);
});
});
// `AsyncIterator.prototype.map` method
// https://github.com/tc39/proposal-async-iterator-helpers
module.exports = function map(mapper) {
anObject(this);
aCallable(mapper);
return new AsyncIteratorProxy(getIteratorDirect(this), {
mapper: mapper
});
};
/***/ }),
/* 324 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(33);
var perform = __webpack_require__(210);
var anObject = __webpack_require__(30);
var create = __webpack_require__(93);
var createNonEnumerableProperty = __webpack_require__(50);
var defineBuiltIns = __webpack_require__(145);
var wellKnownSymbol = __webpack_require__(13);
var InternalStateModule = __webpack_require__(55);
var getBuiltIn = __webpack_require__(35);
var getMethod = __webpack_require__(37);
var AsyncIteratorPrototype = __webpack_require__(231);
var createIterResultObject = __webpack_require__(151);
var iteratorClose = __webpack_require__(104);
var Promise = getBuiltIn('Promise');
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var ASYNC_ITERATOR_HELPER = 'AsyncIteratorHelper';
var WRAP_FOR_VALID_ASYNC_ITERATOR = 'WrapForValidAsyncIterator';
var setInternalState = InternalStateModule.set;
var createAsyncIteratorProxyPrototype = function (IS_ITERATOR) {
var IS_GENERATOR = !IS_ITERATOR;
var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ASYNC_ITERATOR : ASYNC_ITERATOR_HELPER);
var getStateOrEarlyExit = function (that) {
var stateCompletion = perform(function () {
return getInternalState(that);
});
var stateError = stateCompletion.error;
var state = stateCompletion.value;
if (stateError || (IS_GENERATOR && state.done)) {
return { exit: true, value: stateError ? Promise.reject(state) : Promise.resolve(createIterResultObject(undefined, true)) };
} return { exit: false, value: state };
};
return defineBuiltIns(create(AsyncIteratorPrototype), {
next: function next() {
var stateCompletion = getStateOrEarlyExit(this);
var state = stateCompletion.value;
if (stateCompletion.exit) return state;
var handlerCompletion = perform(function () {
return anObject(state.nextHandler(Promise));
});
var handlerError = handlerCompletion.error;
var value = handlerCompletion.value;
if (handlerError) state.done = true;
return handlerError ? Promise.reject(value) : Promise.resolve(value);
},
'return': function () {
var stateCompletion = getStateOrEarlyExit(this);
var state = stateCompletion.value;
if (stateCompletion.exit) return state;
state.done = true;
var iterator = state.iterator;
var returnMethod, result;
var completion = perform(function () {
if (state.inner) try {
iteratorClose(state.inner.iterator, 'normal');
} catch (error) {
return iteratorClose(iterator, 'throw', error);
}
return getMethod(iterator, 'return');
});
returnMethod = result = completion.value;
if (completion.error) return Promise.reject(result);
if (returnMethod === undefined) return Promise.resolve(createIterResultObject(undefined, true));
completion = perform(function () {
return call(returnMethod, iterator);
});
result = completion.value;
if (completion.error) return Promise.reject(result);
return IS_ITERATOR ? Promise.resolve(result) : Promise.resolve(result).then(function (resolved) {
anObject(resolved);
return createIterResultObject(undefined, true);
});
}
});
};
var WrapForValidAsyncIteratorPrototype = createAsyncIteratorProxyPrototype(true);
var AsyncIteratorHelperPrototype = createAsyncIteratorProxyPrototype(false);
createNonEnumerableProperty(AsyncIteratorHelperPrototype, TO_STRING_TAG, 'Async Iterator Helper');
module.exports = function (nextHandler, IS_ITERATOR) {
var AsyncIteratorProxy = function AsyncIterator(record, state) {
if (state) {
state.iterator = record.iterator;
state.next = record.next;
} else state = record;
state.type = IS_ITERATOR ? WRAP_FOR_VALID_ASYNC_ITERATOR : ASYNC_ITERATOR_HELPER;
state.nextHandler = nextHandler;
state.counter = 0;
state.done = false;
setInternalState(this, state);
};
AsyncIteratorProxy.prototype = IS_ITERATOR ? WrapForValidAsyncIteratorPrototype : AsyncIteratorHelperPrototype;
return AsyncIteratorProxy;
};
/***/ }),
/* 325 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var anObject = __webpack_require__(30);
var getIteratorDirect = __webpack_require__(155);
var notANaN = __webpack_require__(156);
var toPositiveInteger = __webpack_require__(157);
var createAsyncIteratorProxy = __webpack_require__(324);
var createIterResultObject = __webpack_require__(151);
var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise) {
var state = this;
return new Promise(function (resolve, reject) {
var doneAndReject = function (error) {
state.done = true;
reject(error);
};
var loop = function () {
try {
Promise.resolve(anObject(call(state.next, state.iterator))).then(function (step) {
try {
if (anObject(step).done) {
state.done = true;
resolve(createIterResultObject(undefined, true));
} else if (state.remaining) {
state.remaining--;
loop();
} else resolve(createIterResultObject(step.value, false));
} catch (err) { doneAndReject(err); }
}, doneAndReject);
} catch (error) { doneAndReject(error); }
};
loop();
});
});
// `AsyncIterator.prototype.drop` method
// https://github.com/tc39/proposal-async-iterator-helpers
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, {
drop: function drop(limit) {
anObject(this);
var remaining = toPositiveInteger(notANaN(+limit));
return new AsyncIteratorProxy(getIteratorDirect(this), {
remaining: remaining
});
}
});
/***/ }),
/* 326 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var $every = __webpack_require__(232).every;
// `AsyncIterator.prototype.every` method
// https://github.com/tc39/proposal-async-iterator-helpers
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, {
every: function every(predicate) {
return $every(this, predicate);
}
});
/***/ }),
/* 327 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var aCallable = __webpack_require__(38);
var anObject = __webpack_require__(30);
var isObject = __webpack_require__(27);
var getIteratorDirect = __webpack_require__(155);
var createAsyncIteratorProxy = __webpack_require__(324);
var createIterResultObject = __webpack_require__(151);
var closeAsyncIteration = __webpack_require__(233);
var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise) {
var state = this;
var iterator = state.iterator;
var predicate = state.predicate;
return new Promise(function (resolve, reject) {
var doneAndReject = function (error) {
state.done = true;
reject(error);
};
var ifAbruptCloseAsyncIterator = function (error) {
closeAsyncIteration(iterator, doneAndReject, error, doneAndReject);
};
var loop = function () {
try {
Promise.resolve(anObject(call(state.next, iterator))).then(function (step) {
try {
if (anObject(step).done) {
state.done = true;
resolve(createIterResultObject(undefined, true));
} else {
var value = step.value;
try {
var result = predicate(value, state.counter++);
var handler = function (selected) {
selected ? resolve(createIterResultObject(value, false)) : loop();
};
if (isObject(result)) Promise.resolve(result).then(handler, ifAbruptCloseAsyncIterator);
else handler(result);
} catch (error3) { ifAbruptCloseAsyncIterator(error3); }
}
} catch (error2) { doneAndReject(error2); }
}, doneAndReject);
} catch (error) { doneAndReject(error); }
};
loop();
});
});
// `AsyncIterator.prototype.filter` method
// https://github.com/tc39/proposal-async-iterator-helpers
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, {
filter: function filter(predicate) {
anObject(this);
aCallable(predicate);
return new AsyncIteratorProxy(getIteratorDirect(this), {
predicate: predicate
});
}
});
/***/ }),
/* 328 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var $find = __webpack_require__(232).find;
// `AsyncIterator.prototype.find` method
// https://github.com/tc39/proposal-async-iterator-helpers
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, {
find: function find(predicate) {
return $find(this, predicate);
}
});
/***/ }),
/* 329 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var aCallable = __webpack_require__(38);
var anObject = __webpack_require__(30);
var isObject = __webpack_require__(27);
var getIteratorDirect = __webpack_require__(155);
var createAsyncIteratorProxy = __webpack_require__(324);
var createIterResultObject = __webpack_require__(151);
var getAsyncIteratorFlattenable = __webpack_require__(330);
var closeAsyncIteration = __webpack_require__(233);
var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise) {
var state = this;
var iterator = state.iterator;
var mapper = state.mapper;
return new Promise(function (resolve, reject) {
var doneAndReject = function (error) {
state.done = true;
reject(error);
};
var ifAbruptCloseAsyncIterator = function (error) {
closeAsyncIteration(iterator, doneAndReject, error, doneAndReject);
};
var outerLoop = function () {
try {
Promise.resolve(anObject(call(state.next, iterator))).then(function (step) {
try {
if (anObject(step).done) {
state.done = true;
resolve(createIterResultObject(undefined, true));
} else {
var value = step.value;
try {
var result = mapper(value, state.counter++);
var handler = function (mapped) {
try {
state.inner = getAsyncIteratorFlattenable(mapped);
innerLoop();
} catch (error4) { ifAbruptCloseAsyncIterator(error4); }
};
if (isObject(result)) Promise.resolve(result).then(handler, ifAbruptCloseAsyncIterator);
else handler(result);
} catch (error3) { ifAbruptCloseAsyncIterator(error3); }
}
} catch (error2) { doneAndReject(error2); }
}, doneAndReject);
} catch (error) { doneAndReject(error); }
};
var innerLoop = function () {
var inner = state.inner;
if (inner) {
try {
Promise.resolve(anObject(call(inner.next, inner.iterator))).then(function (result) {
try {
if (anObject(result).done) {
state.inner = null;
outerLoop();
} else resolve(createIterResultObject(result.value, false));
} catch (error1) { ifAbruptCloseAsyncIterator(error1); }
}, ifAbruptCloseAsyncIterator);
} catch (error) { ifAbruptCloseAsyncIterator(error); }
} else outerLoop();
};
innerLoop();
});
});
// `AsyncIterator.prototype.flatMap` method
// https://github.com/tc39/proposal-async-iterator-helpers
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, {
flatMap: function flatMap(mapper) {
anObject(this);
aCallable(mapper);
return new AsyncIteratorProxy(getIteratorDirect(this), {
mapper: mapper,
inner: null
});
}
});
/***/ }),
/* 330 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(33);
var isCallable = __webpack_require__(28);
var anObject = __webpack_require__(30);
var getIteratorDirect = __webpack_require__(155);
var getIteratorMethod = __webpack_require__(103);
var getMethod = __webpack_require__(37);
var wellKnownSymbol = __webpack_require__(13);
var AsyncFromSyncIterator = __webpack_require__(230);
var ASYNC_ITERATOR = wellKnownSymbol('asyncIterator');
module.exports = function (obj) {
var object = anObject(obj);
var alreadyAsync = true;
var method = getMethod(object, ASYNC_ITERATOR);
var iterator;
if (!isCallable(method)) {
method = getIteratorMethod(object);
alreadyAsync = false;
}
if (method !== undefined) {
iterator = call(method, object);
} else {
iterator = object;
alreadyAsync = true;
}
anObject(iterator);
return getIteratorDirect(alreadyAsync ? iterator : new AsyncFromSyncIterator(getIteratorDirect(iterator)));
};
/***/ }),
/* 331 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var $forEach = __webpack_require__(232).forEach;
// `AsyncIterator.prototype.forEach` method
// https://github.com/tc39/proposal-async-iterator-helpers
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, {
forEach: function forEach(fn) {
return $forEach(this, fn);
}
});
/***/ }),
/* 332 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var toObject = __webpack_require__(9);
var isPrototypeOf = __webpack_require__(36);
var getAsyncIteratorFlattenable = __webpack_require__(330);
var AsyncIteratorPrototype = __webpack_require__(231);
var WrapAsyncIterator = __webpack_require__(333);
// `AsyncIterator.from` method
// https://github.com/tc39/proposal-async-iterator-helpers
$({ target: 'AsyncIterator', stat: true, forced: true }, {
from: function from(O) {
var iteratorRecord = getAsyncIteratorFlattenable(typeof O == 'string' ? toObject(O) : O);
return isPrototypeOf(AsyncIteratorPrototype, iteratorRecord.iterator)
? iteratorRecord.iterator
: new WrapAsyncIterator(iteratorRecord);
}
});
/***/ }),
/* 333 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(33);
var createAsyncIteratorProxy = __webpack_require__(324);
module.exports = createAsyncIteratorProxy(function () {
return call(this.next, this.iterator);
}, true);
/***/ }),
/* 334 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove from `core-js@4`
var $ = __webpack_require__(49);
var indexed = __webpack_require__(322);
// `AsyncIterator.prototype.indexed` method
// https://github.com/tc39/proposal-iterator-helpers
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, {
indexed: indexed
});
/***/ }),
/* 335 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var map = __webpack_require__(323);
// `AsyncIterator.prototype.map` method
// https://github.com/tc39/proposal-async-iterator-helpers
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, {
map: map
});
/***/ }),
/* 336 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var aCallable = __webpack_require__(38);
var anObject = __webpack_require__(30);
var isObject = __webpack_require__(27);
var getBuiltIn = __webpack_require__(35);
var getIteratorDirect = __webpack_require__(155);
var closeAsyncIteration = __webpack_require__(233);
var Promise = getBuiltIn('Promise');
var $TypeError = TypeError;
// `AsyncIterator.prototype.reduce` method
// https://github.com/tc39/proposal-async-iterator-helpers
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, {
reduce: function reduce(reducer /* , initialValue */) {
anObject(this);
aCallable(reducer);
var record = getIteratorDirect(this);
var iterator = record.iterator;
var next = record.next;
var noInitial = arguments.length < 2;
var accumulator = noInitial ? undefined : arguments[1];
var counter = 0;
return new Promise(function (resolve, reject) {
var ifAbruptCloseAsyncIterator = function (error) {
closeAsyncIteration(iterator, reject, error, reject);
};
var loop = function () {
try {
Promise.resolve(anObject(call(next, iterator))).then(function (step) {
try {
if (anObject(step).done) {
noInitial ? reject(new $TypeError('Reduce of empty iterator with no initial value')) : resolve(accumulator);
} else {
var value = step.value;
if (noInitial) {
noInitial = false;
accumulator = value;
loop();
} else try {
var result = reducer(accumulator, value, counter);
var handler = function ($result) {
accumulator = $result;
loop();
};
if (isObject(result)) Promise.resolve(result).then(handler, ifAbruptCloseAsyncIterator);
else handler(result);
} catch (error3) { ifAbruptCloseAsyncIterator(error3); }
}
counter++;
} catch (error2) { reject(error2); }
}, reject);
} catch (error) { reject(error); }
};
loop();
});
}
});
/***/ }),
/* 337 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var $some = __webpack_require__(232).some;
// `AsyncIterator.prototype.some` method
// https://github.com/tc39/proposal-async-iterator-helpers
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, {
some: function some(predicate) {
return $some(this, predicate);
}
});
/***/ }),
/* 338 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var anObject = __webpack_require__(30);
var getIteratorDirect = __webpack_require__(155);
var notANaN = __webpack_require__(156);
var toPositiveInteger = __webpack_require__(157);
var createAsyncIteratorProxy = __webpack_require__(324);
var createIterResultObject = __webpack_require__(151);
var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise) {
var state = this;
var iterator = state.iterator;
var returnMethod;
if (!state.remaining--) {
var resultDone = createIterResultObject(undefined, true);
state.done = true;
returnMethod = iterator['return'];
if (returnMethod !== undefined) {
return Promise.resolve(call(returnMethod, iterator, undefined)).then(function () {
return resultDone;
});
}
return resultDone;
} return Promise.resolve(call(state.next, iterator)).then(function (step) {
if (anObject(step).done) {
state.done = true;
return createIterResultObject(undefined, true);
} return createIterResultObject(step.value, false);
}).then(null, function (error) {
state.done = true;
throw error;
});
});
// `AsyncIterator.prototype.take` method
// https://github.com/tc39/proposal-async-iterator-helpers
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, {
take: function take(limit) {
anObject(this);
var remaining = toPositiveInteger(notANaN(+limit));
return new AsyncIteratorProxy(getIteratorDirect(this), {
remaining: remaining
});
}
});
/***/ }),
/* 339 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var $toArray = __webpack_require__(232).toArray;
// `AsyncIterator.prototype.toArray` method
// https://github.com/tc39/proposal-async-iterator-helpers
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, {
toArray: function toArray() {
return $toArray(this, undefined, []);
}
});
/***/ }),
/* 340 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* eslint-disable es/no-bigint -- safe */
var $ = __webpack_require__(49);
var NumericRangeIterator = __webpack_require__(341);
// `BigInt.range` method
// https://github.com/tc39/proposal-Number.range
// TODO: Remove from `core-js@4`
if (typeof BigInt == 'function') {
$({ target: 'BigInt', stat: true, forced: true }, {
range: function range(start, end, option) {
return new NumericRangeIterator(start, end, option, 'bigint', BigInt(0), BigInt(1));
}
});
}
/***/ }),
/* 341 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var InternalStateModule = __webpack_require__(55);
var createIteratorConstructor = __webpack_require__(342);
var createIterResultObject = __webpack_require__(151);
var isNullOrUndefined = __webpack_require__(11);
var isObject = __webpack_require__(27);
var defineBuiltInAccessor = __webpack_require__(130);
var DESCRIPTORS = __webpack_require__(24);
var INCORRECT_RANGE = 'Incorrect Iterator.range arguments';
var NUMERIC_RANGE_ITERATOR = 'NumericRangeIterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(NUMERIC_RANGE_ITERATOR);
var $RangeError = RangeError;
var $TypeError = TypeError;
var $RangeIterator = createIteratorConstructor(function NumericRangeIterator(start, end, option, type, zero, one) {
// TODO: Drop the first `typeof` check after removing legacy methods in `core-js@4`
if (typeof start != type || (end !== Infinity && end !== -Infinity && typeof end != type)) {
throw new $TypeError(INCORRECT_RANGE);
}
if (start === Infinity || start === -Infinity) {
throw new $RangeError(INCORRECT_RANGE);
}
var ifIncrease = end > start;
var inclusiveEnd = false;
var step;
if (option === undefined) {
step = undefined;
} else if (isObject(option)) {
step = option.step;
inclusiveEnd = !!option.inclusive;
} else if (typeof option == type) {
step = option;
} else {
throw new $TypeError(INCORRECT_RANGE);
}
if (isNullOrUndefined(step)) {
step = ifIncrease ? one : -one;
}
if (typeof step != type) {
throw new $TypeError(INCORRECT_RANGE);
}
if (step === Infinity || step === -Infinity || (step === zero && start !== end)) {
throw new $RangeError(INCORRECT_RANGE);
}
// eslint-disable-next-line no-self-compare -- NaN check
var hitsEnd = start !== start || end !== end || step !== step || (end > start) !== (step > zero);
setInternalState(this, {
type: NUMERIC_RANGE_ITERATOR,
start: start,
end: end,
step: step,
inclusive: inclusiveEnd,
hitsEnd: hitsEnd,
currentCount: zero,
zero: zero
});
if (!DESCRIPTORS) {
this.start = start;
this.end = end;
this.step = step;
this.inclusive = inclusiveEnd;
}
}, NUMERIC_RANGE_ITERATOR, function next() {
var state = getInternalState(this);
if (state.hitsEnd) return createIterResultObject(undefined, true);
var start = state.start;
var end = state.end;
var step = state.step;
var currentYieldingValue = start + (step * state.currentCount++);
if (currentYieldingValue === end) state.hitsEnd = true;
var inclusiveEnd = state.inclusive;
var endCondition;
if (end > start) {
endCondition = inclusiveEnd ? currentYieldingValue > end : currentYieldingValue >= end;
} else {
endCondition = inclusiveEnd ? end > currentYieldingValue : end >= currentYieldingValue;
}
if (endCondition) {
state.hitsEnd = true;
return createIterResultObject(undefined, true);
} return createIterResultObject(currentYieldingValue, false);
});
var addGetter = function (key) {
defineBuiltInAccessor($RangeIterator.prototype, key, {
get: function () {
return getInternalState(this)[key];
},
set: function () { /* empty */ },
configurable: true,
enumerable: false
});
};
if (DESCRIPTORS) {
addGetter('start');
addGetter('end');
addGetter('inclusive');
addGetter('step');
}
module.exports = $RangeIterator;
/***/ }),
/* 342 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var IteratorPrototype = __webpack_require__(148).IteratorPrototype;
var create = __webpack_require__(93);
var createPropertyDescriptor = __webpack_require__(43);
var setToStringTag = __webpack_require__(196);
var Iterators = __webpack_require__(101);
var returnThis = function () { return this; };
module.exports = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
var TO_STRING_TAG = NAME + ' Iterator';
IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
Iterators[TO_STRING_TAG] = returnThis;
return IteratorConstructor;
};
/***/ }),
/* 343 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var apply = __webpack_require__(72);
var getCompositeKeyNode = __webpack_require__(344);
var getBuiltIn = __webpack_require__(35);
var create = __webpack_require__(93);
var $Object = Object;
var initializer = function () {
var freeze = getBuiltIn('Object', 'freeze');
return freeze ? freeze(create(null)) : create(null);
};
// https://github.com/tc39/proposal-richer-keys/tree/master/compositeKey
$({ global: true, forced: true }, {
compositeKey: function compositeKey() {
return apply(getCompositeKeyNode, $Object, arguments).get('object', initializer);
}
});
/***/ }),
/* 344 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
__webpack_require__(345);
__webpack_require__(354);
var getBuiltIn = __webpack_require__(35);
var create = __webpack_require__(93);
var isObject = __webpack_require__(27);
var $Object = Object;
var $TypeError = TypeError;
var Map = getBuiltIn('Map');
var WeakMap = getBuiltIn('WeakMap');
var Node = function () {
// keys
this.object = null;
this.symbol = null;
// child nodes
this.primitives = null;
this.objectsByIndex = create(null);
};
Node.prototype.get = function (key, initializer) {
return this[key] || (this[key] = initializer());
};
Node.prototype.next = function (i, it, IS_OBJECT) {
var store = IS_OBJECT
? this.objectsByIndex[i] || (this.objectsByIndex[i] = new WeakMap())
: this.primitives || (this.primitives = new Map());
var entry = store.get(it);
if (!entry) store.set(it, entry = new Node());
return entry;
};
var root = new Node();
module.exports = function () {
var active = root;
var length = arguments.length;
var i, it;
// for prevent leaking, start from objects
for (i = 0; i < length; i++) {
if (isObject(it = arguments[i])) active = active.next(i, it, true);
}
if (this === $Object && active === root) throw new $TypeError('Composite keys must contain a non-primitive component');
for (i = 0; i < length; i++) {
if (!isObject(it = arguments[i])) active = active.next(i, it, false);
} return active;
};
/***/ }),
/* 345 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove this module from `core-js@4` since it's replaced to module below
__webpack_require__(346);
/***/ }),
/* 346 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var collection = __webpack_require__(347);
var collectionStrong = __webpack_require__(352);
// `Map` constructor
// https://tc39.es/ecma262/#sec-map-objects
collection('Map', function (init) {
return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };
}, collectionStrong);
/***/ }),
/* 347 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var globalThis = __webpack_require__(2);
var uncurryThis = __webpack_require__(6);
var isForced = __webpack_require__(71);
var defineBuiltIn = __webpack_require__(51);
var InternalMetadataModule = __webpack_require__(348);
var iterate = __webpack_require__(97);
var anInstance = __webpack_require__(144);
var isCallable = __webpack_require__(28);
var isNullOrUndefined = __webpack_require__(11);
var isObject = __webpack_require__(27);
var fails = __webpack_require__(8);
var checkCorrectnessOfIteration = __webpack_require__(216);
var setToStringTag = __webpack_require__(196);
var inheritIfRequired = __webpack_require__(79);
module.exports = function (CONSTRUCTOR_NAME, wrapper, common) {
var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
var ADDER = IS_MAP ? 'set' : 'add';
var NativeConstructor = globalThis[CONSTRUCTOR_NAME];
var NativePrototype = NativeConstructor && NativeConstructor.prototype;
var Constructor = NativeConstructor;
var exported = {};
var fixMethod = function (KEY) {
var uncurriedNativeMethod = uncurryThis(NativePrototype[KEY]);
defineBuiltIn(NativePrototype, KEY,
KEY === 'add' ? function add(value) {
uncurriedNativeMethod(this, value === 0 ? 0 : value);
return this;
} : KEY === 'delete' ? function (key) {
return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
} : KEY === 'get' ? function get(key) {
return IS_WEAK && !isObject(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key);
} : KEY === 'has' ? function has(key) {
return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
} : function set(key, value) {
uncurriedNativeMethod(this, key === 0 ? 0 : key, value);
return this;
}
);
};
var REPLACE = isForced(
CONSTRUCTOR_NAME,
!isCallable(NativeConstructor) || !(IS_WEAK || NativePrototype.forEach && !fails(function () {
new NativeConstructor().entries().next();
}))
);
if (REPLACE) {
// create collection constructor
Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
InternalMetadataModule.enable();
} else if (isForced(CONSTRUCTOR_NAME, true)) {
var instance = new Constructor();
// early implementations not supports chaining
var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) !== instance;
// V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
// most early implementations doesn't supports iterables, most modern - not close it correctly
// eslint-disable-next-line no-new -- required for testing
var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });
// for early implementations -0 and +0 not the same
var BUGGY_ZERO = !IS_WEAK && fails(function () {
// V8 ~ Chromium 42- fails only with 5+ elements
var $instance = new NativeConstructor();
var index = 5;
while (index--) $instance[ADDER](index, index);
return !$instance.has(-0);
});
if (!ACCEPT_ITERABLES) {
Constructor = wrapper(function (dummy, iterable) {
anInstance(dummy, NativePrototype);
var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
return that;
});
Constructor.prototype = NativePrototype;
NativePrototype.constructor = Constructor;
}
if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
fixMethod('delete');
fixMethod('has');
IS_MAP && fixMethod('get');
}
if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
// weak collections should not contains .clear method
if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;
}
exported[CONSTRUCTOR_NAME] = Constructor;
$({ global: true, constructor: true, forced: Constructor !== NativeConstructor }, exported);
setToStringTag(Constructor, CONSTRUCTOR_NAME);
if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);
return Constructor;
};
/***/ }),
/* 348 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var uncurryThis = __webpack_require__(6);
var hiddenKeys = __webpack_require__(58);
var isObject = __webpack_require__(27);
var hasOwn = __webpack_require__(5);
var defineProperty = __webpack_require__(23).f;
var getOwnPropertyNamesModule = __webpack_require__(61);
var getOwnPropertyNamesExternalModule = __webpack_require__(349);
var isExtensible = __webpack_require__(350);
var uid = __webpack_require__(18);
var FREEZING = __webpack_require__(179);
var REQUIRED = false;
var METADATA = uid('meta');
var id = 0;
var setMetadata = function (it) {
defineProperty(it, METADATA, { value: {
objectID: 'O' + id++, // object ID
weakData: {} // weak collections IDs
} });
};
var fastKey = function (it, create) {
// return a primitive with prefix
if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
if (!hasOwn(it, METADATA)) {
// can't set metadata to uncaught frozen object
if (!isExtensible(it)) return 'F';
// not necessary to add metadata
if (!create) return 'E';
// add missing metadata
setMetadata(it);
// return object ID
} return it[METADATA].objectID;
};
var getWeakData = function (it, create) {
if (!hasOwn(it, METADATA)) {
// can't set metadata to uncaught frozen object
if (!isExtensible(it)) return true;
// not necessary to add metadata
if (!create) return false;
// add missing metadata
setMetadata(it);
// return the store of weak collections IDs
} return it[METADATA].weakData;
};
// add metadata on freeze-family methods calling
var onFreeze = function (it) {
if (FREEZING && REQUIRED && isExtensible(it) && !hasOwn(it, METADATA)) setMetadata(it);
return it;
};
var enable = function () {
meta.enable = function () { /* empty */ };
REQUIRED = true;
var getOwnPropertyNames = getOwnPropertyNamesModule.f;
var splice = uncurryThis([].splice);
var test = {};
// eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation
test[METADATA] = 1;
// prevent exposing of metadata key
if (getOwnPropertyNames(test).length) {
getOwnPropertyNamesModule.f = function (it) {
var result = getOwnPropertyNames(it);
for (var i = 0, length = result.length; i < length; i++) {
if (result[i] === METADATA) {
splice(result, i, 1);
break;
}
} return result;
};
$({ target: 'Object', stat: true, forced: true }, {
getOwnPropertyNames: getOwnPropertyNamesExternalModule.f
});
}
};
var meta = module.exports = {
enable: enable,
fastKey: fastKey,
getWeakData: getWeakData,
onFreeze: onFreeze
};
hiddenKeys[METADATA] = true;
/***/ }),
/* 349 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* eslint-disable es/no-object-getownpropertynames -- safe */
var classof = __webpack_require__(46);
var toIndexedObject = __webpack_require__(44);
var $getOwnPropertyNames = __webpack_require__(61).f;
var arraySlice = __webpack_require__(181);
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
? Object.getOwnPropertyNames(window) : [];
var getWindowNames = function (it) {
try {
return $getOwnPropertyNames(it);
} catch (error) {
return arraySlice(windowNames);
}
};
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
module.exports.f = function getOwnPropertyNames(it) {
return windowNames && classof(it) === 'Window'
? getWindowNames(it)
: $getOwnPropertyNames(toIndexedObject(it));
};
/***/ }),
/* 350 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(8);
var isObject = __webpack_require__(27);
var classof = __webpack_require__(46);
var ARRAY_BUFFER_NON_EXTENSIBLE = __webpack_require__(351);
// eslint-disable-next-line es/no-object-isextensible -- safe
var $isExtensible = Object.isExtensible;
var FAILS_ON_PRIMITIVES = fails(function () { $isExtensible(1); });
// `Object.isExtensible` method
// https://tc39.es/ecma262/#sec-object.isextensible
module.exports = (FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE) ? function isExtensible(it) {
if (!isObject(it)) return false;
if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) === 'ArrayBuffer') return false;
return $isExtensible ? $isExtensible(it) : true;
} : $isExtensible;
/***/ }),
/* 351 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// FF26- bug: ArrayBuffers are non-extensible, but Object.isExtensible does not report it
var fails = __webpack_require__(8);
module.exports = fails(function () {
if (typeof ArrayBuffer == 'function') {
var buffer = new ArrayBuffer(8);
// eslint-disable-next-line es/no-object-isextensible, es/no-object-defineproperty -- safe
if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', { value: 8 });
}
});
/***/ }),
/* 352 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var create = __webpack_require__(93);
var defineBuiltInAccessor = __webpack_require__(130);
var defineBuiltIns = __webpack_require__(145);
var bind = __webpack_require__(98);
var anInstance = __webpack_require__(144);
var isNullOrUndefined = __webpack_require__(11);
var iterate = __webpack_require__(97);
var defineIterator = __webpack_require__(353);
var createIterResultObject = __webpack_require__(151);
var setSpecies = __webpack_require__(197);
var DESCRIPTORS = __webpack_require__(24);
var fastKey = __webpack_require__(348).fastKey;
var InternalStateModule = __webpack_require__(55);
var setInternalState = InternalStateModule.set;
var internalStateGetterFor = InternalStateModule.getterFor;
module.exports = {
getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
var Constructor = wrapper(function (that, iterable) {
anInstance(that, Prototype);
setInternalState(that, {
type: CONSTRUCTOR_NAME,
index: create(null),
first: null,
last: null,
size: 0
});
if (!DESCRIPTORS) that.size = 0;
if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
});
var Prototype = Constructor.prototype;
var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
var define = function (that, key, value) {
var state = getInternalState(that);
var entry = getEntry(that, key);
var previous, index;
// change existing entry
if (entry) {
entry.value = value;
// create new entry
} else {
state.last = entry = {
index: index = fastKey(key, true),
key: key,
value: value,
previous: previous = state.last,
next: null,
removed: false
};
if (!state.first) state.first = entry;
if (previous) previous.next = entry;
if (DESCRIPTORS) state.size++;
else that.size++;
// add to index
if (index !== 'F') state.index[index] = entry;
} return that;
};
var getEntry = function (that, key) {
var state = getInternalState(that);
// fast case
var index = fastKey(key);
var entry;
if (index !== 'F') return state.index[index];
// frozen object case
for (entry = state.first; entry; entry = entry.next) {
if (entry.key === key) return entry;
}
};
defineBuiltIns(Prototype, {
// `{ Map, Set }.prototype.clear()` methods
// https://tc39.es/ecma262/#sec-map.prototype.clear
// https://tc39.es/ecma262/#sec-set.prototype.clear
clear: function clear() {
var that = this;
var state = getInternalState(that);
var entry = state.first;
while (entry) {
entry.removed = true;
if (entry.previous) entry.previous = entry.previous.next = null;
entry = entry.next;
}
state.first = state.last = null;
state.index = create(null);
if (DESCRIPTORS) state.size = 0;
else that.size = 0;
},
// `{ Map, Set }.prototype.delete(key)` methods
// https://tc39.es/ecma262/#sec-map.prototype.delete
// https://tc39.es/ecma262/#sec-set.prototype.delete
'delete': function (key) {
var that = this;
var state = getInternalState(that);
var entry = getEntry(that, key);
if (entry) {
var next = entry.next;
var prev = entry.previous;
delete state.index[entry.index];
entry.removed = true;
if (prev) prev.next = next;
if (next) next.previous = prev;
if (state.first === entry) state.first = next;
if (state.last === entry) state.last = prev;
if (DESCRIPTORS) state.size--;
else that.size--;
} return !!entry;
},
// `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods
// https://tc39.es/ecma262/#sec-map.prototype.foreach
// https://tc39.es/ecma262/#sec-set.prototype.foreach
forEach: function forEach(callbackfn /* , that = undefined */) {
var state = getInternalState(this);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
var entry;
while (entry = entry ? entry.next : state.first) {
boundFunction(entry.value, entry.key, this);
// revert to the last existing entry
while (entry && entry.removed) entry = entry.previous;
}
},
// `{ Map, Set}.prototype.has(key)` methods
// https://tc39.es/ecma262/#sec-map.prototype.has
// https://tc39.es/ecma262/#sec-set.prototype.has
has: function has(key) {
return !!getEntry(this, key);
}
});
defineBuiltIns(Prototype, IS_MAP ? {
// `Map.prototype.get(key)` method
// https://tc39.es/ecma262/#sec-map.prototype.get
get: function get(key) {
var entry = getEntry(this, key);
return entry && entry.value;
},
// `Map.prototype.set(key, value)` method
// https://tc39.es/ecma262/#sec-map.prototype.set
set: function set(key, value) {
return define(this, key === 0 ? 0 : key, value);
}
} : {
// `Set.prototype.add(value)` method
// https://tc39.es/ecma262/#sec-set.prototype.add
add: function add(value) {
return define(this, value = value === 0 ? 0 : value, value);
}
});
if (DESCRIPTORS) defineBuiltInAccessor(Prototype, 'size', {
configurable: true,
get: function () {
return getInternalState(this).size;
}
});
return Constructor;
},
setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) {
var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';
var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);
var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);
// `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods
// https://tc39.es/ecma262/#sec-map.prototype.entries
// https://tc39.es/ecma262/#sec-map.prototype.keys
// https://tc39.es/ecma262/#sec-map.prototype.values
// https://tc39.es/ecma262/#sec-map.prototype-@@iterator
// https://tc39.es/ecma262/#sec-set.prototype.entries
// https://tc39.es/ecma262/#sec-set.prototype.keys
// https://tc39.es/ecma262/#sec-set.prototype.values
// https://tc39.es/ecma262/#sec-set.prototype-@@iterator
defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) {
setInternalState(this, {
type: ITERATOR_NAME,
target: iterated,
state: getInternalCollectionState(iterated),
kind: kind,
last: null
});
}, function () {
var state = getInternalIteratorState(this);
var kind = state.kind;
var entry = state.last;
// revert to the last existing entry
while (entry && entry.removed) entry = entry.previous;
// get next entry
if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {
// or finish the iteration
state.target = null;
return createIterResultObject(undefined, true);
}
// return step by kind
if (kind === 'keys') return createIterResultObject(entry.key, false);
if (kind === 'values') return createIterResultObject(entry.value, false);
return createIterResultObject([entry.key, entry.value], false);
}, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
// `{ Map, Set }.prototype[@@species]` accessors
// https://tc39.es/ecma262/#sec-get-map-@@species
// https://tc39.es/ecma262/#sec-get-set-@@species
setSpecies(CONSTRUCTOR_NAME);
}
};
/***/ }),
/* 353 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var IS_PURE = __webpack_require__(16);
var FunctionName = __webpack_require__(53);
var isCallable = __webpack_require__(28);
var createIteratorConstructor = __webpack_require__(342);
var getPrototypeOf = __webpack_require__(91);
var setPrototypeOf = __webpack_require__(74);
var setToStringTag = __webpack_require__(196);
var createNonEnumerableProperty = __webpack_require__(50);
var defineBuiltIn = __webpack_require__(51);
var wellKnownSymbol = __webpack_require__(13);
var Iterators = __webpack_require__(101);
var IteratorsCore = __webpack_require__(148);
var PROPER_FUNCTION_NAME = FunctionName.PROPER;
var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
var IteratorPrototype = IteratorsCore.IteratorPrototype;
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
var ITERATOR = wellKnownSymbol('iterator');
var KEYS = 'keys';
var VALUES = 'values';
var ENTRIES = 'entries';
var returnThis = function () { return this; };
module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
createIteratorConstructor(IteratorConstructor, NAME, next);
var getIterationMethod = function (KIND) {
if (KIND === DEFAULT && defaultIterator) return defaultIterator;
if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];
switch (KIND) {
case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
}
return function () { return new IteratorConstructor(this); };
};
var TO_STRING_TAG = NAME + ' Iterator';
var INCORRECT_VALUES_NAME = false;
var IterablePrototype = Iterable.prototype;
var nativeIterator = IterablePrototype[ITERATOR]
|| IterablePrototype['@@iterator']
|| DEFAULT && IterablePrototype[DEFAULT];
var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
var CurrentIteratorPrototype, methods, KEY;
// fix native
if (anyNativeIterator) {
CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
if (setPrototypeOf) {
setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
} else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {
defineBuiltIn(CurrentIteratorPrototype, ITERATOR, returnThis);
}
}
// Set @@toStringTag to native iterators
setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
}
}
// fix Array.prototype.{ values, @@iterator }.name in V8 / FF
if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {
createNonEnumerableProperty(IterablePrototype, 'name', VALUES);
} else {
INCORRECT_VALUES_NAME = true;
defaultIterator = function values() { return call(nativeIterator, this); };
}
}
// export additional methods
if (DEFAULT) {
methods = {
values: getIterationMethod(VALUES),
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
entries: getIterationMethod(ENTRIES)
};
if (FORCED) for (KEY in methods) {
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
}
} else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
}
// define iterator
if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
defineBuiltIn(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT });
}
Iterators[NAME] = defaultIterator;
return methods;
};
/***/ }),
/* 354 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove this module from `core-js@4` since it's replaced to module below
__webpack_require__(355);
/***/ }),
/* 355 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var FREEZING = __webpack_require__(179);
var globalThis = __webpack_require__(2);
var uncurryThis = __webpack_require__(6);
var defineBuiltIns = __webpack_require__(145);
var InternalMetadataModule = __webpack_require__(348);
var collection = __webpack_require__(347);
var collectionWeak = __webpack_require__(356);
var isObject = __webpack_require__(27);
var enforceInternalState = __webpack_require__(55).enforce;
var fails = __webpack_require__(8);
var NATIVE_WEAK_MAP = __webpack_require__(56);
var $Object = Object;
// eslint-disable-next-line es/no-array-isarray -- safe
var isArray = Array.isArray;
// eslint-disable-next-line es/no-object-isextensible -- safe
var isExtensible = $Object.isExtensible;
// eslint-disable-next-line es/no-object-isfrozen -- safe
var isFrozen = $Object.isFrozen;
// eslint-disable-next-line es/no-object-issealed -- safe
var isSealed = $Object.isSealed;
// eslint-disable-next-line es/no-object-freeze -- safe
var freeze = $Object.freeze;
// eslint-disable-next-line es/no-object-seal -- safe
var seal = $Object.seal;
var IS_IE11 = !globalThis.ActiveXObject && 'ActiveXObject' in globalThis;
var InternalWeakMap;
var wrapper = function (init) {
return function WeakMap() {
return init(this, arguments.length ? arguments[0] : undefined);
};
};
// `WeakMap` constructor
// https://tc39.es/ecma262/#sec-weakmap-constructor
var $WeakMap = collection('WeakMap', wrapper, collectionWeak);
var WeakMapPrototype = $WeakMap.prototype;
var nativeSet = uncurryThis(WeakMapPrototype.set);
// Chakra Edge bug: adding frozen arrays to WeakMap unfreeze them
var hasMSEdgeFreezingBug = function () {
return FREEZING && fails(function () {
var frozenArray = freeze([]);
nativeSet(new $WeakMap(), frozenArray, 1);
return !isFrozen(frozenArray);
});
};
// IE11 WeakMap frozen keys fix
// We can't use feature detection because it crash some old IE builds
// https://github.com/zloirock/core-js/issues/485
if (NATIVE_WEAK_MAP) if (IS_IE11) {
InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true);
InternalMetadataModule.enable();
var nativeDelete = uncurryThis(WeakMapPrototype['delete']);
var nativeHas = uncurryThis(WeakMapPrototype.has);
var nativeGet = uncurryThis(WeakMapPrototype.get);
defineBuiltIns(WeakMapPrototype, {
'delete': function (key) {
if (isObject(key) && !isExtensible(key)) {
var state = enforceInternalState(this);
if (!state.frozen) state.frozen = new InternalWeakMap();
return nativeDelete(this, key) || state.frozen['delete'](key);
} return nativeDelete(this, key);
},
has: function has(key) {
if (isObject(key) && !isExtensible(key)) {
var state = enforceInternalState(this);
if (!state.frozen) state.frozen = new InternalWeakMap();
return nativeHas(this, key) || state.frozen.has(key);
} return nativeHas(this, key);
},
get: function get(key) {
if (isObject(key) && !isExtensible(key)) {
var state = enforceInternalState(this);
if (!state.frozen) state.frozen = new InternalWeakMap();
return nativeHas(this, key) ? nativeGet(this, key) : state.frozen.get(key);
} return nativeGet(this, key);
},
set: function set(key, value) {
if (isObject(key) && !isExtensible(key)) {
var state = enforceInternalState(this);
if (!state.frozen) state.frozen = new InternalWeakMap();
nativeHas(this, key) ? nativeSet(this, key, value) : state.frozen.set(key, value);
} else nativeSet(this, key, value);
return this;
}
});
// Chakra Edge frozen keys fix
} else if (hasMSEdgeFreezingBug()) {
defineBuiltIns(WeakMapPrototype, {
set: function set(key, value) {
var arrayIntegrityLevel;
if (isArray(key)) {
if (isFrozen(key)) arrayIntegrityLevel = freeze;
else if (isSealed(key)) arrayIntegrityLevel = seal;
}
nativeSet(this, key, value);
if (arrayIntegrityLevel) arrayIntegrityLevel(key);
return this;
}
});
}
/***/ }),
/* 356 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
var defineBuiltIns = __webpack_require__(145);
var getWeakData = __webpack_require__(348).getWeakData;
var anInstance = __webpack_require__(144);
var anObject = __webpack_require__(30);
var isNullOrUndefined = __webpack_require__(11);
var isObject = __webpack_require__(27);
var iterate = __webpack_require__(97);
var ArrayIterationModule = __webpack_require__(304);
var hasOwn = __webpack_require__(5);
var InternalStateModule = __webpack_require__(55);
var setInternalState = InternalStateModule.set;
var internalStateGetterFor = InternalStateModule.getterFor;
var find = ArrayIterationModule.find;
var findIndex = ArrayIterationModule.findIndex;
var splice = uncurryThis([].splice);
var id = 0;
// fallback for uncaught frozen keys
var uncaughtFrozenStore = function (state) {
return state.frozen || (state.frozen = new UncaughtFrozenStore());
};
var UncaughtFrozenStore = function () {
this.entries = [];
};
var findUncaughtFrozen = function (store, key) {
return find(store.entries, function (it) {
return it[0] === key;
});
};
UncaughtFrozenStore.prototype = {
get: function (key) {
var entry = findUncaughtFrozen(this, key);
if (entry) return entry[1];
},
has: function (key) {
return !!findUncaughtFrozen(this, key);
},
set: function (key, value) {
var entry = findUncaughtFrozen(this, key);
if (entry) entry[1] = value;
else this.entries.push([key, value]);
},
'delete': function (key) {
var index = findIndex(this.entries, function (it) {
return it[0] === key;
});
if (~index) splice(this.entries, index, 1);
return !!~index;
}
};
module.exports = {
getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
var Constructor = wrapper(function (that, iterable) {
anInstance(that, Prototype);
setInternalState(that, {
type: CONSTRUCTOR_NAME,
id: id++,
frozen: null
});
if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
});
var Prototype = Constructor.prototype;
var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
var define = function (that, key, value) {
var state = getInternalState(that);
var data = getWeakData(anObject(key), true);
if (data === true) uncaughtFrozenStore(state).set(key, value);
else data[state.id] = value;
return that;
};
defineBuiltIns(Prototype, {
// `{ WeakMap, WeakSet }.prototype.delete(key)` methods
// https://tc39.es/ecma262/#sec-weakmap.prototype.delete
// https://tc39.es/ecma262/#sec-weakset.prototype.delete
'delete': function (key) {
var state = getInternalState(this);
if (!isObject(key)) return false;
var data = getWeakData(key);
if (data === true) return uncaughtFrozenStore(state)['delete'](key);
return data && hasOwn(data, state.id) && delete data[state.id];
},
// `{ WeakMap, WeakSet }.prototype.has(key)` methods
// https://tc39.es/ecma262/#sec-weakmap.prototype.has
// https://tc39.es/ecma262/#sec-weakset.prototype.has
has: function has(key) {
var state = getInternalState(this);
if (!isObject(key)) return false;
var data = getWeakData(key);
if (data === true) return uncaughtFrozenStore(state).has(key);
return data && hasOwn(data, state.id);
}
});
defineBuiltIns(Prototype, IS_MAP ? {
// `WeakMap.prototype.get(key)` method
// https://tc39.es/ecma262/#sec-weakmap.prototype.get
get: function get(key) {
var state = getInternalState(this);
if (isObject(key)) {
var data = getWeakData(key);
if (data === true) return uncaughtFrozenStore(state).get(key);
if (data) return data[state.id];
}
},
// `WeakMap.prototype.set(key, value)` method
// https://tc39.es/ecma262/#sec-weakmap.prototype.set
set: function set(key, value) {
return define(this, key, value);
}
} : {
// `WeakSet.prototype.add(value)` method
// https://tc39.es/ecma262/#sec-weakset.prototype.add
add: function add(value) {
return define(this, value, true);
}
});
return Constructor;
}
};
/***/ }),
/* 357 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var getCompositeKeyNode = __webpack_require__(344);
var getBuiltIn = __webpack_require__(35);
var apply = __webpack_require__(72);
// https://github.com/tc39/proposal-richer-keys/tree/master/compositeKey
$({ global: true, forced: true }, {
compositeSymbol: function compositeSymbol() {
if (arguments.length === 1 && typeof arguments[0] == 'string') return getBuiltIn('Symbol')['for'](arguments[0]);
return apply(getCompositeKeyNode, null, arguments).get('symbol', getBuiltIn('Symbol'));
}
});
/***/ }),
/* 358 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var uncurryThis = __webpack_require__(6);
// eslint-disable-next-line es/no-typed-arrays -- safe
var getUint8 = uncurryThis(DataView.prototype.getUint8);
// `DataView.prototype.getUint8Clamped` method
// https://github.com/tc39/proposal-dataview-get-set-uint8clamped
$({ target: 'DataView', proto: true, forced: true }, {
getUint8Clamped: function getUint8Clamped(byteOffset) {
return getUint8(this, byteOffset);
}
});
/***/ }),
/* 359 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var uncurryThis = __webpack_require__(6);
var aDataView = __webpack_require__(125);
var toIndex = __webpack_require__(126);
var toUint8Clamped = __webpack_require__(360);
// eslint-disable-next-line es/no-typed-arrays -- safe
var setUint8 = uncurryThis(DataView.prototype.setUint8);
// `DataView.prototype.setUint8Clamped` method
// https://github.com/tc39/proposal-dataview-get-set-uint8clamped
$({ target: 'DataView', proto: true, forced: true }, {
setUint8Clamped: function setUint8Clamped(byteOffset, value) {
setUint8(
aDataView(this),
toIndex(byteOffset),
toUint8Clamped(value)
);
}
});
/***/ }),
/* 360 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var round = Math.round;
module.exports = function (it) {
var value = round(it);
return value < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;
};
/***/ }),
/* 361 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var demethodize = __webpack_require__(362);
// `Function.prototype.demethodize` method
// https://github.com/js-choi/proposal-function-demethodize
$({ target: 'Function', proto: true, forced: true }, {
demethodize: demethodize
});
/***/ }),
/* 362 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
var aCallable = __webpack_require__(38);
module.exports = function demethodize() {
return uncurryThis(aCallable(this));
};
/***/ }),
/* 363 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var uncurryThis = __webpack_require__(6);
var $isCallable = __webpack_require__(28);
var inspectSource = __webpack_require__(54);
var hasOwn = __webpack_require__(5);
var DESCRIPTORS = __webpack_require__(24);
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var classRegExp = /^\s*class\b/;
var exec = uncurryThis(classRegExp.exec);
var isClassConstructor = function (argument) {
try {
// `Function#toString` throws on some built-it function in some legacy engines
// (for example, `DOMQuad` and similar in FF41-)
if (!DESCRIPTORS || !exec(classRegExp, inspectSource(argument))) return false;
} catch (error) { /* empty */ }
var prototype = getOwnPropertyDescriptor(argument, 'prototype');
return !!prototype && hasOwn(prototype, 'writable') && !prototype.writable;
};
// `Function.isCallable` method
// https://github.com/caitp/TC39-Proposals/blob/trunk/tc39-reflect-isconstructor-iscallable.md
$({ target: 'Function', stat: true, sham: true, forced: true }, {
isCallable: function isCallable(argument) {
return $isCallable(argument) && !isClassConstructor(argument);
}
});
/***/ }),
/* 364 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var isConstructor = __webpack_require__(200);
// `Function.isConstructor` method
// https://github.com/caitp/TC39-Proposals/blob/trunk/tc39-reflect-isconstructor-iscallable.md
$({ target: 'Function', stat: true, forced: true }, {
isConstructor: isConstructor
});
/***/ }),
/* 365 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var wellKnownSymbol = __webpack_require__(13);
var defineProperty = __webpack_require__(23).f;
var METADATA = wellKnownSymbol('metadata');
var FunctionPrototype = Function.prototype;
// Function.prototype[@@metadata]
// https://github.com/tc39/proposal-decorator-metadata
if (FunctionPrototype[METADATA] === undefined) {
defineProperty(FunctionPrototype, METADATA, {
value: null
});
}
/***/ }),
/* 366 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var demethodize = __webpack_require__(362);
// `Function.prototype.unThis` method
// https://github.com/js-choi/proposal-function-demethodize
// TODO: Remove from `core-js@4`
$({ target: 'Function', proto: true, forced: true, name: 'demethodize' }, {
unThis: demethodize
});
/***/ }),
/* 367 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove from `core-js@4`
var $ = __webpack_require__(49);
var indexed = __webpack_require__(368);
// `Iterator.prototype.asIndexedPairs` method
// https://github.com/tc39/proposal-iterator-helpers
$({ target: 'Iterator', name: 'indexed', proto: true, real: true, forced: true }, {
asIndexedPairs: indexed
});
/***/ }),
/* 368 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(168);
var call = __webpack_require__(33);
var map = __webpack_require__(148).IteratorPrototype.map;
var callback = function (value, counter) {
return [counter, value];
};
// `Iterator.prototype.indexed` method
// https://github.com/tc39/proposal-iterator-helpers
module.exports = function indexed() {
return call(map, this, callback);
};
/***/ }),
/* 369 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var anObject = __webpack_require__(30);
var call = __webpack_require__(33);
var createIteratorProxy = __webpack_require__(150);
var getIteratorDirect = __webpack_require__(155);
var iteratorClose = __webpack_require__(104);
var uncurryThis = __webpack_require__(6);
var $RangeError = RangeError;
var push = uncurryThis([].push);
var IteratorProxy = createIteratorProxy(function () {
var iterator = this.iterator;
var next = this.next;
var chunkSize = this.chunkSize;
var buffer = [];
var result, done;
while (true) {
result = anObject(call(next, iterator));
done = !!result.done;
if (done) {
if (buffer.length) return buffer;
this.done = true;
return;
}
push(buffer, result.value);
if (buffer.length === chunkSize) return buffer;
}
});
// `Iterator.prototype.chunks` method
// https://github.com/tc39/proposal-iterator-chunking
$({ target: 'Iterator', proto: true, real: true, forced: true }, {
chunks: function chunks(chunkSize) {
var O = anObject(this);
if (typeof chunkSize != 'number' || !chunkSize || chunkSize >>> 0 !== chunkSize) {
return iteratorClose(O, 'throw', new $RangeError('chunkSize must be integer in [1, 2^32-1]'));
}
return new IteratorProxy(getIteratorDirect(O), {
chunkSize: chunkSize
});
}
});
/***/ }),
/* 370 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove from `core-js@4`
var $ = __webpack_require__(49);
var indexed = __webpack_require__(368);
// `Iterator.prototype.indexed` method
// https://github.com/tc39/proposal-iterator-helpers
$({ target: 'Iterator', proto: true, real: true, forced: true }, {
indexed: indexed
});
/***/ }),
/* 371 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* eslint-disable es/no-bigint -- safe */
var $ = __webpack_require__(49);
var NumericRangeIterator = __webpack_require__(341);
var $TypeError = TypeError;
// `Iterator.range` method
// https://github.com/tc39/proposal-Number.range
$({ target: 'Iterator', stat: true, forced: true }, {
range: function range(start, end, option) {
if (typeof start == 'number') return new NumericRangeIterator(start, end, option, 'number', 0, 1);
if (typeof start == 'bigint') return new NumericRangeIterator(start, end, option, 'bigint', BigInt(0), BigInt(1));
throw new $TypeError('Incorrect Iterator.range arguments');
}
});
/***/ }),
/* 372 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var iteratorWindow = __webpack_require__(373);
// `Iterator.prototype.sliding` method
// https://github.com/tc39/proposal-iterator-chunking
$({ target: 'Iterator', proto: true, real: true, forced: true }, {
sliding: function sliding(windowSize) {
return iteratorWindow(this, windowSize, 'allow-partial');
}
});
/***/ }),
/* 373 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var anObject = __webpack_require__(30);
var call = __webpack_require__(33);
var createIteratorProxy = __webpack_require__(150);
var createIterResultObject = __webpack_require__(151);
var getIteratorDirect = __webpack_require__(155);
var iteratorClose = __webpack_require__(104);
var uncurryThis = __webpack_require__(6);
var $RangeError = RangeError;
var $TypeError = TypeError;
var push = uncurryThis([].push);
var slice = uncurryThis([].slice);
var ALLOW_PARTIAL = 'allow-partial';
var IteratorProxy = createIteratorProxy(function () {
var iterator = this.iterator;
var next = this.next;
var buffer = this.buffer;
var windowSize = this.windowSize;
var allowPartial = this.allowPartial;
var result, done;
while (true) {
result = anObject(call(next, iterator));
done = this.done = !!result.done;
if (allowPartial && done && buffer.length && buffer.length < windowSize) return createIterResultObject(buffer, false);
if (done) return createIterResultObject(undefined, true);
if (buffer.length === windowSize) this.buffer = buffer = slice(buffer, 1);
push(buffer, result.value);
if (buffer.length === windowSize) return createIterResultObject(buffer, false);
}
}, false, true);
// `Iterator.prototype.windows` and obsolete `Iterator.prototype.sliding` methods
// https://github.com/tc39/proposal-iterator-chunking
module.exports = function (O, windowSize, undersized) {
anObject(O);
if (typeof windowSize != 'number' || !windowSize || windowSize >>> 0 !== windowSize) {
return iteratorClose(O, 'throw', new $RangeError('`windowSize` must be integer in [1, 2^32-1]'));
}
if (undersized !== undefined && undersized !== 'only-full' && undersized !== ALLOW_PARTIAL) {
return iteratorClose(O, 'throw', new $TypeError('Incorrect `undersized` argument'));
}
return new IteratorProxy(getIteratorDirect(O), {
windowSize: windowSize,
buffer: [],
allowPartial: undersized === ALLOW_PARTIAL
});
};
/***/ }),
/* 374 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var anObject = __webpack_require__(30);
var AsyncFromSyncIterator = __webpack_require__(230);
var WrapAsyncIterator = __webpack_require__(333);
var getIteratorDirect = __webpack_require__(155);
// `Iterator.prototype.toAsync` method
// https://github.com/tc39/proposal-async-iterator-helpers
$({ target: 'Iterator', proto: true, real: true, forced: true }, {
toAsync: function toAsync() {
return new WrapAsyncIterator(getIteratorDirect(new AsyncFromSyncIterator(getIteratorDirect(anObject(this)))));
}
});
/***/ }),
/* 375 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var iteratorWindow = __webpack_require__(373);
// `Iterator.prototype.windows` method
// https://github.com/tc39/proposal-iterator-chunking
$({ target: 'Iterator', proto: true, real: true, forced: true }, {
windows: function windows(windowSize /* , undersized */) {
return iteratorWindow(this, windowSize, arguments.length < 2 ? undefined : arguments[1]);
}
});
/***/ }),
/* 376 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var anObject = __webpack_require__(30);
var anObjectOrUndefined = __webpack_require__(288);
var call = __webpack_require__(33);
var uncurryThis = __webpack_require__(6);
var getIteratorRecord = __webpack_require__(377);
var getIteratorFlattenable = __webpack_require__(165);
var getModeOption = __webpack_require__(378);
var iteratorClose = __webpack_require__(104);
var iteratorCloseAll = __webpack_require__(152);
var iteratorZip = __webpack_require__(379);
var concat = uncurryThis([].concat);
var push = uncurryThis([].push);
var THROW = 'throw';
// `Iterator.zip` method
// https://github.com/tc39/proposal-joint-iteration
$({ target: 'Iterator', stat: true }, {
zip: function zip(iterables /* , options */) {
anObject(iterables);
var options = arguments.length > 1 ? anObjectOrUndefined(arguments[1]) : undefined;
var mode = getModeOption(options);
var paddingOption = mode === 'longest' ? anObjectOrUndefined(options && options.padding) : undefined;
var iters = [];
var padding = [];
var inputIter = getIteratorRecord(iterables);
var iter, done, next;
while (!done) {
try {
next = anObject(call(inputIter.next, inputIter.iterator));
done = next.done;
} catch (error) {
return iteratorCloseAll(iters, THROW, error);
}
if (!done) {
try {
iter = getIteratorFlattenable(next.value, true);
} catch (error) {
return iteratorCloseAll(concat([inputIter.iterator], iters), THROW, error);
}
push(iters, iter);
}
}
var iterCount = iters.length;
var i, paddingDone, paddingIter;
if (mode === 'longest') {
if (paddingOption === undefined) {
for (i = 0; i < iterCount; i++) push(padding, undefined);
} else {
try {
paddingIter = getIteratorRecord(paddingOption);
} catch (error) {
return iteratorCloseAll(iters, THROW, error);
}
var usingIterator = true;
for (i = 0; i < iterCount; i++) {
if (usingIterator) {
try {
next = anObject(call(paddingIter.next, paddingIter.iterator));
paddingDone = next.done;
next = next.value;
} catch (error) {
return iteratorCloseAll(iters, THROW, error);
}
if (paddingDone) {
usingIterator = false;
} else {
push(padding, next);
}
} else {
push(padding, undefined);
}
}
if (usingIterator) {
try {
iteratorClose(paddingIter.iterator, 'normal');
} catch (error) {
return iteratorCloseAll(iters, THROW, error);
}
}
}
}
return iteratorZip(iters, mode, padding);
}
});
/***/ }),
/* 377 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var getIterator = __webpack_require__(102);
var getIteratorDirect = __webpack_require__(155);
module.exports = function (argument) {
return getIteratorDirect(getIterator(argument));
};
/***/ }),
/* 378 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $TypeError = TypeError;
module.exports = function (options) {
var mode = options && options.mode;
if (mode === undefined || mode === 'shortest' || mode === 'longest' || mode === 'strict') return mode || 'shortest';
throw new $TypeError('Incorrect `mode` option');
};
/***/ }),
/* 379 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(33);
var uncurryThis = __webpack_require__(6);
var createIteratorProxy = __webpack_require__(150);
var iteratorCloseAll = __webpack_require__(152);
var $TypeError = TypeError;
var slice = uncurryThis([].slice);
var push = uncurryThis([].push);
var ITERATOR_IS_EXHAUSTED = 'Iterator is exhausted';
var THROW = 'throw';
// eslint-disable-next-line max-statements -- specification case
var IteratorProxy = createIteratorProxy(function () {
var iterCount = this.iterCount;
if (!iterCount) {
this.done = true;
return;
}
var openIters = this.openIters;
var iters = this.iters;
var padding = this.padding;
var mode = this.mode;
var finishResults = this.finishResults;
var results = [];
var result, done;
for (var i = 0; i < iterCount; i++) {
var iter = iters[i];
if (iter === null) {
result = padding[i];
} else {
try {
result = call(iter.next, iter.iterator);
done = result.done;
result = result.value;
} catch (error) {
openIters[i] = undefined;
return iteratorCloseAll(openIters, THROW, error);
}
if (done) {
openIters[i] = undefined;
this.openItersCount--;
if (mode === 'shortest') {
this.done = true;
return iteratorCloseAll(openIters, 'normal', undefined);
}
if (mode === 'strict') {
if (i) {
return iteratorCloseAll(openIters, THROW, new $TypeError(ITERATOR_IS_EXHAUSTED));
}
var open, openDone;
for (var k = 1; k < iterCount; k++) {
// eslint-disable-next-line max-depth -- specification case
try {
open = call(iters[k].next, iters[k].iterator);
openDone = open.done;
open = open.value;
} catch (error) {
openIters[k] = undefined;
return iteratorCloseAll(openIters, THROW, open);
}
// eslint-disable-next-line max-depth -- specification case
if (openDone) {
openIters[k] = undefined;
this.openItersCount--;
} else {
return iteratorCloseAll(openIters, THROW, new $TypeError(ITERATOR_IS_EXHAUSTED));
}
}
this.done = true;
return;
}
if (!this.openItersCount) {
this.done = true;
return;
}
iters[i] = null;
result = padding[i];
}
}
push(results, result);
}
return finishResults ? finishResults(results) : results;
});
module.exports = function (iters, mode, padding, finishResults) {
var iterCount = iters.length;
return new IteratorProxy({
iters: iters,
iterCount: iterCount,
openIters: slice(iters, 0),
openItersCount: iterCount,
mode: mode,
padding: padding,
finishResults: finishResults
});
};
/***/ }),
/* 380 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var anObject = __webpack_require__(30);
var anObjectOrUndefined = __webpack_require__(288);
var createProperty = __webpack_require__(117);
var call = __webpack_require__(33);
var uncurryThis = __webpack_require__(6);
var getBuiltIn = __webpack_require__(35);
var propertyIsEnumerableModule = __webpack_require__(42);
var getIteratorFlattenable = __webpack_require__(165);
var getModeOption = __webpack_require__(378);
var iteratorCloseAll = __webpack_require__(152);
var iteratorZip = __webpack_require__(379);
var create = getBuiltIn('Object', 'create');
var ownKeys = getBuiltIn('Reflect', 'ownKeys');
var push = uncurryThis([].push);
var THROW = 'throw';
// `Iterator.zipKeyed` method
// https://github.com/tc39/proposal-joint-iteration
$({ target: 'Iterator', stat: true }, {
zipKeyed: function zipKeyed(iterables /* , options */) {
anObject(iterables);
var options = arguments.length > 1 ? anObjectOrUndefined(arguments[1]) : undefined;
var mode = getModeOption(options);
var paddingOption = mode === 'longest' ? anObjectOrUndefined(options && options.padding) : undefined;
var iters = [];
var padding = [];
var allKeys = ownKeys(iterables);
var keys = [];
var propertyIsEnumerable = propertyIsEnumerableModule.f;
var i, key, value;
for (i = 0; i < allKeys.length; i++) try {
key = allKeys[i];
if (!call(propertyIsEnumerable, iterables, key)) continue;
value = iterables[key];
if (value !== undefined) {
push(keys, key);
push(iters, getIteratorFlattenable(value, true));
}
} catch (error) {
return iteratorCloseAll(iters, THROW, error);
}
var iterCount = iters.length;
if (mode === 'longest') {
if (paddingOption === undefined) {
for (i = 0; i < iterCount; i++) push(padding, undefined);
} else {
for (i = 0; i < keys.length; i++) {
try {
value = paddingOption[keys[i]];
} catch (error) {
return iteratorCloseAll(iters, THROW, error);
}
push(padding, value);
}
}
}
return iteratorZip(iters, mode, padding, function (results) {
var obj = create(null);
for (var j = 0; j < iterCount; j++) {
createProperty(obj, keys[j], results[j]);
}
return obj;
});
}
});
/***/ }),
/* 381 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var aMap = __webpack_require__(185);
var remove = __webpack_require__(183).remove;
// `Map.prototype.deleteAll` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: true }, {
deleteAll: function deleteAll(/* ...elements */) {
var collection = aMap(this);
var allDeleted = true;
var wasDeleted;
for (var k = 0, len = arguments.length; k < len; k++) {
wasDeleted = remove(collection, arguments[k]);
allDeleted = allDeleted && wasDeleted;
} return !!allDeleted;
}
});
/***/ }),
/* 382 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var aMap = __webpack_require__(185);
var MapHelpers = __webpack_require__(183);
var get = MapHelpers.get;
var has = MapHelpers.has;
var set = MapHelpers.set;
// `Map.prototype.emplace` method
// https://github.com/tc39/proposal-upsert
$({ target: 'Map', proto: true, real: true, forced: true }, {
emplace: function emplace(key, handler) {
var map = aMap(this);
var value, inserted;
if (has(map, key)) {
value = get(map, key);
if ('update' in handler) {
value = handler.update(value, key, map);
set(map, key, value);
} return value;
}
inserted = handler.insert(key, map);
set(map, key, inserted);
return inserted;
}
});
/***/ }),
/* 383 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var bind = __webpack_require__(98);
var aMap = __webpack_require__(185);
var iterate = __webpack_require__(319);
// `Map.prototype.every` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: true }, {
every: function every(callbackfn /* , thisArg */) {
var map = aMap(this);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
return iterate(map, function (value, key) {
if (!boundFunction(value, key, map)) return false;
}, true) !== false;
}
});
/***/ }),
/* 384 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var bind = __webpack_require__(98);
var aMap = __webpack_require__(185);
var MapHelpers = __webpack_require__(183);
var iterate = __webpack_require__(319);
var Map = MapHelpers.Map;
var set = MapHelpers.set;
// `Map.prototype.filter` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: true }, {
filter: function filter(callbackfn /* , thisArg */) {
var map = aMap(this);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
var newMap = new Map();
iterate(map, function (value, key) {
if (boundFunction(value, key, map)) set(newMap, key, value);
});
return newMap;
}
});
/***/ }),
/* 385 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var bind = __webpack_require__(98);
var aMap = __webpack_require__(185);
var iterate = __webpack_require__(319);
// `Map.prototype.find` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: true }, {
find: function find(callbackfn /* , thisArg */) {
var map = aMap(this);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
var result = iterate(map, function (value, key) {
if (boundFunction(value, key, map)) return { value: value };
}, true);
return result && result.value;
}
});
/***/ }),
/* 386 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var bind = __webpack_require__(98);
var aMap = __webpack_require__(185);
var iterate = __webpack_require__(319);
// `Map.prototype.findKey` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: true }, {
findKey: function findKey(callbackfn /* , thisArg */) {
var map = aMap(this);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
var result = iterate(map, function (value, key) {
if (boundFunction(value, key, map)) return { key: key };
}, true);
return result && result.key;
}
});
/***/ }),
/* 387 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var MapHelpers = __webpack_require__(183);
var createCollectionFrom = __webpack_require__(388);
// `Map.from` method
// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from
$({ target: 'Map', stat: true, forced: true }, {
from: createCollectionFrom(MapHelpers.Map, MapHelpers.set, true)
});
/***/ }),
/* 388 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://tc39.github.io/proposal-setmap-offrom/
var bind = __webpack_require__(98);
var anObject = __webpack_require__(30);
var toObject = __webpack_require__(9);
var iterate = __webpack_require__(97);
module.exports = function (C, adder, ENTRY) {
return function from(source /* , mapFn, thisArg */) {
var O = toObject(source);
var length = arguments.length;
var mapFn = length > 1 ? arguments[1] : undefined;
var mapping = mapFn !== undefined;
var boundFunction = mapping ? bind(mapFn, length > 2 ? arguments[2] : undefined) : undefined;
var result = new C();
var n = 0;
iterate(O, function (nextItem) {
var entry = mapping ? boundFunction(nextItem, n++) : nextItem;
if (ENTRY) adder(result, anObject(entry)[0], entry[1]);
else adder(result, entry);
});
return result;
};
};
/***/ }),
/* 389 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var sameValueZero = __webpack_require__(390);
var aMap = __webpack_require__(185);
var iterate = __webpack_require__(319);
// `Map.prototype.includes` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: true }, {
includes: function includes(searchElement) {
return iterate(aMap(this), function (value) {
if (sameValueZero(value, searchElement)) return true;
}, true) === true;
}
});
/***/ }),
/* 390 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// `SameValueZero` abstract operation
// https://tc39.es/ecma262/#sec-samevaluezero
module.exports = function (x, y) {
// eslint-disable-next-line no-self-compare -- NaN check
return x === y || x !== x && y !== y;
};
/***/ }),
/* 391 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var iterate = __webpack_require__(97);
var isCallable = __webpack_require__(28);
var aCallable = __webpack_require__(38);
var Map = __webpack_require__(183).Map;
// `Map.keyBy` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', stat: true, forced: true }, {
keyBy: function keyBy(iterable, keyDerivative) {
var C = isCallable(this) ? this : Map;
var newMap = new C();
aCallable(keyDerivative);
var setter = aCallable(newMap.set);
iterate(iterable, function (element) {
call(setter, newMap, keyDerivative(element), element);
});
return newMap;
}
});
/***/ }),
/* 392 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var aMap = __webpack_require__(185);
var iterate = __webpack_require__(319);
// `Map.prototype.keyOf` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: true }, {
keyOf: function keyOf(searchElement) {
var result = iterate(aMap(this), function (value, key) {
if (value === searchElement) return { key: key };
}, true);
return result && result.key;
}
});
/***/ }),
/* 393 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var bind = __webpack_require__(98);
var aMap = __webpack_require__(185);
var MapHelpers = __webpack_require__(183);
var iterate = __webpack_require__(319);
var Map = MapHelpers.Map;
var set = MapHelpers.set;
// `Map.prototype.mapKeys` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: true }, {
mapKeys: function mapKeys(callbackfn /* , thisArg */) {
var map = aMap(this);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
var newMap = new Map();
iterate(map, function (value, key) {
set(newMap, boundFunction(value, key, map), value);
});
return newMap;
}
});
/***/ }),
/* 394 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var bind = __webpack_require__(98);
var aMap = __webpack_require__(185);
var MapHelpers = __webpack_require__(183);
var iterate = __webpack_require__(319);
var Map = MapHelpers.Map;
var set = MapHelpers.set;
// `Map.prototype.mapValues` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: true }, {
mapValues: function mapValues(callbackfn /* , thisArg */) {
var map = aMap(this);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
var newMap = new Map();
iterate(map, function (value, key) {
set(newMap, key, boundFunction(value, key, map));
});
return newMap;
}
});
/***/ }),
/* 395 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var aMap = __webpack_require__(185);
var iterate = __webpack_require__(97);
var set = __webpack_require__(183).set;
// `Map.prototype.merge` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, arity: 1, forced: true }, {
// eslint-disable-next-line no-unused-vars -- required for `.length`
merge: function merge(iterable /* ...iterables */) {
var map = aMap(this);
var argumentsLength = arguments.length;
var i = 0;
while (i < argumentsLength) {
iterate(arguments[i++], function (key, value) {
set(map, key, value);
}, { AS_ENTRIES: true });
}
return map;
}
});
/***/ }),
/* 396 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var MapHelpers = __webpack_require__(183);
var createCollectionOf = __webpack_require__(397);
// `Map.of` method
// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of
$({ target: 'Map', stat: true, forced: true }, {
of: createCollectionOf(MapHelpers.Map, MapHelpers.set, true)
});
/***/ }),
/* 397 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var anObject = __webpack_require__(30);
// https://tc39.github.io/proposal-setmap-offrom/
module.exports = function (C, adder, ENTRY) {
return function of() {
var result = new C();
var length = arguments.length;
for (var index = 0; index < length; index++) {
var entry = arguments[index];
if (ENTRY) adder(result, anObject(entry)[0], entry[1]);
else adder(result, entry);
} return result;
};
};
/***/ }),
/* 398 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var aCallable = __webpack_require__(38);
var aMap = __webpack_require__(185);
var iterate = __webpack_require__(319);
var $TypeError = TypeError;
// `Map.prototype.reduce` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: true }, {
reduce: function reduce(callbackfn /* , initialValue */) {
var map = aMap(this);
var noInitial = arguments.length < 2;
var accumulator = noInitial ? undefined : arguments[1];
aCallable(callbackfn);
iterate(map, function (value, key) {
if (noInitial) {
noInitial = false;
accumulator = value;
} else {
accumulator = callbackfn(accumulator, value, key, map);
}
});
if (noInitial) throw new $TypeError('Reduce of empty map with no initial value');
return accumulator;
}
});
/***/ }),
/* 399 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var bind = __webpack_require__(98);
var aMap = __webpack_require__(185);
var iterate = __webpack_require__(319);
// `Map.prototype.some` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: true }, {
some: function some(callbackfn /* , thisArg */) {
var map = aMap(this);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
return iterate(map, function (value, key) {
if (boundFunction(value, key, map)) return true;
}, true) === true;
}
});
/***/ }),
/* 400 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var aCallable = __webpack_require__(38);
var aMap = __webpack_require__(185);
var MapHelpers = __webpack_require__(183);
var $TypeError = TypeError;
var get = MapHelpers.get;
var has = MapHelpers.has;
var set = MapHelpers.set;
// `Map.prototype.update` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: true }, {
update: function update(key, callback /* , thunk */) {
var map = aMap(this);
var length = arguments.length;
aCallable(callback);
var isPresentInMap = has(map, key);
if (!isPresentInMap && length < 3) {
throw new $TypeError('Updating absent value');
}
var value = isPresentInMap ? get(map, key) : aCallable(length > 2 ? arguments[2] : undefined)(key, map);
set(map, key, callback(value, key, map));
return map;
}
});
/***/ }),
/* 401 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var clamp = __webpack_require__(402);
// TODO: Remove from `core-js@4`
// `Math.clamp` method
// https://github.com/tc39/proposal-math-clamp
$({ target: 'Math', stat: true, forced: true }, {
clamp: clamp
});
/***/ }),
/* 402 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var aNumber = __webpack_require__(403);
var $min = Math.min;
var $max = Math.max;
module.exports = function clamp(value, min, max) {
return $min($max(aNumber(value), aNumber(min)), aNumber(max));
};
/***/ }),
/* 403 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $TypeError = TypeError;
module.exports = function (argument) {
if (typeof argument == 'number') return argument;
throw new $TypeError('Argument is not a number');
};
/***/ }),
/* 404 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
// `Math.DEG_PER_RAD` constant
// https://rwaldron.github.io/proposal-math-extensions/
$({ target: 'Math', stat: true, nonConfigurable: true, nonWritable: true }, {
DEG_PER_RAD: Math.PI / 180
});
/***/ }),
/* 405 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var RAD_PER_DEG = 180 / Math.PI;
// `Math.degrees` method
// https://rwaldron.github.io/proposal-math-extensions/
$({ target: 'Math', stat: true, forced: true }, {
degrees: function degrees(radians) {
return radians * RAD_PER_DEG;
}
});
/***/ }),
/* 406 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var scale = __webpack_require__(407);
var fround = __webpack_require__(408);
// `Math.fscale` method
// https://rwaldron.github.io/proposal-math-extensions/
$({ target: 'Math', stat: true, forced: true }, {
fscale: function fscale(x, inLow, inHigh, outLow, outHigh) {
return fround(scale(x, inLow, inHigh, outLow, outHigh));
}
});
/***/ }),
/* 407 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// `Math.scale` method implementation
// https://rwaldron.github.io/proposal-math-extensions/
module.exports = function scale(x, inLow, inHigh, outLow, outHigh) {
var nx = +x;
var nInLow = +inLow;
var nInHigh = +inHigh;
var nOutLow = +outLow;
var nOutHigh = +outHigh;
// eslint-disable-next-line no-self-compare -- NaN check
if (nx !== nx || nInLow !== nInLow || nInHigh !== nInHigh || nOutLow !== nOutLow || nOutHigh !== nOutHigh) return NaN;
if (nx === Infinity || nx === -Infinity) return nx;
return (nx - nInLow) * (nOutHigh - nOutLow) / (nInHigh - nInLow) + nOutLow;
};
/***/ }),
/* 408 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var floatRound = __webpack_require__(188);
var FLOAT32_EPSILON = 1.1920928955078125e-7; // 2 ** -23;
var FLOAT32_MAX_VALUE = 3.4028234663852886e+38; // 2 ** 128 - 2 ** 104
var FLOAT32_MIN_VALUE = 1.1754943508222875e-38; // 2 ** -126;
// `Math.fround` method implementation
// https://tc39.es/ecma262/#sec-math.fround
// eslint-disable-next-line es/no-math-fround -- safe
module.exports = Math.fround || function fround(x) {
return floatRound(x, FLOAT32_EPSILON, FLOAT32_MAX_VALUE, FLOAT32_MIN_VALUE);
};
/***/ }),
/* 409 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
// `Math.RAD_PER_DEG` constant
// https://rwaldron.github.io/proposal-math-extensions/
$({ target: 'Math', stat: true, nonConfigurable: true, nonWritable: true }, {
RAD_PER_DEG: 180 / Math.PI
});
/***/ }),
/* 410 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var DEG_PER_RAD = Math.PI / 180;
// `Math.radians` method
// https://rwaldron.github.io/proposal-math-extensions/
$({ target: 'Math', stat: true, forced: true }, {
radians: function radians(degrees) {
return degrees * DEG_PER_RAD;
}
});
/***/ }),
/* 411 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var scale = __webpack_require__(407);
// `Math.scale` method
// https://rwaldron.github.io/proposal-math-extensions/
$({ target: 'Math', stat: true, forced: true }, {
scale: scale
});
/***/ }),
/* 412 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
// `Math.signbit` method
// https://github.com/tc39/proposal-Math.signbit
$({ target: 'Math', stat: true, forced: true }, {
signbit: function signbit(x) {
var n = +x;
// eslint-disable-next-line no-self-compare -- NaN check
return n === n && n === 0 ? 1 / n === -Infinity : n < 0;
}
});
/***/ }),
/* 413 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var $clamp = __webpack_require__(402);
var thisNumberValue = __webpack_require__(414);
// `Number.prototype.clamp` method
// https://github.com/tc39/proposal-math-clamp
$({ target: 'Number', proto: true, forced: true }, {
clamp: function clamp(min, max) {
return $clamp(thisNumberValue(this), min, max);
}
});
/***/ }),
/* 414 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
// `thisNumberValue` abstract operation
// https://tc39.es/ecma262/#sec-thisnumbervalue
module.exports = uncurryThis(1.1.valueOf);
/***/ }),
/* 415 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var uncurryThis = __webpack_require__(6);
var toIntegerOrInfinity = __webpack_require__(65);
var INVALID_NUMBER_REPRESENTATION = 'Invalid number representation';
var INVALID_RADIX = 'Invalid radix';
var $RangeError = RangeError;
var $SyntaxError = SyntaxError;
var $TypeError = TypeError;
var $parseInt = parseInt;
var pow = Math.pow;
var valid = /^[\d.a-z]+$/;
var charAt = uncurryThis(''.charAt);
var exec = uncurryThis(valid.exec);
var numberToString = uncurryThis(1.1.toString);
var stringSlice = uncurryThis(''.slice);
var split = uncurryThis(''.split);
// `Number.fromString` method
// https://github.com/tc39/proposal-number-fromstring
$({ target: 'Number', stat: true, forced: true }, {
fromString: function fromString(string, radix) {
var sign = 1;
if (typeof string != 'string') throw new $TypeError(INVALID_NUMBER_REPRESENTATION);
if (!string.length) throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION);
if (charAt(string, 0) === '-') {
sign = -1;
string = stringSlice(string, 1);
if (!string.length) throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION);
}
var R = radix === undefined ? 10 : toIntegerOrInfinity(radix);
if (R < 2 || R > 36) throw new $RangeError(INVALID_RADIX);
if (!exec(valid, string)) throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION);
var parts = split(string, '.');
var mathNum = $parseInt(parts[0], R);
if (parts.length > 1) mathNum += $parseInt(parts[1], R) / pow(R, parts[1].length);
if (R === 10 && numberToString(mathNum, R) !== string) throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION);
return sign * mathNum;
}
});
/***/ }),
/* 416 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var NumericRangeIterator = __webpack_require__(341);
// `Number.range` method
// https://github.com/tc39/proposal-Number.range
// TODO: Remove from `core-js@4`
$({ target: 'Number', stat: true, forced: true }, {
range: function range(start, end, option) {
return new NumericRangeIterator(start, end, option, 'number', 0, 1);
}
});
/***/ }),
/* 417 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove this module from `core-js@4` since it's split to modules listed below
__webpack_require__(418);
__webpack_require__(419);
__webpack_require__(420);
/***/ }),
/* 418 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/tc39/proposal-observable
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var DESCRIPTORS = __webpack_require__(24);
var setSpecies = __webpack_require__(197);
var aCallable = __webpack_require__(38);
var anObject = __webpack_require__(30);
var anInstance = __webpack_require__(144);
var isCallable = __webpack_require__(28);
var isNullOrUndefined = __webpack_require__(11);
var isObject = __webpack_require__(27);
var getMethod = __webpack_require__(37);
var defineBuiltIn = __webpack_require__(51);
var defineBuiltIns = __webpack_require__(145);
var defineBuiltInAccessor = __webpack_require__(130);
var hostReportErrors = __webpack_require__(209);
var wellKnownSymbol = __webpack_require__(13);
var InternalStateModule = __webpack_require__(55);
var $$OBSERVABLE = wellKnownSymbol('observable');
var OBSERVABLE = 'Observable';
var SUBSCRIPTION = 'Subscription';
var SUBSCRIPTION_OBSERVER = 'SubscriptionObserver';
var getterFor = InternalStateModule.getterFor;
var setInternalState = InternalStateModule.set;
var getObservableInternalState = getterFor(OBSERVABLE);
var getSubscriptionInternalState = getterFor(SUBSCRIPTION);
var getSubscriptionObserverInternalState = getterFor(SUBSCRIPTION_OBSERVER);
var SubscriptionState = function (observer) {
this.observer = anObject(observer);
this.cleanup = null;
this.subscriptionObserver = null;
};
SubscriptionState.prototype = {
type: SUBSCRIPTION,
clean: function () {
var cleanup = this.cleanup;
if (cleanup) {
this.cleanup = null;
try {
cleanup();
} catch (error) {
hostReportErrors(error);
}
}
},
close: function () {
if (!DESCRIPTORS) {
var subscription = this.facade;
var subscriptionObserver = this.subscriptionObserver;
subscription.closed = true;
if (subscriptionObserver) subscriptionObserver.closed = true;
} this.observer = null;
},
isClosed: function () {
return this.observer === null;
}
};
var Subscription = function (observer, subscriber) {
var subscriptionState = setInternalState(this, new SubscriptionState(observer));
var start;
if (!DESCRIPTORS) this.closed = false;
try {
if (start = getMethod(observer, 'start')) call(start, observer, this);
} catch (error) {
hostReportErrors(error);
}
if (subscriptionState.isClosed()) return;
var subscriptionObserver = subscriptionState.subscriptionObserver = new SubscriptionObserver(subscriptionState);
try {
var cleanup = subscriber(subscriptionObserver);
var subscription = cleanup;
if (!isNullOrUndefined(cleanup)) subscriptionState.cleanup = isCallable(cleanup.unsubscribe)
? function () { subscription.unsubscribe(); }
: aCallable(cleanup);
} catch (error) {
subscriptionObserver.error(error);
return;
} if (subscriptionState.isClosed()) subscriptionState.clean();
};
Subscription.prototype = defineBuiltIns({}, {
unsubscribe: function unsubscribe() {
var subscriptionState = getSubscriptionInternalState(this);
if (!subscriptionState.isClosed()) {
subscriptionState.close();
subscriptionState.clean();
}
}
});
if (DESCRIPTORS) defineBuiltInAccessor(Subscription.prototype, 'closed', {
configurable: true,
get: function closed() {
return getSubscriptionInternalState(this).isClosed();
}
});
var SubscriptionObserver = function (subscriptionState) {
setInternalState(this, {
type: SUBSCRIPTION_OBSERVER,
subscriptionState: subscriptionState
});
if (!DESCRIPTORS) this.closed = false;
};
SubscriptionObserver.prototype = defineBuiltIns({}, {
next: function next(value) {
var subscriptionState = getSubscriptionObserverInternalState(this).subscriptionState;
if (!subscriptionState.isClosed()) {
var observer = subscriptionState.observer;
try {
var nextMethod = getMethod(observer, 'next');
if (nextMethod) call(nextMethod, observer, value);
} catch (error) {
hostReportErrors(error);
}
}
},
error: function error(value) {
var subscriptionState = getSubscriptionObserverInternalState(this).subscriptionState;
if (!subscriptionState.isClosed()) {
var observer = subscriptionState.observer;
subscriptionState.close();
try {
var errorMethod = getMethod(observer, 'error');
if (errorMethod) call(errorMethod, observer, value);
else hostReportErrors(value);
} catch (err) {
hostReportErrors(err);
} subscriptionState.clean();
}
},
complete: function complete() {
var subscriptionState = getSubscriptionObserverInternalState(this).subscriptionState;
if (!subscriptionState.isClosed()) {
var observer = subscriptionState.observer;
subscriptionState.close();
try {
var completeMethod = getMethod(observer, 'complete');
if (completeMethod) call(completeMethod, observer);
} catch (error) {
hostReportErrors(error);
} subscriptionState.clean();
}
}
});
if (DESCRIPTORS) defineBuiltInAccessor(SubscriptionObserver.prototype, 'closed', {
configurable: true,
get: function closed() {
return getSubscriptionObserverInternalState(this).subscriptionState.isClosed();
}
});
var $Observable = function Observable(subscriber) {
anInstance(this, ObservablePrototype);
setInternalState(this, {
type: OBSERVABLE,
subscriber: aCallable(subscriber)
});
};
var ObservablePrototype = $Observable.prototype;
defineBuiltIns(ObservablePrototype, {
subscribe: function subscribe(observer) {
var length = arguments.length;
return new Subscription(isCallable(observer) ? {
next: observer,
error: length > 1 ? arguments[1] : undefined,
complete: length > 2 ? arguments[2] : undefined
} : isObject(observer) ? observer : {}, getObservableInternalState(this).subscriber);
}
});
defineBuiltIn(ObservablePrototype, $$OBSERVABLE, function () { return this; });
$({ global: true, constructor: true, forced: true }, {
Observable: $Observable
});
setSpecies(OBSERVABLE);
/***/ }),
/* 419 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var getBuiltIn = __webpack_require__(35);
var call = __webpack_require__(33);
var anObject = __webpack_require__(30);
var isConstructor = __webpack_require__(200);
var getIterator = __webpack_require__(102);
var getMethod = __webpack_require__(37);
var iterate = __webpack_require__(97);
var wellKnownSymbol = __webpack_require__(13);
var $$OBSERVABLE = wellKnownSymbol('observable');
// `Observable.from` method
// https://github.com/tc39/proposal-observable
$({ target: 'Observable', stat: true, forced: true }, {
from: function from(x) {
var C = isConstructor(this) ? this : getBuiltIn('Observable');
var observableMethod = getMethod(anObject(x), $$OBSERVABLE);
if (observableMethod) {
var observable = anObject(call(observableMethod, x));
return observable.constructor === C ? observable : new C(function (observer) {
return observable.subscribe(observer);
});
}
var iterator = getIterator(x);
return new C(function (observer) {
iterate(iterator, function (it, stop) {
observer.next(it);
if (observer.closed) return stop();
}, { IS_ITERATOR: true, INTERRUPTED: true });
observer.complete();
});
}
});
/***/ }),
/* 420 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var getBuiltIn = __webpack_require__(35);
var isConstructor = __webpack_require__(200);
var Array = getBuiltIn('Array');
// `Observable.of` method
// https://github.com/tc39/proposal-observable
$({ target: 'Observable', stat: true, forced: true }, {
of: function of() {
var C = isConstructor(this) ? this : getBuiltIn('Observable');
var length = arguments.length;
var items = Array(length);
var index = 0;
while (index < length) items[index] = arguments[index++];
return new C(function (observer) {
for (var i = 0; i < length; i++) {
observer.next(items[i]);
if (observer.closed) return;
} observer.complete();
});
}
});
/***/ }),
/* 421 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove from `core-js@4`
var $ = __webpack_require__(49);
var ReflectMetadataModule = __webpack_require__(422);
var anObject = __webpack_require__(30);
var toMetadataKey = ReflectMetadataModule.toKey;
var ordinaryDefineOwnMetadata = ReflectMetadataModule.set;
// `Reflect.defineMetadata` method
// https://github.com/rbuckton/reflect-metadata
$({ target: 'Reflect', stat: true }, {
defineMetadata: function defineMetadata(metadataKey, metadataValue, target /* , targetKey */) {
var targetKey = arguments.length < 4 ? undefined : toMetadataKey(arguments[3]);
ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), targetKey);
}
});
/***/ }),
/* 422 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
__webpack_require__(345);
__webpack_require__(354);
var getBuiltIn = __webpack_require__(35);
var uncurryThis = __webpack_require__(6);
var shared = __webpack_require__(14);
var Map = getBuiltIn('Map');
var WeakMap = getBuiltIn('WeakMap');
var push = uncurryThis([].push);
var metadata = shared('metadata');
var store = metadata.store || (metadata.store = new WeakMap());
var getOrCreateMetadataMap = function (target, targetKey, create) {
var targetMetadata = store.get(target);
if (!targetMetadata) {
if (!create) return;
store.set(target, targetMetadata = new Map());
}
var keyMetadata = targetMetadata.get(targetKey);
if (!keyMetadata) {
if (!create) return;
targetMetadata.set(targetKey, keyMetadata = new Map());
} return keyMetadata;
};
var ordinaryHasOwnMetadata = function (MetadataKey, O, P) {
var metadataMap = getOrCreateMetadataMap(O, P, false);
return metadataMap === undefined ? false : metadataMap.has(MetadataKey);
};
var ordinaryGetOwnMetadata = function (MetadataKey, O, P) {
var metadataMap = getOrCreateMetadataMap(O, P, false);
return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey);
};
var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) {
getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);
};
var ordinaryOwnMetadataKeys = function (target, targetKey) {
var metadataMap = getOrCreateMetadataMap(target, targetKey, false);
var keys = [];
if (metadataMap) metadataMap.forEach(function (_, key) { push(keys, key); });
return keys;
};
var toMetadataKey = function (it) {
return it === undefined || typeof it == 'symbol' ? it : String(it);
};
module.exports = {
store: store,
getMap: getOrCreateMetadataMap,
has: ordinaryHasOwnMetadata,
get: ordinaryGetOwnMetadata,
set: ordinaryDefineOwnMetadata,
keys: ordinaryOwnMetadataKeys,
toKey: toMetadataKey
};
/***/ }),
/* 423 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var ReflectMetadataModule = __webpack_require__(422);
var anObject = __webpack_require__(30);
var toMetadataKey = ReflectMetadataModule.toKey;
var getOrCreateMetadataMap = ReflectMetadataModule.getMap;
var store = ReflectMetadataModule.store;
// `Reflect.deleteMetadata` method
// https://github.com/rbuckton/reflect-metadata
$({ target: 'Reflect', stat: true }, {
deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) {
var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]);
var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false);
if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false;
if (metadataMap.size) return true;
var targetMetadata = store.get(target);
targetMetadata['delete'](targetKey);
return !!targetMetadata.size || store['delete'](target);
}
});
/***/ }),
/* 424 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove from `core-js@4`
var $ = __webpack_require__(49);
var ReflectMetadataModule = __webpack_require__(422);
var anObject = __webpack_require__(30);
var getPrototypeOf = __webpack_require__(91);
var ordinaryHasOwnMetadata = ReflectMetadataModule.has;
var ordinaryGetOwnMetadata = ReflectMetadataModule.get;
var toMetadataKey = ReflectMetadataModule.toKey;
var ordinaryGetMetadata = function (MetadataKey, O, P) {
var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P);
var parent = getPrototypeOf(O);
return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined;
};
// `Reflect.getMetadata` method
// https://github.com/rbuckton/reflect-metadata
$({ target: 'Reflect', stat: true }, {
getMetadata: function getMetadata(metadataKey, target /* , targetKey */) {
var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]);
return ordinaryGetMetadata(metadataKey, anObject(target), targetKey);
}
});
/***/ }),
/* 425 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove from `core-js@4`
var $ = __webpack_require__(49);
var uncurryThis = __webpack_require__(6);
var ReflectMetadataModule = __webpack_require__(422);
var anObject = __webpack_require__(30);
var getPrototypeOf = __webpack_require__(91);
var $arrayUniqueBy = __webpack_require__(318);
var arrayUniqueBy = uncurryThis($arrayUniqueBy);
var concat = uncurryThis([].concat);
var ordinaryOwnMetadataKeys = ReflectMetadataModule.keys;
var toMetadataKey = ReflectMetadataModule.toKey;
var ordinaryMetadataKeys = function (O, P) {
var oKeys = ordinaryOwnMetadataKeys(O, P);
var parent = getPrototypeOf(O);
if (parent === null) return oKeys;
var pKeys = ordinaryMetadataKeys(parent, P);
return pKeys.length ? oKeys.length ? arrayUniqueBy(concat(oKeys, pKeys)) : pKeys : oKeys;
};
// `Reflect.getMetadataKeys` method
// https://github.com/rbuckton/reflect-metadata
$({ target: 'Reflect', stat: true }, {
getMetadataKeys: function getMetadataKeys(target /* , targetKey */) {
var targetKey = arguments.length < 2 ? undefined : toMetadataKey(arguments[1]);
return ordinaryMetadataKeys(anObject(target), targetKey);
}
});
/***/ }),
/* 426 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove from `core-js@4`
var $ = __webpack_require__(49);
var ReflectMetadataModule = __webpack_require__(422);
var anObject = __webpack_require__(30);
var ordinaryGetOwnMetadata = ReflectMetadataModule.get;
var toMetadataKey = ReflectMetadataModule.toKey;
// `Reflect.getOwnMetadata` method
// https://github.com/rbuckton/reflect-metadata
$({ target: 'Reflect', stat: true }, {
getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) {
var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]);
return ordinaryGetOwnMetadata(metadataKey, anObject(target), targetKey);
}
});
/***/ }),
/* 427 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove from `core-js@4`
var $ = __webpack_require__(49);
var ReflectMetadataModule = __webpack_require__(422);
var anObject = __webpack_require__(30);
var ordinaryOwnMetadataKeys = ReflectMetadataModule.keys;
var toMetadataKey = ReflectMetadataModule.toKey;
// `Reflect.getOwnMetadataKeys` method
// https://github.com/rbuckton/reflect-metadata
$({ target: 'Reflect', stat: true }, {
getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) {
var targetKey = arguments.length < 2 ? undefined : toMetadataKey(arguments[1]);
return ordinaryOwnMetadataKeys(anObject(target), targetKey);
}
});
/***/ }),
/* 428 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove from `core-js@4`
var $ = __webpack_require__(49);
var ReflectMetadataModule = __webpack_require__(422);
var anObject = __webpack_require__(30);
var getPrototypeOf = __webpack_require__(91);
var ordinaryHasOwnMetadata = ReflectMetadataModule.has;
var toMetadataKey = ReflectMetadataModule.toKey;
var ordinaryHasMetadata = function (MetadataKey, O, P) {
var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
if (hasOwn) return true;
var parent = getPrototypeOf(O);
return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false;
};
// `Reflect.hasMetadata` method
// https://github.com/rbuckton/reflect-metadata
$({ target: 'Reflect', stat: true }, {
hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) {
var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]);
return ordinaryHasMetadata(metadataKey, anObject(target), targetKey);
}
});
/***/ }),
/* 429 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove from `core-js@4`
var $ = __webpack_require__(49);
var ReflectMetadataModule = __webpack_require__(422);
var anObject = __webpack_require__(30);
var ordinaryHasOwnMetadata = ReflectMetadataModule.has;
var toMetadataKey = ReflectMetadataModule.toKey;
// `Reflect.hasOwnMetadata` method
// https://github.com/rbuckton/reflect-metadata
$({ target: 'Reflect', stat: true }, {
hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) {
var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]);
return ordinaryHasOwnMetadata(metadataKey, anObject(target), targetKey);
}
});
/***/ }),
/* 430 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var ReflectMetadataModule = __webpack_require__(422);
var anObject = __webpack_require__(30);
var toMetadataKey = ReflectMetadataModule.toKey;
var ordinaryDefineOwnMetadata = ReflectMetadataModule.set;
// `Reflect.metadata` method
// https://github.com/rbuckton/reflect-metadata
$({ target: 'Reflect', stat: true }, {
metadata: function metadata(metadataKey, metadataValue) {
return function decorator(target, key) {
ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetadataKey(key));
};
}
});
/***/ }),
/* 431 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var aSet = __webpack_require__(247);
var add = __webpack_require__(248).add;
// `Set.prototype.addAll` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Set', proto: true, real: true, forced: true }, {
addAll: function addAll(/* ...elements */) {
var set = aSet(this);
for (var k = 0, len = arguments.length; k < len; k++) {
add(set, arguments[k]);
} return set;
}
});
/***/ }),
/* 432 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var aSet = __webpack_require__(247);
var remove = __webpack_require__(248).remove;
// `Set.prototype.deleteAll` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Set', proto: true, real: true, forced: true }, {
deleteAll: function deleteAll(/* ...elements */) {
var collection = aSet(this);
var allDeleted = true;
var wasDeleted;
for (var k = 0, len = arguments.length; k < len; k++) {
wasDeleted = remove(collection, arguments[k]);
allDeleted = allDeleted && wasDeleted;
} return !!allDeleted;
}
});
/***/ }),
/* 433 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var toSetLike = __webpack_require__(434);
var $difference = __webpack_require__(246);
// `Set.prototype.difference` method
// https://github.com/tc39/proposal-set-methods
// TODO: Obsolete version, remove from `core-js@4`
$({ target: 'Set', proto: true, real: true, forced: true }, {
difference: function difference(other) {
return call($difference, this, toSetLike(other));
}
});
/***/ }),
/* 434 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var getBuiltIn = __webpack_require__(35);
var isCallable = __webpack_require__(28);
var isIterable = __webpack_require__(435);
var isObject = __webpack_require__(27);
var Set = getBuiltIn('Set');
var isSetLike = function (it) {
return isObject(it)
&& typeof it.size == 'number'
&& isCallable(it.has)
&& isCallable(it.keys);
};
// fallback old -> new set methods proposal arguments
module.exports = function (it) {
if (isSetLike(it)) return it;
return isIterable(it) ? new Set(it) : it;
};
/***/ }),
/* 435 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var classof = __webpack_require__(82);
var hasOwn = __webpack_require__(5);
var isNullOrUndefined = __webpack_require__(11);
var wellKnownSymbol = __webpack_require__(13);
var Iterators = __webpack_require__(101);
var ITERATOR = wellKnownSymbol('iterator');
var $Object = Object;
module.exports = function (it) {
if (isNullOrUndefined(it)) return false;
var O = $Object(it);
return O[ITERATOR] !== undefined
|| '@@iterator' in O
|| hasOwn(Iterators, classof(O));
};
/***/ }),
/* 436 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var bind = __webpack_require__(98);
var aSet = __webpack_require__(247);
var iterate = __webpack_require__(250);
// `Set.prototype.every` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Set', proto: true, real: true, forced: true }, {
every: function every(callbackfn /* , thisArg */) {
var set = aSet(this);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
return iterate(set, function (value) {
if (!boundFunction(value, value, set)) return false;
}, true) !== false;
}
});
/***/ }),
/* 437 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var bind = __webpack_require__(98);
var aSet = __webpack_require__(247);
var SetHelpers = __webpack_require__(248);
var iterate = __webpack_require__(250);
var Set = SetHelpers.Set;
var add = SetHelpers.add;
// `Set.prototype.filter` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Set', proto: true, real: true, forced: true }, {
filter: function filter(callbackfn /* , thisArg */) {
var set = aSet(this);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
var newSet = new Set();
iterate(set, function (value) {
if (boundFunction(value, value, set)) add(newSet, value);
});
return newSet;
}
});
/***/ }),
/* 438 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var bind = __webpack_require__(98);
var aSet = __webpack_require__(247);
var iterate = __webpack_require__(250);
// `Set.prototype.find` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Set', proto: true, real: true, forced: true }, {
find: function find(callbackfn /* , thisArg */) {
var set = aSet(this);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
var result = iterate(set, function (value) {
if (boundFunction(value, value, set)) return { value: value };
}, true);
return result && result.value;
}
});
/***/ }),
/* 439 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var SetHelpers = __webpack_require__(248);
var createCollectionFrom = __webpack_require__(388);
// `Set.from` method
// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from
$({ target: 'Set', stat: true, forced: true }, {
from: createCollectionFrom(SetHelpers.Set, SetHelpers.add, false)
});
/***/ }),
/* 440 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var toSetLike = __webpack_require__(434);
var $intersection = __webpack_require__(256);
// `Set.prototype.intersection` method
// https://github.com/tc39/proposal-set-methods
// TODO: Obsolete version, remove from `core-js@4`
$({ target: 'Set', proto: true, real: true, forced: true }, {
intersection: function intersection(other) {
return call($intersection, this, toSetLike(other));
}
});
/***/ }),
/* 441 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var toSetLike = __webpack_require__(434);
var $isDisjointFrom = __webpack_require__(258);
// `Set.prototype.isDisjointFrom` method
// https://github.com/tc39/proposal-set-methods
// TODO: Obsolete version, remove from `core-js@4`
$({ target: 'Set', proto: true, real: true, forced: true }, {
isDisjointFrom: function isDisjointFrom(other) {
return call($isDisjointFrom, this, toSetLike(other));
}
});
/***/ }),
/* 442 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var toSetLike = __webpack_require__(434);
var $isSubsetOf = __webpack_require__(260);
// `Set.prototype.isSubsetOf` method
// https://github.com/tc39/proposal-set-methods
// TODO: Obsolete version, remove from `core-js@4`
$({ target: 'Set', proto: true, real: true, forced: true }, {
isSubsetOf: function isSubsetOf(other) {
return call($isSubsetOf, this, toSetLike(other));
}
});
/***/ }),
/* 443 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var toSetLike = __webpack_require__(434);
var $isSupersetOf = __webpack_require__(262);
// `Set.prototype.isSupersetOf` method
// https://github.com/tc39/proposal-set-methods
// TODO: Obsolete version, remove from `core-js@4`
$({ target: 'Set', proto: true, real: true, forced: true }, {
isSupersetOf: function isSupersetOf(other) {
return call($isSupersetOf, this, toSetLike(other));
}
});
/***/ }),
/* 444 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var uncurryThis = __webpack_require__(6);
var aSet = __webpack_require__(247);
var iterate = __webpack_require__(250);
var toString = __webpack_require__(81);
var arrayJoin = uncurryThis([].join);
var push = uncurryThis([].push);
// `Set.prototype.join` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Set', proto: true, real: true, forced: true }, {
join: function join(separator) {
var set = aSet(this);
var sep = separator === undefined ? ',' : toString(separator);
var array = [];
iterate(set, function (value) {
push(array, value);
});
return arrayJoin(array, sep);
}
});
/***/ }),
/* 445 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var bind = __webpack_require__(98);
var aSet = __webpack_require__(247);
var SetHelpers = __webpack_require__(248);
var iterate = __webpack_require__(250);
var Set = SetHelpers.Set;
var add = SetHelpers.add;
// `Set.prototype.map` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Set', proto: true, real: true, forced: true }, {
map: function map(callbackfn /* , thisArg */) {
var set = aSet(this);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
var newSet = new Set();
iterate(set, function (value) {
add(newSet, boundFunction(value, value, set));
});
return newSet;
}
});
/***/ }),
/* 446 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var SetHelpers = __webpack_require__(248);
var createCollectionOf = __webpack_require__(397);
// `Set.of` method
// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of
$({ target: 'Set', stat: true, forced: true }, {
of: createCollectionOf(SetHelpers.Set, SetHelpers.add, false)
});
/***/ }),
/* 447 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var aCallable = __webpack_require__(38);
var aSet = __webpack_require__(247);
var iterate = __webpack_require__(250);
var $TypeError = TypeError;
// `Set.prototype.reduce` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Set', proto: true, real: true, forced: true }, {
reduce: function reduce(callbackfn /* , initialValue */) {
var set = aSet(this);
var noInitial = arguments.length < 2;
var accumulator = noInitial ? undefined : arguments[1];
aCallable(callbackfn);
iterate(set, function (value) {
if (noInitial) {
noInitial = false;
accumulator = value;
} else {
accumulator = callbackfn(accumulator, value, value, set);
}
});
if (noInitial) throw new $TypeError('Reduce of empty set with no initial value');
return accumulator;
}
});
/***/ }),
/* 448 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var bind = __webpack_require__(98);
var aSet = __webpack_require__(247);
var iterate = __webpack_require__(250);
// `Set.prototype.some` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Set', proto: true, real: true, forced: true }, {
some: function some(callbackfn /* , thisArg */) {
var set = aSet(this);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
return iterate(set, function (value) {
if (boundFunction(value, value, set)) return true;
}, true) === true;
}
});
/***/ }),
/* 449 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var toSetLike = __webpack_require__(434);
var $symmetricDifference = __webpack_require__(264);
// `Set.prototype.symmetricDifference` method
// https://github.com/tc39/proposal-set-methods
// TODO: Obsolete version, remove from `core-js@4`
$({ target: 'Set', proto: true, real: true, forced: true }, {
symmetricDifference: function symmetricDifference(other) {
return call($symmetricDifference, this, toSetLike(other));
}
});
/***/ }),
/* 450 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var call = __webpack_require__(33);
var toSetLike = __webpack_require__(434);
var $union = __webpack_require__(267);
// `Set.prototype.union` method
// https://github.com/tc39/proposal-set-methods
// TODO: Obsolete version, remove from `core-js@4`
$({ target: 'Set', proto: true, real: true, forced: true }, {
union: function union(other) {
return call($union, this, toSetLike(other));
}
});
/***/ }),
/* 451 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var cooked = __webpack_require__(452);
// `String.cooked` method
// https://github.com/tc39/proposal-string-cooked
$({ target: 'String', stat: true, forced: true }, {
cooked: cooked
});
/***/ }),
/* 452 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
var toIndexedObject = __webpack_require__(44);
var toString = __webpack_require__(81);
var lengthOfArrayLike = __webpack_require__(67);
var $TypeError = TypeError;
var push = uncurryThis([].push);
var join = uncurryThis([].join);
// `String.cooked` method
// https://tc39.es/proposal-string-cooked/
module.exports = function cooked(template /* , ...substitutions */) {
var cookedTemplate = toIndexedObject(template);
var literalSegments = lengthOfArrayLike(cookedTemplate);
if (!literalSegments) return '';
var argumentsLength = arguments.length;
var elements = [];
var i = 0;
while (true) {
var nextVal = cookedTemplate[i++];
if (nextVal === undefined) throw new $TypeError('Incorrect template');
push(elements, toString(nextVal));
if (i === literalSegments) return join(elements, '');
if (i < argumentsLength) push(elements, toString(arguments[i]));
}
};
/***/ }),
/* 453 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var createIteratorConstructor = __webpack_require__(342);
var createIterResultObject = __webpack_require__(151);
var requireObjectCoercible = __webpack_require__(10);
var toString = __webpack_require__(81);
var InternalStateModule = __webpack_require__(55);
var StringMultibyteModule = __webpack_require__(454);
var codeAt = StringMultibyteModule.codeAt;
var charAt = StringMultibyteModule.charAt;
var STRING_ITERATOR = 'String Iterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
// TODO: unify with String#@@iterator
var $StringIterator = createIteratorConstructor(function StringIterator(string) {
setInternalState(this, {
type: STRING_ITERATOR,
string: string,
index: 0
});
}, 'String', function next() {
var state = getInternalState(this);
var string = state.string;
var index = state.index;
var point;
if (index >= string.length) return createIterResultObject(undefined, true);
point = charAt(string, index);
state.index += point.length;
return createIterResultObject({ codePoint: codeAt(point, 0), position: index }, false);
});
// `String.prototype.codePoints` method
// https://github.com/tc39/proposal-string-prototype-codepoints
$({ target: 'String', proto: true, forced: true }, {
codePoints: function codePoints() {
return new $StringIterator(toString(requireObjectCoercible(this)));
}
});
/***/ }),
/* 454 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
var toIntegerOrInfinity = __webpack_require__(65);
var toString = __webpack_require__(81);
var requireObjectCoercible = __webpack_require__(10);
var charAt = uncurryThis(''.charAt);
var charCodeAt = uncurryThis(''.charCodeAt);
var stringSlice = uncurryThis(''.slice);
var createMethod = function (CONVERT_TO_STRING) {
return function ($this, pos) {
var S = toString(requireObjectCoercible($this));
var position = toIntegerOrInfinity(pos);
var size = S.length;
var first, second;
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
first = charCodeAt(S, position);
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|| (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
? CONVERT_TO_STRING
? charAt(S, position)
: first
: CONVERT_TO_STRING
? stringSlice(S, position, position + 2)
: (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
};
};
module.exports = {
// `String.prototype.codePointAt` method
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
codeAt: createMethod(false),
// `String.prototype.at` method
// https://github.com/mathiasbynens/String.prototype.at
charAt: createMethod(true)
};
/***/ }),
/* 455 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var FREEZING = __webpack_require__(179);
var $ = __webpack_require__(49);
var makeBuiltIn = __webpack_require__(52);
var uncurryThis = __webpack_require__(6);
var apply = __webpack_require__(72);
var anObject = __webpack_require__(30);
var toObject = __webpack_require__(9);
var isCallable = __webpack_require__(28);
var lengthOfArrayLike = __webpack_require__(67);
var defineProperty = __webpack_require__(23).f;
var createArrayFromList = __webpack_require__(181);
var WeakMapHelpers = __webpack_require__(300);
var cooked = __webpack_require__(452);
var parse = __webpack_require__(456);
var whitespaces = __webpack_require__(241);
var DedentMap = new WeakMapHelpers.WeakMap();
var weakMapGet = WeakMapHelpers.get;
var weakMapHas = WeakMapHelpers.has;
var weakMapSet = WeakMapHelpers.set;
var $Array = Array;
var $TypeError = TypeError;
// eslint-disable-next-line es/no-object-freeze -- safe
var freeze = Object.freeze || Object;
// eslint-disable-next-line es/no-object-isfrozen -- safe
var isFrozen = Object.isFrozen;
var min = Math.min;
var charAt = uncurryThis(''.charAt);
var stringSlice = uncurryThis(''.slice);
var split = uncurryThis(''.split);
var exec = uncurryThis(/./.exec);
var NEW_LINE = /([\n\u2028\u2029]|\r\n?)/g;
var LEADING_WHITESPACE = RegExp('^[' + whitespaces + ']*');
var NON_WHITESPACE = RegExp('[^' + whitespaces + ']');
var INVALID_TAG = 'Invalid tag';
var INVALID_OPENING_LINE = 'Invalid opening line';
var INVALID_CLOSING_LINE = 'Invalid closing line';
var dedentTemplateStringsArray = function (template) {
var rawInput = template.raw;
// https://github.com/tc39/proposal-string-dedent/issues/75
if (FREEZING && !isFrozen(rawInput)) throw new $TypeError('Raw template should be frozen');
if (weakMapHas(DedentMap, rawInput)) return weakMapGet(DedentMap, rawInput);
var raw = dedentStringsArray(rawInput);
var cookedArr = cookStrings(raw);
defineProperty(cookedArr, 'raw', {
value: freeze(raw)
});
freeze(cookedArr);
weakMapSet(DedentMap, rawInput, cookedArr);
return cookedArr;
};
var dedentStringsArray = function (template) {
var t = toObject(template);
var length = lengthOfArrayLike(t);
var blocks = $Array(length);
var dedented = $Array(length);
var i = 0;
var lines, common, quasi, k;
if (!length) throw new $TypeError(INVALID_TAG);
for (; i < length; i++) {
var element = t[i];
if (typeof element == 'string') blocks[i] = split(element, NEW_LINE);
else throw new $TypeError(INVALID_TAG);
}
for (i = 0; i < length; i++) {
var lastSplit = i + 1 === length;
lines = blocks[i];
if (i === 0) {
if (lines.length === 1 || lines[0].length > 0) {
throw new $TypeError(INVALID_OPENING_LINE);
}
lines[1] = '';
}
if (lastSplit) {
if (lines.length === 1 || exec(NON_WHITESPACE, lines[lines.length - 1])) {
throw new $TypeError(INVALID_CLOSING_LINE);
}
lines[lines.length - 2] = '';
lines[lines.length - 1] = '';
}
// eslint-disable-next-line sonarjs/no-redundant-assignments -- false positive, https://github.com/SonarSource/SonarJS/issues/4767
for (var j = 2; j < lines.length; j += 2) {
var text = lines[j];
var lineContainsTemplateExpression = j + 1 === lines.length && !lastSplit;
var leading = exec(LEADING_WHITESPACE, text)[0];
if (!lineContainsTemplateExpression && leading.length === text.length) {
lines[j] = '';
continue;
}
common = commonLeadingIndentation(leading, common);
}
}
var count = common ? common.length : 0;
for (i = 0; i < length; i++) {
lines = blocks[i];
quasi = lines[0];
k = 1;
for (; k < lines.length; k += 2) {
quasi += lines[k] + stringSlice(lines[k + 1], count);
}
dedented[i] = quasi;
}
return dedented;
};
var commonLeadingIndentation = function (a, b) {
if (b === undefined || a === b) return a;
var i = 0;
for (var len = min(a.length, b.length); i < len; i++) {
if (charAt(a, i) !== charAt(b, i)) break;
}
return stringSlice(a, 0, i);
};
var cookStrings = function (raw) {
var i = 0;
var length = raw.length;
var result = $Array(length);
for (; i < length; i++) {
result[i] = parse(raw[i]);
} return result;
};
var makeDedentTag = function (tag) {
return makeBuiltIn(function (template /* , ...substitutions */) {
var args = createArrayFromList(arguments);
args[0] = dedentTemplateStringsArray(anObject(template));
return apply(tag, this, args);
}, '');
};
var cookedDedentTag = makeDedentTag(cooked);
// `String.dedent` method
// https://github.com/tc39/proposal-string-dedent
$({ target: 'String', stat: true, forced: true }, {
dedent: function dedent(templateOrFn /* , ...substitutions */) {
anObject(templateOrFn);
if (isCallable(templateOrFn)) return makeDedentTag(templateOrFn);
return apply(cookedDedentTag, this, arguments);
}
});
/***/ }),
/* 456 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// adapted from https://github.com/jridgewell/string-dedent
var getBuiltIn = __webpack_require__(35);
var uncurryThis = __webpack_require__(6);
var fromCharCode = String.fromCharCode;
var fromCodePoint = getBuiltIn('String', 'fromCodePoint');
var charAt = uncurryThis(''.charAt);
var charCodeAt = uncurryThis(''.charCodeAt);
var stringIndexOf = uncurryThis(''.indexOf);
var stringSlice = uncurryThis(''.slice);
var ZERO_CODE = 48;
var NINE_CODE = 57;
var LOWER_A_CODE = 97;
var LOWER_F_CODE = 102;
var UPPER_A_CODE = 65;
var UPPER_F_CODE = 70;
var isDigit = function (str, index) {
var c = charCodeAt(str, index);
return c >= ZERO_CODE && c <= NINE_CODE;
};
var parseHex = function (str, index, end) {
if (end >= str.length) return -1;
var n = 0;
for (; index < end; index++) {
var c = hexToInt(charCodeAt(str, index));
if (c === -1) return -1;
n = n * 16 + c;
}
return n;
};
var hexToInt = function (c) {
if (c >= ZERO_CODE && c <= NINE_CODE) return c - ZERO_CODE;
if (c >= LOWER_A_CODE && c <= LOWER_F_CODE) return c - LOWER_A_CODE + 10;
if (c >= UPPER_A_CODE && c <= UPPER_F_CODE) return c - UPPER_A_CODE + 10;
return -1;
};
module.exports = function (raw) {
var out = '';
var start = 0;
// We need to find every backslash escape sequence, and cook the escape into a real char.
var i = 0;
var n;
while ((i = stringIndexOf(raw, '\\', i)) > -1) {
out += stringSlice(raw, start, i);
// If the backslash is the last char of the string, then it was an invalid sequence.
// This can't actually happen in a tagged template literal, but could happen if you manually
// invoked the tag with an array.
if (++i === raw.length) return;
var next = charAt(raw, i++);
switch (next) {
// Escaped control codes need to be individually processed.
case 'b':
out += '\b';
break;
case 't':
out += '\t';
break;
case 'n':
out += '\n';
break;
case 'v':
out += '\v';
break;
case 'f':
out += '\f';
break;
case 'r':
out += '\r';
break;
// Escaped line terminators just skip the char.
case '\r':
// Treat `\r\n` as a single terminator.
if (i < raw.length && charAt(raw, i) === '\n') ++i;
// break omitted
case '\n':
case '\u2028':
case '\u2029':
break;
// `\0` is a null control char, but `\0` followed by another digit is an illegal octal escape.
case '0':
if (isDigit(raw, i)) return;
out += '\0';
break;
// Hex escapes must contain 2 hex chars.
case 'x':
n = parseHex(raw, i, i + 2);
if (n === -1) return;
i += 2;
out += fromCharCode(n);
break;
// Unicode escapes contain either 4 chars, or an unlimited number between `{` and `}`.
// The hex value must not overflow 0x10FFFF.
case 'u':
if (i < raw.length && charAt(raw, i) === '{') {
var end = stringIndexOf(raw, '}', ++i);
if (end === -1) return;
n = parseHex(raw, i, end);
i = end + 1;
} else {
n = parseHex(raw, i, i + 4);
i += 4;
}
if (n === -1 || n > 0x10FFFF) return;
out += fromCodePoint(n);
break;
default:
if (isDigit(next, 0)) return;
out += next;
}
start = i;
}
return out + stringSlice(raw, start);
};
/***/ }),
/* 457 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var defineWellKnownSymbol = __webpack_require__(3);
// `Symbol.customMatcher` well-known symbol
// https://github.com/tc39/proposal-pattern-matching
defineWellKnownSymbol('customMatcher');
/***/ }),
/* 458 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var isRegisteredSymbol = __webpack_require__(459);
// `Symbol.isRegisteredSymbol` method
// https://tc39.es/proposal-symbol-predicates/#sec-symbol-isregisteredsymbol
$({ target: 'Symbol', stat: true }, {
isRegisteredSymbol: isRegisteredSymbol
});
/***/ }),
/* 459 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var getBuiltIn = __webpack_require__(35);
var uncurryThis = __webpack_require__(6);
var Symbol = getBuiltIn('Symbol');
var keyFor = Symbol.keyFor;
var thisSymbolValue = uncurryThis(Symbol.prototype.valueOf);
// `Symbol.isRegisteredSymbol` method
// https://tc39.es/proposal-symbol-predicates/#sec-symbol-isregisteredsymbol
module.exports = Symbol.isRegisteredSymbol || function isRegisteredSymbol(value) {
try {
return keyFor(thisSymbolValue(value)) !== undefined;
} catch (error) {
return false;
}
};
/***/ }),
/* 460 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var isRegisteredSymbol = __webpack_require__(459);
// `Symbol.isRegistered` method
// obsolete version of https://tc39.es/proposal-symbol-predicates/#sec-symbol-isregisteredsymbol
$({ target: 'Symbol', stat: true, name: 'isRegisteredSymbol' }, {
isRegistered: isRegisteredSymbol
});
/***/ }),
/* 461 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var isWellKnownSymbol = __webpack_require__(462);
// `Symbol.isWellKnownSymbol` method
// https://tc39.es/proposal-symbol-predicates/#sec-symbol-iswellknownsymbol
// We should patch it for newly added well-known symbols. If it's not required, this module just will not be injected
$({ target: 'Symbol', stat: true, forced: true }, {
isWellKnownSymbol: isWellKnownSymbol
});
/***/ }),
/* 462 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var shared = __webpack_require__(14);
var getBuiltIn = __webpack_require__(35);
var uncurryThis = __webpack_require__(6);
var isSymbol = __webpack_require__(34);
var wellKnownSymbol = __webpack_require__(13);
var Symbol = getBuiltIn('Symbol');
var $isWellKnownSymbol = Symbol.isWellKnownSymbol;
var getOwnPropertyNames = getBuiltIn('Object', 'getOwnPropertyNames');
var thisSymbolValue = uncurryThis(Symbol.prototype.valueOf);
var WellKnownSymbolsStore = shared('wks');
for (var i = 0, symbolKeys = getOwnPropertyNames(Symbol), symbolKeysLength = symbolKeys.length; i < symbolKeysLength; i++) {
// some old engines throws on access to some keys like `arguments` or `caller`
try {
var symbolKey = symbolKeys[i];
if (isSymbol(Symbol[symbolKey])) wellKnownSymbol(symbolKey);
} catch (error) { /* empty */ }
}
// `Symbol.isWellKnownSymbol` method
// https://tc39.es/proposal-symbol-predicates/#sec-symbol-iswellknownsymbol
// We should patch it for newly added well-known symbols. If it's not required, this module just will not be injected
module.exports = function isWellKnownSymbol(value) {
if ($isWellKnownSymbol && $isWellKnownSymbol(value)) return true;
try {
var symbol = thisSymbolValue(value);
for (var j = 0, keys = getOwnPropertyNames(WellKnownSymbolsStore), keysLength = keys.length; j < keysLength; j++) {
// eslint-disable-next-line eqeqeq -- polyfilled symbols case
if (WellKnownSymbolsStore[keys[j]] == symbol) return true;
}
} catch (error) { /* empty */ }
return false;
};
/***/ }),
/* 463 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var isWellKnownSymbol = __webpack_require__(462);
// `Symbol.isWellKnown` method
// obsolete version of https://tc39.es/proposal-symbol-predicates/#sec-symbol-iswellknownsymbol
// We should patch it for newly added well-known symbols. If it's not required, this module just will not be injected
$({ target: 'Symbol', stat: true, name: 'isWellKnownSymbol', forced: true }, {
isWellKnown: isWellKnownSymbol
});
/***/ }),
/* 464 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var defineWellKnownSymbol = __webpack_require__(3);
// `Symbol.matcher` well-known symbol
// https://github.com/tc39/proposal-pattern-matching
defineWellKnownSymbol('matcher');
/***/ }),
/* 465 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var defineWellKnownSymbol = __webpack_require__(3);
// `Symbol.metadata` well-known symbol
// https://github.com/tc39/proposal-decorators
defineWellKnownSymbol('metadata');
/***/ }),
/* 466 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove from `core-js@4`
var defineWellKnownSymbol = __webpack_require__(3);
// `Symbol.metadataKey` well-known symbol
// https://github.com/tc39/proposal-decorator-metadata
defineWellKnownSymbol('metadataKey');
/***/ }),
/* 467 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var defineWellKnownSymbol = __webpack_require__(3);
// `Symbol.observable` well-known symbol
// https://github.com/tc39/proposal-observable
defineWellKnownSymbol('observable');
/***/ }),
/* 468 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove from `core-js@4`
var getBuiltIn = __webpack_require__(35);
var aConstructor = __webpack_require__(199);
var arrayFromAsync = __webpack_require__(228);
var ArrayBufferViewCore = __webpack_require__(276);
var arrayFromConstructorAndList = __webpack_require__(119);
var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
var exportTypedArrayStaticMethod = ArrayBufferViewCore.exportTypedArrayStaticMethod;
// `%TypedArray%.fromAsync` method
// https://github.com/tc39/proposal-array-from-async
exportTypedArrayStaticMethod('fromAsync', function fromAsync(asyncItems /* , mapfn = undefined, thisArg = undefined */) {
var C = this;
var argumentsLength = arguments.length;
var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
var thisArg = argumentsLength > 2 ? arguments[2] : undefined;
return new (getBuiltIn('Promise'))(function (resolve) {
aConstructor(C);
resolve(arrayFromAsync(asyncItems, mapfn, thisArg));
}).then(function (list) {
return arrayFromConstructorAndList(aTypedArrayConstructor(C), list);
});
}, true);
/***/ }),
/* 469 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(276);
var $filterReject = __webpack_require__(304).filterReject;
var fromSameTypeAndList = __webpack_require__(470);
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.filterReject` method
// https://github.com/tc39/proposal-array-filtering
exportTypedArrayMethod('filterReject', function filterReject(callbackfn /* , thisArg */) {
var list = $filterReject(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
return fromSameTypeAndList(this, list);
}, true);
/***/ }),
/* 470 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var arrayFromConstructorAndList = __webpack_require__(119);
var getTypedArrayConstructor = __webpack_require__(276).getTypedArrayConstructor;
module.exports = function (instance, list) {
return arrayFromConstructorAndList(getTypedArrayConstructor(instance), list);
};
/***/ }),
/* 471 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove from `core-js@4`
var ArrayBufferViewCore = __webpack_require__(276);
var $group = __webpack_require__(308);
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.groupBy` method
// https://github.com/tc39/proposal-array-grouping
exportTypedArrayMethod('groupBy', function groupBy(callbackfn /* , thisArg */) {
var thisArg = arguments.length > 1 ? arguments[1] : undefined;
return $group(aTypedArray(this), callbackfn, thisArg, getTypedArrayConstructor);
}, true);
/***/ }),
/* 472 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove from `core-js@4`
var ArrayBufferViewCore = __webpack_require__(276);
var lengthOfArrayLike = __webpack_require__(67);
var isBigIntArray = __webpack_require__(284);
var toAbsoluteIndex = __webpack_require__(64);
var toBigInt = __webpack_require__(285);
var toIntegerOrInfinity = __webpack_require__(65);
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var max = Math.max;
var min = Math.min;
// `%TypedArray%.prototype.toSpliced` method
// https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toSpliced
exportTypedArrayMethod('toSpliced', function toSpliced(start, deleteCount /* , ...items */) {
var O = aTypedArray(this);
var C = getTypedArrayConstructor(O);
var len = lengthOfArrayLike(O);
var actualStart = toAbsoluteIndex(start, len);
var argumentsLength = arguments.length;
var k = 0;
var insertCount, actualDeleteCount, thisIsBigIntArray, convertedItems, value, newLen, A;
if (argumentsLength === 0) {
insertCount = actualDeleteCount = 0;
} else if (argumentsLength === 1) {
insertCount = 0;
actualDeleteCount = len - actualStart;
} else {
actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);
insertCount = argumentsLength - 2;
if (insertCount) {
convertedItems = new C(insertCount);
thisIsBigIntArray = isBigIntArray(convertedItems);
for (var i = 2; i < argumentsLength; i++) {
value = arguments[i];
// FF30- typed arrays doesn't properly convert objects to typed array values
convertedItems[i - 2] = thisIsBigIntArray ? toBigInt(value) : +value;
}
}
}
newLen = len + insertCount - actualDeleteCount;
A = new C(newLen);
for (; k < actualStart; k++) A[k] = O[k];
for (; k < actualStart + insertCount; k++) A[k] = convertedItems[k - actualStart];
for (; k < newLen; k++) A[k] = O[k + actualDeleteCount - insertCount];
return A;
}, true);
/***/ }),
/* 473 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
var ArrayBufferViewCore = __webpack_require__(276);
var arrayFromConstructorAndList = __webpack_require__(119);
var $arrayUniqueBy = __webpack_require__(318);
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var arrayUniqueBy = uncurryThis($arrayUniqueBy);
// `%TypedArray%.prototype.uniqueBy` method
// https://github.com/tc39/proposal-array-unique
exportTypedArrayMethod('uniqueBy', function uniqueBy(resolver) {
aTypedArray(this);
return arrayFromConstructorAndList(getTypedArrayConstructor(this), arrayUniqueBy(this, resolver));
}, true);
/***/ }),
/* 474 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var aWeakMap = __webpack_require__(299);
var remove = __webpack_require__(300).remove;
// `WeakMap.prototype.deleteAll` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'WeakMap', proto: true, real: true, forced: true }, {
deleteAll: function deleteAll(/* ...elements */) {
var collection = aWeakMap(this);
var allDeleted = true;
var wasDeleted;
for (var k = 0, len = arguments.length; k < len; k++) {
wasDeleted = remove(collection, arguments[k]);
allDeleted = allDeleted && wasDeleted;
} return !!allDeleted;
}
});
/***/ }),
/* 475 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var WeakMapHelpers = __webpack_require__(300);
var createCollectionFrom = __webpack_require__(388);
// `WeakMap.from` method
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from
$({ target: 'WeakMap', stat: true, forced: true }, {
from: createCollectionFrom(WeakMapHelpers.WeakMap, WeakMapHelpers.set, true)
});
/***/ }),
/* 476 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var WeakMapHelpers = __webpack_require__(300);
var createCollectionOf = __webpack_require__(397);
// `WeakMap.of` method
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of
$({ target: 'WeakMap', stat: true, forced: true }, {
of: createCollectionOf(WeakMapHelpers.WeakMap, WeakMapHelpers.set, true)
});
/***/ }),
/* 477 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var aWeakMap = __webpack_require__(299);
var WeakMapHelpers = __webpack_require__(300);
var get = WeakMapHelpers.get;
var has = WeakMapHelpers.has;
var set = WeakMapHelpers.set;
// `WeakMap.prototype.emplace` method
// https://github.com/tc39/proposal-upsert
$({ target: 'WeakMap', proto: true, real: true, forced: true }, {
emplace: function emplace(key, handler) {
var map = aWeakMap(this);
var value, inserted;
if (has(map, key)) {
value = get(map, key);
if ('update' in handler) {
value = handler.update(value, key, map);
set(map, key, value);
} return value;
}
inserted = handler.insert(key, map);
set(map, key, inserted);
return inserted;
}
});
/***/ }),
/* 478 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var aWeakSet = __webpack_require__(479);
var add = __webpack_require__(480).add;
// `WeakSet.prototype.addAll` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'WeakSet', proto: true, real: true, forced: true }, {
addAll: function addAll(/* ...elements */) {
var set = aWeakSet(this);
for (var k = 0, len = arguments.length; k < len; k++) {
add(set, arguments[k]);
} return set;
}
});
/***/ }),
/* 479 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var has = __webpack_require__(480).has;
// Perform ? RequireInternalSlot(M, [[WeakSetData]])
module.exports = function (it) {
has(it);
return it;
};
/***/ }),
/* 480 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(6);
// eslint-disable-next-line es/no-weak-set -- safe
var WeakSetPrototype = WeakSet.prototype;
module.exports = {
// eslint-disable-next-line es/no-weak-set -- safe
WeakSet: WeakSet,
add: uncurryThis(WeakSetPrototype.add),
has: uncurryThis(WeakSetPrototype.has),
remove: uncurryThis(WeakSetPrototype['delete'])
};
/***/ }),
/* 481 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var aWeakSet = __webpack_require__(479);
var remove = __webpack_require__(480).remove;
// `WeakSet.prototype.deleteAll` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'WeakSet', proto: true, real: true, forced: true }, {
deleteAll: function deleteAll(/* ...elements */) {
var collection = aWeakSet(this);
var allDeleted = true;
var wasDeleted;
for (var k = 0, len = arguments.length; k < len; k++) {
wasDeleted = remove(collection, arguments[k]);
allDeleted = allDeleted && wasDeleted;
} return !!allDeleted;
}
});
/***/ }),
/* 482 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var WeakSetHelpers = __webpack_require__(480);
var createCollectionFrom = __webpack_require__(388);
// `WeakSet.from` method
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from
$({ target: 'WeakSet', stat: true, forced: true }, {
from: createCollectionFrom(WeakSetHelpers.WeakSet, WeakSetHelpers.add, false)
});
/***/ }),
/* 483 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var WeakSetHelpers = __webpack_require__(480);
var createCollectionOf = __webpack_require__(397);
// `WeakSet.of` method
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of
$({ target: 'WeakSet', stat: true, forced: true }, {
of: createCollectionOf(WeakSetHelpers.WeakSet, WeakSetHelpers.add, false)
});
/***/ }),
/* 484 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var getBuiltIn = __webpack_require__(35);
var getBuiltInNodeModule = __webpack_require__(138);
var fails = __webpack_require__(8);
var create = __webpack_require__(93);
var createPropertyDescriptor = __webpack_require__(43);
var defineProperty = __webpack_require__(23).f;
var defineBuiltIn = __webpack_require__(51);
var defineBuiltInAccessor = __webpack_require__(130);
var hasOwn = __webpack_require__(5);
var anInstance = __webpack_require__(144);
var anObject = __webpack_require__(30);
var errorToString = __webpack_require__(485);
var normalizeStringArgument = __webpack_require__(80);
var DOMExceptionConstants = __webpack_require__(486);
var clearErrorStack = __webpack_require__(86);
var InternalStateModule = __webpack_require__(55);
var DESCRIPTORS = __webpack_require__(24);
var IS_PURE = __webpack_require__(16);
var DOM_EXCEPTION = 'DOMException';
var DATA_CLONE_ERR = 'DATA_CLONE_ERR';
var Error = getBuiltIn('Error');
// NodeJS < 17.0 does not expose `DOMException` to global
var NativeDOMException = getBuiltIn(DOM_EXCEPTION) || (function () {
try {
// NodeJS < 15.0 does not expose `MessageChannel` to global
var MessageChannel = getBuiltIn('MessageChannel') || getBuiltInNodeModule('worker_threads').MessageChannel;
// eslint-disable-next-line es/no-weak-map, unicorn/require-post-message-target-origin -- safe
new MessageChannel().port1.postMessage(new WeakMap());
} catch (error) {
if (error.name === DATA_CLONE_ERR && error.code === 25) return error.constructor;
}
})();
var NativeDOMExceptionPrototype = NativeDOMException && NativeDOMException.prototype;
var ErrorPrototype = Error.prototype;
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(DOM_EXCEPTION);
var HAS_STACK = 'stack' in new Error(DOM_EXCEPTION);
var codeFor = function (name) {
return hasOwn(DOMExceptionConstants, name) && DOMExceptionConstants[name].m ? DOMExceptionConstants[name].c : 0;
};
var $DOMException = function DOMException() {
anInstance(this, DOMExceptionPrototype);
var argumentsLength = arguments.length;
var message = normalizeStringArgument(argumentsLength < 1 ? undefined : arguments[0]);
var name = normalizeStringArgument(argumentsLength < 2 ? undefined : arguments[1], 'Error');
var code = codeFor(name);
setInternalState(this, {
type: DOM_EXCEPTION,
name: name,
message: message,
code: code
});
if (!DESCRIPTORS) {
this.name = name;
this.message = message;
this.code = code;
}
if (HAS_STACK) {
var error = new Error(message);
error.name = DOM_EXCEPTION;
defineProperty(this, 'stack', createPropertyDescriptor(1, clearErrorStack(error.stack, 1)));
}
};
var DOMExceptionPrototype = $DOMException.prototype = create(ErrorPrototype);
var createGetterDescriptor = function (get) {
return { enumerable: true, configurable: true, get: get };
};
var getterFor = function (key) {
return createGetterDescriptor(function () {
return getInternalState(this)[key];
});
};
if (DESCRIPTORS) {
// `DOMException.prototype.code` getter
defineBuiltInAccessor(DOMExceptionPrototype, 'code', getterFor('code'));
// `DOMException.prototype.message` getter
defineBuiltInAccessor(DOMExceptionPrototype, 'message', getterFor('message'));
// `DOMException.prototype.name` getter
defineBuiltInAccessor(DOMExceptionPrototype, 'name', getterFor('name'));
}
defineProperty(DOMExceptionPrototype, 'constructor', createPropertyDescriptor(1, $DOMException));
// FF36- DOMException is a function, but can't be constructed
var INCORRECT_CONSTRUCTOR = fails(function () {
return !(new NativeDOMException() instanceof Error);
});
// Safari 10.1 / Chrome 32- / IE8- DOMException.prototype.toString bugs
var INCORRECT_TO_STRING = INCORRECT_CONSTRUCTOR || fails(function () {
return ErrorPrototype.toString !== errorToString || String(new NativeDOMException(1, 2)) !== '2: 1';
});
// Deno 1.6.3- DOMException.prototype.code just missed
var INCORRECT_CODE = INCORRECT_CONSTRUCTOR || fails(function () {
return new NativeDOMException(1, 'DataCloneError').code !== 25;
});
// Deno 1.6.3- DOMException constants just missed
var MISSED_CONSTANTS = INCORRECT_CONSTRUCTOR
|| NativeDOMException[DATA_CLONE_ERR] !== 25
|| NativeDOMExceptionPrototype[DATA_CLONE_ERR] !== 25;
var FORCED_CONSTRUCTOR = IS_PURE ? INCORRECT_TO_STRING || INCORRECT_CODE || MISSED_CONSTANTS : INCORRECT_CONSTRUCTOR;
// `DOMException` constructor
// https://webidl.spec.whatwg.org/#idl-DOMException
$({ global: true, constructor: true, forced: FORCED_CONSTRUCTOR }, {
DOMException: FORCED_CONSTRUCTOR ? $DOMException : NativeDOMException
});
var PolyfilledDOMException = getBuiltIn(DOM_EXCEPTION);
var PolyfilledDOMExceptionPrototype = PolyfilledDOMException.prototype;
if (INCORRECT_TO_STRING && (IS_PURE || NativeDOMException === PolyfilledDOMException)) {
defineBuiltIn(PolyfilledDOMExceptionPrototype, 'toString', errorToString);
}
if (INCORRECT_CODE && DESCRIPTORS && NativeDOMException === PolyfilledDOMException) {
defineBuiltInAccessor(PolyfilledDOMExceptionPrototype, 'code', createGetterDescriptor(function () {
return codeFor(anObject(this).name);
}));
}
// `DOMException` constants
for (var key in DOMExceptionConstants) if (hasOwn(DOMExceptionConstants, key)) {
var constant = DOMExceptionConstants[key];
var constantName = constant.s;
var descriptor = createPropertyDescriptor(6, constant.c);
if (!hasOwn(PolyfilledDOMException, constantName)) {
defineProperty(PolyfilledDOMException, constantName, descriptor);
}
if (!hasOwn(PolyfilledDOMExceptionPrototype, constantName)) {
defineProperty(PolyfilledDOMExceptionPrototype, constantName, descriptor);
}
}
/***/ }),
/* 485 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(24);
var fails = __webpack_require__(8);
var anObject = __webpack_require__(30);
var normalizeStringArgument = __webpack_require__(80);
var nativeErrorToString = Error.prototype.toString;
var INCORRECT_TO_STRING = fails(function () {
if (DESCRIPTORS) {
// Chrome 32- incorrectly call accessor
// eslint-disable-next-line es/no-object-create, es/no-object-defineproperty -- safe
var object = Object.create(Object.defineProperty({}, 'name', { get: function () {
return this === object;
} }));
if (nativeErrorToString.call(object) !== 'true') return true;
}
// FF10- does not properly handle non-strings
return nativeErrorToString.call({ message: 1, name: 2 }) !== '2: 1'
// IE8 does not properly handle defaults
|| nativeErrorToString.call({}) !== 'Error';
});
module.exports = INCORRECT_TO_STRING ? function toString() {
var O = anObject(this);
var name = normalizeStringArgument(O.name, 'Error');
var message = normalizeStringArgument(O.message);
return !name ? message : !message ? name : name + ': ' + message;
} : nativeErrorToString;
/***/ }),
/* 486 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = {
IndexSizeError: { s: 'INDEX_SIZE_ERR', c: 1, m: 1 },
DOMStringSizeError: { s: 'DOMSTRING_SIZE_ERR', c: 2, m: 0 },
HierarchyRequestError: { s: 'HIERARCHY_REQUEST_ERR', c: 3, m: 1 },
WrongDocumentError: { s: 'WRONG_DOCUMENT_ERR', c: 4, m: 1 },
InvalidCharacterError: { s: 'INVALID_CHARACTER_ERR', c: 5, m: 1 },
NoDataAllowedError: { s: 'NO_DATA_ALLOWED_ERR', c: 6, m: 0 },
NoModificationAllowedError: { s: 'NO_MODIFICATION_ALLOWED_ERR', c: 7, m: 1 },
NotFoundError: { s: 'NOT_FOUND_ERR', c: 8, m: 1 },
NotSupportedError: { s: 'NOT_SUPPORTED_ERR', c: 9, m: 1 },
InUseAttributeError: { s: 'INUSE_ATTRIBUTE_ERR', c: 10, m: 1 },
InvalidStateError: { s: 'INVALID_STATE_ERR', c: 11, m: 1 },
SyntaxError: { s: 'SYNTAX_ERR', c: 12, m: 1 },
InvalidModificationError: { s: 'INVALID_MODIFICATION_ERR', c: 13, m: 1 },
NamespaceError: { s: 'NAMESPACE_ERR', c: 14, m: 1 },
InvalidAccessError: { s: 'INVALID_ACCESS_ERR', c: 15, m: 1 },
ValidationError: { s: 'VALIDATION_ERR', c: 16, m: 0 },
TypeMismatchError: { s: 'TYPE_MISMATCH_ERR', c: 17, m: 1 },
SecurityError: { s: 'SECURITY_ERR', c: 18, m: 1 },
NetworkError: { s: 'NETWORK_ERR', c: 19, m: 1 },
AbortError: { s: 'ABORT_ERR', c: 20, m: 1 },
URLMismatchError: { s: 'URL_MISMATCH_ERR', c: 21, m: 1 },
QuotaExceededError: { s: 'QUOTA_EXCEEDED_ERR', c: 22, m: 1 },
TimeoutError: { s: 'TIMEOUT_ERR', c: 23, m: 1 },
InvalidNodeTypeError: { s: 'INVALID_NODE_TYPE_ERR', c: 24, m: 1 },
DataCloneError: { s: 'DATA_CLONE_ERR', c: 25, m: 1 }
};
/***/ }),
/* 487 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var globalThis = __webpack_require__(2);
var getBuiltIn = __webpack_require__(35);
var createPropertyDescriptor = __webpack_require__(43);
var defineProperty = __webpack_require__(23).f;
var hasOwn = __webpack_require__(5);
var anInstance = __webpack_require__(144);
var inheritIfRequired = __webpack_require__(79);
var normalizeStringArgument = __webpack_require__(80);
var DOMExceptionConstants = __webpack_require__(486);
var clearErrorStack = __webpack_require__(86);
var DESCRIPTORS = __webpack_require__(24);
var IS_PURE = __webpack_require__(16);
var DOM_EXCEPTION = 'DOMException';
var Error = getBuiltIn('Error');
var NativeDOMException = getBuiltIn(DOM_EXCEPTION);
var $DOMException = function DOMException() {
anInstance(this, DOMExceptionPrototype);
var argumentsLength = arguments.length;
var message = normalizeStringArgument(argumentsLength < 1 ? undefined : arguments[0]);
var name = normalizeStringArgument(argumentsLength < 2 ? undefined : arguments[1], 'Error');
var that = new NativeDOMException(message, name);
var error = new Error(message);
error.name = DOM_EXCEPTION;
defineProperty(that, 'stack', createPropertyDescriptor(1, clearErrorStack(error.stack, 1)));
inheritIfRequired(that, this, $DOMException);
return that;
};
var DOMExceptionPrototype = $DOMException.prototype = NativeDOMException.prototype;
var ERROR_HAS_STACK = 'stack' in new Error(DOM_EXCEPTION);
var DOM_EXCEPTION_HAS_STACK = 'stack' in new NativeDOMException(1, 2);
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var descriptor = NativeDOMException && DESCRIPTORS && Object.getOwnPropertyDescriptor(globalThis, DOM_EXCEPTION);
// Bun ~ 0.1.1 DOMException have incorrect descriptor and we can't redefine it
// https://github.com/Jarred-Sumner/bun/issues/399
var BUGGY_DESCRIPTOR = !!descriptor && !(descriptor.writable && descriptor.configurable);
var FORCED_CONSTRUCTOR = ERROR_HAS_STACK && !BUGGY_DESCRIPTOR && !DOM_EXCEPTION_HAS_STACK;
// `DOMException` constructor patch for `.stack` where it's required
// https://webidl.spec.whatwg.org/#es-DOMException-specialness
$({ global: true, constructor: true, forced: IS_PURE || FORCED_CONSTRUCTOR }, { // TODO: fix export logic
DOMException: FORCED_CONSTRUCTOR ? $DOMException : NativeDOMException
});
var PolyfilledDOMException = getBuiltIn(DOM_EXCEPTION);
var PolyfilledDOMExceptionPrototype = PolyfilledDOMException.prototype;
if (PolyfilledDOMExceptionPrototype.constructor !== PolyfilledDOMException) {
if (!IS_PURE) {
defineProperty(PolyfilledDOMExceptionPrototype, 'constructor', createPropertyDescriptor(1, PolyfilledDOMException));
}
for (var key in DOMExceptionConstants) if (hasOwn(DOMExceptionConstants, key)) {
var constant = DOMExceptionConstants[key];
var constantName = constant.s;
if (!hasOwn(PolyfilledDOMException, constantName)) {
defineProperty(PolyfilledDOMException, constantName, createPropertyDescriptor(6, constant.c));
}
}
}
/***/ }),
/* 488 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var getBuiltIn = __webpack_require__(35);
var setToStringTag = __webpack_require__(196);
var DOM_EXCEPTION = 'DOMException';
// `DOMException.prototype[@@toStringTag]` property
setToStringTag(getBuiltIn(DOM_EXCEPTION), DOM_EXCEPTION);
/***/ }),
/* 489 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove this module from `core-js@4` since it's split to modules listed below
__webpack_require__(490);
__webpack_require__(491);
/***/ }),
/* 490 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var globalThis = __webpack_require__(2);
var clearImmediate = __webpack_require__(201).clear;
// `clearImmediate` method
// http://w3c.github.io/setImmediate/#si-clearImmediate
$({ global: true, bind: true, enumerable: true, forced: globalThis.clearImmediate !== clearImmediate }, {
clearImmediate: clearImmediate
});
/***/ }),
/* 491 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var globalThis = __webpack_require__(2);
var setTask = __webpack_require__(201).set;
var schedulersFix = __webpack_require__(492);
// https://github.com/oven-sh/bun/issues/1633
var setImmediate = globalThis.setImmediate ? schedulersFix(setTask, false) : setTask;
// `setImmediate` method
// http://w3c.github.io/setImmediate/#si-setImmediate
$({ global: true, bind: true, enumerable: true, forced: globalThis.setImmediate !== setImmediate }, {
setImmediate: setImmediate
});
/***/ }),
/* 492 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var globalThis = __webpack_require__(2);
var apply = __webpack_require__(72);
var isCallable = __webpack_require__(28);
var ENVIRONMENT = __webpack_require__(140);
var USER_AGENT = __webpack_require__(21);
var arraySlice = __webpack_require__(181);
var validateArgumentsLength = __webpack_require__(202);
var Function = globalThis.Function;
// dirty IE9- and Bun 0.3.0- checks
var WRAP = /MSIE .\./.test(USER_AGENT) || ENVIRONMENT === 'BUN' && (function () {
var version = globalThis.Bun.version.split('.');
return version.length < 3 || version[0] === '0' && (version[1] < 3 || version[1] === '3' && version[2] === '0');
})();
// IE9- / Bun 0.3.0- setTimeout / setInterval / setImmediate additional parameters fix
// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers
// https://github.com/oven-sh/bun/issues/1633
module.exports = function (scheduler, hasTimeArg) {
var firstParamIndex = hasTimeArg ? 2 : 1;
return WRAP ? function (handler, timeout /* , ...arguments */) {
var boundArgs = validateArgumentsLength(arguments.length, 1) > firstParamIndex;
var fn = isCallable(handler) ? handler : Function(handler);
var params = boundArgs ? arraySlice(arguments, firstParamIndex) : [];
var callback = boundArgs ? function () {
apply(fn, this, params);
} : fn;
return hasTimeArg ? scheduler(callback, timeout) : scheduler(callback);
} : scheduler;
};
/***/ }),
/* 493 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var globalThis = __webpack_require__(2);
var defineBuiltInAccessor = __webpack_require__(130);
var DESCRIPTORS = __webpack_require__(24);
var $TypeError = TypeError;
// eslint-disable-next-line es/no-object-defineproperty -- safe
var defineProperty = Object.defineProperty;
var INCORRECT_VALUE = globalThis.self !== globalThis;
// `self` getter
// https://html.spec.whatwg.org/multipage/window-object.html#dom-self
try {
if (DESCRIPTORS) {
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var descriptor = Object.getOwnPropertyDescriptor(globalThis, 'self');
// some engines have `self`, but with incorrect descriptor
// https://github.com/denoland/deno/issues/15765
if (INCORRECT_VALUE || !descriptor || !descriptor.get || !descriptor.enumerable) {
defineBuiltInAccessor(globalThis, 'self', {
get: function self() {
return globalThis;
},
set: function self(value) {
if (this !== globalThis) throw new $TypeError('Illegal invocation');
defineProperty(globalThis, 'self', {
value: value,
writable: true,
configurable: true,
enumerable: true
});
},
configurable: true,
enumerable: true
});
}
} else $({ global: true, simple: true, forced: INCORRECT_VALUE }, {
self: globalThis
});
} catch (error) { /* empty */ }
/***/ }),
/* 494 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var IS_PURE = __webpack_require__(16);
var $ = __webpack_require__(49);
var globalThis = __webpack_require__(2);
var getBuiltIn = __webpack_require__(35);
var uncurryThis = __webpack_require__(6);
var fails = __webpack_require__(8);
var uid = __webpack_require__(18);
var isCallable = __webpack_require__(28);
var isConstructor = __webpack_require__(200);
var isNullOrUndefined = __webpack_require__(11);
var isObject = __webpack_require__(27);
var isSymbol = __webpack_require__(34);
var iterate = __webpack_require__(97);
var anObject = __webpack_require__(30);
var classof = __webpack_require__(82);
var hasOwn = __webpack_require__(5);
var createProperty = __webpack_require__(117);
var createNonEnumerableProperty = __webpack_require__(50);
var lengthOfArrayLike = __webpack_require__(67);
var validateArgumentsLength = __webpack_require__(202);
var getRegExpFlags = __webpack_require__(272);
var MapHelpers = __webpack_require__(183);
var SetHelpers = __webpack_require__(248);
var setIterate = __webpack_require__(250);
var detachTransferable = __webpack_require__(137);
var ERROR_STACK_INSTALLABLE = __webpack_require__(87);
var PROPER_STRUCTURED_CLONE_TRANSFER = __webpack_require__(141);
var Object = globalThis.Object;
var Array = globalThis.Array;
var Date = globalThis.Date;
var Error = globalThis.Error;
var TypeError = globalThis.TypeError;
var PerformanceMark = globalThis.PerformanceMark;
var DOMException = getBuiltIn('DOMException');
var Map = MapHelpers.Map;
var mapHas = MapHelpers.has;
var mapGet = MapHelpers.get;
var mapSet = MapHelpers.set;
var Set = SetHelpers.Set;
var setAdd = SetHelpers.add;
var setHas = SetHelpers.has;
var objectKeys = getBuiltIn('Object', 'keys');
var push = uncurryThis([].push);
var thisBooleanValue = uncurryThis(true.valueOf);
var thisNumberValue = uncurryThis(1.1.valueOf);
var thisStringValue = uncurryThis(''.valueOf);
var thisTimeValue = uncurryThis(Date.prototype.getTime);
var PERFORMANCE_MARK = uid('structuredClone');
var DATA_CLONE_ERROR = 'DataCloneError';
var TRANSFERRING = 'Transferring';
var checkBasicSemantic = function (structuredCloneImplementation) {
return !fails(function () {
var set1 = new globalThis.Set([7]);
var set2 = structuredCloneImplementation(set1);
var number = structuredCloneImplementation(Object(7));
return set2 === set1 || !set2.has(7) || !isObject(number) || +number !== 7;
}) && structuredCloneImplementation;
};
var checkErrorsCloning = function (structuredCloneImplementation, $Error) {
return !fails(function () {
var error = new $Error();
var test = structuredCloneImplementation({ a: error, b: error });
return !(test && test.a === test.b && test.a instanceof $Error && test.a.stack === error.stack);
});
};
// https://github.com/whatwg/html/pull/5749
var checkNewErrorsCloningSemantic = function (structuredCloneImplementation) {
return !fails(function () {
var test = structuredCloneImplementation(new globalThis.AggregateError([1], PERFORMANCE_MARK, { cause: 3 }));
return test.name !== 'AggregateError' || test.errors[0] !== 1 || test.message !== PERFORMANCE_MARK || test.cause !== 3;
});
};
// FF94+, Safari 15.4+, Chrome 98+, NodeJS 17.0+, Deno 1.13+
// FF<103 and Safari implementations can't clone errors
// https://bugzilla.mozilla.org/show_bug.cgi?id=1556604
// FF103 can clone errors, but `.stack` of clone is an empty string
// https://bugzilla.mozilla.org/show_bug.cgi?id=1778762
// FF104+ fixed it on usual errors, but not on DOMExceptions
// https://bugzilla.mozilla.org/show_bug.cgi?id=1777321
// Chrome <102 returns `null` if cloned object contains multiple references to one error
// https://bugs.chromium.org/p/v8/issues/detail?id=12542
// NodeJS implementation can't clone DOMExceptions
// https://github.com/nodejs/node/issues/41038
// only FF103+ supports new (html/5749) error cloning semantic
var nativeStructuredClone = globalThis.structuredClone;
var FORCED_REPLACEMENT = IS_PURE
|| !checkErrorsCloning(nativeStructuredClone, Error)
|| !checkErrorsCloning(nativeStructuredClone, DOMException)
|| !checkNewErrorsCloningSemantic(nativeStructuredClone);
// Chrome 82+, Safari 14.1+, Deno 1.11+
// Chrome 78-81 implementation swaps `.name` and `.message` of cloned `DOMException`
// Chrome returns `null` if cloned object contains multiple references to one error
// Safari 14.1 implementation doesn't clone some `RegExp` flags, so requires a workaround
// Safari implementation can't clone errors
// Deno 1.2-1.10 implementations too naive
// NodeJS 16.0+ does not have `PerformanceMark` constructor
// NodeJS <17.2 structured cloning implementation from `performance.mark` is too naive
// and can't clone, for example, `RegExp` or some boxed primitives
// https://github.com/nodejs/node/issues/40840
// no one of those implementations supports new (html/5749) error cloning semantic
var structuredCloneFromMark = !nativeStructuredClone && checkBasicSemantic(function (value) {
return new PerformanceMark(PERFORMANCE_MARK, { detail: value }).detail;
});
var nativeRestrictedStructuredClone = checkBasicSemantic(nativeStructuredClone) || structuredCloneFromMark;
var throwUncloneable = function (type) {
throw new DOMException('Uncloneable type: ' + type, DATA_CLONE_ERROR);
};
var throwUnpolyfillable = function (type, action) {
throw new DOMException((action || 'Cloning') + ' of ' + type + ' cannot be properly polyfilled in this engine', DATA_CLONE_ERROR);
};
var tryNativeRestrictedStructuredClone = function (value, type) {
if (!nativeRestrictedStructuredClone) throwUnpolyfillable(type);
return nativeRestrictedStructuredClone(value);
};
var createDataTransfer = function () {
var dataTransfer;
try {
dataTransfer = new globalThis.DataTransfer();
} catch (error) {
try {
dataTransfer = new globalThis.ClipboardEvent('').clipboardData;
} catch (error2) { /* empty */ }
}
return dataTransfer && dataTransfer.items && dataTransfer.files ? dataTransfer : null;
};
var cloneBuffer = function (value, map, $type) {
if (mapHas(map, value)) return mapGet(map, value);
var type = $type || classof(value);
var clone, length, options, source, target, i;
if (type === 'SharedArrayBuffer') {
if (nativeRestrictedStructuredClone) clone = nativeRestrictedStructuredClone(value);
// SharedArrayBuffer should use shared memory, we can't polyfill it, so return the original
else clone = value;
} else {
var DataView = globalThis.DataView;
// `ArrayBuffer#slice` is not available in IE10
// `ArrayBuffer#slice` and `DataView` are not available in old FF
if (!DataView && !isCallable(value.slice)) throwUnpolyfillable('ArrayBuffer');
// detached buffers throws in `DataView` and `.slice`
try {
if (isCallable(value.slice) && !value.resizable) {
clone = value.slice(0);
} else {
length = value.byteLength;
options = 'maxByteLength' in value ? { maxByteLength: value.maxByteLength } : undefined;
// eslint-disable-next-line es/no-resizable-and-growable-arraybuffers -- safe
clone = new ArrayBuffer(length, options);
source = new DataView(value);
target = new DataView(clone);
for (i = 0; i < length; i++) {
target.setUint8(i, source.getUint8(i));
}
}
} catch (error) {
throw new DOMException('ArrayBuffer is detached', DATA_CLONE_ERROR);
}
}
mapSet(map, value, clone);
return clone;
};
var cloneView = function (value, type, offset, length, map) {
var C = globalThis[type];
// in some old engines like Safari 9, typeof C is 'object'
// on Uint8ClampedArray or some other constructors
if (!isObject(C)) throwUnpolyfillable(type);
return new C(cloneBuffer(value.buffer, map), offset, length);
};
var structuredCloneInternal = function (value, map) {
if (isSymbol(value)) throwUncloneable('Symbol');
if (!isObject(value)) return value;
// effectively preserves circular references
if (map) {
if (mapHas(map, value)) return mapGet(map, value);
} else map = new Map();
var type = classof(value);
var C, name, cloned, dataTransfer, i, length, keys, key;
switch (type) {
case 'Array':
cloned = Array(lengthOfArrayLike(value));
break;
case 'Object':
cloned = {};
break;
case 'Map':
cloned = new Map();
break;
case 'Set':
cloned = new Set();
break;
case 'RegExp':
// in this block because of a Safari 14.1 bug
// old FF does not clone regexes passed to the constructor, so get the source and flags directly
cloned = new RegExp(value.source, getRegExpFlags(value));
break;
case 'Error':
name = value.name;
switch (name) {
case 'AggregateError':
cloned = new (getBuiltIn(name))([]);
break;
case 'EvalError':
case 'RangeError':
case 'ReferenceError':
case 'SuppressedError':
case 'SyntaxError':
case 'TypeError':
case 'URIError':
cloned = new (getBuiltIn(name))();
break;
case 'CompileError':
case 'LinkError':
case 'RuntimeError':
cloned = new (getBuiltIn('WebAssembly', name))();
break;
default:
cloned = new Error();
}
break;
case 'DOMException':
cloned = new DOMException(value.message, value.name);
break;
case 'ArrayBuffer':
case 'SharedArrayBuffer':
cloned = cloneBuffer(value, map, type);
break;
case 'DataView':
case 'Int8Array':
case 'Uint8Array':
case 'Uint8ClampedArray':
case 'Int16Array':
case 'Uint16Array':
case 'Int32Array':
case 'Uint32Array':
case 'Float16Array':
case 'Float32Array':
case 'Float64Array':
case 'BigInt64Array':
case 'BigUint64Array':
length = type === 'DataView' ? value.byteLength : value.length;
cloned = cloneView(value, type, value.byteOffset, length, map);
break;
case 'DOMQuad':
try {
cloned = new DOMQuad(
structuredCloneInternal(value.p1, map),
structuredCloneInternal(value.p2, map),
structuredCloneInternal(value.p3, map),
structuredCloneInternal(value.p4, map)
);
} catch (error) {
cloned = tryNativeRestrictedStructuredClone(value, type);
}
break;
case 'File':
if (nativeRestrictedStructuredClone) try {
cloned = nativeRestrictedStructuredClone(value);
// NodeJS 20.0.0 bug, https://github.com/nodejs/node/issues/47612
if (classof(cloned) !== type) cloned = undefined;
} catch (error) { /* empty */ }
if (!cloned) try {
cloned = new File([value], value.name, value);
} catch (error) { /* empty */ }
if (!cloned) throwUnpolyfillable(type);
break;
case 'FileList':
dataTransfer = createDataTransfer();
if (dataTransfer) {
for (i = 0, length = lengthOfArrayLike(value); i < length; i++) {
dataTransfer.items.add(structuredCloneInternal(value[i], map));
}
cloned = dataTransfer.files;
} else cloned = tryNativeRestrictedStructuredClone(value, type);
break;
case 'ImageData':
// Safari 9 ImageData is a constructor, but typeof ImageData is 'object'
try {
cloned = new ImageData(
structuredCloneInternal(value.data, map),
value.width,
value.height,
{ colorSpace: value.colorSpace }
);
} catch (error) {
cloned = tryNativeRestrictedStructuredClone(value, type);
} break;
default:
if (nativeRestrictedStructuredClone) {
cloned = nativeRestrictedStructuredClone(value);
} else switch (type) {
case 'BigInt':
// can be a 3rd party polyfill
cloned = Object(value.valueOf());
break;
case 'Boolean':
cloned = Object(thisBooleanValue(value));
break;
case 'Number':
cloned = Object(thisNumberValue(value));
break;
case 'String':
cloned = Object(thisStringValue(value));
break;
case 'Date':
cloned = new Date(thisTimeValue(value));
break;
case 'Blob':
try {
cloned = value.slice(0, value.size, value.type);
} catch (error) {
throwUnpolyfillable(type);
} break;
case 'DOMPoint':
case 'DOMPointReadOnly':
C = globalThis[type];
try {
cloned = C.fromPoint
? C.fromPoint(value)
: new C(value.x, value.y, value.z, value.w);
} catch (error) {
throwUnpolyfillable(type);
} break;
case 'DOMRect':
case 'DOMRectReadOnly':
C = globalThis[type];
try {
cloned = C.fromRect
? C.fromRect(value)
: new C(value.x, value.y, value.width, value.height);
} catch (error) {
throwUnpolyfillable(type);
} break;
case 'DOMMatrix':
case 'DOMMatrixReadOnly':
C = globalThis[type];
try {
cloned = C.fromMatrix
? C.fromMatrix(value)
: new C(value);
} catch (error) {
throwUnpolyfillable(type);
} break;
case 'AudioData':
case 'VideoFrame':
if (!isCallable(value.clone)) throwUnpolyfillable(type);
try {
cloned = value.clone();
} catch (error) {
throwUncloneable(type);
} break;
case 'CropTarget':
case 'CryptoKey':
case 'FileSystemDirectoryHandle':
case 'FileSystemFileHandle':
case 'FileSystemHandle':
case 'GPUCompilationInfo':
case 'GPUCompilationMessage':
case 'ImageBitmap':
case 'RTCCertificate':
case 'WebAssembly.Module':
throwUnpolyfillable(type);
// break omitted
default:
throwUncloneable(type);
}
}
mapSet(map, value, cloned);
switch (type) {
case 'Array':
case 'Object':
keys = objectKeys(value);
for (i = 0, length = lengthOfArrayLike(keys); i < length; i++) {
key = keys[i];
createProperty(cloned, key, structuredCloneInternal(value[key], map));
} break;
case 'Map':
value.forEach(function (v, k) {
mapSet(cloned, structuredCloneInternal(k, map), structuredCloneInternal(v, map));
});
break;
case 'Set':
value.forEach(function (v) {
setAdd(cloned, structuredCloneInternal(v, map));
});
break;
case 'Error':
createNonEnumerableProperty(cloned, 'message', structuredCloneInternal(value.message, map));
if (hasOwn(value, 'cause')) {
createNonEnumerableProperty(cloned, 'cause', structuredCloneInternal(value.cause, map));
}
if (name === 'AggregateError') {
cloned.errors = structuredCloneInternal(value.errors, map);
} else if (name === 'SuppressedError') {
cloned.error = structuredCloneInternal(value.error, map);
cloned.suppressed = structuredCloneInternal(value.suppressed, map);
} // break omitted
case 'DOMException':
if (ERROR_STACK_INSTALLABLE) {
createNonEnumerableProperty(cloned, 'stack', structuredCloneInternal(value.stack, map));
}
}
return cloned;
};
var tryToTransfer = function (rawTransfer, map) {
if (!isObject(rawTransfer)) throw new TypeError('Transfer option cannot be converted to a sequence');
var transfer = [];
iterate(rawTransfer, function (value) {
push(transfer, anObject(value));
});
var i = 0;
var length = lengthOfArrayLike(transfer);
var buffers = new Set();
var value, type, C, transferred, canvas, context;
while (i < length) {
value = transfer[i++];
type = classof(value);
if (type === 'ArrayBuffer' ? setHas(buffers, value) : mapHas(map, value)) {
throw new DOMException('Duplicate transferable', DATA_CLONE_ERROR);
}
if (type === 'ArrayBuffer') {
setAdd(buffers, value);
continue;
}
if (PROPER_STRUCTURED_CLONE_TRANSFER) {
transferred = nativeStructuredClone(value, { transfer: [value] });
} else switch (type) {
case 'ImageBitmap':
C = globalThis.OffscreenCanvas;
if (!isConstructor(C)) throwUnpolyfillable(type, TRANSFERRING);
try {
canvas = new C(value.width, value.height);
context = canvas.getContext('bitmaprenderer');
context.transferFromImageBitmap(value);
transferred = canvas.transferToImageBitmap();
} catch (error) { /* empty */ }
break;
case 'AudioData':
case 'VideoFrame':
if (!isCallable(value.clone) || !isCallable(value.close)) throwUnpolyfillable(type, TRANSFERRING);
try {
transferred = value.clone();
value.close();
} catch (error) { /* empty */ }
break;
case 'MediaSourceHandle':
case 'MessagePort':
case 'MIDIAccess':
case 'OffscreenCanvas':
case 'ReadableStream':
case 'RTCDataChannel':
case 'TransformStream':
case 'WebTransportReceiveStream':
case 'WebTransportSendStream':
case 'WritableStream':
throwUnpolyfillable(type, TRANSFERRING);
}
if (transferred === undefined) throw new DOMException('This object cannot be transferred: ' + type, DATA_CLONE_ERROR);
mapSet(map, value, transferred);
}
return buffers;
};
var detachBuffers = function (buffers) {
setIterate(buffers, function (buffer) {
if (PROPER_STRUCTURED_CLONE_TRANSFER) {
nativeRestrictedStructuredClone(buffer, { transfer: [buffer] });
} else if (isCallable(buffer.transfer)) {
buffer.transfer();
} else if (detachTransferable) {
detachTransferable(buffer);
} else {
throwUnpolyfillable('ArrayBuffer', TRANSFERRING);
}
});
};
// `structuredClone` method
// https://html.spec.whatwg.org/multipage/structured-data.html#dom-structuredclone
$({ global: true, enumerable: true, sham: !PROPER_STRUCTURED_CLONE_TRANSFER, forced: FORCED_REPLACEMENT }, {
structuredClone: function structuredClone(value /* , { transfer } */) {
var options = validateArgumentsLength(arguments.length, 1) > 1 && !isNullOrUndefined(arguments[1]) ? anObject(arguments[1]) : undefined;
var transfer = options ? options.transfer : undefined;
var map, buffers;
if (transfer !== undefined) {
map = new Map();
buffers = tryToTransfer(transfer, map);
}
var clone = structuredCloneInternal(value, map);
// since of an issue with cloning views of transferred buffers, we a forced to detach them later
// https://github.com/zloirock/core-js/issues/1265
if (buffers) detachBuffers(buffers);
return clone;
}
});
/***/ }),
/* 495 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var getBuiltIn = __webpack_require__(35);
var fails = __webpack_require__(8);
var validateArgumentsLength = __webpack_require__(202);
var toString = __webpack_require__(81);
var USE_NATIVE_URL = __webpack_require__(496);
var URL = getBuiltIn('URL');
// https://github.com/nodejs/node/issues/47505
// https://github.com/denoland/deno/issues/18893
var THROWS_WITHOUT_ARGUMENTS = USE_NATIVE_URL && fails(function () {
URL.canParse();
});
// Bun ~ 1.0.30 bug
// https://github.com/oven-sh/bun/issues/9250
var WRONG_ARITY = fails(function () {
return URL.canParse.length !== 1;
});
// `URL.canParse` method
// https://url.spec.whatwg.org/#dom-url-canparse
$({ target: 'URL', stat: true, forced: !THROWS_WITHOUT_ARGUMENTS || WRONG_ARITY }, {
canParse: function canParse(url) {
var length = validateArgumentsLength(arguments.length, 1);
var urlString = toString(url);
var base = length < 2 || arguments[1] === undefined ? undefined : toString(arguments[1]);
try {
return !!new URL(urlString, base);
} catch (error) {
return false;
}
}
});
/***/ }),
/* 496 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(8);
var wellKnownSymbol = __webpack_require__(13);
var DESCRIPTORS = __webpack_require__(24);
var IS_PURE = __webpack_require__(16);
var ITERATOR = wellKnownSymbol('iterator');
module.exports = !fails(function () {
// eslint-disable-next-line unicorn/relative-url-style -- required for testing
var url = new URL('b?a=1&b=2&c=3', 'https://a');
var params = url.searchParams;
var params2 = new URLSearchParams('a=1&a=2&b=3');
var result = '';
url.pathname = 'c%20d';
params.forEach(function (value, key) {
params['delete']('b');
result += key + value;
});
params2['delete']('a', 2);
// `undefined` case is a Chromium 117 bug
// https://bugs.chromium.org/p/v8/issues/detail?id=14222
params2['delete']('b', undefined);
return (IS_PURE && (!url.toJSON || !params2.has('a', 1) || params2.has('a', 2) || !params2.has('a', undefined) || params2.has('b')))
|| (!params.size && (IS_PURE || !DESCRIPTORS))
|| !params.sort
|| url.href !== 'https://a/c%20d?a=1&c=3'
|| params.get('c') !== '3'
|| String(new URLSearchParams('?a=1')) !== 'a=1'
|| !params[ITERATOR]
// throws in Edge
|| new URL('https://a@b').username !== 'a'
|| new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
// not punycoded in Edge
|| new URL('https://тест').host !== 'xn--e1aybc'
// not escaped in Chrome 62-
|| new URL('https://a#б').hash !== '#%D0%B1'
// fails in Chrome 66-
|| result !== 'a1c3'
// throws in Safari
|| new URL('https://x', undefined).host !== 'x';
});
/***/ }),
/* 497 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(49);
var getBuiltIn = __webpack_require__(35);
var validateArgumentsLength = __webpack_require__(202);
var toString = __webpack_require__(81);
var USE_NATIVE_URL = __webpack_require__(496);
var URL = getBuiltIn('URL');
// `URL.parse` method
// https://url.spec.whatwg.org/#dom-url-canparse
$({ target: 'URL', stat: true, forced: !USE_NATIVE_URL }, {
parse: function parse(url) {
var length = validateArgumentsLength(arguments.length, 1);
var urlString = toString(url);
var base = length < 2 || arguments[1] === undefined ? undefined : toString(arguments[1]);
try {
return new URL(urlString, base);
} catch (error) {
return null;
}
}
});
/***/ }),
/* 498 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var defineBuiltIn = __webpack_require__(51);
var uncurryThis = __webpack_require__(6);
var toString = __webpack_require__(81);
var validateArgumentsLength = __webpack_require__(202);
var $URLSearchParams = URLSearchParams;
var URLSearchParamsPrototype = $URLSearchParams.prototype;
var append = uncurryThis(URLSearchParamsPrototype.append);
var $delete = uncurryThis(URLSearchParamsPrototype['delete']);
var forEach = uncurryThis(URLSearchParamsPrototype.forEach);
var push = uncurryThis([].push);
var params = new $URLSearchParams('a=1&a=2&b=3');
params['delete']('a', 1);
// `undefined` case is a Chromium 117 bug
// https://bugs.chromium.org/p/v8/issues/detail?id=14222
params['delete']('b', undefined);
if (params + '' !== 'a=2') {
defineBuiltIn(URLSearchParamsPrototype, 'delete', function (name /* , value */) {
var length = arguments.length;
var $value = length < 2 ? undefined : arguments[1];
if (length && $value === undefined) return $delete(this, name);
var entries = [];
forEach(this, function (v, k) { // also validates `this`
push(entries, { key: k, value: v });
});
validateArgumentsLength(length, 1);
var key = toString(name);
var value = toString($value);
var index = 0;
var dindex = 0;
var found = false;
var entriesLength = entries.length;
var entry;
while (index < entriesLength) {
entry = entries[index++];
if (found || entry.key === key) {
found = true;
$delete(this, entry.key);
} else dindex++;
}
while (dindex < entriesLength) {
entry = entries[dindex++];
if (!(entry.key === key && entry.value === value)) append(this, entry.key, entry.value);
}
}, { enumerable: true, unsafe: true });
}
/***/ }),
/* 499 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var defineBuiltIn = __webpack_require__(51);
var uncurryThis = __webpack_require__(6);
var toString = __webpack_require__(81);
var validateArgumentsLength = __webpack_require__(202);
var $URLSearchParams = URLSearchParams;
var URLSearchParamsPrototype = $URLSearchParams.prototype;
var getAll = uncurryThis(URLSearchParamsPrototype.getAll);
var $has = uncurryThis(URLSearchParamsPrototype.has);
var params = new $URLSearchParams('a=1');
// `undefined` case is a Chromium 117 bug
// https://bugs.chromium.org/p/v8/issues/detail?id=14222
if (params.has('a', 2) || !params.has('a', undefined)) {
defineBuiltIn(URLSearchParamsPrototype, 'has', function has(name /* , value */) {
var length = arguments.length;
var $value = length < 2 ? undefined : arguments[1];
if (length && $value === undefined) return $has(this, name);
var values = getAll(this, name); // also validates `this`
validateArgumentsLength(length, 1);
var value = toString($value);
var index = 0;
while (index < values.length) {
if (values[index++] === value) return true;
} return false;
}, { enumerable: true, unsafe: true });
}
/***/ }),
/* 500 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(24);
var uncurryThis = __webpack_require__(6);
var defineBuiltInAccessor = __webpack_require__(130);
var URLSearchParamsPrototype = URLSearchParams.prototype;
var forEach = uncurryThis(URLSearchParamsPrototype.forEach);
// `URLSearchParams.prototype.size` getter
// https://github.com/whatwg/url/pull/734
if (DESCRIPTORS && !('size' in URLSearchParamsPrototype)) {
defineBuiltInAccessor(URLSearchParamsPrototype, 'size', {
get: function size() {
var count = 0;
forEach(this, function () { count++; });
return count;
},
configurable: true,
enumerable: true
});
}
/***/ })
/******/ ]); }();
|
zloirock/core-js
| 25,418
|
Standard Library
|
JavaScript
|
zloirock
|
Denis Pushkarev
| |
scripts/build-compat/data.mjs
|
JavaScript
|
/* https://github.com/import-js/eslint-plugin-import/issues/2181 */
import { dataWithIgnored as data, ignored, modules } from 'core-js-compat/src/data.mjs';
import external from 'core-js-compat/src/external.mjs';
import mappings from 'core-js-compat/src/mapping.mjs';
import helpers from 'core-js-compat/helpers.js';
const { compare, has, semver, sortObjectByKey } = helpers;
for (const scope of [data, external]) {
for (const [key, module] of Object.entries(scope)) {
const { chrome, ie } = module;
function map(mappingKey) {
const [engine, targetKey] = mappingKey.split('To')
.map(it => it.replace(/(?<lower>[a-z])(?<upper>[A-Z])/, '$<lower>-$<upper>').toLowerCase());
const version = module[engine];
if (!version || has(module, targetKey)) return;
const mapping = mappings[mappingKey];
if (typeof mapping == 'function') {
return module[targetKey] = String(mapping(version));
}
const source = semver(version);
for (const [from, to] of mapping) {
if (compare(source, '<=', from)) {
return module[targetKey] = String(to);
}
}
}
if (/^(?:es|esnext)\./.test(key)) {
map('ChromeToDeno');
map('ChromeToNode');
}
if (!has(module, 'edge')) {
if (ie && !key.includes('immediate')) {
module.edge = '12';
} else if (chrome) {
module.edge = String(Math.max(chrome, 79));
}
}
if (/^(?:es|esnext|web)\./.test(key)) {
map('ChromeToElectron');
}
map('ChromeToOpera');
map('ChromeToChromeAndroid');
map('ChromeToAndroid');
if (!has(module, 'android') && module['chrome-android']) {
// https://github.com/mdn/browser-compat-data/blob/main/docs/matching-browser-releases/index.md#version-numbers-for-features-in-android-webview
module.android = String(Math.max(module['chrome-android'], 37));
}
if (!has(module, 'opera-android') && module.opera <= 42) {
module['opera-android'] = module.opera;
} else {
map('ChromeAndroidToOperaAndroid');
}
// TODO: Remove from `core-js@4`
if (has(module, 'opera-android')) {
module.opera_mobile = module['opera-android'];
}
map('ChromeAndroidToQuest');
// TODO: Remove from `core-js@4`
if (has(module, 'quest')) {
module.oculus = module.quest;
}
map('ChromeAndroidToSamsung');
if (/^(?:es|esnext)\./.test(key)) {
map('SafariToBun');
}
map('FirefoxToFirefoxAndroid');
map('SafariToIOS');
if (!has(module, 'ios') && has(module, 'safari')) {
module.ios = module.safari;
}
map('SafariToPhantom');
map('HermesToReactNative');
for (const [engine, version] of Object.entries(module)) {
if (!version) delete module[engine];
}
scope[key] = sortObjectByKey(module);
}
}
function write(filename, content) {
return fs.writeJson(`packages/core-js-compat/${ filename }.json`, content, { spaces: ' ' });
}
const dataWithoutIgnored = { ...data };
for (const ignore of ignored) delete dataWithoutIgnored[ignore];
await Promise.all([
write('data', dataWithoutIgnored),
write('modules', modules),
write('external', external),
// version for compat data tests
fs.writeFile('tests/compat/compat-data.js', `;(typeof global != 'undefined' ? global : Function('return this')()).data = ${
JSON.stringify(data, null, ' ')
}`),
]);
echo(chalk.green('compat data rebuilt'));
|
zloirock/core-js
| 25,418
|
Standard Library
|
JavaScript
|
zloirock
|
Denis Pushkarev
| |
scripts/build-compat/entries.mjs
|
JavaScript
|
import konan from 'konan';
import { modules } from 'core-js-compat/src/data.mjs';
import helpers from 'core-js-compat/helpers.js';
async function getModulesForEntryPoint(path, parent) {
const entry = new URL(path, parent);
const match = entry.pathname.match(/[/\\]modules[/\\](?<module>[^/\\]+)$/);
if (match) return [match.groups.module];
entry.pathname += await fs.pathExists(entry) ? '/index.js' : '.js';
if (!await fs.pathExists(entry)) return [];
const file = await fs.readFile(entry, 'utf8');
const result = await Promise.all(konan(String(file)).strings.map(dependency => {
return getModulesForEntryPoint(dependency, entry);
}));
return helpers.intersection(result.flat(), modules);
}
const entriesList = await glob([
'packages/core-js/index.js',
'packages/core-js/actual/**/*.js',
'packages/core-js/es/**/*.js',
'packages/core-js/full/**/*.js',
'packages/core-js/features/**/*.js',
'packages/core-js/modules/*.js',
'packages/core-js/proposals/**/*.js',
'packages/core-js/stable/**/*.js',
'packages/core-js/stage/**/*.js',
'packages/core-js/web/**/*.js',
]);
const entriesMap = helpers.sortObjectByKey(Object.fromEntries(await Promise.all(entriesList.map(async file => {
// TODO: store entries without the package name in `core-js@4`
const entry = file.replace(/\.js$/, '').replace(/\/index$/, '');
return [entry.slice(9), await getModulesForEntryPoint(`../../${ entry }`, import.meta.url)];
}))));
await fs.writeJson('packages/core-js-compat/entries.json', entriesMap, { spaces: ' ' });
echo(chalk.green('entries data rebuilt'));
|
zloirock/core-js
| 25,418
|
Standard Library
|
JavaScript
|
zloirock
|
Denis Pushkarev
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.