runtime-dom.cjs.prod.js 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867
  1. /**
  2. * @vue/runtime-dom v3.5.42
  3. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  4. * @license MIT
  5. **/
  6. 'use strict';
  7. Object.defineProperty(exports, '__esModule', { value: true });
  8. var runtimeCore = require('@vue/runtime-core');
  9. var shared = require('@vue/shared');
  10. let policy = void 0;
  11. const tt = typeof window !== "undefined" && window.trustedTypes;
  12. if (tt) {
  13. try {
  14. policy = /* @__PURE__ */ tt.createPolicy("vue", {
  15. createHTML: (val) => val
  16. });
  17. } catch (e) {
  18. }
  19. }
  20. const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val;
  21. const svgNS = "http://www.w3.org/2000/svg";
  22. const mathmlNS = "http://www.w3.org/1998/Math/MathML";
  23. const doc = typeof document !== "undefined" ? document : null;
  24. const templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
  25. const nodeOps = {
  26. insert: (child, parent, anchor) => {
  27. parent.insertBefore(child, anchor || null);
  28. },
  29. remove: (child) => {
  30. const parent = child.parentNode;
  31. if (parent) {
  32. parent.removeChild(child);
  33. }
  34. },
  35. createElement: (tag, namespace, is, props) => {
  36. const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag);
  37. if (tag === "select" && props && props.multiple != null) {
  38. el.setAttribute("multiple", props.multiple);
  39. }
  40. return el;
  41. },
  42. createText: (text) => doc.createTextNode(text),
  43. createComment: (text) => doc.createComment(text),
  44. setText: (node, text) => {
  45. node.nodeValue = text;
  46. },
  47. setElementText: (el, text) => {
  48. el.textContent = text;
  49. },
  50. parentNode: (node) => node.parentNode,
  51. nextSibling: (node) => node.nextSibling,
  52. querySelector: (selector) => doc.querySelector(selector),
  53. setScopeId(el, id) {
  54. el.setAttribute(id, "");
  55. },
  56. // __UNSAFE__
  57. // Reason: innerHTML.
  58. // Static content here can only come from compiled templates.
  59. // As long as the user only uses trusted templates, this is safe.
  60. insertStaticContent(content, parent, anchor, namespace, start, end) {
  61. const before = anchor ? anchor.previousSibling : parent.lastChild;
  62. if (start && (start === end || start.nextSibling)) {
  63. while (true) {
  64. parent.insertBefore(start.cloneNode(true), anchor);
  65. if (start === end || !(start = start.nextSibling)) break;
  66. }
  67. } else {
  68. templateContainer.innerHTML = unsafeToTrustedHTML(
  69. namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content
  70. );
  71. const template = templateContainer.content;
  72. if (namespace === "svg" || namespace === "mathml") {
  73. const wrapper = template.firstChild;
  74. while (wrapper.firstChild) {
  75. template.appendChild(wrapper.firstChild);
  76. }
  77. template.removeChild(wrapper);
  78. }
  79. parent.insertBefore(template, anchor);
  80. }
  81. return [
  82. // first
  83. before ? before.nextSibling : parent.firstChild,
  84. // last
  85. anchor ? anchor.previousSibling : parent.lastChild
  86. ];
  87. }
  88. };
  89. const TRANSITION = "transition";
  90. const ANIMATION = "animation";
  91. const vtcKey = /* @__PURE__ */ Symbol("_vtc");
  92. const DOMTransitionPropsValidators = {
  93. name: String,
  94. type: String,
  95. css: {
  96. type: Boolean,
  97. default: true
  98. },
  99. duration: [String, Number, Object],
  100. enterFromClass: String,
  101. enterActiveClass: String,
  102. enterToClass: String,
  103. appearFromClass: String,
  104. appearActiveClass: String,
  105. appearToClass: String,
  106. leaveFromClass: String,
  107. leaveActiveClass: String,
  108. leaveToClass: String
  109. };
  110. const TransitionPropsValidators = /* @__PURE__ */ shared.extend(
  111. {},
  112. runtimeCore.BaseTransitionPropsValidators,
  113. DOMTransitionPropsValidators
  114. );
  115. const decorate$1 = (t) => {
  116. t.displayName = "Transition";
  117. t.props = TransitionPropsValidators;
  118. return t;
  119. };
  120. const Transition = /* @__PURE__ */ decorate$1(
  121. (props, { slots }) => runtimeCore.h(runtimeCore.BaseTransition, resolveTransitionProps(props), slots)
  122. );
  123. const callHook = (hook, args = []) => {
  124. if (shared.isArray(hook)) {
  125. hook.forEach((h2) => h2(...args));
  126. } else if (hook) {
  127. hook(...args);
  128. }
  129. };
  130. const hasExplicitCallback = (hook) => {
  131. return hook ? shared.isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
  132. };
  133. function resolveTransitionProps(rawProps) {
  134. const baseProps = {};
  135. for (const key in rawProps) {
  136. if (!(key in DOMTransitionPropsValidators)) {
  137. baseProps[key] = rawProps[key];
  138. }
  139. }
  140. if (rawProps.css === false) {
  141. return baseProps;
  142. }
  143. const {
  144. name = "v",
  145. type,
  146. duration,
  147. enterFromClass = `${name}-enter-from`,
  148. enterActiveClass = `${name}-enter-active`,
  149. enterToClass = `${name}-enter-to`,
  150. appearFromClass = enterFromClass,
  151. appearActiveClass = enterActiveClass,
  152. appearToClass = enterToClass,
  153. leaveFromClass = `${name}-leave-from`,
  154. leaveActiveClass = `${name}-leave-active`,
  155. leaveToClass = `${name}-leave-to`
  156. } = rawProps;
  157. const durations = normalizeDuration(duration);
  158. const enterDuration = durations && durations[0];
  159. const leaveDuration = durations && durations[1];
  160. const {
  161. onBeforeEnter,
  162. onEnter,
  163. onEnterCancelled,
  164. onLeave,
  165. onLeaveCancelled,
  166. onBeforeAppear = onBeforeEnter,
  167. onAppear = onEnter,
  168. onAppearCancelled = onEnterCancelled
  169. } = baseProps;
  170. const finishEnter = (el, isAppear, done, isCancelled) => {
  171. el._enterCancelled = isCancelled;
  172. removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
  173. removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
  174. done && done();
  175. };
  176. const finishLeave = (el, done) => {
  177. el._isLeaving = false;
  178. removeTransitionClass(el, leaveFromClass);
  179. removeTransitionClass(el, leaveToClass);
  180. removeTransitionClass(el, leaveActiveClass);
  181. done && done();
  182. };
  183. const makeEnterHook = (isAppear) => {
  184. return (el, done) => {
  185. const hook = isAppear ? onAppear : onEnter;
  186. const resolve = () => finishEnter(el, isAppear, done);
  187. callHook(hook, [el, resolve]);
  188. nextFrame(() => {
  189. removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
  190. addTransitionClass(el, isAppear ? appearToClass : enterToClass);
  191. if (!hasExplicitCallback(hook)) {
  192. whenTransitionEnds(el, type, enterDuration, resolve);
  193. }
  194. });
  195. };
  196. };
  197. return shared.extend(baseProps, {
  198. onBeforeEnter(el) {
  199. callHook(onBeforeEnter, [el]);
  200. addTransitionClass(el, enterFromClass);
  201. addTransitionClass(el, enterActiveClass);
  202. },
  203. onBeforeAppear(el) {
  204. callHook(onBeforeAppear, [el]);
  205. addTransitionClass(el, appearFromClass);
  206. addTransitionClass(el, appearActiveClass);
  207. },
  208. onEnter: makeEnterHook(false),
  209. onAppear: makeEnterHook(true),
  210. onLeave(el, done) {
  211. el._isLeaving = true;
  212. const resolve = () => finishLeave(el, done);
  213. addTransitionClass(el, leaveFromClass);
  214. if (!el._enterCancelled) {
  215. forceReflow(el);
  216. addTransitionClass(el, leaveActiveClass);
  217. } else {
  218. addTransitionClass(el, leaveActiveClass);
  219. forceReflow(el);
  220. }
  221. nextFrame(() => {
  222. if (!el._isLeaving) {
  223. return;
  224. }
  225. removeTransitionClass(el, leaveFromClass);
  226. addTransitionClass(el, leaveToClass);
  227. if (!hasExplicitCallback(onLeave)) {
  228. whenTransitionEnds(el, type, leaveDuration, resolve);
  229. }
  230. });
  231. callHook(onLeave, [el, resolve]);
  232. },
  233. onEnterCancelled(el) {
  234. finishEnter(el, false, void 0, true);
  235. callHook(onEnterCancelled, [el]);
  236. },
  237. onAppearCancelled(el) {
  238. finishEnter(el, true, void 0, true);
  239. callHook(onAppearCancelled, [el]);
  240. },
  241. onLeaveCancelled(el) {
  242. finishLeave(el);
  243. callHook(onLeaveCancelled, [el]);
  244. }
  245. });
  246. }
  247. function normalizeDuration(duration) {
  248. if (duration == null) {
  249. return null;
  250. } else if (shared.isObject(duration)) {
  251. return [NumberOf(duration.enter), NumberOf(duration.leave)];
  252. } else {
  253. const n = NumberOf(duration);
  254. return [n, n];
  255. }
  256. }
  257. function NumberOf(val) {
  258. const res = shared.toNumber(val);
  259. return res;
  260. }
  261. function addTransitionClass(el, cls) {
  262. cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
  263. (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);
  264. }
  265. function removeTransitionClass(el, cls) {
  266. cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
  267. const _vtc = el[vtcKey];
  268. if (_vtc) {
  269. _vtc.delete(cls);
  270. if (!_vtc.size) {
  271. el[vtcKey] = void 0;
  272. }
  273. }
  274. }
  275. function nextFrame(cb) {
  276. requestAnimationFrame(() => {
  277. requestAnimationFrame(cb);
  278. });
  279. }
  280. let endId = 0;
  281. function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
  282. const id = el._endId = ++endId;
  283. const resolveIfNotStale = () => {
  284. if (id === el._endId) {
  285. resolve();
  286. }
  287. };
  288. if (explicitTimeout != null) {
  289. return setTimeout(resolveIfNotStale, explicitTimeout);
  290. }
  291. const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
  292. if (!type) {
  293. return resolve();
  294. }
  295. const endEvent = type + "end";
  296. let ended = 0;
  297. const end = () => {
  298. el.removeEventListener(endEvent, onEnd);
  299. resolveIfNotStale();
  300. };
  301. const onEnd = (e) => {
  302. if (e.target === el && ++ended >= propCount) {
  303. end();
  304. }
  305. };
  306. setTimeout(() => {
  307. if (ended < propCount) {
  308. end();
  309. }
  310. }, timeout + 1);
  311. el.addEventListener(endEvent, onEnd);
  312. }
  313. function getTransitionInfo(el, expectedType) {
  314. const styles = window.getComputedStyle(el);
  315. const getStyleProperties = (key) => (styles[key] || "").split(", ");
  316. const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
  317. const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
  318. const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
  319. const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
  320. const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
  321. const animationTimeout = getTimeout(animationDelays, animationDurations);
  322. let type = null;
  323. let timeout = 0;
  324. let propCount = 0;
  325. if (expectedType === TRANSITION) {
  326. if (transitionTimeout > 0) {
  327. type = TRANSITION;
  328. timeout = transitionTimeout;
  329. propCount = transitionDurations.length;
  330. }
  331. } else if (expectedType === ANIMATION) {
  332. if (animationTimeout > 0) {
  333. type = ANIMATION;
  334. timeout = animationTimeout;
  335. propCount = animationDurations.length;
  336. }
  337. } else {
  338. timeout = Math.max(transitionTimeout, animationTimeout);
  339. type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
  340. propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
  341. }
  342. const hasTransform = type === TRANSITION && /\b(?:transform|all)(?:,|$)/.test(
  343. getStyleProperties(`${TRANSITION}Property`).toString()
  344. );
  345. return {
  346. type,
  347. timeout,
  348. propCount,
  349. hasTransform
  350. };
  351. }
  352. function getTimeout(delays, durations) {
  353. while (delays.length < durations.length) {
  354. delays = delays.concat(delays);
  355. }
  356. return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
  357. }
  358. function toMs(s) {
  359. if (s === "auto") return 0;
  360. return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
  361. }
  362. function forceReflow(el) {
  363. const targetDocument = el ? el.ownerDocument : document;
  364. return targetDocument.body.offsetHeight;
  365. }
  366. function patchClass(el, value, isSVG) {
  367. const transitionClasses = el[vtcKey];
  368. if (transitionClasses) {
  369. value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
  370. }
  371. if (value == null) {
  372. el.removeAttribute("class");
  373. } else if (isSVG) {
  374. el.setAttribute("class", value);
  375. } else {
  376. el.className = value;
  377. }
  378. }
  379. const vShowOriginalDisplay = /* @__PURE__ */ Symbol("_vod");
  380. const vShowHidden = /* @__PURE__ */ Symbol("_vsh");
  381. const vShow = {
  382. // used for prop mismatch check during hydration
  383. name: "show",
  384. beforeMount(el, { value }, { transition }) {
  385. el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
  386. if (transition && value) {
  387. transition.beforeEnter(el);
  388. } else {
  389. setDisplay(el, value);
  390. }
  391. },
  392. mounted(el, { value }, { transition }) {
  393. if (transition && value) {
  394. transition.enter(el);
  395. }
  396. },
  397. updated(el, { value, oldValue }, { transition }) {
  398. if (!value === !oldValue) return;
  399. if (transition) {
  400. if (value) {
  401. transition.beforeEnter(el);
  402. setDisplay(el, true);
  403. transition.enter(el);
  404. } else {
  405. transition.leave(el, () => {
  406. setDisplay(el, false);
  407. });
  408. }
  409. } else {
  410. setDisplay(el, value);
  411. }
  412. },
  413. beforeUnmount(el, { value }) {
  414. setDisplay(el, value);
  415. }
  416. };
  417. function setDisplay(el, value) {
  418. el.style.display = value ? el[vShowOriginalDisplay] : "none";
  419. el[vShowHidden] = !value;
  420. }
  421. function initVShowForSSR() {
  422. vShow.getSSRProps = ({ value }) => {
  423. if (!value) {
  424. return { style: { display: "none" } };
  425. }
  426. };
  427. }
  428. const CSS_VAR_TEXT = /* @__PURE__ */ Symbol("");
  429. function useCssVars(getter) {
  430. return;
  431. }
  432. const displayRE = /(?:^|;)\s*display\s*:/;
  433. function patchStyle(el, prev, next) {
  434. const style = el.style;
  435. const isCssString = shared.isString(next);
  436. let hasControlledDisplay = false;
  437. if (next && !isCssString) {
  438. if (prev) {
  439. if (!shared.isString(prev)) {
  440. for (const key in prev) {
  441. if (next[key] == null) {
  442. setStyle(style, key, "");
  443. }
  444. }
  445. } else {
  446. for (const prevStyle of prev.split(";")) {
  447. const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
  448. if (next[key] == null) {
  449. setStyle(style, key, "");
  450. }
  451. }
  452. }
  453. }
  454. for (const key in next) {
  455. if (key === "display") {
  456. hasControlledDisplay = true;
  457. }
  458. const value = next[key];
  459. if (value != null) {
  460. if (!shouldPreserveTextareaResizeStyle(
  461. el,
  462. key,
  463. !shared.isString(prev) && prev ? prev[key] : void 0,
  464. value
  465. )) {
  466. setStyle(style, key, value);
  467. }
  468. } else {
  469. setStyle(style, key, "");
  470. }
  471. }
  472. } else {
  473. if (isCssString) {
  474. if (prev !== next) {
  475. const cssVarText = style[CSS_VAR_TEXT];
  476. if (cssVarText) {
  477. next += ";" + cssVarText;
  478. }
  479. style.cssText = next;
  480. hasControlledDisplay = displayRE.test(next);
  481. }
  482. } else if (prev) {
  483. el.removeAttribute("style");
  484. }
  485. }
  486. if (vShowOriginalDisplay in el) {
  487. el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
  488. if (el[vShowHidden]) {
  489. style.display = "none";
  490. }
  491. }
  492. }
  493. const importantRE = /\s*!important$/;
  494. function setStyle(style, name, val) {
  495. if (shared.isArray(val)) {
  496. val.forEach((v) => setStyle(style, name, v));
  497. } else {
  498. if (val == null) val = "";
  499. if (name.startsWith("--")) {
  500. if (importantRE.test(val)) {
  501. style.setProperty(name, val.replace(importantRE, ""), "important");
  502. } else {
  503. style.setProperty(name, val);
  504. }
  505. } else {
  506. const prefixed = autoPrefix(style, name);
  507. if (importantRE.test(val)) {
  508. style.setProperty(
  509. shared.hyphenate(prefixed),
  510. val.replace(importantRE, ""),
  511. "important"
  512. );
  513. } else {
  514. style[prefixed] = val;
  515. }
  516. }
  517. }
  518. }
  519. const prefixes = ["Webkit", "Moz", "ms"];
  520. const prefixCache = {};
  521. function autoPrefix(style, rawName) {
  522. const cached = prefixCache[rawName];
  523. if (cached) {
  524. return cached;
  525. }
  526. let name = runtimeCore.camelize(rawName);
  527. if (name !== "filter" && name in style) {
  528. return prefixCache[rawName] = name;
  529. }
  530. name = shared.capitalize(name);
  531. for (let i = 0; i < prefixes.length; i++) {
  532. const prefixed = prefixes[i] + name;
  533. if (prefixed in style) {
  534. return prefixCache[rawName] = prefixed;
  535. }
  536. }
  537. return rawName;
  538. }
  539. function shouldPreserveTextareaResizeStyle(el, key, prev, next) {
  540. return el.tagName === "TEXTAREA" && (key === "width" || key === "height") && shared.isString(next) && prev === next;
  541. }
  542. const xlinkNS = "http://www.w3.org/1999/xlink";
  543. function patchAttr(el, key, value, isSVG, instance, isBoolean = shared.isSpecialBooleanAttr(key)) {
  544. if (isSVG && key.startsWith("xlink:")) {
  545. if (value == null) {
  546. el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
  547. } else {
  548. el.setAttributeNS(xlinkNS, key, value);
  549. }
  550. } else {
  551. if (value == null || isBoolean && !shared.includeBooleanAttr(value)) {
  552. el.removeAttribute(key);
  553. } else {
  554. el.setAttribute(
  555. key,
  556. isBoolean ? "" : shared.isSymbol(value) ? String(value) : value
  557. );
  558. }
  559. }
  560. }
  561. function patchDOMProp(el, key, value, parentComponent, attrName) {
  562. if (key === "innerHTML" || key === "textContent") {
  563. if (value != null) {
  564. el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
  565. }
  566. return;
  567. }
  568. const tag = el.tagName;
  569. if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
  570. !tag.includes("-")) {
  571. const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
  572. const newValue = value == null ? (
  573. // #11647: value should be set as empty string for null and undefined,
  574. // but <input type="checkbox"> should be set as 'on'.
  575. el.type === "checkbox" ? "on" : ""
  576. ) : String(value);
  577. if (oldValue !== newValue || !("_value" in el)) {
  578. el.value = newValue;
  579. }
  580. if (value == null) {
  581. el.removeAttribute(key);
  582. }
  583. el._value = value;
  584. return;
  585. }
  586. let needRemove = false;
  587. if (value === "" || value == null) {
  588. const type = typeof el[key];
  589. if (type === "boolean") {
  590. value = shared.includeBooleanAttr(value);
  591. } else if (value == null && type === "string") {
  592. value = "";
  593. needRemove = true;
  594. } else if (type === "number") {
  595. value = 0;
  596. needRemove = true;
  597. }
  598. }
  599. try {
  600. el[key] = value;
  601. } catch (e) {
  602. }
  603. needRemove && el.removeAttribute(attrName || key);
  604. }
  605. function addEventListener(el, event, handler, options) {
  606. el.addEventListener(event, handler, options);
  607. }
  608. function removeEventListener(el, event, handler, options) {
  609. el.removeEventListener(event, handler, options);
  610. }
  611. const veiKey = /* @__PURE__ */ Symbol("_vei");
  612. function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
  613. const invokers = el[veiKey] || (el[veiKey] = {});
  614. const existingInvoker = invokers[rawName];
  615. if (nextValue && existingInvoker) {
  616. existingInvoker.value = nextValue;
  617. } else {
  618. const [name, options] = parseName(rawName);
  619. if (nextValue) {
  620. const invoker = invokers[rawName] = createInvoker(
  621. nextValue,
  622. instance
  623. );
  624. addEventListener(el, name, invoker, options);
  625. } else if (existingInvoker) {
  626. removeEventListener(el, name, existingInvoker, options);
  627. invokers[rawName] = void 0;
  628. }
  629. }
  630. }
  631. const optionsModifierRE = /(Once|Passive|Capture)$/;
  632. const optionsModifierEventRE = /^on:?(?:Once|Passive|Capture)$/;
  633. function parseName(name) {
  634. let options;
  635. let m;
  636. while ((m = name.match(optionsModifierRE)) && !optionsModifierEventRE.test(name)) {
  637. if (!options) options = {};
  638. name = name.slice(0, name.length - m[1].length);
  639. options[m[1].toLowerCase()] = true;
  640. }
  641. const event = name[2] === ":" ? name.slice(3) : shared.hyphenate(name.slice(2));
  642. return [event, options];
  643. }
  644. let cachedNow = 0;
  645. const p = /* @__PURE__ */ Promise.resolve();
  646. const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
  647. function createInvoker(initialValue, instance) {
  648. const invoker = (e) => {
  649. if (!e._vts) {
  650. e._vts = Date.now();
  651. } else if (e._vts <= invoker.attached) {
  652. return;
  653. }
  654. const value = invoker.value;
  655. if (shared.isArray(value)) {
  656. const originalStop = e.stopImmediatePropagation;
  657. e.stopImmediatePropagation = () => {
  658. originalStop.call(e);
  659. e._stopped = true;
  660. };
  661. const handlers = value.slice();
  662. const args = [e];
  663. for (let i = 0; i < handlers.length; i++) {
  664. if (e._stopped) {
  665. break;
  666. }
  667. const handler = handlers[i];
  668. if (handler) {
  669. runtimeCore.callWithAsyncErrorHandling(
  670. handler,
  671. instance,
  672. 5,
  673. args
  674. );
  675. }
  676. }
  677. } else {
  678. runtimeCore.callWithAsyncErrorHandling(
  679. value,
  680. instance,
  681. 5,
  682. [e]
  683. );
  684. }
  685. };
  686. invoker.value = initialValue;
  687. invoker.attached = getNow();
  688. return invoker;
  689. }
  690. const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
  691. key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
  692. const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
  693. const isSVG = namespace === "svg";
  694. if (key === "class") {
  695. patchClass(el, nextValue, isSVG);
  696. } else if (key === "style") {
  697. patchStyle(el, prevValue, nextValue);
  698. } else if (shared.isOn(key)) {
  699. if (!shared.isModelListener(key)) {
  700. patchEvent(el, key, prevValue, nextValue, parentComponent);
  701. }
  702. } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
  703. patchDOMProp(el, key, nextValue);
  704. if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) {
  705. patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
  706. }
  707. } else if (
  708. // #11081 force set props for possible async custom element
  709. el._isVueCE && // #12408 check if it's declared prop or it's async custom element
  710. (shouldSetAsPropForVueCE(el, key) || // @ts-expect-error _def is private
  711. el._def.__asyncLoader && (/[A-Z]/.test(key) || !shared.isString(nextValue)))
  712. ) {
  713. patchDOMProp(el, shared.camelize(key), nextValue, parentComponent, key);
  714. } else {
  715. if (key === "true-value") {
  716. el._trueValue = nextValue;
  717. } else if (key === "false-value") {
  718. el._falseValue = nextValue;
  719. }
  720. patchAttr(el, key, nextValue, isSVG);
  721. }
  722. };
  723. function shouldSetAsProp(el, key, value, isSVG) {
  724. if (isSVG) {
  725. if (key === "innerHTML" || key === "textContent") {
  726. return true;
  727. }
  728. if (key in el && isNativeOn(key) && shared.isFunction(value)) {
  729. return true;
  730. }
  731. return false;
  732. }
  733. if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") {
  734. return false;
  735. }
  736. if (key === "sandbox" && el.tagName === "IFRAME") {
  737. return false;
  738. }
  739. if (key === "form") {
  740. return false;
  741. }
  742. if (key === "list" && el.tagName === "INPUT") {
  743. return false;
  744. }
  745. if (key === "type" && el.tagName === "TEXTAREA") {
  746. return false;
  747. }
  748. if (key === "width" || key === "height") {
  749. const tag = el.tagName;
  750. if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") {
  751. return false;
  752. }
  753. }
  754. if (isNativeOn(key) && shared.isString(value)) {
  755. return false;
  756. }
  757. return key in el;
  758. }
  759. function shouldSetAsPropForVueCE(el, key) {
  760. const props = (
  761. // @ts-expect-error _def is private
  762. el._def.props
  763. );
  764. if (!props) {
  765. return false;
  766. }
  767. const camelKey = shared.camelize(key);
  768. return Array.isArray(props) ? props.some((prop) => shared.camelize(prop) === camelKey) : Object.keys(props).some((prop) => shared.camelize(prop) === camelKey);
  769. }
  770. const REMOVAL = {};
  771. // @__NO_SIDE_EFFECTS__
  772. function defineCustomElement(options, extraOptions, _createApp) {
  773. let Comp = runtimeCore.defineComponent(options, extraOptions);
  774. if (shared.isPlainObject(Comp)) Comp = shared.extend({}, Comp, extraOptions);
  775. class VueCustomElement extends VueElement {
  776. constructor(initialProps) {
  777. super(Comp, initialProps, _createApp);
  778. }
  779. }
  780. VueCustomElement.def = Comp;
  781. return VueCustomElement;
  782. }
  783. const defineSSRCustomElement = (/* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
  784. return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);
  785. });
  786. const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
  787. };
  788. class VueElement extends BaseClass {
  789. constructor(_def, _props = {}, _createApp = createApp) {
  790. super();
  791. this._def = _def;
  792. this._props = _props;
  793. this._createApp = _createApp;
  794. this._isVueCE = true;
  795. /**
  796. * @internal
  797. */
  798. this._instance = null;
  799. /**
  800. * @internal
  801. */
  802. this._app = null;
  803. /**
  804. * @internal
  805. */
  806. this._nonce = this._def.nonce;
  807. this._connected = false;
  808. this._resolved = false;
  809. this._patching = false;
  810. this._dirty = false;
  811. this._numberProps = null;
  812. this._styleChildren = /* @__PURE__ */ new WeakSet();
  813. this._styleAnchors = /* @__PURE__ */ new WeakMap();
  814. this._ob = null;
  815. if (this.shadowRoot && _createApp !== createApp) {
  816. this._root = this.shadowRoot;
  817. } else {
  818. if (_def.shadowRoot !== false) {
  819. this.attachShadow(
  820. shared.extend({}, _def.shadowRootOptions, {
  821. mode: "open"
  822. })
  823. );
  824. this._root = this.shadowRoot;
  825. } else {
  826. this._root = this;
  827. }
  828. }
  829. }
  830. connectedCallback() {
  831. if (!this.isConnected) return;
  832. if (!this.shadowRoot && !this._resolved) {
  833. this._parseSlots();
  834. }
  835. this._connected = true;
  836. let parent = this;
  837. while (parent = parent && // #12479 should check assignedSlot first to get correct parent
  838. (parent.assignedSlot || parent.parentNode || parent.host)) {
  839. if (parent instanceof VueElement) {
  840. this._parent = parent;
  841. break;
  842. }
  843. }
  844. if (!this._instance) {
  845. if (this._resolved) {
  846. this._mount(this._def);
  847. } else {
  848. if (parent && parent._pendingResolve) {
  849. this._pendingResolve = parent._pendingResolve.then(() => {
  850. this._pendingResolve = void 0;
  851. if (this.isConnected) {
  852. return this._resolveDef();
  853. }
  854. });
  855. } else {
  856. this._resolveDef();
  857. }
  858. }
  859. }
  860. }
  861. _setParent(parent = this._parent) {
  862. if (parent) {
  863. this._instance.parent = parent._instance;
  864. this._inheritParentContext(parent);
  865. }
  866. }
  867. _inheritParentContext(parent = this._parent) {
  868. if (parent && this._app) {
  869. Object.setPrototypeOf(
  870. this._app._context.provides,
  871. parent._instance.provides
  872. );
  873. }
  874. }
  875. disconnectedCallback() {
  876. this._connected = false;
  877. runtimeCore.nextTick(() => {
  878. if (!this._connected) {
  879. if (this._ob) {
  880. this._ob.disconnect();
  881. this._ob = null;
  882. }
  883. this._app && this._app.unmount();
  884. if (this._instance) this._instance.ce = void 0;
  885. this._app = this._instance = null;
  886. if (this._teleportTargets) {
  887. this._teleportTargets.clear();
  888. this._teleportTargets = void 0;
  889. }
  890. }
  891. });
  892. }
  893. _processMutations(mutations) {
  894. for (const m of mutations) {
  895. this._setAttr(m.attributeName);
  896. }
  897. }
  898. /**
  899. * resolve inner component definition (handle possible async component)
  900. */
  901. _resolveDef() {
  902. if (this._pendingResolve) {
  903. return this._pendingResolve;
  904. }
  905. for (let i = 0; i < this.attributes.length; i++) {
  906. this._setAttr(this.attributes[i].name);
  907. }
  908. this._ob = new MutationObserver(this._processMutations.bind(this));
  909. this._ob.observe(this, { attributes: true });
  910. const resolve = (def, isAsync = false) => {
  911. this._resolved = true;
  912. this._pendingResolve = void 0;
  913. const { props, styles } = def;
  914. let numberProps;
  915. if (props && !shared.isArray(props)) {
  916. for (const key in props) {
  917. const opt = props[key];
  918. if (opt === Number || opt && opt.type === Number) {
  919. if (key in this._props) {
  920. this._props[key] = shared.toNumber(this._props[key]);
  921. }
  922. (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[shared.camelize(key)] = true;
  923. }
  924. }
  925. }
  926. this._numberProps = numberProps;
  927. this._resolveProps(def);
  928. if (this.shadowRoot) {
  929. this._applyStyles(styles);
  930. }
  931. this._mount(def);
  932. };
  933. const asyncDef = this._def.__asyncLoader;
  934. if (asyncDef) {
  935. this._pendingResolve = asyncDef().then((def) => {
  936. def.configureApp = this._def.configureApp;
  937. resolve(this._def = def, true);
  938. });
  939. return this._pendingResolve;
  940. } else {
  941. resolve(this._def);
  942. }
  943. }
  944. _mount(def) {
  945. this._app = this._createApp(def);
  946. this._inheritParentContext();
  947. if (def.configureApp) {
  948. def.configureApp(this._app);
  949. }
  950. this._app._ceVNode = this._createVNode();
  951. this._app.mount(this._root);
  952. const exposed = this._instance && this._instance.exposed;
  953. if (!exposed) return;
  954. for (const key in exposed) {
  955. if (!shared.hasOwn(this, key)) {
  956. Object.defineProperty(this, key, {
  957. // unwrap ref to be consistent with public instance behavior
  958. get: () => runtimeCore.unref(exposed[key])
  959. });
  960. }
  961. }
  962. }
  963. _resolveProps(def) {
  964. const { props } = def;
  965. const declaredPropKeys = shared.isArray(props) ? props : Object.keys(props || {});
  966. for (const key of Object.keys(this)) {
  967. if (key[0] !== "_" && declaredPropKeys.includes(key)) {
  968. this._setProp(key, this[key]);
  969. }
  970. }
  971. for (const key of declaredPropKeys.map(shared.camelize)) {
  972. Object.defineProperty(this, key, {
  973. get() {
  974. return this._getProp(key);
  975. },
  976. set(val) {
  977. this._setProp(key, val, true, !this._patching);
  978. }
  979. });
  980. }
  981. }
  982. _setAttr(key) {
  983. if (key.startsWith("data-v-")) return;
  984. const has = this.hasAttribute(key);
  985. let value = has ? this.getAttribute(key) : REMOVAL;
  986. const camelKey = shared.camelize(key);
  987. if (has && this._numberProps && this._numberProps[camelKey]) {
  988. value = shared.toNumber(value);
  989. }
  990. this._setProp(camelKey, value, false, true);
  991. }
  992. /**
  993. * @internal
  994. */
  995. _getProp(key) {
  996. return this._props[key];
  997. }
  998. /**
  999. * @internal
  1000. */
  1001. _setProp(key, val, shouldReflect = true, shouldUpdate = false) {
  1002. if (val !== this._props[key]) {
  1003. this._dirty = true;
  1004. if (val === REMOVAL) {
  1005. delete this._props[key];
  1006. } else {
  1007. this._props[key] = val;
  1008. if (key === "key" && this._app) {
  1009. this._app._ceVNode.key = val;
  1010. }
  1011. }
  1012. if (shouldUpdate && this._instance) {
  1013. this._update();
  1014. }
  1015. if (shouldReflect) {
  1016. const ob = this._ob;
  1017. if (ob) {
  1018. this._processMutations(ob.takeRecords());
  1019. ob.disconnect();
  1020. }
  1021. if (val === true) {
  1022. this.setAttribute(shared.hyphenate(key), "");
  1023. } else if (typeof val === "string" || typeof val === "number") {
  1024. this.setAttribute(shared.hyphenate(key), val + "");
  1025. } else if (!val) {
  1026. this.removeAttribute(shared.hyphenate(key));
  1027. }
  1028. ob && ob.observe(this, { attributes: true });
  1029. }
  1030. }
  1031. }
  1032. _update() {
  1033. const vnode = this._createVNode();
  1034. if (this._app) vnode.appContext = this._app._context;
  1035. render(vnode, this._root);
  1036. }
  1037. _createVNode() {
  1038. const baseProps = {};
  1039. if (!this.shadowRoot) {
  1040. baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
  1041. }
  1042. const vnode = runtimeCore.createVNode(this._def, shared.extend(baseProps, this._props));
  1043. if (!this._instance) {
  1044. vnode.ce = (instance) => {
  1045. this._instance = instance;
  1046. instance.ce = this;
  1047. instance.isCE = true;
  1048. const dispatch = (event, args) => {
  1049. this.dispatchEvent(
  1050. new CustomEvent(
  1051. event,
  1052. shared.isPlainObject(args[0]) ? shared.extend({ detail: args }, args[0]) : { detail: args }
  1053. )
  1054. );
  1055. };
  1056. instance.emit = (event, ...args) => {
  1057. dispatch(event, args);
  1058. if (shared.hyphenate(event) !== event) {
  1059. dispatch(shared.hyphenate(event), args);
  1060. }
  1061. };
  1062. this._setParent();
  1063. };
  1064. }
  1065. return vnode;
  1066. }
  1067. _applyStyles(styles, owner, parentComp) {
  1068. if (!styles) return;
  1069. if (owner) {
  1070. if (owner === this._def || this._styleChildren.has(owner)) {
  1071. return;
  1072. }
  1073. this._styleChildren.add(owner);
  1074. }
  1075. const nonce = this._nonce;
  1076. const root = this.shadowRoot;
  1077. const insertionAnchor = parentComp ? this._getStyleAnchor(parentComp) || this._getStyleAnchor(this._def) : this._getRootStyleInsertionAnchor(root);
  1078. let last = null;
  1079. for (let i = styles.length - 1; i >= 0; i--) {
  1080. const s = document.createElement("style");
  1081. if (nonce) s.setAttribute("nonce", nonce);
  1082. s.textContent = styles[i];
  1083. root.insertBefore(s, last || insertionAnchor);
  1084. last = s;
  1085. if (i === 0) {
  1086. if (!parentComp) this._styleAnchors.set(this._def, s);
  1087. if (owner) this._styleAnchors.set(owner, s);
  1088. }
  1089. }
  1090. }
  1091. _getStyleAnchor(comp) {
  1092. if (!comp) {
  1093. return null;
  1094. }
  1095. const anchor = this._styleAnchors.get(comp);
  1096. if (anchor && anchor.parentNode === this.shadowRoot) {
  1097. return anchor;
  1098. }
  1099. if (anchor) {
  1100. this._styleAnchors.delete(comp);
  1101. }
  1102. return null;
  1103. }
  1104. _getRootStyleInsertionAnchor(root) {
  1105. for (let i = 0; i < root.childNodes.length; i++) {
  1106. const node = root.childNodes[i];
  1107. if (!(node instanceof HTMLStyleElement)) {
  1108. return node;
  1109. }
  1110. }
  1111. return null;
  1112. }
  1113. /**
  1114. * Only called when shadowRoot is false
  1115. */
  1116. _parseSlots() {
  1117. const slots = this._slots = {};
  1118. let n;
  1119. while (n = this.firstChild) {
  1120. const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default";
  1121. (slots[slotName] || (slots[slotName] = [])).push(n);
  1122. this.removeChild(n);
  1123. }
  1124. }
  1125. /**
  1126. * Only called when shadowRoot is false
  1127. */
  1128. _renderSlots() {
  1129. const outlets = this._getSlots();
  1130. const scopeId = this._instance.type.__scopeId;
  1131. for (let i = 0; i < outlets.length; i++) {
  1132. const o = outlets[i];
  1133. const slotName = o.getAttribute("name") || "default";
  1134. const content = this._slots[slotName];
  1135. const parent = o.parentNode;
  1136. if (content) {
  1137. for (const n of content) {
  1138. if (scopeId && n.nodeType === 1) {
  1139. const id = scopeId + "-s";
  1140. const walker = document.createTreeWalker(n, 1);
  1141. n.setAttribute(id, "");
  1142. let child;
  1143. while (child = walker.nextNode()) {
  1144. child.setAttribute(id, "");
  1145. }
  1146. }
  1147. parent.insertBefore(n, o);
  1148. }
  1149. } else {
  1150. while (o.firstChild) parent.insertBefore(o.firstChild, o);
  1151. }
  1152. parent.removeChild(o);
  1153. }
  1154. }
  1155. /**
  1156. * @internal
  1157. */
  1158. _getSlots() {
  1159. const roots = [this];
  1160. if (this._teleportTargets) {
  1161. roots.push(...this._teleportTargets);
  1162. }
  1163. const slots = /* @__PURE__ */ new Set();
  1164. for (const root of roots) {
  1165. const found = root.querySelectorAll("slot");
  1166. for (let i = 0; i < found.length; i++) {
  1167. slots.add(found[i]);
  1168. }
  1169. }
  1170. return Array.from(slots);
  1171. }
  1172. /**
  1173. * @internal
  1174. */
  1175. _injectChildStyle(comp, parentComp) {
  1176. this._applyStyles(comp.styles, comp, parentComp);
  1177. }
  1178. /**
  1179. * @internal
  1180. */
  1181. _beginPatch() {
  1182. this._patching = true;
  1183. this._dirty = false;
  1184. }
  1185. /**
  1186. * @internal
  1187. */
  1188. _endPatch() {
  1189. this._patching = false;
  1190. if (this._dirty && this._instance) {
  1191. this._update();
  1192. }
  1193. }
  1194. /**
  1195. * @internal
  1196. */
  1197. _hasShadowRoot() {
  1198. return this._def.shadowRoot !== false;
  1199. }
  1200. /**
  1201. * @internal
  1202. */
  1203. _removeChildStyle(comp) {
  1204. }
  1205. }
  1206. function useHost(caller) {
  1207. const instance = runtimeCore.getCurrentInstance();
  1208. const el = instance && instance.ce;
  1209. if (el) {
  1210. return el;
  1211. }
  1212. return null;
  1213. }
  1214. function useShadowRoot() {
  1215. const el = useHost();
  1216. return el && el.shadowRoot;
  1217. }
  1218. function useCssModule(name = "$style") {
  1219. {
  1220. const instance = runtimeCore.getCurrentInstance();
  1221. if (!instance) {
  1222. return shared.EMPTY_OBJ;
  1223. }
  1224. const modules = instance.type.__cssModules;
  1225. if (!modules) {
  1226. return shared.EMPTY_OBJ;
  1227. }
  1228. const mod = modules[name];
  1229. if (!mod) {
  1230. return shared.EMPTY_OBJ;
  1231. }
  1232. return mod;
  1233. }
  1234. }
  1235. const positionMap = /* @__PURE__ */ new WeakMap();
  1236. const newPositionMap = /* @__PURE__ */ new WeakMap();
  1237. const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
  1238. const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
  1239. const decorate = (t) => {
  1240. delete t.props.mode;
  1241. return t;
  1242. };
  1243. const TransitionGroupImpl = /* @__PURE__ */ decorate({
  1244. name: "TransitionGroup",
  1245. props: /* @__PURE__ */ shared.extend({}, TransitionPropsValidators, {
  1246. tag: String,
  1247. moveClass: String
  1248. }),
  1249. setup(props, { slots }) {
  1250. const instance = runtimeCore.getCurrentInstance();
  1251. const state = runtimeCore.useTransitionState();
  1252. let prevChildren;
  1253. let children;
  1254. runtimeCore.onUpdated(() => {
  1255. if (!prevChildren.length) {
  1256. return;
  1257. }
  1258. const moveClass = props.moveClass || `${props.name || "v"}-move`;
  1259. if (!hasCSSTransform(
  1260. prevChildren[0].el,
  1261. instance.vnode.el,
  1262. moveClass
  1263. )) {
  1264. prevChildren = [];
  1265. return;
  1266. }
  1267. prevChildren.forEach(callPendingCbs);
  1268. prevChildren.forEach(recordPosition);
  1269. const movedChildren = prevChildren.filter(applyTranslation);
  1270. forceReflow(instance.vnode.el);
  1271. movedChildren.forEach((c) => {
  1272. const el = c.el;
  1273. const style = el.style;
  1274. addTransitionClass(el, moveClass);
  1275. style.transform = style.webkitTransform = style.transitionDuration = "";
  1276. const cb = el[moveCbKey] = (e) => {
  1277. if (e && e.target !== el) {
  1278. return;
  1279. }
  1280. if (!e || e.propertyName.endsWith("transform")) {
  1281. el.removeEventListener("transitionend", cb);
  1282. el[moveCbKey] = null;
  1283. removeTransitionClass(el, moveClass);
  1284. }
  1285. };
  1286. el.addEventListener("transitionend", cb);
  1287. });
  1288. prevChildren = [];
  1289. });
  1290. return () => {
  1291. const rawProps = runtimeCore.toRaw(props);
  1292. const cssTransitionProps = resolveTransitionProps(rawProps);
  1293. let tag = rawProps.tag || runtimeCore.Fragment;
  1294. prevChildren = [];
  1295. if (children) {
  1296. for (let i = 0; i < children.length; i++) {
  1297. const child = children[i];
  1298. if (child.el && child.el instanceof Element && // Hidden v-show nodes have no previous layout box to animate from.
  1299. !child.el[vShowHidden]) {
  1300. prevChildren.push(child);
  1301. runtimeCore.setTransitionHooks(
  1302. child,
  1303. runtimeCore.resolveTransitionHooks(
  1304. child,
  1305. cssTransitionProps,
  1306. state,
  1307. instance
  1308. )
  1309. );
  1310. positionMap.set(child, getPosition(child.el));
  1311. }
  1312. }
  1313. }
  1314. children = slots.default ? runtimeCore.getTransitionRawChildren(slots.default()) : [];
  1315. for (let i = 0; i < children.length; i++) {
  1316. const child = children[i];
  1317. if (child.key != null) {
  1318. runtimeCore.setTransitionHooks(
  1319. child,
  1320. runtimeCore.resolveTransitionHooks(child, cssTransitionProps, state, instance)
  1321. );
  1322. }
  1323. }
  1324. return runtimeCore.createVNode(tag, null, children);
  1325. };
  1326. }
  1327. });
  1328. const TransitionGroup = TransitionGroupImpl;
  1329. function callPendingCbs(c) {
  1330. const el = c.el;
  1331. if (el[moveCbKey]) {
  1332. el[moveCbKey]();
  1333. }
  1334. if (el[enterCbKey]) {
  1335. el[enterCbKey]();
  1336. }
  1337. }
  1338. function recordPosition(c) {
  1339. newPositionMap.set(c, getPosition(c.el));
  1340. }
  1341. function applyTranslation(c) {
  1342. const oldPos = positionMap.get(c);
  1343. const newPos = newPositionMap.get(c);
  1344. const dx = oldPos.left - newPos.left;
  1345. const dy = oldPos.top - newPos.top;
  1346. if (dx || dy) {
  1347. const el = c.el;
  1348. const s = el.style;
  1349. const rect = el.getBoundingClientRect();
  1350. let scaleX = 1;
  1351. let scaleY = 1;
  1352. if (el.offsetWidth) scaleX = rect.width / el.offsetWidth;
  1353. if (el.offsetHeight) scaleY = rect.height / el.offsetHeight;
  1354. if (!Number.isFinite(scaleX) || scaleX === 0) scaleX = 1;
  1355. if (!Number.isFinite(scaleY) || scaleY === 0) scaleY = 1;
  1356. if (Math.abs(scaleX - 1) < 0.01) scaleX = 1;
  1357. if (Math.abs(scaleY - 1) < 0.01) scaleY = 1;
  1358. s.transform = s.webkitTransform = `translate(${dx / scaleX}px,${dy / scaleY}px)`;
  1359. s.transitionDuration = "0s";
  1360. return c;
  1361. }
  1362. }
  1363. function getPosition(el) {
  1364. const rect = el.getBoundingClientRect();
  1365. return {
  1366. left: rect.left,
  1367. top: rect.top
  1368. };
  1369. }
  1370. function hasCSSTransform(el, root, moveClass) {
  1371. const clone = el.cloneNode();
  1372. const _vtc = el[vtcKey];
  1373. if (_vtc) {
  1374. _vtc.forEach((cls) => {
  1375. cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c));
  1376. });
  1377. }
  1378. moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c));
  1379. clone.style.display = "none";
  1380. const container = root.nodeType === 1 ? root : root.parentNode;
  1381. container.appendChild(clone);
  1382. const { hasTransform } = getTransitionInfo(clone);
  1383. container.removeChild(clone);
  1384. return hasTransform;
  1385. }
  1386. const getModelAssigner = (vnode) => {
  1387. const fn = vnode.props["onUpdate:modelValue"] || false;
  1388. return shared.isArray(fn) ? (value) => shared.invokeArrayFns(fn, value) : fn;
  1389. };
  1390. function onCompositionStart(e) {
  1391. e.target.composing = true;
  1392. }
  1393. function onCompositionEnd(e) {
  1394. const target = e.target;
  1395. if (target.composing) {
  1396. target.composing = false;
  1397. target.dispatchEvent(new Event("input"));
  1398. }
  1399. }
  1400. const assignKey = /* @__PURE__ */ Symbol("_assign");
  1401. const initialValueKey = /* @__PURE__ */ Symbol("_initialValue");
  1402. function castValue(value, trim, number) {
  1403. if (trim) value = value.trim();
  1404. if (number) value = shared.looseToNumber(value);
  1405. return value;
  1406. }
  1407. const vModelText = {
  1408. created(el, { modifiers: { lazy, trim, number } }, vnode) {
  1409. if (el.parentNode) {
  1410. if (el.type === "text") {
  1411. el[initialValueKey] = el.defaultValue.replace(/[\r\n]/g, "");
  1412. } else if (el.type === "textarea") {
  1413. el[initialValueKey] = el.defaultValue.replace(/\r\n?/g, "\n");
  1414. }
  1415. }
  1416. el[assignKey] = getModelAssigner(vnode);
  1417. const castToNumber = number || vnode.props && vnode.props.type === "number";
  1418. addEventListener(el, lazy ? "change" : "input", (e) => {
  1419. if (e.target.composing) return;
  1420. el[assignKey](castValue(el.value, trim, castToNumber));
  1421. });
  1422. if (trim || castToNumber) {
  1423. addEventListener(el, "change", () => {
  1424. el.value = castValue(el.value, trim, castToNumber);
  1425. });
  1426. }
  1427. if (!lazy) {
  1428. addEventListener(el, "compositionstart", onCompositionStart);
  1429. addEventListener(el, "compositionend", onCompositionEnd);
  1430. addEventListener(el, "change", onCompositionEnd);
  1431. }
  1432. },
  1433. // set value on mounted so it's after min/max for type="range"
  1434. mounted(el, { value, modifiers: { trim, number } }) {
  1435. const newValue = value == null ? "" : value;
  1436. const initialValue = el[initialValueKey];
  1437. delete el[initialValueKey];
  1438. if (initialValue !== void 0 && (el.type === "text" || el.type === "textarea") && el.value !== initialValue) {
  1439. el[assignKey](castValue(el.value, trim, number));
  1440. } else {
  1441. el.value = newValue;
  1442. }
  1443. },
  1444. beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {
  1445. el[assignKey] = getModelAssigner(vnode);
  1446. if (el.composing) return;
  1447. const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? shared.looseToNumber(el.value) : el.value;
  1448. const newValue = value == null ? "" : value;
  1449. if (elValue === newValue) {
  1450. return;
  1451. }
  1452. const rootNode = el.getRootNode();
  1453. if ((rootNode instanceof Document || rootNode instanceof ShadowRoot) && rootNode.activeElement === el && el.type !== "range") {
  1454. if (lazy && value === oldValue) {
  1455. return;
  1456. }
  1457. if (trim && el.value.trim() === newValue) {
  1458. return;
  1459. }
  1460. }
  1461. el.value = newValue;
  1462. }
  1463. };
  1464. const vModelCheckbox = {
  1465. // #4096 array checkboxes need to be deep traversed
  1466. deep: true,
  1467. created(el, _, vnode) {
  1468. el[assignKey] = getModelAssigner(vnode);
  1469. addEventListener(el, "change", () => {
  1470. const modelValue = el._modelValue;
  1471. const elementValue = getValue(el);
  1472. const checked = el.checked;
  1473. const assign = el[assignKey];
  1474. if (shared.isArray(modelValue)) {
  1475. const index = shared.looseIndexOf(modelValue, elementValue);
  1476. const found = index !== -1;
  1477. if (checked && !found) {
  1478. assign(modelValue.concat(elementValue));
  1479. } else if (!checked && found) {
  1480. const filtered = [...modelValue];
  1481. filtered.splice(index, 1);
  1482. assign(filtered);
  1483. }
  1484. } else if (shared.isSet(modelValue)) {
  1485. const cloned = new Set(modelValue);
  1486. if (checked) {
  1487. cloned.add(elementValue);
  1488. } else {
  1489. cloned.delete(elementValue);
  1490. }
  1491. assign(cloned);
  1492. } else {
  1493. assign(getCheckboxValue(el, checked));
  1494. }
  1495. });
  1496. },
  1497. // set initial checked on mount to wait for true-value/false-value
  1498. mounted: setChecked,
  1499. beforeUpdate(el, binding, vnode) {
  1500. el[assignKey] = getModelAssigner(vnode);
  1501. setChecked(el, binding, vnode);
  1502. }
  1503. };
  1504. function setChecked(el, { value, oldValue }, vnode) {
  1505. el._modelValue = value;
  1506. let checked;
  1507. if (shared.isArray(value)) {
  1508. checked = shared.looseIndexOf(value, vnode.props.value) > -1;
  1509. } else if (shared.isSet(value)) {
  1510. checked = value.has(vnode.props.value);
  1511. } else {
  1512. if (value === oldValue) return;
  1513. checked = shared.looseEqual(value, getCheckboxValue(el, true));
  1514. }
  1515. if (el.checked !== checked) {
  1516. el.checked = checked;
  1517. }
  1518. }
  1519. const vModelRadio = {
  1520. created(el, { value }, vnode) {
  1521. el.checked = shared.looseEqual(value, vnode.props.value);
  1522. el[assignKey] = getModelAssigner(vnode);
  1523. addEventListener(el, "change", () => {
  1524. el[assignKey](getValue(el));
  1525. });
  1526. },
  1527. beforeUpdate(el, { value, oldValue }, vnode) {
  1528. el[assignKey] = getModelAssigner(vnode);
  1529. if (value !== oldValue) {
  1530. el.checked = shared.looseEqual(value, vnode.props.value);
  1531. }
  1532. }
  1533. };
  1534. const vModelSelect = {
  1535. // <select multiple> value need to be deep traversed
  1536. deep: true,
  1537. created(el, { value, modifiers: { number } }, vnode) {
  1538. el._modelValue = value;
  1539. addEventListener(el, "change", () => {
  1540. const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(
  1541. (o) => number ? shared.looseToNumber(getValue(o)) : getValue(o)
  1542. );
  1543. const multiple = el.multiple;
  1544. const assignedValue = multiple ? shared.isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0];
  1545. const pending = el._pendingValue = [
  1546. multiple,
  1547. multiple ? shared.isArray(assignedValue) ? selectedVal.slice() : selectedVal : assignedValue
  1548. ];
  1549. try {
  1550. el[assignKey](assignedValue);
  1551. } finally {
  1552. runtimeCore.nextTick(() => {
  1553. if (el._pendingValue === pending) {
  1554. el._pendingValue = void 0;
  1555. }
  1556. });
  1557. }
  1558. });
  1559. el[assignKey] = getModelAssigner(vnode);
  1560. },
  1561. // set value in mounted & updated because <select> relies on its children
  1562. // <option>s.
  1563. mounted(el, { value }) {
  1564. setSelected(el, value);
  1565. },
  1566. beforeUpdate(el, { value }, vnode) {
  1567. el._modelValue = value;
  1568. el[assignKey] = getModelAssigner(vnode);
  1569. },
  1570. updated(el, { value }) {
  1571. const pending = el._pendingValue;
  1572. el._pendingValue = void 0;
  1573. if (!pending || pending[0] !== el.multiple || !isSameSelectValue(value, pending[1], pending[0])) {
  1574. setSelected(el, value);
  1575. }
  1576. }
  1577. };
  1578. function isSameSelectValue(value, assignedValue, multiple) {
  1579. if (!multiple) return shared.looseEqual(value, assignedValue);
  1580. if (shared.isArray(value)) return shared.looseEqual(value, assignedValue);
  1581. if (shared.isSet(value)) {
  1582. if (value.size !== assignedValue.length) return false;
  1583. for (const item of assignedValue) {
  1584. if (!value.has(item)) return false;
  1585. }
  1586. return true;
  1587. }
  1588. return false;
  1589. }
  1590. function setSelected(el, value) {
  1591. const isMultiple = el.multiple;
  1592. const isArrayValue = shared.isArray(value);
  1593. if (isMultiple && !isArrayValue && !shared.isSet(value)) {
  1594. return;
  1595. }
  1596. for (let i = 0, l = el.options.length; i < l; i++) {
  1597. const option = el.options[i];
  1598. const optionValue = getValue(option);
  1599. if (isMultiple) {
  1600. if (isArrayValue) {
  1601. const optionType = typeof optionValue;
  1602. if (optionType === "string" || optionType === "number") {
  1603. option.selected = value.some((v) => String(v) === String(optionValue));
  1604. } else {
  1605. option.selected = shared.looseIndexOf(value, optionValue) > -1;
  1606. }
  1607. } else {
  1608. option.selected = value.has(optionValue);
  1609. }
  1610. } else if (shared.looseEqual(getValue(option), value)) {
  1611. if (el.selectedIndex !== i) el.selectedIndex = i;
  1612. return;
  1613. }
  1614. }
  1615. if (!isMultiple && el.selectedIndex !== -1) {
  1616. el.selectedIndex = -1;
  1617. }
  1618. }
  1619. function getValue(el) {
  1620. return "_value" in el ? el._value : el.value;
  1621. }
  1622. function getCheckboxValue(el, checked) {
  1623. const key = checked ? "_trueValue" : "_falseValue";
  1624. return key in el ? el[key] : checked;
  1625. }
  1626. const vModelDynamic = {
  1627. created(el, binding, vnode) {
  1628. callModelHook(el, binding, vnode, null, "created");
  1629. },
  1630. mounted(el, binding, vnode) {
  1631. callModelHook(el, binding, vnode, null, "mounted");
  1632. },
  1633. beforeUpdate(el, binding, vnode, prevVNode) {
  1634. callModelHook(el, binding, vnode, prevVNode, "beforeUpdate");
  1635. },
  1636. updated(el, binding, vnode, prevVNode) {
  1637. callModelHook(el, binding, vnode, prevVNode, "updated");
  1638. }
  1639. };
  1640. function resolveDynamicModel(tagName, type) {
  1641. switch (tagName) {
  1642. case "SELECT":
  1643. return vModelSelect;
  1644. case "TEXTAREA":
  1645. return vModelText;
  1646. default:
  1647. switch (type) {
  1648. case "checkbox":
  1649. return vModelCheckbox;
  1650. case "radio":
  1651. return vModelRadio;
  1652. default:
  1653. return vModelText;
  1654. }
  1655. }
  1656. }
  1657. function callModelHook(el, binding, vnode, prevVNode, hook) {
  1658. const modelToUse = resolveDynamicModel(
  1659. el.tagName,
  1660. vnode.props && vnode.props.type
  1661. );
  1662. const fn = modelToUse[hook];
  1663. fn && fn(el, binding, vnode, prevVNode);
  1664. }
  1665. function initVModelForSSR() {
  1666. vModelText.getSSRProps = ({ value }) => ({ value });
  1667. vModelRadio.getSSRProps = ({ value }, vnode) => {
  1668. if (vnode.props && shared.looseEqual(vnode.props.value, value)) {
  1669. return { checked: true };
  1670. }
  1671. };
  1672. vModelCheckbox.getSSRProps = ({ value }, vnode) => {
  1673. if (shared.isArray(value)) {
  1674. if (vnode.props && shared.looseIndexOf(value, vnode.props.value) > -1) {
  1675. return { checked: true };
  1676. }
  1677. } else if (shared.isSet(value)) {
  1678. if (vnode.props && value.has(vnode.props.value)) {
  1679. return { checked: true };
  1680. }
  1681. } else if (value) {
  1682. return { checked: true };
  1683. }
  1684. };
  1685. vModelDynamic.getSSRProps = (binding, vnode) => {
  1686. if (typeof vnode.type !== "string") {
  1687. return;
  1688. }
  1689. const modelToUse = resolveDynamicModel(
  1690. // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase
  1691. vnode.type.toUpperCase(),
  1692. vnode.props && vnode.props.type
  1693. );
  1694. if (modelToUse.getSSRProps) {
  1695. return modelToUse.getSSRProps(binding, vnode);
  1696. }
  1697. };
  1698. }
  1699. const systemModifiers = ["ctrl", "shift", "alt", "meta"];
  1700. const modifierGuards = {
  1701. stop: (e) => e.stopPropagation(),
  1702. prevent: (e) => e.preventDefault(),
  1703. self: (e) => e.target !== e.currentTarget,
  1704. ctrl: (e) => !e.ctrlKey,
  1705. shift: (e) => !e.shiftKey,
  1706. alt: (e) => !e.altKey,
  1707. meta: (e) => !e.metaKey,
  1708. left: (e) => "button" in e && e.button !== 0,
  1709. middle: (e) => "button" in e && e.button !== 1,
  1710. right: (e) => "button" in e && e.button !== 2,
  1711. exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
  1712. };
  1713. const withModifiers = (fn, modifiers) => {
  1714. if (!fn) return fn;
  1715. const cache = fn._withMods || (fn._withMods = {});
  1716. const cacheKey = modifiers.join(".");
  1717. return cache[cacheKey] || (cache[cacheKey] = ((event, ...args) => {
  1718. for (let i = 0; i < modifiers.length; i++) {
  1719. const guard = modifierGuards[modifiers[i]];
  1720. if (guard && guard(event, modifiers)) return;
  1721. }
  1722. return fn(event, ...args);
  1723. }));
  1724. };
  1725. const keyNames = {
  1726. esc: "escape",
  1727. space: " ",
  1728. up: "arrow-up",
  1729. left: "arrow-left",
  1730. right: "arrow-right",
  1731. down: "arrow-down",
  1732. delete: "backspace"
  1733. };
  1734. const withKeys = (fn, modifiers) => {
  1735. const cache = fn._withKeys || (fn._withKeys = {});
  1736. const cacheKey = modifiers.join(".");
  1737. return cache[cacheKey] || (cache[cacheKey] = ((event) => {
  1738. if (!("key" in event)) {
  1739. return;
  1740. }
  1741. const eventKey = shared.hyphenate(event.key);
  1742. if (modifiers.some(
  1743. (k) => k === eventKey || keyNames[k] === eventKey
  1744. )) {
  1745. return fn(event);
  1746. }
  1747. }));
  1748. };
  1749. const rendererOptions = /* @__PURE__ */ shared.extend({ patchProp }, nodeOps);
  1750. let renderer;
  1751. let enabledHydration = false;
  1752. function ensureRenderer() {
  1753. return renderer || (renderer = runtimeCore.createRenderer(rendererOptions));
  1754. }
  1755. function ensureHydrationRenderer() {
  1756. renderer = enabledHydration ? renderer : runtimeCore.createHydrationRenderer(rendererOptions);
  1757. enabledHydration = true;
  1758. return renderer;
  1759. }
  1760. const render = ((...args) => {
  1761. ensureRenderer().render(...args);
  1762. });
  1763. const hydrate = ((...args) => {
  1764. ensureHydrationRenderer().hydrate(...args);
  1765. });
  1766. const createApp = ((...args) => {
  1767. const app = ensureRenderer().createApp(...args);
  1768. const { mount } = app;
  1769. app.mount = (containerOrSelector) => {
  1770. const container = normalizeContainer(containerOrSelector);
  1771. if (!container) return;
  1772. const component = app._component;
  1773. if (!shared.isFunction(component) && !component.render && !component.template) {
  1774. component.template = container.innerHTML;
  1775. }
  1776. if (container.nodeType === 1) {
  1777. container.textContent = "";
  1778. }
  1779. const proxy = mount(container, false, resolveRootNamespace(container));
  1780. if (container instanceof Element) {
  1781. container.removeAttribute("v-cloak");
  1782. container.setAttribute("data-v-app", "");
  1783. }
  1784. return proxy;
  1785. };
  1786. return app;
  1787. });
  1788. const createSSRApp = ((...args) => {
  1789. const app = ensureHydrationRenderer().createApp(...args);
  1790. const { mount } = app;
  1791. app.mount = (containerOrSelector) => {
  1792. const container = normalizeContainer(containerOrSelector);
  1793. if (container) {
  1794. return mount(container, true, resolveRootNamespace(container));
  1795. }
  1796. };
  1797. return app;
  1798. });
  1799. function resolveRootNamespace(container) {
  1800. if (container instanceof SVGElement) {
  1801. return "svg";
  1802. }
  1803. if (typeof MathMLElement === "function" && container instanceof MathMLElement) {
  1804. return "mathml";
  1805. }
  1806. }
  1807. function normalizeContainer(container) {
  1808. if (shared.isString(container)) {
  1809. const res = document.querySelector(container);
  1810. return res;
  1811. }
  1812. return container;
  1813. }
  1814. let ssrDirectiveInitialized = false;
  1815. const initDirectivesForSSR = () => {
  1816. if (!ssrDirectiveInitialized) {
  1817. ssrDirectiveInitialized = true;
  1818. initVModelForSSR();
  1819. initVShowForSSR();
  1820. }
  1821. } ;
  1822. exports.Transition = Transition;
  1823. exports.TransitionGroup = TransitionGroup;
  1824. exports.VueElement = VueElement;
  1825. exports.createApp = createApp;
  1826. exports.createSSRApp = createSSRApp;
  1827. exports.defineCustomElement = defineCustomElement;
  1828. exports.defineSSRCustomElement = defineSSRCustomElement;
  1829. exports.hydrate = hydrate;
  1830. exports.initDirectivesForSSR = initDirectivesForSSR;
  1831. exports.nodeOps = nodeOps;
  1832. exports.patchProp = patchProp;
  1833. exports.render = render;
  1834. exports.useCssModule = useCssModule;
  1835. exports.useCssVars = useCssVars;
  1836. exports.useHost = useHost;
  1837. exports.useShadowRoot = useShadowRoot;
  1838. exports.vModelCheckbox = vModelCheckbox;
  1839. exports.vModelDynamic = vModelDynamic;
  1840. exports.vModelRadio = vModelRadio;
  1841. exports.vModelSelect = vModelSelect;
  1842. exports.vModelText = vModelText;
  1843. exports.vShow = vShow;
  1844. exports.withKeys = withKeys;
  1845. exports.withModifiers = withModifiers;
  1846. Object.keys(runtimeCore).forEach(function (k) {
  1847. if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeCore[k];
  1848. });