FitTrackee/fittrackee/dist/static/js/workouts.da9513e1.js.map
2022-12-11 19:00:11 +01:00

1 line
954 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"file":"static/js/workouts.da9513e1.js","mappings":"6HAEA,IAAIA,EAAoB,SAA2BC,GAClD,OAAOC,EAAgBD,KAClBE,EAAUF,EAChB,EAEA,SAASC,EAAgBD,GACxB,QAASA,GAA0B,kBAAVA,CAC1B,CAEA,SAASE,EAAUF,GAClB,IAAIG,EAAcC,OAAOC,UAAUC,SAASC,KAAKP,GAEjD,MAAuB,oBAAhBG,GACa,kBAAhBA,GACAK,EAAeR,EACpB,CAGA,IAAIS,EAAiC,oBAAXC,QAAyBA,OAAOC,IACtDC,EAAqBH,EAAeC,OAAOC,IAAI,iBAAmB,MAEtE,SAASH,EAAeR,GACvB,OAAOA,EAAMa,WAAaD,CAC3B,CAEA,SAASE,EAAYC,GACpB,OAAOC,MAAMC,QAAQF,GAAO,GAAK,CAAC,CACnC,CAEA,SAASG,EAA8BlB,EAAOmB,GAC7C,OAA0B,IAAlBA,EAAQC,OAAmBD,EAAQpB,kBAAkBC,GAC1DqB,EAAUP,EAAYd,GAAQA,EAAOmB,GACrCnB,CACJ,CAEA,SAASsB,EAAkBC,EAAQC,EAAQL,GAC1C,OAAOI,EAAOE,OAAOD,GAAQE,KAAI,SAASC,GACzC,OAAOT,EAA8BS,EAASR,EAC/C,GACD,CAEA,SAASS,EAAiBC,EAAKV,GAC9B,IAAKA,EAAQW,YACZ,OAAOT,EAER,IAAIS,EAAcX,EAAQW,YAAYD,GACtC,MAA8B,oBAAhBC,EAA6BA,EAAcT,CAC1D,CAEA,SAASU,EAAgCR,GACxC,OAAOnB,OAAO4B,sBACX5B,OAAO4B,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AATxH,GACTz9D,KAAKykE,SAASiD,kBAAkB,gDAChC1nE,KAAKilE,aAAa,iBAGlBjlE,KAAKykE,SAASkD,iBACd3nE,KAAKglE,UACLhlE,KAAKykE,SAASmD,sBAAsBnK,KAEpCz9D,KAAKilE,aAAa,iBAGlBjlE,KAAKykE,SAASkD,iBAElB,EACAE,cAAe,WACb,IAAIpK,EAAOz9D,KAAK8kE,OAEZjhD,GAAQ45C,IACVz9D,KAAKilE,aAAa,sBAGlBjlE,KAAKglE,WACa,MAATvH,GACTz9D,KAAKykE,SAASqD,qBAAoB,GAClC9nE,KAAKykE,SAASsD,uBACd/nE,KAAKglE,UACLhlE,KAAKilE,aAAa,wBAGA,MAATxH,GACTz9D,KAAKilE,aAAa,wBAGlBjlE,KAAKglE,WACa,MAATvH,GACTz9D,KAAKykE,SAASqD,qBAAoB,GAClC9nE,KAAKykE,SAASsD,uBACd/nE,KAAKglE,UACLhlE,KAAKykE,SAAS8C,YACdvnE,KAAKilE,aAAa,eAGA,MAATxH,GAAyB,MAATA,GAAyB,MAATA,GACzCz9D,KAAKykE,SAASiD,kBAAkBjK,EAAO,oDACvCz9D,KAAKglE,UACLhlE,KAAKykE,SAASmD,sBAAsBnK,KAEpCz9D,KAAKglE,UACLhlE,KAAKykE,SAASmD,sBAAsBnK,GAExC,EACAuK,mBAAoB,WAClB,IAAIvK,EAAOz9D,KAAK8kE,OAEZjhD,GAAQ45C,GACVz9D,KAAKglE,UAEa,MAATvH,GACTz9D,KAAKykE,SAASqD,qBAAoB,GAClC9nE,KAAKykE,SAASsD,uBACd/nE,KAAKglE,UACLhlE,KAAKilE,aAAa,wBAGA,MAATxH,GACTz9D,KAAKglE,UACLhlE,KAAKilE,aAAa,yBAGA,MAATxH,GACTz9D,KAAKykE,SAASqD,qBAAoB,GAClC9nE,KAAKykE,SAASsD,uBACd/nE,KAAKglE,UACLhlE,KAAKykE,SAAS8C,YACdvnE,KAAKilE,aAAa,gBAIlBjlE,KAAKykE,SAASqD,qB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EACR,MAAO7uE,IACL+K,GAAM0jE,EAA6B,GAAhBxhE,KAAK6hE,SAAiB,GAE3C,OAAO/jE,GAET1L,EAAOC,QAAU,CAAEsuB,SAAQ8gD,iB","sources":["webpack://fittrackee_client/./node_modules/deepmerge/dist/cjs.js","webpack://fittrackee_client/./node_modules/dom-serializer/lib/foreignNames.js","webpack://fittrackee_client/./node_modules/dom-serializer/lib/index.js","webpack://fittrackee_client/./node_modules/domelementtype/lib/index.js","webpack://fittrackee_client/./node_modules/domhandler/lib/index.js","webpack://fittrackee_client/./node_modules/domhandler/lib/node.js","webpack://fittrackee_client/./node_modules/domutils/lib/feeds.js","webpack://fittrackee_client/./node_modules/domutils/lib/helpers.js","webpack://fittrackee_client/./node_modules/domutils/lib/index.js","webpack://fittrackee_client/./node_modules/domutils/lib/legacy.js","webpack://fittrackee_client/./node_modules/domutils/lib/manipulation.js","webpack://fittrackee_client/./node_modules/domutils/lib/querying.js","webpack://fittrackee_client/./node_modules/domutils/lib/stringify.js","webpack://fittrackee_client/./node_modules/domutils/lib/traversal.js","webpack://fittrackee_client/./node_modules/entities/lib/decode.js","webpack://fittrackee_client/./node_modules/entities/lib/decode_codepoint.js","webpack://fittrackee_client/./node_modules/entities/lib/encode.js","webpack://fittrackee_client/./node_modules/entities/lib/index.js","webpack://fittrackee_client/./node_modules/escape-string-regexp/index.js","webpack://fittrackee_client/./node_modules/htmlparser2/lib/FeedHandler.js","webpack://fittrackee_client/./node_modules/htmlparser2/lib/Parser.js","webpack://fittrackee_client/./node_modules/htmlparser2/lib/Tokenizer.js","webpack://fittrackee_client/./node_modules/htmlparser2/lib/index.js","webpack://fittrackee_client/./node_modules/is-plain-object/dist/is-plain-object.js","webpack://fittrackee_client/./node_modules/parse-srcset/src/parse-srcset.js","webpack://fittrackee_client/./node_modules/picocolors/picocolors.browser.js","webpack://fittrackee_client/./node_modules/postcss/lib/at-rule.js","webpack://fittrackee_client/./node_modules/postcss/lib/comment.js","webpack://fittrackee_client/./node_modules/postcss/lib/container.js","webpack://fittrackee_client/./node_modules/postcss/lib/css-syntax-error.js","webpack://fittrackee_client/./node_modules/postcss/lib/declaration.js","webpack://fittrackee_client/./node_modules/postcss/lib/document.js","webpack://fittrackee_client/./node_modules/postcss/lib/fromJSON.js","webpack://fittrackee_client/./node_modules/postcss/lib/input.js","webpack://fittrackee_client/./node_modules/postcss/lib/lazy-result.js","webpack://fittrackee_client/./node_modules/postcss/lib/list.js","webpack://fittrackee_client/./node_modules/postcss/lib/map-generator.js","webpack://fittrackee_client/./node_modules/postcss/lib/no-work-result.js","webpack://fittrackee_client/./node_modules/postcss/lib/node.js","webpack://fittrackee_client/./node_modules/postcss/lib/parse.js","webpack://fittrackee_client/./node_modules/postcss/lib/parser.js","webpack://fittrackee_client/./node_modules/postcss/lib/postcss.js","webpack://fittrackee_client/./node_modules/postcss/lib/previous-map.js","webpack://fittrackee_client/./node_modules/postcss/lib/processor.js","webpack://fittrackee_client/./node_modules/postcss/lib/result.js","webpack://fittrackee_client/./node_modules/postcss/lib/root.js","webpack://fittrackee_client/./node_modules/postcss/lib/rule.js","webpack://fittrackee_client/./node_modules/postcss/lib/stringifier.js","webpack://fittrackee_client/./node_modules/postcss/lib/stringify.js","webpack://fittrackee_client/./node_modules/postcss/lib/symbols.js","webpack://fittrackee_client/./node_modules/postcss/lib/tokenize.js","webpack://fittrackee_client/./node_modules/postcss/lib/warn-once.js","webpack://fittrackee_client/./node_modules/postcss/lib/warning.js","webpack://fittrackee_client/./node_modules/sanitize-html/index.js","webpack://fittrackee_client/./src/components/Workout/WorkoutEdition.vue?1df7","webpack://fittrackee_client/./src/components/Workout/WorkoutEdition.vue","webpack://fittrackee_client/./src/views/workouts/AddWorkout.vue?212d","webpack://fittrackee_client/./src/views/workouts/AddWorkout.vue","webpack://fittrackee_client/./src/views/workouts/EditWorkout.vue?ba9e","webpack://fittrackee_client/./src/views/workouts/EditWorkout.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutCardTitle.vue?4e0b","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutCardTitle.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutRecord.vue?0a89","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutRecord.vue","webpack://fittrackee_client/./src/utils/weather.ts","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WeatherWind.vue?bd35","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WeatherWind.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutWeather.vue?84e1","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutWeather.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutData.vue?ef29","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutData.vue","webpack://fittrackee_client/./node_modules/@tmcw/togeojson/dist/togeojson.es.mjs","webpack://fittrackee_client/./node_modules/@vue-leaflet/vue-leaflet/dist/vue-leaflet.esm.js","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutMap/CustomMarker.vue?3193","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutMap/CustomMarker.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutMap/index.vue?a62d","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutMap/index.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/index.vue?8ebb","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/index.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutChart/legend.ts","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutChart/index.vue?65aa","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutChart/index.vue","webpack://fittrackee_client/./node_modules/linkifyjs/dist/linkify.es.js","webpack://fittrackee_client/./node_modules/linkify-html/dist/linkify-html.es.js","webpack://fittrackee_client/./src/utils/inputs.ts","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutNotes.vue?a827","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutNotes.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutSegments.vue?037e","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutSegments.vue","webpack://fittrackee_client/./src/views/workouts/Workout.vue?3305","webpack://fittrackee_client/./src/views/workouts/Workout.vue","webpack://fittrackee_client/./src/components/Workouts/WorkoutsFilters.vue?c3bc","webpack://fittrackee_client/./src/components/Workouts/WorkoutsFilters.vue","webpack://fittrackee_client/./src/components/Workouts/WorkoutsList.vue?72e6","webpack://fittrackee_client/./src/components/Workouts/WorkoutsList.vue","webpack://fittrackee_client/./src/views/workouts/WorkoutsView.vue?ee31","webpack://fittrackee_client/./src/views/workouts/WorkoutsView.vue","webpack://fittrackee_client/./node_modules/nanoid/non-secure/index.cjs"],"sourcesContent":["'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn target.propertyIsEnumerable(symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.attributeNames = exports.elementNames = void 0;\nexports.elementNames = new Map([\n [\"altglyph\", \"altGlyph\"],\n [\"altglyphdef\", \"altGlyphDef\"],\n [\"altglyphitem\", \"altGlyphItem\"],\n [\"animatecolor\", \"animateColor\"],\n [\"animatemotion\", \"animateMotion\"],\n [\"animatetransform\", \"animateTransform\"],\n [\"clippath\", \"clipPath\"],\n [\"feblend\", \"feBlend\"],\n [\"fecolormatrix\", \"feColorMatrix\"],\n [\"fecomponenttransfer\", \"feComponentTransfer\"],\n [\"fecomposite\", \"feComposite\"],\n [\"feconvolvematrix\", \"feConvolveMatrix\"],\n [\"fediffuselighting\", \"feDiffuseLighting\"],\n [\"fedisplacementmap\", \"feDisplacementMap\"],\n [\"fedistantlight\", \"feDistantLight\"],\n [\"fedropshadow\", \"feDropShadow\"],\n [\"feflood\", \"feFlood\"],\n [\"fefunca\", \"feFuncA\"],\n [\"fefuncb\", \"feFuncB\"],\n [\"fefuncg\", \"feFuncG\"],\n [\"fefuncr\", \"feFuncR\"],\n [\"fegaussianblur\", \"feGaussianBlur\"],\n [\"feimage\", \"feImage\"],\n [\"femerge\", \"feMerge\"],\n [\"femergenode\", \"feMergeNode\"],\n [\"femorphology\", \"feMorphology\"],\n [\"feoffset\", \"feOffset\"],\n [\"fepointlight\", \"fePointLight\"],\n [\"fespecularlighting\", \"feSpecularLighting\"],\n [\"fespotlight\", \"feSpotLight\"],\n [\"fetile\", \"feTile\"],\n [\"feturbulence\", \"feTurbulence\"],\n [\"foreignobject\", \"foreignObject\"],\n [\"glyphref\", \"glyphRef\"],\n [\"lineargradient\", \"linearGradient\"],\n [\"radialgradient\", \"radialGradient\"],\n [\"textpath\", \"textPath\"],\n]);\nexports.attributeNames = new Map([\n [\"definitionurl\", \"definitionURL\"],\n [\"attributename\", \"attributeName\"],\n [\"attributetype\", \"attributeType\"],\n [\"basefrequency\", \"baseFrequency\"],\n [\"baseprofile\", \"baseProfile\"],\n [\"calcmode\", \"calcMode\"],\n [\"clippathunits\", \"clipPathUnits\"],\n [\"diffuseconstant\", \"diffuseConstant\"],\n [\"edgemode\", \"edgeMode\"],\n [\"filterunits\", \"filterUnits\"],\n [\"glyphref\", \"glyphRef\"],\n [\"gradienttransform\", \"gradientTransform\"],\n [\"gradientunits\", \"gradientUnits\"],\n [\"kernelmatrix\", \"kernelMatrix\"],\n [\"kernelunitlength\", \"kernelUnitLength\"],\n [\"keypoints\", \"keyPoints\"],\n [\"keysplines\", \"keySplines\"],\n [\"keytimes\", \"keyTimes\"],\n [\"lengthadjust\", \"lengthAdjust\"],\n [\"limitingconeangle\", \"limitingConeAngle\"],\n [\"markerheight\", \"markerHeight\"],\n [\"markerunits\", \"markerUnits\"],\n [\"markerwidth\", \"markerWidth\"],\n [\"maskcontentunits\", \"maskContentUnits\"],\n [\"maskunits\", \"maskUnits\"],\n [\"numoctaves\", \"numOctaves\"],\n [\"pathlength\", \"pathLength\"],\n [\"patterncontentunits\", \"patternContentUnits\"],\n [\"patterntransform\", \"patternTransform\"],\n [\"patternunits\", \"patternUnits\"],\n [\"pointsatx\", \"pointsAtX\"],\n [\"pointsaty\", \"pointsAtY\"],\n [\"pointsatz\", \"pointsAtZ\"],\n [\"preservealpha\", \"preserveAlpha\"],\n [\"preserveaspectratio\", \"preserveAspectRatio\"],\n [\"primitiveunits\", \"primitiveUnits\"],\n [\"refx\", \"refX\"],\n [\"refy\", \"refY\"],\n [\"repeatcount\", \"repeatCount\"],\n [\"repeatdur\", \"repeatDur\"],\n [\"requiredextensions\", \"requiredExtensions\"],\n [\"requiredfeatures\", \"requiredFeatures\"],\n [\"specularconstant\", \"specularConstant\"],\n [\"specularexponent\", \"specularExponent\"],\n [\"spreadmethod\", \"spreadMethod\"],\n [\"startoffset\", \"startOffset\"],\n [\"stddeviation\", \"stdDeviation\"],\n [\"stitchtiles\", \"stitchTiles\"],\n [\"surfacescale\", \"surfaceScale\"],\n [\"systemlanguage\", \"systemLanguage\"],\n [\"tablevalues\", \"tableValues\"],\n [\"targetx\", \"targetX\"],\n [\"targety\", \"targetY\"],\n [\"textlength\", \"textLength\"],\n [\"viewbox\", \"viewBox\"],\n [\"viewtarget\", \"viewTarget\"],\n [\"xchannelselector\", \"xChannelSelector\"],\n [\"ychannelselector\", \"yChannelSelector\"],\n [\"zoomandpan\", \"zoomAndPan\"],\n]);\n","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Module dependencies\n */\nvar ElementType = __importStar(require(\"domelementtype\"));\nvar entities_1 = require(\"entities\");\n/**\n * Mixed-case SVG and MathML tags & attributes\n * recognized by the HTML parser.\n *\n * @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign\n */\nvar foreignNames_1 = require(\"./foreignNames\");\nvar unencodedElements = new Set([\n \"style\",\n \"script\",\n \"xmp\",\n \"iframe\",\n \"noembed\",\n \"noframes\",\n \"plaintext\",\n \"noscript\",\n]);\n/**\n * Format attributes\n */\nfunction formatAttributes(attributes, opts) {\n if (!attributes)\n return;\n return Object.keys(attributes)\n .map(function (key) {\n var _a, _b;\n var value = (_a = attributes[key]) !== null && _a !== void 0 ? _a : \"\";\n if (opts.xmlMode === \"foreign\") {\n /* Fix up mixed-case attribute names */\n key = (_b = foreignNames_1.attributeNames.get(key)) !== null && _b !== void 0 ? _b : key;\n }\n if (!opts.emptyAttrs && !opts.xmlMode && value === \"\") {\n return key;\n }\n return key + \"=\\\"\" + (opts.decodeEntities !== false\n ? entities_1.encodeXML(value)\n : value.replace(/\"/g, \"&quot;\")) + \"\\\"\";\n })\n .join(\" \");\n}\n/**\n * Self-enclosing tags\n */\nvar singleTag = new Set([\n \"area\",\n \"base\",\n \"basefont\",\n \"br\",\n \"col\",\n \"command\",\n \"embed\",\n \"frame\",\n \"hr\",\n \"img\",\n \"input\",\n \"isindex\",\n \"keygen\",\n \"link\",\n \"meta\",\n \"param\",\n \"source\",\n \"track\",\n \"wbr\",\n]);\n/**\n * Renders a DOM node or an array of DOM nodes to a string.\n *\n * Can be thought of as the equivalent of the `outerHTML` of the passed node(s).\n *\n * @param node Node to be rendered.\n * @param options Changes serialization behavior\n */\nfunction render(node, options) {\n if (options === void 0) { options = {}; }\n var nodes = \"length\" in node ? node : [node];\n var output = \"\";\n for (var i = 0; i < nodes.length; i++) {\n output += renderNode(nodes[i], options);\n }\n return output;\n}\nexports.default = render;\nfunction renderNode(node, options) {\n switch (node.type) {\n case ElementType.Root:\n return render(node.children, options);\n case ElementType.Directive:\n case ElementType.Doctype:\n return renderDirective(node);\n case ElementType.Comment:\n return renderComment(node);\n case ElementType.CDATA:\n return renderCdata(node);\n case ElementType.Script:\n case ElementType.Style:\n case ElementType.Tag:\n return renderTag(node, options);\n case ElementType.Text:\n return renderText(node, options);\n }\n}\nvar foreignModeIntegrationPoints = new Set([\n \"mi\",\n \"mo\",\n \"mn\",\n \"ms\",\n \"mtext\",\n \"annotation-xml\",\n \"foreignObject\",\n \"desc\",\n \"title\",\n]);\nvar foreignElements = new Set([\"svg\", \"math\"]);\nfunction renderTag(elem, opts) {\n var _a;\n // Handle SVG / MathML in HTML\n if (opts.xmlMode === \"foreign\") {\n /* Fix up mixed-case element names */\n elem.name = (_a = foreignNames_1.elementNames.get(elem.name)) !== null && _a !== void 0 ? _a : elem.name;\n /* Exit foreign mode at integration points */\n if (elem.parent &&\n foreignModeIntegrationPoints.has(elem.parent.name)) {\n opts = __assign(__assign({}, opts), { xmlMode: false });\n }\n }\n if (!opts.xmlMode && foreignElements.has(elem.name)) {\n opts = __assign(__assign({}, opts), { xmlMode: \"foreign\" });\n }\n var tag = \"<\" + elem.name;\n var attribs = formatAttributes(elem.attribs, opts);\n if (attribs) {\n tag += \" \" + attribs;\n }\n if (elem.children.length === 0 &&\n (opts.xmlMode\n ? // In XML mode or foreign mode, and user hasn't explicitly turned off self-closing tags\n opts.selfClosingTags !== false\n : // User explicitly asked for self-closing tags, even in HTML mode\n opts.selfClosingTags && singleTag.has(elem.name))) {\n if (!opts.xmlMode)\n tag += \" \";\n tag += \"/>\";\n }\n else {\n tag += \">\";\n if (elem.children.length > 0) {\n tag += render(elem.children, opts);\n }\n if (opts.xmlMode || !singleTag.has(elem.name)) {\n tag += \"</\" + elem.name + \">\";\n }\n }\n return tag;\n}\nfunction renderDirective(elem) {\n return \"<\" + elem.data + \">\";\n}\nfunction renderText(elem, opts) {\n var data = elem.data || \"\";\n // If entities weren't decoded, no need to encode them back\n if (opts.decodeEntities !== false &&\n !(!opts.xmlMode &&\n elem.parent &&\n unencodedElements.has(elem.parent.name))) {\n data = entities_1.encodeXML(data);\n }\n return data;\n}\nfunction renderCdata(elem) {\n return \"<![CDATA[\" + elem.children[0].data + \"]]>\";\n}\nfunction renderComment(elem) {\n return \"<!--\" + elem.data + \"-->\";\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = exports.ElementType = void 0;\n/** Types of elements found in htmlparser2's DOM */\nvar ElementType;\n(function (ElementType) {\n /** Type for the root element of a document */\n ElementType[\"Root\"] = \"root\";\n /** Type for Text */\n ElementType[\"Text\"] = \"text\";\n /** Type for <? ... ?> */\n ElementType[\"Directive\"] = \"directive\";\n /** Type for <!-- ... --> */\n ElementType[\"Comment\"] = \"comment\";\n /** Type for <script> tags */\n ElementType[\"Script\"] = \"script\";\n /** Type for <style> tags */\n ElementType[\"Style\"] = \"style\";\n /** Type for Any tag */\n ElementType[\"Tag\"] = \"tag\";\n /** Type for <![CDATA[ ... ]]> */\n ElementType[\"CDATA\"] = \"cdata\";\n /** Type for <!doctype ...> */\n ElementType[\"Doctype\"] = \"doctype\";\n})(ElementType = exports.ElementType || (exports.ElementType = {}));\n/**\n * Tests whether an element is a tag or not.\n *\n * @param elem Element to test\n */\nfunction isTag(elem) {\n return (elem.type === ElementType.Tag ||\n elem.type === ElementType.Script ||\n elem.type === ElementType.Style);\n}\nexports.isTag = isTag;\n// Exports for backwards compatibility\n/** Type for the root element of a document */\nexports.Root = ElementType.Root;\n/** Type for Text */\nexports.Text = ElementType.Text;\n/** Type for <? ... ?> */\nexports.Directive = ElementType.Directive;\n/** Type for <!-- ... --> */\nexports.Comment = ElementType.Comment;\n/** Type for <script> tags */\nexports.Script = ElementType.Script;\n/** Type for <style> tags */\nexports.Style = ElementType.Style;\n/** Type for Any tag */\nexports.Tag = ElementType.Tag;\n/** Type for <![CDATA[ ... ]]> */\nexports.CDATA = ElementType.CDATA;\n/** Type for <!doctype ...> */\nexports.Doctype = ElementType.Doctype;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DomHandler = void 0;\nvar domelementtype_1 = require(\"domelementtype\");\nvar node_1 = require(\"./node\");\n__exportStar(require(\"./node\"), exports);\nvar reWhitespace = /\\s+/g;\n// Default options\nvar defaultOpts = {\n normalizeWhitespace: false,\n withStartIndices: false,\n withEndIndices: false,\n xmlMode: false,\n};\nvar DomHandler = /** @class */ (function () {\n /**\n * @param callback Called once parsing has completed.\n * @param options Settings for the handler.\n * @param elementCB Callback whenever a tag is closed.\n */\n function DomHandler(callback, options, elementCB) {\n /** The elements of the DOM */\n this.dom = [];\n /** The root element for the DOM */\n this.root = new node_1.Document(this.dom);\n /** Indicated whether parsing has been completed. */\n this.done = false;\n /** Stack of open tags. */\n this.tagStack = [this.root];\n /** A data node that is still being written to. */\n this.lastNode = null;\n /** Reference to the parser instance. Used for location information. */\n this.parser = null;\n // Make it possible to skip arguments, for backwards-compatibility\n if (typeof options === \"function\") {\n elementCB = options;\n options = defaultOpts;\n }\n if (typeof callback === \"object\") {\n options = callback;\n callback = undefined;\n }\n this.callback = callback !== null && callback !== void 0 ? callback : null;\n this.options = options !== null && options !== void 0 ? options : defaultOpts;\n this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null;\n }\n DomHandler.prototype.onparserinit = function (parser) {\n this.parser = parser;\n };\n // Resets the handler back to starting state\n DomHandler.prototype.onreset = function () {\n this.dom = [];\n this.root = new node_1.Document(this.dom);\n this.done = false;\n this.tagStack = [this.root];\n this.lastNode = null;\n this.parser = null;\n };\n // Signals the handler that parsing is done\n DomHandler.prototype.onend = function () {\n if (this.done)\n return;\n this.done = true;\n this.parser = null;\n this.handleCallback(null);\n };\n DomHandler.prototype.onerror = function (error) {\n this.handleCallback(error);\n };\n DomHandler.prototype.onclosetag = function () {\n this.lastNode = null;\n var elem = this.tagStack.pop();\n if (this.options.withEndIndices) {\n elem.endIndex = this.parser.endIndex;\n }\n if (this.elementCB)\n this.elementCB(elem);\n };\n DomHandler.prototype.onopentag = function (name, attribs) {\n var type = this.options.xmlMode ? domelementtype_1.ElementType.Tag : undefined;\n var element = new node_1.Element(name, attribs, undefined, type);\n this.addNode(element);\n this.tagStack.push(element);\n };\n DomHandler.prototype.ontext = function (data) {\n var normalizeWhitespace = this.options.normalizeWhitespace;\n var lastNode = this.lastNode;\n if (lastNode && lastNode.type === domelementtype_1.ElementType.Text) {\n if (normalizeWhitespace) {\n lastNode.data = (lastNode.data + data).replace(reWhitespace, \" \");\n }\n else {\n lastNode.data += data;\n }\n if (this.options.withEndIndices) {\n lastNode.endIndex = this.parser.endIndex;\n }\n }\n else {\n if (normalizeWhitespace) {\n data = data.replace(reWhitespace, \" \");\n }\n var node = new node_1.Text(data);\n this.addNode(node);\n this.lastNode = node;\n }\n };\n DomHandler.prototype.oncomment = function (data) {\n if (this.lastNode && this.lastNode.type === domelementtype_1.ElementType.Comment) {\n this.lastNode.data += data;\n return;\n }\n var node = new node_1.Comment(data);\n this.addNode(node);\n this.lastNode = node;\n };\n DomHandler.prototype.oncommentend = function () {\n this.lastNode = null;\n };\n DomHandler.prototype.oncdatastart = function () {\n var text = new node_1.Text(\"\");\n var node = new node_1.NodeWithChildren(domelementtype_1.ElementType.CDATA, [text]);\n this.addNode(node);\n text.parent = node;\n this.lastNode = text;\n };\n DomHandler.prototype.oncdataend = function () {\n this.lastNode = null;\n };\n DomHandler.prototype.onprocessinginstruction = function (name, data) {\n var node = new node_1.ProcessingInstruction(name, data);\n this.addNode(node);\n };\n DomHandler.prototype.handleCallback = function (error) {\n if (typeof this.callback === \"function\") {\n this.callback(error, this.dom);\n }\n else if (error) {\n throw error;\n }\n };\n DomHandler.prototype.addNode = function (node) {\n var parent = this.tagStack[this.tagStack.length - 1];\n var previousSibling = parent.children[parent.children.length - 1];\n if (this.options.withStartIndices) {\n node.startIndex = this.parser.startIndex;\n }\n if (this.options.withEndIndices) {\n node.endIndex = this.parser.endIndex;\n }\n parent.children.push(node);\n if (previousSibling) {\n node.prev = previousSibling;\n previousSibling.next = node;\n }\n node.parent = parent;\n this.lastNode = null;\n };\n return DomHandler;\n}());\nexports.DomHandler = DomHandler;\nexports.default = DomHandler;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.cloneNode = exports.hasChildren = exports.isDocument = exports.isDirective = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = exports.Element = exports.Document = exports.NodeWithChildren = exports.ProcessingInstruction = exports.Comment = exports.Text = exports.DataNode = exports.Node = void 0;\nvar domelementtype_1 = require(\"domelementtype\");\nvar nodeTypes = new Map([\n [domelementtype_1.ElementType.Tag, 1],\n [domelementtype_1.ElementType.Script, 1],\n [domelementtype_1.ElementType.Style, 1],\n [domelementtype_1.ElementType.Directive, 1],\n [domelementtype_1.ElementType.Text, 3],\n [domelementtype_1.ElementType.CDATA, 4],\n [domelementtype_1.ElementType.Comment, 8],\n [domelementtype_1.ElementType.Root, 9],\n]);\n/**\n * This object will be used as the prototype for Nodes when creating a\n * DOM-Level-1-compliant structure.\n */\nvar Node = /** @class */ (function () {\n /**\n *\n * @param type The type of the node.\n */\n function Node(type) {\n this.type = type;\n /** Parent of the node */\n this.parent = null;\n /** Previous sibling */\n this.prev = null;\n /** Next sibling */\n this.next = null;\n /** The start index of the node. Requires `withStartIndices` on the handler to be `true. */\n this.startIndex = null;\n /** The end index of the node. Requires `withEndIndices` on the handler to be `true. */\n this.endIndex = null;\n }\n Object.defineProperty(Node.prototype, \"nodeType\", {\n // Read-only aliases\n /**\n * [DOM spec](https://dom.spec.whatwg.org/#dom-node-nodetype)-compatible\n * node {@link type}.\n */\n get: function () {\n var _a;\n return (_a = nodeTypes.get(this.type)) !== null && _a !== void 0 ? _a : 1;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Node.prototype, \"parentNode\", {\n // Read-write aliases for properties\n /**\n * Same as {@link parent}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get: function () {\n return this.parent;\n },\n set: function (parent) {\n this.parent = parent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Node.prototype, \"previousSibling\", {\n /**\n * Same as {@link prev}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get: function () {\n return this.prev;\n },\n set: function (prev) {\n this.prev = prev;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Node.prototype, \"nextSibling\", {\n /**\n * Same as {@link next}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get: function () {\n return this.next;\n },\n set: function (next) {\n this.next = next;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Clone this node, and optionally its children.\n *\n * @param recursive Clone child nodes as well.\n * @returns A clone of the node.\n */\n Node.prototype.cloneNode = function (recursive) {\n if (recursive === void 0) { recursive = false; }\n return cloneNode(this, recursive);\n };\n return Node;\n}());\nexports.Node = Node;\n/**\n * A node that contains some data.\n */\nvar DataNode = /** @class */ (function (_super) {\n __extends(DataNode, _super);\n /**\n * @param type The type of the node\n * @param data The content of the data node\n */\n function DataNode(type, data) {\n var _this = _super.call(this, type) || this;\n _this.data = data;\n return _this;\n }\n Object.defineProperty(DataNode.prototype, \"nodeValue\", {\n /**\n * Same as {@link data}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get: function () {\n return this.data;\n },\n set: function (data) {\n this.data = data;\n },\n enumerable: false,\n configurable: true\n });\n return DataNode;\n}(Node));\nexports.DataNode = DataNode;\n/**\n * Text within the document.\n */\nvar Text = /** @class */ (function (_super) {\n __extends(Text, _super);\n function Text(data) {\n return _super.call(this, domelementtype_1.ElementType.Text, data) || this;\n }\n return Text;\n}(DataNode));\nexports.Text = Text;\n/**\n * Comments within the document.\n */\nvar Comment = /** @class */ (function (_super) {\n __extends(Comment, _super);\n function Comment(data) {\n return _super.call(this, domelementtype_1.ElementType.Comment, data) || this;\n }\n return Comment;\n}(DataNode));\nexports.Comment = Comment;\n/**\n * Processing instructions, including doc types.\n */\nvar ProcessingInstruction = /** @class */ (function (_super) {\n __extends(ProcessingInstruction, _super);\n function ProcessingInstruction(name, data) {\n var _this = _super.call(this, domelementtype_1.ElementType.Directive, data) || this;\n _this.name = name;\n return _this;\n }\n return ProcessingInstruction;\n}(DataNode));\nexports.ProcessingInstruction = ProcessingInstruction;\n/**\n * A `Node` that can have children.\n */\nvar NodeWithChildren = /** @class */ (function (_super) {\n __extends(NodeWithChildren, _super);\n /**\n * @param type Type of the node.\n * @param children Children of the node. Only certain node types can have children.\n */\n function NodeWithChildren(type, children) {\n var _this = _super.call(this, type) || this;\n _this.children = children;\n return _this;\n }\n Object.defineProperty(NodeWithChildren.prototype, \"firstChild\", {\n // Aliases\n /** First child of the node. */\n get: function () {\n var _a;\n return (_a = this.children[0]) !== null && _a !== void 0 ? _a : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(NodeWithChildren.prototype, \"lastChild\", {\n /** Last child of the node. */\n get: function () {\n return this.children.length > 0\n ? this.children[this.children.length - 1]\n : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(NodeWithChildren.prototype, \"childNodes\", {\n /**\n * Same as {@link children}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get: function () {\n return this.children;\n },\n set: function (children) {\n this.children = children;\n },\n enumerable: false,\n configurable: true\n });\n return NodeWithChildren;\n}(Node));\nexports.NodeWithChildren = NodeWithChildren;\n/**\n * The root node of the document.\n */\nvar Document = /** @class */ (function (_super) {\n __extends(Document, _super);\n function Document(children) {\n return _super.call(this, domelementtype_1.ElementType.Root, children) || this;\n }\n return Document;\n}(NodeWithChildren));\nexports.Document = Document;\n/**\n * An element within the DOM.\n */\nvar Element = /** @class */ (function (_super) {\n __extends(Element, _super);\n /**\n * @param name Name of the tag, eg. `div`, `span`.\n * @param attribs Object mapping attribute names to attribute values.\n * @param children Children of the node.\n */\n function Element(name, attribs, children, type) {\n if (children === void 0) { children = []; }\n if (type === void 0) { type = name === \"script\"\n ? domelementtype_1.ElementType.Script\n : name === \"style\"\n ? domelementtype_1.ElementType.Style\n : domelementtype_1.ElementType.Tag; }\n var _this = _super.call(this, type, children) || this;\n _this.name = name;\n _this.attribs = attribs;\n return _this;\n }\n Object.defineProperty(Element.prototype, \"tagName\", {\n // DOM Level 1 aliases\n /**\n * Same as {@link name}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get: function () {\n return this.name;\n },\n set: function (name) {\n this.name = name;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Element.prototype, \"attributes\", {\n get: function () {\n var _this = this;\n return Object.keys(this.attribs).map(function (name) {\n var _a, _b;\n return ({\n name: name,\n value: _this.attribs[name],\n namespace: (_a = _this[\"x-attribsNamespace\"]) === null || _a === void 0 ? void 0 : _a[name],\n prefix: (_b = _this[\"x-attribsPrefix\"]) === null || _b === void 0 ? void 0 : _b[name],\n });\n });\n },\n enumerable: false,\n configurable: true\n });\n return Element;\n}(NodeWithChildren));\nexports.Element = Element;\n/**\n * @param node Node to check.\n * @returns `true` if the node is a `Element`, `false` otherwise.\n */\nfunction isTag(node) {\n return (0, domelementtype_1.isTag)(node);\n}\nexports.isTag = isTag;\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `CDATA`, `false` otherwise.\n */\nfunction isCDATA(node) {\n return node.type === domelementtype_1.ElementType.CDATA;\n}\nexports.isCDATA = isCDATA;\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `Text`, `false` otherwise.\n */\nfunction isText(node) {\n return node.type === domelementtype_1.ElementType.Text;\n}\nexports.isText = isText;\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `Comment`, `false` otherwise.\n */\nfunction isComment(node) {\n return node.type === domelementtype_1.ElementType.Comment;\n}\nexports.isComment = isComment;\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise.\n */\nfunction isDirective(node) {\n return node.type === domelementtype_1.ElementType.Directive;\n}\nexports.isDirective = isDirective;\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise.\n */\nfunction isDocument(node) {\n return node.type === domelementtype_1.ElementType.Root;\n}\nexports.isDocument = isDocument;\n/**\n * @param node Node to check.\n * @returns `true` if the node is a `NodeWithChildren` (has children), `false` otherwise.\n */\nfunction hasChildren(node) {\n return Object.prototype.hasOwnProperty.call(node, \"children\");\n}\nexports.hasChildren = hasChildren;\n/**\n * Clone a node, and optionally its children.\n *\n * @param recursive Clone child nodes as well.\n * @returns A clone of the node.\n */\nfunction cloneNode(node, recursive) {\n if (recursive === void 0) { recursive = false; }\n var result;\n if (isText(node)) {\n result = new Text(node.data);\n }\n else if (isComment(node)) {\n result = new Comment(node.data);\n }\n else if (isTag(node)) {\n var children = recursive ? cloneChildren(node.children) : [];\n var clone_1 = new Element(node.name, __assign({}, node.attribs), children);\n children.forEach(function (child) { return (child.parent = clone_1); });\n if (node.namespace != null) {\n clone_1.namespace = node.namespace;\n }\n if (node[\"x-attribsNamespace\"]) {\n clone_1[\"x-attribsNamespace\"] = __assign({}, node[\"x-attribsNamespace\"]);\n }\n if (node[\"x-attribsPrefix\"]) {\n clone_1[\"x-attribsPrefix\"] = __assign({}, node[\"x-attribsPrefix\"]);\n }\n result = clone_1;\n }\n else if (isCDATA(node)) {\n var children = recursive ? cloneChildren(node.children) : [];\n var clone_2 = new NodeWithChildren(domelementtype_1.ElementType.CDATA, children);\n children.forEach(function (child) { return (child.parent = clone_2); });\n result = clone_2;\n }\n else if (isDocument(node)) {\n var children = recursive ? cloneChildren(node.children) : [];\n var clone_3 = new Document(children);\n children.forEach(function (child) { return (child.parent = clone_3); });\n if (node[\"x-mode\"]) {\n clone_3[\"x-mode\"] = node[\"x-mode\"];\n }\n result = clone_3;\n }\n else if (isDirective(node)) {\n var instruction = new ProcessingInstruction(node.name, node.data);\n if (node[\"x-name\"] != null) {\n instruction[\"x-name\"] = node[\"x-name\"];\n instruction[\"x-publicId\"] = node[\"x-publicId\"];\n instruction[\"x-systemId\"] = node[\"x-systemId\"];\n }\n result = instruction;\n }\n else {\n throw new Error(\"Not implemented yet: \".concat(node.type));\n }\n result.startIndex = node.startIndex;\n result.endIndex = node.endIndex;\n if (node.sourceCodeLocation != null) {\n result.sourceCodeLocation = node.sourceCodeLocation;\n }\n return result;\n}\nexports.cloneNode = cloneNode;\nfunction cloneChildren(childs) {\n var children = childs.map(function (child) { return cloneNode(child, true); });\n for (var i = 1; i < children.length; i++) {\n children[i].prev = children[i - 1];\n children[i - 1].next = children[i];\n }\n return children;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getFeed = void 0;\nvar stringify_1 = require(\"./stringify\");\nvar legacy_1 = require(\"./legacy\");\n/**\n * Get the feed object from the root of a DOM tree.\n *\n * @param doc - The DOM to to extract the feed from.\n * @returns The feed.\n */\nfunction getFeed(doc) {\n var feedRoot = getOneElement(isValidFeed, doc);\n return !feedRoot\n ? null\n : feedRoot.name === \"feed\"\n ? getAtomFeed(feedRoot)\n : getRssFeed(feedRoot);\n}\nexports.getFeed = getFeed;\n/**\n * Parse an Atom feed.\n *\n * @param feedRoot The root of the feed.\n * @returns The parsed feed.\n */\nfunction getAtomFeed(feedRoot) {\n var _a;\n var childs = feedRoot.children;\n var feed = {\n type: \"atom\",\n items: (0, legacy_1.getElementsByTagName)(\"entry\", childs).map(function (item) {\n var _a;\n var children = item.children;\n var entry = { media: getMediaElements(children) };\n addConditionally(entry, \"id\", \"id\", children);\n addConditionally(entry, \"title\", \"title\", children);\n var href = (_a = getOneElement(\"link\", children)) === null || _a === void 0 ? void 0 : _a.attribs.href;\n if (href) {\n entry.link = href;\n }\n var description = fetch(\"summary\", children) || fetch(\"content\", children);\n if (description) {\n entry.description = description;\n }\n var pubDate = fetch(\"updated\", children);\n if (pubDate) {\n entry.pubDate = new Date(pubDate);\n }\n return entry;\n }),\n };\n addConditionally(feed, \"id\", \"id\", childs);\n addConditionally(feed, \"title\", \"title\", childs);\n var href = (_a = getOneElement(\"link\", childs)) === null || _a === void 0 ? void 0 : _a.attribs.href;\n if (href) {\n feed.link = href;\n }\n addConditionally(feed, \"description\", \"subtitle\", childs);\n var updated = fetch(\"updated\", childs);\n if (updated) {\n feed.updated = new Date(updated);\n }\n addConditionally(feed, \"author\", \"email\", childs, true);\n return feed;\n}\n/**\n * Parse a RSS feed.\n *\n * @param feedRoot The root of the feed.\n * @returns The parsed feed.\n */\nfunction getRssFeed(feedRoot) {\n var _a, _b;\n var childs = (_b = (_a = getOneElement(\"channel\", feedRoot.children)) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : [];\n var feed = {\n type: feedRoot.name.substr(0, 3),\n id: \"\",\n items: (0, legacy_1.getElementsByTagName)(\"item\", feedRoot.children).map(function (item) {\n var children = item.children;\n var entry = { media: getMediaElements(children) };\n addConditionally(entry, \"id\", \"guid\", children);\n addConditionally(entry, \"title\", \"title\", children);\n addConditionally(entry, \"link\", \"link\", children);\n addConditionally(entry, \"description\", \"description\", children);\n var pubDate = fetch(\"pubDate\", children);\n if (pubDate)\n entry.pubDate = new Date(pubDate);\n return entry;\n }),\n };\n addConditionally(feed, \"title\", \"title\", childs);\n addConditionally(feed, \"link\", \"link\", childs);\n addConditionally(feed, \"description\", \"description\", childs);\n var updated = fetch(\"lastBuildDate\", childs);\n if (updated) {\n feed.updated = new Date(updated);\n }\n addConditionally(feed, \"author\", \"managingEditor\", childs, true);\n return feed;\n}\nvar MEDIA_KEYS_STRING = [\"url\", \"type\", \"lang\"];\nvar MEDIA_KEYS_INT = [\n \"fileSize\",\n \"bitrate\",\n \"framerate\",\n \"samplingrate\",\n \"channels\",\n \"duration\",\n \"height\",\n \"width\",\n];\n/**\n * Get all media elements of a feed item.\n *\n * @param where Nodes to search in.\n * @returns Media elements.\n */\nfunction getMediaElements(where) {\n return (0, legacy_1.getElementsByTagName)(\"media:content\", where).map(function (elem) {\n var attribs = elem.attribs;\n var media = {\n medium: attribs.medium,\n isDefault: !!attribs.isDefault,\n };\n for (var _i = 0, MEDIA_KEYS_STRING_1 = MEDIA_KEYS_STRING; _i < MEDIA_KEYS_STRING_1.length; _i++) {\n var attrib = MEDIA_KEYS_STRING_1[_i];\n if (attribs[attrib]) {\n media[attrib] = attribs[attrib];\n }\n }\n for (var _a = 0, MEDIA_KEYS_INT_1 = MEDIA_KEYS_INT; _a < MEDIA_KEYS_INT_1.length; _a++) {\n var attrib = MEDIA_KEYS_INT_1[_a];\n if (attribs[attrib]) {\n media[attrib] = parseInt(attribs[attrib], 10);\n }\n }\n if (attribs.expression) {\n media.expression =\n attribs.expression;\n }\n return media;\n });\n}\n/**\n * Get one element by tag name.\n *\n * @param tagName Tag name to look for\n * @param node Node to search in\n * @returns The element or null\n */\nfunction getOneElement(tagName, node) {\n return (0, legacy_1.getElementsByTagName)(tagName, node, true, 1)[0];\n}\n/**\n * Get the text content of an element with a certain tag name.\n *\n * @param tagName Tag name to look for.\n * @param where Node to search in.\n * @param recurse Whether to recurse into child nodes.\n * @returns The text content of the element.\n */\nfunction fetch(tagName, where, recurse) {\n if (recurse === void 0) { recurse = false; }\n return (0, stringify_1.textContent)((0, legacy_1.getElementsByTagName)(tagName, where, recurse, 1)).trim();\n}\n/**\n * Adds a property to an object if it has a value.\n *\n * @param obj Object to be extended\n * @param prop Property name\n * @param tagName Tag name that contains the conditionally added property\n * @param where Element to search for the property\n * @param recurse Whether to recurse into child nodes.\n */\nfunction addConditionally(obj, prop, tagName, where, recurse) {\n if (recurse === void 0) { recurse = false; }\n var val = fetch(tagName, where, recurse);\n if (val)\n obj[prop] = val;\n}\n/**\n * Checks if an element is a feed root node.\n *\n * @param value The name of the element to check.\n * @returns Whether an element is a feed root node.\n */\nfunction isValidFeed(value) {\n return value === \"rss\" || value === \"feed\" || value === \"rdf:RDF\";\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uniqueSort = exports.compareDocumentPosition = exports.removeSubsets = void 0;\nvar domhandler_1 = require(\"domhandler\");\n/**\n * Given an array of nodes, remove any member that is contained by another.\n *\n * @param nodes Nodes to filter.\n * @returns Remaining nodes that aren't subtrees of each other.\n */\nfunction removeSubsets(nodes) {\n var idx = nodes.length;\n /*\n * Check if each node (or one of its ancestors) is already contained in the\n * array.\n */\n while (--idx >= 0) {\n var node = nodes[idx];\n /*\n * Remove the node if it is not unique.\n * We are going through the array from the end, so we only\n * have to check nodes that preceed the node under consideration in the array.\n */\n if (idx > 0 && nodes.lastIndexOf(node, idx - 1) >= 0) {\n nodes.splice(idx, 1);\n continue;\n }\n for (var ancestor = node.parent; ancestor; ancestor = ancestor.parent) {\n if (nodes.includes(ancestor)) {\n nodes.splice(idx, 1);\n break;\n }\n }\n }\n return nodes;\n}\nexports.removeSubsets = removeSubsets;\n/**\n * Compare the position of one node against another node in any other document.\n * The return value is a bitmask with the following values:\n *\n * Document order:\n * > There is an ordering, document order, defined on all the nodes in the\n * > document corresponding to the order in which the first character of the\n * > XML representation of each node occurs in the XML representation of the\n * > document after expansion of general entities. Thus, the document element\n * > node will be the first node. Element nodes occur before their children.\n * > Thus, document order orders element nodes in order of the occurrence of\n * > their start-tag in the XML (after expansion of entities). The attribute\n * > nodes of an element occur after the element and before its children. The\n * > relative order of attribute nodes is implementation-dependent./\n *\n * Source:\n * http://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-document-order\n *\n * @param nodeA The first node to use in the comparison\n * @param nodeB The second node to use in the comparison\n * @returns A bitmask describing the input nodes' relative position.\n *\n * See http://dom.spec.whatwg.org/#dom-node-comparedocumentposition for\n * a description of these values.\n */\nfunction compareDocumentPosition(nodeA, nodeB) {\n var aParents = [];\n var bParents = [];\n if (nodeA === nodeB) {\n return 0;\n }\n var current = (0, domhandler_1.hasChildren)(nodeA) ? nodeA : nodeA.parent;\n while (current) {\n aParents.unshift(current);\n current = current.parent;\n }\n current = (0, domhandler_1.hasChildren)(nodeB) ? nodeB : nodeB.parent;\n while (current) {\n bParents.unshift(current);\n current = current.parent;\n }\n var maxIdx = Math.min(aParents.length, bParents.length);\n var idx = 0;\n while (idx < maxIdx && aParents[idx] === bParents[idx]) {\n idx++;\n }\n if (idx === 0) {\n return 1 /* DISCONNECTED */;\n }\n var sharedParent = aParents[idx - 1];\n var siblings = sharedParent.children;\n var aSibling = aParents[idx];\n var bSibling = bParents[idx];\n if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) {\n if (sharedParent === nodeB) {\n return 4 /* FOLLOWING */ | 16 /* CONTAINED_BY */;\n }\n return 4 /* FOLLOWING */;\n }\n if (sharedParent === nodeA) {\n return 2 /* PRECEDING */ | 8 /* CONTAINS */;\n }\n return 2 /* PRECEDING */;\n}\nexports.compareDocumentPosition = compareDocumentPosition;\n/**\n * Sort an array of nodes based on their relative position in the document and\n * remove any duplicate nodes. If the array contains nodes that do not belong\n * to the same document, sort order is unspecified.\n *\n * @param nodes Array of DOM nodes.\n * @returns Collection of unique nodes, sorted in document order.\n */\nfunction uniqueSort(nodes) {\n nodes = nodes.filter(function (node, i, arr) { return !arr.includes(node, i + 1); });\n nodes.sort(function (a, b) {\n var relative = compareDocumentPosition(a, b);\n if (relative & 2 /* PRECEDING */) {\n return -1;\n }\n else if (relative & 4 /* FOLLOWING */) {\n return 1;\n }\n return 0;\n });\n return nodes;\n}\nexports.uniqueSort = uniqueSort;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hasChildren = exports.isDocument = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = void 0;\n__exportStar(require(\"./stringify\"), exports);\n__exportStar(require(\"./traversal\"), exports);\n__exportStar(require(\"./manipulation\"), exports);\n__exportStar(require(\"./querying\"), exports);\n__exportStar(require(\"./legacy\"), exports);\n__exportStar(require(\"./helpers\"), exports);\n__exportStar(require(\"./feeds\"), exports);\n/** @deprecated Use these methods from `domhandler` directly. */\nvar domhandler_1 = require(\"domhandler\");\nObject.defineProperty(exports, \"isTag\", { enumerable: true, get: function () { return domhandler_1.isTag; } });\nObject.defineProperty(exports, \"isCDATA\", { enumerable: true, get: function () { return domhandler_1.isCDATA; } });\nObject.defineProperty(exports, \"isText\", { enumerable: true, get: function () { return domhandler_1.isText; } });\nObject.defineProperty(exports, \"isComment\", { enumerable: true, get: function () { return domhandler_1.isComment; } });\nObject.defineProperty(exports, \"isDocument\", { enumerable: true, get: function () { return domhandler_1.isDocument; } });\nObject.defineProperty(exports, \"hasChildren\", { enumerable: true, get: function () { return domhandler_1.hasChildren; } });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getElementsByTagType = exports.getElementsByTagName = exports.getElementById = exports.getElements = exports.testElement = void 0;\nvar domhandler_1 = require(\"domhandler\");\nvar querying_1 = require(\"./querying\");\nvar Checks = {\n tag_name: function (name) {\n if (typeof name === \"function\") {\n return function (elem) { return (0, domhandler_1.isTag)(elem) && name(elem.name); };\n }\n else if (name === \"*\") {\n return domhandler_1.isTag;\n }\n return function (elem) { return (0, domhandler_1.isTag)(elem) && elem.name === name; };\n },\n tag_type: function (type) {\n if (typeof type === \"function\") {\n return function (elem) { return type(elem.type); };\n }\n return function (elem) { return elem.type === type; };\n },\n tag_contains: function (data) {\n if (typeof data === \"function\") {\n return function (elem) { return (0, domhandler_1.isText)(elem) && data(elem.data); };\n }\n return function (elem) { return (0, domhandler_1.isText)(elem) && elem.data === data; };\n },\n};\n/**\n * @param attrib Attribute to check.\n * @param value Attribute value to look for.\n * @returns A function to check whether the a node has an attribute with a particular value.\n */\nfunction getAttribCheck(attrib, value) {\n if (typeof value === \"function\") {\n return function (elem) { return (0, domhandler_1.isTag)(elem) && value(elem.attribs[attrib]); };\n }\n return function (elem) { return (0, domhandler_1.isTag)(elem) && elem.attribs[attrib] === value; };\n}\n/**\n * @param a First function to combine.\n * @param b Second function to combine.\n * @returns A function taking a node and returning `true` if either\n * of the input functions returns `true` for the node.\n */\nfunction combineFuncs(a, b) {\n return function (elem) { return a(elem) || b(elem); };\n}\n/**\n * @param options An object describing nodes to look for.\n * @returns A function executing all checks in `options` and returning `true`\n * if any of them match a node.\n */\nfunction compileTest(options) {\n var funcs = Object.keys(options).map(function (key) {\n var value = options[key];\n return Object.prototype.hasOwnProperty.call(Checks, key)\n ? Checks[key](value)\n : getAttribCheck(key, value);\n });\n return funcs.length === 0 ? null : funcs.reduce(combineFuncs);\n}\n/**\n * @param options An object describing nodes to look for.\n * @param node The element to test.\n * @returns Whether the element matches the description in `options`.\n */\nfunction testElement(options, node) {\n var test = compileTest(options);\n return test ? test(node) : true;\n}\nexports.testElement = testElement;\n/**\n * @param options An object describing nodes to look for.\n * @param nodes Nodes to search through.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes that match `options`.\n */\nfunction getElements(options, nodes, recurse, limit) {\n if (limit === void 0) { limit = Infinity; }\n var test = compileTest(options);\n return test ? (0, querying_1.filter)(test, nodes, recurse, limit) : [];\n}\nexports.getElements = getElements;\n/**\n * @param id The unique ID attribute value to look for.\n * @param nodes Nodes to search through.\n * @param recurse Also consider child nodes.\n * @returns The node with the supplied ID.\n */\nfunction getElementById(id, nodes, recurse) {\n if (recurse === void 0) { recurse = true; }\n if (!Array.isArray(nodes))\n nodes = [nodes];\n return (0, querying_1.findOne)(getAttribCheck(\"id\", id), nodes, recurse);\n}\nexports.getElementById = getElementById;\n/**\n * @param tagName Tag name to search for.\n * @param nodes Nodes to search through.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes with the supplied `tagName`.\n */\nfunction getElementsByTagName(tagName, nodes, recurse, limit) {\n if (recurse === void 0) { recurse = true; }\n if (limit === void 0) { limit = Infinity; }\n return (0, querying_1.filter)(Checks.tag_name(tagName), nodes, recurse, limit);\n}\nexports.getElementsByTagName = getElementsByTagName;\n/**\n * @param type Element type to look for.\n * @param nodes Nodes to search through.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes with the supplied `type`.\n */\nfunction getElementsByTagType(type, nodes, recurse, limit) {\n if (recurse === void 0) { recurse = true; }\n if (limit === void 0) { limit = Infinity; }\n return (0, querying_1.filter)(Checks.tag_type(type), nodes, recurse, limit);\n}\nexports.getElementsByTagType = getElementsByTagType;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.prepend = exports.prependChild = exports.append = exports.appendChild = exports.replaceElement = exports.removeElement = void 0;\n/**\n * Remove an element from the dom\n *\n * @param elem The element to be removed\n */\nfunction removeElement(elem) {\n if (elem.prev)\n elem.prev.next = elem.next;\n if (elem.next)\n elem.next.prev = elem.prev;\n if (elem.parent) {\n var childs = elem.parent.children;\n childs.splice(childs.lastIndexOf(elem), 1);\n }\n}\nexports.removeElement = removeElement;\n/**\n * Replace an element in the dom\n *\n * @param elem The element to be replaced\n * @param replacement The element to be added\n */\nfunction replaceElement(elem, replacement) {\n var prev = (replacement.prev = elem.prev);\n if (prev) {\n prev.next = replacement;\n }\n var next = (replacement.next = elem.next);\n if (next) {\n next.prev = replacement;\n }\n var parent = (replacement.parent = elem.parent);\n if (parent) {\n var childs = parent.children;\n childs[childs.lastIndexOf(elem)] = replacement;\n }\n}\nexports.replaceElement = replaceElement;\n/**\n * Append a child to an element.\n *\n * @param elem The element to append to.\n * @param child The element to be added as a child.\n */\nfunction appendChild(elem, child) {\n removeElement(child);\n child.next = null;\n child.parent = elem;\n if (elem.children.push(child) > 1) {\n var sibling = elem.children[elem.children.length - 2];\n sibling.next = child;\n child.prev = sibling;\n }\n else {\n child.prev = null;\n }\n}\nexports.appendChild = appendChild;\n/**\n * Append an element after another.\n *\n * @param elem The element to append after.\n * @param next The element be added.\n */\nfunction append(elem, next) {\n removeElement(next);\n var parent = elem.parent;\n var currNext = elem.next;\n next.next = currNext;\n next.prev = elem;\n elem.next = next;\n next.parent = parent;\n if (currNext) {\n currNext.prev = next;\n if (parent) {\n var childs = parent.children;\n childs.splice(childs.lastIndexOf(currNext), 0, next);\n }\n }\n else if (parent) {\n parent.children.push(next);\n }\n}\nexports.append = append;\n/**\n * Prepend a child to an element.\n *\n * @param elem The element to prepend before.\n * @param child The element to be added as a child.\n */\nfunction prependChild(elem, child) {\n removeElement(child);\n child.parent = elem;\n child.prev = null;\n if (elem.children.unshift(child) !== 1) {\n var sibling = elem.children[1];\n sibling.prev = child;\n child.next = sibling;\n }\n else {\n child.next = null;\n }\n}\nexports.prependChild = prependChild;\n/**\n * Prepend an element before another.\n *\n * @param elem The element to prepend before.\n * @param prev The element be added.\n */\nfunction prepend(elem, prev) {\n removeElement(prev);\n var parent = elem.parent;\n if (parent) {\n var childs = parent.children;\n childs.splice(childs.indexOf(elem), 0, prev);\n }\n if (elem.prev) {\n elem.prev.next = prev;\n }\n prev.parent = parent;\n prev.prev = elem.prev;\n prev.next = elem;\n elem.prev = prev;\n}\nexports.prepend = prepend;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.findAll = exports.existsOne = exports.findOne = exports.findOneChild = exports.find = exports.filter = void 0;\nvar domhandler_1 = require(\"domhandler\");\n/**\n * Search a node and its children for nodes passing a test function.\n *\n * @param test Function to test nodes on.\n * @param node Node to search. Will be included in the result set if it matches.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes passing `test`.\n */\nfunction filter(test, node, recurse, limit) {\n if (recurse === void 0) { recurse = true; }\n if (limit === void 0) { limit = Infinity; }\n if (!Array.isArray(node))\n node = [node];\n return find(test, node, recurse, limit);\n}\nexports.filter = filter;\n/**\n * Search an array of node and its children for nodes passing a test function.\n *\n * @param test Function to test nodes on.\n * @param nodes Array of nodes to search.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes passing `test`.\n */\nfunction find(test, nodes, recurse, limit) {\n var result = [];\n for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) {\n var elem = nodes_1[_i];\n if (test(elem)) {\n result.push(elem);\n if (--limit <= 0)\n break;\n }\n if (recurse && (0, domhandler_1.hasChildren)(elem) && elem.children.length > 0) {\n var children = find(test, elem.children, recurse, limit);\n result.push.apply(result, children);\n limit -= children.length;\n if (limit <= 0)\n break;\n }\n }\n return result;\n}\nexports.find = find;\n/**\n * Finds the first element inside of an array that matches a test function.\n *\n * @param test Function to test nodes on.\n * @param nodes Array of nodes to search.\n * @returns The first node in the array that passes `test`.\n */\nfunction findOneChild(test, nodes) {\n return nodes.find(test);\n}\nexports.findOneChild = findOneChild;\n/**\n * Finds one element in a tree that passes a test.\n *\n * @param test Function to test nodes on.\n * @param nodes Array of nodes to search.\n * @param recurse Also consider child nodes.\n * @returns The first child node that passes `test`.\n */\nfunction findOne(test, nodes, recurse) {\n if (recurse === void 0) { recurse = true; }\n var elem = null;\n for (var i = 0; i < nodes.length && !elem; i++) {\n var checked = nodes[i];\n if (!(0, domhandler_1.isTag)(checked)) {\n continue;\n }\n else if (test(checked)) {\n elem = checked;\n }\n else if (recurse && checked.children.length > 0) {\n elem = findOne(test, checked.children);\n }\n }\n return elem;\n}\nexports.findOne = findOne;\n/**\n * @param test Function to test nodes on.\n * @param nodes Array of nodes to search.\n * @returns Whether a tree of nodes contains at least one node passing a test.\n */\nfunction existsOne(test, nodes) {\n return nodes.some(function (checked) {\n return (0, domhandler_1.isTag)(checked) &&\n (test(checked) ||\n (checked.children.length > 0 &&\n existsOne(test, checked.children)));\n });\n}\nexports.existsOne = existsOne;\n/**\n * Search and array of nodes and its children for nodes passing a test function.\n *\n * Same as `find`, only with less options, leading to reduced complexity.\n *\n * @param test Function to test nodes on.\n * @param nodes Array of nodes to search.\n * @returns All nodes passing `test`.\n */\nfunction findAll(test, nodes) {\n var _a;\n var result = [];\n var stack = nodes.filter(domhandler_1.isTag);\n var elem;\n while ((elem = stack.shift())) {\n var children = (_a = elem.children) === null || _a === void 0 ? void 0 : _a.filter(domhandler_1.isTag);\n if (children && children.length > 0) {\n stack.unshift.apply(stack, children);\n }\n if (test(elem))\n result.push(elem);\n }\n return result;\n}\nexports.findAll = findAll;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.innerText = exports.textContent = exports.getText = exports.getInnerHTML = exports.getOuterHTML = void 0;\nvar domhandler_1 = require(\"domhandler\");\nvar dom_serializer_1 = __importDefault(require(\"dom-serializer\"));\nvar domelementtype_1 = require(\"domelementtype\");\n/**\n * @param node Node to get the outer HTML of.\n * @param options Options for serialization.\n * @deprecated Use the `dom-serializer` module directly.\n * @returns `node`'s outer HTML.\n */\nfunction getOuterHTML(node, options) {\n return (0, dom_serializer_1.default)(node, options);\n}\nexports.getOuterHTML = getOuterHTML;\n/**\n * @param node Node to get the inner HTML of.\n * @param options Options for serialization.\n * @deprecated Use the `dom-serializer` module directly.\n * @returns `node`'s inner HTML.\n */\nfunction getInnerHTML(node, options) {\n return (0, domhandler_1.hasChildren)(node)\n ? node.children.map(function (node) { return getOuterHTML(node, options); }).join(\"\")\n : \"\";\n}\nexports.getInnerHTML = getInnerHTML;\n/**\n * Get a node's inner text. Same as `textContent`, but inserts newlines for `<br>` tags.\n *\n * @deprecated Use `textContent` instead.\n * @param node Node to get the inner text of.\n * @returns `node`'s inner text.\n */\nfunction getText(node) {\n if (Array.isArray(node))\n return node.map(getText).join(\"\");\n if ((0, domhandler_1.isTag)(node))\n return node.name === \"br\" ? \"\\n\" : getText(node.children);\n if ((0, domhandler_1.isCDATA)(node))\n return getText(node.children);\n if ((0, domhandler_1.isText)(node))\n return node.data;\n return \"\";\n}\nexports.getText = getText;\n/**\n * Get a node's text content.\n *\n * @param node Node to get the text content of.\n * @returns `node`'s text content.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent}\n */\nfunction textContent(node) {\n if (Array.isArray(node))\n return node.map(textContent).join(\"\");\n if ((0, domhandler_1.hasChildren)(node) && !(0, domhandler_1.isComment)(node)) {\n return textContent(node.children);\n }\n if ((0, domhandler_1.isText)(node))\n return node.data;\n return \"\";\n}\nexports.textContent = textContent;\n/**\n * Get a node's inner text.\n *\n * @param node Node to get the inner text of.\n * @returns `node`'s inner text.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/innerText}\n */\nfunction innerText(node) {\n if (Array.isArray(node))\n return node.map(innerText).join(\"\");\n if ((0, domhandler_1.hasChildren)(node) && (node.type === domelementtype_1.ElementType.Tag || (0, domhandler_1.isCDATA)(node))) {\n return innerText(node.children);\n }\n if ((0, domhandler_1.isText)(node))\n return node.data;\n return \"\";\n}\nexports.innerText = innerText;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.prevElementSibling = exports.nextElementSibling = exports.getName = exports.hasAttrib = exports.getAttributeValue = exports.getSiblings = exports.getParent = exports.getChildren = void 0;\nvar domhandler_1 = require(\"domhandler\");\nvar emptyArray = [];\n/**\n * Get a node's children.\n *\n * @param elem Node to get the children of.\n * @returns `elem`'s children, or an empty array.\n */\nfunction getChildren(elem) {\n var _a;\n return (_a = elem.children) !== null && _a !== void 0 ? _a : emptyArray;\n}\nexports.getChildren = getChildren;\n/**\n * Get a node's parent.\n *\n * @param elem Node to get the parent of.\n * @returns `elem`'s parent node.\n */\nfunction getParent(elem) {\n return elem.parent || null;\n}\nexports.getParent = getParent;\n/**\n * Gets an elements siblings, including the element itself.\n *\n * Attempts to get the children through the element's parent first.\n * If we don't have a parent (the element is a root node),\n * we walk the element's `prev` & `next` to get all remaining nodes.\n *\n * @param elem Element to get the siblings of.\n * @returns `elem`'s siblings.\n */\nfunction getSiblings(elem) {\n var _a, _b;\n var parent = getParent(elem);\n if (parent != null)\n return getChildren(parent);\n var siblings = [elem];\n var prev = elem.prev, next = elem.next;\n while (prev != null) {\n siblings.unshift(prev);\n (_a = prev, prev = _a.prev);\n }\n while (next != null) {\n siblings.push(next);\n (_b = next, next = _b.next);\n }\n return siblings;\n}\nexports.getSiblings = getSiblings;\n/**\n * Gets an attribute from an element.\n *\n * @param elem Element to check.\n * @param name Attribute name to retrieve.\n * @returns The element's attribute value, or `undefined`.\n */\nfunction getAttributeValue(elem, name) {\n var _a;\n return (_a = elem.attribs) === null || _a === void 0 ? void 0 : _a[name];\n}\nexports.getAttributeValue = getAttributeValue;\n/**\n * Checks whether an element has an attribute.\n *\n * @param elem Element to check.\n * @param name Attribute name to look for.\n * @returns Returns whether `elem` has the attribute `name`.\n */\nfunction hasAttrib(elem, name) {\n return (elem.attribs != null &&\n Object.prototype.hasOwnProperty.call(elem.attribs, name) &&\n elem.attribs[name] != null);\n}\nexports.hasAttrib = hasAttrib;\n/**\n * Get the tag name of an element.\n *\n * @param elem The element to get the name for.\n * @returns The tag name of `elem`.\n */\nfunction getName(elem) {\n return elem.name;\n}\nexports.getName = getName;\n/**\n * Returns the next element sibling of a node.\n *\n * @param elem The element to get the next sibling of.\n * @returns `elem`'s next sibling that is a tag.\n */\nfunction nextElementSibling(elem) {\n var _a;\n var next = elem.next;\n while (next !== null && !(0, domhandler_1.isTag)(next))\n (_a = next, next = _a.next);\n return next;\n}\nexports.nextElementSibling = nextElementSibling;\n/**\n * Returns the previous element sibling of a node.\n *\n * @param elem The element to get the previous sibling of.\n * @returns `elem`'s previous sibling that is a tag.\n */\nfunction prevElementSibling(elem) {\n var _a;\n var prev = elem.prev;\n while (prev !== null && !(0, domhandler_1.isTag)(prev))\n (_a = prev, prev = _a.prev);\n return prev;\n}\nexports.prevElementSibling = prevElementSibling;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeHTML = exports.decodeHTMLStrict = exports.decodeXML = void 0;\nvar entities_json_1 = __importDefault(require(\"./maps/entities.json\"));\nvar legacy_json_1 = __importDefault(require(\"./maps/legacy.json\"));\nvar xml_json_1 = __importDefault(require(\"./maps/xml.json\"));\nvar decode_codepoint_1 = __importDefault(require(\"./decode_codepoint\"));\nvar strictEntityRe = /&(?:[a-zA-Z0-9]+|#[xX][\\da-fA-F]+|#\\d+);/g;\nexports.decodeXML = getStrictDecoder(xml_json_1.default);\nexports.decodeHTMLStrict = getStrictDecoder(entities_json_1.default);\nfunction getStrictDecoder(map) {\n var replace = getReplacer(map);\n return function (str) { return String(str).replace(strictEntityRe, replace); };\n}\nvar sorter = function (a, b) { return (a < b ? 1 : -1); };\nexports.decodeHTML = (function () {\n var legacy = Object.keys(legacy_json_1.default).sort(sorter);\n var keys = Object.keys(entities_json_1.default).sort(sorter);\n for (var i = 0, j = 0; i < keys.length; i++) {\n if (legacy[j] === keys[i]) {\n keys[i] += \";?\";\n j++;\n }\n else {\n keys[i] += \";\";\n }\n }\n var re = new RegExp(\"&(?:\" + keys.join(\"|\") + \"|#[xX][\\\\da-fA-F]+;?|#\\\\d+;?)\", \"g\");\n var replace = getReplacer(entities_json_1.default);\n function replacer(str) {\n if (str.substr(-1) !== \";\")\n str += \";\";\n return replace(str);\n }\n // TODO consider creating a merged map\n return function (str) { return String(str).replace(re, replacer); };\n})();\nfunction getReplacer(map) {\n return function replace(str) {\n if (str.charAt(1) === \"#\") {\n var secondChar = str.charAt(2);\n if (secondChar === \"X\" || secondChar === \"x\") {\n return decode_codepoint_1.default(parseInt(str.substr(3), 16));\n }\n return decode_codepoint_1.default(parseInt(str.substr(2), 10));\n }\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n return map[str.slice(1, -1)] || str;\n };\n}\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar decode_json_1 = __importDefault(require(\"./maps/decode.json\"));\n// Adapted from https://github.com/mathiasbynens/he/blob/master/src/he.js#L94-L119\nvar fromCodePoint = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\nString.fromCodePoint ||\n function (codePoint) {\n var output = \"\";\n if (codePoint > 0xffff) {\n codePoint -= 0x10000;\n output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800);\n codePoint = 0xdc00 | (codePoint & 0x3ff);\n }\n output += String.fromCharCode(codePoint);\n return output;\n };\nfunction decodeCodePoint(codePoint) {\n if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) {\n return \"\\uFFFD\";\n }\n if (codePoint in decode_json_1.default) {\n codePoint = decode_json_1.default[codePoint];\n }\n return fromCodePoint(codePoint);\n}\nexports.default = decodeCodePoint;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = void 0;\nvar xml_json_1 = __importDefault(require(\"./maps/xml.json\"));\nvar inverseXML = getInverseObj(xml_json_1.default);\nvar xmlReplacer = getInverseReplacer(inverseXML);\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in XML\n * documents using XML entities.\n *\n * If a character has no equivalent entity, a\n * numeric hexadecimal reference (eg. `&#xfc;`) will be used.\n */\nexports.encodeXML = getASCIIEncoder(inverseXML);\nvar entities_json_1 = __importDefault(require(\"./maps/entities.json\"));\nvar inverseHTML = getInverseObj(entities_json_1.default);\nvar htmlReplacer = getInverseReplacer(inverseHTML);\n/**\n * Encodes all entities and non-ASCII characters in the input.\n *\n * This includes characters that are valid ASCII characters in HTML documents.\n * For example `#` will be encoded as `&num;`. To get a more compact output,\n * consider using the `encodeNonAsciiHTML` function.\n *\n * If a character has no equivalent entity, a\n * numeric hexadecimal reference (eg. `&#xfc;`) will be used.\n */\nexports.encodeHTML = getInverse(inverseHTML, htmlReplacer);\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in HTML\n * documents using HTML entities.\n *\n * If a character has no equivalent entity, a\n * numeric hexadecimal reference (eg. `&#xfc;`) will be used.\n */\nexports.encodeNonAsciiHTML = getASCIIEncoder(inverseHTML);\nfunction getInverseObj(obj) {\n return Object.keys(obj)\n .sort()\n .reduce(function (inverse, name) {\n inverse[obj[name]] = \"&\" + name + \";\";\n return inverse;\n }, {});\n}\nfunction getInverseReplacer(inverse) {\n var single = [];\n var multiple = [];\n for (var _i = 0, _a = Object.keys(inverse); _i < _a.length; _i++) {\n var k = _a[_i];\n if (k.length === 1) {\n // Add value to single array\n single.push(\"\\\\\" + k);\n }\n else {\n // Add value to multiple array\n multiple.push(k);\n }\n }\n // Add ranges to single characters.\n single.sort();\n for (var start = 0; start < single.length - 1; start++) {\n // Find the end of a run of characters\n var end = start;\n while (end < single.length - 1 &&\n single[end].charCodeAt(1) + 1 === single[end + 1].charCodeAt(1)) {\n end += 1;\n }\n var count = 1 + end - start;\n // We want to replace at least three characters\n if (count < 3)\n continue;\n single.splice(start, count, single[start] + \"-\" + single[end]);\n }\n multiple.unshift(\"[\" + single.join(\"\") + \"]\");\n return new RegExp(multiple.join(\"|\"), \"g\");\n}\n// /[^\\0-\\x7F]/gu\nvar reNonASCII = /(?:[\\x80-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])/g;\nvar getCodePoint = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\nString.prototype.codePointAt != null\n ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n function (str) { return str.codePointAt(0); }\n : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n function (c) {\n return (c.charCodeAt(0) - 0xd800) * 0x400 +\n c.charCodeAt(1) -\n 0xdc00 +\n 0x10000;\n };\nfunction singleCharReplacer(c) {\n return \"&#x\" + (c.length > 1 ? getCodePoint(c) : c.charCodeAt(0))\n .toString(16)\n .toUpperCase() + \";\";\n}\nfunction getInverse(inverse, re) {\n return function (data) {\n return data\n .replace(re, function (name) { return inverse[name]; })\n .replace(reNonASCII, singleCharReplacer);\n };\n}\nvar reEscapeChars = new RegExp(xmlReplacer.source + \"|\" + reNonASCII.source, \"g\");\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in XML\n * documents using numeric hexadecimal reference (eg. `&#xfc;`).\n *\n * Have a look at `escapeUTF8` if you want a more concise output at the expense\n * of reduced transportability.\n *\n * @param data String to escape.\n */\nfunction escape(data) {\n return data.replace(reEscapeChars, singleCharReplacer);\n}\nexports.escape = escape;\n/**\n * Encodes all characters not valid in XML documents using numeric hexadecimal\n * reference (eg. `&#xfc;`).\n *\n * Note that the output will be character-set dependent.\n *\n * @param data String to escape.\n */\nfunction escapeUTF8(data) {\n return data.replace(xmlReplacer, singleCharReplacer);\n}\nexports.escapeUTF8 = escapeUTF8;\nfunction getASCIIEncoder(obj) {\n return function (data) {\n return data.replace(reEscapeChars, function (c) { return obj[c] || singleCharReplacer(c); });\n };\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.encodeHTML5 = exports.encodeHTML4 = exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = void 0;\nvar decode_1 = require(\"./decode\");\nvar encode_1 = require(\"./encode\");\n/**\n * Decodes a string with entities.\n *\n * @param data String to decode.\n * @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0.\n * @deprecated Use `decodeXML` or `decodeHTML` directly.\n */\nfunction decode(data, level) {\n return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTML)(data);\n}\nexports.decode = decode;\n/**\n * Decodes a string with entities. Does not allow missing trailing semicolons for entities.\n *\n * @param data String to decode.\n * @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0.\n * @deprecated Use `decodeHTMLStrict` or `decodeXML` directly.\n */\nfunction decodeStrict(data, level) {\n return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTMLStrict)(data);\n}\nexports.decodeStrict = decodeStrict;\n/**\n * Encodes a string with entities.\n *\n * @param data String to encode.\n * @param level Optional level to encode at. 0 = XML, 1 = HTML. Default is 0.\n * @deprecated Use `encodeHTML`, `encodeXML` or `encodeNonAsciiHTML` directly.\n */\nfunction encode(data, level) {\n return (!level || level <= 0 ? encode_1.encodeXML : encode_1.encodeHTML)(data);\n}\nexports.encode = encode;\nvar encode_2 = require(\"./encode\");\nObject.defineProperty(exports, \"encodeXML\", { enumerable: true, get: function () { return encode_2.encodeXML; } });\nObject.defineProperty(exports, \"encodeHTML\", { enumerable: true, get: function () { return encode_2.encodeHTML; } });\nObject.defineProperty(exports, \"encodeNonAsciiHTML\", { enumerable: true, get: function () { return encode_2.encodeNonAsciiHTML; } });\nObject.defineProperty(exports, \"escape\", { enumerable: true, get: function () { return encode_2.escape; } });\nObject.defineProperty(exports, \"escapeUTF8\", { enumerable: true, get: function () { return encode_2.escapeUTF8; } });\n// Legacy aliases (deprecated)\nObject.defineProperty(exports, \"encodeHTML4\", { enumerable: true, get: function () { return encode_2.encodeHTML; } });\nObject.defineProperty(exports, \"encodeHTML5\", { enumerable: true, get: function () { return encode_2.encodeHTML; } });\nvar decode_2 = require(\"./decode\");\nObject.defineProperty(exports, \"decodeXML\", { enumerable: true, get: function () { return decode_2.decodeXML; } });\nObject.defineProperty(exports, \"decodeHTML\", { enumerable: true, get: function () { return decode_2.decodeHTML; } });\nObject.defineProperty(exports, \"decodeHTMLStrict\", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } });\n// Legacy aliases (deprecated)\nObject.defineProperty(exports, \"decodeHTML4\", { enumerable: true, get: function () { return decode_2.decodeHTML; } });\nObject.defineProperty(exports, \"decodeHTML5\", { enumerable: true, get: function () { return decode_2.decodeHTML; } });\nObject.defineProperty(exports, \"decodeHTML4Strict\", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } });\nObject.defineProperty(exports, \"decodeHTML5Strict\", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } });\nObject.defineProperty(exports, \"decodeXMLStrict\", { enumerable: true, get: function () { return decode_2.decodeXML; } });\n","'use strict';\n\nmodule.exports = string => {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when its always valid, and a \\unnnn escape when the simpler form would be disallowed by Unicode patterns stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n};\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseFeed = exports.FeedHandler = void 0;\nvar domhandler_1 = __importDefault(require(\"domhandler\"));\nvar DomUtils = __importStar(require(\"domutils\"));\nvar Parser_1 = require(\"./Parser\");\nvar FeedItemMediaMedium;\n(function (FeedItemMediaMedium) {\n FeedItemMediaMedium[FeedItemMediaMedium[\"image\"] = 0] = \"image\";\n FeedItemMediaMedium[FeedItemMediaMedium[\"audio\"] = 1] = \"audio\";\n FeedItemMediaMedium[FeedItemMediaMedium[\"video\"] = 2] = \"video\";\n FeedItemMediaMedium[FeedItemMediaMedium[\"document\"] = 3] = \"document\";\n FeedItemMediaMedium[FeedItemMediaMedium[\"executable\"] = 4] = \"executable\";\n})(FeedItemMediaMedium || (FeedItemMediaMedium = {}));\nvar FeedItemMediaExpression;\n(function (FeedItemMediaExpression) {\n FeedItemMediaExpression[FeedItemMediaExpression[\"sample\"] = 0] = \"sample\";\n FeedItemMediaExpression[FeedItemMediaExpression[\"full\"] = 1] = \"full\";\n FeedItemMediaExpression[FeedItemMediaExpression[\"nonstop\"] = 2] = \"nonstop\";\n})(FeedItemMediaExpression || (FeedItemMediaExpression = {}));\n// TODO: Consume data as it is coming in\nvar FeedHandler = /** @class */ (function (_super) {\n __extends(FeedHandler, _super);\n /**\n *\n * @param callback\n * @param options\n */\n function FeedHandler(callback, options) {\n var _this = this;\n if (typeof callback === \"object\") {\n callback = undefined;\n options = callback;\n }\n _this = _super.call(this, callback, options) || this;\n return _this;\n }\n FeedHandler.prototype.onend = function () {\n var _a, _b;\n var feedRoot = getOneElement(isValidFeed, this.dom);\n if (!feedRoot) {\n this.handleCallback(new Error(\"couldn't find root of feed\"));\n return;\n }\n var feed = {};\n if (feedRoot.name === \"feed\") {\n var childs = feedRoot.children;\n feed.type = \"atom\";\n addConditionally(feed, \"id\", \"id\", childs);\n addConditionally(feed, \"title\", \"title\", childs);\n var href = getAttribute(\"href\", getOneElement(\"link\", childs));\n if (href) {\n feed.link = href;\n }\n addConditionally(feed, \"description\", \"subtitle\", childs);\n var updated = fetch(\"updated\", childs);\n if (updated) {\n feed.updated = new Date(updated);\n }\n addConditionally(feed, \"author\", \"email\", childs, true);\n feed.items = getElements(\"entry\", childs).map(function (item) {\n var entry = {};\n var children = item.children;\n addConditionally(entry, \"id\", \"id\", children);\n addConditionally(entry, \"title\", \"title\", children);\n var href = getAttribute(\"href\", getOneElement(\"link\", children));\n if (href) {\n entry.link = href;\n }\n var description = fetch(\"summary\", children) || fetch(\"content\", children);\n if (description) {\n entry.description = description;\n }\n var pubDate = fetch(\"updated\", children);\n if (pubDate) {\n entry.pubDate = new Date(pubDate);\n }\n entry.media = getMediaElements(children);\n return entry;\n });\n }\n else {\n var childs = (_b = (_a = getOneElement(\"channel\", feedRoot.children)) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : [];\n feed.type = feedRoot.name.substr(0, 3);\n feed.id = \"\";\n addConditionally(feed, \"title\", \"title\", childs);\n addConditionally(feed, \"link\", \"link\", childs);\n addConditionally(feed, \"description\", \"description\", childs);\n var updated = fetch(\"lastBuildDate\", childs);\n if (updated) {\n feed.updated = new Date(updated);\n }\n addConditionally(feed, \"author\", \"managingEditor\", childs, true);\n feed.items = getElements(\"item\", feedRoot.children).map(function (item) {\n var entry = {};\n var children = item.children;\n addConditionally(entry, \"id\", \"guid\", children);\n addConditionally(entry, \"title\", \"title\", children);\n addConditionally(entry, \"link\", \"link\", children);\n addConditionally(entry, \"description\", \"description\", children);\n var pubDate = fetch(\"pubDate\", children);\n if (pubDate)\n entry.pubDate = new Date(pubDate);\n entry.media = getMediaElements(children);\n return entry;\n });\n }\n this.feed = feed;\n this.handleCallback(null);\n };\n return FeedHandler;\n}(domhandler_1.default));\nexports.FeedHandler = FeedHandler;\nfunction getMediaElements(where) {\n return getElements(\"media:content\", where).map(function (elem) {\n var media = {\n medium: elem.attribs.medium,\n isDefault: !!elem.attribs.isDefault,\n };\n if (elem.attribs.url) {\n media.url = elem.attribs.url;\n }\n if (elem.attribs.fileSize) {\n media.fileSize = parseInt(elem.attribs.fileSize, 10);\n }\n if (elem.attribs.type) {\n media.type = elem.attribs.type;\n }\n if (elem.attribs.expression) {\n media.expression = elem.attribs\n .expression;\n }\n if (elem.attribs.bitrate) {\n media.bitrate = parseInt(elem.attribs.bitrate, 10);\n }\n if (elem.attribs.framerate) {\n media.framerate = parseInt(elem.attribs.framerate, 10);\n }\n if (elem.attribs.samplingrate) {\n media.samplingrate = parseInt(elem.attribs.samplingrate, 10);\n }\n if (elem.attribs.channels) {\n media.channels = parseInt(elem.attribs.channels, 10);\n }\n if (elem.attribs.duration) {\n media.duration = parseInt(elem.attribs.duration, 10);\n }\n if (elem.attribs.height) {\n media.height = parseInt(elem.attribs.height, 10);\n }\n if (elem.attribs.width) {\n media.width = parseInt(elem.attribs.width, 10);\n }\n if (elem.attribs.lang) {\n media.lang = elem.attribs.lang;\n }\n return media;\n });\n}\nfunction getElements(tagName, where) {\n return DomUtils.getElementsByTagName(tagName, where, true);\n}\nfunction getOneElement(tagName, node) {\n return DomUtils.getElementsByTagName(tagName, node, true, 1)[0];\n}\nfunction fetch(tagName, where, recurse) {\n if (recurse === void 0) { recurse = false; }\n return DomUtils.getText(DomUtils.getElementsByTagName(tagName, where, recurse, 1)).trim();\n}\nfunction getAttribute(name, elem) {\n if (!elem) {\n return null;\n }\n var attribs = elem.attribs;\n return attribs[name];\n}\nfunction addConditionally(obj, prop, what, where, recurse) {\n if (recurse === void 0) { recurse = false; }\n var tmp = fetch(what, where, recurse);\n if (tmp)\n obj[prop] = tmp;\n}\nfunction isValidFeed(value) {\n return value === \"rss\" || value === \"feed\" || value === \"rdf:RDF\";\n}\n/**\n * Parse a feed.\n *\n * @param feed The feed that should be parsed, as a string.\n * @param options Optionally, options for parsing. When using this option, you should set `xmlMode` to `true`.\n */\nfunction parseFeed(feed, options) {\n if (options === void 0) { options = { xmlMode: true }; }\n var handler = new FeedHandler(options);\n new Parser_1.Parser(handler, options).end(feed);\n return handler.feed;\n}\nexports.parseFeed = parseFeed;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Parser = void 0;\nvar Tokenizer_1 = __importDefault(require(\"./Tokenizer\"));\nvar formTags = new Set([\n \"input\",\n \"option\",\n \"optgroup\",\n \"select\",\n \"button\",\n \"datalist\",\n \"textarea\",\n]);\nvar pTag = new Set([\"p\"]);\nvar openImpliesClose = {\n tr: new Set([\"tr\", \"th\", \"td\"]),\n th: new Set([\"th\"]),\n td: new Set([\"thead\", \"th\", \"td\"]),\n body: new Set([\"head\", \"link\", \"script\"]),\n li: new Set([\"li\"]),\n p: pTag,\n h1: pTag,\n h2: pTag,\n h3: pTag,\n h4: pTag,\n h5: pTag,\n h6: pTag,\n select: formTags,\n input: formTags,\n output: formTags,\n button: formTags,\n datalist: formTags,\n textarea: formTags,\n option: new Set([\"option\"]),\n optgroup: new Set([\"optgroup\", \"option\"]),\n dd: new Set([\"dt\", \"dd\"]),\n dt: new Set([\"dt\", \"dd\"]),\n address: pTag,\n article: pTag,\n aside: pTag,\n blockquote: pTag,\n details: pTag,\n div: pTag,\n dl: pTag,\n fieldset: pTag,\n figcaption: pTag,\n figure: pTag,\n footer: pTag,\n form: pTag,\n header: pTag,\n hr: pTag,\n main: pTag,\n nav: pTag,\n ol: pTag,\n pre: pTag,\n section: pTag,\n table: pTag,\n ul: pTag,\n rt: new Set([\"rt\", \"rp\"]),\n rp: new Set([\"rt\", \"rp\"]),\n tbody: new Set([\"thead\", \"tbody\"]),\n tfoot: new Set([\"thead\", \"tbody\"]),\n};\nvar voidElements = new Set([\n \"area\",\n \"base\",\n \"basefont\",\n \"br\",\n \"col\",\n \"command\",\n \"embed\",\n \"frame\",\n \"hr\",\n \"img\",\n \"input\",\n \"isindex\",\n \"keygen\",\n \"link\",\n \"meta\",\n \"param\",\n \"source\",\n \"track\",\n \"wbr\",\n]);\nvar foreignContextElements = new Set([\"math\", \"svg\"]);\nvar htmlIntegrationElements = new Set([\n \"mi\",\n \"mo\",\n \"mn\",\n \"ms\",\n \"mtext\",\n \"annotation-xml\",\n \"foreignObject\",\n \"desc\",\n \"title\",\n]);\nvar reNameEnd = /\\s|\\//;\nvar Parser = /** @class */ (function () {\n function Parser(cbs, options) {\n if (options === void 0) { options = {}; }\n var _a, _b, _c, _d, _e;\n /** The start index of the last event. */\n this.startIndex = 0;\n /** The end index of the last event. */\n this.endIndex = null;\n this.tagname = \"\";\n this.attribname = \"\";\n this.attribvalue = \"\";\n this.attribs = null;\n this.stack = [];\n this.foreignContext = [];\n this.options = options;\n this.cbs = cbs !== null && cbs !== void 0 ? cbs : {};\n this.lowerCaseTagNames = (_a = options.lowerCaseTags) !== null && _a !== void 0 ? _a : !options.xmlMode;\n this.lowerCaseAttributeNames =\n (_b = options.lowerCaseAttributeNames) !== null && _b !== void 0 ? _b : !options.xmlMode;\n this.tokenizer = new ((_c = options.Tokenizer) !== null && _c !== void 0 ? _c : Tokenizer_1.default)(this.options, this);\n (_e = (_d = this.cbs).onparserinit) === null || _e === void 0 ? void 0 : _e.call(_d, this);\n }\n Parser.prototype.updatePosition = function (initialOffset) {\n if (this.endIndex === null) {\n if (this.tokenizer.sectionStart <= initialOffset) {\n this.startIndex = 0;\n }\n else {\n this.startIndex = this.tokenizer.sectionStart - initialOffset;\n }\n }\n else {\n this.startIndex = this.endIndex + 1;\n }\n this.endIndex = this.tokenizer.getAbsoluteIndex();\n };\n // Tokenizer event handlers\n Parser.prototype.ontext = function (data) {\n var _a, _b;\n this.updatePosition(1);\n this.endIndex--;\n (_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, data);\n };\n Parser.prototype.onopentagname = function (name) {\n var _a, _b;\n if (this.lowerCaseTagNames) {\n name = name.toLowerCase();\n }\n this.tagname = name;\n if (!this.options.xmlMode &&\n Object.prototype.hasOwnProperty.call(openImpliesClose, name)) {\n var el = void 0;\n while (this.stack.length > 0 &&\n openImpliesClose[name].has((el = this.stack[this.stack.length - 1]))) {\n this.onclosetag(el);\n }\n }\n if (this.options.xmlMode || !voidElements.has(name)) {\n this.stack.push(name);\n if (foreignContextElements.has(name)) {\n this.foreignContext.push(true);\n }\n else if (htmlIntegrationElements.has(name)) {\n this.foreignContext.push(false);\n }\n }\n (_b = (_a = this.cbs).onopentagname) === null || _b === void 0 ? void 0 : _b.call(_a, name);\n if (this.cbs.onopentag)\n this.attribs = {};\n };\n Parser.prototype.onopentagend = function () {\n var _a, _b;\n this.updatePosition(1);\n if (this.attribs) {\n (_b = (_a = this.cbs).onopentag) === null || _b === void 0 ? void 0 : _b.call(_a, this.tagname, this.attribs);\n this.attribs = null;\n }\n if (!this.options.xmlMode &&\n this.cbs.onclosetag &&\n voidElements.has(this.tagname)) {\n this.cbs.onclosetag(this.tagname);\n }\n this.tagname = \"\";\n };\n Parser.prototype.onclosetag = function (name) {\n this.updatePosition(1);\n if (this.lowerCaseTagNames) {\n name = name.toLowerCase();\n }\n if (foreignContextElements.has(name) ||\n htmlIntegrationElements.has(name)) {\n this.foreignContext.pop();\n }\n if (this.stack.length &&\n (this.options.xmlMode || !voidElements.has(name))) {\n var pos = this.stack.lastIndexOf(name);\n if (pos !== -1) {\n if (this.cbs.onclosetag) {\n pos = this.stack.length - pos;\n while (pos--) {\n // We know the stack has sufficient elements.\n this.cbs.onclosetag(this.stack.pop());\n }\n }\n else\n this.stack.length = pos;\n }\n else if (name === \"p\" && !this.options.xmlMode) {\n this.onopentagname(name);\n this.closeCurrentTag();\n }\n }\n else if (!this.options.xmlMode && (name === \"br\" || name === \"p\")) {\n this.onopentagname(name);\n this.closeCurrentTag();\n }\n };\n Parser.prototype.onselfclosingtag = function () {\n if (this.options.xmlMode ||\n this.options.recognizeSelfClosing ||\n this.foreignContext[this.foreignContext.length - 1]) {\n this.closeCurrentTag();\n }\n else {\n this.onopentagend();\n }\n };\n Parser.prototype.closeCurrentTag = function () {\n var _a, _b;\n var name = this.tagname;\n this.onopentagend();\n /*\n * Self-closing tags will be on the top of the stack\n * (cheaper check than in onclosetag)\n */\n if (this.stack[this.stack.length - 1] === name) {\n (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, name);\n this.stack.pop();\n }\n };\n Parser.prototype.onattribname = function (name) {\n if (this.lowerCaseAttributeNames) {\n name = name.toLowerCase();\n }\n this.attribname = name;\n };\n Parser.prototype.onattribdata = function (value) {\n this.attribvalue += value;\n };\n Parser.prototype.onattribend = function (quote) {\n var _a, _b;\n (_b = (_a = this.cbs).onattribute) === null || _b === void 0 ? void 0 : _b.call(_a, this.attribname, this.attribvalue, quote);\n if (this.attribs &&\n !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)) {\n this.attribs[this.attribname] = this.attribvalue;\n }\n this.attribname = \"\";\n this.attribvalue = \"\";\n };\n Parser.prototype.getInstructionName = function (value) {\n var idx = value.search(reNameEnd);\n var name = idx < 0 ? value : value.substr(0, idx);\n if (this.lowerCaseTagNames) {\n name = name.toLowerCase();\n }\n return name;\n };\n Parser.prototype.ondeclaration = function (value) {\n if (this.cbs.onprocessinginstruction) {\n var name_1 = this.getInstructionName(value);\n this.cbs.onprocessinginstruction(\"!\" + name_1, \"!\" + value);\n }\n };\n Parser.prototype.onprocessinginstruction = function (value) {\n if (this.cbs.onprocessinginstruction) {\n var name_2 = this.getInstructionName(value);\n this.cbs.onprocessinginstruction(\"?\" + name_2, \"?\" + value);\n }\n };\n Parser.prototype.oncomment = function (value) {\n var _a, _b, _c, _d;\n this.updatePosition(4);\n (_b = (_a = this.cbs).oncomment) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n (_d = (_c = this.cbs).oncommentend) === null || _d === void 0 ? void 0 : _d.call(_c);\n };\n Parser.prototype.oncdata = function (value) {\n var _a, _b, _c, _d, _e, _f;\n this.updatePosition(1);\n if (this.options.xmlMode || this.options.recognizeCDATA) {\n (_b = (_a = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a);\n (_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value);\n (_f = (_e = this.cbs).oncdataend) === null || _f === void 0 ? void 0 : _f.call(_e);\n }\n else {\n this.oncomment(\"[CDATA[\" + value + \"]]\");\n }\n };\n Parser.prototype.onerror = function (err) {\n var _a, _b;\n (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n };\n Parser.prototype.onend = function () {\n var _a, _b;\n if (this.cbs.onclosetag) {\n for (var i = this.stack.length; i > 0; this.cbs.onclosetag(this.stack[--i]))\n ;\n }\n (_b = (_a = this.cbs).onend) === null || _b === void 0 ? void 0 : _b.call(_a);\n };\n /**\n * Resets the parser to a blank state, ready to parse a new HTML document\n */\n Parser.prototype.reset = function () {\n var _a, _b, _c, _d;\n (_b = (_a = this.cbs).onreset) === null || _b === void 0 ? void 0 : _b.call(_a);\n this.tokenizer.reset();\n this.tagname = \"\";\n this.attribname = \"\";\n this.attribs = null;\n this.stack = [];\n (_d = (_c = this.cbs).onparserinit) === null || _d === void 0 ? void 0 : _d.call(_c, this);\n };\n /**\n * Resets the parser, then parses a complete document and\n * pushes it to the handler.\n *\n * @param data Document to parse.\n */\n Parser.prototype.parseComplete = function (data) {\n this.reset();\n this.end(data);\n };\n /**\n * Parses a chunk of data and calls the corresponding callbacks.\n *\n * @param chunk Chunk to parse.\n */\n Parser.prototype.write = function (chunk) {\n this.tokenizer.write(chunk);\n };\n /**\n * Parses the end of the buffer and clears the stack, calls onend.\n *\n * @param chunk Optional final chunk to parse.\n */\n Parser.prototype.end = function (chunk) {\n this.tokenizer.end(chunk);\n };\n /**\n * Pauses parsing. The parser won't emit events until `resume` is called.\n */\n Parser.prototype.pause = function () {\n this.tokenizer.pause();\n };\n /**\n * Resumes parsing after `pause` was called.\n */\n Parser.prototype.resume = function () {\n this.tokenizer.resume();\n };\n /**\n * Alias of `write`, for backwards compatibility.\n *\n * @param chunk Chunk to parse.\n * @deprecated\n */\n Parser.prototype.parseChunk = function (chunk) {\n this.write(chunk);\n };\n /**\n * Alias of `end`, for backwards compatibility.\n *\n * @param chunk Optional final chunk to parse.\n * @deprecated\n */\n Parser.prototype.done = function (chunk) {\n this.end(chunk);\n };\n return Parser;\n}());\nexports.Parser = Parser;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar decode_codepoint_1 = __importDefault(require(\"entities/lib/decode_codepoint\"));\nvar entities_json_1 = __importDefault(require(\"entities/lib/maps/entities.json\"));\nvar legacy_json_1 = __importDefault(require(\"entities/lib/maps/legacy.json\"));\nvar xml_json_1 = __importDefault(require(\"entities/lib/maps/xml.json\"));\nfunction whitespace(c) {\n return c === \" \" || c === \"\\n\" || c === \"\\t\" || c === \"\\f\" || c === \"\\r\";\n}\nfunction isASCIIAlpha(c) {\n return (c >= \"a\" && c <= \"z\") || (c >= \"A\" && c <= \"Z\");\n}\nfunction ifElseState(upper, SUCCESS, FAILURE) {\n var lower = upper.toLowerCase();\n if (upper === lower) {\n return function (t, c) {\n if (c === lower) {\n t._state = SUCCESS;\n }\n else {\n t._state = FAILURE;\n t._index--;\n }\n };\n }\n return function (t, c) {\n if (c === lower || c === upper) {\n t._state = SUCCESS;\n }\n else {\n t._state = FAILURE;\n t._index--;\n }\n };\n}\nfunction consumeSpecialNameChar(upper, NEXT_STATE) {\n var lower = upper.toLowerCase();\n return function (t, c) {\n if (c === lower || c === upper) {\n t._state = NEXT_STATE;\n }\n else {\n t._state = 3 /* InTagName */;\n t._index--; // Consume the token again\n }\n };\n}\nvar stateBeforeCdata1 = ifElseState(\"C\", 24 /* BeforeCdata2 */, 16 /* InDeclaration */);\nvar stateBeforeCdata2 = ifElseState(\"D\", 25 /* BeforeCdata3 */, 16 /* InDeclaration */);\nvar stateBeforeCdata3 = ifElseState(\"A\", 26 /* BeforeCdata4 */, 16 /* InDeclaration */);\nvar stateBeforeCdata4 = ifElseState(\"T\", 27 /* BeforeCdata5 */, 16 /* InDeclaration */);\nvar stateBeforeCdata5 = ifElseState(\"A\", 28 /* BeforeCdata6 */, 16 /* InDeclaration */);\nvar stateBeforeScript1 = consumeSpecialNameChar(\"R\", 35 /* BeforeScript2 */);\nvar stateBeforeScript2 = consumeSpecialNameChar(\"I\", 36 /* BeforeScript3 */);\nvar stateBeforeScript3 = consumeSpecialNameChar(\"P\", 37 /* BeforeScript4 */);\nvar stateBeforeScript4 = consumeSpecialNameChar(\"T\", 38 /* BeforeScript5 */);\nvar stateAfterScript1 = ifElseState(\"R\", 40 /* AfterScript2 */, 1 /* Text */);\nvar stateAfterScript2 = ifElseState(\"I\", 41 /* AfterScript3 */, 1 /* Text */);\nvar stateAfterScript3 = ifElseState(\"P\", 42 /* AfterScript4 */, 1 /* Text */);\nvar stateAfterScript4 = ifElseState(\"T\", 43 /* AfterScript5 */, 1 /* Text */);\nvar stateBeforeStyle1 = consumeSpecialNameChar(\"Y\", 45 /* BeforeStyle2 */);\nvar stateBeforeStyle2 = consumeSpecialNameChar(\"L\", 46 /* BeforeStyle3 */);\nvar stateBeforeStyle3 = consumeSpecialNameChar(\"E\", 47 /* BeforeStyle4 */);\nvar stateAfterStyle1 = ifElseState(\"Y\", 49 /* AfterStyle2 */, 1 /* Text */);\nvar stateAfterStyle2 = ifElseState(\"L\", 50 /* AfterStyle3 */, 1 /* Text */);\nvar stateAfterStyle3 = ifElseState(\"E\", 51 /* AfterStyle4 */, 1 /* Text */);\nvar stateBeforeSpecialT = consumeSpecialNameChar(\"I\", 54 /* BeforeTitle1 */);\nvar stateBeforeTitle1 = consumeSpecialNameChar(\"T\", 55 /* BeforeTitle2 */);\nvar stateBeforeTitle2 = consumeSpecialNameChar(\"L\", 56 /* BeforeTitle3 */);\nvar stateBeforeTitle3 = consumeSpecialNameChar(\"E\", 57 /* BeforeTitle4 */);\nvar stateAfterSpecialTEnd = ifElseState(\"I\", 58 /* AfterTitle1 */, 1 /* Text */);\nvar stateAfterTitle1 = ifElseState(\"T\", 59 /* AfterTitle2 */, 1 /* Text */);\nvar stateAfterTitle2 = ifElseState(\"L\", 60 /* AfterTitle3 */, 1 /* Text */);\nvar stateAfterTitle3 = ifElseState(\"E\", 61 /* AfterTitle4 */, 1 /* Text */);\nvar stateBeforeEntity = ifElseState(\"#\", 63 /* BeforeNumericEntity */, 64 /* InNamedEntity */);\nvar stateBeforeNumericEntity = ifElseState(\"X\", 66 /* InHexEntity */, 65 /* InNumericEntity */);\nvar Tokenizer = /** @class */ (function () {\n function Tokenizer(options, cbs) {\n var _a;\n /** The current state the tokenizer is in. */\n this._state = 1 /* Text */;\n /** The read buffer. */\n this.buffer = \"\";\n /** The beginning of the section that is currently being read. */\n this.sectionStart = 0;\n /** The index within the buffer that we are currently looking at. */\n this._index = 0;\n /**\n * Data that has already been processed will be removed from the buffer occasionally.\n * `_bufferOffset` keeps track of how many characters have been removed, to make sure position information is accurate.\n */\n this.bufferOffset = 0;\n /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */\n this.baseState = 1 /* Text */;\n /** For special parsing behavior inside of script and style tags. */\n this.special = 1 /* None */;\n /** Indicates whether the tokenizer has been paused. */\n this.running = true;\n /** Indicates whether the tokenizer has finished running / `.end` has been called. */\n this.ended = false;\n this.cbs = cbs;\n this.xmlMode = !!(options === null || options === void 0 ? void 0 : options.xmlMode);\n this.decodeEntities = (_a = options === null || options === void 0 ? void 0 : options.decodeEntities) !== null && _a !== void 0 ? _a : true;\n }\n Tokenizer.prototype.reset = function () {\n this._state = 1 /* Text */;\n this.buffer = \"\";\n this.sectionStart = 0;\n this._index = 0;\n this.bufferOffset = 0;\n this.baseState = 1 /* Text */;\n this.special = 1 /* None */;\n this.running = true;\n this.ended = false;\n };\n Tokenizer.prototype.write = function (chunk) {\n if (this.ended)\n this.cbs.onerror(Error(\".write() after done!\"));\n this.buffer += chunk;\n this.parse();\n };\n Tokenizer.prototype.end = function (chunk) {\n if (this.ended)\n this.cbs.onerror(Error(\".end() after done!\"));\n if (chunk)\n this.write(chunk);\n this.ended = true;\n if (this.running)\n this.finish();\n };\n Tokenizer.prototype.pause = function () {\n this.running = false;\n };\n Tokenizer.prototype.resume = function () {\n this.running = true;\n if (this._index < this.buffer.length) {\n this.parse();\n }\n if (this.ended) {\n this.finish();\n }\n };\n /**\n * The current index within all of the written data.\n */\n Tokenizer.prototype.getAbsoluteIndex = function () {\n return this.bufferOffset + this._index;\n };\n Tokenizer.prototype.stateText = function (c) {\n if (c === \"<\") {\n if (this._index > this.sectionStart) {\n this.cbs.ontext(this.getSection());\n }\n this._state = 2 /* BeforeTagName */;\n this.sectionStart = this._index;\n }\n else if (this.decodeEntities &&\n c === \"&\" &&\n (this.special === 1 /* None */ || this.special === 4 /* Title */)) {\n if (this._index > this.sectionStart) {\n this.cbs.ontext(this.getSection());\n }\n this.baseState = 1 /* Text */;\n this._state = 62 /* BeforeEntity */;\n this.sectionStart = this._index;\n }\n };\n /**\n * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.\n *\n * XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar).\n * We allow anything that wouldn't end the tag.\n */\n Tokenizer.prototype.isTagStartChar = function (c) {\n return (isASCIIAlpha(c) ||\n (this.xmlMode && !whitespace(c) && c !== \"/\" && c !== \">\"));\n };\n Tokenizer.prototype.stateBeforeTagName = function (c) {\n if (c === \"/\") {\n this._state = 5 /* BeforeClosingTagName */;\n }\n else if (c === \"<\") {\n this.cbs.ontext(this.getSection());\n this.sectionStart = this._index;\n }\n else if (c === \">\" ||\n this.special !== 1 /* None */ ||\n whitespace(c)) {\n this._state = 1 /* Text */;\n }\n else if (c === \"!\") {\n this._state = 15 /* BeforeDeclaration */;\n this.sectionStart = this._index + 1;\n }\n else if (c === \"?\") {\n this._state = 17 /* InProcessingInstruction */;\n this.sectionStart = this._index + 1;\n }\n else if (!this.isTagStartChar(c)) {\n this._state = 1 /* Text */;\n }\n else {\n this._state =\n !this.xmlMode && (c === \"s\" || c === \"S\")\n ? 32 /* BeforeSpecialS */\n : !this.xmlMode && (c === \"t\" || c === \"T\")\n ? 52 /* BeforeSpecialT */\n : 3 /* InTagName */;\n this.sectionStart = this._index;\n }\n };\n Tokenizer.prototype.stateInTagName = function (c) {\n if (c === \"/\" || c === \">\" || whitespace(c)) {\n this.emitToken(\"onopentagname\");\n this._state = 8 /* BeforeAttributeName */;\n this._index--;\n }\n };\n Tokenizer.prototype.stateBeforeClosingTagName = function (c) {\n if (whitespace(c)) {\n // Ignore\n }\n else if (c === \">\") {\n this._state = 1 /* Text */;\n }\n else if (this.special !== 1 /* None */) {\n if (this.special !== 4 /* Title */ && (c === \"s\" || c === \"S\")) {\n this._state = 33 /* BeforeSpecialSEnd */;\n }\n else if (this.special === 4 /* Title */ &&\n (c === \"t\" || c === \"T\")) {\n this._state = 53 /* BeforeSpecialTEnd */;\n }\n else {\n this._state = 1 /* Text */;\n this._index--;\n }\n }\n else if (!this.isTagStartChar(c)) {\n this._state = 20 /* InSpecialComment */;\n this.sectionStart = this._index;\n }\n else {\n this._state = 6 /* InClosingTagName */;\n this.sectionStart = this._index;\n }\n };\n Tokenizer.prototype.stateInClosingTagName = function (c) {\n if (c === \">\" || whitespace(c)) {\n this.emitToken(\"onclosetag\");\n this._state = 7 /* AfterClosingTagName */;\n this._index--;\n }\n };\n Tokenizer.prototype.stateAfterClosingTagName = function (c) {\n // Skip everything until \">\"\n if (c === \">\") {\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n };\n Tokenizer.prototype.stateBeforeAttributeName = function (c) {\n if (c === \">\") {\n this.cbs.onopentagend();\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n else if (c === \"/\") {\n this._state = 4 /* InSelfClosingTag */;\n }\n else if (!whitespace(c)) {\n this._state = 9 /* InAttributeName */;\n this.sectionStart = this._index;\n }\n };\n Tokenizer.prototype.stateInSelfClosingTag = function (c) {\n if (c === \">\") {\n this.cbs.onselfclosingtag();\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n this.special = 1 /* None */; // Reset special state, in case of self-closing special tags\n }\n else if (!whitespace(c)) {\n this._state = 8 /* BeforeAttributeName */;\n this._index--;\n }\n };\n Tokenizer.prototype.stateInAttributeName = function (c) {\n if (c === \"=\" || c === \"/\" || c === \">\" || whitespace(c)) {\n this.cbs.onattribname(this.getSection());\n this.sectionStart = -1;\n this._state = 10 /* AfterAttributeName */;\n this._index--;\n }\n };\n Tokenizer.prototype.stateAfterAttributeName = function (c) {\n if (c === \"=\") {\n this._state = 11 /* BeforeAttributeValue */;\n }\n else if (c === \"/\" || c === \">\") {\n this.cbs.onattribend(undefined);\n this._state = 8 /* BeforeAttributeName */;\n this._index--;\n }\n else if (!whitespace(c)) {\n this.cbs.onattribend(undefined);\n this._state = 9 /* InAttributeName */;\n this.sectionStart = this._index;\n }\n };\n Tokenizer.prototype.stateBeforeAttributeValue = function (c) {\n if (c === '\"') {\n this._state = 12 /* InAttributeValueDq */;\n this.sectionStart = this._index + 1;\n }\n else if (c === \"'\") {\n this._state = 13 /* InAttributeValueSq */;\n this.sectionStart = this._index + 1;\n }\n else if (!whitespace(c)) {\n this._state = 14 /* InAttributeValueNq */;\n this.sectionStart = this._index;\n this._index--; // Reconsume token\n }\n };\n Tokenizer.prototype.handleInAttributeValue = function (c, quote) {\n if (c === quote) {\n this.emitToken(\"onattribdata\");\n this.cbs.onattribend(quote);\n this._state = 8 /* BeforeAttributeName */;\n }\n else if (this.decodeEntities && c === \"&\") {\n this.emitToken(\"onattribdata\");\n this.baseState = this._state;\n this._state = 62 /* BeforeEntity */;\n this.sectionStart = this._index;\n }\n };\n Tokenizer.prototype.stateInAttributeValueDoubleQuotes = function (c) {\n this.handleInAttributeValue(c, '\"');\n };\n Tokenizer.prototype.stateInAttributeValueSingleQuotes = function (c) {\n this.handleInAttributeValue(c, \"'\");\n };\n Tokenizer.prototype.stateInAttributeValueNoQuotes = function (c) {\n if (whitespace(c) || c === \">\") {\n this.emitToken(\"onattribdata\");\n this.cbs.onattribend(null);\n this._state = 8 /* BeforeAttributeName */;\n this._index--;\n }\n else if (this.decodeEntities && c === \"&\") {\n this.emitToken(\"onattribdata\");\n this.baseState = this._state;\n this._state = 62 /* BeforeEntity */;\n this.sectionStart = this._index;\n }\n };\n Tokenizer.prototype.stateBeforeDeclaration = function (c) {\n this._state =\n c === \"[\"\n ? 23 /* BeforeCdata1 */\n : c === \"-\"\n ? 18 /* BeforeComment */\n : 16 /* InDeclaration */;\n };\n Tokenizer.prototype.stateInDeclaration = function (c) {\n if (c === \">\") {\n this.cbs.ondeclaration(this.getSection());\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n };\n Tokenizer.prototype.stateInProcessingInstruction = function (c) {\n if (c === \">\") {\n this.cbs.onprocessinginstruction(this.getSection());\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n };\n Tokenizer.prototype.stateBeforeComment = function (c) {\n if (c === \"-\") {\n this._state = 19 /* InComment */;\n this.sectionStart = this._index + 1;\n }\n else {\n this._state = 16 /* InDeclaration */;\n }\n };\n Tokenizer.prototype.stateInComment = function (c) {\n if (c === \"-\")\n this._state = 21 /* AfterComment1 */;\n };\n Tokenizer.prototype.stateInSpecialComment = function (c) {\n if (c === \">\") {\n this.cbs.oncomment(this.buffer.substring(this.sectionStart, this._index));\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n };\n Tokenizer.prototype.stateAfterComment1 = function (c) {\n if (c === \"-\") {\n this._state = 22 /* AfterComment2 */;\n }\n else {\n this._state = 19 /* InComment */;\n }\n };\n Tokenizer.prototype.stateAfterComment2 = function (c) {\n if (c === \">\") {\n // Remove 2 trailing chars\n this.cbs.oncomment(this.buffer.substring(this.sectionStart, this._index - 2));\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n else if (c !== \"-\") {\n this._state = 19 /* InComment */;\n }\n // Else: stay in AFTER_COMMENT_2 (`--->`)\n };\n Tokenizer.prototype.stateBeforeCdata6 = function (c) {\n if (c === \"[\") {\n this._state = 29 /* InCdata */;\n this.sectionStart = this._index + 1;\n }\n else {\n this._state = 16 /* InDeclaration */;\n this._index--;\n }\n };\n Tokenizer.prototype.stateInCdata = function (c) {\n if (c === \"]\")\n this._state = 30 /* AfterCdata1 */;\n };\n Tokenizer.prototype.stateAfterCdata1 = function (c) {\n if (c === \"]\")\n this._state = 31 /* AfterCdata2 */;\n else\n this._state = 29 /* InCdata */;\n };\n Tokenizer.prototype.stateAfterCdata2 = function (c) {\n if (c === \">\") {\n // Remove 2 trailing chars\n this.cbs.oncdata(this.buffer.substring(this.sectionStart, this._index - 2));\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n else if (c !== \"]\") {\n this._state = 29 /* InCdata */;\n }\n // Else: stay in AFTER_CDATA_2 (`]]]>`)\n };\n Tokenizer.prototype.stateBeforeSpecialS = function (c) {\n if (c === \"c\" || c === \"C\") {\n this._state = 34 /* BeforeScript1 */;\n }\n else if (c === \"t\" || c === \"T\") {\n this._state = 44 /* BeforeStyle1 */;\n }\n else {\n this._state = 3 /* InTagName */;\n this._index--; // Consume the token again\n }\n };\n Tokenizer.prototype.stateBeforeSpecialSEnd = function (c) {\n if (this.special === 2 /* Script */ && (c === \"c\" || c === \"C\")) {\n this._state = 39 /* AfterScript1 */;\n }\n else if (this.special === 3 /* Style */ && (c === \"t\" || c === \"T\")) {\n this._state = 48 /* AfterStyle1 */;\n }\n else\n this._state = 1 /* Text */;\n };\n Tokenizer.prototype.stateBeforeSpecialLast = function (c, special) {\n if (c === \"/\" || c === \">\" || whitespace(c)) {\n this.special = special;\n }\n this._state = 3 /* InTagName */;\n this._index--; // Consume the token again\n };\n Tokenizer.prototype.stateAfterSpecialLast = function (c, sectionStartOffset) {\n if (c === \">\" || whitespace(c)) {\n this.special = 1 /* None */;\n this._state = 6 /* InClosingTagName */;\n this.sectionStart = this._index - sectionStartOffset;\n this._index--; // Reconsume the token\n }\n else\n this._state = 1 /* Text */;\n };\n // For entities terminated with a semicolon\n Tokenizer.prototype.parseFixedEntity = function (map) {\n if (map === void 0) { map = this.xmlMode ? xml_json_1.default : entities_json_1.default; }\n // Offset = 1\n if (this.sectionStart + 1 < this._index) {\n var entity = this.buffer.substring(this.sectionStart + 1, this._index);\n if (Object.prototype.hasOwnProperty.call(map, entity)) {\n this.emitPartial(map[entity]);\n this.sectionStart = this._index + 1;\n }\n }\n };\n // Parses legacy entities (without trailing semicolon)\n Tokenizer.prototype.parseLegacyEntity = function () {\n var start = this.sectionStart + 1;\n // The max length of legacy entities is 6\n var limit = Math.min(this._index - start, 6);\n while (limit >= 2) {\n // The min length of legacy entities is 2\n var entity = this.buffer.substr(start, limit);\n if (Object.prototype.hasOwnProperty.call(legacy_json_1.default, entity)) {\n this.emitPartial(legacy_json_1.default[entity]);\n this.sectionStart += limit + 1;\n return;\n }\n limit--;\n }\n };\n Tokenizer.prototype.stateInNamedEntity = function (c) {\n if (c === \";\") {\n this.parseFixedEntity();\n // Retry as legacy entity if entity wasn't parsed\n if (this.baseState === 1 /* Text */ &&\n this.sectionStart + 1 < this._index &&\n !this.xmlMode) {\n this.parseLegacyEntity();\n }\n this._state = this.baseState;\n }\n else if ((c < \"0\" || c > \"9\") && !isASCIIAlpha(c)) {\n if (this.xmlMode || this.sectionStart + 1 === this._index) {\n // Ignore\n }\n else if (this.baseState !== 1 /* Text */) {\n if (c !== \"=\") {\n // Parse as legacy entity, without allowing additional characters.\n this.parseFixedEntity(legacy_json_1.default);\n }\n }\n else {\n this.parseLegacyEntity();\n }\n this._state = this.baseState;\n this._index--;\n }\n };\n Tokenizer.prototype.decodeNumericEntity = function (offset, base, strict) {\n var sectionStart = this.sectionStart + offset;\n if (sectionStart !== this._index) {\n // Parse entity\n var entity = this.buffer.substring(sectionStart, this._index);\n var parsed = parseInt(entity, base);\n this.emitPartial(decode_codepoint_1.default(parsed));\n this.sectionStart = strict ? this._index + 1 : this._index;\n }\n this._state = this.baseState;\n };\n Tokenizer.prototype.stateInNumericEntity = function (c) {\n if (c === \";\") {\n this.decodeNumericEntity(2, 10, true);\n }\n else if (c < \"0\" || c > \"9\") {\n if (!this.xmlMode) {\n this.decodeNumericEntity(2, 10, false);\n }\n else {\n this._state = this.baseState;\n }\n this._index--;\n }\n };\n Tokenizer.prototype.stateInHexEntity = function (c) {\n if (c === \";\") {\n this.decodeNumericEntity(3, 16, true);\n }\n else if ((c < \"a\" || c > \"f\") &&\n (c < \"A\" || c > \"F\") &&\n (c < \"0\" || c > \"9\")) {\n if (!this.xmlMode) {\n this.decodeNumericEntity(3, 16, false);\n }\n else {\n this._state = this.baseState;\n }\n this._index--;\n }\n };\n Tokenizer.prototype.cleanup = function () {\n if (this.sectionStart < 0) {\n this.buffer = \"\";\n this.bufferOffset += this._index;\n this._index = 0;\n }\n else if (this.running) {\n if (this._state === 1 /* Text */) {\n if (this.sectionStart !== this._index) {\n this.cbs.ontext(this.buffer.substr(this.sectionStart));\n }\n this.buffer = \"\";\n this.bufferOffset += this._index;\n this._index = 0;\n }\n else if (this.sectionStart === this._index) {\n // The section just started\n this.buffer = \"\";\n this.bufferOffset += this._index;\n this._index = 0;\n }\n else {\n // Remove everything unnecessary\n this.buffer = this.buffer.substr(this.sectionStart);\n this._index -= this.sectionStart;\n this.bufferOffset += this.sectionStart;\n }\n this.sectionStart = 0;\n }\n };\n /**\n * Iterates through the buffer, calling the function corresponding to the current state.\n *\n * States that are more likely to be hit are higher up, as a performance improvement.\n */\n Tokenizer.prototype.parse = function () {\n while (this._index < this.buffer.length && this.running) {\n var c = this.buffer.charAt(this._index);\n if (this._state === 1 /* Text */) {\n this.stateText(c);\n }\n else if (this._state === 12 /* InAttributeValueDq */) {\n this.stateInAttributeValueDoubleQuotes(c);\n }\n else if (this._state === 9 /* InAttributeName */) {\n this.stateInAttributeName(c);\n }\n else if (this._state === 19 /* InComment */) {\n this.stateInComment(c);\n }\n else if (this._state === 20 /* InSpecialComment */) {\n this.stateInSpecialComment(c);\n }\n else if (this._state === 8 /* BeforeAttributeName */) {\n this.stateBeforeAttributeName(c);\n }\n else if (this._state === 3 /* InTagName */) {\n this.stateInTagName(c);\n }\n else if (this._state === 6 /* InClosingTagName */) {\n this.stateInClosingTagName(c);\n }\n else if (this._state === 2 /* BeforeTagName */) {\n this.stateBeforeTagName(c);\n }\n else if (this._state === 10 /* AfterAttributeName */) {\n this.stateAfterAttributeName(c);\n }\n else if (this._state === 13 /* InAttributeValueSq */) {\n this.stateInAttributeValueSingleQuotes(c);\n }\n else if (this._state === 11 /* BeforeAttributeValue */) {\n this.stateBeforeAttributeValue(c);\n }\n else if (this._state === 5 /* BeforeClosingTagName */) {\n this.stateBeforeClosingTagName(c);\n }\n else if (this._state === 7 /* AfterClosingTagName */) {\n this.stateAfterClosingTagName(c);\n }\n else if (this._state === 32 /* BeforeSpecialS */) {\n this.stateBeforeSpecialS(c);\n }\n else if (this._state === 21 /* AfterComment1 */) {\n this.stateAfterComment1(c);\n }\n else if (this._state === 14 /* InAttributeValueNq */) {\n this.stateInAttributeValueNoQuotes(c);\n }\n else if (this._state === 4 /* InSelfClosingTag */) {\n this.stateInSelfClosingTag(c);\n }\n else if (this._state === 16 /* InDeclaration */) {\n this.stateInDeclaration(c);\n }\n else if (this._state === 15 /* BeforeDeclaration */) {\n this.stateBeforeDeclaration(c);\n }\n else if (this._state === 22 /* AfterComment2 */) {\n this.stateAfterComment2(c);\n }\n else if (this._state === 18 /* BeforeComment */) {\n this.stateBeforeComment(c);\n }\n else if (this._state === 33 /* BeforeSpecialSEnd */) {\n this.stateBeforeSpecialSEnd(c);\n }\n else if (this._state === 53 /* BeforeSpecialTEnd */) {\n stateAfterSpecialTEnd(this, c);\n }\n else if (this._state === 39 /* AfterScript1 */) {\n stateAfterScript1(this, c);\n }\n else if (this._state === 40 /* AfterScript2 */) {\n stateAfterScript2(this, c);\n }\n else if (this._state === 41 /* AfterScript3 */) {\n stateAfterScript3(this, c);\n }\n else if (this._state === 34 /* BeforeScript1 */) {\n stateBeforeScript1(this, c);\n }\n else if (this._state === 35 /* BeforeScript2 */) {\n stateBeforeScript2(this, c);\n }\n else if (this._state === 36 /* BeforeScript3 */) {\n stateBeforeScript3(this, c);\n }\n else if (this._state === 37 /* BeforeScript4 */) {\n stateBeforeScript4(this, c);\n }\n else if (this._state === 38 /* BeforeScript5 */) {\n this.stateBeforeSpecialLast(c, 2 /* Script */);\n }\n else if (this._state === 42 /* AfterScript4 */) {\n stateAfterScript4(this, c);\n }\n else if (this._state === 43 /* AfterScript5 */) {\n this.stateAfterSpecialLast(c, 6);\n }\n else if (this._state === 44 /* BeforeStyle1 */) {\n stateBeforeStyle1(this, c);\n }\n else if (this._state === 29 /* InCdata */) {\n this.stateInCdata(c);\n }\n else if (this._state === 45 /* BeforeStyle2 */) {\n stateBeforeStyle2(this, c);\n }\n else if (this._state === 46 /* BeforeStyle3 */) {\n stateBeforeStyle3(this, c);\n }\n else if (this._state === 47 /* BeforeStyle4 */) {\n this.stateBeforeSpecialLast(c, 3 /* Style */);\n }\n else if (this._state === 48 /* AfterStyle1 */) {\n stateAfterStyle1(this, c);\n }\n else if (this._state === 49 /* AfterStyle2 */) {\n stateAfterStyle2(this, c);\n }\n else if (this._state === 50 /* AfterStyle3 */) {\n stateAfterStyle3(this, c);\n }\n else if (this._state === 51 /* AfterStyle4 */) {\n this.stateAfterSpecialLast(c, 5);\n }\n else if (this._state === 52 /* BeforeSpecialT */) {\n stateBeforeSpecialT(this, c);\n }\n else if (this._state === 54 /* BeforeTitle1 */) {\n stateBeforeTitle1(this, c);\n }\n else if (this._state === 55 /* BeforeTitle2 */) {\n stateBeforeTitle2(this, c);\n }\n else if (this._state === 56 /* BeforeTitle3 */) {\n stateBeforeTitle3(this, c);\n }\n else if (this._state === 57 /* BeforeTitle4 */) {\n this.stateBeforeSpecialLast(c, 4 /* Title */);\n }\n else if (this._state === 58 /* AfterTitle1 */) {\n stateAfterTitle1(this, c);\n }\n else if (this._state === 59 /* AfterTitle2 */) {\n stateAfterTitle2(this, c);\n }\n else if (this._state === 60 /* AfterTitle3 */) {\n stateAfterTitle3(this, c);\n }\n else if (this._state === 61 /* AfterTitle4 */) {\n this.stateAfterSpecialLast(c, 5);\n }\n else if (this._state === 17 /* InProcessingInstruction */) {\n this.stateInProcessingInstruction(c);\n }\n else if (this._state === 64 /* InNamedEntity */) {\n this.stateInNamedEntity(c);\n }\n else if (this._state === 23 /* BeforeCdata1 */) {\n stateBeforeCdata1(this, c);\n }\n else if (this._state === 62 /* BeforeEntity */) {\n stateBeforeEntity(this, c);\n }\n else if (this._state === 24 /* BeforeCdata2 */) {\n stateBeforeCdata2(this, c);\n }\n else if (this._state === 25 /* BeforeCdata3 */) {\n stateBeforeCdata3(this, c);\n }\n else if (this._state === 30 /* AfterCdata1 */) {\n this.stateAfterCdata1(c);\n }\n else if (this._state === 31 /* AfterCdata2 */) {\n this.stateAfterCdata2(c);\n }\n else if (this._state === 26 /* BeforeCdata4 */) {\n stateBeforeCdata4(this, c);\n }\n else if (this._state === 27 /* BeforeCdata5 */) {\n stateBeforeCdata5(this, c);\n }\n else if (this._state === 28 /* BeforeCdata6 */) {\n this.stateBeforeCdata6(c);\n }\n else if (this._state === 66 /* InHexEntity */) {\n this.stateInHexEntity(c);\n }\n else if (this._state === 65 /* InNumericEntity */) {\n this.stateInNumericEntity(c);\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n }\n else if (this._state === 63 /* BeforeNumericEntity */) {\n stateBeforeNumericEntity(this, c);\n }\n else {\n this.cbs.onerror(Error(\"unknown _state\"), this._state);\n }\n this._index++;\n }\n this.cleanup();\n };\n Tokenizer.prototype.finish = function () {\n // If there is remaining data, emit it in a reasonable way\n if (this.sectionStart < this._index) {\n this.handleTrailingData();\n }\n this.cbs.onend();\n };\n Tokenizer.prototype.handleTrailingData = function () {\n var data = this.buffer.substr(this.sectionStart);\n if (this._state === 29 /* InCdata */ ||\n this._state === 30 /* AfterCdata1 */ ||\n this._state === 31 /* AfterCdata2 */) {\n this.cbs.oncdata(data);\n }\n else if (this._state === 19 /* InComment */ ||\n this._state === 21 /* AfterComment1 */ ||\n this._state === 22 /* AfterComment2 */) {\n this.cbs.oncomment(data);\n }\n else if (this._state === 64 /* InNamedEntity */ && !this.xmlMode) {\n this.parseLegacyEntity();\n if (this.sectionStart < this._index) {\n this._state = this.baseState;\n this.handleTrailingData();\n }\n }\n else if (this._state === 65 /* InNumericEntity */ && !this.xmlMode) {\n this.decodeNumericEntity(2, 10, false);\n if (this.sectionStart < this._index) {\n this._state = this.baseState;\n this.handleTrailingData();\n }\n }\n else if (this._state === 66 /* InHexEntity */ && !this.xmlMode) {\n this.decodeNumericEntity(3, 16, false);\n if (this.sectionStart < this._index) {\n this._state = this.baseState;\n this.handleTrailingData();\n }\n }\n else if (this._state !== 3 /* InTagName */ &&\n this._state !== 8 /* BeforeAttributeName */ &&\n this._state !== 11 /* BeforeAttributeValue */ &&\n this._state !== 10 /* AfterAttributeName */ &&\n this._state !== 9 /* InAttributeName */ &&\n this._state !== 13 /* InAttributeValueSq */ &&\n this._state !== 12 /* InAttributeValueDq */ &&\n this._state !== 14 /* InAttributeValueNq */ &&\n this._state !== 6 /* InClosingTagName */) {\n this.cbs.ontext(data);\n }\n /*\n * Else, ignore remaining data\n * TODO add a way to remove current tag\n */\n };\n Tokenizer.prototype.getSection = function () {\n return this.buffer.substring(this.sectionStart, this._index);\n };\n Tokenizer.prototype.emitToken = function (name) {\n this.cbs[name](this.getSection());\n this.sectionStart = -1;\n };\n Tokenizer.prototype.emitPartial = function (value) {\n if (this.baseState !== 1 /* Text */) {\n this.cbs.onattribdata(value); // TODO implement the new event\n }\n else {\n this.cbs.ontext(value);\n }\n };\n return Tokenizer;\n}());\nexports.default = Tokenizer;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RssHandler = exports.DefaultHandler = exports.DomUtils = exports.ElementType = exports.Tokenizer = exports.createDomStream = exports.parseDOM = exports.parseDocument = exports.DomHandler = exports.Parser = void 0;\nvar Parser_1 = require(\"./Parser\");\nObject.defineProperty(exports, \"Parser\", { enumerable: true, get: function () { return Parser_1.Parser; } });\nvar domhandler_1 = require(\"domhandler\");\nObject.defineProperty(exports, \"DomHandler\", { enumerable: true, get: function () { return domhandler_1.DomHandler; } });\nObject.defineProperty(exports, \"DefaultHandler\", { enumerable: true, get: function () { return domhandler_1.DomHandler; } });\n// Helper methods\n/**\n * Parses the data, returns the resulting document.\n *\n * @param data The data that should be parsed.\n * @param options Optional options for the parser and DOM builder.\n */\nfunction parseDocument(data, options) {\n var handler = new domhandler_1.DomHandler(undefined, options);\n new Parser_1.Parser(handler, options).end(data);\n return handler.root;\n}\nexports.parseDocument = parseDocument;\n/**\n * Parses data, returns an array of the root nodes.\n *\n * Note that the root nodes still have a `Document` node as their parent.\n * Use `parseDocument` to get the `Document` node instead.\n *\n * @param data The data that should be parsed.\n * @param options Optional options for the parser and DOM builder.\n * @deprecated Use `parseDocument` instead.\n */\nfunction parseDOM(data, options) {\n return parseDocument(data, options).children;\n}\nexports.parseDOM = parseDOM;\n/**\n * Creates a parser instance, with an attached DOM handler.\n *\n * @param cb A callback that will be called once parsing has been completed.\n * @param options Optional options for the parser and DOM builder.\n * @param elementCb An optional callback that will be called every time a tag has been completed inside of the DOM.\n */\nfunction createDomStream(cb, options, elementCb) {\n var handler = new domhandler_1.DomHandler(cb, options, elementCb);\n return new Parser_1.Parser(handler, options);\n}\nexports.createDomStream = createDomStream;\nvar Tokenizer_1 = require(\"./Tokenizer\");\nObject.defineProperty(exports, \"Tokenizer\", { enumerable: true, get: function () { return __importDefault(Tokenizer_1).default; } });\nvar ElementType = __importStar(require(\"domelementtype\"));\nexports.ElementType = ElementType;\n/*\n * All of the following exports exist for backwards-compatibility.\n * They should probably be removed eventually.\n */\n__exportStar(require(\"./FeedHandler\"), exports);\nexports.DomUtils = __importStar(require(\"domutils\"));\nvar FeedHandler_1 = require(\"./FeedHandler\");\nObject.defineProperty(exports, \"RssHandler\", { enumerable: true, get: function () { return FeedHandler_1.FeedHandler; } });\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n/*!\n * is-plain-object <https://github.com/jonschlinkert/is-plain-object>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nfunction isObject(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nfunction isPlainObject(o) {\n var ctor,prot;\n\n if (isObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (ctor === undefined) return true;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n}\n\nexports.isPlainObject = isPlainObject;\n","/**\n * Srcset Parser\n *\n * By Alex Bell | MIT License\n *\n * JS Parser for the string value that appears in markup <img srcset=\"here\">\n *\n * @returns Array [{url: _, d: _, w: _, h:_}, ...]\n *\n * Based super duper closely on the reference algorithm at:\n * https://html.spec.whatwg.org/multipage/embedded-content.html#parse-a-srcset-attribute\n *\n * Most comments are copied in directly from the spec\n * (except for comments in parens).\n */\n\n(function (root, factory) {\n\tif (typeof define === 'function' && define.amd) {\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine([], factory);\n\t} else if (typeof module === 'object' && module.exports) {\n\t\t// Node. Does not work with strict CommonJS, but\n\t\t// only CommonJS-like environments that support module.exports,\n\t\t// like Node.\n\t\tmodule.exports = factory();\n\t} else {\n\t\t// Browser globals (root is window)\n\t\troot.parseSrcset = factory();\n\t}\n}(this, function () {\n\n\t// 1. Let input be the value passed to this algorithm.\n\treturn function (input) {\n\n\t\t// UTILITY FUNCTIONS\n\n\t\t// Manual is faster than RegEx\n\t\t// http://bjorn.tipling.com/state-and-regular-expressions-in-javascript\n\t\t// http://jsperf.com/whitespace-character/5\n\t\tfunction isSpace(c) {\n\t\t\treturn (c === \"\\u0020\" || // space\n\t\t\tc === \"\\u0009\" || // horizontal tab\n\t\t\tc === \"\\u000A\" || // new line\n\t\t\tc === \"\\u000C\" || // form feed\n\t\t\tc === \"\\u000D\"); // carriage return\n\t\t}\n\n\t\tfunction collectCharacters(regEx) {\n\t\t\tvar chars,\n\t\t\t\tmatch = regEx.exec(input.substring(pos));\n\t\t\tif (match) {\n\t\t\t\tchars = match[ 0 ];\n\t\t\t\tpos += chars.length;\n\t\t\t\treturn chars;\n\t\t\t}\n\t\t}\n\n\t\tvar inputLength = input.length,\n\n\t\t\t// (Don't use \\s, to avoid matching non-breaking space)\n\t\t\tregexLeadingSpaces = /^[ \\t\\n\\r\\u000c]+/,\n\t\t\tregexLeadingCommasOrSpaces = /^[, \\t\\n\\r\\u000c]+/,\n\t\t\tregexLeadingNotSpaces = /^[^ \\t\\n\\r\\u000c]+/,\n\t\t\tregexTrailingCommas = /[,]+$/,\n\t\t\tregexNonNegativeInteger = /^\\d+$/,\n\n\t\t\t// ( Positive or negative or unsigned integers or decimals, without or without exponents.\n\t\t\t// Must include at least one digit.\n\t\t\t// According to spec tests any decimal point must be followed by a digit.\n\t\t\t// No leading plus sign is allowed.)\n\t\t\t// https://html.spec.whatwg.org/multipage/infrastructure.html#valid-floating-point-number\n\t\t\tregexFloatingPoint = /^-?(?:[0-9]+|[0-9]*\\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,\n\n\t\t\turl,\n\t\t\tdescriptors,\n\t\t\tcurrentDescriptor,\n\t\t\tstate,\n\t\t\tc,\n\n\t\t\t// 2. Let position be a pointer into input, initially pointing at the start\n\t\t\t// of the string.\n\t\t\tpos = 0,\n\n\t\t\t// 3. Let candidates be an initially empty source set.\n\t\t\tcandidates = [];\n\n\t\t// 4. Splitting loop: Collect a sequence of characters that are space\n\t\t// characters or U+002C COMMA characters. If any U+002C COMMA characters\n\t\t// were collected, that is a parse error.\n\t\twhile (true) {\n\t\t\tcollectCharacters(regexLeadingCommasOrSpaces);\n\n\t\t\t// 5. If position is past the end of input, return candidates and abort these steps.\n\t\t\tif (pos >= inputLength) {\n\t\t\t\treturn candidates; // (we're done, this is the sole return path)\n\t\t\t}\n\n\t\t\t// 6. Collect a sequence of characters that are not space characters,\n\t\t\t// and let that be url.\n\t\t\turl = collectCharacters(regexLeadingNotSpaces);\n\n\t\t\t// 7. Let descriptors be a new empty list.\n\t\t\tdescriptors = [];\n\n\t\t\t// 8. If url ends with a U+002C COMMA character (,), follow these substeps:\n\t\t\t//\t\t(1). Remove all trailing U+002C COMMA characters from url. If this removed\n\t\t\t// more than one character, that is a parse error.\n\t\t\tif (url.slice(-1) === \",\") {\n\t\t\t\turl = url.replace(regexTrailingCommas, \"\");\n\t\t\t\t// (Jump ahead to step 9 to skip tokenization and just push the candidate).\n\t\t\t\tparseDescriptors();\n\n\t\t\t\t//\tOtherwise, follow these substeps:\n\t\t\t} else {\n\t\t\t\ttokenize();\n\t\t\t} // (close else of step 8)\n\n\t\t\t// 16. Return to the step labeled splitting loop.\n\t\t} // (Close of big while loop.)\n\n\t\t/**\n\t\t * Tokenizes descriptor properties prior to parsing\n\t\t * Returns undefined.\n\t\t */\n\t\tfunction tokenize() {\n\n\t\t\t// 8.1. Descriptor tokeniser: Skip whitespace\n\t\t\tcollectCharacters(regexLeadingSpaces);\n\n\t\t\t// 8.2. Let current descriptor be the empty string.\n\t\t\tcurrentDescriptor = \"\";\n\n\t\t\t// 8.3. Let state be in descriptor.\n\t\t\tstate = \"in descriptor\";\n\n\t\t\twhile (true) {\n\n\t\t\t\t// 8.4. Let c be the character at position.\n\t\t\t\tc = input.charAt(pos);\n\n\t\t\t\t// Do the following depending on the value of state.\n\t\t\t\t// For the purpose of this step, \"EOF\" is a special character representing\n\t\t\t\t// that position is past the end of input.\n\n\t\t\t\t// In descriptor\n\t\t\t\tif (state === \"in descriptor\") {\n\t\t\t\t\t// Do the following, depending on the value of c:\n\n\t\t\t\t\t// Space character\n\t\t\t\t\t// If current descriptor is not empty, append current descriptor to\n\t\t\t\t\t// descriptors and let current descriptor be the empty string.\n\t\t\t\t\t// Set state to after descriptor.\n\t\t\t\t\tif (isSpace(c)) {\n\t\t\t\t\t\tif (currentDescriptor) {\n\t\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\t\tcurrentDescriptor = \"\";\n\t\t\t\t\t\t\tstate = \"after descriptor\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// U+002C COMMA (,)\n\t\t\t\t\t\t// Advance position to the next character in input. If current descriptor\n\t\t\t\t\t\t// is not empty, append current descriptor to descriptors. Jump to the step\n\t\t\t\t\t\t// labeled descriptor parser.\n\t\t\t\t\t} else if (c === \",\") {\n\t\t\t\t\t\tpos += 1;\n\t\t\t\t\t\tif (currentDescriptor) {\n\t\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// U+0028 LEFT PARENTHESIS (()\n\t\t\t\t\t\t// Append c to current descriptor. Set state to in parens.\n\t\t\t\t\t} else if (c === \"\\u0028\") {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t\tstate = \"in parens\";\n\n\t\t\t\t\t\t// EOF\n\t\t\t\t\t\t// If current descriptor is not empty, append current descriptor to\n\t\t\t\t\t\t// descriptors. Jump to the step labeled descriptor parser.\n\t\t\t\t\t} else if (c === \"\") {\n\t\t\t\t\t\tif (currentDescriptor) {\n\t\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// Anything else\n\t\t\t\t\t\t// Append c to current descriptor.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t}\n\t\t\t\t\t// (end \"in descriptor\"\n\n\t\t\t\t\t// In parens\n\t\t\t\t} else if (state === \"in parens\") {\n\n\t\t\t\t\t// U+0029 RIGHT PARENTHESIS ())\n\t\t\t\t\t// Append c to current descriptor. Set state to in descriptor.\n\t\t\t\t\tif (c === \")\") {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t\tstate = \"in descriptor\";\n\n\t\t\t\t\t\t// EOF\n\t\t\t\t\t\t// Append current descriptor to descriptors. Jump to the step labeled\n\t\t\t\t\t\t// descriptor parser.\n\t\t\t\t\t} else if (c === \"\") {\n\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// Anything else\n\t\t\t\t\t\t// Append c to current descriptor.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t}\n\n\t\t\t\t\t// After descriptor\n\t\t\t\t} else if (state === \"after descriptor\") {\n\n\t\t\t\t\t// Do the following, depending on the value of c:\n\t\t\t\t\t// Space character: Stay in this state.\n\t\t\t\t\tif (isSpace(c)) {\n\n\t\t\t\t\t\t// EOF: Jump to the step labeled descriptor parser.\n\t\t\t\t\t} else if (c === \"\") {\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// Anything else\n\t\t\t\t\t\t// Set state to in descriptor. Set position to the previous character in input.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate = \"in descriptor\";\n\t\t\t\t\t\tpos -= 1;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Advance position to the next character in input.\n\t\t\t\tpos += 1;\n\n\t\t\t\t// Repeat this step.\n\t\t\t} // (close while true loop)\n\t\t}\n\n\t\t/**\n\t\t * Adds descriptor properties to a candidate, pushes to the candidates array\n\t\t * @return undefined\n\t\t */\n\t\t// Declared outside of the while loop so that it's only created once.\n\t\tfunction parseDescriptors() {\n\n\t\t\t// 9. Descriptor parser: Let error be no.\n\t\t\tvar pError = false,\n\n\t\t\t\t// 10. Let width be absent.\n\t\t\t\t// 11. Let density be absent.\n\t\t\t\t// 12. Let future-compat-h be absent. (We're implementing it now as h)\n\t\t\t\tw, d, h, i,\n\t\t\t\tcandidate = {},\n\t\t\t\tdesc, lastChar, value, intVal, floatVal;\n\n\t\t\t// 13. For each descriptor in descriptors, run the appropriate set of steps\n\t\t\t// from the following list:\n\t\t\tfor (i = 0 ; i < descriptors.length; i++) {\n\t\t\t\tdesc = descriptors[ i ];\n\n\t\t\t\tlastChar = desc[ desc.length - 1 ];\n\t\t\t\tvalue = desc.substring(0, desc.length - 1);\n\t\t\t\tintVal = parseInt(value, 10);\n\t\t\t\tfloatVal = parseFloat(value);\n\n\t\t\t\t// If the descriptor consists of a valid non-negative integer followed by\n\t\t\t\t// a U+0077 LATIN SMALL LETTER W character\n\t\t\t\tif (regexNonNegativeInteger.test(value) && (lastChar === \"w\")) {\n\n\t\t\t\t\t// If width and density are not both absent, then let error be yes.\n\t\t\t\t\tif (w || d) {pError = true;}\n\n\t\t\t\t\t// Apply the rules for parsing non-negative integers to the descriptor.\n\t\t\t\t\t// If the result is zero, let error be yes.\n\t\t\t\t\t// Otherwise, let width be the result.\n\t\t\t\t\tif (intVal === 0) {pError = true;} else {w = intVal;}\n\n\t\t\t\t\t// If the descriptor consists of a valid floating-point number followed by\n\t\t\t\t\t// a U+0078 LATIN SMALL LETTER X character\n\t\t\t\t} else if (regexFloatingPoint.test(value) && (lastChar === \"x\")) {\n\n\t\t\t\t\t// If width, density and future-compat-h are not all absent, then let error\n\t\t\t\t\t// be yes.\n\t\t\t\t\tif (w || d || h) {pError = true;}\n\n\t\t\t\t\t// Apply the rules for parsing floating-point number values to the descriptor.\n\t\t\t\t\t// If the result is less than zero, let error be yes. Otherwise, let density\n\t\t\t\t\t// be the result.\n\t\t\t\t\tif (floatVal < 0) {pError = true;} else {d = floatVal;}\n\n\t\t\t\t\t// If the descriptor consists of a valid non-negative integer followed by\n\t\t\t\t\t// a U+0068 LATIN SMALL LETTER H character\n\t\t\t\t} else if (regexNonNegativeInteger.test(value) && (lastChar === \"h\")) {\n\n\t\t\t\t\t// If height and density are not both absent, then let error be yes.\n\t\t\t\t\tif (h || d) {pError = true;}\n\n\t\t\t\t\t// Apply the rules for parsing non-negative integers to the descriptor.\n\t\t\t\t\t// If the result is zero, let error be yes. Otherwise, let future-compat-h\n\t\t\t\t\t// be the result.\n\t\t\t\t\tif (intVal === 0) {pError = true;} else {h = intVal;}\n\n\t\t\t\t\t// Anything else, Let error be yes.\n\t\t\t\t} else {pError = true;}\n\t\t\t} // (close step 13 for loop)\n\n\t\t\t// 15. If error is still no, then append a new image source to candidates whose\n\t\t\t// URL is url, associated with a width width if not absent and a pixel\n\t\t\t// density density if not absent. Otherwise, there is a parse error.\n\t\t\tif (!pError) {\n\t\t\t\tcandidate.url = url;\n\t\t\t\tif (w) { candidate.w = w;}\n\t\t\t\tif (d) { candidate.d = d;}\n\t\t\t\tif (h) { candidate.h = h;}\n\t\t\t\tcandidates.push(candidate);\n\t\t\t} else if (console && console.log) {\n\t\t\t\tconsole.log(\"Invalid srcset descriptor found in '\" +\n\t\t\t\t\tinput + \"' at '\" + desc + \"'.\");\n\t\t\t}\n\t\t} // (close parseDescriptors fn)\n\n\t}\n}));\n","var x=String;\nvar create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x}};\nmodule.exports=create();\nmodule.exports.createColors = create;\n","'use strict'\n\nlet Container = require('./container')\n\nclass AtRule extends Container {\n constructor(defaults) {\n super(defaults)\n this.type = 'atrule'\n }\n\n append(...children) {\n if (!this.proxyOf.nodes) this.nodes = []\n return super.append(...children)\n }\n\n prepend(...children) {\n if (!this.proxyOf.nodes) this.nodes = []\n return super.prepend(...children)\n }\n}\n\nmodule.exports = AtRule\nAtRule.default = AtRule\n\nContainer.registerAtRule(AtRule)\n","'use strict'\n\nlet Node = require('./node')\n\nclass Comment extends Node {\n constructor(defaults) {\n super(defaults)\n this.type = 'comment'\n }\n}\n\nmodule.exports = Comment\nComment.default = Comment\n","'use strict'\n\nlet { isClean, my } = require('./symbols')\nlet Declaration = require('./declaration')\nlet Comment = require('./comment')\nlet Node = require('./node')\n\nlet parse, Rule, AtRule, Root\n\nfunction cleanSource(nodes) {\n return nodes.map(i => {\n if (i.nodes) i.nodes = cleanSource(i.nodes)\n delete i.source\n return i\n })\n}\n\nfunction markDirtyUp(node) {\n node[isClean] = false\n if (node.proxyOf.nodes) {\n for (let i of node.proxyOf.nodes) {\n markDirtyUp(i)\n }\n }\n}\n\nclass Container extends Node {\n push(child) {\n child.parent = this\n this.proxyOf.nodes.push(child)\n return this\n }\n\n each(callback) {\n if (!this.proxyOf.nodes) return undefined\n let iterator = this.getIterator()\n\n let index, result\n while (this.indexes[iterator] < this.proxyOf.nodes.length) {\n index = this.indexes[iterator]\n result = callback(this.proxyOf.nodes[index], index)\n if (result === false) break\n\n this.indexes[iterator] += 1\n }\n\n delete this.indexes[iterator]\n return result\n }\n\n walk(callback) {\n return this.each((child, i) => {\n let result\n try {\n result = callback(child, i)\n } catch (e) {\n throw child.addToError(e)\n }\n if (result !== false && child.walk) {\n result = child.walk(callback)\n }\n\n return result\n })\n }\n\n walkDecls(prop, callback) {\n if (!callback) {\n callback = prop\n return this.walk((child, i) => {\n if (child.type === 'decl') {\n return callback(child, i)\n }\n })\n }\n if (prop instanceof RegExp) {\n return this.walk((child, i) => {\n if (child.type === 'decl' && prop.test(child.prop)) {\n return callback(child, i)\n }\n })\n }\n return this.walk((child, i) => {\n if (child.type === 'decl' && child.prop === prop) {\n return callback(child, i)\n }\n })\n }\n\n walkRules(selector, callback) {\n if (!callback) {\n callback = selector\n\n return this.walk((child, i) => {\n if (child.type === 'rule') {\n return callback(child, i)\n }\n })\n }\n if (selector instanceof RegExp) {\n return this.walk((child, i) => {\n if (child.type === 'rule' && selector.test(child.selector)) {\n return callback(child, i)\n }\n })\n }\n return this.walk((child, i) => {\n if (child.type === 'rule' && child.selector === selector) {\n return callback(child, i)\n }\n })\n }\n\n walkAtRules(name, callback) {\n if (!callback) {\n callback = name\n return this.walk((child, i) => {\n if (child.type === 'atrule') {\n return callback(child, i)\n }\n })\n }\n if (name instanceof RegExp) {\n return this.walk((child, i) => {\n if (child.type === 'atrule' && name.test(child.name)) {\n return callback(child, i)\n }\n })\n }\n return this.walk((child, i) => {\n if (child.type === 'atrule' && child.name === name) {\n return callback(child, i)\n }\n })\n }\n\n walkComments(callback) {\n return this.walk((child, i) => {\n if (child.type === 'comment') {\n return callback(child, i)\n }\n })\n }\n\n append(...children) {\n for (let child of children) {\n let nodes = this.normalize(child, this.last)\n for (let node of nodes) this.proxyOf.nodes.push(node)\n }\n\n this.markDirty()\n\n return this\n }\n\n prepend(...children) {\n children = children.reverse()\n for (let child of children) {\n let nodes = this.normalize(child, this.first, 'prepend').reverse()\n for (let node of nodes) this.proxyOf.nodes.unshift(node)\n for (let id in this.indexes) {\n this.indexes[id] = this.indexes[id] + nodes.length\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n cleanRaws(keepBetween) {\n super.cleanRaws(keepBetween)\n if (this.nodes) {\n for (let node of this.nodes) node.cleanRaws(keepBetween)\n }\n }\n\n insertBefore(exist, add) {\n let existIndex = this.index(exist)\n let type = existIndex === 0 ? 'prepend' : false\n let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse()\n existIndex = this.index(exist)\n for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node)\n\n let index\n for (let id in this.indexes) {\n index = this.indexes[id]\n if (existIndex <= index) {\n this.indexes[id] = index + nodes.length\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n insertAfter(exist, add) {\n let existIndex = this.index(exist)\n let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse()\n existIndex = this.index(exist)\n for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node)\n\n let index\n for (let id in this.indexes) {\n index = this.indexes[id]\n if (existIndex < index) {\n this.indexes[id] = index + nodes.length\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n removeChild(child) {\n child = this.index(child)\n this.proxyOf.nodes[child].parent = undefined\n this.proxyOf.nodes.splice(child, 1)\n\n let index\n for (let id in this.indexes) {\n index = this.indexes[id]\n if (index >= child) {\n this.indexes[id] = index - 1\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n removeAll() {\n for (let node of this.proxyOf.nodes) node.parent = undefined\n this.proxyOf.nodes = []\n\n this.markDirty()\n\n return this\n }\n\n replaceValues(pattern, opts, callback) {\n if (!callback) {\n callback = opts\n opts = {}\n }\n\n this.walkDecls(decl => {\n if (opts.props && !opts.props.includes(decl.prop)) return\n if (opts.fast && !decl.value.includes(opts.fast)) return\n\n decl.value = decl.value.replace(pattern, callback)\n })\n\n this.markDirty()\n\n return this\n }\n\n every(condition) {\n return this.nodes.every(condition)\n }\n\n some(condition) {\n return this.nodes.some(condition)\n }\n\n index(child) {\n if (typeof child === 'number') return child\n if (child.proxyOf) child = child.proxyOf\n return this.proxyOf.nodes.indexOf(child)\n }\n\n get first() {\n if (!this.proxyOf.nodes) return undefined\n return this.proxyOf.nodes[0]\n }\n\n get last() {\n if (!this.proxyOf.nodes) return undefined\n return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]\n }\n\n normalize(nodes, sample) {\n if (typeof nodes === 'string') {\n nodes = cleanSource(parse(nodes).nodes)\n } else if (Array.isArray(nodes)) {\n nodes = nodes.slice(0)\n for (let i of nodes) {\n if (i.parent) i.parent.removeChild(i, 'ignore')\n }\n } else if (nodes.type === 'root' && this.type !== 'document') {\n nodes = nodes.nodes.slice(0)\n for (let i of nodes) {\n if (i.parent) i.parent.removeChild(i, 'ignore')\n }\n } else if (nodes.type) {\n nodes = [nodes]\n } else if (nodes.prop) {\n if (typeof nodes.value === 'undefined') {\n throw new Error('Value field is missed in node creation')\n } else if (typeof nodes.value !== 'string') {\n nodes.value = String(nodes.value)\n }\n nodes = [new Declaration(nodes)]\n } else if (nodes.selector) {\n nodes = [new Rule(nodes)]\n } else if (nodes.name) {\n nodes = [new AtRule(nodes)]\n } else if (nodes.text) {\n nodes = [new Comment(nodes)]\n } else {\n throw new Error('Unknown node type in node creation')\n }\n\n let processed = nodes.map(i => {\n /* c8 ignore next */\n if (!i[my]) Container.rebuild(i)\n i = i.proxyOf\n if (i.parent) i.parent.removeChild(i)\n if (i[isClean]) markDirtyUp(i)\n if (typeof i.raws.before === 'undefined') {\n if (sample && typeof sample.raws.before !== 'undefined') {\n i.raws.before = sample.raws.before.replace(/\\S/g, '')\n }\n }\n i.parent = this.proxyOf\n return i\n })\n\n return processed\n }\n\n getProxyProcessor() {\n return {\n set(node, prop, value) {\n if (node[prop] === value) return true\n node[prop] = value\n if (prop === 'name' || prop === 'params' || prop === 'selector') {\n node.markDirty()\n }\n return true\n },\n\n get(node, prop) {\n if (prop === 'proxyOf') {\n return node\n } else if (!node[prop]) {\n return node[prop]\n } else if (\n prop === 'each' ||\n (typeof prop === 'string' && prop.startsWith('walk'))\n ) {\n return (...args) => {\n return node[prop](\n ...args.map(i => {\n if (typeof i === 'function') {\n return (child, index) => i(child.toProxy(), index)\n } else {\n return i\n }\n })\n )\n }\n } else if (prop === 'every' || prop === 'some') {\n return cb => {\n return node[prop]((child, ...other) =>\n cb(child.toProxy(), ...other)\n )\n }\n } else if (prop === 'root') {\n return () => node.root().toProxy()\n } else if (prop === 'nodes') {\n return node.nodes.map(i => i.toProxy())\n } else if (prop === 'first' || prop === 'last') {\n return node[prop].toProxy()\n } else {\n return node[prop]\n }\n }\n }\n }\n\n getIterator() {\n if (!this.lastEach) this.lastEach = 0\n if (!this.indexes) this.indexes = {}\n\n this.lastEach += 1\n let iterator = this.lastEach\n this.indexes[iterator] = 0\n\n return iterator\n }\n}\n\nContainer.registerParse = dependant => {\n parse = dependant\n}\n\nContainer.registerRule = dependant => {\n Rule = dependant\n}\n\nContainer.registerAtRule = dependant => {\n AtRule = dependant\n}\n\nContainer.registerRoot = dependant => {\n Root = dependant\n}\n\nmodule.exports = Container\nContainer.default = Container\n\n/* c8 ignore start */\nContainer.rebuild = node => {\n if (node.type === 'atrule') {\n Object.setPrototypeOf(node, AtRule.prototype)\n } else if (node.type === 'rule') {\n Object.setPrototypeOf(node, Rule.prototype)\n } else if (node.type === 'decl') {\n Object.setPrototypeOf(node, Declaration.prototype)\n } else if (node.type === 'comment') {\n Object.setPrototypeOf(node, Comment.prototype)\n } else if (node.type === 'root') {\n Object.setPrototypeOf(node, Root.prototype)\n }\n\n node[my] = true\n\n if (node.nodes) {\n node.nodes.forEach(child => {\n Container.rebuild(child)\n })\n }\n}\n/* c8 ignore stop */\n","'use strict'\n\nlet pico = require('picocolors')\n\nlet terminalHighlight = require('./terminal-highlight')\n\nclass CssSyntaxError extends Error {\n constructor(message, line, column, source, file, plugin) {\n super(message)\n this.name = 'CssSyntaxError'\n this.reason = message\n\n if (file) {\n this.file = file\n }\n if (source) {\n this.source = source\n }\n if (plugin) {\n this.plugin = plugin\n }\n if (typeof line !== 'undefined' && typeof column !== 'undefined') {\n if (typeof line === 'number') {\n this.line = line\n this.column = column\n } else {\n this.line = line.line\n this.column = line.column\n this.endLine = column.line\n this.endColumn = column.column\n }\n }\n\n this.setMessage()\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, CssSyntaxError)\n }\n }\n\n setMessage() {\n this.message = this.plugin ? this.plugin + ': ' : ''\n this.message += this.file ? this.file : '<css input>'\n if (typeof this.line !== 'undefined') {\n this.message += ':' + this.line + ':' + this.column\n }\n this.message += ': ' + this.reason\n }\n\n showSourceCode(color) {\n if (!this.source) return ''\n\n let css = this.source\n if (color == null) color = pico.isColorSupported\n if (terminalHighlight) {\n if (color) css = terminalHighlight(css)\n }\n\n let lines = css.split(/\\r?\\n/)\n let start = Math.max(this.line - 3, 0)\n let end = Math.min(this.line + 2, lines.length)\n\n let maxWidth = String(end).length\n\n let mark, aside\n if (color) {\n let { bold, red, gray } = pico.createColors(true)\n mark = text => bold(red(text))\n aside = text => gray(text)\n } else {\n mark = aside = str => str\n }\n\n return lines\n .slice(start, end)\n .map((line, index) => {\n let number = start + 1 + index\n let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | '\n if (number === this.line) {\n let spacing =\n aside(gutter.replace(/\\d/g, ' ')) +\n line.slice(0, this.column - 1).replace(/[^\\t]/g, ' ')\n return mark('>') + aside(gutter) + line + '\\n ' + spacing + mark('^')\n }\n return ' ' + aside(gutter) + line\n })\n .join('\\n')\n }\n\n toString() {\n let code = this.showSourceCode()\n if (code) {\n code = '\\n\\n' + code + '\\n'\n }\n return this.name + ': ' + this.message + code\n }\n}\n\nmodule.exports = CssSyntaxError\nCssSyntaxError.default = CssSyntaxError\n","'use strict'\n\nlet Node = require('./node')\n\nclass Declaration extends Node {\n constructor(defaults) {\n if (\n defaults &&\n typeof defaults.value !== 'undefined' &&\n typeof defaults.value !== 'string'\n ) {\n defaults = { ...defaults, value: String(defaults.value) }\n }\n super(defaults)\n this.type = 'decl'\n }\n\n get variable() {\n return this.prop.startsWith('--') || this.prop[0] === '$'\n }\n}\n\nmodule.exports = Declaration\nDeclaration.default = Declaration\n","'use strict'\n\nlet Container = require('./container')\n\nlet LazyResult, Processor\n\nclass Document extends Container {\n constructor(defaults) {\n // type needs to be passed to super, otherwise child roots won't be normalized correctly\n super({ type: 'document', ...defaults })\n\n if (!this.nodes) {\n this.nodes = []\n }\n }\n\n toResult(opts = {}) {\n let lazy = new LazyResult(new Processor(), this, opts)\n\n return lazy.stringify()\n }\n}\n\nDocument.registerLazyResult = dependant => {\n LazyResult = dependant\n}\n\nDocument.registerProcessor = dependant => {\n Processor = dependant\n}\n\nmodule.exports = Document\nDocument.default = Document\n","'use strict'\n\nlet Declaration = require('./declaration')\nlet PreviousMap = require('./previous-map')\nlet Comment = require('./comment')\nlet AtRule = require('./at-rule')\nlet Input = require('./input')\nlet Root = require('./root')\nlet Rule = require('./rule')\n\nfunction fromJSON(json, inputs) {\n if (Array.isArray(json)) return json.map(n => fromJSON(n))\n\n let { inputs: ownInputs, ...defaults } = json\n if (ownInputs) {\n inputs = []\n for (let input of ownInputs) {\n let inputHydrated = { ...input, __proto__: Input.prototype }\n if (inputHydrated.map) {\n inputHydrated.map = {\n ...inputHydrated.map,\n __proto__: PreviousMap.prototype\n }\n }\n inputs.push(inputHydrated)\n }\n }\n if (defaults.nodes) {\n defaults.nodes = json.nodes.map(n => fromJSON(n, inputs))\n }\n if (defaults.source) {\n let { inputId, ...source } = defaults.source\n defaults.source = source\n if (inputId != null) {\n defaults.source.input = inputs[inputId]\n }\n }\n if (defaults.type === 'root') {\n return new Root(defaults)\n } else if (defaults.type === 'decl') {\n return new Declaration(defaults)\n } else if (defaults.type === 'rule') {\n return new Rule(defaults)\n } else if (defaults.type === 'comment') {\n return new Comment(defaults)\n } else if (defaults.type === 'atrule') {\n return new AtRule(defaults)\n } else {\n throw new Error('Unknown node type: ' + json.type)\n }\n}\n\nmodule.exports = fromJSON\nfromJSON.default = fromJSON\n","'use strict'\n\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\nlet { fileURLToPath, pathToFileURL } = require('url')\nlet { resolve, isAbsolute } = require('path')\nlet { nanoid } = require('nanoid/non-secure')\n\nlet terminalHighlight = require('./terminal-highlight')\nlet CssSyntaxError = require('./css-syntax-error')\nlet PreviousMap = require('./previous-map')\n\nlet fromOffsetCache = Symbol('fromOffsetCache')\n\nlet sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)\nlet pathAvailable = Boolean(resolve && isAbsolute)\n\nclass Input {\n constructor(css, opts = {}) {\n if (\n css === null ||\n typeof css === 'undefined' ||\n (typeof css === 'object' && !css.toString)\n ) {\n throw new Error(`PostCSS received ${css} instead of CSS string`)\n }\n\n this.css = css.toString()\n\n if (this.css[0] === '\\uFEFF' || this.css[0] === '\\uFFFE') {\n this.hasBOM = true\n this.css = this.css.slice(1)\n } else {\n this.hasBOM = false\n }\n\n if (opts.from) {\n if (\n !pathAvailable ||\n /^\\w+:\\/\\//.test(opts.from) ||\n isAbsolute(opts.from)\n ) {\n this.file = opts.from\n } else {\n this.file = resolve(opts.from)\n }\n }\n\n if (pathAvailable && sourceMapAvailable) {\n let map = new PreviousMap(this.css, opts)\n if (map.text) {\n this.map = map\n let file = map.consumer().file\n if (!this.file && file) this.file = this.mapResolve(file)\n }\n }\n\n if (!this.file) {\n this.id = '<input css ' + nanoid(6) + '>'\n }\n if (this.map) this.map.file = this.from\n }\n\n fromOffset(offset) {\n let lastLine, lineToIndex\n if (!this[fromOffsetCache]) {\n let lines = this.css.split('\\n')\n lineToIndex = new Array(lines.length)\n let prevIndex = 0\n\n for (let i = 0, l = lines.length; i < l; i++) {\n lineToIndex[i] = prevIndex\n prevIndex += lines[i].length + 1\n }\n\n this[fromOffsetCache] = lineToIndex\n } else {\n lineToIndex = this[fromOffsetCache]\n }\n lastLine = lineToIndex[lineToIndex.length - 1]\n\n let min = 0\n if (offset >= lastLine) {\n min = lineToIndex.length - 1\n } else {\n let max = lineToIndex.length - 2\n let mid\n while (min < max) {\n mid = min + ((max - min) >> 1)\n if (offset < lineToIndex[mid]) {\n max = mid - 1\n } else if (offset >= lineToIndex[mid + 1]) {\n min = mid + 1\n } else {\n min = mid\n break\n }\n }\n }\n return {\n line: min + 1,\n col: offset - lineToIndex[min] + 1\n }\n }\n\n error(message, line, column, opts = {}) {\n let result, endLine, endColumn\n\n if (line && typeof line === 'object') {\n let start = line\n let end = column\n if (typeof line.offset === 'number') {\n let pos = this.fromOffset(start.offset)\n line = pos.line\n column = pos.col\n } else {\n line = start.line\n column = start.column\n }\n if (typeof end.offset === 'number') {\n let pos = this.fromOffset(end.offset)\n endLine = pos.line\n endColumn = pos.col\n } else {\n endLine = end.line\n endColumn = end.column\n }\n } else if (!column) {\n let pos = this.fromOffset(line)\n line = pos.line\n column = pos.col\n }\n\n let origin = this.origin(line, column, endLine, endColumn)\n if (origin) {\n result = new CssSyntaxError(\n message,\n origin.endLine === undefined\n ? origin.line\n : { line: origin.line, column: origin.column },\n origin.endLine === undefined\n ? origin.column\n : { line: origin.endLine, column: origin.endColumn },\n origin.source,\n origin.file,\n opts.plugin\n )\n } else {\n result = new CssSyntaxError(\n message,\n endLine === undefined ? line : { line, column },\n endLine === undefined ? column : { line: endLine, column: endColumn },\n this.css,\n this.file,\n opts.plugin\n )\n }\n\n result.input = { line, column, endLine, endColumn, source: this.css }\n if (this.file) {\n if (pathToFileURL) {\n result.input.url = pathToFileURL(this.file).toString()\n }\n result.input.file = this.file\n }\n\n return result\n }\n\n origin(line, column, endLine, endColumn) {\n if (!this.map) return false\n let consumer = this.map.consumer()\n\n let from = consumer.originalPositionFor({ line, column })\n if (!from.source) return false\n\n let to\n if (typeof endLine === 'number') {\n to = consumer.originalPositionFor({ line: endLine, column: endColumn })\n }\n\n let fromUrl\n\n if (isAbsolute(from.source)) {\n fromUrl = pathToFileURL(from.source)\n } else {\n fromUrl = new URL(\n from.source,\n this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile)\n )\n }\n\n let result = {\n url: fromUrl.toString(),\n line: from.line,\n column: from.column,\n endLine: to && to.line,\n endColumn: to && to.column\n }\n\n if (fromUrl.protocol === 'file:') {\n if (fileURLToPath) {\n result.file = fileURLToPath(fromUrl)\n } else {\n /* c8 ignore next 2 */\n throw new Error(`file: protocol is not available in this PostCSS build`)\n }\n }\n\n let source = consumer.sourceContentFor(from.source)\n if (source) result.source = source\n\n return result\n }\n\n mapResolve(file) {\n if (/^\\w+:\\/\\//.test(file)) {\n return file\n }\n return resolve(this.map.consumer().sourceRoot || this.map.root || '.', file)\n }\n\n get from() {\n return this.file || this.id\n }\n\n toJSON() {\n let json = {}\n for (let name of ['hasBOM', 'css', 'file', 'id']) {\n if (this[name] != null) {\n json[name] = this[name]\n }\n }\n if (this.map) {\n json.map = { ...this.map }\n if (json.map.consumerCache) {\n json.map.consumerCache = undefined\n }\n }\n return json\n }\n}\n\nmodule.exports = Input\nInput.default = Input\n\nif (terminalHighlight && terminalHighlight.registerInput) {\n terminalHighlight.registerInput(Input)\n}\n","'use strict'\n\nlet { isClean, my } = require('./symbols')\nlet MapGenerator = require('./map-generator')\nlet stringify = require('./stringify')\nlet Container = require('./container')\nlet Document = require('./document')\nlet warnOnce = require('./warn-once')\nlet Result = require('./result')\nlet parse = require('./parse')\nlet Root = require('./root')\n\nconst TYPE_TO_CLASS_NAME = {\n document: 'Document',\n root: 'Root',\n atrule: 'AtRule',\n rule: 'Rule',\n decl: 'Declaration',\n comment: 'Comment'\n}\n\nconst PLUGIN_PROPS = {\n postcssPlugin: true,\n prepare: true,\n Once: true,\n Document: true,\n Root: true,\n Declaration: true,\n Rule: true,\n AtRule: true,\n Comment: true,\n DeclarationExit: true,\n RuleExit: true,\n AtRuleExit: true,\n CommentExit: true,\n RootExit: true,\n DocumentExit: true,\n OnceExit: true\n}\n\nconst NOT_VISITORS = {\n postcssPlugin: true,\n prepare: true,\n Once: true\n}\n\nconst CHILDREN = 0\n\nfunction isPromise(obj) {\n return typeof obj === 'object' && typeof obj.then === 'function'\n}\n\nfunction getEvents(node) {\n let key = false\n let type = TYPE_TO_CLASS_NAME[node.type]\n if (node.type === 'decl') {\n key = node.prop.toLowerCase()\n } else if (node.type === 'atrule') {\n key = node.name.toLowerCase()\n }\n\n if (key && node.append) {\n return [\n type,\n type + '-' + key,\n CHILDREN,\n type + 'Exit',\n type + 'Exit-' + key\n ]\n } else if (key) {\n return [type, type + '-' + key, type + 'Exit', type + 'Exit-' + key]\n } else if (node.append) {\n return [type, CHILDREN, type + 'Exit']\n } else {\n return [type, type + 'Exit']\n }\n}\n\nfunction toStack(node) {\n let events\n if (node.type === 'document') {\n events = ['Document', CHILDREN, 'DocumentExit']\n } else if (node.type === 'root') {\n events = ['Root', CHILDREN, 'RootExit']\n } else {\n events = getEvents(node)\n }\n\n return {\n node,\n events,\n eventIndex: 0,\n visitors: [],\n visitorIndex: 0,\n iterator: 0\n }\n}\n\nfunction cleanMarks(node) {\n node[isClean] = false\n if (node.nodes) node.nodes.forEach(i => cleanMarks(i))\n return node\n}\n\nlet postcss = {}\n\nclass LazyResult {\n constructor(processor, css, opts) {\n this.stringified = false\n this.processed = false\n\n let root\n if (\n typeof css === 'object' &&\n css !== null &&\n (css.type === 'root' || css.type === 'document')\n ) {\n root = cleanMarks(css)\n } else if (css instanceof LazyResult || css instanceof Result) {\n root = cleanMarks(css.root)\n if (css.map) {\n if (typeof opts.map === 'undefined') opts.map = {}\n if (!opts.map.inline) opts.map.inline = false\n opts.map.prev = css.map\n }\n } else {\n let parser = parse\n if (opts.syntax) parser = opts.syntax.parse\n if (opts.parser) parser = opts.parser\n if (parser.parse) parser = parser.parse\n\n try {\n root = parser(css, opts)\n } catch (error) {\n this.processed = true\n this.error = error\n }\n\n if (root && !root[my]) {\n /* c8 ignore next 2 */\n Container.rebuild(root)\n }\n }\n\n this.result = new Result(processor, root, opts)\n this.helpers = { ...postcss, result: this.result, postcss }\n this.plugins = this.processor.plugins.map(plugin => {\n if (typeof plugin === 'object' && plugin.prepare) {\n return { ...plugin, ...plugin.prepare(this.result) }\n } else {\n return plugin\n }\n })\n }\n\n get [Symbol.toStringTag]() {\n return 'LazyResult'\n }\n\n get processor() {\n return this.result.processor\n }\n\n get opts() {\n return this.result.opts\n }\n\n get css() {\n return this.stringify().css\n }\n\n get content() {\n return this.stringify().content\n }\n\n get map() {\n return this.stringify().map\n }\n\n get root() {\n return this.sync().root\n }\n\n get messages() {\n return this.sync().messages\n }\n\n warnings() {\n return this.sync().warnings()\n }\n\n toString() {\n return this.css\n }\n\n then(onFulfilled, onRejected) {\n if (process.env.NODE_ENV !== 'production') {\n if (!('from' in this.opts)) {\n warnOnce(\n 'Without `from` option PostCSS could generate wrong source map ' +\n 'and will not find Browserslist config. Set it to CSS file path ' +\n 'or to `undefined` to prevent this warning.'\n )\n }\n }\n return this.async().then(onFulfilled, onRejected)\n }\n\n catch(onRejected) {\n return this.async().catch(onRejected)\n }\n\n finally(onFinally) {\n return this.async().then(onFinally, onFinally)\n }\n\n async() {\n if (this.error) return Promise.reject(this.error)\n if (this.processed) return Promise.resolve(this.result)\n if (!this.processing) {\n this.processing = this.runAsync()\n }\n return this.processing\n }\n\n sync() {\n if (this.error) throw this.error\n if (this.processed) return this.result\n this.processed = true\n\n if (this.processing) {\n throw this.getAsyncError()\n }\n\n for (let plugin of this.plugins) {\n let promise = this.runOnRoot(plugin)\n if (isPromise(promise)) {\n throw this.getAsyncError()\n }\n }\n\n this.prepareVisitors()\n if (this.hasListener) {\n let root = this.result.root\n while (!root[isClean]) {\n root[isClean] = true\n this.walkSync(root)\n }\n if (this.listeners.OnceExit) {\n if (root.type === 'document') {\n for (let subRoot of root.nodes) {\n this.visitSync(this.listeners.OnceExit, subRoot)\n }\n } else {\n this.visitSync(this.listeners.OnceExit, root)\n }\n }\n }\n\n return this.result\n }\n\n stringify() {\n if (this.error) throw this.error\n if (this.stringified) return this.result\n this.stringified = true\n\n this.sync()\n\n let opts = this.result.opts\n let str = stringify\n if (opts.syntax) str = opts.syntax.stringify\n if (opts.stringifier) str = opts.stringifier\n if (str.stringify) str = str.stringify\n\n let map = new MapGenerator(str, this.result.root, this.result.opts)\n let data = map.generate()\n this.result.css = data[0]\n this.result.map = data[1]\n\n return this.result\n }\n\n walkSync(node) {\n node[isClean] = true\n let events = getEvents(node)\n for (let event of events) {\n if (event === CHILDREN) {\n if (node.nodes) {\n node.each(child => {\n if (!child[isClean]) this.walkSync(child)\n })\n }\n } else {\n let visitors = this.listeners[event]\n if (visitors) {\n if (this.visitSync(visitors, node.toProxy())) return\n }\n }\n }\n }\n\n visitSync(visitors, node) {\n for (let [plugin, visitor] of visitors) {\n this.result.lastPlugin = plugin\n let promise\n try {\n promise = visitor(node, this.helpers)\n } catch (e) {\n throw this.handleError(e, node.proxyOf)\n }\n if (node.type !== 'root' && node.type !== 'document' && !node.parent) {\n return true\n }\n if (isPromise(promise)) {\n throw this.getAsyncError()\n }\n }\n }\n\n runOnRoot(plugin) {\n this.result.lastPlugin = plugin\n try {\n if (typeof plugin === 'object' && plugin.Once) {\n if (this.result.root.type === 'document') {\n let roots = this.result.root.nodes.map(root =>\n plugin.Once(root, this.helpers)\n )\n\n if (isPromise(roots[0])) {\n return Promise.all(roots)\n }\n\n return roots\n }\n\n return plugin.Once(this.result.root, this.helpers)\n } else if (typeof plugin === 'function') {\n return plugin(this.result.root, this.result)\n }\n } catch (error) {\n throw this.handleError(error)\n }\n }\n\n getAsyncError() {\n throw new Error('Use process(css).then(cb) to work with async plugins')\n }\n\n handleError(error, node) {\n let plugin = this.result.lastPlugin\n try {\n if (node) node.addToError(error)\n this.error = error\n if (error.name === 'CssSyntaxError' && !error.plugin) {\n error.plugin = plugin.postcssPlugin\n error.setMessage()\n } else if (plugin.postcssVersion) {\n if (process.env.NODE_ENV !== 'production') {\n let pluginName = plugin.postcssPlugin\n let pluginVer = plugin.postcssVersion\n let runtimeVer = this.result.processor.version\n let a = pluginVer.split('.')\n let b = runtimeVer.split('.')\n\n if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) {\n // eslint-disable-next-line no-console\n console.error(\n 'Unknown error from PostCSS plugin. Your current PostCSS ' +\n 'version is ' +\n runtimeVer +\n ', but ' +\n pluginName +\n ' uses ' +\n pluginVer +\n '. Perhaps this is the source of the error below.'\n )\n }\n }\n }\n } catch (err) {\n /* c8 ignore next 3 */\n // eslint-disable-next-line no-console\n if (console && console.error) console.error(err)\n }\n return error\n }\n\n async runAsync() {\n this.plugin = 0\n for (let i = 0; i < this.plugins.length; i++) {\n let plugin = this.plugins[i]\n let promise = this.runOnRoot(plugin)\n if (isPromise(promise)) {\n try {\n await promise\n } catch (error) {\n throw this.handleError(error)\n }\n }\n }\n\n this.prepareVisitors()\n if (this.hasListener) {\n let root = this.result.root\n while (!root[isClean]) {\n root[isClean] = true\n let stack = [toStack(root)]\n while (stack.length > 0) {\n let promise = this.visitTick(stack)\n if (isPromise(promise)) {\n try {\n await promise\n } catch (e) {\n let node = stack[stack.length - 1].node\n throw this.handleError(e, node)\n }\n }\n }\n }\n\n if (this.listeners.OnceExit) {\n for (let [plugin, visitor] of this.listeners.OnceExit) {\n this.result.lastPlugin = plugin\n try {\n if (root.type === 'document') {\n let roots = root.nodes.map(subRoot =>\n visitor(subRoot, this.helpers)\n )\n\n await Promise.all(roots)\n } else {\n await visitor(root, this.helpers)\n }\n } catch (e) {\n throw this.handleError(e)\n }\n }\n }\n }\n\n this.processed = true\n return this.stringify()\n }\n\n prepareVisitors() {\n this.listeners = {}\n let add = (plugin, type, cb) => {\n if (!this.listeners[type]) this.listeners[type] = []\n this.listeners[type].push([plugin, cb])\n }\n for (let plugin of this.plugins) {\n if (typeof plugin === 'object') {\n for (let event in plugin) {\n if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) {\n throw new Error(\n `Unknown event ${event} in ${plugin.postcssPlugin}. ` +\n `Try to update PostCSS (${this.processor.version} now).`\n )\n }\n if (!NOT_VISITORS[event]) {\n if (typeof plugin[event] === 'object') {\n for (let filter in plugin[event]) {\n if (filter === '*') {\n add(plugin, event, plugin[event][filter])\n } else {\n add(\n plugin,\n event + '-' + filter.toLowerCase(),\n plugin[event][filter]\n )\n }\n }\n } else if (typeof plugin[event] === 'function') {\n add(plugin, event, plugin[event])\n }\n }\n }\n }\n }\n this.hasListener = Object.keys(this.listeners).length > 0\n }\n\n visitTick(stack) {\n let visit = stack[stack.length - 1]\n let { node, visitors } = visit\n\n if (node.type !== 'root' && node.type !== 'document' && !node.parent) {\n stack.pop()\n return\n }\n\n if (visitors.length > 0 && visit.visitorIndex < visitors.length) {\n let [plugin, visitor] = visitors[visit.visitorIndex]\n visit.visitorIndex += 1\n if (visit.visitorIndex === visitors.length) {\n visit.visitors = []\n visit.visitorIndex = 0\n }\n this.result.lastPlugin = plugin\n try {\n return visitor(node.toProxy(), this.helpers)\n } catch (e) {\n throw this.handleError(e, node)\n }\n }\n\n if (visit.iterator !== 0) {\n let iterator = visit.iterator\n let child\n while ((child = node.nodes[node.indexes[iterator]])) {\n node.indexes[iterator] += 1\n if (!child[isClean]) {\n child[isClean] = true\n stack.push(toStack(child))\n return\n }\n }\n visit.iterator = 0\n delete node.indexes[iterator]\n }\n\n let events = visit.events\n while (visit.eventIndex < events.length) {\n let event = events[visit.eventIndex]\n visit.eventIndex += 1\n if (event === CHILDREN) {\n if (node.nodes && node.nodes.length) {\n node[isClean] = true\n visit.iterator = node.getIterator()\n }\n return\n } else if (this.listeners[event]) {\n visit.visitors = this.listeners[event]\n return\n }\n }\n stack.pop()\n }\n}\n\nLazyResult.registerPostcss = dependant => {\n postcss = dependant\n}\n\nmodule.exports = LazyResult\nLazyResult.default = LazyResult\n\nRoot.registerLazyResult(LazyResult)\nDocument.registerLazyResult(LazyResult)\n","'use strict'\n\nlet list = {\n split(string, separators, last) {\n let array = []\n let current = ''\n let split = false\n\n let func = 0\n let inQuote = false\n let prevQuote = ''\n let escape = false\n\n for (let letter of string) {\n if (escape) {\n escape = false\n } else if (letter === '\\\\') {\n escape = true\n } else if (inQuote) {\n if (letter === prevQuote) {\n inQuote = false\n }\n } else if (letter === '\"' || letter === \"'\") {\n inQuote = true\n prevQuote = letter\n } else if (letter === '(') {\n func += 1\n } else if (letter === ')') {\n if (func > 0) func -= 1\n } else if (func === 0) {\n if (separators.includes(letter)) split = true\n }\n\n if (split) {\n if (current !== '') array.push(current.trim())\n current = ''\n split = false\n } else {\n current += letter\n }\n }\n\n if (last || current !== '') array.push(current.trim())\n return array\n },\n\n space(string) {\n let spaces = [' ', '\\n', '\\t']\n return list.split(string, spaces)\n },\n\n comma(string) {\n return list.split(string, [','], true)\n }\n}\n\nmodule.exports = list\nlist.default = list\n","'use strict'\n\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\nlet { dirname, resolve, relative, sep } = require('path')\nlet { pathToFileURL } = require('url')\n\nlet Input = require('./input')\n\nlet sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)\nlet pathAvailable = Boolean(dirname && resolve && relative && sep)\n\nclass MapGenerator {\n constructor(stringify, root, opts, cssString) {\n this.stringify = stringify\n this.mapOpts = opts.map || {}\n this.root = root\n this.opts = opts\n this.css = cssString\n this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute\n }\n\n isMap() {\n if (typeof this.opts.map !== 'undefined') {\n return !!this.opts.map\n }\n return this.previous().length > 0\n }\n\n previous() {\n if (!this.previousMaps) {\n this.previousMaps = []\n if (this.root) {\n this.root.walk(node => {\n if (node.source && node.source.input.map) {\n let map = node.source.input.map\n if (!this.previousMaps.includes(map)) {\n this.previousMaps.push(map)\n }\n }\n })\n } else {\n let input = new Input(this.css, this.opts)\n if (input.map) this.previousMaps.push(input.map)\n }\n }\n\n return this.previousMaps\n }\n\n isInline() {\n if (typeof this.mapOpts.inline !== 'undefined') {\n return this.mapOpts.inline\n }\n\n let annotation = this.mapOpts.annotation\n if (typeof annotation !== 'undefined' && annotation !== true) {\n return false\n }\n\n if (this.previous().length) {\n return this.previous().some(i => i.inline)\n }\n return true\n }\n\n isSourcesContent() {\n if (typeof this.mapOpts.sourcesContent !== 'undefined') {\n return this.mapOpts.sourcesContent\n }\n if (this.previous().length) {\n return this.previous().some(i => i.withContent())\n }\n return true\n }\n\n clearAnnotation() {\n if (this.mapOpts.annotation === false) return\n\n if (this.root) {\n let node\n for (let i = this.root.nodes.length - 1; i >= 0; i--) {\n node = this.root.nodes[i]\n if (node.type !== 'comment') continue\n if (node.text.indexOf('# sourceMappingURL=') === 0) {\n this.root.removeChild(i)\n }\n }\n } else if (this.css) {\n this.css = this.css.replace(/(\\n)?\\/\\*#[\\S\\s]*?\\*\\/$/gm, '')\n }\n }\n\n setSourcesContent() {\n let already = {}\n if (this.root) {\n this.root.walk(node => {\n if (node.source) {\n let from = node.source.input.from\n if (from && !already[from]) {\n already[from] = true\n let fromUrl = this.usesFileUrls\n ? this.toFileUrl(from)\n : this.toUrl(this.path(from))\n this.map.setSourceContent(fromUrl, node.source.input.css)\n }\n }\n })\n } else if (this.css) {\n let from = this.opts.from\n ? this.toUrl(this.path(this.opts.from))\n : '<no source>'\n this.map.setSourceContent(from, this.css)\n }\n }\n\n applyPrevMaps() {\n for (let prev of this.previous()) {\n let from = this.toUrl(this.path(prev.file))\n let root = prev.root || dirname(prev.file)\n let map\n\n if (this.mapOpts.sourcesContent === false) {\n map = new SourceMapConsumer(prev.text)\n if (map.sourcesContent) {\n map.sourcesContent = map.sourcesContent.map(() => null)\n }\n } else {\n map = prev.consumer()\n }\n\n this.map.applySourceMap(map, from, this.toUrl(this.path(root)))\n }\n }\n\n isAnnotation() {\n if (this.isInline()) {\n return true\n }\n if (typeof this.mapOpts.annotation !== 'undefined') {\n return this.mapOpts.annotation\n }\n if (this.previous().length) {\n return this.previous().some(i => i.annotation)\n }\n return true\n }\n\n toBase64(str) {\n if (Buffer) {\n return Buffer.from(str).toString('base64')\n } else {\n return window.btoa(unescape(encodeURIComponent(str)))\n }\n }\n\n addAnnotation() {\n let content\n\n if (this.isInline()) {\n content =\n 'data:application/json;base64,' + this.toBase64(this.map.toString())\n } else if (typeof this.mapOpts.annotation === 'string') {\n content = this.mapOpts.annotation\n } else if (typeof this.mapOpts.annotation === 'function') {\n content = this.mapOpts.annotation(this.opts.to, this.root)\n } else {\n content = this.outputFile() + '.map'\n }\n let eol = '\\n'\n if (this.css.includes('\\r\\n')) eol = '\\r\\n'\n\n this.css += eol + '/*# sourceMappingURL=' + content + ' */'\n }\n\n outputFile() {\n if (this.opts.to) {\n return this.path(this.opts.to)\n } else if (this.opts.from) {\n return this.path(this.opts.from)\n } else {\n return 'to.css'\n }\n }\n\n generateMap() {\n if (this.root) {\n this.generateString()\n } else if (this.previous().length === 1) {\n let prev = this.previous()[0].consumer()\n prev.file = this.outputFile()\n this.map = SourceMapGenerator.fromSourceMap(prev)\n } else {\n this.map = new SourceMapGenerator({ file: this.outputFile() })\n this.map.addMapping({\n source: this.opts.from\n ? this.toUrl(this.path(this.opts.from))\n : '<no source>',\n generated: { line: 1, column: 0 },\n original: { line: 1, column: 0 }\n })\n }\n\n if (this.isSourcesContent()) this.setSourcesContent()\n if (this.root && this.previous().length > 0) this.applyPrevMaps()\n if (this.isAnnotation()) this.addAnnotation()\n\n if (this.isInline()) {\n return [this.css]\n } else {\n return [this.css, this.map]\n }\n }\n\n path(file) {\n if (file.indexOf('<') === 0) return file\n if (/^\\w+:\\/\\//.test(file)) return file\n if (this.mapOpts.absolute) return file\n\n let from = this.opts.to ? dirname(this.opts.to) : '.'\n\n if (typeof this.mapOpts.annotation === 'string') {\n from = dirname(resolve(from, this.mapOpts.annotation))\n }\n\n file = relative(from, file)\n return file\n }\n\n toUrl(path) {\n if (sep === '\\\\') {\n path = path.replace(/\\\\/g, '/')\n }\n return encodeURI(path).replace(/[#?]/g, encodeURIComponent)\n }\n\n toFileUrl(path) {\n if (pathToFileURL) {\n return pathToFileURL(path).toString()\n } else {\n throw new Error(\n '`map.absolute` option is not available in this PostCSS build'\n )\n }\n }\n\n sourcePath(node) {\n if (this.mapOpts.from) {\n return this.toUrl(this.mapOpts.from)\n } else if (this.usesFileUrls) {\n return this.toFileUrl(node.source.input.from)\n } else {\n return this.toUrl(this.path(node.source.input.from))\n }\n }\n\n generateString() {\n this.css = ''\n this.map = new SourceMapGenerator({ file: this.outputFile() })\n\n let line = 1\n let column = 1\n\n let noSource = '<no source>'\n let mapping = {\n source: '',\n generated: { line: 0, column: 0 },\n original: { line: 0, column: 0 }\n }\n\n let lines, last\n this.stringify(this.root, (str, node, type) => {\n this.css += str\n\n if (node && type !== 'end') {\n mapping.generated.line = line\n mapping.generated.column = column - 1\n if (node.source && node.source.start) {\n mapping.source = this.sourcePath(node)\n mapping.original.line = node.source.start.line\n mapping.original.column = node.source.start.column - 1\n this.map.addMapping(mapping)\n } else {\n mapping.source = noSource\n mapping.original.line = 1\n mapping.original.column = 0\n this.map.addMapping(mapping)\n }\n }\n\n lines = str.match(/\\n/g)\n if (lines) {\n line += lines.length\n last = str.lastIndexOf('\\n')\n column = str.length - last\n } else {\n column += str.length\n }\n\n if (node && type !== 'start') {\n let p = node.parent || { raws: {} }\n if (node.type !== 'decl' || node !== p.last || p.raws.semicolon) {\n if (node.source && node.source.end) {\n mapping.source = this.sourcePath(node)\n mapping.original.line = node.source.end.line\n mapping.original.column = node.source.end.column - 1\n mapping.generated.line = line\n mapping.generated.column = column - 2\n this.map.addMapping(mapping)\n } else {\n mapping.source = noSource\n mapping.original.line = 1\n mapping.original.column = 0\n mapping.generated.line = line\n mapping.generated.column = column - 1\n this.map.addMapping(mapping)\n }\n }\n }\n })\n }\n\n generate() {\n this.clearAnnotation()\n if (pathAvailable && sourceMapAvailable && this.isMap()) {\n return this.generateMap()\n } else {\n let result = ''\n this.stringify(this.root, i => {\n result += i\n })\n return [result]\n }\n }\n}\n\nmodule.exports = MapGenerator\n","'use strict'\n\nlet MapGenerator = require('./map-generator')\nlet stringify = require('./stringify')\nlet warnOnce = require('./warn-once')\nlet parse = require('./parse')\nconst Result = require('./result')\n\nclass NoWorkResult {\n constructor(processor, css, opts) {\n css = css.toString()\n this.stringified = false\n\n this._processor = processor\n this._css = css\n this._opts = opts\n this._map = undefined\n let root\n\n let str = stringify\n this.result = new Result(this._processor, root, this._opts)\n this.result.css = css\n\n let self = this\n Object.defineProperty(this.result, 'root', {\n get() {\n return self.root\n }\n })\n\n let map = new MapGenerator(str, root, this._opts, css)\n if (map.isMap()) {\n let [generatedCSS, generatedMap] = map.generate()\n if (generatedCSS) {\n this.result.css = generatedCSS\n }\n if (generatedMap) {\n this.result.map = generatedMap\n }\n }\n }\n\n get [Symbol.toStringTag]() {\n return 'NoWorkResult'\n }\n\n get processor() {\n return this.result.processor\n }\n\n get opts() {\n return this.result.opts\n }\n\n get css() {\n return this.result.css\n }\n\n get content() {\n return this.result.css\n }\n\n get map() {\n return this.result.map\n }\n\n get root() {\n if (this._root) {\n return this._root\n }\n\n let root\n let parser = parse\n\n try {\n root = parser(this._css, this._opts)\n } catch (error) {\n this.error = error\n }\n\n if (this.error) {\n throw this.error\n } else {\n this._root = root\n return root\n }\n }\n\n get messages() {\n return []\n }\n\n warnings() {\n return []\n }\n\n toString() {\n return this._css\n }\n\n then(onFulfilled, onRejected) {\n if (process.env.NODE_ENV !== 'production') {\n if (!('from' in this._opts)) {\n warnOnce(\n 'Without `from` option PostCSS could generate wrong source map ' +\n 'and will not find Browserslist config. Set it to CSS file path ' +\n 'or to `undefined` to prevent this warning.'\n )\n }\n }\n\n return this.async().then(onFulfilled, onRejected)\n }\n\n catch(onRejected) {\n return this.async().catch(onRejected)\n }\n\n finally(onFinally) {\n return this.async().then(onFinally, onFinally)\n }\n\n async() {\n if (this.error) return Promise.reject(this.error)\n return Promise.resolve(this.result)\n }\n\n sync() {\n if (this.error) throw this.error\n return this.result\n }\n}\n\nmodule.exports = NoWorkResult\nNoWorkResult.default = NoWorkResult\n","'use strict'\n\nlet { isClean, my } = require('./symbols')\nlet CssSyntaxError = require('./css-syntax-error')\nlet Stringifier = require('./stringifier')\nlet stringify = require('./stringify')\n\nfunction cloneNode(obj, parent) {\n let cloned = new obj.constructor()\n\n for (let i in obj) {\n if (!Object.prototype.hasOwnProperty.call(obj, i)) {\n /* c8 ignore next 2 */\n continue\n }\n if (i === 'proxyCache') continue\n let value = obj[i]\n let type = typeof value\n\n if (i === 'parent' && type === 'object') {\n if (parent) cloned[i] = parent\n } else if (i === 'source') {\n cloned[i] = value\n } else if (Array.isArray(value)) {\n cloned[i] = value.map(j => cloneNode(j, cloned))\n } else {\n if (type === 'object' && value !== null) value = cloneNode(value)\n cloned[i] = value\n }\n }\n\n return cloned\n}\n\nclass Node {\n constructor(defaults = {}) {\n this.raws = {}\n this[isClean] = false\n this[my] = true\n\n for (let name in defaults) {\n if (name === 'nodes') {\n this.nodes = []\n for (let node of defaults[name]) {\n if (typeof node.clone === 'function') {\n this.append(node.clone())\n } else {\n this.append(node)\n }\n }\n } else {\n this[name] = defaults[name]\n }\n }\n }\n\n error(message, opts = {}) {\n if (this.source) {\n let { start, end } = this.rangeBy(opts)\n return this.source.input.error(\n message,\n { line: start.line, column: start.column },\n { line: end.line, column: end.column },\n opts\n )\n }\n return new CssSyntaxError(message)\n }\n\n warn(result, text, opts) {\n let data = { node: this }\n for (let i in opts) data[i] = opts[i]\n return result.warn(text, data)\n }\n\n remove() {\n if (this.parent) {\n this.parent.removeChild(this)\n }\n this.parent = undefined\n return this\n }\n\n toString(stringifier = stringify) {\n if (stringifier.stringify) stringifier = stringifier.stringify\n let result = ''\n stringifier(this, i => {\n result += i\n })\n return result\n }\n\n assign(overrides = {}) {\n for (let name in overrides) {\n this[name] = overrides[name]\n }\n return this\n }\n\n clone(overrides = {}) {\n let cloned = cloneNode(this)\n for (let name in overrides) {\n cloned[name] = overrides[name]\n }\n return cloned\n }\n\n cloneBefore(overrides = {}) {\n let cloned = this.clone(overrides)\n this.parent.insertBefore(this, cloned)\n return cloned\n }\n\n cloneAfter(overrides = {}) {\n let cloned = this.clone(overrides)\n this.parent.insertAfter(this, cloned)\n return cloned\n }\n\n replaceWith(...nodes) {\n if (this.parent) {\n let bookmark = this\n let foundSelf = false\n for (let node of nodes) {\n if (node === this) {\n foundSelf = true\n } else if (foundSelf) {\n this.parent.insertAfter(bookmark, node)\n bookmark = node\n } else {\n this.parent.insertBefore(bookmark, node)\n }\n }\n\n if (!foundSelf) {\n this.remove()\n }\n }\n\n return this\n }\n\n next() {\n if (!this.parent) return undefined\n let index = this.parent.index(this)\n return this.parent.nodes[index + 1]\n }\n\n prev() {\n if (!this.parent) return undefined\n let index = this.parent.index(this)\n return this.parent.nodes[index - 1]\n }\n\n before(add) {\n this.parent.insertBefore(this, add)\n return this\n }\n\n after(add) {\n this.parent.insertAfter(this, add)\n return this\n }\n\n root() {\n let result = this\n while (result.parent && result.parent.type !== 'document') {\n result = result.parent\n }\n return result\n }\n\n raw(prop, defaultType) {\n let str = new Stringifier()\n return str.raw(this, prop, defaultType)\n }\n\n cleanRaws(keepBetween) {\n delete this.raws.before\n delete this.raws.after\n if (!keepBetween) delete this.raws.between\n }\n\n toJSON(_, inputs) {\n let fixed = {}\n let emitInputs = inputs == null\n inputs = inputs || new Map()\n let inputsNextIndex = 0\n\n for (let name in this) {\n if (!Object.prototype.hasOwnProperty.call(this, name)) {\n /* c8 ignore next 2 */\n continue\n }\n if (name === 'parent' || name === 'proxyCache') continue\n let value = this[name]\n\n if (Array.isArray(value)) {\n fixed[name] = value.map(i => {\n if (typeof i === 'object' && i.toJSON) {\n return i.toJSON(null, inputs)\n } else {\n return i\n }\n })\n } else if (typeof value === 'object' && value.toJSON) {\n fixed[name] = value.toJSON(null, inputs)\n } else if (name === 'source') {\n let inputId = inputs.get(value.input)\n if (inputId == null) {\n inputId = inputsNextIndex\n inputs.set(value.input, inputsNextIndex)\n inputsNextIndex++\n }\n fixed[name] = {\n inputId,\n start: value.start,\n end: value.end\n }\n } else {\n fixed[name] = value\n }\n }\n\n if (emitInputs) {\n fixed.inputs = [...inputs.keys()].map(input => input.toJSON())\n }\n\n return fixed\n }\n\n positionInside(index) {\n let string = this.toString()\n let column = this.source.start.column\n let line = this.source.start.line\n\n for (let i = 0; i < index; i++) {\n if (string[i] === '\\n') {\n column = 1\n line += 1\n } else {\n column += 1\n }\n }\n\n return { line, column }\n }\n\n positionBy(opts) {\n let pos = this.source.start\n if (opts.index) {\n pos = this.positionInside(opts.index)\n } else if (opts.word) {\n let index = this.toString().indexOf(opts.word)\n if (index !== -1) pos = this.positionInside(index)\n }\n return pos\n }\n\n rangeBy(opts) {\n let start = {\n line: this.source.start.line,\n column: this.source.start.column\n }\n let end = this.source.end\n ? {\n line: this.source.end.line,\n column: this.source.end.column + 1\n }\n : {\n line: start.line,\n column: start.column + 1\n }\n\n if (opts.word) {\n let index = this.toString().indexOf(opts.word)\n if (index !== -1) {\n start = this.positionInside(index)\n end = this.positionInside(index + opts.word.length)\n }\n } else {\n if (opts.start) {\n start = {\n line: opts.start.line,\n column: opts.start.column\n }\n } else if (opts.index) {\n start = this.positionInside(opts.index)\n }\n\n if (opts.end) {\n end = {\n line: opts.end.line,\n column: opts.end.column\n }\n } else if (opts.endIndex) {\n end = this.positionInside(opts.endIndex)\n } else if (opts.index) {\n end = this.positionInside(opts.index + 1)\n }\n }\n\n if (\n end.line < start.line ||\n (end.line === start.line && end.column <= start.column)\n ) {\n end = { line: start.line, column: start.column + 1 }\n }\n\n return { start, end }\n }\n\n getProxyProcessor() {\n return {\n set(node, prop, value) {\n if (node[prop] === value) return true\n node[prop] = value\n if (\n prop === 'prop' ||\n prop === 'value' ||\n prop === 'name' ||\n prop === 'params' ||\n prop === 'important' ||\n /* c8 ignore next */\n prop === 'text'\n ) {\n node.markDirty()\n }\n return true\n },\n\n get(node, prop) {\n if (prop === 'proxyOf') {\n return node\n } else if (prop === 'root') {\n return () => node.root().toProxy()\n } else {\n return node[prop]\n }\n }\n }\n }\n\n toProxy() {\n if (!this.proxyCache) {\n this.proxyCache = new Proxy(this, this.getProxyProcessor())\n }\n return this.proxyCache\n }\n\n addToError(error) {\n error.postcssNode = this\n if (error.stack && this.source && /\\n\\s{4}at /.test(error.stack)) {\n let s = this.source\n error.stack = error.stack.replace(\n /\\n\\s{4}at /,\n `$&${s.input.from}:${s.start.line}:${s.start.column}$&`\n )\n }\n return error\n }\n\n markDirty() {\n if (this[isClean]) {\n this[isClean] = false\n let next = this\n while ((next = next.parent)) {\n next[isClean] = false\n }\n }\n }\n\n get proxyOf() {\n return this\n }\n}\n\nmodule.exports = Node\nNode.default = Node\n","'use strict'\n\nlet Container = require('./container')\nlet Parser = require('./parser')\nlet Input = require('./input')\n\nfunction parse(css, opts) {\n let input = new Input(css, opts)\n let parser = new Parser(input)\n try {\n parser.parse()\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n if (e.name === 'CssSyntaxError' && opts && opts.from) {\n if (/\\.scss$/i.test(opts.from)) {\n e.message +=\n '\\nYou tried to parse SCSS with ' +\n 'the standard CSS parser; ' +\n 'try again with the postcss-scss parser'\n } else if (/\\.sass/i.test(opts.from)) {\n e.message +=\n '\\nYou tried to parse Sass with ' +\n 'the standard CSS parser; ' +\n 'try again with the postcss-sass parser'\n } else if (/\\.less$/i.test(opts.from)) {\n e.message +=\n '\\nYou tried to parse Less with ' +\n 'the standard CSS parser; ' +\n 'try again with the postcss-less parser'\n }\n }\n }\n throw e\n }\n\n return parser.root\n}\n\nmodule.exports = parse\nparse.default = parse\n\nContainer.registerParse(parse)\n","'use strict'\n\nlet Declaration = require('./declaration')\nlet tokenizer = require('./tokenize')\nlet Comment = require('./comment')\nlet AtRule = require('./at-rule')\nlet Root = require('./root')\nlet Rule = require('./rule')\n\nconst SAFE_COMMENT_NEIGHBOR = {\n empty: true,\n space: true\n}\n\nfunction findLastWithPosition(tokens) {\n for (let i = tokens.length - 1; i >= 0; i--) {\n let token = tokens[i]\n let pos = token[3] || token[2]\n if (pos) return pos\n }\n}\n\nclass Parser {\n constructor(input) {\n this.input = input\n\n this.root = new Root()\n this.current = this.root\n this.spaces = ''\n this.semicolon = false\n this.customProperty = false\n\n this.createTokenizer()\n this.root.source = { input, start: { offset: 0, line: 1, column: 1 } }\n }\n\n createTokenizer() {\n this.tokenizer = tokenizer(this.input)\n }\n\n parse() {\n let token\n while (!this.tokenizer.endOfFile()) {\n token = this.tokenizer.nextToken()\n\n switch (token[0]) {\n case 'space':\n this.spaces += token[1]\n break\n\n case ';':\n this.freeSemicolon(token)\n break\n\n case '}':\n this.end(token)\n break\n\n case 'comment':\n this.comment(token)\n break\n\n case 'at-word':\n this.atrule(token)\n break\n\n case '{':\n this.emptyRule(token)\n break\n\n default:\n this.other(token)\n break\n }\n }\n this.endFile()\n }\n\n comment(token) {\n let node = new Comment()\n this.init(node, token[2])\n node.source.end = this.getPosition(token[3] || token[2])\n\n let text = token[1].slice(2, -2)\n if (/^\\s*$/.test(text)) {\n node.text = ''\n node.raws.left = text\n node.raws.right = ''\n } else {\n let match = text.match(/^(\\s*)([^]*\\S)(\\s*)$/)\n node.text = match[2]\n node.raws.left = match[1]\n node.raws.right = match[3]\n }\n }\n\n emptyRule(token) {\n let node = new Rule()\n this.init(node, token[2])\n node.selector = ''\n node.raws.between = ''\n this.current = node\n }\n\n other(start) {\n let end = false\n let type = null\n let colon = false\n let bracket = null\n let brackets = []\n let customProperty = start[1].startsWith('--')\n\n let tokens = []\n let token = start\n while (token) {\n type = token[0]\n tokens.push(token)\n\n if (type === '(' || type === '[') {\n if (!bracket) bracket = token\n brackets.push(type === '(' ? ')' : ']')\n } else if (customProperty && colon && type === '{') {\n if (!bracket) bracket = token\n brackets.push('}')\n } else if (brackets.length === 0) {\n if (type === ';') {\n if (colon) {\n this.decl(tokens, customProperty)\n return\n } else {\n break\n }\n } else if (type === '{') {\n this.rule(tokens)\n return\n } else if (type === '}') {\n this.tokenizer.back(tokens.pop())\n end = true\n break\n } else if (type === ':') {\n colon = true\n }\n } else if (type === brackets[brackets.length - 1]) {\n brackets.pop()\n if (brackets.length === 0) bracket = null\n }\n\n token = this.tokenizer.nextToken()\n }\n\n if (this.tokenizer.endOfFile()) end = true\n if (brackets.length > 0) this.unclosedBracket(bracket)\n\n if (end && colon) {\n if (!customProperty) {\n while (tokens.length) {\n token = tokens[tokens.length - 1][0]\n if (token !== 'space' && token !== 'comment') break\n this.tokenizer.back(tokens.pop())\n }\n }\n this.decl(tokens, customProperty)\n } else {\n this.unknownWord(tokens)\n }\n }\n\n rule(tokens) {\n tokens.pop()\n\n let node = new Rule()\n this.init(node, tokens[0][2])\n\n node.raws.between = this.spacesAndCommentsFromEnd(tokens)\n this.raw(node, 'selector', tokens)\n this.current = node\n }\n\n decl(tokens, customProperty) {\n let node = new Declaration()\n this.init(node, tokens[0][2])\n\n let last = tokens[tokens.length - 1]\n if (last[0] === ';') {\n this.semicolon = true\n tokens.pop()\n }\n\n node.source.end = this.getPosition(\n last[3] || last[2] || findLastWithPosition(tokens)\n )\n\n while (tokens[0][0] !== 'word') {\n if (tokens.length === 1) this.unknownWord(tokens)\n node.raws.before += tokens.shift()[1]\n }\n node.source.start = this.getPosition(tokens[0][2])\n\n node.prop = ''\n while (tokens.length) {\n let type = tokens[0][0]\n if (type === ':' || type === 'space' || type === 'comment') {\n break\n }\n node.prop += tokens.shift()[1]\n }\n\n node.raws.between = ''\n\n let token\n while (tokens.length) {\n token = tokens.shift()\n\n if (token[0] === ':') {\n node.raws.between += token[1]\n break\n } else {\n if (token[0] === 'word' && /\\w/.test(token[1])) {\n this.unknownWord([token])\n }\n node.raws.between += token[1]\n }\n }\n\n if (node.prop[0] === '_' || node.prop[0] === '*') {\n node.raws.before += node.prop[0]\n node.prop = node.prop.slice(1)\n }\n\n let firstSpaces = []\n let next\n while (tokens.length) {\n next = tokens[0][0]\n if (next !== 'space' && next !== 'comment') break\n firstSpaces.push(tokens.shift())\n }\n\n this.precheckMissedSemicolon(tokens)\n\n for (let i = tokens.length - 1; i >= 0; i--) {\n token = tokens[i]\n if (token[1].toLowerCase() === '!important') {\n node.important = true\n let string = this.stringFrom(tokens, i)\n string = this.spacesFromEnd(tokens) + string\n if (string !== ' !important') node.raws.important = string\n break\n } else if (token[1].toLowerCase() === 'important') {\n let cache = tokens.slice(0)\n let str = ''\n for (let j = i; j > 0; j--) {\n let type = cache[j][0]\n if (str.trim().indexOf('!') === 0 && type !== 'space') {\n break\n }\n str = cache.pop()[1] + str\n }\n if (str.trim().indexOf('!') === 0) {\n node.important = true\n node.raws.important = str\n tokens = cache\n }\n }\n\n if (token[0] !== 'space' && token[0] !== 'comment') {\n break\n }\n }\n\n let hasWord = tokens.some(i => i[0] !== 'space' && i[0] !== 'comment')\n\n if (hasWord) {\n node.raws.between += firstSpaces.map(i => i[1]).join('')\n firstSpaces = []\n }\n this.raw(node, 'value', firstSpaces.concat(tokens), customProperty)\n\n if (node.value.includes(':') && !customProperty) {\n this.checkMissedSemicolon(tokens)\n }\n }\n\n atrule(token) {\n let node = new AtRule()\n node.name = token[1].slice(1)\n if (node.name === '') {\n this.unnamedAtrule(node, token)\n }\n this.init(node, token[2])\n\n let type\n let prev\n let shift\n let last = false\n let open = false\n let params = []\n let brackets = []\n\n while (!this.tokenizer.endOfFile()) {\n token = this.tokenizer.nextToken()\n type = token[0]\n\n if (type === '(' || type === '[') {\n brackets.push(type === '(' ? ')' : ']')\n } else if (type === '{' && brackets.length > 0) {\n brackets.push('}')\n } else if (type === brackets[brackets.length - 1]) {\n brackets.pop()\n }\n\n if (brackets.length === 0) {\n if (type === ';') {\n node.source.end = this.getPosition(token[2])\n this.semicolon = true\n break\n } else if (type === '{') {\n open = true\n break\n } else if (type === '}') {\n if (params.length > 0) {\n shift = params.length - 1\n prev = params[shift]\n while (prev && prev[0] === 'space') {\n prev = params[--shift]\n }\n if (prev) {\n node.source.end = this.getPosition(prev[3] || prev[2])\n }\n }\n this.end(token)\n break\n } else {\n params.push(token)\n }\n } else {\n params.push(token)\n }\n\n if (this.tokenizer.endOfFile()) {\n last = true\n break\n }\n }\n\n node.raws.between = this.spacesAndCommentsFromEnd(params)\n if (params.length) {\n node.raws.afterName = this.spacesAndCommentsFromStart(params)\n this.raw(node, 'params', params)\n if (last) {\n token = params[params.length - 1]\n node.source.end = this.getPosition(token[3] || token[2])\n this.spaces = node.raws.between\n node.raws.between = ''\n }\n } else {\n node.raws.afterName = ''\n node.params = ''\n }\n\n if (open) {\n node.nodes = []\n this.current = node\n }\n }\n\n end(token) {\n if (this.current.nodes && this.current.nodes.length) {\n this.current.raws.semicolon = this.semicolon\n }\n this.semicolon = false\n\n this.current.raws.after = (this.current.raws.after || '') + this.spaces\n this.spaces = ''\n\n if (this.current.parent) {\n this.current.source.end = this.getPosition(token[2])\n this.current = this.current.parent\n } else {\n this.unexpectedClose(token)\n }\n }\n\n endFile() {\n if (this.current.parent) this.unclosedBlock()\n if (this.current.nodes && this.current.nodes.length) {\n this.current.raws.semicolon = this.semicolon\n }\n this.current.raws.after = (this.current.raws.after || '') + this.spaces\n }\n\n freeSemicolon(token) {\n this.spaces += token[1]\n if (this.current.nodes) {\n let prev = this.current.nodes[this.current.nodes.length - 1]\n if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) {\n prev.raws.ownSemicolon = this.spaces\n this.spaces = ''\n }\n }\n }\n\n // Helpers\n\n getPosition(offset) {\n let pos = this.input.fromOffset(offset)\n return {\n offset,\n line: pos.line,\n column: pos.col\n }\n }\n\n init(node, offset) {\n this.current.push(node)\n node.source = {\n start: this.getPosition(offset),\n input: this.input\n }\n node.raws.before = this.spaces\n this.spaces = ''\n if (node.type !== 'comment') this.semicolon = false\n }\n\n raw(node, prop, tokens, customProperty) {\n let token, type\n let length = tokens.length\n let value = ''\n let clean = true\n let next, prev\n\n for (let i = 0; i < length; i += 1) {\n token = tokens[i]\n type = token[0]\n if (type === 'space' && i === length - 1 && !customProperty) {\n clean = false\n } else if (type === 'comment') {\n prev = tokens[i - 1] ? tokens[i - 1][0] : 'empty'\n next = tokens[i + 1] ? tokens[i + 1][0] : 'empty'\n if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) {\n if (value.slice(-1) === ',') {\n clean = false\n } else {\n value += token[1]\n }\n } else {\n clean = false\n }\n } else {\n value += token[1]\n }\n }\n if (!clean) {\n let raw = tokens.reduce((all, i) => all + i[1], '')\n node.raws[prop] = { value, raw }\n }\n node[prop] = value\n }\n\n spacesAndCommentsFromEnd(tokens) {\n let lastTokenType\n let spaces = ''\n while (tokens.length) {\n lastTokenType = tokens[tokens.length - 1][0]\n if (lastTokenType !== 'space' && lastTokenType !== 'comment') break\n spaces = tokens.pop()[1] + spaces\n }\n return spaces\n }\n\n spacesAndCommentsFromStart(tokens) {\n let next\n let spaces = ''\n while (tokens.length) {\n next = tokens[0][0]\n if (next !== 'space' && next !== 'comment') break\n spaces += tokens.shift()[1]\n }\n return spaces\n }\n\n spacesFromEnd(tokens) {\n let lastTokenType\n let spaces = ''\n while (tokens.length) {\n lastTokenType = tokens[tokens.length - 1][0]\n if (lastTokenType !== 'space') break\n spaces = tokens.pop()[1] + spaces\n }\n return spaces\n }\n\n stringFrom(tokens, from) {\n let result = ''\n for (let i = from; i < tokens.length; i++) {\n result += tokens[i][1]\n }\n tokens.splice(from, tokens.length - from)\n return result\n }\n\n colon(tokens) {\n let brackets = 0\n let token, type, prev\n for (let [i, element] of tokens.entries()) {\n token = element\n type = token[0]\n\n if (type === '(') {\n brackets += 1\n }\n if (type === ')') {\n brackets -= 1\n }\n if (brackets === 0 && type === ':') {\n if (!prev) {\n this.doubleColon(token)\n } else if (prev[0] === 'word' && prev[1] === 'progid') {\n continue\n } else {\n return i\n }\n }\n\n prev = token\n }\n return false\n }\n\n // Errors\n\n unclosedBracket(bracket) {\n throw this.input.error(\n 'Unclosed bracket',\n { offset: bracket[2] },\n { offset: bracket[2] + 1 }\n )\n }\n\n unknownWord(tokens) {\n throw this.input.error(\n 'Unknown word',\n { offset: tokens[0][2] },\n { offset: tokens[0][2] + tokens[0][1].length }\n )\n }\n\n unexpectedClose(token) {\n throw this.input.error(\n 'Unexpected }',\n { offset: token[2] },\n { offset: token[2] + 1 }\n )\n }\n\n unclosedBlock() {\n let pos = this.current.source.start\n throw this.input.error('Unclosed block', pos.line, pos.column)\n }\n\n doubleColon(token) {\n throw this.input.error(\n 'Double colon',\n { offset: token[2] },\n { offset: token[2] + token[1].length }\n )\n }\n\n unnamedAtrule(node, token) {\n throw this.input.error(\n 'At-rule without name',\n { offset: token[2] },\n { offset: token[2] + token[1].length }\n )\n }\n\n precheckMissedSemicolon(/* tokens */) {\n // Hook for Safe Parser\n }\n\n checkMissedSemicolon(tokens) {\n let colon = this.colon(tokens)\n if (colon === false) return\n\n let founded = 0\n let token\n for (let j = colon - 1; j >= 0; j--) {\n token = tokens[j]\n if (token[0] !== 'space') {\n founded += 1\n if (founded === 2) break\n }\n }\n // If the token is a word, e.g. `!important`, `red` or any other valid property's value.\n // Then we need to return the colon after that word token. [3] is the \"end\" colon of that word.\n // And because we need it after that one we do +1 to get the next one.\n throw this.input.error(\n 'Missed semicolon',\n token[0] === 'word' ? token[3] + 1 : token[2]\n )\n }\n}\n\nmodule.exports = Parser\n","'use strict'\n\nlet CssSyntaxError = require('./css-syntax-error')\nlet Declaration = require('./declaration')\nlet LazyResult = require('./lazy-result')\nlet Container = require('./container')\nlet Processor = require('./processor')\nlet stringify = require('./stringify')\nlet fromJSON = require('./fromJSON')\nlet Document = require('./document')\nlet Warning = require('./warning')\nlet Comment = require('./comment')\nlet AtRule = require('./at-rule')\nlet Result = require('./result.js')\nlet Input = require('./input')\nlet parse = require('./parse')\nlet list = require('./list')\nlet Rule = require('./rule')\nlet Root = require('./root')\nlet Node = require('./node')\n\nfunction postcss(...plugins) {\n if (plugins.length === 1 && Array.isArray(plugins[0])) {\n plugins = plugins[0]\n }\n return new Processor(plugins)\n}\n\npostcss.plugin = function plugin(name, initializer) {\n let warningPrinted = false\n function creator(...args) {\n // eslint-disable-next-line no-console\n if (console && console.warn && !warningPrinted) {\n warningPrinted = true\n // eslint-disable-next-line no-console\n console.warn(\n name +\n ': postcss.plugin was deprecated. Migration guide:\\n' +\n 'https://evilmartians.com/chronicles/postcss-8-plugin-migration'\n )\n if (process.env.LANG && process.env.LANG.startsWith('cn')) {\n /* c8 ignore next 7 */\n // eslint-disable-next-line no-console\n console.warn(\n name +\n ': 里面 postcss.plugin 被弃用. 迁移指南:\\n' +\n 'https://www.w3ctech.com/topic/2226'\n )\n }\n }\n let transformer = initializer(...args)\n transformer.postcssPlugin = name\n transformer.postcssVersion = new Processor().version\n return transformer\n }\n\n let cache\n Object.defineProperty(creator, 'postcss', {\n get() {\n if (!cache) cache = creator()\n return cache\n }\n })\n\n creator.process = function (css, processOpts, pluginOpts) {\n return postcss([creator(pluginOpts)]).process(css, processOpts)\n }\n\n return creator\n}\n\npostcss.stringify = stringify\npostcss.parse = parse\npostcss.fromJSON = fromJSON\npostcss.list = list\n\npostcss.comment = defaults => new Comment(defaults)\npostcss.atRule = defaults => new AtRule(defaults)\npostcss.decl = defaults => new Declaration(defaults)\npostcss.rule = defaults => new Rule(defaults)\npostcss.root = defaults => new Root(defaults)\npostcss.document = defaults => new Document(defaults)\n\npostcss.CssSyntaxError = CssSyntaxError\npostcss.Declaration = Declaration\npostcss.Container = Container\npostcss.Processor = Processor\npostcss.Document = Document\npostcss.Comment = Comment\npostcss.Warning = Warning\npostcss.AtRule = AtRule\npostcss.Result = Result\npostcss.Input = Input\npostcss.Rule = Rule\npostcss.Root = Root\npostcss.Node = Node\n\nLazyResult.registerPostcss(postcss)\n\nmodule.exports = postcss\npostcss.default = postcss\n","'use strict'\n\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\nlet { existsSync, readFileSync } = require('fs')\nlet { dirname, join } = require('path')\n\nfunction fromBase64(str) {\n if (Buffer) {\n return Buffer.from(str, 'base64').toString()\n } else {\n /* c8 ignore next 2 */\n return window.atob(str)\n }\n}\n\nclass PreviousMap {\n constructor(css, opts) {\n if (opts.map === false) return\n this.loadAnnotation(css)\n this.inline = this.startWith(this.annotation, 'data:')\n\n let prev = opts.map ? opts.map.prev : undefined\n let text = this.loadMap(opts.from, prev)\n if (!this.mapFile && opts.from) {\n this.mapFile = opts.from\n }\n if (this.mapFile) this.root = dirname(this.mapFile)\n if (text) this.text = text\n }\n\n consumer() {\n if (!this.consumerCache) {\n this.consumerCache = new SourceMapConsumer(this.text)\n }\n return this.consumerCache\n }\n\n withContent() {\n return !!(\n this.consumer().sourcesContent &&\n this.consumer().sourcesContent.length > 0\n )\n }\n\n startWith(string, start) {\n if (!string) return false\n return string.substr(0, start.length) === start\n }\n\n getAnnotationURL(sourceMapString) {\n return sourceMapString.replace(/^\\/\\*\\s*# sourceMappingURL=/, '').trim()\n }\n\n loadAnnotation(css) {\n let comments = css.match(/\\/\\*\\s*# sourceMappingURL=/gm)\n if (!comments) return\n\n // sourceMappingURLs from comments, strings, etc.\n let start = css.lastIndexOf(comments.pop())\n let end = css.indexOf('*/', start)\n\n if (start > -1 && end > -1) {\n // Locate the last sourceMappingURL to avoid pickin\n this.annotation = this.getAnnotationURL(css.substring(start, end))\n }\n }\n\n decodeInline(text) {\n let baseCharsetUri = /^data:application\\/json;charset=utf-?8;base64,/\n let baseUri = /^data:application\\/json;base64,/\n let charsetUri = /^data:application\\/json;charset=utf-?8,/\n let uri = /^data:application\\/json,/\n\n if (charsetUri.test(text) || uri.test(text)) {\n return decodeURIComponent(text.substr(RegExp.lastMatch.length))\n }\n\n if (baseCharsetUri.test(text) || baseUri.test(text)) {\n return fromBase64(text.substr(RegExp.lastMatch.length))\n }\n\n let encoding = text.match(/data:application\\/json;([^,]+),/)[1]\n throw new Error('Unsupported source map encoding ' + encoding)\n }\n\n loadFile(path) {\n this.root = dirname(path)\n if (existsSync(path)) {\n this.mapFile = path\n return readFileSync(path, 'utf-8').toString().trim()\n }\n }\n\n loadMap(file, prev) {\n if (prev === false) return false\n\n if (prev) {\n if (typeof prev === 'string') {\n return prev\n } else if (typeof prev === 'function') {\n let prevPath = prev(file)\n if (prevPath) {\n let map = this.loadFile(prevPath)\n if (!map) {\n throw new Error(\n 'Unable to load previous source map: ' + prevPath.toString()\n )\n }\n return map\n }\n } else if (prev instanceof SourceMapConsumer) {\n return SourceMapGenerator.fromSourceMap(prev).toString()\n } else if (prev instanceof SourceMapGenerator) {\n return prev.toString()\n } else if (this.isMap(prev)) {\n return JSON.stringify(prev)\n } else {\n throw new Error(\n 'Unsupported previous source map format: ' + prev.toString()\n )\n }\n } else if (this.inline) {\n return this.decodeInline(this.annotation)\n } else if (this.annotation) {\n let map = this.annotation\n if (file) map = join(dirname(file), map)\n return this.loadFile(map)\n }\n }\n\n isMap(map) {\n if (typeof map !== 'object') return false\n return (\n typeof map.mappings === 'string' ||\n typeof map._mappings === 'string' ||\n Array.isArray(map.sections)\n )\n }\n}\n\nmodule.exports = PreviousMap\nPreviousMap.default = PreviousMap\n","'use strict'\n\nlet NoWorkResult = require('./no-work-result')\nlet LazyResult = require('./lazy-result')\nlet Document = require('./document')\nlet Root = require('./root')\n\nclass Processor {\n constructor(plugins = []) {\n this.version = '8.4.19'\n this.plugins = this.normalize(plugins)\n }\n\n use(plugin) {\n this.plugins = this.plugins.concat(this.normalize([plugin]))\n return this\n }\n\n process(css, opts = {}) {\n if (\n this.plugins.length === 0 &&\n typeof opts.parser === 'undefined' &&\n typeof opts.stringifier === 'undefined' &&\n typeof opts.syntax === 'undefined'\n ) {\n return new NoWorkResult(this, css, opts)\n } else {\n return new LazyResult(this, css, opts)\n }\n }\n\n normalize(plugins) {\n let normalized = []\n for (let i of plugins) {\n if (i.postcss === true) {\n i = i()\n } else if (i.postcss) {\n i = i.postcss\n }\n\n if (typeof i === 'object' && Array.isArray(i.plugins)) {\n normalized = normalized.concat(i.plugins)\n } else if (typeof i === 'object' && i.postcssPlugin) {\n normalized.push(i)\n } else if (typeof i === 'function') {\n normalized.push(i)\n } else if (typeof i === 'object' && (i.parse || i.stringify)) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n 'PostCSS syntaxes cannot be used as plugins. Instead, please use ' +\n 'one of the syntax/parser/stringifier options as outlined ' +\n 'in your PostCSS runner documentation.'\n )\n }\n } else {\n throw new Error(i + ' is not a PostCSS plugin')\n }\n }\n return normalized\n }\n}\n\nmodule.exports = Processor\nProcessor.default = Processor\n\nRoot.registerProcessor(Processor)\nDocument.registerProcessor(Processor)\n","'use strict'\n\nlet Warning = require('./warning')\n\nclass Result {\n constructor(processor, root, opts) {\n this.processor = processor\n this.messages = []\n this.root = root\n this.opts = opts\n this.css = undefined\n this.map = undefined\n }\n\n toString() {\n return this.css\n }\n\n warn(text, opts = {}) {\n if (!opts.plugin) {\n if (this.lastPlugin && this.lastPlugin.postcssPlugin) {\n opts.plugin = this.lastPlugin.postcssPlugin\n }\n }\n\n let warning = new Warning(text, opts)\n this.messages.push(warning)\n\n return warning\n }\n\n warnings() {\n return this.messages.filter(i => i.type === 'warning')\n }\n\n get content() {\n return this.css\n }\n}\n\nmodule.exports = Result\nResult.default = Result\n","'use strict'\n\nlet Container = require('./container')\n\nlet LazyResult, Processor\n\nclass Root extends Container {\n constructor(defaults) {\n super(defaults)\n this.type = 'root'\n if (!this.nodes) this.nodes = []\n }\n\n removeChild(child, ignore) {\n let index = this.index(child)\n\n if (!ignore && index === 0 && this.nodes.length > 1) {\n this.nodes[1].raws.before = this.nodes[index].raws.before\n }\n\n return super.removeChild(child)\n }\n\n normalize(child, sample, type) {\n let nodes = super.normalize(child)\n\n if (sample) {\n if (type === 'prepend') {\n if (this.nodes.length > 1) {\n sample.raws.before = this.nodes[1].raws.before\n } else {\n delete sample.raws.before\n }\n } else if (this.first !== sample) {\n for (let node of nodes) {\n node.raws.before = sample.raws.before\n }\n }\n }\n\n return nodes\n }\n\n toResult(opts = {}) {\n let lazy = new LazyResult(new Processor(), this, opts)\n return lazy.stringify()\n }\n}\n\nRoot.registerLazyResult = dependant => {\n LazyResult = dependant\n}\n\nRoot.registerProcessor = dependant => {\n Processor = dependant\n}\n\nmodule.exports = Root\nRoot.default = Root\n\nContainer.registerRoot(Root)\n","'use strict'\n\nlet Container = require('./container')\nlet list = require('./list')\n\nclass Rule extends Container {\n constructor(defaults) {\n super(defaults)\n this.type = 'rule'\n if (!this.nodes) this.nodes = []\n }\n\n get selectors() {\n return list.comma(this.selector)\n }\n\n set selectors(values) {\n let match = this.selector ? this.selector.match(/,\\s*/) : null\n let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen')\n this.selector = values.join(sep)\n }\n}\n\nmodule.exports = Rule\nRule.default = Rule\n\nContainer.registerRule(Rule)\n","'use strict'\n\nconst DEFAULT_RAW = {\n colon: ': ',\n indent: ' ',\n beforeDecl: '\\n',\n beforeRule: '\\n',\n beforeOpen: ' ',\n beforeClose: '\\n',\n beforeComment: '\\n',\n after: '\\n',\n emptyBody: '',\n commentLeft: ' ',\n commentRight: ' ',\n semicolon: false\n}\n\nfunction capitalize(str) {\n return str[0].toUpperCase() + str.slice(1)\n}\n\nclass Stringifier {\n constructor(builder) {\n this.builder = builder\n }\n\n stringify(node, semicolon) {\n /* c8 ignore start */\n if (!this[node.type]) {\n throw new Error(\n 'Unknown AST node type ' +\n node.type +\n '. ' +\n 'Maybe you need to change PostCSS stringifier.'\n )\n }\n /* c8 ignore stop */\n this[node.type](node, semicolon)\n }\n\n document(node) {\n this.body(node)\n }\n\n root(node) {\n this.body(node)\n if (node.raws.after) this.builder(node.raws.after)\n }\n\n comment(node) {\n let left = this.raw(node, 'left', 'commentLeft')\n let right = this.raw(node, 'right', 'commentRight')\n this.builder('/*' + left + node.text + right + '*/', node)\n }\n\n decl(node, semicolon) {\n let between = this.raw(node, 'between', 'colon')\n let string = node.prop + between + this.rawValue(node, 'value')\n\n if (node.important) {\n string += node.raws.important || ' !important'\n }\n\n if (semicolon) string += ';'\n this.builder(string, node)\n }\n\n rule(node) {\n this.block(node, this.rawValue(node, 'selector'))\n if (node.raws.ownSemicolon) {\n this.builder(node.raws.ownSemicolon, node, 'end')\n }\n }\n\n atrule(node, semicolon) {\n let name = '@' + node.name\n let params = node.params ? this.rawValue(node, 'params') : ''\n\n if (typeof node.raws.afterName !== 'undefined') {\n name += node.raws.afterName\n } else if (params) {\n name += ' '\n }\n\n if (node.nodes) {\n this.block(node, name + params)\n } else {\n let end = (node.raws.between || '') + (semicolon ? ';' : '')\n this.builder(name + params + end, node)\n }\n }\n\n body(node) {\n let last = node.nodes.length - 1\n while (last > 0) {\n if (node.nodes[last].type !== 'comment') break\n last -= 1\n }\n\n let semicolon = this.raw(node, 'semicolon')\n for (let i = 0; i < node.nodes.length; i++) {\n let child = node.nodes[i]\n let before = this.raw(child, 'before')\n if (before) this.builder(before)\n this.stringify(child, last !== i || semicolon)\n }\n }\n\n block(node, start) {\n let between = this.raw(node, 'between', 'beforeOpen')\n this.builder(start + between + '{', node, 'start')\n\n let after\n if (node.nodes && node.nodes.length) {\n this.body(node)\n after = this.raw(node, 'after')\n } else {\n after = this.raw(node, 'after', 'emptyBody')\n }\n\n if (after) this.builder(after)\n this.builder('}', node, 'end')\n }\n\n raw(node, own, detect) {\n let value\n if (!detect) detect = own\n\n // Already had\n if (own) {\n value = node.raws[own]\n if (typeof value !== 'undefined') return value\n }\n\n let parent = node.parent\n\n if (detect === 'before') {\n // Hack for first rule in CSS\n if (!parent || (parent.type === 'root' && parent.first === node)) {\n return ''\n }\n\n // `root` nodes in `document` should use only their own raws\n if (parent && parent.type === 'document') {\n return ''\n }\n }\n\n // Floating child without parent\n if (!parent) return DEFAULT_RAW[detect]\n\n // Detect style by other nodes\n let root = node.root()\n if (!root.rawCache) root.rawCache = {}\n if (typeof root.rawCache[detect] !== 'undefined') {\n return root.rawCache[detect]\n }\n\n if (detect === 'before' || detect === 'after') {\n return this.beforeAfter(node, detect)\n } else {\n let method = 'raw' + capitalize(detect)\n if (this[method]) {\n value = this[method](root, node)\n } else {\n root.walk(i => {\n value = i.raws[own]\n if (typeof value !== 'undefined') return false\n })\n }\n }\n\n if (typeof value === 'undefined') value = DEFAULT_RAW[detect]\n\n root.rawCache[detect] = value\n return value\n }\n\n rawSemicolon(root) {\n let value\n root.walk(i => {\n if (i.nodes && i.nodes.length && i.last.type === 'decl') {\n value = i.raws.semicolon\n if (typeof value !== 'undefined') return false\n }\n })\n return value\n }\n\n rawEmptyBody(root) {\n let value\n root.walk(i => {\n if (i.nodes && i.nodes.length === 0) {\n value = i.raws.after\n if (typeof value !== 'undefined') return false\n }\n })\n return value\n }\n\n rawIndent(root) {\n if (root.raws.indent) return root.raws.indent\n let value\n root.walk(i => {\n let p = i.parent\n if (p && p !== root && p.parent && p.parent === root) {\n if (typeof i.raws.before !== 'undefined') {\n let parts = i.raws.before.split('\\n')\n value = parts[parts.length - 1]\n value = value.replace(/\\S/g, '')\n return false\n }\n }\n })\n return value\n }\n\n rawBeforeComment(root, node) {\n let value\n root.walkComments(i => {\n if (typeof i.raws.before !== 'undefined') {\n value = i.raws.before\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n })\n if (typeof value === 'undefined') {\n value = this.raw(node, null, 'beforeDecl')\n } else if (value) {\n value = value.replace(/\\S/g, '')\n }\n return value\n }\n\n rawBeforeDecl(root, node) {\n let value\n root.walkDecls(i => {\n if (typeof i.raws.before !== 'undefined') {\n value = i.raws.before\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n })\n if (typeof value === 'undefined') {\n value = this.raw(node, null, 'beforeRule')\n } else if (value) {\n value = value.replace(/\\S/g, '')\n }\n return value\n }\n\n rawBeforeRule(root) {\n let value\n root.walk(i => {\n if (i.nodes && (i.parent !== root || root.first !== i)) {\n if (typeof i.raws.before !== 'undefined') {\n value = i.raws.before\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n }\n })\n if (value) value = value.replace(/\\S/g, '')\n return value\n }\n\n rawBeforeClose(root) {\n let value\n root.walk(i => {\n if (i.nodes && i.nodes.length > 0) {\n if (typeof i.raws.after !== 'undefined') {\n value = i.raws.after\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n }\n })\n if (value) value = value.replace(/\\S/g, '')\n return value\n }\n\n rawBeforeOpen(root) {\n let value\n root.walk(i => {\n if (i.type !== 'decl') {\n value = i.raws.between\n if (typeof value !== 'undefined') return false\n }\n })\n return value\n }\n\n rawColon(root) {\n let value\n root.walkDecls(i => {\n if (typeof i.raws.between !== 'undefined') {\n value = i.raws.between.replace(/[^\\s:]/g, '')\n return false\n }\n })\n return value\n }\n\n beforeAfter(node, detect) {\n let value\n if (node.type === 'decl') {\n value = this.raw(node, null, 'beforeDecl')\n } else if (node.type === 'comment') {\n value = this.raw(node, null, 'beforeComment')\n } else if (detect === 'before') {\n value = this.raw(node, null, 'beforeRule')\n } else {\n value = this.raw(node, null, 'beforeClose')\n }\n\n let buf = node.parent\n let depth = 0\n while (buf && buf.type !== 'root') {\n depth += 1\n buf = buf.parent\n }\n\n if (value.includes('\\n')) {\n let indent = this.raw(node, null, 'indent')\n if (indent.length) {\n for (let step = 0; step < depth; step++) value += indent\n }\n }\n\n return value\n }\n\n rawValue(node, prop) {\n let value = node[prop]\n let raw = node.raws[prop]\n if (raw && raw.value === value) {\n return raw.raw\n }\n\n return value\n }\n}\n\nmodule.exports = Stringifier\nStringifier.default = Stringifier\n","'use strict'\n\nlet Stringifier = require('./stringifier')\n\nfunction stringify(node, builder) {\n let str = new Stringifier(builder)\n str.stringify(node)\n}\n\nmodule.exports = stringify\nstringify.default = stringify\n","'use strict'\n\nmodule.exports.isClean = Symbol('isClean')\n\nmodule.exports.my = Symbol('my')\n","'use strict'\n\nconst SINGLE_QUOTE = \"'\".charCodeAt(0)\nconst DOUBLE_QUOTE = '\"'.charCodeAt(0)\nconst BACKSLASH = '\\\\'.charCodeAt(0)\nconst SLASH = '/'.charCodeAt(0)\nconst NEWLINE = '\\n'.charCodeAt(0)\nconst SPACE = ' '.charCodeAt(0)\nconst FEED = '\\f'.charCodeAt(0)\nconst TAB = '\\t'.charCodeAt(0)\nconst CR = '\\r'.charCodeAt(0)\nconst OPEN_SQUARE = '['.charCodeAt(0)\nconst CLOSE_SQUARE = ']'.charCodeAt(0)\nconst OPEN_PARENTHESES = '('.charCodeAt(0)\nconst CLOSE_PARENTHESES = ')'.charCodeAt(0)\nconst OPEN_CURLY = '{'.charCodeAt(0)\nconst CLOSE_CURLY = '}'.charCodeAt(0)\nconst SEMICOLON = ';'.charCodeAt(0)\nconst ASTERISK = '*'.charCodeAt(0)\nconst COLON = ':'.charCodeAt(0)\nconst AT = '@'.charCodeAt(0)\n\nconst RE_AT_END = /[\\t\\n\\f\\r \"#'()/;[\\\\\\]{}]/g\nconst RE_WORD_END = /[\\t\\n\\f\\r !\"#'():;@[\\\\\\]{}]|\\/(?=\\*)/g\nconst RE_BAD_BRACKET = /.[\\n\"'(/\\\\]/\nconst RE_HEX_ESCAPE = /[\\da-f]/i\n\nmodule.exports = function tokenizer(input, options = {}) {\n let css = input.css.valueOf()\n let ignore = options.ignoreErrors\n\n let code, next, quote, content, escape\n let escaped, escapePos, prev, n, currentToken\n\n let length = css.length\n let pos = 0\n let buffer = []\n let returned = []\n\n function position() {\n return pos\n }\n\n function unclosed(what) {\n throw input.error('Unclosed ' + what, pos)\n }\n\n function endOfFile() {\n return returned.length === 0 && pos >= length\n }\n\n function nextToken(opts) {\n if (returned.length) return returned.pop()\n if (pos >= length) return\n\n let ignoreUnclosed = opts ? opts.ignoreUnclosed : false\n\n code = css.charCodeAt(pos)\n\n switch (code) {\n case NEWLINE:\n case SPACE:\n case TAB:\n case CR:\n case FEED: {\n next = pos\n do {\n next += 1\n code = css.charCodeAt(next)\n } while (\n code === SPACE ||\n code === NEWLINE ||\n code === TAB ||\n code === CR ||\n code === FEED\n )\n\n currentToken = ['space', css.slice(pos, next)]\n pos = next - 1\n break\n }\n\n case OPEN_SQUARE:\n case CLOSE_SQUARE:\n case OPEN_CURLY:\n case CLOSE_CURLY:\n case COLON:\n case SEMICOLON:\n case CLOSE_PARENTHESES: {\n let controlChar = String.fromCharCode(code)\n currentToken = [controlChar, controlChar, pos]\n break\n }\n\n case OPEN_PARENTHESES: {\n prev = buffer.length ? buffer.pop()[1] : ''\n n = css.charCodeAt(pos + 1)\n if (\n prev === 'url' &&\n n !== SINGLE_QUOTE &&\n n !== DOUBLE_QUOTE &&\n n !== SPACE &&\n n !== NEWLINE &&\n n !== TAB &&\n n !== FEED &&\n n !== CR\n ) {\n next = pos\n do {\n escaped = false\n next = css.indexOf(')', next + 1)\n if (next === -1) {\n if (ignore || ignoreUnclosed) {\n next = pos\n break\n } else {\n unclosed('bracket')\n }\n }\n escapePos = next\n while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n escapePos -= 1\n escaped = !escaped\n }\n } while (escaped)\n\n currentToken = ['brackets', css.slice(pos, next + 1), pos, next]\n\n pos = next\n } else {\n next = css.indexOf(')', pos + 1)\n content = css.slice(pos, next + 1)\n\n if (next === -1 || RE_BAD_BRACKET.test(content)) {\n currentToken = ['(', '(', pos]\n } else {\n currentToken = ['brackets', content, pos, next]\n pos = next\n }\n }\n\n break\n }\n\n case SINGLE_QUOTE:\n case DOUBLE_QUOTE: {\n quote = code === SINGLE_QUOTE ? \"'\" : '\"'\n next = pos\n do {\n escaped = false\n next = css.indexOf(quote, next + 1)\n if (next === -1) {\n if (ignore || ignoreUnclosed) {\n next = pos + 1\n break\n } else {\n unclosed('string')\n }\n }\n escapePos = next\n while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n escapePos -= 1\n escaped = !escaped\n }\n } while (escaped)\n\n currentToken = ['string', css.slice(pos, next + 1), pos, next]\n pos = next\n break\n }\n\n case AT: {\n RE_AT_END.lastIndex = pos + 1\n RE_AT_END.test(css)\n if (RE_AT_END.lastIndex === 0) {\n next = css.length - 1\n } else {\n next = RE_AT_END.lastIndex - 2\n }\n\n currentToken = ['at-word', css.slice(pos, next + 1), pos, next]\n\n pos = next\n break\n }\n\n case BACKSLASH: {\n next = pos\n escape = true\n while (css.charCodeAt(next + 1) === BACKSLASH) {\n next += 1\n escape = !escape\n }\n code = css.charCodeAt(next + 1)\n if (\n escape &&\n code !== SLASH &&\n code !== SPACE &&\n code !== NEWLINE &&\n code !== TAB &&\n code !== CR &&\n code !== FEED\n ) {\n next += 1\n if (RE_HEX_ESCAPE.test(css.charAt(next))) {\n while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) {\n next += 1\n }\n if (css.charCodeAt(next + 1) === SPACE) {\n next += 1\n }\n }\n }\n\n currentToken = ['word', css.slice(pos, next + 1), pos, next]\n\n pos = next\n break\n }\n\n default: {\n if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) {\n next = css.indexOf('*/', pos + 2) + 1\n if (next === 0) {\n if (ignore || ignoreUnclosed) {\n next = css.length\n } else {\n unclosed('comment')\n }\n }\n\n currentToken = ['comment', css.slice(pos, next + 1), pos, next]\n pos = next\n } else {\n RE_WORD_END.lastIndex = pos + 1\n RE_WORD_END.test(css)\n if (RE_WORD_END.lastIndex === 0) {\n next = css.length - 1\n } else {\n next = RE_WORD_END.lastIndex - 2\n }\n\n currentToken = ['word', css.slice(pos, next + 1), pos, next]\n buffer.push(currentToken)\n pos = next\n }\n\n break\n }\n }\n\n pos++\n return currentToken\n }\n\n function back(token) {\n returned.push(token)\n }\n\n return {\n back,\n nextToken,\n endOfFile,\n position\n }\n}\n","/* eslint-disable no-console */\n'use strict'\n\nlet printed = {}\n\nmodule.exports = function warnOnce(message) {\n if (printed[message]) return\n printed[message] = true\n\n if (typeof console !== 'undefined' && console.warn) {\n console.warn(message)\n }\n}\n","'use strict'\n\nclass Warning {\n constructor(text, opts = {}) {\n this.type = 'warning'\n this.text = text\n\n if (opts.node && opts.node.source) {\n let range = opts.node.rangeBy(opts)\n this.line = range.start.line\n this.column = range.start.column\n this.endLine = range.end.line\n this.endColumn = range.end.column\n }\n\n for (let opt in opts) this[opt] = opts[opt]\n }\n\n toString() {\n if (this.node) {\n return this.node.error(this.text, {\n plugin: this.plugin,\n index: this.index,\n word: this.word\n }).message\n }\n\n if (this.plugin) {\n return this.plugin + ': ' + this.text\n }\n\n return this.text\n }\n}\n\nmodule.exports = Warning\nWarning.default = Warning\n","const htmlparser = require('htmlparser2');\nconst escapeStringRegexp = require('escape-string-regexp');\nconst { isPlainObject } = require('is-plain-object');\nconst deepmerge = require('deepmerge');\nconst parseSrcset = require('parse-srcset');\nconst { parse: postcssParse } = require('postcss');\n// Tags that can conceivably represent stand-alone media.\nconst mediaTags = [\n 'img', 'audio', 'video', 'picture', 'svg',\n 'object', 'map', 'iframe', 'embed'\n];\n// Tags that are inherently vulnerable to being used in XSS attacks.\nconst vulnerableTags = [ 'script', 'style' ];\n\nfunction each(obj, cb) {\n if (obj) {\n Object.keys(obj).forEach(function (key) {\n cb(obj[key], key);\n });\n }\n}\n\n// Avoid false positives with .__proto__, .hasOwnProperty, etc.\nfunction has(obj, key) {\n return ({}).hasOwnProperty.call(obj, key);\n}\n\n// Returns those elements of `a` for which `cb(a)` returns truthy\nfunction filter(a, cb) {\n const n = [];\n each(a, function(v) {\n if (cb(v)) {\n n.push(v);\n }\n });\n return n;\n}\n\nfunction isEmptyObject(obj) {\n for (const key in obj) {\n if (has(obj, key)) {\n return false;\n }\n }\n return true;\n}\n\nfunction stringifySrcset(parsedSrcset) {\n return parsedSrcset.map(function(part) {\n if (!part.url) {\n throw new Error('URL missing');\n }\n\n return (\n part.url +\n (part.w ? ` ${part.w}w` : '') +\n (part.h ? ` ${part.h}h` : '') +\n (part.d ? ` ${part.d}x` : '')\n );\n }).join(', ');\n}\n\nmodule.exports = sanitizeHtml;\n\n// A valid attribute name.\n// We use a tolerant definition based on the set of strings defined by\n// html.spec.whatwg.org/multipage/parsing.html#before-attribute-name-state\n// and html.spec.whatwg.org/multipage/parsing.html#attribute-name-state .\n// The characters accepted are ones which can be appended to the attribute\n// name buffer without triggering a parse error:\n// * unexpected-equals-sign-before-attribute-name\n// * unexpected-null-character\n// * unexpected-character-in-attribute-name\n// We exclude the empty string because it's impossible to get to the after\n// attribute name state with an empty attribute name buffer.\nconst VALID_HTML_ATTRIBUTE_NAME = /^[^\\0\\t\\n\\f\\r /<=>]+$/;\n\n// Ignore the _recursing flag; it's there for recursive\n// invocation as a guard against this exploit:\n// https://github.com/fb55/htmlparser2/issues/105\n\nfunction sanitizeHtml(html, options, _recursing) {\n if (html == null) {\n return '';\n }\n\n let result = '';\n // Used for hot swapping the result variable with an empty string in order to \"capture\" the text written to it.\n let tempResult = '';\n\n function Frame(tag, attribs) {\n const that = this;\n this.tag = tag;\n this.attribs = attribs || {};\n this.tagPosition = result.length;\n this.text = ''; // Node inner text\n this.mediaChildren = [];\n\n this.updateParentNodeText = function() {\n if (stack.length) {\n const parentFrame = stack[stack.length - 1];\n parentFrame.text += that.text;\n }\n };\n\n this.updateParentNodeMediaChildren = function() {\n if (stack.length && mediaTags.includes(this.tag)) {\n const parentFrame = stack[stack.length - 1];\n parentFrame.mediaChildren.push(this.tag);\n }\n };\n }\n\n options = Object.assign({}, sanitizeHtml.defaults, options);\n options.parser = Object.assign({}, htmlParserDefaults, options.parser);\n\n // vulnerableTags\n vulnerableTags.forEach(function (tag) {\n if (\n options.allowedTags !== false && (options.allowedTags || []).indexOf(tag) > -1 &&\n !options.allowVulnerableTags\n ) {\n console.warn(`\\n\\n⚠ Your \\`allowedTags\\` option includes, \\`${tag}\\`, which is inherently\\nvulnerable to XSS attacks. Please remove it from \\`allowedTags\\`.\\nOr, to disable this warning, add the \\`allowVulnerableTags\\` option\\nand ensure you are accounting for this risk.\\n\\n`);\n }\n });\n\n // Tags that contain something other than HTML, or where discarding\n // the text when the tag is disallowed makes sense for other reasons.\n // If we are not allowing these tags, we should drop their content too.\n // For other tags you would drop the tag but keep its content.\n const nonTextTagsArray = options.nonTextTags || [\n 'script',\n 'style',\n 'textarea',\n 'option'\n ];\n let allowedAttributesMap;\n let allowedAttributesGlobMap;\n if (options.allowedAttributes) {\n allowedAttributesMap = {};\n allowedAttributesGlobMap = {};\n each(options.allowedAttributes, function(attributes, tag) {\n allowedAttributesMap[tag] = [];\n const globRegex = [];\n attributes.forEach(function(obj) {\n if (typeof obj === 'string' && obj.indexOf('*') >= 0) {\n globRegex.push(escapeStringRegexp(obj).replace(/\\\\\\*/g, '.*'));\n } else {\n allowedAttributesMap[tag].push(obj);\n }\n });\n if (globRegex.length) {\n allowedAttributesGlobMap[tag] = new RegExp('^(' + globRegex.join('|') + ')$');\n }\n });\n }\n const allowedClassesMap = {};\n const allowedClassesGlobMap = {};\n const allowedClassesRegexMap = {};\n each(options.allowedClasses, function(classes, tag) {\n // Implicitly allows the class attribute\n if (allowedAttributesMap) {\n if (!has(allowedAttributesMap, tag)) {\n allowedAttributesMap[tag] = [];\n }\n allowedAttributesMap[tag].push('class');\n }\n\n allowedClassesMap[tag] = [];\n allowedClassesRegexMap[tag] = [];\n const globRegex = [];\n classes.forEach(function(obj) {\n if (typeof obj === 'string' && obj.indexOf('*') >= 0) {\n globRegex.push(escapeStringRegexp(obj).replace(/\\\\\\*/g, '.*'));\n } else if (obj instanceof RegExp) {\n allowedClassesRegexMap[tag].push(obj);\n } else {\n allowedClassesMap[tag].push(obj);\n }\n });\n if (globRegex.length) {\n allowedClassesGlobMap[tag] = new RegExp('^(' + globRegex.join('|') + ')$');\n }\n });\n\n const transformTagsMap = {};\n let transformTagsAll;\n each(options.transformTags, function(transform, tag) {\n let transFun;\n if (typeof transform === 'function') {\n transFun = transform;\n } else if (typeof transform === 'string') {\n transFun = sanitizeHtml.simpleTransform(transform);\n }\n if (tag === '*') {\n transformTagsAll = transFun;\n } else {\n transformTagsMap[tag] = transFun;\n }\n });\n\n let depth;\n let stack;\n let skipMap;\n let transformMap;\n let skipText;\n let skipTextDepth;\n let addedText = false;\n\n initializeState();\n\n const parser = new htmlparser.Parser({\n onopentag: function(name, attribs) {\n // If `enforceHtmlBoundary` is `true` and this has found the opening\n // `html` tag, reset the state.\n if (options.enforceHtmlBoundary && name === 'html') {\n initializeState();\n }\n\n if (skipText) {\n skipTextDepth++;\n return;\n }\n const frame = new Frame(name, attribs);\n stack.push(frame);\n\n let skip = false;\n const hasText = !!frame.text;\n let transformedTag;\n if (has(transformTagsMap, name)) {\n transformedTag = transformTagsMap[name](name, attribs);\n\n frame.attribs = attribs = transformedTag.attribs;\n\n if (transformedTag.text !== undefined) {\n frame.innerText = transformedTag.text;\n }\n\n if (name !== transformedTag.tagName) {\n frame.name = name = transformedTag.tagName;\n transformMap[depth] = transformedTag.tagName;\n }\n }\n if (transformTagsAll) {\n transformedTag = transformTagsAll(name, attribs);\n\n frame.attribs = attribs = transformedTag.attribs;\n if (name !== transformedTag.tagName) {\n frame.name = name = transformedTag.tagName;\n transformMap[depth] = transformedTag.tagName;\n }\n }\n\n if ((options.allowedTags !== false && (options.allowedTags || []).indexOf(name) === -1) || (options.disallowedTagsMode === 'recursiveEscape' && !isEmptyObject(skipMap)) || (options.nestingLimit != null && depth >= options.nestingLimit)) {\n skip = true;\n skipMap[depth] = true;\n if (options.disallowedTagsMode === 'discard') {\n if (nonTextTagsArray.indexOf(name) !== -1) {\n skipText = true;\n skipTextDepth = 1;\n }\n }\n skipMap[depth] = true;\n }\n depth++;\n if (skip) {\n if (options.disallowedTagsMode === 'discard') {\n // We want the contents but not this tag\n return;\n }\n tempResult = result;\n result = '';\n }\n result += '<' + name;\n\n if (name === 'script') {\n if (options.allowedScriptHostnames || options.allowedScriptDomains) {\n frame.innerText = '';\n }\n }\n\n if (!allowedAttributesMap || has(allowedAttributesMap, name) || allowedAttributesMap['*']) {\n each(attribs, function(value, a) {\n if (!VALID_HTML_ATTRIBUTE_NAME.test(a)) {\n // This prevents part of an attribute name in the output from being\n // interpreted as the end of an attribute, or end of a tag.\n delete frame.attribs[a];\n return;\n }\n // check allowedAttributesMap for the element and attribute and modify the value\n // as necessary if there are specific values defined.\n let passedAllowedAttributesMapCheck = false;\n if (!allowedAttributesMap ||\n (has(allowedAttributesMap, name) && allowedAttributesMap[name].indexOf(a) !== -1) ||\n (allowedAttributesMap['*'] && allowedAttributesMap['*'].indexOf(a) !== -1) ||\n (has(allowedAttributesGlobMap, name) && allowedAttributesGlobMap[name].test(a)) ||\n (allowedAttributesGlobMap['*'] && allowedAttributesGlobMap['*'].test(a))) {\n passedAllowedAttributesMapCheck = true;\n } else if (allowedAttributesMap && allowedAttributesMap[name]) {\n for (const o of allowedAttributesMap[name]) {\n if (isPlainObject(o) && o.name && (o.name === a)) {\n passedAllowedAttributesMapCheck = true;\n let newValue = '';\n if (o.multiple === true) {\n // verify the values that are allowed\n const splitStrArray = value.split(' ');\n for (const s of splitStrArray) {\n if (o.values.indexOf(s) !== -1) {\n if (newValue === '') {\n newValue = s;\n } else {\n newValue += ' ' + s;\n }\n }\n }\n } else if (o.values.indexOf(value) >= 0) {\n // verified an allowed value matches the entire attribute value\n newValue = value;\n }\n value = newValue;\n }\n }\n }\n if (passedAllowedAttributesMapCheck) {\n if (options.allowedSchemesAppliedToAttributes.indexOf(a) !== -1) {\n if (naughtyHref(name, value)) {\n delete frame.attribs[a];\n return;\n }\n }\n\n if (name === 'script' && a === 'src') {\n\n let allowed = true;\n\n try {\n const parsed = parseUrl(value);\n\n if (options.allowedScriptHostnames || options.allowedScriptDomains) {\n const allowedHostname = (options.allowedScriptHostnames || []).find(function (hostname) {\n return hostname === parsed.url.hostname;\n });\n const allowedDomain = (options.allowedScriptDomains || []).find(function(domain) {\n return parsed.url.hostname === domain || parsed.url.hostname.endsWith(`.${domain}`);\n });\n allowed = allowedHostname || allowedDomain;\n }\n } catch (e) {\n allowed = false;\n }\n\n if (!allowed) {\n delete frame.attribs[a];\n return;\n }\n }\n\n if (name === 'iframe' && a === 'src') {\n let allowed = true;\n try {\n const parsed = parseUrl(value);\n\n if (parsed.isRelativeUrl) {\n // default value of allowIframeRelativeUrls is true\n // unless allowedIframeHostnames or allowedIframeDomains specified\n allowed = has(options, 'allowIframeRelativeUrls')\n ? options.allowIframeRelativeUrls\n : (!options.allowedIframeHostnames && !options.allowedIframeDomains);\n } else if (options.allowedIframeHostnames || options.allowedIframeDomains) {\n const allowedHostname = (options.allowedIframeHostnames || []).find(function (hostname) {\n return hostname === parsed.url.hostname;\n });\n const allowedDomain = (options.allowedIframeDomains || []).find(function(domain) {\n return parsed.url.hostname === domain || parsed.url.hostname.endsWith(`.${domain}`);\n });\n allowed = allowedHostname || allowedDomain;\n }\n } catch (e) {\n // Unparseable iframe src\n allowed = false;\n }\n if (!allowed) {\n delete frame.attribs[a];\n return;\n }\n }\n if (a === 'srcset') {\n try {\n let parsed = parseSrcset(value);\n parsed.forEach(function(value) {\n if (naughtyHref('srcset', value.url)) {\n value.evil = true;\n }\n });\n parsed = filter(parsed, function(v) {\n return !v.evil;\n });\n if (!parsed.length) {\n delete frame.attribs[a];\n return;\n } else {\n value = stringifySrcset(filter(parsed, function(v) {\n return !v.evil;\n }));\n frame.attribs[a] = value;\n }\n } catch (e) {\n // Unparseable srcset\n delete frame.attribs[a];\n return;\n }\n }\n if (a === 'class') {\n const allowedSpecificClasses = allowedClassesMap[name];\n const allowedWildcardClasses = allowedClassesMap['*'];\n const allowedSpecificClassesGlob = allowedClassesGlobMap[name];\n const allowedSpecificClassesRegex = allowedClassesRegexMap[name];\n const allowedWildcardClassesGlob = allowedClassesGlobMap['*'];\n const allowedClassesGlobs = [\n allowedSpecificClassesGlob,\n allowedWildcardClassesGlob\n ]\n .concat(allowedSpecificClassesRegex)\n .filter(function (t) {\n return t;\n });\n if (allowedSpecificClasses && allowedWildcardClasses) {\n value = filterClasses(value, deepmerge(allowedSpecificClasses, allowedWildcardClasses), allowedClassesGlobs);\n } else {\n value = filterClasses(value, allowedSpecificClasses || allowedWildcardClasses, allowedClassesGlobs);\n }\n if (!value.length) {\n delete frame.attribs[a];\n return;\n }\n }\n if (a === 'style') {\n try {\n const abstractSyntaxTree = postcssParse(name + ' {' + value + '}');\n const filteredAST = filterCss(abstractSyntaxTree, options.allowedStyles);\n\n value = stringifyStyleAttributes(filteredAST);\n\n if (value.length === 0) {\n delete frame.attribs[a];\n return;\n }\n } catch (e) {\n delete frame.attribs[a];\n return;\n }\n }\n result += ' ' + a;\n if (value && value.length) {\n result += '=\"' + escapeHtml(value, true) + '\"';\n }\n } else {\n delete frame.attribs[a];\n }\n });\n }\n if (options.selfClosing.indexOf(name) !== -1) {\n result += ' />';\n } else {\n result += '>';\n if (frame.innerText && !hasText && !options.textFilter) {\n result += escapeHtml(frame.innerText);\n addedText = true;\n }\n }\n if (skip) {\n result = tempResult + escapeHtml(result);\n tempResult = '';\n }\n },\n ontext: function(text) {\n if (skipText) {\n return;\n }\n const lastFrame = stack[stack.length - 1];\n let tag;\n\n if (lastFrame) {\n tag = lastFrame.tag;\n // If inner text was set by transform function then let's use it\n text = lastFrame.innerText !== undefined ? lastFrame.innerText : text;\n }\n\n if (options.disallowedTagsMode === 'discard' && ((tag === 'script') || (tag === 'style'))) {\n // htmlparser2 gives us these as-is. Escaping them ruins the content. Allowing\n // script tags is, by definition, game over for XSS protection, so if that's\n // your concern, don't allow them. The same is essentially true for style tags\n // which have their own collection of XSS vectors.\n result += text;\n } else {\n const escaped = escapeHtml(text, false);\n if (options.textFilter && !addedText) {\n result += options.textFilter(escaped, tag);\n } else if (!addedText) {\n result += escaped;\n }\n }\n if (stack.length) {\n const frame = stack[stack.length - 1];\n frame.text += text;\n }\n },\n onclosetag: function(name) {\n\n if (skipText) {\n skipTextDepth--;\n if (!skipTextDepth) {\n skipText = false;\n } else {\n return;\n }\n }\n\n const frame = stack.pop();\n if (!frame) {\n // Do not crash on bad markup\n return;\n }\n\n if (frame.tag !== name) {\n // Another case of bad markup.\n // Push to stack, so that it will be used in future closing tags.\n stack.push(frame);\n return;\n }\n\n skipText = options.enforceHtmlBoundary ? name === 'html' : false;\n depth--;\n const skip = skipMap[depth];\n if (skip) {\n delete skipMap[depth];\n if (options.disallowedTagsMode === 'discard') {\n frame.updateParentNodeText();\n return;\n }\n tempResult = result;\n result = '';\n }\n\n if (transformMap[depth]) {\n name = transformMap[depth];\n delete transformMap[depth];\n }\n\n if (options.exclusiveFilter && options.exclusiveFilter(frame)) {\n result = result.substr(0, frame.tagPosition);\n return;\n }\n\n frame.updateParentNodeMediaChildren();\n frame.updateParentNodeText();\n\n if (options.selfClosing.indexOf(name) !== -1) {\n // Already output />\n if (skip) {\n result = tempResult;\n tempResult = '';\n }\n return;\n }\n\n result += '</' + name + '>';\n if (skip) {\n result = tempResult + escapeHtml(result);\n tempResult = '';\n }\n addedText = false;\n }\n }, options.parser);\n parser.write(html);\n parser.end();\n\n return result;\n\n function initializeState() {\n result = '';\n depth = 0;\n stack = [];\n skipMap = {};\n transformMap = {};\n skipText = false;\n skipTextDepth = 0;\n }\n\n function escapeHtml(s, quote) {\n if (typeof (s) !== 'string') {\n s = s + '';\n }\n if (options.parser.decodeEntities) {\n s = s.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n if (quote) {\n s = s.replace(/\"/g, '&quot;');\n }\n }\n // TODO: this is inadequate because it will pass `&0;`. This approach\n // will not work, each & must be considered with regard to whether it\n // is followed by a 100% syntactically valid entity or not, and escaped\n // if it is not. If this bothers you, don't set parser.decodeEntities\n // to false. (The default is true.)\n s = s.replace(/&(?![a-zA-Z0-9#]{1,20};)/g, '&amp;') // Match ampersands not part of existing HTML entity\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;');\n if (quote) {\n s = s.replace(/\"/g, '&quot;');\n }\n return s;\n }\n\n function naughtyHref(name, href) {\n // Browsers ignore character codes of 32 (space) and below in a surprising\n // number of situations. Start reading here:\n // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet#Embedded_tab\n // eslint-disable-next-line no-control-regex\n href = href.replace(/[\\x00-\\x20]+/g, '');\n // Clobber any comments in URLs, which the browser might\n // interpret inside an XML data island, allowing\n // a javascript: URL to be snuck through\n while (true) {\n const firstIndex = href.indexOf('<!--');\n if (firstIndex === -1) {\n break;\n }\n const lastIndex = href.indexOf('-->', firstIndex + 4);\n if (lastIndex === -1) {\n break;\n }\n href = href.substring(0, firstIndex) + href.substring(lastIndex + 3);\n }\n // Case insensitive so we don't get faked out by JAVASCRIPT #1\n // Allow more characters after the first so we don't get faked\n // out by certain schemes browsers accept\n const matches = href.match(/^([a-zA-Z][a-zA-Z0-9.\\-+]*):/);\n if (!matches) {\n // Protocol-relative URL starting with any combination of '/' and '\\'\n if (href.match(/^[/\\\\]{2}/)) {\n return !options.allowProtocolRelative;\n }\n\n // No scheme\n return false;\n }\n const scheme = matches[1].toLowerCase();\n\n if (has(options.allowedSchemesByTag, name)) {\n return options.allowedSchemesByTag[name].indexOf(scheme) === -1;\n }\n\n return !options.allowedSchemes || options.allowedSchemes.indexOf(scheme) === -1;\n }\n\n function parseUrl(value) {\n value = value.replace(/^(\\w+:)?\\s*[\\\\/]\\s*[\\\\/]/, '$1//');\n if (value.startsWith('relative:')) {\n // An attempt to exploit our workaround for base URLs being\n // mandatory for relative URL validation in the WHATWG\n // URL parser, reject it\n throw new Error('relative: exploit attempt');\n }\n // naughtyHref is in charge of whether protocol relative URLs\n // are cool. Here we are concerned just with allowed hostnames and\n // whether to allow relative URLs.\n //\n // Build a placeholder \"base URL\" against which any reasonable\n // relative URL may be parsed successfully\n let base = 'relative://relative-site';\n for (let i = 0; (i < 100); i++) {\n base += `/${i}`;\n }\n\n const parsed = new URL(value, base);\n\n const isRelativeUrl = parsed && parsed.hostname === 'relative-site' && parsed.protocol === 'relative:';\n return {\n isRelativeUrl,\n url: parsed\n };\n }\n /**\n * Filters user input css properties by allowlisted regex attributes.\n * Modifies the abstractSyntaxTree object.\n *\n * @param {object} abstractSyntaxTree - Object representation of CSS attributes.\n * @property {array[Declaration]} abstractSyntaxTree.nodes[0] - Each object cointains prop and value key, i.e { prop: 'color', value: 'red' }.\n * @param {object} allowedStyles - Keys are properties (i.e color), value is list of permitted regex rules (i.e /green/i).\n * @return {object} - The modified tree.\n */\n function filterCss(abstractSyntaxTree, allowedStyles) {\n if (!allowedStyles) {\n return abstractSyntaxTree;\n }\n\n const astRules = abstractSyntaxTree.nodes[0];\n let selectedRule;\n\n // Merge global and tag-specific styles into new AST.\n if (allowedStyles[astRules.selector] && allowedStyles['*']) {\n selectedRule = deepmerge(\n allowedStyles[astRules.selector],\n allowedStyles['*']\n );\n } else {\n selectedRule = allowedStyles[astRules.selector] || allowedStyles['*'];\n }\n\n if (selectedRule) {\n abstractSyntaxTree.nodes[0].nodes = astRules.nodes.reduce(filterDeclarations(selectedRule), []);\n }\n\n return abstractSyntaxTree;\n }\n\n /**\n * Extracts the style attributes from an AbstractSyntaxTree and formats those\n * values in the inline style attribute format.\n *\n * @param {AbstractSyntaxTree} filteredAST\n * @return {string} - Example: \"color:yellow;text-align:center !important;font-family:helvetica;\"\n */\n function stringifyStyleAttributes(filteredAST) {\n return filteredAST.nodes[0].nodes\n .reduce(function(extractedAttributes, attrObject) {\n extractedAttributes.push(\n `${attrObject.prop}:${attrObject.value}${attrObject.important ? ' !important' : ''}`\n );\n return extractedAttributes;\n }, [])\n .join(';');\n }\n\n /**\n * Filters the existing attributes for the given property. Discards any attributes\n * which don't match the allowlist.\n *\n * @param {object} selectedRule - Example: { color: red, font-family: helvetica }\n * @param {array} allowedDeclarationsList - List of declarations which pass the allowlist.\n * @param {object} attributeObject - Object representing the current css property.\n * @property {string} attributeObject.type - Typically 'declaration'.\n * @property {string} attributeObject.prop - The CSS property, i.e 'color'.\n * @property {string} attributeObject.value - The corresponding value to the css property, i.e 'red'.\n * @return {function} - When used in Array.reduce, will return an array of Declaration objects\n */\n function filterDeclarations(selectedRule) {\n return function (allowedDeclarationsList, attributeObject) {\n // If this property is allowlisted...\n if (has(selectedRule, attributeObject.prop)) {\n const matchesRegex = selectedRule[attributeObject.prop].some(function(regularExpression) {\n return regularExpression.test(attributeObject.value);\n });\n\n if (matchesRegex) {\n allowedDeclarationsList.push(attributeObject);\n }\n }\n return allowedDeclarationsList;\n };\n }\n\n function filterClasses(classes, allowed, allowedGlobs) {\n if (!allowed) {\n // The class attribute is allowed without filtering on this tag\n return classes;\n }\n classes = classes.split(/\\s+/);\n return classes.filter(function(clss) {\n return allowed.indexOf(clss) !== -1 || allowedGlobs.some(function(glob) {\n return glob.test(clss);\n });\n }).join(' ');\n }\n}\n\n// Defaults are accessible to you so that you can use them as a starting point\n// programmatically if you wish\n\nconst htmlParserDefaults = {\n decodeEntities: true\n};\nsanitizeHtml.defaults = {\n allowedTags: [\n // Sections derived from MDN element categories and limited to the more\n // benign categories.\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Element\n // Content sectioning\n 'address', 'article', 'aside', 'footer', 'header',\n 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hgroup',\n 'main', 'nav', 'section',\n // Text content\n 'blockquote', 'dd', 'div', 'dl', 'dt', 'figcaption', 'figure',\n 'hr', 'li', 'main', 'ol', 'p', 'pre', 'ul',\n // Inline text semantics\n 'a', 'abbr', 'b', 'bdi', 'bdo', 'br', 'cite', 'code', 'data', 'dfn',\n 'em', 'i', 'kbd', 'mark', 'q',\n 'rb', 'rp', 'rt', 'rtc', 'ruby',\n 's', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'time', 'u', 'var', 'wbr',\n // Table content\n 'caption', 'col', 'colgroup', 'table', 'tbody', 'td', 'tfoot', 'th',\n 'thead', 'tr'\n ],\n disallowedTagsMode: 'discard',\n allowedAttributes: {\n a: [ 'href', 'name', 'target' ],\n // We don't currently allow img itself by default, but\n // these attributes would make sense if we did.\n img: [ 'src', 'srcset', 'alt', 'title', 'width', 'height', 'loading' ]\n },\n // Lots of these won't come up by default because we don't allow them\n selfClosing: [ 'img', 'br', 'hr', 'area', 'base', 'basefont', 'input', 'link', 'meta' ],\n // URL schemes we permit\n allowedSchemes: [ 'http', 'https', 'ftp', 'mailto', 'tel' ],\n allowedSchemesByTag: {},\n allowedSchemesAppliedToAttributes: [ 'href', 'src', 'cite' ],\n allowProtocolRelative: true,\n enforceHtmlBoundary: false\n};\n\nsanitizeHtml.simpleTransform = function(newTagName, newAttribs, merge) {\n merge = (merge === undefined) ? true : merge;\n newAttribs = newAttribs || {};\n\n return function(tagName, attribs) {\n let attrib;\n if (merge) {\n for (attrib in newAttribs) {\n attribs[attrib] = newAttribs[attrib];\n }\n } else {\n attribs = newAttribs;\n }\n\n return {\n tagName: newTagName,\n attribs: attribs\n };\n };\n};\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, vModelSelect as _vModelSelect, withDirectives as _withDirectives, vModelText as _vModelText, normalizeClass as _normalizeClass, resolveComponent as _resolveComponent, createVNode as _createVNode, createBlock as _createBlock, withModifiers as _withModifiers, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-4657c3ad\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { id: \"workout-form\" }\nconst _hoisted_2 = [\"onSubmit\"]\nconst _hoisted_3 = { class: \"form-items\" }\nconst _hoisted_4 = {\n key: 0,\n class: \"form-item-radio\"\n}\nconst _hoisted_5 = [\"checked\", \"disabled\"]\nconst _hoisted_6 = { for: \"withGpx\" }\nconst _hoisted_7 = [\"checked\", \"disabled\"]\nconst _hoisted_8 = { for: \"withoutGpx\" }\nconst _hoisted_9 = { class: \"form-item\" }\nconst _hoisted_10 = [\"disabled\"]\nconst _hoisted_11 = [\"value\"]\nconst _hoisted_12 = {\n key: 1,\n class: \"form-item\"\n}\nconst _hoisted_13 = { for: \"gpxFile\" }\nconst _hoisted_14 = [\"disabled\"]\nconst _hoisted_15 = { class: \"files-help info-box\" }\nconst _hoisted_16 = {\n key: 2,\n class: \"form-item\"\n}\nconst _hoisted_17 = { for: \"title\" }\nconst _hoisted_18 = [\"required\", \"disabled\"]\nconst _hoisted_19 = { key: 3 }\nconst _hoisted_20 = { class: \"workout-date-duration\" }\nconst _hoisted_21 = { class: \"form-item\" }\nconst _hoisted_22 = { class: \"workout-date-time\" }\nconst _hoisted_23 = [\"disabled\"]\nconst _hoisted_24 = [\"disabled\"]\nconst _hoisted_25 = { class: \"form-item\" }\nconst _hoisted_26 = [\"disabled\"]\nconst _hoisted_27 = [\"disabled\"]\nconst _hoisted_28 = [\"disabled\"]\nconst _hoisted_29 = { class: \"form-item\" }\nconst _hoisted_30 = [\"disabled\"]\nconst _hoisted_31 = { class: \"form-item\" }\nconst _hoisted_32 = { key: 1 }\nconst _hoisted_33 = {\n key: 2,\n class: \"form-buttons\"\n}\nconst _hoisted_34 = [\"disabled\"]\nconst _hoisted_35 = [\"onClick\"]\n\nimport {\n ComputedRef,\n Ref,\n computed,\n reactive,\n ref,\n toRefs,\n watch,\n onMounted,\n onUnmounted,\n withDefaults,\n } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { useRouter } from 'vue-router'\n\n import { ROOT_STORE, WORKOUTS_STORE } from '@/store/constants'\n import { TAppConfig } from '@/types/application'\n import { ISport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import { IWorkout, IWorkoutForm } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { formatWorkoutDate, getDateWithTZ } from '@/utils/dates'\n import { getReadableFileSize } from '@/utils/files'\n import { translateSports } from '@/utils/sports'\n import { convertDistance } from '@/utils/units'\n\n interface Props {\n authUser: IAuthUserProfile\n sports: ISport[]\n isCreation?: boolean\n loading?: boolean\n workout?: IWorkout\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutEdition',\n props: {\n authUser: null,\n sports: null,\n isCreation: { type: Boolean, default: false },\n loading: { type: Boolean, default: false },\n workout: { default: () => ({} as IWorkout) }\n },\n setup(__props: any) {\n\nconst props = __props as { authUser: IAuthUserProfile, sports: ISport[], isCreation: boolean, loading: boolean, workout: IWorkout };\n\n \n\n const { t } = useI18n()\n const store = useStore()\n const router = useRouter()\n\n const { authUser, workout, isCreation, loading } = toRefs(props)\n const translatedSports: ComputedRef<ISport[]> = computed(() =>\n translateSports(\n props.sports,\n t,\n 'is_active_for_user',\n workout.value.id ? [workout.value.sport_id] : []\n )\n )\n const appConfig: ComputedRef<TAppConfig> = computed(\n () => store.getters[ROOT_STORE.GETTERS.APP_CONFIG]\n )\n const fileSizeLimit = appConfig.value.max_single_file_size\n ? getReadableFileSize(appConfig.value.max_single_file_size)\n : ''\n const gpx_limit_import = appConfig.value.gpx_limit_import\n const zipSizeLimit = appConfig.value.max_zip_file_size\n ? getReadableFileSize(appConfig.value.max_zip_file_size)\n : ''\n const errorMessages: ComputedRef<string | string[] | null> = computed(\n () => store.getters[ROOT_STORE.GETTERS.ERROR_MESSAGES]\n )\n const workoutForm = reactive({\n sport_id: '',\n title: '',\n notes: '',\n workoutDate: '',\n workoutTime: '',\n workoutDurationHour: '',\n workoutDurationMinutes: '',\n workoutDurationSeconds: '',\n workoutDistance: '',\n })\n const withGpx = ref(\n props.workout.id ? props.workout.with_gpx : props.isCreation\n )\n let gpxFile: File | null = null\n const formErrors = ref(false)\n const payloadErrorMessages: Ref<string[]> = ref([])\n\n onMounted(() => {\n if (props.workout.id) {\n formatWorkoutForm(props.workout)\n }\n })\n\n function updateNotes(value: string) {\n workoutForm.notes = value\n }\n function updateWithGpx() {\n withGpx.value = !withGpx.value\n formErrors.value = false\n }\n function updateFile(event: Event & { target: HTMLInputElement }) {\n if (event.target.files) {\n gpxFile = event.target.files[0]\n }\n }\n function formatWorkoutForm(workout: IWorkout) {\n workoutForm.sport_id = `${workout.sport_id}`\n workoutForm.title = workout.title\n workoutForm.notes = workout.notes\n if (!workout.with_gpx) {\n const workoutDateTime = formatWorkoutDate(\n getDateWithTZ(workout.workout_date, props.authUser.timezone),\n 'yyyy-MM-dd'\n )\n const duration = workout.duration.split(':')\n workoutForm.workoutDistance = `${\n authUser.value.imperial_units\n ? convertDistance(workout.distance, 'km', 'mi', 2)\n : parseFloat(workout.distance.toFixed(2))\n }`\n workoutForm.workoutDate = workoutDateTime.workout_date\n workoutForm.workoutTime = workoutDateTime.workout_time\n workoutForm.workoutDurationHour = duration[0]\n workoutForm.workoutDurationMinutes = duration[1]\n workoutForm.workoutDurationSeconds = duration[2]\n }\n }\n function isDistanceInvalid() {\n return payloadErrorMessages.value.includes('workouts.INVALID_DISTANCE')\n }\n function isDurationInvalid() {\n return payloadErrorMessages.value.includes('workouts.INVALID_DURATION')\n }\n function formatPayload(payload: IWorkoutForm) {\n payloadErrorMessages.value = []\n payload.title = workoutForm.title\n payload.duration =\n +workoutForm.workoutDurationHour * 3600 +\n +workoutForm.workoutDurationMinutes * 60 +\n +workoutForm.workoutDurationSeconds\n if (payload.duration <= 0) {\n payloadErrorMessages.value.push('workouts.INVALID_DURATION')\n }\n payload.distance = authUser.value.imperial_units\n ? convertDistance(+workoutForm.workoutDistance, 'mi', 'km', 3)\n : +workoutForm.workoutDistance\n if (payload.distance <= 0) {\n payloadErrorMessages.value.push('workouts.INVALID_DISTANCE')\n }\n payload.workout_date = `${workoutForm.workoutDate} ${workoutForm.workoutTime}`\n }\n function updateWorkout() {\n const payload: IWorkoutForm = {\n sport_id: +workoutForm.sport_id,\n notes: workoutForm.notes,\n }\n if (props.workout.id) {\n if (props.workout.with_gpx) {\n payload.title = workoutForm.title\n } else {\n formatPayload(payload)\n }\n store.dispatch(WORKOUTS_STORE.ACTIONS.EDIT_WORKOUT, {\n workoutId: props.workout.id,\n data: payload,\n })\n } else {\n if (withGpx.value) {\n if (!gpxFile) {\n const errorMessage = 'workouts.NO_FILE_PROVIDED'\n store.commit(ROOT_STORE.MUTATIONS.SET_ERROR_MESSAGES, errorMessage)\n return\n }\n payload.file = gpxFile\n store.dispatch(WORKOUTS_STORE.ACTIONS.ADD_WORKOUT, payload)\n } else {\n formatPayload(payload)\n if (payloadErrorMessages.value.length > 0) {\n store.commit(\n ROOT_STORE.MUTATIONS.SET_ERROR_MESSAGES,\n payloadErrorMessages.value\n )\n } else {\n store.dispatch(\n WORKOUTS_STORE.ACTIONS.ADD_WORKOUT_WITHOUT_GPX,\n payload\n )\n }\n }\n }\n }\n function onCancel() {\n if (props.workout.id) {\n router.push({\n name: 'Workout',\n params: { workoutId: props.workout.id },\n })\n } else {\n router.go(-1)\n }\n }\n function invalidateForm() {\n formErrors.value = true\n }\n\n onUnmounted(() => store.commit(ROOT_STORE.MUTATIONS.EMPTY_ERROR_MESSAGES))\n\n watch(\n () => props.workout,\n async (\n newWorkout: IWorkout | undefined,\n previousWorkout: IWorkout | undefined\n ) => {\n if (newWorkout !== previousWorkout && newWorkout && newWorkout.id) {\n formatWorkoutForm(newWorkout)\n }\n }\n )\n\nreturn (_ctx: any,_cache: any) => {\n const _component_CustomTextArea = _resolveComponent(\"CustomTextArea\")!\n const _component_ErrorMessage = _resolveComponent(\"ErrorMessage\")!\n const _component_Loader = _resolveComponent(\"Loader\")!\n const _component_Card = _resolveComponent(\"Card\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n id: \"workout-edition\",\n class: _normalizeClass([\"center-card with-margin\", { 'center-form': _unref(workout) && _unref(workout).with_gpx }])\n }, [\n _createVNode(_component_Card, null, {\n title: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t(`workouts.${_unref(isCreation) ? 'ADD' : 'EDIT'}_WORKOUT`)), 1)\n ]),\n content: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"form\", {\n class: _normalizeClass({ errors: formErrors.value }),\n onSubmit: _withModifiers(updateWorkout, [\"prevent\"])\n }, [\n _createElementVNode(\"div\", _hoisted_3, [\n (_unref(isCreation))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"input\", {\n id: \"withGpx\",\n type: \"radio\",\n checked: withGpx.value,\n disabled: _unref(loading),\n onClick: updateWithGpx\n }, null, 8, _hoisted_5),\n _createElementVNode(\"label\", _hoisted_6, _toDisplayString(_ctx.$t('workouts.WITH_GPX')), 1)\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"input\", {\n id: \"withoutGpx\",\n type: \"radio\",\n checked: !withGpx.value,\n disabled: _unref(loading),\n onClick: updateWithGpx\n }, null, 8, _hoisted_7),\n _createElementVNode(\"label\", _hoisted_8, _toDisplayString(_ctx.$t('workouts.WITHOUT_GPX')), 1)\n ])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_9, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.SPORT', 1)) + \": \", 1),\n _withDirectives(_createElementVNode(\"select\", {\n id: \"sport\",\n required: \"\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((workoutForm.sport_id) = $event))\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(translatedSports), (sport) => {\n return (_openBlock(), _createElementBlock(\"option\", {\n value: sport.id,\n key: sport.id\n }, _toDisplayString(sport.translatedLabel), 9, _hoisted_11))\n }), 128))\n ], 40, _hoisted_10), [\n [_vModelSelect, workoutForm.sport_id]\n ])\n ]),\n (_unref(isCreation) && withGpx.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_12, [\n _createElementVNode(\"label\", _hoisted_13, _toDisplayString(_ctx.$t('workouts.GPX_FILE')) + \" \" + _toDisplayString(_ctx.$t('workouts.ZIP_ARCHIVE_DESCRIPTION')) + \": \", 1),\n _createElementVNode(\"input\", {\n id: \"gpxFile\",\n name: \"gpxFile\",\n type: \"file\",\n accept: \".gpx, .zip\",\n disabled: _unref(loading),\n required: \"\",\n onInvalid: invalidateForm,\n onInput: updateFile\n }, null, 40, _hoisted_14),\n _createElementVNode(\"div\", _hoisted_15, [\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"strong\", null, _toDisplayString(_ctx.$t('workouts.GPX_FILE')) + \":\", 1),\n _createElementVNode(\"ul\", null, [\n _createElementVNode(\"li\", null, _toDisplayString(_ctx.$t('workouts.MAX_SIZE')) + \": \" + _toDisplayString(_unref(fileSizeLimit)), 1)\n ])\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"strong\", null, _toDisplayString(_ctx.$t('workouts.ZIP_ARCHIVE')) + \":\", 1),\n _createElementVNode(\"ul\", null, [\n _createElementVNode(\"li\", null, _toDisplayString(_ctx.$t('workouts.NO_FOLDER')), 1),\n _createElementVNode(\"li\", null, _toDisplayString(_ctx.$t('workouts.MAX_FILES')) + \": \" + _toDisplayString(_unref(gpx_limit_import)), 1),\n _createElementVNode(\"li\", null, _toDisplayString(_ctx.$t('workouts.MAX_SIZE')) + \": \" + _toDisplayString(_unref(zipSizeLimit)), 1)\n ])\n ])\n ])\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_16, [\n _createElementVNode(\"label\", _hoisted_17, _toDisplayString(_ctx.$t('workouts.TITLE')) + \": \", 1),\n _withDirectives(_createElementVNode(\"input\", {\n id: \"title\",\n name: \"title\",\n type: \"text\",\n required: !_unref(isCreation),\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => ((workoutForm.title) = $event))\n }, null, 40, _hoisted_18), [\n [_vModelText, workoutForm.title]\n ])\n ])),\n (!withGpx.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_19, [\n _createElementVNode(\"div\", _hoisted_20, [\n _createElementVNode(\"div\", _hoisted_21, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.WORKOUT_DATE')) + \":\", 1),\n _createElementVNode(\"div\", _hoisted_22, [\n _withDirectives(_createElementVNode(\"input\", {\n id: \"workout-date\",\n name: \"workout-date\",\n type: \"date\",\n required: \"\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event: any) => ((workoutForm.workoutDate) = $event))\n }, null, 40, _hoisted_23), [\n [_vModelText, workoutForm.workoutDate]\n ]),\n _withDirectives(_createElementVNode(\"input\", {\n id: \"workout-time\",\n name: \"workout-time\",\n class: \"workout-time\",\n type: \"time\",\n required: \"\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = ($event: any) => ((workoutForm.workoutTime) = $event))\n }, null, 40, _hoisted_24), [\n [_vModelText, workoutForm.workoutTime]\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_25, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.DURATION')) + \":\", 1),\n _createElementVNode(\"div\", null, [\n _withDirectives(_createElementVNode(\"input\", {\n id: \"workout-duration-hour\",\n name: \"workout-duration-hour\",\n class: _normalizeClass([\"workout-duration\", { errored: isDurationInvalid() }]),\n type: \"text\",\n placeholder: \"HH\",\n minlength: \"1\",\n maxlength: \"2\",\n pattern: \"^([0-1]?[0-9]|2[0-3])$\",\n required: \"\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => ((workoutForm.workoutDurationHour) = $event))\n }, null, 42, _hoisted_26), [\n [_vModelText, workoutForm.workoutDurationHour]\n ]),\n _createTextVNode(\" : \"),\n _withDirectives(_createElementVNode(\"input\", {\n id: \"workout-duration-minutes\",\n name: \"workout-duration-minutes\",\n class: _normalizeClass([\"workout-duration\", { errored: isDurationInvalid() }]),\n type: \"text\",\n pattern: \"^([0-5][0-9])$\",\n minlength: \"2\",\n maxlength: \"2\",\n placeholder: \"MM\",\n required: \"\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[5] || (_cache[5] = ($event: any) => ((workoutForm.workoutDurationMinutes) = $event))\n }, null, 42, _hoisted_27), [\n [_vModelText, workoutForm.workoutDurationMinutes]\n ]),\n _createTextVNode(\" : \"),\n _withDirectives(_createElementVNode(\"input\", {\n id: \"workout-duration-seconds\",\n name: \"workout-duration-seconds\",\n class: _normalizeClass([\"workout-duration\", { errored: isDurationInvalid() }]),\n type: \"text\",\n pattern: \"^([0-5][0-9])$\",\n minlength: \"2\",\n maxlength: \"2\",\n placeholder: \"SS\",\n required: \"\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[6] || (_cache[6] = ($event: any) => ((workoutForm.workoutDurationSeconds) = $event))\n }, null, 42, _hoisted_28), [\n [_vModelText, workoutForm.workoutDurationSeconds]\n ])\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_29, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.DISTANCE')) + \" (\" + _toDisplayString(_unref(authUser).imperial_units ? 'mi' : 'km') + \"): \", 1),\n _withDirectives(_createElementVNode(\"input\", {\n class: _normalizeClass({ errored: isDistanceInvalid() }),\n name: \"workout-distance\",\n type: \"number\",\n min: \"0\",\n step: \"0.001\",\n required: \"\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[7] || (_cache[7] = ($event: any) => ((workoutForm.workoutDistance) = $event))\n }, null, 42, _hoisted_30), [\n [_vModelText, workoutForm.workoutDistance]\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_31, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.NOTES')) + \": \", 1),\n _createVNode(_component_CustomTextArea, {\n name: \"notes\",\n input: workoutForm.notes,\n disabled: _unref(loading),\n onUpdateValue: updateNotes\n }, null, 8, [\"input\", \"disabled\"])\n ])\n ]),\n (_unref(errorMessages))\n ? (_openBlock(), _createBlock(_component_ErrorMessage, {\n key: 0,\n message: _unref(errorMessages)\n }, null, 8, [\"message\"]))\n : _createCommentVNode(\"\", true),\n (_unref(loading))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_32, [\n _createVNode(_component_Loader)\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_33, [\n _createElementVNode(\"button\", {\n class: \"confirm\",\n type: \"submit\",\n disabled: _unref(loading)\n }, _toDisplayString(_ctx.$t('buttons.SUBMIT')), 9, _hoisted_34),\n _createElementVNode(\"button\", {\n class: \"cancel\",\n onClick: _withModifiers(onCancel, [\"prevent\"])\n }, _toDisplayString(_ctx.$t('buttons.CANCEL')), 9, _hoisted_35)\n ]))\n ], 42, _hoisted_2)\n ])\n ]),\n _: 1\n })\n ], 2))\n}\n}\n\n})","import script from \"./WorkoutEdition.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutEdition.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutEdition.vue?vue&type=style&index=0&id=4657c3ad&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-4657c3ad\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n id: \"add-workout\",\n class: \"view\"\n}\nconst _hoisted_2 = { class: \"container\" }\n\nimport { ComputedRef, computed } from 'vue'\n\n import WorkoutEdition from '@/components/Workout/WorkoutEdition.vue'\n import {\n AUTH_USER_STORE,\n SPORTS_STORE,\n WORKOUTS_STORE,\n } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import { IWorkoutData } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'AddWorkout',\n setup(__props) {\n\n const store = useStore()\n\n const sports: ComputedRef<ISport[]> = computed(\n () => store.getters[SPORTS_STORE.GETTERS.SPORTS]\n )\n const authUser: ComputedRef<IAuthUserProfile> = computed(\n () => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]\n )\n const workoutData: ComputedRef<IWorkoutData> = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.WORKOUT_DATA]\n )\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(WorkoutEdition, {\n authUser: _unref(authUser),\n sports: _unref(sports),\n isCreation: true,\n loading: _unref(workoutData).loading\n }, null, 8, [\"authUser\", \"sports\", \"loading\"])\n ])\n ]))\n}\n}\n\n})","import script from \"./AddWorkout.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./AddWorkout.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n id: \"edit-workout\",\n class: \"view\"\n}\nconst _hoisted_2 = { class: \"container\" }\n\nimport { computed, watch, onBeforeMount, ComputedRef } from 'vue'\n import { useRoute } from 'vue-router'\n\n import WorkoutEdition from '@/components/Workout/WorkoutEdition.vue'\n import {\n AUTH_USER_STORE,\n SPORTS_STORE,\n WORKOUTS_STORE,\n } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import { IWorkoutData } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'EditWorkout',\n setup(__props) {\n\n const route = useRoute()\n const store = useStore()\n\n const authUser: ComputedRef<IAuthUserProfile> = computed(\n () => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]\n )\n const sports: ComputedRef<ISport[]> = computed(\n () => store.getters[SPORTS_STORE.GETTERS.SPORTS]\n )\n const workoutData: ComputedRef<IWorkoutData> = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.WORKOUT_DATA]\n )\n\n onBeforeMount(() => {\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_WORKOUT_DATA, {\n workoutId: route.params.workoutId,\n })\n })\n\n watch(\n () => route.params.workoutId,\n async (newWorkoutId) => {\n if (!newWorkoutId) {\n store.commit(WORKOUTS_STORE.MUTATIONS.EMPTY_WORKOUT)\n }\n }\n )\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_unref(workoutData).workout.id)\n ? (_openBlock(), _createBlock(WorkoutEdition, {\n key: 0,\n authUser: _unref(authUser),\n sports: _unref(sports),\n workout: _unref(workoutData).workout,\n loading: _unref(workoutData).loading\n }, null, 8, [\"authUser\", \"sports\", \"workout\", \"loading\"]))\n : _createCommentVNode(\"\", true)\n ])\n ]))\n}\n}\n\n})","import script from \"./EditWorkout.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./EditWorkout.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, resolveComponent as _resolveComponent, createVNode as _createVNode, toDisplayString as _toDisplayString, withModifiers as _withModifiers, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-4d9f9a8a\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { id: \"workout-card-title\" }\nconst _hoisted_2 = [\"title\"]\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-chevron-left\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_4 = [\n _hoisted_3\n]\nconst _hoisted_5 = { class: \"workout-card-title\" }\nconst _hoisted_6 = { class: \"workout-title-date\" }\nconst _hoisted_7 = {\n key: 0,\n class: \"workout-title\"\n}\nconst _hoisted_8 = {\n key: 1,\n class: \"workout-title\"\n}\nconst _hoisted_9 = { class: \"workout-segment\" }\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-map-marker\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_11 = { class: \"workout-date\" }\nconst _hoisted_12 = { class: \"workout-link\" }\nconst _hoisted_13 = [\"title\"]\nconst _hoisted_14 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-chevron-right\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_15 = [\n _hoisted_14\n]\n\nimport { toRefs } from 'vue'\n\n import authApi from '@/api/authApi'\n import { ISport } from '@/types/sports'\n import { IWorkoutObject } from '@/types/workouts'\n\n interface Props {\n sport: ISport\n workoutObject: IWorkoutObject\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutCardTitle',\n props: {\n sport: null,\n workoutObject: null\n },\n emits: ['displayModal'],\n setup(__props: any, { emit }) {\n\nconst props = __props as {\n sport: ISport\n workoutObject: IWorkoutObject\n };\n\n \n\n \n\n const { sport, workoutObject } = toRefs(props)\n\n async function downloadGpx(workoutId: string) {\n await authApi\n .get(`workouts/${workoutId}/gpx/download`, {\n responseType: 'blob',\n })\n .then((response) => {\n const gpxFileUrl = window.URL.createObjectURL(\n new Blob([response.data], { type: 'application/gpx+xml' })\n )\n const gpxLink = document.createElement('a')\n gpxLink.href = gpxFileUrl\n gpxLink.setAttribute('download', `${workoutId}.gpx`)\n document.body.appendChild(gpxLink)\n gpxLink.click()\n })\n }\n\nreturn (_ctx: any,_cache: any) => {\n const _component_SportImage = _resolveComponent(\"SportImage\")!\n const _component_router_link = _resolveComponent(\"router-link\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"workout-previous workout-arrow\", { inactive: !_unref(workoutObject).previousUrl }]),\n title: \n _unref(workoutObject).previousUrl\n ? _ctx.$t(`workouts.PREVIOUS_${_unref(workoutObject).type}`)\n : _ctx.$t(`workouts.NO_PREVIOUS_${_unref(workoutObject).type}`)\n ,\n onClick: _cache[0] || (_cache[0] = ($event: any) => (\n _unref(workoutObject).previousUrl\n ? _ctx.$router.push(_unref(workoutObject).previousUrl)\n : null\n ))\n }, _hoisted_4, 10, _hoisted_2),\n _createElementVNode(\"div\", _hoisted_5, [\n _createVNode(_component_SportImage, {\n \"sport-label\": _unref(sport).label,\n color: _unref(sport).color\n }, null, 8, [\"sport-label\", \"color\"]),\n _createElementVNode(\"div\", _hoisted_6, [\n (_unref(workoutObject).type === 'WORKOUT')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_7, [\n _createElementVNode(\"span\", null, _toDisplayString(_unref(workoutObject).title), 1),\n _createElementVNode(\"i\", {\n class: \"fa fa-edit\",\n \"aria-hidden\": \"true\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (\n _ctx.$router.push({\n name: 'EditWorkout',\n params: { workoutId: _unref(workoutObject).workoutId },\n })\n ))\n }),\n (_unref(workoutObject).with_gpx)\n ? (_openBlock(), _createElementBlock(\"i\", {\n key: 0,\n class: \"fa fa-download\",\n \"aria-hidden\": \"true\",\n onClick: _cache[2] || (_cache[2] = _withModifiers(($event: any) => (downloadGpx(_unref(workoutObject).workoutId)), [\"prevent\"]))\n }))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"i\", {\n class: \"fa fa-trash\",\n \"aria-hidden\": \"true\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (emit('displayModal', true)))\n })\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_8, [\n _createTextVNode(_toDisplayString(_unref(workoutObject).title) + \" \", 1),\n _createElementVNode(\"span\", _hoisted_9, [\n _createTextVNode(\" — \"),\n _hoisted_10,\n _createTextVNode(\" \" + _toDisplayString(_ctx.$t('workouts.SEGMENT')) + \" \" + _toDisplayString(_unref(workoutObject).segmentId + 1), 1)\n ])\n ])),\n _createElementVNode(\"div\", _hoisted_11, [\n _createTextVNode(_toDisplayString(_unref(workoutObject).workoutDate) + \" - \" + _toDisplayString(_unref(workoutObject).workoutTime) + \" \", 1),\n _createElementVNode(\"span\", _hoisted_12, [\n (_unref(workoutObject).type === 'SEGMENT')\n ? (_openBlock(), _createBlock(_component_router_link, {\n key: 0,\n to: {\n name: 'Workout',\n params: { workoutId: _unref(workoutObject).workoutId },\n }\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" > \" + _toDisplayString(_ctx.$t('workouts.BACK_TO_WORKOUT')), 1)\n ]),\n _: 1\n }, 8, [\"to\"]))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ])\n ]),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"workout-next workout-arrow\", { inactive: !_unref(workoutObject).nextUrl }]),\n title: \n _unref(workoutObject).nextUrl\n ? _ctx.$t(`workouts.NEXT_${_unref(workoutObject).type}`)\n : _ctx.$t(`workouts.NO_NEXT_${_unref(workoutObject).type}`)\n ,\n onClick: _cache[4] || (_cache[4] = ($event: any) => (\n _unref(workoutObject).nextUrl ? _ctx.$router.push(_unref(workoutObject).nextUrl) : null\n ))\n }, _hoisted_15, 10, _hoisted_13)\n ]))\n}\n}\n\n})","import script from \"./WorkoutCardTitle.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutCardTitle.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutCardTitle.vue?vue&type=style&index=0&id=4d9f9a8a&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-4d9f9a8a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-1a5282f6\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"workout-record\"\n}\nconst _hoisted_2 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"sup\", null, [\n /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-trophy\",\n \"aria-hidden\": \"true\"\n })\n], -1))\nconst _hoisted_3 = [\n _hoisted_2\n]\n\nimport { toRefs } from 'vue'\n\n import { IWorkoutObject } from '@/types/workouts'\n\n interface Props {\n recordType: string\n workoutObject: IWorkoutObject\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutRecord',\n props: {\n recordType: null,\n workoutObject: null\n },\n setup(__props: any) {\n\nconst props = __props as {\n recordType: string\n workoutObject: IWorkoutObject\n };\n\n \n\n const { recordType, workoutObject } = toRefs(props)\n\nreturn (_ctx: any,_cache: any) => {\n return (\n _unref(workoutObject).records &&\n _unref(workoutObject).records.find((record) => record.record_type === _unref(recordType))\n )\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, _hoisted_3))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./WorkoutRecord.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutRecord.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutRecord.vue?vue&type=style&index=0&id=1a5282f6&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-1a5282f6\"]])\n\nexport default __exports__","const directions = [\n 'N',\n 'NNE',\n 'NE',\n 'ENE',\n 'E',\n 'ESE',\n 'SE',\n 'SSE',\n 'S',\n 'SSW',\n 'SW',\n 'WSW',\n 'W',\n 'WNW',\n 'NW',\n 'NNW',\n]\n\nexport const convertDegreeToDirection = (angle: number): string => {\n const value = Math.floor(angle / 22.5 + 0.5)\n return directions[value % 16]\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveComponent as _resolveComponent, createVNode as _createVNode, toDisplayString as _toDisplayString, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-46a7c31c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"wind\" }\nconst _hoisted_2 = { class: \"wind-bearing\" }\nconst _hoisted_3 = [\"title\"]\n\nimport { toRefs } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import { IWeather } from '@/types/workouts'\n import { convertDegreeToDirection } from '@/utils/weather'\n\n interface Props {\n weather: IWeather\n useImperialUnits: boolean\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WeatherWind',\n props: {\n weather: null,\n useImperialUnits: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props as {\n weather: IWeather\n useImperialUnits: boolean\n };\n\n \n\n const { useImperialUnits, weather } = toRefs(props)\n const { t } = useI18n()\n\n function getWindDirectionTitle(windBearing: number): string {\n return t(\n `workouts.WEATHER.WIND_DIRECTIONS.${convertDegreeToDirection(\n windBearing\n )}`\n )\n }\n\nreturn (_ctx: any,_cache: any) => {\n const _component_Distance = _resolveComponent(\"Distance\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(_component_Distance, {\n distance: _unref(weather).wind,\n unitFrom: \"m\",\n digits: 1,\n displayUnit: false,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"]),\n _createTextVNode(\" \" + _toDisplayString(_unref(useImperialUnits) ? 'ft' : 'm') + \"/s \", 1),\n _createElementVNode(\"div\", _hoisted_2, [\n (_unref(weather).windBearing)\n ? (_openBlock(), _createElementBlock(\"i\", {\n key: 0,\n class: \"fa fa-long-arrow-down\",\n style: _normalizeStyle({\n transform: `rotate(${_unref(weather).windBearing}deg)`,\n }),\n \"aria-hidden\": \"true\",\n title: getWindDirectionTitle(_unref(weather).windBearing)\n }, null, 12, _hoisted_3))\n : _createCommentVNode(\"\", true)\n ])\n ]))\n}\n}\n\n})","import script from \"./WeatherWind.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WeatherWind.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WeatherWind.vue?vue&type=style&index=0&id=46a7c31c&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-46a7c31c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-76e9ab62\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n id: \"workout-weather\"\n}\nconst _hoisted_2 = { class: \"weather-table\" }\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"th\", null, null, -1))\nconst _hoisted_4 = { class: \"weather-th\" }\nconst _hoisted_5 = [\"src\", \"alt\", \"title\"]\nconst _hoisted_6 = { class: \"weather-th\" }\nconst _hoisted_7 = [\"src\", \"alt\", \"title\"]\nconst _hoisted_8 = [\"alt\", \"title\"]\nconst _hoisted_9 = [\"alt\", \"title\"]\nconst _hoisted_10 = [\"alt\", \"title\"]\n\nimport { toRefs } from 'vue'\n\n import WeatherWind from '@/components/Workout/WorkoutDetail/WeatherWind.vue'\n import { IWorkoutObject } from '@/types/workouts'\n\n interface Props {\n workoutObject: IWorkoutObject\n useImperialUnits: boolean\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutWeather',\n props: {\n workoutObject: null,\n useImperialUnits: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props as {\n workoutObject: IWorkoutObject\n useImperialUnits: boolean\n };\n\n \n\n const { useImperialUnits, workoutObject } = toRefs(props)\n\nreturn (_ctx: any,_cache: any) => {\n return (_unref(workoutObject).weatherStart && _unref(workoutObject).weatherEnd)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"table\", _hoisted_2, [\n _createElementVNode(\"thead\", null, [\n _createElementVNode(\"tr\", null, [\n _hoisted_3,\n _createElementVNode(\"th\", null, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createTextVNode(_toDisplayString(_ctx.$t('workouts.START')) + \" \", 1),\n _createElementVNode(\"img\", {\n class: \"weather-img\",\n src: `/img/weather/${_unref(workoutObject).weatherStart.icon}.svg`,\n alt: \n _ctx.$t(\n `workouts.WEATHER.DARK_SKY.${_unref(workoutObject).weatherStart.icon}`\n )\n ,\n title: \n _ctx.$t(\n `workouts.WEATHER.DARK_SKY.${_unref(workoutObject).weatherStart.icon}`\n )\n \n }, null, 8, _hoisted_5)\n ])\n ]),\n _createElementVNode(\"th\", null, [\n _createElementVNode(\"div\", _hoisted_6, [\n _createTextVNode(_toDisplayString(_ctx.$t('workouts.END')) + \" \", 1),\n _createElementVNode(\"img\", {\n class: \"weather-img\",\n src: `/img/weather/${_unref(workoutObject).weatherEnd.icon}.svg`,\n alt: \n _ctx.$t(\n `workouts.WEATHER.DARK_SKY.${_unref(workoutObject).weatherEnd.icon}`\n )\n ,\n title: \n _ctx.$t(\n `workouts.WEATHER.DARK_SKY.${_unref(workoutObject).weatherEnd.icon}`\n )\n \n }, null, 8, _hoisted_7)\n ])\n ])\n ])\n ]),\n _createElementVNode(\"tbody\", null, [\n _createElementVNode(\"tr\", null, [\n _createElementVNode(\"td\", null, [\n _createElementVNode(\"img\", {\n class: \"weather-img weather-img-small\",\n src: \"/img/weather/temperature.svg\",\n alt: _ctx.$t(`workouts.WEATHER.TEMPERATURE`),\n title: _ctx.$t(`workouts.WEATHER.TEMPERATURE`)\n }, null, 8, _hoisted_8)\n ]),\n _createElementVNode(\"td\", null, _toDisplayString(Number(_unref(workoutObject).weatherStart.temperature).toFixed(1)) + \"°C \", 1),\n _createElementVNode(\"td\", null, _toDisplayString(Number(_unref(workoutObject).weatherEnd.temperature).toFixed(1)) + \"°C \", 1)\n ]),\n _createElementVNode(\"tr\", null, [\n _createElementVNode(\"td\", null, [\n _createElementVNode(\"img\", {\n class: \"weather-img weather-img-small\",\n src: \"/img/weather/pour-rain.svg\",\n alt: _ctx.$t(`workouts.WEATHER.HUMIDITY`),\n title: _ctx.$t(`workouts.WEATHER.HUMIDITY`)\n }, null, 8, _hoisted_9)\n ]),\n _createElementVNode(\"td\", null, _toDisplayString(Number(_unref(workoutObject).weatherStart.humidity * 100).toFixed(1)) + \"% \", 1),\n _createElementVNode(\"td\", null, _toDisplayString(Number(_unref(workoutObject).weatherEnd.humidity * 100).toFixed(1)) + \"% \", 1)\n ]),\n _createElementVNode(\"tr\", null, [\n _createElementVNode(\"td\", null, [\n _createElementVNode(\"img\", {\n class: \"weather-img weather-img-small\",\n src: \"/img/weather/breeze.svg\",\n alt: _ctx.$t(`workouts.WEATHER.WIND`),\n title: _ctx.$t(`workouts.WEATHER.WIND`)\n }, null, 8, _hoisted_10)\n ]),\n _createElementVNode(\"td\", null, [\n _createVNode(WeatherWind, {\n weather: _unref(workoutObject).weatherStart,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"weather\", \"useImperialUnits\"])\n ]),\n _createElementVNode(\"td\", null, [\n _createVNode(WeatherWind, {\n weather: _unref(workoutObject).weatherEnd,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"weather\", \"useImperialUnits\"])\n ])\n ])\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./WorkoutWeather.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutWeather.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutWeather.vue?vue&type=style&index=0&id=76e9ab62&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-76e9ab62\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, unref as _unref, createVNode as _createVNode, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-74c5993b\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { id: \"workout-info\" }\nconst _hoisted_2 = { class: \"workout-data\" }\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-clock-o\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_4 = { class: \"label\" }\nconst _hoisted_5 = { class: \"value\" }\nconst _hoisted_6 = { key: 0 }\nconst _hoisted_7 = { class: \"value\" }\nconst _hoisted_8 = { class: \"value\" }\nconst _hoisted_9 = { class: \"workout-data\" }\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-road\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_11 = { class: \"label\" }\nconst _hoisted_12 = { class: \"workout-data\" }\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-tachometer\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_14 = { class: \"label\" }\nconst _hoisted_15 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_16 = { class: \"label\" }\nconst _hoisted_17 = {\n key: 0,\n class: \"workout-data\"\n}\nconst _hoisted_18 = [\"alt\"]\nconst _hoisted_19 = { class: \"label\" }\nconst _hoisted_20 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_21 = { class: \"label\" }\nconst _hoisted_22 = {\n key: 1,\n class: \"workout-data\"\n}\nconst _hoisted_23 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-location-arrow\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_24 = { class: \"label\" }\nconst _hoisted_25 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_26 = { class: \"label\" }\n\nimport { computed, toRefs } from 'vue'\n\n import WorkoutRecord from '@/components/Workout/WorkoutDetail/WorkoutRecord.vue'\n import WorkoutWeather from '@/components/Workout/WorkoutDetail/WorkoutWeather.vue'\n import { IWorkoutObject } from '@/types/workouts'\n\n interface Props {\n workoutObject: IWorkoutObject\n useImperialUnits: boolean\n displayHARecord: boolean\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutData',\n props: {\n workoutObject: null,\n useImperialUnits: { type: Boolean },\n displayHARecord: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props as {\n workoutObject: IWorkoutObject\n useImperialUnits: boolean\n displayHARecord: boolean\n };\n\n \n\n const { displayHARecord, workoutObject, useImperialUnits } = toRefs(props)\n const withPause = computed(\n () =>\n props.workoutObject.pauses !== '0:00:00' &&\n props.workoutObject.pauses !== null\n )\n\nreturn (_ctx: any,_cache: any) => {\n const _component_Distance = _resolveComponent(\"Distance\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _hoisted_3,\n _createElementVNode(\"span\", _hoisted_4, _toDisplayString(_ctx.$t('workouts.DURATION')), 1),\n _createTextVNode(\": \"),\n _createElementVNode(\"span\", _hoisted_5, _toDisplayString(_unref(workoutObject).moving), 1),\n _createVNode(WorkoutRecord, {\n workoutObject: _unref(workoutObject),\n recordType: \"LD\"\n }, null, 8, [\"workoutObject\"]),\n (_unref(withPause))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n _createTextVNode(\" (\" + _toDisplayString(_ctx.$t('workouts.PAUSES')) + \": \", 1),\n _createElementVNode(\"span\", _hoisted_7, _toDisplayString(_unref(workoutObject).pauses), 1),\n _createTextVNode(\" - \" + _toDisplayString(_ctx.$t('workouts.TOTAL_DURATION')) + \": \", 1),\n _createElementVNode(\"span\", _hoisted_8, _toDisplayString(_unref(workoutObject).duration) + \")\", 1)\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_9, [\n _hoisted_10,\n _createElementVNode(\"span\", _hoisted_11, _toDisplayString(_ctx.$t('workouts.DISTANCE')), 1),\n _createTextVNode(\": \"),\n _createVNode(_component_Distance, {\n distance: _unref(workoutObject).distance,\n digits: 3,\n unitFrom: \"km\",\n strong: true,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"]),\n _createVNode(WorkoutRecord, {\n workoutObject: _unref(workoutObject),\n recordType: \"FD\"\n }, null, 8, [\"workoutObject\"])\n ]),\n _createElementVNode(\"div\", _hoisted_12, [\n _hoisted_13,\n _createElementVNode(\"span\", _hoisted_14, _toDisplayString(_ctx.$t('workouts.AVERAGE_SPEED')), 1),\n _createTextVNode(\": \"),\n _createVNode(_component_Distance, {\n distance: _unref(workoutObject).aveSpeed,\n unitFrom: \"km\",\n speed: true,\n strong: true,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"]),\n _createVNode(WorkoutRecord, {\n workoutObject: _unref(workoutObject),\n recordType: \"AS\"\n }, null, 8, [\"workoutObject\"]),\n _hoisted_15,\n _createElementVNode(\"span\", _hoisted_16, _toDisplayString(_ctx.$t('workouts.MAX_SPEED')), 1),\n _createTextVNode(\": \"),\n _createVNode(_component_Distance, {\n distance: _unref(workoutObject).maxSpeed,\n unitFrom: \"km\",\n speed: true,\n strong: true,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"]),\n _createVNode(WorkoutRecord, {\n workoutObject: _unref(workoutObject),\n recordType: \"MS\"\n }, null, 8, [\"workoutObject\"])\n ]),\n (_unref(workoutObject).maxAlt !== null && _unref(workoutObject).minAlt !== null)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_17, [\n _createElementVNode(\"img\", {\n class: \"mountains\",\n src: \"/img/workouts/mountains.svg\",\n alt: _ctx.$t('workouts.ELEVATION')\n }, null, 8, _hoisted_18),\n _createElementVNode(\"span\", _hoisted_19, _toDisplayString(_ctx.$t('workouts.MIN_ALTITUDE')), 1),\n _createTextVNode(\": \"),\n _createVNode(_component_Distance, {\n distance: _unref(workoutObject).minAlt,\n unitFrom: \"m\",\n strong: true,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"]),\n _hoisted_20,\n _createElementVNode(\"span\", _hoisted_21, _toDisplayString(_ctx.$t('workouts.MAX_ALTITUDE')), 1),\n _createTextVNode(\": \"),\n _createVNode(_component_Distance, {\n distance: _unref(workoutObject).maxAlt,\n unitFrom: \"m\",\n strong: true,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"])\n ]))\n : _createCommentVNode(\"\", true),\n (_unref(workoutObject).ascent !== null && _unref(workoutObject).descent !== null)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_22, [\n _hoisted_23,\n _createElementVNode(\"span\", _hoisted_24, _toDisplayString(_ctx.$t('workouts.ASCENT')), 1),\n _createTextVNode(\": \"),\n _createVNode(_component_Distance, {\n distance: _unref(workoutObject).ascent,\n unitFrom: \"m\",\n strong: true,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"]),\n (_unref(displayHARecord))\n ? (_openBlock(), _createBlock(WorkoutRecord, {\n key: 0,\n workoutObject: _unref(workoutObject),\n recordType: \"HA\"\n }, null, 8, [\"workoutObject\"]))\n : _createCommentVNode(\"\", true),\n _hoisted_25,\n _createElementVNode(\"span\", _hoisted_26, _toDisplayString(_ctx.$t('workouts.DESCENT')), 1),\n _createTextVNode(\": \"),\n _createVNode(_component_Distance, {\n distance: _unref(workoutObject).descent,\n unitFrom: \"m\",\n strong: true,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"])\n ]))\n : _createCommentVNode(\"\", true),\n _createVNode(WorkoutWeather, {\n workoutObject: _unref(workoutObject),\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"workoutObject\", \"useImperialUnits\"])\n ]))\n}\n}\n\n})","import script from \"./WorkoutData.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutData.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutData.vue?vue&type=style&index=0&id=74c5993b&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-74c5993b\"]])\n\nexport default __exports__","function $(element, tagName) {\n return Array.from(element.getElementsByTagName(tagName));\n}\nfunction normalizeId(id) {\n return id[0] === \"#\" ? id : `#${id}`;\n}\nfunction $ns(element, tagName, ns) {\n return Array.from(element.getElementsByTagNameNS(ns, tagName));\n}\n/**\n * get the content of a text node, if any\n */\nfunction nodeVal(node) {\n node?.normalize();\n return (node && node.textContent) || \"\";\n}\n/**\n * Get one Y child of X, if any, otherwise null\n */\nfunction get1(node, tagName, callback) {\n const n = node.getElementsByTagName(tagName);\n const result = n.length ? n[0] : null;\n if (result && callback)\n callback(result);\n return result;\n}\nfunction get(node, tagName, callback) {\n const properties = {};\n if (!node)\n return properties;\n const n = node.getElementsByTagName(tagName);\n const result = n.length ? n[0] : null;\n if (result && callback) {\n return callback(result, properties);\n }\n return properties;\n}\nfunction val1(node, tagName, callback) {\n const val = nodeVal(get1(node, tagName));\n if (val && callback)\n return callback(val) || {};\n return {};\n}\nfunction $num(node, tagName, callback) {\n const val = parseFloat(nodeVal(get1(node, tagName)));\n if (isNaN(val))\n return undefined;\n if (val && callback)\n return callback(val) || {};\n return {};\n}\nfunction num1(node, tagName, callback) {\n const val = parseFloat(nodeVal(get1(node, tagName)));\n if (isNaN(val))\n return undefined;\n if (val && callback)\n callback(val);\n return val;\n}\nfunction getMulti(node, propertyNames) {\n const properties = {};\n for (const property of propertyNames) {\n val1(node, property, (val) => {\n properties[property] = val;\n });\n }\n return properties;\n}\nfunction isElement(node) {\n return node?.nodeType === 1;\n}\n\nfunction getLineStyle(node) {\n return get(node, \"line\", (lineStyle) => {\n const val = Object.assign({}, val1(lineStyle, \"color\", (color) => {\n return { stroke: `#${color}` };\n }), $num(lineStyle, \"opacity\", (opacity) => {\n return { \"stroke-opacity\": opacity };\n }), $num(lineStyle, \"width\", (width) => {\n // GPX width is in mm, convert to px with 96 px per inch\n return { \"stroke-width\": (width * 96) / 25.4 };\n }));\n return val;\n });\n}\n\nfunction getExtensions(node) {\n let values = [];\n if (node === null)\n return values;\n for (const child of Array.from(node.childNodes)) {\n if (!isElement(child))\n continue;\n const name = abbreviateName(child.nodeName);\n if (name === \"gpxtpx:TrackPointExtension\") {\n // loop again for nested garmin extensions (eg. \"gpxtpx:hr\")\n values = values.concat(getExtensions(child));\n }\n else {\n // push custom extension (eg. \"power\")\n const val = nodeVal(child);\n values.push([name, parseNumeric(val)]);\n }\n }\n return values;\n}\nfunction abbreviateName(name) {\n return [\"heart\", \"gpxtpx:hr\", \"hr\"].includes(name) ? \"heart\" : name;\n}\nfunction parseNumeric(val) {\n const num = parseFloat(val);\n return isNaN(num) ? val : num;\n}\n\nfunction coordPair$1(node) {\n const ll = [\n parseFloat(node.getAttribute(\"lon\") || \"\"),\n parseFloat(node.getAttribute(\"lat\") || \"\"),\n ];\n if (isNaN(ll[0]) || isNaN(ll[1])) {\n return null;\n }\n num1(node, \"ele\", (val) => {\n ll.push(val);\n });\n const time = get1(node, \"time\");\n return {\n coordinates: ll,\n time: time ? nodeVal(time) : null,\n extendedValues: getExtensions(get1(node, \"extensions\")),\n };\n}\n\nfunction extractProperties(node) {\n const properties = getMulti(node, [\n \"name\",\n \"cmt\",\n \"desc\",\n \"type\",\n \"time\",\n \"keywords\",\n ]);\n const extensions = Array.from(node.getElementsByTagNameNS(\"http://www.garmin.com/xmlschemas/GpxExtensions/v3\", \"*\"));\n for (const child of extensions) {\n if (child.parentNode?.parentNode === node) {\n properties[child.tagName.replace(\":\", \"_\")] = nodeVal(child);\n }\n }\n const links = $(node, \"link\");\n if (links.length) {\n properties.links = links.map((link) => Object.assign({ href: link.getAttribute(\"href\") }, getMulti(link, [\"text\", \"type\"])));\n }\n return properties;\n}\n\n/**\n * Extract points from a trkseg or rte element.\n */\nfunction getPoints$1(node, pointname) {\n const pts = $(node, pointname);\n const line = [];\n const times = [];\n const extendedValues = {};\n for (let i = 0; i < pts.length; i++) {\n const c = coordPair$1(pts[i]);\n if (!c) {\n continue;\n }\n line.push(c.coordinates);\n if (c.time)\n times.push(c.time);\n for (const [name, val] of c.extendedValues) {\n const plural = name === \"heart\" ? name : name.replace(\"gpxtpx:\", \"\") + \"s\";\n if (!extendedValues[plural]) {\n extendedValues[plural] = Array(pts.length).fill(null);\n }\n extendedValues[plural][i] = val;\n }\n }\n if (line.length < 2)\n return; // Invalid line in GeoJSON\n return {\n line: line,\n times: times,\n extendedValues: extendedValues,\n };\n}\n/**\n * Extract a LineString geometry from a rte\n * element.\n */\nfunction getRoute(node) {\n const line = getPoints$1(node, \"rtept\");\n if (!line)\n return;\n return {\n type: \"Feature\",\n properties: Object.assign({ _gpxType: \"rte\" }, extractProperties(node), getLineStyle(get1(node, \"extensions\"))),\n geometry: {\n type: \"LineString\",\n coordinates: line.line,\n },\n };\n}\nfunction getTrack(node) {\n const segments = $(node, \"trkseg\");\n const track = [];\n const times = [];\n const extractedLines = [];\n for (const segment of segments) {\n const line = getPoints$1(segment, \"trkpt\");\n if (line) {\n extractedLines.push(line);\n if (line.times && line.times.length)\n times.push(line.times);\n }\n }\n if (extractedLines.length === 0)\n return null;\n const multi = extractedLines.length > 1;\n const properties = Object.assign({ _gpxType: \"trk\" }, extractProperties(node), getLineStyle(get1(node, \"extensions\")), times.length\n ? {\n coordinateProperties: {\n times: multi ? times : times[0],\n },\n }\n : {});\n for (const line of extractedLines) {\n track.push(line.line);\n if (!properties.coordinateProperties) {\n properties.coordinateProperties = {};\n }\n const props = properties.coordinateProperties;\n const entries = Object.entries(line.extendedValues);\n for (let i = 0; i < entries.length; i++) {\n const [name, val] = entries[i];\n if (multi) {\n if (!props[name]) {\n props[name] = extractedLines.map((line) => new Array(line.line.length).fill(null));\n }\n props[name][i] = val;\n }\n else {\n props[name] = val;\n }\n }\n }\n return {\n type: \"Feature\",\n properties: properties,\n geometry: multi\n ? {\n type: \"MultiLineString\",\n coordinates: track,\n }\n : {\n type: \"LineString\",\n coordinates: track[0],\n },\n };\n}\n/**\n * Extract a point, if possible, from a given node,\n * which is usually a wpt or trkpt\n */\nfunction getPoint(node) {\n const properties = Object.assign(extractProperties(node), getMulti(node, [\"sym\"]));\n const pair = coordPair$1(node);\n if (!pair)\n return null;\n return {\n type: \"Feature\",\n properties,\n geometry: {\n type: \"Point\",\n coordinates: pair.coordinates,\n },\n };\n}\n/**\n * Convert GPX to GeoJSON incrementally, returning\n * a [Generator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators)\n * that yields output feature by feature.\n */\nfunction* gpxGen(node) {\n for (const track of $(node, \"trk\")) {\n const feature = getTrack(track);\n if (feature)\n yield feature;\n }\n for (const route of $(node, \"rte\")) {\n const feature = getRoute(route);\n if (feature)\n yield feature;\n }\n for (const waypoint of $(node, \"wpt\")) {\n const point = getPoint(waypoint);\n if (point)\n yield point;\n }\n}\n/**\n *\n * Convert a GPX document to GeoJSON. The first argument, `doc`, must be a GPX\n * document as an XML DOM - not as a string. You can get this using jQuery's default\n * `.ajax` function or using a bare XMLHttpRequest with the `.response` property\n * holding an XML DOM.\n *\n * The output is a JavaScript object of GeoJSON data, same as `.kml` outputs, with the\n * addition of a `_gpxType` property on each `LineString` feature that indicates whether\n * the feature was encoded as a route (`rte`) or track (`trk`) in the GPX document.\n */\nfunction gpx(node) {\n return {\n type: \"FeatureCollection\",\n features: Array.from(gpxGen(node)),\n };\n}\n\nconst EXTENSIONS_NS = \"http://www.garmin.com/xmlschemas/ActivityExtension/v2\";\nconst TRACKPOINT_ATTRIBUTES = [\n [\"heartRate\", \"heartRates\"],\n [\"Cadence\", \"cadences\"],\n // Extended Trackpoint attributes\n [\"Speed\", \"speeds\"],\n [\"Watts\", \"watts\"],\n];\nconst LAP_ATTRIBUTES = [\n [\"TotalTimeSeconds\", \"totalTimeSeconds\"],\n [\"DistanceMeters\", \"distanceMeters\"],\n [\"MaximumSpeed\", \"maxSpeed\"],\n [\"AverageHeartRateBpm\", \"avgHeartRate\"],\n [\"MaximumHeartRateBpm\", \"maxHeartRate\"],\n // Extended Lap attributes\n [\"AvgSpeed\", \"avgSpeed\"],\n [\"AvgWatts\", \"avgWatts\"],\n [\"MaxWatts\", \"maxWatts\"],\n];\nfunction getProperties(node, attributeNames) {\n const properties = [];\n for (const [tag, alias] of attributeNames) {\n let elem = get1(node, tag);\n if (!elem) {\n const elements = node.getElementsByTagNameNS(EXTENSIONS_NS, tag);\n if (elements.length) {\n elem = elements[0];\n }\n }\n const val = parseFloat(nodeVal(elem));\n if (!isNaN(val)) {\n properties.push([alias, val]);\n }\n }\n return properties;\n}\nfunction coordPair(node) {\n const ll = [num1(node, \"LongitudeDegrees\"), num1(node, \"LatitudeDegrees\")];\n if (ll[0] === undefined ||\n isNaN(ll[0]) ||\n ll[1] === undefined ||\n isNaN(ll[1])) {\n return null;\n }\n const heartRate = get1(node, \"HeartRateBpm\");\n const time = nodeVal(get1(node, \"Time\"));\n get1(node, \"AltitudeMeters\", (alt) => {\n const a = parseFloat(nodeVal(alt));\n if (!isNaN(a)) {\n ll.push(a);\n }\n });\n return {\n coordinates: ll,\n time: time || null,\n heartRate: heartRate ? parseFloat(nodeVal(heartRate)) : null,\n extensions: getProperties(node, TRACKPOINT_ATTRIBUTES),\n };\n}\nfunction getPoints(node) {\n const pts = $(node, \"Trackpoint\");\n const line = [];\n const times = [];\n const heartRates = [];\n if (pts.length < 2)\n return null; // Invalid line in GeoJSON\n const extendedProperties = {};\n const result = { extendedProperties };\n for (let i = 0; i < pts.length; i++) {\n const c = coordPair(pts[i]);\n if (c === null)\n continue;\n line.push(c.coordinates);\n const { time, heartRate, extensions } = c;\n if (time)\n times.push(time);\n if (heartRate)\n heartRates.push(heartRate);\n for (const [alias, value] of extensions) {\n if (!extendedProperties[alias]) {\n extendedProperties[alias] = Array(pts.length).fill(null);\n }\n extendedProperties[alias][i] = value;\n }\n }\n if (line.length < 2)\n return null;\n return Object.assign(result, {\n line: line,\n times: times,\n heartRates: heartRates,\n });\n}\nfunction getLap(node) {\n const segments = $(node, \"Track\");\n const track = [];\n const times = [];\n const heartRates = [];\n const allExtendedProperties = [];\n let line;\n const properties = Object.assign(Object.fromEntries(getProperties(node, LAP_ATTRIBUTES)), get(node, \"Name\", (nameElement) => {\n return { name: nodeVal(nameElement) };\n }));\n for (const segment of segments) {\n line = getPoints(segment);\n if (line) {\n track.push(line.line);\n if (line.times.length)\n times.push(line.times);\n if (line.heartRates.length)\n heartRates.push(line.heartRates);\n allExtendedProperties.push(line.extendedProperties);\n }\n }\n for (let i = 0; i < allExtendedProperties.length; i++) {\n const extendedProperties = allExtendedProperties[i];\n for (const property in extendedProperties) {\n if (segments.length === 1) {\n if (line) {\n properties[property] = line.extendedProperties[property];\n }\n }\n else {\n if (!properties[property]) {\n properties[property] = track.map((track) => Array(track.length).fill(null));\n }\n properties[property][i] = extendedProperties[property];\n }\n }\n }\n if (track.length === 0)\n return null;\n if (times.length || heartRates.length) {\n properties.coordinateProperties = Object.assign(times.length\n ? {\n times: track.length === 1 ? times[0] : times,\n }\n : {}, heartRates.length\n ? {\n heart: track.length === 1 ? heartRates[0] : heartRates,\n }\n : {});\n }\n return {\n type: \"Feature\",\n properties: properties,\n geometry: track.length === 1\n ? {\n type: \"LineString\",\n coordinates: track[0],\n }\n : {\n type: \"MultiLineString\",\n coordinates: track,\n },\n };\n}\n/**\n * Incrementally convert a TCX document to GeoJSON. The\n * first argument, `doc`, must be a TCX\n * document as an XML DOM - not as a string.\n */\nfunction* tcxGen(node) {\n for (const lap of $(node, \"Lap\")) {\n const feature = getLap(lap);\n if (feature)\n yield feature;\n }\n for (const course of $(node, \"Courses\")) {\n const feature = getLap(course);\n if (feature)\n yield feature;\n }\n}\n/**\n * Convert a TCX document to GeoJSON. The first argument, `doc`, must be a TCX\n * document as an XML DOM - not as a string.\n */\nfunction tcx(node) {\n return {\n type: \"FeatureCollection\",\n features: Array.from(tcxGen(node)),\n };\n}\n\nfunction fixColor(v, prefix) {\n const properties = {};\n const colorProp = prefix == \"stroke\" || prefix === \"fill\" ? prefix : prefix + \"-color\";\n if (v[0] === \"#\") {\n v = v.substring(1);\n }\n if (v.length === 6 || v.length === 3) {\n properties[colorProp] = \"#\" + v;\n }\n else if (v.length === 8) {\n properties[prefix + \"-opacity\"] = parseInt(v.substring(0, 2), 16) / 255;\n properties[colorProp] =\n \"#\" + v.substring(6, 8) + v.substring(4, 6) + v.substring(2, 4);\n }\n return properties;\n}\n\nfunction numericProperty(node, source, target) {\n const properties = {};\n num1(node, source, (val) => {\n properties[target] = val;\n });\n return properties;\n}\nfunction getColor(node, output) {\n return get(node, \"color\", (elem) => fixColor(nodeVal(elem), output));\n}\nfunction extractIconHref(node) {\n return get(node, \"Icon\", (icon, properties) => {\n val1(icon, \"href\", (href) => {\n properties.icon = href;\n });\n return properties;\n });\n}\nfunction extractIcon(node) {\n return get(node, \"IconStyle\", (iconStyle) => {\n return Object.assign(getColor(iconStyle, \"icon\"), numericProperty(iconStyle, \"scale\", \"icon-scale\"), numericProperty(iconStyle, \"heading\", \"icon-heading\"), get(iconStyle, \"hotSpot\", (hotspot) => {\n const left = parseFloat(hotspot.getAttribute(\"x\") || \"\");\n const top = parseFloat(hotspot.getAttribute(\"y\") || \"\");\n const xunits = hotspot.getAttribute(\"xunits\") || \"\";\n const yunits = hotspot.getAttribute(\"yunits\") || \"\";\n if (!isNaN(left) && !isNaN(top))\n return {\n \"icon-offset\": [left, top],\n \"icon-offset-units\": [xunits, yunits],\n };\n return {};\n }), extractIconHref(iconStyle));\n });\n}\nfunction extractLabel(node) {\n return get(node, \"LabelStyle\", (labelStyle) => {\n return Object.assign(getColor(labelStyle, \"label\"), numericProperty(labelStyle, \"scale\", \"label-scale\"));\n });\n}\nfunction extractLine(node) {\n return get(node, \"LineStyle\", (lineStyle) => {\n return Object.assign(getColor(lineStyle, \"stroke\"), numericProperty(lineStyle, \"width\", \"stroke-width\"));\n });\n}\nfunction extractPoly(node) {\n return get(node, \"PolyStyle\", (polyStyle, properties) => {\n return Object.assign(properties, get(polyStyle, \"color\", (elem) => fixColor(nodeVal(elem), \"fill\")), val1(polyStyle, \"fill\", (fill) => {\n if (fill === \"0\")\n return { \"fill-opacity\": 0 };\n }), val1(polyStyle, \"outline\", (outline) => {\n if (outline === \"0\")\n return { \"stroke-opacity\": 0 };\n }));\n });\n}\nfunction extractStyle(node) {\n return Object.assign({}, extractPoly(node), extractLine(node), extractLabel(node), extractIcon(node));\n}\n\nconst toNumber = (x) => Number(x);\nconst typeConverters = {\n string: (x) => x,\n int: toNumber,\n uint: toNumber,\n short: toNumber,\n ushort: toNumber,\n float: toNumber,\n double: toNumber,\n bool: (x) => Boolean(x),\n};\nfunction extractExtendedData(node, schema) {\n return get(node, \"ExtendedData\", (extendedData, properties) => {\n for (const data of $(extendedData, \"Data\")) {\n properties[data.getAttribute(\"name\") || \"\"] = nodeVal(get1(data, \"value\"));\n }\n for (const simpleData of $(extendedData, \"SimpleData\")) {\n const name = simpleData.getAttribute(\"name\") || \"\";\n const typeConverter = schema[name] || typeConverters.string;\n properties[name] = typeConverter(nodeVal(simpleData));\n }\n return properties;\n });\n}\nfunction getMaybeHTMLDescription(node) {\n const descriptionNode = get1(node, \"description\");\n for (const c of Array.from(descriptionNode?.childNodes || [])) {\n if (c.nodeType === 4) {\n return {\n description: {\n \"@type\": \"html\",\n value: nodeVal(c),\n },\n };\n }\n }\n return {};\n}\nfunction extractTimeSpan(node) {\n return get(node, \"TimeSpan\", (timeSpan) => {\n return {\n timespan: {\n begin: nodeVal(get1(timeSpan, \"begin\")),\n end: nodeVal(get1(timeSpan, \"end\")),\n },\n };\n });\n}\nfunction extractTimeStamp(node) {\n return get(node, \"TimeStamp\", (timeStamp) => {\n return { timestamp: nodeVal(get1(timeStamp, \"when\")) };\n });\n}\nfunction extractCascadedStyle(node, styleMap) {\n return val1(node, \"styleUrl\", (styleUrl) => {\n styleUrl = normalizeId(styleUrl);\n if (styleMap[styleUrl]) {\n return Object.assign({ styleUrl }, styleMap[styleUrl]);\n }\n // For backward-compatibility. Should we still include\n // styleUrl even if it's not resolved?\n return { styleUrl };\n });\n}\n\nconst removeSpace = /\\s*/g;\nconst trimSpace = /^\\s*|\\s*$/g;\nconst splitSpace = /\\s+/;\n/**\n * Get one coordinate from a coordinate array, if any\n */\nfunction coord1(value) {\n return value\n .replace(removeSpace, \"\")\n .split(\",\")\n .map(parseFloat)\n .filter((num) => !isNaN(num))\n .slice(0, 3);\n}\n/**\n * Get all coordinates from a coordinate array as [[],[]]\n */\nfunction coord(value) {\n return value\n .replace(trimSpace, \"\")\n .split(splitSpace)\n .map(coord1)\n .filter((coord) => {\n return coord.length >= 2;\n });\n}\nfunction gxCoords(node) {\n let elems = $(node, \"coord\");\n if (elems.length === 0) {\n elems = $ns(node, \"coord\", \"*\");\n }\n const coordinates = elems.map((elem) => {\n return nodeVal(elem).split(\" \").map(parseFloat);\n });\n if (coordinates.length === 0) {\n return null;\n }\n return {\n geometry: coordinates.length > 2\n ? {\n type: \"LineString\",\n coordinates,\n }\n : {\n type: \"Point\",\n coordinates: coordinates[0],\n },\n times: $(node, \"when\").map((elem) => nodeVal(elem)),\n };\n}\nfunction fixRing(ring) {\n if (ring.length === 0)\n return ring;\n const first = ring[0];\n const last = ring[ring.length - 1];\n let equal = true;\n for (let i = 0; i < Math.max(first.length, last.length); i++) {\n if (first[i] !== last[i]) {\n equal = false;\n break;\n }\n }\n if (!equal) {\n return ring.concat([ring[0]]);\n }\n return ring;\n}\nfunction getCoordinates(node) {\n return nodeVal(get1(node, \"coordinates\"));\n}\nfunction getGeometry(node) {\n let geometries = [];\n let coordTimes = [];\n for (let i = 0; i < node.childNodes.length; i++) {\n const child = node.childNodes.item(i);\n if (isElement(child)) {\n switch (child.tagName) {\n case \"MultiGeometry\":\n case \"MultiTrack\":\n case \"gx:MultiTrack\": {\n const childGeometries = getGeometry(child);\n geometries = geometries.concat(childGeometries.geometries);\n coordTimes = coordTimes.concat(childGeometries.coordTimes);\n break;\n }\n case \"Point\": {\n const coordinates = coord1(getCoordinates(child));\n if (coordinates.length >= 2) {\n geometries.push({\n type: \"Point\",\n coordinates,\n });\n }\n break;\n }\n case \"LineString\": {\n const coordinates = coord(getCoordinates(child));\n if (coordinates.length >= 2) {\n geometries.push({\n type: \"LineString\",\n coordinates,\n });\n }\n break;\n }\n case \"Polygon\": {\n const coords = [];\n for (const linearRing of $(child, \"LinearRing\")) {\n const ring = fixRing(coord(getCoordinates(linearRing)));\n if (ring.length >= 4) {\n coords.push(ring);\n }\n }\n if (coords.length) {\n geometries.push({\n type: \"Polygon\",\n coordinates: coords,\n });\n }\n break;\n }\n case \"Track\":\n case \"gx:Track\": {\n const gx = gxCoords(child);\n if (!gx)\n break;\n const { times, geometry } = gx;\n geometries.push(geometry);\n if (times.length)\n coordTimes.push(times);\n break;\n }\n }\n }\n }\n return {\n geometries,\n coordTimes,\n };\n}\n\nfunction geometryListToGeometry(geometries) {\n return geometries.length === 0\n ? null\n : geometries.length === 1\n ? geometries[0]\n : {\n type: \"GeometryCollection\",\n geometries,\n };\n}\nfunction getPlacemark(node, styleMap, schema) {\n const { coordTimes, geometries } = getGeometry(node);\n const feature = {\n type: \"Feature\",\n geometry: geometryListToGeometry(geometries),\n properties: Object.assign(getMulti(node, [\n \"name\",\n \"address\",\n \"visibility\",\n \"open\",\n \"phoneNumber\",\n \"description\",\n ]), getMaybeHTMLDescription(node), extractCascadedStyle(node, styleMap), extractStyle(node), extractExtendedData(node, schema), extractTimeSpan(node), extractTimeStamp(node), coordTimes.length\n ? {\n coordinateProperties: {\n times: coordTimes.length === 1 ? coordTimes[0] : coordTimes,\n },\n }\n : {}),\n };\n if (feature.properties?.visibility !== undefined) {\n feature.properties.visibility = feature.properties.visibility !== \"0\";\n }\n const id = node.getAttribute(\"id\");\n if (id !== null && id !== \"\")\n feature.id = id;\n return feature;\n}\n\nfunction getGroundOverlayBox(node) {\n const latLonQuad = get1(node, \"gx:LatLonQuad\");\n if (latLonQuad) {\n const ring = fixRing(coord(getCoordinates(node)));\n return {\n type: \"Polygon\",\n coordinates: [ring],\n };\n }\n return getLatLonBox(node);\n}\nconst DEGREES_TO_RADIANS = Math.PI / 180;\nfunction rotateBox(bbox, coordinates, rotation) {\n const center = [(bbox[0] + bbox[2]) / 2, (bbox[1] + bbox[3]) / 2];\n return [\n coordinates[0].map((coordinate) => {\n const dy = coordinate[1] - center[1];\n const dx = coordinate[0] - center[0];\n const distance = Math.sqrt(Math.pow(dy, 2) + Math.pow(dx, 2));\n const angle = Math.atan2(dy, dx) - rotation * DEGREES_TO_RADIANS;\n return [\n center[0] + Math.cos(angle) * distance,\n center[1] + Math.sin(angle) * distance,\n ];\n }),\n ];\n}\nfunction getLatLonBox(node) {\n const latLonBox = get1(node, \"LatLonBox\");\n if (latLonBox) {\n const north = num1(latLonBox, \"north\");\n const west = num1(latLonBox, \"west\");\n const east = num1(latLonBox, \"east\");\n const south = num1(latLonBox, \"south\");\n const rotation = num1(latLonBox, \"rotation\");\n if (typeof north === \"number\" &&\n typeof south === \"number\" &&\n typeof west === \"number\" &&\n typeof east === \"number\") {\n const bbox = [west, south, east, north];\n let coordinates = [\n [\n [west, north],\n [east, north],\n [east, south],\n [west, south],\n [west, north], // top left (again)\n ],\n ];\n if (typeof rotation === \"number\") {\n coordinates = rotateBox(bbox, coordinates, rotation);\n }\n return {\n type: \"Polygon\",\n coordinates,\n };\n }\n }\n return null;\n}\nfunction getGroundOverlay(node, styleMap, schema) {\n const geometry = getGroundOverlayBox(node);\n const feature = {\n type: \"Feature\",\n geometry,\n properties: Object.assign(\n /**\n * Related to\n * https://gist.github.com/tmcw/037a1cb6660d74a392e9da7446540f46\n */\n { \"@geometry-type\": \"groundoverlay\" }, getMulti(node, [\n \"name\",\n \"address\",\n \"visibility\",\n \"open\",\n \"phoneNumber\",\n \"description\",\n ]), getMaybeHTMLDescription(node), extractCascadedStyle(node, styleMap), extractStyle(node), extractIconHref(node), extractExtendedData(node, schema), extractTimeSpan(node), extractTimeStamp(node)),\n };\n if (feature.properties?.visibility !== undefined) {\n feature.properties.visibility = feature.properties.visibility !== \"0\";\n }\n const id = node.getAttribute(\"id\");\n if (id !== null && id !== \"\")\n feature.id = id;\n return feature;\n}\n\nfunction getStyleId(style) {\n let id = style.getAttribute(\"id\");\n const parentNode = style.parentNode;\n if (!id &&\n isElement(parentNode) &&\n parentNode.localName === \"CascadingStyle\") {\n id = parentNode.getAttribute(\"kml:id\") || parentNode.getAttribute(\"id\");\n }\n return normalizeId(id || \"\");\n}\nfunction buildStyleMap(node) {\n const styleMap = {};\n for (const style of $(node, \"Style\")) {\n styleMap[getStyleId(style)] = extractStyle(style);\n }\n for (const map of $(node, \"StyleMap\")) {\n const id = normalizeId(map.getAttribute(\"id\") || \"\");\n val1(map, \"styleUrl\", (styleUrl) => {\n styleUrl = normalizeId(styleUrl);\n if (styleMap[styleUrl]) {\n styleMap[id] = styleMap[styleUrl];\n }\n });\n }\n return styleMap;\n}\nfunction buildSchema(node) {\n const schema = {};\n for (const field of $(node, \"SimpleField\")) {\n schema[field.getAttribute(\"name\") || \"\"] =\n typeConverters[field.getAttribute(\"type\") || \"\"] ||\n typeConverters[\"string\"];\n }\n return schema;\n}\nconst FOLDER_PROPS = [\n \"name\",\n \"visibility\",\n \"open\",\n \"address\",\n \"description\",\n \"phoneNumber\",\n \"visibility\",\n];\nfunction getFolder(node) {\n const meta = {};\n for (const child of Array.from(node.childNodes)) {\n if (isElement(child) && FOLDER_PROPS.includes(child.tagName)) {\n meta[child.tagName] = nodeVal(child);\n }\n }\n return {\n type: \"folder\",\n meta,\n children: [],\n };\n}\n/**\n * Yield a nested tree with KML folder structure\n *\n * This generates a tree with the given structure:\n *\n * ```js\n * {\n * \"type\": \"root\",\n * \"children\": [\n * {\n * \"type\": \"folder\",\n * \"meta\": {\n * \"name\": \"Test\"\n * },\n * \"children\": [\n * // ...features and folders\n * ]\n * }\n * // ...features\n * ]\n * }\n * ```\n *\n * ### GroundOverlay\n *\n * GroundOverlay elements are converted into\n * `Feature` objects with `Polygon` geometries,\n * a property like:\n *\n * ```json\n * {\n * \"@geometry-type\": \"groundoverlay\"\n * }\n * ```\n *\n * And the ground overlay's image URL in the `href`\n * property. Ground overlays will need to be displayed\n * with a separate method to other features, depending\n * on which map framework you're using.\n */\nfunction kmlWithFolders(node) {\n const styleMap = buildStyleMap(node);\n const schema = buildSchema(node);\n const tree = { type: \"root\", children: [] };\n function traverse(node, pointer) {\n if (isElement(node)) {\n switch (node.tagName) {\n case \"GroundOverlay\": {\n const placemark = getGroundOverlay(node, styleMap, schema);\n if (placemark) {\n pointer.children.push(placemark);\n }\n break;\n }\n case \"Placemark\": {\n const placemark = getPlacemark(node, styleMap, schema);\n if (placemark) {\n pointer.children.push(placemark);\n }\n break;\n }\n case \"Folder\": {\n const folder = getFolder(node);\n pointer.children.push(folder);\n pointer = folder;\n break;\n }\n }\n }\n if (node.childNodes) {\n for (let i = 0; i < node.childNodes.length; i++) {\n traverse(node.childNodes[i], pointer);\n }\n }\n }\n traverse(node, tree);\n return tree;\n}\n/**\n * Convert KML to GeoJSON incrementally, returning\n * a [Generator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators)\n * that yields output feature by feature.\n */\nfunction* kmlGen(node) {\n const styleMap = buildStyleMap(node);\n const schema = buildSchema(node);\n for (const placemark of $(node, \"Placemark\")) {\n const feature = getPlacemark(placemark, styleMap, schema);\n if (feature)\n yield feature;\n }\n for (const groundOverlay of $(node, \"GroundOverlay\")) {\n const feature = getGroundOverlay(groundOverlay, styleMap, schema);\n if (feature)\n yield feature;\n }\n}\n/**\n * Convert a KML document to GeoJSON. The first argument, `doc`, must be a KML\n * document as an XML DOM - not as a string. You can get this using jQuery's default\n * `.ajax` function or using a bare XMLHttpRequest with the `.response` property\n * holding an XML DOM.\n *\n * The output is a JavaScript object of GeoJSON data. You can convert it to a string\n * with [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)\n * or use it directly in libraries.\n */\nfunction kml(node) {\n return {\n type: \"FeatureCollection\",\n features: Array.from(kmlGen(node)),\n };\n}\n\nexport { gpx, gpxGen, kml, kmlGen, kmlWithFolders, tcx, tcxGen };\n//# sourceMappingURL=togeojson.es.mjs.map\n","import { watch, ref, provide, h, inject, onUnmounted, onBeforeUnmount, onMounted, nextTick, render as render$3, reactive, computed } from 'vue';\n\nconst debounce = (fn, time) => {\n let timeout;\n\n return function (...args) {\n const context = this;\n if (timeout) {\n clearTimeout(timeout);\n }\n timeout = setTimeout(() => {\n fn.apply(context, args);\n timeout = null;\n }, time);\n };\n};\n\nconst capitalizeFirstLetter = (string) => {\n if (!string || typeof string.charAt !== \"function\") {\n return string;\n }\n return string.charAt(0).toUpperCase() + string.slice(1);\n};\n\nconst isFunction = (x) => typeof x === \"function\";\n\nconst propsBinder = (methods, leafletElement, props) => {\n for (const key in props) {\n const setMethodName = \"set\" + capitalizeFirstLetter(key);\n if (methods[setMethodName]) {\n watch(\n () => props[key],\n (newVal, oldVal) => {\n methods[setMethodName](newVal, oldVal);\n }\n );\n } else if (leafletElement[setMethodName]) {\n watch(\n () => props[key],\n (newVal) => {\n leafletElement[setMethodName](newVal);\n }\n );\n }\n }\n};\n\nconst remapEvents = (contextAttrs) => {\n const result = {};\n for (const attrName in contextAttrs) {\n if (\n attrName.startsWith(\"on\") &&\n !attrName.startsWith(\"onUpdate\") &&\n attrName !== \"onReady\"\n ) {\n const eventName = attrName.slice(2).toLocaleLowerCase();\n result[eventName] = contextAttrs[attrName];\n }\n }\n return result;\n};\n\nconst resetWebpackIcon = async (Icon) => {\n const modules = await Promise.all([\n import('leaflet/dist/images/marker-icon-2x.png'),\n import('leaflet/dist/images/marker-icon.png'),\n import('leaflet/dist/images/marker-shadow.png'),\n ]);\n\n delete Icon.Default.prototype._getIconUrl;\n\n Icon.Default.mergeOptions({\n iconRetinaUrl: modules[0].default,\n iconUrl: modules[1].default,\n shadowUrl: modules[2].default,\n });\n};\n\n/**\n * Wraps a placeholder function and provides it with the given name.\n * The wrapper can later be updated with {@link updateLeafletWrapper}\n * to provide a different function.\n *\n * @param {String} methodName Key used to provide the wrapper function\n */\nconst provideLeafletWrapper = (methodName) => {\n const wrapped = ref(() =>\n console.warn(`Method ${methodName} has been invoked without being replaced`)\n );\n const wrapper = (...args) => wrapped.value(...args);\n // eslint-disable-next-line vue/no-ref-as-operand\n wrapper.wrapped = wrapped;\n provide(methodName, wrapper);\n\n return wrapper;\n};\n\n/**\n * Change the function that will be executed when an injected Leaflet wrapper\n * is invoked.\n *\n * @param {*} wrapper Provided wrapper whose wrapped function is to be updated\n * @param {function} leafletMethod New method to be wrapped by the wrapper\n */\nconst updateLeafletWrapper = (wrapper, leafletMethod) =>\n (wrapper.wrapped.value = leafletMethod);\n\nconst WINDOW_OR_GLOBAL =\n (typeof self === \"object\" && self.self === self && self) ||\n (typeof global === \"object\" && global.global === global && global) ||\n undefined;\n\nconst GLOBAL_LEAFLET_OPT = \"useGlobalLeaflet\";\n\nconst props = {\n options: {\n type: Object,\n default: () => ({}),\n },\n};\n\nconst setup = (props) => {\n return { options: props.options, methods: {} };\n};\n\nconst props$1 = {\n ...props,\n pane: {\n type: String,\n default: \"overlayPane\",\n },\n attribution: {\n type: String,\n default: null,\n },\n name: {\n type: String,\n custom: true,\n default: undefined,\n },\n layerType: {\n type: String,\n custom: true,\n default: undefined,\n },\n visible: {\n type: Boolean,\n custom: true,\n default: true,\n },\n};\n\nconst setup$1 = (props, leafletRef, context) => {\n const addLayer = inject(\"addLayer\");\n const removeLayer = inject(\"removeLayer\");\n const {\n options: componentOptions,\n methods: componentMethods,\n } = setup(props);\n\n const options = {\n ...componentOptions,\n attribution: props.attribution,\n pane: props.pane,\n };\n\n const addThisLayer = () => addLayer({ leafletObject: leafletRef.value });\n const removeThisLayer = () =>\n removeLayer({ leafletObject: leafletRef.value });\n\n const methods = {\n ...componentMethods,\n setAttribution(val, old) {\n const attributionControl = this.$parent.leafletObject.attributionControl;\n attributionControl.removeAttribution(old).addAttribution(val);\n },\n setName() {\n removeThisLayer();\n if (props.visible) {\n addThisLayer();\n }\n },\n setLayerType() {\n removeThisLayer();\n if (props.visible) {\n addThisLayer();\n }\n },\n setVisible(isVisible) {\n if (leafletRef.value) {\n if (isVisible) {\n addThisLayer();\n } else {\n removeThisLayer();\n }\n }\n },\n bindPopup({ leafletObject }) {\n if (!leafletRef.value || !isFunction(leafletRef.value.bindPopup)) {\n console.warn(\n \"Attempt to bind popup before bindPopup method available on layer.\"\n );\n\n return;\n }\n\n leafletRef.value.bindPopup(leafletObject);\n },\n bindTooltip({ leafletObject }) {\n if (!leafletRef.value || !isFunction(leafletRef.value.bindTooltip)) {\n console.warn(\n \"Attempt to bind tooltip before bindTooltip method available on layer.\"\n );\n\n return;\n }\n\n leafletRef.value.bindTooltip(leafletObject);\n },\n unbindTooltip() {\n const tooltip =\n leafletRef.value && isFunction(leafletRef.value.getTooltip)\n ? leafletRef.value.getTooltip()\n : null;\n if (tooltip && isFunction(tooltip.unbindTooltip)) {\n tooltip.unbindTooltip();\n }\n },\n unbindPopup() {\n const popup =\n leafletRef.value && isFunction(leafletRef.value.getPopup)\n ? leafletRef.value.getPopup()\n : null;\n if (popup && isFunction(popup.unbindPopup)) {\n popup.unbindPopup();\n }\n },\n updateVisibleProp(value) {\n /**\n * Triggers when the visible prop needs to be updated\n * @type {boolean}\n * @property {boolean} value - value of the visible property\n */\n context.emit(\"update:visible\", value);\n },\n };\n\n provide(\"bindPopup\", methods.bindPopup);\n provide(\"bindTooltip\", methods.bindTooltip);\n provide(\"unbindTooltip\", methods.unbindTooltip);\n provide(\"unbindPopup\", methods.unbindPopup);\n\n onUnmounted(() => {\n methods.unbindPopup();\n methods.unbindTooltip();\n removeThisLayer();\n });\n\n return { options, methods };\n};\n\nconst render = (ready, slots) => {\n if (ready && slots.default) {\n return h(\"div\", { style: { display: \"none\" } }, slots.default());\n }\n};\n\nconst props$2 = {\n ...props,\n interactive: {\n type: Boolean,\n default: true,\n },\n bubblingMouseEvents: {\n type: Boolean,\n default: true,\n },\n};\n\nconst setup$2 = (props) => {\n const { options: componentOptions, methods } = setup(props);\n const options = {\n ...componentOptions,\n interactive: props.interactive,\n bubblingMouseEvents: props.bubblingMouseEvents,\n };\n\n return { options, methods };\n};\n\nconst props$3 = {\n ...props$1,\n ...props$2,\n stroke: {\n type: Boolean,\n custom: true,\n default: true,\n },\n color: {\n type: String,\n custom: true,\n default: \"#3388ff\",\n },\n weight: {\n type: Number,\n custom: true,\n default: 3,\n },\n opacity: {\n type: Number,\n custom: true,\n default: 1.0,\n },\n lineCap: {\n type: String,\n custom: true,\n default: \"round\",\n },\n lineJoin: {\n type: String,\n custom: true,\n default: \"round\",\n },\n dashArray: {\n type: String,\n custom: true,\n default: null,\n },\n dashOffset: {\n type: String,\n custom: true,\n default: null,\n },\n fill: {\n type: Boolean,\n custom: true,\n default: false,\n },\n fillColor: {\n type: String,\n custom: true,\n default: \"#3388ff\",\n },\n fillOpacity: {\n type: Number,\n custom: true,\n default: 0.2,\n },\n fillRule: {\n type: String,\n custom: true,\n default: \"evenodd\",\n },\n className: {\n type: String,\n custom: true,\n default: null,\n },\n};\n\nconst setup$3 = (props, leafletRef, context) => {\n const { options: layerOptions, methods: layerMethods } = setup$1(\n props,\n leafletRef,\n context\n );\n const {\n options: interactiveLayerOptions,\n methods: interactiveLayerMethods,\n } = setup$2(props);\n\n const removeLayer = inject(\"removeLayer\");\n\n const options = {\n ...layerOptions,\n ...interactiveLayerOptions,\n stroke: props.stroke,\n color: props.color,\n weight: props.weight,\n opacity: props.opacity,\n lineCap: props.lineCap,\n lineJoin: props.lineJoin,\n dashArray: props.dashArray,\n dashOffset: props.dashOffset,\n fill: props.fill,\n fillColor: props.fillColor,\n fillOpacity: props.fillOpacity,\n fillRule: props.fillRule,\n className: props.className,\n };\n const methods = {\n ...layerMethods,\n ...interactiveLayerMethods,\n setStroke(stroke) {\n leafletRef.value.setStyle({ stroke });\n },\n setColor(color) {\n leafletRef.value.setStyle({ color });\n },\n setWeight(weight) {\n leafletRef.value.setStyle({ weight });\n },\n setOpacity(opacity) {\n leafletRef.value.setStyle({ opacity });\n },\n setLineCap(lineCap) {\n leafletRef.value.setStyle({ lineCap });\n },\n setLineJoin(lineJoin) {\n leafletRef.value.setStyle({ lineJoin });\n },\n setDashArray(dashArray) {\n leafletRef.value.setStyle({ dashArray });\n },\n setDashOffset(dashOffset) {\n leafletRef.value.setStyle({ dashOffset });\n },\n setFill(fill) {\n leafletRef.value.setStyle({ fill });\n },\n setFillColor(fillColor) {\n leafletRef.value.setStyle({ fillColor });\n },\n setFillOpacity(fillOpacity) {\n leafletRef.value.setStyle({ fillOpacity });\n },\n setFillRule(fillRule) {\n leafletRef.value.setStyle({ fillRule });\n },\n setClassName(className) {\n leafletRef.value.setStyle({ className });\n },\n };\n\n onBeforeUnmount(() => {\n removeLayer({ leafletObject: leafletRef.value });\n });\n\n return { options, methods };\n};\n\nconst props$4 = {\n ...props$3,\n latLng: {\n type: [Object, Array],\n custom: true,\n default: null,\n },\n /**\n * Radius of the marker in pixels.\n */\n radius: {\n type: Number,\n default: null,\n },\n};\n\nconst setup$4 = (props, leafletRef, context) => {\n const { options: pathOptions, methods: pathMethods } = setup$3(\n props,\n leafletRef,\n context\n );\n const options = {\n ...pathOptions,\n ...props,\n };\n const methods = {\n ...pathMethods,\n setRadius(radius) {\n leafletRef.value.setRadius(radius);\n },\n setLatLng(latLng) {\n leafletRef.value.setLatLng(latLng);\n },\n };\n\n return { options, methods };\n};\n\nconst props$5 = {\n ...props$4,\n /**\n * Radius of the circle in meters.\n */\n radius: {\n type: Number,\n default: null,\n },\n};\n\nconst setup$5 = (props, leafletRef, context) => {\n const {\n options: circleMarkerOptions,\n methods: circleMarkerMethods,\n } = setup$4(props, leafletRef, context);\n\n const options = {\n ...circleMarkerOptions,\n ...props,\n };\n\n const methods = {\n ...circleMarkerMethods,\n };\n\n return { options, methods };\n};\n\n/**\n * Circle component, lets you add and personalize circles on the map\n */\nvar script = {\n name: \"LCircle\",\n props: props$5,\n setup(props, context) {\n const leafletRef = ref({});\n const ready = ref(false);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { options, methods } = setup$5(props, leafletRef, context);\n\n onMounted(async () => {\n const { circle, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = circle(props.latLng, options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n propsBinder(methods, leafletRef.value, props);\n\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n ready.value = true;\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { ready, leafletObject: leafletRef };\n },\n render() {\n return render(this.ready, this.$slots);\n },\n};\n\nscript.__file = \"src/components/LCircle.vue\";\n\n/**\n * Circle Marker component, lets you add and personalize circle markers on the map\n */\nvar script$1 = {\n name: \"LCircleMarker\",\n props: props$4,\n setup(props, context) {\n const leafletRef = ref({});\n const ready = ref(false);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { options, methods } = setup$4(props, leafletRef, context);\n\n onMounted(async () => {\n const { circleMarker, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = circleMarker(props.latLng, options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n propsBinder(methods, leafletRef.value, props);\n\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n ready.value = true;\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { ready, leafletObject: leafletRef };\n },\n render() {\n return render(this.ready, this.$slots);\n },\n};\n\nscript$1.__file = \"src/components/LCircleMarker.vue\";\n\nconst props$6 = {\n ...props,\n position: {\n type: String,\n default: \"topright\",\n },\n};\n\nconst setup$6 = (props, leafletRef) => {\n const {\n options: componentOptions,\n methods: componentMethods,\n } = setup(props);\n const options = {\n ...componentOptions,\n position: props.position,\n };\n\n const methods = {\n ...componentMethods,\n setPosition(position) {\n if (leafletRef.value) {\n leafletRef.value.setPosition(position);\n }\n },\n };\n\n onUnmounted(() => {\n if (leafletRef.value) {\n leafletRef.value.remove();\n }\n });\n\n return { options, methods };\n};\n\nconst render$1 = (slots) => {\n if (slots.default) {\n return h(\"div\", { ref: \"root\" }, slots.default());\n }\n return null;\n};\n\nvar script$2 = {\n name: \"LControl\",\n props: {\n ...props$6,\n disableClickPropagation: {\n type: Boolean,\n custom: true,\n default: true,\n },\n disableScrollPropagation: {\n type: Boolean,\n custom: true,\n default: false,\n },\n },\n setup(props, context) {\n const leafletRef = ref({});\n const root = ref(null);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const registerControl = inject(\"registerControl\");\n\n const { options, methods } = setup$6(props, leafletRef);\n\n onMounted(async () => {\n const { Control, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n const LControl = Control.extend({\n onAdd() {\n return root.value;\n },\n });\n\n leafletRef.value = new LControl(options);\n propsBinder(methods, leafletRef.value, props);\n registerControl({ leafletObject: leafletRef.value });\n\n if (props.disableClickPropagation) {\n DomEvent.disableClickPropagation(root.value);\n }\n if (props.disableScrollPropagation) {\n DomEvent.disableScrollPropagation(root.value);\n }\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { root, leafletObject: leafletRef };\n },\n render() {\n return render$1(this.$slots);\n },\n};\n\nscript$2.__file = \"src/components/LControl.vue\";\n\nconst props$7 = {\n ...props$6,\n prefix: {\n type: String,\n default: \"Vue-Leaflet\",\n custom: true,\n },\n};\n\nconst setup$7 = (props, leafletRef) => {\n const { options: controlOptions, methods: controlMethods } = setup$6(\n props,\n leafletRef\n );\n const options = {\n ...controlOptions,\n prefix: props.prefix,\n };\n\n const methods = {\n ...controlMethods,\n setPrefix(prefix) {\n leafletRef.value.setPrefix(prefix);\n },\n };\n\n return { options, methods };\n};\n\nvar script$3 = {\n name: \"LControlAttribution\",\n props: props$7,\n setup(props, context) {\n const leafletRef = ref({});\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const registerControl = inject(\"registerControl\");\n\n const { options, methods } = setup$7(props, leafletRef);\n\n onMounted(async () => {\n const { control } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = control.attribution(options);\n propsBinder(methods, leafletRef.value, props);\n registerControl({ leafletObject: leafletRef.value });\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { leafletObject: leafletRef.value };\n },\n render() {\n return null;\n },\n};\n\nscript$3.__file = \"src/components/LControlAttribution.vue\";\n\nconst props$8 = {\n ...props$6,\n collapsed: {\n type: Boolean,\n default: true,\n },\n autoZIndex: {\n type: Boolean,\n default: true,\n },\n hideSingleBase: {\n type: Boolean,\n default: false,\n },\n sortLayers: {\n type: Boolean,\n default: false,\n },\n sortFunction: {\n type: Function,\n default: undefined,\n },\n};\n\nconst setup$8 = (props, leafletRef) => {\n const { options: controlOptions } = setup$6(props, leafletRef);\n const options = {\n ...controlOptions,\n collapsed: props.collapsed,\n autoZIndex: props.autoZIndex,\n hideSingleBase: props.hideSingleBase,\n sortLayers: props.sortLayers,\n sortFunction: props.sortFunction,\n };\n\n const methods = {\n addLayer(layer) {\n if (layer.layerType === \"base\") {\n leafletRef.value.addBaseLayer(layer.leafletObject, layer.name);\n } else if (layer.layerType === \"overlay\") {\n leafletRef.value.addOverlay(layer.leafletObject, layer.name);\n }\n },\n removeLayer(layer) {\n leafletRef.value.removeLayer(layer.leafletObject);\n },\n };\n return { options, methods };\n};\n\nvar script$4 = {\n name: \"LControlLayers\",\n props: props$8,\n setup(props, context) {\n const leafletRef = ref({});\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const registerLayerControl = inject(\"registerLayerControl\");\n\n const { options, methods } = setup$8(props, leafletRef);\n\n onMounted(async () => {\n const { control } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = control.layers(null, null, options);\n\n propsBinder(methods, leafletRef.value, props);\n\n registerLayerControl({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { leafletObject: leafletRef.value };\n },\n render() {\n return null;\n },\n};\n\nscript$4.__file = \"src/components/LControlLayers.vue\";\n\nconst props$9 = {\n ...props$6,\n maxWidth: {\n type: Number,\n default: 100,\n },\n metric: {\n type: Boolean,\n default: true,\n },\n imperial: {\n type: Boolean,\n default: true,\n },\n updateWhenIdle: {\n type: Boolean,\n default: false,\n },\n};\n\nconst setup$9 = (props, leafletRef) => {\n const { options: controlOptions, methods: controlMethods } = setup$6(\n props,\n leafletRef\n );\n const options = {\n ...controlOptions,\n maxWidth: props.maxWidth,\n metric: props.metric,\n imperial: props.imperial,\n updateWhenIdle: props.updateWhenIdle,\n };\n\n return { options, methods: controlMethods };\n};\n\nvar script$5 = {\n name: \"LControlScale\",\n props: props$9,\n setup(props, context) {\n const leafletRef = ref({});\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const registerControl = inject(\"registerControl\");\n\n const { options, methods } = setup$9(props, leafletRef);\n\n onMounted(async () => {\n const { control } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = control.scale(options);\n propsBinder(methods, leafletRef.value, props);\n registerControl({ leafletObject: leafletRef.value });\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { leafletObject: leafletRef.value };\n },\n render() {\n return null;\n },\n};\n\nscript$5.__file = \"src/components/LControlScale.vue\";\n\nconst props$a = {\n ...props$6,\n zoomInText: {\n type: String,\n default: \"+\",\n },\n zoomInTitle: {\n type: String,\n default: \"Zoom in\",\n },\n zoomOutText: {\n type: String,\n default: \"-\",\n },\n zoomOutTitle: {\n type: String,\n default: \"Zoom out\",\n },\n};\n\nconst setup$a = (props, leafletRef) => {\n const { options: controlOptions, methods: controlMethods } = setup$6(\n props,\n leafletRef\n );\n const options = {\n ...controlOptions,\n zoomInText: props.zoomInText,\n zoomInTitle: props.zoomInTitle,\n zoomOutText: props.zoomOutText,\n zoomOutTitle: props.zoomOutTitle,\n };\n\n return { options, methods: controlMethods };\n};\n\nvar script$6 = {\n name: \"LControlZoom\",\n props: props$a,\n setup(props, context) {\n const leafletRef = ref({});\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const registerControl = inject(\"registerControl\");\n\n const { options, methods } = setup$a(props, leafletRef);\n\n onMounted(async () => {\n const { control } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = control.zoom(options);\n propsBinder(methods, leafletRef.value, props);\n registerControl({ leafletObject: leafletRef.value });\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { leafletObject: leafletRef.value };\n },\n render() {\n return null;\n },\n};\n\nscript$6.__file = \"src/components/LControlZoom.vue\";\n\nconst props$b = {\n ...props$1,\n};\n\nconst setup$b = (props, leafletRef, context) => {\n const { options: layerOptions, methods: layerMethods } = setup$1(\n props,\n leafletRef,\n context\n );\n\n const options = {\n ...layerOptions,\n };\n\n const methods = {\n ...layerMethods,\n addLayer(layer) {\n leafletRef.value.addLayer(layer.leafletObject);\n },\n removeLayer(layer) {\n leafletRef.value.removeLayer(layer.leafletObject);\n },\n };\n\n provide(\"addLayer\", methods.addLayer);\n provide(\"removeLayer\", methods.removeLayer);\n\n return { options, methods };\n};\n\nconst props$c = {\n ...props$b,\n};\n\nconst setup$c = (props, leafletRef) => {\n const { options: layerOptions, methods: layerGroupMethods } = setup$b(\n props,\n leafletRef\n );\n\n const options = {\n ...layerOptions,\n ...props,\n };\n\n const methods = {\n ...layerGroupMethods,\n };\n\n return { options, methods };\n};\n\nvar script$7 = {\n props: props$c,\n setup(props, context) {\n const leafletRef = ref({});\n const ready = ref(false);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { methods, options } = setup$c(props, leafletRef);\n\n onMounted(async () => {\n const { featureGroup, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = featureGroup(options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n propsBinder(methods, leafletRef.value, props);\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n ready.value = true;\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { ready, leafletObject: leafletRef };\n },\n render() {\n return render(this.ready, this.$slots);\n },\n};\n\nscript$7.__file = \"src/components/LFeatureGroup.vue\";\n\nconst props$d = {\n ...props$b,\n geojson: {\n type: [Object, Array],\n default: () => ({}),\n },\n};\n\nconst setup$d = (props, leafletRef, context) => {\n const { options: layerOptions, methods: layerGroupMethods } = setup$b(\n props,\n leafletRef,\n context\n );\n\n const options = {\n ...layerOptions,\n ...props,\n };\n\n const methods = {\n ...layerGroupMethods,\n setGeojson(newVal) {\n leafletRef.value.clearLayers();\n leafletRef.value.addData(newVal);\n },\n getGeoJSONData() {\n return leafletRef.value.toGeoJSON();\n },\n getBounds() {\n return leafletRef.value.getBounds();\n },\n };\n\n return { options, methods };\n};\n\nvar script$8 = {\n props: props$d,\n setup(props, context) {\n const leafletRef = ref({});\n const ready = ref(false);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { methods, options } = setup$d(props, leafletRef, context);\n\n onMounted(async () => {\n const { geoJSON, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = geoJSON(props.geojson, options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n propsBinder(methods, leafletRef.value, props);\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n ready.value = true;\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { ready, leafletObject: leafletRef };\n },\n render() {\n return render(this.ready, this.$slots);\n },\n};\n\nscript$8.__file = \"src/components/LGeoJson.vue\";\n\nconst props$e = {\n ...props$1,\n pane: {\n type: String,\n default: \"tilePane\",\n },\n opacity: {\n type: Number,\n custom: false,\n default: 1.0,\n },\n zIndex: {\n type: Number,\n default: 1,\n },\n tileSize: {\n type: Number,\n default: 256,\n },\n noWrap: {\n type: Boolean,\n default: false,\n },\n minZoom: {\n type: Number,\n default: 0,\n },\n maxZoom: {\n type: Number,\n default: undefined,\n },\n};\n\nconst setup$e = (props, leafletRef, context) => {\n const { options: layerOptions, methods: layerMethods } = setup$1(\n props,\n leafletRef,\n context\n );\n const options = {\n ...layerOptions,\n pane: props.pane,\n opacity: props.opacity,\n zIndex: props.zIndex,\n tileSize: props.tileSize,\n noWrap: props.noWrap,\n minZoom: props.minZoom,\n maxZoom: props.maxZoom,\n };\n return { options, methods: { ...layerMethods } };\n};\n\nvar script$9 = {\n props: {\n ...props$e,\n childRender: {\n type: Function,\n required: true,\n },\n },\n setup(props, context) {\n const leafletRef = ref({});\n const tileComponents = ref({});\n const root = ref(null);\n const ready = ref(false);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { options, methods } = setup$e(props, leafletRef, context);\n\n onMounted(async () => {\n const { GridLayer, DomEvent, DomUtil } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n methods.onUnload = (e) => {\n const key = leafletRef.value._tileCoordsToKey(e.coords);\n if (tileComponents[key]) {\n tileComponents[key].innerHTML = \"\";\n tileComponents[key] = undefined;\n }\n };\n\n methods.setTileComponent = () => {\n leafletRef.value.redraw();\n };\n\n const GLayer = GridLayer.extend({\n createTile(coords) {\n const key = leafletRef.value._tileCoordsToKey(coords);\n tileComponents[key] = DomUtil.create(\"div\");\n\n let vNode = h(\n { setup: props.childRender, props: [\"coords\"] },\n { coords }\n );\n render$3(vNode, tileComponents[key]);\n\n return tileComponents[key];\n },\n });\n\n leafletRef.value = new GLayer(options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n leafletRef.value.on(\"tileunload\", methods.onUnload);\n\n propsBinder(methods, leafletRef.value, props);\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n ready.value = true;\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n\n onUnmounted(() => {\n leafletRef.value.off(\"tileunload\", methods.unLoad);\n });\n\n return { root, ready, leafletObject: leafletRef };\n },\n render() {\n if (this.ready) {\n return h(\"div\", { style: { display: \"none\" }, ref: \"root\" });\n }\n return null;\n },\n};\n\nscript$9.__file = \"src/components/LGridLayer.vue\";\n\nconst props$f = {\n iconUrl: {\n type: String,\n custom: true,\n default: null,\n },\n iconRetinaUrl: {\n type: String,\n custom: true,\n default: null,\n },\n iconSize: {\n type: [Object, Array],\n custom: true,\n default: null,\n },\n iconAnchor: {\n type: [Object, Array],\n custom: true,\n default: null,\n },\n popupAnchor: {\n type: [Object, Array],\n custom: true,\n default: () => [0, 0],\n },\n tooltipAnchor: {\n type: [Object, Array],\n custom: true,\n default: () => [0, 0],\n },\n shadowUrl: {\n type: String,\n custom: true,\n default: null,\n },\n shadowRetinaUrl: {\n type: String,\n custom: true,\n default: null,\n },\n shadowSize: {\n type: [Object, Array],\n custom: true,\n default: null,\n },\n shadowAnchor: {\n type: [Object, Array],\n custom: true,\n default: null,\n },\n bgPos: {\n type: [Object, Array],\n custom: true,\n default: () => [0, 0],\n },\n className: {\n type: String,\n custom: true,\n default: \"\",\n },\n options: {\n type: Object,\n custom: true,\n default: () => ({}),\n },\n};\n\n/**\n * Icon component, lets you add and custom icons to the map\n */\nvar script$a = {\n name: \"LIcon\",\n props: {\n ...props$f,\n ...props,\n },\n setup(props, context) {\n const root = ref(null);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const canSetParentHtml = inject(\"canSetParentHtml\");\n const setParentHtml = inject(\"setParentHtml\");\n const setIcon = inject(\"setIcon\");\n\n let onDomEvent;\n let offDomEvent;\n let divIcon;\n let icon;\n let iconObject = undefined;\n\n const createIcon = (el, recreationNeeded, htmlSwapNeeded) => {\n const elHtml = el && el.innerHTML;\n if (!recreationNeeded) {\n if (htmlSwapNeeded && iconObject && canSetParentHtml()) {\n setParentHtml(elHtml);\n }\n return;\n }\n\n const listeners = remapEvents(context.attrs);\n if (iconObject) {\n offDomEvent(iconObject, listeners);\n }\n\n const { options: componentOptions } = setup(props);\n const options = {\n ...componentOptions,\n iconUrl: props.iconUrl,\n iconRetinaUrl: props.iconRetinaUrl,\n iconSize: props.iconSize,\n iconAnchor: props.iconAnchor,\n popupAnchor: props.popupAnchor,\n tooltipAnchor: props.tooltipAnchor,\n shadowUrl: props.shadowUrl,\n shadowRetinaUrl: props.shadowRetinaUrl,\n shadowSize: props.shadowSize,\n shadowAnchor: props.shadowAnchor,\n bgPos: props.bgPos,\n className: props.className,\n html: elHtml || props.html,\n };\n\n iconObject = options.html ? divIcon(options) : icon(options);\n onDomEvent(iconObject, listeners);\n setIcon(iconObject);\n };\n\n const scheduleCreateIcon = () => {\n nextTick(() => createIcon(root.value, true, false));\n };\n\n const scheduleHtmlSwap = () => {\n nextTick(() => createIcon(root.value, false, true));\n };\n\n const methods = {\n setIconUrl: scheduleCreateIcon,\n setIconRetinaUrl: scheduleCreateIcon,\n setIconSize: scheduleCreateIcon,\n setIconAnchor: scheduleCreateIcon,\n setPopupAnchor: scheduleCreateIcon,\n setTooltipAnchor: scheduleCreateIcon,\n setShadowUrl: scheduleCreateIcon,\n setShadowRetinaUrl: scheduleCreateIcon,\n setShadowAnchor: scheduleCreateIcon,\n setBgPos: scheduleCreateIcon,\n setClassName: scheduleCreateIcon,\n setHtml: scheduleCreateIcon,\n };\n\n onMounted(async () => {\n const { DomEvent, divIcon: lDivIcon, icon: lIcon } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n onDomEvent = DomEvent.on;\n offDomEvent = DomEvent.off;\n divIcon = lDivIcon;\n icon = lIcon;\n\n propsBinder(methods, {}, props);\n\n const observer = new MutationObserver(scheduleHtmlSwap);\n observer.observe(root.value, {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true,\n });\n scheduleCreateIcon();\n });\n\n return { root };\n },\n render() {\n const content = this.$slots.default ? this.$slots.default() : undefined;\n return h(\"div\", { ref: \"root\" }, content);\n },\n};\n\nscript$a.__file = \"src/components/LIcon.vue\";\n\n/**\n * @typedef {import('leaflet/dist/leaflet-src.esm.js').LatLngBounds} LatLngBounds\n */\n\nconst props$g = {\n ...props$1,\n url: {\n type: String,\n required: true,\n },\n bounds: {\n type: [Array, Object],\n required: true,\n },\n opacity: {\n type: Number,\n custom: true,\n default: 1.0,\n },\n alt: {\n type: String,\n default: \"\",\n },\n interactive: {\n type: Boolean,\n default: false,\n },\n crossOrigin: {\n type: Boolean,\n default: false,\n },\n errorOverlayUrl: {\n type: String,\n custom: true,\n default: \"\",\n },\n zIndex: {\n type: Number,\n custom: true,\n default: 1,\n },\n className: {\n type: String,\n default: \"\",\n },\n};\n\nconst setup$f = (setupProps, LeafletRef, context) => {\n const { options: layerOptions, methods: layerMethods } = setup$1(\n setupProps,\n LeafletRef,\n context\n );\n const options = {\n ...layerOptions,\n ...setupProps,\n };\n\n const methods = {\n ...layerMethods,\n /**\n * Sets the opacity of the overlay.\n * @param {number} opacity\n */\n setOpacity(opacity) {\n return LeafletRef.value.setOpacity(opacity);\n },\n /**\n * Changes the URL of the image.\n * @param {string} url\n */\n setUrl(url) {\n return LeafletRef.value.setUrl(url);\n },\n /**\n * Update the bounds that this ImageOverlay covers\n * @param {LatLngBounds | Array<Array<number>>} bounds\n */\n setBounds(bounds) {\n return LeafletRef.value.setBounds(bounds);\n },\n /**\n * Get the bounds that this ImageOverlay covers\n * @returns {LatLngBounds}\n */\n getBounds() {\n return LeafletRef.value.getBounds();\n },\n /**\n * Returns the instance of HTMLImageElement used by this overlay.\n * @returns {HTMLElement}\n */\n getElement() {\n return LeafletRef.value.getElement();\n },\n /**\n * Brings the layer to the top of all overlays.\n */\n bringToFront() {\n return LeafletRef.value.bringToFront();\n },\n /**\n * Brings the layer to the bottom of all overlays.\n */\n bringToBack() {\n return LeafletRef.value.bringToBack();\n },\n /**\n * Changes the zIndex of the image overlay.\n * @param {number} zIndex\n */\n setZIndex(zIndex) {\n return LeafletRef.value.setZIndex(zIndex);\n },\n };\n\n return { options, methods };\n};\n\n/**\n * ImageOverlay component, render a plain image instead of a geospatial map.\n */\nvar script$b = {\n name: \"LImageOverlay\",\n props: props$g,\n setup(props, context) {\n const leafletRef = ref({});\n const ready = ref(false);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { options, methods } = setup$f(props, leafletRef, context);\n\n onMounted(async () => {\n const { imageOverlay, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n leafletRef.value = imageOverlay(props.url, props.bounds, options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n propsBinder(methods, leafletRef.value, props);\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n ready.value = true;\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n\n return { ready, leafletObject: leafletRef };\n },\n render() {\n return render(this.ready, this.$slots);\n },\n};\n\nscript$b.__file = \"src/components/LImageOverlay.vue\";\n\nvar script$c = {\n props: props$b,\n setup(props, context) {\n const leafletRef = ref({});\n const ready = ref(false);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { methods } = setup$b(props, leafletRef, context);\n\n onMounted(async () => {\n const { layerGroup, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n leafletRef.value = layerGroup(props.options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n propsBinder(methods, leafletRef.value, props);\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n ready.value = true;\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { ready, leafletObject: leafletRef };\n },\n render() {\n return render(this.ready, this.$slots);\n },\n};\n\nscript$c.__file = \"src/components/LLayerGroup.vue\";\n\nvar script$d = {\n emits: [\"ready\", \"update:zoom\", \"update:center\", \"update:bounds\"],\n props: {\n ...props,\n /**\n * The center of the map, supports .sync modifier\n */\n center: {\n type: [Object, Array],\n default: () => [0, 0],\n },\n /**\n * The bounds of the map, supports .sync modifier\n */\n bounds: {\n type: [Array, Object],\n default: undefined,\n },\n /**\n * The max bounds of the map\n */\n maxBounds: {\n type: [Array, Object],\n default: undefined,\n },\n /**\n * The zoom of the map, supports .sync modifier\n */\n zoom: {\n type: Number,\n default: 0,\n },\n /**\n * The minZoom of the map\n */\n minZoom: {\n type: Number,\n default: undefined,\n },\n /**\n * The maxZoom of the map\n */\n maxZoom: {\n type: Number,\n default: undefined,\n },\n /**\n * The paddingBottomRight of the map\n */\n paddingBottomRight: {\n type: Array,\n default: undefined,\n },\n /**\n * The paddingTopLeft of the map\n */\n paddingTopLeft: {\n type: Array,\n default: undefined,\n },\n /**\n * The padding of the map\n */\n padding: {\n type: Array,\n default: undefined,\n },\n /**\n * The worldCopyJump option for the map\n */\n worldCopyJump: {\n type: Boolean,\n default: false,\n },\n /**\n * The CRS to use for the map. Can be an object that defines a coordinate reference\n * system for projecting geographical points into screen coordinates and back\n * (see https://leafletjs.com/reference-1.7.1.html#crs-l-crs-base), or a string\n * name identifying one of Leaflet's defined CRSs, such as \"EPSG4326\".\n */\n crs: {\n type: [String, Object],\n default: \"EPSG3857\",\n },\n maxBoundsViscosity: {\n type: Number,\n default: undefined,\n },\n inertia: {\n type: Boolean,\n default: undefined,\n },\n inertiaDeceleration: {\n type: Number,\n default: undefined,\n },\n inertiaMaxSpeed: {\n type: Number,\n default: undefined,\n },\n easeLinearity: {\n type: Number,\n default: undefined,\n },\n zoomAnimation: {\n type: Boolean,\n default: undefined,\n },\n zoomAnimationThreshold: {\n type: Number,\n default: undefined,\n },\n fadeAnimation: {\n type: Boolean,\n default: undefined,\n },\n markerZoomAnimation: {\n type: Boolean,\n default: undefined,\n },\n noBlockingAnimations: {\n type: Boolean,\n default: false,\n },\n useGlobalLeaflet: {\n type: Boolean,\n default: true,\n },\n },\n setup(props, context) {\n const root = ref(null);\n const blueprint = reactive({\n ready: false,\n leafletRef: {},\n layersToAdd: [],\n layersInControl: [],\n });\n const { options: componentOptions } = setup(props);\n const options = {\n ...componentOptions,\n minZoom: props.minZoom,\n maxZoom: props.maxZoom,\n maxBounds: props.maxBounds,\n maxBoundsViscosity: props.maxBoundsViscosity,\n worldCopyJump: props.worldCopyJump,\n crs: props.crs,\n center: props.center,\n zoom: props.zoom,\n inertia: props.inertia,\n inertiaDeceleration: props.inertiaDeceleration,\n inertiaMaxSpeed: props.inertiaMaxSpeed,\n easeLinearity: props.easeLinearity,\n zoomAnimation: props.zoomAnimation,\n zoomAnimationThreshold: props.zoomAnimationThreshold,\n fadeAnimation: props.fadeAnimation,\n markerZoomAnimation: props.markerZoomAnimation,\n };\n\n const addLayer = provideLeafletWrapper(\"addLayer\");\n const removeLayer = provideLeafletWrapper(\"removeLayer\");\n const registerControl = provideLeafletWrapper(\"registerControl\");\n const registerLayerControl = provideLeafletWrapper(\"registerLayerControl\");\n provide(GLOBAL_LEAFLET_OPT, props.useGlobalLeaflet);\n\n const eventHandlers = {\n moveEndHandler() {\n /**\n * Triggers when zoom is updated\n * @type {number,string}\n */\n context.emit(\"update:zoom\", blueprint.leafletRef.getZoom());\n /**\n * Triggers when center is updated\n * @type {object,array}\n */\n context.emit(\"update:center\", blueprint.leafletRef.getCenter());\n\n /**\n * Triggers when bounds are updated\n * @type {object}\n */\n context.emit(\"update:bounds\", blueprint.leafletRef.getBounds());\n },\n overlayAddHandler(e) {\n const layer = blueprint.layersInControl.find((l) => l.name === e.name);\n if (layer) {\n layer.updateVisibleProp(true);\n }\n },\n overlayRemoveHandler(e) {\n const layer = blueprint.layersInControl.find((l) => l.name === e.name);\n if (layer) {\n layer.updateVisibleProp(false);\n }\n },\n };\n\n onMounted(async () => {\n if (props.useGlobalLeaflet) {\n WINDOW_OR_GLOBAL.L = WINDOW_OR_GLOBAL.L || (await import('leaflet'));\n }\n const {\n map,\n CRS,\n Icon,\n latLngBounds,\n latLng,\n DomEvent,\n } = props.useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n try {\n options.beforeMapMount && (await options.beforeMapMount());\n } catch (error) {\n console.error(\n `The following error occurred running the provided beforeMapMount hook ${error.message}`\n );\n }\n\n await resetWebpackIcon(Icon);\n\n const optionsCrs =\n typeof options.crs == \"string\" ? CRS[options.crs] : options.crs;\n options.crs = optionsCrs || CRS.EPSG3857;\n\n const methods = {\n addLayer(layer) {\n if (layer.layerType !== undefined) {\n if (blueprint.layerControl === undefined) {\n blueprint.layersToAdd.push(layer);\n } else {\n const exist = blueprint.layersInControl.find(\n (l) =>\n l.leafletObject._leaflet_id ===\n layer.leafletObject._leaflet_id\n );\n if (!exist) {\n blueprint.layerControl.addLayer(layer);\n blueprint.layersInControl.push(layer);\n }\n }\n }\n if (layer.visible !== false) {\n blueprint.leafletRef.addLayer(layer.leafletObject);\n }\n },\n removeLayer(layer) {\n if (layer.layerType !== undefined) {\n if (blueprint.layerControl === undefined) {\n blueprint.layersToAdd = blueprint.layersToAdd.filter(\n (l) => l.name !== layer.name\n );\n } else {\n blueprint.layerControl.removeLayer(layer.leafletObject);\n blueprint.layersInControl = blueprint.layersInControl.filter(\n (l) =>\n l.leafletObject._leaflet_id !==\n layer.leafletObject._leaflet_id\n );\n }\n }\n blueprint.leafletRef.removeLayer(layer.leafletObject);\n },\n\n registerLayerControl(lControlLayer) {\n blueprint.layerControl = lControlLayer;\n blueprint.layersToAdd.forEach((layer) => {\n blueprint.layerControl.addLayer(layer);\n });\n blueprint.layersToAdd = [];\n\n registerControl(lControlLayer);\n },\n\n registerControl(lControl) {\n blueprint.leafletRef.addControl(lControl.leafletObject);\n },\n\n setZoom(newVal) {\n const zoom = blueprint.leafletRef.getZoom();\n if (newVal !== zoom) {\n blueprint.leafletRef.setZoom(newVal, {\n animate: props.noBlockingAnimations ? false : null,\n });\n }\n },\n\n setPaddingBottomRight(newVal) {\n blueprint.paddingBottomRight = newVal;\n },\n setPaddingTopLeft(newVal) {\n blueprint.paddingTopLeft = newVal;\n },\n setPadding(newVal) {\n blueprint.padding = newVal;\n },\n setCrs(newVal) {\n const prevBounds = blueprint.leafletRef.getBounds();\n blueprint.leafletRef.options.crs = newVal;\n blueprint.leafletRef.fitBounds(prevBounds, {\n animate: false,\n padding: [0, 0],\n });\n },\n fitBounds(bounds) {\n blueprint.leafletRef.fitBounds(bounds, {\n animate: this.noBlockingAnimations ? false : null,\n });\n },\n setBounds(newVal) {\n if (!newVal) {\n return;\n }\n const newBounds = latLngBounds(newVal);\n if (!newBounds.isValid()) {\n return;\n }\n const oldBounds =\n blueprint.lastSetBounds || blueprint.leafletRef.getBounds();\n const boundsChanged = !oldBounds.equals(newBounds, 0); // set maxMargin to 0 - check exact equals\n if (boundsChanged) {\n blueprint.lastSetBounds = newBounds;\n blueprint.leafletRef.fitBounds(newBounds, this.fitBoundsOptions);\n }\n },\n\n setCenter(newVal) {\n if (newVal == null) {\n return;\n }\n const newCenter = latLng(newVal);\n const oldCenter =\n blueprint.lastSetCenter || blueprint.leafletRef.getCenter();\n if (\n oldCenter.lat !== newCenter.lat ||\n oldCenter.lng !== newCenter.lng\n ) {\n blueprint.lastSetCenter = newCenter;\n blueprint.leafletRef.panTo(newCenter, {\n animate: this.noBlockingAnimations ? false : null,\n });\n }\n },\n };\n\n updateLeafletWrapper(addLayer, methods.addLayer);\n updateLeafletWrapper(removeLayer, methods.removeLayer);\n updateLeafletWrapper(registerControl, methods.registerControl);\n updateLeafletWrapper(registerLayerControl, methods.registerLayerControl);\n\n blueprint.leafletRef = map(root.value, options);\n\n propsBinder(methods, blueprint.leafletRef, props);\n const listeners = remapEvents(context.attrs);\n\n blueprint.leafletRef.on(\n \"moveend\",\n debounce(eventHandlers.moveEndHandler, 100)\n );\n blueprint.leafletRef.on(\"overlayadd\", eventHandlers.overlayAddHandler);\n blueprint.leafletRef.on(\n \"overlayremove\",\n eventHandlers.overlayRemoveHandler\n );\n DomEvent.on(blueprint.leafletRef, listeners);\n blueprint.ready = true;\n nextTick(() => context.emit(\"ready\", blueprint.leafletRef));\n });\n\n onBeforeUnmount(() => {\n if (blueprint.leafletRef) {\n blueprint.leafletRef.remove();\n }\n });\n\n const leafletObject = computed(() => blueprint.leafletRef);\n const ready = computed(() => blueprint.ready);\n return { root, ready, leafletObject };\n },\n render() {\n return h(\n \"div\",\n { style: { width: \"100%\", height: \"100%\" }, ref: \"root\" },\n this.ready ? this.$slots.default() : {}\n );\n },\n};\n\nscript$d.__file = \"src/components/LMap.vue\";\n\nconst props$h = {\n ...props$1,\n pane: {\n type: String,\n default: \"markerPane\",\n },\n draggable: {\n type: Boolean,\n custom: true,\n default: false,\n },\n latLng: {\n type: [Object, Array],\n custom: true,\n default: null,\n },\n icon: {\n type: [Object],\n default: () => undefined,\n custom: false,\n },\n zIndexOffset: {\n type: Number,\n custom: false,\n default: null,\n },\n};\n\nconst setup$g = (props, leafletRef, context) => {\n const { options: layerOptions, methods: layerMethods } = setup$1(\n props,\n leafletRef,\n context\n );\n const options = {\n ...layerOptions,\n ...props,\n };\n\n const methods = {\n ...layerMethods,\n setDraggable(value) {\n if (leafletRef.value.dragging) {\n value\n ? leafletRef.value.dragging.enable()\n : leafletRef.value.dragging.disable();\n }\n },\n latLngSync(event) {\n context.emit(\"update:latLng\", event.latlng);\n context.emit(\"update:lat-lng\", event.latlng);\n },\n setLatLng(newVal) {\n if (newVal == null) {\n return;\n }\n\n if (leafletRef.value) {\n const oldLatLng = leafletRef.value.getLatLng();\n if (!oldLatLng || !oldLatLng.equals(newVal)) {\n leafletRef.value.setLatLng(newVal);\n }\n }\n },\n };\n return { options, methods };\n};\n\n/**\n * Marker component, lets you add and personalize markers on the map\n */\nvar script$e = {\n name: \"LMarker\",\n props: props$h,\n setup(props, context) {\n const leafletRef = ref({});\n const ready = ref(false);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n provide(\"canSetParentHtml\", () => !!leafletRef.value.getElement());\n provide(\n \"setParentHtml\",\n (html) => (leafletRef.value.getElement().innerHTML = html)\n );\n provide(\n \"setIcon\",\n (newIcon) => leafletRef.value.setIcon && leafletRef.value.setIcon(newIcon)\n );\n const { options, methods } = setup$g(props, leafletRef, context);\n if (options.icon === undefined) {\n // If the options objection has a property named 'icon', then Leaflet will overwrite\n // the default icon with it for the marker, _even if it is undefined_.\n // This leads to the issue discussed in https://github.com/vue-leaflet/vue-leaflet/issues/130\n delete options.icon;\n }\n\n onMounted(async () => {\n const { marker, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n leafletRef.value = marker(props.latLng, options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n leafletRef.value.on(\"move\", debounce(methods.latLngSync, 100));\n propsBinder(methods, leafletRef.value, props);\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n ready.value = true;\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n\n return { ready, leafletObject: leafletRef };\n },\n render() {\n return render(this.ready, this.$slots);\n },\n};\n\nscript$e.__file = \"src/components/LMarker.vue\";\n\nconst props$i = {\n ...props$3,\n latLngs: {\n type: Array,\n default: () => [],\n },\n smoothFactor: {\n type: Number,\n custom: true,\n default: 1.0,\n },\n noClip: {\n type: Boolean,\n custom: true,\n default: false,\n },\n};\n\nconst setup$h = (props, leafletRef, context) => {\n const { options: pathOptions, methods: pathMethods } = setup$3(\n props,\n leafletRef,\n context\n );\n const options = {\n ...pathOptions,\n ...props,\n };\n\n const methods = {\n ...pathMethods,\n setSmoothFactor(smoothFactor) {\n leafletRef.value.setStyle({ smoothFactor });\n },\n setNoClip(noClip) {\n leafletRef.value.setStyle({ noClip });\n },\n addLatLng(latLng) {\n leafletRef.value.addLatLng(latLng);\n },\n };\n return { options, methods };\n};\n\nconst props$j = {\n ...props$i,\n};\n\nconst setup$i = (props, leafletRef, context) => {\n const { options: polylineOptions, methods: polylineMethods } = setup$h(\n props,\n leafletRef,\n context\n );\n const options = {\n ...polylineOptions,\n ...props,\n };\n\n const methods = {\n ...polylineMethods,\n toGeoJSON(precision) {\n return leafletRef.value.toGeoJSON(precision);\n },\n };\n\n return { options, methods };\n};\n\n/**\n * Polygon component, lets you add and customize polygon regions on the map\n */\nvar script$f = {\n name: \"LPolygon\",\n props: props$j,\n setup(props, context) {\n const leafletRef = ref({});\n const ready = ref(false);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { options, methods } = setup$i(props, leafletRef, context);\n\n onMounted(async () => {\n const { polygon, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = polygon(props.latLngs, options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n propsBinder(methods, leafletRef.value, props);\n\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n ready.value = true;\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n\n return { ready, leafletObject: leafletRef };\n },\n render() {\n return render(this.ready, this.$slots);\n },\n};\n\nscript$f.__file = \"src/components/LPolygon.vue\";\n\n/**\n * Polyline component, lets you add and personalize polylines on the map\n */\nvar script$g = {\n name: \"LPolyline\",\n props: props$i,\n setup(props, context) {\n const leafletRef = ref({});\n const ready = ref(false);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { options, methods } = setup$h(props, leafletRef, context);\n\n onMounted(async () => {\n const { polyline, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = polyline(props.latLngs, options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n propsBinder(methods, leafletRef.value, props);\n\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n ready.value = true;\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { ready, leafletObject: leafletRef };\n },\n render() {\n return render(this.ready, this.$slots);\n },\n};\n\nscript$g.__file = \"src/components/LPolyline.vue\";\n\nconst props$k = {\n ...props,\n content: {\n type: String,\n default: null,\n },\n};\n\nconst setup$j = (props, leafletRef) => {\n const { options, methods: componentMethods } = setup(props);\n const methods = {\n ...componentMethods,\n setContent(newVal) {\n if (leafletRef.value && newVal !== null && newVal !== undefined) {\n leafletRef.value.setContent(newVal);\n }\n },\n };\n return { options, methods };\n};\n\nconst render$2 = (slots) => {\n if (slots.default) {\n return h(\"div\", { ref: \"root\" }, slots.default());\n }\n return null;\n};\n\nconst props$l = {\n ...props$k,\n latLng: {\n type: [Object, Array],\n default: () => [],\n },\n};\n\nconst setup$k = (props, leafletRef) => {\n const { options, methods } = setup$j(props, leafletRef);\n const unbindPopup = inject(\"unbindPopup\");\n\n onBeforeUnmount(() => {\n unbindPopup();\n });\n\n return { options, methods };\n};\n\n/**\n * Display a popup on the map\n */\nvar script$h = {\n name: \"LPopup\",\n props: props$l,\n setup(props, context) {\n const leafletRef = ref({});\n const root = ref(null);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const bindPopup = inject(\"bindPopup\");\n\n const { options, methods } = setup$k(props, leafletRef);\n\n onMounted(async () => {\n const { popup, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = popup(options);\n\n if (props.latLng !== undefined) {\n leafletRef.value.setLatLng(props.latLng);\n }\n\n propsBinder(methods, leafletRef.value, props);\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n leafletRef.value.setContent(props.content || root.value);\n bindPopup({ leafletObject: leafletRef.value });\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { root, leafletObject: leafletRef };\n },\n render() {\n return render$2(this.$slots);\n },\n};\n\nscript$h.__file = \"src/components/LPopup.vue\";\n\nconst props$m = {\n ...props$j,\n bounds: {\n type: Array,\n default: undefined,\n },\n};\n\nconst setup$l = (props, leafletRef, context) => {\n const { options: polygonOptions, methods: polygonMethods } = setup$i(\n props,\n leafletRef,\n context\n );\n const options = {\n ...polygonOptions,\n ...props,\n };\n\n const methods = {\n ...polygonMethods,\n setBounds(latLngBounds) {\n leafletRef.value.setBounds(latLngBounds);\n },\n setLatLngs(latLngs) {\n // Calling setLatLngs on a Leaflet rectangle will convert it\n // to a polygon. So instead, we call setBounds here to ensure\n // that the rectangle remains a rectangle, defined by the\n // bounds of the points in the latLngs array.\n leafletRef.value.setBounds(latLngs);\n },\n };\n\n return { options, methods };\n};\n\n/**\n * Rectangle component, lets you add and customize rectangular regions on the map\n */\nvar script$i = {\n name: \"LRectangle\",\n props: props$m,\n setup(props, context) {\n const leafletRef = ref({});\n const ready = ref(false);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { options, methods } = setup$l(props, leafletRef, context);\n\n onMounted(async () => {\n const { rectangle, latLngBounds, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n const bounds =\n props.bounds && props.bounds.length\n ? latLngBounds(props.bounds)\n : latLngBounds(props.latLngs);\n leafletRef.value = rectangle(bounds, options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n propsBinder(methods, leafletRef.value, props);\n\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n ready.value = true;\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n\n return { ready, leafletObject: leafletRef };\n },\n render() {\n return render(this.ready, this.$slots);\n },\n};\n\nscript$i.__file = \"src/components/LRectangle.vue\";\n\nconst props$n = {\n ...props$e,\n tms: {\n type: Boolean,\n default: false,\n },\n subdomains: {\n type: String,\n default: \"abc\",\n },\n detectRetina: {\n type: Boolean,\n default: false,\n },\n url: {\n type: String,\n default: null,\n },\n};\n\nconst setup$m = (props, leafletRef, context) => {\n const {\n options: gridLayerOptions,\n methods: gridLayerMethods,\n } = setup$e(props, leafletRef, context);\n const options = {\n ...gridLayerOptions,\n tms: props.tms,\n subdomains: props.subdomains,\n detectRetina: props.detectRetina,\n };\n return {\n options,\n methods: {\n ...gridLayerMethods,\n },\n };\n};\n\nvar script$j = {\n props: props$n,\n setup(props, context) {\n const leafletRef = ref({});\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { options, methods } = setup$m(props, leafletRef, context);\n\n onMounted(async () => {\n const { tileLayer, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n leafletRef.value = tileLayer(props.url, options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n propsBinder(methods, leafletRef.value, props);\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n\n return { leafletObject: leafletRef };\n },\n render() {\n return null;\n },\n};\n\nscript$j.__file = \"src/components/LTileLayer.vue\";\n\nconst props$o = {\n ...props$k,\n};\n\nconst setup$n = (props, leafletRef) => {\n const { options, methods } = setup$j(props, leafletRef);\n const unbindTooltip = inject(\"unbindTooltip\");\n\n onBeforeUnmount(() => {\n unbindTooltip();\n });\n\n return { options, methods };\n};\n\n/**\n * Display a tooltip on the map\n */\nvar script$k = {\n name: \"LTooltip\",\n props: props$o,\n setup(props, context) {\n const leafletRef = ref({});\n const root = ref(null);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const bindTooltip = inject(\"bindTooltip\");\n\n const { options, methods } = setup$n(props, leafletRef);\n\n onMounted(async () => {\n const { tooltip, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = tooltip(options);\n\n propsBinder(methods, leafletRef.value, props);\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n leafletRef.value.setContent(props.content || root.value);\n bindTooltip({ leafletObject: leafletRef.value });\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { root, leafletObject: leafletRef };\n },\n render() {\n return render$2(this.$slots);\n },\n};\n\nscript$k.__file = \"src/components/LTooltip.vue\";\n\nconst props$p = {\n ...props$n,\n baseUrl: {\n type: String,\n default: null,\n required: true,\n },\n layers: {\n type: String,\n default: \"\",\n },\n styles: {\n type: String,\n default: \"\",\n },\n format: {\n type: String,\n default: \"image/jpeg\",\n },\n transparent: {\n type: Boolean,\n custom: false,\n },\n version: {\n type: String,\n default: \"1.1.1\",\n },\n crs: {\n default: null,\n },\n upperCase: {\n type: Boolean,\n default: false,\n },\n};\n\nconst setup$o = (props, leafletRef) => {\n const {\n options: tileLayerOptions,\n methods: tileLayerMethods,\n } = setup$m(props, leafletRef);\n const options = {\n ...tileLayerOptions,\n layers: props.layers,\n styles: props.styles,\n format: props.format,\n transparent: props.transparent,\n version: props.version,\n crs: props.crs,\n upperCase: props.upperCase,\n };\n return {\n options,\n methods: {\n ...tileLayerMethods,\n },\n };\n};\n\nvar script$l = {\n props: props$p,\n setup(props, context) {\n const leafletRef = ref({});\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { options, methods } = setup$o(props, leafletRef);\n\n onMounted(async () => {\n const { tileLayer, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = tileLayer.wms(props.baseUrl, options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n propsBinder(methods, leafletRef.value, props);\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { leafletObject: leafletRef.value };\n },\n render() {\n return null;\n },\n};\n\nscript$l.__file = \"src/components/LWmsTileLayer.vue\";\n\nexport { script as LCircle, script$1 as LCircleMarker, script$2 as LControl, script$3 as LControlAttribution, script$4 as LControlLayers, script$5 as LControlScale, script$6 as LControlZoom, script$7 as LFeatureGroup, script$8 as LGeoJson, script$9 as LGridLayer, script$a as LIcon, script$b as LImageOverlay, script$c as LLayerGroup, script$d as LMap, script$e as LMarker, script$f as LPolygon, script$g as LPolyline, script$h as LPopup, script$i as LRectangle, script$j as LTileLayer, script$k as LTooltip, script$l as LWmsTileLayer };\n//# sourceMappingURL=vue-leaflet.esm.js.map\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nimport { LIcon, LMarker } from '@vue-leaflet/vue-leaflet'\n import { toRefs } from 'vue'\n\n import { TCoordinates } from '@/types/workouts'\n\n interface Props {\n markerCoordinates: TCoordinates\n isStart: boolean\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'CustomMarker',\n props: {\n markerCoordinates: null,\n isStart: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props as {\n markerCoordinates: TCoordinates\n isStart: boolean\n };\n\n \n\n const { isStart, markerCoordinates } = toRefs(props)\n\nreturn (_ctx: any,_cache: any) => {\n return (_unref(markerCoordinates).latitude)\n ? (_openBlock(), _createBlock(_unref(LMarker), {\n key: 0,\n \"lat-lng\": [_unref(markerCoordinates).latitude, _unref(markerCoordinates).longitude]\n }, {\n default: _withCtx(() => [\n _createVNode(_unref(LIcon), {\n \"icon-url\": `/img/workouts/${_unref(isStart) ? 'start' : 'finish'}.svg`,\n iconSize: [15, 15]\n }, null, 8, [\"icon-url\"])\n ]),\n _: 1\n }, 8, [\"lat-lng\"]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./CustomMarker.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./CustomMarker.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, createElementVNode as _createElementVNode, withCtx as _withCtx, normalizeClass as _normalizeClass, createBlock as _createBlock, resolveComponent as _resolveComponent, toDisplayString as _toDisplayString, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6b490f5d\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { id: \"workout-map\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"leaflet-container\"\n}\nconst _hoisted_3 = { key: 1 }\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-refresh\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_5 = {\n key: 1,\n class: \"no-map\"\n}\n\nimport { gpx } from '@tmcw/togeojson'\n import {\n LControl,\n LControlLayers,\n LGeoJson,\n LLayerGroup,\n LMap,\n LMarker,\n LTileLayer,\n } from '@vue-leaflet/vue-leaflet'\n import { ComputedRef, computed, ref, toRefs, withDefaults } from 'vue'\n import 'leaflet/dist/leaflet.css'\n\n import CustomMarker from '@/components/Workout/WorkoutDetail/WorkoutMap/CustomMarker.vue'\n import { ROOT_STORE } from '@/store/constants'\n import { TAppConfig } from '@/types/application'\n import { GeoJSONData } from '@/types/geojson'\n import { IWorkoutData, TCoordinates } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { getApiUrl } from '@/utils'\n\n interface Props {\n workoutData: IWorkoutData\n markerCoordinates?: TCoordinates\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n workoutData: null,\n markerCoordinates: { default: () => ({} as TCoordinates) }\n },\n setup(__props: any) {\n\nconst props = __props as { workoutData: IWorkoutData, markerCoordinates: TCoordinates };\n\n \n\n const store = useStore()\n\n const { workoutData, markerCoordinates } = toRefs(props)\n const workoutMap = ref<null | {\n leafletObject: { fitBounds: (bounds: number[][]) => null }\n }>(null)\n const bounds = computed(() => getBounds())\n const appConfig: ComputedRef<TAppConfig> = computed(\n () => store.getters[ROOT_STORE.GETTERS.APP_CONFIG]\n )\n const center = computed(() => getCenter(bounds))\n const geoJson = computed(() =>\n props.workoutData && props.workoutData.gpx\n ? getGeoJson(props.workoutData.gpx)\n : {}\n )\n const startMarkerCoordinates = computed(() =>\n props.workoutData && props.workoutData.chartData.length > 0\n ? {\n latitude: props.workoutData.chartData[0].latitude,\n longitude: props.workoutData.chartData[0].longitude,\n }\n : {}\n )\n const endMarkerCoordinates = computed(() =>\n props.workoutData && props.workoutData.chartData.length > 0\n ? {\n latitude:\n props.workoutData.chartData[props.workoutData.chartData.length - 1]\n .latitude,\n longitude:\n props.workoutData.chartData[props.workoutData.chartData.length - 1]\n .longitude,\n }\n : {}\n )\n const isFullscreen = ref(false)\n\n function getGeoJson(gpxContent: string): GeoJSONData {\n if (!gpxContent || gpxContent !== '') {\n try {\n const jsonData = gpx(\n new DOMParser().parseFromString(gpxContent, 'text/xml')\n )\n return { jsonData }\n } catch (e) {\n console.error('Invalid gpx content')\n return {}\n }\n }\n return {}\n }\n function getCenter(bounds: ComputedRef<number[][]>): number[] {\n return [\n (bounds.value[0][0] + bounds.value[1][0]) / 2,\n (bounds.value[0][1] + bounds.value[1][1]) / 2,\n ]\n }\n function fitBounds(bounds: number[][]) {\n if (workoutMap.value?.leafletObject) {\n workoutMap.value?.leafletObject.fitBounds(bounds)\n }\n }\n function getBounds() {\n return props.workoutData\n ? [\n [\n props.workoutData.workout.bounds[0],\n props.workoutData.workout.bounds[1],\n ],\n [\n props.workoutData.workout.bounds[2],\n props.workoutData.workout.bounds[3],\n ],\n ]\n : []\n }\n function resetZoom() {\n workoutMap.value?.leafletObject.fitBounds(getBounds())\n }\n function toggleFullscreen() {\n isFullscreen.value = !isFullscreen.value\n if (!isFullscreen.value) {\n setTimeout(() => {\n resetZoom()\n }, 100)\n }\n }\n\nreturn (_ctx: any,_cache: any) => {\n const _component_VFullscreen = _resolveComponent(\"VFullscreen\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_unref(workoutData).loading)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_3, [\n (_unref(workoutData).workout.with_gpx)\n ? (_openBlock(), _createBlock(_component_VFullscreen, {\n key: 0,\n modelValue: isFullscreen.value,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => ((isFullscreen).value = $event))\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"leaflet-container\", { 'fullscreen-map': isFullscreen.value }])\n }, [\n (_unref(geoJson).jsonData && _unref(center) && _unref(bounds).length === 2)\n ? (_openBlock(), _createBlock(_unref(LMap), {\n key: 0,\n zoom: 13,\n maxZoom: 19,\n center: _unref(center),\n bounds: _unref(bounds),\n ref_key: \"workoutMap\",\n ref: workoutMap,\n onReady: _cache[0] || (_cache[0] = ($event: any) => (fitBounds(_unref(bounds))))\n }, {\n default: _withCtx(() => [\n _createVNode(_unref(LControlLayers)),\n _createVNode(_unref(LControl), {\n position: \"topleft\",\n class: \"map-control\",\n onClick: resetZoom\n }, {\n default: _withCtx(() => [\n _hoisted_4\n ]),\n _: 1\n }),\n _createVNode(_unref(LControl), {\n position: \"topleft\",\n class: \"map-control\",\n onClick: toggleFullscreen\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"i\", {\n class: _normalizeClass(`fa fa-${isFullscreen.value ? 'compress' : 'arrows-alt'}`),\n \"aria-hidden\": \"true\"\n }, null, 2)\n ]),\n _: 1\n }),\n _createVNode(_unref(LTileLayer), {\n url: `${_unref(getApiUrl)()}workouts/map_tile/{s}/{z}/{x}/{y}.png`,\n attribution: _unref(appConfig).map_attribution,\n bounds: _unref(bounds)\n }, null, 8, [\"url\", \"attribution\", \"bounds\"]),\n _createVNode(_unref(LGeoJson), {\n geojson: _unref(geoJson).jsonData\n }, null, 8, [\"geojson\"]),\n (_unref(markerCoordinates).latitude)\n ? (_openBlock(), _createBlock(_unref(LMarker), {\n key: 0,\n \"lat-lng\": [\n _unref(markerCoordinates).latitude,\n _unref(markerCoordinates).longitude,\n ]\n }, null, 8, [\"lat-lng\"]))\n : _createCommentVNode(\"\", true),\n _createVNode(_unref(LLayerGroup), {\n name: _ctx.$t('workouts.START_AND_FINISH'),\n \"layer-type\": \"overlay\"\n }, {\n default: _withCtx(() => [\n (_unref(startMarkerCoordinates).latitude)\n ? (_openBlock(), _createBlock(CustomMarker, {\n key: 0,\n markerCoordinates: _unref(startMarkerCoordinates),\n isStart: true\n }, null, 8, [\"markerCoordinates\"]))\n : _createCommentVNode(\"\", true),\n (_unref(endMarkerCoordinates).latitude)\n ? (_openBlock(), _createBlock(CustomMarker, {\n key: 1,\n markerCoordinates: _unref(endMarkerCoordinates),\n isStart: false\n }, null, 8, [\"markerCoordinates\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }, 8, [\"name\"])\n ]),\n _: 1\n }, 8, [\"center\", \"bounds\"]))\n : _createCommentVNode(\"\", true)\n ], 2)\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_5, _toDisplayString(_ctx.$t('workouts.NO_MAP')), 1))\n ]))\n ]))\n}\n}\n\n})","import script from \"./index.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./index.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./index.vue?vue&type=style&index=0&id=6b490f5d&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6b490f5d\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, withCtx as _withCtx, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-9fc0bab8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"workout-detail\" }\n\nimport {\n ComputedRef,\n Ref,\n computed,\n ref,\n toRefs,\n watch,\n withDefaults,\n } from 'vue'\n import { useRoute } from 'vue-router'\n\n import WorkoutCardTitle from '@/components/Workout/WorkoutDetail/WorkoutCardTitle.vue'\n import WorkoutData from '@/components/Workout/WorkoutDetail/WorkoutData.vue'\n import WorkoutMap from '@/components/Workout/WorkoutDetail/WorkoutMap/index.vue'\n import { WORKOUTS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import {\n IWorkout,\n IWorkoutData,\n IWorkoutObject,\n IWorkoutSegment,\n TCoordinates,\n } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { formatWorkoutDate, getDateWithTZ } from '@/utils/dates'\n\n interface Props {\n authUser: IAuthUserProfile\n displaySegment: boolean\n sports: ISport[]\n workoutData: IWorkoutData\n markerCoordinates?: TCoordinates\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n authUser: null,\n displaySegment: { type: Boolean },\n sports: null,\n workoutData: null,\n markerCoordinates: { default: () => ({} as TCoordinates) }\n },\n setup(__props: any) {\n\nconst props = __props as { authUser: IAuthUserProfile, displaySegment: boolean, sports: ISport[], workoutData: IWorkoutData, markerCoordinates: TCoordinates };\n\n \n\n const route = useRoute()\n const store = useStore()\n\n const { authUser, markerCoordinates, workoutData } = toRefs(props)\n const workout: ComputedRef<IWorkout> = computed(\n () => props.workoutData.workout\n )\n const segmentId: Ref<number | null> = ref(\n route.params.workoutId ? +route.params.segmentId : null\n )\n const segment: ComputedRef<IWorkoutSegment | null> = computed(() =>\n workout.value.segments.length > 0 && segmentId.value\n ? workout.value.segments[+segmentId.value - 1]\n : null\n )\n const displayModal: Ref<boolean> = ref(false)\n const sport = computed(() =>\n props.sports\n ? props.sports.find(\n (sport) => sport.id === props.workoutData.workout.sport_id\n )\n : {}\n )\n const workoutObject = computed(() =>\n getWorkoutObject(workout.value, segment.value)\n )\n\n function getWorkoutObjectUrl(\n workout: IWorkout,\n displaySegment: boolean,\n segmentId: number | null\n ): Record<string, string | null> {\n const previousUrl =\n displaySegment && segmentId && segmentId !== 1\n ? `/workouts/${workout.id}/segment/${segmentId - 1}`\n : !displaySegment && workout.previous_workout\n ? `/workouts/${workout.previous_workout}`\n : null\n const nextUrl =\n displaySegment && segmentId && segmentId < workout.segments.length\n ? `/workouts/${workout.id}/segment/${segmentId + 1}`\n : !displaySegment && workout.next_workout\n ? `/workouts/${workout.next_workout}`\n : null\n return {\n previousUrl,\n nextUrl,\n }\n }\n function getWorkoutObject(\n workout: IWorkout,\n segment: IWorkoutSegment | null\n ): IWorkoutObject {\n const urls = getWorkoutObjectUrl(\n workout,\n props.displaySegment,\n segmentId.value ? +segmentId.value : null\n )\n const workoutDate = formatWorkoutDate(\n getDateWithTZ(\n props.workoutData.workout.workout_date,\n props.authUser.timezone\n ),\n props.authUser.date_format\n )\n return {\n ascent: segment ? segment.ascent : workout.ascent,\n aveSpeed: segment ? segment.ave_speed : workout.ave_speed,\n distance: segment ? segment.distance : workout.distance,\n descent: segment ? segment.descent : workout.descent,\n duration: segment ? segment.duration : workout.duration,\n maxAlt: segment ? segment.max_alt : workout.max_alt,\n maxSpeed: segment ? segment.max_speed : workout.max_speed,\n minAlt: segment ? segment.min_alt : workout.min_alt,\n moving: segment ? segment.moving : workout.moving,\n nextUrl: urls.nextUrl,\n pauses: segment ? segment.pauses : workout.pauses,\n previousUrl: urls.previousUrl,\n records: segment ? [] : workout.records,\n segmentId: segment ? segment.segment_id : null,\n title: workout.title,\n type: props.displaySegment ? 'SEGMENT' : 'WORKOUT',\n workoutDate: workoutDate.workout_date,\n weatherEnd: segment ? null : workout.weather_end,\n weatherStart: segment ? null : workout.weather_start,\n with_gpx: workout.with_gpx,\n workoutId: workout.id,\n workoutTime: workoutDate.workout_time,\n }\n }\n function updateDisplayModal(value: boolean) {\n displayModal.value = value\n }\n function deleteWorkout(workoutId: string) {\n store.dispatch(WORKOUTS_STORE.ACTIONS.DELETE_WORKOUT, {\n workoutId: workoutId,\n })\n }\n\n watch(\n () => route.params.segmentId,\n async (newSegmentId) => {\n if (newSegmentId) {\n segmentId.value = +newSegmentId\n }\n }\n )\n\nreturn (_ctx: any,_cache: any) => {\n const _component_Modal = _resolveComponent(\"Modal\")!\n const _component_Card = _resolveComponent(\"Card\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (displayModal.value)\n ? (_openBlock(), _createBlock(_component_Modal, {\n key: 0,\n title: _ctx.$t('common.CONFIRMATION'),\n message: _ctx.$t('workouts.WORKOUT_DELETION_CONFIRMATION'),\n onConfirmAction: _cache[0] || (_cache[0] = ($event: any) => (deleteWorkout(_unref(workoutObject).workoutId))),\n onCancelAction: _cache[1] || (_cache[1] = ($event: any) => (updateDisplayModal(false)))\n }, null, 8, [\"title\", \"message\"]))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_Card, null, {\n title: _withCtx(() => [\n _createVNode(WorkoutCardTitle, {\n sport: _unref(sport),\n workoutObject: _unref(workoutObject),\n onDisplayModal: _cache[2] || (_cache[2] = ($event: any) => (updateDisplayModal(true)))\n }, null, 8, [\"sport\", \"workoutObject\"])\n ]),\n content: _withCtx(() => [\n _createVNode(WorkoutMap, {\n workoutData: _unref(workoutData),\n markerCoordinates: _unref(markerCoordinates)\n }, null, 8, [\"workoutData\", \"markerCoordinates\"]),\n _createVNode(WorkoutData, {\n workoutObject: _unref(workoutObject),\n useImperialUnits: _unref(authUser).imperial_units,\n displayHARecord: _unref(authUser).display_ascent\n }, null, 8, [\"workoutObject\", \"useImperialUnits\", \"displayHARecord\"])\n ]),\n _: 1\n })\n ]))\n}\n}\n\n})","import script from \"./index.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./index.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./index.vue?vue&type=style&index=0&id=9fc0bab8&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-9fc0bab8\"]])\n\nexport default __exports__","import { Chart, LegendItem } from 'chart.js'\n\nconst getOrCreateLegendList = (id: string): HTMLUListElement => {\n const legendContainer = document.getElementById(id)\n if (legendContainer) {\n let listContainer = legendContainer.querySelector('ul')\n if (!listContainer) {\n listContainer = document.createElement('ul')\n legendContainer.appendChild(listContainer)\n }\n return listContainer\n }\n throw new Error('No legend container')\n}\n\nexport const htmlLegendPlugin = {\n id: 'htmlLegend',\n afterUpdate(\n chart: Chart,\n args: Record<string, unknown>,\n options: Record<string, string>\n ): void {\n const ul = getOrCreateLegendList(options.containerID)\n while (ul.firstChild) {\n ul.firstChild.remove()\n }\n\n const legendItems = chart.options.plugins?.legend?.labels?.generateLabels\n ? chart.options.plugins?.legend?.labels?.generateLabels(chart)\n : []\n\n legendItems.forEach((item: LegendItem) => {\n const li = document.createElement('li')\n li.onclick = () => {\n if (item.datasetIndex !== undefined) {\n chart.setDatasetVisibility(\n item.datasetIndex,\n !chart.isDatasetVisible(item.datasetIndex)\n )\n chart.update()\n }\n }\n\n const checkBox = document.createElement('input')\n if (checkBox) {\n checkBox.type = 'checkbox'\n checkBox.id = item.text\n checkBox.checked = !item.hidden\n }\n\n const text = document.createTextNode(item.text)\n\n const boxSpan = document.createElement('span')\n if (boxSpan) {\n boxSpan.style.background = String(item.fillStyle)\n boxSpan.style.borderColor = String(item.strokeStyle)\n }\n\n li.appendChild(checkBox)\n li.appendChild(text)\n li.appendChild(boxSpan)\n ul.appendChild(li)\n })\n },\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, unref as _unref, mergeProps as _mergeProps, createVNode as _createVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-0b68c436\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { id: \"workout-chart\" }\nconst _hoisted_2 = { class: \"chart-radio\" }\nconst _hoisted_3 = [\"checked\"]\nconst _hoisted_4 = [\"checked\"]\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { id: \"chart-legend\" }, null, -1))\nconst _hoisted_6 = { class: \"chart-info\" }\nconst _hoisted_7 = { class: \"no-data-cleaning\" }\nconst _hoisted_8 = { class: \"elevation-start\" }\nconst _hoisted_9 = [\"checked\"]\n\nimport { ChartData, ChartOptions } from 'chart.js'\n import { ComputedRef, computed, ref } from 'vue'\n import { LineChart, useLineChart } from 'vue-chart-3'\n import { useI18n } from 'vue-i18n'\n\n import { htmlLegendPlugin } from '@/components/Workout/WorkoutDetail/WorkoutChart/legend'\n import { TUnit } from '@/types/units'\n import { IAuthUserProfile } from '@/types/user'\n import {\n IWorkoutChartData,\n IWorkoutData,\n TCoordinates,\n } from '@/types/workouts'\n import { units } from '@/utils/units'\n import { getDatasets } from '@/utils/workouts'\n\n interface Props {\n authUser: IAuthUserProfile\n workoutData: IWorkoutData\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n authUser: null,\n workoutData: null\n },\n emits: ['getCoordinates'],\n setup(__props: any, { emit }) {\n\nconst props = __props as {\n authUser: IAuthUserProfile\n workoutData: IWorkoutData\n };\n\n \n\n \n\n const { t } = useI18n()\n\n const displayDistance = ref(true)\n const beginElevationAtZero = ref(true)\n const datasets: ComputedRef<IWorkoutChartData> = computed(() =>\n getDatasets(props.workoutData.chartData, t, props.authUser.imperial_units)\n )\n const fromKmUnit = getUnitTo('km')\n const fromMUnit = getUnitTo('m')\n const chartData: ComputedRef<ChartData<'line'>> = computed(() => ({\n labels: displayDistance.value\n ? datasets.value.distance_labels\n : datasets.value.duration_labels,\n datasets: JSON.parse(\n JSON.stringify([\n datasets.value.datasets.speed,\n datasets.value.datasets.elevation,\n ])\n ),\n }))\n const coordinates: ComputedRef<TCoordinates[]> = computed(\n () => datasets.value.coordinates\n )\n const options = computed<ChartOptions<'line'>>(() => ({\n responsive: true,\n maintainAspectRatio: true,\n animation: false,\n layout: {\n padding: {\n top: 22,\n },\n },\n scales: {\n x: {\n grid: {\n drawOnChartArea: false,\n },\n ticks: {\n count: 10,\n callback: function (value) {\n return displayDistance.value\n ? Number(value).toFixed(2)\n : formatDuration(value)\n },\n },\n type: 'linear',\n bounds: 'data',\n title: {\n display: true,\n text: displayDistance.value\n ? t('workouts.DISTANCE') + ` (${fromKmUnit})`\n : t('workouts.DURATION'),\n },\n },\n ySpeed: {\n grid: {\n drawOnChartArea: false,\n },\n position: 'left',\n title: {\n display: true,\n text: t('workouts.SPEED') + ` (${fromKmUnit}/h)`,\n },\n },\n yElevation: {\n beginAtZero: beginElevationAtZero.value,\n grid: {\n drawOnChartArea: false,\n },\n position: 'right',\n title: {\n display: true,\n text: t('workouts.ELEVATION') + ` (${fromMUnit})`,\n },\n },\n },\n elements: {\n point: {\n pointStyle: 'circle',\n pointRadius: 0,\n },\n },\n plugins: {\n datalabels: {\n display: false,\n },\n tooltip: {\n interaction: {\n intersect: false,\n mode: 'index',\n },\n callbacks: {\n label: function (context) {\n const label = ` ${context.dataset.label}: ${context.formattedValue}`\n return context.dataset.yAxisID === 'yElevation'\n ? label + ` ${fromMUnit}`\n : label + ` ${fromKmUnit}/h`\n },\n title: function (tooltipItems) {\n if (tooltipItems.length > 0) {\n emitCoordinates(coordinates.value[tooltipItems[0].dataIndex])\n }\n return tooltipItems.length === 0\n ? ''\n : displayDistance.value\n ? `${t('workouts.DISTANCE')}: ${\n tooltipItems[0].label\n } ${fromKmUnit}`\n : `${t('workouts.DURATION')}: ${formatDuration(\n tooltipItems[0].label.replace(',', '')\n )}`\n },\n },\n },\n legend: {\n display: false,\n },\n htmlLegend: {\n containerID: 'chart-legend',\n },\n },\n }))\n const { lineChartProps } = useLineChart({\n chartData,\n options,\n plugins: [htmlLegendPlugin],\n })\n\n function updateDisplayDistance() {\n displayDistance.value = !displayDistance.value\n }\n function formatDuration(duration: string | number): string {\n return new Date(+duration * 1000).toISOString().substr(11, 8)\n }\n function emitCoordinates(coordinates: TCoordinates) {\n emit('getCoordinates', coordinates)\n }\n function emitEmptyCoordinates() {\n emitCoordinates({ latitude: null, longitude: null })\n }\n function getUnitTo(unitFrom: TUnit): TUnit {\n return props.authUser.imperial_units\n ? units[unitFrom].defaultTarget\n : unitFrom\n }\n\nreturn (_ctx: any,_cache: any) => {\n const _component_Card = _resolveComponent(\"Card\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(_component_Card, null, {\n title: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('workouts.ANALYSIS')), 1)\n ]),\n content: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"label\", null, [\n _createElementVNode(\"input\", {\n type: \"radio\",\n name: \"distance\",\n checked: displayDistance.value,\n onClick: updateDisplayDistance\n }, null, 8, _hoisted_3),\n _createTextVNode(\" \" + _toDisplayString(_ctx.$t('workouts.DISTANCE')), 1)\n ]),\n _createElementVNode(\"label\", null, [\n _createElementVNode(\"input\", {\n type: \"radio\",\n name: \"duration\",\n checked: !displayDistance.value,\n onClick: updateDisplayDistance\n }, null, 8, _hoisted_4),\n _createTextVNode(\" \" + _toDisplayString(_ctx.$t('workouts.DURATION')), 1)\n ])\n ]),\n _hoisted_5,\n _createVNode(_unref(LineChart), _mergeProps(_unref(lineChartProps), {\n class: \"line-chart\",\n onMouseleave: emitEmptyCoordinates\n }), null, 16),\n _createElementVNode(\"div\", _hoisted_6, [\n _createElementVNode(\"div\", _hoisted_7, _toDisplayString(_ctx.$t('workouts.NO_DATA_CLEANING')), 1),\n _createElementVNode(\"div\", _hoisted_8, [\n _createElementVNode(\"label\", null, [\n _createElementVNode(\"input\", {\n type: \"checkbox\",\n checked: beginElevationAtZero.value,\n onClick: _cache[0] || (_cache[0] = ($event: any) => (beginElevationAtZero.value = !beginElevationAtZero.value))\n }, null, 8, _hoisted_9),\n _createTextVNode(\" \" + _toDisplayString(_ctx.$t('workouts.START_ELEVATION_AT_ZERO')), 1)\n ])\n ])\n ])\n ]),\n _: 1\n })\n ]))\n}\n}\n\n})","import script from \"./index.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./index.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./index.vue?vue&type=style&index=0&id=0b68c436&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-0b68c436\"]])\n\nexport default __exports__","// THIS FILE IS AUTOMATICALLY GENERATED DO NOT EDIT DIRECTLY\n// https://data.iana.org/TLD/tlds-alpha-by-domain.txt\nvar tlds = 'aaa \\\naarp \\\nabarth \\\nabb \\\nabbott \\\nabbvie \\\nabc \\\nable \\\nabogado \\\nabudhabi \\\nac \\\nacademy \\\naccenture \\\naccountant \\\naccountants \\\naco \\\nactor \\\nad \\\nadac \\\nads \\\nadult \\\nae \\\naeg \\\naero \\\naetna \\\naf \\\nafl \\\nafrica \\\nag \\\nagakhan \\\nagency \\\nai \\\naig \\\nairbus \\\nairforce \\\nairtel \\\nakdn \\\nal \\\nalfaromeo \\\nalibaba \\\nalipay \\\nallfinanz \\\nallstate \\\nally \\\nalsace \\\nalstom \\\nam \\\namazon \\\namericanexpress \\\namericanfamily \\\namex \\\namfam \\\namica \\\namsterdam \\\nanalytics \\\nandroid \\\nanquan \\\nanz \\\nao \\\naol \\\napartments \\\napp \\\napple \\\naq \\\naquarelle \\\nar \\\narab \\\naramco \\\narchi \\\narmy \\\narpa \\\nart \\\narte \\\nas \\\nasda \\\nasia \\\nassociates \\\nat \\\nathleta \\\nattorney \\\nau \\\nauction \\\naudi \\\naudible \\\naudio \\\nauspost \\\nauthor \\\nauto \\\nautos \\\navianca \\\naw \\\naws \\\nax \\\naxa \\\naz \\\nazure \\\nba \\\nbaby \\\nbaidu \\\nbanamex \\\nbananarepublic \\\nband \\\nbank \\\nbar \\\nbarcelona \\\nbarclaycard \\\nbarclays \\\nbarefoot \\\nbargains \\\nbaseball \\\nbasketball \\\nbauhaus \\\nbayern \\\nbb \\\nbbc \\\nbbt \\\nbbva \\\nbcg \\\nbcn \\\nbd \\\nbe \\\nbeats \\\nbeauty \\\nbeer \\\nbentley \\\nberlin \\\nbest \\\nbestbuy \\\nbet \\\nbf \\\nbg \\\nbh \\\nbharti \\\nbi \\\nbible \\\nbid \\\nbike \\\nbing \\\nbingo \\\nbio \\\nbiz \\\nbj \\\nblack \\\nblackfriday \\\nblockbuster \\\nblog \\\nbloomberg \\\nblue \\\nbm \\\nbms \\\nbmw \\\nbn \\\nbnpparibas \\\nbo \\\nboats \\\nboehringer \\\nbofa \\\nbom \\\nbond \\\nboo \\\nbook \\\nbooking \\\nbosch \\\nbostik \\\nboston \\\nbot \\\nboutique \\\nbox \\\nbr \\\nbradesco \\\nbridgestone \\\nbroadway \\\nbroker \\\nbrother \\\nbrussels \\\nbs \\\nbt \\\nbugatti \\\nbuild \\\nbuilders \\\nbusiness \\\nbuy \\\nbuzz \\\nbv \\\nbw \\\nby \\\nbz \\\nbzh \\\nca \\\ncab \\\ncafe \\\ncal \\\ncall \\\ncalvinklein \\\ncam \\\ncamera \\\ncamp \\\ncancerresearch \\\ncanon \\\ncapetown \\\ncapital \\\ncapitalone \\\ncar \\\ncaravan \\\ncards \\\ncare \\\ncareer \\\ncareers \\\ncars \\\ncasa \\\ncase \\\ncash \\\ncasino \\\ncat \\\ncatering \\\ncatholic \\\ncba \\\ncbn \\\ncbre \\\ncbs \\\ncc \\\ncd \\\ncenter \\\nceo \\\ncern \\\ncf \\\ncfa \\\ncfd \\\ncg \\\nch \\\nchanel \\\nchannel \\\ncharity \\\nchase \\\nchat \\\ncheap \\\nchintai \\\nchristmas \\\nchrome \\\nchurch \\\nci \\\ncipriani \\\ncircle \\\ncisco \\\ncitadel \\\nciti \\\ncitic \\\ncity \\\ncityeats \\\nck \\\ncl \\\nclaims \\\ncleaning \\\nclick \\\nclinic \\\nclinique \\\nclothing \\\ncloud \\\nclub \\\nclubmed \\\ncm \\\ncn \\\nco \\\ncoach \\\ncodes \\\ncoffee \\\ncollege \\\ncologne \\\ncom \\\ncomcast \\\ncommbank \\\ncommunity \\\ncompany \\\ncompare \\\ncomputer \\\ncomsec \\\ncondos \\\nconstruction \\\nconsulting \\\ncontact \\\ncontractors \\\ncooking \\\ncookingchannel \\\ncool \\\ncoop \\\ncorsica \\\ncountry \\\ncoupon \\\ncoupons \\\ncourses \\\ncpa \\\ncr \\\ncredit \\\ncreditcard \\\ncreditunion \\\ncricket \\\ncrown \\\ncrs \\\ncruise \\\ncruises \\\ncu \\\ncuisinella \\\ncv \\\ncw \\\ncx \\\ncy \\\ncymru \\\ncyou \\\ncz \\\ndabur \\\ndad \\\ndance \\\ndata \\\ndate \\\ndating \\\ndatsun \\\nday \\\ndclk \\\ndds \\\nde \\\ndeal \\\ndealer \\\ndeals \\\ndegree \\\ndelivery \\\ndell \\\ndeloitte \\\ndelta \\\ndemocrat \\\ndental \\\ndentist \\\ndesi \\\ndesign \\\ndev \\\ndhl \\\ndiamonds \\\ndiet \\\ndigital \\\ndirect \\\ndirectory \\\ndiscount \\\ndiscover \\\ndish \\\ndiy \\\ndj \\\ndk \\\ndm \\\ndnp \\\ndo \\\ndocs \\\ndoctor \\\ndog \\\ndomains \\\ndot \\\ndownload \\\ndrive \\\ndtv \\\ndubai \\\ndunlop \\\ndupont \\\ndurban \\\ndvag \\\ndvr \\\ndz \\\nearth \\\neat \\\nec \\\neco \\\nedeka \\\nedu \\\neducation \\\nee \\\neg \\\nemail \\\nemerck \\\nenergy \\\nengineer \\\nengineering \\\nenterprises \\\nepson \\\nequipment \\\ner \\\nericsson \\\nerni \\\nes \\\nesq \\\nestate \\\net \\\netisalat \\\neu \\\neurovision \\\neus \\\nevents \\\nexchange \\\nexpert \\\nexposed \\\nexpress \\\nextraspace \\\nfage \\\nfail \\\nfairwinds \\\nfaith \\\nfamily \\\nfan \\\nfans \\\nfarm \\\nfarmers \\\nfashion \\\nfast \\\nfedex \\\nfeedback \\\nferrari \\\nferrero \\\nfi \\\nfiat \\\nfidelity \\\nfido \\\nfilm \\\nfinal \\\nfinance \\\nfinancial \\\nfire \\\nfirestone \\\nfirmdale \\\nfish \\\nfishing \\\nfit \\\nfitness \\\nfj \\\nfk \\\nflickr \\\nflights \\\nflir \\\nflorist \\\nflowers \\\nfly \\\nfm \\\nfo \\\nfoo \\\nfood \\\nfoodnetwork \\\nfootball \\\nford \\\nforex \\\nforsale \\\nforum \\\nfoundation \\\nfox \\\nfr \\\nfree \\\nfresenius \\\nfrl \\\nfrogans \\\nfrontdoor \\\nfrontier \\\nftr \\\nfujitsu \\\nfun \\\nfund \\\nfurniture \\\nfutbol \\\nfyi \\\nga \\\ngal \\\ngallery \\\ngallo \\\ngallup \\\ngame \\\ngames \\\ngap \\\ngarden \\\ngay \\\ngb \\\ngbiz \\\ngd \\\ngdn \\\nge \\\ngea \\\ngent \\\ngenting \\\ngeorge \\\ngf \\\ngg \\\nggee \\\ngh \\\ngi \\\ngift \\\ngifts \\\ngives \\\ngiving \\\ngl \\\nglass \\\ngle \\\nglobal \\\nglobo \\\ngm \\\ngmail \\\ngmbh \\\ngmo \\\ngmx \\\ngn \\\ngodaddy \\\ngold \\\ngoldpoint \\\ngolf \\\ngoo \\\ngoodyear \\\ngoog \\\ngoogle \\\ngop \\\ngot \\\ngov \\\ngp \\\ngq \\\ngr \\\ngrainger \\\ngraphics \\\ngratis \\\ngreen \\\ngripe \\\ngrocery \\\ngroup \\\ngs \\\ngt \\\ngu \\\nguardian \\\ngucci \\\nguge \\\nguide \\\nguitars \\\nguru \\\ngw \\\ngy \\\nhair \\\nhamburg \\\nhangout \\\nhaus \\\nhbo \\\nhdfc \\\nhdfcbank \\\nhealth \\\nhealthcare \\\nhelp \\\nhelsinki \\\nhere \\\nhermes \\\nhgtv \\\nhiphop \\\nhisamitsu \\\nhitachi \\\nhiv \\\nhk \\\nhkt \\\nhm \\\nhn \\\nhockey \\\nholdings \\\nholiday \\\nhomedepot \\\nhomegoods \\\nhomes \\\nhomesense \\\nhonda \\\nhorse \\\nhospital \\\nhost \\\nhosting \\\nhot \\\nhoteles \\\nhotels \\\nhotmail \\\nhouse \\\nhow \\\nhr \\\nhsbc \\\nht \\\nhu \\\nhughes \\\nhyatt \\\nhyundai \\\nibm \\\nicbc \\\nice \\\nicu \\\nid \\\nie \\\nieee \\\nifm \\\nikano \\\nil \\\nim \\\nimamat \\\nimdb \\\nimmo \\\nimmobilien \\\nin \\\ninc \\\nindustries \\\ninfiniti \\\ninfo \\\ning \\\nink \\\ninstitute \\\ninsurance \\\ninsure \\\nint \\\ninternational \\\nintuit \\\ninvestments \\\nio \\\nipiranga \\\niq \\\nir \\\nirish \\\nis \\\nismaili \\\nist \\\nistanbul \\\nit \\\nitau \\\nitv \\\njaguar \\\njava \\\njcb \\\nje \\\njeep \\\njetzt \\\njewelry \\\njio \\\njll \\\njm \\\njmp \\\njnj \\\njo \\\njobs \\\njoburg \\\njot \\\njoy \\\njp \\\njpmorgan \\\njprs \\\njuegos \\\njuniper \\\nkaufen \\\nkddi \\\nke \\\nkerryhotels \\\nkerrylogistics \\\nkerryproperties \\\nkfh \\\nkg \\\nkh \\\nki \\\nkia \\\nkids \\\nkim \\\nkinder \\\nkindle \\\nkitchen \\\nkiwi \\\nkm \\\nkn \\\nkoeln \\\nkomatsu \\\nkosher \\\nkp \\\nkpmg \\\nkpn \\\nkr \\\nkrd \\\nkred \\\nkuokgroup \\\nkw \\\nky \\\nkyoto \\\nkz \\\nla \\\nlacaixa \\\nlamborghini \\\nlamer \\\nlancaster \\\nlancia \\\nland \\\nlandrover \\\nlanxess \\\nlasalle \\\nlat \\\nlatino \\\nlatrobe \\\nlaw \\\nlawyer \\\nlb \\\nlc \\\nlds \\\nlease \\\nleclerc \\\nlefrak \\\nlegal \\\nlego \\\nlexus \\\nlgbt \\\nli \\\nlidl \\\nlife \\\nlifeinsurance \\\nlifestyle \\\nlighting \\\nlike \\\nlilly \\\nlimited \\\nlimo \\\nlincoln \\\nlinde \\\nlink \\\nlipsy \\\nlive \\\nliving \\\nlk \\\nllc \\\nllp \\\nloan \\\nloans \\\nlocker \\\nlocus \\\nloft \\\nlol \\\nlondon \\\nlotte \\\nlotto \\\nlove \\\nlpl \\\nlplfinancial \\\nlr \\\nls \\\nlt \\\nltd \\\nltda \\\nlu \\\nlundbeck \\\nluxe \\\nluxury \\\nlv \\\nly \\\nma \\\nmacys \\\nmadrid \\\nmaif \\\nmaison \\\nmakeup \\\nman \\\nmanagement \\\nmango \\\nmap \\\nmarket \\\nmarketing \\\nmarkets \\\nmarriott \\\nmarshalls \\\nmaserati \\\nmattel \\\nmba \\\nmc \\\nmckinsey \\\nmd \\\nme \\\nmed \\\nmedia \\\nmeet \\\nmelbourne \\\nmeme \\\nmemorial \\\nmen \\\nmenu \\\nmerckmsd \\\nmg \\\nmh \\\nmiami \\\nmicrosoft \\\nmil \\\nmini \\\nmint \\\nmit \\\nmitsubishi \\\nmk \\\nml \\\nmlb \\\nmls \\\nmm \\\nmma \\\nmn \\\nmo \\\nmobi \\\nmobile \\\nmoda \\\nmoe \\\nmoi \\\nmom \\\nmonash \\\nmoney \\\nmonster \\\nmormon \\\nmortgage \\\nmoscow \\\nmoto \\\nmotorcycles \\\nmov \\\nmovie \\\nmp \\\nmq \\\nmr \\\nms \\\nmsd \\\nmt \\\nmtn \\\nmtr \\\nmu \\\nmuseum \\\nmusic \\\nmutual \\\nmv \\\nmw \\\nmx \\\nmy \\\nmz \\\nna \\\nnab \\\nnagoya \\\nname \\\nnatura \\\nnavy \\\nnba \\\nnc \\\nne \\\nnec \\\nnet \\\nnetbank \\\nnetflix \\\nnetwork \\\nneustar \\\nnew \\\nnews \\\nnext \\\nnextdirect \\\nnexus \\\nnf \\\nnfl \\\nng \\\nngo \\\nnhk \\\nni \\\nnico \\\nnike \\\nnikon \\\nninja \\\nnissan \\\nnissay \\\nnl \\\nno \\\nnokia \\\nnorthwesternmutual \\\nnorton \\\nnow \\\nnowruz \\\nnowtv \\\nnp \\\nnr \\\nnra \\\nnrw \\\nntt \\\nnu \\\nnyc \\\nnz \\\nobi \\\nobserver \\\noffice \\\nokinawa \\\nolayan \\\nolayangroup \\\noldnavy \\\nollo \\\nom \\\nomega \\\none \\\nong \\\nonl \\\nonline \\\nooo \\\nopen \\\noracle \\\norange \\\norg \\\norganic \\\norigins \\\nosaka \\\notsuka \\\nott \\\novh \\\npa \\\npage \\\npanasonic \\\nparis \\\npars \\\npartners \\\nparts \\\nparty \\\npassagens \\\npay \\\npccw \\\npe \\\npet \\\npf \\\npfizer \\\npg \\\nph \\\npharmacy \\\nphd \\\nphilips \\\nphone \\\nphoto \\\nphotography \\\nphotos \\\nphysio \\\npics \\\npictet \\\npictures \\\npid \\\npin \\\nping \\\npink \\\npioneer \\\npizza \\\npk \\\npl \\\nplace \\\nplay \\\nplaystation \\\nplumbing \\\nplus \\\npm \\\npn \\\npnc \\\npohl \\\npoker \\\npolitie \\\nporn \\\npost \\\npr \\\npramerica \\\npraxi \\\npress \\\nprime \\\npro \\\nprod \\\nproductions \\\nprof \\\nprogressive \\\npromo \\\nproperties \\\nproperty \\\nprotection \\\npru \\\nprudential \\\nps \\\npt \\\npub \\\npw \\\npwc \\\npy \\\nqa \\\nqpon \\\nquebec \\\nquest \\\nracing \\\nradio \\\nre \\\nread \\\nrealestate \\\nrealtor \\\nrealty \\\nrecipes \\\nred \\\nredstone \\\nredumbrella \\\nrehab \\\nreise \\\nreisen \\\nreit \\\nreliance \\\nren \\\nrent \\\nrentals \\\nrepair \\\nreport \\\nrepublican \\\nrest \\\nrestaurant \\\nreview \\\nreviews \\\nrexroth \\\nrich \\\nrichardli \\\nricoh \\\nril \\\nrio \\\nrip \\\nro \\\nrocher \\\nrocks \\\nrodeo \\\nrogers \\\nroom \\\nrs \\\nrsvp \\\nru \\\nrugby \\\nruhr \\\nrun \\\nrw \\\nrwe \\\nryukyu \\\nsa \\\nsaarland \\\nsafe \\\nsafety \\\nsakura \\\nsale \\\nsalon \\\nsamsclub \\\nsamsung \\\nsandvik \\\nsandvikcoromant \\\nsanofi \\\nsap \\\nsarl \\\nsas \\\nsave \\\nsaxo \\\nsb \\\nsbi \\\nsbs \\\nsc \\\nsca \\\nscb \\\nschaeffler \\\nschmidt \\\nscholarships \\\nschool \\\nschule \\\nschwarz \\\nscience \\\nscot \\\nsd \\\nse \\\nsearch \\\nseat \\\nsecure \\\nsecurity \\\nseek \\\nselect \\\nsener \\\nservices \\\nses \\\nseven \\\nsew \\\nsex \\\nsexy \\\nsfr \\\nsg \\\nsh \\\nshangrila \\\nsharp \\\nshaw \\\nshell \\\nshia \\\nshiksha \\\nshoes \\\nshop \\\nshopping \\\nshouji \\\nshow \\\nshowtime \\\nsi \\\nsilk \\\nsina \\\nsingles \\\nsite \\\nsj \\\nsk \\\nski \\\nskin \\\nsky \\\nskype \\\nsl \\\nsling \\\nsm \\\nsmart \\\nsmile \\\nsn \\\nsncf \\\nso \\\nsoccer \\\nsocial \\\nsoftbank \\\nsoftware \\\nsohu \\\nsolar \\\nsolutions \\\nsong \\\nsony \\\nsoy \\\nspa \\\nspace \\\nsport \\\nspot \\\nsr \\\nsrl \\\nss \\\nst \\\nstada \\\nstaples \\\nstar \\\nstatebank \\\nstatefarm \\\nstc \\\nstcgroup \\\nstockholm \\\nstorage \\\nstore \\\nstream \\\nstudio \\\nstudy \\\nstyle \\\nsu \\\nsucks \\\nsupplies \\\nsupply \\\nsupport \\\nsurf \\\nsurgery \\\nsuzuki \\\nsv \\\nswatch \\\nswiss \\\nsx \\\nsy \\\nsydney \\\nsystems \\\nsz \\\ntab \\\ntaipei \\\ntalk \\\ntaobao \\\ntarget \\\ntatamotors \\\ntatar \\\ntattoo \\\ntax \\\ntaxi \\\ntc \\\ntci \\\ntd \\\ntdk \\\nteam \\\ntech \\\ntechnology \\\ntel \\\ntemasek \\\ntennis \\\nteva \\\ntf \\\ntg \\\nth \\\nthd \\\ntheater \\\ntheatre \\\ntiaa \\\ntickets \\\ntienda \\\ntiffany \\\ntips \\\ntires \\\ntirol \\\ntj \\\ntjmaxx \\\ntjx \\\ntk \\\ntkmaxx \\\ntl \\\ntm \\\ntmall \\\ntn \\\nto \\\ntoday \\\ntokyo \\\ntools \\\ntop \\\ntoray \\\ntoshiba \\\ntotal \\\ntours \\\ntown \\\ntoyota \\\ntoys \\\ntr \\\ntrade \\\ntrading \\\ntraining \\\ntravel \\\ntravelchannel \\\ntravelers \\\ntravelersinsurance \\\ntrust \\\ntrv \\\ntt \\\ntube \\\ntui \\\ntunes \\\ntushu \\\ntv \\\ntvs \\\ntw \\\ntz \\\nua \\\nubank \\\nubs \\\nug \\\nuk \\\nunicom \\\nuniversity \\\nuno \\\nuol \\\nups \\\nus \\\nuy \\\nuz \\\nva \\\nvacations \\\nvana \\\nvanguard \\\nvc \\\nve \\\nvegas \\\nventures \\\nverisign \\\nvermögensberater \\\nvermögensberatung \\\nversicherung \\\nvet \\\nvg \\\nvi \\\nviajes \\\nvideo \\\nvig \\\nviking \\\nvillas \\\nvin \\\nvip \\\nvirgin \\\nvisa \\\nvision \\\nviva \\\nvivo \\\nvlaanderen \\\nvn \\\nvodka \\\nvolkswagen \\\nvolvo \\\nvote \\\nvoting \\\nvoto \\\nvoyage \\\nvu \\\nvuelos \\\nwales \\\nwalmart \\\nwalter \\\nwang \\\nwanggou \\\nwatch \\\nwatches \\\nweather \\\nweatherchannel \\\nwebcam \\\nweber \\\nwebsite \\\nwed \\\nwedding \\\nweibo \\\nweir \\\nwf \\\nwhoswho \\\nwien \\\nwiki \\\nwilliamhill \\\nwin \\\nwindows \\\nwine \\\nwinners \\\nwme \\\nwolterskluwer \\\nwoodside \\\nwork \\\nworks \\\nworld \\\nwow \\\nws \\\nwtc \\\nwtf \\\nxbox \\\nxerox \\\nxfinity \\\nxihuan \\\nxin \\\nxxx \\\nxyz \\\nyachts \\\nyahoo \\\nyamaxun \\\nyandex \\\nye \\\nyodobashi \\\nyoga \\\nyokohama \\\nyou \\\nyoutube \\\nyt \\\nyun \\\nza \\\nzappos \\\nzara \\\nzero \\\nzip \\\nzm \\\nzone \\\nzuerich \\\nzw'.split(' '); // Internationalized domain names containing non-ASCII\n\nvar utlds = 'ελ \\\nευ \\\nбг \\\nбел \\\nдети \\\nею \\\nкатолик \\\nком \\\nмкд \\\nмон \\\nмосква \\\nонлайн \\\nорг \\\nрус \\\nрф \\\nсайт \\\nсрб \\\nукр \\\nқаз \\\nհայ \\\nישראל \\\nקום \\\nابوظبي \\\nاتصالات \\\nارامكو \\\nالاردن \\\nالبحرين \\\nالجزائر \\\nالسعودية \\\nالعليان \\\nالمغرب \\\nامارات \\\nایران \\\nبارت \\\nبازار \\\nبيتك \\\nبھارت \\\nتونس \\\nسودان \\\nسورية \\\nشبكة \\\nعراق \\\nعرب \\\nعمان \\\nفلسطين \\\nقطر \\\nكاثوليك \\\nكوم \\\nمصر \\\nمليسيا \\\nموريتانيا \\\nموقع \\\nهمراه \\\nپاکستان \\\nڀارت \\\nकॉम \\\nनेट \\\nभारत \\\nभारतम् \\\nभारोत \\\nसंगठन \\\nবাংলা \\\nভারত \\\nভাৰত \\\nਭਾਰਤ \\\nભારત \\\nଭାରତ \\\nஇந்தியா \\\nஇலங்கை \\\nசிங்கப்பூர் \\\nభారత్ \\\nಭಾರತ \\\nഭാരത \\\nලකා \\\nคอม \\\nไทย \\\nລາວ \\\nგე \\\nみんな \\\nアマゾン \\\nクラウド \\\nグーグル \\\nコム \\\nストア \\\nセール \\\nファッション \\\nポイント \\\n世界 \\\n中信 \\\n中国 \\\n中國 \\\n中文网 \\\n亚马逊 \\\n企业 \\\n佛山 \\\n信息 \\\n健康 \\\n八卦 \\\n公司 \\\n公益 \\\n台湾 \\\n台灣 \\\n商城 \\\n商店 \\\n商标 \\\n嘉里 \\\n嘉里大酒店 \\\n在线 \\\n大拿 \\\n天主教 \\\n娱乐 \\\n家電 \\\n广东 \\\n微博 \\\n慈善 \\\n我爱你 \\\n手机 \\\n招聘 \\\n政务 \\\n政府 \\\n新加坡 \\\n新闻 \\\n时尚 \\\n書籍 \\\n机构 \\\n淡马锡 \\\n游戏 \\\n澳門 \\\n点看 \\\n移动 \\\n组织机构 \\\n网址 \\\n网店 \\\n网站 \\\n网络 \\\n联通 \\\n诺基亚 \\\n谷歌 \\\n购物 \\\n通販 \\\n集团 \\\n電訊盈科 \\\n飞利浦 \\\n食品 \\\n餐厅 \\\n香格里拉 \\\n香港 \\\n닷넷 \\\n닷컴 \\\n삼성 \\\n한국'.split(' ');\n\n/**\n * @template A\n * @template B\n * @param {A} target\n * @param {B} properties\n * @return {A & B}\n */\nvar assign = function assign(target, properties) {\n for (var key in properties) {\n target[key] = properties[key];\n }\n\n return target;\n};\n\n/**\n * Finite State Machine generation utilities\n */\n/**\n * @template T\n * @typedef {{ [group: string]: T[] }} Collections\n */\n\n/**\n * @typedef {{ [group: string]: true }} Flags\n */\n// Keys in scanner Collections instances\n\nvar numeric = 'numeric';\nvar ascii = 'ascii';\nvar alpha = 'alpha';\nvar asciinumeric = 'asciinumeric';\nvar alphanumeric = 'alphanumeric';\nvar domain = 'domain';\nvar emoji = 'emoji';\nvar scheme = 'scheme';\nvar slashscheme = 'slashscheme';\nvar whitespace = 'whitespace';\n/**\n * @template T\n * @param {string} name\n * @param {Collections<T>} groups to register in\n * @returns {T[]} Current list of tokens in the given collection\n */\n\nfunction registerGroup(name, groups) {\n if (!(name in groups)) {\n groups[name] = [];\n }\n\n return groups[name];\n}\n/**\n * @template T\n * @param {T} t token to add\n * @param {Collections<T>} groups\n * @param {Flags} flags\n */\n\n\nfunction addToGroups(t, flags, groups) {\n if (flags[numeric]) {\n flags[asciinumeric] = true;\n flags[alphanumeric] = true;\n }\n\n if (flags[ascii]) {\n flags[asciinumeric] = true;\n flags[alpha] = true;\n }\n\n if (flags[asciinumeric]) {\n flags[alphanumeric] = true;\n }\n\n if (flags[alpha]) {\n flags[alphanumeric] = true;\n }\n\n if (flags[alphanumeric]) {\n flags[domain] = true;\n }\n\n if (flags[emoji]) {\n flags[domain] = true;\n }\n\n for (var k in flags) {\n var group = registerGroup(k, groups);\n\n if (group.indexOf(t) < 0) {\n group.push(t);\n }\n }\n}\n/**\n * @template T\n * @param {T} t token to check\n * @param {Collections<T>} groups\n * @returns {Flags} group flags that contain this token\n */\n\nfunction flagsForToken(t, groups) {\n var result = {};\n\n for (var c in groups) {\n if (groups[c].indexOf(t) >= 0) {\n result[c] = true;\n }\n }\n\n return result;\n}\n/**\n * @template T\n * @typedef {null | T } Transition\n */\n\n/**\n * Define a basic state machine state. j is the list of character transitions,\n * jr is the list of regex-match transitions, jd is the default state to\n * transition to t is the accepting token type, if any. If this is the terminal\n * state, then it does not emit a token.\n *\n * The template type T represents the type of the token this state accepts. This\n * should be a string (such as of the token exports in `text.js`) or a\n * MultiToken subclass (from `multi.js`)\n *\n * @template T\n * @param {T} [token] Token that this state emits\n */\n\n\nfunction State(token) {\n if (token === void 0) {\n token = null;\n }\n\n // this.n = null; // DEBUG: State name\n\n /** @type {{ [input: string]: State<T> }} j */\n this.j = {}; // IMPLEMENTATION 1\n // this.j = []; // IMPLEMENTATION 2\n\n /** @type {[RegExp, State<T>][]} jr */\n\n this.jr = [];\n /** @type {?State<T>} jd */\n\n this.jd = null;\n /** @type {?T} t */\n\n this.t = token;\n}\n/**\n * Scanner token groups\n * @type Collections<string>\n */\n\nState.groups = {};\nState.prototype = {\n accepts: function accepts() {\n return !!this.t;\n },\n\n /**\n * Follow an existing transition from the given input to the next state.\n * Does not mutate.\n * @param {string} input character or token type to transition on\n * @returns {?State<T>} the next state, if any\n */\n go: function go(input) {\n var state = this;\n var nextState = state.j[input];\n\n if (nextState) {\n return nextState;\n }\n\n for (var i = 0; i < state.jr.length; i++) {\n var regex = state.jr[i][0];\n var _nextState = state.jr[i][1]; // note: might be empty to prevent default jump\n\n if (_nextState && regex.test(input)) {\n return _nextState;\n }\n } // Nowhere left to jump! Return default, if any\n\n\n return state.jd;\n },\n\n /**\n * Whether the state has a transition for the given input. Set the second\n * argument to true to only look for an exact match (and not a default or\n * regular-expression-based transition)\n * @param {string} input\n * @param {boolean} exactOnly\n */\n has: function has(input, exactOnly) {\n if (exactOnly === void 0) {\n exactOnly = false;\n }\n\n return exactOnly ? input in this.j : !!this.go(input);\n },\n\n /**\n * Short for \"transition all\"; create a transition from the array of items\n * in the given list to the same final resulting state.\n * @param {string | string[]} inputs Group of inputs to transition on\n * @param {Transition<T> | State<T>} [next] Transition options\n * @param {Flags} [flags] Collections flags to add token to\n * @param {Collections<T>} [groups] Master list of token groups\n */\n ta: function ta(inputs, next, flags, groups) {\n for (var i = 0; i < inputs.length; i++) {\n this.tt(inputs[i], next, flags, groups);\n }\n },\n\n /**\n * Short for \"take regexp transition\"; defines a transition for this state\n * when it encounters a token which matches the given regular expression\n * @param {RegExp} regexp Regular expression transition (populate first)\n * @param {T | State<T>} [next] Transition options\n * @param {Flags} [flags] Collections flags to add token to\n * @param {Collections<T>} [groups] Master list of token groups\n * @returns {State<T>} taken after the given input\n */\n tr: function tr(regexp, next, flags, groups) {\n groups = groups || State.groups;\n var nextState;\n\n if (next && next.j) {\n nextState = next;\n } else {\n // Token with maybe token groups\n nextState = new State(next);\n\n if (flags && groups) {\n addToGroups(next, flags, groups);\n }\n }\n\n this.jr.push([regexp, nextState]);\n return nextState;\n },\n\n /**\n * Short for \"take transitions\", will take as many sequential transitions as\n * the length of the given input and returns the\n * resulting final state.\n * @param {string | string[]} input\n * @param {T | State<T>} [next] Transition options\n * @param {Flags} [flags] Collections flags to add token to\n * @param {Collections<T>} [groups] Master list of token groups\n * @returns {State<T>} taken after the given input\n */\n ts: function ts(input, next, flags, groups) {\n var state = this;\n var len = input.length;\n\n if (!len) {\n return state;\n }\n\n for (var i = 0; i < len - 1; i++) {\n state = state.tt(input[i]);\n }\n\n return state.tt(input[len - 1], next, flags, groups);\n },\n\n /**\n * Short for \"take transition\", this is a method for building/working with\n * state machines.\n *\n * If a state already exists for the given input, returns it.\n *\n * If a token is specified, that state will emit that token when reached by\n * the linkify engine.\n *\n * If no state exists, it will be initialized with some default transitions\n * that resemble existing default transitions.\n *\n * If a state is given for the second argument, that state will be\n * transitioned to on the given input regardless of what that input\n * previously did.\n *\n * Specify a token group flags to define groups that this token belongs to.\n * The token will be added to corresponding entires in the given groups\n * object.\n *\n * @param {string} input character, token type to transition on\n * @param {T | State<T>} [next] Transition options\n * @param {Flags} [flags] Collections flags to add token to\n * @param {Collections<T>} [groups] Master list of groups\n * @returns {State<T>} taken after the given input\n */\n tt: function tt(input, next, flags, groups) {\n groups = groups || State.groups;\n var state = this; // Check if existing state given, just a basic transition\n\n if (next && next.j) {\n state.j[input] = next;\n return next;\n }\n\n var t = next; // Take the transition with the usual default mechanisms and use that as\n // a template for creating the next state\n\n var nextState,\n templateState = state.go(input);\n\n if (templateState) {\n nextState = new State();\n assign(nextState.j, templateState.j);\n nextState.jr.push.apply(nextState.jr, templateState.jr);\n nextState.jd = templateState.jd;\n nextState.t = templateState.t;\n } else {\n nextState = new State();\n }\n\n if (t) {\n // Ensure newly token is in the same groups as the old token\n if (groups) {\n if (nextState.t && typeof nextState.t === 'string') {\n var allFlags = assign(flagsForToken(nextState.t, groups), flags);\n addToGroups(t, allFlags, groups);\n } else if (flags) {\n addToGroups(t, flags, groups);\n }\n }\n\n nextState.t = t; // overwrite anything that was previously there\n }\n\n state.j[input] = nextState;\n return nextState;\n }\n}; // Helper functions to improve minification (not exported outside linkifyjs module)\n\n/**\n * @template T\n * @param {State<T>} state\n * @param {string | string[]} input\n * @param {Flags} [flags]\n * @param {Collections<T>} [groups]\n */\n\nvar ta = function ta(state, input, next, flags, groups) {\n return state.ta(input, next, flags, groups);\n};\n/**\n * @template T\n * @param {State<T>} state\n * @param {RegExp} regexp\n * @param {T | State<T>} [next]\n * @param {Flags} [flags]\n * @param {Collections<T>} [groups]\n */\n\nvar tr = function tr(state, regexp, next, flags, groups) {\n return state.tr(regexp, next, flags, groups);\n};\n/**\n * @template T\n * @param {State<T>} state\n * @param {string | string[]} input\n * @param {T | State<T>} [next]\n * @param {Flags} [flags]\n * @param {Collections<T>} [groups]\n */\n\nvar ts = function ts(state, input, next, flags, groups) {\n return state.ts(input, next, flags, groups);\n};\n/**\n * @template T\n * @param {State<T>} state\n * @param {string} input\n * @param {T | State<T>} [next]\n * @param {Collections<T>} [groups]\n * @param {Flags} [flags]\n */\n\nvar tt = function tt(state, input, next, flags, groups) {\n return state.tt(input, next, flags, groups);\n};\n\n/******************************************************************************\nText Tokens\nIdentifiers for token outputs from the regexp scanner\n******************************************************************************/\n// A valid web domain token\nvar WORD = 'WORD'; // only contains a-z\n\nvar UWORD = 'UWORD'; // contains letters other than a-z, used for IDN\n// Special case of word\n\nvar LOCALHOST = 'LOCALHOST'; // Valid top-level domain, special case of WORD (see tlds.js)\n\nvar TLD = 'TLD'; // Valid IDN TLD, special case of UWORD (see tlds.js)\n\nvar UTLD = 'UTLD'; // The scheme portion of a web URI protocol. Supported types include: `mailto`,\n// `file`, and user-defined custom protocols. Limited to schemes that contain\n// only letters\n\nvar SCHEME = 'SCHEME'; // Similar to SCHEME, except makes distinction for schemes that must always be\n// followed by `://`, not just `:`. Supported types include `http`, `https`,\n// `ftp`, `ftps`\n\nvar SLASH_SCHEME = 'SLASH_SCHEME'; // Any sequence of digits 0-9\n\nvar NUM = 'NUM'; // Any number of consecutive whitespace characters that are not newline\n\nvar WS = 'WS'; // New line (unix style)\n\nvar NL$1 = 'NL'; // \\n\n// Opening/closing bracket classes\n\nvar OPENBRACE = 'OPENBRACE'; // {\n\nvar OPENBRACKET = 'OPENBRACKET'; // [\n\nvar OPENANGLEBRACKET = 'OPENANGLEBRACKET'; // <\n\nvar OPENPAREN = 'OPENPAREN'; // (\n\nvar CLOSEBRACE = 'CLOSEBRACE'; // }\n\nvar CLOSEBRACKET = 'CLOSEBRACKET'; // ]\n\nvar CLOSEANGLEBRACKET = 'CLOSEANGLEBRACKET'; // >\n\nvar CLOSEPAREN = 'CLOSEPAREN'; // )\n// Various symbols\n\nvar AMPERSAND = 'AMPERSAND'; // &\n\nvar APOSTROPHE = 'APOSTROPHE'; // '\n\nvar ASTERISK = 'ASTERISK'; // *\n\nvar AT = 'AT'; // @\n\nvar BACKSLASH = 'BACKSLASH'; // \\\n\nvar BACKTICK = 'BACKTICK'; // `\n\nvar CARET = 'CARET'; // ^\n\nvar COLON = 'COLON'; // :\n\nvar COMMA = 'COMMA'; // ,\n\nvar DOLLAR = 'DOLLAR'; // $\n\nvar DOT = 'DOT'; // .\n\nvar EQUALS = 'EQUALS'; // =\n\nvar EXCLAMATION = 'EXCLAMATION'; // !\n\nvar HYPHEN = 'HYPHEN'; // -\n\nvar PERCENT = 'PERCENT'; // %\n\nvar PIPE = 'PIPE'; // |\n\nvar PLUS = 'PLUS'; // +\n\nvar POUND = 'POUND'; // #\n\nvar QUERY = 'QUERY'; // ?\n\nvar QUOTE = 'QUOTE'; // \"\n\nvar SEMI = 'SEMI'; // ;\n\nvar SLASH = 'SLASH'; // /\n\nvar TILDE = 'TILDE'; // ~\n\nvar UNDERSCORE = 'UNDERSCORE'; // _\n// Emoji symbol\n\nvar EMOJI$1 = 'EMOJI'; // Default token - anything that is not one of the above\n\nvar SYM = 'SYM';\n\nvar tk = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tWORD: WORD,\n\tUWORD: UWORD,\n\tLOCALHOST: LOCALHOST,\n\tTLD: TLD,\n\tUTLD: UTLD,\n\tSCHEME: SCHEME,\n\tSLASH_SCHEME: SLASH_SCHEME,\n\tNUM: NUM,\n\tWS: WS,\n\tNL: NL$1,\n\tOPENBRACE: OPENBRACE,\n\tOPENBRACKET: OPENBRACKET,\n\tOPENANGLEBRACKET: OPENANGLEBRACKET,\n\tOPENPAREN: OPENPAREN,\n\tCLOSEBRACE: CLOSEBRACE,\n\tCLOSEBRACKET: CLOSEBRACKET,\n\tCLOSEANGLEBRACKET: CLOSEANGLEBRACKET,\n\tCLOSEPAREN: CLOSEPAREN,\n\tAMPERSAND: AMPERSAND,\n\tAPOSTROPHE: APOSTROPHE,\n\tASTERISK: ASTERISK,\n\tAT: AT,\n\tBACKSLASH: BACKSLASH,\n\tBACKTICK: BACKTICK,\n\tCARET: CARET,\n\tCOLON: COLON,\n\tCOMMA: COMMA,\n\tDOLLAR: DOLLAR,\n\tDOT: DOT,\n\tEQUALS: EQUALS,\n\tEXCLAMATION: EXCLAMATION,\n\tHYPHEN: HYPHEN,\n\tPERCENT: PERCENT,\n\tPIPE: PIPE,\n\tPLUS: PLUS,\n\tPOUND: POUND,\n\tQUERY: QUERY,\n\tQUOTE: QUOTE,\n\tSEMI: SEMI,\n\tSLASH: SLASH,\n\tTILDE: TILDE,\n\tUNDERSCORE: UNDERSCORE,\n\tEMOJI: EMOJI$1,\n\tSYM: SYM\n});\n\n// Note that these two Unicode ones expand into a really big one with Babel\nvar ASCII_LETTER = /[a-z]/;\nvar LETTER = /(?:[A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u0870-\\u0887\\u0889-\\u088E\\u08A0-\\u08C9\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C5D\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u1711\\u171F-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4C\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA7F2-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7C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1\\uDDE3\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE89\\uDE9D\\uDEB0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD89\\uDD98\\uDEE0-\\uDEF2\\uDFB0]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC80-\\uDD43]|\\uD80B[\\uDF90-\\uDFF0]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE70-\\uDEBE\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF4A\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1\\uDFE3]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-\\uDD08]|\\uD82B[\\uDFF0-\\uDFF3\\uDFF5-\\uDFFB\\uDFFD\\uDFFE]|\\uD82C[\\uDC00-\\uDD22\\uDD50-\\uDD52\\uDD64-\\uDD67\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uD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-\\uDF4A])/; // Any Unicode character with letter data type\n\nvar EMOJI = /(?:[#\\*0-9\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u23CF\\u23E9-\\u23F3\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB-\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614\\u2615\\u2618\\u261D\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u267F\\u2692-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A1\\u26A7\\u26AA\\u26AB\\u26B0\\u26B1\\u26BD\\u26BE\\u26C4\\u26C5\\u26C8\\u26CE\\u26CF\\u26D1\\u26D3\\u26D4\\u26E9\\u26EA\\u26F0-\\u26F5\\u26F7-\\u26FA\\u26FD\\u2702\\u2705\\u2708-\\u270D\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2728\\u2733\\u2734\\u2744\\u2747\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2763\\u2764\\u2795-\\u2797\\u27A1\\u27B0\\u27BF\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B50\\u2B55\\u3030\\u303D\\u3297\\u3299]|\\uD83C[\\uDC04\\uDCCF\\uDD70\\uDD71\\uDD7E\\uDD7F\\uDD8E\\uDD91-\\uDD9A\\uDDE6-\\uDDFF\\uDE01\\uDE02\\uDE1A\\uDE2F\\uDE32-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF21\\uDF24-\\uDF93\\uDF96\\uDF97\\uDF99-\\uDF9B\\uDF9E-\\uDFF0\\uDFF3-\\uDFF5\\uDFF7-\\uDFFF]|\\uD83D[\\uDC00-\\uDCFD\\uDCFF-\\uDD3D\\uDD49-\\uDD4E\\uDD50-\\uDD67\\uDD6F\\uDD70\\uDD73-\\uDD7A\\uDD87\\uDD8A-\\uDD8D\\uDD90\\uDD95\\uDD96\\uDDA4\\uDDA5\\uDDA8\\uDDB1\\uDDB2\\uDDBC\\uDDC2-\\uDDC4\\uDDD1-\\uDDD3\\uDDDC-\\uDDDE\\uDDE1\\uDDE3\\uDDE8\\uDDEF\\uDDF3\\uDDFA-\\uDE4F\\uDE80-\\uDEC5\\uDECB-\\uDED2\\uDED5-\\uDED7\\uDEDD-\\uDEE5\\uDEE9\\uDEEB\\uDEEC\\uDEF0\\uDEF3-\\uDEFC\\uDFE0-\\uDFEB\\uDFF0]|\\uD83E[\\uDD0C-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDDFF\\uDE70-\\uDE74\\uDE78-\\uDE7C\\uDE80-\\uDE86\\uDE90-\\uDEAC\\uDEB0-\\uDEBA\\uDEC0-\\uDEC5\\uDED0-\\uDED9\\uDEE0-\\uDEE7\\uDEF0-\\uDEF6])/; // Any Unicode emoji character\n\nvar EMOJI_VARIATION$1 = /\\ufe0f/;\nvar DIGIT = /\\d/;\nvar SPACE = /\\s/;\n\nvar regexp = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tASCII_LETTER: ASCII_LETTER,\n\tLETTER: LETTER,\n\tEMOJI: EMOJI,\n\tEMOJI_VARIATION: EMOJI_VARIATION$1,\n\tDIGIT: DIGIT,\n\tSPACE: SPACE\n});\n\n/**\n\tThe scanner provides an interface that takes a string of text as input, and\n\toutputs an array of tokens instances that can be used for easy URL parsing.\n*/\nvar NL = '\\n'; // New line character\n\nvar EMOJI_VARIATION = \"\\uFE0F\"; // Variation selector, follows heart and others\n\nvar EMOJI_JOINER = \"\\u200D\"; // zero-width joiner\n\n/**\n * Scanner output token:\n * - `t` is the token name (e.g., 'NUM', 'EMOJI', 'TLD')\n * - `v` is the value of the token (e.g., '123', '❤️', 'com')\n * - `s` is the start index of the token in the original string\n * - `e` is the end index of the token in the original string\n * @typedef {{t: string, v: string, s: number, e: number}} Token\n */\n\n/**\n * @template T\n * @typedef {{ [collection: string]: T[] }} Collections\n */\n\n/**\n * Initialize the scanner character-based state machine for the given start\n * state\n * @param {[string, boolean][]} customSchemes List of custom schemes, where each\n * item is a length-2 tuple with the first element set to the string scheme, and\n * the second element set to `true` if the `://` after the scheme is optional\n */\n\nfunction init$2(customSchemes) {\n var _tr, _tr2, _tr3, _tr4, _tt, _tr5;\n\n if (customSchemes === void 0) {\n customSchemes = [];\n }\n\n // Frequently used states (name argument removed during minification)\n\n /** @type Collections<string> */\n var groups = {}; // of tokens\n\n State.groups = groups;\n /** @type State<string> */\n\n var Start = new State(); // States for special URL symbols that accept immediately after start\n\n tt(Start, \"'\", APOSTROPHE);\n tt(Start, '{', OPENBRACE);\n tt(Start, '[', OPENBRACKET);\n tt(Start, '<', OPENANGLEBRACKET);\n tt(Start, '(', OPENPAREN);\n tt(Start, '}', CLOSEBRACE);\n tt(Start, ']', CLOSEBRACKET);\n tt(Start, '>', CLOSEANGLEBRACKET);\n tt(Start, ')', CLOSEPAREN);\n tt(Start, '&', AMPERSAND);\n tt(Start, '*', ASTERISK);\n tt(Start, '@', AT);\n tt(Start, '`', BACKTICK);\n tt(Start, '^', CARET);\n tt(Start, ':', COLON);\n tt(Start, ',', COMMA);\n tt(Start, '$', DOLLAR);\n tt(Start, '.', DOT);\n tt(Start, '=', EQUALS);\n tt(Start, '!', EXCLAMATION);\n tt(Start, '-', HYPHEN);\n tt(Start, '%', PERCENT);\n tt(Start, '|', PIPE);\n tt(Start, '+', PLUS);\n tt(Start, '#', POUND);\n tt(Start, '?', QUERY);\n tt(Start, '\"', QUOTE);\n tt(Start, '/', SLASH);\n tt(Start, ';', SEMI);\n tt(Start, '~', TILDE);\n tt(Start, '_', UNDERSCORE);\n tt(Start, '\\\\', BACKSLASH);\n var Num = tr(Start, DIGIT, NUM, (_tr = {}, _tr[numeric] = true, _tr));\n tr(Num, DIGIT, Num); // State which emits a word token\n\n var Word = tr(Start, ASCII_LETTER, WORD, (_tr2 = {}, _tr2[ascii] = true, _tr2));\n tr(Word, ASCII_LETTER, Word); // Same as previous, but specific to non-fsm.ascii alphabet words\n\n var UWord = tr(Start, LETTER, UWORD, (_tr3 = {}, _tr3[alpha] = true, _tr3));\n tr(UWord, ASCII_LETTER); // Non-accepting\n\n tr(UWord, LETTER, UWord); // Whitespace jumps\n // Tokens of only non-newline whitespace are arbitrarily long\n // If any whitespace except newline, more whitespace!\n\n var Ws = tr(Start, SPACE, WS, (_tr4 = {}, _tr4[whitespace] = true, _tr4));\n tt(Start, NL, NL$1, (_tt = {}, _tt[whitespace] = true, _tt));\n tt(Ws, NL); // non-accepting state to avoid mixing whitespaces\n\n tr(Ws, SPACE, Ws); // Emoji tokens. They are not grouped by the scanner except in cases where a\n // zero-width joiner is present\n\n var Emoji = tr(Start, EMOJI, EMOJI$1, (_tr5 = {}, _tr5[emoji] = true, _tr5));\n tr(Emoji, EMOJI, Emoji);\n tt(Emoji, EMOJI_VARIATION, Emoji); // tt(Start, EMOJI_VARIATION, Emoji); // This one is sketchy\n\n var EmojiJoiner = tt(Emoji, EMOJI_JOINER);\n tr(EmojiJoiner, EMOJI, Emoji); // tt(EmojiJoiner, EMOJI_VARIATION, Emoji); // also sketchy\n // Generates states for top-level domains\n // Note that this is most accurate when tlds are in alphabetical order\n\n var wordjr = [[ASCII_LETTER, Word]];\n var uwordjr = [[ASCII_LETTER, null], [LETTER, UWord]];\n\n for (var i = 0; i < tlds.length; i++) {\n fastts(Start, tlds[i], TLD, WORD, wordjr);\n }\n\n for (var _i = 0; _i < utlds.length; _i++) {\n fastts(Start, utlds[_i], UTLD, UWORD, uwordjr);\n }\n\n addToGroups(TLD, {\n tld: true,\n ascii: true\n }, groups);\n addToGroups(UTLD, {\n utld: true,\n alpha: true\n }, groups); // Collect the states generated by different protocols. NOTE: If any new TLDs\n // get added that are also protocols, set the token to be the same as the\n // protocol to ensure parsing works as expected.\n\n fastts(Start, 'file', SCHEME, WORD, wordjr);\n fastts(Start, 'mailto', SCHEME, WORD, wordjr);\n fastts(Start, 'http', SLASH_SCHEME, WORD, wordjr);\n fastts(Start, 'https', SLASH_SCHEME, WORD, wordjr);\n fastts(Start, 'ftp', SLASH_SCHEME, WORD, wordjr);\n fastts(Start, 'ftps', SLASH_SCHEME, WORD, wordjr);\n addToGroups(SCHEME, {\n scheme: true,\n ascii: true\n }, groups);\n addToGroups(SLASH_SCHEME, {\n slashscheme: true,\n ascii: true\n }, groups); // Register custom schemes. Assumes each scheme is asciinumeric with hyphens\n\n customSchemes = customSchemes.sort(function (a, b) {\n return a[0] > b[0] ? 1 : -1;\n });\n\n for (var _i2 = 0; _i2 < customSchemes.length; _i2++) {\n var _ref, _ref2;\n\n var sch = customSchemes[_i2][0];\n var optionalSlashSlash = customSchemes[_i2][1];\n var flags = optionalSlashSlash ? (_ref = {}, _ref[scheme] = true, _ref) : (_ref2 = {}, _ref2[slashscheme] = true, _ref2);\n\n if (sch.indexOf('-') >= 0) {\n flags[domain] = true;\n } else if (!ASCII_LETTER.test(sch)) {\n flags[numeric] = true; // numbers only\n } else if (DIGIT.test(sch)) {\n flags[asciinumeric] = true;\n } else {\n flags[ascii] = true;\n }\n\n ts(Start, sch, sch, flags);\n } // Localhost token\n\n\n ts(Start, 'localhost', LOCALHOST, {\n ascii: true\n }); // Set default transition for start state (some symbol)\n\n Start.jd = new State(SYM);\n return {\n start: Start,\n tokens: assign({\n groups: groups\n }, tk)\n };\n}\n/**\n\tGiven a string, returns an array of TOKEN instances representing the\n\tcomposition of that string.\n\n\t@method run\n\t@param {State<string>} start scanner starting state\n\t@param {string} str input string to scan\n\t@return {Token[]} list of tokens, each with a type and value\n*/\n\nfunction run$1(start, str) {\n // State machine is not case sensitive, so input is tokenized in lowercased\n // form (still returns regular case). Uses selective `toLowerCase` because\n // lowercasing the entire string causes the length and character position to\n // vary in some non-English strings with V8-based runtimes.\n var iterable = stringToArray(str.replace(/[A-Z]/g, function (c) {\n return c.toLowerCase();\n }));\n var charCount = iterable.length; // <= len if there are emojis, etc\n\n var tokens = []; // return value\n // cursor through the string itself, accounting for characters that have\n // width with length 2 such as emojis\n\n var cursor = 0; // Cursor through the array-representation of the string\n\n var charCursor = 0; // Tokenize the string\n\n while (charCursor < charCount) {\n var state = start;\n var nextState = null;\n var tokenLength = 0;\n var latestAccepting = null;\n var sinceAccepts = -1;\n var charsSinceAccepts = -1;\n\n while (charCursor < charCount && (nextState = state.go(iterable[charCursor]))) {\n state = nextState; // Keep track of the latest accepting state\n\n if (state.accepts()) {\n sinceAccepts = 0;\n charsSinceAccepts = 0;\n latestAccepting = state;\n } else if (sinceAccepts >= 0) {\n sinceAccepts += iterable[charCursor].length;\n charsSinceAccepts++;\n }\n\n tokenLength += iterable[charCursor].length;\n cursor += iterable[charCursor].length;\n charCursor++;\n } // Roll back to the latest accepting state\n\n\n cursor -= sinceAccepts;\n charCursor -= charsSinceAccepts;\n tokenLength -= sinceAccepts; // No more jumps, just make a new token from the last accepting one\n\n tokens.push({\n t: latestAccepting.t,\n // token type/name\n v: str.slice(cursor - tokenLength, cursor),\n // string value\n s: cursor - tokenLength,\n // start index\n e: cursor // end index (excluding)\n\n });\n }\n\n return tokens;\n}\n/**\n * Convert a String to an Array of characters, taking into account that some\n * characters like emojis take up two string indexes.\n *\n * Adapted from core-js (MIT license)\n * https://github.com/zloirock/core-js/blob/2d69cf5f99ab3ea3463c395df81e5a15b68f49d9/packages/core-js/internals/string-multibyte.js\n *\n * @function stringToArray\n * @param {string} str\n * @returns {string[]}\n */\n\nfunction stringToArray(str) {\n var result = [];\n var len = str.length;\n var index = 0;\n\n while (index < len) {\n var first = str.charCodeAt(index);\n var second = void 0;\n var char = first < 0xd800 || first > 0xdbff || index + 1 === len || (second = str.charCodeAt(index + 1)) < 0xdc00 || second > 0xdfff ? str[index] // single character\n : str.slice(index, index + 2); // two-index characters\n\n result.push(char);\n index += char.length;\n }\n\n return result;\n}\n/**\n * Fast version of ts function for when transition defaults are well known\n * @param {State<string>} state\n * @param {string} input\n * @param {string} t\n * @param {string} defaultt\n * @param {[RegExp, State<string>][]} jr\n * @returns {State<string>}\n */\n\nfunction fastts(state, input, t, defaultt, jr) {\n var next;\n var len = input.length;\n\n for (var i = 0; i < len - 1; i++) {\n var char = input[i];\n\n if (state.j[char]) {\n next = state.j[char];\n } else {\n next = new State(defaultt);\n next.jr = jr.slice();\n state.j[char] = next;\n }\n\n state = next;\n }\n\n next = new State(t);\n next.jr = jr.slice();\n state.j[input[len - 1]] = next;\n return next;\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n\n _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\n/**\n * An object where each key is a valid DOM Event Name such as `click` or `focus`\n * and each value is an event handler function.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/Element#events\n * @typedef {?{ [event: string]: Function }} EventListeners\n */\n\n/**\n * All formatted properties required to render a link, including `tagName`,\n * `attributes`, `content` and `eventListeners`.\n * @typedef {{ tagName: any, attributes: {[attr: string]: any}, content: string,\n * eventListeners: EventListeners }} IntermediateRepresentation\n */\n\n/**\n * Specify either an object described by the template type `O` or a function.\n *\n * The function takes a string value (usually the link's href attribute), the\n * link type (`'url'`, `'hashtag`', etc.) and an internal token representation\n * of the link. It should return an object of the template type `O`\n * @template O\n * @typedef {O | ((value: string, type: string, token: MultiToken) => O)} OptObj\n */\n\n/**\n * Specify either a function described by template type `F` or an object.\n *\n * Each key in the object should be a link type (`'url'`, `'hashtag`', etc.). Each\n * value should be a function with template type `F` that is called when the\n * corresponding link type is encountered.\n * @template F\n * @typedef {F | { [type: string]: F}} OptFn\n */\n\n/**\n * Specify either a value with template type `V`, a function that returns `V` or\n * an object where each value resolves to `V`.\n *\n * The function takes a string value (usually the link's href attribute), the\n * link type (`'url'`, `'hashtag`', etc.) and an internal token representation\n * of the link. It should return an object of the template type `V`\n *\n * For the object, each key should be a link type (`'url'`, `'hashtag`', etc.).\n * Each value should either have type `V` or a function that returns V. This\n * function similarly takes a string value and a token.\n *\n * Example valid types for `Opt<string>`:\n *\n * ```js\n * 'hello'\n * (value, type, token) => 'world'\n * { url: 'hello', email: (value, token) => 'world'}\n * ```\n * @template V\n * @typedef {V | ((value: string, type: string, token: MultiToken) => V) | { [type: string]: V | ((value: string, token: MultiToken) => V) }} Opt\n */\n\n/**\n * See available options: https://linkify.js.org/docs/options.html\n * @typedef {{\n * \tdefaultProtocol?: string,\n * events?: OptObj<EventListeners>,\n * \tformat?: Opt<string>,\n * \tformatHref?: Opt<string>,\n * \tnl2br?: boolean,\n * \ttagName?: Opt<any>,\n * \ttarget?: Opt<string>,\n * \trel?: Opt<string>,\n * \tvalidate?: Opt<boolean>,\n * \ttruncate?: Opt<number>,\n * \tclassName?: Opt<string>,\n * \tattributes?: OptObj<({ [attr: string]: any })>,\n * ignoreTags?: string[],\n * \trender?: OptFn<((ir: IntermediateRepresentation) => any)>\n * }} Opts\n */\n\n/**\n * @type Required<Opts>\n */\n\nvar defaults = {\n defaultProtocol: 'http',\n events: null,\n format: noop,\n formatHref: noop,\n nl2br: false,\n tagName: 'a',\n target: null,\n rel: null,\n validate: true,\n truncate: Infinity,\n className: null,\n attributes: null,\n ignoreTags: [],\n render: null\n};\n/**\n * Utility class for linkify interfaces to apply specified\n * {@link Opts formatting and rendering options}.\n *\n * @param {Opts | Options} [opts] Option value overrides.\n * @param {(ir: IntermediateRepresentation) => any} [defaultRender] (For\n * internal use) default render function that determines how to generate an\n * HTML element based on a link token's derived tagName, attributes and HTML.\n * Similar to render option\n */\n\nfunction Options(opts, defaultRender) {\n if (defaultRender === void 0) {\n defaultRender = null;\n }\n\n var o = assign({}, defaults);\n\n if (opts) {\n o = assign(o, opts instanceof Options ? opts.o : opts);\n } // Ensure all ignored tags are uppercase\n\n\n var ignoredTags = o.ignoreTags;\n var uppercaseIgnoredTags = [];\n\n for (var i = 0; i < ignoredTags.length; i++) {\n uppercaseIgnoredTags.push(ignoredTags[i].toUpperCase());\n }\n /** @protected */\n\n\n this.o = o;\n\n if (defaultRender) {\n this.defaultRender = defaultRender;\n }\n\n this.ignoreTags = uppercaseIgnoredTags;\n}\nOptions.prototype = {\n o: defaults,\n\n /**\n * @type string[]\n */\n ignoreTags: [],\n\n /**\n * @param {IntermediateRepresentation} ir\n * @returns {any}\n */\n defaultRender: function defaultRender(ir) {\n return ir;\n },\n\n /**\n * Returns true or false based on whether a token should be displayed as a\n * link based on the user options.\n * @param {MultiToken} token\n * @returns {boolean}\n */\n check: function check(token) {\n return this.get('validate', token.toString(), token);\n },\n // Private methods\n\n /**\n * Resolve an option's value based on the value of the option and the given\n * params. If operator and token are specified and the target option is\n * callable, automatically calls the function with the given argument.\n * @template {keyof Opts} K\n * @param {K} key Name of option to use\n * @param {string} [operator] will be passed to the target option if it's a\n * function. If not specified, RAW function value gets returned\n * @param {MultiToken} [token] The token from linkify.tokenize\n * @returns {Opts[K] | any}\n */\n get: function get(key, operator, token) {\n var isCallable = operator != null;\n var option = this.o[key];\n\n if (!option) {\n return option;\n }\n\n if (typeof option === 'object') {\n option = token.t in option ? option[token.t] : defaults[key];\n\n if (typeof option === 'function' && isCallable) {\n option = option(operator, token);\n }\n } else if (typeof option === 'function' && isCallable) {\n option = option(operator, token.t, token);\n }\n\n return option;\n },\n\n /**\n * @template {keyof Opts} L\n * @param {L} key Name of options object to use\n * @param {string} [operator]\n * @param {MultiToken} [token]\n * @returns {Opts[L] | any}\n */\n getObj: function getObj(key, operator, token) {\n var obj = this.o[key];\n\n if (typeof obj === 'function' && operator != null) {\n obj = obj(operator, token.t, token);\n }\n\n return obj;\n },\n\n /**\n * Convert the given token to a rendered element that may be added to the\n * calling-interface's DOM\n * @param {MultiToken} token Token to render to an HTML element\n * @returns {any} Render result; e.g., HTML string, DOM element, React\n * Component, etc.\n */\n render: function render(token) {\n var ir = token.render(this); // intermediate representation\n\n var renderFn = this.get('render', null, token) || this.defaultRender;\n return renderFn(ir, token.t, token);\n }\n};\n\nfunction noop(val) {\n return val;\n}\n\nvar options = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tdefaults: defaults,\n\tOptions: Options,\n\tassign: assign\n});\n\n/******************************************************************************\n\tMulti-Tokens\n\tTokens composed of arrays of TextTokens\n******************************************************************************/\n\n/**\n * @param {string} value\n * @param {Token[]} tokens\n */\n\nfunction MultiToken(value, tokens) {\n this.t = 'token';\n this.v = value;\n this.tk = tokens;\n}\n/**\n * Abstract class used for manufacturing tokens of text tokens. That is rather\n * than the value for a token being a small string of text, it's value an array\n * of text tokens.\n *\n * Used for grouping together URLs, emails, hashtags, and other potential\n * creations.\n * @class MultiToken\n * @property {string} t\n * @property {string} v\n * @property {Token[]} tk\n * @abstract\n */\n\nMultiToken.prototype = {\n isLink: false,\n\n /**\n * Return the string this token represents.\n * @return {string}\n */\n toString: function toString() {\n return this.v;\n },\n\n /**\n * What should the value for this token be in the `href` HTML attribute?\n * Returns the `.toString` value by default.\n * @param {string} [scheme]\n * @return {string}\n */\n toHref: function toHref(scheme) {\n return this.toString();\n },\n\n /**\n * @param {Options} options Formatting options\n * @returns {string}\n */\n toFormattedString: function toFormattedString(options) {\n var val = this.toString();\n var truncate = options.get('truncate', val, this);\n var formatted = options.get('format', val, this);\n return truncate && formatted.length > truncate ? formatted.substring(0, truncate) + '…' : formatted;\n },\n\n /**\n *\n * @param {Options} options\n * @returns {string}\n */\n toFormattedHref: function toFormattedHref(options) {\n return options.get('formatHref', this.toHref(options.get('defaultProtocol')), this);\n },\n\n /**\n * The start index of this token in the original input string\n * @returns {number}\n */\n startIndex: function startIndex() {\n return this.tk[0].s;\n },\n\n /**\n * The end index of this token in the original input string (up to this\n * index but not including it)\n * @returns {number}\n */\n endIndex: function endIndex() {\n return this.tk[this.tk.length - 1].e;\n },\n\n /**\n \tReturns an object of relevant values for this token, which includes keys\n \t* type - Kind of token ('url', 'email', etc.)\n \t* value - Original text\n \t* href - The value that should be added to the anchor tag's href\n \t\tattribute\n \t\t@method toObject\n \t@param {string} [protocol] `'http'` by default\n */\n toObject: function toObject(protocol) {\n if (protocol === void 0) {\n protocol = defaults.defaultProtocol;\n }\n\n return {\n type: this.t,\n value: this.toString(),\n isLink: this.isLink,\n href: this.toHref(protocol),\n start: this.startIndex(),\n end: this.endIndex()\n };\n },\n\n /**\n *\n * @param {Options} options Formatting option\n */\n toFormattedObject: function toFormattedObject(options) {\n return {\n type: this.t,\n value: this.toFormattedString(options),\n isLink: this.isLink,\n href: this.toFormattedHref(options),\n start: this.startIndex(),\n end: this.endIndex()\n };\n },\n\n /**\n * Whether this token should be rendered as a link according to the given options\n * @param {Options} options\n * @returns {boolean}\n */\n validate: function validate(options) {\n return options.get('validate', this.toString(), this);\n },\n\n /**\n * Return an object that represents how this link should be rendered.\n * @param {Options} options Formattinng options\n */\n render: function render(options) {\n var token = this;\n var href = this.toFormattedHref(options);\n var tagName = options.get('tagName', href, token);\n var content = this.toFormattedString(options);\n var attributes = {};\n var className = options.get('className', href, token);\n var target = options.get('target', href, token);\n var rel = options.get('rel', href, token);\n var attrs = options.getObj('attributes', href, token);\n var eventListeners = options.getObj('events', href, token);\n attributes.href = href;\n\n if (className) {\n attributes.class = className;\n }\n\n if (target) {\n attributes.target = target;\n }\n\n if (rel) {\n attributes.rel = rel;\n }\n\n if (attrs) {\n assign(attributes, attrs);\n }\n\n return {\n tagName: tagName,\n attributes: attributes,\n content: content,\n eventListeners: eventListeners\n };\n }\n}; // Base token\n/**\n * Create a new token that can be emitted by the parser state machine\n * @param {string} type readable type of the token\n * @param {object} props properties to assign or override, including isLink = true or false\n * @returns {new (value: string, tokens: Token[]) => MultiToken} new token class\n */\n\nfunction createTokenClass(type, props) {\n var Token = /*#__PURE__*/function (_MultiToken) {\n _inheritsLoose(Token, _MultiToken);\n\n function Token(value, tokens) {\n var _this;\n\n _this = _MultiToken.call(this, value, tokens) || this;\n _this.t = type;\n return _this;\n }\n\n return Token;\n }(MultiToken);\n\n for (var p in props) {\n Token.prototype[p] = props[p];\n }\n\n Token.t = type;\n return Token;\n}\n/**\n\tRepresents a list of tokens making up a valid email address\n*/\n\nvar Email = createTokenClass('email', {\n isLink: true,\n toHref: function toHref() {\n return 'mailto:' + this.toString();\n }\n});\n/**\n\tRepresents some plain text\n*/\n\nvar Text = createTokenClass('text');\n/**\n\tMulti-linebreak token - represents a line break\n\t@class Nl\n*/\n\nvar Nl = createTokenClass('nl');\n/**\n\tRepresents a list of text tokens making up a valid URL\n\t@class Url\n*/\n\nvar Url = createTokenClass('url', {\n isLink: true,\n\n /**\n \tLowercases relevant parts of the domain and adds the protocol if\n \trequired. Note that this will not escape unsafe HTML characters in the\n \tURL.\n \t\t@param {string} [scheme] default scheme (e.g., 'https')\n \t@return {string} the full href\n */\n toHref: function toHref(scheme) {\n if (scheme === void 0) {\n scheme = defaults.defaultProtocol;\n }\n\n // Check if already has a prefix scheme\n return this.hasProtocol() ? this.v : scheme + \"://\" + this.v;\n },\n\n /**\n * Check whether this URL token has a protocol\n * @return {boolean}\n */\n hasProtocol: function hasProtocol() {\n var tokens = this.tk;\n return tokens.length >= 2 && tokens[0].t !== LOCALHOST && tokens[1].t === COLON;\n }\n});\n\nvar multi = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tMultiToken: MultiToken,\n\tBase: MultiToken,\n\tcreateTokenClass: createTokenClass,\n\tEmail: Email,\n\tText: Text,\n\tNl: Nl,\n\tUrl: Url\n});\n\n/**\n\tNot exactly parser, more like the second-stage scanner (although we can\n\ttheoretically hotswap the code here with a real parser in the future... but\n\tfor a little URL-finding utility abstract syntax trees may be a little\n\toverkill).\n\n\tURL format: http://en.wikipedia.org/wiki/URI_scheme\n\tEmail format: http://en.wikipedia.org/wiki/EmailAddress (links to RFC in\n\treference)\n\n\t@module linkify\n\t@submodule parser\n\t@main run\n*/\n\nvar makeState = function makeState(arg) {\n return new State(arg);\n};\n/**\n * Generate the parser multi token-based state machine\n * @param {{ groups: Collections<string> }} tokens\n */\n\n\nfunction init$1(_ref) {\n var groups = _ref.groups;\n // Types of characters the URL can definitely end in\n var qsAccepting = groups.domain.concat([AMPERSAND, ASTERISK, AT, BACKSLASH, BACKTICK, CARET, DOLLAR, EQUALS, HYPHEN, NUM, PERCENT, PIPE, PLUS, POUND, SLASH, SYM, TILDE, UNDERSCORE]); // Types of tokens that can follow a URL and be part of the query string\n // but cannot be the very last characters\n // Characters that cannot appear in the URL at all should be excluded\n\n var qsNonAccepting = [APOSTROPHE, CLOSEANGLEBRACKET, CLOSEBRACE, CLOSEBRACKET, CLOSEPAREN, COLON, COMMA, DOT, EXCLAMATION, OPENANGLEBRACKET, OPENBRACE, OPENBRACKET, OPENPAREN, QUERY, QUOTE, SEMI]; // For addresses without the mailto prefix\n // Tokens allowed in the localpart of the email\n\n var localpartAccepting = [AMPERSAND, APOSTROPHE, ASTERISK, BACKSLASH, BACKTICK, CARET, CLOSEBRACE, DOLLAR, EQUALS, HYPHEN, NUM, OPENBRACE, PERCENT, PIPE, PLUS, POUND, QUERY, SLASH, SYM, TILDE, UNDERSCORE]; // The universal starting state.\n\n /**\n * @type State<Token>\n */\n\n var Start = makeState();\n var Localpart = tt(Start, TILDE); // Local part of the email address\n\n ta(Localpart, localpartAccepting, Localpart);\n ta(Localpart, groups.domain, Localpart);\n var Domain = makeState(),\n Scheme = makeState(),\n SlashScheme = makeState();\n ta(Start, groups.domain, Domain); // parsed string ends with a potential domain name (A)\n\n ta(Start, groups.scheme, Scheme); // e.g., 'mailto'\n\n ta(Start, groups.slashscheme, SlashScheme); // e.g., 'http'\n\n ta(Domain, localpartAccepting, Localpart);\n ta(Domain, groups.domain, Domain);\n var LocalpartAt = tt(Domain, AT); // Local part of the email address plus @\n\n tt(Localpart, AT, LocalpartAt); // close to an email address now\n\n var LocalpartDot = tt(Localpart, DOT); // Local part of the email address plus '.' (localpart cannot end in .)\n\n ta(LocalpartDot, localpartAccepting, Localpart);\n ta(LocalpartDot, groups.domain, Localpart);\n var EmailDomain = makeState();\n ta(LocalpartAt, groups.domain, EmailDomain); // parsed string starts with local email info + @ with a potential domain name\n\n ta(EmailDomain, groups.domain, EmailDomain);\n var EmailDomainDot = tt(EmailDomain, DOT); // domain followed by DOT\n\n ta(EmailDomainDot, groups.domain, EmailDomain);\n var Email$1 = makeState(Email); // Possible email address (could have more tlds)\n\n ta(EmailDomainDot, groups.tld, Email$1);\n ta(EmailDomainDot, groups.utld, Email$1);\n tt(LocalpartAt, LOCALHOST, Email$1); // Hyphen can jump back to a domain name\n\n var EmailDomainHyphen = tt(EmailDomain, HYPHEN); // parsed string starts with local email info + @ with a potential domain name\n\n ta(EmailDomainHyphen, groups.domain, EmailDomain);\n ta(Email$1, groups.domain, EmailDomain);\n tt(Email$1, DOT, EmailDomainDot);\n tt(Email$1, HYPHEN, EmailDomainHyphen); // Final possible email states\n\n var EmailColon = tt(Email$1, COLON); // URL followed by colon (potential port number here)\n\n /*const EmailColonPort = */\n\n ta(EmailColon, groups.numeric, Email); // URL followed by colon and port numner\n // Account for dots and hyphens. Hyphens are usually parts of domain names\n // (but not TLDs)\n\n var DomainHyphen = tt(Domain, HYPHEN); // domain followed by hyphen\n\n var DomainDot = tt(Domain, DOT); // domain followed by DOT\n\n ta(DomainHyphen, groups.domain, Domain);\n ta(DomainDot, localpartAccepting, Localpart);\n ta(DomainDot, groups.domain, Domain);\n var DomainDotTld = makeState(Url); // Simplest possible URL with no query string\n\n ta(DomainDot, groups.tld, DomainDotTld);\n ta(DomainDot, groups.utld, DomainDotTld);\n ta(DomainDotTld, groups.domain, Domain);\n ta(DomainDotTld, localpartAccepting, Localpart);\n tt(DomainDotTld, DOT, DomainDot);\n tt(DomainDotTld, HYPHEN, DomainHyphen);\n tt(DomainDotTld, AT, LocalpartAt);\n var DomainDotTldColon = tt(DomainDotTld, COLON); // URL followed by colon (potential port number here)\n\n var DomainDotTldColonPort = makeState(Url); // TLD followed by a port number\n\n ta(DomainDotTldColon, groups.numeric, DomainDotTldColonPort); // Long URL with optional port and maybe query string\n\n var Url$1 = makeState(Url); // URL with extra symbols at the end, followed by an opening bracket\n\n var UrlNonaccept = makeState(); // URL followed by some symbols (will not be part of the final URL)\n // Query strings\n\n ta(Url$1, qsAccepting, Url$1);\n ta(Url$1, qsNonAccepting, UrlNonaccept);\n ta(UrlNonaccept, qsAccepting, Url$1);\n ta(UrlNonaccept, qsNonAccepting, UrlNonaccept); // Become real URLs after `SLASH` or `COLON NUM SLASH`\n // Here works with or without scheme:// prefix\n\n tt(DomainDotTld, SLASH, Url$1);\n tt(DomainDotTldColonPort, SLASH, Url$1); // Note that domains that begin with schemes are treated slighly differently\n\n var UriPrefix = tt(Scheme, COLON); // e.g., 'mailto:' or 'http://'\n\n var SlashSchemeColon = tt(SlashScheme, COLON); // e.g., 'http:'\n\n var SlashSchemeColonSlash = tt(SlashSchemeColon, SLASH); // e.g., 'http:/'\n\n tt(SlashSchemeColonSlash, SLASH, UriPrefix); // Scheme states can transition to domain states\n\n ta(Scheme, groups.domain, Domain);\n tt(Scheme, DOT, DomainDot);\n tt(Scheme, HYPHEN, DomainHyphen);\n ta(SlashScheme, groups.domain, Domain);\n tt(SlashScheme, DOT, DomainDot);\n tt(SlashScheme, HYPHEN, DomainHyphen); // Force URL with scheme prefix followed by anything sane\n\n ta(UriPrefix, groups.domain, Url$1);\n tt(UriPrefix, SLASH, Url$1); // URL, followed by an opening bracket\n\n var UrlOpenbrace = tt(Url$1, OPENBRACE); // URL followed by {\n\n var UrlOpenbracket = tt(Url$1, OPENBRACKET); // URL followed by [\n\n var UrlOpenanglebracket = tt(Url$1, OPENANGLEBRACKET); // URL followed by <\n\n var UrlOpenparen = tt(Url$1, OPENPAREN); // URL followed by (\n\n tt(UrlNonaccept, OPENBRACE, UrlOpenbrace);\n tt(UrlNonaccept, OPENBRACKET, UrlOpenbracket);\n tt(UrlNonaccept, OPENANGLEBRACKET, UrlOpenanglebracket);\n tt(UrlNonaccept, OPENPAREN, UrlOpenparen); // Closing bracket component. This character WILL be included in the URL\n\n tt(UrlOpenbrace, CLOSEBRACE, Url$1);\n tt(UrlOpenbracket, CLOSEBRACKET, Url$1);\n tt(UrlOpenanglebracket, CLOSEANGLEBRACKET, Url$1);\n tt(UrlOpenparen, CLOSEPAREN, Url$1);\n tt(UrlOpenbrace, CLOSEBRACE, Url$1); // URL that beings with an opening bracket, followed by a symbols.\n // Note that the final state can still be `UrlOpenbrace` (if the URL only\n // has a single opening bracket for some reason).\n\n var UrlOpenbraceQ = makeState(Url); // URL followed by { and some symbols that the URL can end it\n\n var UrlOpenbracketQ = makeState(Url); // URL followed by [ and some symbols that the URL can end it\n\n var UrlOpenanglebracketQ = makeState(Url); // URL followed by < and some symbols that the URL can end it\n\n var UrlOpenparenQ = makeState(Url); // URL followed by ( and some symbols that the URL can end it\n\n ta(UrlOpenbrace, qsAccepting, UrlOpenbraceQ);\n ta(UrlOpenbracket, qsAccepting, UrlOpenbracketQ);\n ta(UrlOpenanglebracket, qsAccepting, UrlOpenanglebracketQ);\n ta(UrlOpenparen, qsAccepting, UrlOpenparenQ);\n var UrlOpenbraceSyms = makeState(); // UrlOpenbrace followed by some symbols it cannot end it\n\n var UrlOpenbracketSyms = makeState(); // UrlOpenbracketQ followed by some symbols it cannot end it\n\n var UrlOpenanglebracketSyms = makeState(); // UrlOpenanglebracketQ followed by some symbols it cannot end it\n\n var UrlOpenparenSyms = makeState(); // UrlOpenparenQ followed by some symbols it cannot end it\n\n ta(UrlOpenbrace, qsNonAccepting);\n ta(UrlOpenbracket, qsNonAccepting);\n ta(UrlOpenanglebracket, qsNonAccepting);\n ta(UrlOpenparen, qsNonAccepting); // URL that begins with an opening bracket, followed by some symbols\n\n ta(UrlOpenbraceQ, qsAccepting, UrlOpenbraceQ);\n ta(UrlOpenbracketQ, qsAccepting, UrlOpenbracketQ);\n ta(UrlOpenanglebracketQ, qsAccepting, UrlOpenanglebracketQ);\n ta(UrlOpenparenQ, qsAccepting, UrlOpenparenQ);\n ta(UrlOpenbraceQ, qsNonAccepting, UrlOpenbraceQ);\n ta(UrlOpenbracketQ, qsNonAccepting, UrlOpenbracketQ);\n ta(UrlOpenanglebracketQ, qsNonAccepting, UrlOpenanglebracketQ);\n ta(UrlOpenparenQ, qsNonAccepting, UrlOpenparenQ);\n ta(UrlOpenbraceSyms, qsAccepting, UrlOpenbraceSyms);\n ta(UrlOpenbracketSyms, qsAccepting, UrlOpenbracketQ);\n ta(UrlOpenanglebracketSyms, qsAccepting, UrlOpenanglebracketQ);\n ta(UrlOpenparenSyms, qsAccepting, UrlOpenparenQ);\n ta(UrlOpenbraceSyms, qsNonAccepting, UrlOpenbraceSyms);\n ta(UrlOpenbracketSyms, qsNonAccepting, UrlOpenbracketSyms);\n ta(UrlOpenanglebracketSyms, qsNonAccepting, UrlOpenanglebracketSyms);\n ta(UrlOpenparenSyms, qsNonAccepting, UrlOpenparenSyms); // Close brace/bracket to become regular URL\n\n tt(UrlOpenbracketQ, CLOSEBRACKET, Url$1);\n tt(UrlOpenanglebracketQ, CLOSEANGLEBRACKET, Url$1);\n tt(UrlOpenparenQ, CLOSEPAREN, Url$1);\n tt(UrlOpenbraceQ, CLOSEBRACE, Url$1);\n tt(UrlOpenbracketSyms, CLOSEBRACKET, Url$1);\n tt(UrlOpenanglebracketSyms, CLOSEANGLEBRACKET, Url$1);\n tt(UrlOpenparenSyms, CLOSEPAREN, Url$1);\n tt(UrlOpenbraceSyms, CLOSEPAREN, Url$1);\n tt(Start, LOCALHOST, DomainDotTld); // localhost is a valid URL state\n\n tt(Start, NL$1, Nl); // single new line\n\n return {\n start: Start,\n tokens: tk\n };\n}\n/**\n * Run the parser state machine on a list of scanned string-based tokens to\n * create a list of multi tokens, each of which represents a URL, email address,\n * plain text, etc.\n *\n * @param {State<MultiToken>} start parser start state\n * @param {string} input the original input used to generate the given tokens\n * @param {Token[]} tokens list of scanned tokens\n * @returns {MultiToken[]}\n */\n\nfunction run(start, input, tokens) {\n var len = tokens.length;\n var cursor = 0;\n var multis = [];\n var textTokens = [];\n\n while (cursor < len) {\n var state = start;\n var secondState = null;\n var nextState = null;\n var multiLength = 0;\n var latestAccepting = null;\n var sinceAccepts = -1;\n\n while (cursor < len && !(secondState = state.go(tokens[cursor].t))) {\n // Starting tokens with nowhere to jump to.\n // Consider these to be just plain text\n textTokens.push(tokens[cursor++]);\n }\n\n while (cursor < len && (nextState = secondState || state.go(tokens[cursor].t))) {\n // Get the next state\n secondState = null;\n state = nextState; // Keep track of the latest accepting state\n\n if (state.accepts()) {\n sinceAccepts = 0;\n latestAccepting = state;\n } else if (sinceAccepts >= 0) {\n sinceAccepts++;\n }\n\n cursor++;\n multiLength++;\n }\n\n if (sinceAccepts < 0) {\n // No accepting state was found, part of a regular text token add\n // the first text token to the text tokens array and try again from\n // the next\n cursor -= multiLength;\n\n if (cursor < len) {\n textTokens.push(tokens[cursor]);\n cursor++;\n }\n } else {\n // Accepting state!\n // First close off the textTokens (if available)\n if (textTokens.length > 0) {\n multis.push(initMultiToken(Text, input, textTokens));\n textTokens = [];\n } // Roll back to the latest accepting state\n\n\n cursor -= sinceAccepts;\n multiLength -= sinceAccepts; // Create a new multitoken\n\n var Multi = latestAccepting.t;\n var subtokens = tokens.slice(cursor - multiLength, cursor);\n multis.push(initMultiToken(Multi, input, subtokens));\n }\n } // Finally close off the textTokens (if available)\n\n\n if (textTokens.length > 0) {\n multis.push(initMultiToken(Text, input, textTokens));\n }\n\n return multis;\n}\n/**\n * Utility function for instantiating a new multitoken with all the relevant\n * fields during parsing.\n * @param {new (value: string, tokens: Token[]) => MultiToken} Multi class to instantiate\n * @param {string} input original input string\n * @param {Token[]} tokens consecutive tokens scanned from input string\n * @returns {MultiToken}\n */\n\nfunction initMultiToken(Multi, input, tokens) {\n var startIdx = tokens[0].s;\n var endIdx = tokens[tokens.length - 1].e;\n var value = input.slice(startIdx, endIdx);\n return new Multi(value, tokens);\n}\n\nvar warn = typeof console !== 'undefined' && console && console.warn || function () {};\n\nvar warnAdvice = 'To avoid this warning, please register all custom schemes before invoking linkify the first time.'; // Side-effect initialization state\n\nvar INIT = {\n scanner: null,\n parser: null,\n tokenQueue: [],\n pluginQueue: [],\n customSchemes: [],\n initialized: false\n};\n/**\n * @typedef {{\n * \tstart: State<string>,\n * \ttokens: { groups: Collections<string> } & typeof tk\n * }} ScannerInit\n */\n\n/**\n * @typedef {{\n * \tstart: State<MultiToken>,\n * \ttokens: typeof multi\n * }} ParserInit\n */\n\n/**\n * @typedef {(arg: { scanner: ScannerInit }) => void} TokenPlugin\n */\n\n/**\n * @typedef {(arg: { scanner: ScannerInit, parser: ParserInit }) => void} Plugin\n */\n\n/**\n * De-register all plugins and reset the internal state-machine. Used for\n * testing; not required in practice.\n * @private\n */\n\nfunction reset() {\n State.groups = {};\n INIT.scanner = null;\n INIT.parser = null;\n INIT.tokenQueue = [];\n INIT.pluginQueue = [];\n INIT.customSchemes = [];\n INIT.initialized = false;\n}\n/**\n * Register a token plugin to allow the scanner to recognize additional token\n * types before the parser state machine is constructed from the results.\n * @param {string} name of plugin to register\n * @param {TokenPlugin} plugin function that accepts the scanner state machine\n * and available scanner tokens and collections and extends the state machine to\n * recognize additional tokens or groups.\n */\n\nfunction registerTokenPlugin(name, plugin) {\n if (typeof plugin !== 'function') {\n throw new Error(\"linkifyjs: Invalid token plugin \" + plugin + \" (expects function)\");\n }\n\n for (var i = 0; i < INIT.tokenQueue.length; i++) {\n if (name === INIT.tokenQueue[i][0]) {\n warn(\"linkifyjs: token plugin \\\"\" + name + \"\\\" already registered - will be overwritten\");\n INIT.tokenQueue[i] = [name, plugin];\n return;\n }\n }\n\n INIT.tokenQueue.push([name, plugin]);\n\n if (INIT.initialized) {\n warn(\"linkifyjs: already initialized - will not register token plugin \\\"\" + name + \"\\\" until you manually call linkify.init(). \" + warnAdvice);\n }\n}\n/**\n * Register a linkify plugin\n * @param {string} name of plugin to register\n * @param {Plugin} plugin function that accepts the parser state machine and\n * extends the parser to recognize additional link types\n */\n\nfunction registerPlugin(name, plugin) {\n if (typeof plugin !== 'function') {\n throw new Error(\"linkifyjs: Invalid plugin \" + plugin + \" (expects function)\");\n }\n\n for (var i = 0; i < INIT.pluginQueue.length; i++) {\n if (name === INIT.pluginQueue[i][0]) {\n warn(\"linkifyjs: plugin \\\"\" + name + \"\\\" already registered - will be overwritten\");\n INIT.pluginQueue[i] = [name, plugin];\n return;\n }\n }\n\n INIT.pluginQueue.push([name, plugin]);\n\n if (INIT.initialized) {\n warn(\"linkifyjs: already initialized - will not register plugin \\\"\" + name + \"\\\" until you manually call linkify.init(). \" + warnAdvice);\n }\n}\n/**\n * Detect URLs with the following additional protocol. Anything with format\n * \"protocol://...\" will be considered a link. If `optionalSlashSlash` is set to\n * `true`, anything with format \"protocol:...\" will be considered a link.\n * @param {string} protocol\n * @param {boolean} [optionalSlashSlash]\n */\n\nfunction registerCustomProtocol(scheme, optionalSlashSlash) {\n if (optionalSlashSlash === void 0) {\n optionalSlashSlash = false;\n }\n\n if (INIT.initialized) {\n warn(\"linkifyjs: already initialized - will not register custom scheme \\\"\" + scheme + \"\\\" until you manually call linkify.init(). \" + warnAdvice);\n }\n\n if (!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(scheme)) {\n throw new Error('linkifyjs: incorrect scheme format.\\n 1. Must only contain digits, lowercase ASCII letters or \"-\"\\n 2. Cannot start or end with \"-\"\\n 3. \"-\" cannot repeat');\n }\n\n INIT.customSchemes.push([scheme, optionalSlashSlash]);\n}\n/**\n * Initialize the linkify state machine. Called automatically the first time\n * linkify is called on a string, but may be called manually as well.\n */\n\nfunction init() {\n // Initialize scanner state machine and plugins\n INIT.scanner = init$2(INIT.customSchemes);\n\n for (var i = 0; i < INIT.tokenQueue.length; i++) {\n INIT.tokenQueue[i][1]({\n scanner: INIT.scanner\n });\n } // Initialize parser state machine and plugins\n\n\n INIT.parser = init$1(INIT.scanner.tokens);\n\n for (var _i = 0; _i < INIT.pluginQueue.length; _i++) {\n INIT.pluginQueue[_i][1]({\n scanner: INIT.scanner,\n parser: INIT.parser\n });\n }\n\n INIT.initialized = true;\n}\n/**\n * Parse a string into tokens that represent linkable and non-linkable sub-components\n * @param {string} str\n * @return {MultiToken[]} tokens\n */\n\nfunction tokenize(str) {\n if (!INIT.initialized) {\n init();\n }\n\n return run(INIT.parser.start, str, run$1(INIT.scanner.start, str));\n}\n/**\n * Find a list of linkable items in the given string.\n * @param {string} str string to find links in\n * @param {string | Opts} [type] either formatting options or specific type of\n * links to find, e.g., 'url' or 'email'\n * @param {Opts} [opts] formatting options for final output. Cannot be specified\n * if opts already provided in `type` argument\n*/\n\nfunction find(str, type, opts) {\n if (type === void 0) {\n type = null;\n }\n\n if (opts === void 0) {\n opts = null;\n }\n\n if (type && typeof type === 'object') {\n if (opts) {\n throw Error(\"linkifyjs: Invalid link type \" + type + \"; must be a string\");\n }\n\n opts = type;\n type = null;\n }\n\n var options = new Options(opts);\n var tokens = tokenize(str);\n var filtered = [];\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (token.isLink && (!type || token.t === type)) {\n filtered.push(token.toFormattedObject(options));\n }\n }\n\n return filtered;\n}\n/**\n * Is the given string valid linkable text of some sort. Note that this does not\n * trim the text for you.\n *\n * Optionally pass in a second `type` param, which is the type of link to test\n * for.\n *\n * For example,\n *\n * linkify.test(str, 'email');\n *\n * Returns `true` if str is a valid email.\n * @param {string} str string to test for links\n * @param {string} [type] optional specific link type to look for\n * @returns boolean true/false\n */\n\nfunction test(str, type) {\n if (type === void 0) {\n type = null;\n }\n\n var tokens = tokenize(str);\n return tokens.length === 1 && tokens[0].isLink && (!type || tokens[0].t === type);\n}\n\nexport { MultiToken, Options, State, createTokenClass, find, init, multi, options, regexp, registerCustomProtocol, registerPlugin, registerTokenPlugin, reset, stringToArray, test, tokenize };\n","import { Options, tokenize as tokenize$1 } from 'linkifyjs';\n\n/**\n * generated from https://raw.githubusercontent.com/w3c/html/26b5126f96f736f796b9e29718138919dd513744/entities.json\n * do not edit\n */\nvar HTML5NamedCharRefs = {\n // We don't need the complete named character reference because linkifyHtml\n // does not modify the escape sequences. We do need &nbsp; so that\n // whitespace is parsed properly. Other types of whitespace should already\n // be accounted for. &gt; &lt; and &quot; are also frequently relevant ones\n amp: \"&\",\n gt: \">\",\n lt: \"<\",\n nbsp: \" \",\n quot: \"\\\"\"\n};\nvar HEXCHARCODE = /^#[xX]([A-Fa-f0-9]+)$/;\nvar CHARCODE = /^#([0-9]+)$/;\nvar NAMED = /^([A-Za-z0-9]+)$/;\n\nvar EntityParser =\n/** @class */\nfunction () {\n function EntityParser(named) {\n this.named = named;\n }\n\n EntityParser.prototype.parse = function (entity) {\n if (!entity) {\n return;\n }\n\n var matches = entity.match(HEXCHARCODE);\n\n if (matches) {\n return String.fromCharCode(parseInt(matches[1], 16));\n }\n\n matches = entity.match(CHARCODE);\n\n if (matches) {\n return String.fromCharCode(parseInt(matches[1], 10));\n }\n\n matches = entity.match(NAMED);\n\n if (matches) {\n return this.named[matches[1]] || \"&\" + matches[1] + \";\";\n }\n };\n\n return EntityParser;\n}();\n\nvar WSP = /[\\t\\n\\f ]/;\nvar ALPHA = /[A-Za-z]/;\nvar CRLF = /\\r\\n?/g;\n\nfunction isSpace(char) {\n return WSP.test(char);\n}\n\nfunction isAlpha(char) {\n return ALPHA.test(char);\n}\n\nfunction preprocessInput(input) {\n return input.replace(CRLF, '\\n');\n}\n\nvar EventedTokenizer =\n/** @class */\nfunction () {\n function EventedTokenizer(delegate, entityParser, mode) {\n if (mode === void 0) {\n mode = 'precompile';\n }\n\n this.delegate = delegate;\n this.entityParser = entityParser;\n this.mode = mode;\n this.state = \"beforeData\"\n /* beforeData */\n ;\n this.line = -1;\n this.column = -1;\n this.input = '';\n this.index = -1;\n this.tagNameBuffer = '';\n this.states = {\n beforeData: function beforeData() {\n var char = this.peek();\n\n if (char === '<' && !this.isIgnoredEndTag()) {\n this.transitionTo(\"tagOpen\"\n /* tagOpen */\n );\n this.markTagStart();\n this.consume();\n } else {\n if (this.mode === 'precompile' && char === '\\n') {\n var tag = this.tagNameBuffer.toLowerCase();\n\n if (tag === 'pre' || tag === 'textarea') {\n this.consume();\n }\n }\n\n this.transitionTo(\"data\"\n /* data */\n );\n this.delegate.beginData();\n }\n },\n data: function data() {\n var char = this.peek();\n var tag = this.tagNameBuffer;\n\n if (char === '<' && !this.isIgnoredEndTag()) {\n this.delegate.finishData();\n this.transitionTo(\"tagOpen\"\n /* tagOpen */\n );\n this.markTagStart();\n this.consume();\n } else if (char === '&' && tag !== 'script' && tag !== 'style') {\n this.consume();\n this.delegate.appendToData(this.consumeCharRef() || '&');\n } else {\n this.consume();\n this.delegate.appendToData(char);\n }\n },\n tagOpen: function tagOpen() {\n var char = this.consume();\n\n if (char === '!') {\n this.transitionTo(\"markupDeclarationOpen\"\n /* markupDeclarationOpen */\n );\n } else if (char === '/') {\n this.transitionTo(\"endTagOpen\"\n /* endTagOpen */\n );\n } else if (char === '@' || char === ':' || isAlpha(char)) {\n this.transitionTo(\"tagName\"\n /* tagName */\n );\n this.tagNameBuffer = '';\n this.delegate.beginStartTag();\n this.appendToTagName(char);\n }\n },\n markupDeclarationOpen: function markupDeclarationOpen() {\n var char = this.consume();\n\n if (char === '-' && this.peek() === '-') {\n this.consume();\n this.transitionTo(\"commentStart\"\n /* commentStart */\n );\n this.delegate.beginComment();\n } else {\n var maybeDoctype = char.toUpperCase() + this.input.substring(this.index, this.index + 6).toUpperCase();\n\n if (maybeDoctype === 'DOCTYPE') {\n this.consume();\n this.consume();\n this.consume();\n this.consume();\n this.consume();\n this.consume();\n this.transitionTo(\"doctype\"\n /* doctype */\n );\n if (this.delegate.beginDoctype) this.delegate.beginDoctype();\n }\n }\n },\n doctype: function doctype() {\n var char = this.consume();\n\n if (isSpace(char)) {\n this.transitionTo(\"beforeDoctypeName\"\n /* beforeDoctypeName */\n );\n }\n },\n beforeDoctypeName: function beforeDoctypeName() {\n var char = this.consume();\n\n if (isSpace(char)) {\n return;\n } else {\n this.transitionTo(\"doctypeName\"\n /* doctypeName */\n );\n if (this.delegate.appendToDoctypeName) this.delegate.appendToDoctypeName(char.toLowerCase());\n }\n },\n doctypeName: function doctypeName() {\n var char = this.consume();\n\n if (isSpace(char)) {\n this.transitionTo(\"afterDoctypeName\"\n /* afterDoctypeName */\n );\n } else if (char === '>') {\n if (this.delegate.endDoctype) this.delegate.endDoctype();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n } else {\n if (this.delegate.appendToDoctypeName) this.delegate.appendToDoctypeName(char.toLowerCase());\n }\n },\n afterDoctypeName: function afterDoctypeName() {\n var char = this.consume();\n\n if (isSpace(char)) {\n return;\n } else if (char === '>') {\n if (this.delegate.endDoctype) this.delegate.endDoctype();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n } else {\n var nextSixChars = char.toUpperCase() + this.input.substring(this.index, this.index + 5).toUpperCase();\n var isPublic = nextSixChars.toUpperCase() === 'PUBLIC';\n var isSystem = nextSixChars.toUpperCase() === 'SYSTEM';\n\n if (isPublic || isSystem) {\n this.consume();\n this.consume();\n this.consume();\n this.consume();\n this.consume();\n this.consume();\n }\n\n if (isPublic) {\n this.transitionTo(\"afterDoctypePublicKeyword\"\n /* afterDoctypePublicKeyword */\n );\n } else if (isSystem) {\n this.transitionTo(\"afterDoctypeSystemKeyword\"\n /* afterDoctypeSystemKeyword */\n );\n }\n }\n },\n afterDoctypePublicKeyword: function afterDoctypePublicKeyword() {\n var char = this.peek();\n\n if (isSpace(char)) {\n this.transitionTo(\"beforeDoctypePublicIdentifier\"\n /* beforeDoctypePublicIdentifier */\n );\n this.consume();\n } else if (char === '\"') {\n this.transitionTo(\"doctypePublicIdentifierDoubleQuoted\"\n /* doctypePublicIdentifierDoubleQuoted */\n );\n this.consume();\n } else if (char === \"'\") {\n this.transitionTo(\"doctypePublicIdentifierSingleQuoted\"\n /* doctypePublicIdentifierSingleQuoted */\n );\n this.consume();\n } else if (char === '>') {\n this.consume();\n if (this.delegate.endDoctype) this.delegate.endDoctype();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n }\n },\n doctypePublicIdentifierDoubleQuoted: function doctypePublicIdentifierDoubleQuoted() {\n var char = this.consume();\n\n if (char === '\"') {\n this.transitionTo(\"afterDoctypePublicIdentifier\"\n /* afterDoctypePublicIdentifier */\n );\n } else if (char === '>') {\n if (this.delegate.endDoctype) this.delegate.endDoctype();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n } else {\n if (this.delegate.appendToDoctypePublicIdentifier) this.delegate.appendToDoctypePublicIdentifier(char);\n }\n },\n doctypePublicIdentifierSingleQuoted: function doctypePublicIdentifierSingleQuoted() {\n var char = this.consume();\n\n if (char === \"'\") {\n this.transitionTo(\"afterDoctypePublicIdentifier\"\n /* afterDoctypePublicIdentifier */\n );\n } else if (char === '>') {\n if (this.delegate.endDoctype) this.delegate.endDoctype();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n } else {\n if (this.delegate.appendToDoctypePublicIdentifier) this.delegate.appendToDoctypePublicIdentifier(char);\n }\n },\n afterDoctypePublicIdentifier: function afterDoctypePublicIdentifier() {\n var char = this.consume();\n\n if (isSpace(char)) {\n this.transitionTo(\"betweenDoctypePublicAndSystemIdentifiers\"\n /* betweenDoctypePublicAndSystemIdentifiers */\n );\n } else if (char === '>') {\n if (this.delegate.endDoctype) this.delegate.endDoctype();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n } else if (char === '\"') {\n this.transitionTo(\"doctypeSystemIdentifierDoubleQuoted\"\n /* doctypeSystemIdentifierDoubleQuoted */\n );\n } else if (char === \"'\") {\n this.transitionTo(\"doctypeSystemIdentifierSingleQuoted\"\n /* doctypeSystemIdentifierSingleQuoted */\n );\n }\n },\n betweenDoctypePublicAndSystemIdentifiers: function betweenDoctypePublicAndSystemIdentifiers() {\n var char = this.consume();\n\n if (isSpace(char)) {\n return;\n } else if (char === '>') {\n if (this.delegate.endDoctype) this.delegate.endDoctype();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n } else if (char === '\"') {\n this.transitionTo(\"doctypeSystemIdentifierDoubleQuoted\"\n /* doctypeSystemIdentifierDoubleQuoted */\n );\n } else if (char === \"'\") {\n this.transitionTo(\"doctypeSystemIdentifierSingleQuoted\"\n /* doctypeSystemIdentifierSingleQuoted */\n );\n }\n },\n doctypeSystemIdentifierDoubleQuoted: function doctypeSystemIdentifierDoubleQuoted() {\n var char = this.consume();\n\n if (char === '\"') {\n this.transitionTo(\"afterDoctypeSystemIdentifier\"\n /* afterDoctypeSystemIdentifier */\n );\n } else if (char === '>') {\n if (this.delegate.endDoctype) this.delegate.endDoctype();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n } else {\n if (this.delegate.appendToDoctypeSystemIdentifier) this.delegate.appendToDoctypeSystemIdentifier(char);\n }\n },\n doctypeSystemIdentifierSingleQuoted: function doctypeSystemIdentifierSingleQuoted() {\n var char = this.consume();\n\n if (char === \"'\") {\n this.transitionTo(\"afterDoctypeSystemIdentifier\"\n /* afterDoctypeSystemIdentifier */\n );\n } else if (char === '>') {\n if (this.delegate.endDoctype) this.delegate.endDoctype();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n } else {\n if (this.delegate.appendToDoctypeSystemIdentifier) this.delegate.appendToDoctypeSystemIdentifier(char);\n }\n },\n afterDoctypeSystemIdentifier: function afterDoctypeSystemIdentifier() {\n var char = this.consume();\n\n if (isSpace(char)) {\n return;\n } else if (char === '>') {\n if (this.delegate.endDoctype) this.delegate.endDoctype();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n }\n },\n commentStart: function commentStart() {\n var char = this.consume();\n\n if (char === '-') {\n this.transitionTo(\"commentStartDash\"\n /* commentStartDash */\n );\n } else if (char === '>') {\n this.delegate.finishComment();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n } else {\n this.delegate.appendToCommentData(char);\n this.transitionTo(\"comment\"\n /* comment */\n );\n }\n },\n commentStartDash: function commentStartDash() {\n var char = this.consume();\n\n if (char === '-') {\n this.transitionTo(\"commentEnd\"\n /* commentEnd */\n );\n } else if (char === '>') {\n this.delegate.finishComment();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n } else {\n this.delegate.appendToCommentData('-');\n this.transitionTo(\"comment\"\n /* comment */\n );\n }\n },\n comment: function comment() {\n var char = this.consume();\n\n if (char === '-') {\n this.transitionTo(\"commentEndDash\"\n /* commentEndDash */\n );\n } else {\n this.delegate.appendToCommentData(char);\n }\n },\n commentEndDash: function commentEndDash() {\n var char = this.consume();\n\n if (char === '-') {\n this.transitionTo(\"commentEnd\"\n /* commentEnd */\n );\n } else {\n this.delegate.appendToCommentData('-' + char);\n this.transitionTo(\"comment\"\n /* comment */\n );\n }\n },\n commentEnd: function commentEnd() {\n var char = this.consume();\n\n if (char === '>') {\n this.delegate.finishComment();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n } else {\n this.delegate.appendToCommentData('--' + char);\n this.transitionTo(\"comment\"\n /* comment */\n );\n }\n },\n tagName: function tagName() {\n var char = this.consume();\n\n if (isSpace(char)) {\n this.transitionTo(\"beforeAttributeName\"\n /* beforeAttributeName */\n );\n } else if (char === '/') {\n this.transitionTo(\"selfClosingStartTag\"\n /* selfClosingStartTag */\n );\n } else if (char === '>') {\n this.delegate.finishTag();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n } else {\n this.appendToTagName(char);\n }\n },\n endTagName: function endTagName() {\n var char = this.consume();\n\n if (isSpace(char)) {\n this.transitionTo(\"beforeAttributeName\"\n /* beforeAttributeName */\n );\n this.tagNameBuffer = '';\n } else if (char === '/') {\n this.transitionTo(\"selfClosingStartTag\"\n /* selfClosingStartTag */\n );\n this.tagNameBuffer = '';\n } else if (char === '>') {\n this.delegate.finishTag();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n this.tagNameBuffer = '';\n } else {\n this.appendToTagName(char);\n }\n },\n beforeAttributeName: function beforeAttributeName() {\n var char = this.peek();\n\n if (isSpace(char)) {\n this.consume();\n return;\n } else if (char === '/') {\n this.transitionTo(\"selfClosingStartTag\"\n /* selfClosingStartTag */\n );\n this.consume();\n } else if (char === '>') {\n this.consume();\n this.delegate.finishTag();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n } else if (char === '=') {\n this.delegate.reportSyntaxError('attribute name cannot start with equals sign');\n this.transitionTo(\"attributeName\"\n /* attributeName */\n );\n this.delegate.beginAttribute();\n this.consume();\n this.delegate.appendToAttributeName(char);\n } else {\n this.transitionTo(\"attributeName\"\n /* attributeName */\n );\n this.delegate.beginAttribute();\n }\n },\n attributeName: function attributeName() {\n var char = this.peek();\n\n if (isSpace(char)) {\n this.transitionTo(\"afterAttributeName\"\n /* afterAttributeName */\n );\n this.consume();\n } else if (char === '/') {\n this.delegate.beginAttributeValue(false);\n this.delegate.finishAttributeValue();\n this.consume();\n this.transitionTo(\"selfClosingStartTag\"\n /* selfClosingStartTag */\n );\n } else if (char === '=') {\n this.transitionTo(\"beforeAttributeValue\"\n /* beforeAttributeValue */\n );\n this.consume();\n } else if (char === '>') {\n this.delegate.beginAttributeValue(false);\n this.delegate.finishAttributeValue();\n this.consume();\n this.delegate.finishTag();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n } else if (char === '\"' || char === \"'\" || char === '<') {\n this.delegate.reportSyntaxError(char + ' is not a valid character within attribute names');\n this.consume();\n this.delegate.appendToAttributeName(char);\n } else {\n this.consume();\n this.delegate.appendToAttributeName(char);\n }\n },\n afterAttributeName: function afterAttributeName() {\n var char = this.peek();\n\n if (isSpace(char)) {\n this.consume();\n return;\n } else if (char === '/') {\n this.delegate.beginAttributeValue(false);\n this.delegate.finishAttributeValue();\n this.consume();\n this.transitionTo(\"selfClosingStartTag\"\n /* selfClosingStartTag */\n );\n } else if (char === '=') {\n this.consume();\n this.transitionTo(\"beforeAttributeValue\"\n /* beforeAttributeValue */\n );\n } else if (char === '>') {\n this.delegate.beginAttributeValue(false);\n this.delegate.finishAttributeValue();\n this.consume();\n this.delegate.finishTag();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n } else {\n this.delegate.beginAttributeValue(false);\n this.delegate.finishAttributeValue();\n this.transitionTo(\"attributeName\"\n /* attributeName */\n );\n this.delegate.beginAttribute();\n this.consume();\n this.delegate.appendToAttributeName(char);\n }\n },\n beforeAttributeValue: function beforeAttributeValue() {\n var char = this.peek();\n\n if (isSpace(char)) {\n this.consume();\n } else if (char === '\"') {\n this.transitionTo(\"attributeValueDoubleQuoted\"\n /* attributeValueDoubleQuoted */\n );\n this.delegate.beginAttributeValue(true);\n this.consume();\n } else if (char === \"'\") {\n this.transitionTo(\"attributeValueSingleQuoted\"\n /* attributeValueSingleQuoted */\n );\n this.delegate.beginAttributeValue(true);\n this.consume();\n } else if (char === '>') {\n this.delegate.beginAttributeValue(false);\n this.delegate.finishAttributeValue();\n this.consume();\n this.delegate.finishTag();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n } else {\n this.transitionTo(\"attributeValueUnquoted\"\n /* attributeValueUnquoted */\n );\n this.delegate.beginAttributeValue(false);\n this.consume();\n this.delegate.appendToAttributeValue(char);\n }\n },\n attributeValueDoubleQuoted: function attributeValueDoubleQuoted() {\n var char = this.consume();\n\n if (char === '\"') {\n this.delegate.finishAttributeValue();\n this.transitionTo(\"afterAttributeValueQuoted\"\n /* afterAttributeValueQuoted */\n );\n } else if (char === '&') {\n this.delegate.appendToAttributeValue(this.consumeCharRef() || '&');\n } else {\n this.delegate.appendToAttributeValue(char);\n }\n },\n attributeValueSingleQuoted: function attributeValueSingleQuoted() {\n var char = this.consume();\n\n if (char === \"'\") {\n this.delegate.finishAttributeValue();\n this.transitionTo(\"afterAttributeValueQuoted\"\n /* afterAttributeValueQuoted */\n );\n } else if (char === '&') {\n this.delegate.appendToAttributeValue(this.consumeCharRef() || '&');\n } else {\n this.delegate.appendToAttributeValue(char);\n }\n },\n attributeValueUnquoted: function attributeValueUnquoted() {\n var char = this.peek();\n\n if (isSpace(char)) {\n this.delegate.finishAttributeValue();\n this.consume();\n this.transitionTo(\"beforeAttributeName\"\n /* beforeAttributeName */\n );\n } else if (char === '/') {\n this.delegate.finishAttributeValue();\n this.consume();\n this.transitionTo(\"selfClosingStartTag\"\n /* selfClosingStartTag */\n );\n } else if (char === '&') {\n this.consume();\n this.delegate.appendToAttributeValue(this.consumeCharRef() || '&');\n } else if (char === '>') {\n this.delegate.finishAttributeValue();\n this.consume();\n this.delegate.finishTag();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n } else {\n this.consume();\n this.delegate.appendToAttributeValue(char);\n }\n },\n afterAttributeValueQuoted: function afterAttributeValueQuoted() {\n var char = this.peek();\n\n if (isSpace(char)) {\n this.consume();\n this.transitionTo(\"beforeAttributeName\"\n /* beforeAttributeName */\n );\n } else if (char === '/') {\n this.consume();\n this.transitionTo(\"selfClosingStartTag\"\n /* selfClosingStartTag */\n );\n } else if (char === '>') {\n this.consume();\n this.delegate.finishTag();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n } else {\n this.transitionTo(\"beforeAttributeName\"\n /* beforeAttributeName */\n );\n }\n },\n selfClosingStartTag: function selfClosingStartTag() {\n var char = this.peek();\n\n if (char === '>') {\n this.consume();\n this.delegate.markTagAsSelfClosing();\n this.delegate.finishTag();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n } else {\n this.transitionTo(\"beforeAttributeName\"\n /* beforeAttributeName */\n );\n }\n },\n endTagOpen: function endTagOpen() {\n var char = this.consume();\n\n if (char === '@' || char === ':' || isAlpha(char)) {\n this.transitionTo(\"endTagName\"\n /* endTagName */\n );\n this.tagNameBuffer = '';\n this.delegate.beginEndTag();\n this.appendToTagName(char);\n }\n }\n };\n this.reset();\n }\n\n EventedTokenizer.prototype.reset = function () {\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n this.input = '';\n this.tagNameBuffer = '';\n this.index = 0;\n this.line = 1;\n this.column = 0;\n this.delegate.reset();\n };\n\n EventedTokenizer.prototype.transitionTo = function (state) {\n this.state = state;\n };\n\n EventedTokenizer.prototype.tokenize = function (input) {\n this.reset();\n this.tokenizePart(input);\n this.tokenizeEOF();\n };\n\n EventedTokenizer.prototype.tokenizePart = function (input) {\n this.input += preprocessInput(input);\n\n while (this.index < this.input.length) {\n var handler = this.states[this.state];\n\n if (handler !== undefined) {\n handler.call(this);\n } else {\n throw new Error(\"unhandled state \" + this.state);\n }\n }\n };\n\n EventedTokenizer.prototype.tokenizeEOF = function () {\n this.flushData();\n };\n\n EventedTokenizer.prototype.flushData = function () {\n if (this.state === 'data') {\n this.delegate.finishData();\n this.transitionTo(\"beforeData\"\n /* beforeData */\n );\n }\n };\n\n EventedTokenizer.prototype.peek = function () {\n return this.input.charAt(this.index);\n };\n\n EventedTokenizer.prototype.consume = function () {\n var char = this.peek();\n this.index++;\n\n if (char === '\\n') {\n this.line++;\n this.column = 0;\n } else {\n this.column++;\n }\n\n return char;\n };\n\n EventedTokenizer.prototype.consumeCharRef = function () {\n var endIndex = this.input.indexOf(';', this.index);\n\n if (endIndex === -1) {\n return;\n }\n\n var entity = this.input.slice(this.index, endIndex);\n var chars = this.entityParser.parse(entity);\n\n if (chars) {\n var count = entity.length; // consume the entity chars\n\n while (count) {\n this.consume();\n count--;\n } // consume the `;`\n\n\n this.consume();\n return chars;\n }\n };\n\n EventedTokenizer.prototype.markTagStart = function () {\n this.delegate.tagOpen();\n };\n\n EventedTokenizer.prototype.appendToTagName = function (char) {\n this.tagNameBuffer += char;\n this.delegate.appendToTagName(char);\n };\n\n EventedTokenizer.prototype.isIgnoredEndTag = function () {\n var tag = this.tagNameBuffer;\n return tag === 'title' && this.input.substring(this.index, this.index + 8) !== '</title>' || tag === 'style' && this.input.substring(this.index, this.index + 8) !== '</style>' || tag === 'script' && this.input.substring(this.index, this.index + 9) !== '</script>';\n };\n\n return EventedTokenizer;\n}();\n\nvar Tokenizer =\n/** @class */\nfunction () {\n function Tokenizer(entityParser, options) {\n if (options === void 0) {\n options = {};\n }\n\n this.options = options;\n this.token = null;\n this.startLine = 1;\n this.startColumn = 0;\n this.tokens = [];\n this.tokenizer = new EventedTokenizer(this, entityParser, options.mode);\n this._currentAttribute = undefined;\n }\n\n Tokenizer.prototype.tokenize = function (input) {\n this.tokens = [];\n this.tokenizer.tokenize(input);\n return this.tokens;\n };\n\n Tokenizer.prototype.tokenizePart = function (input) {\n this.tokens = [];\n this.tokenizer.tokenizePart(input);\n return this.tokens;\n };\n\n Tokenizer.prototype.tokenizeEOF = function () {\n this.tokens = [];\n this.tokenizer.tokenizeEOF();\n return this.tokens[0];\n };\n\n Tokenizer.prototype.reset = function () {\n this.token = null;\n this.startLine = 1;\n this.startColumn = 0;\n };\n\n Tokenizer.prototype.current = function () {\n var token = this.token;\n\n if (token === null) {\n throw new Error('token was unexpectedly null');\n }\n\n if (arguments.length === 0) {\n return token;\n }\n\n for (var i = 0; i < arguments.length; i++) {\n if (token.type === arguments[i]) {\n return token;\n }\n }\n\n throw new Error(\"token type was unexpectedly \" + token.type);\n };\n\n Tokenizer.prototype.push = function (token) {\n this.token = token;\n this.tokens.push(token);\n };\n\n Tokenizer.prototype.currentAttribute = function () {\n return this._currentAttribute;\n };\n\n Tokenizer.prototype.addLocInfo = function () {\n if (this.options.loc) {\n this.current().loc = {\n start: {\n line: this.startLine,\n column: this.startColumn\n },\n end: {\n line: this.tokenizer.line,\n column: this.tokenizer.column\n }\n };\n }\n\n this.startLine = this.tokenizer.line;\n this.startColumn = this.tokenizer.column;\n }; // Data\n\n\n Tokenizer.prototype.beginDoctype = function () {\n this.push({\n type: \"Doctype\"\n /* Doctype */\n ,\n name: ''\n });\n };\n\n Tokenizer.prototype.appendToDoctypeName = function (char) {\n this.current(\"Doctype\"\n /* Doctype */\n ).name += char;\n };\n\n Tokenizer.prototype.appendToDoctypePublicIdentifier = function (char) {\n var doctype = this.current(\"Doctype\"\n /* Doctype */\n );\n\n if (doctype.publicIdentifier === undefined) {\n doctype.publicIdentifier = char;\n } else {\n doctype.publicIdentifier += char;\n }\n };\n\n Tokenizer.prototype.appendToDoctypeSystemIdentifier = function (char) {\n var doctype = this.current(\"Doctype\"\n /* Doctype */\n );\n\n if (doctype.systemIdentifier === undefined) {\n doctype.systemIdentifier = char;\n } else {\n doctype.systemIdentifier += char;\n }\n };\n\n Tokenizer.prototype.endDoctype = function () {\n this.addLocInfo();\n };\n\n Tokenizer.prototype.beginData = function () {\n this.push({\n type: \"Chars\"\n /* Chars */\n ,\n chars: ''\n });\n };\n\n Tokenizer.prototype.appendToData = function (char) {\n this.current(\"Chars\"\n /* Chars */\n ).chars += char;\n };\n\n Tokenizer.prototype.finishData = function () {\n this.addLocInfo();\n }; // Comment\n\n\n Tokenizer.prototype.beginComment = function () {\n this.push({\n type: \"Comment\"\n /* Comment */\n ,\n chars: ''\n });\n };\n\n Tokenizer.prototype.appendToCommentData = function (char) {\n this.current(\"Comment\"\n /* Comment */\n ).chars += char;\n };\n\n Tokenizer.prototype.finishComment = function () {\n this.addLocInfo();\n }; // Tags - basic\n\n\n Tokenizer.prototype.tagOpen = function () {};\n\n Tokenizer.prototype.beginStartTag = function () {\n this.push({\n type: \"StartTag\"\n /* StartTag */\n ,\n tagName: '',\n attributes: [],\n selfClosing: false\n });\n };\n\n Tokenizer.prototype.beginEndTag = function () {\n this.push({\n type: \"EndTag\"\n /* EndTag */\n ,\n tagName: ''\n });\n };\n\n Tokenizer.prototype.finishTag = function () {\n this.addLocInfo();\n };\n\n Tokenizer.prototype.markTagAsSelfClosing = function () {\n this.current(\"StartTag\"\n /* StartTag */\n ).selfClosing = true;\n }; // Tags - name\n\n\n Tokenizer.prototype.appendToTagName = function (char) {\n this.current(\"StartTag\"\n /* StartTag */\n , \"EndTag\"\n /* EndTag */\n ).tagName += char;\n }; // Tags - attributes\n\n\n Tokenizer.prototype.beginAttribute = function () {\n this._currentAttribute = ['', '', false];\n };\n\n Tokenizer.prototype.appendToAttributeName = function (char) {\n this.currentAttribute()[0] += char;\n };\n\n Tokenizer.prototype.beginAttributeValue = function (isQuoted) {\n this.currentAttribute()[2] = isQuoted;\n };\n\n Tokenizer.prototype.appendToAttributeValue = function (char) {\n this.currentAttribute()[1] += char;\n };\n\n Tokenizer.prototype.finishAttributeValue = function () {\n this.current(\"StartTag\"\n /* StartTag */\n ).attributes.push(this._currentAttribute);\n };\n\n Tokenizer.prototype.reportSyntaxError = function (message) {\n this.current().syntaxError = message;\n };\n\n return Tokenizer;\n}();\n\nfunction tokenize(input, options) {\n var tokenizer = new Tokenizer(new EntityParser(HTML5NamedCharRefs), options);\n return tokenizer.tokenize(input);\n}\n\nvar LinkifyResult = 'LinkifyResult';\nvar StartTag = 'StartTag';\nvar EndTag = 'EndTag';\nvar Chars = 'Chars';\nvar Comment = 'Comment';\nvar Doctype = 'Doctype';\n/**\n * @param {string} str html string to link\n * @param {import('linkifyjs').Opts} [opts] linkify options\n * @returns {string} resulting string\n */\n\nfunction linkifyHtml(str, opts) {\n if (opts === void 0) {\n opts = {};\n }\n\n // `tokens` and `token` in this section refer to tokens generated by the\n // HTML parser, not linkify's parser\n var tokens = tokenize(str);\n var linkifiedTokens = [];\n var linkified = [];\n var options = new Options(opts, defaultRender); // Linkify the tokens given by the parser\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (token.type === StartTag) {\n linkifiedTokens.push(token); // Ignore all the contents of ignored tags\n\n var tagName = token.tagName.toUpperCase();\n var isIgnored = tagName === 'A' || options.ignoreTags.indexOf(tagName) >= 0;\n\n if (!isIgnored) {\n continue;\n }\n\n var preskipLen = linkifiedTokens.length;\n skipTagTokens(tagName, tokens, ++i, linkifiedTokens);\n i += linkifiedTokens.length - preskipLen - 1;\n } else if (token.type !== Chars) {\n // Skip this token, it's not important\n linkifiedTokens.push(token);\n } else {\n // Valid text token, linkify it!\n var linkifedChars = linkifyChars(token.chars, options);\n linkifiedTokens.push.apply(linkifiedTokens, linkifedChars);\n }\n } // Convert the tokens back into a string\n\n\n for (var _i = 0; _i < linkifiedTokens.length; _i++) {\n var _token = linkifiedTokens[_i];\n\n switch (_token.type) {\n case LinkifyResult:\n linkified.push(_token.rendered);\n break;\n\n case StartTag:\n {\n var link = '<' + _token.tagName;\n\n if (_token.attributes.length > 0) {\n link += ' ' + attributeArrayToStrings(_token.attributes).join(' ');\n }\n\n if (_token.selfClosing) {\n link += ' /';\n }\n\n link += '>';\n linkified.push(link);\n break;\n }\n\n case EndTag:\n linkified.push(\"</\" + _token.tagName + \">\");\n break;\n\n case Chars:\n linkified.push(escapeText(_token.chars));\n break;\n\n case Comment:\n linkified.push(\"<!--\" + escapeText(_token.chars) + \"-->\");\n break;\n\n case Doctype:\n {\n var doctype = \"<!DOCTYPE \" + _token.name;\n\n if (_token.publicIdentifier) {\n doctype += \" PUBLIC \\\"\" + _token.publicIdentifier + \"\\\"\";\n }\n\n if (_token.systemIdentifier) {\n doctype += \" \\\"\" + _token.systemIdentifier + \"\\\"\";\n }\n\n doctype += '>';\n linkified.push(doctype);\n break;\n }\n }\n }\n\n return linkified.join('');\n}\n/**\n\t`tokens` and `token` in this section referes to tokens returned by\n\t`linkify.tokenize`. `linkified` will contain HTML Parser-style tokens\n\t@param {string}\n\t@param {import('linkifyjs').Options}\n*/\n\nfunction linkifyChars(str, options) {\n var tokens = tokenize$1(str);\n var result = [];\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (token.t === 'nl' && options.get('nl2br')) {\n result.push({\n type: StartTag,\n tagName: 'br',\n attributes: [],\n selfClosing: true\n });\n } else if (!token.isLink || !options.check(token)) {\n result.push({\n type: Chars,\n chars: token.toString()\n });\n } else {\n result.push({\n type: LinkifyResult,\n rendered: options.render(token)\n });\n }\n }\n\n return result;\n}\n/**\n\tReturns a list of tokens skipped until the closing tag of tagName.\n\n\t* `tagName` is the closing tag which will prompt us to stop skipping\n\t* `tokens` is the array of tokens generated by HTML5Tokenizer which\n\t* `i` is the index immediately after the opening tag to skip\n\t* `skippedTokens` is an array which skipped tokens are being pushed into\n\n\tCaveats\n\n\t* Assumes that i is the first token after the given opening tagName\n\t* The closing tag will be skipped, but nothing after it\n\t* Will track whether there is a nested tag of the same type\n*/\n\n\nfunction skipTagTokens(tagName, tokens, i, skippedTokens) {\n // number of tokens of this type on the [fictional] stack\n var stackCount = 1;\n\n while (i < tokens.length && stackCount > 0) {\n var token = tokens[i];\n\n if (token.type === StartTag && token.tagName.toUpperCase() === tagName) {\n // Nested tag of the same type, \"add to stack\"\n stackCount++;\n } else if (token.type === EndTag && token.tagName.toUpperCase() === tagName) {\n // Closing tag\n stackCount--;\n }\n\n skippedTokens.push(token);\n i++;\n } // Note that if stackCount > 0 here, the HTML is probably invalid\n\n\n return skippedTokens;\n}\n\nfunction defaultRender(_ref) {\n var tagName = _ref.tagName,\n attributes = _ref.attributes,\n content = _ref.content;\n return \"<\" + tagName + \" \" + attributesToString(attributes) + \">\" + escapeText(content) + \"</\" + tagName + \">\";\n}\n\nfunction escapeText(text) {\n return text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n}\n\nfunction escapeAttr(attr) {\n return attr.replace(/\"/g, '&quot;');\n}\n\nfunction attributesToString(attributes) {\n var result = [];\n\n for (var attr in attributes) {\n var val = attributes[attr] + '';\n result.push(attr + \"=\\\"\" + escapeAttr(val) + \"\\\"\");\n }\n\n return result.join(' ');\n}\n\nfunction attributeArrayToStrings(attrs) {\n var attrStrs = [];\n\n for (var i = 0; i < attrs.length; i++) {\n var name = attrs[i][0];\n var value = attrs[i][1] + '';\n attrStrs.push(name + \"=\\\"\" + escapeAttr(value) + \"\\\"\");\n }\n\n return attrStrs;\n}\n\nexport { linkifyHtml as default };\n","import linkifyHtml from 'linkify-html'\nimport sanitizeHtml from 'sanitize-html'\n\nexport const linkifyAndClean = (input: string): string => {\n return sanitizeHtml(linkifyHtml(input, { target: '_blank' }), {\n allowedTags: ['a'],\n disallowedTagsMode: 'escape',\n })\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, unref as _unref, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-f6b59442\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { id: \"workout-note\" }\nconst _hoisted_2 = [\"innerHTML\"]\n\nimport { toRefs, withDefaults } from 'vue'\n\n import { linkifyAndClean } from '@/utils/inputs'\n\n interface Props {\n notes?: string | null\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutNotes',\n props: {\n notes: { default: () => null }\n },\n setup(__props: any) {\n\nconst props = __props as { notes: string | null };\n\n \n\n const { notes } = toRefs(props)\n\nreturn (_ctx: any,_cache: any) => {\n const _component_Card = _resolveComponent(\"Card\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(_component_Card, null, {\n title: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('workouts.NOTES')), 1)\n ]),\n content: _withCtx(() => [\n _createElementVNode(\"span\", {\n innerHTML: \n _unref(notes) && _unref(notes) !== ''\n ? _unref(linkifyAndClean)(_unref(notes))\n : _ctx.$t('workouts.NO_NOTES')\n \n }, null, 8, _hoisted_2)\n ]),\n _: 1\n })\n ]))\n}\n}\n\n})","import script from \"./WorkoutNotes.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutNotes.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutNotes.vue?vue&type=style&index=0&id=f6b59442&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-f6b59442\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6b8a27cd\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { id: \"workout-segments\" }\n\nimport { toRefs } from 'vue'\n\n import { IWorkoutSegment } from '@/types/workouts'\n\n interface Props {\n segments: IWorkoutSegment[]\n useImperialUnits: boolean\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutSegments',\n props: {\n segments: null,\n useImperialUnits: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props as {\n segments: IWorkoutSegment[]\n useImperialUnits: boolean\n };\n\n \n\n const { segments, useImperialUnits } = toRefs(props)\n\nreturn (_ctx: any,_cache: any) => {\n const _component_router_link = _resolveComponent(\"router-link\")!\n const _component_Distance = _resolveComponent(\"Distance\")!\n const _component_Card = _resolveComponent(\"Card\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(_component_Card, null, {\n title: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('workouts.SEGMENT', 2)), 1)\n ]),\n content: _withCtx(() => [\n _createElementVNode(\"ul\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(segments), (segment, index) => {\n return (_openBlock(), _createElementBlock(\"li\", {\n key: segment.segment_id\n }, [\n _createVNode(_component_router_link, {\n to: {\n name: 'WorkoutSegment',\n params: {\n workoutId: segment.workout_id,\n segmentId: index + 1,\n },\n }\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('workouts.SEGMENT', 1)) + \" \" + _toDisplayString(index + 1), 1)\n ]),\n _: 2\n }, 1032, [\"to\"]),\n _createTextVNode(\" (\" + _toDisplayString(_ctx.$t('workouts.DISTANCE')) + \": \", 1),\n _createVNode(_component_Distance, {\n distance: segment.distance,\n unitFrom: \"km\",\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"]),\n _createTextVNode(\", \" + _toDisplayString(_ctx.$t('workouts.DURATION')) + \": \" + _toDisplayString(segment.duration) + \") \", 1)\n ]))\n }), 128))\n ])\n ]),\n _: 1\n })\n ]))\n}\n}\n\n})","import script from \"./WorkoutSegments.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutSegments.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutSegments.vue?vue&type=style&index=0&id=6b8a27cd&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6b8a27cd\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-53c4e53a\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n id: \"workout\",\n class: \"view\"\n}\nconst _hoisted_2 = { class: \"container\" }\nconst _hoisted_3 = {\n key: 0,\n class: \"workout-container\"\n}\nconst _hoisted_4 = { key: 0 }\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { id: \"bottom\" }, null, -1))\nconst _hoisted_6 = { key: 1 }\n\nimport {\n ComputedRef,\n Ref,\n computed,\n ref,\n toRefs,\n watch,\n onBeforeMount,\n onUnmounted,\n } from 'vue'\n import { useRoute } from 'vue-router'\n\n import NotFound from '@/components/Common/NotFound.vue'\n import WorkoutDetail from '@/components/Workout/WorkoutDetail/index.vue'\n import WorkoutChart from '@/components/Workout/WorkoutDetail/WorkoutChart/index.vue'\n import WorkoutNotes from '@/components/Workout/WorkoutDetail/WorkoutNotes.vue'\n import WorkoutSegments from '@/components/Workout/WorkoutDetail/WorkoutSegments.vue'\n import {\n AUTH_USER_STORE,\n SPORTS_STORE,\n WORKOUTS_STORE,\n } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import { IWorkoutData, IWorkoutPayload, TCoordinates } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n\n interface Props {\n displaySegment: boolean\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'Workout',\n props: {\n displaySegment: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props as {\n displaySegment: boolean\n };\n\n \n\n const route = useRoute()\n const store = useStore()\n\n const { displaySegment } = toRefs(props)\n const workoutData: ComputedRef<IWorkoutData> = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.WORKOUT_DATA]\n )\n const authUser: ComputedRef<IAuthUserProfile> = computed(\n () => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]\n )\n const sports: ComputedRef<ISport[]> = computed(\n () => store.getters[SPORTS_STORE.GETTERS.SPORTS]\n )\n const markerCoordinates: Ref<TCoordinates> = ref({\n latitude: null,\n longitude: null,\n })\n\n onBeforeMount(() => {\n const payload: IWorkoutPayload = { workoutId: route.params.workoutId }\n if (props.displaySegment) {\n payload.segmentId = route.params.segmentId\n }\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_WORKOUT_DATA, payload)\n })\n\n onUnmounted(() => {\n store.commit(WORKOUTS_STORE.MUTATIONS.EMPTY_WORKOUT)\n })\n\n function updateCoordinates(coordinates: TCoordinates) {\n markerCoordinates.value = {\n latitude: coordinates.latitude,\n longitude: coordinates.longitude,\n }\n }\n\n watch(\n () => route.params.workoutId,\n async (newWorkoutId) => {\n if (newWorkoutId) {\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_WORKOUT_DATA, {\n workoutId: newWorkoutId,\n })\n }\n }\n )\n watch(\n () => route.params.segmentId,\n async (newSegmentId) => {\n if (route.params.workoutId) {\n const payload: IWorkoutPayload = {\n workoutId: route.params.workoutId,\n }\n if (newSegmentId) {\n payload.segmentId = newSegmentId\n }\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_WORKOUT_DATA, payload)\n }\n }\n )\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_unref(sports).length > 0)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_3, [\n (_unref(workoutData).workout.id)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [\n _createVNode(WorkoutDetail, {\n workoutData: _unref(workoutData),\n sports: _unref(sports),\n authUser: _unref(authUser),\n markerCoordinates: markerCoordinates.value,\n displaySegment: _unref(displaySegment)\n }, null, 8, [\"workoutData\", \"sports\", \"authUser\", \"markerCoordinates\", \"displaySegment\"]),\n (\n _unref(workoutData).workout.with_gpx && _unref(workoutData).chartData.length > 0\n )\n ? (_openBlock(), _createBlock(WorkoutChart, {\n key: 0,\n workoutData: _unref(workoutData),\n authUser: _unref(authUser),\n displaySegment: _unref(displaySegment),\n onGetCoordinates: updateCoordinates\n }, null, 8, [\"workoutData\", \"authUser\", \"displaySegment\"]))\n : _createCommentVNode(\"\", true),\n (!_unref(displaySegment) && _unref(workoutData).workout.segments.length > 1)\n ? (_openBlock(), _createBlock(WorkoutSegments, {\n key: 1,\n segments: _unref(workoutData).workout.segments,\n useImperialUnits: _unref(authUser).imperial_units\n }, null, 8, [\"segments\", \"useImperialUnits\"]))\n : _createCommentVNode(\"\", true),\n (!_unref(displaySegment))\n ? (_openBlock(), _createBlock(WorkoutNotes, {\n key: 2,\n notes: _unref(workoutData).workout.notes\n }, null, 8, [\"notes\"]))\n : _createCommentVNode(\"\", true),\n _hoisted_5\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n (!_unref(workoutData).loading)\n ? (_openBlock(), _createBlock(NotFound, {\n key: 0,\n target: \"WORKOUT\"\n }))\n : _createCommentVNode(\"\", true)\n ]))\n ]))\n : _createCommentVNode(\"\", true)\n ])\n ]))\n}\n}\n\n})","import script from \"./Workout.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Workout.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Workout.vue?vue&type=style&index=0&id=53c4e53a&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-53c4e53a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6c38593a\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"workouts-filters\" }\nconst _hoisted_2 = { class: \"box\" }\nconst _hoisted_3 = { class: \"form\" }\nconst _hoisted_4 = { class: \"form-items-group\" }\nconst _hoisted_5 = { class: \"form-item\" }\nconst _hoisted_6 = [\"value\"]\nconst _hoisted_7 = { class: \"form-item\" }\nconst _hoisted_8 = [\"value\"]\nconst _hoisted_9 = { class: \"form-items-group\" }\nconst _hoisted_10 = { class: \"form-item\" }\nconst _hoisted_11 = [\"value\"]\nconst _hoisted_12 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"option\", { value: \"\" }, null, -1))\nconst _hoisted_13 = [\"value\"]\nconst _hoisted_14 = { class: \"form-items-group\" }\nconst _hoisted_15 = { class: \"form-item\" }\nconst _hoisted_16 = { class: \"form-inputs-group\" }\nconst _hoisted_17 = [\"value\"]\nconst _hoisted_18 = [\"value\"]\nconst _hoisted_19 = { class: \"form-items-group\" }\nconst _hoisted_20 = { class: \"form-item\" }\nconst _hoisted_21 = { class: \"form-inputs-group\" }\nconst _hoisted_22 = [\"value\"]\nconst _hoisted_23 = [\"value\"]\nconst _hoisted_24 = { class: \"form-items-group\" }\nconst _hoisted_25 = { class: \"form-item\" }\nconst _hoisted_26 = { class: \"form-inputs-group\" }\nconst _hoisted_27 = [\"value\"]\nconst _hoisted_28 = [\"value\"]\nconst _hoisted_29 = { class: \"form-items-group\" }\nconst _hoisted_30 = { class: \"form-item\" }\nconst _hoisted_31 = { class: \"form-inputs-group\" }\nconst _hoisted_32 = [\"value\"]\nconst _hoisted_33 = [\"value\"]\nconst _hoisted_34 = { class: \"form-button\" }\n\nimport { ComputedRef, computed, toRefs, watch } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { LocationQuery, useRoute, useRouter } from 'vue-router'\n\n import { ISport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import { translateSports } from '@/utils/sports'\n import { units } from '@/utils/units'\n\n interface Props {\n authUser: IAuthUserProfile\n sports: ISport[]\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutsFilters',\n props: {\n authUser: null,\n sports: null\n },\n emits: ['filter'],\n setup(__props: any, { emit }) {\n\nconst props = __props as {\n authUser: IAuthUserProfile\n sports: ISport[]\n };\n\n \n\n \n\n const { t } = useI18n()\n const route = useRoute()\n const router = useRouter()\n\n const { authUser } = toRefs(props)\n\n const toUnit = authUser.value.imperial_units\n ? units['km'].defaultTarget\n : 'km'\n const translatedSports: ComputedRef<ISport[]> = computed(() =>\n translateSports(props.sports, t)\n )\n let params: LocationQuery = Object.assign({}, route.query)\n\n function handleFilterChange(event: Event & { target: HTMLInputElement }) {\n if (event.target.value === '') {\n delete params[event.target.name]\n } else {\n params[event.target.name] = event.target.value\n }\n }\n function onFilter() {\n emit('filter')\n if ('page' in params) {\n params['page'] = '1'\n }\n router.push({ path: '/workouts', query: params })\n }\n function onClearFilter() {\n emit('filter')\n router.push({ path: '/workouts', query: {} })\n }\n\n watch(\n () => route.query,\n (newQuery) => {\n params = Object.assign({}, newQuery)\n }\n )\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.FROM')) + \": \", 1),\n _createElementVNode(\"input\", {\n name: \"from\",\n type: \"date\",\n value: _ctx.$route.query.from,\n onChange: handleFilterChange\n }, null, 40, _hoisted_6)\n ]),\n _createElementVNode(\"div\", _hoisted_7, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.TO')) + \": \", 1),\n _createElementVNode(\"input\", {\n name: \"to\",\n type: \"date\",\n value: _ctx.$route.query.to,\n onChange: handleFilterChange\n }, null, 40, _hoisted_8)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_9, [\n _createElementVNode(\"div\", _hoisted_10, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.SPORT', 1)) + \":\", 1),\n _createElementVNode(\"select\", {\n name: \"sport_id\",\n value: _ctx.$route.query.sport_id,\n onChange: handleFilterChange\n }, [\n _hoisted_12,\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(translatedSports).filter((s) =>\n _unref(authUser).sports_list.includes(s.id)\n ), (sport) => {\n return (_openBlock(), _createElementBlock(\"option\", {\n value: sport.id,\n key: sport.id\n }, _toDisplayString(sport.translatedLabel), 9, _hoisted_13))\n }), 128))\n ], 40, _hoisted_11)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_14, [\n _createElementVNode(\"div\", _hoisted_15, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.DISTANCE')) + \" (\" + _toDisplayString(_unref(toUnit)) + \"): \", 1),\n _createElementVNode(\"div\", _hoisted_16, [\n _createElementVNode(\"input\", {\n name: \"distance_from\",\n type: \"number\",\n min: \"0\",\n step: \"0.1\",\n value: _ctx.$route.query.distance_from,\n onChange: handleFilterChange\n }, null, 40, _hoisted_17),\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('workouts.TO')), 1),\n _createElementVNode(\"input\", {\n name: \"distance_to\",\n type: \"number\",\n min: \"0\",\n step: \"0.1\",\n value: _ctx.$route.query.distance_to,\n onChange: handleFilterChange\n }, null, 40, _hoisted_18)\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_19, [\n _createElementVNode(\"div\", _hoisted_20, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.DURATION')) + \": \", 1),\n _createElementVNode(\"div\", _hoisted_21, [\n _createElementVNode(\"input\", {\n name: \"duration_from\",\n value: _ctx.$route.query.duration_from,\n onChange: handleFilterChange,\n pattern: \"^([0-9]*[0-9]):([0-5][0-9])$\",\n placeholder: \"hh:mm\",\n type: \"text\"\n }, null, 40, _hoisted_22),\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('workouts.TO')), 1),\n _createElementVNode(\"input\", {\n name: \"duration_to\",\n value: _ctx.$route.query.duration_to,\n onChange: handleFilterChange,\n pattern: \"^([0-9]*[0-9]):([0-5][0-9])$\",\n placeholder: \"hh:mm\",\n type: \"text\"\n }, null, 40, _hoisted_23)\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_24, [\n _createElementVNode(\"div\", _hoisted_25, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.AVE_SPEED')) + \" (\" + _toDisplayString(_unref(toUnit)) + \"/h): \", 1),\n _createElementVNode(\"div\", _hoisted_26, [\n _createElementVNode(\"input\", {\n min: \"0\",\n name: \"ave_speed_from\",\n value: _ctx.$route.query.ave_speed_from,\n onChange: handleFilterChange,\n step: \"0.1\",\n type: \"number\"\n }, null, 40, _hoisted_27),\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('workouts.TO')), 1),\n _createElementVNode(\"input\", {\n min: \"0\",\n name: \"ave_speed_to\",\n value: _ctx.$route.query.ave_speed_to,\n onChange: handleFilterChange,\n step: \"0.1\",\n type: \"number\"\n }, null, 40, _hoisted_28)\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_29, [\n _createElementVNode(\"div\", _hoisted_30, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.MAX_SPEED')) + \" (\" + _toDisplayString(_unref(toUnit)) + \"/h): \", 1),\n _createElementVNode(\"div\", _hoisted_31, [\n _createElementVNode(\"input\", {\n min: \"0\",\n name: \"max_speed_from\",\n value: _ctx.$route.query.max_speed_from,\n onChange: handleFilterChange,\n step: \"0.1\",\n type: \"number\"\n }, null, 40, _hoisted_32),\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('workouts.TO')), 1),\n _createElementVNode(\"input\", {\n min: \"0\",\n name: \"max_speed_to\",\n value: _ctx.$route.query.max_speed_to,\n onChange: handleFilterChange,\n step: \"0.1\",\n type: \"number\"\n }, null, 40, _hoisted_33)\n ])\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_34, [\n _createElementVNode(\"button\", {\n class: \"confirm\",\n onClick: onFilter\n }, _toDisplayString(_ctx.$t('buttons.FILTER')), 1),\n _createElementVNode(\"button\", {\n class: \"confirm\",\n onClick: onClearFilter\n }, _toDisplayString(_ctx.$t('buttons.CLEAR_FILTER')), 1)\n ])\n ])\n ]))\n}\n}\n\n})","import script from \"./WorkoutsFilters.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutsFilters.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutsFilters.vue?vue&type=style&index=0&id=6c38593a&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6c38593a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, normalizeClass as _normalizeClass, renderList as _renderList, Fragment as _Fragment, resolveComponent as _resolveComponent, createBlock as _createBlock, withCtx as _withCtx, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-0f8ea7b0\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"workouts-list\" }\nconst _hoisted_2 = { class: \"total\" }\nconst _hoisted_3 = { class: \"total-label\" }\nconst _hoisted_4 = { key: 0 }\nconst _hoisted_5 = {\n key: 0,\n class: \"workouts-table responsive-table\"\n}\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"th\", { class: \"sport-col\" }, null, -1))\nconst _hoisted_7 = { class: \"sport-col\" }\nconst _hoisted_8 = { class: \"cell-heading\" }\nconst _hoisted_9 = [\"onMouseover\"]\nconst _hoisted_10 = { class: \"cell-heading\" }\nconst _hoisted_11 = {\n key: 0,\n class: \"fa fa-map-o\",\n \"aria-hidden\": \"true\"\n}\nconst _hoisted_12 = { class: \"title\" }\nconst _hoisted_13 = { class: \"workout-date\" }\nconst _hoisted_14 = { class: \"cell-heading\" }\nconst _hoisted_15 = { class: \"text-right\" }\nconst _hoisted_16 = { class: \"cell-heading\" }\nconst _hoisted_17 = { class: \"text-right\" }\nconst _hoisted_18 = { class: \"cell-heading\" }\nconst _hoisted_19 = { class: \"text-right\" }\nconst _hoisted_20 = { class: \"cell-heading\" }\nconst _hoisted_21 = { class: \"text-right\" }\nconst _hoisted_22 = { class: \"cell-heading\" }\nconst _hoisted_23 = { class: \"text-right\" }\nconst _hoisted_24 = { class: \"cell-heading\" }\nconst _hoisted_25 = { class: \"text-right\" }\nconst _hoisted_26 = { class: \"cell-heading\" }\nconst _hoisted_27 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { id: \"bottom\" }, null, -1))\n\nimport {\n ComputedRef,\n Ref,\n computed,\n ref,\n toRefs,\n watch,\n capitalize,\n onBeforeMount,\n } from 'vue'\n import { LocationQuery, useRoute, useRouter } from 'vue-router'\n\n import FilterSelects from '@/components/Common/FilterSelects.vue'\n import Pagination from '@/components/Common/Pagination.vue'\n import StaticMap from '@/components/Common/StaticMap.vue'\n import NoWorkouts from '@/components/Workouts/NoWorkouts.vue'\n import { ROOT_STORE, WORKOUTS_STORE } from '@/store/constants'\n import { IPagination } from '@/types/api'\n import { ITranslatedSport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import { IWorkout, TWorkoutsPayload } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { getQuery, sortList, workoutsPayloadKeys } from '@/utils/api'\n import { formatDate } from '@/utils/dates'\n import { getSportColor, getSportLabel } from '@/utils/sports'\n import { convertDistance } from '@/utils/units'\n import { defaultOrder } from '@/utils/workouts'\n\n interface Props {\n user: IAuthUserProfile\n sports: ITranslatedSport[]\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutsList',\n props: {\n user: null,\n sports: null\n },\n setup(__props: any) {\n\nconst props = __props as {\n user: IAuthUserProfile\n sports: ITranslatedSport[]\n };\n\n \n\n const store = useStore()\n const route = useRoute()\n const router = useRouter()\n\n const { user, sports } = toRefs(props)\n const orderByList: string[] = [\n 'ave_speed',\n 'distance',\n 'duration',\n 'workout_date',\n ]\n const workouts: ComputedRef<IWorkout[]> = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.USER_WORKOUTS]\n )\n const pagination: ComputedRef<IPagination> = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.WORKOUTS_PAGINATION]\n )\n const currentLanguage: ComputedRef<string> = computed(\n () => store.getters[ROOT_STORE.GETTERS.LANGUAGE]\n )\n let query: TWorkoutsPayload = getWorkoutsQuery(route.query)\n const hoverWorkoutId: Ref<string | null> = ref(null)\n\n onBeforeMount(() => {\n loadWorkouts(query)\n })\n\n function loadWorkouts(payload: TWorkoutsPayload) {\n store.dispatch(\n WORKOUTS_STORE.ACTIONS.GET_USER_WORKOUTS,\n user.value.imperial_units ? getConvertedPayload(payload) : payload\n )\n }\n function reloadWorkouts(queryParam: string, queryValue: string) {\n const newQuery: LocationQuery = Object.assign({}, route.query)\n newQuery[queryParam] = queryValue\n if (queryParam === 'per_page') {\n newQuery['page'] = '1'\n }\n query = getWorkoutsQuery(newQuery)\n router.push({ path: '/workouts', query })\n }\n\n function getWorkoutsQuery(newQuery: LocationQuery): TWorkoutsPayload {\n const workoutQuery = getQuery(\n newQuery,\n orderByList,\n defaultOrder.order_by,\n {\n defaultSort: defaultOrder.order,\n }\n )\n Object.keys(newQuery)\n .filter((k) => workoutsPayloadKeys.includes(k))\n .map((k) => {\n if (typeof newQuery[k] === 'string') {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n workoutQuery[k] = newQuery[k]\n }\n })\n return workoutQuery\n }\n\n function getConvertedPayload(payload: TWorkoutsPayload): TWorkoutsPayload {\n const convertedPayload: TWorkoutsPayload = {\n ...payload,\n }\n Object.entries(convertedPayload).map((entry) => {\n if (entry[0].match('speed|distance') && entry[1]) {\n convertedPayload[entry[0]] = convertDistance(+entry[1], 'mi', 'km')\n }\n })\n return convertedPayload\n }\n\n function onHover(workoutId: string | null) {\n hoverWorkoutId.value = workoutId\n }\n\n watch(\n () => route.query,\n async (newQuery) => {\n query = getWorkoutsQuery(newQuery)\n loadWorkouts(query)\n }\n )\n\nreturn (_ctx: any,_cache: any) => {\n const _component_SportImage = _resolveComponent(\"SportImage\")!\n const _component_router_link = _resolveComponent(\"router-link\")!\n const _component_Distance = _resolveComponent(\"Distance\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"box\", { 'empty-table': _unref(workouts).length === 0 }])\n }, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"span\", _hoisted_3, _toDisplayString(_ctx.$t('common.TOTAL').toLowerCase()) + \": \", 1),\n (_unref(pagination).total !== null)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_4, _toDisplayString(_unref(pagination).total) + \" \" + _toDisplayString(_ctx.$t('workouts.WORKOUT', _unref(pagination).total)), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _createVNode(FilterSelects, {\n sort: _unref(sortList),\n order_by: orderByList,\n query: _unref(query),\n message: \"workouts\",\n onUpdateSelect: reloadWorkouts\n }, null, 8, [\"sort\", \"query\"]),\n (_unref(workouts).length > 0)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n _createVNode(Pagination, {\n class: \"top-pagination\",\n pagination: _unref(pagination),\n path: \"/workouts\",\n query: _unref(query)\n }, null, 8, [\"pagination\", \"query\"]),\n _createElementVNode(\"table\", null, [\n _createElementVNode(\"thead\", {\n class: _normalizeClass({ smaller: 'de' === _unref(currentLanguage) })\n }, [\n _createElementVNode(\"tr\", null, [\n _hoisted_6,\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.WORKOUT', 1))), 1),\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.DATE'))), 1),\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.DISTANCE'))), 1),\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.DURATION'))), 1),\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.AVE_SPEED'))), 1),\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.MAX_SPEED'))), 1),\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.ASCENT'))), 1),\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.DESCENT'))), 1)\n ])\n ], 2),\n _createElementVNode(\"tbody\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(workouts), (workout) => {\n return (_openBlock(), _createElementBlock(\"tr\", {\n key: workout.id\n }, [\n _createElementVNode(\"td\", _hoisted_7, [\n _createElementVNode(\"span\", _hoisted_8, _toDisplayString(_ctx.$t('workouts.SPORT', 1)), 1),\n (_unref(sports).length > 0)\n ? (_openBlock(), _createBlock(_component_SportImage, {\n key: 0,\n title: \n _unref(sports).find((s) => s.id === workout.sport_id)\n .translatedLabel\n ,\n \"sport-label\": _unref(getSportLabel)(workout, _unref(sports)),\n color: _unref(getSportColor)(workout, _unref(sports))\n }, null, 8, [\"title\", \"sport-label\", \"color\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"td\", {\n class: \"workout-title\",\n onMouseover: ($event: any) => (onHover(workout.id)),\n onMouseleave: _cache[0] || (_cache[0] = ($event: any) => (onHover(null)))\n }, [\n _createElementVNode(\"span\", _hoisted_10, _toDisplayString(capitalize(_ctx.$t('workouts.WORKOUT', 1))), 1),\n _createVNode(_component_router_link, {\n class: \"nav-item\",\n to: { name: 'Workout', params: { workoutId: workout.id } }\n }, {\n default: _withCtx(() => [\n (workout.with_gpx)\n ? (_openBlock(), _createElementBlock(\"i\", _hoisted_11))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"span\", _hoisted_12, _toDisplayString(workout.title), 1)\n ]),\n _: 2\n }, 1032, [\"to\"]),\n (workout.with_gpx && hoverWorkoutId.value === workout.id)\n ? (_openBlock(), _createBlock(StaticMap, {\n key: 0,\n workout: workout,\n \"display-hover\": true\n }, null, 8, [\"workout\"]))\n : _createCommentVNode(\"\", true)\n ], 40, _hoisted_9),\n _createElementVNode(\"td\", _hoisted_13, [\n _createElementVNode(\"span\", _hoisted_14, _toDisplayString(_ctx.$t('workouts.DATE')), 1),\n _createTextVNode(\" \" + _toDisplayString(_unref(formatDate)(\n workout.workout_date,\n _unref(user).timezone,\n _unref(user).date_format\n )), 1)\n ]),\n _createElementVNode(\"td\", _hoisted_15, [\n _createElementVNode(\"span\", _hoisted_16, _toDisplayString(_ctx.$t('workouts.DISTANCE')), 1),\n _createVNode(_component_Distance, {\n distance: workout.distance,\n unitFrom: \"km\",\n useImperialUnits: _unref(user).imperial_units\n }, null, 8, [\"distance\", \"useImperialUnits\"])\n ]),\n _createElementVNode(\"td\", _hoisted_17, [\n _createElementVNode(\"span\", _hoisted_18, _toDisplayString(_ctx.$t('workouts.DURATION')), 1),\n _createTextVNode(\" \" + _toDisplayString(workout.moving), 1)\n ]),\n _createElementVNode(\"td\", _hoisted_19, [\n _createElementVNode(\"span\", _hoisted_20, _toDisplayString(_ctx.$t('workouts.AVE_SPEED')), 1),\n _createVNode(_component_Distance, {\n distance: workout.ave_speed,\n unitFrom: \"km\",\n speed: true,\n useImperialUnits: _unref(user).imperial_units\n }, null, 8, [\"distance\", \"useImperialUnits\"])\n ]),\n _createElementVNode(\"td\", _hoisted_21, [\n _createElementVNode(\"span\", _hoisted_22, _toDisplayString(_ctx.$t('workouts.MAX_SPEED')), 1),\n _createVNode(_component_Distance, {\n distance: workout.max_speed,\n unitFrom: \"km\",\n speed: true,\n useImperialUnits: _unref(user).imperial_units\n }, null, 8, [\"distance\", \"useImperialUnits\"])\n ]),\n _createElementVNode(\"td\", _hoisted_23, [\n _createElementVNode(\"span\", _hoisted_24, _toDisplayString(_ctx.$t('workouts.ASCENT')), 1),\n (workout.with_gpx)\n ? (_openBlock(), _createBlock(_component_Distance, {\n key: 0,\n distance: workout.ascent,\n unitFrom: \"m\",\n useImperialUnits: _unref(user).imperial_units\n }, null, 8, [\"distance\", \"useImperialUnits\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"td\", _hoisted_25, [\n _createElementVNode(\"span\", _hoisted_26, _toDisplayString(_ctx.$t('workouts.DESCENT')), 1),\n (workout.with_gpx)\n ? (_openBlock(), _createBlock(_component_Distance, {\n key: 0,\n distance: workout.descent,\n unitFrom: \"m\",\n useImperialUnits: _unref(user).imperial_units\n }, null, 8, [\"distance\", \"useImperialUnits\"]))\n : _createCommentVNode(\"\", true)\n ])\n ]))\n }), 128))\n ])\n ]),\n _createVNode(Pagination, {\n pagination: _unref(pagination),\n path: \"/workouts\",\n query: _unref(query)\n }, null, 8, [\"pagination\", \"query\"])\n ]))\n : _createCommentVNode(\"\", true)\n ], 2),\n (_unref(workouts).length === 0)\n ? (_openBlock(), _createBlock(NoWorkouts, { key: 0 }))\n : _createCommentVNode(\"\", true),\n _hoisted_27\n ]))\n}\n}\n\n})","import script from \"./WorkoutsList.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutsList.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutsList.vue?vue&type=style&index=0&id=0f8ea7b0&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-0f8ea7b0\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-57ec0168\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n id: \"workouts\",\n class: \"view\"\n}\nconst _hoisted_2 = { class: \"container workouts-container\" }\nconst _hoisted_3 = { class: \"display-filters\" }\nconst _hoisted_4 = { class: \"list-container\" }\n\nimport { ComputedRef, computed, ref } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import WorkoutsFilters from '@/components/Workouts/WorkoutsFilters.vue'\n import WorkoutsList from '@/components/Workouts/WorkoutsList.vue'\n import { AUTH_USER_STORE, SPORTS_STORE } from '@/store/constants'\n import { ISport, ITranslatedSport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import { useStore } from '@/use/useStore'\n import { translateSports } from '@/utils/sports'\n\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutsView',\n setup(__props) {\n\n const { t } = useI18n()\n const store = useStore()\n\n const authUser: ComputedRef<IAuthUserProfile> = computed(\n () => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]\n )\n const sports: ComputedRef<ISport[]> = computed(\n () => store.getters[SPORTS_STORE.GETTERS.SPORTS]\n )\n const translatedSports: ComputedRef<ITranslatedSport[]> = computed(() =>\n translateSports(sports.value, t)\n )\n const hiddenFilters = ref(true)\n\n function toggleFilters() {\n hiddenFilters.value = !hiddenFilters.value\n }\n\nreturn (_ctx: any,_cache: any) => {\n return (_unref(authUser).username)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"filters-container\", { hidden: hiddenFilters.value }])\n }, [\n _createVNode(WorkoutsFilters, {\n sports: _unref(translatedSports),\n authUser: _unref(authUser),\n onFilter: toggleFilters\n }, null, 8, [\"sports\", \"authUser\"])\n ], 2),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", { onClick: toggleFilters }, [\n _createElementVNode(\"i\", {\n class: _normalizeClass(`fa fa-caret-${hiddenFilters.value ? 'down' : 'up'}`),\n \"aria-hidden\": \"true\"\n }, null, 2),\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t(`workouts.${hiddenFilters.value ? 'DISPLAY' : 'HIDE'}_FILTERS`)), 1)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(WorkoutsList, {\n user: _unref(authUser),\n sports: _unref(translatedSports)\n }, null, 8, [\"user\", \"sports\"])\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./WorkoutsView.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutsView.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutsView.vue?vue&type=style&index=0&id=57ec0168&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-57ec0168\"]])\n\nexport default __exports__","let urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\nlet customAlphabet = (alphabet, defaultSize = 21) => {\n return (size = defaultSize) => {\n let id = ''\n let i = size\n while (i--) {\n id += alphabet[(Math.random() * alphabet.length) | 0]\n }\n return id\n }\n}\nlet nanoid = (size = 21) => {\n let id = ''\n let i = size\n while (i--) {\n id += urlAlphabet[(Math.random() * 64) | 0]\n }\n return id\n}\nmodule.exports = { nanoid, customAlphabet }\n"],"names":["isMergeableObject","value","isNonNullObject","isSpecial","stringValue","Object","prototype","toString","call","isReactElement","canUseSymbol","Symbol","for","REACT_ELEMENT_TYPE","$$typeof","emptyTarget","val","Array","isArray","cloneUnlessOtherwiseSpecified","options","clone","deepmerge","defaultArrayMerge","target","source","concat","map","element","getMergeFunction","key","customMerge","getEnumerableOwnPropertySymbols","getOwnPropertySymbols","filter","symbol","propertyIsEnumerable","getKeys","keys","propertyIsOnObject","object","property","_","propertyIsUnsafe","hasOwnProperty","mergeObject","destination","forEach","arrayMerge","sourceIsArray","targetIsArray","sourceAndTargetTypesMatch","all","array","Error","reduce","prev","next","deepmerge_1","module","exports","defineProperty","attributeNames","elementNames","Map","__assign","this","assign","t","s","i","n","arguments","length","p","apply","__createBinding","create","o","m","k","k2","undefined","enumerable","get","__setModuleDefault","v","__importStar","mod","__esModule","result","ElementType","entities_1","foreignNames_1","unencodedElements","Set","formatAttributes","attributes","opts","_a","_b","xmlMode","emptyAttrs","decodeEntities","encodeXML","replace","join","singleTag","render","node","nodes","output","renderNode","type","Root","children","Directive","Doctype","renderDirective","Comment","renderComment","CDATA","renderCdata","Script","Style","Tag","renderTag","Text","renderText","foreignModeIntegrationPoints","foreignElements","elem","name","parent","has","tag","attribs","selfClosingTags","data","isTag","desc","getOwnPropertyDescriptor","writable","configurable","__exportStar","DomHandler","domelementtype_1","node_1","reWhitespace","defaultOpts","normalizeWhitespace","withStartIndices","withEndIndices","callback","elementCB","dom","root","Document","done","tagStack","lastNode","parser","onparserinit","onreset","onend","handleCallback","onerror","error","onclosetag","pop","endIndex","onopentag","Element","addNode","push","ontext","oncomment","oncommentend","oncdatastart","text","NodeWithChildren","oncdataend","onprocessinginstruction","ProcessingInstruction","previousSibling","startIndex","__extends","extendStatics","d","b","setPrototypeOf","__proto__","TypeError","String","__","constructor","cloneNode","hasChildren","isDocument","isDirective","isComment","isText","isCDATA","DataNode","Node","nodeTypes","set","recursive","_super","_this","namespace","prefix","cloneChildren","clone_1","child","clone_2","clone_3","instruction","sourceCodeLocation","childs","getFeed","stringify_1","legacy_1","doc","feedRoot","getOneElement","isValidFeed","getAtomFeed","getRssFeed","feed","items","getElementsByTagName","item","entry","media","getMediaElements","addConditionally","href","link","description","fetch","pubDate","Date","updated","substr","id","MEDIA_KEYS_STRING","MEDIA_KEYS_INT","where","medium","isDefault","_i","MEDIA_KEYS_STRING_1","attrib","MEDIA_KEYS_INT_1","parseInt","expression","tagName","recurse","textContent","trim","obj","prop","uniqueSort","compareDocumentPosition","removeSubsets","domhandler_1","idx","lastIndexOf","splice","ancestor","includes","nodeA","nodeB","aParents","bParents","current","unshift","maxIdx","Math","min","sharedParent","siblings","aSibling","bSibling","indexOf","arr","sort","a","relative","getElementsByTagType","getElementById","getElements","testElement","querying_1","Checks","tag_name","tag_type","tag_contains","getAttribCheck","combineFuncs","compileTest","funcs","test","limit","Infinity","findOne","removeElement","replaceElement","replacement","appendChild","sibling","append","currNext","prependChild","prepend","findAll","existsOne","findOneChild","find","nodes_1","checked","some","stack","shift","__importDefault","innerText","getText","getInnerHTML","getOuterHTML","dom_serializer_1","default","prevElementSibling","nextElementSibling","getName","hasAttrib","getAttributeValue","getSiblings","getParent","getChildren","emptyArray","decodeHTML","decodeHTMLStrict","decodeXML","entities_json_1","legacy_json_1","xml_json_1","decode_codepoint_1","strictEntityRe","getStrictDecoder","getReplacer","str","sorter","charAt","secondChar","slice","legacy","j","re","RegExp","replacer","decode_json_1","fromCodePoint","codePoint","fromCharCode","decodeCodePoint","escapeUTF8","escape","encodeNonAsciiHTML","encodeHTML","inverseXML","getInverseObj","xmlReplacer","getInverseReplacer","getASCIIEncoder","inverseHTML","htmlReplacer","inverse","single","multiple","start","end","charCodeAt","count","getInverse","reNonASCII","getCodePoint","codePointAt","c","singleCharReplacer","toUpperCase","reEscapeChars","decodeXMLStrict","decodeHTML5Strict","decodeHTML4Strict","decodeHTML5","decodeHTML4","encodeHTML5","encodeHTML4","encode","decodeStrict","decode","decode_1","encode_1","level","encode_2","decode_2","string","parseFeed","FeedHandler","FeedItemMediaMedium","FeedItemMediaExpression","DomUtils","Parser_1","getAttribute","url","fileSize","bitrate","framerate","samplingrate","channels","duration","height","width","lang","what","tmp","handler","Parser","Tokenizer_1","formTags","pTag","openImpliesClose","tr","th","td","body","li","h1","h2","h3","h4","h5","h6","select","input","button","datalist","textarea","option","optgroup","dd","dt","address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","header","hr","main","nav","ol","pre","section","table","ul","rt","rp","tbody","tfoot","voidElements","foreignContextElements","htmlIntegrationElements","reNameEnd","cbs","_c","_d","_e","tagname","attribname","attribvalue","foreignContext","lowerCaseTagNames","lowerCaseTags","lowerCaseAttributeNames","tokenizer","Tokenizer","updatePosition","initialOffset","sectionStart","getAbsoluteIndex","onopentagname","toLowerCase","el","onopentagend","closeCurrentTag","pos","onselfclosingtag","recognizeSelfClosing","onattribname","onattribdata","onattribend","quote","onattribute","getInstructionName","search","ondeclaration","name_1","name_2","oncdata","_f","recognizeCDATA","err","reset","parseComplete","write","chunk","pause","resume","parseChunk","whitespace","isASCIIAlpha","ifElseState","upper","SUCCESS","FAILURE","lower","_state","_index","consumeSpecialNameChar","NEXT_STATE","stateBeforeCdata1","stateBeforeCdata2","stateBeforeCdata3","stateBeforeCdata4","stateBeforeCdata5","stateBeforeScript1","stateBeforeScript2","stateBeforeScript3","stateBeforeScript4","stateAfterScript1","stateAfterScript2","stateAfterScript3","stateAfterScript4","stateBeforeStyle1","stateBeforeStyle2","stateBeforeStyle3","stateAfterStyle1","stateAfterStyle2","stateAfterStyle3","stateBeforeSpecialT","stateBeforeTitle1","stateBeforeTitle2","stateBeforeTitle3","stateAfterSpecialTEnd","stateAfterTitle1","stateAfterTitle2","stateAfterTitle3","stateBeforeEntity","stateBeforeNumericEntity","buffer","bufferOffset","baseState","special","running","ended","parse","finish","stateText","getSection","isTagStartChar","stateBeforeTagName","stateInTagName","emitToken","stateBeforeClosingTagName","stateInClosingTagName","stateAfterClosingTagName","stateBeforeAttributeName","stateInSelfClosingTag","stateInAttributeName","stateAfterAttributeName","stateBeforeAttributeValue","handleInAttributeValue","stateInAttributeValueDoubleQuotes","stateInAttributeValueSingleQuotes","stateInAttributeValueNoQuotes","stateBeforeDeclaration","stateInDeclaration","stateInProcessingInstruction","stateBeforeComment","stateInComment","stateInSpecialComment","substring","stateAfterComment1","stateAfterComment2","stateBeforeCdata6","stateInCdata","stateAfterCdata1","stateAfterCdata2","stateBeforeSpecialS","stateBeforeSpecialSEnd","stateBeforeSpecialLast","stateAfterSpecialLast","sectionStartOffset","parseFixedEntity","entity","emitPartial","parseLegacyEntity","stateInNamedEntity","decodeNumericEntity","offset","base","strict","parsed","stateInNumericEntity","stateInHexEntity","cleanup","handleTrailingData","RssHandler","DefaultHandler","createDomStream","parseDOM","parseDocument","cb","elementCb","FeedHandler_1","isObject","isPlainObject","ctor","prot","factory","isSpace","collectCharacters","regEx","chars","match","exec","descriptors","currentDescriptor","state","inputLength","regexLeadingSpaces","regexLeadingCommasOrSpaces","regexLeadingNotSpaces","regexTrailingCommas","regexNonNegativeInteger","regexFloatingPoint","candidates","parseDescriptors","tokenize","w","h","lastChar","intVal","floatVal","pError","candidate","parseFloat","console","log","x","isColorSupported","bold","dim","italic","underline","hidden","strikethrough","black","red","green","yellow","blue","magenta","cyan","white","gray","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","createColors","Container","AtRule","defaults","super","proxyOf","registerAtRule","Rule","isClean","my","Declaration","cleanSource","markDirtyUp","each","index","iterator","getIterator","indexes","walk","e","addToError","walkDecls","walkRules","selector","walkAtRules","walkComments","normalize","last","markDirty","reverse","first","cleanRaws","keepBetween","insertBefore","exist","add","existIndex","insertAfter","removeChild","removeAll","replaceValues","pattern","decl","props","fast","every","condition","sample","processed","rebuild","raws","before","getProxyProcessor","startsWith","args","toProxy","other","lastEach","registerParse","dependant","registerRule","registerRoot","pico","terminalHighlight","CssSyntaxError","message","line","column","file","plugin","reason","endLine","endColumn","setMessage","captureStackTrace","showSourceCode","color","css","mark","lines","split","max","maxWidth","number","gutter","spacing","code","variable","LazyResult","Processor","toResult","lazy","stringify","registerLazyResult","registerProcessor","PreviousMap","Input","fromJSON","json","inputs","ownInputs","inputHydrated","inputId","SourceMapConsumer","SourceMapGenerator","fileURLToPath","pathToFileURL","resolve","isAbsolute","nanoid","fromOffsetCache","sourceMapAvailable","Boolean","pathAvailable","hasBOM","from","consumer","mapResolve","fromOffset","lastLine","lineToIndex","prevIndex","l","mid","col","origin","to","fromUrl","originalPositionFor","URL","sourceRoot","mapFile","protocol","sourceContentFor","toJSON","consumerCache","registerInput","MapGenerator","Result","TYPE_TO_CLASS_NAME","document","atrule","rule","comment","PLUGIN_PROPS","postcssPlugin","prepare","Once","DeclarationExit","RuleExit","AtRuleExit","CommentExit","RootExit","DocumentExit","OnceExit","NOT_VISITORS","CHILDREN","isPromise","then","getEvents","toStack","events","eventIndex","visitors","visitorIndex","cleanMarks","postcss","processor","stringified","inline","syntax","helpers","plugins","toStringTag","content","sync","messages","warnings","onFulfilled","onRejected","async","catch","finally","onFinally","Promise","reject","processing","runAsync","getAsyncError","promise","runOnRoot","prepareVisitors","hasListener","walkSync","listeners","subRoot","visitSync","stringifier","generate","event","visitor","lastPlugin","handleError","roots","postcssVersion","visitTick","version","visit","registerPostcss","list","separators","func","inQuote","prevQuote","letter","space","spaces","comma","dirname","sep","cssString","mapOpts","usesFileUrls","absolute","isMap","previous","previousMaps","isInline","annotation","isSourcesContent","sourcesContent","withContent","clearAnnotation","setSourcesContent","already","toFileUrl","toUrl","path","setSourceContent","applyPrevMaps","applySourceMap","isAnnotation","toBase64","Buffer","window","btoa","unescape","encodeURIComponent","addAnnotation","outputFile","eol","generateMap","generateString","fromSourceMap","addMapping","generated","original","encodeURI","sourcePath","noSource","mapping","semicolon","NoWorkResult","_processor","_css","_opts","_map","self","generatedCSS","generatedMap","_root","Stringifier","cloned","rangeBy","warn","remove","overrides","cloneBefore","cloneAfter","replaceWith","bookmark","foundSelf","after","raw","defaultType","between","fixed","emitInputs","inputsNextIndex","positionInside","positionBy","word","proxyCache","Proxy","postcssNode","SAFE_COMMENT_NEIGHBOR","empty","findLastWithPosition","tokens","token","customProperty","createTokenizer","endOfFile","nextToken","freeSemicolon","emptyRule","endFile","init","getPosition","left","right","colon","bracket","brackets","back","unclosedBracket","unknownWord","spacesAndCommentsFromEnd","firstSpaces","precheckMissedSemicolon","important","stringFrom","spacesFromEnd","cache","hasWord","checkMissedSemicolon","unnamedAtrule","open","params","afterName","spacesAndCommentsFromStart","unexpectedClose","unclosedBlock","ownSemicolon","clean","lastTokenType","entries","doubleColon","founded","Warning","initializer","warningPrinted","creator","LANG","transformer","process","processOpts","pluginOpts","atRule","existsSync","readFileSync","fromBase64","atob","loadAnnotation","startWith","loadMap","getAnnotationURL","sourceMapString","comments","decodeInline","baseCharsetUri","baseUri","charsetUri","uri","decodeURIComponent","lastMatch","encoding","loadFile","JSON","prevPath","mappings","_mappings","sections","use","normalized","warning","ignore","selectors","values","DEFAULT_RAW","indent","beforeDecl","beforeRule","beforeOpen","beforeClose","beforeComment","emptyBody","commentLeft","commentRight","capitalize","builder","rawValue","block","own","detect","rawCache","beforeAfter","method","rawSemicolon","rawEmptyBody","rawIndent","parts","rawBeforeComment","rawBeforeDecl","rawBeforeRule","rawBeforeClose","rawBeforeOpen","rawColon","buf","depth","step","SINGLE_QUOTE","DOUBLE_QUOTE","BACKSLASH","SLASH","NEWLINE","SPACE","FEED","TAB","CR","OPEN_SQUARE","CLOSE_SQUARE","OPEN_PARENTHESES","CLOSE_PARENTHESES","OPEN_CURLY","CLOSE_CURLY","SEMICOLON","ASTERISK","COLON","AT","RE_AT_END","RE_WORD_END","RE_BAD_BRACKET","RE_HEX_ESCAPE","escaped","escapePos","currentToken","valueOf","ignoreErrors","returned","position","unclosed","ignoreUnclosed","controlChar","lastIndex","printed","range","opt","htmlparser","escapeStringRegexp","parseSrcset","postcssParse","mediaTags","vulnerableTags","isEmptyObject","stringifySrcset","parsedSrcset","part","sanitizeHtml","VALID_HTML_ATTRIBUTE_NAME","html","_recursing","tempResult","Frame","that","tagPosition","mediaChildren","updateParentNodeText","parentFrame","updateParentNodeMediaChildren","htmlParserDefaults","allowedTags","allowVulnerableTags","nonTextTagsArray","nonTextTags","allowedAttributesMap","allowedAttributesGlobMap","allowedAttributes","globRegex","allowedClassesMap","allowedClassesGlobMap","allowedClassesRegexMap","allowedClasses","classes","transformTagsMap","transformTagsAll","skipMap","transformMap","skipText","skipTextDepth","transformTags","transform","transFun","simpleTransform","addedText","initializeState","enforceHtmlBoundary","frame","skip","hasText","transformedTag","disallowedTagsMode","nestingLimit","allowedScriptHostnames","allowedScriptDomains","passedAllowedAttributesMapCheck","newValue","splitStrArray","allowedSchemesAppliedToAttributes","naughtyHref","allowed","parseUrl","allowedHostname","hostname","allowedDomain","domain","endsWith","isRelativeUrl","allowIframeRelativeUrls","allowedIframeHostnames","allowedIframeDomains","evil","allowedSpecificClasses","allowedWildcardClasses","allowedSpecificClassesGlob","allowedSpecificClassesRegex","allowedWildcardClassesGlob","allowedClassesGlobs","filterClasses","abstractSyntaxTree","filteredAST","filterCss","allowedStyles","stringifyStyleAttributes","escapeHtml","selfClosing","textFilter","lastFrame","exclusiveFilter","firstIndex","matches","allowProtocolRelative","scheme","allowedSchemesByTag","allowedSchemes","astRules","selectedRule","filterDeclarations","extractedAttributes","attrObject","allowedDeclarationsList","attributeObject","matchesRegex","regularExpression","allowedGlobs","clss","glob","img","newTagName","newAttribs","merge","_hoisted_1","_hoisted_2","_hoisted_3","class","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_defineComponent","__name","authUser","sports","isCreation","loading","workout","setup","__props","useI18n","store","useStore","router","useRouter","toRefs","translatedSports","computed","translateSports","sport_id","appConfig","getters","ROOT_STORE","fileSizeLimit","max_single_file_size","getReadableFileSize","gpx_limit_import","zipSizeLimit","max_zip_file_size","errorMessages","workoutForm","reactive","title","notes","workoutDate","workoutTime","workoutDurationHour","workoutDurationMinutes","workoutDurationSeconds","workoutDistance","withGpx","ref","with_gpx","gpxFile","formErrors","payloadErrorMessages","updateNotes","updateWithGpx","updateFile","files","formatWorkoutForm","workoutDateTime","formatWorkoutDate","getDateWithTZ","workout_date","timezone","imperial_units","convertDistance","distance","toFixed","workout_time","isDistanceInvalid","isDurationInvalid","formatPayload","payload","updateWorkout","dispatch","WORKOUTS_STORE","workoutId","errorMessage","commit","onCancel","go","invalidateForm","onMounted","onUnmounted","watch","newWorkout","previousWorkout","_ctx","_cache","_component_CustomTextArea","_resolveComponent","_component_ErrorMessage","_component_Loader","_component_Card","_openBlock","_createElementBlock","_normalizeClass","_unref","_createVNode","_withCtx","_createTextVNode","_toDisplayString","$t","_createElementVNode","errors","onSubmit","_withModifiers","disabled","onClick","_createCommentVNode","_withDirectives","required","onInvalid","$event","_Fragment","_renderList","sport","translatedLabel","_vModelSelect","accept","onInput","_vModelText","errored","placeholder","minlength","maxlength","onUpdateValue","_createBlock","__exports__","SPORTS_STORE","AUTH_USER_STORE","workoutData","WorkoutEdition","route","useRoute","onBeforeMount","newWorkoutId","_withScopeId","_pushScopeId","_popScopeId","workoutObject","emits","emit","downloadGpx","authApi","responseType","response","gpxFileUrl","createObjectURL","Blob","gpxLink","createElement","setAttribute","click","_component_SportImage","_component_router_link","inactive","previousUrl","$router","label","segmentId","nextUrl","recordType","records","record","record_type","directions","convertDegreeToDirection","angle","floor","weather","useImperialUnits","getWindDirectionTitle","windBearing","_component_Distance","wind","unitFrom","digits","displayUnit","style","_normalizeStyle","weatherStart","weatherEnd","src","icon","alt","Number","temperature","humidity","WeatherWind","displayHARecord","withPause","pauses","moving","WorkoutRecord","strong","aveSpeed","speed","maxSpeed","maxAlt","minAlt","ascent","descent","WorkoutWeather","$","nodeVal","get1","properties","val1","$num","isNaN","num1","getMulti","propertyNames","isElement","nodeType","getLineStyle","lineStyle","stroke","opacity","getExtensions","childNodes","abbreviateName","nodeName","parseNumeric","num","coordPair$1","ll","time","coordinates","extendedValues","extractProperties","extensions","getElementsByTagNameNS","parentNode","links","getPoints$1","pointname","pts","times","plural","fill","getRoute","_gpxType","geometry","getTrack","segments","track","extractedLines","segment","multi","coordinateProperties","getPoint","pair","gpxGen","feature","waypoint","point","gpx","features","PI","debounce","fn","timeout","context","clearTimeout","setTimeout","capitalizeFirstLetter","isFunction","propsBinder","methods","leafletElement","setMethodName","newVal","oldVal","remapEvents","contextAttrs","attrName","eventName","toLocaleLowerCase","resetWebpackIcon","Icon","modules","Default","_getIconUrl","mergeOptions","iconRetinaUrl","iconUrl","shadowUrl","provideLeafletWrapper","methodName","wrapped","wrapper","updateLeafletWrapper","leafletMethod","WINDOW_OR_GLOBAL","g","global","GLOBAL_LEAFLET_OPT","props$1","pane","attribution","custom","layerType","visible","setup$1","leafletRef","addLayer","removeLayer","componentOptions","componentMethods","addThisLayer","leafletObject","removeThisLayer","setAttribution","old","attributionControl","$parent","removeAttribution","addAttribution","setName","setLayerType","setVisible","isVisible","bindPopup","bindTooltip","unbindTooltip","tooltip","getTooltip","unbindPopup","popup","getPopup","updateVisibleProp","ready","slots","display","props$2","interactive","bubblingMouseEvents","props$3","weight","lineCap","lineJoin","dashArray","dashOffset","fillColor","fillOpacity","fillRule","className","props$4","latLng","radius","props$6","setup$6","setPosition","render$1","script$2","disableClickPropagation","disableScrollPropagation","useGlobalLeaflet","registerControl","Control","DomEvent","L","LControl","extend","onAdd","$slots","props$8","collapsed","autoZIndex","hideSingleBase","sortLayers","sortFunction","Function","setup$8","controlOptions","layer","addBaseLayer","addOverlay","script$4","registerLayerControl","control","layers","props$b","setup$b","layerOptions","layerMethods","props$d","geojson","setup$d","layerGroupMethods","setGeojson","clearLayers","addData","getGeoJSONData","toGeoJSON","getBounds","script$8","geoJSON","attrs","on","props$e","zIndex","tileSize","noWrap","minZoom","maxZoom","setup$e","props$f","iconSize","iconAnchor","popupAnchor","tooltipAnchor","shadowRetinaUrl","shadowSize","shadowAnchor","bgPos","script$a","canSetParentHtml","setParentHtml","setIcon","onDomEvent","offDomEvent","divIcon","iconObject","createIcon","recreationNeeded","htmlSwapNeeded","elHtml","innerHTML","scheduleCreateIcon","scheduleHtmlSwap","setIconUrl","setIconRetinaUrl","setIconSize","setIconAnchor","setPopupAnchor","setTooltipAnchor","setShadowUrl","setShadowRetinaUrl","setShadowAnchor","setBgPos","setClassName","setHtml","lDivIcon","lIcon","off","observer","MutationObserver","observe","childList","characterData","subtree","script$c","layerGroup","script$d","center","bounds","maxBounds","zoom","paddingBottomRight","paddingTopLeft","padding","worldCopyJump","crs","maxBoundsViscosity","inertia","inertiaDeceleration","inertiaMaxSpeed","easeLinearity","zoomAnimation","zoomAnimationThreshold","fadeAnimation","markerZoomAnimation","noBlockingAnimations","blueprint","layersToAdd","layersInControl","eventHandlers","moveEndHandler","getZoom","getCenter","overlayAddHandler","overlayRemoveHandler","CRS","latLngBounds","beforeMapMount","optionsCrs","EPSG3857","layerControl","_leaflet_id","lControlLayer","lControl","addControl","setZoom","animate","setPaddingBottomRight","setPaddingTopLeft","setPadding","setCrs","prevBounds","fitBounds","setBounds","newBounds","isValid","oldBounds","lastSetBounds","boundsChanged","equals","fitBoundsOptions","setCenter","newCenter","oldCenter","lastSetCenter","lat","lng","panTo","props$h","draggable","zIndexOffset","setup$g","setDraggable","dragging","enable","disable","latLngSync","latlng","setLatLng","oldLatLng","getLatLng","script$e","getElement","newIcon","marker","props$i","latLngs","smoothFactor","noClip","props$j","props$k","props$n","tms","subdomains","detectRetina","setup$m","gridLayerOptions","gridLayerMethods","script$j","tileLayer","markerCoordinates","isStart","latitude","LMarker","longitude","LIcon","workoutMap","geoJson","getGeoJson","startMarkerCoordinates","chartData","endMarkerCoordinates","isFullscreen","gpxContent","jsonData","DOMParser","parseFromString","resetZoom","toggleFullscreen","_component_VFullscreen","modelValue","LMap","ref_key","onReady","LControlLayers","LTileLayer","getApiUrl","map_attribution","LGeoJson","LLayerGroup","CustomMarker","displaySegment","displayModal","getWorkoutObject","getWorkoutObjectUrl","previous_workout","next_workout","urls","date_format","ave_speed","max_alt","max_speed","min_alt","segment_id","weather_end","weather_start","updateDisplayModal","deleteWorkout","newSegmentId","_component_Modal","onConfirmAction","onCancelAction","WorkoutCardTitle","onDisplayModal","WorkoutMap","WorkoutData","display_ascent","getOrCreateLegendList","legendContainer","listContainer","querySelector","htmlLegendPlugin","afterUpdate","chart","containerID","firstChild","legendItems","legend","labels","generateLabels","onclick","datasetIndex","setDatasetVisibility","isDatasetVisible","update","checkBox","createTextNode","boxSpan","background","fillStyle","borderColor","strokeStyle","displayDistance","beginElevationAtZero","datasets","getDatasets","fromKmUnit","getUnitTo","fromMUnit","distance_labels","duration_labels","elevation","responsive","maintainAspectRatio","animation","layout","top","scales","grid","drawOnChartArea","ticks","formatDuration","ySpeed","yElevation","beginAtZero","elements","pointStyle","pointRadius","datalabels","interaction","intersect","mode","callbacks","dataset","formattedValue","yAxisID","tooltipItems","emitCoordinates","dataIndex","htmlLegend","lineChartProps","useLineChart","updateDisplayDistance","toISOString","emitEmptyCoordinates","units","defaultTarget","LineChart","_mergeProps","onMouseleave","tlds","utlds","numeric","ascii","alpha","asciinumeric","alphanumeric","emoji","slashscheme","registerGroup","groups","addToGroups","flags","group","flagsForToken","State","jr","jd","accepts","nextState","regex","_nextState","exactOnly","ta","tt","regexp","ts","len","templateState","allFlags","WORD","UWORD","LOCALHOST","TLD","UTLD","SCHEME","SLASH_SCHEME","NUM","WS","NL$1","OPENBRACE","OPENBRACKET","OPENANGLEBRACKET","OPENPAREN","CLOSEBRACE","CLOSEBRACKET","CLOSEANGLEBRACKET","CLOSEPAREN","AMPERSAND","APOSTROPHE","BACKTICK","CARET","COMMA","DOLLAR","DOT","EQUALS","EXCLAMATION","HYPHEN","PERCENT","PIPE","PLUS","POUND","QUERY","QUOTE","SEMI","TILDE","UNDERSCORE","EMOJI$1","SYM","tk","freeze","NL","EMOJI","ASCII_LETTER","LETTER","DIGIT","EMOJI_VARIATION","EMOJI_JOINER","init$2","customSchemes","_tr","_tr2","_tr3","_tr4","_tt","_tr5","Start","Num","Word","UWord","Ws","Emoji","EmojiJoiner","wordjr","uwordjr","fastts","tld","utld","_i2","_ref","_ref2","sch","optionalSlashSlash","run$1","iterable","stringToArray","charCount","cursor","charCursor","tokenLength","latestAccepting","sinceAccepts","charsSinceAccepts","second","char","defaultt","_inheritsLoose","subClass","superClass","_setPrototypeOf","defaultProtocol","format","noop","formatHref","nl2br","rel","validate","truncate","ignoreTags","Options","defaultRender","ignoredTags","uppercaseIgnoredTags","ir","check","operator","isCallable","getObj","renderFn","MultiToken","createTokenClass","Token","_MultiToken","isLink","toHref","toFormattedString","formatted","toFormattedHref","toObject","toFormattedObject","eventListeners","Email","Nl","Url","hasProtocol","makeState","arg","init$1","qsAccepting","qsNonAccepting","localpartAccepting","Localpart","Domain","Scheme","SlashScheme","LocalpartAt","LocalpartDot","EmailDomain","EmailDomainDot","Email$1","EmailDomainHyphen","EmailColon","DomainHyphen","DomainDot","DomainDotTld","DomainDotTldColon","DomainDotTldColonPort","Url$1","UrlNonaccept","UriPrefix","SlashSchemeColon","SlashSchemeColonSlash","UrlOpenbrace","UrlOpenbracket","UrlOpenanglebracket","UrlOpenparen","UrlOpenbraceQ","UrlOpenbracketQ","UrlOpenanglebracketQ","UrlOpenparenQ","UrlOpenbraceSyms","UrlOpenbracketSyms","UrlOpenanglebracketSyms","UrlOpenparenSyms","run","multis","textTokens","secondState","multiLength","initMultiToken","Multi","subtokens","startIdx","endIdx","INIT","scanner","tokenQueue","pluginQueue","initialized","HTML5NamedCharRefs","amp","gt","lt","nbsp","quot","HEXCHARCODE","CHARCODE","NAMED","EntityParser","named","WSP","ALPHA","CRLF","isAlpha","preprocessInput","EventedTokenizer","delegate","entityParser","tagNameBuffer","states","beforeData","peek","isIgnoredEndTag","consume","transitionTo","beginData","markTagStart","appendToData","consumeCharRef","finishData","tagOpen","beginStartTag","appendToTagName","markupDeclarationOpen","beginComment","maybeDoctype","beginDoctype","doctype","beforeDoctypeName","appendToDoctypeName","doctypeName","endDoctype","afterDoctypeName","nextSixChars","isPublic","isSystem","afterDoctypePublicKeyword","doctypePublicIdentifierDoubleQuoted","appendToDoctypePublicIdentifier","doctypePublicIdentifierSingleQuoted","afterDoctypePublicIdentifier","betweenDoctypePublicAndSystemIdentifiers","doctypeSystemIdentifierDoubleQuoted","appendToDoctypeSystemIdentifier","doctypeSystemIdentifierSingleQuoted","afterDoctypeSystemIdentifier","commentStart","finishComment","appendToCommentData","commentStartDash","commentEndDash","commentEnd","finishTag","endTagName","beforeAttributeName","reportSyntaxError","beginAttribute","appendToAttributeName","attributeName","beginAttributeValue","finishAttributeValue","afterAttributeName","beforeAttributeValue","appendToAttributeValue","attributeValueDoubleQuoted","attributeValueSingleQuoted","attributeValueUnquoted","afterAttributeValueQuoted","selfClosingStartTag","markTagAsSelfClosing","endTagOpen","beginEndTag","tokenizePart","tokenizeEOF","flushData","startLine","startColumn","_currentAttribute","currentAttribute","addLocInfo","loc","publicIdentifier","systemIdentifier","isQuoted","syntaxError","LinkifyResult","StartTag","EndTag","Chars","linkifyHtml","linkifiedTokens","linkified","isIgnored","preskipLen","skipTagTokens","linkifedChars","linkifyChars","_token","rendered","attributeArrayToStrings","escapeText","skippedTokens","stackCount","attributesToString","escapeAttr","attr","attrStrs","linkifyAndClean","workout_id","updateCoordinates","WorkoutDetail","WorkoutChart","onGetCoordinates","WorkoutSegments","WorkoutNotes","NotFound","toUnit","query","handleFilterChange","onFilter","onClearFilter","newQuery","$route","onChange","sports_list","distance_from","distance_to","duration_from","duration_to","ave_speed_from","ave_speed_to","max_speed_from","max_speed_to","user","orderByList","workouts","pagination","currentLanguage","getWorkoutsQuery","hoverWorkoutId","loadWorkouts","getConvertedPayload","reloadWorkouts","queryParam","queryValue","workoutQuery","getQuery","defaultOrder","defaultSort","workoutsPayloadKeys","convertedPayload","onHover","total","FilterSelects","sortList","order_by","onUpdateSelect","Pagination","smaller","getSportLabel","getSportColor","onMouseover","StaticMap","formatDate","NoWorkouts","hiddenFilters","toggleFilters","username","WorkoutsFilters","WorkoutsList","urlAlphabet","customAlphabet","alphabet","defaultSize","size","random"],"sourceRoot":""}