1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014 |
- import {
- n2 as n
- } from "./chunk-2Z2TG5CU.js";
- import {
- t
- } from "./chunk-U2XHEJM7.js";
- import {
- s2 as s
- } from "./chunk-E5O6P5I2.js";
- // node_modules/@esri/arcgis-html-sanitizer/dist/esm/index.js
- var isPlainObject = function(value) {
- if (typeof value !== "object" || value === null) {
- return false;
- }
- if (Object.prototype.toString.call(value) !== "[object Object]") {
- return false;
- }
- var proto = Object.getPrototypeOf(value);
- if (proto === null) {
- return true;
- }
- while (Object.getPrototypeOf(proto) !== null) {
- proto = Object.getPrototypeOf(proto);
- }
- return Object.getPrototypeOf(value) === proto;
- };
- var lib$1 = { exports: {} };
- var _default$1 = {};
- var lib = { exports: {} };
- var _default = {};
- function getDefaultWhiteList$1() {
- var whiteList = {};
- whiteList["align-content"] = false;
- whiteList["align-items"] = false;
- whiteList["align-self"] = false;
- whiteList["alignment-adjust"] = false;
- whiteList["alignment-baseline"] = false;
- whiteList["all"] = false;
- whiteList["anchor-point"] = false;
- whiteList["animation"] = false;
- whiteList["animation-delay"] = false;
- whiteList["animation-direction"] = false;
- whiteList["animation-duration"] = false;
- whiteList["animation-fill-mode"] = false;
- whiteList["animation-iteration-count"] = false;
- whiteList["animation-name"] = false;
- whiteList["animation-play-state"] = false;
- whiteList["animation-timing-function"] = false;
- whiteList["azimuth"] = false;
- whiteList["backface-visibility"] = false;
- whiteList["background"] = true;
- whiteList["background-attachment"] = true;
- whiteList["background-clip"] = true;
- whiteList["background-color"] = true;
- whiteList["background-image"] = true;
- whiteList["background-origin"] = true;
- whiteList["background-position"] = true;
- whiteList["background-repeat"] = true;
- whiteList["background-size"] = true;
- whiteList["baseline-shift"] = false;
- whiteList["binding"] = false;
- whiteList["bleed"] = false;
- whiteList["bookmark-label"] = false;
- whiteList["bookmark-level"] = false;
- whiteList["bookmark-state"] = false;
- whiteList["border"] = true;
- whiteList["border-bottom"] = true;
- whiteList["border-bottom-color"] = true;
- whiteList["border-bottom-left-radius"] = true;
- whiteList["border-bottom-right-radius"] = true;
- whiteList["border-bottom-style"] = true;
- whiteList["border-bottom-width"] = true;
- whiteList["border-collapse"] = true;
- whiteList["border-color"] = true;
- whiteList["border-image"] = true;
- whiteList["border-image-outset"] = true;
- whiteList["border-image-repeat"] = true;
- whiteList["border-image-slice"] = true;
- whiteList["border-image-source"] = true;
- whiteList["border-image-width"] = true;
- whiteList["border-left"] = true;
- whiteList["border-left-color"] = true;
- whiteList["border-left-style"] = true;
- whiteList["border-left-width"] = true;
- whiteList["border-radius"] = true;
- whiteList["border-right"] = true;
- whiteList["border-right-color"] = true;
- whiteList["border-right-style"] = true;
- whiteList["border-right-width"] = true;
- whiteList["border-spacing"] = true;
- whiteList["border-style"] = true;
- whiteList["border-top"] = true;
- whiteList["border-top-color"] = true;
- whiteList["border-top-left-radius"] = true;
- whiteList["border-top-right-radius"] = true;
- whiteList["border-top-style"] = true;
- whiteList["border-top-width"] = true;
- whiteList["border-width"] = true;
- whiteList["bottom"] = false;
- whiteList["box-decoration-break"] = true;
- whiteList["box-shadow"] = true;
- whiteList["box-sizing"] = true;
- whiteList["box-snap"] = true;
- whiteList["box-suppress"] = true;
- whiteList["break-after"] = true;
- whiteList["break-before"] = true;
- whiteList["break-inside"] = true;
- whiteList["caption-side"] = false;
- whiteList["chains"] = false;
- whiteList["clear"] = true;
- whiteList["clip"] = false;
- whiteList["clip-path"] = false;
- whiteList["clip-rule"] = false;
- whiteList["color"] = true;
- whiteList["color-interpolation-filters"] = true;
- whiteList["column-count"] = false;
- whiteList["column-fill"] = false;
- whiteList["column-gap"] = false;
- whiteList["column-rule"] = false;
- whiteList["column-rule-color"] = false;
- whiteList["column-rule-style"] = false;
- whiteList["column-rule-width"] = false;
- whiteList["column-span"] = false;
- whiteList["column-width"] = false;
- whiteList["columns"] = false;
- whiteList["contain"] = false;
- whiteList["content"] = false;
- whiteList["counter-increment"] = false;
- whiteList["counter-reset"] = false;
- whiteList["counter-set"] = false;
- whiteList["crop"] = false;
- whiteList["cue"] = false;
- whiteList["cue-after"] = false;
- whiteList["cue-before"] = false;
- whiteList["cursor"] = false;
- whiteList["direction"] = false;
- whiteList["display"] = true;
- whiteList["display-inside"] = true;
- whiteList["display-list"] = true;
- whiteList["display-outside"] = true;
- whiteList["dominant-baseline"] = false;
- whiteList["elevation"] = false;
- whiteList["empty-cells"] = false;
- whiteList["filter"] = false;
- whiteList["flex"] = false;
- whiteList["flex-basis"] = false;
- whiteList["flex-direction"] = false;
- whiteList["flex-flow"] = false;
- whiteList["flex-grow"] = false;
- whiteList["flex-shrink"] = false;
- whiteList["flex-wrap"] = false;
- whiteList["float"] = false;
- whiteList["float-offset"] = false;
- whiteList["flood-color"] = false;
- whiteList["flood-opacity"] = false;
- whiteList["flow-from"] = false;
- whiteList["flow-into"] = false;
- whiteList["font"] = true;
- whiteList["font-family"] = true;
- whiteList["font-feature-settings"] = true;
- whiteList["font-kerning"] = true;
- whiteList["font-language-override"] = true;
- whiteList["font-size"] = true;
- whiteList["font-size-adjust"] = true;
- whiteList["font-stretch"] = true;
- whiteList["font-style"] = true;
- whiteList["font-synthesis"] = true;
- whiteList["font-variant"] = true;
- whiteList["font-variant-alternates"] = true;
- whiteList["font-variant-caps"] = true;
- whiteList["font-variant-east-asian"] = true;
- whiteList["font-variant-ligatures"] = true;
- whiteList["font-variant-numeric"] = true;
- whiteList["font-variant-position"] = true;
- whiteList["font-weight"] = true;
- whiteList["grid"] = false;
- whiteList["grid-area"] = false;
- whiteList["grid-auto-columns"] = false;
- whiteList["grid-auto-flow"] = false;
- whiteList["grid-auto-rows"] = false;
- whiteList["grid-column"] = false;
- whiteList["grid-column-end"] = false;
- whiteList["grid-column-start"] = false;
- whiteList["grid-row"] = false;
- whiteList["grid-row-end"] = false;
- whiteList["grid-row-start"] = false;
- whiteList["grid-template"] = false;
- whiteList["grid-template-areas"] = false;
- whiteList["grid-template-columns"] = false;
- whiteList["grid-template-rows"] = false;
- whiteList["hanging-punctuation"] = false;
- whiteList["height"] = true;
- whiteList["hyphens"] = false;
- whiteList["icon"] = false;
- whiteList["image-orientation"] = false;
- whiteList["image-resolution"] = false;
- whiteList["ime-mode"] = false;
- whiteList["initial-letters"] = false;
- whiteList["inline-box-align"] = false;
- whiteList["justify-content"] = false;
- whiteList["justify-items"] = false;
- whiteList["justify-self"] = false;
- whiteList["left"] = false;
- whiteList["letter-spacing"] = true;
- whiteList["lighting-color"] = true;
- whiteList["line-box-contain"] = false;
- whiteList["line-break"] = false;
- whiteList["line-grid"] = false;
- whiteList["line-height"] = false;
- whiteList["line-snap"] = false;
- whiteList["line-stacking"] = false;
- whiteList["line-stacking-ruby"] = false;
- whiteList["line-stacking-shift"] = false;
- whiteList["line-stacking-strategy"] = false;
- whiteList["list-style"] = true;
- whiteList["list-style-image"] = true;
- whiteList["list-style-position"] = true;
- whiteList["list-style-type"] = true;
- whiteList["margin"] = true;
- whiteList["margin-bottom"] = true;
- whiteList["margin-left"] = true;
- whiteList["margin-right"] = true;
- whiteList["margin-top"] = true;
- whiteList["marker-offset"] = false;
- whiteList["marker-side"] = false;
- whiteList["marks"] = false;
- whiteList["mask"] = false;
- whiteList["mask-box"] = false;
- whiteList["mask-box-outset"] = false;
- whiteList["mask-box-repeat"] = false;
- whiteList["mask-box-slice"] = false;
- whiteList["mask-box-source"] = false;
- whiteList["mask-box-width"] = false;
- whiteList["mask-clip"] = false;
- whiteList["mask-image"] = false;
- whiteList["mask-origin"] = false;
- whiteList["mask-position"] = false;
- whiteList["mask-repeat"] = false;
- whiteList["mask-size"] = false;
- whiteList["mask-source-type"] = false;
- whiteList["mask-type"] = false;
- whiteList["max-height"] = true;
- whiteList["max-lines"] = false;
- whiteList["max-width"] = true;
- whiteList["min-height"] = true;
- whiteList["min-width"] = true;
- whiteList["move-to"] = false;
- whiteList["nav-down"] = false;
- whiteList["nav-index"] = false;
- whiteList["nav-left"] = false;
- whiteList["nav-right"] = false;
- whiteList["nav-up"] = false;
- whiteList["object-fit"] = false;
- whiteList["object-position"] = false;
- whiteList["opacity"] = false;
- whiteList["order"] = false;
- whiteList["orphans"] = false;
- whiteList["outline"] = false;
- whiteList["outline-color"] = false;
- whiteList["outline-offset"] = false;
- whiteList["outline-style"] = false;
- whiteList["outline-width"] = false;
- whiteList["overflow"] = false;
- whiteList["overflow-wrap"] = false;
- whiteList["overflow-x"] = false;
- whiteList["overflow-y"] = false;
- whiteList["padding"] = true;
- whiteList["padding-bottom"] = true;
- whiteList["padding-left"] = true;
- whiteList["padding-right"] = true;
- whiteList["padding-top"] = true;
- whiteList["page"] = false;
- whiteList["page-break-after"] = false;
- whiteList["page-break-before"] = false;
- whiteList["page-break-inside"] = false;
- whiteList["page-policy"] = false;
- whiteList["pause"] = false;
- whiteList["pause-after"] = false;
- whiteList["pause-before"] = false;
- whiteList["perspective"] = false;
- whiteList["perspective-origin"] = false;
- whiteList["pitch"] = false;
- whiteList["pitch-range"] = false;
- whiteList["play-during"] = false;
- whiteList["position"] = false;
- whiteList["presentation-level"] = false;
- whiteList["quotes"] = false;
- whiteList["region-fragment"] = false;
- whiteList["resize"] = false;
- whiteList["rest"] = false;
- whiteList["rest-after"] = false;
- whiteList["rest-before"] = false;
- whiteList["richness"] = false;
- whiteList["right"] = false;
- whiteList["rotation"] = false;
- whiteList["rotation-point"] = false;
- whiteList["ruby-align"] = false;
- whiteList["ruby-merge"] = false;
- whiteList["ruby-position"] = false;
- whiteList["shape-image-threshold"] = false;
- whiteList["shape-outside"] = false;
- whiteList["shape-margin"] = false;
- whiteList["size"] = false;
- whiteList["speak"] = false;
- whiteList["speak-as"] = false;
- whiteList["speak-header"] = false;
- whiteList["speak-numeral"] = false;
- whiteList["speak-punctuation"] = false;
- whiteList["speech-rate"] = false;
- whiteList["stress"] = false;
- whiteList["string-set"] = false;
- whiteList["tab-size"] = false;
- whiteList["table-layout"] = false;
- whiteList["text-align"] = true;
- whiteList["text-align-last"] = true;
- whiteList["text-combine-upright"] = true;
- whiteList["text-decoration"] = true;
- whiteList["text-decoration-color"] = true;
- whiteList["text-decoration-line"] = true;
- whiteList["text-decoration-skip"] = true;
- whiteList["text-decoration-style"] = true;
- whiteList["text-emphasis"] = true;
- whiteList["text-emphasis-color"] = true;
- whiteList["text-emphasis-position"] = true;
- whiteList["text-emphasis-style"] = true;
- whiteList["text-height"] = true;
- whiteList["text-indent"] = true;
- whiteList["text-justify"] = true;
- whiteList["text-orientation"] = true;
- whiteList["text-overflow"] = true;
- whiteList["text-shadow"] = true;
- whiteList["text-space-collapse"] = true;
- whiteList["text-transform"] = true;
- whiteList["text-underline-position"] = true;
- whiteList["text-wrap"] = true;
- whiteList["top"] = false;
- whiteList["transform"] = false;
- whiteList["transform-origin"] = false;
- whiteList["transform-style"] = false;
- whiteList["transition"] = false;
- whiteList["transition-delay"] = false;
- whiteList["transition-duration"] = false;
- whiteList["transition-property"] = false;
- whiteList["transition-timing-function"] = false;
- whiteList["unicode-bidi"] = false;
- whiteList["vertical-align"] = false;
- whiteList["visibility"] = false;
- whiteList["voice-balance"] = false;
- whiteList["voice-duration"] = false;
- whiteList["voice-family"] = false;
- whiteList["voice-pitch"] = false;
- whiteList["voice-range"] = false;
- whiteList["voice-rate"] = false;
- whiteList["voice-stress"] = false;
- whiteList["voice-volume"] = false;
- whiteList["volume"] = false;
- whiteList["white-space"] = false;
- whiteList["widows"] = false;
- whiteList["width"] = true;
- whiteList["will-change"] = false;
- whiteList["word-break"] = true;
- whiteList["word-spacing"] = true;
- whiteList["word-wrap"] = true;
- whiteList["wrap-flow"] = false;
- whiteList["wrap-through"] = false;
- whiteList["writing-mode"] = false;
- whiteList["z-index"] = false;
- return whiteList;
- }
- function onAttr(name, value, options) {
- }
- function onIgnoreAttr(name, value, options) {
- }
- var REGEXP_URL_JAVASCRIPT = /javascript\s*\:/img;
- function safeAttrValue$1(name, value) {
- if (REGEXP_URL_JAVASCRIPT.test(value))
- return "";
- return value;
- }
- _default.whiteList = getDefaultWhiteList$1();
- _default.getDefaultWhiteList = getDefaultWhiteList$1;
- _default.onAttr = onAttr;
- _default.onIgnoreAttr = onIgnoreAttr;
- _default.safeAttrValue = safeAttrValue$1;
- var util$1 = {
- indexOf: function(arr, item) {
- var i4, j;
- if (Array.prototype.indexOf) {
- return arr.indexOf(item);
- }
- for (i4 = 0, j = arr.length; i4 < j; i4++) {
- if (arr[i4] === item) {
- return i4;
- }
- }
- return -1;
- },
- forEach: function(arr, fn, scope) {
- var i4, j;
- if (Array.prototype.forEach) {
- return arr.forEach(fn, scope);
- }
- for (i4 = 0, j = arr.length; i4 < j; i4++) {
- fn.call(scope, arr[i4], i4, arr);
- }
- },
- trim: function(str) {
- if (String.prototype.trim) {
- return str.trim();
- }
- return str.replace(/(^\s*)|(\s*$)/g, "");
- },
- trimRight: function(str) {
- if (String.prototype.trimRight) {
- return str.trimRight();
- }
- return str.replace(/(\s*$)/g, "");
- }
- };
- var _$3 = util$1;
- function parseStyle$1(css2, onAttr2) {
- css2 = _$3.trimRight(css2);
- if (css2[css2.length - 1] !== ";")
- css2 += ";";
- var cssLength = css2.length;
- var isParenthesisOpen = false;
- var lastPos = 0;
- var i4 = 0;
- var retCSS = "";
- function addNewAttr() {
- if (!isParenthesisOpen) {
- var source = _$3.trim(css2.slice(lastPos, i4));
- var j2 = source.indexOf(":");
- if (j2 !== -1) {
- var name = _$3.trim(source.slice(0, j2));
- var value = _$3.trim(source.slice(j2 + 1));
- if (name) {
- var ret = onAttr2(lastPos, retCSS.length, name, value, source);
- if (ret)
- retCSS += ret + "; ";
- }
- }
- }
- lastPos = i4 + 1;
- }
- for (; i4 < cssLength; i4++) {
- var c5 = css2[i4];
- if (c5 === "/" && css2[i4 + 1] === "*") {
- var j = css2.indexOf("*/", i4 + 2);
- if (j === -1)
- break;
- i4 = j + 1;
- lastPos = i4 + 1;
- isParenthesisOpen = false;
- } else if (c5 === "(") {
- isParenthesisOpen = true;
- } else if (c5 === ")") {
- isParenthesisOpen = false;
- } else if (c5 === ";") {
- if (isParenthesisOpen)
- ;
- else {
- addNewAttr();
- }
- } else if (c5 === "\n") {
- addNewAttr();
- }
- }
- return _$3.trim(retCSS);
- }
- var parser$2 = parseStyle$1;
- var DEFAULT$1 = _default;
- var parseStyle = parser$2;
- function isNull$1(obj) {
- return obj === void 0 || obj === null;
- }
- function shallowCopyObject$1(obj) {
- var ret = {};
- for (var i4 in obj) {
- ret[i4] = obj[i4];
- }
- return ret;
- }
- function FilterCSS$2(options) {
- options = shallowCopyObject$1(options || {});
- options.whiteList = options.whiteList || DEFAULT$1.whiteList;
- options.onAttr = options.onAttr || DEFAULT$1.onAttr;
- options.onIgnoreAttr = options.onIgnoreAttr || DEFAULT$1.onIgnoreAttr;
- options.safeAttrValue = options.safeAttrValue || DEFAULT$1.safeAttrValue;
- this.options = options;
- }
- FilterCSS$2.prototype.process = function(css2) {
- css2 = css2 || "";
- css2 = css2.toString();
- if (!css2)
- return "";
- var me = this;
- var options = me.options;
- var whiteList = options.whiteList;
- var onAttr2 = options.onAttr;
- var onIgnoreAttr2 = options.onIgnoreAttr;
- var safeAttrValue2 = options.safeAttrValue;
- var retCSS = parseStyle(css2, function(sourcePosition, position, name, value, source) {
- var check = whiteList[name];
- var isWhite = false;
- if (check === true)
- isWhite = check;
- else if (typeof check === "function")
- isWhite = check(value);
- else if (check instanceof RegExp)
- isWhite = check.test(value);
- if (isWhite !== true)
- isWhite = false;
- value = safeAttrValue2(name, value);
- if (!value)
- return;
- var opts = {
- position,
- sourcePosition,
- source,
- isWhite
- };
- if (isWhite) {
- var ret = onAttr2(name, value, opts);
- if (isNull$1(ret)) {
- return name + ":" + value;
- } else {
- return ret;
- }
- } else {
- var ret = onIgnoreAttr2(name, value, opts);
- if (!isNull$1(ret)) {
- return ret;
- }
- }
- });
- return retCSS;
- };
- var css = FilterCSS$2;
- (function(module, exports) {
- var DEFAULT2 = _default;
- var FilterCSS2 = css;
- function filterCSS(html, options) {
- var xss2 = new FilterCSS2(options);
- return xss2.process(html);
- }
- exports = module.exports = filterCSS;
- exports.FilterCSS = FilterCSS2;
- for (var i4 in DEFAULT2)
- exports[i4] = DEFAULT2[i4];
- })(lib, lib.exports);
- var util = {
- indexOf: function(arr, item) {
- var i4, j;
- if (Array.prototype.indexOf) {
- return arr.indexOf(item);
- }
- for (i4 = 0, j = arr.length; i4 < j; i4++) {
- if (arr[i4] === item) {
- return i4;
- }
- }
- return -1;
- },
- forEach: function(arr, fn, scope) {
- var i4, j;
- if (Array.prototype.forEach) {
- return arr.forEach(fn, scope);
- }
- for (i4 = 0, j = arr.length; i4 < j; i4++) {
- fn.call(scope, arr[i4], i4, arr);
- }
- },
- trim: function(str) {
- if (String.prototype.trim) {
- return str.trim();
- }
- return str.replace(/(^\s*)|(\s*$)/g, "");
- },
- spaceIndex: function(str) {
- var reg = /\s|\n|\t/;
- var match = reg.exec(str);
- return match ? match.index : -1;
- }
- };
- var FilterCSS$1 = lib.exports.FilterCSS;
- var getDefaultCSSWhiteList = lib.exports.getDefaultWhiteList;
- var _$2 = util;
- function getDefaultWhiteList() {
- return {
- a: ["target", "href", "title"],
- abbr: ["title"],
- address: [],
- area: ["shape", "coords", "href", "alt"],
- article: [],
- aside: [],
- audio: [
- "autoplay",
- "controls",
- "crossorigin",
- "loop",
- "muted",
- "preload",
- "src"
- ],
- b: [],
- bdi: ["dir"],
- bdo: ["dir"],
- big: [],
- blockquote: ["cite"],
- br: [],
- caption: [],
- center: [],
- cite: [],
- code: [],
- col: ["align", "valign", "span", "width"],
- colgroup: ["align", "valign", "span", "width"],
- dd: [],
- del: ["datetime"],
- details: ["open"],
- div: [],
- dl: [],
- dt: [],
- em: [],
- figcaption: [],
- figure: [],
- font: ["color", "size", "face"],
- footer: [],
- h1: [],
- h2: [],
- h3: [],
- h4: [],
- h5: [],
- h6: [],
- header: [],
- hr: [],
- i: [],
- img: ["src", "alt", "title", "width", "height"],
- ins: ["datetime"],
- li: [],
- mark: [],
- nav: [],
- ol: [],
- p: [],
- pre: [],
- s: [],
- section: [],
- small: [],
- span: [],
- sub: [],
- summary: [],
- sup: [],
- strong: [],
- strike: [],
- table: ["width", "border", "align", "valign"],
- tbody: ["align", "valign"],
- td: ["width", "rowspan", "colspan", "align", "valign"],
- tfoot: ["align", "valign"],
- th: ["width", "rowspan", "colspan", "align", "valign"],
- thead: ["align", "valign"],
- tr: ["rowspan", "align", "valign"],
- tt: [],
- u: [],
- ul: [],
- video: [
- "autoplay",
- "controls",
- "crossorigin",
- "loop",
- "muted",
- "playsinline",
- "poster",
- "preload",
- "src",
- "height",
- "width"
- ]
- };
- }
- var defaultCSSFilter = new FilterCSS$1();
- function onTag(tag, html, options) {
- }
- function onIgnoreTag(tag, html, options) {
- }
- function onTagAttr(tag, name, value) {
- }
- function onIgnoreTagAttr(tag, name, value) {
- }
- function escapeHtml(html) {
- return html.replace(REGEXP_LT, "<").replace(REGEXP_GT, ">");
- }
- function safeAttrValue(tag, name, value, cssFilter) {
- value = friendlyAttrValue(value);
- if (name === "href" || name === "src") {
- value = _$2.trim(value);
- if (value === "#")
- return "#";
- if (!(value.substr(0, 7) === "http://" || value.substr(0, 8) === "https://" || value.substr(0, 7) === "mailto:" || value.substr(0, 4) === "tel:" || value.substr(0, 11) === "data:image/" || value.substr(0, 6) === "ftp://" || value.substr(0, 2) === "./" || value.substr(0, 3) === "../" || value[0] === "#" || value[0] === "/")) {
- return "";
- }
- } else if (name === "background") {
- REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex = 0;
- if (REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)) {
- return "";
- }
- } else if (name === "style") {
- REGEXP_DEFAULT_ON_TAG_ATTR_7.lastIndex = 0;
- if (REGEXP_DEFAULT_ON_TAG_ATTR_7.test(value)) {
- return "";
- }
- REGEXP_DEFAULT_ON_TAG_ATTR_8.lastIndex = 0;
- if (REGEXP_DEFAULT_ON_TAG_ATTR_8.test(value)) {
- REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex = 0;
- if (REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)) {
- return "";
- }
- }
- if (cssFilter !== false) {
- cssFilter = cssFilter || defaultCSSFilter;
- value = cssFilter.process(value);
- }
- }
- value = escapeAttrValue(value);
- return value;
- }
- var REGEXP_LT = /</g;
- var REGEXP_GT = />/g;
- var REGEXP_QUOTE = /"/g;
- var REGEXP_QUOTE_2 = /"/g;
- var REGEXP_ATTR_VALUE_1 = /&#([a-zA-Z0-9]*);?/gim;
- var REGEXP_ATTR_VALUE_COLON = /:?/gim;
- var REGEXP_ATTR_VALUE_NEWLINE = /&newline;?/gim;
- var REGEXP_DEFAULT_ON_TAG_ATTR_4 = /((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi;
- var REGEXP_DEFAULT_ON_TAG_ATTR_7 = /e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi;
- var REGEXP_DEFAULT_ON_TAG_ATTR_8 = /u\s*r\s*l\s*\(.*/gi;
- function escapeQuote(str) {
- return str.replace(REGEXP_QUOTE, """);
- }
- function unescapeQuote(str) {
- return str.replace(REGEXP_QUOTE_2, '"');
- }
- function escapeHtmlEntities(str) {
- return str.replace(REGEXP_ATTR_VALUE_1, function replaceUnicode(str2, code) {
- return code[0] === "x" || code[0] === "X" ? String.fromCharCode(parseInt(code.substr(1), 16)) : String.fromCharCode(parseInt(code, 10));
- });
- }
- function escapeDangerHtml5Entities(str) {
- return str.replace(REGEXP_ATTR_VALUE_COLON, ":").replace(REGEXP_ATTR_VALUE_NEWLINE, " ");
- }
- function clearNonPrintableCharacter(str) {
- var str2 = "";
- for (var i4 = 0, len = str.length; i4 < len; i4++) {
- str2 += str.charCodeAt(i4) < 32 ? " " : str.charAt(i4);
- }
- return _$2.trim(str2);
- }
- function friendlyAttrValue(str) {
- str = unescapeQuote(str);
- str = escapeHtmlEntities(str);
- str = escapeDangerHtml5Entities(str);
- str = clearNonPrintableCharacter(str);
- return str;
- }
- function escapeAttrValue(str) {
- str = escapeQuote(str);
- str = escapeHtml(str);
- return str;
- }
- function onIgnoreTagStripAll() {
- return "";
- }
- function StripTagBody(tags, next) {
- if (typeof next !== "function") {
- next = function() {
- };
- }
- var isRemoveAllTag = !Array.isArray(tags);
- function isRemoveTag(tag) {
- if (isRemoveAllTag)
- return true;
- return _$2.indexOf(tags, tag) !== -1;
- }
- var removeList = [];
- var posStart = false;
- return {
- onIgnoreTag: function(tag, html, options) {
- if (isRemoveTag(tag)) {
- if (options.isClosing) {
- var ret = "[/removed]";
- var end = options.position + ret.length;
- removeList.push([
- posStart !== false ? posStart : options.position,
- end
- ]);
- posStart = false;
- return ret;
- } else {
- if (!posStart) {
- posStart = options.position;
- }
- return "[removed]";
- }
- } else {
- return next(tag, html, options);
- }
- },
- remove: function(html) {
- var rethtml = "";
- var lastPos = 0;
- _$2.forEach(removeList, function(pos) {
- rethtml += html.slice(lastPos, pos[0]);
- lastPos = pos[1];
- });
- rethtml += html.slice(lastPos);
- return rethtml;
- }
- };
- }
- function stripCommentTag(html) {
- var retHtml = "";
- var lastPos = 0;
- while (lastPos < html.length) {
- var i4 = html.indexOf("<!--", lastPos);
- if (i4 === -1) {
- retHtml += html.slice(lastPos);
- break;
- }
- retHtml += html.slice(lastPos, i4);
- var j = html.indexOf("-->", i4);
- if (j === -1) {
- break;
- }
- lastPos = j + 3;
- }
- return retHtml;
- }
- function stripBlankChar(html) {
- var chars = html.split("");
- chars = chars.filter(function(char) {
- var c5 = char.charCodeAt(0);
- if (c5 === 127)
- return false;
- if (c5 <= 31) {
- if (c5 === 10 || c5 === 13)
- return true;
- return false;
- }
- return true;
- });
- return chars.join("");
- }
- _default$1.whiteList = getDefaultWhiteList();
- _default$1.getDefaultWhiteList = getDefaultWhiteList;
- _default$1.onTag = onTag;
- _default$1.onIgnoreTag = onIgnoreTag;
- _default$1.onTagAttr = onTagAttr;
- _default$1.onIgnoreTagAttr = onIgnoreTagAttr;
- _default$1.safeAttrValue = safeAttrValue;
- _default$1.escapeHtml = escapeHtml;
- _default$1.escapeQuote = escapeQuote;
- _default$1.unescapeQuote = unescapeQuote;
- _default$1.escapeHtmlEntities = escapeHtmlEntities;
- _default$1.escapeDangerHtml5Entities = escapeDangerHtml5Entities;
- _default$1.clearNonPrintableCharacter = clearNonPrintableCharacter;
- _default$1.friendlyAttrValue = friendlyAttrValue;
- _default$1.escapeAttrValue = escapeAttrValue;
- _default$1.onIgnoreTagStripAll = onIgnoreTagStripAll;
- _default$1.StripTagBody = StripTagBody;
- _default$1.stripCommentTag = stripCommentTag;
- _default$1.stripBlankChar = stripBlankChar;
- _default$1.cssFilter = defaultCSSFilter;
- _default$1.getDefaultCSSWhiteList = getDefaultCSSWhiteList;
- var parser$1 = {};
- var _$1 = util;
- function getTagName(html) {
- var i4 = _$1.spaceIndex(html);
- var tagName;
- if (i4 === -1) {
- tagName = html.slice(1, -1);
- } else {
- tagName = html.slice(1, i4 + 1);
- }
- tagName = _$1.trim(tagName).toLowerCase();
- if (tagName.slice(0, 1) === "/")
- tagName = tagName.slice(1);
- if (tagName.slice(-1) === "/")
- tagName = tagName.slice(0, -1);
- return tagName;
- }
- function isClosing(html) {
- return html.slice(0, 2) === "</";
- }
- function parseTag$1(html, onTag2, escapeHtml2) {
- var rethtml = "";
- var lastPos = 0;
- var tagStart = false;
- var quoteStart = false;
- var currentPos = 0;
- var len = html.length;
- var currentTagName = "";
- var currentHtml = "";
- chariterator:
- for (currentPos = 0; currentPos < len; currentPos++) {
- var c5 = html.charAt(currentPos);
- if (tagStart === false) {
- if (c5 === "<") {
- tagStart = currentPos;
- continue;
- }
- } else {
- if (quoteStart === false) {
- if (c5 === "<") {
- rethtml += escapeHtml2(html.slice(lastPos, currentPos));
- tagStart = currentPos;
- lastPos = currentPos;
- continue;
- }
- if (c5 === ">") {
- rethtml += escapeHtml2(html.slice(lastPos, tagStart));
- currentHtml = html.slice(tagStart, currentPos + 1);
- currentTagName = getTagName(currentHtml);
- rethtml += onTag2(
- tagStart,
- rethtml.length,
- currentTagName,
- currentHtml,
- isClosing(currentHtml)
- );
- lastPos = currentPos + 1;
- tagStart = false;
- continue;
- }
- if (c5 === '"' || c5 === "'") {
- var i4 = 1;
- var ic = html.charAt(currentPos - i4);
- while (ic.trim() === "" || ic === "=") {
- if (ic === "=") {
- quoteStart = c5;
- continue chariterator;
- }
- ic = html.charAt(currentPos - ++i4);
- }
- }
- } else {
- if (c5 === quoteStart) {
- quoteStart = false;
- continue;
- }
- }
- }
- }
- if (lastPos < html.length) {
- rethtml += escapeHtml2(html.substr(lastPos));
- }
- return rethtml;
- }
- var REGEXP_ILLEGAL_ATTR_NAME = /[^a-zA-Z0-9\\_:.-]/gim;
- function parseAttr$1(html, onAttr2) {
- var lastPos = 0;
- var lastMarkPos = 0;
- var retAttrs = [];
- var tmpName = false;
- var len = html.length;
- function addAttr(name, value) {
- name = _$1.trim(name);
- name = name.replace(REGEXP_ILLEGAL_ATTR_NAME, "").toLowerCase();
- if (name.length < 1)
- return;
- var ret = onAttr2(name, value || "");
- if (ret)
- retAttrs.push(ret);
- }
- for (var i4 = 0; i4 < len; i4++) {
- var c5 = html.charAt(i4);
- var v3, j;
- if (tmpName === false && c5 === "=") {
- tmpName = html.slice(lastPos, i4);
- lastPos = i4 + 1;
- lastMarkPos = html.charAt(lastPos) === '"' || html.charAt(lastPos) === "'" ? lastPos : findNextQuotationMark(html, i4 + 1);
- continue;
- }
- if (tmpName !== false) {
- if (i4 === lastMarkPos) {
- j = html.indexOf(c5, i4 + 1);
- if (j === -1) {
- break;
- } else {
- v3 = _$1.trim(html.slice(lastMarkPos + 1, j));
- addAttr(tmpName, v3);
- tmpName = false;
- i4 = j;
- lastPos = i4 + 1;
- continue;
- }
- }
- }
- if (/\s|\n|\t/.test(c5)) {
- html = html.replace(/\s|\n|\t/g, " ");
- if (tmpName === false) {
- j = findNextEqual(html, i4);
- if (j === -1) {
- v3 = _$1.trim(html.slice(lastPos, i4));
- addAttr(v3);
- tmpName = false;
- lastPos = i4 + 1;
- continue;
- } else {
- i4 = j - 1;
- continue;
- }
- } else {
- j = findBeforeEqual(html, i4 - 1);
- if (j === -1) {
- v3 = _$1.trim(html.slice(lastPos, i4));
- v3 = stripQuoteWrap(v3);
- addAttr(tmpName, v3);
- tmpName = false;
- lastPos = i4 + 1;
- continue;
- } else {
- continue;
- }
- }
- }
- }
- if (lastPos < html.length) {
- if (tmpName === false) {
- addAttr(html.slice(lastPos));
- } else {
- addAttr(tmpName, stripQuoteWrap(_$1.trim(html.slice(lastPos))));
- }
- }
- return _$1.trim(retAttrs.join(" "));
- }
- function findNextEqual(str, i4) {
- for (; i4 < str.length; i4++) {
- var c5 = str[i4];
- if (c5 === " ")
- continue;
- if (c5 === "=")
- return i4;
- return -1;
- }
- }
- function findNextQuotationMark(str, i4) {
- for (; i4 < str.length; i4++) {
- var c5 = str[i4];
- if (c5 === " ")
- continue;
- if (c5 === "'" || c5 === '"')
- return i4;
- return -1;
- }
- }
- function findBeforeEqual(str, i4) {
- for (; i4 > 0; i4--) {
- var c5 = str[i4];
- if (c5 === " ")
- continue;
- if (c5 === "=")
- return i4;
- return -1;
- }
- }
- function isQuoteWrapString(text) {
- if (text[0] === '"' && text[text.length - 1] === '"' || text[0] === "'" && text[text.length - 1] === "'") {
- return true;
- } else {
- return false;
- }
- }
- function stripQuoteWrap(text) {
- if (isQuoteWrapString(text)) {
- return text.substr(1, text.length - 2);
- } else {
- return text;
- }
- }
- parser$1.parseTag = parseTag$1;
- parser$1.parseAttr = parseAttr$1;
- var FilterCSS = lib.exports.FilterCSS;
- var DEFAULT = _default$1;
- var parser = parser$1;
- var parseTag = parser.parseTag;
- var parseAttr = parser.parseAttr;
- var _ = util;
- function isNull(obj) {
- return obj === void 0 || obj === null;
- }
- function getAttrs(html) {
- var i4 = _.spaceIndex(html);
- if (i4 === -1) {
- return {
- html: "",
- closing: html[html.length - 2] === "/"
- };
- }
- html = _.trim(html.slice(i4 + 1, -1));
- var isClosing2 = html[html.length - 1] === "/";
- if (isClosing2)
- html = _.trim(html.slice(0, -1));
- return {
- html,
- closing: isClosing2
- };
- }
- function shallowCopyObject(obj) {
- var ret = {};
- for (var i4 in obj) {
- ret[i4] = obj[i4];
- }
- return ret;
- }
- function keysToLowerCase(obj) {
- var ret = {};
- for (var i4 in obj) {
- if (Array.isArray(obj[i4])) {
- ret[i4.toLowerCase()] = obj[i4].map(function(item) {
- return item.toLowerCase();
- });
- } else {
- ret[i4.toLowerCase()] = obj[i4];
- }
- }
- return ret;
- }
- function FilterXSS(options) {
- options = shallowCopyObject(options || {});
- if (options.stripIgnoreTag) {
- if (options.onIgnoreTag) {
- console.error(
- 'Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'
- );
- }
- options.onIgnoreTag = DEFAULT.onIgnoreTagStripAll;
- }
- if (options.whiteList || options.allowList) {
- options.whiteList = keysToLowerCase(options.whiteList || options.allowList);
- } else {
- options.whiteList = DEFAULT.whiteList;
- }
- options.onTag = options.onTag || DEFAULT.onTag;
- options.onTagAttr = options.onTagAttr || DEFAULT.onTagAttr;
- options.onIgnoreTag = options.onIgnoreTag || DEFAULT.onIgnoreTag;
- options.onIgnoreTagAttr = options.onIgnoreTagAttr || DEFAULT.onIgnoreTagAttr;
- options.safeAttrValue = options.safeAttrValue || DEFAULT.safeAttrValue;
- options.escapeHtml = options.escapeHtml || DEFAULT.escapeHtml;
- this.options = options;
- if (options.css === false) {
- this.cssFilter = false;
- } else {
- options.css = options.css || {};
- this.cssFilter = new FilterCSS(options.css);
- }
- }
- FilterXSS.prototype.process = function(html) {
- html = html || "";
- html = html.toString();
- if (!html)
- return "";
- var me = this;
- var options = me.options;
- var whiteList = options.whiteList;
- var onTag2 = options.onTag;
- var onIgnoreTag2 = options.onIgnoreTag;
- var onTagAttr2 = options.onTagAttr;
- var onIgnoreTagAttr2 = options.onIgnoreTagAttr;
- var safeAttrValue2 = options.safeAttrValue;
- var escapeHtml2 = options.escapeHtml;
- var cssFilter = me.cssFilter;
- if (options.stripBlankChar) {
- html = DEFAULT.stripBlankChar(html);
- }
- if (!options.allowCommentTag) {
- html = DEFAULT.stripCommentTag(html);
- }
- var stripIgnoreTagBody = false;
- if (options.stripIgnoreTagBody) {
- stripIgnoreTagBody = DEFAULT.StripTagBody(
- options.stripIgnoreTagBody,
- onIgnoreTag2
- );
- onIgnoreTag2 = stripIgnoreTagBody.onIgnoreTag;
- }
- var retHtml = parseTag(
- html,
- function(sourcePosition, position, tag, html2, isClosing2) {
- var info = {
- sourcePosition,
- position,
- isClosing: isClosing2,
- isWhite: Object.prototype.hasOwnProperty.call(whiteList, tag)
- };
- var ret = onTag2(tag, html2, info);
- if (!isNull(ret))
- return ret;
- if (info.isWhite) {
- if (info.isClosing) {
- return "</" + tag + ">";
- }
- var attrs = getAttrs(html2);
- var whiteAttrList = whiteList[tag];
- var attrsHtml = parseAttr(attrs.html, function(name, value) {
- var isWhiteAttr = _.indexOf(whiteAttrList, name) !== -1;
- var ret2 = onTagAttr2(tag, name, value, isWhiteAttr);
- if (!isNull(ret2))
- return ret2;
- if (isWhiteAttr) {
- value = safeAttrValue2(tag, name, value, cssFilter);
- if (value) {
- return name + '="' + value + '"';
- } else {
- return name;
- }
- } else {
- ret2 = onIgnoreTagAttr2(tag, name, value, isWhiteAttr);
- if (!isNull(ret2))
- return ret2;
- return;
- }
- });
- html2 = "<" + tag;
- if (attrsHtml)
- html2 += " " + attrsHtml;
- if (attrs.closing)
- html2 += " /";
- html2 += ">";
- return html2;
- } else {
- ret = onIgnoreTag2(tag, html2, info);
- if (!isNull(ret))
- return ret;
- return escapeHtml2(html2);
- }
- },
- escapeHtml2
- );
- if (stripIgnoreTagBody) {
- retHtml = stripIgnoreTagBody.remove(retHtml);
- }
- return retHtml;
- };
- var xss = FilterXSS;
- (function(module, exports) {
- var DEFAULT2 = _default$1;
- var parser2 = parser$1;
- var FilterXSS2 = xss;
- function filterXSS(html, options) {
- var xss2 = new FilterXSS2(options);
- return xss2.process(html);
- }
- exports = module.exports = filterXSS;
- exports.filterXSS = filterXSS;
- exports.FilterXSS = FilterXSS2;
- (function() {
- for (var i4 in DEFAULT2) {
- exports[i4] = DEFAULT2[i4];
- }
- for (var j in parser2) {
- exports[j] = parser2[j];
- }
- })();
- function isWorkerEnv() {
- return typeof self !== "undefined" && typeof DedicatedWorkerGlobalScope !== "undefined" && self instanceof DedicatedWorkerGlobalScope;
- }
- if (isWorkerEnv()) {
- self.filterXSS = module.exports;
- }
- })(lib$1, lib$1.exports);
- var Sanitizer = function() {
- function Sanitizer2(filterOptions, extendDefaults) {
- var _this = this;
- this.arcgisWhiteList = {
- a: ["href", "style", "target"],
- abbr: ["title"],
- audio: ["autoplay", "controls", "loop", "muted", "preload"],
- b: [],
- br: [],
- dd: ["style"],
- div: ["align", "style"],
- dl: ["style"],
- dt: ["style"],
- em: [],
- figcaption: ["style"],
- figure: ["style"],
- font: ["color", "face", "size", "style"],
- h1: ["style"],
- h2: ["style"],
- h3: ["style"],
- h4: ["style"],
- h5: ["style"],
- h6: ["style"],
- hr: [],
- i: [],
- img: ["alt", "border", "height", "src", "style", "width"],
- li: [],
- ol: [],
- p: ["style"],
- source: ["media", "src", "type"],
- span: ["style"],
- strong: [],
- sub: ["style"],
- sup: ["style"],
- table: ["border", "cellpadding", "cellspacing", "height", "style", "width"],
- tbody: [],
- tr: ["align", "height", "style", "valign"],
- td: [
- "align",
- "colspan",
- "height",
- "nowrap",
- "rowspan",
- "style",
- "valign",
- "width"
- ],
- th: [
- "align",
- "colspan",
- "height",
- "nowrap",
- "rowspan",
- "style",
- "valign",
- "width"
- ],
- u: [],
- ul: [],
- video: [
- "autoplay",
- "controls",
- "height",
- "loop",
- "muted",
- "poster",
- "preload",
- "width"
- ]
- };
- this.allowedProtocols = [
- "http",
- "https",
- "mailto",
- "iform",
- "tel",
- "flow",
- "lfmobile",
- "arcgis-navigator",
- "arcgis-appstudio-player",
- "arcgis-survey123",
- "arcgis-collector",
- "arcgis-workforce",
- "arcgis-explorer",
- "arcgis-trek2there",
- "arcgis-quickcapture",
- "mspbi",
- "comgooglemaps",
- "pdfefile",
- "pdfehttp",
- "pdfehttps",
- "boxapp",
- "boxemm",
- "awb",
- "awbs",
- "gropen",
- "radarscope"
- ];
- this.arcgisFilterOptions = {
- allowCommentTag: true,
- safeAttrValue: function(tag, name, value, cssFilter) {
- if (tag === "a" && name === "href" || (tag === "img" || tag === "source") && name === "src") {
- return _this.sanitizeUrl(value);
- }
- return lib$1.exports.safeAttrValue(tag, name, value, cssFilter);
- }
- };
- this._entityMap = {
- "&": "8",
- "<": "<",
- ">": ">",
- '"': """,
- "'": "'",
- "/": "/"
- };
- var xssFilterOptions;
- if (filterOptions && !extendDefaults) {
- xssFilterOptions = filterOptions;
- } else if (filterOptions && extendDefaults) {
- xssFilterOptions = Object.create(this.arcgisFilterOptions);
- Object.keys(filterOptions).forEach(function(key) {
- if (key === "whiteList") {
- xssFilterOptions.whiteList = _this._extendObjectOfArrays([
- _this.arcgisWhiteList,
- filterOptions.whiteList || {}
- ]);
- } else {
- xssFilterOptions[key] = filterOptions[key];
- }
- });
- } else {
- xssFilterOptions = Object.create(this.arcgisFilterOptions);
- xssFilterOptions.whiteList = this.arcgisWhiteList;
- }
- this.xssFilterOptions = xssFilterOptions;
- this._xssFilter = new lib$1.exports.FilterXSS(xssFilterOptions);
- }
- Sanitizer2.prototype.sanitize = function(value, options) {
- if (options === void 0) {
- options = {};
- }
- switch (typeof value) {
- case "number":
- if (isNaN(value) || !isFinite(value)) {
- return null;
- }
- return value;
- case "boolean":
- return value;
- case "string":
- return this._xssFilter.process(value);
- case "object":
- return this._iterateOverObject(value, options);
- default:
- if (options.allowUndefined && typeof value === "undefined") {
- return;
- }
- return null;
- }
- };
- Sanitizer2.prototype.sanitizeUrl = function(value, options) {
- var _a = (options !== null && options !== void 0 ? options : {}).isProtocolRequired, isProtocolRequired = _a === void 0 ? true : _a;
- var protocol = this._trim(value.substring(0, value.indexOf(":")));
- var isRootUrl = value === "/";
- var isUrlFragment = /^#/.test(value);
- var isValidProtocol = protocol && this.allowedProtocols.indexOf(protocol.toLowerCase()) > -1;
- if (isRootUrl || isUrlFragment || isValidProtocol) {
- return lib$1.exports.escapeAttrValue(value);
- }
- if (!protocol && !isProtocolRequired) {
- return lib$1.exports.escapeAttrValue("https://".concat(value));
- }
- return "";
- };
- Sanitizer2.prototype.sanitizeHTMLAttribute = function(tag, attribute, value, cssFilter) {
- if (typeof this.xssFilterOptions.safeAttrValue === "function") {
- return this.xssFilterOptions.safeAttrValue(
- tag,
- attribute,
- value,
- cssFilter
- );
- }
- return lib$1.exports.safeAttrValue(tag, attribute, value, cssFilter);
- };
- Sanitizer2.prototype.validate = function(value, options) {
- if (options === void 0) {
- options = {};
- }
- var sanitized = this.sanitize(value, options);
- return {
- isValid: value === sanitized,
- sanitized
- };
- };
- Sanitizer2.prototype.encodeHTML = function(value) {
- var _this = this;
- return String(value).replace(/[&<>"'\/]/g, function(s5) {
- return _this._entityMap[s5];
- });
- };
- Sanitizer2.prototype.encodeAttrValue = function(value) {
- var alphanumericRE = /^[a-zA-Z0-9]$/;
- return String(value).replace(/[\x00-\xFF]/g, function(c5, idx) {
- return !alphanumericRE.test(c5) ? "&#x".concat(Number(value.charCodeAt(idx)).toString(16), ";") : c5;
- });
- };
- Sanitizer2.prototype._extendObjectOfArrays = function(objects) {
- var finalObj = {};
- objects.forEach(function(obj) {
- Object.keys(obj).forEach(function(key) {
- if (Array.isArray(obj[key]) && Array.isArray(finalObj[key])) {
- finalObj[key] = finalObj[key].concat(obj[key]);
- } else {
- finalObj[key] = obj[key];
- }
- });
- });
- return finalObj;
- };
- Sanitizer2.prototype._iterateOverObject = function(obj, options) {
- var _this = this;
- if (options === void 0) {
- options = {};
- }
- try {
- var hasChanged_1 = false;
- var changedObj = void 0;
- if (Array.isArray(obj)) {
- changedObj = obj.reduce(function(prev, value) {
- var validation = _this.validate(value, options);
- if (validation.isValid) {
- return prev.concat([value]);
- } else {
- hasChanged_1 = true;
- return prev.concat([validation.sanitized]);
- }
- }, []);
- } else if (!isPlainObject(obj)) {
- if (options.allowUndefined && typeof obj === "undefined") {
- return;
- }
- return null;
- } else {
- var keys = Object.keys(obj);
- changedObj = keys.reduce(function(prev, key) {
- var value = obj[key];
- var validation = _this.validate(value, options);
- if (validation.isValid) {
- prev[key] = value;
- } else {
- hasChanged_1 = true;
- prev[key] = validation.sanitized;
- }
- return prev;
- }, {});
- }
- if (hasChanged_1) {
- return changedObj;
- }
- return obj;
- } catch (err) {
- return null;
- }
- };
- Sanitizer2.prototype._trim = function(val) {
- return String.prototype.trim ? val.trim() : val.replace(/(^\s*)|(\s*$)/g, "");
- };
- return Sanitizer2;
- }();
- // node_modules/@arcgis/core/widgets/support/vnodeCache.js
- var n2 = /* @__PURE__ */ new Map();
- function t2() {
- n2.clear();
- }
- function e(t7) {
- return n2.get(t7);
- }
- function c(t7, e3) {
- n2.set(t7, e3);
- }
- function o(t7) {
- n2.delete(t7);
- }
- // node_modules/@arcgis/core/widgets/support/widgetUtils.js
- var o2;
- var s2;
- var a = function(e3) {
- if ("WebkitTransition" in e3.style)
- o2 = "webkitTransitionEnd", s2 = "webkitAnimationEnd";
- else {
- if (!("transition" in e3.style))
- throw new Error("Your browser is not supported!");
- o2 = "transitionend", s2 = "animationend";
- }
- };
- var c2 = function(e3) {
- o2 || a(e3);
- };
- var l = function(e3, t7) {
- return void 0 === t7 && (t7 = e3 + "-active"), function(n8) {
- c2(n8);
- var r3 = false, i4 = function(a4) {
- r3 || (r3 = true, n8.removeEventListener(o2, i4), n8.removeEventListener(s2, i4), n8.classList.remove(e3), n8.classList.remove(t7));
- };
- n8.classList.add(e3), n8.addEventListener(o2, i4), n8.addEventListener(s2, i4), requestAnimationFrame(function() {
- n8.classList.add(t7);
- });
- };
- };
- var d = function(e3, t7) {
- return void 0 === t7 && (t7 = e3 + "-active"), function(n8, r3) {
- c2(n8);
- var i4 = false, a4 = function(e4) {
- i4 || (i4 = true, n8.removeEventListener(o2, a4), n8.removeEventListener(s2, a4), r3());
- };
- n8.classList.add(e3), n8.addEventListener(o2, a4), n8.addEventListener(s2, a4), requestAnimationFrame(function() {
- n8.classList.add(t7);
- });
- };
- };
- var u = s.getLogger("esri.widgets.support.widgetUtils");
- function p(e3) {
- const n8 = t.acquire();
- for (let t7 = 0; t7 < arguments.length; t7++) {
- const e4 = arguments[t7], r4 = typeof e4;
- if ("string" === r4)
- n8.push(e4);
- else if (Array.isArray(e4))
- n8.push.apply(n8, e4);
- else if ("object" === r4)
- for (const t8 in e4)
- e4[t8] && n8.push(t8);
- }
- const r3 = n8.join(" ");
- return t.release(n8), r3;
- }
- var g = (() => {
- const e3 = /* @__PURE__ */ new Map(), t7 = new ResizeObserver((t8) => {
- var _a;
- t2();
- for (const n8 of t8)
- (_a = e3.get(n8.target)) == null ? void 0 : _a(n8);
- });
- return (r3, i4, o7) => (e3.has(r3) && u.error("Already observing element", r3), e3.set(r3, i4), t7.observe(r3, o7), n(() => {
- t7.unobserve(r3), e3.delete(r3);
- }));
- })();
- function f(e3) {
- const t7 = e3 == null ? void 0 : e3.closest("[dir]");
- return null !== t7 && t7 instanceof HTMLElement && "rtl" === t7.dir || "rtl" === document.dir;
- }
- function h(e3) {
- const t7 = "data-node-ref";
- this[e3.getAttribute(t7)] = null;
- }
- function v(e3) {
- const t7 = "data-node-ref";
- this[e3.getAttribute(t7)] = e3;
- }
- function w(e3, t7) {
- return ("enter" === e3 ? l : d)(t7);
- }
- var L = ["dd", "dl", "dt", "h1", "h2", "h3", "h4", "h5", "h6", "sub", "sup", ...["animate", "animatetransform", "circle", "clippath", "defs", "ellipse", "g", "image", "line", "lineargradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "svg", "switch", "symbol", "text", "textpath", "tspan", "use"]];
- var b = L.reduce((e3, t7) => (e3[t7] = [], e3), {});
- var y = ["align", "alink", "alt", "bgcolor", "border", "cellpadding", "cellspacing", "class", "color", "cols", "colspan", "coords", "d", "dir", "face", "height", "hspace", "ismap", "lang", "marginheight", "marginwidth", "multiple", "nohref", "noresize", "noshade", "nowrap", "ref", "rel", "rev", "rows", "rowspan", "scrolling", "shape", "span", "summary", "tabindex", "title", "usemap", "valign", "value", "vlink", "vspace", "width"];
- var E = new Sanitizer({ whiteList: b, onTagAttr: (e3, t7, n8) => {
- const r3 = `${t7}="${n8}"`;
- if (y.includes(t7))
- return r3;
- }, stripIgnoreTag: true, stripIgnoreTagBody: ["script", "style"] }, true);
- function k(e3) {
- return "Enter" === e3 || " " === e3;
- }
- // node_modules/@arcgis/core/libs/maquette/projection.js
- var t3 = "http://www.w3.org/";
- var r = `${t3}2000/svg`;
- var o3 = `${t3}1999/xlink`;
- var i;
- var l2 = [];
- var n3 = (e3, t7) => {
- let r3 = {};
- return Object.keys(e3).forEach((t8) => {
- r3[t8] = e3[t8];
- }), t7 && Object.keys(t7).forEach((e4) => {
- r3[e4] = t7[e4];
- }), r3;
- };
- var s3 = (e3, t7) => e3.vnodeSelector === t7.vnodeSelector && (e3.properties && t7.properties ? e3.properties.key === t7.properties.key && e3.properties.bind === t7.properties.bind : !e3.properties && !t7.properties);
- var p2 = (e3) => {
- if ("string" != typeof e3)
- throw new Error("Style values must be strings");
- };
- var d2 = (e3, t7, r3) => {
- if ("" !== t7.vnodeSelector) {
- for (let o7 = r3; o7 < e3.length; o7++)
- if (s3(e3[o7], t7))
- return o7;
- }
- return -1;
- };
- var a2 = (e3, t7, r3, o7) => {
- let i4 = e3[t7];
- if ("" === i4.vnodeSelector)
- return;
- let l3 = i4.properties;
- if (!(l3 ? void 0 === l3.key ? l3.bind : l3.key : void 0)) {
- for (let n8 = 0; n8 < e3.length; n8++)
- if (n8 !== t7) {
- let t8 = e3[n8];
- if (s3(t8, i4))
- throw new Error(`${r3.vnodeSelector} had a ${i4.vnodeSelector} child ${"added" === o7 ? o7 : "removed"}, but there is now more than one. You must add unique key properties to make them distinguishable.`);
- }
- }
- };
- var f2 = (e3) => {
- if (e3.properties) {
- let t7 = e3.properties.enterAnimation;
- t7 && t7(e3.domNode, e3.properties);
- }
- };
- var c3 = [];
- var u2 = false;
- var h2 = (e3) => {
- (e3.children || []).forEach(h2), e3.properties && e3.properties.afterRemoved && e3.properties.afterRemoved.apply(e3.properties.bind || e3.properties, [e3.domNode]);
- };
- var m = () => {
- u2 = false, c3.forEach(h2), c3.length = 0;
- };
- var v2 = (e3) => {
- c3.push(e3), u2 || (u2 = true, "undefined" != typeof window && "requestIdleCallback" in window ? window.requestIdleCallback(m, { timeout: 16 }) : setTimeout(m, 16));
- };
- var y2 = (e3) => {
- let t7 = e3.domNode;
- if (e3.properties) {
- let r3 = e3.properties.exitAnimation;
- if (r3) {
- t7.style.pointerEvents = "none";
- let o7 = () => {
- t7.parentNode && (t7.parentNode.removeChild(t7), v2(e3));
- };
- return void r3(t7, o7, e3.properties);
- }
- }
- t7.parentNode && (t7.parentNode.removeChild(t7), v2(e3));
- };
- var g2 = (t7, i4, l3) => {
- if (!i4)
- return;
- let n8 = l3.eventHandlerInterceptor, s5 = Object.keys(i4), d6 = s5.length;
- for (let a4 = 0; a4 < d6; a4++) {
- let d7 = s5[a4], f3 = i4[d7];
- if ("className" === d7)
- throw new Error('Property "className" is not supported, use "class".');
- if ("class" === d7)
- x(t7, f3, true);
- else if ("classes" === d7) {
- let e3 = Object.keys(f3), r3 = e3.length;
- for (let o7 = 0; o7 < r3; o7++) {
- let r4 = e3[o7];
- f3[r4] && t7.classList.add(r4);
- }
- } else if ("styles" === d7) {
- let e3 = Object.keys(f3), r3 = e3.length;
- for (let o7 = 0; o7 < r3; o7++) {
- let r4 = e3[o7], i5 = f3[r4];
- i5 && (p2(i5), l3.styleApplyer(t7, r4, i5));
- }
- } else if ("key" !== d7 && null != f3) {
- let s6 = typeof f3;
- "function" === s6 ? (0 === d7.lastIndexOf("on", 0) && (n8 && (f3 = n8(d7, f3, t7, i4)), "oninput" === d7 && function() {
- let e3 = f3;
- f3 = function(t8) {
- e3.apply(this, [t8]), t8.target["oninput-value"] = t8.target.value;
- };
- }()), t7[d7] = f3) : l3.namespace === r ? "href" === d7 ? t7.setAttributeNS(o3, d7, f3) : t7.setAttribute(d7, f3) : "string" === s6 && "value" !== d7 ? "innerHTML" === d7 ? t7[d7] = E.sanitize(f3) : t7.setAttribute(d7, f3) : t7[d7] = f3;
- }
- }
- };
- var b2 = (e3, t7, r3) => {
- if (t7)
- for (let o7 of t7)
- w2(o7, e3, void 0, r3);
- };
- var N = (e3, t7, r3) => {
- b2(e3, t7.children, r3), t7.text && (e3.textContent = t7.text), g2(e3, t7.properties, r3), t7.properties && t7.properties.afterCreate && t7.properties.afterCreate.apply(t7.properties.bind || t7.properties, [e3, r3, t7.vnodeSelector, t7.properties, t7.children]);
- };
- var w2 = (e3, t7, o7, i4) => {
- let l3, s5 = 0, p4 = e3.vnodeSelector, d6 = t7.ownerDocument;
- if ("" === p4)
- l3 = e3.domNode = d6.createTextNode(e3.text), void 0 !== o7 ? t7.insertBefore(l3, o7) : t7.appendChild(l3);
- else {
- for (let a4 = 0; a4 <= p4.length; ++a4) {
- let f3 = p4.charAt(a4);
- if (a4 === p4.length || "." === f3 || "#" === f3) {
- let f4 = p4.charAt(s5 - 1), c5 = p4.slice(s5, a4);
- "." === f4 ? l3.classList.add(c5) : "#" === f4 ? l3.id = c5 : ("svg" === c5 && (i4 = n3(i4, { namespace: r })), void 0 !== i4.namespace ? l3 = e3.domNode = d6.createElementNS(i4.namespace, c5) : (l3 = e3.domNode = e3.domNode || d6.createElement(c5), "input" === c5 && e3.properties && void 0 !== e3.properties.type && l3.setAttribute("type", e3.properties.type)), void 0 !== o7 ? t7.insertBefore(l3, o7) : l3.parentNode !== t7 && t7.appendChild(l3)), s5 = a4 + 1;
- }
- }
- N(l3, e3, i4);
- }
- };
- var x = (e3, t7, r3) => {
- t7 && t7.split(" ").forEach((t8) => {
- t8 && e3.classList.toggle(t8, r3);
- });
- };
- var k2 = (t7, i4, l3, n8) => {
- if (!l3)
- return;
- let s5 = false, d6 = Object.keys(l3), a4 = d6.length;
- for (let f3 = 0; f3 < a4; f3++) {
- let a5 = d6[f3], c5 = l3[a5], u3 = i4[a5];
- if ("class" === a5)
- u3 !== c5 && (x(t7, u3, false), x(t7, c5, true));
- else if ("classes" === a5) {
- let e3 = t7.classList, r3 = Object.keys(c5), o7 = r3.length;
- for (let t8 = 0; t8 < o7; t8++) {
- let o8 = r3[t8], i5 = !!c5[o8];
- i5 !== !!u3[o8] && (s5 = true, i5 ? e3.add(o8) : e3.remove(o8));
- }
- } else if ("styles" === a5) {
- let e3 = Object.keys(c5), r3 = e3.length;
- for (let o7 = 0; o7 < r3; o7++) {
- let r4 = e3[o7], i5 = c5[r4];
- i5 !== u3[r4] && (s5 = true, i5 ? (p2(i5), n8.styleApplyer(t7, r4, i5)) : n8.styleApplyer(t7, r4, ""));
- }
- } else if (c5 || "string" != typeof u3 || (c5 = ""), "value" === a5) {
- let e3 = t7[a5];
- e3 !== c5 && (t7["oninput-value"] ? e3 === t7["oninput-value"] : c5 !== u3) && (t7[a5] = c5, t7["oninput-value"] = void 0), c5 !== u3 && (s5 = true);
- } else if (c5 !== u3) {
- let i5 = typeof c5;
- "function" === i5 && n8.eventHandlerInterceptor || (n8.namespace === r ? "href" === a5 ? t7.setAttributeNS(o3, a5, c5) : t7.setAttribute(a5, c5) : "string" === i5 ? "innerHTML" === a5 ? t7[a5] = E.sanitize(c5) : "role" === a5 && "" === c5 ? t7.removeAttribute(a5) : t7.setAttribute(a5, c5) : t7[a5] !== c5 && (t7[a5] = c5), s5 = true);
- }
- }
- return s5;
- };
- var A = (e3, t7, r3, o7, n8) => {
- if (r3 === o7)
- return false;
- o7 = o7 || l2;
- let p4, c5 = (r3 = r3 || l2).length, u3 = o7.length, h3 = 0, m2 = 0, v3 = false;
- for (; m2 < u3; ) {
- let l3 = h3 < c5 ? r3[h3] : void 0, u4 = o7[m2];
- if (void 0 !== l3 && s3(l3, u4))
- v3 = i(l3, u4, n8) || v3, h3++;
- else {
- let l4 = d2(r3, u4, h3 + 1);
- if (l4 >= 0) {
- for (p4 = h3; p4 < l4; p4++)
- y2(r3[p4]), a2(r3, p4, e3, "removed");
- v3 = i(r3[l4], u4, n8) || v3, h3 = l4 + 1;
- } else
- w2(u4, t7, h3 < c5 ? r3[h3].domNode : void 0, n8), f2(u4), a2(o7, m2, e3, "added");
- }
- m2++;
- }
- if (c5 > h3)
- for (p4 = h3; p4 < c5; p4++)
- y2(r3[p4]), a2(r3, p4, e3, "removed");
- return v3;
- };
- i = (e3, t7, o7) => {
- let i4 = e3.domNode, l3 = false;
- if (e3 === t7)
- return false;
- let s5 = false;
- if ("" === t7.vnodeSelector) {
- if (t7.text !== e3.text) {
- let e4 = i4.ownerDocument.createTextNode(t7.text);
- return i4.parentNode.replaceChild(e4, i4), t7.domNode = e4, l3 = true, l3;
- }
- t7.domNode = i4;
- } else
- 0 === t7.vnodeSelector.lastIndexOf("svg", 0) && (o7 = n3(o7, { namespace: r })), e3.text !== t7.text && (s5 = true, void 0 === t7.text ? i4.removeChild(i4.firstChild) : i4.textContent = t7.text), t7.domNode = i4, s5 = A(t7, i4, e3.children, t7.children, o7) || s5, s5 = k2(i4, e3.properties, t7.properties, o7) || s5, t7.properties && t7.properties.afterUpdate && t7.properties.afterUpdate.apply(t7.properties.bind || t7.properties, [i4, o7, t7.vnodeSelector, t7.properties, t7.children]);
- return s5 && t7.properties && t7.properties.updateAnimation && t7.properties.updateAnimation(i4, t7.properties, e3.properties), l3;
- };
- var S = (e3, t7) => ({ getLastRender: () => e3, update: (r3) => {
- if (e3.vnodeSelector !== r3.vnodeSelector)
- throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");
- let o7 = e3;
- e3 = r3, i(o7, r3, t7);
- }, domNode: e3.domNode });
- // node_modules/@arcgis/core/libs/maquette/dom.js
- var p3 = { namespace: void 0, performanceLogger: () => {
- }, eventHandlerInterceptor: void 0, styleApplyer: (e3, r3, o7) => {
- "-" === r3.charAt(0) ? e3.style.setProperty(r3, o7) : e3.style[r3] = o7;
- } };
- var d3 = (r3) => n3(p3, r3);
- var n4 = { create: (e3, t7) => (t7 = d3(t7), w2(e3, document.createElement("div"), void 0, t7), S(e3, t7)), append: (e3, t7, p4) => (p4 = d3(p4), w2(t7, e3, void 0, p4), S(t7, p4)), insertBefore: (e3, t7, p4) => (p4 = d3(p4), w2(t7, e3.parentNode, e3, p4), S(t7, p4)), merge: (e3, r3, p4) => (p4 = d3(p4), r3.domNode = e3, N(e3, r3, p4), S(r3, p4)), replace: (e3, t7, p4) => (p4 = d3(p4), w2(t7, e3.parentNode, e3, p4), e3.parentNode.removeChild(e3), S(t7, p4)) };
- // node_modules/@arcgis/core/libs/maquette/projector.js
- var t4;
- var n5 = (e3, r3) => {
- let t7 = [];
- for (; e3 && e3 !== r3; )
- t7.push(e3), e3 = e3.parentNode;
- return t7;
- };
- t4 = Array.prototype.find ? (e3, r3) => e3.find(r3) : (e3, r3) => e3.filter(r3)[0];
- var o4 = (e3, r3) => {
- let n8 = e3;
- return r3.forEach((e4) => {
- n8 = n8 && n8.children ? t4(n8.children, (r4) => r4.domNode === e4) : void 0;
- }), n8;
- };
- var d4 = (e3, r3, t7) => {
- let d6 = function(d7) {
- t7("domEvent", d7);
- let i4 = r3(), p4 = n5(d7.currentTarget, i4.domNode);
- p4.reverse();
- let l3, a4 = o4(i4.getLastRender(), p4);
- return e3.scheduleRender(), a4 && (l3 = a4.properties[`on${d7.type}`].apply(a4.properties.bind || this, arguments)), t7("domEventProcessed", d7), l3;
- };
- return (e4, r4, t8, n8) => d6;
- };
- var i2 = (t7) => {
- let n8, o7, i4 = d3(t7), p4 = i4.performanceLogger, l3 = true, a4 = false, s5 = [], c5 = [], u3 = (e3, r3, t8) => {
- let o8, l4 = () => o8;
- i4.eventHandlerInterceptor = d4(n8, l4, p4), o8 = e3(r3, t8(), i4), s5.push(o8), c5.push(t8);
- }, f3 = () => {
- if (o7 = void 0, l3) {
- l3 = false, p4("renderStart", void 0);
- for (let e3 = 0; e3 < s5.length; e3++) {
- let r3 = c5[e3]();
- p4("rendered", void 0), s5[e3].update(r3), p4("patched", void 0);
- }
- p4("renderDone", void 0), l3 = true;
- }
- };
- return n8 = { renderNow: f3, scheduleRender: () => {
- o7 || a4 || (o7 = requestAnimationFrame(f3));
- }, stop: () => {
- o7 && (cancelAnimationFrame(o7), o7 = void 0), a4 = true;
- }, resume: () => {
- a4 = false, l3 = true, n8.scheduleRender();
- }, append: (e3, t8) => {
- u3(n4.append, e3, t8);
- }, insertBefore: (e3, t8) => {
- u3(n4.insertBefore, e3, t8);
- }, merge: (e3, t8) => {
- u3(n4.merge, e3, t8);
- }, replace: (e3, t8) => {
- u3(n4.replace, e3, t8);
- }, detach: (e3) => {
- for (let r3 = 0; r3 < c5.length; r3++)
- if (c5[r3] === e3)
- return c5.splice(r3, 1), s5.splice(r3, 1)[0];
- throw new Error("renderFunction was not found");
- } }, n8;
- };
- // node_modules/@arcgis/core/widgets/support/jsxWidgetSupport.js
- var t5 = Symbol("widget");
- var r2 = [];
- var n6 = {};
- var o5 = /* @__PURE__ */ new WeakMap();
- function i3(e3, t7) {
- let o7 = t7.children;
- if (o7 && o7.length)
- for (let r3 = 0; r3 < o7.length; ++r3)
- o7[r3] = i3(e3, o7[r3]);
- else
- o7 = r2;
- const l3 = t7.vnodeSelector;
- if (a3(l3)) {
- const r3 = t7.properties || n6, i4 = r3.key || l3;
- return { vnodeSelector: "div", properties: { key: i4, afterCreate: d5, afterUpdate: c4, afterRemoved: s4, parentWidget: e3, widgetConstructor: l3, widgetProperties: { ...r3, key: i4, children: o7 } }, children: void 0, text: void 0, domNode: null };
- }
- return t7;
- }
- function d5(t7, r3, n8, { parentWidget: i4, widgetConstructor: d6, widgetProperties: c5 }) {
- var _a;
- const a4 = new d6(c5);
- a4.container = t7, o5.set(t7, a4), (_a = a4.afterCreate) == null ? void 0 : _a.call(a4, a4, t7), i4._internalHandles.add(n(() => s4(t7)));
- }
- function c4(e3, t7, r3, { widgetProperties: n8 }) {
- var _a;
- const i4 = o5.get(e3);
- i4 && (i4.set(n8), (_a = i4.afterUpdate) == null ? void 0 : _a.call(i4, i4, e3));
- }
- function s4(e3) {
- const t7 = o5.get(e3);
- t7 && (t7.destroy(), o5.delete(e3));
- }
- function a3(e3) {
- return "function" == typeof e3 && e3[t5];
- }
- // node_modules/@arcgis/core/widgets/support/jsxFactory.js
- var e2 = function(r3) {
- return { vnodeSelector: "", properties: void 0, children: void 0, text: r3.toString(), domNode: null };
- };
- var o6 = function(r3, t7) {
- for (var n8 = 0, i4 = r3.length; n8 < i4; n8++) {
- var d6 = r3[n8];
- Array.isArray(d6) ? o6(d6, t7) : null != d6 && false !== d6 && (d6.hasOwnProperty("vnodeSelector") || (d6 = e2(d6)), t7.push(d6));
- }
- };
- var t6 = function(r3, e3) {
- for (var t7 = [], n8 = 2; n8 < arguments.length; n8++)
- t7[n8 - 2] = arguments[n8];
- if (1 === t7.length && "string" == typeof t7[0])
- return { vnodeSelector: r3, properties: e3 || void 0, children: void 0, text: t7[0], domNode: null };
- var i4 = [];
- return o6(t7, i4), { vnodeSelector: r3, properties: e3 || void 0, children: i4, text: void 0, domNode: null };
- };
- function n7(e3, o7, ...n8) {
- return "function" != typeof e3 || a3(e3) ? t6(e3, o7, ...n8) : e3(o7, ...n8);
- }
- export {
- t2 as t,
- e,
- c,
- o,
- p,
- f,
- h,
- v,
- w,
- k,
- n4 as n,
- i2 as i,
- t5 as t2,
- i3 as i2,
- a3 as a,
- n7 as n2
- };
- /*!
- * @esri/arcgis-html-sanitizer - v3.0.1 - Tue Nov 15 2022 09:46:54 GMT-0800 (Pacific Standard Time)
- * Copyright (c) 2022 - Environmental Systems Research Institute, Inc.
- * Apache-2.0
- *
- * js-xss
- * Copyright (c) 2012-2018 Zongmin Lei(雷宗民) <leizongmin@gmail.com>
- * http://ucdok.com
- * MIT License, see https://github.com/leizongmin/js-xss/blob/master/LICENSE for details
- */
- //# sourceMappingURL=chunk-GZBNC76D.js.map
|