diff --git a/asset-manifest.json b/asset-manifest.json index dbd5746..5812648 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,8 +1,8 @@ { "files": { "main.css": "./static/css/main.b41b2a6f.css", - "main.js": "./static/js/main.e7fd8c86.js", - "static/js/448.21dda5a7.chunk.js": "./static/js/448.21dda5a7.chunk.js", + "main.js": "./static/js/main.1b548bfd.js", + "static/js/448.f953d78c.chunk.js": "./static/js/448.f953d78c.chunk.js", "static/media/Finador-BlackOblique.woff": "./static/media/Finador-BlackOblique.8e3feb4617564028ac09.woff", "static/media/Finador-RegularOblique.woff": "./static/media/Finador-RegularOblique.66b1b40866f3f75015d6.woff", "static/media/Finador-LightOblique.woff": "./static/media/Finador-LightOblique.3e4bf52dd453804f5c5a.woff", @@ -43,11 +43,11 @@ "static/media/check.svg": "./static/media/check.62d1e3846cf9f4002c37c986555f222e.svg", "static/media/radio.svg": "./static/media/radio.a8976f7cd2094465a9e60270572060bb.svg", "main.b41b2a6f.css.map": "./static/css/main.b41b2a6f.css.map", - "main.e7fd8c86.js.map": "./static/js/main.e7fd8c86.js.map", - "448.21dda5a7.chunk.js.map": "./static/js/448.21dda5a7.chunk.js.map" + "main.1b548bfd.js.map": "./static/js/main.1b548bfd.js.map", + "448.f953d78c.chunk.js.map": "./static/js/448.f953d78c.chunk.js.map" }, "entrypoints": [ "static/css/main.b41b2a6f.css", - "static/js/main.e7fd8c86.js" + "static/js/main.1b548bfd.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index 4966205..ed74b2e 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -Port
\ No newline at end of file +Port
\ No newline at end of file diff --git a/port-0.0.0-py3-none-any.whl b/port-0.0.0-py3-none-any.whl index 0857642..83ac993 100644 Binary files a/port-0.0.0-py3-none-any.whl and b/port-0.0.0-py3-none-any.whl differ diff --git a/static/js/448.21dda5a7.chunk.js b/static/js/448.21dda5a7.chunk.js deleted file mode 100644 index 23b05a5..0000000 --- a/static/js/448.21dda5a7.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -(()=>{"use strict";function t(t,e){const o=Math.min(...t),n=Math.max(...t);let a="hour";return n-o>864e5*e&&(a="day"),n-o>2592e6*e&&(a="month"),n-o>7776e6*e&&(a="quarter"),n-o>31536e6*e&&(a="year"),a}function e(t){return t.split(" ").filter((t=>/\p{L}/giu.test(t)))}function o(t,e){const o=t.head.cells.findIndex((t=>t.text===e));if(o<0)throw new Error("column ".concat(t.id,".").concat(e," not found"));return t.body.rows.map((t=>t.cells[o].text))}function n(t,e,o,n,a){return(t-e)/(o-e)*(a-n)+n}async function a(e,n){const a={type:n.type,xKey:{label:void 0!==n.group.label?n.group.label:n.group.column},yKeys:{},data:[]};if(0===e.body.rows.length)return a;const r=e.body.rows.map((t=>t.id));let l=o(e,n.group.column);if(0===l.length)throw new Error("X column ".concat(e.id,".").concat(n.group.column," not found"));let u=null;void 0!==n.group.dateFormat&&([l,u]=function(e,o){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=e;const r=e.map((t=>new Date(t).getTime()));let l=null;if("auto"===o&&(o=t(r,n)),"year"===o&&(a=r.map((t=>new Date(t).getFullYear().toString())),l=r),"quarter"===o&&(a=r.map((t=>{const e=new Date(t).getFullYear().toString(),o=Math.floor(new Date(t).getMonth()/3)+1;return"".concat(e,"-Q").concat(o)})),l=r),"month"===o&&(a=r.map((t=>new Date(t).getFullYear().toString()+"-"+new Date(t).toLocaleString("default",{month:"short"}))),l=r),"day"===o&&(a=r.map((t=>new Date(t).toISOString().split("T")[0])),l=r),"hour"===o&&(a=r.map((t=>new Date(t).toISOString().split("T")[1].split(":")[0])),l=r),"month_cycle"===o){const t=new Intl.DateTimeFormat("default",{month:"long"});a=r.map((e=>t.format(new Date(e)))),l=r.map((t=>new Date(t).getMonth()))}if("weekday_cycle"===o){const t=new Intl.DateTimeFormat("default",{weekday:"long"});a=r.map((e=>t.format(new Date(e)))),l=r.map((t=>new Date(t).getDay()))}if("day_cycle"===o){const t=new Intl.DateTimeFormat("default",{day:"numeric"});a=r.map((e=>t.format(new Date(e)))),l=r.map((t=>new Date(t).getDay()))}if("hour_cycle"===o){const t=new Intl.DateTimeFormat("default",{hour:"numeric"});a=r.map((e=>t.format(new Date(e)))),l=r.map((t=>new Date(t).getHours()))}return[a,l]}(l,n.group.dateFormat));const s={};for(const t of n.values){var c;const n=void 0!==t.aggregate?t.aggregate:"count";let d="default";"pct"!==n&&"count_pct"!==n||(d="percent");const p=o(e,t.column);if(0===p.length)throw new Error("Y column ".concat(e.id,".").concat(t.column," not found"));const v=void 0!==t.group_by?o(e,t.group_by):null,f=null!==(c=t.addZeroes)&&void 0!==c&&c,y={},g=new Set([]);for(let e=0;e{for(const e of Object.keys(s)){if(void 0===s[e].values[t]){if(!f)continue;s[e].values[t]=0}"mean"===n&&(s[e].values[t]=Number(s[e].values[t])/y[t].n),"count_pct"===n&&(s[e].values[t]=100*Number(s[e].values[t])/y[t].n),"pct"===n&&(s[e].values[t]=100*Number(s[e].values[t])/y[t].sum)}}))}return a.data=Object.values(s).sort(((t,e)=>t.sortBy{for(const e of Object.keys(t.values))t.values[e]=Math.round(100*t.values[e])/100;return{...t.values,[t.xLabel]:t.xValue,__rowIds:t.rowIds,__sortBy:t.sortBy}})),a}async function r(t,a){const r={type:a.type,topTerms:[]};if(0===t.body.rows.length)return r;const l=o(t,a.textColumn),u=function(t,o,n){const a={};for(let l=0;l{let[o,n]=t;const a=Math.log(1+n.value),r=Math.log(e/n.docFreq);return{text:o,value:n.value,importance:a*r}})).sort(((t,e)=>e.importance-t.importance)).slice(0,o),r=Math.min(...a.map((t=>t.importance))),l=Math.max(...a.map((t=>t.importance)));return a.map((t=>({text:t.text,value:t.value,importance:n(t.importance,r,l,0,1)})))}(u,l.length,200),r}self.onmessage=t=>{(async function(t,e){if(void 0===t||void 0===e)throw new Error("Table and visualization are required");if(["line","bar","area"].includes(e.type))return await a(t,e);if(["wordcloud"].includes(e.type))return await r(t,e);throw new Error("Visualization type ".concat(e.type," not supported"))})(t.data.table,t.data.visualization).then((t=>{self.postMessage({status:"success",visualizationData:t})})).catch((t=>{console.error(t),self.postMessage({status:"error",visualizationData:void 0})}))}})(); -//# sourceMappingURL=448.21dda5a7.chunk.js.map \ No newline at end of file diff --git a/static/js/448.21dda5a7.chunk.js.map b/static/js/448.21dda5a7.chunk.js.map deleted file mode 100644 index 4f1ff55..0000000 --- a/static/js/448.21dda5a7.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static/js/448.21dda5a7.chunk.js","mappings":"mBAGO,SAASA,EAAgBC,EAAuBC,GACrD,MAAMC,EAAUC,KAAKC,OAAOJ,GACtBK,EAAUF,KAAKG,OAAON,GAE5B,IAAIO,EAAyB,OAM7B,OALIF,EAAUH,EAAU,MAAsBD,IAAWM,EAAa,OAClEF,EAAUH,EAAU,OAA2BD,IAAWM,EAAa,SACvEF,EAAUH,EAAU,OAA+BD,IAAWM,EAAa,WAC3EF,EAAUH,EAAU,QAA4BD,IAAWM,EAAa,QAErEA,CACR,CAmEM,SAASC,EAAUC,GAExB,OADeA,EAAKC,MAAM,KACZC,QAAQC,GAAU,WAAWC,KAAKD,IACjD,CAEM,SAASE,EAAgBC,EAAoCC,GAClE,MAAMC,EAAcF,EAAMG,KAAKC,MAAMC,WAAWC,GAASA,EAAKZ,OAASO,IACvE,GAAIC,EAAc,EAAG,MAAM,IAAIK,MAAJ,iBAAoBP,EAAMQ,GAA1B,YAAgCP,EAAhC,eAC3B,OAAOD,EAAMS,KAAKC,KAAKC,KAAKC,GAAQA,EAAIR,MAAMF,GAAaR,MAC5D,CAEM,SAASmB,EACdC,EACAzB,EACAE,EACAwB,EACAC,GAEA,OAASF,EAAQzB,IAAQE,EAAMF,IAAS2B,EAASD,GAAUA,CAC5D,CC5FME,eAAeC,EACpBlB,EACAmB,GAEA,MAAMC,EAA4C,CAChDC,KAAMF,EAAcE,KACpBC,KAAM,CACJC,WACgCC,IAA9BL,EAAcM,MAAMF,MAChBJ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AAW,EACtB,MAAMC,EAAKzH,KAAK0H,IAAI,EAAIF,EAAM9F,OACxBiG,EAAM3H,KAAK0H,IAAIL,EAAQG,EAAMT,SACnC,MAAO,CAAEzG,OAAMoB,MAAO8F,EAAM9F,MAAOkG,WAAYH,EAAKE,EAApD,IAED3B,MAAK,CAACC,EAAGC,IAAMA,EAAE0B,WAAa3B,EAAE2B,aAChCC,MAAM,EAAGpB,GAENqB,EAAgB9H,KAAKC,OAAOqH,EAAM/F,KAAKwG,GAAMA,EAAEH,cAC/CI,EAAgBhI,KAAKG,OAAOmH,EAAM/F,KAAKwG,GAAMA,EAAEH,cAErD,OAAON,EAAM/F,KAAKwG,IACT,CACLzH,KAAMyH,EAAEzH,KACRoB,MAAOqG,EAAErG,MACTkG,WAAYnG,EAAesG,EAAEH,WAAYE,EAAeE,EAAe,EAAG,MAG/E,CAxD8BC,CAAYrB,EAAYF,EAAMlE,OAAQ,KAE5DR,CACR,CCjBDkG,KAAKC,UAAaC,KAWlBvG,eACEjB,EACAmB,GAEA,QAAcK,IAAVxB,QAAyCwB,IAAlBL,EAA6B,MAAM,IAAIZ,MAAM,wCAExE,GAAI,CAAC,OAAQ,MAAO,QAAQkH,SAAStG,EAAcE,MAAS,aAAaH,EAAiBlB,EAAOmB,GAEjG,GAAI,CAAC,aAAasG,SAAStG,EAAcE,MAAS,aAAauE,EAAgB5F,EAAOmB,GAEtF,MAAM,IAAIZ,MAAJ,6BAAgCY,EAAcE,KAA9C,kBACP,EArBCqG,CAAwBF,EAAE7F,KAAK3B,MAAOwH,EAAE7F,KAAKR,eAC1CwG,MAAMvG,IACLkG,KAAKM,YAAY,CAAEC,OAAQ,UAAWzG,qBAAtC,IAED0G,OAAOC,IACNC,QAAQD,MAAMA,GACdT,KAAKM,YAAY,CAAEC,OAAQ,QAASzG,uBAAmBI,GAAvD,GANJ,C","sources":["framework/visualisation/react/ui/workers/visualizationDataFunctions/util.ts","framework/visualisation/react/ui/workers/visualizationDataFunctions/prepareChartData.ts","framework/visualisation/react/ui/workers/visualizationDataFunctions/prepareTextData.ts","framework/visualisation/react/ui/workers/visualizationDataWorker.ts"],"sourcesContent":["import { PropsUITable, TableContext } from '../../../../../types/elements'\nimport { DateFormat } from '../../../../../types/visualizations'\n\nexport function autoFormatDate (dateNumbers: number[], minValues: number): DateFormat {\n const minTime = Math.min(...dateNumbers)\n const maxTime = Math.max(...dateNumbers)\n\n let autoFormat: DateFormat = 'hour'\n if (maxTime - minTime > 1000 * 60 * 60 * 24 * minValues) autoFormat = 'day'\n if (maxTime - minTime > 1000 * 60 * 60 * 24 * 30 * minValues) autoFormat = 'month'\n if (maxTime - minTime > 1000 * 60 * 60 * 24 * 30 * 3 * minValues) autoFormat = 'quarter'\n if (maxTime - minTime > 1000 * 60 * 60 * 24 * 365 * minValues) autoFormat = 'year'\n\n return autoFormat\n}\n\nexport function formatDate (\n dateString: string[],\n format: DateFormat,\n minValues: number = 10\n): [string[], number[] | null] {\n let formattedDate: string[] = dateString\n const dateNumbers = dateString.map((date) => new Date(date).getTime())\n let sortableDate: number[] | null = null\n\n if (format === 'auto') format = autoFormatDate(dateNumbers, minValues)\n\n if (format === 'year') {\n formattedDate = dateNumbers.map((date) => new Date(date).getFullYear().toString())\n sortableDate = dateNumbers\n }\n if (format === 'quarter') {\n formattedDate = dateNumbers.map((date) => {\n const year = new Date(date).getFullYear().toString()\n const quarter = Math.floor(new Date(date).getMonth() / 3) + 1\n return `${year}-Q${quarter}`\n })\n sortableDate = dateNumbers\n }\n if (format === 'month') {\n formattedDate = dateNumbers.map((date) => {\n const year = new Date(date).getFullYear().toString()\n const month = new Date(date).toLocaleString('default', { month: 'short' })\n return year + '-' + month\n })\n sortableDate = dateNumbers\n }\n if (format === 'day') {\n formattedDate = dateNumbers.map((date) => new Date(date).toISOString().split('T')[0])\n sortableDate = dateNumbers\n }\n if (format === 'hour') {\n formattedDate = dateNumbers.map(\n (date) => new Date(date).toISOString().split('T')[1].split(':')[0]\n )\n sortableDate = dateNumbers\n }\n if (format === 'month_cycle') {\n const formatter = new Intl.DateTimeFormat('default', { month: 'long' })\n formattedDate = dateNumbers.map((date) => formatter.format(new Date(date)))\n sortableDate = dateNumbers.map((date) => new Date(date).getMonth())\n }\n if (format === 'weekday_cycle') {\n const formatter = new Intl.DateTimeFormat('default', { weekday: 'long' })\n formattedDate = dateNumbers.map((date) => formatter.format(new Date(date)))\n sortableDate = dateNumbers.map((date) => new Date(date).getDay())\n }\n if (format === 'day_cycle') {\n const formatter = new Intl.DateTimeFormat('default', { day: 'numeric' })\n formattedDate = dateNumbers.map((date) => formatter.format(new Date(date)))\n sortableDate = dateNumbers.map((date) => new Date(date).getDay())\n }\n if (format === 'hour_cycle') {\n const formatter = new Intl.DateTimeFormat('default', { hour: 'numeric' })\n formattedDate = dateNumbers.map((date) => formatter.format(new Date(date)))\n sortableDate = dateNumbers.map((date) => new Date(date).getHours())\n }\n\n return [formattedDate, sortableDate]\n}\n\nexport function tokenize (text: string): string[] {\n const tokens = text.split(' ')\n return tokens.filter((token) => /\\p{L}/giu.test(token)) // only tokens with word characters\n}\n\nexport function getTableColumn (table: PropsUITable & TableContext, column: string): string[] {\n const columnIndex = table.head.cells.findIndex((cell) => cell.text === column)\n if (columnIndex < 0) throw new Error(`column ${table.id}.${column} not found`)\n return table.body.rows.map((row) => row.cells[columnIndex].text)\n}\n\nexport function rescaleToRange (\n value: number,\n min: number,\n max: number,\n newMin: number,\n newMax: number\n): number {\n return ((value - min) / (max - min)) * (newMax - newMin) + newMin\n}\n","import { formatDate, getTableColumn } from './util'\nimport { PropsUITable, TableContext } from '../../../../../types/elements'\nimport {\n TickerFormat,\n ChartVisualizationData,\n ChartVisualization\n} from '../../../../../types/visualizations'\n\nexport async function prepareChartData (\n table: PropsUITable & TableContext,\n visualization: ChartVisualization\n): Promise {\n const visualizationData: ChartVisualizationData = {\n type: visualization.type,\n xKey: {\n label:\n visualization.group.label !== undefined\n ? visualization.group.label\n : visualization.group.column\n },\n yKeys: {},\n data: []\n }\n\n if (table.body.rows.length === 0) return visualizationData\n\n // First get the unique values of the x column\n const rowIds = table.body.rows.map((row) => row.id)\n\n let groupBy = getTableColumn(table, visualization.group.column)\n // KASPER CHECK: I think the first clause in the statement can go\n // getTableColumn will return a string array or errs out\n // so only check for length is still doing something\n if (groupBy.length === 0) {\n throw new Error(`X column ${table.id}.${visualization.group.column} not found`)\n }\n let xSortable: Array | null = null // separate variable allows using epoch time for sorting dates\n\n // ADD CODE TO TRANSFORM TO DATE, BUT THEN ALSO KEEP AN INDEX BASED ON THE DATE ORDER\n if (visualization.group.dateFormat !== undefined) {\n ;[groupBy, xSortable] = formatDate(groupBy, visualization.group.dateFormat)\n }\n\n const aggregate: Record = {}\n for (const value of visualization.values) {\n const aggFun = value.aggregate !== undefined ? value.aggregate : 'count'\n let tickerFormat: TickerFormat = 'default'\n if (aggFun === 'pct' || aggFun === 'count_pct') tickerFormat = 'percent'\n\n const yValues = getTableColumn(table, value.column)\n // KASPER CHECK\n if (yValues.length === 0) throw new Error(`Y column ${table.id}.${value.column} not found`)\n\n // If group_by column is specified, the columns in the aggregated data will be the unique group_by columns\n const yGroup = value.group_by !== undefined ? getTableColumn(table, value.group_by) : null\n\n // if missing values should be treated as zero, we need to add the missing values after knowing all groups\n const addZeroes = value.addZeroes ?? false\n const groupSummary: Record = {}\n const uniqueGroups = new Set([])\n\n for (let i = 0; i < groupBy.length; i++) {\n const xValue = groupBy[i]\n const yValue = yValues[i]\n const group =\n yGroup != null ? yGroup[i] : value.label !== undefined ? value.label : value.column\n if (addZeroes) uniqueGroups.add(group)\n const sortBy = xSortable != null ? xSortable[i] : groupBy[i]\n\n // calculate group summary statistics. This is used for the mean, pct and count_pct aggregations\n if (groupSummary[group] === undefined) groupSummary[group] = { n: 0, sum: 0 }\n if (aggFun === 'count_pct' || aggFun === 'mean') groupSummary[group].n += 1\n if (aggFun === 'pct') groupSummary[group].sum += Number(yValue) ?? 0\n\n // add the AxisSettings for the yKeys in this loop, because we need to get the unique group values from the data (if group_by is used)\n if (visualizationData.yKeys[group] === undefined) {\n visualizationData.yKeys[group] = {\n label: group,\n secondAxis: value.secondAxis !== undefined,\n tickerFormat\n }\n }\n\n if (aggregate[xValue] === undefined) {\n aggregate[xValue] = {\n sortBy: sortBy,\n rowIds: {},\n xLabel: visualizationData.xKey.label,\n xValue: String(xValue),\n values: {}\n }\n }\n if (aggregate[xValue].rowIds[group] === undefined) aggregate[xValue].rowIds[group] = []\n aggregate[xValue].rowIds[group].push(rowIds[i])\n\n if (aggregate[xValue].values[group] === undefined) aggregate[xValue].values[group] = 0\n if (aggFun === 'count' || aggFun === 'count_pct') aggregate[xValue].values[group] += 1\n if (aggFun === 'sum' || aggFun === 'mean' || aggFun === 'pct') {\n aggregate[xValue].values[group] += Number(yValue) ?? 0\n }\n }\n\n Object.keys(groupSummary).forEach((group) => {\n for (const xValue of Object.keys(aggregate)) {\n if (aggregate[xValue].values[group] === undefined) {\n if (addZeroes) aggregate[xValue].values[group] = 0\n else continue\n }\n if (aggFun === 'mean') {\n aggregate[xValue].values[group] =\n Number(aggregate[xValue].values[group]) / groupSummary[group].n\n }\n if (aggFun === 'count_pct') {\n aggregate[xValue].values[group] =\n (100 * Number(aggregate[xValue].values[group])) / groupSummary[group].n\n }\n if (aggFun === 'pct') {\n aggregate[xValue].values[group] =\n (100 * Number(aggregate[xValue].values[group])) / groupSummary[group].sum\n }\n }\n })\n }\n\n visualizationData.data = Object.values(aggregate)\n .sort((a: any, b: any) => (a.sortBy < b.sortBy ? -1 : b.sortBy < a.sortBy ? 1 : 0))\n .map((d) => {\n for (const key of Object.keys(d.values)) d.values[key] = Math.round(d.values[key] * 100) / 100\n return {\n ...d.values,\n [d.xLabel]: d.xValue,\n __rowIds: d.rowIds,\n __sortBy: d.sortBy\n }\n })\n\n return visualizationData\n}\n\nexport interface PrepareAggregatedData {\n xLabel: string\n xValue: string\n values: Record\n rowIds: Record\n sortBy: number | string\n}\n","import { getTableColumn, rescaleToRange, tokenize } from './util'\nimport { PropsUITable, TableContext } from '../../../../../types/elements'\nimport {\n TextVisualizationData,\n TextVisualization,\n ScoredTerm\n} from '../../../../../types/visualizations'\n\ninterface VocabularyStats {\n value: number\n docFreq: number\n}\n\nexport async function prepareTextData (\n table: PropsUITable & TableContext,\n visualization: TextVisualization\n): Promise {\n const visualizationData: TextVisualizationData = {\n type: visualization.type,\n topTerms: []\n }\n\n if (table.body.rows.length === 0) return visualizationData\n\n const texts = getTableColumn(table, visualization.textColumn)\n const values =\n visualization.valueColumn != null ? getTableColumn(table, visualization.valueColumn) : null\n\n const vocabulary = getVocabulary(texts, values, visualization)\n visualizationData.topTerms = getTopTerms(vocabulary, texts.length, 200)\n\n return visualizationData\n}\n\nfunction getVocabulary (\n texts: string[],\n values: string[] | null,\n visualization: TextVisualization\n): Record {\n const vocabulary: Record = {}\n\n for (let i = 0; i < texts.length; i++) {\n if (texts?.[i] == null) continue\n const text = texts[i]\n const tokens =\n visualization.tokenize != null && visualization.tokenize ? tokenize(text) : [text]\n\n const seen = new Set()\n for (const token of tokens) {\n if (vocabulary[token] === undefined) vocabulary[token] = { value: 0, docFreq: 0 }\n if (!seen.has(token)) {\n vocabulary[token].docFreq += 1\n seen.add(token)\n }\n const v = Number(values?.[i]) ?? 1\n if (!isNaN(v)) vocabulary[token].value += v\n }\n }\n return vocabulary\n}\n\nfunction getTopTerms (\n vocabulary: Record,\n nDocs: number,\n topTerms: number\n): ScoredTerm[] {\n const words = Object.entries(vocabulary)\n .map(([text, stats]) => {\n const tf = Math.log(1 + stats.value)\n const idf = Math.log(nDocs / stats.docFreq)\n return { text, value: stats.value, importance: tf * idf }\n })\n .sort((a, b) => b.importance - a.importance)\n .slice(0, topTerms)\n\n const minImportance = Math.min(...words.map((w) => w.importance))\n const maxImportance = Math.max(...words.map((w) => w.importance))\n\n return words.map((w) => {\n return {\n text: w.text,\n value: w.value,\n importance: rescaleToRange(w.importance, minImportance, maxImportance, 0, 1)\n }\n })\n}\n","import { PropsUITable, TableContext, TableWithContext } from '../../../../types/elements'\nimport {\n ChartVisualization,\n TextVisualization,\n VisualizationType,\n VisualizationData\n} from '../../../../types/visualizations'\nimport { prepareChartData } from './visualizationDataFunctions/prepareChartData'\nimport { prepareTextData } from './visualizationDataFunctions/prepareTextData'\n\ninterface Input {\n table: TableWithContext\n visualization: VisualizationType\n}\n\nself.onmessage = (e: MessageEvent) => {\n createVisualizationData(e.data.table, e.data.visualization)\n .then((visualizationData) => {\n self.postMessage({ status: 'success', visualizationData })\n })\n .catch((error) => {\n console.error(error)\n self.postMessage({ status: 'error', visualizationData: undefined })\n })\n}\n\nasync function createVisualizationData (\n table: PropsUITable & TableContext,\n visualization: VisualizationType\n): Promise {\n if (table === undefined || visualization === undefined) throw new Error('Table and visualization are required')\n\n if (['line', 'bar', 'area'].includes(visualization.type)) { return await prepareChartData(table, visualization as ChartVisualization) }\n\n if (['wordcloud'].includes(visualization.type)) { return await prepareTextData(table, visualization as TextVisualization) }\n\n throw new Error(`Visualization type ${visualization.type} not supported`)\n}\n"],"names":["autoFormatDate","dateNumbers","minValues","minTime","Math","min","maxTime","max","autoFormat","tokenize","text","split","filter","token","test","getTableColumn","table","column","columnIndex","head","cells","findIndex","cell","Error","id","body","rows","map","row","rescaleToRange","value","newMin","newMax","async","prepareChartData","visualization","visualizationData","type","xKey","label","undefined","group","yKeys","data","length","rowIds","groupBy","xSortable","dateFormat","dateString","format","formattedDate","date","Date","getTime","sortableDate","getFullYear","toString","year","quarter","floor","getMonth","toLocaleString","month","toISOString","formatter","Intl","DateTimeFormat","weekday","getDay","day","hour","getHours","formatDate","aggregate","values","aggFun","tickerFormat","yValues","yGroup","group_by","addZeroes","groupSummary","uniqueGroups","Set","i","xValue","yValue","add","sortBy","n","sum","Number","secondAxis","xLabel","String","push","Object","keys","forEach","sort","a","b","d","key","round","__rowIds","__sortBy","prepareTextData","topTerms","texts","textColumn","vocabulary","tokens","seen","docFreq","has","v","isNaN","getVocabulary","valueColumn","nDocs","words","entries","stats","tf","log","idf","importance","slice","minImportance","w","maxImportance","getTopTerms","self","onmessage","e","includes","createVisualizationData","then","postMessage","status","catch","error","console"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/448.f953d78c.chunk.js b/static/js/448.f953d78c.chunk.js new file mode 100644 index 0000000..6e26c35 --- /dev/null +++ b/static/js/448.f953d78c.chunk.js @@ -0,0 +1,2 @@ +(()=>{"use strict";function t(t,e){const o=Math.min(...t),n=Math.max(...t);let r="hour";return n-o>864e5*e&&(r="day"),n-o>2592e6*e&&(r="month"),n-o>7776e6*e&&(r="quarter"),n-o>31536e6*e&&(r="year"),r}function e(t,e,o){const n={},[r,a]=t;let u=0;if("year"===e&&(u=314496e5),"quarter"===e&&(u=72576e5),["month","month_cycle"].includes(e)&&(u=24192e5),["day","weekday_cycle"].includes(e)&&(u=864e5),["hour","hour_cycle"].includes(e)&&(u=36e5),u>0)for(let l=r;l<=a;l+=u){const t=o(new Date(l));void 0===n[t]&&(n[t]=l)}return n}function o(t){return t.split(" ").filter((t=>/\p{L}/giu.test(t)))}function n(t,e){const o=t.head.cells.findIndex((t=>t.text===e));if(o<0)throw new Error("column ".concat(t.id,".").concat(e," not found"));return t.body.rows.map((t=>t.cells[o].text))}function r(t,e,o,n,r){return(t-e)/(o-e)*(r-n)+n}async function a(o,r){if(0===o.body.rows.length)return u(r);const a=function(o,r){const a={},{groupBy:u,xSortable:l}=function(o,r){let a=n(o,r.group.column);if(0===a.length)throw new Error("X column ".concat(o.id,".").concat(r.group.column," not found"));let u=null;void 0!==r.group.dateFormat&&([a,u]=function(o,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=o;const u=o.map((t=>new Date(t).getTime()));let l=null,c=t=>t.toISOString();"auto"===n&&(n=t(u,r)),"year"===n&&(c=t=>t.getFullYear().toString()),"quarter"===n&&(c=t=>{const e=t.getFullYear().toString(),o=Math.floor(t.getMonth()/3)+1;return"".concat(e,"-Q").concat(o)}),"month"===n&&(c=t=>{const e=t.getFullYear().toString(),o=t.toLocaleString("default",{month:"short"});return"".concat(e,"-").concat(o)}),"day"===n&&(c=t=>{const e=t.getFullYear().toString(),o=t.toLocaleString("default",{month:"short"}),n=t.getDate().toString();return"".concat(e,"-").concat(o,"-").concat(n)}),"hour"===n&&(c=t=>t.toISOString().split("T")[1].split(":")[0]),"month_cycle"===n&&(c=t=>new Intl.DateTimeFormat("default",{month:"long"}).format(t),l=[new Date("2000-01-01").getTime(),new Date("2001-01-01").getTime()]),"weekday_cycle"===n&&(c=t=>new Intl.DateTimeFormat("default",{weekday:"long"}).format(t),l=[new Date("2023-11-06").getTime(),new Date("2023-11-13").getTime()]),"hour_cycle"===n&&(c=t=>new Intl.DateTimeFormat("default",{hour:"numeric",hour12:!1}).format(t),l=[new Date("2000-01-01").getTime(),new Date("2000-01-02").getTime()]),a=u.map((t=>c(new Date(t)))),null==l&&(l=[Math.min(...u),Math.max(...u)]);const s=e(l,n,c);return[a,s]}(a,r.group.dateFormat));if(void 0!==r.group.levels){u={};for(let t=0;tt.id)),s=void 0!==r.group.label?r.group.label:r.group.column;for(const t of r.values){var i;const e=void 0!==t.aggregate?t.aggregate:"count";let v="default";"pct"!==e&&"count_pct"!==e||(v="percent");const g=n(o,t.column);if(0===g.length)throw new Error("Y column ".concat(o.id,".").concat(t.column," not found"));const f=void 0!==t.group_by?n(o,t.group_by):null,p=null!==(i=t.addZeroes)&&void 0!==i&&i,y={};if(p&&null!=l)for(const[o,n]of Object.entries(l))void 0===a[o]&&(a[o]={sortBy:n,rowIds:{},xLabel:s,xValue:o,values:{},secondAxis:t.secondAxis,tickerFormat:v});for(let o=0;or.group.range[1]))continue;const i=g[o],p=void 0!==t.label?t.label:t.column,h=null!=f?f[o]:p,w=null!=l?l[n]:u[o];var m;if(void 0===y[h]&&(y[h]={n:0,sum:0}),"count_pct"!==e&&"mean"!==e||(y[h].n+=1),"pct"===e&&(y[h].sum+=null!==(d=Number(i))&&void 0!==d?d:0),void 0===a[n]&&(a[n]={sortBy:w,rowIds:{},xLabel:s,xValue:String(n),values:{},secondAxis:t.secondAxis,tickerFormat:v}),void 0===a[n].rowIds[h]&&(a[n].rowIds[h]=[]),a[n].rowIds[h].push(c[o]),void 0===a[n].values[h]&&(a[n].values[h]=0),"count"!==e&&"count_pct"!==e||(a[n].values[h]+=1),"sum"===e||"mean"===e||"pct"===e)a[n].values[h]+=null!==(m=Number(i))&&void 0!==m?m:0}Object.keys(y).forEach((t=>{for(const o of Object.keys(a)){if(void 0===a[o].values[t]){if(!p)continue;a[o].values[t]=0}"mean"===e&&(a[o].values[t]=Number(a[o].values[t])/y[t].n),"count_pct"===e&&(a[o].values[t]=100*Number(a[o].values[t])/y[t].n),"pct"===e&&(a[o].values[t]=100*Number(a[o].values[t])/y[t].sum)}}))}return a}(o,r);return function(t,e){const o=u(t);for(const n of Object.values(e))for(const t of Object.keys(n.values))void 0===o.yKeys[t]&&(o.yKeys[t]={label:t,secondAxis:n.secondAxis,tickerFormat:n.tickerFormat});return o.data=Object.values(e).sort(((t,e)=>t.sortBy{for(const e of Object.keys(t.values))t.values[e]=Math.round(100*t.values[e])/100;return{...t.values,[t.xLabel]:t.xValue,__rowIds:t.rowIds,__sortBy:t.sortBy}})),o}(r,a)}function u(t){return{type:t.type,xKey:{label:void 0!==t.group.label?t.group.label:t.group.column},yKeys:{},data:[]}}async function l(t,e){const a={type:e.type,topTerms:[]};if(0===t.body.rows.length)return a;const u=n(t,e.textColumn),l=function(t,e,n){const r={};for(let u=0;u{let[o,n]=t;const r=Math.log(1+n.value),a=Math.log(e/n.docFreq);return{text:o,value:n.value,importance:r*a}})).sort(((t,e)=>e.importance-t.importance)).slice(0,o),a=Math.min(...n.map((t=>t.importance))),u=Math.max(...n.map((t=>t.importance)));return n.map((t=>({text:t.text,value:t.value,importance:r(t.importance,a,u,0,1)})))}(l,u.length,200),a}self.onmessage=t=>{(async function(t,e){if(void 0===t||void 0===e)throw new Error("Table and visualization are required");if(["line","bar","area"].includes(e.type))return await a(t,e);if(["wordcloud"].includes(e.type))return await l(t,e);throw new Error("Visualization type ".concat(e.type," not supported"))})(t.data.table,t.data.visualization).then((t=>{self.postMessage({status:"success",visualizationData:t})})).catch((t=>{console.error(t),self.postMessage({status:"error",visualizationData:void 0})}))}})(); +//# sourceMappingURL=448.f953d78c.chunk.js.map \ No newline at end of file diff --git a/static/js/448.f953d78c.chunk.js.map b/static/js/448.f953d78c.chunk.js.map new file mode 100644 index 0000000..34d7a71 --- /dev/null +++ b/static/js/448.f953d78c.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"static/js/448.f953d78c.chunk.js","mappings":"mBAgFA,SAASA,EAAgBC,EAAuBC,GAC9C,MAAMC,EAAUC,KAAKC,OAAOJ,GACtBK,EAAUF,KAAKG,OAAON,GAE5B,IAAIO,EAAyB,OAM7B,OALIF,EAAUH,EAAU,MAAsBD,IAAWM,EAAa,OAClEF,EAAUH,EAAU,OAA2BD,IAAWM,EAAa,SACvEF,EAAUH,EAAU,OAA+BD,IAAWM,EAAa,WAC3EF,EAAUH,EAAU,QAA4BD,IAAWM,EAAa,QAErEA,CACR,CAED,SAASC,EACPC,EACAC,EACAC,GAIA,MAAMC,EAAmC,CAAC,GACnCV,EAASG,GAAWI,EAK3B,IAAII,EAAyB,EAO7B,GANiB,SAAbH,IAAqBG,EAAiB,UACzB,YAAbH,IAAwBG,EAAiB,SACzC,CAAC,QAAS,eAAeC,SAASJ,KAAWG,EAAiB,SAC9D,CAAC,MAAO,iBAAiBC,SAASJ,KAAWG,EAAiB,OAC9D,CAAC,OAAQ,cAAcC,SAASJ,KAAWG,EAAiB,MAE5DA,EAAiB,EACnB,IAAK,IAAIE,EAAIb,EAASa,GAAKV,EAASU,GAAKF,EAAgB,CACvD,MACMG,EAAaL,EADN,IAAIM,KAAKF,SAEOG,IAAzBN,EAASI,KACbJ,EAASI,GAAcD,EACxB,CAGH,OAAOH,CACR,CAEM,SAASO,EAAUC,GAExB,OADeA,EAAKC,MAAM,KACZC,QAA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qBAAtC,IAEDgD,OAAOC,IACNC,QAAQD,MAAMA,GACdP,KAAKI,YAAY,CAAEC,OAAQ,QAAS/C,uBAAmBxF,GAAvD,GANJ,C","sources":["framework/visualisation/react/ui/workers/visualizationDataFunctions/util.ts","framework/visualisation/react/ui/workers/visualizationDataFunctions/prepareChartData.ts","framework/visualisation/react/ui/workers/visualizationDataFunctions/prepareTextData.ts","framework/visualisation/react/ui/workers/visualizationDataWorker.ts"],"sourcesContent":["import { PropsUITable, TableContext } from '../../../../../types/elements'\nimport { DateFormat } from '../../../../../types/visualizations'\n\nexport function formatDate (\n dateString: string[],\n format: DateFormat,\n minValues: number = 10\n): [string[], Record | null] {\n let formattedDate: string[] = dateString\n const dateNumbers = dateString.map((date) => new Date(date).getTime())\n let domain: [number, number] | null = null\n let formatter: (date: Date) => string = (date) => date.toISOString()\n\n if (format === 'auto') format = autoFormatDate(dateNumbers, minValues)\n\n if (format === 'year') formatter = (date) => date.getFullYear().toString()\n\n if (format === 'quarter') {\n formatter = (date) => {\n const year = date.getFullYear().toString()\n const quarter = Math.floor(date.getMonth() / 3) + 1\n return `${year}-Q${quarter}`\n }\n }\n\n if (format === 'month') {\n formatter = (date) => {\n const year = date.getFullYear().toString()\n const month = date.toLocaleString('default', { month: 'short' })\n return `${year}-${month}`\n }\n }\n\n if (format === 'day') {\n formatter = (date) => {\n const year = date.getFullYear().toString()\n const month = date.toLocaleString('default', { month: 'short' })\n const day = date.getDate().toString()\n return `${year}-${month}-${day}`\n }\n }\n\n if (format === 'hour') {\n formatter = (date) => {\n return date.toISOString().split('T')[1].split(':')[0]\n }\n }\n\n if (format === 'month_cycle') {\n formatter = (date) => {\n const intlFormatter = new Intl.DateTimeFormat('default', { month: 'long' })\n return intlFormatter.format(date)\n }\n // can be any year, starting at january\n domain = [new Date('2000-01-01').getTime(), new Date('2001-01-01').getTime()]\n }\n if (format === 'weekday_cycle') {\n formatter = (date) => {\n const intlFormatter = new Intl.DateTimeFormat('default', { weekday: 'long' })\n return intlFormatter.format(date)\n }\n // can be any full week, starting at monday\n domain = [new Date('2023-11-06').getTime(), new Date('2023-11-13').getTime()]\n }\n if (format === 'hour_cycle') {\n formatter = (date) => {\n const intlFormatter = new Intl.DateTimeFormat('default', { hour: 'numeric', hour12: false })\n return intlFormatter.format(date)\n }\n // can be any day, starting at midnight\n domain = [new Date('2000-01-01').getTime(), new Date('2000-01-02').getTime()]\n }\n\n formattedDate = dateNumbers.map((date) => formatter(new Date(date)))\n if (domain == null) domain = [Math.min(...dateNumbers), Math.max(...dateNumbers)]\n const sortableDate: Record | null = createSortable(domain, format, formatter)\n\n return [formattedDate, sortableDate]\n}\n\nfunction autoFormatDate (dateNumbers: number[], minValues: number): DateFormat {\n const minTime = Math.min(...dateNumbers)\n const maxTime = Math.max(...dateNumbers)\n\n let autoFormat: DateFormat = 'hour'\n if (maxTime - minTime > 1000 * 60 * 60 * 24 * minValues) autoFormat = 'day'\n if (maxTime - minTime > 1000 * 60 * 60 * 24 * 30 * minValues) autoFormat = 'month'\n if (maxTime - minTime > 1000 * 60 * 60 * 24 * 30 * 3 * minValues) autoFormat = 'quarter'\n if (maxTime - minTime > 1000 * 60 * 60 * 24 * 365 * minValues) autoFormat = 'year'\n\n return autoFormat\n}\n\nfunction createSortable (\n domain: [number, number],\n interval: string,\n formatter: (date: Date) => string\n): Record | null {\n // creates a map of datestrings to sortby numbers. Also includes intervalls, so that\n // addZeroes can be used.\n const sortable: Record = {}\n const [minTime, maxTime] = domain\n\n // intervalnumbers don't need to be exact. Just small enough that they never\n // skip over an interval (e.g., month should be shortest possible month).\n // Duplicate dates are ignored in set\n let intervalNumber: number = 0\n if (interval === 'year') intervalNumber = 1000 * 60 * 60 * 24 * 364\n if (interval === 'quarter') intervalNumber = 1000 * 60 * 60 * 24 * 28 * 3\n if (['month', 'month_cycle'].includes(interval)) intervalNumber = 1000 * 60 * 60 * 24 * 28\n if (['day', 'weekday_cycle'].includes(interval)) intervalNumber = 1000 * 60 * 60 * 24\n if (['hour', 'hour_cycle'].includes(interval)) intervalNumber = 1000 * 60 * 60\n\n if (intervalNumber > 0) {\n for (let i = minTime; i <= maxTime; i += intervalNumber) {\n const date = new Date(i)\n const datestring = formatter(date)\n if (sortable[datestring] !== undefined) continue\n sortable[datestring] = i\n }\n }\n\n return sortable\n}\n\nexport function tokenize (text: string): string[] {\n const tokens = text.split(' ')\n return tokens.filter((token) => /\\p{L}/giu.test(token)) // only tokens with word characters\n}\n\nexport function getTableColumn (table: PropsUITable & TableContext, column: string): string[] {\n const columnIndex = table.head.cells.findIndex((cell) => cell.text === column)\n if (columnIndex < 0) throw new Error(`column ${table.id}.${column} not found`)\n return table.body.rows.map((row) => row.cells[columnIndex].text)\n}\n\nexport function rescaleToRange (\n value: number,\n min: number,\n max: number,\n newMin: number,\n newMax: number\n): number {\n return ((value - min) / (max - min)) * (newMax - newMin) + newMin\n}\n","import { formatDate, getTableColumn } from './util'\nimport { PropsUITable, TableContext } from '../../../../../types/elements'\nimport {\n TickerFormat,\n ChartVisualizationData,\n ChartVisualization\n} from '../../../../../types/visualizations'\n\nexport async function prepareChartData (\n table: PropsUITable & TableContext,\n visualization: ChartVisualization\n): Promise {\n if (table.body.rows.length === 0) return emptyVisualizationData(visualization)\n\n const aggregate = aggregateData(table, visualization)\n return createVisualizationData(visualization, aggregate)\n}\n\nfunction createVisualizationData (\n visualization: ChartVisualization,\n aggregate: Record\n): ChartVisualizationData {\n const visualizationData = emptyVisualizationData(visualization)\n\n for (const aggdata of Object.values(aggregate)) {\n for (const group of Object.keys(aggdata.values)) {\n if (visualizationData.yKeys[group] === undefined) {\n visualizationData.yKeys[group] = {\n label: group,\n secondAxis: aggdata.secondAxis,\n tickerFormat: aggdata.tickerFormat\n }\n }\n }\n }\n\n visualizationData.data = Object.values(aggregate)\n .sort((a: any, b: any) => (a.sortBy < b.sortBy ? -1 : b.sortBy < a.sortBy ? 1 : 0))\n .map((d) => {\n for (const key of Object.keys(d.values)) d.values[key] = Math.round(d.values[key] * 100) / 100\n\n return {\n ...d.values,\n [d.xLabel]: d.xValue,\n __rowIds: d.rowIds,\n __sortBy: d.sortBy\n }\n })\n\n return visualizationData\n}\n\nfunction emptyVisualizationData (visualization: ChartVisualization): ChartVisualizationData {\n return {\n type: visualization.type,\n xKey: {\n label:\n visualization.group.label !== undefined\n ? visualization.group.label\n : visualization.group.column\n },\n yKeys: {},\n data: []\n }\n}\n\nfunction aggregateData (\n table: PropsUITable & TableContext,\n visualization: ChartVisualization\n): Record {\n const aggregate: Record = {}\n\n const { groupBy, xSortable } = prepareX(table, visualization)\n const rowIds = table.body.rows.map((row) => row.id)\n const xLabel =\n visualization.group.label !== undefined ? visualization.group.label : visualization.group.column\n\n for (const value of visualization.values) {\n // loop over all y values\n\n const aggFun = value.aggregate !== undefined ? value.aggregate : 'count'\n let tickerFormat: TickerFormat = 'default'\n if (aggFun === 'pct' || aggFun === 'count_pct') tickerFormat = 'percent'\n\n const yValues = getTableColumn(table, value.column)\n if (yValues.length === 0) throw new Error(`Y column ${table.id}.${value.column} not found`)\n\n // If group_by column is specified, the columns in the aggregated data will be the unique group_by columns\n const yGroup = value.group_by !== undefined ? getTableColumn(table, value.group_by) : null\n\n // if missing values should be treated as zero, we need to add the missing values after knowing all groups\n const addZeroes = value.addZeroes ?? false\n const groupSummary: Record = {}\n\n // if addZeroes, prefill with all possible values\n if (addZeroes && xSortable != null) {\n for (const [uniqueValue, sortby] of Object.entries(xSortable)) {\n if (aggregate[uniqueValue] !== undefined) continue\n aggregate[uniqueValue] = {\n sortBy: sortby,\n rowIds: {},\n xLabel,\n xValue: uniqueValue,\n values: {},\n secondAxis: value.secondAxis,\n tickerFormat\n }\n }\n }\n\n for (let i = 0; i < rowIds.length; i++) {\n // loop over rows of table\n const xValue = groupBy[i]\n\n if (visualization.group.range !== undefined) {\n if (\n Number(xValue) < visualization.group.range[0] ||\n Number(xValue) > visualization.group.range[1]\n ) {\n continue\n }\n }\n\n // SHOULD GROUP BE IGNORED IF NOT IN group.levels? MAYBE NOT, BECAUSE\n // THIS COULD HARM INFORMED CONSENT IF THE RESEARCHER IS UNAWARE OF CERTAIN GROUPS\n // if (visualization.group.levels !== undefined) {\n // // formatLevels has xSortable < 0 if no match with levels\n // if (xSortable !== null && xSortable[i] < 0) continue\n // }\n\n const yValue = yValues[i]\n const label = value.label !== undefined ? value.label : value.column\n const group = yGroup != null ? yGroup[i] : label\n\n const sortBy = xSortable != null ? xSortable[xValue] : groupBy[i]\n\n // calculate group summary statistics. This is used for the mean, pct and count_pct aggregations\n if (groupSummary[group] === undefined) groupSummary[group] = { n: 0, sum: 0 }\n if (aggFun === 'count_pct' || aggFun === 'mean') groupSummary[group].n += 1\n if (aggFun === 'pct') groupSummary[group].sum += Number(yValue) ?? 0\n\n if (aggregate[xValue] === undefined) {\n aggregate[xValue] = {\n sortBy: sortBy,\n rowIds: {},\n xLabel,\n xValue: String(xValue),\n values: {},\n secondAxis: value.secondAxis,\n tickerFormat\n }\n }\n if (aggregate[xValue].rowIds[group] === undefined) aggregate[xValue].rowIds[group] = []\n aggregate[xValue].rowIds[group].push(rowIds[i])\n\n if (aggregate[xValue].values[group] === undefined) aggregate[xValue].values[group] = 0\n if (aggFun === 'count' || aggFun === 'count_pct') aggregate[xValue].values[group] += 1\n if (aggFun === 'sum' || aggFun === 'mean' || aggFun === 'pct') {\n aggregate[xValue].values[group] += Number(yValue) ?? 0\n }\n }\n\n // use groupSummary to calculate the mean, pct and count_pct aggregations\n Object.keys(groupSummary).forEach((group) => {\n for (const xValue of Object.keys(aggregate)) {\n if (aggregate[xValue].values[group] === undefined) {\n if (addZeroes) aggregate[xValue].values[group] = 0\n else continue\n }\n if (aggFun === 'mean') {\n aggregate[xValue].values[group] =\n Number(aggregate[xValue].values[group]) / groupSummary[group].n\n }\n if (aggFun === 'count_pct') {\n aggregate[xValue].values[group] =\n (100 * Number(aggregate[xValue].values[group])) / groupSummary[group].n\n }\n if (aggFun === 'pct') {\n aggregate[xValue].values[group] =\n (100 * Number(aggregate[xValue].values[group])) / groupSummary[group].sum\n }\n }\n })\n }\n\n return aggregate\n}\n\nfunction prepareX (\n table: PropsUITable & TableContext,\n visualization: ChartVisualization\n): { groupBy: string[], xSortable: Record | null } {\n let groupBy = getTableColumn(table, visualization.group.column)\n if (groupBy.length === 0) {\n throw new Error(`X column ${table.id}.${visualization.group.column} not found`)\n }\n // let xSortable: Array | null = null // separate variable allows using epoch time for sorting dates\n let xSortable: Record | null = null // map x values to sortable values\n\n // ADD CODE TO TRANSFORM TO DATE, BUT THEN ALSO KEEP AN INDEX BASED ON THE DATE ORDER\n if (visualization.group.dateFormat !== undefined) {\n ;[groupBy, xSortable] = formatDate(groupBy, visualization.group.dateFormat)\n }\n\n if (visualization.group.levels !== undefined) {\n xSortable = {}\n\n for (let i = 0; i < visualization.group.levels.length; i++) {\n const level = visualization.group.levels[i]\n xSortable[level] = i\n }\n }\n\n return { groupBy, xSortable }\n}\n\nexport interface PrepareAggregatedData {\n xLabel: string\n xValue: string\n values: Record\n rowIds: Record\n sortBy: number | string\n secondAxis?: boolean\n tickerFormat?: TickerFormat\n}\n","import { getTableColumn, rescaleToRange, tokenize } from './util'\nimport { PropsUITable, TableContext } from '../../../../../types/elements'\nimport {\n TextVisualizationData,\n TextVisualization,\n ScoredTerm\n} from '../../../../../types/visualizations'\n\ninterface VocabularyStats {\n value: number\n docFreq: number\n}\n\nexport async function prepareTextData (\n table: PropsUITable & TableContext,\n visualization: TextVisualization\n): Promise {\n const visualizationData: TextVisualizationData = {\n type: visualization.type,\n topTerms: []\n }\n\n if (table.body.rows.length === 0) return visualizationData\n\n const texts = getTableColumn(table, visualization.textColumn)\n const values =\n visualization.valueColumn != null ? getTableColumn(table, visualization.valueColumn) : null\n\n const vocabulary = getVocabulary(texts, values, visualization)\n visualizationData.topTerms = getTopTerms(vocabulary, texts.length, 200)\n\n return visualizationData\n}\n\nfunction getVocabulary (\n texts: string[],\n values: string[] | null,\n visualization: TextVisualization\n): Record {\n const vocabulary: Record = {}\n\n for (let i = 0; i < texts.length; i++) {\n if (texts?.[i] == null) continue\n const text = texts[i]\n const tokens =\n visualization.tokenize != null && visualization.tokenize ? tokenize(text) : [text]\n\n const seen = new Set()\n for (const token of tokens) {\n if (vocabulary[token] === undefined) vocabulary[token] = { value: 0, docFreq: 0 }\n if (!seen.has(token)) {\n vocabulary[token].docFreq += 1\n seen.add(token)\n }\n const v = Number(values?.[i]) ?? 1\n if (!isNaN(v)) vocabulary[token].value += v\n }\n }\n return vocabulary\n}\n\nfunction getTopTerms (\n vocabulary: Record,\n nDocs: number,\n topTerms: number\n): ScoredTerm[] {\n const words = Object.entries(vocabulary)\n .map(([text, stats]) => {\n const tf = Math.log(1 + stats.value)\n const idf = Math.log(nDocs / stats.docFreq)\n return { text, value: stats.value, importance: tf * idf }\n })\n .sort((a, b) => b.importance - a.importance)\n .slice(0, topTerms)\n\n const minImportance = Math.min(...words.map((w) => w.importance))\n const maxImportance = Math.max(...words.map((w) => w.importance))\n\n return words.map((w) => {\n return {\n text: w.text,\n value: w.value,\n importance: rescaleToRange(w.importance, minImportance, maxImportance, 0, 1)\n }\n })\n}\n","import { PropsUITable, TableContext, TableWithContext } from '../../../../types/elements'\nimport {\n ChartVisualization,\n TextVisualization,\n VisualizationType,\n VisualizationData\n} from '../../../../types/visualizations'\nimport { prepareChartData } from './visualizationDataFunctions/prepareChartData'\nimport { prepareTextData } from './visualizationDataFunctions/prepareTextData'\n\ninterface Input {\n table: TableWithContext\n visualization: VisualizationType\n}\n\nself.onmessage = (e: MessageEvent) => {\n createVisualizationData(e.data.table, e.data.visualization)\n .then((visualizationData) => {\n self.postMessage({ status: 'success', visualizationData })\n })\n .catch((error) => {\n console.error(error)\n self.postMessage({ status: 'error', visualizationData: undefined })\n })\n}\n\nasync function createVisualizationData (\n table: PropsUITable & TableContext,\n visualization: VisualizationType\n): Promise {\n if (table === undefined || visualization === undefined) throw new Error('Table and visualization are required')\n\n if (['line', 'bar', 'area'].includes(visualization.type)) { return await prepareChartData(table, visualization as ChartVisualization) }\n\n if (['wordcloud'].includes(visualization.type)) { return await prepareTextData(table, visualization as TextVisualization) }\n\n throw new Error(`Visualization type ${visualization.type} not supported`)\n}\n"],"names":["autoFormatDate","dateNumbers","minValues","minTime","Math","min","maxTime","max","autoFormat","createSortable","domain","interval","formatter","sortable","intervalNumber","includes","i","datestring","Date","undefined","tokenize","text","split","filter","token","test","getTableColumn","table","column","columnIndex","head","cells","findIndex","cell","Error","id","body","rows","map","row","rescaleToRange","value","newMin","newMax","async","prepareChartData","visualization","length","emptyVisualizationData","aggregate","groupBy","xSortable","group","dateFormat","dateString","format","formattedDate","date","getTime","toISOString","getFullYear","toString","year","quarter","floor","getMonth","month","toLocaleString","day","getDate","Intl","DateTimeFormat","weekday","hour","hour12","sortableDate","formatDate","levels","prepareX","rowIds","xLabel","label","values","aggFun","tickerFormat","yValues","yGroup","group_by","addZeroes","groupSummary","uniqueValue","sortby","Object","entries","sortBy","xValue","secondAxis","range","Number","yValue","n","sum","String","push","keys","forEach","aggregateData","visualizationData","aggdata","yKeys","data","sort","a","b","d","key","round","__rowIds","__sortBy","createVisualizationData","type","xKey","prepareTextData","topTerms","texts","textColumn","vocabulary","tokens","seen","Set","docFreq","has","add","v","isNaN","getVocabulary","valueColumn","nDocs","words","stats","tf","log","idf","importance","slice","minImportance","w","maxImportance","getTopTerms","self","onmessage","e","then","postMessage","status","catch","error","console"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/main.e7fd8c86.js b/static/js/main.1b548bfd.js similarity index 97% rename from static/js/main.e7fd8c86.js rename to static/js/main.1b548bfd.js index f9da3d8..f8cb1e1 100644 --- a/static/js/main.e7fd8c86.js +++ b/static/js/main.1b548bfd.js @@ -1,3 +1,3 @@ -/*! For license information please see main.e7fd8c86.js.LICENSE.txt */ -(()=>{var __webpack_modules__={345:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Group:()=>c});var n=r(2007),i=r.n(n),a=r(2791),o=r(1694),s=r.n(o),l=["top","left","transform","className","children","innerRef"];function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,l);return a.createElement("g",u({ref:h,className:s()("visx-group",c),transform:o||"translate("+i+", "+r+")"},p),f)}c.propTypes={top:i().number,left:i().number,transform:i().string,className:i().string,children:i().node,innerRef:i().oneOfType([i().string,i().func,i().object])}},9058:(e,t,r)=>{"use strict";t.Z=u;var n=l(r(2007)),i=l(r(2791)),a=r(345),o=l(r(5730)),s=["children"];function l(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=e.children,r=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(e,s),n=r.width,l=r.height,u=(0,o.default)(r);return 0===n||0===l?null:i.default.createElement("svg",{width:n,height:l},i.default.createElement(a.Group,{left:n/2,top:l/2},t(u)))}u.propTypes={children:n.default.func.isRequired}},5730:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){var t=e.width,r=e.height,n=e.font,o=e.fontSize,s=e.fontStyle,l=e.fontWeight,u=e.padding,c=e.random,f=e.rotate,h=e.spiral,p=e.words,d=(0,i.useState)([]),m=d[0],y=d[1];return(0,i.useEffect)((function(){if(0!==t&&0!==r){var e=(0,a.default)();return e.size([t,r]),e.words(p),"undefined"!==typeof c&&e.random(c),"undefined"!==typeof n&&e.font(n),"undefined"!==typeof u&&e.padding(u),"undefined"!==typeof o&&e.fontSize(o),"undefined"!==typeof s&&e.fontStyle(s),"undefined"!==typeof l&&e.fontWeight(l),"undefined"!==typeof f&&e.rotate(f),"undefined"!==typeof h&&e.spiral(h),e.on("end",y),e.start(),function(){e.stop()}}}),[t,r,n,o,s,l,u,c,f,h,p]),m};var n,i=r(2791),a=(n=r(9205))&&n.__esModule?n:{default:n}},4249:e=>{"use strict";function t(e,t,i){e instanceof RegExp&&(e=r(e,i)),t instanceof RegExp&&(t=r(t,i));var a=n(e,t,i);return a&&{start:a[0],end:a[1],pre:i.slice(0,a[0]),body:i.slice(a[0]+e.length,a[1]),post:i.slice(a[1]+t.length)}}function r(e,t){var r=t.match(e);return r?r[0]:null}function n(e,t,r){var n,i,a,o,s,l=r.indexOf(e),u=r.indexOf(t,l+1),c=l;if(l>=0&&u>0){if(e===t)return[l,u];for(n=[],a=r.length;c>=0&&!s;)c==l?(n.push(c),l=r.indexOf(e,c+1)):1==n.length?s=[n.pop(),u]:((i=n.pop())=0?l:u;n.length&&(s=[a,o])}return s}e.exports=t,t.range=n},1694:(e,t)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t{var t={px:{px:1,cm:96/2.54,mm:96/25.4,in:96,pt:96/72,pc:16},cm:{px:2.54/96,cm:1,mm:.1,in:2.54,pt:2.54/72,pc:2.54/6},mm:{px:25.4/96,cm:10,mm:1,in:25.4,pt:25.4/72,pc:25.4/6},in:{px:1/96,cm:1/2.54,mm:1/25.4,in:1,pt:1/72,pc:1/6},pt:{px:.75,cm:72/2.54,mm:72/25.4,in:72,pt:1,pc:12},pc:{px:6/96,cm:6/2.54,mm:6/25.4,in:6,pt:6/72,pc:1},deg:{deg:1,grad:.9,rad:180/Math.PI,turn:360},grad:{deg:400/360,grad:1,rad:200/Math.PI,turn:400},rad:{deg:Math.PI/180,grad:Math.PI/200,rad:1,turn:2*Math.PI},turn:{deg:1/360,grad:1/400,rad:.5/Math.PI,turn:1},s:{s:1,ms:.001},ms:{s:1e3,ms:1},Hz:{Hz:1,kHz:1e3},kHz:{Hz:.001,kHz:1},dpi:{dpi:1,dpcm:1/2.54,dppx:1/96},dpcm:{dpi:2.54,dpcm:1,dppx:2.54/96},dppx:{dpi:96,dpcm:96/2.54,dppx:1}};e.exports=function(e,r,n,i){if(!t.hasOwnProperty(n))throw new Error("Cannot convert to "+n);if(!t[n].hasOwnProperty(r))throw new Error("Cannot convert from "+r+" to "+n);var a=t[n][r]*e;return!1!==i?(i=Math.pow(10,parseInt(i)||5),Math.round(a*i)/i):a}},9205:(e,t,r)=>{const n=r(5111).W,i=Math.PI/180,a={archimedean:y,rectangular:function(e){var t=4*e[0]/e[1],r=0,n=0;return function(e){var i=e<0?-1:1;switch(Math.sqrt(1+4*i*e)-i&3){case 0:r+=t;break;case 1:n+=4;break;case 2:r-=t;break;default:n-=4}return[r,n]}}},o=2048;function s(e){return e.text}function l(){return"serif"}function u(){return"normal"}function c(e){return Math.sqrt(e.value)}function f(){return 30*(~~(6*random())-3)}function h(){return 1}function p(e,t,r,n){if(!t.sprite){var a=e.context,s=e.ratio;a.clearRect(0,0,2048/s,o/s);var l=0,u=0,c=0,f=r.length;for(--n;++n>5<<5,b=~~Math.max(Math.abs(m+y),Math.abs(m-y))}else g=g+31>>5<<5;if(b>c&&(c=b),l+g>=2048&&(l=0,u+=c,c=0),u+b>=o)break;a.translate((l+(g>>1))/s,(u+(b>>1))/s),t.rotate&&a.rotate(t.rotate*i),a.fillText(t.text,f,0),t.padding&&(a.lineWidth=2*t.padding,a.strokeText(t.text,f,0)),a.restore(),t.width=g,t.height=b,t.xoff=l,t.yoff=u,t.x1=g>>1,t.y1=b>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,l+=g}for(var g=a.getImageData(0,0,2048/s,o/s).data,b=[];--n>=0;)if((t=r[n]).hasText){for(var x=t.width,w=x>>5,_=t.y1-t.y0,S=0;S<_*w;S++)b[S]=0;if(null==(l=t.xoff))return;u=t.yoff;for(var E=0,k=-1,P=0;P<_;P++){for(S=0;S>5),C=g[2048*(u+P)+(l+S)<<2]?1<<31-S%32:0;b[A]|=C,E|=C}E?k=P:(t.y0++,_--,P--,u++)}t.y1=t.y0+k,t.sprite=b.slice(0,(t.y1-t.y0)*w)}}}function d(e,t,r){r>>=5;for(var n,i=e.sprite,a=e.width>>5,o=e.x-(a<<4),s=127&o,l=32-s,u=e.y1-e.y0,c=(e.y+e.y0)*r+(o>>5),f=0;f>>s:0))&t[c+h])return!0;c+=r}return!1}function m(e,t){var r=e[0],n=e[1];t.x+t.x0n.x&&(n.x=t.x+t.x1),t.y+t.y1>n.y&&(n.y=t.y+t.y1)}function y(e){var t=e[0]/e[1];return function(e){return[t*(e*=.1)*Math.cos(e),e*Math.sin(e)]}}function v(){return document.createElement("canvas")}function g(e){return"function"===typeof e?e:function(){return e}}e.exports=function(){var e=[256,256],t=s,r=l,i=c,b=u,x=u,w=f,_=h,S=y,E=[],k=1/0,P=n("word","end"),A=null,C=Math.random,O={},T=v;function M(t,r,n){e[0],e[1];for(var i,a,o,s,l,u=r.x,c=r.y,f=Math.sqrt(e[0]*e[0]+e[1]*e[1]),h=S(e),p=C()<.5?1:-1,m=-p;(i=h(m+=p))&&(a=~~i[0],o=~~i[1],!(Math.min(Math.abs(a),Math.abs(o))>=f));)if(r.x=u+a,r.y=c+o,!(r.x+r.x0<0||r.y+r.y0<0||r.x+r.x1>e[0]||r.y+r.y1>e[1])&&(!n||(l=n,(s=r).x+s.x1>l[0].x&&s.x+s.x0l[0].y&&s.y+s.y0>5,b=e[0]>>5,x=r.x-(g<<4),w=127&x,_=32-w,E=r.y1-r.y0,k=(r.y+r.y0)*b+(x>>5),P=0;P>>w:0);k+=b}return!0}return!1}return O.canvas=function(e){return arguments.length?(T=g(e),O):T},O.start=function(){var n=function(e){const t=e.getContext("2d",{willReadFrequently:!0});e.width=e.height=1;const r=Math.sqrt(t.getImageData(0,0,1,1).data.length>>2);return e.width=2048/r,e.height=o/r,t.fillStyle=t.strokeStyle="red",{context:t,ratio:r}}(T()),a=function(e){var t=[],r=-1;for(;++r>5)*e[1]),s=null,l=E.length,u=-1,c=[],f=E.map((function(e,n){return e.text=t.call(this,e,n),e.font=r.call(this,e,n),e.style=b.call(this,e,n),e.weight=x.call(this,e,n),e.rotate=w.call(this,e,n),e.size=~~i.call(this,e,n),e.padding=_.call(this,e,n),e})).sort((function(e,t){return t.size-e.size}));return A&&clearInterval(A),A=setInterval(h,0),h(),O;function h(){for(var t=Date.now();Date.now()-t>1,r.y=e[1]*(C()+.5)>>1,p(n,r,f,u),r.hasText&&M(a,r,s)&&(c.push(r),P.call("word",O,r),s?m(s,r):s=[{x:r.x+r.x0,y:r.y+r.y0},{x:r.x+r.x1,y:r.y+r.y1}],r.x-=e[0]>>1,r.y-=e[1]>>1)}u>=l&&(O.stop(),P.call("end",O,c,s))}},O.stop=function(){A&&(clearInterval(A),A=null);for(const e of E)delete e.sprite;return O},O.timeInterval=function(e){return arguments.length?(k=null==e?1/0:e,O):k},O.words=function(e){return arguments.length?(E=e,O):E},O.size=function(t){return arguments.length?(e=[+t[0],+t[1]],O):e},O.font=function(e){return arguments.length?(r=g(e),O):r},O.fontStyle=function(e){return arguments.length?(b=g(e),O):b},O.fontWeight=function(e){return arguments.length?(x=g(e),O):x},O.rotate=function(e){return arguments.length?(w=g(e),O):w},O.text=function(e){return arguments.length?(t=g(e),O):t},O.spiral=function(e){return arguments.length?(S=a[e]||e,O):S},O.fontSize=function(e){return arguments.length?(i=g(e),O):i},O.padding=function(e){return arguments.length?(_=g(e),O):_},O.random=function(e){return arguments.length?(C=e,O):C},O.on=function(){var e=P.on.apply(P,arguments);return e===P?O:e},O}},5111:(e,t,r)=>{"use strict";r.d(t,{W:()=>u});var n={value:function(){}};function i(){for(var e,t=0,r=arguments.length,n={};t=0&&(r=e.slice(n+1),e=e.slice(0,n)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:r}}))}function s(e,t){for(var r,n=0,i=e.length;n0)for(var r,n,i=new Array(r),a=0;a(s=(o=Math.ceil(h/7))>s?o+1:s+1)&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for((s=u.length)-(a=c.length)<0&&(a=s,n=c,c=u,u=n),r=0;a;)r=(u[--a]=u[a]+c[a]+r)/m|0,u[a]%=m;for(r&&(u.unshift(r),++i),s=u.length;0==u[--s];)u.pop();return t.d=u,t.e=i,l?O(t,h):t}function x(e,t,r){if(e!==~~e||er)throw Error(c+e)}function w(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;te.e^a.s<0?1:-1;for(t=0,r=(n=a.d.length)<(i=e.d.length)?n:i;te.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1},g.decimalPlaces=g.dp=function(){var e=this,t=e.d.length-1,r=7*(t-e.e);if(t=e.d[t])for(;t%10==0;t/=10)r--;return r<0?0:r},g.dividedBy=g.div=function(e){return _(this,new this.constructor(e))},g.dividedToIntegerBy=g.idiv=function(e){var t=this.constructor;return O(_(this,new t(e),0,1),t.precision)},g.equals=g.eq=function(e){return!this.cmp(e)},g.exponent=function(){return E(this)},g.greaterThan=g.gt=function(e){return this.cmp(e)>0},g.greaterThanOrEqualTo=g.gte=function(e){return this.cmp(e)>=0},g.isInteger=g.isint=function(){return this.e>this.d.length-2},g.isNegative=g.isneg=function(){return this.s<0},g.isPositive=g.ispos=function(){return this.s>0},g.isZero=function(){return 0===this.s},g.lessThan=g.lt=function(e){return this.cmp(e)<0},g.lessThanOrEqualTo=g.lte=function(e){return this.cmp(e)<1},g.logarithm=g.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(void 0===e)e=new n(10);else if((e=new n(e)).s<1||e.eq(a))throw Error(u+"NaN");if(r.s<1)throw Error(u+(r.s?"NaN":"-Infinity"));return r.eq(a)?new n(0):(l=!1,t=_(A(r,o),A(e,o),o),l=!0,O(t,i))},g.minus=g.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?T(t,e):b(t,(e.s=-e.s,e))},g.modulo=g.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(!(e=new n(e)).s)throw Error(u+"NaN");return r.s?(l=!1,t=_(r,e,0,1).times(e),l=!0,r.minus(t)):O(new n(r),i)},g.naturalExponential=g.exp=function(){return S(this)},g.naturalLogarithm=g.ln=function(){return A(this)},g.negated=g.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},g.plus=g.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?b(t,e):T(t,(e.s=-e.s,e))},g.precision=g.sd=function(e){var t,r,n,i=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(c+e);if(t=E(i)+1,r=7*(n=i.d.length-1)+1,n=i.d[n]){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r},g.squareRoot=g.sqrt=function(){var e,t,r,n,i,a,o,s=this,c=s.constructor;if(s.s<1){if(!s.s)return new c(0);throw Error(u+"NaN")}for(e=E(s),l=!1,0==(i=Math.sqrt(+s))||i==1/0?(((t=w(s.d)).length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=h((e+1)/2)-(e<0||e%2),n=new c(t=i==1/0?"5e"+e:(t=i.toExponential()).slice(0,t.indexOf("e")+1)+e)):n=new c(i.toString()),i=o=(r=c.precision)+3;;)if(n=(a=n).plus(_(s,a,o+2)).times(.5),w(a.d).slice(0,o)===(t=w(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&"4999"==t){if(O(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if("9999"!=t)break;o+=4}return l=!0,O(n,r)},g.times=g.mul=function(e){var t,r,n,i,a,o,s,u,c,f=this,h=f.constructor,p=f.d,d=(e=new h(e)).d;if(!f.s||!e.s)return new h(0);for(e.s*=f.s,r=f.e+e.e,(u=p.length)<(c=d.length)&&(a=p,p=d,d=a,o=u,u=c,c=o),a=[],n=o=u+c;n--;)a.push(0);for(n=c;--n>=0;){for(t=0,i=u+n;i>n;)s=a[i]+d[n]*p[i-n-1]+t,a[i--]=s%m|0,t=s/m|0;a[i]=(a[i]+t)%m|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,l?O(e,h.precision):e},g.toDecimalPlaces=g.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),void 0===e?r:(x(e,0,o),void 0===t?t=n.rounding:x(t,0,8),O(r,e+E(r)+1,t))},g.toExponential=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=M(n,!0):(x(e,0,o),void 0===t?t=i.rounding:x(t,0,8),r=M(n=O(new i(n),e+1,t),!0,e+1)),r},g.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return void 0===e?M(i):(x(e,0,o),void 0===t?t=a.rounding:x(t,0,8),r=M((n=O(new a(i),e+E(i)+1,t)).abs(),!1,e+E(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)},g.toInteger=g.toint=function(){var e=this,t=e.constructor;return O(new t(e),E(e)+1,t.rounding)},g.toNumber=function(){return+this},g.toPower=g.pow=function(e){var t,r,n,i,o,s,c=this,f=c.constructor,p=+(e=new f(e));if(!e.s)return new f(a);if(!(c=new f(c)).s){if(e.s<1)throw Error(u+"Infinity");return c}if(c.eq(a))return c;if(n=f.precision,e.eq(a))return O(c,n);if(s=(t=e.e)>=(r=e.d.length-1),o=c.s,s){if((r=p<0?-p:p)<=y){for(i=new f(a),t=Math.ceil(n/7+4),l=!1;r%2&&j((i=i.times(c)).d,t),0!==(r=h(r/2));)j((c=c.times(c)).d,t);return l=!0,e.s<0?new f(a).div(i):O(i,n)}}else if(o<0)throw Error(u+"NaN");return o=o<0&&1&e.d[Math.max(t,r)]?-1:1,c.s=1,l=!1,i=e.times(A(c,n+12)),l=!0,(i=S(i)).s=o,i},g.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return void 0===e?n=M(i,(r=E(i))<=a.toExpNeg||r>=a.toExpPos):(x(e,1,o),void 0===t?t=a.rounding:x(t,0,8),n=M(i=O(new a(i),e,t),e<=(r=E(i))||r<=a.toExpNeg,e)),n},g.toSignificantDigits=g.tosd=function(e,t){var r=this.constructor;return void 0===e?(e=r.precision,t=r.rounding):(x(e,1,o),void 0===t?t=r.rounding:x(t,0,8)),O(new r(this),e,t)},g.toString=g.valueOf=g.val=g.toJSON=function(){var e=this,t=E(e),r=e.constructor;return M(e,t<=r.toExpNeg||t>=r.toExpPos)};var _=function(){function e(e,t){var r,n=0,i=e.length;for(e=e.slice();i--;)r=e[i]*t+n,e[i]=r%m|0,n=r/m|0;return n&&e.unshift(n),e}function t(e,t,r,n){var i,a;if(r!=n)a=r>n?1:-1;else for(i=a=0;it[i]?1:-1;break}return a}function r(e,t,r){for(var n=0;r--;)e[r]-=n,n=e[r]1;)e.shift()}return function(n,i,a,o){var s,l,c,f,h,p,d,y,v,g,b,x,w,_,S,k,P,A,C=n.constructor,T=n.s==i.s?1:-1,M=n.d,j=i.d;if(!n.s)return new C(n);if(!i.s)throw Error(u+"Division by zero");for(l=n.e-i.e,P=j.length,S=M.length,y=(d=new C(T)).d=[],c=0;j[c]==(M[c]||0);)++c;if(j[c]>(M[c]||0)&&--l,(x=null==a?a=C.precision:o?a+(E(n)-E(i))+1:a)<0)return new C(0);if(x=x/7+2|0,c=0,1==P)for(f=0,j=j[0],x++;(c1&&(j=e(j,f),M=e(M,f),P=j.length,S=M.length),_=P,g=(v=M.slice(0,P)).length;g=m/2&&++k;do{f=0,(s=t(j,v,P,g))<0?(b=v[0],P!=g&&(b=b*m+(v[1]||0)),(f=b/k|0)>1?(f>=m&&(f=m-1),1==(s=t(h=e(j,f),v,p=h.length,g=v.length))&&(f--,r(h,P16)throw Error(f+E(e));if(!e.s)return new h(a);for(null==t?(l=!1,s=d):s=t,o=new h(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(s+=Math.log(p(2,c))/Math.LN10*2+5|0,r=n=i=new h(a),h.precision=s;;){if(n=O(n.times(e),s),r=r.times(++u),w((o=i.plus(_(n,r,s))).d).slice(0,s)===w(i.d).slice(0,s)){for(;c--;)i=O(i.times(i),s);return h.precision=d,null==t?(l=!0,O(i,d)):i}i=o}}function E(e){for(var t=7*e.e,r=e.d[0];r>=10;r/=10)t++;return t}function k(e,t,r){if(t>e.LN10.sd())throw l=!0,r&&(e.precision=r),Error(u+"LN10 precision limit exceeded");return O(new e(e.LN10),t)}function P(e){for(var t="";e--;)t+="0";return t}function A(e,t){var r,n,i,o,s,c,f,h,p,d=1,m=e,y=m.d,v=m.constructor,g=v.precision;if(m.s<1)throw Error(u+(m.s?"NaN":"-Infinity"));if(m.eq(a))return new v(0);if(null==t?(l=!1,h=g):h=t,m.eq(10))return null==t&&(l=!0),k(v,h);if(h+=10,v.precision=h,n=(r=w(y)).charAt(0),o=E(m),!(Math.abs(o)<15e14))return f=k(v,h+2,g).times(o+""),m=A(new v(n+"."+r.slice(1)),h-10).plus(f),v.precision=g,null==t?(l=!0,O(m,g)):m;for(;n<7&&1!=n||1==n&&r.charAt(1)>3;)n=(r=w((m=m.times(e)).d)).charAt(0),d++;for(o=E(m),n>1?(m=new v("0."+r),o++):m=new v(n+"."+r.slice(1)),c=s=m=_(m.minus(a),m.plus(a),h),p=O(m.times(m),h),i=3;;){if(s=O(s.times(p),h),w((f=c.plus(_(s,new v(i),h))).d).slice(0,h)===w(c.d).slice(0,h))return c=c.times(2),0!==o&&(c=c.plus(k(v,h+2,g).times(o+""))),c=_(c,new v(d),h),v.precision=g,null==t?(l=!0,O(c,g)):c;c=f,i+=2}}function C(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;48===t.charCodeAt(n);)++n;for(i=t.length;48===t.charCodeAt(i-1);)--i;if(t=t.slice(n,i)){if(i-=n,r=r-n-1,e.e=h(r/7),e.d=[],n=(r+1)%7,r<0&&(n+=7),nv||e.e<-v))throw Error(f+r)}else e.s=0,e.e=0,e.d=[0];return e}function O(e,t,r){var n,i,a,o,s,u,c,d,y=e.d;for(o=1,a=y[0];a>=10;a/=10)o++;if((n=t-o)<0)n+=7,i=t,c=y[d=0];else{if((d=Math.ceil((n+1)/7))>=(a=y.length))return e;for(c=a=y[d],o=1;a>=10;a/=10)o++;i=(n%=7)-7+o}if(void 0!==r&&(s=c/(a=p(10,o-i-1))%10|0,u=t<0||void 0!==y[d+1]||c%a,u=r<4?(s||u)&&(0==r||r==(e.s<0?3:2)):s>5||5==s&&(4==r||u||6==r&&(n>0?i>0?c/p(10,o-i):0:y[d-1])%10&1||r==(e.s<0?8:7))),t<1||!y[0])return u?(a=E(e),y.length=1,t=t-a-1,y[0]=p(10,(7-t%7)%7),e.e=h(-t/7)||0):(y.length=1,y[0]=e.e=e.s=0),e;if(0==n?(y.length=d,a=1,d--):(y.length=d+1,a=p(10,7-n),y[d]=i>0?(c/p(10,o-i)%p(10,i)|0)*a:0),u)for(;;){if(0==d){(y[0]+=a)==m&&(y[0]=1,++e.e);break}if(y[d]+=a,y[d]!=m)break;y[d--]=0,a=1}for(n=y.length;0===y[--n];)y.pop();if(l&&(e.e>v||e.e<-v))throw Error(f+E(e));return e}function T(e,t){var r,n,i,a,o,s,u,c,f,h,p=e.constructor,d=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),l?O(t,d):t;if(u=e.d,h=t.d,n=t.e,c=e.e,u=u.slice(),o=c-n){for((f=o<0)?(r=u,o=-o,s=h.length):(r=h,n=c,s=u.length),o>(i=Math.max(Math.ceil(d/7),s)+2)&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for((f=(i=u.length)<(s=h.length))&&(s=i),i=0;i0;--i)u[s++]=0;for(i=h.length;i>o;){if(u[--i]0?a=a.charAt(0)+"."+a.slice(1)+P(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+P(-i-1)+a,r&&(n=r-o)>0&&(a+=P(n))):i>=o?(a+=P(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+P(n))):((n=i+1)0&&(i+1===o&&(a+="."),a+=P(n))),e.s<0?"-"+a:a}function j(e,t){if(e.length>t)return e.length=t,!0}function D(e){if(!e||"object"!==typeof e)throw Error(u+"Object expected");var t,r,n,i=["precision",1,o,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t=i[t+1]&&n<=i[t+2]))throw Error(c+r+": "+n);this[r]=n}if(void 0!==(n=e[r="LN10"])){if(n!=Math.LN10)throw Error(c+r+": "+n);this[r]=new this(n)}return this}s=function e(t){var r,n,i;function a(e){var t=this;if(!(t instanceof a))return new a(e);if(t.constructor=a,e instanceof a)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"===typeof e){if(0*e!==0)throw Error(c+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):C(t,e.toString())}if("string"!==typeof e)throw Error(c+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!d.test(e))throw Error(c+e);C(t,e)}if(a.prototype=g,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=e,a.config=a.set=D,void 0===t&&(t={}),t)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],r=0;r{"use strict";var n=r(4836);t.__esModule=!0,t.default=function(e,t){e.classList?e.classList.add(t):(0,i.default)(e,t)||("string"===typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var i=n(r(3812));e.exports=t.default},3812:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")},e.exports=t.default},2910:e=>{"use strict";function t(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,r){e.classList?e.classList.remove(r):"string"===typeof e.className?e.className=t(e.className,r):e.setAttribute("class",t(e.className&&e.className.baseVal||"",r))}},7143:e=>{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(e,t,n,a,o){if("function"!==typeof n)throw new TypeError("The listener must be a function");var s=new i(n,a||e,o),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function o(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=new Array(a);i{var n=r(8136)(r(7009),"DataView");e.exports=n},9676:(e,t,r)=>{var n=r(5403),i=r(2747),a=r(6037),o=r(4154),s=r(7728);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(3894),i=r(8699),a=r(4957),o=r(7184),s=r(7109);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(8136)(r(7009),"Map");e.exports=n},8059:(e,t,r)=>{var n=r(4086),i=r(9255),a=r(9186),o=r(3423),s=r(3739);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(8136)(r(7009),"Promise");e.exports=n},3924:(e,t,r)=>{var n=r(8136)(r(7009),"Set");e.exports=n},692:(e,t,r)=>{var n=r(8059),i=r(5774),a=r(1596);function o(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t{var n=r(8384),i=r(511),a=r(835),o=r(707),s=r(8832),l=r(5077);function u(e){var t=this.__data__=new n(e);this.size=t.size}u.prototype.clear=i,u.prototype.delete=a,u.prototype.get=o,u.prototype.has=s,u.prototype.set=l,e.exports=u},7197:(e,t,r)=>{var n=r(7009).Symbol;e.exports=n},6219:(e,t,r)=>{var n=r(7009).Uint8Array;e.exports=n},7091:(e,t,r)=>{var n=r(8136)(r(7009),"WeakMap");e.exports=n},3665:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},8573:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,a=[];++r{var n=r(4842);e.exports=function(e,t){return!!(null==e?0:e.length)&&n(e,t,0)>-1}},2683:e=>{e.exports=function(e,t,r){for(var n=-1,i=null==e?0:e.length;++n{var n=r(6478),i=r(4963),a=r(3629),o=r(5174),s=r(6800),l=r(9102),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=a(e),c=!r&&i(e),f=!r&&!c&&o(e),h=!r&&!c&&!f&&l(e),p=r||c||f||h,d=p?n(e.length,String):[],m=d.length;for(var y in e)!t&&!u.call(e,y)||p&&("length"==y||f&&("offset"==y||"parent"==y)||h&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,m))||d.push(y);return d}},8950:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r{e.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r{e.exports=function(e){return e.split("")}},7112:(e,t,r)=>{var n=r(9231);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},2526:(e,t,r)=>{var n=r(8528);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},7927:(e,t,r)=>{var n=r(5358),i=r(7056)(n);e.exports=i},9863:(e,t,r)=>{var n=r(7927);e.exports=function(e,t){var r=!0;return n(e,(function(e,n,i){return r=!!t(e,n,i)})),r}},3079:(e,t,r)=>{var n=r(152);e.exports=function(e,t,r){for(var i=-1,a=e.length;++i{e.exports=function(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a{var n=r(1705),i=r(3529);e.exports=function e(t,r,a,o,s){var l=-1,u=t.length;for(a||(a=i),s||(s=[]);++l0&&a(c)?r>1?e(c,r-1,a,o,s):n(s,c):o||(s[s.length]=c)}return s}},5099:(e,t,r)=>{var n=r(372)();e.exports=n},5358:(e,t,r)=>{var n=r(5099),i=r(2742);e.exports=function(e,t){return e&&n(e,t,i)}},8667:(e,t,r)=>{var n=r(3082),i=r(9793);e.exports=function(e,t){for(var r=0,a=(t=n(t,e)).length;null!=e&&r{var n=r(1705),i=r(3629);e.exports=function(e,t,r){var a=t(e);return i(e)?a:n(a,r(e))}},9066:(e,t,r)=>{var n=r(7197),i=r(1587),a=r(3581),o=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?i(e):a(e)}},1954:e=>{e.exports=function(e,t){return e>t}},529:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},4842:(e,t,r)=>{var n=r(2045),i=r(505),a=r(7167);e.exports=function(e,t,r){return t===t?a(e,t,r):n(e,i,r)}},4906:(e,t,r)=>{var n=r(9066),i=r(3141);e.exports=function(e){return i(e)&&"[object Arguments]"==n(e)}},1848:(e,t,r)=>{var n=r(3355),i=r(3141);e.exports=function e(t,r,a,o,s){return t===r||(null==t||null==r||!i(t)&&!i(r)?t!==t&&r!==r:n(t,r,a,o,e,s))}},3355:(e,t,r)=>{var n=r(9424),i=r(5305),a=r(2206),o=r(8078),s=r(8383),l=r(3629),u=r(5174),c=r(9102),f="[object Arguments]",h="[object Array]",p="[object Object]",d=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,m,y,v){var g=l(e),b=l(t),x=g?h:s(e),w=b?h:s(t),_=(x=x==f?p:x)==p,S=(w=w==f?p:w)==p,E=x==w;if(E&&u(e)){if(!u(t))return!1;g=!0,_=!1}if(E&&!_)return v||(v=new n),g||c(e)?i(e,t,r,m,y,v):a(e,t,x,r,m,y,v);if(!(1&r)){var k=_&&d.call(e,"__wrapped__"),P=S&&d.call(t,"__wrapped__");if(k||P){var A=k?e.value():e,C=P?t.value():t;return v||(v=new n),y(A,C,r,m,v)}}return!!E&&(v||(v=new n),o(e,t,r,m,y,v))}},8856:(e,t,r)=>{var n=r(9424),i=r(1848);e.exports=function(e,t,r,a){var o=r.length,s=o,l=!a;if(null==e)return!s;for(e=Object(e);o--;){var u=r[o];if(l&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o{e.exports=function(e){return e!==e}},6703:(e,t,r)=>{var n=r(4786),i=r(257),a=r(8092),o=r(7907),s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,c=l.toString,f=u.hasOwnProperty,h=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||i(e))&&(n(e)?h:s).test(o(e))}},8150:(e,t,r)=>{var n=r(9066),i=r(4635),a=r(3141),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(e){return a(e)&&i(e.length)&&!!o[n(e)]}},6025:(e,t,r)=>{var n=r(7080),i=r(4322),a=r(2100),o=r(3629),s=r(38);e.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?o(e)?i(e[0],e[1]):n(e):s(e)}},3654:(e,t,r)=>{var n=r(2936),i=r(8836),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=[];for(var r in Object(e))a.call(e,r)&&"constructor"!=r&&t.push(r);return t}},2580:e=>{e.exports=function(e,t){return e{var n=r(7927),i=r(1473);e.exports=function(e,t){var r=-1,a=i(e)?Array(e.length):[];return n(e,(function(e,n,i){a[++r]=t(e,n,i)})),a}},7080:(e,t,r)=>{var n=r(8856),i=r(9091),a=r(284);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},4322:(e,t,r)=>{var n=r(1848),i=r(6181),a=r(5658),o=r(5823),s=r(5072),l=r(284),u=r(9793);e.exports=function(e,t){return o(e)&&s(t)?l(u(e),t):function(r){var o=i(r,e);return void 0===o&&o===t?a(r,e):n(t,o,3)}}},3226:(e,t,r)=>{var n=r(8950),i=r(8667),a=r(6025),o=r(3849),s=r(9179),l=r(6194),u=r(4480),c=r(2100),f=r(3629);e.exports=function(e,t,r){t=t.length?n(t,(function(e){return f(e)?function(t){return i(t,1===e.length?e[0]:e)}:e})):[c];var h=-1;t=n(t,l(a));var p=o(e,(function(e,r,i){return{criteria:n(t,(function(t){return t(e)})),index:++h,value:e}}));return s(p,(function(e,t){return u(e,t,r)}))}},9586:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},4084:(e,t,r)=>{var n=r(8667);e.exports=function(e){return function(t){return n(t,e)}}},7255:e=>{var t=Math.ceil,r=Math.max;e.exports=function(e,n,i,a){for(var o=-1,s=r(t((n-e)/(i||1)),0),l=Array(s);s--;)l[a?s:++o]=e,e+=i;return l}},8794:(e,t,r)=>{var n=r(2100),i=r(4262),a=r(9156);e.exports=function(e,t){return a(i(e,t,n),e+"")}},7532:(e,t,r)=>{var n=r(1547),i=r(8528),a=r(2100),o=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:a;e.exports=o},2646:e=>{e.exports=function(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n{var n=r(7927);e.exports=function(e,t){var r;return n(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}},9179:e=>{e.exports=function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}},6478:e=>{e.exports=function(e,t){for(var r=-1,n=Array(e);++r{var n=r(7197),i=r(8950),a=r(3629),o=r(152),s=n?n.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(a(t))return i(t,e)+"";if(o(t))return l?l.call(t):"";var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r}},821:(e,t,r)=>{var n=r(6050),i=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(i,""):e}},6194:e=>{e.exports=function(e){return function(t){return e(t)}}},9602:(e,t,r)=>{var n=r(692),i=r(9055),a=r(2683),o=r(75),s=r(7730),l=r(2230);e.exports=function(e,t,r){var u=-1,c=i,f=e.length,h=!0,p=[],d=p;if(r)h=!1,c=a;else if(f>=200){var m=t?null:s(e);if(m)return l(m);h=!1,c=o,d=new n}else d=t?[]:p;e:for(;++u{e.exports=function(e,t){return e.has(t)}},3082:(e,t,r)=>{var n=r(3629),i=r(5823),a=r(170),o=r(3518);e.exports=function(e,t){return n(e)?e:i(e,t)?[e]:a(o(e))}},9813:(e,t,r)=>{var n=r(2646);e.exports=function(e,t,r){var i=e.length;return r=void 0===r?i:r,!t&&r>=i?e:n(e,t,r)}},8558:(e,t,r)=>{var n=r(152);e.exports=function(e,t){if(e!==t){var r=void 0!==e,i=null===e,a=e===e,o=n(e),s=void 0!==t,l=null===t,u=t===t,c=n(t);if(!l&&!c&&!o&&e>t||o&&s&&u&&!l&&!c||i&&s&&u||!r&&u||!a)return 1;if(!i&&!o&&!c&&e{var n=r(8558);e.exports=function(e,t,r){for(var i=-1,a=e.criteria,o=t.criteria,s=a.length,l=r.length;++i=l?u:u*("desc"==r[i]?-1:1)}return e.index-t.index}},5525:(e,t,r)=>{var n=r(7009)["__core-js_shared__"];e.exports=n},7056:(e,t,r)=>{var n=r(1473);e.exports=function(e,t){return function(r,i){if(null==r)return r;if(!n(r))return e(r,i);for(var a=r.length,o=t?a:-1,s=Object(r);(t?o--:++o{e.exports=function(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),s=o.length;s--;){var l=o[e?s:++i];if(!1===r(a[l],l,a))break}return t}}},322:(e,t,r)=>{var n=r(9813),i=r(7302),a=r(7580),o=r(3518);e.exports=function(e){return function(t){t=o(t);var r=i(t)?a(t):void 0,s=r?r[0]:t.charAt(0),l=r?n(r,1).join(""):t.slice(1);return s[e]()+l}}},5481:(e,t,r)=>{var n=r(6025),i=r(1473),a=r(2742);e.exports=function(e){return function(t,r,o){var s=Object(t);if(!i(t)){var l=n(r,3);t=a(t),r=function(e){return l(s[e],e,s)}}var u=e(t,r,o);return u>-1?s[l?t[u]:u]:void 0}}},6381:(e,t,r)=>{var n=r(7255),i=r(3195),a=r(1495);e.exports=function(e){return function(t,r,o){return o&&"number"!=typeof o&&i(t,r,o)&&(r=o=void 0),t=a(t),void 0===r?(r=t,t=0):r=a(r),o=void 0===o?t{var n=r(3924),i=r(9694),a=r(2230),o=n&&1/a(new n([,-0]))[1]==1/0?function(e){return new n(e)}:i;e.exports=o},8528:(e,t,r)=>{var n=r(8136),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=i},5305:(e,t,r)=>{var n=r(692),i=r(7897),a=r(75);e.exports=function(e,t,r,o,s,l){var u=1&r,c=e.length,f=t.length;if(c!=f&&!(u&&f>c))return!1;var h=l.get(e),p=l.get(t);if(h&&p)return h==t&&p==e;var d=-1,m=!0,y=2&r?new n:void 0;for(l.set(e,t),l.set(t,e);++d{var n=r(7197),i=r(6219),a=r(9231),o=r(5305),s=r(234),l=r(2230),u=n?n.prototype:void 0,c=u?u.valueOf:void 0;e.exports=function(e,t,r,n,u,f,h){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=s;case"[object Set]":var d=1&n;if(p||(p=l),e.size!=t.size&&!d)return!1;var m=h.get(e);if(m)return m==t;n|=2,h.set(e,t);var y=o(p(e),p(t),n,u,f,h);return h.delete(e),y;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},8078:(e,t,r)=>{var n=r(8248),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,a,o,s){var l=1&r,u=n(e),c=u.length;if(c!=n(t).length&&!l)return!1;for(var f=c;f--;){var h=u[f];if(!(l?h in t:i.call(t,h)))return!1}var p=s.get(e),d=s.get(t);if(p&&d)return p==t&&d==e;var m=!0;s.set(e,t),s.set(t,e);for(var y=l;++f{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},8248:(e,t,r)=>{var n=r(1986),i=r(5918),a=r(2742);e.exports=function(e){return n(e,a,i)}},2799:(e,t,r)=>{var n=r(5964);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},9091:(e,t,r)=>{var n=r(5072),i=r(2742);e.exports=function(e){for(var t=i(e),r=t.length;r--;){var a=t[r],o=e[a];t[r]=[a,o,n(o)]}return t}},8136:(e,t,r)=>{var n=r(6703),i=r(40);e.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},1587:(e,t,r)=>{var n=r(7197),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=a.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(l){}var i=o.call(e);return n&&(t?e[s]=r:delete e[s]),i}},5918:(e,t,r)=>{var n=r(4903),i=r(8174),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(e){return null==e?[]:(e=Object(e),n(o(e),(function(t){return a.call(e,t)})))}:i;e.exports=s},8383:(e,t,r)=>{var n=r(908),i=r(5797),a=r(8319),o=r(3924),s=r(7091),l=r(9066),u=r(7907),c="[object Map]",f="[object Promise]",h="[object Set]",p="[object WeakMap]",d="[object DataView]",m=u(n),y=u(i),v=u(a),g=u(o),b=u(s),x=l;(n&&x(new n(new ArrayBuffer(1)))!=d||i&&x(new i)!=c||a&&x(a.resolve())!=f||o&&x(new o)!=h||s&&x(new s)!=p)&&(x=function(e){var t=l(e),r="[object Object]"==t?e.constructor:void 0,n=r?u(r):"";if(n)switch(n){case m:return d;case y:return c;case v:return f;case g:return h;case b:return p}return t}),e.exports=x},40:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},6417:(e,t,r)=>{var n=r(3082),i=r(4963),a=r(3629),o=r(6800),s=r(4635),l=r(9793);e.exports=function(e,t,r){for(var u=-1,c=(t=n(t,e)).length,f=!1;++u{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},5403:(e,t,r)=>{var n=r(9620);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},2747:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},6037:(e,t,r)=>{var n=r(9620),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(t,e)?t[e]:void 0}},4154:(e,t,r)=>{var n=r(9620),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},7728:(e,t,r)=>{var n=r(9620);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},3529:(e,t,r)=>{var n=r(7197),i=r(4963),a=r(3629),o=n?n.isConcatSpreadable:void 0;e.exports=function(e){return a(e)||i(e)||!!(o&&e&&e[o])}},6800:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e{var n=r(9231),i=r(1473),a=r(6800),o=r(8092);e.exports=function(e,t,r){if(!o(r))return!1;var s=typeof t;return!!("number"==s?i(r)&&a(t,r.length):"string"==s&&t in r)&&n(r[t],e)}},5823:(e,t,r)=>{var n=r(3629),i=r(152),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!i(e))||(o.test(e)||!a.test(e)||null!=t&&e in Object(t))}},5964:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},257:(e,t,r)=>{var n=r(5525),i=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!i&&i in e}},2936:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},5072:(e,t,r)=>{var n=r(8092);e.exports=function(e){return e===e&&!n(e)}},3894:e=>{e.exports=function(){this.__data__=[],this.size=0}},8699:(e,t,r)=>{var n=r(7112),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():i.call(t,r,1),--this.size,!0)}},4957:(e,t,r)=>{var n=r(7112);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},7184:(e,t,r)=>{var n=r(7112);e.exports=function(e){return n(this.__data__,e)>-1}},7109:(e,t,r)=>{var n=r(7112);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},4086:(e,t,r)=>{var n=r(9676),i=r(8384),a=r(5797);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(a||i),string:new n}}},9255:(e,t,r)=>{var n=r(2799);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},9186:(e,t,r)=>{var n=r(2799);e.exports=function(e){return n(this,e).get(e)}},3423:(e,t,r)=>{var n=r(2799);e.exports=function(e){return n(this,e).has(e)}},3739:(e,t,r)=>{var n=r(2799);e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},234:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}},284:e=>{e.exports=function(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}},4634:(e,t,r)=>{var n=r(9151);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},9620:(e,t,r)=>{var n=r(8136)(Object,"create");e.exports=n},8836:(e,t,r)=>{var n=r(2709)(Object.keys,Object);e.exports=n},9494:(e,t,r)=>{e=r.nmd(e);var n=r(1032),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,o=a&&a.exports===i&&n.process,s=function(){try{var e=a&&a.require&&a.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(t){}}();e.exports=s},3581:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},2709:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},4262:(e,t,r)=>{var n=r(3665),i=Math.max;e.exports=function(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=i(a.length-t,0),l=Array(s);++o{var n=r(1032),i="object"==typeof self&&self&&self.Object===Object&&self,a=n||i||Function("return this")();e.exports=a},5774:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1596:e=>{e.exports=function(e){return this.__data__.has(e)}},2230:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},9156:(e,t,r)=>{var n=r(7532),i=r(3197)(n);e.exports=i},3197:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var i=t(),a=16-(i-n);if(n=i,a>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},511:(e,t,r)=>{var n=r(8384);e.exports=function(){this.__data__=new n,this.size=0}},835:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},707:e=>{e.exports=function(e){return this.__data__.get(e)}},8832:e=>{e.exports=function(e){return this.__data__.has(e)}},5077:(e,t,r)=>{var n=r(8384),i=r(5797),a=r(8059);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var o=r.__data__;if(!i||o.length<199)return o.push([e,t]),this.size=++r.size,this;r=this.__data__=new a(o)}return r.set(e,t),this.size=r.size,this}},7167:e=>{e.exports=function(e,t,r){for(var n=r-1,i=e.length;++n{var n=r(4622),i=r(7302),a=r(2110);e.exports=function(e){return i(e)?a(e):n(e)}},170:(e,t,r)=>{var n=r(4634),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,r,n,i){t.push(n?i.replace(a,"$1"):r||e)})),t}));e.exports=o},9793:(e,t,r)=>{var n=r(152);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}},7907:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(r){}try{return e+""}catch(r){}}return""}},6050:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},2110:e=>{var t="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\\ud83c[\\udffb-\\udfff]",i="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",o="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+r+"|"+n+")"+"?",l="[\\ufe0e\\ufe0f]?",u=l+s+("(?:\\u200d(?:"+[i,a,o].join("|")+")"+l+s+")*"),c="(?:"+[i+r+"?",r,a,o,t].join("|")+")",f=RegExp(n+"(?="+n+")|"+c+u,"g");e.exports=function(e){return e.match(f)||[]}},1547:e=>{e.exports=function(e){return function(){return e}}},4003:(e,t,r)=>{var n=r(8092),i=r(72),a=r(2582),o=Math.max,s=Math.min;e.exports=function(e,t,r){var l,u,c,f,h,p,d=0,m=!1,y=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var r=l,n=u;return l=u=void 0,d=t,f=e.apply(n,r)}function b(e){return d=e,h=setTimeout(w,t),m?g(e):f}function x(e){var r=e-p;return void 0===p||r>=t||r<0||y&&e-d>=c}function w(){var e=i();if(x(e))return _(e);h=setTimeout(w,function(e){var r=t-(e-p);return y?s(r,c-(e-d)):r}(e))}function _(e){return h=void 0,v&&l?g(e):(l=u=void 0,f)}function S(){var e=i(),r=x(e);if(l=arguments,u=this,p=e,r){if(void 0===h)return b(p);if(y)return clearTimeout(h),h=setTimeout(w,t),g(p)}return void 0===h&&(h=setTimeout(w,t)),f}return t=a(t)||0,n(r)&&(m=!!r.leading,c=(y="maxWait"in r)?o(a(r.maxWait)||0,t):c,v="trailing"in r?!!r.trailing:v),S.cancel=function(){void 0!==h&&clearTimeout(h),d=0,l=p=u=h=void 0},S.flush=function(){return void 0===h?f:_(i())},S}},9231:e=>{e.exports=function(e,t){return e===t||e!==e&&t!==t}},2730:(e,t,r)=>{var n=r(8573),i=r(9863),a=r(6025),o=r(3629),s=r(3195);e.exports=function(e,t,r){var l=o(e)?n:i;return r&&s(e,t,r)&&(t=void 0),l(e,a(t,3))}},1211:(e,t,r)=>{var n=r(5481)(r(1475));e.exports=n},1475:(e,t,r)=>{var n=r(2045),i=r(6025),a=r(9753),o=Math.max;e.exports=function(e,t,r){var s=null==e?0:e.length;if(!s)return-1;var l=null==r?0:a(r);return l<0&&(l=o(s+l,0)),n(e,i(t,3),l)}},5008:(e,t,r)=>{var n=r(5182),i=r(2034);e.exports=function(e,t){return n(i(e,t),1)}},6181:(e,t,r)=>{var n=r(8667);e.exports=function(e,t,r){var i=null==e?void 0:n(e,t);return void 0===i?r:i}},5658:(e,t,r)=>{var n=r(529),i=r(6417);e.exports=function(e,t){return null!=e&&i(e,t,n)}},2100:e=>{e.exports=function(e){return e}},4963:(e,t,r)=>{var n=r(4906),i=r(3141),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,l=n(function(){return arguments}())?n:function(e){return i(e)&&o.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},3629:e=>{var t=Array.isArray;e.exports=t},1473:(e,t,r)=>{var n=r(4786),i=r(4635);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},6638:(e,t,r)=>{var n=r(9066),i=r(3141);e.exports=function(e){return!0===e||!1===e||i(e)&&"[object Boolean]"==n(e)}},5174:(e,t,r)=>{e=r.nmd(e);var n=r(7009),i=r(9488),a=t&&!t.nodeType&&t,o=a&&e&&!e.nodeType&&e,s=o&&o.exports===a?n.Buffer:void 0,l=(s?s.isBuffer:void 0)||i;e.exports=l},8111:(e,t,r)=>{var n=r(1848);e.exports=function(e,t){return n(e,t)}},4786:(e,t,r)=>{var n=r(9066),i=r(8092);e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},4635:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},2066:(e,t,r)=>{var n=r(298);e.exports=function(e){return n(e)&&e!=+e}},2854:e=>{e.exports=function(e){return null==e}},298:(e,t,r)=>{var n=r(9066),i=r(3141);e.exports=function(e){return"number"==typeof e||i(e)&&"[object Number]"==n(e)}},8092:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3141:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},6769:(e,t,r)=>{var n=r(9066),i=r(3629),a=r(3141);e.exports=function(e){return"string"==typeof e||!i(e)&&a(e)&&"[object String]"==n(e)}},152:(e,t,r)=>{var n=r(9066),i=r(3141);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},9102:(e,t,r)=>{var n=r(8150),i=r(6194),a=r(9494),o=a&&a.isTypedArray,s=o?i(o):n;e.exports=s},2742:(e,t,r)=>{var n=r(7538),i=r(3654),a=r(1473);e.exports=function(e){return a(e)?n(e):i(e)}},5727:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},763:function(e,t,r){var n;e=r.nmd(e),function(){var i,a="Expected a function",o="__lodash_hash_undefined__",s="__lodash_placeholder__",l=16,u=32,c=64,f=128,h=256,p=1/0,d=9007199254740991,m=NaN,y=4294967295,v=[["ary",f],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",u],["partialRight",c],["rearg",h]],g="[object Arguments]",b="[object Array]",x="[object Boolean]",w="[object Date]",_="[object Error]",S="[object Function]",E="[object GeneratorFunction]",k="[object Map]",P="[object Number]",A="[object Object]",C="[object Promise]",O="[object RegExp]",T="[object Set]",M="[object String]",j="[object Symbol]",D="[object WeakMap]",I="[object ArrayBuffer]",N="[object DataView]",F="[object Float32Array]",R="[object Float64Array]",L="[object Int8Array]",B="[object Int16Array]",z="[object Int32Array]",V="[object Uint8Array]",G="[object Uint8ClampedArray]",H="[object Uint16Array]",U="[object Uint32Array]",q=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,$=/(__e\(.*?\)|\b__t\)) \+\n'';/g,X=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,K=RegExp(X.source),Q=RegExp(Y.source),J=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,re=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,ae=RegExp(ie.source),oe=/^\s+/,se=/\s/,le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ue=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,fe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,he=/[()=,{}\[\]\/\s]/,pe=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ye=/^[-+]0x[0-9a-f]+$/i,ve=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,xe=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_e=/($^)/,Se=/['\n\r\u2028\u2029\\]/g,Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ke="\\u2700-\\u27bf",Pe="a-z\\xdf-\\xf6\\xf8-\\xff",Ae="A-Z\\xc0-\\xd6\\xd8-\\xde",Ce="\\ufe0e\\ufe0f",Oe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Te="['\u2019]",Me="[\\ud800-\\udfff]",je="["+Oe+"]",De="["+Ee+"]",Ie="\\d+",Ne="[\\u2700-\\u27bf]",Fe="["+Pe+"]",Re="[^\\ud800-\\udfff"+Oe+Ie+ke+Pe+Ae+"]",Le="\\ud83c[\\udffb-\\udfff]",Be="[^\\ud800-\\udfff]",ze="(?:\\ud83c[\\udde6-\\uddff]){2}",Ve="[\\ud800-\\udbff][\\udc00-\\udfff]",Ge="["+Ae+"]",He="(?:"+Fe+"|"+Re+")",Ue="(?:"+Ge+"|"+Re+")",qe="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",We="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",$e="(?:"+De+"|"+Le+")"+"?",Xe="[\\ufe0e\\ufe0f]?",Ye=Xe+$e+("(?:\\u200d(?:"+[Be,ze,Ve].join("|")+")"+Xe+$e+")*"),Ke="(?:"+[Ne,ze,Ve].join("|")+")"+Ye,Qe="(?:"+[Be+De+"?",De,ze,Ve,Me].join("|")+")",Je=RegExp(Te,"g"),Ze=RegExp(De,"g"),et=RegExp(Le+"(?="+Le+")|"+Qe+Ye,"g"),tt=RegExp([Ge+"?"+Fe+"+"+qe+"(?="+[je,Ge,"$"].join("|")+")",Ue+"+"+We+"(?="+[je,Ge+He,"$"].join("|")+")",Ge+"?"+He+"+"+qe,Ge+"+"+We,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ie,Ke].join("|"),"g"),rt=RegExp("[\\u200d\\ud800-\\udfff"+Ee+Ce+"]"),nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],at=-1,ot={};ot[F]=ot[R]=ot[L]=ot[B]=ot[z]=ot[V]=ot[G]=ot[H]=ot[U]=!0,ot[g]=ot[b]=ot[I]=ot[x]=ot[N]=ot[w]=ot[_]=ot[S]=ot[k]=ot[P]=ot[A]=ot[O]=ot[T]=ot[M]=ot[D]=!1;var st={};st[g]=st[b]=st[I]=st[N]=st[x]=st[w]=st[F]=st[R]=st[L]=st[B]=st[z]=st[k]=st[P]=st[A]=st[O]=st[T]=st[M]=st[j]=st[V]=st[G]=st[H]=st[U]=!0,st[_]=st[S]=st[D]=!1;var lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,ct=parseInt,ft="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,ht="object"==typeof self&&self&&self.Object===Object&&self,pt=ft||ht||Function("return this")(),dt=t&&!t.nodeType&&t,mt=dt&&e&&!e.nodeType&&e,yt=mt&&mt.exports===dt,vt=yt&&ft.process,gt=function(){try{var e=mt&&mt.require&&mt.require("util").types;return e||vt&&vt.binding&&vt.binding("util")}catch(t){}}(),bt=gt&>.isArrayBuffer,xt=gt&>.isDate,wt=gt&>.isMap,_t=gt&>.isRegExp,St=gt&>.isSet,Et=gt&>.isTypedArray;function kt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Pt(e,t,r,n){for(var i=-1,a=null==e?0:e.length;++i-1}function jt(e,t,r){for(var n=-1,i=null==e?0:e.length;++n-1;);return r}function tr(e,t){for(var r=e.length;r--&&Vt(t,e[r],0)>-1;);return r}function rr(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}var nr=Wt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),ir=Wt({"&":"&","<":"<",">":">",'"':""","'":"'"});function ar(e){return"\\"+lt[e]}function or(e){return rt.test(e)}function sr(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function lr(e,t){return function(r){return e(t(r))}}function ur(e,t){for(var r=-1,n=e.length,i=0,a=[];++r",""":'"',"'":"'"});var yr=function e(t){var r=(t=null==t?pt:yr.defaults(pt.Object(),t,yr.pick(pt,it))).Array,n=t.Date,se=t.Error,Ee=t.Function,ke=t.Math,Pe=t.Object,Ae=t.RegExp,Ce=t.String,Oe=t.TypeError,Te=r.prototype,Me=Ee.prototype,je=Pe.prototype,De=t["__core-js_shared__"],Ie=Me.toString,Ne=je.hasOwnProperty,Fe=0,Re=function(){var e=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Le=je.toString,Be=Ie.call(Pe),ze=pt._,Ve=Ae("^"+Ie.call(Ne).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ge=yt?t.Buffer:i,He=t.Symbol,Ue=t.Uint8Array,qe=Ge?Ge.allocUnsafe:i,We=lr(Pe.getPrototypeOf,Pe),$e=Pe.create,Xe=je.propertyIsEnumerable,Ye=Te.splice,Ke=He?He.isConcatSpreadable:i,Qe=He?He.iterator:i,et=He?He.toStringTag:i,rt=function(){try{var e=ha(Pe,"defineProperty");return e({},"",{}),e}catch(t){}}(),lt=t.clearTimeout!==pt.clearTimeout&&t.clearTimeout,ft=n&&n.now!==pt.Date.now&&n.now,ht=t.setTimeout!==pt.setTimeout&&t.setTimeout,dt=ke.ceil,mt=ke.floor,vt=Pe.getOwnPropertySymbols,gt=Ge?Ge.isBuffer:i,Lt=t.isFinite,Wt=Te.join,vr=lr(Pe.keys,Pe),gr=ke.max,br=ke.min,xr=n.now,wr=t.parseInt,_r=ke.random,Sr=Te.reverse,Er=ha(t,"DataView"),kr=ha(t,"Map"),Pr=ha(t,"Promise"),Ar=ha(t,"Set"),Cr=ha(t,"WeakMap"),Or=ha(Pe,"create"),Tr=Cr&&new Cr,Mr={},jr=Ba(Er),Dr=Ba(kr),Ir=Ba(Pr),Nr=Ba(Ar),Fr=Ba(Cr),Rr=He?He.prototype:i,Lr=Rr?Rr.valueOf:i,Br=Rr?Rr.toString:i;function zr(e){if(ns(e)&&!Wo(e)&&!(e instanceof Ur)){if(e instanceof Hr)return e;if(Ne.call(e,"__wrapped__"))return za(e)}return new Hr(e)}var Vr=function(){function e(){}return function(t){if(!rs(t))return{};if($e)return $e(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function Gr(){}function Hr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Ur(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=y,this.__views__=[]}function qr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function un(e,t,r,n,a,o){var s,l=1&t,u=2&t,c=4&t;if(r&&(s=a?r(e,n,a,o):r(e)),s!==i)return s;if(!rs(e))return e;var f=Wo(e);if(f){if(s=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!l)return Ti(e,s)}else{var h=ma(e),p=h==S||h==E;if(Ko(e))return Ei(e,l);if(h==A||h==g||p&&!a){if(s=u||p?{}:va(e),!l)return u?function(e,t){return Mi(e,da(e),t)}(e,function(e,t){return e&&Mi(t,Is(t),e)}(s,e)):function(e,t){return Mi(e,pa(e),t)}(e,an(s,e))}else{if(!st[h])return a?e:{};s=function(e,t,r){var n=e.constructor;switch(t){case I:return ki(e);case x:case w:return new n(+e);case N:return function(e,t){var r=t?ki(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case F:case R:case L:case B:case z:case V:case G:case H:case U:return Pi(e,r);case k:return new n;case P:case M:return new n(e);case O:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new n;case j:return i=e,Lr?Pe(Lr.call(i)):{}}var i}(e,h,l)}}o||(o=new Yr);var d=o.get(e);if(d)return d;o.set(e,s),ls(e)?e.forEach((function(n){s.add(un(n,t,r,n,e,o))})):is(e)&&e.forEach((function(n,i){s.set(i,un(n,t,r,i,e,o))}));var m=f?i:(c?u?aa:ia:u?Is:Ds)(e);return At(m||e,(function(n,i){m&&(n=e[i=n]),tn(s,i,un(n,t,r,i,e,o))})),s}function cn(e,t,r){var n=r.length;if(null==e)return!n;for(e=Pe(e);n--;){var a=r[n],o=t[a],s=e[a];if(s===i&&!(a in e)||!o(s))return!1}return!0}function fn(e,t,r){if("function"!=typeof e)throw new Oe(a);return ja((function(){e.apply(i,r)}),t)}function hn(e,t,r,n){var i=-1,a=Mt,o=!0,s=e.length,l=[],u=t.length;if(!s)return l;r&&(t=Dt(t,Qt(r))),n?(a=jt,o=!1):t.length>=200&&(a=Zt,o=!1,t=new Xr(t));e:for(;++i-1},Wr.prototype.set=function(e,t){var r=this.__data__,n=rn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},$r.prototype.clear=function(){this.size=0,this.__data__={hash:new qr,map:new(kr||Wr),string:new qr}},$r.prototype.delete=function(e){var t=ca(this,e).delete(e);return this.size-=t?1:0,t},$r.prototype.get=function(e){return ca(this,e).get(e)},$r.prototype.has=function(e){return ca(this,e).has(e)},$r.prototype.set=function(e,t){var r=ca(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Xr.prototype.add=Xr.prototype.push=function(e){return this.__data__.set(e,o),this},Xr.prototype.has=function(e){return this.__data__.has(e)},Yr.prototype.clear=function(){this.__data__=new Wr,this.size=0},Yr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Yr.prototype.get=function(e){return this.__data__.get(e)},Yr.prototype.has=function(e){return this.__data__.has(e)},Yr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Wr){var n=r.__data__;if(!kr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new $r(n)}return r.set(e,t),this.size=r.size,this};var pn=Ii(wn),dn=Ii(_n,!0);function mn(e,t){var r=!0;return pn(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function yn(e,t,r){for(var n=-1,a=e.length;++n0&&r(s)?t>1?gn(s,t-1,r,n,i):It(i,s):n||(i[i.length]=s)}return i}var bn=Ni(),xn=Ni(!0);function wn(e,t){return e&&bn(e,t,Ds)}function _n(e,t){return e&&xn(e,t,Ds)}function Sn(e,t){return Tt(t,(function(t){return Zo(e[t])}))}function En(e,t){for(var r=0,n=(t=xi(t,e)).length;null!=e&&rt}function Cn(e,t){return null!=e&&Ne.call(e,t)}function On(e,t){return null!=e&&t in Pe(e)}function Tn(e,t,n){for(var a=n?jt:Mt,o=e[0].length,s=e.length,l=s,u=r(s),c=1/0,f=[];l--;){var h=e[l];l&&t&&(h=Dt(h,Qt(t))),c=br(h.length,c),u[l]=!n&&(t||o>=120&&h.length>=120)?new Xr(l&&h):i}h=e[0];var p=-1,d=u[0];e:for(;++p=s?l:l*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}))}function Wn(e,t,r){for(var n=-1,i=t.length,a={};++n-1;)s!==e&&Ye.call(s,l,1),Ye.call(e,l,1);return e}function Xn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==a){var a=i;ba(i)?Ye.call(e,i,1):hi(e,i)}}return e}function Yn(e,t){return e+mt(_r()*(t-e+1))}function Kn(e,t){var r="";if(!e||t<1||t>d)return r;do{t%2&&(r+=e),(t=mt(t/2))&&(e+=e)}while(t);return r}function Qn(e,t){return Da(Aa(e,t,al),e+"")}function Jn(e){return Qr(Gs(e))}function Zn(e,t){var r=Gs(e);return Fa(r,ln(t,0,r.length))}function ei(e,t,r,n){if(!rs(e))return e;for(var a=-1,o=(t=xi(t,e)).length,s=o-1,l=e;null!=l&&++aa?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var o=r(a);++i>>1,o=e[a];null!==o&&!cs(o)&&(r?o<=t:o=200){var u=t?null:Ki(e);if(u)return cr(u);o=!1,i=Zt,l=new Xr}else l=t?[]:s;e:for(;++n=n?e:ii(e,t,r)}var Si=lt||function(e){return pt.clearTimeout(e)};function Ei(e,t){if(t)return e.slice();var r=e.length,n=qe?qe(r):new e.constructor(r);return e.copy(n),n}function ki(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function Pi(e,t){var r=t?ki(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ai(e,t){if(e!==t){var r=e!==i,n=null===e,a=e===e,o=cs(e),s=t!==i,l=null===t,u=t===t,c=cs(t);if(!l&&!c&&!o&&e>t||o&&s&&u&&!l&&!c||n&&s&&u||!r&&u||!a)return 1;if(!n&&!o&&!c&&e1?r[a-1]:i,s=a>2?r[2]:i;for(o=e.length>3&&"function"==typeof o?(a--,o):i,s&&xa(r[0],r[1],s)&&(o=a<3?i:o,a=1),t=Pe(t);++n-1?a[o?t[s]:s]:i}}function zi(e){return na((function(t){var r=t.length,n=r,o=Hr.prototype.thru;for(e&&t.reverse();n--;){var s=t[n];if("function"!=typeof s)throw new Oe(a);if(o&&!l&&"wrapper"==sa(s))var l=new Hr([],!0)}for(n=l?n:r;++n1&&b.reverse(),p&&cl))return!1;var c=o.get(e),f=o.get(t);if(c&&f)return c==t&&f==e;var h=-1,p=!0,d=2&r?new Xr:i;for(o.set(e,t),o.set(t,e);++h-1&&e%1==0&&e1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(le,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return At(v,(function(r){var n="_."+r[0];t&r[1]&&!Mt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(ue);return t?t[1].split(ce):[]}(n),r)))}function Na(e){var t=0,r=0;return function(){var n=xr(),a=16-(n-r);if(r=n,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Fa(e,t){var r=-1,n=e.length,a=n-1;for(t=t===i?n:t;++r1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,oo(e,r)}));function po(e){var t=zr(e);return t.__chain__=!0,t}function mo(e,t){return t(e)}var yo=na((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,a=function(t){return sn(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Ur&&ba(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:mo,args:[a],thisArg:i}),new Hr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(a)}));var vo=ji((function(e,t,r){Ne.call(e,r)?++e[r]:on(e,r,1)}));var go=Bi(Ua),bo=Bi(qa);function xo(e,t){return(Wo(e)?At:pn)(e,ua(t,3))}function wo(e,t){return(Wo(e)?Ct:dn)(e,ua(t,3))}var _o=ji((function(e,t,r){Ne.call(e,r)?e[r].push(t):on(e,r,[t])}));var So=Qn((function(e,t,n){var i=-1,a="function"==typeof t,o=Xo(e)?r(e.length):[];return pn(e,(function(e){o[++i]=a?kt(t,e,n):Mn(e,t,n)})),o})),Eo=ji((function(e,t,r){on(e,r,t)}));function ko(e,t){return(Wo(e)?Dt:zn)(e,ua(t,3))}var Po=ji((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));var Ao=Qn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&xa(e,t[0],t[1])?t=[]:r>2&&xa(t[0],t[1],t[2])&&(t=[t[0]]),qn(e,gn(t,1),[])})),Co=ft||function(){return pt.Date.now()};function Oo(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Ji(e,f,i,i,i,i,t)}function To(e,t){var r;if("function"!=typeof t)throw new Oe(a);return e=ys(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var Mo=Qn((function(e,t,r){var n=1;if(r.length){var i=ur(r,la(Mo));n|=u}return Ji(e,n,t,r,i)})),jo=Qn((function(e,t,r){var n=3;if(r.length){var i=ur(r,la(jo));n|=u}return Ji(t,n,e,r,i)}));function Do(e,t,r){var n,o,s,l,u,c,f=0,h=!1,p=!1,d=!0;if("function"!=typeof e)throw new Oe(a);function m(t){var r=n,a=o;return n=o=i,f=t,l=e.apply(a,r)}function y(e){return f=e,u=ja(g,t),h?m(e):l}function v(e){var r=e-c;return c===i||r>=t||r<0||p&&e-f>=s}function g(){var e=Co();if(v(e))return b(e);u=ja(g,function(e){var r=t-(e-c);return p?br(r,s-(e-f)):r}(e))}function b(e){return u=i,d&&n?m(e):(n=o=i,l)}function x(){var e=Co(),r=v(e);if(n=arguments,o=this,c=e,r){if(u===i)return y(c);if(p)return Si(u),u=ja(g,t),m(c)}return u===i&&(u=ja(g,t)),l}return t=gs(t)||0,rs(r)&&(h=!!r.leading,s=(p="maxWait"in r)?gr(gs(r.maxWait)||0,t):s,d="trailing"in r?!!r.trailing:d),x.cancel=function(){u!==i&&Si(u),f=0,n=c=o=u=i},x.flush=function(){return u===i?l:b(Co())},x}var Io=Qn((function(e,t){return fn(e,1,t)})),No=Qn((function(e,t,r){return fn(e,gs(t)||0,r)}));function Fo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Oe(a);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(Fo.Cache||$r),r}function Ro(e){if("function"!=typeof e)throw new Oe(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Fo.Cache=$r;var Lo=wi((function(e,t){var r=(t=1==t.length&&Wo(t[0])?Dt(t[0],Qt(ua())):Dt(gn(t,1),Qt(ua()))).length;return Qn((function(n){for(var i=-1,a=br(n.length,r);++i=t})),qo=jn(function(){return arguments}())?jn:function(e){return ns(e)&&Ne.call(e,"callee")&&!Xe.call(e,"callee")},Wo=r.isArray,$o=bt?Qt(bt):function(e){return ns(e)&&Pn(e)==I};function Xo(e){return null!=e&&ts(e.length)&&!Zo(e)}function Yo(e){return ns(e)&&Xo(e)}var Ko=gt||gl,Qo=xt?Qt(xt):function(e){return ns(e)&&Pn(e)==w};function Jo(e){if(!ns(e))return!1;var t=Pn(e);return t==_||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!os(e)}function Zo(e){if(!rs(e))return!1;var t=Pn(e);return t==S||t==E||"[object AsyncFunction]"==t||"[object Proxy]"==t}function es(e){return"number"==typeof e&&e==ys(e)}function ts(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function rs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ns(e){return null!=e&&"object"==typeof e}var is=wt?Qt(wt):function(e){return ns(e)&&ma(e)==k};function as(e){return"number"==typeof e||ns(e)&&Pn(e)==P}function os(e){if(!ns(e)||Pn(e)!=A)return!1;var t=We(e);if(null===t)return!0;var r=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Ie.call(r)==Be}var ss=_t?Qt(_t):function(e){return ns(e)&&Pn(e)==O};var ls=St?Qt(St):function(e){return ns(e)&&ma(e)==T};function us(e){return"string"==typeof e||!Wo(e)&&ns(e)&&Pn(e)==M}function cs(e){return"symbol"==typeof e||ns(e)&&Pn(e)==j}var fs=Et?Qt(Et):function(e){return ns(e)&&ts(e.length)&&!!ot[Pn(e)]};var hs=$i(Bn),ps=$i((function(e,t){return e<=t}));function ds(e){if(!e)return[];if(Xo(e))return us(e)?pr(e):Ti(e);if(Qe&&e[Qe])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Qe]());var t=ma(e);return(t==k?sr:t==T?cr:Gs)(e)}function ms(e){return e?(e=gs(e))===p||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function ys(e){var t=ms(e),r=t%1;return t===t?r?t-r:t:0}function vs(e){return e?ln(ys(e),0,y):0}function gs(e){if("number"==typeof e)return e;if(cs(e))return m;if(rs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=rs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Kt(e);var r=ve.test(e);return r||be.test(e)?ct(e.slice(2),r?2:8):ye.test(e)?m:+e}function bs(e){return Mi(e,Is(e))}function xs(e){return null==e?"":ci(e)}var ws=Di((function(e,t){if(Ea(t)||Xo(t))Mi(t,Ds(t),e);else for(var r in t)Ne.call(t,r)&&tn(e,r,t[r])})),_s=Di((function(e,t){Mi(t,Is(t),e)})),Ss=Di((function(e,t,r,n){Mi(t,Is(t),e,n)})),Es=Di((function(e,t,r,n){Mi(t,Ds(t),e,n)})),ks=na(sn);var Ps=Qn((function(e,t){e=Pe(e);var r=-1,n=t.length,a=n>2?t[2]:i;for(a&&xa(t[0],t[1],a)&&(n=1);++r1),t})),Mi(e,aa(e),r),n&&(r=un(r,7,ta));for(var i=t.length;i--;)hi(r,t[i]);return r}));var Ls=na((function(e,t){return null==e?{}:function(e,t){return Wn(e,t,(function(t,r){return Os(e,r)}))}(e,t)}));function Bs(e,t){if(null==e)return{};var r=Dt(aa(e),(function(e){return[e]}));return t=ua(t),Wn(e,r,(function(e,r){return t(e,r[0])}))}var zs=Qi(Ds),Vs=Qi(Is);function Gs(e){return null==e?[]:Jt(e,Ds(e))}var Hs=Ri((function(e,t,r){return t=t.toLowerCase(),e+(r?Us(t):t)}));function Us(e){return Js(xs(e).toLowerCase())}function qs(e){return(e=xs(e))&&e.replace(we,nr).replace(Ze,"")}var Ws=Ri((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),$s=Ri((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Xs=Fi("toLowerCase");var Ys=Ri((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));var Ks=Ri((function(e,t,r){return e+(r?" ":"")+Js(t)}));var Qs=Ri((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Js=Fi("toUpperCase");function Zs(e,t,r){return e=xs(e),(t=r?i:t)===i?function(e){return nt.test(e)}(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.match(fe)||[]}(e):e.match(t)||[]}var el=Qn((function(e,t){try{return kt(e,i,t)}catch(r){return Jo(r)?r:new se(r)}})),tl=na((function(e,t){return At(t,(function(t){t=La(t),on(e,t,Mo(e[t],e))})),e}));function rl(e){return function(){return e}}var nl=zi(),il=zi(!0);function al(e){return e}function ol(e){return Fn("function"==typeof e?e:un(e,1))}var sl=Qn((function(e,t){return function(r){return Mn(r,e,t)}})),ll=Qn((function(e,t){return function(r){return Mn(e,r,t)}}));function ul(e,t,r){var n=Ds(t),i=Sn(t,n);null!=r||rs(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=Sn(t,Ds(t)));var a=!(rs(r)&&"chain"in r)||!!r.chain,o=Zo(e);return At(i,(function(r){var n=t[r];e[r]=n,o&&(e.prototype[r]=function(){var t=this.__chain__;if(a||t){var r=e(this.__wrapped__),i=r.__actions__=Ti(this.__actions__);return i.push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,It([this.value()],arguments))})})),e}function cl(){}var fl=Ui(Dt),hl=Ui(Ot),pl=Ui(Rt);function dl(e){return wa(e)?qt(La(e)):function(e){return function(t){return En(t,e)}}(e)}var ml=Wi(),yl=Wi(!0);function vl(){return[]}function gl(){return!1}var bl=Hi((function(e,t){return e+t}),0),xl=Yi("ceil"),wl=Hi((function(e,t){return e/t}),1),_l=Yi("floor");var Sl=Hi((function(e,t){return e*t}),1),El=Yi("round"),kl=Hi((function(e,t){return e-t}),0);return zr.after=function(e,t){if("function"!=typeof t)throw new Oe(a);return e=ys(e),function(){if(--e<1)return t.apply(this,arguments)}},zr.ary=Oo,zr.assign=ws,zr.assignIn=_s,zr.assignInWith=Ss,zr.assignWith=Es,zr.at=ks,zr.before=To,zr.bind=Mo,zr.bindAll=tl,zr.bindKey=jo,zr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wo(e)?e:[e]},zr.chain=po,zr.chunk=function(e,t,n){t=(n?xa(e,t,n):t===i)?1:gr(ys(t),0);var a=null==e?0:e.length;if(!a||t<1)return[];for(var o=0,s=0,l=r(dt(a/t));oa?0:a+r),(n=n===i||n>a?a:ys(n))<0&&(n+=a),n=r>n?0:vs(n);r>>0)?(e=xs(e))&&("string"==typeof t||null!=t&&!ss(t))&&!(t=ci(t))&&or(e)?_i(pr(e),0,r):e.split(t,r):[]},zr.spread=function(e,t){if("function"!=typeof e)throw new Oe(a);return t=null==t?0:gr(ys(t),0),Qn((function(r){var n=r[t],i=_i(r,0,t);return n&&It(i,n),kt(e,this,i)}))},zr.tail=function(e){var t=null==e?0:e.length;return t?ii(e,1,t):[]},zr.take=function(e,t,r){return e&&e.length?ii(e,0,(t=r||t===i?1:ys(t))<0?0:t):[]},zr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?ii(e,(t=n-(t=r||t===i?1:ys(t)))<0?0:t,n):[]},zr.takeRightWhile=function(e,t){return e&&e.length?di(e,ua(t,3),!1,!0):[]},zr.takeWhile=function(e,t){return e&&e.length?di(e,ua(t,3)):[]},zr.tap=function(e,t){return t(e),e},zr.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new Oe(a);return rs(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Do(e,t,{leading:n,maxWait:t,trailing:i})},zr.thru=mo,zr.toArray=ds,zr.toPairs=zs,zr.toPairsIn=Vs,zr.toPath=function(e){return Wo(e)?Dt(e,La):cs(e)?[e]:Ti(Ra(xs(e)))},zr.toPlainObject=bs,zr.transform=function(e,t,r){var n=Wo(e),i=n||Ko(e)||fs(e);if(t=ua(t,4),null==r){var a=e&&e.constructor;r=i?n?new a:[]:rs(e)&&Zo(a)?Vr(We(e)):{}}return(i?At:wn)(e,(function(e,n,i){return t(r,e,n,i)})),r},zr.unary=function(e){return Oo(e,1)},zr.union=ro,zr.unionBy=no,zr.unionWith=io,zr.uniq=function(e){return e&&e.length?fi(e):[]},zr.uniqBy=function(e,t){return e&&e.length?fi(e,ua(t,2)):[]},zr.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?fi(e,i,t):[]},zr.unset=function(e,t){return null==e||hi(e,t)},zr.unzip=ao,zr.unzipWith=oo,zr.update=function(e,t,r){return null==e?e:pi(e,t,bi(r))},zr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:pi(e,t,bi(r),n)},zr.values=Gs,zr.valuesIn=function(e){return null==e?[]:Jt(e,Is(e))},zr.without=so,zr.words=Zs,zr.wrap=function(e,t){return Bo(bi(t),e)},zr.xor=lo,zr.xorBy=uo,zr.xorWith=co,zr.zip=fo,zr.zipObject=function(e,t){return vi(e||[],t||[],tn)},zr.zipObjectDeep=function(e,t){return vi(e||[],t||[],ei)},zr.zipWith=ho,zr.entries=zs,zr.entriesIn=Vs,zr.extend=_s,zr.extendWith=Ss,ul(zr,zr),zr.add=bl,zr.attempt=el,zr.camelCase=Hs,zr.capitalize=Us,zr.ceil=xl,zr.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=gs(r))===r?r:0),t!==i&&(t=(t=gs(t))===t?t:0),ln(gs(e),t,r)},zr.clone=function(e){return un(e,4)},zr.cloneDeep=function(e){return un(e,5)},zr.cloneDeepWith=function(e,t){return un(e,5,t="function"==typeof t?t:i)},zr.cloneWith=function(e,t){return un(e,4,t="function"==typeof t?t:i)},zr.conformsTo=function(e,t){return null==t||cn(e,t,Ds(t))},zr.deburr=qs,zr.defaultTo=function(e,t){return null==e||e!==e?t:e},zr.divide=wl,zr.endsWith=function(e,t,r){e=xs(e),t=ci(t);var n=e.length,a=r=r===i?n:ln(ys(r),0,n);return(r-=t.length)>=0&&e.slice(r,a)==t},zr.eq=Go,zr.escape=function(e){return(e=xs(e))&&Q.test(e)?e.replace(Y,ir):e},zr.escapeRegExp=function(e){return(e=xs(e))&&ae.test(e)?e.replace(ie,"\\$&"):e},zr.every=function(e,t,r){var n=Wo(e)?Ot:mn;return r&&xa(e,t,r)&&(t=i),n(e,ua(t,3))},zr.find=go,zr.findIndex=Ua,zr.findKey=function(e,t){return Bt(e,ua(t,3),wn)},zr.findLast=bo,zr.findLastIndex=qa,zr.findLastKey=function(e,t){return Bt(e,ua(t,3),_n)},zr.floor=_l,zr.forEach=xo,zr.forEachRight=wo,zr.forIn=function(e,t){return null==e?e:bn(e,ua(t,3),Is)},zr.forInRight=function(e,t){return null==e?e:xn(e,ua(t,3),Is)},zr.forOwn=function(e,t){return e&&wn(e,ua(t,3))},zr.forOwnRight=function(e,t){return e&&_n(e,ua(t,3))},zr.get=Cs,zr.gt=Ho,zr.gte=Uo,zr.has=function(e,t){return null!=e&&ya(e,t,Cn)},zr.hasIn=Os,zr.head=$a,zr.identity=al,zr.includes=function(e,t,r,n){e=Xo(e)?e:Gs(e),r=r&&!n?ys(r):0;var i=e.length;return r<0&&(r=gr(i+r,0)),us(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Vt(e,t,r)>-1},zr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:ys(r);return i<0&&(i=gr(n+i,0)),Vt(e,t,i)},zr.inRange=function(e,t,r){return t=ms(t),r===i?(r=t,t=0):r=ms(r),function(e,t,r){return e>=br(t,r)&&e=-9007199254740991&&e<=d},zr.isSet=ls,zr.isString=us,zr.isSymbol=cs,zr.isTypedArray=fs,zr.isUndefined=function(e){return e===i},zr.isWeakMap=function(e){return ns(e)&&ma(e)==D},zr.isWeakSet=function(e){return ns(e)&&"[object WeakSet]"==Pn(e)},zr.join=function(e,t){return null==e?"":Wt.call(e,t)},zr.kebabCase=Ws,zr.last=Qa,zr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var a=n;return r!==i&&(a=(a=ys(r))<0?gr(n+a,0):br(a,n-1)),t===t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,a):zt(e,Ht,a,!0)},zr.lowerCase=$s,zr.lowerFirst=Xs,zr.lt=hs,zr.lte=ps,zr.max=function(e){return e&&e.length?yn(e,al,An):i},zr.maxBy=function(e,t){return e&&e.length?yn(e,ua(t,2),An):i},zr.mean=function(e){return Ut(e,al)},zr.meanBy=function(e,t){return Ut(e,ua(t,2))},zr.min=function(e){return e&&e.length?yn(e,al,Bn):i},zr.minBy=function(e,t){return e&&e.length?yn(e,ua(t,2),Bn):i},zr.stubArray=vl,zr.stubFalse=gl,zr.stubObject=function(){return{}},zr.stubString=function(){return""},zr.stubTrue=function(){return!0},zr.multiply=Sl,zr.nth=function(e,t){return e&&e.length?Un(e,ys(t)):i},zr.noConflict=function(){return pt._===this&&(pt._=ze),this},zr.noop=cl,zr.now=Co,zr.pad=function(e,t,r){e=xs(e);var n=(t=ys(t))?hr(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return qi(mt(i),r)+e+qi(dt(i),r)},zr.padEnd=function(e,t,r){e=xs(e);var n=(t=ys(t))?hr(e):0;return t&&nt){var n=e;e=t,t=n}if(r||e%1||t%1){var a=_r();return br(e+a*(t-e+ut("1e-"+((a+"").length-1))),t)}return Yn(e,t)},zr.reduce=function(e,t,r){var n=Wo(e)?Nt:$t,i=arguments.length<3;return n(e,ua(t,4),r,i,pn)},zr.reduceRight=function(e,t,r){var n=Wo(e)?Ft:$t,i=arguments.length<3;return n(e,ua(t,4),r,i,dn)},zr.repeat=function(e,t,r){return t=(r?xa(e,t,r):t===i)?1:ys(t),Kn(xs(e),t)},zr.replace=function(){var e=arguments,t=xs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},zr.result=function(e,t,r){var n=-1,a=(t=xi(t,e)).length;for(a||(a=1,e=i);++nd)return[];var r=y,n=br(e,y);t=ua(t),e-=y;for(var i=Yt(n,t);++r=o)return e;var l=r-hr(n);if(l<1)return n;var u=s?_i(s,0,l).join(""):e.slice(0,l);if(a===i)return u+n;if(s&&(l+=u.length-l),ss(a)){if(e.slice(l).search(a)){var c,f=u;for(a.global||(a=Ae(a.source,xs(me.exec(a))+"g")),a.lastIndex=0;c=a.exec(f);)var h=c.index;u=u.slice(0,h===i?l:h)}}else if(e.indexOf(ci(a),l)!=l){var p=u.lastIndexOf(a);p>-1&&(u=u.slice(0,p))}return u+n},zr.unescape=function(e){return(e=xs(e))&&K.test(e)?e.replace(X,mr):e},zr.uniqueId=function(e){var t=++Fe;return xs(e)+t},zr.upperCase=Qs,zr.upperFirst=Js,zr.each=xo,zr.eachRight=wo,zr.first=$a,ul(zr,function(){var e={};return wn(zr,(function(t,r){Ne.call(zr.prototype,r)||(e[r]=t)})),e}(),{chain:!1}),zr.VERSION="4.17.21",At(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){zr[e].placeholder=zr})),At(["drop","take"],(function(e,t){Ur.prototype[e]=function(r){r=r===i?1:gr(ys(r),0);var n=this.__filtered__&&!t?new Ur(this):this.clone();return n.__filtered__?n.__takeCount__=br(r,n.__takeCount__):n.__views__.push({size:br(r,y),type:e+(n.__dir__<0?"Right":"")}),n},Ur.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),At(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Ur.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ua(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),At(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Ur.prototype[e]=function(){return this[r](1).value()[0]}})),At(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Ur.prototype[e]=function(){return this.__filtered__?new Ur(this):this[r](1)}})),Ur.prototype.compact=function(){return this.filter(al)},Ur.prototype.find=function(e){return this.filter(e).head()},Ur.prototype.findLast=function(e){return this.reverse().find(e)},Ur.prototype.invokeMap=Qn((function(e,t){return"function"==typeof e?new Ur(this):this.map((function(r){return Mn(r,e,t)}))})),Ur.prototype.reject=function(e){return this.filter(Ro(ua(e)))},Ur.prototype.slice=function(e,t){e=ys(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Ur(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=ys(t))<0?r.dropRight(-t):r.take(t-e)),r)},Ur.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ur.prototype.toArray=function(){return this.take(y)},wn(Ur.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),a=zr[n?"take"+("last"==t?"Right":""):t],o=n||/^find/.test(t);a&&(zr.prototype[t]=function(){var t=this.__wrapped__,s=n?[1]:arguments,l=t instanceof Ur,u=s[0],c=l||Wo(t),f=function(e){var t=a.apply(zr,It([e],s));return n&&h?t[0]:t};c&&r&&"function"==typeof u&&1!=u.length&&(l=c=!1);var h=this.__chain__,p=!!this.__actions__.length,d=o&&!h,m=l&&!p;if(!o&&c){t=m?t:new Ur(this);var y=e.apply(t,s);return y.__actions__.push({func:mo,args:[f],thisArg:i}),new Hr(y,h)}return d&&m?e.apply(this,s):(y=this.thru(f),d?n?y.value()[0]:y.value():y)})})),At(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Te[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);zr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Wo(i)?i:[],e)}return this[r]((function(r){return t.apply(Wo(r)?r:[],e)}))}})),wn(Ur.prototype,(function(e,t){var r=zr[t];if(r){var n=r.name+"";Ne.call(Mr,n)||(Mr[n]=[]),Mr[n].push({name:t,func:r})}})),Mr[Vi(i,2).name]=[{name:"wrapper",func:i}],Ur.prototype.clone=function(){var e=new Ur(this.__wrapped__);return e.__actions__=Ti(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ti(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ti(this.__views__),e},Ur.prototype.reverse=function(){if(this.__filtered__){var e=new Ur(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Ur.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Wo(e),n=t<0,i=r?e.length:0,a=function(e,t,r){var n=-1,i=r.length;for(;++n=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},zr.prototype.plant=function(e){for(var t,r=this;r instanceof Gr;){var n=za(r);n.__index__=0,n.__values__=i,t?a.__wrapped__=n:t=n;var a=n;r=r.__wrapped__}return a.__wrapped__=e,t},zr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Ur){var t=e;return this.__actions__.length&&(t=new Ur(this)),(t=t.reverse()).__actions__.push({func:mo,args:[to],thisArg:i}),new Hr(t,this.__chain__)}return this.thru(to)},zr.prototype.toJSON=zr.prototype.valueOf=zr.prototype.value=function(){return mi(this.__wrapped__,this.__actions__)},zr.prototype.first=zr.prototype.head,Qe&&(zr.prototype[Qe]=function(){return this}),zr}();pt._=yr,(n=function(){return yr}.call(t,r,t,e))===i||(e.exports=n)}.call(this)},2034:(e,t,r)=>{var n=r(8950),i=r(6025),a=r(3849),o=r(3629);e.exports=function(e,t){return(o(e)?n:a)(e,i(t,3))}},7702:(e,t,r)=>{var n=r(2526),i=r(5358),a=r(6025);e.exports=function(e,t){var r={};return t=a(t,3),i(e,(function(e,i,a){n(r,i,t(e,i,a))})),r}},9627:(e,t,r)=>{var n=r(3079),i=r(1954),a=r(2100);e.exports=function(e){return e&&e.length?n(e,a,i):void 0}},9151:(e,t,r)=>{var n=r(8059);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},6452:(e,t,r)=>{var n=r(3079),i=r(2580),a=r(2100);e.exports=function(e){return e&&e.length?n(e,a,i):void 0}},9694:e=>{e.exports=function(){}},72:(e,t,r)=>{var n=r(7009);e.exports=function(){return n.Date.now()}},38:(e,t,r)=>{var n=r(9586),i=r(4084),a=r(5823),o=r(9793);e.exports=function(e){return a(e)?n(o(e)):i(e)}},6222:(e,t,r)=>{var n=r(6381)();e.exports=n},4064:(e,t,r)=>{var n=r(7897),i=r(6025),a=r(9204),o=r(3629),s=r(3195);e.exports=function(e,t,r){var l=o(e)?n:a;return r&&s(e,t,r)&&(t=void 0),l(e,i(t,3))}},4286:(e,t,r)=>{var n=r(5182),i=r(3226),a=r(8794),o=r(3195),s=a((function(e,t){if(null==e)return[];var r=t.length;return r>1&&o(e,t[0],t[1])?t=[]:r>2&&o(t[0],t[1],t[2])&&(t=[t[0]]),i(e,n(t,1),[])}));e.exports=s},8174:e=>{e.exports=function(){return[]}},9488:e=>{e.exports=function(){return!1}},3038:(e,t,r)=>{var n=r(4003),i=r(8092);e.exports=function(e,t,r){var a=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(r)&&(a="leading"in r?!!r.leading:a,o="trailing"in r?!!r.trailing:o),n(e,t,{leading:a,maxWait:t,trailing:o})}},1495:(e,t,r)=>{var n=r(2582),i=1/0;e.exports=function(e){return e?(e=n(e))===i||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}},9753:(e,t,r)=>{var n=r(1495);e.exports=function(e){var t=n(e),r=t%1;return t===t?r?t-r:t:0}},2582:(e,t,r)=>{var n=r(821),i=r(8092),a=r(152),o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(a(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=s.test(e);return r||l.test(e)?u(e.slice(2),r?2:8):o.test(e)?NaN:+e}},3518:(e,t,r)=>{var n=r(2446);e.exports=function(e){return null==e?"":n(e)}},6339:(e,t,r)=>{var n=r(6025),i=r(9602);e.exports=function(e,t){return e&&e.length?i(e,n(t,2)):[]}},2085:(e,t,r)=>{var n=r(322)("toUpperCase");e.exports=n},9741:function(e,t,r){!function(e,t,r){"use strict";function n(e){return e&&"object"===typeof e&&"default"in e?e:{default:e}}var i=n(t),a=n(r);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t=0||(i[r]=e[r]);return i}function c(e,t){if(null==e)return{};var r,n,i=u(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function f(e,t){return h(e)||p(e,t)||d(e,t)||y()}function h(e){if(Array.isArray(e))return e}function p(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(l){s=!0,i=l}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}function d(e,t){if(e){if("string"===typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{};if(C.current){null===(t=A.current)||void 0===t||t.destroy();var n=s(s(s({},e),r),{},{container:C.current});return A.current=i.default.loadAnimation(n),P(!!A.current),function(){var e;null===(e=A.current)||void 0===e||e.destroy(),A.current=void 0}}};return r.useEffect((function(){var e=z();return function(){return null===e||void 0===e?void 0:e()}}),[n,o]),r.useEffect((function(){A.current&&(A.current.autoplay=!!l)}),[l]),r.useEffect((function(){A.current&&(u?Array.isArray(u)&&u.length&&((A.current.currentRawFrameu[1])&&(A.current.currentRawFrame=u[0]),A.current.setSegment(u[0],u[1])):A.current.resetSegments(!0))}),[u]),r.useEffect((function(){var e=[{name:"complete",handler:h},{name:"loopComplete",handler:p},{name:"enterFrame",handler:d},{name:"segmentStart",handler:m},{name:"config_ready",handler:y},{name:"data_ready",handler:g},{name:"data_failed",handler:b},{name:"loaded_images",handler:x},{name:"DOMLoaded",handler:w},{name:"destroy",handler:_}].filter((function(e){return null!=e.handler}));if(e.length){var t=e.map((function(e){var t;return null===(t=A.current)||void 0===t||t.addEventListener(e.name,e.handler),function(){var t;null===(t=A.current)||void 0===t||t.removeEventListener(e.name,e.handler)}}));return function(){t.forEach((function(e){return e()}))}}}),[h,p,d,m,y,g,b,x,w,_]),{View:a.default.createElement("div",s({style:t,ref:C},S)),play:O,stop:T,pause:M,setSpeed:j,goToAndStop:I,goToAndPlay:D,setDirection:N,playSegments:F,setSubframe:R,getDuration:L,destroy:B,animationContainerRef:C,animationLoaded:k,animationItem:A.current}};function b(e){var t=e.getBoundingClientRect(),r=t.top,n=t.height;return(window.innerHeight-r)/(window.innerHeight+n)}function x(e,t,r){var n=e.getBoundingClientRect(),i=n.top;return{x:(t-n.left)/n.width,y:(r-i)/n.height}}var w=function(e){var t=e.wrapperRef,n=e.animationItem,i=e.mode,a=e.actions;r.useEffect((function(){var e=t.current;if(e&&n&&a.length){n.stop();var r=function(){var t=null,r=function(){var r=b(e),i=a.find((function(e){var t=e.visibility;return t&&r>=t[0]&&r<=t[1]}));if(i){if("seek"===i.type&&i.visibility&&2===i.frames.length){var o=i.frames[0]+Math.ceil((r-i.visibility[0])/(i.visibility[1]-i.visibility[0])*i.frames[1]);n.goToAndStop(o-n.firstFrame-1,!0)}"loop"===i.type&&(null===t||t!==i.frames||n.isPaused)&&(n.playSegments(i.frames,!0),t=i.frames),"play"===i.type&&n.isPaused&&(n.resetSegments(!0),n.play()),"stop"===i.type&&n.goToAndStop(i.frames[0]-n.firstFrame-1,!0)}};return document.addEventListener("scroll",r),function(){document.removeEventListener("scroll",r)}},o=function(){var t=function(t,r){var i=t,o=r;if(-1!==i&&-1!==o){var s=x(e,i,o);i=s.x,o=s.y}var l=a.find((function(e){var t=e.position;return t&&Array.isArray(t.x)&&Array.isArray(t.y)?i>=t.x[0]&&i<=t.x[1]&&o>=t.y[0]&&o<=t.y[1]:!(!t||Number.isNaN(t.x)||Number.isNaN(t.y))&&i===t.x&&o===t.y}));if(l){if("seek"===l.type&&l.position&&Array.isArray(l.position.x)&&Array.isArray(l.position.y)&&2===l.frames.length){var u=(i-l.position.x[0])/(l.position.x[1]-l.position.x[0]),c=(o-l.position.y[0])/(l.position.y[1]-l.position.y[0]);n.playSegments(l.frames,!0),n.goToAndStop(Math.ceil((u+c)/2*(l.frames[1]-l.frames[0])),!0)}"loop"===l.type&&n.playSegments(l.frames,!0),"play"===l.type&&(n.isPaused&&n.resetSegments(!1),n.playSegments(l.frames)),"stop"===l.type&&n.goToAndStop(l.frames[0],!0)}},r=function(e){t(e.clientX,e.clientY)},i=function(){t(-1,-1)};return e.addEventListener("mousemove",r),e.addEventListener("mouseout",i),function(){e.removeEventListener("mousemove",r),e.removeEventListener("mouseout",i)}};switch(i){case"scroll":return r();case"cursor":return o()}}}),[i,n])},_=function(e){var t=e.actions,r=e.mode,n=e.lottieObj,i=n.animationItem,a=n.View,o=n.animationContainerRef;return w({actions:t,animationItem:i,mode:r,wrapperRef:o}),a},S=["style","interactivity"],E=function(e){var t,n,i,a=e.style,o=e.interactivity,s=c(e,S),l=g(s,a),u=l.View,f=l.play,h=l.stop,p=l.pause,d=l.setSpeed,m=l.goToAndStop,y=l.goToAndPlay,v=l.setDirection,b=l.playSegments,x=l.setSubframe,w=l.getDuration,E=l.destroy,k=l.animationContainerRef,P=l.animationLoaded,A=l.animationItem;return r.useEffect((function(){e.lottieRef&&(e.lottieRef.current={play:f,stop:h,pause:p,setSpeed:d,goToAndPlay:y,goToAndStop:m,setDirection:v,playSegments:b,setSubframe:x,getDuration:w,destroy:E,animationContainerRef:k,animationLoaded:P,animationItem:A})}),[null===(t=e.lottieRef)||void 0===t?void 0:t.current]),_({lottieObj:{View:u,play:f,stop:h,pause:p,setSpeed:d,goToAndStop:m,goToAndPlay:y,setDirection:v,playSegments:b,setSubframe:x,getDuration:w,destroy:E,animationContainerRef:k,animationLoaded:P,animationItem:A},actions:null!==(n=null===o||void 0===o?void 0:o.actions)&&void 0!==n?n:[],mode:null!==(i=null===o||void 0===o?void 0:o.mode)&&void 0!==i?i:"scroll"})};Object.defineProperty(e,"LottiePlayer",{enumerable:!0,get:function(){return i.default}}),e.default=E,e.useLottie=g,e.useLottieInteractivity=_,Object.defineProperty(e,"__esModule",{value:!0})}(t,r(7625),r(2791))},7625:function(module,exports,__webpack_require__){var factory;"undefined"!==typeof navigator&&(factory=function(){"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(e){_useWebWorker=!!e},getWebWorker=function(){return _useWebWorker},setLocationHref=function(e){locationHref=e},getLocationHref=function(){return locationHref};function createTag(e){return document.createElement(e)}function extendPrototype(e,t){var r,n,i=e.length;for(r=0;r1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(e,t){var r=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return r[2]+=t,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(e,t){var r=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return r[0]+=t/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var e,t,r=[];for(e=0;e<256;e+=1)t=e.toString(16),r[e]=1===t.length?"0"+t:t;return function(e,t,n){return e<0&&(e=0),t<0&&(t=0),n<0&&(n=0),"#"+r[e]+r[t]+r[n]}}(),setSubframeEnabled=function(e){subframeEnabled=!!e},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(e){expressionsPlugin=e},getExpressionsPlugin=function(){return expressionsPlugin},setDefaultCurveSegments=function(e){defaultCurveSegments=e},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(e){idPrefix$1=e},getIdPrefix=function(){return idPrefix$1};function createNS(e){return document.createElementNS(svgNS,e)}function _typeof$5(e){return _typeof$5="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$5(e)}var dataManager=function(){var e,t,r=1,n=[],i={onmessage:function(){},postMessage:function(t){e({data:t})}},a={postMessage:function(e){i.onmessage({data:e})}};function o(){t||(t=function(t){if(window.Worker&&window.Blob&&getWebWorker()){var r=new Blob(["var _workerSelf = self; self.onmessage = ",t.toString()],{type:"text/javascript"}),n=URL.createObjectURL(r);return new Worker(n)}return e=t,i}((function(e){if(a.dataManager||(a.dataManager=function(){function e(i,a){var o,s,l,u,f,h,p=i.length;for(s=0;s=0;t-=1)if("sh"===e[t].ty)if(e[t].ks.k.i)n(e[t].ks.k);else for(a=e[t].ks.k.length,i=0;ir[0]||!(r[0]>e[0])&&(e[1]>r[1]||!(r[1]>e[1])&&(e[2]>r[2]||!(r[2]>e[2])&&null))}var a=function(){var e=[4,4,14];function t(e){var t=e.t.d;e.t.d={k:[{s:t,t:0}]}}function r(e){var r,n=e.length;for(r=0;r=0;r-=1)if("sh"===e[r].ty)if(e[r].ks.k.i)e[r].ks.k.c=e[r].closed;else for(i=e[r].ks.k.length,n=0;n500)&&(this._imageLoaded(),clearInterval(r)),t+=1}.bind(this),50)}function a(e){var t={assetData:e},r=n(e,this.assetsPath,this.path);return dataManager.loadData(r,function(e){t.img=e,this._footageLoaded()}.bind(this),function(){t.img={},this._footageLoaded()}.bind(this)),t}function o(){this._imageLoaded=t.bind(this),this._footageLoaded=r.bind(this),this.testImageLoaded=i.bind(this),this.createFootageData=a.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return o.prototype={loadAssets:function(e,t){var r;this.imagesLoadedCb=t;var n=e.length;for(r=0;rthis.animationData.op&&(this.animationData.op=e.op,this.totalFrames=Math.floor(e.op-this.animationData.ip));var t,r,n=this.animationData.layers,i=n.length,a=e.layers,o=a.length;for(r=0;rthis.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(e){this.triggerRenderFrameError(e)}},AnimationItem.prototype.play=function(e){e&&this.name!==e||!0===this.isPaused&&(this.isPaused=!1,this.trigger("_pause"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(e){e&&this.name!==e||!1===this.isPaused&&(this.isPaused=!0,this.trigger("_play"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(e){e&&this.name!==e||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(e){e&&this.name!==e||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(e){for(var t,r=0;r=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?t>=this.totalFrames?(this.playCount+=1,this.checkSegments(t%this.totalFrames)||(this.setCurrentRawFrameValue(t%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(t):this.checkSegments(t>this.totalFrames?t%this.totalFrames:0)||(r=!0,t=this.totalFrames-1):t<0?this.checkSegments(t%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(r=!0,t=0):(this.setCurrentRawFrameValue(this.totalFrames+t%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(t),r&&(this.setCurrentRawFrameValue(t),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(e,t){this.playCount=0,e[1]0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=e[0]-e[1],this.timeCompleted=this.totalFrames,this.firstFrame=e[1],this.setCurrentRawFrameValue(this.totalFrames-.001-t)):e[1]>e[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=e[1]-e[0],this.timeCompleted=this.totalFrames,this.firstFrame=e[0],this.setCurrentRawFrameValue(.001+t)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(e,t){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFramet&&(r=t-e)),this.firstFrame=e,this.totalFrames=t-e,this.timeCompleted=this.totalFrames,-1!==r&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(e,t){if(t&&(this.segments.length=0),"object"===_typeof$4(e[0])){var r,n=e.length;for(r=0;r=0;r-=1)t[r].animation.destroy(e)},e.freeze=function(){o=!0},e.unfreeze=function(){o=!1,d()},e.setVolume=function(e,r){var i;for(i=0;i=.001?function(e,t,r,n){for(var i=0;i<4;++i){var a=l(t,r,n);if(0===a)return t;t-=(s(t,r,n)-e)/a}return t}(e,u,t,n):0===c?u:function(e,t,r,n,i){var a,o,l=0;do{(a=s(o=t+(r-t)/2,n,i)-e)>0?r=o:t=o}while(Math.abs(a)>1e-7&&++l<10);return o}(e,a,a+r,t,n)}},e}(),pooling={double:function(e){return e.concat(createSizedArray(e.length))}},poolFactory=function(e,t,r){var n=0,i=e,a=createSizedArray(i);return{newElement:function(){return n?a[n-=1]:t()},release:function(e){n===i&&(a=pooling.double(a),i*=2),r&&r(e),a[n]=e,n+=1}}},bezierLengthPool=poolFactory(8,(function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}})),segmentsLengthPool=poolFactory(8,(function(){return{lengths:[],totalLength:0}}),(function(e){var t,r=e.lengths.length;for(t=0;t-.001&&o<.001}var r=function(e,t,r,n){var i,a,o,s,l,u,c=getDefaultCurveSegments(),f=0,h=[],p=[],d=bezierLengthPool.newElement();for(o=r.length,i=0;io?-1:1,u=!0;u;)if(n[a]<=o&&n[a+1]>o?(s=(o-n[a])/(n[a+1]-n[a]),u=!1):a+=l,a<0||a>=i-1){if(a===i-1)return r[a];u=!1}return r[a]+(r[a+1]-r[a])*s}var s=createTypedArray("float32",8);return{getSegmentsLength:function(e){var t,n=segmentsLengthPool.newElement(),i=e.c,a=e.v,o=e.o,s=e.i,l=e._length,u=n.lengths,c=0;for(t=0;t1&&(a=1);var c,f=o(a,u),h=o(l=l>1?1:l,u),p=t.length,d=1-f,m=1-h,y=d*d*d,v=f*d*d*3,g=f*f*d*3,b=f*f*f,x=d*d*m,w=f*d*m+d*f*m+d*d*h,_=f*f*m+d*f*h+f*d*h,S=f*f*h,E=d*m*m,k=f*m*m+d*h*m+d*m*h,P=f*h*m+d*h*h+f*m*h,A=f*h*h,C=m*m*m,O=h*m*m+m*h*m+m*m*h,T=h*h*m+m*h*h+h*m*h,M=h*h*h;for(c=0;cp?h>d?h-p-d:d-p-h:d>p?d-p-h:p-h-d)>-1e-4&&f<1e-4}}}var bez=bezFunction(),PropertyFactory=function(){var e=initialDefaultFrame,t=Math.abs;function r(e,t){var r,i=this.offsetTime;"multidimensional"===this.propType&&(r=createTypedArray("float32",this.pv.length));for(var a,o,s,l,u,c,f,h,p,d=t.lastIndex,m=d,y=this.keyframes.length-1,v=!0;v;){if(a=this.keyframes[m],o=this.keyframes[m+1],m===y-1&&e>=o.t-i){a.h&&(a=o),d=0;break}if(o.t-i>e){d=m;break}m=b||e=b?w.points.length-1:0;for(u=w.points[_].point.length,l=0;l=k&&E=b?(r[0]=g[0],r[1]=g[1],r[2]=g[2]):e<=x?(r[0]=a.s[0],r[1]=a.s[1],r[2]=a.s[2]):function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=Math.atan2(2*n*a-2*r*i,1-2*n*n-2*i*i),s=Math.asin(2*r*n+2*i*a),l=Math.atan2(2*r*a-2*n*i,1-2*r*r-2*i*i);e[0]=o/degToRads,e[1]=s/degToRads,e[2]=l/degToRads}(r,function(e,t,r){var n,i,a,o,s,l=[],u=e[0],c=e[1],f=e[2],h=e[3],p=t[0],d=t[1],m=t[2],y=t[3];return(i=u*p+c*d+f*m+h*y)<0&&(i=-i,p=-p,d=-d,m=-m,y=-y),1-i>1e-6?(n=Math.acos(i),a=Math.sin(n),o=Math.sin((1-r)*n)/a,s=Math.sin(r*n)/a):(o=1-r,s=r),l[0]=o*u+s*p,l[1]=o*c+s*d,l[2]=o*f+s*m,l[3]=o*h+s*y,l}(n(a.s),n(g),(e-x)/(b-x)));else for(m=0;m=b?c=1:e=n&&t>=n||this._caching.lastFrame=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var i=this.interpolateValue(t,this._caching);this.pv=i}return this._caching.lastFrame=t,this.pv}function a(e){var r;if("unidimensional"===this.propType)r=e*this.mult,t(this.v-r)>1e-5&&(this.v=r,this._mdf=!0);else for(var n=0,i=this.v.length;n1e-5&&(this.v[n]=r,this._mdf=!0),n+=1}function o(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var e;this.lock=!0,this._mdf=this._isFirstFrame;var t=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(e=0;e=this._maxLength&&this.doubleArrayLength(),r){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}(!a[n]||a[n]&&!i)&&(a[n]=pointPool.newElement()),a[n][0]=e,a[n][1]=t},ShapePath.prototype.setTripleAt=function(e,t,r,n,i,a,o,s){this.setXYAt(e,t,"v",o,s),this.setXYAt(r,n,"o",o,s),this.setXYAt(i,a,"i",o,s)},ShapePath.prototype.reverse=function(){var e=new ShapePath;e.setPathData(this.c,this._length);var t=this.v,r=this.o,n=this.i,i=0;this.c&&(e.setTripleAt(t[0][0],t[0][1],n[0][0],n[0][1],r[0][0],r[0][1],0,!1),i=1);var a,o=this._length-1,s=this._length;for(a=i;a=p[p.length-1].t-this.offsetTime)n=p[p.length-1].s?p[p.length-1].s[0]:p[p.length-2].e[0],a=!0;else{for(var d,m,y,v=h,g=p.length-1,b=!0;b&&(d=p[v],!((m=p[v+1]).t-this.offsetTime>e));)v=m.t-this.offsetTime)c=1;else if(en&&t>n)||(this._caching.lastIndex=i0||e>-1e-6&&e<0?n(1e4*e)/1e4:e}function j(){var e=this.props;return"matrix("+M(e[0])+","+M(e[1])+","+M(e[4])+","+M(e[5])+","+M(e[12])+","+M(e[13])+")"}return function(){this.reset=i,this.rotate=a,this.rotateX=o,this.rotateY=s,this.rotateZ=l,this.skew=c,this.skewFromAxis=f,this.shear=u,this.scale=h,this.setTransform=p,this.translate=d,this.transform=m,this.applyToPoint=x,this.applyToX=w,this.applyToY=_,this.applyToZ=S,this.applyToPointArray=C,this.applyToTriplePoints=A,this.applyToPointStringified=O,this.toCSS=T,this.to2dCSS=j,this.clone=g,this.cloneFromProps=b,this.equals=v,this.inversePoints=P,this.inversePoint=k,this.getInverseMatrix=E,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(e){return _typeof$3="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$3(e)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";function setLocation(e){setLocationHref(e)}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(e){setSubframeEnabled(e)}function setPrefix(e){setIdPrefix(e)}function loadAnimation(e){return!0===standalone&&(e.animationData=JSON.parse(animationData)),animationManager.loadAnimation(e)}function setQuality(e){if("string"===typeof e)switch(e){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(e)&&e>1&&setDefaultCurveSegments(e);getDefaultCurveSegments()>=50?roundValues(!1):roundValues(!0)}function inBrowser(){return"undefined"!==typeof navigator}function installPlugin(e,t){"expressions"===e&&setExpressionsPlugin(t)}function getFactory(e){switch(e){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(e){for(var t=queryString.split("&"),r=0;r=1?a.push({s:e-1,e:t-1}):(a.push({s:e,e:1}),a.push({s:0,e:t-1}));var o,s,l=[],u=a.length;for(o=0;on+r||(c=s.s*i<=n?0:(s.s*i-n)/r,f=s.e*i>=n+r?1:(s.e*i-n)/r,l.push([c,f]))}return l.length||l.push([0,0]),l},TrimModifier.prototype.releasePathsData=function(e){var t,r=e.length;for(t=0;t1?1+a:this.s.v<0?0+a:this.s.v+a)>(r=this.e.v>1?1+a:this.e.v<0?0+a:this.e.v+a)){var o=t;t=r,r=o}t=1e-4*Math.round(1e4*t),r=1e-4*Math.round(1e4*r),this.sValue=t,this.eValue=r}else t=this.sValue,r=this.eValue;var s,l,u,c,f,h=this.shapes.length,p=0;if(r===t)for(i=0;i=0;i-=1)if((d=this.shapes[i]).shape._mdf){for((m=d.localShapeCollection).releaseShapes(),2===this.m&&h>1?(v=this.calculateShapeEdges(t,r,d.totalShapeLength,x,p),x+=d.totalShapeLength):v=[[g,b]],l=v.length,s=0;s=1?y.push({s:d.totalShapeLength*(g-1),e:d.totalShapeLength*(b-1)}):(y.push({s:d.totalShapeLength*g,e:d.totalShapeLength}),y.push({s:0,e:d.totalShapeLength*(b-1)}));var w=this.addShapes(d,y[0]);if(y[0].s!==y[0].e){if(y.length>1)if(d.shape.paths.shapes[d.shape.paths._length-1].c){var _=w.pop();this.addPaths(w,m),w=this.addShapes(d,y[1],_)}else this.addPaths(w,m),w=this.addShapes(d,y[1]);this.addPaths(w,m)}}d.shape.paths=m}}},TrimModifier.prototype.addPaths=function(e,t){var r,n=e.length;for(r=0;rt.e){r.c=!1;break}t.s<=d&&t.e>=d+o.addedLength?(this.addSegment(h[n].v[i-1],h[n].o[i-1],h[n].i[i],h[n].v[i],r,s,y),y=!1):(u=bez.getNewSegment(h[n].v[i-1],h[n].v[i],h[n].o[i-1],h[n].i[i],(t.s-d)/o.addedLength,(t.e-d)/o.addedLength,l[i-1]),this.addSegmentFromArray(u,r,s,y),y=!1,r.c=!1),d+=o.addedLength,s+=1}if(h[n].c&&l.length){if(o=l[i-1],d<=t.e){var v=l[i-1].addedLength;t.s<=d&&t.e>=d+v?(this.addSegment(h[n].v[i-1],h[n].o[i-1],h[n].i[0],h[n].v[0],r,s,y),y=!1):(u=bez.getNewSegment(h[n].v[i-1],h[n].v[0],h[n].o[i-1],h[n].i[0],(t.s-d)/v,(t.e-d)/v,l[i-1]),this.addSegmentFromArray(u,r,s,y),y=!1,r.c=!1)}else r.c=!1;d+=o.addedLength,s+=1}if(r._length&&(r.setXYAt(r.v[c][0],r.v[c][1],"i",c),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),d>t.e)break;n=this.p.keyframes[this.p.keyframes.length-1].t?(n=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/r,0),i=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/r,0)):(n=this.p.pv,i=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/r,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){n=[],i=[];var a=this.px,o=this.py;a._caching.lastFrame+a.offsetTime<=a.keyframes[0].t?(n[0]=a.getValueAtTime((a.keyframes[0].t+.01)/r,0),n[1]=o.getValueAtTime((o.keyframes[0].t+.01)/r,0),i[0]=a.getValueAtTime(a.keyframes[0].t/r,0),i[1]=o.getValueAtTime(o.keyframes[0].t/r,0)):a._caching.lastFrame+a.offsetTime>=a.keyframes[a.keyframes.length-1].t?(n[0]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/r,0),n[1]=o.getValueAtTime(o.keyframes[o.keyframes.length-1].t/r,0),i[0]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/r,0),i[1]=o.getValueAtTime((o.keyframes[o.keyframes.length-1].t-.01)/r,0)):(n=[a.pv,o.pv],i[0]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/r,a.offsetTime),i[1]=o.getValueAtTime((o._caching.lastFrame+o.offsetTime-.01)/r,o.offsetTime))}else n=i=e;this.v.rotate(-Math.atan2(n[1]-i[1],n[0]-i[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],t),t.prototype.addDynamicProperty=function(e){this._addDynamicProperty(e),this.elem.addDynamicProperty(e),this._isDirty=!0},t.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(e,r,n){return new t(e,r,n)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function getFontProperties(e){for(var t=e.fStyle?e.fStyle.split(" "):[],r="normal",n="normal",i=t.length,a=0;a0;)r-=1,this._elements.unshift(t[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(e){var t,r=e.length;for(t=0;t0?Math.floor(h):Math.ceil(h),m=this.pMatrix.props,y=this.rMatrix.props,v=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var g,b,x=0;if(h>0){for(;xd;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),x-=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-p,!0),x-=p)}for(n=1===this.data.m?0:this._currentCopies-1,i=1===this.data.m?1:-1,a=this._currentCopies;a;){if(b=(r=(t=this.elemsData[n].it)[t.length-1].transform.mProps.v.props).length,t[t.length-1].transform.mProps._mdf=!0,t[t.length-1].transform.op._mdf=!0,t[t.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(n/(this._currentCopies-1)),0!==x){for((0!==n&&1===i||n!==this._currentCopies-1&&-1===i)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11],v[12],v[13],v[14],v[15]),this.matrix.transform(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[15]),g=0;g0&&(c=!1),c){var f=createTag("style");f.setAttribute("f-forigin",n[r].fOrigin),f.setAttribute("f-origin",n[r].origin),f.setAttribute("f-family",n[r].fFamily),f.type="text/css",f.innerText="@font-face {font-family: "+n[r].fFamily+"; font-style: normal; src: url('"+n[r].fPath+"');}",t.appendChild(f)}}else if("g"===n[r].fOrigin||1===n[r].origin){for(l=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),u=0;ue?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var e,t=this.renderableComponents.length;for(e=0;e0&&(this.maskElement.setAttribute("id",y),this.element.maskedElement.setAttribute(g,"url("+getLocationHref()+"#"+y+")"),a.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){this.layerInterface=FootageInterface(this)},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(e){if(this.prepareRenderableFrame(e,!0),this.prepareProperties(e,!0),this.tm._placeholder)this._currentTime=e/this.data.sr;else{var t=this.tm.v;this._currentTime=t}this._volume=this.lv.v[0];var r=this._volume*this._volumeMultiplier;this._previousVolume!==r&&(this._previousVolume=r,this.audio.volume(r))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(e){this.audio.rate(e)},AudioElement.prototype.volume=function(e){this._volumeMultiplier=e,this._previousVolume=e*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(e){var t,r,n=this.layers.length;for(this.completeLayers=!0,t=n-1;t>=0;t-=1)this.elements[t]||(r=this.layers[t]).ip-r.st<=e-this.layers[t].st&&r.op-r.st>e-this.layers[t].st&&this.buildItem(t),this.completeLayers=!!this.elements[t]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(e){switch(e.ty){case 2:return this.createImage(e);case 0:return this.createComp(e);case 1:return this.createSolid(e);case 3:default:return this.createNull(e);case 4:return this.createShape(e);case 5:return this.createText(e);case 6:return this.createAudio(e);case 13:return this.createCamera(e);case 15:return this.createFootage(e)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(e){return new AudioElement(e,this.globalData,this)},BaseRenderer.prototype.createFootage=function(e){return new FootageElement(e,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var e,t=this.layers.length;for(e=0;e1&&(a+=" C"+t.o[n-1][0]+","+t.o[n-1][1]+" "+t.i[0][0]+","+t.i[0][1]+" "+t.v[0][0]+","+t.v[0][1]),r.lastPath!==a){var o="";r.elem&&(t.c&&(o=e.inv?this.solidPath+a:a),r.elem.setAttribute("d",o)),r.lastPath=a}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var e={createFilter:function(e,t){var r=createNS("filter");return r.setAttribute("id",e),!0!==t&&(r.setAttribute("filterUnits","objectBoundingBox"),r.setAttribute("x","0%"),r.setAttribute("y","0%"),r.setAttribute("width","100%"),r.setAttribute("height","100%")),r},createAlphaToLuminanceFilter:function(){var e=createNS("feColorMatrix");return e.setAttribute("type","matrix"),e.setAttribute("color-interpolation-filters","sRGB"),e.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),e}};return e}(),featureSupport=function(){var e={maskType:!0};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(e.maskType=!1),e}(),registeredEffects={},idPrefix="filter_result_";function SVGEffects(e){var t,r,n="SourceGraphic",i=e.data.ef?e.data.ef.length:0,a=createElementID(),o=filtersFactory.createFilter(a,!0),s=0;for(this.filters=[],t=0;t=0&&!this.shapeModifiers[e].processShapes(this._isFirstFrame);e-=1);}},searchProcessedElement:function(e){for(var t=this.processedElements,r=0,n=t.length;r.01)return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!==this.c.length/4)return!1;if(this.data.k.k[0].s)for(var e=0,t=this.data.k.k.length;e0;)l=n.transformers[m].mProps._mdf||l,d-=1,m-=1;if(l)for(d=v-n.styles[c].lvl,m=n.transformers.length-1;d>0;)p=n.transformers[m].mProps.v.props,h.transform(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9],p[10],p[11],p[12],p[13],p[14],p[15]),d-=1,m-=1}else h=e;if(o=(f=n.sh.paths)._length,l){for(s="",a=0;a=1?g=.99:g<=-1&&(g=-.99);var b=s*g,x=Math.cos(v+t.a.v)*b+c[0],w=Math.sin(v+t.a.v)*b+c[1];l.setAttribute("fx",x),l.setAttribute("fy",w),u&&!t.g._collapsable&&(t.of.setAttribute("fx",x),t.of.setAttribute("fy",w))}}function l(e,t,r){var n=t.style,i=t.d;i&&(i._mdf||r)&&i.dashStr&&(n.pElem.setAttribute("stroke-dasharray",i.dashStr),n.pElem.setAttribute("stroke-dashoffset",i.dashoffset[0])),t.c&&(t.c._mdf||r)&&n.pElem.setAttribute("stroke","rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||r)&&n.pElem.setAttribute("stroke-opacity",t.o.v),(t.w._mdf||r)&&(n.pElem.setAttribute("stroke-width",t.w.v),n.msElem&&n.msElem.setAttribute("stroke-width",t.w.v))}return{createRenderFunction:function(e){switch(e.ty){case"fl":return a;case"gf":return s;case"gs":return o;case"st":return l;case"sh":case"el":case"rc":case"sr":return i;case"tr":return r;case"no":return n;default:return null}}}}();function SVGShapeElement(e,t,r){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(e,t,r),this.prevViewData=[]}function LetterProps(e,t,r,n,i,a){this.o=e,this.sw=t,this.sc=r,this.fc=n,this.m=i,this.p=a,this._mdf={o:!0,sw:!!t,sc:!!r,fc:!!n,m:!0,p:!0}}function TextProperty(e,t){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=t,this.elem=e,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var e,t,r,n,i=this.shapes.length,a=this.stylesList.length,o=[],s=!1;for(r=0;r1&&s&&this.setShapesAsAnimated(o)}},SVGShapeElement.prototype.setShapesAsAnimated=function(e){var t,r=e.length;for(t=0;t=0;s-=1){if((h=this.searchProcessedElement(e[s]))?t[s]=r[h-1]:e[s]._render=o,"fl"===e[s].ty||"st"===e[s].ty||"gf"===e[s].ty||"gs"===e[s].ty||"no"===e[s].ty)h?t[s].style.closed=!1:t[s]=this.createStyleElement(e[s],i),e[s]._render&&t[s].style.pElem.parentNode!==n&&n.appendChild(t[s].style.pElem),m.push(t[s].style);else if("gr"===e[s].ty){if(h)for(u=t[s].it.length,l=0;l1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(e){this.effectsSequence.push(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(e){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||e){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var t=this.currentData,r=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var n;this.lock=!0,this._mdf=!1;var i=this.effectsSequence.length,a=e||this.data.d.k[this.keysIndex].s;for(n=0;nt);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(e){for(var t,r,n=[],i=0,a=e.length,o=!1;i=55296&&t<=56319?(r=e.charCodeAt(i+1))>=56320&&r<=57343?(o||FontManager.isModifier(t,r)?(n[n.length-1]+=e.substr(i,2),o=!1):n.push(e.substr(i,2)),i+=1):n.push(e.charAt(i)):t>56319?(r=e.charCodeAt(i+1),FontManager.isZeroWidthJoiner(t,r)?(o=!0,n[n.length-1]+=e.substr(i,2),i+=1):n.push(e.charAt(i))):FontManager.isZeroWidthJoiner(t)?(n[n.length-1]+=e.charAt(i),o=!0):n.push(e.charAt(i)),i+=1;return n},TextProperty.prototype.completeTextData=function(e){e.__complete=!0;var t,r,n,i,a,o,s,l=this.elem.globalData.fontManager,u=this.data,c=[],f=0,h=u.m.g,p=0,d=0,m=0,y=[],v=0,g=0,b=l.getFontByName(e.f),x=0,w=getFontProperties(b);e.fWeight=w.weight,e.fStyle=w.style,e.finalSize=e.s,e.finalText=this.buildFinalText(e.t),r=e.finalText.length,e.finalLineHeight=e.lh;var _,S=e.tr/1e3*e.finalSize;if(e.sz)for(var E,k,P=!0,A=e.sz[0],C=e.sz[1];P;){E=0,v=0,r=(k=this.buildFinalText(e.t)).length,S=e.tr/1e3*e.finalSize;var O=-1;for(t=0;tA&&" "!==k[t]?(-1===O?r+=1:t=O,E+=e.finalLineHeight||1.2*e.finalSize,k.splice(t,O===t?1:0,"\r"),O=-1,v=0):(v+=x,v+=S);E+=b.ascent*e.finalSize/100,this.canResize&&e.finalSize>this.minimumFontSize&&Cg?v:g,v=-2*S,i="",n=!0,m+=1):i=T,l.chars?(s=l.getCharData(T,b.fStyle,l.getFontByName(e.f).fFamily),x=n?0:s.w*e.finalSize/100):x=l.measureText(i,e.f,e.finalSize)," "===T?M+=x+S:(v+=x+S+M,M=0),c.push({l:x,an:x,add:p,n:n,anIndexes:[],val:i,line:m,animatorJustifyOffset:0}),2==h){if(p+=x,""===i||" "===i||t===r-1){for(""!==i&&" "!==i||(p-=x);d<=t;)c[d].an=p,c[d].ind=f,c[d].extra=x,d+=1;f+=1,p=0}}else if(3==h){if(p+=x,""===i||t===r-1){for(""===i&&(p-=x);d<=t;)c[d].an=p,c[d].ind=f,c[d].extra=x,d+=1;p=0,f+=1}}else c[f].ind=f,c[f].extra=0,f+=1;if(e.l=c,g=v>g?v:g,y.push(v),e.sz)e.boxWidth=e.sz[0],e.justifyOffset=0;else switch(e.boxWidth=g,e.j){case 1:e.justifyOffset=-e.boxWidth;break;case 2:e.justifyOffset=-e.boxWidth/2;break;default:e.justifyOffset=0}e.lineWidths=y;var j,D,I,N,F=u.a;o=F.length;var R=[];for(a=0;a0?i=this.ne.v/100:a=-this.ne.v/100,this.xe.v>0?o=1-this.xe.v/100:s=1+this.xe.v/100;var l=BezierFactory.getBezierEasing(i,a,o,s).get,u=0,c=this.finalS,f=this.finalE,h=this.data.sh;if(2===h)u=l(u=f===c?n>=f?1:0:e(0,t(.5/(f-c)+(n-c)/(f-c),1)));else if(3===h)u=l(u=f===c?n>=f?0:1:1-e(0,t(.5/(f-c)+(n-c)/(f-c),1)));else if(4===h)f===c?u=0:(u=e(0,t(.5/(f-c)+(n-c)/(f-c),1)))<.5?u*=2:u=1-2*(u-.5),u=l(u);else if(5===h){if(f===c)u=0;else{var p=f-c,d=-p/2+(n=t(e(0,n+.5-c),f-c)),m=p/2;u=Math.sqrt(1-d*d/(m*m))}u=l(u)}else 6===h?(f===c?u=0:(n=t(e(0,n+.5-c),f-c),u=(1+Math.cos(Math.PI+2*Math.PI*n/(f-c)))/2),u=l(u)):(n>=r(c)&&(u=e(0,t(n-c<0?t(f,1)-(c-n):f-n,1))),u=l(u));if(100!==this.sm.v){var y=.01*this.sm.v;0===y&&(y=1e-8);var v=.5-.5*y;u1&&(u=1)}return u*this.a.v},getValue:function(e){this.iterateDynamicProperties(),this._mdf=e||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,e&&2===this.data.r&&(this.e.v=this._currentTextLength);var t=2===this.data.r?1:100/this.data.totalChars,r=this.o.v/t,n=this.s.v/t+r,i=this.e.v/t+r;if(n>i){var a=n;n=i,i=a}this.finalS=n,this.finalE=i}},extendPrototype([DynamicPropertyContainer],n),{getTextSelectorProp:function(e,t,r){return new n(e,t,r)}}}();function TextAnimatorDataProperty(e,t,r){var n={propType:!1},i=PropertyFactory.getProp,a=t.a;this.a={r:a.r?i(e,a.r,0,degToRads,r):n,rx:a.rx?i(e,a.rx,0,degToRads,r):n,ry:a.ry?i(e,a.ry,0,degToRads,r):n,sk:a.sk?i(e,a.sk,0,degToRads,r):n,sa:a.sa?i(e,a.sa,0,degToRads,r):n,s:a.s?i(e,a.s,1,.01,r):n,a:a.a?i(e,a.a,1,0,r):n,o:a.o?i(e,a.o,0,.01,r):n,p:a.p?i(e,a.p,1,0,r):n,sw:a.sw?i(e,a.sw,0,0,r):n,sc:a.sc?i(e,a.sc,1,0,r):n,fc:a.fc?i(e,a.fc,1,0,r):n,fh:a.fh?i(e,a.fh,0,0,r):n,fs:a.fs?i(e,a.fs,0,.01,r):n,fb:a.fb?i(e,a.fb,0,.01,r):n,t:a.t?i(e,a.t,0,0,r):n},this.s=TextSelectorProp.getTextSelectorProp(e,t.s,r),this.s.t=t.s.t}function TextAnimatorProperty(e,t,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=e,this._renderType=t,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var e,t,r=this._textData.a.length,n=PropertyFactory.getProp;for(e=0;e=s+se||!d?(g=(s+se-u)/l.partialLength,L=p.point[0]+(l.point[0]-p.point[0])*g,B=p.point[1]+(l.point[1]-p.point[1])*g,E.translate(-w[0]*A[i].an*.005,-w[1]*N*.01),c=!1):d&&(u+=l.partialLength,(f+=1)>=d.length&&(f=0,m[h+=1]?d=m[h].points:x.v.c?(f=0,d=m[h=0].points):(u-=l.partialLength,d=null)),d&&(p=l,y=(l=d[f]).partialLength));R=A[i].an/2-A[i].add,E.translate(-R,0,0)}else R=A[i].an/2-A[i].add,E.translate(-R,0,0),E.translate(-w[0]*A[i].an*.005,-w[1]*N*.01,0);for(M=0;Me?this.textSpans[e].span:createNS(l?"g":"text"),y<=e){if(o.setAttribute("stroke-linecap","butt"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-miterlimit","4"),this.textSpans[e].span=o,l){var v=createNS("g");o.appendChild(v),this.textSpans[e].childSpan=v}this.textSpans[e].span=o,this.layerElement.appendChild(o)}o.style.display="inherit"}if(u.reset(),c&&(s[e].n&&(f=-d,h+=r.yOffset,h+=p?1:0,p=!1),this.applyTextPropertiesToMatrix(r,u,s[e].line,f,h),f+=s[e].l||0,f+=d),l){var g;if(1===(m=this.globalData.fontManager.getCharData(r.finalText[e],n.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily)).t)g=new SVGCompElement(m.data,this.globalData,this);else{var b=emptyShapeData;m.data&&m.data.shapes&&(b=this.buildShapeData(m.data,r.finalSize)),g=new SVGShapeElement(b,this.globalData,this)}if(this.textSpans[e].glyph){var x=this.textSpans[e].glyph;this.textSpans[e].childSpan.removeChild(x.layerElement),x.destroy()}this.textSpans[e].glyph=g,g._debug=!0,g.prepareFrame(0),g.renderFrame(),this.textSpans[e].childSpan.appendChild(g.layerElement),1===m.t&&this.textSpans[e].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else c&&o.setAttribute("transform","translate("+u.props[12]+","+u.props[13]+")"),o.textContent=s[e].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}c&&o&&o.setAttribute("d","")}else{var w=this.textContainer,_="start";switch(r.j){case 1:_="end";break;case 2:_="middle";break;default:_="start"}w.setAttribute("text-anchor",_),w.setAttribute("letter-spacing",d);var S=this.buildTextContents(r.finalText);for(t=S.length,h=r.ps?r.ps[1]+r.ascent:0,e=0;e=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].prepareFrame(e-this.layers[t].st);if(this.globalData._mdf)for(t=0;t=0;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var e,t=this.layers.length;for(e=0;e=0;n-=1)r=e.transforms[n].transform.mProps.v.props,e.finalTransform.transform(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15]);e._mdf=a},processSequences:function(e){var t,r=this.sequenceList.length;for(t=0;t=0;a-=1){if((l=this.searchProcessedElement(e[a]))?t[a]=r[l-1]:e[a]._shouldRender=n,"fl"===e[a].ty||"st"===e[a].ty||"gf"===e[a].ty||"gs"===e[a].ty)l?t[a].style.closed=!1:t[a]=this.createStyleElement(e[a],d),h.push(t[a].style);else if("gr"===e[a].ty){if(l)for(s=t[a].it.length,o=0;o=0;i-=1)"tr"===t[i].ty?(a=r[i].transform,this.renderShapeTransform(e,a)):"sh"===t[i].ty||"el"===t[i].ty||"rc"===t[i].ty||"sr"===t[i].ty?this.renderPath(t[i],r[i]):"fl"===t[i].ty?this.renderFill(t[i],r[i],a):"st"===t[i].ty?this.renderStroke(t[i],r[i],a):"gf"===t[i].ty||"gs"===t[i].ty?this.renderGradientFill(t[i],r[i],a):"gr"===t[i].ty?this.renderShape(a,t[i].it,r[i].it):t[i].ty;n&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(e,t){if(this._isFirstFrame||t._mdf||e.transforms._mdf){var r,n,i,a=e.trNodes,o=t.paths,s=o._length;a.length=0;var l=e.transforms.finalTransform;for(i=0;i=1?f=.99:f<=-1&&(f=-.99);var h=u*f,p=Math.cos(c+t.a.v)*h+s[0],d=Math.sin(c+t.a.v)*h+s[1];n=o.createRadialGradient(p,d,0,s[0],s[1],u)}var m=e.g.p,y=t.g.c,v=1;for(a=0;as&&"xMidYMid slice"===l||or&&"meet"===a||nr&&"slice"===a)?(e-this.transformCanvas.w*(t/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===s&&(nr&&"slice"===a)?(e-this.transformCanvas.w*(t/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===l&&(n>r&&"meet"===a||nr&&"meet"===a||n=0;e-=1)this.elements[e]&&this.elements[e].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(e,t){if((this.renderedFrame!==e||!0!==this.renderConfig.clearCanvas||t)&&!this.destroyed&&-1!==e){var r;this.renderedFrame=e,this.globalData.frameNum=e-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||t,this.globalData.projectInterface.currentFrame=e;var n=this.layers.length;for(this.completeLayers||this.checkLayers(e),r=0;r=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!t[e]&&99!==this.layers[e].ty){var r=this.createItem(this.layers[e],this,this.globalData);t[e]=r,r.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var e,t=this.canvasContext;for(t.beginPath(),t.moveTo(0,0),t.lineTo(this.data.w,0),t.lineTo(this.data.w,this.data.h),t.lineTo(0,this.data.h),t.lineTo(0,0),t.clip(),e=this.layers.length-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},CVCompElement.prototype.destroy=function(){var e;for(e=this.layers.length-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var e=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var t=this.finalTransform.mat.toCSS();e.transform=t,e.webkitTransform=t}this.finalTransform._opMdf&&(e.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var e;this.data.hasMask?((e=createNS("rect")).setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((e=createTag("div")).style.width=this.data.sw+"px",e.style.height=this.data.sh+"px",e.style.backgroundColor=this.data.sc),this.layerElement.appendChild(e)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var e;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),e=this.svgElement;else{e=createNS("svg");var t=this.comp.data?this.comp.data:this.globalData.compSize;e.setAttribute("width",t.w),e.setAttribute("height",t.h),e.appendChild(this.shapesContainer),this.layerElement.appendChild(e)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=e},HShapeElement.prototype.getTransformedPoint=function(e,t){var r,n=e.length;for(r=0;r0&&s<1&&f[h].push(this.calculateF(s,e,t,r,n,h)):(l=a*a-4*o*i)>=0&&((u=(-a+bmSqrt(l))/(2*i))>0&&u<1&&f[h].push(this.calculateF(u,e,t,r,n,h)),(c=(-a-bmSqrt(l))/(2*i))>0&&c<1&&f[h].push(this.calculateF(c,e,t,r,n,h))));this.shapeBoundingBox.left=bmMin.apply(null,f[0]),this.shapeBoundingBox.top=bmMin.apply(null,f[1]),this.shapeBoundingBox.right=bmMax.apply(null,f[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,f[1])},HShapeElement.prototype.calculateF=function(e,t,r,n,i,a){return bmPow(1-e,3)*t[a]+3*bmPow(1-e,2)*e*r[a]+3*(1-e)*bmPow(e,2)*n[a]+bmPow(e,3)*i[a]},HShapeElement.prototype.calculateBoundingBox=function(e,t){var r,n=e.length;for(r=0;rr&&(r=i)}r*=e.mult}else r=e.v*e.mult;t.x-=r,t.xMax+=r,t.y-=r,t.yMax+=r},HShapeElement.prototype.currentBoxContains=function(e){return this.currentBBox.x<=e.x&&this.currentBBox.y<=e.y&&this.currentBBox.width+this.currentBBox.x>=e.x+e.width&&this.currentBBox.height+this.currentBBox.y>=e.y+e.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var e=this.tempBoundingBox,t=999999;if(e.x=t,e.xMax=-t,e.y=t,e.yMax=-t,this.calculateBoundingBox(this.itemsData,e),e.width=e.xMax=0;e-=1){var n=this.hierarchy[e].finalTransform.mProp;this.mat.translate(-n.p.v[0],-n.p.v[1],n.p.v[2]),this.mat.rotateX(-n.or.v[0]).rotateY(-n.or.v[1]).rotateZ(n.or.v[2]),this.mat.rotateX(-n.rx.v).rotateY(-n.ry.v).rotateZ(n.rz.v),this.mat.scale(1/n.s.v[0],1/n.s.v[1],1/n.s.v[2]),this.mat.translate(n.a.v[0],n.a.v[1],n.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var i;i=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var a=Math.sqrt(Math.pow(i[0],2)+Math.pow(i[1],2)+Math.pow(i[2],2)),o=[i[0]/a,i[1]/a,i[2]/a],s=Math.sqrt(o[2]*o[2]+o[0]*o[0]),l=Math.atan2(o[1],s),u=Math.atan2(o[0],-o[2]);this.mat.rotateY(u).rotateX(-l)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var c=!this._prevMat.equals(this.mat);if((c||this.pe._mdf)&&this.comp.threeDElements){var f,h,p;for(t=this.comp.threeDElements.length,e=0;e=e)return this.threeDElements[t].perspectiveElem;t+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(e,t){var r,n,i=createTag("div");styleDiv(i);var a=createTag("div");if(styleDiv(a),"3d"===t){(r=i.style).width=this.globalData.compSize.w+"px",r.height=this.globalData.compSize.h+"px";var o="50% 50%";r.webkitTransformOrigin=o,r.mozTransformOrigin=o,r.transformOrigin=o;var s="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(n=a.style).transform=s,n.webkitTransform=s}i.appendChild(a);var l={container:a,perspectiveElem:i,startPos:e,endPos:e,type:t};return this.threeDElements.push(l),l},HybridRendererBase.prototype.build3dContainers=function(){var e,t,r=this.layers.length,n="";for(e=0;e=0;e-=1)this.resizerElem.appendChild(this.threeDElements[e].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(e,t){for(var r=0,n=this.threeDElements.length;ro?(e=i/this.globalData.compSize.w,t=i/this.globalData.compSize.w,r=0,n=(a-this.globalData.compSize.h*(i/this.globalData.compSize.w))/2):(e=a/this.globalData.compSize.h,t=a/this.globalData.compSize.h,r=(i-this.globalData.compSize.w*(a/this.globalData.compSize.h))/2,n=0);var s=this.resizerElem.style;s.webkitTransform="matrix3d("+e+",0,0,0,0,"+t+",0,0,0,0,1,0,"+r+","+n+",0,1)",s.transform=s.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var e,t=this.globalData.compSize.w,r=this.globalData.compSize.h,n=this.threeDElements.length;for(e=0;e=o;)e/=2,t/=2,r>>>=1;return(e+r)/t};return g.int32=function(){return 0|v.g(4)},g.quick=function(){return v.g(4)/4294967296},g.double=g,f(h(v.S),e),(p.pass||d||function(e,r,n,i){return i&&(i.S&&u(i,v),e.state=function(){return u(v,{})}),n?(t.random=e,r):e})(g,y,"global"in p?p.global:this==t,p.state)},f(t.random(),e)}function initialize$2(e){seedRandom([],e)}var propTypes={SHAPE:"shape"};function _typeof(e){return _typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null;function $bm_isInstanceOfArray(e){return e.constructor===Array||e.constructor===Float32Array}function isNumerable(e,t){return"number"===e||"boolean"===e||"string"===e||t instanceof Number}function $bm_neg(e){var t=_typeof(e);if("number"===t||"boolean"===t||e instanceof Number)return-e;if($bm_isInstanceOfArray(e)){var r,n=e.length,i=[];for(r=0;rr){var n=r;r=t,t=n}return Math.min(Math.max(e,t),r)}function radiansToDegrees(e){return e/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(e){return e*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(e,t){if("number"===typeof e||e instanceof Number)return t=t||0,Math.abs(e-t);var r;t||(t=helperLengthArray);var n=Math.min(e.length,t.length),i=0;for(r=0;r.5?u/(2-o-s):u/(o+s),o){case n:t=(i-a)/u+(i1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function hslToRgb(e){var t,r,n,i=e[0],a=e[1],o=e[2];if(0===a)t=o,n=o,r=o;else{var s=o<.5?o*(1+a):o+a-o*a,l=2*o-s;t=hue2rgb(l,s,i+1/3),r=hue2rgb(l,s,i),n=hue2rgb(l,s,i-1/3)}return[t,r,n,e[3]]}function linear(e,t,r,n,i){if(void 0!==n&&void 0!==i||(n=t,i=r,t=0,r=1),r=r)return i;var o,s=r===t?0:(e-t)/(r-t);if(!n.length)return n+(i-n)*s;var l=n.length,u=createTypedArray("float32",l);for(o=0;o1){for(n=0;n1?t=1:t<0&&(t=0);var o=e(t);if($bm_isInstanceOfArray(i)){var s,l=i.length,u=createTypedArray("float32",l);for(s=0;sdata.k[t].t&&edata.k[t+1].t-e?(r=t+2,n=data.k[t+1].t):(r=t+1,n=data.k[t].t);break}}-1===r&&(r=t+1,n=data.k[t].t)}else r=0,n=0;var a={};return a.index=r,a.time=n/elem.comp.globalData.frameRate,a}function key(e){var t,r,n;if(!data.k.length||"number"===typeof data.k[0])throw new Error("The property has no keyframe at index "+e);e-=1,t={time:data.k[e].t/elem.comp.globalData.frameRate,value:[]};var i=Object.prototype.hasOwnProperty.call(data.k[e],"s")?data.k[e].s:data.k[e-1].e;for(n=i.length,r=0;ru.length-1)&&(t=u.length-1),n=c-(i=u[u.length-1-t].t)),"pingpong"===e){if(Math.floor((l-i)/n)%2!==0)return this.getValueAtTime((n-(l-i)%n+i)/this.comp.globalData.frameRate,0)}else{if("offset"===e){var f=this.getValueAtTime(i/this.comp.globalData.frameRate,0),h=this.getValueAtTime(c/this.comp.globalData.frameRate,0),p=this.getValueAtTime(((l-i)%n+i)/this.comp.globalData.frameRate,0),d=Math.floor((l-i)/n);if(this.pv.length){for(o=(s=new Array(f.length)).length,a=0;a=c)return this.pv;if(r?i=c+(n=t?Math.abs(this.elem.comp.globalData.frameRate*t):Math.max(0,this.elem.data.op-c)):((!t||t>u.length-1)&&(t=u.length-1),n=(i=u[t].t)-c),"pingpong"===e){if(Math.floor((c-l)/n)%2===0)return this.getValueAtTime(((c-l)%n+c)/this.comp.globalData.frameRate,0)}else{if("offset"===e){var f=this.getValueAtTime(c/this.comp.globalData.frameRate,0),h=this.getValueAtTime(i/this.comp.globalData.frameRate,0),p=this.getValueAtTime((n-(c-l)%n+c)/this.comp.globalData.frameRate,0),d=Math.floor((c-l)/n)+1;if(this.pv.length){for(o=(s=new Array(f.length)).length,a=0;a1?(i+e-a)/(t-1):1,s=0,l=0;for(r=this.pv.length?createTypedArray("float32",this.pv.length):0;so){var c=s,f=r.c&&s===l-1?0:s+1,h=(o-u)/a[s].addedLength;n=bez.getPointInSegment(r.v[c],r.v[f],r.o[c],r.i[f],h,a[s]);break}u+=a[s].addedLength,s+=1}return n||(n=r.c?[r.v[0][0],r.v[0][1]]:[r.v[r._length-1][0],r.v[r._length-1][1]]),n},vectorOnPath:function(e,t,r){1==e?e=this.v.c:0==e&&(e=.999);var n=this.pointOnPath(e,t),i=this.pointOnPath(e+.001,t),a=i[0]-n[0],o=i[1]-n[1],s=Math.sqrt(Math.pow(a,2)+Math.pow(o,2));return 0===s?[0,0]:"tangent"===r?[a/s,o/s]:[-o/s,a/s]},tangentOnPath:function(e,t){return this.vectorOnPath(e,t,"tangent")},normalOnPath:function(e,t){return this.vectorOnPath(e,t,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([u],s),extendPrototype([u],l),l.prototype.getValueAtTime=function(e){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),e*=this.elem.globalData.frameRate,(e-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime=u?p<0?n:i:n+h*Math.pow((a-e)/p,1/r),c[f]=o,f+=1,s+=256/255;return c.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t,r=this.filterManager.effectElements;this.feFuncRComposed&&(e||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(t=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",t),this.feFuncGComposed.setAttribute("tableValues",t),this.feFuncBComposed.setAttribute("tableValues",t)),this.feFuncR&&(e||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(t=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",t)),this.feFuncG&&(e||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(t=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",t)),this.feFuncB&&(e||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(t=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",t)),this.feFuncA&&(e||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(t=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",t))}},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){if((e||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),e||this.filterManager.effectElements[0].p._mdf){var t=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*t[0]),Math.round(255*t[1]),Math.round(255*t[2])))}if((e||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),e||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,n=(this.filterManager.effectElements[2].p.v-90)*degToRads,i=r*Math.cos(n),a=r*Math.sin(n);this.feOffset.setAttribute("dx",i),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(e,t,r){this.initialized=!1,this.filterManager=t,this.filterElem=e,this.elem=r,r.matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}function SVGGaussianBlurEffect(e,t,r,n){e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width","300%"),e.setAttribute("height","300%"),this.filterManager=t;var i=createNS("feGaussianBlur");i.setAttribute("result",n),e.appendChild(i),this.feGaussianBlur=i}return SVGMatte3Effect.prototype.findSymbol=function(e){for(var t=0,r=_svgMatteSymbols.length;t{var n=r(6616);n.prototype.formulaEval=function(){"use strict";for(var e,t,r,n=[],i=this.value,a=0;a"+t.value+""+i[a].show+""+e.value+"",type:10}):n.push({value:(1!=t.type?"(":"")+t.value+(1!=t.type?")":"")+""+e.value+"",type:1})):2===i[a].type||9===i[a].type?(e=n.pop(),t=n.pop(),n.push({value:(1!=t.type?"(":"")+t.value+(1!=t.type?")":"")+i[a].show+(1!=e.type?"(":"")+e.value+(1!=e.type?")":""),type:i[a].type})):12===i[a].type&&(e=n.pop(),t=n.pop(),r=n.pop(),n.push({value:i[a].show+"("+r.value+","+t.value+","+e.value+")",type:12}));return n[0].value},e.exports=n},15:(e,t,r)=>{"use strict";var n=r(9585);function i(e,t){for(var r=0;rd.length-2?d.length-1:e.length-l;r>0;r--)if(void 0!==d[r])for(i=0;i0&&r{"use strict";var t=function(e){this.value=e};t.math={isDegree:!0,acos:function(e){return t.math.isDegree?180/Math.PI*Math.acos(e):Math.acos(e)},add:function(e,t){return e+t},asin:function(e){return t.math.isDegree?180/Math.PI*Math.asin(e):Math.asin(e)},atan:function(e){return t.math.isDegree?180/Math.PI*Math.atan(e):Math.atan(e)},acosh:function(e){return Math.log(e+Math.sqrt(e*e-1))},asinh:function(e){return Math.log(e+Math.sqrt(e*e+1))},atanh:function(e){return Math.log((1+e)/(1-e))},C:function(e,r){var n=1,i=e-r,a=r;a{var n=r(15);n.prototype.toPostfix=function(){"use strict";for(var e,t,r,i,a,o=[],s=[{value:"(",type:4,pre:0}],l=this.value,u=1;ur)s.push(e);else{for(;r>=i&&!c||c&&i{var n=r(6928);n.prototype.postfixEval=function(e){"use strict";(e=e||{}).PI=Math.PI,e.E=Math.E;for(var t,r,i,a=[],o=this.value,s="undefined"!==typeof e.n,l=0;l1)throw new n.Exception("Uncaught Syntax error");return a[0].value>1e15?"Infinity":parseFloat(a[0].value.toFixed(15))},n.eval=function(e,t,r){return"undefined"===typeof t?this.lex(e).toPostfix().postfixEval():"undefined"===typeof r?"undefined"!==typeof t.length?this.lex(e,t).toPostfix().postfixEval():this.lex(e).toPostfix().postfixEval(t):this.lex(e,t).toPostfix().postfixEval(r)},e.exports=n},888:(e,t,r)=>{"use strict";var n=r(9047);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return r.PropTypes=r,r}},2007:(e,t,r)=>{e.exports=r(888)()},9047:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4463:(e,t,r)=>{"use strict";var n=r(2791),i=r(5296);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r