From b35dde0f17cae021f50d7558e75ca13a67568742 Mon Sep 17 00:00:00 2001 From: Raghavan Date: Sun, 11 Feb 2024 09:23:08 +0530 Subject: [PATCH] yarn run format --- plugins/CropperJS/cropper.js | 176 +-- .../stashBatchResultToggle.js | 32 +- .../defaultDataForPath/defaultDataForPath.js | 10 +- plugins/filenameParser/filenameParser.js | 2 +- plugins/pathParser/pathParser.js | 2 +- .../sceneCoverCropper/sceneCoverCropper.js | 6 +- plugins/stashAI/stashai.js | 185 ++- plugins/stashRealbooru/stash-realbooru.js | 923 ++++++++------- .../stashUserscriptLibrary.js | 130 +-- plugins/stats/stats.js | 8 +- plugins/visage/visage.js | 1019 ++++++++--------- .../stashdb_submission_helper.user.js | 36 +- 12 files changed, 1260 insertions(+), 1269 deletions(-) diff --git a/plugins/CropperJS/cropper.js b/plugins/CropperJS/cropper.js index 8d321c7e..79d2362f 100644 --- a/plugins/CropperJS/cropper.js +++ b/plugins/CropperJS/cropper.js @@ -44,7 +44,7 @@ Object.defineProperty( e, r, - Object.getOwnPropertyDescriptor(t, r), + Object.getOwnPropertyDescriptor(t, r) ); }); } @@ -140,7 +140,7 @@ } function _nonIterableSpread() { throw new TypeError( - "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.", + "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ); } function _toPrimitive(input, hint) { @@ -753,7 +753,7 @@ element.removeEventListener( event, listeners[event][listener], - options, + options ); } listeners[event][listener] = _handler; @@ -911,7 +911,7 @@ startX: pageX, startY: pageY, }, - end, + end ); } @@ -1058,15 +1058,15 @@ width: minWidth, height: minHeight, }, - "cover", + "cover" ); var width = Math.min( maxSizes.width, - Math.max(minSizes.width, naturalWidth), + Math.max(minSizes.width, naturalWidth) ); var height = Math.min( maxSizes.height, - Math.max(minSizes.height, naturalHeight), + Math.max(minSizes.height, naturalHeight) ); // Note: should always use image's natural sizes for drawing as @@ -1082,15 +1082,15 @@ width: minWidth, height: minHeight, }, - "cover", + "cover" ); var destWidth = Math.min( destMaxSizes.width, - Math.max(destMinSizes.width, imageNaturalWidth), + Math.max(destMinSizes.width, imageNaturalWidth) ); var destHeight = Math.min( destMaxSizes.height, - Math.max(destMinSizes.height, imageNaturalHeight), + Math.max(destMinSizes.height, imageNaturalHeight) ); var params = [-destWidth / 2, -destHeight / 2, destWidth, destHeight]; canvas.width = normalizeDecimalNumber(width); @@ -1109,9 +1109,9 @@ _toConsumableArray( params.map(function (param) { return Math.floor(normalizeDecimalNumber(param)); - }), - ), - ), + }) + ) + ) ); context.restore(); return canvas; @@ -1167,7 +1167,7 @@ // XXX: Babel's `toConsumableArray` helper will throw error in IE or Safari 9 // eslint-disable-next-line prefer-spread chunks.push( - fromCharCode.apply(null, toArray(uint8.subarray(0, chunkSize))), + fromCharCode.apply(null, toArray(uint8.subarray(0, chunkSize))) ); uint8 = uint8.subarray(chunkSize); } @@ -1214,7 +1214,7 @@ if (dataView.getUint16(tiffOffset + 2, littleEndian) === 0x002a) { var firstIFDOffset = dataView.getUint32( tiffOffset + 4, - littleEndian, + littleEndian ); if (firstIFDOffset >= 0x00000008) { ifdStart = tiffOffset + firstIFDOffset; @@ -1327,11 +1327,11 @@ var containerData = { width: Math.max( container.offsetWidth, - minWidth >= 0 ? minWidth : MIN_CONTAINER_WIDTH, + minWidth >= 0 ? minWidth : MIN_CONTAINER_WIDTH ), height: Math.max( container.offsetHeight, - minHeight >= 0 ? minHeight : MIN_CONTAINER_HEIGHT, + minHeight >= 0 ? minHeight : MIN_CONTAINER_HEIGHT ), }; this.containerData = containerData; @@ -1380,11 +1380,11 @@ this.limitCanvas(true, true); canvasData.width = Math.min( Math.max(canvasData.width, canvasData.minWidth), - canvasData.maxWidth, + canvasData.maxWidth ); canvasData.height = Math.min( Math.max(canvasData.height, canvasData.minHeight), - canvasData.maxHeight, + canvasData.maxHeight ); canvasData.left = (containerData.width - canvasData.width) / 2; canvasData.top = (containerData.height - canvasData.height) / 2; @@ -1417,12 +1417,12 @@ if (minCanvasWidth) { minCanvasWidth = Math.max( minCanvasWidth, - cropped ? cropBoxData.width : 0, + cropped ? cropBoxData.width : 0 ); } else if (minCanvasHeight) { minCanvasHeight = Math.max( minCanvasHeight, - cropped ? cropBoxData.height : 0, + cropped ? cropBoxData.height : 0 ); } else if (cropped) { minCanvasWidth = cropBoxData.width; @@ -1457,11 +1457,11 @@ if (cropped && this.limited) { canvasData.minLeft = Math.min( cropBoxData.left, - cropBoxData.left + (cropBoxData.width - canvasData.width), + cropBoxData.left + (cropBoxData.width - canvasData.width) ); canvasData.minTop = Math.min( cropBoxData.top, - cropBoxData.top + (cropBoxData.height - canvasData.height), + cropBoxData.top + (cropBoxData.height - canvasData.height) ); canvasData.maxLeft = cropBoxData.left; canvasData.maxTop = cropBoxData.top; @@ -1521,20 +1521,20 @@ } canvasData.width = Math.min( Math.max(canvasData.width, canvasData.minWidth), - canvasData.maxWidth, + canvasData.maxWidth ); canvasData.height = Math.min( Math.max(canvasData.height, canvasData.minHeight), - canvasData.maxHeight, + canvasData.maxHeight ); this.limitCanvas(false, true); canvasData.left = Math.min( Math.max(canvasData.left, canvasData.minLeft), - canvasData.maxLeft, + canvasData.maxLeft ); canvasData.top = Math.min( Math.max(canvasData.top, canvasData.minTop), - canvasData.maxTop, + canvasData.maxTop ); canvasData.oldLeft = canvasData.left; canvasData.oldTop = canvasData.top; @@ -1548,8 +1548,8 @@ getTransforms({ translateX: canvasData.left, translateY: canvasData.top, - }), - ), + }) + ) ); this.renderImage(changed); if (this.cropped && this.limited) { @@ -1583,10 +1583,10 @@ translateX: imageData.left, translateY: imageData.top, }, - imageData, - ), - ), - ), + imageData + ) + ) + ) ); if (changed) { this.output(); @@ -1614,21 +1614,21 @@ // Initialize auto crop area cropBoxData.width = Math.min( Math.max(cropBoxData.width, cropBoxData.minWidth), - cropBoxData.maxWidth, + cropBoxData.maxWidth ); cropBoxData.height = Math.min( Math.max(cropBoxData.height, cropBoxData.minHeight), - cropBoxData.maxHeight, + cropBoxData.maxHeight ); // The width/height of auto crop area must large than "minWidth/Height" cropBoxData.width = Math.max( cropBoxData.minWidth, - cropBoxData.width * autoCropArea, + cropBoxData.width * autoCropArea ); cropBoxData.height = Math.max( cropBoxData.minHeight, - cropBoxData.height * autoCropArea, + cropBoxData.height * autoCropArea ); cropBoxData.left = canvasData.left + (canvasData.width - cropBoxData.width) / 2; @@ -1653,7 +1653,7 @@ containerData.width, canvasData.width, canvasData.width + canvasData.left, - containerData.width - canvasData.left, + containerData.width - canvasData.left ) : containerData.width; var maxCropBoxHeight = limited @@ -1661,7 +1661,7 @@ containerData.height, canvasData.height, canvasData.height + canvasData.top, - containerData.height - canvasData.top, + containerData.height - canvasData.top ) : containerData.height; @@ -1729,20 +1729,20 @@ } cropBoxData.width = Math.min( Math.max(cropBoxData.width, cropBoxData.minWidth), - cropBoxData.maxWidth, + cropBoxData.maxWidth ); cropBoxData.height = Math.min( Math.max(cropBoxData.height, cropBoxData.minHeight), - cropBoxData.maxHeight, + cropBoxData.maxHeight ); this.limitCropBox(false, true); cropBoxData.left = Math.min( Math.max(cropBoxData.left, cropBoxData.minLeft), - cropBoxData.maxLeft, + cropBoxData.maxLeft ); cropBoxData.top = Math.min( Math.max(cropBoxData.top, cropBoxData.minTop), - cropBoxData.maxTop, + cropBoxData.maxTop ); cropBoxData.oldLeft = cropBoxData.left; cropBoxData.oldTop = cropBoxData.top; @@ -1754,7 +1754,7 @@ cropBoxData.width >= containerData.width && cropBoxData.height >= containerData.height ? ACTION_MOVE - : ACTION_ALL, + : ACTION_ALL ); } setStyle( @@ -1767,8 +1767,8 @@ getTransforms({ translateX: cropBoxData.left, translateY: cropBoxData.top, - }), - ), + }) + ) ); if (this.cropped && this.limited) { this.limitCanvas(true, true); @@ -1879,10 +1879,10 @@ translateX: -left, translateY: -top, }, - imageData, - ), - ), - ), + imageData + ) + ) + ) ); forEach(this.previews, function (element) { var data = getData(element, DATA_PREVIEW); @@ -1917,10 +1917,10 @@ translateX: -left * ratio, translateY: -top * ratio, }, - imageData, - ), - ), - ), + imageData + ) + ) + ) ); }); }, @@ -1949,7 +1949,7 @@ addListener( cropper, EVENT_POINTER_DOWN, - (this.onCropStart = this.cropStart.bind(this)), + (this.onCropStart = this.cropStart.bind(this)) ); if (options.zoomable && options.zoomOnWheel) { addListener( @@ -1959,31 +1959,31 @@ { passive: false, capture: true, - }, + } ); } if (options.toggleDragModeOnDblclick) { addListener( cropper, EVENT_DBLCLICK, - (this.onDblclick = this.dblclick.bind(this)), + (this.onDblclick = this.dblclick.bind(this)) ); } addListener( element.ownerDocument, EVENT_POINTER_MOVE, - (this.onCropMove = this.cropMove.bind(this)), + (this.onCropMove = this.cropMove.bind(this)) ); addListener( element.ownerDocument, EVENT_POINTER_UP, - (this.onCropEnd = this.cropEnd.bind(this)), + (this.onCropEnd = this.cropEnd.bind(this)) ); if (options.responsive) { addListener( window, EVENT_RESIZE, - (this.onResize = this.resize.bind(this)), + (this.onResize = this.resize.bind(this)) ); } }, @@ -2019,7 +2019,7 @@ removeListener( element.ownerDocument, EVENT_POINTER_MOVE, - this.onCropMove, + this.onCropMove ); removeListener(element.ownerDocument, EVENT_POINTER_UP, this.onCropEnd); if (options.responsive) { @@ -2053,12 +2053,12 @@ this.setCanvasData( forEach(canvasData, function (n, i) { canvasData[i] = n * ratio; - }), + }) ); this.setCropBoxData( forEach(cropBoxData, function (n, i) { cropBoxData[i] = n * ratio; - }), + }) ); } } @@ -2068,7 +2068,7 @@ return; } this.setDragMode( - hasClass(this.dragBox, CLASS_CROP) ? DRAG_MODE_MOVE : DRAG_MODE_CROP, + hasClass(this.dragBox, CLASS_CROP) ? DRAG_MODE_MOVE : DRAG_MODE_CROP ); }, wheel: function wheel(event) { @@ -2205,7 +2205,7 @@ toggleClass( this.dragBox, CLASS_MODAL, - this.cropped && this.options.modal, + this.cropped && this.options.modal ); } dispatchEvent(this.element, EVENT_CROP_END, { @@ -2249,14 +2249,14 @@ Math.min( containerData.width, canvasData.width, - canvasData.left + canvasData.width, + canvasData.left + canvasData.width ); maxHeight = minTop + Math.min( containerData.height, canvasData.height, - canvasData.top + canvasData.height, + canvasData.top + canvasData.height ); } var pointer = pointers[Object.keys(pointers)[0]]; @@ -2765,7 +2765,7 @@ top = _this$canvasData.top; return this.moveTo( isUndefined(offsetX) ? offsetX : left + Number(offsetX), - isUndefined(offsetY) ? offsetY : top + Number(offsetY), + isUndefined(offsetY) ? offsetY : top + Number(offsetY) ); }, /** @@ -2813,7 +2813,7 @@ return this.zoomTo( (canvasData.width * ratio) / canvasData.naturalWidth, null, - _originalEvent, + _originalEvent ); }, /** @@ -3082,7 +3082,7 @@ ["left", "top", "width", "height", "naturalWidth", "naturalHeight"], function (n) { data[n] = canvasData[n]; - }, + } ); } return data; @@ -3182,7 +3182,7 @@ this.image, this.imageData, canvasData, - options, + options ); // Returns the source canvas if it is not cropped. @@ -3213,7 +3213,7 @@ width: options.minWidth || 0, height: options.minHeight || 0, }, - "cover", + "cover" ); var _getAdjustedSizes = getAdjustedSizes({ aspectRatio: aspectRatio, @@ -3294,7 +3294,7 @@ dstX * scale, dstY * scale, dstWidth * scale, - dstHeight * scale, + dstHeight * scale ); } @@ -3306,9 +3306,9 @@ _toConsumableArray( params.map(function (param) { return Math.floor(normalizeDecimalNumber(param)); - }), - ), - ), + }) + ) + ) ); return canvas; }, @@ -3372,7 +3372,7 @@ _classCallCheck(this, Cropper); if (!element || !REGEXP_TAG_NAME.test(element.tagName)) { throw new Error( - "The first argument is required and must be an or element.", + "The first argument is required and must be an or element." ); } this.element = element; @@ -3572,7 +3572,7 @@ var isIOSWebKit = WINDOW.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test( - WINDOW.navigator.userAgent, + WINDOW.navigator.userAgent ); var done = function done(naturalWidth, naturalHeight) { assign(_this2.imageData, { @@ -3644,16 +3644,16 @@ var template = document.createElement("div"); template.innerHTML = TEMPLATE; var cropper = template.querySelector( - ".".concat(NAMESPACE, "-container"), + ".".concat(NAMESPACE, "-container") ); var canvas = cropper.querySelector( - ".".concat(NAMESPACE, "-canvas"), + ".".concat(NAMESPACE, "-canvas") ); var dragBox = cropper.querySelector( - ".".concat(NAMESPACE, "-drag-box"), + ".".concat(NAMESPACE, "-drag-box") ); var cropBox = cropper.querySelector( - ".".concat(NAMESPACE, "-crop-box"), + ".".concat(NAMESPACE, "-crop-box") ); var face = cropBox.querySelector(".".concat(NAMESPACE, "-face")); this.container = container; @@ -3662,7 +3662,7 @@ this.dragBox = dragBox; this.cropBox = cropBox; this.viewBox = cropper.querySelector( - ".".concat(NAMESPACE, "-view-box"), + ".".concat(NAMESPACE, "-view-box") ); this.face = face; canvas.appendChild(image); @@ -3686,13 +3686,13 @@ if (!options.guides) { addClass( cropBox.getElementsByClassName("".concat(NAMESPACE, "-dashed")), - CLASS_HIDDEN, + CLASS_HIDDEN ); } if (!options.center) { addClass( cropBox.getElementsByClassName("".concat(NAMESPACE, "-center")), - CLASS_HIDDEN, + CLASS_HIDDEN ); } if (options.background) { @@ -3708,11 +3708,11 @@ if (!options.cropBoxResizable) { addClass( cropBox.getElementsByClassName("".concat(NAMESPACE, "-line")), - CLASS_HIDDEN, + CLASS_HIDDEN ); addClass( cropBox.getElementsByClassName("".concat(NAMESPACE, "-point")), - CLASS_HIDDEN, + CLASS_HIDDEN ); } this.render(); @@ -3790,7 +3790,7 @@ assign(DEFAULTS, isPlainObject(options) && options); }, }, - ], + ] ); return Cropper; })(); diff --git a/plugins/StashBatchResultToggle/stashBatchResultToggle.js b/plugins/StashBatchResultToggle/stashBatchResultToggle.js index 539e8b23..9067a2c1 100644 --- a/plugins/StashBatchResultToggle/stashBatchResultToggle.js +++ b/plugins/StashBatchResultToggle/stashBatchResultToggle.js @@ -23,7 +23,7 @@ function toggleSearchItem(searchItem, toggleMode) { const searchResultItem = searchItem.querySelector( - "li.search-result.selected-result.active", + "li.search-result.selected-result.active" ); if (!searchResultItem) return; @@ -55,7 +55,7 @@ } = stash.parseSearchResultItem(searchResultItem); const studioMatchNode = matches.find( - (o) => o.matchType === "studio", + (o) => o.matchType === "studio" )?.matchNode; const performerMatchNodes = matches .filter((o) => o.matchType === "performer") @@ -66,17 +66,17 @@ const includeDate = document.getElementById("result-toggle-date").checked; const includeCover = document.getElementById("result-toggle-cover").checked; const includeStashID = document.getElementById( - "result-toggle-stashid", + "result-toggle-stashid" ).checked; const includeURL = document.getElementById("result-toggle-url").checked; const includeDetails = document.getElementById( - "result-toggle-details", + "result-toggle-details" ).checked; const includeStudio = document.getElementById( - "result-toggle-studio", + "result-toggle-studio" ).checked; const includePerformers = document.getElementById( - "result-toggle-performers", + "result-toggle-performers" ).checked; let options = []; @@ -115,7 +115,7 @@ includePerformers, o, resolveToggle(o), - ]), + ]) ); for (const [ @@ -333,11 +333,11 @@ async function loadSettings() { for (const input of document.querySelectorAll( - `#${resultToggleConfigId} input`, + `#${resultToggleConfigId} input` )) { input.checked = await sessionStorage.getItem( input.id, - input.dataset.default === "true", + input.dataset.default === "true" ); input.addEventListener("change", async () => { await sessionStorage.setItem(input.id, input.checked); @@ -346,32 +346,32 @@ } stash.addEventListener("tagger:mutation:add:remoteperformer", (evt) => - toggleSearchItem(getClosestAncestor(evt.detail.node, ".search-item"), 0), + toggleSearchItem(getClosestAncestor(evt.detail.node, ".search-item"), 0) ); stash.addEventListener("tagger:mutation:add:remotestudio", (evt) => - toggleSearchItem(getClosestAncestor(evt.detail.node, ".search-item"), 0), + toggleSearchItem(getClosestAncestor(evt.detail.node, ".search-item"), 0) ); stash.addEventListener("tagger:mutation:add:local", (evt) => - toggleSearchItem(getClosestAncestor(evt.detail.node, ".search-item"), 0), + toggleSearchItem(getClosestAncestor(evt.detail.node, ".search-item"), 0) ); stash.addEventListener("tagger:mutation:add:container", (evt) => - toggleSearchItem(getClosestAncestor(evt.detail.node, ".search-item"), 0), + toggleSearchItem(getClosestAncestor(evt.detail.node, ".search-item"), 0) ); stash.addEventListener("tagger:mutation:add:subcontainer", (evt) => - toggleSearchItem(getClosestAncestor(evt.detail.node, ".search-item"), 0), + toggleSearchItem(getClosestAncestor(evt.detail.node, ".search-item"), 0) ); function checkSaveButtonDisplay() { const taggerContainer = document.querySelector(".tagger-container"); const saveButton = getElementByXpath( "//button[text()='Save']", - taggerContainer, + taggerContainer ); btnGroup.style.display = saveButton ? "inline-block" : "none"; } stash.addEventListener( "tagger:mutations:searchitems", - checkSaveButtonDisplay, + checkSaveButtonDisplay ); })(); diff --git a/plugins/defaultDataForPath/defaultDataForPath.js b/plugins/defaultDataForPath/defaultDataForPath.js index 6e5709b3..85d8dd7d 100644 --- a/plugins/defaultDataForPath/defaultDataForPath.js +++ b/plugins/defaultDataForPath/defaultDataForPath.js @@ -128,7 +128,7 @@ function main() { " to " + name + " " + - ID, + ID ); } for (var o = 0; o < defaultPerformers.length; o++) { @@ -138,7 +138,7 @@ function main() { " to " + name + " " + - ID, + ID ); } addStudio @@ -148,7 +148,7 @@ function main() { " to " + name + " " + - ID, + ID ) : ""; } @@ -315,7 +315,7 @@ function addAllData( defaultData, pTags, pPerformers, - pStudio, + pStudio ) { if (obj) { if (obj.paths) { @@ -367,7 +367,7 @@ function addAllData( defaultData, pTags, pPerformers, - pStudio, + pStudio ); } } diff --git a/plugins/filenameParser/filenameParser.js b/plugins/filenameParser/filenameParser.js index 9dffaf00..68f86f66 100644 --- a/plugins/filenameParser/filenameParser.js +++ b/plugins/filenameParser/filenameParser.js @@ -187,7 +187,7 @@ function cleanFilename(name) { ]; var regExp = new RegExp( "(_|[^\\w\\d]|^)(" + blockList.join("|") + ")(_|[^\\w\\d]|$)", - "i", + "i" ); while (regExp.test(name)) { name = name.replace(regExp, "$1$3"); diff --git a/plugins/pathParser/pathParser.js b/plugins/pathParser/pathParser.js index b2e3c20b..c456308f 100644 --- a/plugins/pathParser/pathParser.js +++ b/plugins/pathParser/pathParser.js @@ -295,7 +295,7 @@ function matchRuleWithPath(sceneId, path, cb) { // Remove extension from filename parts[parts.length - 1] = parts[parts.length - 1].slice( 0, - parts[parts.length - 1].lastIndexOf("."), + parts[parts.length - 1].lastIndexOf(".") ); for (var i = 0; i < rules.length; i++) { diff --git a/plugins/sceneCoverCropper/sceneCoverCropper.js b/plugins/sceneCoverCropper/sceneCoverCropper.js index d0ea092f..7756af3d 100644 --- a/plugins/sceneCoverCropper/sceneCoverCropper.js +++ b/plugins/sceneCoverCropper/sceneCoverCropper.js @@ -10,14 +10,14 @@ new Cropper(img); } catch (e) { console.error( - "Cropper not loaded - please install 4. CropperJS from CommunityScripts", + "Cropper not loaded - please install 4. CropperJS from CommunityScripts" ); } try { stash.getVersion(); } catch (e) { console.error( - "Stash not loaded - please install 1. stashUserscriptLibrary from CommunityScripts", + "Stash not loaded - please install 1. stashUserscriptLibrary from CommunityScripts" ); } @@ -52,7 +52,7 @@ "d-flex", "flex-row", "justify-content-center", - "align-items-center", + "align-items-center" ); cropBtnContainer.style.gap = "10px"; cropperModal.appendChild(cropBtnContainer); diff --git a/plugins/stashAI/stashai.js b/plugins/stashAI/stashai.js index 9490297e..e1b46653 100644 --- a/plugins/stashAI/stashai.js +++ b/plugins/stashAI/stashai.js @@ -359,7 +359,7 @@ function custom_event( type, detail, - { bubbles = false, cancelable = false } = {}, + { bubbles = false, cancelable = false } = {} ) { const e = document.createEvent("CustomEvent"); e.initCustomEvent(type, bubbles, cancelable, detail); @@ -398,7 +398,7 @@ rules[name] = true; stylesheet.insertRule( `@keyframes ${name} ${rule}`, - stylesheet.cssRules.length, + stylesheet.cssRules.length ); } const animation = node.style.animation || ""; @@ -411,7 +411,7 @@ const next = previous.filter( name ? (anim) => anim.indexOf(name) < 0 // remove specific animation - : (anim) => anim.indexOf("__svelte") === -1, // remove all Svelte animations + : (anim) => anim.indexOf("__svelte") === -1 // remove all Svelte animations ); const deleted = previous.length - next.length; if (deleted) { @@ -663,7 +663,7 @@ const filtered = []; const targets = []; render_callbacks.forEach((c) => - fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c), + fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c) ); targets.forEach((c) => c()); render_callbacks = filtered; @@ -747,7 +747,7 @@ delay, easing, css, - uid++, + uid++ ); tick(0, 1); const start_time = now() + delay; @@ -877,7 +877,7 @@ destroy, create_each_block, next, - get_context, + get_context ) { let o = old_blocks.length; let n = list.length; @@ -1019,7 +1019,7 @@ not_equal, props, append_styles, - dirty = [-1], + dirty = [-1] ) { const parent_component = current_component; set_current_component(component); @@ -1038,8 +1038,7 @@ before_update: [], after_update: [], context: new Map( - options.context || - (parent_component ? parent_component.$$.context : []), + options.context || (parent_component ? parent_component.$$.context : []) ), // everything else callbacks: blank_object(), @@ -1079,7 +1078,7 @@ component, options.target, options.anchor, - options.customElement, + options.customElement ); flush(); } @@ -1118,7 +1117,7 @@ document.dispatchEvent( custom_event(type, Object.assign({ version: "3.59.2" }, detail), { bubbles: true, - }), + }) ); } function append_dev(target, node) { @@ -1140,7 +1139,7 @@ options, has_prevent_default, has_stop_propagation, - has_stop_immediate_propagation, + has_stop_immediate_propagation ) { const modifiers = options === true @@ -1292,7 +1291,7 @@ for (let i = 0; i < each_value.length; i += 1) { each_blocks[i] = create_each_block$3( - get_each_context$3(ctx, each_value, i), + get_each_context$3(ctx, each_value, i) ); } @@ -1326,13 +1325,13 @@ /*frame*/ ctx[0].offset[0] + "px -" + /*frame*/ ctx[0].offset[1] + - "px", + "px" ); set_style(div0, "background-image", "url('" + /*url*/ ctx[1] + "')"); attr_dev( div0, "data-offset", - (div0_data_offset_value = /*frame*/ ctx[0].offset), + (div0_data_offset_value = /*frame*/ ctx[0].offset) ); add_location(div0, file$5, 47, 2, 1619); attr_dev( @@ -1341,14 +1340,14 @@ (div1_class_value = "progress-bar progress-bar-striped bg-" + confidence$1(/*frame*/ ctx[0].tag.prob) + - " svelte-zeu5yg"), + " svelte-zeu5yg") ); attr_dev(div1, "role", "progressbar"); set_style(div1, "width", /*frame*/ ctx[0].tag.prob * 100 + "%"); attr_dev( div1, "aria-valuenow", - (div1_aria_valuenow_value = /*frame*/ ctx[0].tag.prob * 100), + (div1_aria_valuenow_value = /*frame*/ ctx[0].tag.prob * 100) ); attr_dev(div1, "aria-valuemin", 0); attr_dev(div1, "aria-valuemax", 100); @@ -1359,7 +1358,7 @@ attr_dev( path0, "d", - "M313.4 32.9c26 5.2 42.9 30.5 37.7 56.5l-2.3 11.4c-5.3 26.7-15.1 52.1-28.8 75.2H464c26.5 0 48 21.5 48 48c0 18.5-10.5 34.6-25.9 42.6C497 275.4 504 288.9 504 304c0 23.4-16.8 42.9-38.9 47.1c4.4 7.3 6.9 15.8 6.9 24.9c0 21.3-13.9 39.4-33.1 45.6c.7 3.3 1.1 6.8 1.1 10.4c0 26.5-21.5 48-48 48H294.5c-19 0-37.5-5.6-53.3-16.1l-38.5-25.7C176 420.4 160 390.4 160 358.3V320 272 247.1c0-29.2 13.3-56.7 36-75l7.4-5.9c26.5-21.2 44.6-51 51.2-84.2l2.3-11.4c5.2-26 30.5-42.9 56.5-37.7zM32 192H96c17.7 0 32 14.3 32 32V448c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32V224c0-17.7 14.3-32 32-32z", + "M313.4 32.9c26 5.2 42.9 30.5 37.7 56.5l-2.3 11.4c-5.3 26.7-15.1 52.1-28.8 75.2H464c26.5 0 48 21.5 48 48c0 18.5-10.5 34.6-25.9 42.6C497 275.4 504 288.9 504 304c0 23.4-16.8 42.9-38.9 47.1c4.4 7.3 6.9 15.8 6.9 24.9c0 21.3-13.9 39.4-33.1 45.6c.7 3.3 1.1 6.8 1.1 10.4c0 26.5-21.5 48-48 48H294.5c-19 0-37.5-5.6-53.3-16.1l-38.5-25.7C176 420.4 160 390.4 160 358.3V320 272 247.1c0-29.2 13.3-56.7 36-75l7.4-5.9c26.5-21.2 44.6-51 51.2-84.2l2.3-11.4c5.2-26 30.5-42.9 56.5-37.7zM32 192H96c17.7 0 32 14.3 32 32V448c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32V224c0-17.7 14.3-32 32-32z" ); add_location(path0, file$5, 81, 9, 2640); attr_dev(svg0, "class", "tag-item-accept svelte-zeu5yg"); @@ -1374,13 +1373,13 @@ attr_dev(select, "class", "tag-item-select svelte-zeu5yg"); if (/*frame*/ ctx[0].tag.label === void 0) add_render_callback(() => - /*select_change_handler*/ ctx[5].call(select), + /*select_change_handler*/ ctx[5].call(select) ); add_location(select, file$5, 86, 4, 3272); attr_dev( path1, "d", - "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z", + "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" ); add_location(path1, file$5, 105, 7, 3754); attr_dev(svg1, "height", "20"); @@ -1397,7 +1396,7 @@ }, l: function claim(nodes) { throw new Error( - "options.hydrate only works if the component was compiled with the `hydratable: true` option", + "options.hydrate only works if the component was compiled with the `hydratable: true` option" ); }, m: function mount(target, anchor) { @@ -1434,7 +1433,7 @@ false, false, false, - false, + false ), listen_dev( div0, @@ -1443,7 +1442,7 @@ false, false, false, - false, + false ), listen_dev( div0, @@ -1452,7 +1451,7 @@ false, false, false, - false, + false ), listen_dev( div3, @@ -1461,7 +1460,7 @@ { once: true }, false, false, - false, + false ), listen_dev(select, "change", /*select_change_handler*/ ctx[5]), listen_dev( @@ -1471,7 +1470,7 @@ { once: true }, false, false, - false, + false ), ]; @@ -1487,7 +1486,7 @@ /*frame*/ ctx[0].offset[0] + "px -" + /*frame*/ ctx[0].offset[1] + - "px", + "px" ); } @@ -1712,25 +1711,25 @@ get frame() { throw new Error( - ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''" ); } set frame(value) { throw new Error( - ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''" ); } get url() { throw new Error( - ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''" ); } set url(value) { throw new Error( - ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''" ); } } @@ -1788,7 +1787,7 @@ x = 0, y = 0, opacity = 0, - } = {}, + } = {} ) { const style = getComputedStyle(node); const target_opacity = +style.opacity; @@ -1834,7 +1833,7 @@ value, /*frame*/ ctx[19], /*each_value*/ ctx[20], - /*frame_index*/ ctx[21], + /*frame_index*/ ctx[21] ); } @@ -1861,7 +1860,7 @@ toggle_class( div, "selected", - /*selected*/ ctx[3] === /*frame*/ ctx[19].id, + /*selected*/ ctx[3] === /*frame*/ ctx[19].id ); add_location(div, file$4, 97, 12, 2701); this.first = div; @@ -1889,7 +1888,7 @@ toggle_class( div, "selected", - /*selected*/ ctx[3] === /*frame*/ ctx[19].id, + /*selected*/ ctx[3] === /*frame*/ ctx[19].id ); } }, @@ -2010,7 +2009,7 @@ let key = get_key(child_ctx); each_1_lookup.set( key, - (each_blocks[i] = create_each_block$2(key, child_ctx)), + (each_blocks[i] = create_each_block$2(key, child_ctx)) ); } @@ -2078,7 +2077,7 @@ }, l: function claim(nodes) { throw new Error( - "options.hydrate only works if the component was compiled with the `hydratable: true` option", + "options.hydrate only works if the component was compiled with the `hydratable: true` option" ); }, m: function mount(target, anchor) { @@ -2124,7 +2123,7 @@ false, false, false, - false, + false ), listen_dev( button0, @@ -2133,7 +2132,7 @@ false, false, false, - false, + false ), listen_dev( button1, @@ -2142,7 +2141,7 @@ false, false, false, - false, + false ), ]; @@ -2181,7 +2180,7 @@ fix_and_outro_and_destroy_block, create_each_block$2, null, - get_each_context$2, + get_each_context$2 ); for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].a(); check_outros(); @@ -2267,7 +2266,7 @@ $$invalidate( 0, (threshold = - Number(localStorage.getItem("stash-marker-threshold")) || 0.4), + Number(localStorage.getItem("stash-marker-threshold")) || 0.4) ); }); @@ -2425,7 +2424,7 @@ if ($$self.$$.dirty & /*frames, threshold*/ 2049) { $$invalidate( 5, - (filteredFrames = frames.filter((x) => x.tag.prob > threshold)), + (filteredFrames = frames.filter((x) => x.tag.prob > threshold)) ); } }; @@ -2471,37 +2470,37 @@ get url() { throw new Error( - ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''" ); } set url(value) { throw new Error( - ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''" ); } get frames() { throw new Error( - ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''" ); } set frames(value) { throw new Error( - ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''" ); } get threshold() { throw new Error( - ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''" ); } set threshold(value) { throw new Error( - ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''" ); } } @@ -2524,7 +2523,7 @@ attr_dev( path, "d", - "M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z", + "M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z" ); add_location(path, file$3, 70, 77, 2369); attr_dev(svg, "xmlns", "http://www.w3.org/2000/svg"); @@ -2540,7 +2539,7 @@ }, l: function claim(nodes) { throw new Error( - "options.hydrate only works if the component was compiled with the `hydratable: true` option", + "options.hydrate only works if the component was compiled with the `hydratable: true` option" ); }, m: function mount(target, anchor) { @@ -2556,7 +2555,7 @@ false, false, false, - false, + false ); mounted = true; } @@ -2608,7 +2607,7 @@ if (!url) { alert( - "No sprite found, please ensure you have sprites enabled and generated for your scenes.", + "No sprite found, please ensure you have sprites enabled and generated for your scenes." ); $$invalidate(0, (scanner = false)); return; @@ -2636,7 +2635,7 @@ if (response.status !== 200) { $$invalidate(0, (scanner = false)); alert( - "Something went wrong. It's likely a server issue, Please try again later.", + "Something went wrong. It's likely a server issue, Please try again later." ); return; } @@ -2783,7 +2782,7 @@ for (let i = 0; i < each_value.length; i += 1) { each_blocks[i] = create_each_block$1( - get_each_context$1(ctx, each_value, i), + get_each_context$1(ctx, each_value, i) ); } @@ -2813,13 +2812,13 @@ /*data*/ ctx[1].offset[0] + "px -" + /*data*/ ctx[1].offset[1] + - "px", + "px" ); set_style(div0, "background-image", "url('" + /*url*/ ctx[2] + "')"); attr_dev( div0, "data-offset", - (div0_data_offset_value = /*data*/ ctx[1].offset), + (div0_data_offset_value = /*data*/ ctx[1].offset) ); add_location(div0, file$2, 54, 2, 1571); attr_dev( @@ -2828,14 +2827,14 @@ (div1_class_value = "progress-bar progress-bar-striped bg-" + confidence(/*data*/ ctx[1].prob) + - " svelte-1d03wug"), + " svelte-1d03wug") ); attr_dev(div1, "role", "progressbar"); set_style(div1, "width", /*data*/ ctx[1].prob * 100 + "%"); attr_dev( div1, "aria-valuenow", - (div1_aria_valuenow_value = /*data*/ ctx[1].prob * 100), + (div1_aria_valuenow_value = /*data*/ ctx[1].prob * 100) ); attr_dev(div1, "aria-valuemin", "0"); attr_dev(div1, "aria-valuemax", "100"); @@ -2847,13 +2846,13 @@ attr_dev(select, "class", "tag-item-select svelte-1d03wug"); if (/*name*/ ctx[0] === void 0) add_render_callback(() => - /*select_change_handler*/ ctx[4].call(select), + /*select_change_handler*/ ctx[4].call(select) ); add_location(select, file$2, 72, 4, 2159); attr_dev( path, "d", - "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z", + "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" ); add_location(path, file$2, 87, 7, 2586); attr_dev(svg, "height", "20"); @@ -2866,7 +2865,7 @@ attr_dev( span, "class", - "tag-item badge badge-secondary svelte-1d03wug", + "tag-item badge badge-secondary svelte-1d03wug" ); add_location(span, file$2, 71, 2, 2109); set_style(div3, "padding", "20px"); @@ -2874,7 +2873,7 @@ }, l: function claim(nodes) { throw new Error( - "options.hydrate only works if the component was compiled with the `hydratable: true` option", + "options.hydrate only works if the component was compiled with the `hydratable: true` option" ); }, m: function mount(target, anchor) { @@ -2907,7 +2906,7 @@ false, false, false, - false, + false ), listen_dev( div0, @@ -2916,7 +2915,7 @@ false, false, false, - false, + false ), listen_dev(select, "change", /*select_change_handler*/ ctx[4]), listen_dev( @@ -2926,7 +2925,7 @@ false, false, false, - false, + false ), ]; @@ -2942,7 +2941,7 @@ /*data*/ ctx[1].offset[0] + "px -" + /*data*/ ctx[1].offset[1] + - "px", + "px" ); } @@ -3165,37 +3164,37 @@ get name() { throw new Error( - ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''" ); } set name(value) { throw new Error( - ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''" ); } get data() { throw new Error( - ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''" ); } set data(value) { throw new Error( - ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''" ); } get url() { throw new Error( - ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''" ); } set url(value) { throw new Error( - ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''" ); } } @@ -3257,7 +3256,7 @@ let key = get_key(child_ctx); each_1_lookup.set( key, - (each_blocks[i] = create_each_block(key, child_ctx)), + (each_blocks[i] = create_each_block(key, child_ctx)) ); } @@ -3328,7 +3327,7 @@ attr_dev( div7, "class", - "modal-dialog modal-xl top-accent svelte-9viihb", + "modal-dialog modal-xl top-accent svelte-9viihb" ); add_location(div7, file$1, 91, 4, 2127); attr_dev(div8, "role", "dialog"); @@ -3382,7 +3381,7 @@ false, false, false, - false, + false ), listen_dev( button1, @@ -3391,7 +3390,7 @@ false, false, false, - false, + false ), listen_dev(input, "change", /*input_change_input_handler*/ ctx[12]), listen_dev(input, "input", /*input_change_input_handler*/ ctx[12]), @@ -3402,7 +3401,7 @@ false, false, false, - false, + false ), ]; @@ -3428,7 +3427,7 @@ fix_and_outro_and_destroy_block, create_each_block, null, - get_each_context, + get_each_context ); for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].a(); check_outros(); @@ -3530,7 +3529,7 @@ value, /*tagName*/ ctx[15], /*each_value*/ ctx[17], - /*each_index*/ ctx[18], + /*each_index*/ ctx[18] ); } @@ -3672,7 +3671,7 @@ }, l: function claim(nodes) { throw new Error( - "options.hydrate only works if the component was compiled with the `hydratable: true` option", + "options.hydrate only works if the component was compiled with the `hydratable: true` option" ); }, m: function mount(target, anchor) { @@ -3881,7 +3880,7 @@ if ($$self.$$.dirty & /*matches, threshold*/ 1025) { $$invalidate( 5, - (filteredMatches = matches.filter((x) => x[1].prob > threshold)), + (filteredMatches = matches.filter((x) => x[1].prob > threshold)) ); } }; @@ -3923,37 +3922,37 @@ get matches() { throw new Error( - ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''" ); } set matches(value) { throw new Error( - ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''" ); } get url() { throw new Error( - ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''" ); } set url(value) { throw new Error( - ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''" ); } get threshold() { throw new Error( - ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''" ); } set threshold(value) { throw new Error( - ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''" ); } } @@ -3979,7 +3978,7 @@ attr_dev( path, "d", - "m21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4a2 2 0 0 0-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58c.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41c0-.55-.23-1.06-.59-1.42M5.5 7A1.5 1.5 0 0 1 4 5.5A1.5 1.5 0 0 1 5.5 4A1.5 1.5 0 0 1 7 5.5A1.5 1.5 0 0 1 5.5 7m11.77 8.27L13 19.54l-4.27-4.27A2.52 2.52 0 0 1 8 13.5a2.5 2.5 0 0 1 2.5-2.5c.69 0 1.32.28 1.77.74l.73.72l.73-.73c.45-.45 1.08-.73 1.77-.73a2.5 2.5 0 0 1 2.5 2.5c0 .69-.28 1.32-.73 1.77Z", + "m21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4a2 2 0 0 0-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58c.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41c0-.55-.23-1.06-.59-1.42M5.5 7A1.5 1.5 0 0 1 4 5.5A1.5 1.5 0 0 1 5.5 4A1.5 1.5 0 0 1 7 5.5A1.5 1.5 0 0 1 5.5 7m11.77 8.27L13 19.54l-4.27-4.27A2.52 2.52 0 0 1 8 13.5a2.5 2.5 0 0 1 2.5-2.5c.69 0 1.32.28 1.77.74l.73.72l.73-.73c.45-.45 1.08-.73 1.77-.73a2.5 2.5 0 0 1 2.5 2.5c0 .69-.28 1.32-.73 1.77Z" ); add_location(path, file, 78, 85, 2558); attr_dev(svg, "xmlns", "http://www.w3.org/2000/svg"); @@ -3995,7 +3994,7 @@ }, l: function claim(nodes) { throw new Error( - "options.hydrate only works if the component was compiled with the `hydratable: true` option", + "options.hydrate only works if the component was compiled with the `hydratable: true` option" ); }, m: function mount(target, anchor) { @@ -4011,7 +4010,7 @@ false, false, false, - false, + false ); mounted = true; } @@ -4054,7 +4053,7 @@ if (!url) { alert( - "No sprite found, please ensure you have sprites enabled and generated for your scenes.", + "No sprite found, please ensure you have sprites enabled and generated for your scenes." ); $$invalidate(0, (scanner = false)); return; @@ -4094,7 +4093,7 @@ if (response.status !== 200) { $$invalidate(0, (scanner = false)); alert( - "Something went wrong. It's likely a server issue, Please try again later.", + "Something went wrong. It's likely a server issue, Please try again later." ); return; } diff --git a/plugins/stashRealbooru/stash-realbooru.js b/plugins/stashRealbooru/stash-realbooru.js index dda24e4a..c2375418 100644 --- a/plugins/stashRealbooru/stash-realbooru.js +++ b/plugins/stashRealbooru/stash-realbooru.js @@ -264,7 +264,7 @@ function custom_event( type, detail, - { bubbles = false, cancelable = false } = {}, + { bubbles = false, cancelable = false } = {} ) { const e = document.createEvent("CustomEvent"); e.initCustomEvent(type, bubbles, cancelable, detail); @@ -303,7 +303,7 @@ rules[name] = true; stylesheet.insertRule( `@keyframes ${name} ${rule}`, - stylesheet.cssRules.length, + stylesheet.cssRules.length ); } const animation = node.style.animation || ""; @@ -316,7 +316,7 @@ const next = previous.filter( name ? (anim) => anim.indexOf(name) < 0 // remove specific animation - : (anim) => anim.indexOf("__svelte") === -1, // remove all Svelte animations + : (anim) => anim.indexOf("__svelte") === -1 // remove all Svelte animations ); const deleted = previous.length - next.length; if (deleted) { @@ -565,7 +565,7 @@ const filtered = []; const targets = []; render_callbacks.forEach((c) => - fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c), + fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c) ); targets.forEach((c) => c()); render_callbacks = filtered; @@ -649,7 +649,7 @@ delay, easing, css, - uid++, + uid++ ); tick(0, 1); const start_time = now() + delay; @@ -779,7 +779,7 @@ destroy, create_each_block, next, - get_context, + get_context ) { let o = old_blocks.length; let n = list.length; @@ -949,7 +949,7 @@ not_equal, props, append_styles, - dirty = [-1], + dirty = [-1] ) { const parent_component = current_component; set_current_component(component); @@ -968,8 +968,7 @@ before_update: [], after_update: [], context: new Map( - options.context || - (parent_component ? parent_component.$$.context : []), + options.context || (parent_component ? parent_component.$$.context : []) ), // everything else callbacks: blank_object(), @@ -1009,7 +1008,7 @@ component, options.target, options.anchor, - options.customElement, + options.customElement ); flush(); } @@ -1048,7 +1047,7 @@ document.dispatchEvent( custom_event(type, Object.assign({ version: "3.59.2" }, detail), { bubbles: true, - }), + }) ); } function append_dev(target, node) { @@ -1070,7 +1069,7 @@ options, has_prevent_default, has_stop_propagation, - has_stop_immediate_propagation, + has_stop_immediate_propagation ) { const modifiers = options === true @@ -1185,14 +1184,14 @@ (div0_class_value = "progress-bar progress-bar-striped bg-" + confidence(/*prob*/ ctx[2]) + - " svelte-ai57u1"), + " svelte-ai57u1") ); attr_dev(div0, "role", "progressbar"); set_style(div0, "width", /*prob*/ ctx[2] * 100 + "%"); attr_dev( div0, "aria-valuenow", - (div0_aria_valuenow_value = /*prob*/ ctx[2] * 100), + (div0_aria_valuenow_value = /*prob*/ ctx[2] * 100) ); attr_dev(div0, "aria-valuemin", "0"); attr_dev(div0, "aria-valuemax", "100"); @@ -1203,7 +1202,7 @@ attr_dev( path, "d", - "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z", + "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" ); add_location(path, file$2, 45, 7, 954); attr_dev(svg, "height", "20"); @@ -1220,7 +1219,7 @@ }, l: function claim(nodes) { throw new Error( - "options.hydrate only works if the component was compiled with the `hydratable: true` option", + "options.hydrate only works if the component was compiled with the `hydratable: true` option" ); }, m: function mount(target, anchor) { @@ -1242,7 +1241,7 @@ false, false, false, - false, + false ); mounted = true; } @@ -1398,37 +1397,37 @@ get id() { throw new Error( - ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''" ); } set id(value) { throw new Error( - ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''" ); } get name() { throw new Error( - ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''" ); } set name(value) { throw new Error( - ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''" ); } get prob() { throw new Error( - ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''" ); } set prob(value) { throw new Error( - ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''" ); } } @@ -1459,7 +1458,7 @@ x = 0, y = 0, opacity = 0, - } = {}, + } = {} ) { const style = getComputedStyle(node); const target_opacity = +style.opacity; @@ -1558,7 +1557,7 @@ let key = get_key(child_ctx); each_1_lookup.set( key, - (each_blocks[i] = create_each_block(key, child_ctx)), + (each_blocks[i] = create_each_block(key, child_ctx)) ); } @@ -1629,7 +1628,7 @@ attr_dev( div7, "class", - "modal-dialog modal-xl top-accent svelte-9viihb", + "modal-dialog modal-xl top-accent svelte-9viihb" ); add_location(div7, file$1, 87, 4, 2127); attr_dev(div8, "role", "dialog"); @@ -1683,7 +1682,7 @@ false, false, false, - false, + false ), listen_dev( button1, @@ -1692,7 +1691,7 @@ false, false, false, - false, + false ), listen_dev(input, "change", /*input_change_input_handler*/ ctx[10]), listen_dev(input, "input", /*input_change_input_handler*/ ctx[10]), @@ -1703,7 +1702,7 @@ false, false, false, - false, + false ), ]; @@ -1729,7 +1728,7 @@ fix_and_outro_and_destroy_block, create_each_block, null, - get_each_context, + get_each_context ); for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].a(); check_outros(); @@ -1955,7 +1954,7 @@ }, l: function claim(nodes) { throw new Error( - "options.hydrate only works if the component was compiled with the `hydratable: true` option", + "options.hydrate only works if the component was compiled with the `hydratable: true` option" ); }, m: function mount(target, anchor) { @@ -2152,7 +2151,7 @@ if ($$self.$$.dirty & /*matches, threshold*/ 513) { $$invalidate( 4, - (filteredMatches = matches.filter((x) => x.prob > threshold)), + (filteredMatches = matches.filter((x) => x.prob > threshold)) ); } }; @@ -2191,25 +2190,25 @@ get matches() { throw new Error( - ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''" ); } set matches(value) { throw new Error( - ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''" ); } get threshold() { throw new Error( - ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''" ); } set threshold(value) { throw new Error( - ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''" ); } } @@ -2273,9 +2272,7 @@ function __extends(d, b) { if (typeof b !== "function" && b !== null) throw new TypeError( - "Class extends value " + - String(b) + - " is not a constructor or null", + "Class extends value " + String(b) + " is not a constructor or null" ); extendStatics(d, b); function __() { @@ -2455,7 +2452,7 @@ this.left + x, this.top + y, this.width + w, - this.height + h, + this.height + h ); }; Bounds.fromClientRect = function (context, clientRect) { @@ -2463,7 +2460,7 @@ clientRect.left + context.windowBounds.left, clientRect.top + context.windowBounds.top, clientRect.width, - clientRect.height, + clientRect.height ); }; Bounds.fromDOMRectList = function (context, domRectList) { @@ -2475,7 +2472,7 @@ domRect.left + context.windowBounds.left, domRect.top + context.windowBounds.top, domRect.width, - domRect.height, + domRect.height ) : Bounds.EMPTY; }; @@ -2494,12 +2491,12 @@ var width = Math.max( Math.max(body.scrollWidth, documentElement.scrollWidth), Math.max(body.offsetWidth, documentElement.offsetWidth), - Math.max(body.clientWidth, documentElement.clientWidth), + Math.max(body.clientWidth, documentElement.clientWidth) ); var height = Math.max( Math.max(body.scrollHeight, documentElement.scrollHeight), Math.max(body.offsetHeight, documentElement.offsetHeight), - Math.max(body.clientHeight, documentElement.clientHeight), + Math.max(body.clientHeight, documentElement.clientHeight) ); return new Bounds(0, 0, width, height); }; @@ -2519,7 +2516,7 @@ var extra = str.charCodeAt(i++); if ((extra & 0xfc00) === 0xdc00) { codePoints.push( - ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000, + ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000 ); } else { codePoints.push(value); @@ -2554,7 +2551,7 @@ codePoint -= 0x10000; codeUnits.push( (codePoint >> 10) + 0xd800, - (codePoint % 0x400) + 0xdc00, + (codePoint % 0x400) + 0xdc00 ); } if (index + 1 === length || codeUnits.length > 0x4000) { @@ -2635,7 +2632,7 @@ (buffer[i + 3] << 24) | (buffer[i + 2] << 16) | (buffer[i + 1] << 8) | - buffer[i], + buffer[i] ); } return bytes; @@ -2734,7 +2731,7 @@ view32[2], view32[3], index, - data, + data ); }; var Trie$1 = /** @class */ (function () { @@ -2744,7 +2741,7 @@ highStart, highValueIndex, index, - data, + data ) { this.initialValue = initialValue; this.errorValue = errorValue; @@ -2959,7 +2956,7 @@ a, b, currentIndex, - classTypes, + classTypes ) { var current = classTypes[currentIndex]; if (Array.isArray(a) ? a.indexOf(current) !== -1 : a === current) { @@ -3017,7 +3014,7 @@ classTypes, indicies, index, - forbiddenBreaks, + forbiddenBreaks ) { if (indicies[index] === 0) { return BREAK_NOT_ALLOWED$1; @@ -3290,7 +3287,7 @@ Break.prototype.slice = function () { return fromCodePoint$1.apply( void 0, - this.codePoints.slice(this.start, this.end), + this.codePoints.slice(this.start, this.end) ); }; return Break; @@ -3317,7 +3314,7 @@ classTypes, indicies, ++nextIndex, - forbiddenBreakpoints, + forbiddenBreakpoints )) === BREAK_NOT_ALLOWED$1 ) {} if (lineBreak !== BREAK_NOT_ALLOWED$1 || nextIndex === length) { @@ -3609,7 +3606,7 @@ isNumberStart( codePoint, this.peekCodePoint(0), - this.peekCodePoint(1), + this.peekCodePoint(1) ) ) { this.reconsumeCodePoint(codePoint); @@ -3641,7 +3638,7 @@ isNumberStart( codePoint, this.peekCodePoint(0), - this.peekCodePoint(1), + this.peekCodePoint(1) ) ) { this.reconsumeCodePoint(codePoint); @@ -3787,18 +3784,18 @@ void 0, digits.map(function (digit) { return digit === QUESTION_MARK ? ZERO : digit; - }), + }) ), - 16, + 16 ); var end = parseInt( fromCodePoint$1.apply( void 0, digits.map(function (digit) { return digit === QUESTION_MARK ? F : digit; - }), + }) ), - 16, + 16 ); return { type: 30 /* UNICODE_RANGE_TOKEN */, @@ -3932,7 +3929,7 @@ var amount = Math.min(SLICE_STACK_SIZE, count); value += fromCodePoint$1.apply( void 0, - this._value.splice(0, amount), + this._value.splice(0, amount) ); count -= amount; } @@ -4098,7 +4095,7 @@ } if (token.type === 32 /* EOF_TOKEN */) { throw new SyntaxError( - "Error parsing CSS component value, unexpected EOF", + "Error parsing CSS component value, unexpected EOF" ); } this.reconsumeToken(token); @@ -4110,7 +4107,7 @@ return value; } throw new SyntaxError( - "Error parsing CSS component value, multiple values found when expecting only one", + "Error parsing CSS component value, multiple values found when expecting only one" ); }; Parser.prototype.parseComponentValues = function () { @@ -4209,7 +4206,7 @@ if (token.type === 4 /* COMMA_TOKEN */) { if (arg.length === 0) { throw new Error( - "Error parsing function args, zero tokens for arg", + "Error parsing function args, zero tokens for arg" ); } args.push(arg); @@ -4388,7 +4385,7 @@ throw new Error( 'Attempting to parse an unsupported color function "' + value.name + - '"', + '"' ); } return colorFunction(context, value.values); @@ -4402,7 +4399,7 @@ parseInt(r + r, 16), parseInt(g + g, 16), parseInt(b + b, 16), - 1, + 1 ); } if (value.value.length === 4) { @@ -4414,7 +4411,7 @@ parseInt(r + r, 16), parseInt(g + g, 16), parseInt(b + b, 16), - parseInt(a + a, 16) / 255, + parseInt(a + a, 16) / 255 ); } if (value.value.length === 6) { @@ -4432,7 +4429,7 @@ parseInt(r, 16), parseInt(g, 16), parseInt(b, 16), - parseInt(a, 16) / 255, + parseInt(a, 16) / 255 ); } } @@ -4546,7 +4543,7 @@ var parseColor = function (context, value) { return color$1.parse( context, - Parser.create(value).parseComponentValue(), + Parser.create(value).parseComponentValue() ); }; var COLORS = { @@ -4840,7 +4837,7 @@ { optimumDistance: closest ? Infinity : -Infinity, optimumCorner: null, - }, + } ).optimumCorner; }; var calculateRadius = function (gradient, x, y, width, height) { @@ -4855,7 +4852,7 @@ Math.abs(x), Math.abs(x - width), Math.abs(y), - Math.abs(y - height), + Math.abs(y - height) ); } else if (gradient.shape === 1 /* ELLIPSE */) { rx = Math.min(Math.abs(x), Math.abs(x - width)); @@ -4870,7 +4867,7 @@ distance(x, y), distance(x, y - height), distance(x - width, y), - distance(x - width, y - height), + distance(x - width, y - height) ); } else if (gradient.shape === 1 /* ELLIPSE */) { // Compute the ratio ry/rx (which is to be the same as for "closest-side") @@ -4891,7 +4888,7 @@ Math.abs(x), Math.abs(x - width), Math.abs(y), - Math.abs(y - height), + Math.abs(y - height) ); } else if (gradient.shape === 1 /* ELLIPSE */) { rx = Math.max(Math.abs(x), Math.abs(x - width)); @@ -4906,7 +4903,7 @@ distance(x, y), distance(x, y - height), distance(x - width, y), - distance(x - width, y - height), + distance(x - width, y - height) ); } else if (gradient.shape === 1 /* ELLIPSE */) { // Compute the ratio ry/rx (which is to be the same as for "farthest-side") @@ -5229,7 +5226,7 @@ throw new Error( 'Attempting to parse an unsupported image function "' + value.name + - '"', + '"' ); } return imageFunction(context, value.values); @@ -5392,7 +5389,7 @@ type: 1 /* LIST */, parse: function (_context, tokens) { return parseLengthPercentageTuple( - tokens.filter(isLengthPercentage), + tokens.filter(isLengthPercentage) ); }, }; @@ -5951,7 +5948,7 @@ throw new Error( 'Attempting to parse an unsupported transform function "' + token.name + - '"', + '"' ); } return transformFunction(token.values); @@ -6454,122 +6451,122 @@ this.animationDuration = parse( context, duration, - declaration.animationDuration, + declaration.animationDuration ); this.backgroundClip = parse( context, backgroundClip, - declaration.backgroundClip, + declaration.backgroundClip ); this.backgroundColor = parse( context, backgroundColor, - declaration.backgroundColor, + declaration.backgroundColor ); this.backgroundImage = parse( context, backgroundImage, - declaration.backgroundImage, + declaration.backgroundImage ); this.backgroundOrigin = parse( context, backgroundOrigin, - declaration.backgroundOrigin, + declaration.backgroundOrigin ); this.backgroundPosition = parse( context, backgroundPosition, - declaration.backgroundPosition, + declaration.backgroundPosition ); this.backgroundRepeat = parse( context, backgroundRepeat, - declaration.backgroundRepeat, + declaration.backgroundRepeat ); this.backgroundSize = parse( context, backgroundSize, - declaration.backgroundSize, + declaration.backgroundSize ); this.borderTopColor = parse( context, borderTopColor, - declaration.borderTopColor, + declaration.borderTopColor ); this.borderRightColor = parse( context, borderRightColor, - declaration.borderRightColor, + declaration.borderRightColor ); this.borderBottomColor = parse( context, borderBottomColor, - declaration.borderBottomColor, + declaration.borderBottomColor ); this.borderLeftColor = parse( context, borderLeftColor, - declaration.borderLeftColor, + declaration.borderLeftColor ); this.borderTopLeftRadius = parse( context, borderTopLeftRadius, - declaration.borderTopLeftRadius, + declaration.borderTopLeftRadius ); this.borderTopRightRadius = parse( context, borderTopRightRadius, - declaration.borderTopRightRadius, + declaration.borderTopRightRadius ); this.borderBottomRightRadius = parse( context, borderBottomRightRadius, - declaration.borderBottomRightRadius, + declaration.borderBottomRightRadius ); this.borderBottomLeftRadius = parse( context, borderBottomLeftRadius, - declaration.borderBottomLeftRadius, + declaration.borderBottomLeftRadius ); this.borderTopStyle = parse( context, borderTopStyle, - declaration.borderTopStyle, + declaration.borderTopStyle ); this.borderRightStyle = parse( context, borderRightStyle, - declaration.borderRightStyle, + declaration.borderRightStyle ); this.borderBottomStyle = parse( context, borderBottomStyle, - declaration.borderBottomStyle, + declaration.borderBottomStyle ); this.borderLeftStyle = parse( context, borderLeftStyle, - declaration.borderLeftStyle, + declaration.borderLeftStyle ); this.borderTopWidth = parse( context, borderTopWidth, - declaration.borderTopWidth, + declaration.borderTopWidth ); this.borderRightWidth = parse( context, borderRightWidth, - declaration.borderRightWidth, + declaration.borderRightWidth ); this.borderBottomWidth = parse( context, borderBottomWidth, - declaration.borderBottomWidth, + declaration.borderBottomWidth ); this.borderLeftWidth = parse( context, borderLeftWidth, - declaration.borderLeftWidth, + declaration.borderLeftWidth ); this.boxShadow = parse(context, boxShadow, declaration.boxShadow); this.color = parse(context, color, declaration.color); @@ -6582,41 +6579,41 @@ this.fontVariant = parse( context, fontVariant, - declaration.fontVariant, + declaration.fontVariant ); this.fontWeight = parse(context, fontWeight, declaration.fontWeight); this.letterSpacing = parse( context, letterSpacing, - declaration.letterSpacing, + declaration.letterSpacing ); this.lineBreak = parse(context, lineBreak, declaration.lineBreak); this.lineHeight = parse(context, lineHeight, declaration.lineHeight); this.listStyleImage = parse( context, listStyleImage, - declaration.listStyleImage, + declaration.listStyleImage ); this.listStylePosition = parse( context, listStylePosition, - declaration.listStylePosition, + declaration.listStylePosition ); this.listStyleType = parse( context, listStyleType, - declaration.listStyleType, + declaration.listStyleType ); this.marginTop = parse(context, marginTop, declaration.marginTop); this.marginRight = parse( context, marginRight, - declaration.marginRight, + declaration.marginRight ); this.marginBottom = parse( context, marginBottom, - declaration.marginBottom, + declaration.marginBottom ); this.marginLeft = parse(context, marginLeft, declaration.marginLeft); this.opacity = parse(context, opacity, declaration.opacity); @@ -6626,23 +6623,23 @@ this.overflowWrap = parse( context, overflowWrap, - declaration.overflowWrap, + declaration.overflowWrap ); this.paddingTop = parse(context, paddingTop, declaration.paddingTop); this.paddingRight = parse( context, paddingRight, - declaration.paddingRight, + declaration.paddingRight ); this.paddingBottom = parse( context, paddingBottom, - declaration.paddingBottom, + declaration.paddingBottom ); this.paddingLeft = parse( context, paddingLeft, - declaration.paddingLeft, + declaration.paddingLeft ); this.paintOrder = parse(context, paintOrder, declaration.paintOrder); this.position = parse(context, position, declaration.position); @@ -6652,37 +6649,37 @@ textDecorationColor, (_a = declaration.textDecorationColor) !== null && _a !== void 0 ? _a - : declaration.color, + : declaration.color ); this.textDecorationLine = parse( context, textDecorationLine, (_b = declaration.textDecorationLine) !== null && _b !== void 0 ? _b - : declaration.textDecoration, + : declaration.textDecoration ); this.textShadow = parse(context, textShadow, declaration.textShadow); this.textTransform = parse( context, textTransform, - declaration.textTransform, + declaration.textTransform ); this.transform = parse(context, transform$1, declaration.transform); this.transformOrigin = parse( context, transformOrigin, - declaration.transformOrigin, + declaration.transformOrigin ); this.visibility = parse(context, visibility, declaration.visibility); this.webkitTextStrokeColor = parse( context, webkitTextStrokeColor, - declaration.webkitTextStrokeColor, + declaration.webkitTextStrokeColor ); this.webkitTextStrokeWidth = parse( context, webkitTextStrokeWidth, - declaration.webkitTextStrokeWidth, + declaration.webkitTextStrokeWidth ); this.wordBreak = parse(context, wordBreak, declaration.wordBreak); this.zIndex = parse(context, zIndex, declaration.zIndex); @@ -6733,12 +6730,12 @@ this.counterIncrement = parse( context, counterIncrement, - declaration.counterIncrement, + declaration.counterIncrement ); this.counterReset = parse( context, counterReset, - declaration.counterReset, + declaration.counterReset ); } return CSSParsedCounterDeclaration; @@ -6757,7 +6754,7 @@ var token = parser.parseComponentValue(); return descriptor.parse( context, - isIdentToken(token) ? token.value : descriptor.initialValue, + isIdentToken(token) ? token.value : descriptor.initialValue ); case 0 /* VALUE */: return descriptor.parse(context, parser.parseComponentValue()); @@ -6818,7 +6815,7 @@ } this.styles = new CSSParsedDeclaration( context, - window.getComputedStyle(element, null), + window.getComputedStyle(element, null) ); if (isHTMLElementNode(element)) { if ( @@ -6911,7 +6908,7 @@ (buffer[i + 3] << 24) | (buffer[i + 2] << 16) | (buffer[i + 1] << 8) | - buffer[i], + buffer[i] ); } return bytes; @@ -7010,7 +7007,7 @@ view32[2], view32[3], index, - data, + data ); }; var Trie = /** @class */ (function () { @@ -7020,7 +7017,7 @@ highStart, highValueIndex, index, - data, + data ) { this.initialValue = initialValue; this.errorValue = errorValue; @@ -7123,7 +7120,7 @@ var extra = str.charCodeAt(i++); if ((extra & 0xfc00) === 0xdc00) { codePoints.push( - ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000, + ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000 ); } else { codePoints.push(value); @@ -7158,7 +7155,7 @@ codePoint -= 0x10000; codeUnits.push( (codePoint >> 10) + 0xd800, - (codePoint % 0x400) + 0xdc00, + (codePoint % 0x400) + 0xdc00 ); } if (index + 1 === length || codeUnits.length > 0x4000) { @@ -7258,13 +7255,13 @@ (graphemeBreak = _graphemeBreakAtIndex( codePoints, classTypes, - ++index, + ++index )) === BREAK_NOT_ALLOWED ) {} if (graphemeBreak !== BREAK_NOT_ALLOWED || index === length) { var value = fromCodePoint.apply( null, - codePoints.slice(lastEnd, index), + codePoints.slice(lastEnd, index) ); lastEnd = index; return { value: value, done: false }; @@ -7395,7 +7392,7 @@ // Firefox 55 does not render inline tags return isGreenPixel(data) ? loadSerializedSVG$1( - createForeignObjectSVG(size, size, 0, 0, node), + createForeignObjectSVG(size, size, 0, 0, node) ) : Promise.reject(false); }) @@ -7515,7 +7512,7 @@ var clientRects = createRange( node, offset, - text.length, + text.length ).getClientRects(); if (clientRects.length > 1) { var subSegments = segmentGraphemes(text); @@ -7529,10 +7526,10 @@ createRange( node, subOffset_1 + offset, - subSegment.length, - ).getClientRects(), - ), - ), + subSegment.length + ).getClientRects() + ) + ) ); subOffset_1 += subSegment.length; }); @@ -7540,14 +7537,14 @@ textBounds.push( new TextBounds( text, - Bounds.fromDOMRectList(context, clientRects), - ), + Bounds.fromDOMRectList(context, clientRects) + ) ); } } else { var replacementNode = node.splitText(text.length); textBounds.push( - new TextBounds(text, getWrapperBounds(context, node)), + new TextBounds(text, getWrapperBounds(context, node)) ); node = replacementNode; } @@ -7771,14 +7768,14 @@ bounds.left + (bounds.width - bounds.height) / 2, bounds.top, bounds.height, - bounds.height, + bounds.height ); } else if (bounds.width < bounds.height) { return new Bounds( bounds.left, bounds.top + (bounds.height - bounds.width) / 2, bounds.width, - bounds.width, + bounds.width ); } return bounds; @@ -7880,7 +7877,7 @@ ) { _this.tree = parseTree( context, - iframe.contentWindow.document.documentElement, + iframe.contentWindow.document.documentElement ); // http://www.w3.org/TR/css3-background/#special-backgrounds var documentBackgroundColor = iframe.contentWindow.document @@ -7888,15 +7885,15 @@ ? parseColor( context, getComputedStyle( - iframe.contentWindow.document.documentElement, - ).backgroundColor, + iframe.contentWindow.document.documentElement + ).backgroundColor ) : COLORS.TRANSPARENT; var bodyBackgroundColor = iframe.contentWindow.document.body ? parseColor( context, getComputedStyle(iframe.contentWindow.document.body) - .backgroundColor, + .backgroundColor ) : COLORS.TRANSPARENT; _this.backgroundColor = isTransparent(documentBackgroundColor) @@ -7921,7 +7918,7 @@ nextNode = childNode.nextSibling; if (isTextNode(childNode) && childNode.data.trim().length > 0) { parent.textNodes.push( - new TextContainer(context, childNode, parent.styles), + new TextContainer(context, childNode, parent.styles) ); } else if (isElementNode(childNode)) { if (isSlotElement(childNode) && childNode.assignedNodes) { @@ -8282,7 +8279,7 @@ max, symbols, fallback, - suffix, + suffix ) { if (value < min || value > max) { return createCounterText(value, fallback, suffix.length > 0); @@ -8301,7 +8298,7 @@ value, codePointRangeLength, isNumeric, - resolver, + resolver ) { var string = ""; do { @@ -8318,7 +8315,7 @@ codePointRangeStart, codePointRangeEnd, isNumeric, - suffix, + suffix ) { var codePointRangeLength = codePointRangeEnd - codePointRangeStart + 1; return ( @@ -8330,9 +8327,9 @@ function (codePoint) { return fromCodePoint$1( Math.floor(codePoint % codePointRangeLength) + - codePointRangeStart, + codePointRangeStart ); - }, + } ) + suffix) ); @@ -8349,7 +8346,7 @@ false, function (codePoint) { return symbols[Math.floor(codePoint % codePointRangeLength)]; - }, + } ) + suffix ); }; @@ -8363,13 +8360,13 @@ multipliers, negativeSign, suffix, - flags, + flags ) { if (value < -9999 || value > 9999) { return createCounterText( value, 4 /* CJK_DECIMAL */, - suffix.length > 0, + suffix.length > 0 ); } var tmp = Math.abs(value); @@ -8432,14 +8429,14 @@ 48, 57, true, - defaultSuffix, + defaultSuffix ); return string.length < 4 ? "0" + string : string; case 4 /* CJK_DECIMAL */: return createCounterStyleFromSymbols( value, "〇一二三四五六七八九", - cjkSuffix, + cjkSuffix ); case 6 /* LOWER_ROMAN */: return createAdditiveCounter( @@ -8448,7 +8445,7 @@ 3999, ROMAN_UPPER, 3 /* DECIMAL */, - defaultSuffix, + defaultSuffix ).toLowerCase(); case 7 /* UPPER_ROMAN */: return createAdditiveCounter( @@ -8457,7 +8454,7 @@ 3999, ROMAN_UPPER, 3 /* DECIMAL */, - defaultSuffix, + defaultSuffix ); case 8 /* LOWER_GREEK */: return createCounterStyleFromRange( @@ -8465,7 +8462,7 @@ 945, 969, false, - defaultSuffix, + defaultSuffix ); case 9 /* LOWER_ALPHA */: return createCounterStyleFromRange( @@ -8473,7 +8470,7 @@ 97, 122, false, - defaultSuffix, + defaultSuffix ); case 10 /* UPPER_ALPHA */: return createCounterStyleFromRange( @@ -8481,7 +8478,7 @@ 65, 90, false, - defaultSuffix, + defaultSuffix ); case 11 /* ARABIC_INDIC */: return createCounterStyleFromRange( @@ -8489,7 +8486,7 @@ 1632, 1641, true, - defaultSuffix, + defaultSuffix ); case 12 /* ARMENIAN */: case 49 /* UPPER_ARMENIAN */: @@ -8499,7 +8496,7 @@ 9999, ARMENIAN, 3 /* DECIMAL */, - defaultSuffix, + defaultSuffix ); case 35 /* LOWER_ARMENIAN */: return createAdditiveCounter( @@ -8508,7 +8505,7 @@ 9999, ARMENIAN, 3 /* DECIMAL */, - defaultSuffix, + defaultSuffix ).toLowerCase(); case 13 /* BENGALI */: return createCounterStyleFromRange( @@ -8516,7 +8513,7 @@ 2534, 2543, true, - defaultSuffix, + defaultSuffix ); case 14 /* CAMBODIAN */: case 30 /* KHMER */: @@ -8525,19 +8522,19 @@ 6112, 6121, true, - defaultSuffix, + defaultSuffix ); case 15 /* CJK_EARTHLY_BRANCH */: return createCounterStyleFromSymbols( value, "子丑寅卯辰巳午未申酉戌亥", - cjkSuffix, + cjkSuffix ); case 16 /* CJK_HEAVENLY_STEM */: return createCounterStyleFromSymbols( value, "甲乙丙丁戊己庚辛壬癸", - cjkSuffix, + cjkSuffix ); case 17 /* CJK_IDEOGRAPHIC */: case 48 /* TRAD_CHINESE_INFORMAL */: @@ -8549,7 +8546,7 @@ cjkSuffix, CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | - CJK_HUNDRED_COEFFICIENTS, + CJK_HUNDRED_COEFFICIENTS ); case 47 /* TRAD_CHINESE_FORMAL */: return createCJKCounter( @@ -8561,7 +8558,7 @@ CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | - CJK_HUNDRED_COEFFICIENTS, + CJK_HUNDRED_COEFFICIENTS ); case 42 /* SIMP_CHINESE_INFORMAL */: return createCJKCounter( @@ -8572,7 +8569,7 @@ cjkSuffix, CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | - CJK_HUNDRED_COEFFICIENTS, + CJK_HUNDRED_COEFFICIENTS ); case 41 /* SIMP_CHINESE_FORMAL */: return createCJKCounter( @@ -8584,7 +8581,7 @@ CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | - CJK_HUNDRED_COEFFICIENTS, + CJK_HUNDRED_COEFFICIENTS ); case 26 /* JAPANESE_INFORMAL */: return createCJKCounter( @@ -8593,7 +8590,7 @@ "十百千万", JAPANESE_NEGATIVE, cjkSuffix, - 0, + 0 ); case 25 /* JAPANESE_FORMAL */: return createCJKCounter( @@ -8602,7 +8599,7 @@ "拾百千万", JAPANESE_NEGATIVE, cjkSuffix, - CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS, + CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS ); case 31 /* KOREAN_HANGUL_FORMAL */: return createCJKCounter( @@ -8611,7 +8608,7 @@ "십백천만", KOREAN_NEGATIVE, koreanSuffix, - CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS, + CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS ); case 33 /* KOREAN_HANJA_INFORMAL */: return createCJKCounter( @@ -8620,7 +8617,7 @@ "十百千萬", KOREAN_NEGATIVE, koreanSuffix, - 0, + 0 ); case 32 /* KOREAN_HANJA_FORMAL */: return createCJKCounter( @@ -8629,7 +8626,7 @@ "拾百千", KOREAN_NEGATIVE, koreanSuffix, - CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS, + CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS ); case 18 /* DEVANAGARI */: return createCounterStyleFromRange( @@ -8637,7 +8634,7 @@ 0x966, 0x96f, true, - defaultSuffix, + defaultSuffix ); case 20 /* GEORGIAN */: return createAdditiveCounter( @@ -8646,7 +8643,7 @@ 19999, GEORGIAN, 3 /* DECIMAL */, - defaultSuffix, + defaultSuffix ); case 21 /* GUJARATI */: return createCounterStyleFromRange( @@ -8654,7 +8651,7 @@ 0xae6, 0xaef, true, - defaultSuffix, + defaultSuffix ); case 22 /* GURMUKHI */: return createCounterStyleFromRange( @@ -8662,7 +8659,7 @@ 0xa66, 0xa6f, true, - defaultSuffix, + defaultSuffix ); case 22 /* HEBREW */: return createAdditiveCounter( @@ -8671,17 +8668,17 @@ 10999, HEBREW, 3 /* DECIMAL */, - defaultSuffix, + defaultSuffix ); case 23 /* HIRAGANA */: return createCounterStyleFromSymbols( value, - "あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん", + "あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん" ); case 24 /* HIRAGANA_IROHA */: return createCounterStyleFromSymbols( value, - "いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす", + "いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす" ); case 27 /* KANNADA */: return createCounterStyleFromRange( @@ -8689,19 +8686,19 @@ 0xce6, 0xcef, true, - defaultSuffix, + defaultSuffix ); case 28 /* KATAKANA */: return createCounterStyleFromSymbols( value, "アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン", - cjkSuffix, + cjkSuffix ); case 29 /* KATAKANA_IROHA */: return createCounterStyleFromSymbols( value, "イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス", - cjkSuffix, + cjkSuffix ); case 34 /* LAO */: return createCounterStyleFromRange( @@ -8709,7 +8706,7 @@ 0xed0, 0xed9, true, - defaultSuffix, + defaultSuffix ); case 37 /* MONGOLIAN */: return createCounterStyleFromRange( @@ -8717,7 +8714,7 @@ 0x1810, 0x1819, true, - defaultSuffix, + defaultSuffix ); case 38 /* MYANMAR */: return createCounterStyleFromRange( @@ -8725,7 +8722,7 @@ 0x1040, 0x1049, true, - defaultSuffix, + defaultSuffix ); case 39 /* ORIYA */: return createCounterStyleFromRange( @@ -8733,7 +8730,7 @@ 0xb66, 0xb6f, true, - defaultSuffix, + defaultSuffix ); case 40 /* PERSIAN */: return createCounterStyleFromRange( @@ -8741,7 +8738,7 @@ 0x6f0, 0x6f9, true, - defaultSuffix, + defaultSuffix ); case 43 /* TAMIL */: return createCounterStyleFromRange( @@ -8749,7 +8746,7 @@ 0xbe6, 0xbef, true, - defaultSuffix, + defaultSuffix ); case 44 /* TELUGU */: return createCounterStyleFromRange( @@ -8757,7 +8754,7 @@ 0xc66, 0xc6f, true, - defaultSuffix, + defaultSuffix ); case 45 /* THAI */: return createCounterStyleFromRange( @@ -8765,7 +8762,7 @@ 0xe50, 0xe59, true, - defaultSuffix, + defaultSuffix ); case 46 /* TIBETAN */: return createCounterStyleFromRange( @@ -8773,7 +8770,7 @@ 0xf20, 0xf29, true, - defaultSuffix, + defaultSuffix ); case 3 /* DECIMAL */: default: @@ -8782,7 +8779,7 @@ 48, 57, true, - defaultSuffix, + defaultSuffix ); } }; @@ -8801,12 +8798,12 @@ } this.documentElement = this.cloneNode( element.ownerDocument.documentElement, - false, + false ); } DocumentCloner.prototype.toIFrame = function ( ownerDocument, - windowSize, + windowSize ) { var _this = this; var iframe = createIFrameContainer(ownerDocument, windowSize); @@ -8835,14 +8832,14 @@ cloneWindow.scrollX !== windowSize.left) ) { this.context.logger.warn( - "Unable to restore scroll position for cloned document", + "Unable to restore scroll position for cloned document" ); this.context.windowBounds = this.context.windowBounds.add( cloneWindow.scrollX - windowSize.left, cloneWindow.scrollY - windowSize.top, 0, - 0, + 0 ); } } @@ -8854,7 +8851,7 @@ Promise.reject( "Error finding the " + this.referenceElement.nodeName + - " in the cloned document", + " in the cloned document" ), ]; } @@ -8891,17 +8888,17 @@ }); documentClone.open(); documentClone.write( - serializeDoctype(document.doctype) + "", + serializeDoctype(document.doctype) + "" ); // Chrome scrolls the parent document for some reason after the write to the cloned window??? restoreOwnerScroll( this.referenceElement.ownerDocument, scrollX, - scrollY, + scrollY ); documentClone.replaceChild( documentClone.adoptNode(this.documentElement), - documentClone.documentElement, + documentClone.documentElement ); documentClone.close(); return iframeLoad; @@ -8949,7 +8946,7 @@ if (sheet && sheet.cssRules) { var css = [].slice.call(sheet.cssRules, 0).reduce(function ( css, - rule, + rule ) { if (rule && typeof rule.cssText === "string") { return css + rule.cssText; @@ -8979,7 +8976,7 @@ } catch (e) { this.context.logger.info( "Unable to inline canvas contents, canvas is tainted", - canvas, + canvas ); } } @@ -8994,7 +8991,7 @@ clonedCtx.putImageData( ctx.getImageData(0, 0, canvas.width, canvas.height), 0, - 0, + 0 ); } else { var gl = @@ -9010,7 +9007,7 @@ ) { this.context.logger.warn( "Unable to clone WebGL context as it has preserveDrawingBuffer=false", - canvas, + canvas ); } } @@ -9021,7 +9018,7 @@ } catch (e) { this.context.logger.info( "Unable to clone canvas as it is tainted", - canvas, + canvas ); } return clonedCanvas; @@ -9042,7 +9039,7 @@ } catch (e) { this.context.logger.info( "Unable to clone video as it is tainted", - video, + video ); } var blankCanvas = video.ownerDocument.createElement("canvas"); @@ -9053,7 +9050,7 @@ DocumentCloner.prototype.appendChildNode = function ( clone, child, - copyStyles, + copyStyles ) { if ( !isElementNode(child) || @@ -9074,7 +9071,7 @@ DocumentCloner.prototype.cloneChildNodes = function ( node, clone, - copyStyles, + copyStyles ) { var _this = this; for ( @@ -9125,13 +9122,13 @@ createPseudoHideStyles(clone); } var counters = this.counters.parse( - new CSSParsedCounterDeclaration(this.context, style), + new CSSParsedCounterDeclaration(this.context, style) ); var before = this.resolvePseudoContent( node, clone, styleBefore, - PseudoElementType.BEFORE, + PseudoElementType.BEFORE ); if (isCustomElement(node)) { copyStyles = true; @@ -9146,7 +9143,7 @@ node, clone, styleAfter, - PseudoElementType.AFTER, + PseudoElementType.AFTER ); if (after) { clone.appendChild(after); @@ -9181,7 +9178,7 @@ node, clone, style, - pseudoElt, + pseudoElt ) { var _this = this; if (!style) { @@ -9199,17 +9196,17 @@ return; } this.counters.parse( - new CSSParsedCounterDeclaration(this.context, style), + new CSSParsedCounterDeclaration(this.context, style) ); var declaration = new CSSParsedPseudoDeclaration(this.context, style); var anonymousReplacedElement = document.createElement( - "html2canvaspseudoelement", + "html2canvaspseudoelement" ); copyCSSStyles(style, anonymousReplacedElement); declaration.content.forEach(function (token) { if (token.type === 0 /* STRING_TOKEN */) { anonymousReplacedElement.appendChild( - document.createTextNode(token.value), + document.createTextNode(token.value) ); } else if (token.type === 22 /* URL_TOKEN */) { var img = document.createElement("img"); @@ -9222,8 +9219,8 @@ if (attr.length) { anonymousReplacedElement.appendChild( document.createTextNode( - node.getAttribute(attr[0].value) || "", - ), + node.getAttribute(attr[0].value) || "" + ) ); } } else if (token.name === "counter") { @@ -9232,7 +9229,7 @@ counterStyle = _a[1]; if (counter && isIdentToken(counter)) { var counterState = _this.counters.getCounterValue( - counter.value, + counter.value ); var counterType = counterStyle && isIdentToken(counterStyle) @@ -9240,8 +9237,8 @@ : 3; /* DECIMAL */ anonymousReplacedElement.appendChild( document.createTextNode( - createCounterText(counterState, counterType, false), - ), + createCounterText(counterState, counterType, false) + ) ); } } else if (token.name === "counters") { @@ -9251,7 +9248,7 @@ counterStyle = _b[2]; if (counter && isIdentToken(counter)) { var counterStates = _this.counters.getCounterValues( - counter.value, + counter.value ); var counterType_1 = counterStyle && isIdentToken(counterStyle) @@ -9267,7 +9264,7 @@ }) .join(separator); anonymousReplacedElement.appendChild( - document.createTextNode(text), + document.createTextNode(text) ); } } else; @@ -9276,21 +9273,21 @@ case "open-quote": anonymousReplacedElement.appendChild( document.createTextNode( - getQuote(declaration.quotes, _this.quoteDepth++, true), - ), + getQuote(declaration.quotes, _this.quoteDepth++, true) + ) ); break; case "close-quote": anonymousReplacedElement.appendChild( document.createTextNode( - getQuote(declaration.quotes, --_this.quoteDepth, false), - ), + getQuote(declaration.quotes, --_this.quoteDepth, false) + ) ); break; default: // safari doesn't parse string tokens correctly because of lack of quotes anonymousReplacedElement.appendChild( - document.createTextNode(token.value), + document.createTextNode(token.value) ); } } @@ -9389,7 +9386,7 @@ if (ignoredStyleProperties.indexOf(property) === -1) { target.style.setProperty( property, - style.getPropertyValue(property), + style.getPropertyValue(property) ); } } @@ -9450,7 +9447,7 @@ "\n ." + PSEUDO_HIDE_ELEMENT_CLASS_AFTER + PSEUDO_AFTER + - PSEUDO_HIDE_ELEMENT_STYLE, + PSEUDO_HIDE_ELEMENT_STYLE ); }; var createStyles = function (body, styles) { @@ -9545,7 +9542,7 @@ _a.label = 2; case 2: this.context.logger.debug( - "Added image " + key.substring(0, 256), + "Added image " + key.substring(0, 256) ); return [ 4 /*yield*/, @@ -9571,7 +9568,7 @@ return reject( "Timed out (" + _this._options.imageTimeout + - "ms) loading image", + "ms) loading image" ); }, _this._options.imageTimeout); } @@ -9610,14 +9607,14 @@ function () { return resolve(reader_1.result); }, - false, + false ); reader_1.addEventListener( "error", function (e) { return reject(e); }, - false, + false ); reader_1.readAsDataURL(xhr.response); } @@ -9626,7 +9623,7 @@ "Failed to proxy resource " + key + " with status code " + - xhr.status, + xhr.status ); } }; @@ -9640,7 +9637,7 @@ "url=" + encodeURIComponent(src) + "&responseType=" + - responseType, + responseType ); if (responseType !== "text" && xhr instanceof XMLHttpRequest) { xhr.responseType = responseType; @@ -9650,7 +9647,7 @@ xhr.timeout = timeout_1; xhr.ontimeout = function () { return reject( - "Timed out (" + timeout_1 + "ms) proxying " + key, + "Timed out (" + timeout_1 + "ms) proxying " + key ); }; } @@ -9717,7 +9714,7 @@ this.start.add(deltaX, deltaY), this.startControl.add(deltaX, deltaY), this.endControl.add(deltaX, deltaY), - this.end.add(deltaX, deltaY), + this.end.add(deltaX, deltaY) ); }; BezierCurve.prototype.reverse = function () { @@ -9725,7 +9722,7 @@ this.end, this.endControl, this.startControl, - this.start, + this.start ); }; return BezierCurve; @@ -9741,28 +9738,28 @@ var _a = getAbsoluteValueForTuple( styles.borderTopLeftRadius, bounds.width, - bounds.height, + bounds.height ), tlh = _a[0], tlv = _a[1]; var _b = getAbsoluteValueForTuple( styles.borderTopRightRadius, bounds.width, - bounds.height, + bounds.height ), trh = _b[0], trv = _b[1]; var _c = getAbsoluteValueForTuple( styles.borderBottomRightRadius, bounds.width, - bounds.height, + bounds.height ), brh = _c[0], brv = _c[1]; var _d = getAbsoluteValueForTuple( styles.borderBottomLeftRadius, bounds.width, - bounds.height, + bounds.height ), blh = _d[0], blv = _d[1]; @@ -9792,19 +9789,19 @@ var borderLeftWidth = styles.borderLeftWidth; var paddingTop = getAbsoluteValue( styles.paddingTop, - element.bounds.width, + element.bounds.width ); var paddingRight = getAbsoluteValue( styles.paddingRight, - element.bounds.width, + element.bounds.width ); var paddingBottom = getAbsoluteValue( styles.paddingBottom, - element.bounds.width, + element.bounds.width ); var paddingLeft = getAbsoluteValue( styles.paddingLeft, - element.bounds.width, + element.bounds.width ); this.topLeftBorderDoubleOuterBox = tlh > 0 || tlv > 0 @@ -9813,11 +9810,11 @@ bounds.top + borderTopWidth / 3, tlh - borderLeftWidth / 3, tlv - borderTopWidth / 3, - CORNER.TOP_LEFT, + CORNER.TOP_LEFT ) : new Vector( bounds.left + borderLeftWidth / 3, - bounds.top + borderTopWidth / 3, + bounds.top + borderTopWidth / 3 ); this.topRightBorderDoubleOuterBox = tlh > 0 || tlv > 0 @@ -9826,11 +9823,11 @@ bounds.top + borderTopWidth / 3, trh - borderRightWidth / 3, trv - borderTopWidth / 3, - CORNER.TOP_RIGHT, + CORNER.TOP_RIGHT ) : new Vector( bounds.left + bounds.width - borderRightWidth / 3, - bounds.top + borderTopWidth / 3, + bounds.top + borderTopWidth / 3 ); this.bottomRightBorderDoubleOuterBox = brh > 0 || brv > 0 @@ -9839,11 +9836,11 @@ bounds.top + rightHeight, brh - borderRightWidth / 3, brv - borderBottomWidth / 3, - CORNER.BOTTOM_RIGHT, + CORNER.BOTTOM_RIGHT ) : new Vector( bounds.left + bounds.width - borderRightWidth / 3, - bounds.top + bounds.height - borderBottomWidth / 3, + bounds.top + bounds.height - borderBottomWidth / 3 ); this.bottomLeftBorderDoubleOuterBox = blh > 0 || blv > 0 @@ -9852,11 +9849,11 @@ bounds.top + leftHeight, blh - borderLeftWidth / 3, blv - borderBottomWidth / 3, - CORNER.BOTTOM_LEFT, + CORNER.BOTTOM_LEFT ) : new Vector( bounds.left + borderLeftWidth / 3, - bounds.top + bounds.height - borderBottomWidth / 3, + bounds.top + bounds.height - borderBottomWidth / 3 ); this.topLeftBorderDoubleInnerBox = tlh > 0 || tlv > 0 @@ -9865,11 +9862,11 @@ bounds.top + (borderTopWidth * 2) / 3, tlh - (borderLeftWidth * 2) / 3, tlv - (borderTopWidth * 2) / 3, - CORNER.TOP_LEFT, + CORNER.TOP_LEFT ) : new Vector( bounds.left + (borderLeftWidth * 2) / 3, - bounds.top + (borderTopWidth * 2) / 3, + bounds.top + (borderTopWidth * 2) / 3 ); this.topRightBorderDoubleInnerBox = tlh > 0 || tlv > 0 @@ -9878,11 +9875,11 @@ bounds.top + (borderTopWidth * 2) / 3, trh - (borderRightWidth * 2) / 3, trv - (borderTopWidth * 2) / 3, - CORNER.TOP_RIGHT, + CORNER.TOP_RIGHT ) : new Vector( bounds.left + bounds.width - (borderRightWidth * 2) / 3, - bounds.top + (borderTopWidth * 2) / 3, + bounds.top + (borderTopWidth * 2) / 3 ); this.bottomRightBorderDoubleInnerBox = brh > 0 || brv > 0 @@ -9891,11 +9888,11 @@ bounds.top + rightHeight, brh - (borderRightWidth * 2) / 3, brv - (borderBottomWidth * 2) / 3, - CORNER.BOTTOM_RIGHT, + CORNER.BOTTOM_RIGHT ) : new Vector( bounds.left + bounds.width - (borderRightWidth * 2) / 3, - bounds.top + bounds.height - (borderBottomWidth * 2) / 3, + bounds.top + bounds.height - (borderBottomWidth * 2) / 3 ); this.bottomLeftBorderDoubleInnerBox = blh > 0 || blv > 0 @@ -9904,11 +9901,11 @@ bounds.top + leftHeight, blh - (borderLeftWidth * 2) / 3, blv - (borderBottomWidth * 2) / 3, - CORNER.BOTTOM_LEFT, + CORNER.BOTTOM_LEFT ) : new Vector( bounds.left + (borderLeftWidth * 2) / 3, - bounds.top + bounds.height - (borderBottomWidth * 2) / 3, + bounds.top + bounds.height - (borderBottomWidth * 2) / 3 ); this.topLeftBorderStroke = tlh > 0 || tlv > 0 @@ -9917,11 +9914,11 @@ bounds.top + borderTopWidth / 2, tlh - borderLeftWidth / 2, tlv - borderTopWidth / 2, - CORNER.TOP_LEFT, + CORNER.TOP_LEFT ) : new Vector( bounds.left + borderLeftWidth / 2, - bounds.top + borderTopWidth / 2, + bounds.top + borderTopWidth / 2 ); this.topRightBorderStroke = tlh > 0 || tlv > 0 @@ -9930,11 +9927,11 @@ bounds.top + borderTopWidth / 2, trh - borderRightWidth / 2, trv - borderTopWidth / 2, - CORNER.TOP_RIGHT, + CORNER.TOP_RIGHT ) : new Vector( bounds.left + bounds.width - borderRightWidth / 2, - bounds.top + borderTopWidth / 2, + bounds.top + borderTopWidth / 2 ); this.bottomRightBorderStroke = brh > 0 || brv > 0 @@ -9943,11 +9940,11 @@ bounds.top + rightHeight, brh - borderRightWidth / 2, brv - borderBottomWidth / 2, - CORNER.BOTTOM_RIGHT, + CORNER.BOTTOM_RIGHT ) : new Vector( bounds.left + bounds.width - borderRightWidth / 2, - bounds.top + bounds.height - borderBottomWidth / 2, + bounds.top + bounds.height - borderBottomWidth / 2 ); this.bottomLeftBorderStroke = blh > 0 || blv > 0 @@ -9956,11 +9953,11 @@ bounds.top + leftHeight, blh - borderLeftWidth / 2, blv - borderBottomWidth / 2, - CORNER.BOTTOM_LEFT, + CORNER.BOTTOM_LEFT ) : new Vector( bounds.left + borderLeftWidth / 2, - bounds.top + bounds.height - borderBottomWidth / 2, + bounds.top + bounds.height - borderBottomWidth / 2 ); this.topLeftBorderBox = tlh > 0 || tlv > 0 @@ -9969,7 +9966,7 @@ bounds.top, tlh, tlv, - CORNER.TOP_LEFT, + CORNER.TOP_LEFT ) : new Vector(bounds.left, bounds.top); this.topRightBorderBox = @@ -9979,7 +9976,7 @@ bounds.top, trh, trv, - CORNER.TOP_RIGHT, + CORNER.TOP_RIGHT ) : new Vector(bounds.left + bounds.width, bounds.top); this.bottomRightBorderBox = @@ -9989,11 +9986,11 @@ bounds.top + rightHeight, brh, brv, - CORNER.BOTTOM_RIGHT, + CORNER.BOTTOM_RIGHT ) : new Vector( bounds.left + bounds.width, - bounds.top + bounds.height, + bounds.top + bounds.height ); this.bottomLeftBorderBox = blh > 0 || blv > 0 @@ -10002,7 +9999,7 @@ bounds.top + leftHeight, blh, blv, - CORNER.BOTTOM_LEFT, + CORNER.BOTTOM_LEFT ) : new Vector(bounds.left, bounds.top + bounds.height); this.topLeftPaddingBox = @@ -10012,11 +10009,11 @@ bounds.top + borderTopWidth, Math.max(0, tlh - borderLeftWidth), Math.max(0, tlv - borderTopWidth), - CORNER.TOP_LEFT, + CORNER.TOP_LEFT ) : new Vector( bounds.left + borderLeftWidth, - bounds.top + borderTopWidth, + bounds.top + borderTopWidth ); this.topRightPaddingBox = trh > 0 || trv > 0 @@ -10028,11 +10025,11 @@ ? 0 : Math.max(0, trh - borderRightWidth), Math.max(0, trv - borderTopWidth), - CORNER.TOP_RIGHT, + CORNER.TOP_RIGHT ) : new Vector( bounds.left + bounds.width - borderRightWidth, - bounds.top + borderTopWidth, + bounds.top + borderTopWidth ); this.bottomRightPaddingBox = brh > 0 || brv > 0 @@ -10043,11 +10040,11 @@ Math.min(rightHeight, bounds.height - borderBottomWidth), Math.max(0, brh - borderRightWidth), Math.max(0, brv - borderBottomWidth), - CORNER.BOTTOM_RIGHT, + CORNER.BOTTOM_RIGHT ) : new Vector( bounds.left + bounds.width - borderRightWidth, - bounds.top + bounds.height - borderBottomWidth, + bounds.top + bounds.height - borderBottomWidth ); this.bottomLeftPaddingBox = blh > 0 || blv > 0 @@ -10057,11 +10054,11 @@ Math.min(leftHeight, bounds.height - borderBottomWidth), Math.max(0, blh - borderLeftWidth), Math.max(0, blv - borderBottomWidth), - CORNER.BOTTOM_LEFT, + CORNER.BOTTOM_LEFT ) : new Vector( bounds.left + borderLeftWidth, - bounds.top + bounds.height - borderBottomWidth, + bounds.top + bounds.height - borderBottomWidth ); this.topLeftContentBox = tlh > 0 || tlv > 0 @@ -10070,11 +10067,11 @@ bounds.top + borderTopWidth + paddingTop, Math.max(0, tlh - (borderLeftWidth + paddingLeft)), Math.max(0, tlv - (borderTopWidth + paddingTop)), - CORNER.TOP_LEFT, + CORNER.TOP_LEFT ) : new Vector( bounds.left + borderLeftWidth + paddingLeft, - bounds.top + borderTopWidth + paddingTop, + bounds.top + borderTopWidth + paddingTop ); this.topRightContentBox = trh > 0 || trv > 0 @@ -10082,20 +10079,20 @@ bounds.left + Math.min( topWidth, - bounds.width + borderLeftWidth + paddingLeft, + bounds.width + borderLeftWidth + paddingLeft ), bounds.top + borderTopWidth + paddingTop, topWidth > bounds.width + borderLeftWidth + paddingLeft ? 0 : trh - borderLeftWidth + paddingLeft, trv - (borderTopWidth + paddingTop), - CORNER.TOP_RIGHT, + CORNER.TOP_RIGHT ) : new Vector( bounds.left + bounds.width - (borderRightWidth + paddingRight), - bounds.top + borderTopWidth + paddingTop, + bounds.top + borderTopWidth + paddingTop ); this.bottomRightContentBox = brh > 0 || brv > 0 @@ -10103,16 +10100,16 @@ bounds.left + Math.min( bottomWidth, - bounds.width - (borderLeftWidth + paddingLeft), + bounds.width - (borderLeftWidth + paddingLeft) ), bounds.top + Math.min( rightHeight, - bounds.height + borderTopWidth + paddingTop, + bounds.height + borderTopWidth + paddingTop ), Math.max(0, brh - (borderRightWidth + paddingRight)), brv - (borderBottomWidth + paddingBottom), - CORNER.BOTTOM_RIGHT, + CORNER.BOTTOM_RIGHT ) : new Vector( bounds.left + @@ -10120,7 +10117,7 @@ (borderRightWidth + paddingRight), bounds.top + bounds.height - - (borderBottomWidth + paddingBottom), + (borderBottomWidth + paddingBottom) ); this.bottomLeftContentBox = blh > 0 || blv > 0 @@ -10129,13 +10126,13 @@ bounds.top + leftHeight, Math.max(0, blh - (borderLeftWidth + paddingLeft)), blv - (borderBottomWidth + paddingBottom), - CORNER.BOTTOM_LEFT, + CORNER.BOTTOM_LEFT ) : new Vector( bounds.left + borderLeftWidth + paddingLeft, bounds.top + bounds.height - - (borderBottomWidth + paddingBottom), + (borderBottomWidth + paddingBottom) ); } return BoundCurves; @@ -10159,21 +10156,21 @@ new Vector(x, ym), new Vector(x, ym - oy), new Vector(xm - ox, y), - new Vector(xm, y), + new Vector(xm, y) ); case CORNER.TOP_RIGHT: return new BezierCurve( new Vector(x, y), new Vector(x + ox, y), new Vector(xm, ym - oy), - new Vector(xm, ym), + new Vector(xm, ym) ); case CORNER.BOTTOM_RIGHT: return new BezierCurve( new Vector(xm, y), new Vector(xm, y + oy), new Vector(x + ox, ym), - new Vector(x, ym), + new Vector(x, ym) ); case CORNER.BOTTOM_LEFT: default: @@ -10181,7 +10178,7 @@ new Vector(xm, ym), new Vector(xm - ox, ym), new Vector(x, y + oy), - new Vector(x, y), + new Vector(x, y) ); } }; @@ -10309,12 +10306,12 @@ this.effects.push( new ClipEffect( borderBox, - 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */, - ), + 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */ + ) ); } else { this.effects.push( - new ClipEffect(borderBox, 2 /* BACKGROUND_BORDERS */), + new ClipEffect(borderBox, 2 /* BACKGROUND_BORDERS */) ); this.effects.push(new ClipEffect(paddingBox, 4 /* CONTENT */)); } @@ -10323,7 +10320,7 @@ ElementPaint.prototype.getEffects = function (target) { var inFlow = [2 /* ABSOLUTE */, 3 /* FIXED */].indexOf( - this.container.styles.position, + this.container.styles.position ) === -1; var parent = this.parent; var effects = this.effects.slice(0); @@ -10339,7 +10336,7 @@ effects.unshift.apply(effects, croplessEffects); inFlow = [2 /* ABSOLUTE */, 3 /* FIXED */].indexOf( - parent.container.styles.position, + parent.container.styles.position ) === -1; if (parent.container.styles.overflowX !== 0 /* VISIBLE */) { var borderBox = calculateBorderBoxPath(parent.curves); @@ -10348,8 +10345,8 @@ effects.unshift( new ClipEffect( paddingBox, - 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */, - ), + 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */ + ) ); } } @@ -10368,16 +10365,16 @@ parent, stackingContext, realStackingContext, - listItems, + listItems ) { parent.container.elements.forEach(function (child) { var treatAsRealStackingContext = contains( child.flags, - 4 /* CREATES_REAL_STACKING_CONTEXT */, + 4 /* CREATES_REAL_STACKING_CONTEXT */ ); var createsStackingContext = contains( child.flags, - 2 /* CREATES_STACKING_CONTEXT */, + 2 /* CREATES_STACKING_CONTEXT */ ); var paintContainer = new ElementPaint(child, parent); if (contains(child.styles.display, 2048 /* LIST_ITEM */)) { @@ -10438,7 +10435,7 @@ paintContainer, stack, treatAsRealStackingContext ? stack : realStackingContext, - listOwnerItems, + listOwnerItems ); } else { if (child.styles.isInlineLevel()) { @@ -10450,7 +10447,7 @@ paintContainer, stackingContext, realStackingContext, - listOwnerItems, + listOwnerItems ); } if (contains(child.flags, 8 /* IS_LIST_OWNER */)) { @@ -10474,7 +10471,7 @@ item.listValue = createCounterText( numbering, item.container.styles.listStyleType, - true, + true ); numbering += reversed ? -1 : 1; } @@ -10495,21 +10492,21 @@ curves.topLeftBorderBox, curves.topLeftPaddingBox, curves.topRightBorderBox, - curves.topRightPaddingBox, + curves.topRightPaddingBox ); case 1: return createPathFromCurves( curves.topRightBorderBox, curves.topRightPaddingBox, curves.bottomRightBorderBox, - curves.bottomRightPaddingBox, + curves.bottomRightPaddingBox ); case 2: return createPathFromCurves( curves.bottomRightBorderBox, curves.bottomRightPaddingBox, curves.bottomLeftBorderBox, - curves.bottomLeftPaddingBox, + curves.bottomLeftPaddingBox ); case 3: default: @@ -10517,7 +10514,7 @@ curves.bottomLeftBorderBox, curves.bottomLeftPaddingBox, curves.topLeftBorderBox, - curves.topLeftPaddingBox, + curves.topLeftPaddingBox ); } }; @@ -10528,21 +10525,21 @@ curves.topLeftBorderBox, curves.topLeftBorderDoubleOuterBox, curves.topRightBorderBox, - curves.topRightBorderDoubleOuterBox, + curves.topRightBorderDoubleOuterBox ); case 1: return createPathFromCurves( curves.topRightBorderBox, curves.topRightBorderDoubleOuterBox, curves.bottomRightBorderBox, - curves.bottomRightBorderDoubleOuterBox, + curves.bottomRightBorderDoubleOuterBox ); case 2: return createPathFromCurves( curves.bottomRightBorderBox, curves.bottomRightBorderDoubleOuterBox, curves.bottomLeftBorderBox, - curves.bottomLeftBorderDoubleOuterBox, + curves.bottomLeftBorderDoubleOuterBox ); case 3: default: @@ -10550,7 +10547,7 @@ curves.bottomLeftBorderBox, curves.bottomLeftBorderDoubleOuterBox, curves.topLeftBorderBox, - curves.topLeftBorderDoubleOuterBox, + curves.topLeftBorderDoubleOuterBox ); } }; @@ -10561,21 +10558,21 @@ curves.topLeftBorderDoubleInnerBox, curves.topLeftPaddingBox, curves.topRightBorderDoubleInnerBox, - curves.topRightPaddingBox, + curves.topRightPaddingBox ); case 1: return createPathFromCurves( curves.topRightBorderDoubleInnerBox, curves.topRightPaddingBox, curves.bottomRightBorderDoubleInnerBox, - curves.bottomRightPaddingBox, + curves.bottomRightPaddingBox ); case 2: return createPathFromCurves( curves.bottomRightBorderDoubleInnerBox, curves.bottomRightPaddingBox, curves.bottomLeftBorderDoubleInnerBox, - curves.bottomLeftPaddingBox, + curves.bottomLeftPaddingBox ); case 3: default: @@ -10583,7 +10580,7 @@ curves.bottomLeftBorderDoubleInnerBox, curves.bottomLeftPaddingBox, curves.topLeftBorderDoubleInnerBox, - curves.topLeftPaddingBox, + curves.topLeftPaddingBox ); } }; @@ -10592,23 +10589,23 @@ case 0: return createStrokePathFromCurves( curves.topLeftBorderStroke, - curves.topRightBorderStroke, + curves.topRightBorderStroke ); case 1: return createStrokePathFromCurves( curves.topRightBorderStroke, - curves.bottomRightBorderStroke, + curves.bottomRightBorderStroke ); case 2: return createStrokePathFromCurves( curves.bottomRightBorderStroke, - curves.bottomLeftBorderStroke, + curves.bottomLeftBorderStroke ); case 3: default: return createStrokePathFromCurves( curves.bottomLeftBorderStroke, - curves.topLeftBorderStroke, + curves.topLeftBorderStroke ); } }; @@ -10658,7 +10655,7 @@ styles.borderLeftWidth, styles.borderTopWidth, -(styles.borderRightWidth + styles.borderLeftWidth), - -(styles.borderTopWidth + styles.borderBottomWidth), + -(styles.borderTopWidth + styles.borderBottomWidth) ); }; var contentBox = function (element) { @@ -10669,7 +10666,7 @@ var paddingTop = getAbsoluteValue(styles.paddingTop, bounds.width); var paddingBottom = getAbsoluteValue( styles.paddingBottom, - bounds.width, + bounds.width ); return bounds.add( paddingLeft + styles.borderLeftWidth, @@ -10685,13 +10682,13 @@ styles.borderBottomWidth + paddingTop + paddingBottom - ), + ) ); }; var calculateBackgroundPositioningArea = function ( backgroundOrigin, - element, + element ) { if (backgroundOrigin === 0 /* BORDER_BOX */) { return element.bounds; @@ -10713,37 +10710,37 @@ var calculateBackgroundRendering = function ( container, index, - intrinsicSize, + intrinsicSize ) { var backgroundPositioningArea = calculateBackgroundPositioningArea( getBackgroundValueForIndex(container.styles.backgroundOrigin, index), - container, + container ); var backgroundPaintingArea = calculateBackgroundPaintingArea( getBackgroundValueForIndex(container.styles.backgroundClip, index), - container, + container ); var backgroundImageSize = calculateBackgroundSize( getBackgroundValueForIndex(container.styles.backgroundSize, index), intrinsicSize, - backgroundPositioningArea, + backgroundPositioningArea ); var sizeWidth = backgroundImageSize[0], sizeHeight = backgroundImageSize[1]; var position = getAbsoluteValueForTuple( getBackgroundValueForIndex( container.styles.backgroundPosition, - index, + index ), backgroundPositioningArea.width - sizeWidth, - backgroundPositioningArea.height - sizeHeight, + backgroundPositioningArea.height - sizeHeight ); var path = calculateBackgroundRepeatPath( getBackgroundValueForIndex(container.styles.backgroundRepeat, index), position, backgroundImageSize, backgroundPositioningArea, - backgroundPaintingArea, + backgroundPaintingArea ); var offsetX = Math.round(backgroundPositioningArea.left + position[0]); var offsetY = Math.round(backgroundPositioningArea.top + position[1]); @@ -10874,7 +10871,7 @@ _a, _b, backgroundPositioningArea, - backgroundPaintingArea, + backgroundPaintingArea ) { var x = _a[0], y = _a[1]; @@ -10885,96 +10882,96 @@ return [ new Vector( Math.round(backgroundPositioningArea.left), - Math.round(backgroundPositioningArea.top + y), + Math.round(backgroundPositioningArea.top + y) ), new Vector( Math.round( backgroundPositioningArea.left + - backgroundPositioningArea.width, + backgroundPositioningArea.width ), - Math.round(backgroundPositioningArea.top + y), + Math.round(backgroundPositioningArea.top + y) ), new Vector( Math.round( backgroundPositioningArea.left + - backgroundPositioningArea.width, + backgroundPositioningArea.width ), - Math.round(height + backgroundPositioningArea.top + y), + Math.round(height + backgroundPositioningArea.top + y) ), new Vector( Math.round(backgroundPositioningArea.left), - Math.round(height + backgroundPositioningArea.top + y), + Math.round(height + backgroundPositioningArea.top + y) ), ]; case 3 /* REPEAT_Y */: return [ new Vector( Math.round(backgroundPositioningArea.left + x), - Math.round(backgroundPositioningArea.top), + Math.round(backgroundPositioningArea.top) ), new Vector( Math.round(backgroundPositioningArea.left + x + width), - Math.round(backgroundPositioningArea.top), + Math.round(backgroundPositioningArea.top) ), new Vector( Math.round(backgroundPositioningArea.left + x + width), Math.round( backgroundPositioningArea.height + - backgroundPositioningArea.top, - ), + backgroundPositioningArea.top + ) ), new Vector( Math.round(backgroundPositioningArea.left + x), Math.round( backgroundPositioningArea.height + - backgroundPositioningArea.top, - ), + backgroundPositioningArea.top + ) ), ]; case 1 /* NO_REPEAT */: return [ new Vector( Math.round(backgroundPositioningArea.left + x), - Math.round(backgroundPositioningArea.top + y), + Math.round(backgroundPositioningArea.top + y) ), new Vector( Math.round(backgroundPositioningArea.left + x + width), - Math.round(backgroundPositioningArea.top + y), + Math.round(backgroundPositioningArea.top + y) ), new Vector( Math.round(backgroundPositioningArea.left + x + width), - Math.round(backgroundPositioningArea.top + y + height), + Math.round(backgroundPositioningArea.top + y + height) ), new Vector( Math.round(backgroundPositioningArea.left + x), - Math.round(backgroundPositioningArea.top + y + height), + Math.round(backgroundPositioningArea.top + y + height) ), ]; default: return [ new Vector( Math.round(backgroundPaintingArea.left), - Math.round(backgroundPaintingArea.top), + Math.round(backgroundPaintingArea.top) ), new Vector( Math.round( - backgroundPaintingArea.left + backgroundPaintingArea.width, + backgroundPaintingArea.left + backgroundPaintingArea.width ), - Math.round(backgroundPaintingArea.top), + Math.round(backgroundPaintingArea.top) ), new Vector( Math.round( - backgroundPaintingArea.left + backgroundPaintingArea.width, + backgroundPaintingArea.left + backgroundPaintingArea.width ), Math.round( - backgroundPaintingArea.height + backgroundPaintingArea.top, - ), + backgroundPaintingArea.height + backgroundPaintingArea.top + ) ), new Vector( Math.round(backgroundPaintingArea.left), Math.round( - backgroundPaintingArea.height + backgroundPaintingArea.top, - ), + backgroundPaintingArea.height + backgroundPaintingArea.top + ) ), ]; } @@ -11068,7 +11065,7 @@ "x" + options.height + ") with scale " + - options.scale, + options.scale ); return _this; } @@ -11094,7 +11091,7 @@ effect.matrix[2], effect.matrix[3], effect.matrix[4], - effect.matrix[5], + effect.matrix[5] ); this.ctx.translate(-effect.offsetX, -effect.offsetY); } @@ -11155,14 +11152,14 @@ CanvasRenderer.prototype.renderTextWithLetterSpacing = function ( text, letterSpacing, - baseline, + baseline ) { var _this = this; if (letterSpacing === 0) { this.ctx.fillText( text.text, text.bounds.left, - text.bounds.top + baseline, + text.bounds.top + baseline ); } else { var letters = segmentGraphemes(text.text); @@ -11227,7 +11224,7 @@ _this.renderTextWithLetterSpacing( text, styles.letterSpacing, - baseline, + baseline ); var textShadows = styles.textShadow; if (textShadows.length && text.text.trim().length) { @@ -11244,7 +11241,7 @@ _this.renderTextWithLetterSpacing( text, styles.letterSpacing, - baseline, + baseline ); }); _this.ctx.shadowColor = ""; @@ -11254,7 +11251,7 @@ } if (styles.textDecorationLine.length) { _this.ctx.fillStyle = asString( - styles.textDecorationColor || styles.color, + styles.textDecorationColor || styles.color ); styles.textDecorationLine.forEach( function (textDecorationLine) { @@ -11267,7 +11264,7 @@ text.bounds.left, Math.round(text.bounds.top + baseline), text.bounds.width, - 1, + 1 ); break; case 2 /* OVERLINE */: @@ -11275,7 +11272,7 @@ text.bounds.left, Math.round(text.bounds.top), text.bounds.width, - 1, + 1 ); break; case 3 /* LINE_THROUGH */: @@ -11284,11 +11281,11 @@ text.bounds.left, Math.ceil(text.bounds.top + middle), text.bounds.width, - 1, + 1 ); break; } - }, + } ); } break; @@ -11298,7 +11295,7 @@ text.text.trim().length ) { _this.ctx.strokeStyle = asString( - styles.webkitTextStrokeColor, + styles.webkitTextStrokeColor ); _this.ctx.lineWidth = styles.webkitTextStrokeWidth; // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -11308,7 +11305,7 @@ _this.ctx.strokeText( text.text, text.bounds.left, - text.bounds.top + baseline, + text.bounds.top + baseline ); } _this.ctx.strokeStyle = ""; @@ -11325,7 +11322,7 @@ CanvasRenderer.prototype.renderReplacedElement = function ( container, curves, - image, + image ) { if ( image && @@ -11346,7 +11343,7 @@ box.left, box.top, box.width, - box.height, + box.height ); this.ctx.restore(); } @@ -11409,7 +11406,7 @@ case 7: _c.sent(); this.context.logger.error( - "Error loading image " + container.src, + "Error loading image " + container.src ); return [3 /*break*/, 8]; case 8: @@ -11417,7 +11414,7 @@ this.renderReplacedElement( container, curves, - container.canvas, + container.canvas ); } if (!(container instanceof SVGElementContainer)) @@ -11433,7 +11430,7 @@ case 11: _c.sent(); this.context.logger.error( - "Error loading svg " + container.svg.substring(0, 255), + "Error loading svg " + container.svg.substring(0, 255) ); return [3 /*break*/, 12]; case 12: @@ -11465,7 +11462,7 @@ container.bounds.left, container.bounds.top, container.bounds.width, - container.bounds.height, + container.bounds.height ); } _c.label = 14; @@ -11473,7 +11470,7 @@ if (container instanceof InputElementContainer) { size = Math.min( container.bounds.width, - container.bounds.height, + container.bounds.height ); if (container.type === CHECKBOX) { if (container.checked) { @@ -11481,31 +11478,31 @@ this.path([ new Vector( container.bounds.left + size * 0.39363, - container.bounds.top + size * 0.79, + container.bounds.top + size * 0.79 ), new Vector( container.bounds.left + size * 0.16, - container.bounds.top + size * 0.5549, + container.bounds.top + size * 0.5549 ), new Vector( container.bounds.left + size * 0.27347, - container.bounds.top + size * 0.44071, + container.bounds.top + size * 0.44071 ), new Vector( container.bounds.left + size * 0.39694, - container.bounds.top + size * 0.5649, + container.bounds.top + size * 0.5649 ), new Vector( container.bounds.left + size * 0.72983, - container.bounds.top + size * 0.23, + container.bounds.top + size * 0.23 ), new Vector( container.bounds.left + size * 0.84, - container.bounds.top + size * 0.34085, + container.bounds.top + size * 0.34085 ), new Vector( container.bounds.left + size * 0.39363, - container.bounds.top + size * 0.79, + container.bounds.top + size * 0.79 ), ]); this.ctx.fillStyle = asString(INPUT_COLOR); @@ -11522,7 +11519,7 @@ size / 4, 0, Math.PI * 2, - true, + true ); this.ctx.fillStyle = asString(INPUT_COLOR); this.ctx.fill(); @@ -11536,13 +11533,13 @@ (fontSize = _b[1]); baseline = this.fontMetrics.getMetrics( fontFamily, - fontSize, + fontSize ).baseline; this.ctx.font = fontFamily; this.ctx.fillStyle = asString(styles.color); this.ctx.textBaseline = "alphabetic"; this.ctx.textAlign = canvasTextAlign( - container.styles.textAlign, + container.styles.textAlign ); bounds = contentBox(container); x = 0; @@ -11561,7 +11558,7 @@ new Vector(bounds.left + bounds.width, bounds.top), new Vector( bounds.left + bounds.width, - bounds.top + bounds.height, + bounds.top + bounds.height ), new Vector(bounds.left, bounds.top + bounds.height), ]); @@ -11569,7 +11566,7 @@ this.renderTextWithLetterSpacing( new TextBounds(container.value, textBounds), styles.letterSpacing, - baseline, + baseline ); this.ctx.restore(); this.ctx.textBaseline = "alphabetic"; @@ -11592,13 +11589,13 @@ this.ctx.drawImage( image, container.bounds.left - (image.width + 10), - container.bounds.top, + container.bounds.top ); return [3 /*break*/, 18]; case 17: _c.sent(); this.context.logger.error( - "Error loading list-style-image " + url, + "Error loading list-style-image " + url ); return [3 /*break*/, 18]; case 18: @@ -11618,25 +11615,25 @@ container.bounds.top + getAbsoluteValue( container.styles.paddingTop, - container.bounds.width, + container.bounds.width ), container.bounds.width, computeLineHeight( styles.lineHeight, - styles.fontSize.number, + styles.fontSize.number ) / 2 + - 1, + 1 ); this.renderTextWithLetterSpacing( new TextBounds(paint.listValue, bounds), styles.letterSpacing, computeLineHeight( styles.lineHeight, - styles.fontSize.number, + styles.fontSize.number ) / 2 + - 2, + 2 ); this.ctx.textBaseline = "bottom"; this.ctx.textAlign = "left"; @@ -11677,7 +11674,7 @@ if ( contains( stack.element.container.flags, - 16 /* DEBUG_RENDER */, + 16 /* DEBUG_RENDER */ ) ) { debugger; @@ -11824,7 +11821,7 @@ point.endControl.x, point.endControl.y, point.end.x, - point.end.y, + point.end.y ); } }); @@ -11833,7 +11830,7 @@ path, pattern, offsetX, - offsetY, + offsetY ) { this.path(path); this.ctx.fillStyle = pattern; @@ -11863,7 +11860,7 @@ 0, 0, width, - height, + height ); return canvas; }; @@ -11934,7 +11931,7 @@ case 3: _h.sent(); this_1.context.logger.error( - "Error loading background-image " + url, + "Error loading background-image " + url ); return [3 /*break*/, 4]; case 4: @@ -11946,7 +11943,7 @@ image.width, image.height, image.width / image.height, - ], + ] )), (path = _c[0]), (x = _c[1]), @@ -11955,7 +11952,7 @@ (height = _c[4]); pattern = this_1.ctx.createPattern( this_1.resizeImage(image, width, height), - "repeat", + "repeat" ); this_1.renderRepeat(path, pattern, x, y); } @@ -11965,7 +11962,7 @@ (_d = calculateBackgroundRendering( container, index, - [null, null, null], + [null, null, null] )), (path = _d[0]), (x = _d[1]), @@ -11975,7 +11972,7 @@ (_e = calculateGradientDirection( backgroundImage.angle, width, - height, + height )), (lineLength = _e[0]), (x0 = _e[1]), @@ -11990,15 +11987,15 @@ x0, y0, x1, - y1, + y1 ); processColorStops( backgroundImage.stops, - lineLength, + lineLength ).forEach(function (colorStop) { return gradient_1.addColorStop( colorStop.stop, - asString(colorStop.color), + asString(colorStop.color) ); }); ctx.fillStyle = gradient_1; @@ -12006,7 +12003,7 @@ if (width > 0 && height > 0) { pattern = this_1.ctx.createPattern( canvas, - "repeat", + "repeat" ); this_1.renderRepeat(path, pattern, x, y); } @@ -12014,7 +12011,7 @@ (_f = calculateBackgroundRendering( container, index, - [null, null, null], + [null, null, null] )), (path = _f[0]), (left = _f[1]), @@ -12028,14 +12025,14 @@ x = getAbsoluteValue(position[0], width); y = getAbsoluteValue( position[position.length - 1], - height, + height ); (_g = calculateRadius( backgroundImage, x, y, width, - height, + height )), (rx = _g[0]), (ry = _g[1]); @@ -12047,15 +12044,15 @@ 0, left + x, top_1 + y, - rx, + rx ); processColorStops( backgroundImage.stops, - rx * 2, + rx * 2 ).forEach(function (colorStop) { return radialGradient_1.addColorStop( colorStop.stop, - asString(colorStop.color), + asString(colorStop.color) ); }); this_1.path(path); @@ -12077,7 +12074,7 @@ left, invF * (top_1 - midY) + midY, width, - height * invF, + height * invF ); this_1.ctx.restore(); } else { @@ -12115,7 +12112,7 @@ CanvasRenderer.prototype.renderSolidBorder = function ( color, side, - curvePoints, + curvePoints ) { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { @@ -12130,7 +12127,7 @@ color, width, side, - curvePoints, + curvePoints ) { return __awaiter(this, void 0, void 0, function () { var outerPaths, innerPaths; @@ -12159,7 +12156,7 @@ }); }; CanvasRenderer.prototype.renderNodeBackgroundAndBorders = function ( - paint, + paint ) { return __awaiter(this, void 0, void 0, function () { var styles, @@ -12175,7 +12172,7 @@ switch (_a.label) { case 0: this.applyEffects( - paint.getEffects(2 /* BACKGROUND_BORDERS */), + paint.getEffects(2 /* BACKGROUND_BORDERS */) ); styles = paint.container.styles; hasBackground = @@ -12206,7 +12203,7 @@ backgroundPaintingArea = calculateBackgroundCurvedPaintingArea( getBackgroundValueForIndex(styles.backgroundClip, 0), - paint.curves, + paint.curves ); if (!(hasBackground || styles.boxShadow.length)) return [3 /*break*/, 2]; @@ -12237,7 +12234,7 @@ (shadow.inset ? 1 : -1) * shadow.spread.number, (shadow.inset ? 1 : -1) * shadow.spread.number, shadow.spread.number * (shadow.inset ? -2 : 2), - shadow.spread.number * (shadow.inset ? -2 : 2), + shadow.spread.number * (shadow.inset ? -2 : 2) ); if (shadow.inset) { _this.path(borderBoxArea); @@ -12284,7 +12281,7 @@ border.width, side, paint.curves, - 2 /* DASHED */, + 2 /* DASHED */ ), ]; case 4: @@ -12300,7 +12297,7 @@ border.width, side, paint.curves, - 3 /* DOTTED */, + 3 /* DOTTED */ ), ]; case 6: @@ -12315,7 +12312,7 @@ border.color, border.width, side, - paint.curves, + paint.curves ), ]; case 8: @@ -12346,7 +12343,7 @@ width, side, curvePoints, - style, + style ) { return __awaiter(this, void 0, void 0, function () { var strokePaths, @@ -12415,7 +12412,7 @@ spaceLength *= multiplier; } else { numberOfDashes = Math.floor( - (length + spaceLength) / (dashLength + spaceLength), + (length + spaceLength) / (dashLength + spaceLength) ); minSpace = (length - numberOfDashes * dashLength) / (numberOfDashes - 1); @@ -12484,7 +12481,7 @@ this.options.x, this.options.y, this.options.width, - this.options.height, + this.options.height ); } stack = parseStackingContexts(element); @@ -12570,7 +12567,7 @@ "," + options.y + ") with scale " + - options.scale, + options.scale ); return _this; } @@ -12585,7 +12582,7 @@ this.options.height * this.options.scale, this.options.scale, this.options.scale, - element, + element ); return [4 /*yield*/, loadSerializedSVG(svg)]; case 1: @@ -12596,13 +12593,13 @@ 0, 0, this.options.width * this.options.scale, - this.options.height * this.options.scale, + this.options.height * this.options.scale ); } this.ctx.drawImage( img, -this.options.x * this.options.scale, - -this.options.y * this.options.scale, + -this.options.y * this.options.scale ); return [2 /*return*/, this.canvas]; } @@ -12648,7 +12645,7 @@ // eslint-disable-next-line no-console console.debug.apply( console, - __spreadArray([this.id, this.getTime() + "ms"], args), + __spreadArray([this.id, this.getTime() + "ms"], args) ); } else { this.info.apply(this, args); @@ -12674,7 +12671,7 @@ // eslint-disable-next-line no-console console.info.apply( console, - __spreadArray([this.id, this.getTime() + "ms"], args), + __spreadArray([this.id, this.getTime() + "ms"], args) ); } } @@ -12695,7 +12692,7 @@ // eslint-disable-next-line no-console console.warn.apply( console, - __spreadArray([this.id, this.getTime() + "ms"], args), + __spreadArray([this.id, this.getTime() + "ms"], args) ); } else { this.info.apply(this, args); @@ -12718,7 +12715,7 @@ // eslint-disable-next-line no-console console.error.apply( console, - __spreadArray([this.id, this.getTime() + "ms"], args), + __spreadArray([this.id, this.getTime() + "ms"], args) ); } else { this.info.apply(this, args); @@ -12805,7 +12802,7 @@ return [ 2 /*return*/, Promise.reject( - "Invalid element provided as first argument", + "Invalid element provided as first argument" ), ]; } @@ -12836,7 +12833,7 @@ (_e = opts.logging) !== null && _e !== void 0 ? _e : true, cache: opts.cache, }, - resourceOptions, + resourceOptions ); windowOptions = { windowWidth: @@ -12860,7 +12857,7 @@ windowOptions.scrollX, windowOptions.scrollY, windowOptions.windowWidth, - windowOptions.windowHeight, + windowOptions.windowHeight ); context = new Context(contextOptions, windowBounds); foreignObjectRendering = @@ -12885,12 +12882,12 @@ " scrolled to " + -windowBounds.left + "," + - -windowBounds.top, + -windowBounds.top ); documentCloner = new DocumentCloner( context, element, - cloneOptions, + cloneOptions ); clonedElement = documentCloner.clonedReferenceElement; if (!clonedElement) { @@ -12916,7 +12913,7 @@ backgroundColor = parseBackgroundColor( context, clonedElement, - opts.backgroundColor, + opts.backgroundColor ); renderOptions = { canvas: opts.canvas, @@ -12942,7 +12939,7 @@ }; if (!foreignObjectRendering) return [3 /*break*/, 3]; context.logger.debug( - "Document cloned, using foreign object rendering", + "Document cloned, using foreign object rendering" ); renderer = new ForeignObjectRenderer(context, renderOptions); return [4 /*yield*/, renderer.render(clonedElement)]; @@ -12959,7 +12956,7 @@ width + "x" + height + - " using computed rendering", + " using computed rendering" ); context.logger.debug("Starting DOM parsing"); root = parseTree(context, clonedElement); @@ -12974,7 +12971,7 @@ " with size " + renderOptions.width + "x" + - renderOptions.height, + renderOptions.height ); renderer = new CanvasRenderer(context, renderOptions); return [4 /*yield*/, renderer.render(root)]; @@ -12989,7 +12986,7 @@ ) { if (!DocumentCloner.destroy(container)) { context.logger.error( - "Cannot detach cloned iframe as it is not in the DOM anymore", + "Cannot detach cloned iframe as it is not in the DOM anymore" ); } } @@ -13002,20 +12999,20 @@ var parseBackgroundColor = function ( context, element, - backgroundColorOverride, + backgroundColorOverride ) { var ownerDocument = element.ownerDocument; // http://www.w3.org/TR/css3-background/#special-backgrounds var documentBackgroundColor = ownerDocument.documentElement ? parseColor( context, - getComputedStyle(ownerDocument.documentElement).backgroundColor, + getComputedStyle(ownerDocument.documentElement).backgroundColor ) : COLORS.TRANSPARENT; var bodyBackgroundColor = ownerDocument.body ? parseColor( context, - getComputedStyle(ownerDocument.body).backgroundColor, + getComputedStyle(ownerDocument.body).backgroundColor ) : COLORS.TRANSPARENT; var defaultBackgroundColor = @@ -13079,7 +13076,7 @@ attr_dev( path, "d", - "M320,64 L320,320 L64,320 L64,64 L320,64 Z M171.749388,128 L146.817842,128 L99.4840387,256 L121.976629,256 L130.913039,230.977 L187.575039,230.977 L196.319607,256 L220.167172,256 L171.749388,128 Z M260.093778,128 L237.691519,128 L237.691519,256 L260.093778,256 L260.093778,128 Z M159.094727,149.47526 L181.409039,213.333 L137.135039,213.333 L159.094727,149.47526 Z M341.333333,256 L384,256 L384,298.666667 L341.333333,298.666667 L341.333333,256 Z M85.3333333,341.333333 L128,341.333333 L128,384 L85.3333333,384 L85.3333333,341.333333 Z M170.666667,341.333333 L213.333333,341.333333 L213.333333,384 L170.666667,384 L170.666667,341.333333 Z M85.3333333,0 L128,0 L128,42.6666667 L85.3333333,42.6666667 L85.3333333,0 Z M256,341.333333 L298.666667,341.333333 L298.666667,384 L256,384 L256,341.333333 Z M170.666667,0 L213.333333,0 L213.333333,42.6666667 L170.666667,42.6666667 L170.666667,0 Z M256,0 L298.666667,0 L298.666667,42.6666667 L256,42.6666667 L256,0 Z M341.333333,170.666667 L384,170.666667 L384,213.333333 L341.333333,213.333333 L341.333333,170.666667 Z M0,256 L42.6666667,256 L42.6666667,298.666667 L0,298.666667 L0,256 Z M341.333333,85.3333333 L384,85.3333333 L384,128 L341.333333,128 L341.333333,85.3333333 Z M0,170.666667 L42.6666667,170.666667 L42.6666667,213.333333 L0,213.333333 L0,170.666667 Z M0,85.3333333 L42.6666667,85.3333333 L42.6666667,128 L0,128 L0,85.3333333 Z", + "M320,64 L320,320 L64,320 L64,64 L320,64 Z M171.749388,128 L146.817842,128 L99.4840387,256 L121.976629,256 L130.913039,230.977 L187.575039,230.977 L196.319607,256 L220.167172,256 L171.749388,128 Z M260.093778,128 L237.691519,128 L237.691519,256 L260.093778,256 L260.093778,128 Z M159.094727,149.47526 L181.409039,213.333 L137.135039,213.333 L159.094727,149.47526 Z M341.333333,256 L384,256 L384,298.666667 L341.333333,298.666667 L341.333333,256 Z M85.3333333,341.333333 L128,341.333333 L128,384 L85.3333333,384 L85.3333333,341.333333 Z M170.666667,341.333333 L213.333333,341.333333 L213.333333,384 L170.666667,384 L170.666667,341.333333 Z M85.3333333,0 L128,0 L128,42.6666667 L85.3333333,42.6666667 L85.3333333,0 Z M256,341.333333 L298.666667,341.333333 L298.666667,384 L256,384 L256,341.333333 Z M170.666667,0 L213.333333,0 L213.333333,42.6666667 L170.666667,42.6666667 L170.666667,0 Z M256,0 L298.666667,0 L298.666667,42.6666667 L256,42.6666667 L256,0 Z M341.333333,170.666667 L384,170.666667 L384,213.333333 L341.333333,213.333333 L341.333333,170.666667 Z M0,256 L42.6666667,256 L42.6666667,298.666667 L0,298.666667 L0,256 Z M341.333333,85.3333333 L384,85.3333333 L384,128 L341.333333,128 L341.333333,85.3333333 Z M0,170.666667 L42.6666667,170.666667 L42.6666667,213.333333 L0,213.333333 L0,170.666667 Z M0,85.3333333 L42.6666667,85.3333333 L42.6666667,128 L0,128 L0,85.3333333 Z" ); attr_dev(path, "id", "Combined-Shape"); add_location(path, file, 65, 507, 2235); @@ -13112,7 +13109,7 @@ }, l: function claim(nodes) { throw new Error( - "options.hydrate only works if the component was compiled with the `hydratable: true` option", + "options.hydrate only works if the component was compiled with the `hydratable: true` option" ); }, m: function mount(target, anchor) { @@ -13135,7 +13132,7 @@ false, false, false, - false, + false ); mounted = true; } @@ -13198,7 +13195,7 @@ if (response.status !== 200) { $$invalidate(0, (scanner = false)); alert( - "Something went wrong. It's likely a server issue, Please try again later.", + "Something went wrong. It's likely a server issue, Please try again later." ); return; } @@ -13285,7 +13282,7 @@ set calls(value) { throw new Error( - ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''" ); } } diff --git a/plugins/stashUserscriptLibrary/stashUserscriptLibrary.js b/plugins/stashUserscriptLibrary/stashUserscriptLibrary.js index af416afe..94fbd1a1 100644 --- a/plugins/stashUserscriptLibrary/stashUserscriptLibrary.js +++ b/plugins/stashUserscriptLibrary/stashUserscriptLibrary.js @@ -20,7 +20,7 @@ window.fetch = async (...args) => { stashListener.dispatchEvent( new CustomEvent("response", { detail: data, - }), + }) ); } catch (e) {} } @@ -82,7 +82,7 @@ class Stash extends EventTarget { } } }, this._pageUrlCheckInterval); - }, + } ); stashListener.addEventListener("response", (evt) => { if (evt.detail.data?.plugins) { @@ -97,7 +97,7 @@ class Stash extends EventTarget { this.dispatchEvent( new CustomEvent("stash:response", { detail: evt.detail, - }), + }) ); }); stashListener.addEventListener("pluginVersion", (evt) => { @@ -106,7 +106,7 @@ class Stash extends EventTarget { this.dispatchEvent( new CustomEvent("stash:pluginVersion", { detail: evt.detail, - }), + }) ); } }); @@ -226,7 +226,7 @@ class Stash extends EventTarget { data.rank = doc.querySelector("rank-chart-button"); console.log(data.rank); data.views = doc.querySelector( - ".d-none.d-m-flex.flex-column.align-items-center.global-header > div.font-weight-bold", + ".d-none.d-m-flex.flex-column.align-items-center.global-header > div.font-weight-bold" ).textContent; data.votes = "0"; return JSON.stringify(data); @@ -271,7 +271,7 @@ class Stash extends EventTarget { stashListener.dispatchEvent( new CustomEvent("pluginVersion", { detail: version, - }), + }) ); } async getStashBoxes() { @@ -309,7 +309,7 @@ class Stash extends EventTarget { matchUrl(href, fragment) { const regexp = concatRegexp( new RegExp(window.location.origin + baseURL), - fragment, + fragment ); return href.match(regexp) != null; } @@ -337,7 +337,7 @@ class Stash extends EventTarget { "Stash Server URL", "", "Server URL…", - true, + true ); serverUrlInput.addEventListener("change", () => { const value = serverUrlInput.value || ""; @@ -365,7 +365,7 @@ class Stash extends EventTarget { "Stash API Key", "", "API Key…", - true, + true ); apiKeyInput.addEventListener("change", () => { const value = apiKeyInput.value || ""; @@ -383,7 +383,7 @@ class Stash extends EventTarget { return this.updateConfigValueTask( "STASH", "api_key", - expectedApiKey, + expectedApiKey ); } }); @@ -399,10 +399,10 @@ class Stash extends EventTarget { this.dispatchEvent( new CustomEvent("stash:pluginVersion", { detail: this.pluginVersion, - }), + }) ); } - }, + } ); } addSystemSetting(callback) { @@ -417,7 +417,7 @@ class Stash extends EventTarget { settingsId, inputId, settingsHeader, - settingsSubheader, + settingsSubheader ) { const section = document.createElement("div"); section.setAttribute("id", settingsId); @@ -445,7 +445,7 @@ class Stash extends EventTarget { settingsHeader, settingsSubheader, placeholder, - visible, + visible ) { const section = document.createElement("div"); section.setAttribute("id", settingsId); @@ -472,7 +472,7 @@ class Stash extends EventTarget { selector, timeout = null, location = document.body, - disconnectOnPageChange = false, + disconnectOnPageChange = false ) { return new Promise((resolve) => { if (document.querySelector(selector)) { @@ -517,7 +517,7 @@ class Stash extends EventTarget { async waitForElementDeath( selector, location = document.body, - disconnectOnPageChange = false, + disconnectOnPageChange = false ) { return new Promise((resolve) => { const observer = new MutationObserver(async () => { @@ -560,7 +560,7 @@ class Stash extends EventTarget { selector, 10000, location, - true, + true ); const stash = this; let previousEvent = ""; @@ -592,7 +592,7 @@ class Stash extends EventTarget { tabsContainer.removeEventListener("click", listenForTabClicks); stash.removeEventListener( "stash:page", - removeEventListenerOnPageChange, + removeEventListenerOnPageChange ); } stash.addEventListener("stash:page", removeEventListenerOnPageChange); @@ -630,7 +630,7 @@ class Stash extends EventTarget { lastStashPageEvent: this._lastStashPageEvent, }, }, - }), + }) ); if (addToHistory) { @@ -667,11 +667,11 @@ class Stash extends EventTarget { console.error(`Can't add page listener: Event ${event} already exists`); } else if (event?.startsWith("stash:")) { console.error( - `Can't add page listener: Event name can't start with "stash:"`, + `Can't add page listener: Event name can't start with "stash:"` ); } else { console.error( - `Can't add page listener: Missing required argument(s) "event", "regex"`, + `Can't add page listener: Missing required argument(s) "event", "regex"` ); } @@ -685,11 +685,11 @@ class Stash extends EventTarget { } else { if (this._pageListeners[event] === undefined && event) { console.error( - `Can't remove page listener: Event ${event} doesn't exists`, + `Can't remove page listener: Event ${event} doesn't exists` ); } else if (event?.startsWith("stash:")) { console.error( - `Can't remove page listener: Event ${event} is a built in event`, + `Can't remove page listener: Event ${event} is a built in event` ); } else { console.error(`Can't remove page listener: Missing "event" argument`); @@ -1169,19 +1169,19 @@ class Stash extends EventTarget { if (handleDisplayView) { isGridPage = this.matchUrl( window.location.href, - concatRegexp(regex, /(?!.*disp=)/), + concatRegexp(regex, /(?!.*disp=)/) ); isListPage = this.matchUrl( window.location.href, - concatRegexp(regex, /.*disp=1/), + concatRegexp(regex, /.*disp=1/) ); isWallPage = this.matchUrl( window.location.href, - concatRegexp(regex, /.*disp=2/), + concatRegexp(regex, /.*disp=2/) ); isTaggerPage = this.matchUrl( window.location.href, - concatRegexp(regex, /.*disp=3/), + concatRegexp(regex, /.*disp=3/) ); if (isListPage || isWallPage || isTaggerPage) isDisplayViewPage = true; @@ -1192,11 +1192,11 @@ class Stash extends EventTarget { if (childAnyEventCondition) { stash._dispatchPageEvent( "stash:page:" + tabPage.page + `:any:${view}`, - false, + false ); stash._dispatchPageEvent( "stash:page:any:" + tabPage.tab + `:${view}`, - false, + false ); } else { stash._dispatchPageEvent(`stash:page:any:${view}`, false); @@ -1255,7 +1255,7 @@ class Stash extends EventTarget { task.classList.add( this.visiblePluginTasks.indexOf(taskName) === -1 ? "d-none" - : "d-flex", + : "d-flex" ); this.dispatchEvent( new CustomEvent("stash:plugin:task", { @@ -1263,10 +1263,10 @@ class Stash extends EventTarget { taskName, task, }, - }), + }) ); } - }, + } ); } async updateConfigValueTask(sectionKey, propName, value) { @@ -1348,7 +1348,7 @@ class Stash extends EventTarget { this.dispatchEvent( new CustomEvent("tagger", { detail: el, - }), + }) ); const searchItemContainer = @@ -1367,7 +1367,7 @@ class Stash extends EventTarget { node, mutation, }, - }), + }) ); } else if ( node?.classList?.contains("entity-name") && @@ -1379,7 +1379,7 @@ class Stash extends EventTarget { node, mutation, }, - }), + }) ); } else if ( node.tagName === "SPAN" && @@ -1391,7 +1391,7 @@ class Stash extends EventTarget { node, mutation, }, - }), + }) ); } else if (node.tagName === "UL") { this.dispatchEvent( @@ -1400,7 +1400,7 @@ class Stash extends EventTarget { node, mutation, }, - }), + }) ); } else if (node?.classList?.contains("col-lg-6")) { this.dispatchEvent( @@ -1409,7 +1409,7 @@ class Stash extends EventTarget { node, mutation, }, - }), + }) ); } else if (node.tagName === "H5") { // scene date @@ -1419,7 +1419,7 @@ class Stash extends EventTarget { node, mutation, }, - }), + }) ); } else if ( node.tagName === "DIV" && @@ -1433,7 +1433,7 @@ class Stash extends EventTarget { node, mutation, }, - }), + }) ); } else { this.dispatchEvent( @@ -1442,7 +1442,7 @@ class Stash extends EventTarget { node, mutation, }, - }), + }) ); } }); @@ -1450,7 +1450,7 @@ class Stash extends EventTarget { this.dispatchEvent( new CustomEvent("tagger:mutations:searchitems", { detail: mutations, - }), + }) ); }); observer.observe(searchItemContainer, { @@ -1459,16 +1459,16 @@ class Stash extends EventTarget { }); const taggerContainerHeader = document.querySelector( - ".tagger-container-header", + ".tagger-container-header" ); const taggerContainerHeaderObserver = new MutationObserver( (mutations) => { this.dispatchEvent( new CustomEvent("tagger:mutations:header", { detail: mutations, - }), + }) ); - }, + } ); taggerContainerHeaderObserver.observe(taggerContainerHeader, { childList: true, @@ -1479,13 +1479,13 @@ class Stash extends EventTarget { this.dispatchEvent( new CustomEvent("tagger:searchitem", { detail: searchItem, - }), + }) ); } if (!document.getElementById("progress-bar")) { const progressBar = createElementFromHTML( - `
`, + `
` ); progressBar.classList.add("progress"); progressBar.style.display = "none"; @@ -1498,9 +1498,9 @@ class Stash extends EventTarget { this.dispatchEvent( new CustomEvent("tagger:configuration", { detail: el, - }), + }) ); - }, + } ); } setProgress(value) { @@ -1560,12 +1560,12 @@ class Stash extends EventTarget { const id = url.pathname.replace(baseURL + "scenes/", ""); const data = this.scenes[id]; const nameNode = searchItem.querySelector( - "a.scene-link > div.TruncatedText", + "a.scene-link > div.TruncatedText" ); const name = nameNode.innerText; const queryInput = searchItem.querySelector("input.text-input"); const performerNodes = searchItem.querySelectorAll( - ".performer-tag-container", + ".performer-tag-container" ); return { @@ -1581,14 +1581,14 @@ class Stash extends EventTarget { } parseSearchResultItem(searchResultItem) { const remoteUrlNode = searchResultItem.querySelector( - ".scene-details .optional-field .optional-field-content a", + ".scene-details .optional-field .optional-field-content a" ); const remoteId = remoteUrlNode?.href.split("/").pop(); const remoteUrl = remoteUrlNode?.href ? new URL(remoteUrlNode.href) : null; const remoteData = this.remoteScenes[remoteId]; const sceneDetailNodes = searchResultItem.querySelectorAll( - ".scene-details .optional-field .optional-field-content", + ".scene-details .optional-field .optional-field-content" ); let urlNode = null; let detailsNode = null; @@ -1604,15 +1604,15 @@ class Stash extends EventTarget { } const imageNode = searchResultItem.querySelector( - ".scene-image-container .optional-field .optional-field-content", + ".scene-image-container .optional-field .optional-field-content" ); const metadataNode = searchResultItem.querySelector(".scene-metadata"); const titleNode = metadataNode.querySelector( - "h4 .optional-field .optional-field-content", + "h4 .optional-field .optional-field-content" ); const codeAndDateNodes = metadataNode.querySelectorAll( - "h5 .optional-field .optional-field-content", + "h5 .optional-field .optional-field-content" ); let codeNode = null; let dateNode = null; @@ -1636,7 +1636,7 @@ class Stash extends EventTarget { } const matchNodes = searchResultItem.querySelectorAll( - "div.col-lg-6 div.mt-2 div.row.no-gutters.my-2 span.ml-auto", + "div.col-lg-6 div.mt-2 div.row.no-gutters.my-2 span.ml-auto" ); const matches = []; for (const matchNode of matchNodes) { @@ -1644,7 +1644,7 @@ class Stash extends EventTarget { const entityNode = matchNode.parentElement.querySelector(".entity-name"); const matchName = matchNode.querySelector( - ".optional-field-content b", + ".optional-field-content b" ).innerText; const remoteName = entityNode.querySelector("b").innerText; @@ -1653,7 +1653,7 @@ class Stash extends EventTarget { matchType = "performer"; if (remoteData) { data = remoteData.performers.find( - (performer) => performer.name === remoteName, + (performer) => performer.name === remoteName ); } } else if (entityNode.innerText.startsWith("Studio:")) { @@ -1747,7 +1747,7 @@ function getElementByXpath(xpath, contextNode) { contextNode || document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, - null, + null ).singleNodeValue; } @@ -1765,7 +1765,7 @@ function getElementByXpath(xpath, contextNode) { contextNode || document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, - null, + null ).singleNodeValue; } @@ -1775,7 +1775,7 @@ function getElementsByXpath(xpath, contextNode) { contextNode || document, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE, - null, + null ); } @@ -1798,7 +1798,7 @@ function setNativeValue(element, value) { const prototype = Object.getPrototypeOf(element); const prototypeValueSetter = Object.getOwnPropertyDescriptor( prototype, - "value", + "value" ).set; if (valueSetter && valueSetter !== prototypeValueSetter) { @@ -1813,7 +1813,7 @@ function updateTextInput(element, value) { element.dispatchEvent( new Event("input", { bubbles: true, - }), + }) ); } @@ -1874,5 +1874,5 @@ const reloadImg = (url) => }).then(() => document.body .querySelectorAll(`img[src='${url}']`) - .forEach((img) => (img.src = url)), + .forEach((img) => (img.src = url)) ); diff --git a/plugins/stats/stats.js b/plugins/stats/stats.js index 3334e943..7180d2f5 100644 --- a/plugins/stats/stats.js +++ b/plugins/stats/stats.js @@ -41,7 +41,7 @@ createStatElement( row, ((stashIdCount / totalCount) * 100).toFixed(2) + "%", - "Scene StashIDs", + "Scene StashIDs" ); } @@ -73,7 +73,7 @@ createStatElement( row, ((stashIdCount / totalCount) * 100).toFixed(2) + "%", - "Performer StashIDs", + "Performer StashIDs" ); } @@ -103,7 +103,7 @@ createStatElement( row, ((stashIdCount / totalCount) * 100).toFixed(2) + "%", - "Studio StashIDs", + "Studio StashIDs" ); } @@ -153,7 +153,7 @@ createPerformerFavorites(row); createMarkersStat(row); } - }, + } ); }); })(); diff --git a/plugins/visage/visage.js b/plugins/visage/visage.js index 80c447ed..1a5810a0 100644 --- a/plugins/visage/visage.js +++ b/plugins/visage/visage.js @@ -155,7 +155,7 @@ }; var result = await stash.callGQL(reqData); return result.data.scrapeSinglePerformer.filter( - (p) => p.remote_site_id === stash_id, + (p) => p.remote_site_id === stash_id )[0]; } @@ -185,7 +185,7 @@ }, { once: true, - }, + } ); } @@ -325,14 +325,14 @@ ctx, $$scope, slot_changes, - get_slot_context_fn, + get_slot_context_fn ) { if (slot_changes) { const slot_context = get_slot_context( slot_definition, ctx, $$scope, - get_slot_context_fn, + get_slot_context_fn ); slot.p(slot_context, slot_changes); } @@ -464,7 +464,7 @@ function custom_event( type, detail, - { bubbles = false, cancelable = false } = {}, + { bubbles = false, cancelable = false } = {} ) { const e = document.createEvent("CustomEvent"); e.initCustomEvent(type, bubbles, cancelable, detail); @@ -503,7 +503,7 @@ rules[name] = true; stylesheet.insertRule( `@keyframes ${name} ${rule}`, - stylesheet.cssRules.length, + stylesheet.cssRules.length ); } const animation = node.style.animation || ""; @@ -516,7 +516,7 @@ const next = previous.filter( name ? (anim) => anim.indexOf(name) < 0 // remove specific animation - : (anim) => anim.indexOf("__svelte") === -1, // remove all Svelte animations + : (anim) => anim.indexOf("__svelte") === -1 // remove all Svelte animations ); const deleted = previous.length - next.length; if (deleted) { @@ -785,7 +785,7 @@ const filtered = []; const targets = []; render_callbacks.forEach((c) => - fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c), + fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c) ); targets.forEach((c) => c()); render_callbacks = filtered; @@ -869,7 +869,7 @@ delay, easing, css, - uid++, + uid++ ); tick(0, 1); const start_time = now() + delay; @@ -1004,7 +1004,7 @@ destroy, create_each_block, next, - get_context, + get_context ) { let o = old_blocks.length; let n = list.length; @@ -1146,7 +1146,7 @@ not_equal, props, append_styles, - dirty = [-1], + dirty = [-1] ) { const parent_component = current_component; set_current_component(component); @@ -1165,8 +1165,7 @@ before_update: [], after_update: [], context: new Map( - options.context || - (parent_component ? parent_component.$$.context : []), + options.context || (parent_component ? parent_component.$$.context : []) ), // everything else callbacks: blank_object(), @@ -1206,7 +1205,7 @@ component, options.target, options.anchor, - options.customElement, + options.customElement ); flush(); } @@ -1245,7 +1244,7 @@ document.dispatchEvent( custom_event(type, Object.assign({ version: "3.59.2" }, detail), { bubbles: true, - }), + }) ); } function append_dev(target, node) { @@ -1267,7 +1266,7 @@ options, has_prevent_default, has_stop_propagation, - has_stop_immediate_propagation, + has_stop_immediate_propagation ) { const modifiers = options === true @@ -1415,7 +1414,7 @@ default_slot_template, ctx, /*$$scope*/ ctx[3], - null, + null ); const block = { @@ -1427,7 +1426,7 @@ }, l: function claim(nodes) { throw new Error( - "options.hydrate only works if the component was compiled with the `hydratable: true` option", + "options.hydrate only works if the component was compiled with the `hydratable: true` option" ); }, m: function mount(target, anchor) { @@ -1447,7 +1446,7 @@ false, false, false, - false, + false ); mounted = true; } @@ -1466,9 +1465,9 @@ default_slot_template, /*$$scope*/ ctx[3], dirty, - null, + null ), - null, + null ); } } @@ -1508,7 +1507,7 @@ arr.splice(index, 1); selectedStore.update((selected) => - selected === item ? arr[index] || arr[arr.length - 1] : selected, + selected === item ? arr[index] || arr[arr.length - 1] : selected ); } @@ -1525,7 +1524,7 @@ const selectedTab = writable(null); validate_store(selectedTab, "selectedTab"); component_subscribe($$self, selectedTab, (value) => - $$invalidate(5, ($selectedTab = value)), + $$invalidate(5, ($selectedTab = value)) ); const selectedPanel = writable(null); @@ -1669,13 +1668,13 @@ get initialSelectedIndex() { throw new Error( - ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''" ); } set initialSelectedIndex(value) { throw new Error( - ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''" ); } } @@ -1695,7 +1694,7 @@ default_slot_template, ctx, /*$$scope*/ ctx[8], - null, + null ); const block = { @@ -1707,13 +1706,13 @@ attr_dev( li, "aria-controls", - (li_aria_controls_value = /*$controls*/ ctx[2][/*tab*/ ctx[3].id]), + (li_aria_controls_value = /*$controls*/ ctx[2][/*tab*/ ctx[3].id]) ); attr_dev(li, "aria-selected", /*isSelected*/ ctx[1]); attr_dev( li, "tabindex", - (li_tabindex_value = /*isSelected*/ ctx[1] ? 0 : -1), + (li_tabindex_value = /*isSelected*/ ctx[1] ? 0 : -1) ); attr_dev(li, "class", "svelte-tabs__tab svelte-1fbofsd"); toggle_class(li, "svelte-tabs__selected", /*isSelected*/ ctx[1]); @@ -1721,7 +1720,7 @@ }, l: function claim(nodes) { throw new Error( - "options.hydrate only works if the component was compiled with the `hydratable: true` option", + "options.hydrate only works if the component was compiled with the `hydratable: true` option" ); }, m: function mount(target, anchor) { @@ -1742,7 +1741,7 @@ false, false, false, - false, + false ); mounted = true; } @@ -1761,9 +1760,9 @@ default_slot_template, /*$$scope*/ ctx[8], dirty, - null, + null ), - null, + null ); } } @@ -1840,11 +1839,11 @@ } = getContext(TABS); validate_store(selectedTab, "selectedTab"); component_subscribe($$self, selectedTab, (value) => - $$invalidate(7, ($selectedTab = value)), + $$invalidate(7, ($selectedTab = value)) ); validate_store(controls, "controls"); component_subscribe($$self, controls, (value) => - $$invalidate(2, ($controls = value)), + $$invalidate(2, ($controls = value)) ); let isSelected; registerTab(tab); @@ -1954,7 +1953,7 @@ default_slot_template, ctx, /*$$scope*/ ctx[0], - null, + null ); const block = { @@ -1967,7 +1966,7 @@ }, l: function claim(nodes) { throw new Error( - "options.hydrate only works if the component was compiled with the `hydratable: true` option", + "options.hydrate only works if the component was compiled with the `hydratable: true` option" ); }, m: function mount(target, anchor) { @@ -1993,9 +1992,9 @@ default_slot_template, /*$$scope*/ ctx[0], dirty, - null, + null ), - null, + null ); } } @@ -2072,7 +2071,7 @@ default_slot_template, ctx, /*$$scope*/ ctx[5], - null, + null ); const block = { @@ -2100,9 +2099,9 @@ default_slot_template, /*$$scope*/ ctx[5], dirty, - null, + null ), - null, + null ); } } @@ -2148,7 +2147,7 @@ div, "aria-labelledby", (div_aria_labelledby_value = - /*$labeledBy*/ ctx[0][/*panel*/ ctx[2].id]), + /*$labeledBy*/ ctx[0][/*panel*/ ctx[2].id]) ); attr_dev(div, "class", "svelte-tabs__tab-panel svelte-epfyet"); attr_dev(div, "role", "tabpanel"); @@ -2156,7 +2155,7 @@ }, l: function claim(nodes) { throw new Error( - "options.hydrate only works if the component was compiled with the `hydratable: true` option", + "options.hydrate only works if the component was compiled with the `hydratable: true` option" ); }, m: function mount(target, anchor) { @@ -2233,11 +2232,11 @@ const { registerPanel, selectedPanel, labeledBy } = getContext(TABS); validate_store(selectedPanel, "selectedPanel"); component_subscribe($$self, selectedPanel, (value) => - $$invalidate(1, ($selectedPanel = value)), + $$invalidate(1, ($selectedPanel = value)) ); validate_store(labeledBy, "labeledBy"); component_subscribe($$self, labeledBy, (value) => - $$invalidate(0, ($labeledBy = value)), + $$invalidate(0, ($labeledBy = value)) ); registerPanel(panel); const writable_props = []; @@ -2318,7 +2317,7 @@ x = 0, y = 0, opacity = 0, - } = {}, + } = {} ) { const style = getComputedStyle(node); const target_opacity = +style.opacity; @@ -2456,7 +2455,7 @@ false, false, false, - false, + false ), listen_dev( button1, @@ -2465,7 +2464,7 @@ false, false, false, - false, + false ), ]; @@ -2540,7 +2539,7 @@ if ( !src_url_equal( img.src, - (img_src_value = "data:image/jpg;base64," + /*face*/ ctx[10].image), + (img_src_value = "data:image/jpg;base64," + /*face*/ ctx[10].image) ) ) attr_dev(img, "src", img_src_value); @@ -2557,7 +2556,7 @@ dirty & /*matches*/ 1 && !src_url_equal( img.src, - (img_src_value = "data:image/jpg;base64," + /*face*/ ctx[10].image), + (img_src_value = "data:image/jpg;base64," + /*face*/ ctx[10].image) ) ) { attr_dev(img, "src", img_src_value); @@ -2659,7 +2658,7 @@ let key = get_key(child_ctx); each_1_lookup.set( key, - (each_blocks[i] = create_each_block_2(key, child_ctx)), + (each_blocks[i] = create_each_block_2(key, child_ctx)) ); } @@ -2699,7 +2698,7 @@ outro_and_destroy_block, create_each_block_2, each_1_anchor, - get_each_context_2, + get_each_context_2 ); check_outros(); } @@ -2809,7 +2808,7 @@ (span0_class_value = "performer-card__country-flag fi fi-" + /*match*/ ctx[14].country?.toLowerCase() + - " svelte-ssoxzi"), + " svelte-ssoxzi") ); add_location(span0, file$3, 173, 26, 4990); attr_dev(div0, "class", "thumbnail-section svelte-ssoxzi"); @@ -2818,7 +2817,7 @@ a, "href", (a_href_value = - "https://stashdb.org/performers/" + /*match*/ ctx[14].id), + "https://stashdb.org/performers/" + /*match*/ ctx[14].id) ); attr_dev(a, "target", "_blank"); attr_dev(a, "class", "svelte-ssoxzi"); @@ -2869,7 +2868,7 @@ false, false, false, - false, + false ), listen_dev( div4, @@ -2878,7 +2877,7 @@ false, false, false, - false, + false ), ]; @@ -2976,7 +2975,7 @@ let key = get_key(child_ctx); each_1_lookup.set( key, - (each_blocks[i] = create_each_block_1(key, child_ctx)), + (each_blocks[i] = create_each_block_1(key, child_ctx)) ); } @@ -3024,7 +3023,7 @@ destroy_block, create_each_block_1, null, - get_each_context_1, + get_each_context_1 ); } }, @@ -3140,7 +3139,7 @@ let key = get_key(child_ctx); each_1_lookup.set( key, - (each_blocks[i] = create_each_block$1(key, child_ctx)), + (each_blocks[i] = create_each_block$1(key, child_ctx)) ); } @@ -3194,7 +3193,7 @@ outro_and_destroy_block, create_each_block$1, each_1_anchor, - get_each_context$1, + get_each_context$1 ); check_outros(); } @@ -3253,7 +3252,7 @@ }, l: function claim(nodes) { throw new Error( - "options.hydrate only works if the component was compiled with the `hydratable: true` option", + "options.hydrate only works if the component was compiled with the `hydratable: true` option" ); }, m: function mount(target, anchor) { @@ -3335,7 +3334,7 @@ $$invalidate( 2, (modal.style.opacity = modal.style.opacity == "0.1" ? "1.0" : "0.1"), - modal, + modal ); } @@ -3522,13 +3521,13 @@ get matches() { throw new Error( - ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''" ); } set matches(value) { throw new Error( - ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''" ); } } @@ -3592,9 +3591,7 @@ function __extends(d, b) { if (typeof b !== "function" && b !== null) throw new TypeError( - "Class extends value " + - String(b) + - " is not a constructor or null", + "Class extends value " + String(b) + " is not a constructor or null" ); extendStatics(d, b); function __() { @@ -3774,7 +3771,7 @@ this.left + x, this.top + y, this.width + w, - this.height + h, + this.height + h ); }; Bounds.fromClientRect = function (context, clientRect) { @@ -3782,7 +3779,7 @@ clientRect.left + context.windowBounds.left, clientRect.top + context.windowBounds.top, clientRect.width, - clientRect.height, + clientRect.height ); }; Bounds.fromDOMRectList = function (context, domRectList) { @@ -3794,7 +3791,7 @@ domRect.left + context.windowBounds.left, domRect.top + context.windowBounds.top, domRect.width, - domRect.height, + domRect.height ) : Bounds.EMPTY; }; @@ -3813,12 +3810,12 @@ var width = Math.max( Math.max(body.scrollWidth, documentElement.scrollWidth), Math.max(body.offsetWidth, documentElement.offsetWidth), - Math.max(body.clientWidth, documentElement.clientWidth), + Math.max(body.clientWidth, documentElement.clientWidth) ); var height = Math.max( Math.max(body.scrollHeight, documentElement.scrollHeight), Math.max(body.offsetHeight, documentElement.offsetHeight), - Math.max(body.clientHeight, documentElement.clientHeight), + Math.max(body.clientHeight, documentElement.clientHeight) ); return new Bounds(0, 0, width, height); }; @@ -3838,7 +3835,7 @@ var extra = str.charCodeAt(i++); if ((extra & 0xfc00) === 0xdc00) { codePoints.push( - ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000, + ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000 ); } else { codePoints.push(value); @@ -3873,7 +3870,7 @@ codePoint -= 0x10000; codeUnits.push( (codePoint >> 10) + 0xd800, - (codePoint % 0x400) + 0xdc00, + (codePoint % 0x400) + 0xdc00 ); } if (index + 1 === length || codeUnits.length > 0x4000) { @@ -3954,7 +3951,7 @@ (buffer[i + 3] << 24) | (buffer[i + 2] << 16) | (buffer[i + 1] << 8) | - buffer[i], + buffer[i] ); } return bytes; @@ -4053,7 +4050,7 @@ view32[2], view32[3], index, - data, + data ); }; var Trie$1 = /** @class */ (function () { @@ -4063,7 +4060,7 @@ highStart, highValueIndex, index, - data, + data ) { this.initialValue = initialValue; this.errorValue = errorValue; @@ -4278,7 +4275,7 @@ a, b, currentIndex, - classTypes, + classTypes ) { var current = classTypes[currentIndex]; if (Array.isArray(a) ? a.indexOf(current) !== -1 : a === current) { @@ -4336,7 +4333,7 @@ classTypes, indicies, index, - forbiddenBreaks, + forbiddenBreaks ) { if (indicies[index] === 0) { return BREAK_NOT_ALLOWED$1; @@ -4609,7 +4606,7 @@ Break.prototype.slice = function () { return fromCodePoint$1.apply( void 0, - this.codePoints.slice(this.start, this.end), + this.codePoints.slice(this.start, this.end) ); }; return Break; @@ -4636,7 +4633,7 @@ classTypes, indicies, ++nextIndex, - forbiddenBreakpoints, + forbiddenBreakpoints )) === BREAK_NOT_ALLOWED$1 ) {} if (lineBreak !== BREAK_NOT_ALLOWED$1 || nextIndex === length) { @@ -4928,7 +4925,7 @@ isNumberStart( codePoint, this.peekCodePoint(0), - this.peekCodePoint(1), + this.peekCodePoint(1) ) ) { this.reconsumeCodePoint(codePoint); @@ -4960,7 +4957,7 @@ isNumberStart( codePoint, this.peekCodePoint(0), - this.peekCodePoint(1), + this.peekCodePoint(1) ) ) { this.reconsumeCodePoint(codePoint); @@ -5106,18 +5103,18 @@ void 0, digits.map(function (digit) { return digit === QUESTION_MARK ? ZERO : digit; - }), + }) ), - 16, + 16 ); var end = parseInt( fromCodePoint$1.apply( void 0, digits.map(function (digit) { return digit === QUESTION_MARK ? F : digit; - }), + }) ), - 16, + 16 ); return { type: 30 /* UNICODE_RANGE_TOKEN */, @@ -5251,7 +5248,7 @@ var amount = Math.min(SLICE_STACK_SIZE, count); value += fromCodePoint$1.apply( void 0, - this._value.splice(0, amount), + this._value.splice(0, amount) ); count -= amount; } @@ -5417,7 +5414,7 @@ } if (token.type === 32 /* EOF_TOKEN */) { throw new SyntaxError( - "Error parsing CSS component value, unexpected EOF", + "Error parsing CSS component value, unexpected EOF" ); } this.reconsumeToken(token); @@ -5429,7 +5426,7 @@ return value; } throw new SyntaxError( - "Error parsing CSS component value, multiple values found when expecting only one", + "Error parsing CSS component value, multiple values found when expecting only one" ); }; Parser.prototype.parseComponentValues = function () { @@ -5528,7 +5525,7 @@ if (token.type === 4 /* COMMA_TOKEN */) { if (arg.length === 0) { throw new Error( - "Error parsing function args, zero tokens for arg", + "Error parsing function args, zero tokens for arg" ); } args.push(arg); @@ -5707,7 +5704,7 @@ throw new Error( 'Attempting to parse an unsupported color function "' + value.name + - '"', + '"' ); } return colorFunction(context, value.values); @@ -5721,7 +5718,7 @@ parseInt(r + r, 16), parseInt(g + g, 16), parseInt(b + b, 16), - 1, + 1 ); } if (value.value.length === 4) { @@ -5733,7 +5730,7 @@ parseInt(r + r, 16), parseInt(g + g, 16), parseInt(b + b, 16), - parseInt(a + a, 16) / 255, + parseInt(a + a, 16) / 255 ); } if (value.value.length === 6) { @@ -5751,7 +5748,7 @@ parseInt(r, 16), parseInt(g, 16), parseInt(b, 16), - parseInt(a, 16) / 255, + parseInt(a, 16) / 255 ); } } @@ -5865,7 +5862,7 @@ var parseColor = function (context, value) { return color$1.parse( context, - Parser.create(value).parseComponentValue(), + Parser.create(value).parseComponentValue() ); }; var COLORS = { @@ -6159,7 +6156,7 @@ { optimumDistance: closest ? Infinity : -Infinity, optimumCorner: null, - }, + } ).optimumCorner; }; var calculateRadius = function (gradient, x, y, width, height) { @@ -6174,7 +6171,7 @@ Math.abs(x), Math.abs(x - width), Math.abs(y), - Math.abs(y - height), + Math.abs(y - height) ); } else if (gradient.shape === 1 /* ELLIPSE */) { rx = Math.min(Math.abs(x), Math.abs(x - width)); @@ -6189,7 +6186,7 @@ distance(x, y), distance(x, y - height), distance(x - width, y), - distance(x - width, y - height), + distance(x - width, y - height) ); } else if (gradient.shape === 1 /* ELLIPSE */) { // Compute the ratio ry/rx (which is to be the same as for "closest-side") @@ -6210,7 +6207,7 @@ Math.abs(x), Math.abs(x - width), Math.abs(y), - Math.abs(y - height), + Math.abs(y - height) ); } else if (gradient.shape === 1 /* ELLIPSE */) { rx = Math.max(Math.abs(x), Math.abs(x - width)); @@ -6225,7 +6222,7 @@ distance(x, y), distance(x, y - height), distance(x - width, y), - distance(x - width, y - height), + distance(x - width, y - height) ); } else if (gradient.shape === 1 /* ELLIPSE */) { // Compute the ratio ry/rx (which is to be the same as for "farthest-side") @@ -6548,7 +6545,7 @@ throw new Error( 'Attempting to parse an unsupported image function "' + value.name + - '"', + '"' ); } return imageFunction(context, value.values); @@ -6711,7 +6708,7 @@ type: 1 /* LIST */, parse: function (_context, tokens) { return parseLengthPercentageTuple( - tokens.filter(isLengthPercentage), + tokens.filter(isLengthPercentage) ); }, }; @@ -7270,7 +7267,7 @@ throw new Error( 'Attempting to parse an unsupported transform function "' + token.name + - '"', + '"' ); } return transformFunction(token.values); @@ -7773,122 +7770,122 @@ this.animationDuration = parse( context, duration, - declaration.animationDuration, + declaration.animationDuration ); this.backgroundClip = parse( context, backgroundClip, - declaration.backgroundClip, + declaration.backgroundClip ); this.backgroundColor = parse( context, backgroundColor, - declaration.backgroundColor, + declaration.backgroundColor ); this.backgroundImage = parse( context, backgroundImage, - declaration.backgroundImage, + declaration.backgroundImage ); this.backgroundOrigin = parse( context, backgroundOrigin, - declaration.backgroundOrigin, + declaration.backgroundOrigin ); this.backgroundPosition = parse( context, backgroundPosition, - declaration.backgroundPosition, + declaration.backgroundPosition ); this.backgroundRepeat = parse( context, backgroundRepeat, - declaration.backgroundRepeat, + declaration.backgroundRepeat ); this.backgroundSize = parse( context, backgroundSize, - declaration.backgroundSize, + declaration.backgroundSize ); this.borderTopColor = parse( context, borderTopColor, - declaration.borderTopColor, + declaration.borderTopColor ); this.borderRightColor = parse( context, borderRightColor, - declaration.borderRightColor, + declaration.borderRightColor ); this.borderBottomColor = parse( context, borderBottomColor, - declaration.borderBottomColor, + declaration.borderBottomColor ); this.borderLeftColor = parse( context, borderLeftColor, - declaration.borderLeftColor, + declaration.borderLeftColor ); this.borderTopLeftRadius = parse( context, borderTopLeftRadius, - declaration.borderTopLeftRadius, + declaration.borderTopLeftRadius ); this.borderTopRightRadius = parse( context, borderTopRightRadius, - declaration.borderTopRightRadius, + declaration.borderTopRightRadius ); this.borderBottomRightRadius = parse( context, borderBottomRightRadius, - declaration.borderBottomRightRadius, + declaration.borderBottomRightRadius ); this.borderBottomLeftRadius = parse( context, borderBottomLeftRadius, - declaration.borderBottomLeftRadius, + declaration.borderBottomLeftRadius ); this.borderTopStyle = parse( context, borderTopStyle, - declaration.borderTopStyle, + declaration.borderTopStyle ); this.borderRightStyle = parse( context, borderRightStyle, - declaration.borderRightStyle, + declaration.borderRightStyle ); this.borderBottomStyle = parse( context, borderBottomStyle, - declaration.borderBottomStyle, + declaration.borderBottomStyle ); this.borderLeftStyle = parse( context, borderLeftStyle, - declaration.borderLeftStyle, + declaration.borderLeftStyle ); this.borderTopWidth = parse( context, borderTopWidth, - declaration.borderTopWidth, + declaration.borderTopWidth ); this.borderRightWidth = parse( context, borderRightWidth, - declaration.borderRightWidth, + declaration.borderRightWidth ); this.borderBottomWidth = parse( context, borderBottomWidth, - declaration.borderBottomWidth, + declaration.borderBottomWidth ); this.borderLeftWidth = parse( context, borderLeftWidth, - declaration.borderLeftWidth, + declaration.borderLeftWidth ); this.boxShadow = parse(context, boxShadow, declaration.boxShadow); this.color = parse(context, color, declaration.color); @@ -7901,41 +7898,41 @@ this.fontVariant = parse( context, fontVariant, - declaration.fontVariant, + declaration.fontVariant ); this.fontWeight = parse(context, fontWeight, declaration.fontWeight); this.letterSpacing = parse( context, letterSpacing, - declaration.letterSpacing, + declaration.letterSpacing ); this.lineBreak = parse(context, lineBreak, declaration.lineBreak); this.lineHeight = parse(context, lineHeight, declaration.lineHeight); this.listStyleImage = parse( context, listStyleImage, - declaration.listStyleImage, + declaration.listStyleImage ); this.listStylePosition = parse( context, listStylePosition, - declaration.listStylePosition, + declaration.listStylePosition ); this.listStyleType = parse( context, listStyleType, - declaration.listStyleType, + declaration.listStyleType ); this.marginTop = parse(context, marginTop, declaration.marginTop); this.marginRight = parse( context, marginRight, - declaration.marginRight, + declaration.marginRight ); this.marginBottom = parse( context, marginBottom, - declaration.marginBottom, + declaration.marginBottom ); this.marginLeft = parse(context, marginLeft, declaration.marginLeft); this.opacity = parse(context, opacity, declaration.opacity); @@ -7945,23 +7942,23 @@ this.overflowWrap = parse( context, overflowWrap, - declaration.overflowWrap, + declaration.overflowWrap ); this.paddingTop = parse(context, paddingTop, declaration.paddingTop); this.paddingRight = parse( context, paddingRight, - declaration.paddingRight, + declaration.paddingRight ); this.paddingBottom = parse( context, paddingBottom, - declaration.paddingBottom, + declaration.paddingBottom ); this.paddingLeft = parse( context, paddingLeft, - declaration.paddingLeft, + declaration.paddingLeft ); this.paintOrder = parse(context, paintOrder, declaration.paintOrder); this.position = parse(context, position, declaration.position); @@ -7971,37 +7968,37 @@ textDecorationColor, (_a = declaration.textDecorationColor) !== null && _a !== void 0 ? _a - : declaration.color, + : declaration.color ); this.textDecorationLine = parse( context, textDecorationLine, (_b = declaration.textDecorationLine) !== null && _b !== void 0 ? _b - : declaration.textDecoration, + : declaration.textDecoration ); this.textShadow = parse(context, textShadow, declaration.textShadow); this.textTransform = parse( context, textTransform, - declaration.textTransform, + declaration.textTransform ); this.transform = parse(context, transform$1, declaration.transform); this.transformOrigin = parse( context, transformOrigin, - declaration.transformOrigin, + declaration.transformOrigin ); this.visibility = parse(context, visibility, declaration.visibility); this.webkitTextStrokeColor = parse( context, webkitTextStrokeColor, - declaration.webkitTextStrokeColor, + declaration.webkitTextStrokeColor ); this.webkitTextStrokeWidth = parse( context, webkitTextStrokeWidth, - declaration.webkitTextStrokeWidth, + declaration.webkitTextStrokeWidth ); this.wordBreak = parse(context, wordBreak, declaration.wordBreak); this.zIndex = parse(context, zIndex, declaration.zIndex); @@ -8052,12 +8049,12 @@ this.counterIncrement = parse( context, counterIncrement, - declaration.counterIncrement, + declaration.counterIncrement ); this.counterReset = parse( context, counterReset, - declaration.counterReset, + declaration.counterReset ); } return CSSParsedCounterDeclaration; @@ -8076,7 +8073,7 @@ var token = parser.parseComponentValue(); return descriptor.parse( context, - isIdentToken(token) ? token.value : descriptor.initialValue, + isIdentToken(token) ? token.value : descriptor.initialValue ); case 0 /* VALUE */: return descriptor.parse(context, parser.parseComponentValue()); @@ -8137,7 +8134,7 @@ } this.styles = new CSSParsedDeclaration( context, - window.getComputedStyle(element, null), + window.getComputedStyle(element, null) ); if (isHTMLElementNode(element)) { if ( @@ -8230,7 +8227,7 @@ (buffer[i + 3] << 24) | (buffer[i + 2] << 16) | (buffer[i + 1] << 8) | - buffer[i], + buffer[i] ); } return bytes; @@ -8329,7 +8326,7 @@ view32[2], view32[3], index, - data, + data ); }; var Trie = /** @class */ (function () { @@ -8339,7 +8336,7 @@ highStart, highValueIndex, index, - data, + data ) { this.initialValue = initialValue; this.errorValue = errorValue; @@ -8442,7 +8439,7 @@ var extra = str.charCodeAt(i++); if ((extra & 0xfc00) === 0xdc00) { codePoints.push( - ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000, + ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000 ); } else { codePoints.push(value); @@ -8477,7 +8474,7 @@ codePoint -= 0x10000; codeUnits.push( (codePoint >> 10) + 0xd800, - (codePoint % 0x400) + 0xdc00, + (codePoint % 0x400) + 0xdc00 ); } if (index + 1 === length || codeUnits.length > 0x4000) { @@ -8577,13 +8574,13 @@ (graphemeBreak = _graphemeBreakAtIndex( codePoints, classTypes, - ++index, + ++index )) === BREAK_NOT_ALLOWED ) {} if (graphemeBreak !== BREAK_NOT_ALLOWED || index === length) { var value = fromCodePoint.apply( null, - codePoints.slice(lastEnd, index), + codePoints.slice(lastEnd, index) ); lastEnd = index; return { value: value, done: false }; @@ -8714,7 +8711,7 @@ // Firefox 55 does not render inline tags return isGreenPixel(data) ? loadSerializedSVG$1( - createForeignObjectSVG(size, size, 0, 0, node), + createForeignObjectSVG(size, size, 0, 0, node) ) : Promise.reject(false); }) @@ -8834,7 +8831,7 @@ var clientRects = createRange( node, offset, - text.length, + text.length ).getClientRects(); if (clientRects.length > 1) { var subSegments = segmentGraphemes(text); @@ -8848,10 +8845,10 @@ createRange( node, subOffset_1 + offset, - subSegment.length, - ).getClientRects(), - ), - ), + subSegment.length + ).getClientRects() + ) + ) ); subOffset_1 += subSegment.length; }); @@ -8859,14 +8856,14 @@ textBounds.push( new TextBounds( text, - Bounds.fromDOMRectList(context, clientRects), - ), + Bounds.fromDOMRectList(context, clientRects) + ) ); } } else { var replacementNode = node.splitText(text.length); textBounds.push( - new TextBounds(text, getWrapperBounds(context, node)), + new TextBounds(text, getWrapperBounds(context, node)) ); node = replacementNode; } @@ -9090,14 +9087,14 @@ bounds.left + (bounds.width - bounds.height) / 2, bounds.top, bounds.height, - bounds.height, + bounds.height ); } else if (bounds.width < bounds.height) { return new Bounds( bounds.left, bounds.top + (bounds.height - bounds.width) / 2, bounds.width, - bounds.width, + bounds.width ); } return bounds; @@ -9199,7 +9196,7 @@ ) { _this.tree = parseTree( context, - iframe.contentWindow.document.documentElement, + iframe.contentWindow.document.documentElement ); // http://www.w3.org/TR/css3-background/#special-backgrounds var documentBackgroundColor = iframe.contentWindow.document @@ -9207,15 +9204,15 @@ ? parseColor( context, getComputedStyle( - iframe.contentWindow.document.documentElement, - ).backgroundColor, + iframe.contentWindow.document.documentElement + ).backgroundColor ) : COLORS.TRANSPARENT; var bodyBackgroundColor = iframe.contentWindow.document.body ? parseColor( context, getComputedStyle(iframe.contentWindow.document.body) - .backgroundColor, + .backgroundColor ) : COLORS.TRANSPARENT; _this.backgroundColor = isTransparent(documentBackgroundColor) @@ -9240,7 +9237,7 @@ nextNode = childNode.nextSibling; if (isTextNode(childNode) && childNode.data.trim().length > 0) { parent.textNodes.push( - new TextContainer(context, childNode, parent.styles), + new TextContainer(context, childNode, parent.styles) ); } else if (isElementNode(childNode)) { if (isSlotElement(childNode) && childNode.assignedNodes) { @@ -9601,7 +9598,7 @@ max, symbols, fallback, - suffix, + suffix ) { if (value < min || value > max) { return createCounterText(value, fallback, suffix.length > 0); @@ -9620,7 +9617,7 @@ value, codePointRangeLength, isNumeric, - resolver, + resolver ) { var string = ""; do { @@ -9637,7 +9634,7 @@ codePointRangeStart, codePointRangeEnd, isNumeric, - suffix, + suffix ) { var codePointRangeLength = codePointRangeEnd - codePointRangeStart + 1; return ( @@ -9649,9 +9646,9 @@ function (codePoint) { return fromCodePoint$1( Math.floor(codePoint % codePointRangeLength) + - codePointRangeStart, + codePointRangeStart ); - }, + } ) + suffix) ); @@ -9668,7 +9665,7 @@ false, function (codePoint) { return symbols[Math.floor(codePoint % codePointRangeLength)]; - }, + } ) + suffix ); }; @@ -9682,13 +9679,13 @@ multipliers, negativeSign, suffix, - flags, + flags ) { if (value < -9999 || value > 9999) { return createCounterText( value, 4 /* CJK_DECIMAL */, - suffix.length > 0, + suffix.length > 0 ); } var tmp = Math.abs(value); @@ -9751,14 +9748,14 @@ 48, 57, true, - defaultSuffix, + defaultSuffix ); return string.length < 4 ? "0" + string : string; case 4 /* CJK_DECIMAL */: return createCounterStyleFromSymbols( value, "〇一二三四五六七八九", - cjkSuffix, + cjkSuffix ); case 6 /* LOWER_ROMAN */: return createAdditiveCounter( @@ -9767,7 +9764,7 @@ 3999, ROMAN_UPPER, 3 /* DECIMAL */, - defaultSuffix, + defaultSuffix ).toLowerCase(); case 7 /* UPPER_ROMAN */: return createAdditiveCounter( @@ -9776,7 +9773,7 @@ 3999, ROMAN_UPPER, 3 /* DECIMAL */, - defaultSuffix, + defaultSuffix ); case 8 /* LOWER_GREEK */: return createCounterStyleFromRange( @@ -9784,7 +9781,7 @@ 945, 969, false, - defaultSuffix, + defaultSuffix ); case 9 /* LOWER_ALPHA */: return createCounterStyleFromRange( @@ -9792,7 +9789,7 @@ 97, 122, false, - defaultSuffix, + defaultSuffix ); case 10 /* UPPER_ALPHA */: return createCounterStyleFromRange( @@ -9800,7 +9797,7 @@ 65, 90, false, - defaultSuffix, + defaultSuffix ); case 11 /* ARABIC_INDIC */: return createCounterStyleFromRange( @@ -9808,7 +9805,7 @@ 1632, 1641, true, - defaultSuffix, + defaultSuffix ); case 12 /* ARMENIAN */: case 49 /* UPPER_ARMENIAN */: @@ -9818,7 +9815,7 @@ 9999, ARMENIAN, 3 /* DECIMAL */, - defaultSuffix, + defaultSuffix ); case 35 /* LOWER_ARMENIAN */: return createAdditiveCounter( @@ -9827,7 +9824,7 @@ 9999, ARMENIAN, 3 /* DECIMAL */, - defaultSuffix, + defaultSuffix ).toLowerCase(); case 13 /* BENGALI */: return createCounterStyleFromRange( @@ -9835,7 +9832,7 @@ 2534, 2543, true, - defaultSuffix, + defaultSuffix ); case 14 /* CAMBODIAN */: case 30 /* KHMER */: @@ -9844,19 +9841,19 @@ 6112, 6121, true, - defaultSuffix, + defaultSuffix ); case 15 /* CJK_EARTHLY_BRANCH */: return createCounterStyleFromSymbols( value, "子丑寅卯辰巳午未申酉戌亥", - cjkSuffix, + cjkSuffix ); case 16 /* CJK_HEAVENLY_STEM */: return createCounterStyleFromSymbols( value, "甲乙丙丁戊己庚辛壬癸", - cjkSuffix, + cjkSuffix ); case 17 /* CJK_IDEOGRAPHIC */: case 48 /* TRAD_CHINESE_INFORMAL */: @@ -9868,7 +9865,7 @@ cjkSuffix, CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | - CJK_HUNDRED_COEFFICIENTS, + CJK_HUNDRED_COEFFICIENTS ); case 47 /* TRAD_CHINESE_FORMAL */: return createCJKCounter( @@ -9880,7 +9877,7 @@ CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | - CJK_HUNDRED_COEFFICIENTS, + CJK_HUNDRED_COEFFICIENTS ); case 42 /* SIMP_CHINESE_INFORMAL */: return createCJKCounter( @@ -9891,7 +9888,7 @@ cjkSuffix, CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | - CJK_HUNDRED_COEFFICIENTS, + CJK_HUNDRED_COEFFICIENTS ); case 41 /* SIMP_CHINESE_FORMAL */: return createCJKCounter( @@ -9903,7 +9900,7 @@ CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | - CJK_HUNDRED_COEFFICIENTS, + CJK_HUNDRED_COEFFICIENTS ); case 26 /* JAPANESE_INFORMAL */: return createCJKCounter( @@ -9912,7 +9909,7 @@ "十百千万", JAPANESE_NEGATIVE, cjkSuffix, - 0, + 0 ); case 25 /* JAPANESE_FORMAL */: return createCJKCounter( @@ -9921,7 +9918,7 @@ "拾百千万", JAPANESE_NEGATIVE, cjkSuffix, - CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS, + CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS ); case 31 /* KOREAN_HANGUL_FORMAL */: return createCJKCounter( @@ -9930,7 +9927,7 @@ "십백천만", KOREAN_NEGATIVE, koreanSuffix, - CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS, + CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS ); case 33 /* KOREAN_HANJA_INFORMAL */: return createCJKCounter( @@ -9939,7 +9936,7 @@ "十百千萬", KOREAN_NEGATIVE, koreanSuffix, - 0, + 0 ); case 32 /* KOREAN_HANJA_FORMAL */: return createCJKCounter( @@ -9948,7 +9945,7 @@ "拾百千", KOREAN_NEGATIVE, koreanSuffix, - CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS, + CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS ); case 18 /* DEVANAGARI */: return createCounterStyleFromRange( @@ -9956,7 +9953,7 @@ 0x966, 0x96f, true, - defaultSuffix, + defaultSuffix ); case 20 /* GEORGIAN */: return createAdditiveCounter( @@ -9965,7 +9962,7 @@ 19999, GEORGIAN, 3 /* DECIMAL */, - defaultSuffix, + defaultSuffix ); case 21 /* GUJARATI */: return createCounterStyleFromRange( @@ -9973,7 +9970,7 @@ 0xae6, 0xaef, true, - defaultSuffix, + defaultSuffix ); case 22 /* GURMUKHI */: return createCounterStyleFromRange( @@ -9981,7 +9978,7 @@ 0xa66, 0xa6f, true, - defaultSuffix, + defaultSuffix ); case 22 /* HEBREW */: return createAdditiveCounter( @@ -9990,17 +9987,17 @@ 10999, HEBREW, 3 /* DECIMAL */, - defaultSuffix, + defaultSuffix ); case 23 /* HIRAGANA */: return createCounterStyleFromSymbols( value, - "あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん", + "あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん" ); case 24 /* HIRAGANA_IROHA */: return createCounterStyleFromSymbols( value, - "いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす", + "いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす" ); case 27 /* KANNADA */: return createCounterStyleFromRange( @@ -10008,19 +10005,19 @@ 0xce6, 0xcef, true, - defaultSuffix, + defaultSuffix ); case 28 /* KATAKANA */: return createCounterStyleFromSymbols( value, "アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン", - cjkSuffix, + cjkSuffix ); case 29 /* KATAKANA_IROHA */: return createCounterStyleFromSymbols( value, "イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス", - cjkSuffix, + cjkSuffix ); case 34 /* LAO */: return createCounterStyleFromRange( @@ -10028,7 +10025,7 @@ 0xed0, 0xed9, true, - defaultSuffix, + defaultSuffix ); case 37 /* MONGOLIAN */: return createCounterStyleFromRange( @@ -10036,7 +10033,7 @@ 0x1810, 0x1819, true, - defaultSuffix, + defaultSuffix ); case 38 /* MYANMAR */: return createCounterStyleFromRange( @@ -10044,7 +10041,7 @@ 0x1040, 0x1049, true, - defaultSuffix, + defaultSuffix ); case 39 /* ORIYA */: return createCounterStyleFromRange( @@ -10052,7 +10049,7 @@ 0xb66, 0xb6f, true, - defaultSuffix, + defaultSuffix ); case 40 /* PERSIAN */: return createCounterStyleFromRange( @@ -10060,7 +10057,7 @@ 0x6f0, 0x6f9, true, - defaultSuffix, + defaultSuffix ); case 43 /* TAMIL */: return createCounterStyleFromRange( @@ -10068,7 +10065,7 @@ 0xbe6, 0xbef, true, - defaultSuffix, + defaultSuffix ); case 44 /* TELUGU */: return createCounterStyleFromRange( @@ -10076,7 +10073,7 @@ 0xc66, 0xc6f, true, - defaultSuffix, + defaultSuffix ); case 45 /* THAI */: return createCounterStyleFromRange( @@ -10084,7 +10081,7 @@ 0xe50, 0xe59, true, - defaultSuffix, + defaultSuffix ); case 46 /* TIBETAN */: return createCounterStyleFromRange( @@ -10092,7 +10089,7 @@ 0xf20, 0xf29, true, - defaultSuffix, + defaultSuffix ); case 3 /* DECIMAL */: default: @@ -10101,7 +10098,7 @@ 48, 57, true, - defaultSuffix, + defaultSuffix ); } }; @@ -10120,12 +10117,12 @@ } this.documentElement = this.cloneNode( element.ownerDocument.documentElement, - false, + false ); } DocumentCloner.prototype.toIFrame = function ( ownerDocument, - windowSize, + windowSize ) { var _this = this; var iframe = createIFrameContainer(ownerDocument, windowSize); @@ -10154,14 +10151,14 @@ cloneWindow.scrollX !== windowSize.left) ) { this.context.logger.warn( - "Unable to restore scroll position for cloned document", + "Unable to restore scroll position for cloned document" ); this.context.windowBounds = this.context.windowBounds.add( cloneWindow.scrollX - windowSize.left, cloneWindow.scrollY - windowSize.top, 0, - 0, + 0 ); } } @@ -10173,7 +10170,7 @@ Promise.reject( "Error finding the " + this.referenceElement.nodeName + - " in the cloned document", + " in the cloned document" ), ]; } @@ -10210,17 +10207,17 @@ }); documentClone.open(); documentClone.write( - serializeDoctype(document.doctype) + "", + serializeDoctype(document.doctype) + "" ); // Chrome scrolls the parent document for some reason after the write to the cloned window??? restoreOwnerScroll( this.referenceElement.ownerDocument, scrollX, - scrollY, + scrollY ); documentClone.replaceChild( documentClone.adoptNode(this.documentElement), - documentClone.documentElement, + documentClone.documentElement ); documentClone.close(); return iframeLoad; @@ -10268,7 +10265,7 @@ if (sheet && sheet.cssRules) { var css = [].slice.call(sheet.cssRules, 0).reduce(function ( css, - rule, + rule ) { if (rule && typeof rule.cssText === "string") { return css + rule.cssText; @@ -10298,7 +10295,7 @@ } catch (e) { this.context.logger.info( "Unable to inline canvas contents, canvas is tainted", - canvas, + canvas ); } } @@ -10313,7 +10310,7 @@ clonedCtx.putImageData( ctx.getImageData(0, 0, canvas.width, canvas.height), 0, - 0, + 0 ); } else { var gl = @@ -10329,7 +10326,7 @@ ) { this.context.logger.warn( "Unable to clone WebGL context as it has preserveDrawingBuffer=false", - canvas, + canvas ); } } @@ -10340,7 +10337,7 @@ } catch (e) { this.context.logger.info( "Unable to clone canvas as it is tainted", - canvas, + canvas ); } return clonedCanvas; @@ -10361,7 +10358,7 @@ } catch (e) { this.context.logger.info( "Unable to clone video as it is tainted", - video, + video ); } var blankCanvas = video.ownerDocument.createElement("canvas"); @@ -10372,7 +10369,7 @@ DocumentCloner.prototype.appendChildNode = function ( clone, child, - copyStyles, + copyStyles ) { if ( !isElementNode(child) || @@ -10393,7 +10390,7 @@ DocumentCloner.prototype.cloneChildNodes = function ( node, clone, - copyStyles, + copyStyles ) { var _this = this; for ( @@ -10444,13 +10441,13 @@ createPseudoHideStyles(clone); } var counters = this.counters.parse( - new CSSParsedCounterDeclaration(this.context, style), + new CSSParsedCounterDeclaration(this.context, style) ); var before = this.resolvePseudoContent( node, clone, styleBefore, - PseudoElementType.BEFORE, + PseudoElementType.BEFORE ); if (isCustomElement(node)) { copyStyles = true; @@ -10465,7 +10462,7 @@ node, clone, styleAfter, - PseudoElementType.AFTER, + PseudoElementType.AFTER ); if (after) { clone.appendChild(after); @@ -10500,7 +10497,7 @@ node, clone, style, - pseudoElt, + pseudoElt ) { var _this = this; if (!style) { @@ -10518,17 +10515,17 @@ return; } this.counters.parse( - new CSSParsedCounterDeclaration(this.context, style), + new CSSParsedCounterDeclaration(this.context, style) ); var declaration = new CSSParsedPseudoDeclaration(this.context, style); var anonymousReplacedElement = document.createElement( - "html2canvaspseudoelement", + "html2canvaspseudoelement" ); copyCSSStyles(style, anonymousReplacedElement); declaration.content.forEach(function (token) { if (token.type === 0 /* STRING_TOKEN */) { anonymousReplacedElement.appendChild( - document.createTextNode(token.value), + document.createTextNode(token.value) ); } else if (token.type === 22 /* URL_TOKEN */) { var img = document.createElement("img"); @@ -10541,8 +10538,8 @@ if (attr.length) { anonymousReplacedElement.appendChild( document.createTextNode( - node.getAttribute(attr[0].value) || "", - ), + node.getAttribute(attr[0].value) || "" + ) ); } } else if (token.name === "counter") { @@ -10551,7 +10548,7 @@ counterStyle = _a[1]; if (counter && isIdentToken(counter)) { var counterState = _this.counters.getCounterValue( - counter.value, + counter.value ); var counterType = counterStyle && isIdentToken(counterStyle) @@ -10559,8 +10556,8 @@ : 3; /* DECIMAL */ anonymousReplacedElement.appendChild( document.createTextNode( - createCounterText(counterState, counterType, false), - ), + createCounterText(counterState, counterType, false) + ) ); } } else if (token.name === "counters") { @@ -10570,7 +10567,7 @@ counterStyle = _b[2]; if (counter && isIdentToken(counter)) { var counterStates = _this.counters.getCounterValues( - counter.value, + counter.value ); var counterType_1 = counterStyle && isIdentToken(counterStyle) @@ -10586,7 +10583,7 @@ }) .join(separator); anonymousReplacedElement.appendChild( - document.createTextNode(text), + document.createTextNode(text) ); } } else; @@ -10595,21 +10592,21 @@ case "open-quote": anonymousReplacedElement.appendChild( document.createTextNode( - getQuote(declaration.quotes, _this.quoteDepth++, true), - ), + getQuote(declaration.quotes, _this.quoteDepth++, true) + ) ); break; case "close-quote": anonymousReplacedElement.appendChild( document.createTextNode( - getQuote(declaration.quotes, --_this.quoteDepth, false), - ), + getQuote(declaration.quotes, --_this.quoteDepth, false) + ) ); break; default: // safari doesn't parse string tokens correctly because of lack of quotes anonymousReplacedElement.appendChild( - document.createTextNode(token.value), + document.createTextNode(token.value) ); } } @@ -10708,7 +10705,7 @@ if (ignoredStyleProperties.indexOf(property) === -1) { target.style.setProperty( property, - style.getPropertyValue(property), + style.getPropertyValue(property) ); } } @@ -10769,7 +10766,7 @@ "\n ." + PSEUDO_HIDE_ELEMENT_CLASS_AFTER + PSEUDO_AFTER + - PSEUDO_HIDE_ELEMENT_STYLE, + PSEUDO_HIDE_ELEMENT_STYLE ); }; var createStyles = function (body, styles) { @@ -10864,7 +10861,7 @@ _a.label = 2; case 2: this.context.logger.debug( - "Added image " + key.substring(0, 256), + "Added image " + key.substring(0, 256) ); return [ 4 /*yield*/, @@ -10890,7 +10887,7 @@ return reject( "Timed out (" + _this._options.imageTimeout + - "ms) loading image", + "ms) loading image" ); }, _this._options.imageTimeout); } @@ -10929,14 +10926,14 @@ function () { return resolve(reader_1.result); }, - false, + false ); reader_1.addEventListener( "error", function (e) { return reject(e); }, - false, + false ); reader_1.readAsDataURL(xhr.response); } @@ -10945,7 +10942,7 @@ "Failed to proxy resource " + key + " with status code " + - xhr.status, + xhr.status ); } }; @@ -10959,7 +10956,7 @@ "url=" + encodeURIComponent(src) + "&responseType=" + - responseType, + responseType ); if (responseType !== "text" && xhr instanceof XMLHttpRequest) { xhr.responseType = responseType; @@ -10969,7 +10966,7 @@ xhr.timeout = timeout_1; xhr.ontimeout = function () { return reject( - "Timed out (" + timeout_1 + "ms) proxying " + key, + "Timed out (" + timeout_1 + "ms) proxying " + key ); }; } @@ -11036,7 +11033,7 @@ this.start.add(deltaX, deltaY), this.startControl.add(deltaX, deltaY), this.endControl.add(deltaX, deltaY), - this.end.add(deltaX, deltaY), + this.end.add(deltaX, deltaY) ); }; BezierCurve.prototype.reverse = function () { @@ -11044,7 +11041,7 @@ this.end, this.endControl, this.startControl, - this.start, + this.start ); }; return BezierCurve; @@ -11060,28 +11057,28 @@ var _a = getAbsoluteValueForTuple( styles.borderTopLeftRadius, bounds.width, - bounds.height, + bounds.height ), tlh = _a[0], tlv = _a[1]; var _b = getAbsoluteValueForTuple( styles.borderTopRightRadius, bounds.width, - bounds.height, + bounds.height ), trh = _b[0], trv = _b[1]; var _c = getAbsoluteValueForTuple( styles.borderBottomRightRadius, bounds.width, - bounds.height, + bounds.height ), brh = _c[0], brv = _c[1]; var _d = getAbsoluteValueForTuple( styles.borderBottomLeftRadius, bounds.width, - bounds.height, + bounds.height ), blh = _d[0], blv = _d[1]; @@ -11111,19 +11108,19 @@ var borderLeftWidth = styles.borderLeftWidth; var paddingTop = getAbsoluteValue( styles.paddingTop, - element.bounds.width, + element.bounds.width ); var paddingRight = getAbsoluteValue( styles.paddingRight, - element.bounds.width, + element.bounds.width ); var paddingBottom = getAbsoluteValue( styles.paddingBottom, - element.bounds.width, + element.bounds.width ); var paddingLeft = getAbsoluteValue( styles.paddingLeft, - element.bounds.width, + element.bounds.width ); this.topLeftBorderDoubleOuterBox = tlh > 0 || tlv > 0 @@ -11132,11 +11129,11 @@ bounds.top + borderTopWidth / 3, tlh - borderLeftWidth / 3, tlv - borderTopWidth / 3, - CORNER.TOP_LEFT, + CORNER.TOP_LEFT ) : new Vector( bounds.left + borderLeftWidth / 3, - bounds.top + borderTopWidth / 3, + bounds.top + borderTopWidth / 3 ); this.topRightBorderDoubleOuterBox = tlh > 0 || tlv > 0 @@ -11145,11 +11142,11 @@ bounds.top + borderTopWidth / 3, trh - borderRightWidth / 3, trv - borderTopWidth / 3, - CORNER.TOP_RIGHT, + CORNER.TOP_RIGHT ) : new Vector( bounds.left + bounds.width - borderRightWidth / 3, - bounds.top + borderTopWidth / 3, + bounds.top + borderTopWidth / 3 ); this.bottomRightBorderDoubleOuterBox = brh > 0 || brv > 0 @@ -11158,11 +11155,11 @@ bounds.top + rightHeight, brh - borderRightWidth / 3, brv - borderBottomWidth / 3, - CORNER.BOTTOM_RIGHT, + CORNER.BOTTOM_RIGHT ) : new Vector( bounds.left + bounds.width - borderRightWidth / 3, - bounds.top + bounds.height - borderBottomWidth / 3, + bounds.top + bounds.height - borderBottomWidth / 3 ); this.bottomLeftBorderDoubleOuterBox = blh > 0 || blv > 0 @@ -11171,11 +11168,11 @@ bounds.top + leftHeight, blh - borderLeftWidth / 3, blv - borderBottomWidth / 3, - CORNER.BOTTOM_LEFT, + CORNER.BOTTOM_LEFT ) : new Vector( bounds.left + borderLeftWidth / 3, - bounds.top + bounds.height - borderBottomWidth / 3, + bounds.top + bounds.height - borderBottomWidth / 3 ); this.topLeftBorderDoubleInnerBox = tlh > 0 || tlv > 0 @@ -11184,11 +11181,11 @@ bounds.top + (borderTopWidth * 2) / 3, tlh - (borderLeftWidth * 2) / 3, tlv - (borderTopWidth * 2) / 3, - CORNER.TOP_LEFT, + CORNER.TOP_LEFT ) : new Vector( bounds.left + (borderLeftWidth * 2) / 3, - bounds.top + (borderTopWidth * 2) / 3, + bounds.top + (borderTopWidth * 2) / 3 ); this.topRightBorderDoubleInnerBox = tlh > 0 || tlv > 0 @@ -11197,11 +11194,11 @@ bounds.top + (borderTopWidth * 2) / 3, trh - (borderRightWidth * 2) / 3, trv - (borderTopWidth * 2) / 3, - CORNER.TOP_RIGHT, + CORNER.TOP_RIGHT ) : new Vector( bounds.left + bounds.width - (borderRightWidth * 2) / 3, - bounds.top + (borderTopWidth * 2) / 3, + bounds.top + (borderTopWidth * 2) / 3 ); this.bottomRightBorderDoubleInnerBox = brh > 0 || brv > 0 @@ -11210,11 +11207,11 @@ bounds.top + rightHeight, brh - (borderRightWidth * 2) / 3, brv - (borderBottomWidth * 2) / 3, - CORNER.BOTTOM_RIGHT, + CORNER.BOTTOM_RIGHT ) : new Vector( bounds.left + bounds.width - (borderRightWidth * 2) / 3, - bounds.top + bounds.height - (borderBottomWidth * 2) / 3, + bounds.top + bounds.height - (borderBottomWidth * 2) / 3 ); this.bottomLeftBorderDoubleInnerBox = blh > 0 || blv > 0 @@ -11223,11 +11220,11 @@ bounds.top + leftHeight, blh - (borderLeftWidth * 2) / 3, blv - (borderBottomWidth * 2) / 3, - CORNER.BOTTOM_LEFT, + CORNER.BOTTOM_LEFT ) : new Vector( bounds.left + (borderLeftWidth * 2) / 3, - bounds.top + bounds.height - (borderBottomWidth * 2) / 3, + bounds.top + bounds.height - (borderBottomWidth * 2) / 3 ); this.topLeftBorderStroke = tlh > 0 || tlv > 0 @@ -11236,11 +11233,11 @@ bounds.top + borderTopWidth / 2, tlh - borderLeftWidth / 2, tlv - borderTopWidth / 2, - CORNER.TOP_LEFT, + CORNER.TOP_LEFT ) : new Vector( bounds.left + borderLeftWidth / 2, - bounds.top + borderTopWidth / 2, + bounds.top + borderTopWidth / 2 ); this.topRightBorderStroke = tlh > 0 || tlv > 0 @@ -11249,11 +11246,11 @@ bounds.top + borderTopWidth / 2, trh - borderRightWidth / 2, trv - borderTopWidth / 2, - CORNER.TOP_RIGHT, + CORNER.TOP_RIGHT ) : new Vector( bounds.left + bounds.width - borderRightWidth / 2, - bounds.top + borderTopWidth / 2, + bounds.top + borderTopWidth / 2 ); this.bottomRightBorderStroke = brh > 0 || brv > 0 @@ -11262,11 +11259,11 @@ bounds.top + rightHeight, brh - borderRightWidth / 2, brv - borderBottomWidth / 2, - CORNER.BOTTOM_RIGHT, + CORNER.BOTTOM_RIGHT ) : new Vector( bounds.left + bounds.width - borderRightWidth / 2, - bounds.top + bounds.height - borderBottomWidth / 2, + bounds.top + bounds.height - borderBottomWidth / 2 ); this.bottomLeftBorderStroke = blh > 0 || blv > 0 @@ -11275,11 +11272,11 @@ bounds.top + leftHeight, blh - borderLeftWidth / 2, blv - borderBottomWidth / 2, - CORNER.BOTTOM_LEFT, + CORNER.BOTTOM_LEFT ) : new Vector( bounds.left + borderLeftWidth / 2, - bounds.top + bounds.height - borderBottomWidth / 2, + bounds.top + bounds.height - borderBottomWidth / 2 ); this.topLeftBorderBox = tlh > 0 || tlv > 0 @@ -11288,7 +11285,7 @@ bounds.top, tlh, tlv, - CORNER.TOP_LEFT, + CORNER.TOP_LEFT ) : new Vector(bounds.left, bounds.top); this.topRightBorderBox = @@ -11298,7 +11295,7 @@ bounds.top, trh, trv, - CORNER.TOP_RIGHT, + CORNER.TOP_RIGHT ) : new Vector(bounds.left + bounds.width, bounds.top); this.bottomRightBorderBox = @@ -11308,11 +11305,11 @@ bounds.top + rightHeight, brh, brv, - CORNER.BOTTOM_RIGHT, + CORNER.BOTTOM_RIGHT ) : new Vector( bounds.left + bounds.width, - bounds.top + bounds.height, + bounds.top + bounds.height ); this.bottomLeftBorderBox = blh > 0 || blv > 0 @@ -11321,7 +11318,7 @@ bounds.top + leftHeight, blh, blv, - CORNER.BOTTOM_LEFT, + CORNER.BOTTOM_LEFT ) : new Vector(bounds.left, bounds.top + bounds.height); this.topLeftPaddingBox = @@ -11331,11 +11328,11 @@ bounds.top + borderTopWidth, Math.max(0, tlh - borderLeftWidth), Math.max(0, tlv - borderTopWidth), - CORNER.TOP_LEFT, + CORNER.TOP_LEFT ) : new Vector( bounds.left + borderLeftWidth, - bounds.top + borderTopWidth, + bounds.top + borderTopWidth ); this.topRightPaddingBox = trh > 0 || trv > 0 @@ -11347,11 +11344,11 @@ ? 0 : Math.max(0, trh - borderRightWidth), Math.max(0, trv - borderTopWidth), - CORNER.TOP_RIGHT, + CORNER.TOP_RIGHT ) : new Vector( bounds.left + bounds.width - borderRightWidth, - bounds.top + borderTopWidth, + bounds.top + borderTopWidth ); this.bottomRightPaddingBox = brh > 0 || brv > 0 @@ -11362,11 +11359,11 @@ Math.min(rightHeight, bounds.height - borderBottomWidth), Math.max(0, brh - borderRightWidth), Math.max(0, brv - borderBottomWidth), - CORNER.BOTTOM_RIGHT, + CORNER.BOTTOM_RIGHT ) : new Vector( bounds.left + bounds.width - borderRightWidth, - bounds.top + bounds.height - borderBottomWidth, + bounds.top + bounds.height - borderBottomWidth ); this.bottomLeftPaddingBox = blh > 0 || blv > 0 @@ -11376,11 +11373,11 @@ Math.min(leftHeight, bounds.height - borderBottomWidth), Math.max(0, blh - borderLeftWidth), Math.max(0, blv - borderBottomWidth), - CORNER.BOTTOM_LEFT, + CORNER.BOTTOM_LEFT ) : new Vector( bounds.left + borderLeftWidth, - bounds.top + bounds.height - borderBottomWidth, + bounds.top + bounds.height - borderBottomWidth ); this.topLeftContentBox = tlh > 0 || tlv > 0 @@ -11389,11 +11386,11 @@ bounds.top + borderTopWidth + paddingTop, Math.max(0, tlh - (borderLeftWidth + paddingLeft)), Math.max(0, tlv - (borderTopWidth + paddingTop)), - CORNER.TOP_LEFT, + CORNER.TOP_LEFT ) : new Vector( bounds.left + borderLeftWidth + paddingLeft, - bounds.top + borderTopWidth + paddingTop, + bounds.top + borderTopWidth + paddingTop ); this.topRightContentBox = trh > 0 || trv > 0 @@ -11401,20 +11398,20 @@ bounds.left + Math.min( topWidth, - bounds.width + borderLeftWidth + paddingLeft, + bounds.width + borderLeftWidth + paddingLeft ), bounds.top + borderTopWidth + paddingTop, topWidth > bounds.width + borderLeftWidth + paddingLeft ? 0 : trh - borderLeftWidth + paddingLeft, trv - (borderTopWidth + paddingTop), - CORNER.TOP_RIGHT, + CORNER.TOP_RIGHT ) : new Vector( bounds.left + bounds.width - (borderRightWidth + paddingRight), - bounds.top + borderTopWidth + paddingTop, + bounds.top + borderTopWidth + paddingTop ); this.bottomRightContentBox = brh > 0 || brv > 0 @@ -11422,16 +11419,16 @@ bounds.left + Math.min( bottomWidth, - bounds.width - (borderLeftWidth + paddingLeft), + bounds.width - (borderLeftWidth + paddingLeft) ), bounds.top + Math.min( rightHeight, - bounds.height + borderTopWidth + paddingTop, + bounds.height + borderTopWidth + paddingTop ), Math.max(0, brh - (borderRightWidth + paddingRight)), brv - (borderBottomWidth + paddingBottom), - CORNER.BOTTOM_RIGHT, + CORNER.BOTTOM_RIGHT ) : new Vector( bounds.left + @@ -11439,7 +11436,7 @@ (borderRightWidth + paddingRight), bounds.top + bounds.height - - (borderBottomWidth + paddingBottom), + (borderBottomWidth + paddingBottom) ); this.bottomLeftContentBox = blh > 0 || blv > 0 @@ -11448,13 +11445,13 @@ bounds.top + leftHeight, Math.max(0, blh - (borderLeftWidth + paddingLeft)), blv - (borderBottomWidth + paddingBottom), - CORNER.BOTTOM_LEFT, + CORNER.BOTTOM_LEFT ) : new Vector( bounds.left + borderLeftWidth + paddingLeft, bounds.top + bounds.height - - (borderBottomWidth + paddingBottom), + (borderBottomWidth + paddingBottom) ); } return BoundCurves; @@ -11478,21 +11475,21 @@ new Vector(x, ym), new Vector(x, ym - oy), new Vector(xm - ox, y), - new Vector(xm, y), + new Vector(xm, y) ); case CORNER.TOP_RIGHT: return new BezierCurve( new Vector(x, y), new Vector(x + ox, y), new Vector(xm, ym - oy), - new Vector(xm, ym), + new Vector(xm, ym) ); case CORNER.BOTTOM_RIGHT: return new BezierCurve( new Vector(xm, y), new Vector(xm, y + oy), new Vector(x + ox, ym), - new Vector(x, ym), + new Vector(x, ym) ); case CORNER.BOTTOM_LEFT: default: @@ -11500,7 +11497,7 @@ new Vector(xm, ym), new Vector(xm - ox, ym), new Vector(x, y + oy), - new Vector(x, y), + new Vector(x, y) ); } }; @@ -11628,12 +11625,12 @@ this.effects.push( new ClipEffect( borderBox, - 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */, - ), + 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */ + ) ); } else { this.effects.push( - new ClipEffect(borderBox, 2 /* BACKGROUND_BORDERS */), + new ClipEffect(borderBox, 2 /* BACKGROUND_BORDERS */) ); this.effects.push(new ClipEffect(paddingBox, 4 /* CONTENT */)); } @@ -11642,7 +11639,7 @@ ElementPaint.prototype.getEffects = function (target) { var inFlow = [2 /* ABSOLUTE */, 3 /* FIXED */].indexOf( - this.container.styles.position, + this.container.styles.position ) === -1; var parent = this.parent; var effects = this.effects.slice(0); @@ -11658,7 +11655,7 @@ effects.unshift.apply(effects, croplessEffects); inFlow = [2 /* ABSOLUTE */, 3 /* FIXED */].indexOf( - parent.container.styles.position, + parent.container.styles.position ) === -1; if (parent.container.styles.overflowX !== 0 /* VISIBLE */) { var borderBox = calculateBorderBoxPath(parent.curves); @@ -11667,8 +11664,8 @@ effects.unshift( new ClipEffect( paddingBox, - 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */, - ), + 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */ + ) ); } } @@ -11687,16 +11684,16 @@ parent, stackingContext, realStackingContext, - listItems, + listItems ) { parent.container.elements.forEach(function (child) { var treatAsRealStackingContext = contains( child.flags, - 4 /* CREATES_REAL_STACKING_CONTEXT */, + 4 /* CREATES_REAL_STACKING_CONTEXT */ ); var createsStackingContext = contains( child.flags, - 2 /* CREATES_STACKING_CONTEXT */, + 2 /* CREATES_STACKING_CONTEXT */ ); var paintContainer = new ElementPaint(child, parent); if (contains(child.styles.display, 2048 /* LIST_ITEM */)) { @@ -11757,7 +11754,7 @@ paintContainer, stack, treatAsRealStackingContext ? stack : realStackingContext, - listOwnerItems, + listOwnerItems ); } else { if (child.styles.isInlineLevel()) { @@ -11769,7 +11766,7 @@ paintContainer, stackingContext, realStackingContext, - listOwnerItems, + listOwnerItems ); } if (contains(child.flags, 8 /* IS_LIST_OWNER */)) { @@ -11793,7 +11790,7 @@ item.listValue = createCounterText( numbering, item.container.styles.listStyleType, - true, + true ); numbering += reversed ? -1 : 1; } @@ -11814,21 +11811,21 @@ curves.topLeftBorderBox, curves.topLeftPaddingBox, curves.topRightBorderBox, - curves.topRightPaddingBox, + curves.topRightPaddingBox ); case 1: return createPathFromCurves( curves.topRightBorderBox, curves.topRightPaddingBox, curves.bottomRightBorderBox, - curves.bottomRightPaddingBox, + curves.bottomRightPaddingBox ); case 2: return createPathFromCurves( curves.bottomRightBorderBox, curves.bottomRightPaddingBox, curves.bottomLeftBorderBox, - curves.bottomLeftPaddingBox, + curves.bottomLeftPaddingBox ); case 3: default: @@ -11836,7 +11833,7 @@ curves.bottomLeftBorderBox, curves.bottomLeftPaddingBox, curves.topLeftBorderBox, - curves.topLeftPaddingBox, + curves.topLeftPaddingBox ); } }; @@ -11847,21 +11844,21 @@ curves.topLeftBorderBox, curves.topLeftBorderDoubleOuterBox, curves.topRightBorderBox, - curves.topRightBorderDoubleOuterBox, + curves.topRightBorderDoubleOuterBox ); case 1: return createPathFromCurves( curves.topRightBorderBox, curves.topRightBorderDoubleOuterBox, curves.bottomRightBorderBox, - curves.bottomRightBorderDoubleOuterBox, + curves.bottomRightBorderDoubleOuterBox ); case 2: return createPathFromCurves( curves.bottomRightBorderBox, curves.bottomRightBorderDoubleOuterBox, curves.bottomLeftBorderBox, - curves.bottomLeftBorderDoubleOuterBox, + curves.bottomLeftBorderDoubleOuterBox ); case 3: default: @@ -11869,7 +11866,7 @@ curves.bottomLeftBorderBox, curves.bottomLeftBorderDoubleOuterBox, curves.topLeftBorderBox, - curves.topLeftBorderDoubleOuterBox, + curves.topLeftBorderDoubleOuterBox ); } }; @@ -11880,21 +11877,21 @@ curves.topLeftBorderDoubleInnerBox, curves.topLeftPaddingBox, curves.topRightBorderDoubleInnerBox, - curves.topRightPaddingBox, + curves.topRightPaddingBox ); case 1: return createPathFromCurves( curves.topRightBorderDoubleInnerBox, curves.topRightPaddingBox, curves.bottomRightBorderDoubleInnerBox, - curves.bottomRightPaddingBox, + curves.bottomRightPaddingBox ); case 2: return createPathFromCurves( curves.bottomRightBorderDoubleInnerBox, curves.bottomRightPaddingBox, curves.bottomLeftBorderDoubleInnerBox, - curves.bottomLeftPaddingBox, + curves.bottomLeftPaddingBox ); case 3: default: @@ -11902,7 +11899,7 @@ curves.bottomLeftBorderDoubleInnerBox, curves.bottomLeftPaddingBox, curves.topLeftBorderDoubleInnerBox, - curves.topLeftPaddingBox, + curves.topLeftPaddingBox ); } }; @@ -11911,23 +11908,23 @@ case 0: return createStrokePathFromCurves( curves.topLeftBorderStroke, - curves.topRightBorderStroke, + curves.topRightBorderStroke ); case 1: return createStrokePathFromCurves( curves.topRightBorderStroke, - curves.bottomRightBorderStroke, + curves.bottomRightBorderStroke ); case 2: return createStrokePathFromCurves( curves.bottomRightBorderStroke, - curves.bottomLeftBorderStroke, + curves.bottomLeftBorderStroke ); case 3: default: return createStrokePathFromCurves( curves.bottomLeftBorderStroke, - curves.topLeftBorderStroke, + curves.topLeftBorderStroke ); } }; @@ -11977,7 +11974,7 @@ styles.borderLeftWidth, styles.borderTopWidth, -(styles.borderRightWidth + styles.borderLeftWidth), - -(styles.borderTopWidth + styles.borderBottomWidth), + -(styles.borderTopWidth + styles.borderBottomWidth) ); }; var contentBox = function (element) { @@ -11988,7 +11985,7 @@ var paddingTop = getAbsoluteValue(styles.paddingTop, bounds.width); var paddingBottom = getAbsoluteValue( styles.paddingBottom, - bounds.width, + bounds.width ); return bounds.add( paddingLeft + styles.borderLeftWidth, @@ -12004,13 +12001,13 @@ styles.borderBottomWidth + paddingTop + paddingBottom - ), + ) ); }; var calculateBackgroundPositioningArea = function ( backgroundOrigin, - element, + element ) { if (backgroundOrigin === 0 /* BORDER_BOX */) { return element.bounds; @@ -12032,37 +12029,37 @@ var calculateBackgroundRendering = function ( container, index, - intrinsicSize, + intrinsicSize ) { var backgroundPositioningArea = calculateBackgroundPositioningArea( getBackgroundValueForIndex(container.styles.backgroundOrigin, index), - container, + container ); var backgroundPaintingArea = calculateBackgroundPaintingArea( getBackgroundValueForIndex(container.styles.backgroundClip, index), - container, + container ); var backgroundImageSize = calculateBackgroundSize( getBackgroundValueForIndex(container.styles.backgroundSize, index), intrinsicSize, - backgroundPositioningArea, + backgroundPositioningArea ); var sizeWidth = backgroundImageSize[0], sizeHeight = backgroundImageSize[1]; var position = getAbsoluteValueForTuple( getBackgroundValueForIndex( container.styles.backgroundPosition, - index, + index ), backgroundPositioningArea.width - sizeWidth, - backgroundPositioningArea.height - sizeHeight, + backgroundPositioningArea.height - sizeHeight ); var path = calculateBackgroundRepeatPath( getBackgroundValueForIndex(container.styles.backgroundRepeat, index), position, backgroundImageSize, backgroundPositioningArea, - backgroundPaintingArea, + backgroundPaintingArea ); var offsetX = Math.round(backgroundPositioningArea.left + position[0]); var offsetY = Math.round(backgroundPositioningArea.top + position[1]); @@ -12193,7 +12190,7 @@ _a, _b, backgroundPositioningArea, - backgroundPaintingArea, + backgroundPaintingArea ) { var x = _a[0], y = _a[1]; @@ -12204,96 +12201,96 @@ return [ new Vector( Math.round(backgroundPositioningArea.left), - Math.round(backgroundPositioningArea.top + y), + Math.round(backgroundPositioningArea.top + y) ), new Vector( Math.round( backgroundPositioningArea.left + - backgroundPositioningArea.width, + backgroundPositioningArea.width ), - Math.round(backgroundPositioningArea.top + y), + Math.round(backgroundPositioningArea.top + y) ), new Vector( Math.round( backgroundPositioningArea.left + - backgroundPositioningArea.width, + backgroundPositioningArea.width ), - Math.round(height + backgroundPositioningArea.top + y), + Math.round(height + backgroundPositioningArea.top + y) ), new Vector( Math.round(backgroundPositioningArea.left), - Math.round(height + backgroundPositioningArea.top + y), + Math.round(height + backgroundPositioningArea.top + y) ), ]; case 3 /* REPEAT_Y */: return [ new Vector( Math.round(backgroundPositioningArea.left + x), - Math.round(backgroundPositioningArea.top), + Math.round(backgroundPositioningArea.top) ), new Vector( Math.round(backgroundPositioningArea.left + x + width), - Math.round(backgroundPositioningArea.top), + Math.round(backgroundPositioningArea.top) ), new Vector( Math.round(backgroundPositioningArea.left + x + width), Math.round( backgroundPositioningArea.height + - backgroundPositioningArea.top, - ), + backgroundPositioningArea.top + ) ), new Vector( Math.round(backgroundPositioningArea.left + x), Math.round( backgroundPositioningArea.height + - backgroundPositioningArea.top, - ), + backgroundPositioningArea.top + ) ), ]; case 1 /* NO_REPEAT */: return [ new Vector( Math.round(backgroundPositioningArea.left + x), - Math.round(backgroundPositioningArea.top + y), + Math.round(backgroundPositioningArea.top + y) ), new Vector( Math.round(backgroundPositioningArea.left + x + width), - Math.round(backgroundPositioningArea.top + y), + Math.round(backgroundPositioningArea.top + y) ), new Vector( Math.round(backgroundPositioningArea.left + x + width), - Math.round(backgroundPositioningArea.top + y + height), + Math.round(backgroundPositioningArea.top + y + height) ), new Vector( Math.round(backgroundPositioningArea.left + x), - Math.round(backgroundPositioningArea.top + y + height), + Math.round(backgroundPositioningArea.top + y + height) ), ]; default: return [ new Vector( Math.round(backgroundPaintingArea.left), - Math.round(backgroundPaintingArea.top), + Math.round(backgroundPaintingArea.top) ), new Vector( Math.round( - backgroundPaintingArea.left + backgroundPaintingArea.width, + backgroundPaintingArea.left + backgroundPaintingArea.width ), - Math.round(backgroundPaintingArea.top), + Math.round(backgroundPaintingArea.top) ), new Vector( Math.round( - backgroundPaintingArea.left + backgroundPaintingArea.width, + backgroundPaintingArea.left + backgroundPaintingArea.width ), Math.round( - backgroundPaintingArea.height + backgroundPaintingArea.top, - ), + backgroundPaintingArea.height + backgroundPaintingArea.top + ) ), new Vector( Math.round(backgroundPaintingArea.left), Math.round( - backgroundPaintingArea.height + backgroundPaintingArea.top, - ), + backgroundPaintingArea.height + backgroundPaintingArea.top + ) ), ]; } @@ -12387,7 +12384,7 @@ "x" + options.height + ") with scale " + - options.scale, + options.scale ); return _this; } @@ -12413,7 +12410,7 @@ effect.matrix[2], effect.matrix[3], effect.matrix[4], - effect.matrix[5], + effect.matrix[5] ); this.ctx.translate(-effect.offsetX, -effect.offsetY); } @@ -12474,14 +12471,14 @@ CanvasRenderer.prototype.renderTextWithLetterSpacing = function ( text, letterSpacing, - baseline, + baseline ) { var _this = this; if (letterSpacing === 0) { this.ctx.fillText( text.text, text.bounds.left, - text.bounds.top + baseline, + text.bounds.top + baseline ); } else { var letters = segmentGraphemes(text.text); @@ -12546,7 +12543,7 @@ _this.renderTextWithLetterSpacing( text, styles.letterSpacing, - baseline, + baseline ); var textShadows = styles.textShadow; if (textShadows.length && text.text.trim().length) { @@ -12563,7 +12560,7 @@ _this.renderTextWithLetterSpacing( text, styles.letterSpacing, - baseline, + baseline ); }); _this.ctx.shadowColor = ""; @@ -12573,7 +12570,7 @@ } if (styles.textDecorationLine.length) { _this.ctx.fillStyle = asString( - styles.textDecorationColor || styles.color, + styles.textDecorationColor || styles.color ); styles.textDecorationLine.forEach( function (textDecorationLine) { @@ -12586,7 +12583,7 @@ text.bounds.left, Math.round(text.bounds.top + baseline), text.bounds.width, - 1, + 1 ); break; case 2 /* OVERLINE */: @@ -12594,7 +12591,7 @@ text.bounds.left, Math.round(text.bounds.top), text.bounds.width, - 1, + 1 ); break; case 3 /* LINE_THROUGH */: @@ -12603,11 +12600,11 @@ text.bounds.left, Math.ceil(text.bounds.top + middle), text.bounds.width, - 1, + 1 ); break; } - }, + } ); } break; @@ -12617,7 +12614,7 @@ text.text.trim().length ) { _this.ctx.strokeStyle = asString( - styles.webkitTextStrokeColor, + styles.webkitTextStrokeColor ); _this.ctx.lineWidth = styles.webkitTextStrokeWidth; // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -12627,7 +12624,7 @@ _this.ctx.strokeText( text.text, text.bounds.left, - text.bounds.top + baseline, + text.bounds.top + baseline ); } _this.ctx.strokeStyle = ""; @@ -12644,7 +12641,7 @@ CanvasRenderer.prototype.renderReplacedElement = function ( container, curves, - image, + image ) { if ( image && @@ -12665,7 +12662,7 @@ box.left, box.top, box.width, - box.height, + box.height ); this.ctx.restore(); } @@ -12728,7 +12725,7 @@ case 7: _c.sent(); this.context.logger.error( - "Error loading image " + container.src, + "Error loading image " + container.src ); return [3 /*break*/, 8]; case 8: @@ -12736,7 +12733,7 @@ this.renderReplacedElement( container, curves, - container.canvas, + container.canvas ); } if (!(container instanceof SVGElementContainer)) @@ -12752,7 +12749,7 @@ case 11: _c.sent(); this.context.logger.error( - "Error loading svg " + container.svg.substring(0, 255), + "Error loading svg " + container.svg.substring(0, 255) ); return [3 /*break*/, 12]; case 12: @@ -12784,7 +12781,7 @@ container.bounds.left, container.bounds.top, container.bounds.width, - container.bounds.height, + container.bounds.height ); } _c.label = 14; @@ -12792,7 +12789,7 @@ if (container instanceof InputElementContainer) { size = Math.min( container.bounds.width, - container.bounds.height, + container.bounds.height ); if (container.type === CHECKBOX) { if (container.checked) { @@ -12800,31 +12797,31 @@ this.path([ new Vector( container.bounds.left + size * 0.39363, - container.bounds.top + size * 0.79, + container.bounds.top + size * 0.79 ), new Vector( container.bounds.left + size * 0.16, - container.bounds.top + size * 0.5549, + container.bounds.top + size * 0.5549 ), new Vector( container.bounds.left + size * 0.27347, - container.bounds.top + size * 0.44071, + container.bounds.top + size * 0.44071 ), new Vector( container.bounds.left + size * 0.39694, - container.bounds.top + size * 0.5649, + container.bounds.top + size * 0.5649 ), new Vector( container.bounds.left + size * 0.72983, - container.bounds.top + size * 0.23, + container.bounds.top + size * 0.23 ), new Vector( container.bounds.left + size * 0.84, - container.bounds.top + size * 0.34085, + container.bounds.top + size * 0.34085 ), new Vector( container.bounds.left + size * 0.39363, - container.bounds.top + size * 0.79, + container.bounds.top + size * 0.79 ), ]); this.ctx.fillStyle = asString(INPUT_COLOR); @@ -12841,7 +12838,7 @@ size / 4, 0, Math.PI * 2, - true, + true ); this.ctx.fillStyle = asString(INPUT_COLOR); this.ctx.fill(); @@ -12855,13 +12852,13 @@ (fontSize = _b[1]); baseline = this.fontMetrics.getMetrics( fontFamily, - fontSize, + fontSize ).baseline; this.ctx.font = fontFamily; this.ctx.fillStyle = asString(styles.color); this.ctx.textBaseline = "alphabetic"; this.ctx.textAlign = canvasTextAlign( - container.styles.textAlign, + container.styles.textAlign ); bounds = contentBox(container); x = 0; @@ -12880,7 +12877,7 @@ new Vector(bounds.left + bounds.width, bounds.top), new Vector( bounds.left + bounds.width, - bounds.top + bounds.height, + bounds.top + bounds.height ), new Vector(bounds.left, bounds.top + bounds.height), ]); @@ -12888,7 +12885,7 @@ this.renderTextWithLetterSpacing( new TextBounds(container.value, textBounds), styles.letterSpacing, - baseline, + baseline ); this.ctx.restore(); this.ctx.textBaseline = "alphabetic"; @@ -12911,13 +12908,13 @@ this.ctx.drawImage( image, container.bounds.left - (image.width + 10), - container.bounds.top, + container.bounds.top ); return [3 /*break*/, 18]; case 17: _c.sent(); this.context.logger.error( - "Error loading list-style-image " + url, + "Error loading list-style-image " + url ); return [3 /*break*/, 18]; case 18: @@ -12937,25 +12934,25 @@ container.bounds.top + getAbsoluteValue( container.styles.paddingTop, - container.bounds.width, + container.bounds.width ), container.bounds.width, computeLineHeight( styles.lineHeight, - styles.fontSize.number, + styles.fontSize.number ) / 2 + - 1, + 1 ); this.renderTextWithLetterSpacing( new TextBounds(paint.listValue, bounds), styles.letterSpacing, computeLineHeight( styles.lineHeight, - styles.fontSize.number, + styles.fontSize.number ) / 2 + - 2, + 2 ); this.ctx.textBaseline = "bottom"; this.ctx.textAlign = "left"; @@ -12996,7 +12993,7 @@ if ( contains( stack.element.container.flags, - 16 /* DEBUG_RENDER */, + 16 /* DEBUG_RENDER */ ) ) { debugger; @@ -13143,7 +13140,7 @@ point.endControl.x, point.endControl.y, point.end.x, - point.end.y, + point.end.y ); } }); @@ -13152,7 +13149,7 @@ path, pattern, offsetX, - offsetY, + offsetY ) { this.path(path); this.ctx.fillStyle = pattern; @@ -13182,7 +13179,7 @@ 0, 0, width, - height, + height ); return canvas; }; @@ -13253,7 +13250,7 @@ case 3: _h.sent(); this_1.context.logger.error( - "Error loading background-image " + url, + "Error loading background-image " + url ); return [3 /*break*/, 4]; case 4: @@ -13265,7 +13262,7 @@ image.width, image.height, image.width / image.height, - ], + ] )), (path = _c[0]), (x = _c[1]), @@ -13274,7 +13271,7 @@ (height = _c[4]); pattern = this_1.ctx.createPattern( this_1.resizeImage(image, width, height), - "repeat", + "repeat" ); this_1.renderRepeat(path, pattern, x, y); } @@ -13284,7 +13281,7 @@ (_d = calculateBackgroundRendering( container, index, - [null, null, null], + [null, null, null] )), (path = _d[0]), (x = _d[1]), @@ -13294,7 +13291,7 @@ (_e = calculateGradientDirection( backgroundImage.angle, width, - height, + height )), (lineLength = _e[0]), (x0 = _e[1]), @@ -13309,15 +13306,15 @@ x0, y0, x1, - y1, + y1 ); processColorStops( backgroundImage.stops, - lineLength, + lineLength ).forEach(function (colorStop) { return gradient_1.addColorStop( colorStop.stop, - asString(colorStop.color), + asString(colorStop.color) ); }); ctx.fillStyle = gradient_1; @@ -13325,7 +13322,7 @@ if (width > 0 && height > 0) { pattern = this_1.ctx.createPattern( canvas, - "repeat", + "repeat" ); this_1.renderRepeat(path, pattern, x, y); } @@ -13333,7 +13330,7 @@ (_f = calculateBackgroundRendering( container, index, - [null, null, null], + [null, null, null] )), (path = _f[0]), (left = _f[1]), @@ -13347,14 +13344,14 @@ x = getAbsoluteValue(position[0], width); y = getAbsoluteValue( position[position.length - 1], - height, + height ); (_g = calculateRadius( backgroundImage, x, y, width, - height, + height )), (rx = _g[0]), (ry = _g[1]); @@ -13366,15 +13363,15 @@ 0, left + x, top_1 + y, - rx, + rx ); processColorStops( backgroundImage.stops, - rx * 2, + rx * 2 ).forEach(function (colorStop) { return radialGradient_1.addColorStop( colorStop.stop, - asString(colorStop.color), + asString(colorStop.color) ); }); this_1.path(path); @@ -13396,7 +13393,7 @@ left, invF * (top_1 - midY) + midY, width, - height * invF, + height * invF ); this_1.ctx.restore(); } else { @@ -13434,7 +13431,7 @@ CanvasRenderer.prototype.renderSolidBorder = function ( color, side, - curvePoints, + curvePoints ) { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { @@ -13449,7 +13446,7 @@ color, width, side, - curvePoints, + curvePoints ) { return __awaiter(this, void 0, void 0, function () { var outerPaths, innerPaths; @@ -13478,7 +13475,7 @@ }); }; CanvasRenderer.prototype.renderNodeBackgroundAndBorders = function ( - paint, + paint ) { return __awaiter(this, void 0, void 0, function () { var styles, @@ -13494,7 +13491,7 @@ switch (_a.label) { case 0: this.applyEffects( - paint.getEffects(2 /* BACKGROUND_BORDERS */), + paint.getEffects(2 /* BACKGROUND_BORDERS */) ); styles = paint.container.styles; hasBackground = @@ -13525,7 +13522,7 @@ backgroundPaintingArea = calculateBackgroundCurvedPaintingArea( getBackgroundValueForIndex(styles.backgroundClip, 0), - paint.curves, + paint.curves ); if (!(hasBackground || styles.boxShadow.length)) return [3 /*break*/, 2]; @@ -13556,7 +13553,7 @@ (shadow.inset ? 1 : -1) * shadow.spread.number, (shadow.inset ? 1 : -1) * shadow.spread.number, shadow.spread.number * (shadow.inset ? -2 : 2), - shadow.spread.number * (shadow.inset ? -2 : 2), + shadow.spread.number * (shadow.inset ? -2 : 2) ); if (shadow.inset) { _this.path(borderBoxArea); @@ -13603,7 +13600,7 @@ border.width, side, paint.curves, - 2 /* DASHED */, + 2 /* DASHED */ ), ]; case 4: @@ -13619,7 +13616,7 @@ border.width, side, paint.curves, - 3 /* DOTTED */, + 3 /* DOTTED */ ), ]; case 6: @@ -13634,7 +13631,7 @@ border.color, border.width, side, - paint.curves, + paint.curves ), ]; case 8: @@ -13665,7 +13662,7 @@ width, side, curvePoints, - style, + style ) { return __awaiter(this, void 0, void 0, function () { var strokePaths, @@ -13734,7 +13731,7 @@ spaceLength *= multiplier; } else { numberOfDashes = Math.floor( - (length + spaceLength) / (dashLength + spaceLength), + (length + spaceLength) / (dashLength + spaceLength) ); minSpace = (length - numberOfDashes * dashLength) / (numberOfDashes - 1); @@ -13803,7 +13800,7 @@ this.options.x, this.options.y, this.options.width, - this.options.height, + this.options.height ); } stack = parseStackingContexts(element); @@ -13889,7 +13886,7 @@ "," + options.y + ") with scale " + - options.scale, + options.scale ); return _this; } @@ -13904,7 +13901,7 @@ this.options.height * this.options.scale, this.options.scale, this.options.scale, - element, + element ); return [4 /*yield*/, loadSerializedSVG(svg)]; case 1: @@ -13915,13 +13912,13 @@ 0, 0, this.options.width * this.options.scale, - this.options.height * this.options.scale, + this.options.height * this.options.scale ); } this.ctx.drawImage( img, -this.options.x * this.options.scale, - -this.options.y * this.options.scale, + -this.options.y * this.options.scale ); return [2 /*return*/, this.canvas]; } @@ -13967,7 +13964,7 @@ // eslint-disable-next-line no-console console.debug.apply( console, - __spreadArray([this.id, this.getTime() + "ms"], args), + __spreadArray([this.id, this.getTime() + "ms"], args) ); } else { this.info.apply(this, args); @@ -13993,7 +13990,7 @@ // eslint-disable-next-line no-console console.info.apply( console, - __spreadArray([this.id, this.getTime() + "ms"], args), + __spreadArray([this.id, this.getTime() + "ms"], args) ); } } @@ -14014,7 +14011,7 @@ // eslint-disable-next-line no-console console.warn.apply( console, - __spreadArray([this.id, this.getTime() + "ms"], args), + __spreadArray([this.id, this.getTime() + "ms"], args) ); } else { this.info.apply(this, args); @@ -14037,7 +14034,7 @@ // eslint-disable-next-line no-console console.error.apply( console, - __spreadArray([this.id, this.getTime() + "ms"], args), + __spreadArray([this.id, this.getTime() + "ms"], args) ); } else { this.info.apply(this, args); @@ -14124,7 +14121,7 @@ return [ 2 /*return*/, Promise.reject( - "Invalid element provided as first argument", + "Invalid element provided as first argument" ), ]; } @@ -14155,7 +14152,7 @@ (_e = opts.logging) !== null && _e !== void 0 ? _e : true, cache: opts.cache, }, - resourceOptions, + resourceOptions ); windowOptions = { windowWidth: @@ -14179,7 +14176,7 @@ windowOptions.scrollX, windowOptions.scrollY, windowOptions.windowWidth, - windowOptions.windowHeight, + windowOptions.windowHeight ); context = new Context(contextOptions, windowBounds); foreignObjectRendering = @@ -14204,12 +14201,12 @@ " scrolled to " + -windowBounds.left + "," + - -windowBounds.top, + -windowBounds.top ); documentCloner = new DocumentCloner( context, element, - cloneOptions, + cloneOptions ); clonedElement = documentCloner.clonedReferenceElement; if (!clonedElement) { @@ -14235,7 +14232,7 @@ backgroundColor = parseBackgroundColor( context, clonedElement, - opts.backgroundColor, + opts.backgroundColor ); renderOptions = { canvas: opts.canvas, @@ -14261,7 +14258,7 @@ }; if (!foreignObjectRendering) return [3 /*break*/, 3]; context.logger.debug( - "Document cloned, using foreign object rendering", + "Document cloned, using foreign object rendering" ); renderer = new ForeignObjectRenderer(context, renderOptions); return [4 /*yield*/, renderer.render(clonedElement)]; @@ -14278,7 +14275,7 @@ width + "x" + height + - " using computed rendering", + " using computed rendering" ); context.logger.debug("Starting DOM parsing"); root = parseTree(context, clonedElement); @@ -14293,7 +14290,7 @@ " with size " + renderOptions.width + "x" + - renderOptions.height, + renderOptions.height ); renderer = new CanvasRenderer(context, renderOptions); return [4 /*yield*/, renderer.render(root)]; @@ -14308,7 +14305,7 @@ ) { if (!DocumentCloner.destroy(container)) { context.logger.error( - "Cannot detach cloned iframe as it is not in the DOM anymore", + "Cannot detach cloned iframe as it is not in the DOM anymore" ); } } @@ -14321,20 +14318,20 @@ var parseBackgroundColor = function ( context, element, - backgroundColorOverride, + backgroundColorOverride ) { var ownerDocument = element.ownerDocument; // http://www.w3.org/TR/css3-background/#special-backgrounds var documentBackgroundColor = ownerDocument.documentElement ? parseColor( context, - getComputedStyle(ownerDocument.documentElement).backgroundColor, + getComputedStyle(ownerDocument.documentElement).backgroundColor ) : COLORS.TRANSPARENT; var bodyBackgroundColor = ownerDocument.body ? parseColor( context, - getComputedStyle(ownerDocument.body).backgroundColor, + getComputedStyle(ownerDocument.body).backgroundColor ) : COLORS.TRANSPARENT; var defaultBackgroundColor = @@ -14376,7 +14373,7 @@ attr_dev( path, "d", - "M9,11.75A1.25,1.25 0 0,0 7.75,13A1.25,1.25 0 0,0 9,14.25A1.25,1.25 0 0,0 10.25,13A1.25,1.25 0 0,0 9,11.75M15,11.75A1.25,1.25 0 0,0 13.75,13A1.25,1.25 0 0,0 15,14.25A1.25,1.25 0 0,0 16.25,13A1.25,1.25 0 0,0 15,11.75M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12C3.97,11.71 3.97,11.43 4,11.14C6.38,10.1 8.27,8.17 9.26,5.77C11.13,8.42 14.17,10 17.42,10C18.18,10 18.93,9.91 19.67,9.74C20.92,14 18.5,18.43 14.26,19.67C13.5,19.89 12.76,20 12,20M0,2A2,2 0 0,1 2,0H6V2H2V6H0V2M24,22A2,2 0 0,1 22,24H18V22H22V18H24V22M2,24A2,2 0 0,1 0,22V18H2V22H6V24H2M22,0A2,2 0 0,1 24,2V6H22V2H18V0H22Z", + "M9,11.75A1.25,1.25 0 0,0 7.75,13A1.25,1.25 0 0,0 9,14.25A1.25,1.25 0 0,0 10.25,13A1.25,1.25 0 0,0 9,11.75M15,11.75A1.25,1.25 0 0,0 13.75,13A1.25,1.25 0 0,0 15,14.25A1.25,1.25 0 0,0 16.25,13A1.25,1.25 0 0,0 15,11.75M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12C3.97,11.71 3.97,11.43 4,11.14C6.38,10.1 8.27,8.17 9.26,5.77C11.13,8.42 14.17,10 17.42,10C18.18,10 18.93,9.91 19.67,9.74C20.92,14 18.5,18.43 14.26,19.67C13.5,19.89 12.76,20 12,20M0,2A2,2 0 0,1 2,0H6V2H2V6H0V2M24,22A2,2 0 0,1 22,24H18V22H22V18H24V22M2,24A2,2 0 0,1 0,22V18H2V22H6V24H2M22,0A2,2 0 0,1 24,2V6H22V2H18V0H22Z" ); add_location(path, file$2, 66, 4, 1826); attr_dev(svg, "xmlns", "http://www.w3.org/2000/svg"); @@ -14392,7 +14389,7 @@ }, l: function claim(nodes) { throw new Error( - "options.hydrate only works if the component was compiled with the `hydratable: true` option", + "options.hydrate only works if the component was compiled with the `hydratable: true` option" ); }, m: function mount(target, anchor) { @@ -14408,7 +14405,7 @@ false, false, false, - false, + false ); mounted = true; } @@ -14471,7 +14468,7 @@ if (response.status !== 200) { $$invalidate(0, (scanner = false)); alert( - "Something went wrong. It's likely a server issue, Please try again later.", + "Something went wrong. It's likely a server issue, Please try again later." ); return; } @@ -14559,7 +14556,7 @@ set calls(value) { throw new Error( - ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''" ); } } @@ -14635,13 +14632,13 @@ /*frame*/ ctx[10].offset[0] + "px -" + /*frame*/ ctx[10].offset[1] + - "px", + "px" ); set_style(div0, "background-image", "url('" + /*url*/ ctx[0] + "')"); attr_dev( div0, "data-offset", - (div0_data_offset_value = /*frame*/ ctx[10].offset), + (div0_data_offset_value = /*frame*/ ctx[10].offset) ); add_location(div0, file$1, 57, 16, 1631); set_style(div1, "padding", "10px"); @@ -14650,7 +14647,7 @@ toggle_class( div2, "selected", - /*selected*/ ctx[3] === /*frame*/ ctx[10].id, + /*selected*/ ctx[3] === /*frame*/ ctx[10].id ); add_location(div2, file$1, 49, 12, 1317); this.first = div2; @@ -14670,7 +14667,7 @@ false, false, false, - false, + false ); mounted = true; } @@ -14686,7 +14683,7 @@ /*frame*/ ctx[10].offset[0] + "px -" + /*frame*/ ctx[10].offset[1] + - "px", + "px" ); } @@ -14707,7 +14704,7 @@ toggle_class( div2, "selected", - /*selected*/ ctx[3] === /*frame*/ ctx[10].id, + /*selected*/ ctx[3] === /*frame*/ ctx[10].id ); } }, @@ -14793,7 +14790,7 @@ searchfaces = new SearchFaces({ props: searchfaces_props, $$inline: true }); binding_callbacks.push(() => - bind(searchfaces, "calls", searchfaces_calls_binding), + bind(searchfaces, "calls", searchfaces_calls_binding) ); let each_value = /*frames*/ ctx[1]; validate_each_argument(each_value); @@ -14805,7 +14802,7 @@ let key = get_key(child_ctx); each_1_lookup.set( key, - (each_blocks[i] = create_each_block(key, child_ctx)), + (each_blocks[i] = create_each_block(key, child_ctx)) ); } @@ -14848,7 +14845,7 @@ }, l: function claim(nodes) { throw new Error( - "options.hydrate only works if the component was compiled with the `hydratable: true` option", + "options.hydrate only works if the component was compiled with the `hydratable: true` option" ); }, m: function mount(target, anchor) { @@ -14881,7 +14878,7 @@ false, false, false, - false, + false ); mounted = true; } @@ -14915,7 +14912,7 @@ fix_and_outro_and_destroy_block, create_each_block, null, - get_each_context, + get_each_context ); for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].a(); check_outros(); @@ -15090,25 +15087,25 @@ get url() { throw new Error( - ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''" ); } set url(value) { throw new Error( - ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''" ); } get frames() { throw new Error( - ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''" ); } set frames(value) { throw new Error( - ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''", + ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''" ); } } @@ -15131,7 +15128,7 @@ attr_dev( path, "d", - "M17,10.5L21,6.5V17.5L17,13.5V17A1,1 0 0,1 16,18H4A1,1 0 0,1 3,17V7A1,1 0 0,1 4,6H16A1,1 0 0,1 17,7V10.5M14,16V15C14,13.67 11.33,13 10,13C8.67,13 6,13.67 6,15V16H14M10,8A2,2 0 0,0 8,10A2,2 0 0,0 10,12A2,2 0 0,0 12,10A2,2 0 0,0 10,8Z", + "M17,10.5L21,6.5V17.5L17,13.5V17A1,1 0 0,1 16,18H4A1,1 0 0,1 3,17V7A1,1 0 0,1 4,6H16A1,1 0 0,1 17,7V10.5M14,16V15C14,13.67 11.33,13 10,13C8.67,13 6,13.67 6,15V16H14M10,8A2,2 0 0,0 8,10A2,2 0 0,0 10,12A2,2 0 0,0 12,10A2,2 0 0,0 10,8Z" ); add_location(path, file, 69, 5, 2175); attr_dev(svg, "xmlns", "http://www.w3.org/2000/svg"); @@ -15147,7 +15144,7 @@ }, l: function claim(nodes) { throw new Error( - "options.hydrate only works if the component was compiled with the `hydratable: true` option", + "options.hydrate only works if the component was compiled with the `hydratable: true` option" ); }, m: function mount(target, anchor) { @@ -15163,7 +15160,7 @@ false, false, false, - false, + false ); mounted = true; } @@ -15215,7 +15212,7 @@ if (!url) { alert( - "No sprite found, please ensure you have sprites enabled and generated for your scenes.", + "No sprite found, please ensure you have sprites enabled and generated for your scenes." ); $$invalidate(0, (scanner = false)); return; @@ -15243,7 +15240,7 @@ if (response.status !== 200) { $$invalidate(0, (scanner = false)); alert( - "Something went wrong. It's likely a server issue, Please try again later.", + "Something went wrong. It's likely a server issue, Please try again later." ); return; } diff --git a/userscripts/StashDB_Submission_Helper/stashdb_submission_helper.user.js b/userscripts/StashDB_Submission_Helper/stashdb_submission_helper.user.js index 4874663c..23e68fdb 100644 --- a/userscripts/StashDB_Submission_Helper/stashdb_submission_helper.user.js +++ b/userscripts/StashDB_Submission_Helper/stashdb_submission_helper.user.js @@ -18,7 +18,7 @@ function setNativeValue(element, value) { const prototype = Object.getPrototypeOf(element); const prototypeValueSetter = Object.getOwnPropertyDescriptor( prototype, - "value", + "value" )?.set; if (prototypeValueSetter && valueSetter !== prototypeValueSetter) { @@ -65,7 +65,7 @@ function unmatchedTargetElement(targetProperty) { document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, - null, + null ).singleNodeValue; return targetElement; } @@ -88,7 +88,7 @@ function unmatchedTargetButton(targetProperty) { document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, - null, + null ).singleNodeValue; return targetElement; } @@ -115,7 +115,7 @@ function formTab(tabName) { document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, - null, + null ).singleNodeValue; } @@ -123,24 +123,22 @@ function addAlias(alias) { alias = alias.trim(); const existingAliases = Array.from( document.querySelectorAll( - 'label[for="aliases"] + div .react-select__multi-value__label', - ), + 'label[for="aliases"] + div .react-select__multi-value__label' + ) ); let aliasMatch = existingAliases.find((element) => { return element.innerText == alias; }); if (typeof aliasMatch !== "undefined") { console.warn( - "Skipping alias '" + - alias + - "' as it is already added to this performer.", + "Skipping alias '" + alias + "' as it is already added to this performer." ); return; } const aliasInput = document.querySelector(aliasInputSelector); setNativeValue(aliasInput, alias); var addButton = document.querySelector( - 'label[for="aliases"] + div .react-select__option', + 'label[for="aliases"] + div .react-select__option' ); formTab("Personal Information").click(); addButton.click(); @@ -148,7 +146,7 @@ function addAlias(alias) { function existingUrlObjects() { const existingUrls = Array.from( - document.querySelectorAll(".URLInput ul .input-group"), + document.querySelectorAll(".URLInput ul .input-group") ); const urlObjects = existingUrls.map((urlGroup) => { let site = urlGroup.childNodes[1].innerText; @@ -166,7 +164,7 @@ function urlSite(url) { let site; if ( /(^https?:\/\/(?:www\.)?adultfilmdatabase\.com\/(?:video|studio|actor)\/.+)\??/.test( - url, + url ) ) { site = "AFDB"; @@ -174,7 +172,7 @@ function urlSite(url) { site = "Babepedia"; } else if ( /(^https?:\/\/(?:www\.)?bgafd\.co\.uk\/(?:films|actresses)\/details.php\/id\/[^?]+)\??/.test( - url, + url ) ) { site = "BGAFD"; @@ -184,7 +182,7 @@ function urlSite(url) { site = "DATA18"; } else if ( /(^https?:\/\/(?:www\.)?egafd\.com\/(?:films|actresses)\/details.php\/id\/[^?]+)\??/.test( - url, + url ) ) { site = "EGAFD"; @@ -230,7 +228,7 @@ function urlSite(url) { site = "XsList"; } else if ( /(^https?:\/\/(?:www.)?youtube\.com\/(?:c(?:hannel)?|user)\/[^?]+)/.test( - url, + url ) ) { site = "YouTube"; @@ -243,7 +241,7 @@ function urlSite(url) { function siteMatch(url, selections) { const match = Array.from(selections.options).find( - (option) => option.text == urlSite(url), + (option) => option.text == urlSite(url) ); return match; @@ -256,7 +254,7 @@ function addUrl(url) { }); if (typeof urlMatch !== "undefined") { console.warn( - "Skipping url '" + url + "' as it is already added to this performer.", + "Skipping url '" + url + "' as it is already added to this performer." ); return; } @@ -354,7 +352,7 @@ function isValidMeasurements(measurements) { console.warn( "Measurement format '" + measurements + - "' is invalid and cannot be automatically added.", + "' is invalid and cannot be automatically added." ); } return measurementsRegex.test(measurements); @@ -378,7 +376,7 @@ function addAliasInputContainer() { aliasField.setAttribute("size", "50px"); aliasField.setAttribute( "style", - "border-radius: 0.25rem; margin-right: 0.5rem;", + "border-radius: 0.25rem; margin-right: 0.5rem;" ); document.getElementById("aliasContainer").prepend(aliasField);