youtuber-blog-frontend/build/server/chunks/textarea-bqlfV9dO.js.map

1 line
113 KiB
Plaintext
Raw Normal View History

2024-08-25 16:39:31 +00:00
{"version":3,"file":"textarea-bqlfV9dO.js","sources":["../../../.svelte-kit/adapter-node/chunks/textarea.js"],"sourcesContent":["import { c as compute_rest_props, a as subscribe, s as setContext, g as getContext, h as hasContext, n as noop$1 } from \"./lifecycle.js\";\nimport { c as create_ssr_component, s as spread, b as escape_object, d as add_attribute, a as escape_attribute_value, v as validate_component, h as each, e as escape } from \"./ssr.js\";\nimport \"dequal\";\nimport { m as makeElement, b as addMeltEventListener, o as omit, j as disabledAttr, a as executeCallbacks, s as styleToString, c as createElHelpers, k as kbd, h as addEventListener, D as removeUndefined, p as portalAttr, e as effect, E as isTouch, r as isElement, G as isDocument, g as isBrowser, n as noop } from \"./index3.js\";\nimport { t as toWritableStores, o as overridable, g as generateIds, a as getPortalDestination, u as usePortal, m as useFloating, c as createBitAttrs, e as createDispatcher, r as removeUndefined$1, b as getOptionUpdater, d as getPositioningUpdater } from \"./Toaster.svelte_svelte_type_style_lang.js\";\nimport { c as cn, f as flyAndScale } from \"./button.js\";\nimport { w as writable, d as derived } from \"./index2.js\";\nimport { t as tick } from \"./scheduler.js\";\nimport \"clsx\";\nimport { nanoid } from \"nanoid/non-secure\";\nconst globals = typeof window !== \"undefined\" ? window : typeof globalThis !== \"undefined\" ? globalThis : (\n // @ts-ignore Node typings have this\n global\n);\nfunction makeHull(points) {\n const newPoints = points.slice();\n newPoints.sort(POINT_COMPARATOR);\n return makeHullPresorted(newPoints);\n}\nfunction makeHullPresorted(points) {\n if (points.length <= 1)\n return points.slice();\n const upperHull = [];\n for (let i = 0; i < points.length; i++) {\n const p = points[i];\n while (upperHull.length >= 2) {\n const q = upperHull[upperHull.length - 1];\n const r = upperHull[upperHull.length - 2];\n if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x))\n upperHull.pop();\n else\n break;\n }\n upperHull.push(p);\n }\n upperHull.pop();\n const lowerHull = [];\n for (let i = points.length - 1; i >= 0; i--) {\n const p = points[i];\n while (lowerHull.length >= 2) {\n const q = lowerHull[lowerHull.length - 1];\n const r = lowerHull[lowerHull.length - 2];\n if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x))\n lowerHull.pop();\n else\n break;\n }\n lowerHull.push(p);\n }\n lowerHull.pop();\n if (upperHull.length == 1 && lowerHull.length == 1 && upperHull[0].x == lowerHull[0].x && upperHull[0].y == lowerHull[0].y)\n return upperHull;\n else\n return upperHull.concat(lowerHull);\n}\nfunction POINT_COMPARATOR(a, b) {\n if (a.x < b.x)\n return -1;\n else if (a.x > b.x)\n return 1;\n else if (a.y < b.y)\n return -1;\n else if (a.y > b.y)\n return 1;\n else\n return 0;\n}\nfunction getPointsFromEl(el) {\n const rect = el.getBoundingClientRect();\n return [\n { x: rect.left, y: rect.top },\n { x: rect.right, y: rect.top },\n { x: rect.right, y: rect.bottom },\n { x: rect.left, y: rect.bottom }\n ];\n}\nfunction makeHullFromElements(els) {\n const points = els.flatMap((el) => getPointsFromEl(el));\n return makeHull(points);\n}\nfunction pointInPolygon(point, polygon) {\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const xi = polygon[i].x;\n const yi = polygon[i].y;\n const xj = polygon[j].x;\n const yj = polygon[j].y;\n const intersect = yi > point.y !== yj > point.y && point.x < (xj - xi) * (point.y - yi) / (yj - yi) + xi;\n if (intersect)\n inside = !inside;\n }\n return inside;\n}\nfunction createLabel() {\n const root = makeElement(\"label\", {\n action: (node) => {\n const mouseDown = addMeltEventListener(node, \"mousedown\", (e) => {\n if (!e.defaultPrevented && e.detail > 1) {\n e.preventDefault();\n }\n });\n return