diff --git a/dist/vue-advanced-chat.es.js b/dist/vue-advanced-chat.es.js index 50d33a9e..6bf49c4d 100644 --- a/dist/vue-advanced-chat.es.js +++ b/dist/vue-advanced-chat.es.js @@ -1,36 +1,174 @@ -function makeMap$2(str, expectsLowerCase) { +function makeMap(str, expectsLowerCase) { const map = /* @__PURE__ */ Object.create(null); - const list = str.split(","); - for (let i = 0; i < list.length; i++) { - map[list[i]] = true; + const list2 = str.split(","); + for (let i = 0; i < list2.length; i++) { + map[list2[i]] = true; } return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val]; } -const NOOP$1 = () => { +const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; +const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); +function includeBooleanAttr(value) { + return !!value || value === ""; +} +function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value)) { + return value; + } else if (isObject(value)) { + return value; + } +} +const listDelimiterRE = /;(?![^(]*\))/g; +const propertyDelimiterRE = /:(.+)/; +function parseStringStyle(cssText) { + const ret = {}; + cssText.split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; +} +function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); +} +function normalizeProps(props) { + if (!props) + return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; +} +const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); +}; +const replacer = (_key, val) => { + if (val && val.__v_isRef) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => { + entries[`${key} =>`] = val2; + return entries; + }, {}) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()] + }; + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; +}; +const EMPTY_OBJ = {}; +const EMPTY_ARR = []; +const NOOP = () => { +}; +const NO = () => false; +const onRE = /^on[^a-z]/; +const isOn = (key) => onRE.test(key); +const isModelListener = (key) => key.startsWith("onUpdate:"); +const extend = Object.assign; +const remove = (arr, el) => { + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } }; -const extend$2 = Object.assign; -const hasOwnProperty$1 = Object.prototype.hasOwnProperty; -const hasOwn$1 = (val, key) => hasOwnProperty$1.call(val, key); -const isArray$2 = Array.isArray; -const isMap$1 = (val) => toTypeString$1(val) === "[object Map]"; -const isFunction$2 = (val) => typeof val === "function"; -const isString$2 = (val) => typeof val === "string"; +const hasOwnProperty$2 = Object.prototype.hasOwnProperty; +const hasOwn = (val, key) => hasOwnProperty$2.call(val, key); +const isArray = Array.isArray; +const isMap = (val) => toTypeString(val) === "[object Map]"; +const isSet = (val) => toTypeString(val) === "[object Set]"; +const isFunction = (val) => typeof val === "function"; +const isString = (val) => typeof val === "string"; const isSymbol = (val) => typeof val === "symbol"; -const isObject$2 = (val) => val !== null && typeof val === "object"; -const objectToString$1 = Object.prototype.toString; -const toTypeString$1 = (value) => objectToString$1.call(value); +const isObject = (val) => val !== null && typeof val === "object"; +const isPromise = (val) => { + return isObject(val) && isFunction(val.then) && isFunction(val.catch); +}; +const objectToString = Object.prototype.toString; +const toTypeString = (value) => objectToString.call(value); const toRawType = (value) => { - return toTypeString$1(value).slice(8, -1); + return toTypeString(value).slice(8, -1); +}; +const isPlainObject = (val) => toTypeString(val) === "[object Object]"; +const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; +const isReservedProp = /* @__PURE__ */ makeMap( + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +const cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; +}; +const camelizeRE = /-(\w)/g; +const camelize = cacheStringFunction((str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); +}); +const hyphenateRE = /\B([A-Z])/g; +const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase()); +const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); +const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``); +const hasChanged = (value, oldValue) => !Object.is(value, oldValue); +const invokeArrayFns = (fns, arg) => { + for (let i = 0; i < fns.length; i++) { + fns[i](arg); + } }; -const isIntegerKey = (key) => isString$2(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; -const hasChanged$1 = (value, oldValue) => !Object.is(value, oldValue); -const def$1 = (obj, key, value) => { +const def = (obj, key, value) => { Object.defineProperty(obj, key, { configurable: true, enumerable: false, value }); }; +const toNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; +}; +let _globalThis; +const getGlobalThis = () => { + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); +}; let activeEffectScope; class EffectScope { constructor(detached = false) { @@ -240,7 +378,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) { let deps = []; if (type === "clear") { deps = [...depsMap.values()]; - } else if (key === "length" && isArray$2(target)) { + } else if (key === "length" && isArray(target)) { depsMap.forEach((dep, key2) => { if (key2 === "length" || key2 >= newValue) { deps.push(dep); @@ -252,9 +390,9 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) { } switch (type) { case "add": - if (!isArray$2(target)) { + if (!isArray(target)) { deps.push(depsMap.get(ITERATE_KEY)); - if (isMap$1(target)) { + if (isMap(target)) { deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); } } else if (isIntegerKey(key)) { @@ -262,15 +400,15 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) { } break; case "delete": - if (!isArray$2(target)) { + if (!isArray(target)) { deps.push(depsMap.get(ITERATE_KEY)); - if (isMap$1(target)) { + if (isMap(target)) { deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); } } break; case "set": - if (isMap$1(target)) { + if (isMap(target)) { deps.push(depsMap.get(ITERATE_KEY)); } break; @@ -295,7 +433,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) { } } function triggerEffects(dep, debuggerEventExtraInfo) { - const effects = isArray$2(dep) ? dep : [...dep]; + const effects = isArray(dep) ? dep : [...dep]; for (const effect of effects) { if (effect.computed) { triggerEffect(effect); @@ -316,7 +454,7 @@ function triggerEffect(effect, debuggerEventExtraInfo) { } } } -const isNonTrackableKeys = /* @__PURE__ */ makeMap$2(`__proto__,__v_isRef,__isVue`); +const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); const builtInSymbols = new Set( /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) ); @@ -351,7 +489,7 @@ function createArrayInstrumentations() { return instrumentations; } function createGetter(isReadonly2 = false, shallow = false) { - return function get3(target, key, receiver) { + return function get2(target, key, receiver) { if (key === "__v_isReactive") { return !isReadonly2; } else if (key === "__v_isReadonly") { @@ -361,8 +499,8 @@ function createGetter(isReadonly2 = false, shallow = false) { } else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) { return target; } - const targetIsArray = isArray$2(target); - if (!isReadonly2 && targetIsArray && hasOwn$1(arrayInstrumentations, key)) { + const targetIsArray = isArray(target); + if (!isReadonly2 && targetIsArray && hasOwn(arrayInstrumentations, key)) { return Reflect.get(arrayInstrumentations, key, receiver); } const res = Reflect.get(target, key, receiver); @@ -378,7 +516,7 @@ function createGetter(isReadonly2 = false, shallow = false) { if (isRef(res)) { return targetIsArray && isIntegerKey(key) ? res : res.value; } - if (isObject$2(res)) { + if (isObject(res)) { return isReadonly2 ? readonly(res) : reactive(res); } return res; @@ -397,17 +535,17 @@ function createSetter(shallow = false) { value = toRaw(value); oldValue = toRaw(oldValue); } - if (!isArray$2(target) && isRef(oldValue) && !isRef(value)) { + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { oldValue.value = value; return true; } } - const hadKey = isArray$2(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn$1(target, key); + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); const result = Reflect.set(target, key, value, receiver); if (target === toRaw(receiver)) { if (!hadKey) { trigger(target, "add", key, value); - } else if (hasChanged$1(value, oldValue)) { + } else if (hasChanged(value, oldValue)) { trigger(target, "set", key, value); } } @@ -415,7 +553,7 @@ function createSetter(shallow = false) { }; } function deleteProperty(target, key) { - const hadKey = hasOwn$1(target, key); + const hadKey = hasOwn(target, key); target[key]; const result = Reflect.deleteProperty(target, key); if (result && hadKey) { @@ -431,7 +569,7 @@ function has(target, key) { return result; } function ownKeys(target) { - track(target, "iterate", isArray$2(target) ? "length" : ITERATE_KEY); + track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY); return Reflect.ownKeys(target); } const mutableHandlers = { @@ -450,7 +588,7 @@ const readonlyHandlers = { return true; } }; -const shallowReactiveHandlers = /* @__PURE__ */ extend$2({}, mutableHandlers, { +const shallowReactiveHandlers = /* @__PURE__ */ extend({}, mutableHandlers, { get: shallowGet, set: shallowSet }); @@ -507,30 +645,30 @@ function add(value) { function set$1$1(key, value) { value = toRaw(value); const target = toRaw(this); - const { has: has2, get: get3 } = getProto(target); + const { has: has2, get: get2 } = getProto(target); let hadKey = has2.call(target, key); if (!hadKey) { key = toRaw(key); hadKey = has2.call(target, key); } - const oldValue = get3.call(target, key); + const oldValue = get2.call(target, key); target.set(key, value); if (!hadKey) { trigger(target, "add", key, value); - } else if (hasChanged$1(value, oldValue)) { + } else if (hasChanged(value, oldValue)) { trigger(target, "set", key, value); } return this; } function deleteEntry(key) { const target = toRaw(this); - const { has: has2, get: get3 } = getProto(target); + const { has: has2, get: get2 } = getProto(target); let hadKey = has2.call(target, key); if (!hadKey) { key = toRaw(key); hadKey = has2.call(target, key); } - get3 ? get3.call(target, key) : void 0; + get2 ? get2.call(target, key) : void 0; const result = target.delete(key); if (hadKey) { trigger(target, "delete", key, void 0); @@ -562,7 +700,7 @@ function createIterableMethod(method, isReadonly2, isShallow2) { return function(...args) { const target = this["__v_raw"]; const rawTarget = toRaw(target); - const targetIsMap = isMap$1(rawTarget); + const targetIsMap = isMap(rawTarget); const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; const isKeyOnly = method === "keys" && targetIsMap; const innerIterator = target[method](...args); @@ -673,7 +811,7 @@ function createInstrumentationGetter(isReadonly2, shallow) { } else if (key === "__v_raw") { return target; } - return Reflect.get(hasOwn$1(instrumentations, key) && key in target ? instrumentations : target, key, receiver); + return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver); }; } const mutableCollectionHandlers = { @@ -719,7 +857,7 @@ function readonly(target) { return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap); } function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { - if (!isObject$2(target)) { + if (!isObject(target)) { return target; } if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { @@ -757,11 +895,11 @@ function toRaw(observed) { return raw ? toRaw(raw) : observed; } function markRaw(value) { - def$1(value, "__v_skip", true); + def(value, "__v_skip", true); return value; } -const toReactive = (value) => isObject$2(value) ? reactive(value) : value; -const toReadonly = (value) => isObject$2(value) ? readonly(value) : value; +const toReactive = (value) => isObject(value) ? reactive(value) : value; +const toReadonly = (value) => isObject(value) ? readonly(value) : value; function trackRefValue(ref) { if (shouldTrack && activeEffect) { ref = toRaw(ref); @@ -831,10 +969,10 @@ class ComputedRefImpl { function computed$1(getterOrOptions, debugOptions, isSSR = false) { let getter; let setter; - const onlyGetter = isFunction$2(getterOrOptions); + const onlyGetter = isFunction(getterOrOptions); if (onlyGetter) { getter = getterOrOptions; - setter = NOOP$1; + setter = NOOP; } else { getter = getterOrOptions.get; setter = getterOrOptions.set; @@ -842,248 +980,87 @@ function computed$1(getterOrOptions, debugOptions, isSSR = false) { const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); return cRef; } -function makeMap$1(str, expectsLowerCase) { - const map = /* @__PURE__ */ Object.create(null); - const list = str.split(","); - for (let i = 0; i < list.length; i++) { - map[list[i]] = true; +function callWithErrorHandling(fn, instance2, type, args) { + let res; + try { + res = args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance2, type); } - return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val]; + return res; } -function normalizeStyle(value) { - if (isArray$1(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = isString$1(item) ? parseStringStyle(item) : normalizeStyle(item); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } +function callWithAsyncErrorHandling(fn, instance2, type, args) { + if (isFunction(fn)) { + const res = callWithErrorHandling(fn, instance2, type, args); + if (res && isPromise(res)) { + res.catch((err) => { + handleError(err, instance2, type); + }); } return res; - } else if (isString$1(value)) { - return value; - } else if (isObject$1(value)) { - return value; } + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance2, type, args)); + } + return values; } -const listDelimiterRE = /;(?![^(]*\))/g; -const propertyDelimiterRE = /:(.+)/; -function parseStringStyle(cssText) { - const ret = {}; - cssText.split(listDelimiterRE).forEach((item) => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; -} -function normalizeClass(value) { - let res = ""; - if (isString$1(value)) { - res = value; - } else if (isArray$1(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); - if (normalized) { - res += normalized + " "; +function handleError(err, instance2, type, throwInDev = true) { + const contextVNode = instance2 ? instance2.vnode : null; + if (instance2) { + let cur = instance2.parent; + const exposedInstance = instance2.proxy; + const errorInfo = type; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { + return; + } + } } + cur = cur.parent; } - } else if (isObject$1(value)) { - for (const name in value) { - if (value[name]) { - res += name + " "; - } + const appErrorHandler = instance2.appContext.config.errorHandler; + if (appErrorHandler) { + callWithErrorHandling(appErrorHandler, null, 10, [err, exposedInstance, errorInfo]); + return; } } - return res.trim(); + logError(err, type, contextVNode, throwInDev); } -function normalizeProps(props) { - if (!props) - return null; - let { class: klass, style } = props; - if (klass && !isString$1(klass)) { - props.class = normalizeClass(klass); +function logError(err, type, contextVNode, throwInDev = true) { + { + console.error(err); } - if (style) { - props.style = normalizeStyle(style); +} +let isFlushing = false; +let isFlushPending = false; +const queue = []; +let flushIndex = 0; +const pendingPreFlushCbs = []; +let activePreFlushCbs = null; +let preFlushIndex = 0; +const pendingPostFlushCbs = []; +let activePostFlushCbs = null; +let postFlushIndex = 0; +const resolvedPromise = /* @__PURE__ */ Promise.resolve(); +let currentFlushPromise = null; +let currentPreFlushParentJob = null; +function nextTick(fn) { + const p2 = currentFlushPromise || resolvedPromise; + return fn ? p2.then(this ? fn.bind(this) : fn) : p2; +} +function findInsertionIndex(id) { + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJobId = getId(queue[middle]); + middleJobId < id ? start = middle + 1 : end = middle; } - return props; -} -const toDisplayString = (val) => { - return isString$1(val) ? val : val == null ? "" : isArray$1(val) || isObject$1(val) && (val.toString === objectToString || !isFunction$1(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); -}; -const replacer = (_key, val) => { - if (val && val.__v_isRef) { - return replacer(_key, val.value); - } else if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => { - entries[`${key} =>`] = val2; - return entries; - }, {}) - }; - } else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()] - }; - } else if (isObject$1(val) && !isArray$1(val) && !isPlainObject(val)) { - return String(val); - } - return val; -}; -const EMPTY_OBJ = {}; -const EMPTY_ARR = []; -const NOOP = () => { -}; -const NO = () => false; -const onRE$1 = /^on[^a-z]/; -const isOn$1 = (key) => onRE$1.test(key); -const isModelListener$1 = (key) => key.startsWith("onUpdate:"); -const extend$1 = Object.assign; -const remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); - } -}; -const hasOwnProperty = Object.prototype.hasOwnProperty; -const hasOwn = (val, key) => hasOwnProperty.call(val, key); -const isArray$1 = Array.isArray; -const isMap = (val) => toTypeString(val) === "[object Map]"; -const isSet = (val) => toTypeString(val) === "[object Set]"; -const isFunction$1 = (val) => typeof val === "function"; -const isString$1 = (val) => typeof val === "string"; -const isObject$1 = (val) => val !== null && typeof val === "object"; -const isPromise = (val) => { - return isObject$1(val) && isFunction$1(val.then) && isFunction$1(val.catch); -}; -const objectToString = Object.prototype.toString; -const toTypeString = (value) => objectToString.call(value); -const isPlainObject = (val) => toTypeString(val) === "[object Object]"; -const isReservedProp = /* @__PURE__ */ makeMap$1( - ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" -); -const cacheStringFunction$1 = (fn) => { - const cache = /* @__PURE__ */ Object.create(null); - return (str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }; -}; -const camelizeRE$1 = /-(\w)/g; -const camelize$1 = cacheStringFunction$1((str) => { - return str.replace(camelizeRE$1, (_, c) => c ? c.toUpperCase() : ""); -}); -const hyphenateRE$1 = /\B([A-Z])/g; -const hyphenate$1 = cacheStringFunction$1((str) => str.replace(hyphenateRE$1, "-$1").toLowerCase()); -const capitalize$1 = cacheStringFunction$1((str) => str.charAt(0).toUpperCase() + str.slice(1)); -const toHandlerKey = cacheStringFunction$1((str) => str ? `on${capitalize$1(str)}` : ``); -const hasChanged = (value, oldValue) => !Object.is(value, oldValue); -const invokeArrayFns = (fns, arg) => { - for (let i = 0; i < fns.length; i++) { - fns[i](arg); - } -}; -const def = (obj, key, value) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - value - }); -}; -const toNumber$1 = (val) => { - const n = parseFloat(val); - return isNaN(n) ? val : n; -}; -let _globalThis; -const getGlobalThis = () => { - return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); -}; -function callWithErrorHandling(fn, instance2, type, args) { - let res; - try { - res = args ? fn(...args) : fn(); - } catch (err) { - handleError(err, instance2, type); - } - return res; -} -function callWithAsyncErrorHandling(fn, instance2, type, args) { - if (isFunction$1(fn)) { - const res = callWithErrorHandling(fn, instance2, type, args); - if (res && isPromise(res)) { - res.catch((err) => { - handleError(err, instance2, type); - }); - } - return res; - } - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance2, type, args)); - } - return values; -} -function handleError(err, instance2, type, throwInDev = true) { - const contextVNode = instance2 ? instance2.vnode : null; - if (instance2) { - let cur = instance2.parent; - const exposedInstance = instance2.proxy; - const errorInfo = type; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - const appErrorHandler = instance2.appContext.config.errorHandler; - if (appErrorHandler) { - callWithErrorHandling(appErrorHandler, null, 10, [err, exposedInstance, errorInfo]); - return; - } - } - logError(err, type, contextVNode, throwInDev); -} -function logError(err, type, contextVNode, throwInDev = true) { - { - console.error(err); - } -} -let isFlushing = false; -let isFlushPending = false; -const queue = []; -let flushIndex = 0; -const pendingPreFlushCbs = []; -let activePreFlushCbs = null; -let preFlushIndex = 0; -const pendingPostFlushCbs = []; -let activePostFlushCbs = null; -let postFlushIndex = 0; -const resolvedPromise = /* @__PURE__ */ Promise.resolve(); -let currentFlushPromise = null; -let currentPreFlushParentJob = null; -function nextTick(fn) { - const p2 = currentFlushPromise || resolvedPromise; - return fn ? p2.then(this ? fn.bind(this) : fn) : p2; -} -function findInsertionIndex(id) { - let start2 = flushIndex + 1; - let end = queue.length; - while (start2 < end) { - const middle = start2 + end >>> 1; - const middleJobId = getId(queue[middle]); - middleJobId < id ? start2 = middle + 1 : end = middle; - } - return start2; + return start; } function queueJob(job) { if ((!queue.length || !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) && job !== currentPreFlushParentJob) { @@ -1108,7 +1085,7 @@ function invalidateJob(job) { } } function queueCb(cb, activeQueue, pendingQueue, index) { - if (!isArray$1(cb)) { + if (!isArray(cb)) { if (!activeQueue || !activeQueue.includes(cb, cb.allowRecurse ? index + 1 : index)) { pendingQueue.push(cb); } @@ -1161,7 +1138,7 @@ function flushJobs(seen) { isFlushing = true; flushPreFlushCbs(seen); queue.sort((a, b) => getId(a) - getId(b)); - const check2 = NOOP; + const check = NOOP; try { for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { const job = queue[flushIndex]; @@ -1196,13 +1173,13 @@ function emit$1(instance2, event, ...rawArgs) { args = rawArgs.map((a) => a.trim()); } if (number) { - args = rawArgs.map(toNumber$1); + args = rawArgs.map(toNumber); } } let handlerName; - let handler = props[handlerName = toHandlerKey(event)] || props[handlerName = toHandlerKey(camelize$1(event))]; + let handler = props[handlerName = toHandlerKey(event)] || props[handlerName = toHandlerKey(camelize(event))]; if (!handler && isModelListener2) { - handler = props[handlerName = toHandlerKey(hyphenate$1(event))]; + handler = props[handlerName = toHandlerKey(hyphenate(event))]; } if (handler) { callWithAsyncErrorHandling(handler, instance2, 6, args); @@ -1227,12 +1204,12 @@ function normalizeEmitsOptions(comp, appContext, asMixin = false) { const raw = comp.emits; let normalized = {}; let hasExtends = false; - if (!isFunction$1(comp)) { + if (!isFunction(comp)) { const extendEmits = (raw2) => { const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); if (normalizedFromExtend) { hasExtends = true; - extend$1(normalized, normalizedFromExtend); + extend(normalized, normalizedFromExtend); } }; if (!asMixin && appContext.mixins.length) { @@ -1249,20 +1226,20 @@ function normalizeEmitsOptions(comp, appContext, asMixin = false) { cache.set(comp, null); return null; } - if (isArray$1(raw)) { + if (isArray(raw)) { raw.forEach((key) => normalized[key] = null); } else { - extend$1(normalized, raw); + extend(normalized, raw); } cache.set(comp, normalized); return normalized; } -function isEmitListener(options2, key) { - if (!options2 || !isOn$1(key)) { +function isEmitListener(options, key) { + if (!options || !isOn(key)) { return false; } key = key.slice(2).replace(/Once$/, ""); - return hasOwn(options2, key[0].toLowerCase() + key.slice(1)) || hasOwn(options2, hyphenate$1(key)) || hasOwn(options2, key); + return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); } let currentRenderingInstance = null; let currentScopeId = null; @@ -1298,7 +1275,7 @@ function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { function markAttrsAccessed() { } function renderComponentRoot(instance2) { - const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit: emit2, render: render2, renderCache, data, setupState, ctx, inheritAttrs } = instance2; + const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit, render: render2, renderCache, data, setupState, ctx, inheritAttrs } = instance2; let result; let fallthroughAttrs; const prev = setCurrentRenderingInstance(instance2); @@ -1317,8 +1294,8 @@ function renderComponentRoot(instance2) { return attrs; }, slots, - emit: emit2 - } : { attrs, slots, emit: emit2 }) : render3(props, null)); + emit + } : { attrs, slots, emit }) : render3(props, null)); fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); } } catch (err) { @@ -1332,7 +1309,7 @@ function renderComponentRoot(instance2) { const { shapeFlag } = root; if (keys.length) { if (shapeFlag & (1 | 6)) { - if (propsOptions && keys.some(isModelListener$1)) { + if (propsOptions && keys.some(isModelListener)) { fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions); } root = cloneVNode(root, fallthroughAttrs); @@ -1355,7 +1332,7 @@ function renderComponentRoot(instance2) { const getFunctionalFallthrough = (attrs) => { let res; for (const key in attrs) { - if (key === "class" || key === "style" || isOn$1(key)) { + if (key === "class" || key === "style" || isOn(key)) { (res || (res = {}))[key] = attrs[key]; } } @@ -1364,7 +1341,7 @@ const getFunctionalFallthrough = (attrs) => { const filterModelListeners = (attrs, props) => { const res = {}; for (const key in attrs) { - if (!isModelListener$1(key) || !(key.slice(9) in props)) { + if (!isModelListener(key) || !(key.slice(9) in props)) { res[key] = attrs[key]; } } @@ -1436,7 +1413,7 @@ function updateHOCHostEl({ vnode, parent }, el) { const isSuspense = (type) => type.__isSuspense; function queueEffectWithSuspense(fn, suspense) { if (suspense && suspense.pendingBranch) { - if (isArray$1(fn)) { + if (isArray(fn)) { suspense.effects.push(...fn); } else { suspense.effects.push(fn); @@ -1464,14 +1441,14 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) { if (provides && key in provides) { return provides[key]; } else if (arguments.length > 1) { - return treatDefaultAsFactory && isFunction$1(defaultValue) ? defaultValue.call(instance2.proxy) : defaultValue; + return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance2.proxy) : defaultValue; } else ; } } const INITIAL_WATCHER_VALUE = {}; -function watch(source, cb, options2) { - return doWatch(source, cb, options2); +function watch(source, cb, options) { + return doWatch(source, cb, options); } function doWatch(source, cb, { immediate, deep, flush: flush2, onTrack, onTrigger } = EMPTY_OBJ) { const instance2 = currentInstance; @@ -1484,7 +1461,7 @@ function doWatch(source, cb, { immediate, deep, flush: flush2, onTrack, onTrigge } else if (isReactive(source)) { getter = () => source; deep = true; - } else if (isArray$1(source)) { + } else if (isArray(source)) { isMultiSource = true; forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); getter = () => source.map((s) => { @@ -1492,12 +1469,12 @@ function doWatch(source, cb, { immediate, deep, flush: flush2, onTrack, onTrigge return s.value; } else if (isReactive(s)) { return traverse(s); - } else if (isFunction$1(s)) { + } else if (isFunction(s)) { return callWithErrorHandling(s, instance2, 2); } else ; }); - } else if (isFunction$1(source)) { + } else if (isFunction(source)) { if (cb) { getter = () => callWithErrorHandling(source, instance2, 2); } else { @@ -1587,19 +1564,19 @@ function doWatch(source, cb, { immediate, deep, flush: flush2, onTrack, onTrigge } }; } -function instanceWatch(source, value, options2) { +function instanceWatch(source, value, options) { const publicThis = this.proxy; - const getter = isString$1(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); let cb; - if (isFunction$1(value)) { + if (isFunction(value)) { cb = value; } else { cb = value.handler; - options2 = value; + options = value; } const cur = currentInstance; setCurrentInstance(this); - const res = doWatch(getter, cb.bind(publicThis), options2); + const res = doWatch(getter, cb.bind(publicThis), options); if (cur) { setCurrentInstance(cur); } else { @@ -1607,8 +1584,8 @@ function instanceWatch(source, value, options2) { } return res; } -function createPathGetter(ctx, path) { - const segments = path.split("."); +function createPathGetter(ctx, path2) { + const segments = path2.split("."); return () => { let cur = ctx; for (let i = 0; i < segments.length && cur; i++) { @@ -1618,7 +1595,7 @@ function createPathGetter(ctx, path) { }; } function traverse(value, seen) { - if (!isObject$1(value) || value["__v_skip"]) { + if (!isObject(value) || value["__v_skip"]) { return value; } seen = seen || /* @__PURE__ */ new Set(); @@ -1628,7 +1605,7 @@ function traverse(value, seen) { seen.add(value); if (isRef(value)) { traverse(value.value, seen); - } else if (isArray$1(value)) { + } else if (isArray(value)) { for (let i = 0; i < value.length; i++) { traverse(value[i], seen); } @@ -1644,19 +1621,19 @@ function traverse(value, seen) { return value; } function useTransitionState() { - const state2 = { + const state = { isMounted: false, isLeaving: false, isUnmounting: false, leavingVNodes: /* @__PURE__ */ new Map() }; onMounted(() => { - state2.isMounted = true; + state.isMounted = true; }); onBeforeUnmount(() => { - state2.isUnmounting = true; + state.isUnmounting = true; }); - return state2; + return state; } const TransitionHookValidator = [Function, Array]; const BaseTransitionImpl = { @@ -1680,7 +1657,7 @@ const BaseTransitionImpl = { }, setup(props, { slots }) { const instance2 = getCurrentInstance(); - const state2 = useTransitionState(); + const state = useTransitionState(); let prevTransitionKey; return () => { const children = slots.default && getTransitionRawChildren(slots.default(), true); @@ -1698,14 +1675,14 @@ const BaseTransitionImpl = { } const rawProps = toRaw(props); const { mode } = rawProps; - if (state2.isLeaving) { + if (state.isLeaving) { return emptyPlaceholder(child); } const innerChild = getKeepAliveChild(child); if (!innerChild) { return emptyPlaceholder(child); } - const enterHooks = resolveTransitionHooks(innerChild, rawProps, state2, instance2); + const enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance2); setTransitionHooks(innerChild, enterHooks); const oldChild = instance2.subTree; const oldInnerChild = oldChild && getKeepAliveChild(oldChild); @@ -1721,18 +1698,18 @@ const BaseTransitionImpl = { } } if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { - const leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state2, instance2); + const leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance2); setTransitionHooks(oldInnerChild, leavingHooks); if (mode === "out-in") { - state2.isLeaving = true; + state.isLeaving = true; leavingHooks.afterLeave = () => { - state2.isLeaving = false; + state.isLeaving = false; instance2.update(); }; return emptyPlaceholder(child); } else if (mode === "in-out" && innerChild.type !== Comment) { leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { - const leavingVNodesCache = getLeavingNodesForType(state2, oldInnerChild); + const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild); leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; el._leaveCb = () => { earlyRemove(); @@ -1748,8 +1725,8 @@ const BaseTransitionImpl = { } }; const BaseTransition = BaseTransitionImpl; -function getLeavingNodesForType(state2, vnode) { - const { leavingVNodes } = state2; +function getLeavingNodesForType(state, vnode) { + const { leavingVNodes } = state; let leavingVNodesCache = leavingVNodes.get(vnode.type); if (!leavingVNodesCache) { leavingVNodesCache = /* @__PURE__ */ Object.create(null); @@ -1757,17 +1734,17 @@ function getLeavingNodesForType(state2, vnode) { } return leavingVNodesCache; } -function resolveTransitionHooks(vnode, props, state2, instance2) { +function resolveTransitionHooks(vnode, props, state, instance2) { const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props; const key = String(vnode.key); - const leavingVNodesCache = getLeavingNodesForType(state2, vnode); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); const callHook2 = (hook, args) => { hook && callWithAsyncErrorHandling(hook, instance2, 9, args); }; const callAsyncHook = (hook, args) => { const done = args[1]; callHook2(hook, args); - if (isArray$1(hook)) { + if (isArray(hook)) { if (hook.every((hook2) => hook2.length <= 1)) done(); } else if (hook.length <= 1) { @@ -1779,7 +1756,7 @@ function resolveTransitionHooks(vnode, props, state2, instance2) { persisted, beforeEnter(el) { let hook = onBeforeEnter; - if (!state2.isMounted) { + if (!state.isMounted) { if (appear) { hook = onBeforeAppear || onBeforeEnter; } else { @@ -1799,7 +1776,7 @@ function resolveTransitionHooks(vnode, props, state2, instance2) { let hook = onEnter; let afterHook = onAfterEnter; let cancelHook = onEnterCancelled; - if (!state2.isMounted) { + if (!state.isMounted) { if (appear) { hook = onAppear || onEnter; afterHook = onAfterAppear || onAfterEnter; @@ -1834,7 +1811,7 @@ function resolveTransitionHooks(vnode, props, state2, instance2) { if (el._enterCb) { el._enterCb(true); } - if (state2.isUnmounting) { + if (state.isUnmounting) { return remove2(); } callHook2(onBeforeLeave, [el]); @@ -1862,7 +1839,7 @@ function resolveTransitionHooks(vnode, props, state2, instance2) { } }, clone(vnode2) { - return resolveTransitionHooks(vnode2, props, state2, instance2); + return resolveTransitionHooks(vnode2, props, state, instance2); } }; return hooks; @@ -1908,8 +1885,8 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) { } return ret; } -function defineComponent(options2) { - return isFunction$1(options2) ? { setup: options2, name: options2.name } : options2; +function defineComponent(options) { + return isFunction(options) ? { setup: options, name: options.name } : options; } const isAsyncWrapper = (i) => !!i.type.__asyncLoader; const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; @@ -1991,7 +1968,7 @@ function withDirectives(vnode, directives) { const bindings = vnode.dirs || (vnode.dirs = []); for (let i = 0; i < directives.length; i++) { let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; - if (isFunction$1(dir)) { + if (isFunction(dir)) { dir = { mounted: dir, updated: dir @@ -2039,7 +2016,7 @@ function resolveComponent(name, maybeSelfReference) { } const NULL_DYNAMIC_COMPONENT = Symbol(); function resolveDynamicComponent(component) { - if (isString$1(component)) { + if (isString(component)) { return resolveAsset(COMPONENTS, component, false) || component; } else { return component || NULL_DYNAMIC_COMPONENT; @@ -2054,7 +2031,7 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false const Component = instance2.type; if (type === COMPONENTS) { const selfName = getComponentName(Component, false); - if (selfName && (selfName === name || selfName === camelize$1(name) || selfName === capitalize$1(camelize$1(name)))) { + if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { return Component; } } @@ -2066,12 +2043,12 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false } } function resolve(registry, name) { - return registry && (registry[name] || registry[camelize$1(name)] || registry[capitalize$1(camelize$1(name))]); + return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); } function renderList(source, renderItem, cache, index) { let ret; const cached = cache && cache[index]; - if (isArray$1(source) || isString$1(source)) { + if (isArray(source) || isString(source)) { ret = new Array(source.length); for (let i = 0, l = source.length; i < l; i++) { ret[i] = renderItem(source[i], i, void 0, cached && cached[i]); @@ -2081,7 +2058,7 @@ function renderList(source, renderItem, cache, index) { for (let i = 0; i < source; i++) { ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); } - } else if (isObject$1(source)) { + } else if (isObject(source)) { if (source[Symbol.iterator]) { ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i])); } else { @@ -2103,7 +2080,7 @@ function renderList(source, renderItem, cache, index) { function createSlots(slots, dynamicSlots) { for (let i = 0; i < dynamicSlots.length; i++) { const slot = dynamicSlots[i]; - if (isArray$1(slot)) { + if (isArray(slot)) { for (let j = 0; j < slot.length; j++) { slots[slot[j].name] = slot[j].fn; } @@ -2150,7 +2127,7 @@ const getPublicInstance = (i) => { return getExposeProxy(i) || i.proxy; return getPublicInstance(i.parent); }; -const publicPropertiesMap = /* @__PURE__ */ extend$1(/* @__PURE__ */ Object.create(null), { +const publicPropertiesMap = /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { $: (i) => i, $el: (i) => i.vnode.el, $data: (i) => i.data, @@ -2253,12 +2230,12 @@ const PublicInstanceProxyHandlers = { }; let shouldCacheAccess = true; function applyOptions(instance2) { - const options2 = resolveMergedOptions(instance2); + const options = resolveMergedOptions(instance2); const publicThis = instance2.proxy; const ctx = instance2.ctx; shouldCacheAccess = false; - if (options2.beforeCreate) { - callHook$1(options2.beforeCreate, instance2, "bc"); + if (options.beforeCreate) { + callHook$1(options.beforeCreate, instance2, "bc"); } const { data: dataOptions, @@ -2288,7 +2265,7 @@ function applyOptions(instance2) { components, directives, filters - } = options2; + } = options; const checkDuplicateProperties = null; if (injectOptions) { resolveInjections(injectOptions, ctx, checkDuplicateProperties, instance2.appContext.config.unwrapInjectedRef); @@ -2296,7 +2273,7 @@ function applyOptions(instance2) { if (methods) { for (const key in methods) { const methodHandler = methods[key]; - if (isFunction$1(methodHandler)) { + if (isFunction(methodHandler)) { { ctx[key] = methodHandler.bind(publicThis); } @@ -2305,7 +2282,7 @@ function applyOptions(instance2) { } if (dataOptions) { const data = dataOptions.call(publicThis, publicThis); - if (!isObject$1(data)) + if (!isObject(data)) ; else { instance2.data = reactive(data); @@ -2315,10 +2292,10 @@ function applyOptions(instance2) { if (computedOptions) { for (const key in computedOptions) { const opt = computedOptions[key]; - const get3 = isFunction$1(opt) ? opt.bind(publicThis, publicThis) : isFunction$1(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; - const set2 = !isFunction$1(opt) && isFunction$1(opt.set) ? opt.set.bind(publicThis) : NOOP; + const get2 = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; + const set2 = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : NOOP; const c = computed({ - get: get3, + get: get2, set: set2 }); Object.defineProperty(ctx, key, { @@ -2335,7 +2312,7 @@ function applyOptions(instance2) { } } if (provideOptions) { - const provides = isFunction$1(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; Reflect.ownKeys(provides).forEach((key) => { provide(key, provides[key]); }); @@ -2344,7 +2321,7 @@ function applyOptions(instance2) { callHook$1(created, instance2, "c"); } function registerLifecycleHook(register2, hook) { - if (isArray$1(hook)) { + if (isArray(hook)) { hook.forEach((_hook) => register2(_hook.bind(publicThis))); } else if (hook) { register2(hook.bind(publicThis)); @@ -2362,7 +2339,7 @@ function applyOptions(instance2) { registerLifecycleHook(onBeforeUnmount, beforeUnmount); registerLifecycleHook(onUnmounted, unmounted2); registerLifecycleHook(onServerPrefetch, serverPrefetch); - if (isArray$1(expose)) { + if (isArray(expose)) { if (expose.length) { const exposed = instance2.exposed || (instance2.exposed = {}); expose.forEach((key) => { @@ -2387,13 +2364,13 @@ function applyOptions(instance2) { instance2.directives = directives; } function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP, unwrapRef = false) { - if (isArray$1(injectOptions)) { + if (isArray(injectOptions)) { injectOptions = normalizeInject(injectOptions); } for (const key in injectOptions) { const opt = injectOptions[key]; let injected; - if (isObject$1(opt)) { + if (isObject(opt)) { if ("default" in opt) { injected = inject(opt.from || key, opt.default, true); } else { @@ -2419,23 +2396,23 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP, } } function callHook$1(hook, instance2, type) { - callWithAsyncErrorHandling(isArray$1(hook) ? hook.map((h2) => h2.bind(instance2.proxy)) : hook.bind(instance2.proxy), instance2, type); + callWithAsyncErrorHandling(isArray(hook) ? hook.map((h2) => h2.bind(instance2.proxy)) : hook.bind(instance2.proxy), instance2, type); } function createWatcher(raw, ctx, publicThis, key) { const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; - if (isString$1(raw)) { + if (isString(raw)) { const handler = ctx[raw]; - if (isFunction$1(handler)) { + if (isFunction(handler)) { watch(getter, handler); } - } else if (isFunction$1(raw)) { + } else if (isFunction(raw)) { watch(getter, raw.bind(publicThis)); - } else if (isObject$1(raw)) { - if (isArray$1(raw)) { + } else if (isObject(raw)) { + if (isArray(raw)) { raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); } else { - const handler = isFunction$1(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; - if (isFunction$1(handler)) { + const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (isFunction(handler)) { watch(getter, handler, raw); } } @@ -2516,14 +2493,14 @@ function mergeDataFn(to, from) { return from; } return function mergedDataFn() { - return extend$1(isFunction$1(to) ? to.call(this, this) : to, isFunction$1(from) ? from.call(this, this) : from); + return extend(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from); }; } function mergeInject(to, from) { return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); } function normalizeInject(raw) { - if (isArray$1(raw)) { + if (isArray(raw)) { const res = {}; for (let i = 0; i < raw.length; i++) { res[raw[i]] = raw[i]; @@ -2536,14 +2513,14 @@ function mergeAsArray(to, from) { return to ? [...new Set([].concat(to, from))] : from; } function mergeObjectOptions(to, from) { - return to ? extend$1(extend$1(/* @__PURE__ */ Object.create(null), to), from) : from; + return to ? extend(extend(/* @__PURE__ */ Object.create(null), to), from) : from; } function mergeWatchOptions(to, from) { if (!to) return from; if (!from) return to; - const merged = extend$1(/* @__PURE__ */ Object.create(null), to); + const merged = extend(/* @__PURE__ */ Object.create(null), to); for (const key in from) { merged[key] = mergeAsArray(to[key], from[key]); } @@ -2574,7 +2551,7 @@ function initProps(instance2, rawProps, isStateful, isSSR = false) { function updateProps(instance2, rawProps, rawPrevProps, optimized) { const { props, attrs, vnode: { patchFlag } } = instance2; const rawCurrentProps = toRaw(props); - const [options2] = instance2.propsOptions; + const [options] = instance2.propsOptions; let hasAttrsChanged = false; if ((optimized || patchFlag > 0) && !(patchFlag & 16)) { if (patchFlag & 8) { @@ -2585,15 +2562,15 @@ function updateProps(instance2, rawProps, rawPrevProps, optimized) { continue; } const value = rawProps[key]; - if (options2) { + if (options) { if (hasOwn(attrs, key)) { if (value !== attrs[key]) { attrs[key] = value; hasAttrsChanged = true; } } else { - const camelizedKey = camelize$1(key); - props[camelizedKey] = resolvePropValue(options2, rawCurrentProps, camelizedKey, value, instance2, false); + const camelizedKey = camelize(key); + props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance2, false); } } else { if (value !== attrs[key]) { @@ -2609,10 +2586,10 @@ function updateProps(instance2, rawProps, rawPrevProps, optimized) { } let kebabKey; for (const key in rawCurrentProps) { - if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate$1(key)) === key || !hasOwn(rawProps, kebabKey))) { - if (options2) { + if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { + if (options) { if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) { - props[key] = resolvePropValue(options2, rawCurrentProps, key, void 0, instance2, true); + props[key] = resolvePropValue(options, rawCurrentProps, key, void 0, instance2, true); } } else { delete props[key]; @@ -2633,7 +2610,7 @@ function updateProps(instance2, rawProps, rawPrevProps, optimized) { } } function setFullProps(instance2, rawProps, props, attrs) { - const [options2, needCastKeys] = instance2.propsOptions; + const [options, needCastKeys] = instance2.propsOptions; let hasAttrsChanged = false; let rawCastValues; if (rawProps) { @@ -2643,7 +2620,7 @@ function setFullProps(instance2, rawProps, props, attrs) { } const value = rawProps[key]; let camelKey; - if (options2 && hasOwn(options2, camelKey = camelize$1(key))) { + if (options && hasOwn(options, camelKey = camelize(key))) { if (!needCastKeys || !needCastKeys.includes(camelKey)) { props[camelKey] = value; } else { @@ -2662,18 +2639,18 @@ function setFullProps(instance2, rawProps, props, attrs) { const castValues = rawCastValues || EMPTY_OBJ; for (let i = 0; i < needCastKeys.length; i++) { const key = needCastKeys[i]; - props[key] = resolvePropValue(options2, rawCurrentProps, key, castValues[key], instance2, !hasOwn(castValues, key)); + props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance2, !hasOwn(castValues, key)); } } return hasAttrsChanged; } -function resolvePropValue(options2, props, key, value, instance2, isAbsent) { - const opt = options2[key]; +function resolvePropValue(options, props, key, value, instance2, isAbsent) { + const opt = options[key]; if (opt != null) { const hasDefault = hasOwn(opt, "default"); if (hasDefault && value === void 0) { const defaultValue = opt.default; - if (opt.type !== Function && isFunction$1(defaultValue)) { + if (opt.type !== Function && isFunction(defaultValue)) { const { propsDefaults } = instance2; if (key in propsDefaults) { value = propsDefaults[key]; @@ -2689,7 +2666,7 @@ function resolvePropValue(options2, props, key, value, instance2, isAbsent) { if (opt[0]) { if (isAbsent && !hasDefault) { value = false; - } else if (opt[1] && (value === "" || value === hyphenate$1(key))) { + } else if (opt[1] && (value === "" || value === hyphenate(key))) { value = true; } } @@ -2706,11 +2683,11 @@ function normalizePropsOptions(comp, appContext, asMixin = false) { const normalized = {}; const needCastKeys = []; let hasExtends = false; - if (!isFunction$1(comp)) { + if (!isFunction(comp)) { const extendProps = (raw2) => { hasExtends = true; const [props, keys] = normalizePropsOptions(raw2, appContext, true); - extend$1(normalized, props); + extend(normalized, props); if (keys) needCastKeys.push(...keys); }; @@ -2728,19 +2705,19 @@ function normalizePropsOptions(comp, appContext, asMixin = false) { cache.set(comp, EMPTY_ARR); return EMPTY_ARR; } - if (isArray$1(raw)) { + if (isArray(raw)) { for (let i = 0; i < raw.length; i++) { - const normalizedKey = camelize$1(raw[i]); + const normalizedKey = camelize(raw[i]); if (validatePropName(normalizedKey)) { normalized[normalizedKey] = EMPTY_OBJ; } } } else if (raw) { for (const key in raw) { - const normalizedKey = camelize$1(key); + const normalizedKey = camelize(key); if (validatePropName(normalizedKey)) { const opt = raw[key]; - const prop = normalized[normalizedKey] = isArray$1(opt) || isFunction$1(opt) ? { type: opt } : opt; + const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : opt; if (prop) { const booleanIndex = getTypeIndex(Boolean, prop.type); const stringIndex = getTypeIndex(String, prop.type); @@ -2771,15 +2748,15 @@ function isSameType(a, b) { return getType(a) === getType(b); } function getTypeIndex(type, expectedTypes) { - if (isArray$1(expectedTypes)) { + if (isArray(expectedTypes)) { return expectedTypes.findIndex((t) => isSameType(t, type)); - } else if (isFunction$1(expectedTypes)) { + } else if (isFunction(expectedTypes)) { return isSameType(expectedTypes, type) ? 0 : -1; } return -1; } const isInternalKey = (key) => key[0] === "_" || key === "$stable"; -const normalizeSlotValue = (value) => isArray$1(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; +const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; const normalizeSlot = (key, rawSlot, ctx) => { if (rawSlot._n) { return rawSlot; @@ -2796,7 +2773,7 @@ const normalizeObjectSlots = (rawSlots, slots, instance2) => { if (isInternalKey(key)) continue; const value = rawSlots[key]; - if (isFunction$1(value)) { + if (isFunction(value)) { slots[key] = normalizeSlot(key, value, ctx); } else if (value != null) { const normalized = normalizeSlotValue(value); @@ -2835,7 +2812,7 @@ const updateSlots = (instance2, children, optimized) => { if (optimized && type === 1) { needDeletionCheck = false; } else { - extend$1(slots, children); + extend(slots, children); if (!optimized && type === 1) { delete slots._; } @@ -2881,10 +2858,10 @@ function createAppContext() { let uid = 0; function createAppAPI(render2, hydrate) { return function createApp(rootComponent, rootProps = null) { - if (!isFunction$1(rootComponent)) { + if (!isFunction(rootComponent)) { rootComponent = Object.assign({}, rootComponent); } - if (rootProps != null && !isObject$1(rootProps)) { + if (rootProps != null && !isObject(rootProps)) { rootProps = null; } const context = createAppContext(); @@ -2903,15 +2880,15 @@ function createAppAPI(render2, hydrate) { }, set config(v) { }, - use(plugin, ...options2) { + use(plugin, ...options) { if (installedPlugins.has(plugin)) ; - else if (plugin && isFunction$1(plugin.install)) { + else if (plugin && isFunction(plugin.install)) { installedPlugins.add(plugin); - plugin.install(app, ...options2); - } else if (isFunction$1(plugin)) { + plugin.install(app, ...options); + } else if (isFunction(plugin)) { installedPlugins.add(plugin); - plugin(app, ...options2); + plugin(app, ...options); } else ; return app; @@ -2968,8 +2945,8 @@ function createAppAPI(render2, hydrate) { }; } function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { - if (isArray$1(rawRef)) { - rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray$1(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount)); + if (isArray(rawRef)) { + rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount)); return; } if (isAsyncWrapper(vnode) && !isUnmount) { @@ -2982,7 +2959,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; const setupState = owner.setupState; if (oldRef != null && oldRef !== ref) { - if (isString$1(oldRef)) { + if (isString(oldRef)) { refs[oldRef] = null; if (hasOwn(setupState, oldRef)) { setupState[oldRef] = null; @@ -2991,19 +2968,19 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { oldRef.value = null; } } - if (isFunction$1(ref)) { + if (isFunction(ref)) { callWithErrorHandling(ref, owner, 12, [value, refs]); } else { - const _isString = isString$1(ref); + const _isString = isString(ref); const _isRef = isRef(ref); if (_isString || _isRef) { const doSet = () => { if (rawRef.f) { const existing = _isString ? refs[ref] : ref.value; if (isUnmount) { - isArray$1(existing) && remove(existing, refValue); + isArray(existing) && remove(existing, refValue); } else { - if (!isArray$1(existing)) { + if (!isArray(existing)) { if (_isString) { refs[ref] = [refValue]; if (hasOwn(setupState, ref)) { @@ -3040,13 +3017,13 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { } } const queuePostRenderEffect = queueEffectWithSuspense; -function createRenderer(options2) { - return baseCreateRenderer(options2); +function createRenderer(options) { + return baseCreateRenderer(options); } -function baseCreateRenderer(options2, createHydrationFns) { +function baseCreateRenderer(options, createHydrationFns) { const target = getGlobalThis(); target.__VUE__ = true; - const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, cloneNode: hostCloneNode, insertStaticContent: hostInsertStaticContent } = options2; + const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, cloneNode: hostCloneNode, insertStaticContent: hostInsertStaticContent } = options; const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = !!n2.dynamicChildren) => { if (n1 === n2) { return; @@ -3113,20 +3090,20 @@ function baseCreateRenderer(options2, createHydrationFns) { [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG, n2.el, n2.anchor); }; const moveStaticNode = ({ el, anchor }, container, nextSibling) => { - let next2; + let next; while (el && el !== anchor) { - next2 = hostNextSibling(el); + next = hostNextSibling(el); hostInsert(el, container, nextSibling); - el = next2; + el = next; } hostInsert(anchor, container, nextSibling); }; const removeStaticNode = ({ el, anchor }) => { - let next2; + let next; while (el && el !== anchor) { - next2 = hostNextSibling(el); + next = hostNextSibling(el); hostRemove(el); - el = next2; + el = next; } hostRemove(anchor); }; @@ -3202,8 +3179,8 @@ function baseCreateRenderer(options2, createHydrationFns) { } } }; - const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start2 = 0) => { - for (let i = start2; i < children.length; i++) { + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); patch(null, child, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } @@ -3246,9 +3223,9 @@ function baseCreateRenderer(options2, createHydrationFns) { for (let i = 0; i < propsToUpdate.length; i++) { const key = propsToUpdate[i]; const prev = oldProps[key]; - const next2 = newProps[key]; - if (next2 !== prev || key === "value") { - hostPatchProp(el, key, prev, next2, isSVG, n1.children, parentComponent, parentSuspense, unmountChildren); + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp(el, key, prev, next, isSVG, n1.children, parentComponent, parentSuspense, unmountChildren); } } } @@ -3281,10 +3258,10 @@ function baseCreateRenderer(options2, createHydrationFns) { for (const key in newProps) { if (isReservedProp(key)) continue; - const next2 = newProps[key]; + const next = newProps[key]; const prev = oldProps[key]; - if (next2 !== prev && key !== "value") { - hostPatchProp(el, key, prev, next2, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); + if (next !== prev && key !== "value") { + hostPatchProp(el, key, prev, next, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); } } if (oldProps !== EMPTY_OBJ) { @@ -3412,21 +3389,21 @@ function baseCreateRenderer(options2, createHydrationFns) { instance2.isMounted = true; initialVNode = container = anchor = null; } else { - let { next: next2, bu, u, parent, vnode } = instance2; - let originNext = next2; + let { next, bu, u, parent, vnode } = instance2; + let originNext = next; let vnodeHook; toggleRecurse(instance2, false); - if (next2) { - next2.el = vnode.el; - updateComponentPreRender(instance2, next2, optimized); + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance2, next, optimized); } else { - next2 = vnode; + next = vnode; } if (bu) { invokeArrayFns(bu); } - if (vnodeHook = next2.props && next2.props.onVnodeBeforeUpdate) { - invokeVNodeHook(vnodeHook, parent, next2, vnode); + if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parent, next, vnode); } toggleRecurse(instance2, true); const nextTree = renderComponentRoot(instance2); @@ -3441,15 +3418,15 @@ function baseCreateRenderer(options2, createHydrationFns) { parentSuspense, isSVG ); - next2.el = nextTree.el; + next.el = nextTree.el; if (originNext === null) { updateHOCHostEl(instance2, nextTree.el); } if (u) { queuePostRenderEffect(u, parentSuspense); } - if (vnodeHook = next2.props && next2.props.onVnodeUpdated) { - queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next2, vnode), parentSuspense); + if (vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense); } } }; @@ -3760,11 +3737,11 @@ function baseCreateRenderer(options2, createHydrationFns) { } }; const removeFragment = (cur, end) => { - let next2; + let next; while (cur !== end) { - next2 = hostNextSibling(cur); + next = hostNextSibling(cur); hostRemove(cur); - cur = next2; + cur = next; } hostRemove(end); }; @@ -3791,8 +3768,8 @@ function baseCreateRenderer(options2, createHydrationFns) { } } }; - const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start2 = 0) => { - for (let i = start2; i < children.length; i++) { + const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (let i = start; i < children.length; i++) { unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); } }; @@ -3826,7 +3803,7 @@ function baseCreateRenderer(options2, createHydrationFns) { pc: patchChildren, pbc: patchBlockChildren, n: getNextHostNode, - o: options2 + o: options }; let hydrate; let hydrateNode; @@ -3845,7 +3822,7 @@ function toggleRecurse({ effect, update: update2 }, allowed) { function traverseStaticChildren(n1, n2, shallow = false) { const ch1 = n1.children; const ch2 = n2.children; - if (isArray$1(ch1) && isArray$1(ch2)) { + if (isArray(ch1) && isArray(ch2)) { for (let i = 0; i < ch1.length; i++) { const c1 = ch1[i]; let c2 = ch2[i]; @@ -3941,7 +3918,7 @@ function isSameVNodeType(n1, n2) { const InternalObjectKey = `__vInternal`; const normalizeKey = ({ key }) => key != null ? key : null; const normalizeRef = ({ ref, ref_key, ref_for }) => { - return ref != null ? isString$1(ref) || isRef(ref) || isFunction$1(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; + return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; }; function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { const vnode = { @@ -3977,7 +3954,7 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn type.normalize(vnode); } } else if (children) { - vnode.shapeFlag |= isString$1(children) ? 8 : 16; + vnode.shapeFlag |= isString(children) ? 8 : 16; } if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock && (vnode.patchFlag > 0 || shapeFlag & 6) && vnode.patchFlag !== 32) { currentBlock.push(vnode); @@ -4010,23 +3987,23 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami if (props) { props = guardReactiveProps(props); let { class: klass, style } = props; - if (klass && !isString$1(klass)) { + if (klass && !isString(klass)) { props.class = normalizeClass(klass); } - if (isObject$1(style)) { - if (isProxy(style) && !isArray$1(style)) { - style = extend$1({}, style); + if (isObject(style)) { + if (isProxy(style) && !isArray(style)) { + style = extend({}, style); } props.style = normalizeStyle(style); } } - const shapeFlag = isString$1(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject$1(type) ? 4 : isFunction$1(type) ? 2 : 0; + const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0; return createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, true); } function guardReactiveProps(props) { if (!props) return null; - return isProxy(props) || InternalObjectKey in props ? extend$1({}, props) : props; + return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props; } function cloneVNode(vnode, extraProps, mergeRef = false) { const { props, ref, patchFlag, children } = vnode; @@ -4037,7 +4014,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false) { type: vnode.type, props: mergedProps, key: mergedProps && normalizeKey(mergedProps), - ref: extraProps && extraProps.ref ? mergeRef && ref ? isArray$1(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) : ref, + ref: extraProps && extraProps.ref ? mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) : ref, scopeId: vnode.scopeId, slotScopeIds: vnode.slotScopeIds, children, @@ -4069,7 +4046,7 @@ function createCommentVNode(text2 = "", asBlock = false) { function normalizeVNode(child) { if (child == null || typeof child === "boolean") { return createVNode(Comment); - } else if (isArray$1(child)) { + } else if (isArray(child)) { return createVNode( Fragment, null, @@ -4089,7 +4066,7 @@ function normalizeChildren(vnode, children) { const { shapeFlag } = vnode; if (children == null) { children = null; - } else if (isArray$1(children)) { + } else if (isArray(children)) { type = 16; } else if (typeof children === "object") { if (shapeFlag & (1 | 64)) { @@ -4114,7 +4091,7 @@ function normalizeChildren(vnode, children) { } } } - } else if (isFunction$1(children)) { + } else if (isFunction(children)) { children = { default: children, _ctx: currentRenderingInstance }; type = 32; } else { @@ -4140,10 +4117,10 @@ function mergeProps(...args) { } } else if (key === "style") { ret.style = normalizeStyle([ret.style, toMerge.style]); - } else if (isOn$1(key)) { + } else if (isOn(key)) { const existing = ret[key]; const incoming = toMerge[key]; - if (incoming && existing !== incoming && !(isArray$1(existing) && existing.includes(incoming))) { + if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { ret[key] = existing ? [].concat(existing, incoming) : incoming; } } else if (key !== "") { @@ -4287,32 +4264,32 @@ function setupStatefulComponent(instance2, isSSR) { } } function handleSetupResult(instance2, setupResult, isSSR) { - if (isFunction$1(setupResult)) { + if (isFunction(setupResult)) { if (instance2.type.__ssrInlineRender) { instance2.ssrRender = setupResult; } else { instance2.render = setupResult; } - } else if (isObject$1(setupResult)) { + } else if (isObject(setupResult)) { instance2.setupState = proxyRefs(setupResult); } else ; finishComponentSetup(instance2, isSSR); } -let compile; +let compile$1; function finishComponentSetup(instance2, isSSR, skipOptions) { const Component = instance2.type; if (!instance2.render) { - if (!isSSR && compile && !Component.render) { + if (!isSSR && compile$1 && !Component.render) { const template = Component.template; if (template) { const { isCustomElement, compilerOptions } = instance2.appContext.config; const { delimiters, compilerOptions: componentCompilerOptions } = Component; - const finalCompilerOptions = extend$1(extend$1({ + const finalCompilerOptions = extend(extend({ isCustomElement, delimiters }, compilerOptions), componentCompilerOptions); - Component.render = compile(template, finalCompilerOptions); + Component.render = compile$1(template, finalCompilerOptions); } } instance2.render = Component.render || NOOP; @@ -4363,10 +4340,10 @@ function getExposeProxy(instance2) { } } function getComponentName(Component, includeInferred = true) { - return isFunction$1(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; + return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; } function isClassComponent(value) { - return isFunction$1(value) && "__vccOpts" in value; + return isFunction(value) && "__vccOpts" in value; } const computed = (getterOrOptions, debugOptions) => { return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); @@ -4374,7 +4351,7 @@ const computed = (getterOrOptions, debugOptions) => { function h(type, propsOrChildren, children) { const l = arguments.length; if (l === 2) { - if (isObject$1(propsOrChildren) && !isArray$1(propsOrChildren)) { + if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { if (isVNode(propsOrChildren)) { return createVNode(type, null, [propsOrChildren]); } @@ -4392,45 +4369,6 @@ function h(type, propsOrChildren, children) { } } const version = "3.2.37"; -function makeMap(str, expectsLowerCase) { - const map = /* @__PURE__ */ Object.create(null); - const list = str.split(","); - for (let i = 0; i < list.length; i++) { - map[list[i]] = true; - } - return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val]; -} -const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; -const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); -function includeBooleanAttr(value) { - return !!value || value === ""; -} -const onRE = /^on[^a-z]/; -const isOn = (key) => onRE.test(key); -const isModelListener = (key) => key.startsWith("onUpdate:"); -const extend = Object.assign; -const isArray = Array.isArray; -const isFunction = (val) => typeof val === "function"; -const isString = (val) => typeof val === "string"; -const isObject = (val) => val !== null && typeof val === "object"; -const cacheStringFunction = (fn) => { - const cache = /* @__PURE__ */ Object.create(null); - return (str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }; -}; -const camelizeRE = /-(\w)/g; -const camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); -}); -const hyphenateRE = /\B([A-Z])/g; -const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase()); -const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); -const toNumber = (val) => { - const n = parseFloat(val); - return isNaN(n) ? val : n; -}; const svgNS = "http://www.w3.org/2000/svg"; const doc = typeof document !== "undefined" ? document : null; const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); @@ -4472,16 +4410,16 @@ const nodeOps = { } return cloned; }, - insertStaticContent(content, parent, anchor, isSVG, start2, end) { + insertStaticContent(content2, parent, anchor, isSVG, start, end) { const before = anchor ? anchor.previousSibling : parent.lastChild; - if (start2 && (start2 === end || start2.nextSibling)) { + if (start && (start === end || start.nextSibling)) { while (true) { - parent.insertBefore(start2.cloneNode(true), anchor); - if (start2 === end || !(start2 = start2.nextSibling)) + parent.insertBefore(start.cloneNode(true), anchor); + if (start === end || !(start = start.nextSibling)) break; } } else { - templateContainer.innerHTML = isSVG ? `${content}` : content; + templateContainer.innerHTML = isSVG ? `${content2}` : content2; const template = templateContainer.content; if (isSVG) { const wrapper = template.firstChild; @@ -4511,16 +4449,16 @@ function patchClass(el, value, isSVG) { el.className = value; } } -function patchStyle(el, prev, next2) { +function patchStyle(el, prev, next) { const style = el.style; - const isCssString = isString(next2); - if (next2 && !isCssString) { - for (const key in next2) { - setStyle(style, key, next2[key]); + const isCssString = isString(next); + if (next && !isCssString) { + for (const key in next) { + setStyle(style, key, next[key]); } if (prev && !isString(prev)) { for (const key in prev) { - if (next2[key] == null) { + if (next[key] == null) { setStyle(style, key, ""); } } @@ -4528,8 +4466,8 @@ function patchStyle(el, prev, next2) { } else { const currentDisplay = style.display; if (isCssString) { - if (prev !== next2) { - style.cssText = next2; + if (prev !== next) { + style.cssText = next; } } else if (prev) { el.removeAttribute("style"); @@ -4565,7 +4503,7 @@ function autoPrefix(style, rawName) { if (cached) { return cached; } - let name = camelize$1(rawName); + let name = camelize(rawName); if (name !== "filter" && name in style) { return prefixCache[rawName] = name; } @@ -4651,11 +4589,11 @@ const reset = () => { cachedNow = 0; }; const getNow = () => cachedNow || (p.then(reset), cachedNow = _getNow()); -function addEventListener$1(el, event, handler, options2) { - el.addEventListener(event, handler, options2); +function addEventListener$1(el, event, handler, options) { + el.addEventListener(event, handler, options); } -function removeEventListener(el, event, handler, options2) { - el.removeEventListener(event, handler, options2); +function removeEventListener(el, event, handler, options) { + el.removeEventListener(event, handler, options); } function patchEvent(el, rawName, prevValue, nextValue, instance2 = null) { const invokers = el._vei || (el._vei = {}); @@ -4663,28 +4601,28 @@ function patchEvent(el, rawName, prevValue, nextValue, instance2 = null) { if (nextValue && existingInvoker) { existingInvoker.value = nextValue; } else { - const [name, options2] = parseName(rawName); + const [name, options] = parseName(rawName); if (nextValue) { const invoker = invokers[rawName] = createInvoker(nextValue, instance2); - addEventListener$1(el, name, invoker, options2); + addEventListener$1(el, name, invoker, options); } else if (existingInvoker) { - removeEventListener(el, name, existingInvoker, options2); + removeEventListener(el, name, existingInvoker, options); invokers[rawName] = void 0; } } } const optionsModifierRE = /(?:Once|Passive|Capture)$/; function parseName(name) { - let options2; + let options; if (optionsModifierRE.test(name)) { - options2 = {}; + options = {}; let m; while (m = name.match(optionsModifierRE)) { name = name.slice(0, name.length - m[0].length); - options2[m[0].toLowerCase()] = true; + options[m[0].toLowerCase()] = true; } } - return [hyphenate(name.slice(2)), options2]; + return [hyphenate(name.slice(2)), options]; } function createInvoker(initialValue, instance2) { const invoker = (e) => { @@ -4757,8 +4695,8 @@ function shouldSetAsProp(el, key, value, isSVG) { } return key in el; } -function defineCustomElement(options2, hydrate) { - const Comp = defineComponent(options2); +function defineCustomElement(options, hydrate) { + const Comp = defineComponent(options); class VueCustomElement extends VueElement { constructor(initialProps) { super(Comp, initialProps, hydrate); @@ -4812,7 +4750,7 @@ class VueElement extends BaseClass { this._setAttr(m.attributeName); } }).observe(this, { attributes: true }); - const resolve3 = (def2) => { + const resolve2 = (def2) => { const { props, styles } = def2; const hasOptions = !isArray(props); const rawKeys = props ? hasOptions ? Object.keys(props) : props : []; @@ -4847,9 +4785,9 @@ class VueElement extends BaseClass { }; const asyncDef = this._def.__asyncLoader; if (asyncDef) { - asyncDef().then(resolve3); + asyncDef().then(resolve2); } else { - resolve3(this._def); + resolve2(this._def); } } _setAttr(key) { @@ -4977,13 +4915,13 @@ function resolveTransitionProps(rawProps) { const makeEnterHook = (isAppear) => { return (el, done) => { const hook = isAppear ? onAppear : onEnter; - const resolve3 = () => finishEnter(el, isAppear, done); - callHook(hook, [el, resolve3]); + const resolve2 = () => finishEnter(el, isAppear, done); + callHook(hook, [el, resolve2]); nextFrame(() => { removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); addTransitionClass(el, isAppear ? appearToClass : enterToClass); if (!hasExplicitCallback(hook)) { - whenTransitionEnds(el, type, enterDuration, resolve3); + whenTransitionEnds(el, type, enterDuration, resolve2); } }); }; @@ -5003,7 +4941,7 @@ function resolveTransitionProps(rawProps) { onAppear: makeEnterHook(true), onLeave(el, done) { el._isLeaving = true; - const resolve3 = () => finishLeave(el, done); + const resolve2 = () => finishLeave(el, done); addTransitionClass(el, leaveFromClass); forceReflow(); addTransitionClass(el, leaveActiveClass); @@ -5014,10 +4952,10 @@ function resolveTransitionProps(rawProps) { removeTransitionClass(el, leaveFromClass); addTransitionClass(el, leaveToClass); if (!hasExplicitCallback(onLeave)) { - whenTransitionEnds(el, type, leaveDuration, resolve3); + whenTransitionEnds(el, type, leaveDuration, resolve2); } }); - callHook(onLeave, [el, resolve3]); + callHook(onLeave, [el, resolve2]); }, onEnterCancelled(el) { finishEnter(el, false); @@ -5067,11 +5005,11 @@ function nextFrame(cb) { }); } let endId = 0; -function whenTransitionEnds(el, expectedType, explicitTimeout, resolve3) { +function whenTransitionEnds(el, expectedType, explicitTimeout, resolve2) { const id = el._endId = ++endId; const resolveIfNotStale = () => { if (id === el._endId) { - resolve3(); + resolve2(); } }; if (explicitTimeout) { @@ -5079,7 +5017,7 @@ function whenTransitionEnds(el, expectedType, explicitTimeout, resolve3) { } const { type, timeout, propCount } = getTransitionInfo(el, expectedType); if (!type) { - return resolve3(); + return resolve2(); } const endEvent = type + "end"; let ended = 0; @@ -5158,7 +5096,7 @@ const TransitionGroupImpl = { }), setup(props, { slots }) { const instance2 = getCurrentInstance(); - const state2 = useTransitionState(); + const state = useTransitionState(); let prevChildren; let children; onUpdated(() => { @@ -5200,13 +5138,13 @@ const TransitionGroupImpl = { for (let i = 0; i < children.length; i++) { const child = children[i]; if (child.key != null) { - setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state2, instance2)); + setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance2)); } } if (prevChildren) { for (let i = 0; i < prevChildren.length; i++) { const child = prevChildren[i]; - setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state2, instance2)); + setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance2)); positionMap.set(child, child.el.getBoundingClientRect()); } } @@ -5363,7 +5301,7 @@ const _sfc_main$q = { const _hoisted_1$q = /* @__PURE__ */ createBaseVNode("div", { id: "vac-circle" }, null, -1); const _hoisted_2$n = /* @__PURE__ */ createBaseVNode("div", { id: "vac-circle" }, null, -1); const _hoisted_3$j = /* @__PURE__ */ createBaseVNode("div", { id: "vac-circle" }, null, -1); -const _hoisted_4$h = /* @__PURE__ */ createBaseVNode("div", { id: "vac-circle" }, null, -1); +const _hoisted_4$g = /* @__PURE__ */ createBaseVNode("div", { id: "vac-circle" }, null, -1); const _hoisted_5$b = /* @__PURE__ */ createBaseVNode("div", { id: "vac-circle" }, null, -1); const _hoisted_6$7 = /* @__PURE__ */ createBaseVNode("div", { id: "vac-circle" }, null, -1); function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) { @@ -5389,7 +5327,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) { _hoisted_3$j ]) : createCommentVNode("", true), $props.type === "room-file" ? renderSlot(_ctx.$slots, "spinner-icon-room-file", { key: 3 }, () => [ - _hoisted_4$h + _hoisted_4$g ]) : createCommentVNode("", true), $props.type === "messages" ? renderSlot(_ctx.$slots, "spinner-icon-messages", { key: 4 }, () => [ _hoisted_5$b @@ -5576,887 +5514,6382 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) { ], 2); } var RoomsSearch = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$o]]); -var linkify = {}; -var _class$4 = {}; -_class$4.__esModule = true; -_class$4.inherits = inherits; -function inherits(parent, child) { - var props = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; - var extended = Object.create(parent.prototype); - for (var p2 in props) { - extended[p2] = props[p2]; - } - extended.constructor = child; - child.prototype = extended; - return child; -} -var options$1 = {}; -options$1.__esModule = true; -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { - return typeof obj; -} : function(obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; -}; -var defaults = { - defaultProtocol: "http", - events: null, - format: noop$1, - formatHref: noop$1, - nl2br: false, - tagName: "a", - target: typeToTarget, - validate: true, - ignoreTags: [], - attributes: null, - className: "linkified" -}; -options$1.defaults = defaults; -options$1.Options = Options; -options$1.contains = contains; -function Options(opts) { - opts = opts || {}; - this.defaultProtocol = opts.hasOwnProperty("defaultProtocol") ? opts.defaultProtocol : defaults.defaultProtocol; - this.events = opts.hasOwnProperty("events") ? opts.events : defaults.events; - this.format = opts.hasOwnProperty("format") ? opts.format : defaults.format; - this.formatHref = opts.hasOwnProperty("formatHref") ? opts.formatHref : defaults.formatHref; - this.nl2br = opts.hasOwnProperty("nl2br") ? opts.nl2br : defaults.nl2br; - this.tagName = opts.hasOwnProperty("tagName") ? opts.tagName : defaults.tagName; - this.target = opts.hasOwnProperty("target") ? opts.target : defaults.target; - this.validate = opts.hasOwnProperty("validate") ? opts.validate : defaults.validate; - this.ignoreTags = []; - this.attributes = opts.attributes || opts.linkAttributes || defaults.attributes; - this.className = opts.hasOwnProperty("className") ? opts.className : opts.linkClass || defaults.className; - var ignoredTags = opts.hasOwnProperty("ignoreTags") ? opts.ignoreTags : defaults.ignoreTags; - for (var i = 0; i < ignoredTags.length; i++) { - this.ignoreTags.push(ignoredTags[i].toUpperCase()); - } -} -Options.prototype = { - resolve: function resolve2(token) { - var href = token.toHref(this.defaultProtocol); - return { - formatted: this.get("format", token.toString(), token), - formattedHref: this.get("formatHref", href, token), - tagName: this.get("tagName", href, token), - className: this.get("className", href, token), - target: this.get("target", href, token), - events: this.getObject("events", href, token), - attributes: this.getObject("attributes", href, token) - }; - }, - check: function check(token) { - return this.get("validate", token.toString(), token); - }, - get: function get(key, operator, token) { - var optionValue = void 0, option = this[key]; - if (!option) { - return option; - } - switch (typeof option === "undefined" ? "undefined" : _typeof(option)) { - case "function": - return option(operator, token.type); - case "object": - optionValue = option.hasOwnProperty(token.type) ? option[token.type] : defaults[key]; - return typeof optionValue === "function" ? optionValue(operator, token.type) : optionValue; - } - return option; - }, - getObject: function getObject(key, operator, token) { - var option = this[key]; - return typeof option === "function" ? option(operator, token.type) : option; +const element$1 = document.createElement("i"); +function decodeNamedCharacterReference(value) { + const characterReference2 = "&" + value + ";"; + element$1.innerHTML = characterReference2; + const char = element$1.textContent; + if (char.charCodeAt(char.length - 1) === 59 && value !== "semi") { + return false; + } + return char === characterReference2 ? false : char; +} +function splice(list2, start, remove2, items) { + const end = list2.length; + let chunkStart = 0; + let parameters; + if (start < 0) { + start = -start > end ? 0 : end + start; + } else { + start = start > end ? end : start; + } + remove2 = remove2 > 0 ? remove2 : 0; + if (items.length < 1e4) { + parameters = Array.from(items); + parameters.unshift(start, remove2); + list2.splice(...parameters); + } else { + if (remove2) + list2.splice(start, remove2); + while (chunkStart < items.length) { + parameters = items.slice(chunkStart, chunkStart + 1e4); + parameters.unshift(start, 0); + list2.splice(...parameters); + chunkStart += 1e4; + start += 1e4; + } + } +} +function push(list2, items) { + if (list2.length > 0) { + splice(list2, list2.length, 0, items); + return list2; + } + return items; +} +const hasOwnProperty$1 = {}.hasOwnProperty; +function combineExtensions(extensions) { + const all = {}; + let index = -1; + while (++index < extensions.length) { + syntaxExtension(all, extensions[index]); + } + return all; +} +function syntaxExtension(all, extension) { + let hook; + for (hook in extension) { + const maybe = hasOwnProperty$1.call(all, hook) ? all[hook] : void 0; + const left = maybe || (all[hook] = {}); + const right = extension[hook]; + let code2; + if (right) { + for (code2 in right) { + if (!hasOwnProperty$1.call(left, code2)) + left[code2] = []; + const value = right[code2]; + constructs( + left[code2], + Array.isArray(value) ? value : value ? [value] : [] + ); + } + } + } +} +function constructs(existing, list2) { + let index = -1; + const before = []; + while (++index < list2.length) { + (list2[index].add === "after" ? existing : before).push(list2[index]); + } + splice(existing, 0, 0, before); +} +function combineHtmlExtensions(htmlExtensions) { + const handlers = {}; + let index = -1; + while (++index < htmlExtensions.length) { + htmlExtension(handlers, htmlExtensions[index]); + } + return handlers; +} +function htmlExtension(all, extension) { + let hook; + for (hook in extension) { + const maybe = hasOwnProperty$1.call(all, hook) ? all[hook] : void 0; + const left = maybe || (all[hook] = {}); + const right = extension[hook]; + let type; + if (right) { + for (type in right) { + left[type] = right[type]; + } + } + } +} +function decodeNumericCharacterReference(value, base) { + const code2 = Number.parseInt(value, base); + if (code2 < 9 || code2 === 11 || code2 > 13 && code2 < 32 || code2 > 126 && code2 < 160 || code2 > 55295 && code2 < 57344 || code2 > 64975 && code2 < 65008 || (code2 & 65535) === 65535 || (code2 & 65535) === 65534 || code2 > 1114111) { + return "\uFFFD"; + } + return String.fromCharCode(code2); +} +const characterReferences = { '"': "quot", "&": "amp", "<": "lt", ">": "gt" }; +function encode(value) { + return value.replace(/["&<>]/g, replace2); + function replace2(value2) { + return "&" + characterReferences[value2] + ";"; + } +} +function normalizeIdentifier(value) { + return value.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase(); +} +const unicodePunctuationRegex = /[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/; +const asciiAlpha = regexCheck(/[A-Za-z]/); +const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/); +const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/); +function asciiControl(code2) { + return code2 !== null && (code2 < 32 || code2 === 127); +} +const asciiDigit = regexCheck(/\d/); +const asciiHexDigit = regexCheck(/[\dA-Fa-f]/); +const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/); +function markdownLineEnding(code2) { + return code2 !== null && code2 < -2; +} +function markdownLineEndingOrSpace(code2) { + return code2 !== null && (code2 < 0 || code2 === 32); +} +function markdownSpace(code2) { + return code2 === -2 || code2 === -1 || code2 === 32; +} +const unicodePunctuation = regexCheck(unicodePunctuationRegex); +const unicodeWhitespace = regexCheck(/\s/); +function regexCheck(regex) { + return check; + function check(code2) { + return code2 !== null && regex.test(String.fromCharCode(code2)); + } +} +function sanitizeUri(url, protocol) { + const value = encode(normalizeUri(url || "")); + if (!protocol) { + return value; + } + const colon = value.indexOf(":"); + const questionMark = value.indexOf("?"); + const numberSign = value.indexOf("#"); + const slash = value.indexOf("/"); + if (colon < 0 || slash > -1 && colon > slash || questionMark > -1 && colon > questionMark || numberSign > -1 && colon > numberSign || protocol.test(value.slice(0, colon))) { + return value; + } + return ""; +} +function normalizeUri(value) { + const result = []; + let index = -1; + let start = 0; + let skip = 0; + while (++index < value.length) { + const code2 = value.charCodeAt(index); + let replace2 = ""; + if (code2 === 37 && asciiAlphanumeric(value.charCodeAt(index + 1)) && asciiAlphanumeric(value.charCodeAt(index + 2))) { + skip = 2; + } else if (code2 < 128) { + if (!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(code2))) { + replace2 = String.fromCharCode(code2); + } + } else if (code2 > 55295 && code2 < 57344) { + const next = value.charCodeAt(index + 1); + if (code2 < 56320 && next > 56319 && next < 57344) { + replace2 = String.fromCharCode(code2, next); + skip = 1; + } else { + replace2 = "\uFFFD"; + } + } else { + replace2 = String.fromCharCode(code2); + } + if (replace2) { + result.push(value.slice(start, index), encodeURIComponent(replace2)); + start = index + skip + 1; + replace2 = ""; + } + if (skip) { + index += skip; + skip = 0; + } + } + return result.join("") + value.slice(start); +} +const hasOwnProperty = {}.hasOwnProperty; +const protocolHref = /^(https?|ircs?|mailto|xmpp)$/i; +const protocolSrc = /^https?$/i; +function compile(options) { + const settings = options || {}; + let tags = true; + const definitions2 = {}; + const buffers = [[]]; + const mediaStack = []; + const tightStack = []; + const defaultHandlers = { + enter: { + blockQuote: onenterblockquote, + codeFenced: onentercodefenced, + codeFencedFenceInfo: buffer, + codeFencedFenceMeta: buffer, + codeIndented: onentercodeindented, + codeText: onentercodetext, + content: onentercontent, + definition: onenterdefinition, + definitionDestinationString: onenterdefinitiondestinationstring, + definitionLabelString: buffer, + definitionTitleString: buffer, + emphasis: onenteremphasis, + htmlFlow: onenterhtmlflow, + htmlText: onenterhtml, + image: onenterimage, + label: buffer, + link: onenterlink, + listItemMarker: onenterlistitemmarker, + listItemValue: onenterlistitemvalue, + listOrdered: onenterlistordered, + listUnordered: onenterlistunordered, + paragraph: onenterparagraph, + reference: buffer, + resource: onenterresource, + resourceDestinationString: onenterresourcedestinationstring, + resourceTitleString: buffer, + setextHeading: onentersetextheading, + strong: onenterstrong + }, + exit: { + atxHeading: onexitatxheading, + atxHeadingSequence: onexitatxheadingsequence, + autolinkEmail: onexitautolinkemail, + autolinkProtocol: onexitautolinkprotocol, + blockQuote: onexitblockquote, + characterEscapeValue: onexitdata, + characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, + characterReferenceMarkerNumeric: onexitcharacterreferencemarker, + characterReferenceValue: onexitcharacterreferencevalue, + codeFenced: onexitflowcode, + codeFencedFence: onexitcodefencedfence, + codeFencedFenceInfo: onexitcodefencedfenceinfo, + codeFencedFenceMeta: resume, + codeFlowValue: onexitcodeflowvalue, + codeIndented: onexitflowcode, + codeText: onexitcodetext, + codeTextData: onexitdata, + data: onexitdata, + definition: onexitdefinition, + definitionDestinationString: onexitdefinitiondestinationstring, + definitionLabelString: onexitdefinitionlabelstring, + definitionTitleString: onexitdefinitiontitlestring, + emphasis: onexitemphasis, + hardBreakEscape: onexithardbreak, + hardBreakTrailing: onexithardbreak, + htmlFlow: onexithtml, + htmlFlowData: onexitdata, + htmlText: onexithtml, + htmlTextData: onexitdata, + image: onexitmedia, + label: onexitlabel, + labelText: onexitlabeltext, + lineEnding: onexitlineending, + link: onexitmedia, + listOrdered: onexitlistordered, + listUnordered: onexitlistunordered, + paragraph: onexitparagraph, + reference: resume, + referenceString: onexitreferencestring, + resource: resume, + resourceDestinationString: onexitresourcedestinationstring, + resourceTitleString: onexitresourcetitlestring, + setextHeading: onexitsetextheading, + setextHeadingLineSequence: onexitsetextheadinglinesequence, + setextHeadingText: onexitsetextheadingtext, + strong: onexitstrong, + thematicBreak: onexitthematicbreak + } + }; + const handlers = combineHtmlExtensions( + [defaultHandlers].concat(settings.htmlExtensions || []) + ); + const data = { + tightStack, + definitions: definitions2 + }; + const context = { + lineEndingIfNeeded, + options: settings, + encode: encode$1, + raw, + tag, + buffer, + resume, + setData, + getData + }; + let lineEndingStyle = settings.defaultLineEnding; + return compile2; + function compile2(events) { + let index = -1; + let start = 0; + const listStack = []; + let head = []; + let body = []; + while (++index < events.length) { + if (!lineEndingStyle && (events[index][1].type === "lineEnding" || events[index][1].type === "lineEndingBlank")) { + lineEndingStyle = events[index][2].sliceSerialize(events[index][1]); + } + if (events[index][1].type === "listOrdered" || events[index][1].type === "listUnordered") { + if (events[index][0] === "enter") { + listStack.push(index); + } else { + prepareList(events.slice(listStack.pop(), index)); + } + } + if (events[index][1].type === "definition") { + if (events[index][0] === "enter") { + body = push(body, events.slice(start, index)); + start = index; + } else { + head = push(head, events.slice(start, index + 1)); + start = index + 1; + } + } + } + head = push(head, body); + head = push(head, events.slice(start)); + index = -1; + const result = head; + if (handlers.enter.null) { + handlers.enter.null.call(context); + } + while (++index < events.length) { + const handles = handlers[result[index][0]]; + const kind = result[index][1].type; + const handle = handles[kind]; + if (hasOwnProperty.call(handles, kind) && handle) { + handle.call( + Object.assign( + { + sliceSerialize: result[index][2].sliceSerialize + }, + context + ), + result[index][1] + ); + } + } + if (handlers.exit.null) { + handlers.exit.null.call(context); + } + return buffers[0].join(""); + } + function prepareList(slice) { + const length = slice.length; + let index = 0; + let containerBalance = 0; + let loose = false; + let atMarker; + while (++index < length) { + const event = slice[index]; + if (event[1]._container) { + atMarker = void 0; + if (event[0] === "enter") { + containerBalance++; + } else { + containerBalance--; + } + } else + switch (event[1].type) { + case "listItemPrefix": { + if (event[0] === "exit") { + atMarker = true; + } + break; + } + case "linePrefix": { + break; + } + case "lineEndingBlank": { + if (event[0] === "enter" && !containerBalance) { + if (atMarker) { + atMarker = void 0; + } else { + loose = true; + } + } + break; + } + default: { + atMarker = void 0; + } + } + } + slice[0][1]._loose = loose; + } + function setData(key, value) { + data[key] = value; + } + function getData(key) { + return data[key]; + } + function buffer() { + buffers.push([]); + } + function resume() { + const buf = buffers.pop(); + return buf.join(""); + } + function tag(value) { + if (!tags) + return; + setData("lastWasTag", true); + buffers[buffers.length - 1].push(value); + } + function raw(value) { + setData("lastWasTag"); + buffers[buffers.length - 1].push(value); + } + function lineEnding2() { + raw(lineEndingStyle || "\n"); + } + function lineEndingIfNeeded() { + const buffer2 = buffers[buffers.length - 1]; + const slice = buffer2[buffer2.length - 1]; + const previous2 = slice ? slice.charCodeAt(slice.length - 1) : null; + if (previous2 === 10 || previous2 === 13 || previous2 === null) { + return; + } + lineEnding2(); + } + function encode$1(value) { + return getData("ignoreEncode") ? value : encode(value); + } + function onenterlistordered(token) { + tightStack.push(!token._loose); + lineEndingIfNeeded(); + tag(""); + } else { + onexitlistitem(); + } + lineEndingIfNeeded(); + tag("
  • "); + setData("expectFirstItem"); + setData("lastWasTag"); + } + function onexitlistordered() { + onexitlistitem(); + tightStack.pop(); + lineEnding2(); + tag(""); + } + function onexitlistunordered() { + onexitlistitem(); + tightStack.pop(); + lineEnding2(); + tag(""); + } + function onexitlistitem() { + if (getData("lastWasTag") && !getData("slurpAllLineEndings")) { + lineEndingIfNeeded(); + } + tag("
  • "); + setData("slurpAllLineEndings"); + } + function onenterblockquote() { + tightStack.push(false); + lineEndingIfNeeded(); + tag("
    "); + } + function onexitblockquote() { + tightStack.pop(); + lineEndingIfNeeded(); + tag("
    "); + setData("slurpAllLineEndings"); + } + function onenterparagraph() { + if (!tightStack[tightStack.length - 1]) { + lineEndingIfNeeded(); + tag("

    "); + } + setData("slurpAllLineEndings"); + } + function onexitparagraph() { + if (tightStack[tightStack.length - 1]) { + setData("slurpAllLineEndings", true); + } else { + tag("

    "); + } + } + function onentercodefenced() { + lineEndingIfNeeded(); + tag("
    ");
    +      setData("slurpOneLineEnding", true);
    +    }
    +    setData("fencesCount", count + 1);
    +  }
    +  function onentercodeindented() {
    +    lineEndingIfNeeded();
    +    tag("
    ");
    +  }
    +  function onexitflowcode() {
    +    const count = getData("fencesCount");
    +    if (count !== void 0 && count < 2 && data.tightStack.length > 0 && !getData("lastWasTag")) {
    +      lineEnding2();
    +    }
    +    if (getData("flowCodeSeenData")) {
    +      lineEndingIfNeeded();
    +    }
    +    tag("
    "); + if (count !== void 0 && count < 2) + lineEndingIfNeeded(); + setData("flowCodeSeenData"); + setData("fencesCount"); + setData("slurpOneLineEnding"); + } + function onenterimage() { + mediaStack.push({ + image: true + }); + tags = void 0; + } + function onenterlink() { + mediaStack.push({}); + } + function onexitlabeltext(token) { + mediaStack[mediaStack.length - 1].labelId = this.sliceSerialize(token); + } + function onexitlabel() { + mediaStack[mediaStack.length - 1].label = resume(); + } + function onexitreferencestring(token) { + mediaStack[mediaStack.length - 1].referenceId = this.sliceSerialize(token); + } + function onenterresource() { + buffer(); + mediaStack[mediaStack.length - 1].destination = ""; + } + function onenterresourcedestinationstring() { + buffer(); + setData("ignoreEncode", true); + } + function onexitresourcedestinationstring() { + mediaStack[mediaStack.length - 1].destination = resume(); + setData("ignoreEncode"); + } + function onexitresourcetitlestring() { + mediaStack[mediaStack.length - 1].title = resume(); + } + function onexitmedia() { + let index = mediaStack.length - 1; + const media = mediaStack[index]; + const id = media.referenceId || media.labelId; + const context2 = media.destination === void 0 ? definitions2[normalizeIdentifier(id)] : media; + tags = true; + while (index--) { + if (mediaStack[index].image) { + tags = void 0; + break; + } + } + if (media.image) { + tag( + ''
+      );
+      raw(media.label);
+      tag('"); + } else { + tag(">"); + raw(media.label); + tag(""); + } + mediaStack.pop(); + } + function onenterdefinition() { + buffer(); + mediaStack.push({}); + } + function onexitdefinitionlabelstring(token) { + resume(); + mediaStack[mediaStack.length - 1].labelId = this.sliceSerialize(token); + } + function onenterdefinitiondestinationstring() { + buffer(); + setData("ignoreEncode", true); + } + function onexitdefinitiondestinationstring() { + mediaStack[mediaStack.length - 1].destination = resume(); + setData("ignoreEncode"); + } + function onexitdefinitiontitlestring() { + mediaStack[mediaStack.length - 1].title = resume(); + } + function onexitdefinition() { + const media = mediaStack[mediaStack.length - 1]; + const id = normalizeIdentifier(media.labelId); + resume(); + if (!hasOwnProperty.call(definitions2, id)) { + definitions2[id] = mediaStack[mediaStack.length - 1]; + } + mediaStack.pop(); + } + function onentercontent() { + setData("slurpAllLineEndings", true); + } + function onexitatxheadingsequence(token) { + if (getData("headingRank")) + return; + setData("headingRank", this.sliceSerialize(token).length); + lineEndingIfNeeded(); + tag(""); + } + function onentersetextheading() { + buffer(); + setData("slurpAllLineEndings"); + } + function onexitsetextheadingtext() { + setData("slurpAllLineEndings", true); + } + function onexitatxheading() { + tag(""); + setData("headingRank"); + } + function onexitsetextheadinglinesequence(token) { + setData( + "headingRank", + this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2 + ); + } + function onexitsetextheading() { + const value = resume(); + lineEndingIfNeeded(); + tag(""); + raw(value); + tag(""); + setData("slurpAllLineEndings"); + setData("headingRank"); + } + function onexitdata(token) { + raw(encode$1(this.sliceSerialize(token))); + } + function onexitlineending(token) { + if (getData("slurpAllLineEndings")) { + return; + } + if (getData("slurpOneLineEnding")) { + setData("slurpOneLineEnding"); + return; + } + if (getData("inCodeText")) { + raw(" "); + return; + } + raw(encode$1(this.sliceSerialize(token))); + } + function onexitcodeflowvalue(token) { + raw(encode$1(this.sliceSerialize(token))); + setData("flowCodeSeenData", true); + } + function onexithardbreak() { + tag("
    "); + } + function onenterhtmlflow() { + lineEndingIfNeeded(); + onenterhtml(); + } + function onexithtml() { + setData("ignoreEncode"); + } + function onenterhtml() { + if (settings.allowDangerousHtml) { + setData("ignoreEncode", true); + } + } + function onenteremphasis() { + tag(""); + } + function onenterstrong() { + tag(""); + } + function onentercodetext() { + setData("inCodeText", true); + tag(""); + } + function onexitcodetext() { + setData("inCodeText"); + tag(""); + } + function onexitemphasis() { + tag(""); + } + function onexitstrong() { + tag(""); + } + function onexitthematicbreak() { + lineEndingIfNeeded(); + tag("
    "); + } + function onexitcharacterreferencemarker(token) { + setData("characterReferenceType", token.type); + } + function onexitcharacterreferencevalue(token) { + let value = this.sliceSerialize(token); + value = getData("characterReferenceType") ? decodeNumericCharacterReference( + value, + getData("characterReferenceType") === "characterReferenceMarkerNumeric" ? 10 : 16 + ) : decodeNamedCharacterReference(value); + raw(encode$1(value)); + setData("characterReferenceType"); + } + function onexitautolinkprotocol(token) { + const uri = this.sliceSerialize(token); + tag( + '' + ); + raw(encode$1(uri)); + tag(""); + } + function onexitautolinkemail(token) { + const uri = this.sliceSerialize(token); + tag(''); + raw(encode$1(uri)); + tag(""); + } +} +function factorySpace(effects, ok, type, max) { + const limit = max ? max - 1 : Number.POSITIVE_INFINITY; + let size2 = 0; + return start; + function start(code2) { + if (markdownSpace(code2)) { + effects.enter(type); + return prefix(code2); + } + return ok(code2); + } + function prefix(code2) { + if (markdownSpace(code2) && size2++ < limit) { + effects.consume(code2); + return prefix; + } + effects.exit(type); + return ok(code2); + } +} +const content$1 = { + tokenize: initializeContent +}; +function initializeContent(effects) { + const contentStart = effects.attempt( + this.parser.constructs.contentInitial, + afterContentStartConstruct, + paragraphInitial + ); + let previous2; + return contentStart; + function afterContentStartConstruct(code2) { + if (code2 === null) { + effects.consume(code2); + return; + } + effects.enter("lineEnding"); + effects.consume(code2); + effects.exit("lineEnding"); + return factorySpace(effects, contentStart, "linePrefix"); + } + function paragraphInitial(code2) { + effects.enter("paragraph"); + return lineStart(code2); + } + function lineStart(code2) { + const token = effects.enter("chunkText", { + contentType: "text", + previous: previous2 + }); + if (previous2) { + previous2.next = token; + } + previous2 = token; + return data(code2); + } + function data(code2) { + if (code2 === null) { + effects.exit("chunkText"); + effects.exit("paragraph"); + effects.consume(code2); + return; + } + if (markdownLineEnding(code2)) { + effects.consume(code2); + effects.exit("chunkText"); + return lineStart; + } + effects.consume(code2); + return data; + } +} +const document$2 = { + tokenize: initializeDocument +}; +const containerConstruct = { + tokenize: tokenizeContainer +}; +function initializeDocument(effects) { + const self2 = this; + const stack = []; + let continued = 0; + let childFlow; + let childToken; + let lineStartOffset; + return start; + function start(code2) { + if (continued < stack.length) { + const item = stack[continued]; + self2.containerState = item[1]; + return effects.attempt( + item[0].continuation, + documentContinue, + checkNewContainers + )(code2); + } + return checkNewContainers(code2); + } + function documentContinue(code2) { + continued++; + if (self2.containerState._closeFlow) { + self2.containerState._closeFlow = void 0; + if (childFlow) { + closeFlow(); + } + const indexBeforeExits = self2.events.length; + let indexBeforeFlow = indexBeforeExits; + let point; + while (indexBeforeFlow--) { + if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") { + point = self2.events[indexBeforeFlow][1].end; + break; + } + } + exitContainers(continued); + let index = indexBeforeExits; + while (index < self2.events.length) { + self2.events[index][1].end = Object.assign({}, point); + index++; + } + splice( + self2.events, + indexBeforeFlow + 1, + 0, + self2.events.slice(indexBeforeExits) + ); + self2.events.length = index; + return checkNewContainers(code2); + } + return start(code2); + } + function checkNewContainers(code2) { + if (continued === stack.length) { + if (!childFlow) { + return documentContinued(code2); + } + if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) { + return flowStart(code2); + } + self2.interrupt = Boolean( + childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack + ); + } + self2.containerState = {}; + return effects.check( + containerConstruct, + thereIsANewContainer, + thereIsNoNewContainer + )(code2); + } + function thereIsANewContainer(code2) { + if (childFlow) + closeFlow(); + exitContainers(continued); + return documentContinued(code2); + } + function thereIsNoNewContainer(code2) { + self2.parser.lazy[self2.now().line] = continued !== stack.length; + lineStartOffset = self2.now().offset; + return flowStart(code2); + } + function documentContinued(code2) { + self2.containerState = {}; + return effects.attempt( + containerConstruct, + containerContinue, + flowStart + )(code2); + } + function containerContinue(code2) { + continued++; + stack.push([self2.currentConstruct, self2.containerState]); + return documentContinued(code2); + } + function flowStart(code2) { + if (code2 === null) { + if (childFlow) + closeFlow(); + exitContainers(0); + effects.consume(code2); + return; + } + childFlow = childFlow || self2.parser.flow(self2.now()); + effects.enter("chunkFlow", { + contentType: "flow", + previous: childToken, + _tokenizer: childFlow + }); + return flowContinue(code2); + } + function flowContinue(code2) { + if (code2 === null) { + writeToChild(effects.exit("chunkFlow"), true); + exitContainers(0); + effects.consume(code2); + return; + } + if (markdownLineEnding(code2)) { + effects.consume(code2); + writeToChild(effects.exit("chunkFlow")); + continued = 0; + self2.interrupt = void 0; + return start; + } + effects.consume(code2); + return flowContinue; + } + function writeToChild(token, eof) { + const stream = self2.sliceStream(token); + if (eof) + stream.push(null); + token.previous = childToken; + if (childToken) + childToken.next = token; + childToken = token; + childFlow.defineSkip(token.start); + childFlow.write(stream); + if (self2.parser.lazy[token.start.line]) { + let index = childFlow.events.length; + while (index--) { + if (childFlow.events[index][1].start.offset < lineStartOffset && (!childFlow.events[index][1].end || childFlow.events[index][1].end.offset > lineStartOffset)) { + return; + } + } + const indexBeforeExits = self2.events.length; + let indexBeforeFlow = indexBeforeExits; + let seen; + let point; + while (indexBeforeFlow--) { + if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") { + if (seen) { + point = self2.events[indexBeforeFlow][1].end; + break; + } + seen = true; + } + } + exitContainers(continued); + index = indexBeforeExits; + while (index < self2.events.length) { + self2.events[index][1].end = Object.assign({}, point); + index++; + } + splice( + self2.events, + indexBeforeFlow + 1, + 0, + self2.events.slice(indexBeforeExits) + ); + self2.events.length = index; + } + } + function exitContainers(size2) { + let index = stack.length; + while (index-- > size2) { + const entry = stack[index]; + self2.containerState = entry[1]; + entry[0].exit.call(self2, effects); + } + stack.length = size2; + } + function closeFlow() { + childFlow.write([null]); + childToken = void 0; + childFlow = void 0; + self2.containerState._closeFlow = void 0; + } +} +function tokenizeContainer(effects, ok, nok) { + return factorySpace( + effects, + effects.attempt(this.parser.constructs.document, ok, nok), + "linePrefix", + this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + ); +} +function classifyCharacter(code2) { + if (code2 === null || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) { + return 1; + } + if (unicodePunctuation(code2)) { + return 2; + } +} +function resolveAll(constructs2, events, context) { + const called = []; + let index = -1; + while (++index < constructs2.length) { + const resolve2 = constructs2[index].resolveAll; + if (resolve2 && !called.includes(resolve2)) { + events = resolve2(events, context); + called.push(resolve2); + } + } + return events; +} +const attention = { + name: "attention", + tokenize: tokenizeAttention, + resolveAll: resolveAllAttention +}; +function resolveAllAttention(events, context) { + let index = -1; + let open; + let group; + let text2; + let openingSequence; + let closingSequence; + let use; + let nextEvents; + let offset; + while (++index < events.length) { + if (events[index][0] === "enter" && events[index][1].type === "attentionSequence" && events[index][1]._close) { + open = index; + while (open--) { + if (events[open][0] === "exit" && events[open][1].type === "attentionSequence" && events[open][1]._open && context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index][1]).charCodeAt(0)) { + if ((events[open][1]._close || events[index][1]._open) && (events[index][1].end.offset - events[index][1].start.offset) % 3 && !((events[open][1].end.offset - events[open][1].start.offset + events[index][1].end.offset - events[index][1].start.offset) % 3)) { + continue; + } + use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[index][1].end.offset - events[index][1].start.offset > 1 ? 2 : 1; + const start = Object.assign({}, events[open][1].end); + const end = Object.assign({}, events[index][1].start); + movePoint(start, -use); + movePoint(end, use); + openingSequence = { + type: use > 1 ? "strongSequence" : "emphasisSequence", + start, + end: Object.assign({}, events[open][1].end) + }; + closingSequence = { + type: use > 1 ? "strongSequence" : "emphasisSequence", + start: Object.assign({}, events[index][1].start), + end + }; + text2 = { + type: use > 1 ? "strongText" : "emphasisText", + start: Object.assign({}, events[open][1].end), + end: Object.assign({}, events[index][1].start) + }; + group = { + type: use > 1 ? "strong" : "emphasis", + start: Object.assign({}, openingSequence.start), + end: Object.assign({}, closingSequence.end) + }; + events[open][1].end = Object.assign({}, openingSequence.start); + events[index][1].start = Object.assign({}, closingSequence.end); + nextEvents = []; + if (events[open][1].end.offset - events[open][1].start.offset) { + nextEvents = push(nextEvents, [ + ["enter", events[open][1], context], + ["exit", events[open][1], context] + ]); + } + nextEvents = push(nextEvents, [ + ["enter", group, context], + ["enter", openingSequence, context], + ["exit", openingSequence, context], + ["enter", text2, context] + ]); + nextEvents = push( + nextEvents, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + 1, index), + context + ) + ); + nextEvents = push(nextEvents, [ + ["exit", text2, context], + ["enter", closingSequence, context], + ["exit", closingSequence, context], + ["exit", group, context] + ]); + if (events[index][1].end.offset - events[index][1].start.offset) { + offset = 2; + nextEvents = push(nextEvents, [ + ["enter", events[index][1], context], + ["exit", events[index][1], context] + ]); + } else { + offset = 0; + } + splice(events, open - 1, index - open + 3, nextEvents); + index = open + nextEvents.length - offset - 2; + break; + } + } + } + } + index = -1; + while (++index < events.length) { + if (events[index][1].type === "attentionSequence") { + events[index][1].type = "data"; + } + } + return events; +} +function tokenizeAttention(effects, ok) { + const attentionMarkers2 = this.parser.constructs.attentionMarkers.null; + const previous2 = this.previous; + const before = classifyCharacter(previous2); + let marker; + return start; + function start(code2) { + marker = code2; + effects.enter("attentionSequence"); + return inside(code2); + } + function inside(code2) { + if (code2 === marker) { + effects.consume(code2); + return inside; + } + const token = effects.exit("attentionSequence"); + const after = classifyCharacter(code2); + const open = !after || after === 2 && before || attentionMarkers2.includes(code2); + const close = !before || before === 2 && after || attentionMarkers2.includes(previous2); + token._open = Boolean(marker === 42 ? open : open && (before || !close)); + token._close = Boolean(marker === 42 ? close : close && (after || !open)); + return ok(code2); + } +} +function movePoint(point, offset) { + point.column += offset; + point.offset += offset; + point._bufferIndex += offset; +} +const autolink = { + name: "autolink", + tokenize: tokenizeAutolink +}; +function tokenizeAutolink(effects, ok, nok) { + let size2 = 0; + return start; + function start(code2) { + effects.enter("autolink"); + effects.enter("autolinkMarker"); + effects.consume(code2); + effects.exit("autolinkMarker"); + effects.enter("autolinkProtocol"); + return open; + } + function open(code2) { + if (asciiAlpha(code2)) { + effects.consume(code2); + return schemeOrEmailAtext; + } + return emailAtext(code2); + } + function schemeOrEmailAtext(code2) { + if (code2 === 43 || code2 === 45 || code2 === 46 || asciiAlphanumeric(code2)) { + size2 = 1; + return schemeInsideOrEmailAtext(code2); + } + return emailAtext(code2); + } + function schemeInsideOrEmailAtext(code2) { + if (code2 === 58) { + effects.consume(code2); + size2 = 0; + return urlInside; + } + if ((code2 === 43 || code2 === 45 || code2 === 46 || asciiAlphanumeric(code2)) && size2++ < 32) { + effects.consume(code2); + return schemeInsideOrEmailAtext; + } + size2 = 0; + return emailAtext(code2); + } + function urlInside(code2) { + if (code2 === 62) { + effects.exit("autolinkProtocol"); + effects.enter("autolinkMarker"); + effects.consume(code2); + effects.exit("autolinkMarker"); + effects.exit("autolink"); + return ok; + } + if (code2 === null || code2 === 32 || code2 === 60 || asciiControl(code2)) { + return nok(code2); + } + effects.consume(code2); + return urlInside; + } + function emailAtext(code2) { + if (code2 === 64) { + effects.consume(code2); + return emailAtSignOrDot; + } + if (asciiAtext(code2)) { + effects.consume(code2); + return emailAtext; + } + return nok(code2); + } + function emailAtSignOrDot(code2) { + return asciiAlphanumeric(code2) ? emailLabel(code2) : nok(code2); + } + function emailLabel(code2) { + if (code2 === 46) { + effects.consume(code2); + size2 = 0; + return emailAtSignOrDot; + } + if (code2 === 62) { + effects.exit("autolinkProtocol").type = "autolinkEmail"; + effects.enter("autolinkMarker"); + effects.consume(code2); + effects.exit("autolinkMarker"); + effects.exit("autolink"); + return ok; + } + return emailValue(code2); + } + function emailValue(code2) { + if ((code2 === 45 || asciiAlphanumeric(code2)) && size2++ < 63) { + const next = code2 === 45 ? emailValue : emailLabel; + effects.consume(code2); + return next; + } + return nok(code2); + } +} +const blankLine = { + tokenize: tokenizeBlankLine, + partial: true +}; +function tokenizeBlankLine(effects, ok, nok) { + return start; + function start(code2) { + return markdownSpace(code2) ? factorySpace(effects, after, "linePrefix")(code2) : after(code2); + } + function after(code2) { + return code2 === null || markdownLineEnding(code2) ? ok(code2) : nok(code2); + } +} +const blockQuote = { + name: "blockQuote", + tokenize: tokenizeBlockQuoteStart, + continuation: { + tokenize: tokenizeBlockQuoteContinuation + }, + exit +}; +function tokenizeBlockQuoteStart(effects, ok, nok) { + const self2 = this; + return start; + function start(code2) { + if (code2 === 62) { + const state = self2.containerState; + if (!state.open) { + effects.enter("blockQuote", { + _container: true + }); + state.open = true; + } + effects.enter("blockQuotePrefix"); + effects.enter("blockQuoteMarker"); + effects.consume(code2); + effects.exit("blockQuoteMarker"); + return after; + } + return nok(code2); + } + function after(code2) { + if (markdownSpace(code2)) { + effects.enter("blockQuotePrefixWhitespace"); + effects.consume(code2); + effects.exit("blockQuotePrefixWhitespace"); + effects.exit("blockQuotePrefix"); + return ok; + } + effects.exit("blockQuotePrefix"); + return ok(code2); + } +} +function tokenizeBlockQuoteContinuation(effects, ok, nok) { + const self2 = this; + return contStart; + function contStart(code2) { + if (markdownSpace(code2)) { + return factorySpace( + effects, + contBefore, + "linePrefix", + self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + )(code2); + } + return contBefore(code2); + } + function contBefore(code2) { + return effects.attempt(blockQuote, ok, nok)(code2); + } +} +function exit(effects) { + effects.exit("blockQuote"); +} +const characterEscape = { + name: "characterEscape", + tokenize: tokenizeCharacterEscape +}; +function tokenizeCharacterEscape(effects, ok, nok) { + return start; + function start(code2) { + effects.enter("characterEscape"); + effects.enter("escapeMarker"); + effects.consume(code2); + effects.exit("escapeMarker"); + return inside; + } + function inside(code2) { + if (asciiPunctuation(code2)) { + effects.enter("characterEscapeValue"); + effects.consume(code2); + effects.exit("characterEscapeValue"); + effects.exit("characterEscape"); + return ok; + } + return nok(code2); + } +} +const characterReference = { + name: "characterReference", + tokenize: tokenizeCharacterReference +}; +function tokenizeCharacterReference(effects, ok, nok) { + const self2 = this; + let size2 = 0; + let max; + let test; + return start; + function start(code2) { + effects.enter("characterReference"); + effects.enter("characterReferenceMarker"); + effects.consume(code2); + effects.exit("characterReferenceMarker"); + return open; + } + function open(code2) { + if (code2 === 35) { + effects.enter("characterReferenceMarkerNumeric"); + effects.consume(code2); + effects.exit("characterReferenceMarkerNumeric"); + return numeric; + } + effects.enter("characterReferenceValue"); + max = 31; + test = asciiAlphanumeric; + return value(code2); + } + function numeric(code2) { + if (code2 === 88 || code2 === 120) { + effects.enter("characterReferenceMarkerHexadecimal"); + effects.consume(code2); + effects.exit("characterReferenceMarkerHexadecimal"); + effects.enter("characterReferenceValue"); + max = 6; + test = asciiHexDigit; + return value; + } + effects.enter("characterReferenceValue"); + max = 7; + test = asciiDigit; + return value(code2); + } + function value(code2) { + if (code2 === 59 && size2) { + const token = effects.exit("characterReferenceValue"); + if (test === asciiAlphanumeric && !decodeNamedCharacterReference(self2.sliceSerialize(token))) { + return nok(code2); + } + effects.enter("characterReferenceMarker"); + effects.consume(code2); + effects.exit("characterReferenceMarker"); + effects.exit("characterReference"); + return ok; + } + if (test(code2) && size2++ < max) { + effects.consume(code2); + return value; + } + return nok(code2); + } +} +const nonLazyContinuation = { + tokenize: tokenizeNonLazyContinuation, + partial: true +}; +const codeFenced = { + name: "codeFenced", + tokenize: tokenizeCodeFenced, + concrete: true +}; +function tokenizeCodeFenced(effects, ok, nok) { + const self2 = this; + const closeStart = { + tokenize: tokenizeCloseStart, + partial: true + }; + let initialPrefix = 0; + let sizeOpen = 0; + let marker; + return start; + function start(code2) { + return beforeSequenceOpen(code2); + } + function beforeSequenceOpen(code2) { + const tail = self2.events[self2.events.length - 1]; + initialPrefix = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0; + marker = code2; + effects.enter("codeFenced"); + effects.enter("codeFencedFence"); + effects.enter("codeFencedFenceSequence"); + return sequenceOpen(code2); + } + function sequenceOpen(code2) { + if (code2 === marker) { + sizeOpen++; + effects.consume(code2); + return sequenceOpen; + } + if (sizeOpen < 3) { + return nok(code2); + } + effects.exit("codeFencedFenceSequence"); + return markdownSpace(code2) ? factorySpace(effects, infoBefore, "whitespace")(code2) : infoBefore(code2); + } + function infoBefore(code2) { + if (code2 === null || markdownLineEnding(code2)) { + effects.exit("codeFencedFence"); + return self2.interrupt ? ok(code2) : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code2); + } + effects.enter("codeFencedFenceInfo"); + effects.enter("chunkString", { + contentType: "string" + }); + return info(code2); + } + function info(code2) { + if (code2 === null || markdownLineEnding(code2)) { + effects.exit("chunkString"); + effects.exit("codeFencedFenceInfo"); + return infoBefore(code2); + } + if (markdownSpace(code2)) { + effects.exit("chunkString"); + effects.exit("codeFencedFenceInfo"); + return factorySpace(effects, metaBefore, "whitespace")(code2); + } + if (code2 === 96 && code2 === marker) { + return nok(code2); + } + effects.consume(code2); + return info; + } + function metaBefore(code2) { + if (code2 === null || markdownLineEnding(code2)) { + return infoBefore(code2); + } + effects.enter("codeFencedFenceMeta"); + effects.enter("chunkString", { + contentType: "string" + }); + return meta(code2); + } + function meta(code2) { + if (code2 === null || markdownLineEnding(code2)) { + effects.exit("chunkString"); + effects.exit("codeFencedFenceMeta"); + return infoBefore(code2); + } + if (code2 === 96 && code2 === marker) { + return nok(code2); + } + effects.consume(code2); + return meta; + } + function atNonLazyBreak(code2) { + return effects.attempt(closeStart, after, contentBefore)(code2); + } + function contentBefore(code2) { + effects.enter("lineEnding"); + effects.consume(code2); + effects.exit("lineEnding"); + return contentStart; + } + function contentStart(code2) { + return initialPrefix > 0 && markdownSpace(code2) ? factorySpace( + effects, + beforeContentChunk, + "linePrefix", + initialPrefix + 1 + )(code2) : beforeContentChunk(code2); + } + function beforeContentChunk(code2) { + if (code2 === null || markdownLineEnding(code2)) { + return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code2); + } + effects.enter("codeFlowValue"); + return contentChunk(code2); + } + function contentChunk(code2) { + if (code2 === null || markdownLineEnding(code2)) { + effects.exit("codeFlowValue"); + return beforeContentChunk(code2); + } + effects.consume(code2); + return contentChunk; + } + function after(code2) { + effects.exit("codeFenced"); + return ok(code2); + } + function tokenizeCloseStart(effects2, ok2, nok2) { + let size2 = 0; + return startBefore; + function startBefore(code2) { + effects2.enter("lineEnding"); + effects2.consume(code2); + effects2.exit("lineEnding"); + return start2; + } + function start2(code2) { + effects2.enter("codeFencedFence"); + return markdownSpace(code2) ? factorySpace( + effects2, + beforeSequenceClose, + "linePrefix", + self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + )(code2) : beforeSequenceClose(code2); + } + function beforeSequenceClose(code2) { + if (code2 === marker) { + effects2.enter("codeFencedFenceSequence"); + return sequenceClose(code2); + } + return nok2(code2); + } + function sequenceClose(code2) { + if (code2 === marker) { + size2++; + effects2.consume(code2); + return sequenceClose; + } + if (size2 >= sizeOpen) { + effects2.exit("codeFencedFenceSequence"); + return markdownSpace(code2) ? factorySpace(effects2, sequenceCloseAfter, "whitespace")(code2) : sequenceCloseAfter(code2); + } + return nok2(code2); + } + function sequenceCloseAfter(code2) { + if (code2 === null || markdownLineEnding(code2)) { + effects2.exit("codeFencedFence"); + return ok2(code2); + } + return nok2(code2); + } + } +} +function tokenizeNonLazyContinuation(effects, ok, nok) { + const self2 = this; + return start; + function start(code2) { + if (code2 === null) { + return nok(code2); + } + effects.enter("lineEnding"); + effects.consume(code2); + effects.exit("lineEnding"); + return lineStart; + } + function lineStart(code2) { + return self2.parser.lazy[self2.now().line] ? nok(code2) : ok(code2); + } +} +const codeIndented = { + name: "codeIndented", + tokenize: tokenizeCodeIndented +}; +const furtherStart = { + tokenize: tokenizeFurtherStart, + partial: true +}; +function tokenizeCodeIndented(effects, ok, nok) { + const self2 = this; + return start; + function start(code2) { + effects.enter("codeIndented"); + return factorySpace(effects, afterPrefix, "linePrefix", 4 + 1)(code2); + } + function afterPrefix(code2) { + const tail = self2.events[self2.events.length - 1]; + return tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? atBreak(code2) : nok(code2); + } + function atBreak(code2) { + if (code2 === null) { + return after(code2); + } + if (markdownLineEnding(code2)) { + return effects.attempt(furtherStart, atBreak, after)(code2); + } + effects.enter("codeFlowValue"); + return inside(code2); + } + function inside(code2) { + if (code2 === null || markdownLineEnding(code2)) { + effects.exit("codeFlowValue"); + return atBreak(code2); + } + effects.consume(code2); + return inside; + } + function after(code2) { + effects.exit("codeIndented"); + return ok(code2); + } +} +function tokenizeFurtherStart(effects, ok, nok) { + const self2 = this; + return furtherStart2; + function furtherStart2(code2) { + if (self2.parser.lazy[self2.now().line]) { + return nok(code2); + } + if (markdownLineEnding(code2)) { + effects.enter("lineEnding"); + effects.consume(code2); + effects.exit("lineEnding"); + return furtherStart2; + } + return factorySpace(effects, afterPrefix, "linePrefix", 4 + 1)(code2); + } + function afterPrefix(code2) { + const tail = self2.events[self2.events.length - 1]; + return tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? ok(code2) : markdownLineEnding(code2) ? furtherStart2(code2) : nok(code2); + } +} +const codeText = { + name: "codeText", + tokenize: tokenizeCodeText, + resolve: resolveCodeText, + previous +}; +function resolveCodeText(events) { + let tailExitIndex = events.length - 4; + let headEnterIndex = 3; + let index; + let enter; + if ((events[headEnterIndex][1].type === "lineEnding" || events[headEnterIndex][1].type === "space") && (events[tailExitIndex][1].type === "lineEnding" || events[tailExitIndex][1].type === "space")) { + index = headEnterIndex; + while (++index < tailExitIndex) { + if (events[index][1].type === "codeTextData") { + events[headEnterIndex][1].type = "codeTextPadding"; + events[tailExitIndex][1].type = "codeTextPadding"; + headEnterIndex += 2; + tailExitIndex -= 2; + break; + } + } + } + index = headEnterIndex - 1; + tailExitIndex++; + while (++index <= tailExitIndex) { + if (enter === void 0) { + if (index !== tailExitIndex && events[index][1].type !== "lineEnding") { + enter = index; + } + } else if (index === tailExitIndex || events[index][1].type === "lineEnding") { + events[enter][1].type = "codeTextData"; + if (index !== enter + 2) { + events[enter][1].end = events[index - 1][1].end; + events.splice(enter + 2, index - enter - 2); + tailExitIndex -= index - enter - 2; + index = enter + 2; + } + enter = void 0; + } + } + return events; +} +function previous(code2) { + return code2 !== 96 || this.events[this.events.length - 1][1].type === "characterEscape"; +} +function tokenizeCodeText(effects, ok, nok) { + let sizeOpen = 0; + let size2; + let token; + return start; + function start(code2) { + effects.enter("codeText"); + effects.enter("codeTextSequence"); + return sequenceOpen(code2); + } + function sequenceOpen(code2) { + if (code2 === 96) { + effects.consume(code2); + sizeOpen++; + return sequenceOpen; + } + effects.exit("codeTextSequence"); + return between(code2); + } + function between(code2) { + if (code2 === null) { + return nok(code2); + } + if (code2 === 32) { + effects.enter("space"); + effects.consume(code2); + effects.exit("space"); + return between; + } + if (code2 === 96) { + token = effects.enter("codeTextSequence"); + size2 = 0; + return sequenceClose(code2); + } + if (markdownLineEnding(code2)) { + effects.enter("lineEnding"); + effects.consume(code2); + effects.exit("lineEnding"); + return between; + } + effects.enter("codeTextData"); + return data(code2); + } + function data(code2) { + if (code2 === null || code2 === 32 || code2 === 96 || markdownLineEnding(code2)) { + effects.exit("codeTextData"); + return between(code2); + } + effects.consume(code2); + return data; + } + function sequenceClose(code2) { + if (code2 === 96) { + effects.consume(code2); + size2++; + return sequenceClose; + } + if (size2 === sizeOpen) { + effects.exit("codeTextSequence"); + effects.exit("codeText"); + return ok(code2); + } + token.type = "codeTextData"; + return data(code2); + } +} +function subtokenize(events) { + const jumps = {}; + let index = -1; + let event; + let lineIndex; + let otherIndex; + let otherEvent; + let parameters; + let subevents; + let more; + while (++index < events.length) { + while (index in jumps) { + index = jumps[index]; + } + event = events[index]; + if (index && event[1].type === "chunkFlow" && events[index - 1][1].type === "listItemPrefix") { + subevents = event[1]._tokenizer.events; + otherIndex = 0; + if (otherIndex < subevents.length && subevents[otherIndex][1].type === "lineEndingBlank") { + otherIndex += 2; + } + if (otherIndex < subevents.length && subevents[otherIndex][1].type === "content") { + while (++otherIndex < subevents.length) { + if (subevents[otherIndex][1].type === "content") { + break; + } + if (subevents[otherIndex][1].type === "chunkText") { + subevents[otherIndex][1]._isInFirstContentOfListItem = true; + otherIndex++; + } + } + } + } + if (event[0] === "enter") { + if (event[1].contentType) { + Object.assign(jumps, subcontent(events, index)); + index = jumps[index]; + more = true; + } + } else if (event[1]._container) { + otherIndex = index; + lineIndex = void 0; + while (otherIndex--) { + otherEvent = events[otherIndex]; + if (otherEvent[1].type === "lineEnding" || otherEvent[1].type === "lineEndingBlank") { + if (otherEvent[0] === "enter") { + if (lineIndex) { + events[lineIndex][1].type = "lineEndingBlank"; + } + otherEvent[1].type = "lineEnding"; + lineIndex = otherIndex; + } + } else { + break; + } + } + if (lineIndex) { + event[1].end = Object.assign({}, events[lineIndex][1].start); + parameters = events.slice(lineIndex, index); + parameters.unshift(event); + splice(events, lineIndex, index - lineIndex + 1, parameters); + } + } + } + return !more; +} +function subcontent(events, eventIndex) { + const token = events[eventIndex][1]; + const context = events[eventIndex][2]; + let startPosition = eventIndex - 1; + const startPositions = []; + const tokenizer = token._tokenizer || context.parser[token.contentType](token.start); + const childEvents = tokenizer.events; + const jumps = []; + const gaps = {}; + let stream; + let previous2; + let index = -1; + let current = token; + let adjust = 0; + let start = 0; + const breaks = [start]; + while (current) { + while (events[++startPosition][1] !== current) { + } + startPositions.push(startPosition); + if (!current._tokenizer) { + stream = context.sliceStream(current); + if (!current.next) { + stream.push(null); + } + if (previous2) { + tokenizer.defineSkip(current.start); + } + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = true; + } + tokenizer.write(stream); + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = void 0; + } + } + previous2 = current; + current = current.next; + } + current = token; + while (++index < childEvents.length) { + if (childEvents[index][0] === "exit" && childEvents[index - 1][0] === "enter" && childEvents[index][1].type === childEvents[index - 1][1].type && childEvents[index][1].start.line !== childEvents[index][1].end.line) { + start = index + 1; + breaks.push(start); + current._tokenizer = void 0; + current.previous = void 0; + current = current.next; + } + } + tokenizer.events = []; + if (current) { + current._tokenizer = void 0; + current.previous = void 0; + } else { + breaks.pop(); + } + index = breaks.length; + while (index--) { + const slice = childEvents.slice(breaks[index], breaks[index + 1]); + const start2 = startPositions.pop(); + jumps.unshift([start2, start2 + slice.length - 1]); + splice(events, start2, 2, slice); + } + index = -1; + while (++index < jumps.length) { + gaps[adjust + jumps[index][0]] = adjust + jumps[index][1]; + adjust += jumps[index][1] - jumps[index][0] - 1; + } + return gaps; +} +const content = { + tokenize: tokenizeContent, + resolve: resolveContent +}; +const continuationConstruct = { + tokenize: tokenizeContinuation, + partial: true +}; +function resolveContent(events) { + subtokenize(events); + return events; +} +function tokenizeContent(effects, ok) { + let previous2; + return chunkStart; + function chunkStart(code2) { + effects.enter("content"); + previous2 = effects.enter("chunkContent", { + contentType: "content" + }); + return chunkInside(code2); + } + function chunkInside(code2) { + if (code2 === null) { + return contentEnd(code2); + } + if (markdownLineEnding(code2)) { + return effects.check( + continuationConstruct, + contentContinue, + contentEnd + )(code2); + } + effects.consume(code2); + return chunkInside; + } + function contentEnd(code2) { + effects.exit("chunkContent"); + effects.exit("content"); + return ok(code2); + } + function contentContinue(code2) { + effects.consume(code2); + effects.exit("chunkContent"); + previous2.next = effects.enter("chunkContent", { + contentType: "content", + previous: previous2 + }); + previous2 = previous2.next; + return chunkInside; + } +} +function tokenizeContinuation(effects, ok, nok) { + const self2 = this; + return startLookahead; + function startLookahead(code2) { + effects.exit("chunkContent"); + effects.enter("lineEnding"); + effects.consume(code2); + effects.exit("lineEnding"); + return factorySpace(effects, prefixed, "linePrefix"); + } + function prefixed(code2) { + if (code2 === null || markdownLineEnding(code2)) { + return nok(code2); + } + const tail = self2.events[self2.events.length - 1]; + if (!self2.parser.constructs.disable.null.includes("codeIndented") && tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4) { + return ok(code2); + } + return effects.interrupt(self2.parser.constructs.flow, nok, ok)(code2); + } +} +function factoryDestination(effects, ok, nok, type, literalType, literalMarkerType, rawType, stringType, max) { + const limit = max || Number.POSITIVE_INFINITY; + let balance = 0; + return start; + function start(code2) { + if (code2 === 60) { + effects.enter(type); + effects.enter(literalType); + effects.enter(literalMarkerType); + effects.consume(code2); + effects.exit(literalMarkerType); + return enclosedBefore; + } + if (code2 === null || code2 === 32 || code2 === 41 || asciiControl(code2)) { + return nok(code2); + } + effects.enter(type); + effects.enter(rawType); + effects.enter(stringType); + effects.enter("chunkString", { + contentType: "string" + }); + return raw(code2); + } + function enclosedBefore(code2) { + if (code2 === 62) { + effects.enter(literalMarkerType); + effects.consume(code2); + effects.exit(literalMarkerType); + effects.exit(literalType); + effects.exit(type); + return ok; + } + effects.enter(stringType); + effects.enter("chunkString", { + contentType: "string" + }); + return enclosed(code2); + } + function enclosed(code2) { + if (code2 === 62) { + effects.exit("chunkString"); + effects.exit(stringType); + return enclosedBefore(code2); + } + if (code2 === null || code2 === 60 || markdownLineEnding(code2)) { + return nok(code2); + } + effects.consume(code2); + return code2 === 92 ? enclosedEscape : enclosed; + } + function enclosedEscape(code2) { + if (code2 === 60 || code2 === 62 || code2 === 92) { + effects.consume(code2); + return enclosed; + } + return enclosed(code2); + } + function raw(code2) { + if (!balance && (code2 === null || code2 === 41 || markdownLineEndingOrSpace(code2))) { + effects.exit("chunkString"); + effects.exit(stringType); + effects.exit(rawType); + effects.exit(type); + return ok(code2); + } + if (balance < limit && code2 === 40) { + effects.consume(code2); + balance++; + return raw; + } + if (code2 === 41) { + effects.consume(code2); + balance--; + return raw; + } + if (code2 === null || code2 === 32 || code2 === 40 || asciiControl(code2)) { + return nok(code2); + } + effects.consume(code2); + return code2 === 92 ? rawEscape : raw; + } + function rawEscape(code2) { + if (code2 === 40 || code2 === 41 || code2 === 92) { + effects.consume(code2); + return raw; + } + return raw(code2); + } +} +function factoryLabel(effects, ok, nok, type, markerType, stringType) { + const self2 = this; + let size2 = 0; + let seen; + return start; + function start(code2) { + effects.enter(type); + effects.enter(markerType); + effects.consume(code2); + effects.exit(markerType); + effects.enter(stringType); + return atBreak; + } + function atBreak(code2) { + if (size2 > 999 || code2 === null || code2 === 91 || code2 === 93 && !seen || code2 === 94 && !size2 && "_hiddenFootnoteSupport" in self2.parser.constructs) { + return nok(code2); + } + if (code2 === 93) { + effects.exit(stringType); + effects.enter(markerType); + effects.consume(code2); + effects.exit(markerType); + effects.exit(type); + return ok; + } + if (markdownLineEnding(code2)) { + effects.enter("lineEnding"); + effects.consume(code2); + effects.exit("lineEnding"); + return atBreak; + } + effects.enter("chunkString", { + contentType: "string" + }); + return labelInside(code2); + } + function labelInside(code2) { + if (code2 === null || code2 === 91 || code2 === 93 || markdownLineEnding(code2) || size2++ > 999) { + effects.exit("chunkString"); + return atBreak(code2); + } + effects.consume(code2); + if (!seen) + seen = !markdownSpace(code2); + return code2 === 92 ? labelEscape : labelInside; + } + function labelEscape(code2) { + if (code2 === 91 || code2 === 92 || code2 === 93) { + effects.consume(code2); + size2++; + return labelInside; + } + return labelInside(code2); + } +} +function factoryTitle(effects, ok, nok, type, markerType, stringType) { + let marker; + return start; + function start(code2) { + if (code2 === 34 || code2 === 39 || code2 === 40) { + effects.enter(type); + effects.enter(markerType); + effects.consume(code2); + effects.exit(markerType); + marker = code2 === 40 ? 41 : code2; + return begin; + } + return nok(code2); + } + function begin(code2) { + if (code2 === marker) { + effects.enter(markerType); + effects.consume(code2); + effects.exit(markerType); + effects.exit(type); + return ok; + } + effects.enter(stringType); + return atBreak(code2); + } + function atBreak(code2) { + if (code2 === marker) { + effects.exit(stringType); + return begin(marker); + } + if (code2 === null) { + return nok(code2); + } + if (markdownLineEnding(code2)) { + effects.enter("lineEnding"); + effects.consume(code2); + effects.exit("lineEnding"); + return factorySpace(effects, atBreak, "linePrefix"); + } + effects.enter("chunkString", { + contentType: "string" + }); + return inside(code2); + } + function inside(code2) { + if (code2 === marker || code2 === null || markdownLineEnding(code2)) { + effects.exit("chunkString"); + return atBreak(code2); + } + effects.consume(code2); + return code2 === 92 ? escape : inside; + } + function escape(code2) { + if (code2 === marker || code2 === 92) { + effects.consume(code2); + return inside; + } + return inside(code2); + } +} +function factoryWhitespace(effects, ok) { + let seen; + return start; + function start(code2) { + if (markdownLineEnding(code2)) { + effects.enter("lineEnding"); + effects.consume(code2); + effects.exit("lineEnding"); + seen = true; + return start; + } + if (markdownSpace(code2)) { + return factorySpace( + effects, + start, + seen ? "linePrefix" : "lineSuffix" + )(code2); + } + return ok(code2); + } +} +const definition = { + name: "definition", + tokenize: tokenizeDefinition +}; +const titleBefore = { + tokenize: tokenizeTitleBefore, + partial: true +}; +function tokenizeDefinition(effects, ok, nok) { + const self2 = this; + let identifier; + return start; + function start(code2) { + effects.enter("definition"); + return before(code2); + } + function before(code2) { + return factoryLabel.call( + self2, + effects, + labelAfter, + nok, + "definitionLabel", + "definitionLabelMarker", + "definitionLabelString" + )(code2); + } + function labelAfter(code2) { + identifier = normalizeIdentifier( + self2.sliceSerialize(self2.events[self2.events.length - 1][1]).slice(1, -1) + ); + if (code2 === 58) { + effects.enter("definitionMarker"); + effects.consume(code2); + effects.exit("definitionMarker"); + return markerAfter; + } + return nok(code2); + } + function markerAfter(code2) { + return markdownLineEndingOrSpace(code2) ? factoryWhitespace(effects, destinationBefore)(code2) : destinationBefore(code2); + } + function destinationBefore(code2) { + return factoryDestination( + effects, + destinationAfter, + nok, + "definitionDestination", + "definitionDestinationLiteral", + "definitionDestinationLiteralMarker", + "definitionDestinationRaw", + "definitionDestinationString" + )(code2); + } + function destinationAfter(code2) { + return effects.attempt(titleBefore, after, after)(code2); + } + function after(code2) { + return markdownSpace(code2) ? factorySpace(effects, afterWhitespace, "whitespace")(code2) : afterWhitespace(code2); + } + function afterWhitespace(code2) { + if (code2 === null || markdownLineEnding(code2)) { + effects.exit("definition"); + self2.parser.defined.push(identifier); + return ok(code2); + } + return nok(code2); + } +} +function tokenizeTitleBefore(effects, ok, nok) { + return titleBefore2; + function titleBefore2(code2) { + return markdownLineEndingOrSpace(code2) ? factoryWhitespace(effects, beforeMarker)(code2) : nok(code2); + } + function beforeMarker(code2) { + return factoryTitle( + effects, + titleAfter, + nok, + "definitionTitle", + "definitionTitleMarker", + "definitionTitleString" + )(code2); + } + function titleAfter(code2) { + return markdownSpace(code2) ? factorySpace(effects, titleAfterOptionalWhitespace, "whitespace")(code2) : titleAfterOptionalWhitespace(code2); + } + function titleAfterOptionalWhitespace(code2) { + return code2 === null || markdownLineEnding(code2) ? ok(code2) : nok(code2); + } +} +const hardBreakEscape = { + name: "hardBreakEscape", + tokenize: tokenizeHardBreakEscape +}; +function tokenizeHardBreakEscape(effects, ok, nok) { + return start; + function start(code2) { + effects.enter("hardBreakEscape"); + effects.consume(code2); + return after; + } + function after(code2) { + if (markdownLineEnding(code2)) { + effects.exit("hardBreakEscape"); + return ok(code2); + } + return nok(code2); + } +} +const headingAtx = { + name: "headingAtx", + tokenize: tokenizeHeadingAtx, + resolve: resolveHeadingAtx +}; +function resolveHeadingAtx(events, context) { + let contentEnd = events.length - 2; + let contentStart = 3; + let content2; + let text2; + if (events[contentStart][1].type === "whitespace") { + contentStart += 2; + } + if (contentEnd - 2 > contentStart && events[contentEnd][1].type === "whitespace") { + contentEnd -= 2; + } + if (events[contentEnd][1].type === "atxHeadingSequence" && (contentStart === contentEnd - 1 || contentEnd - 4 > contentStart && events[contentEnd - 2][1].type === "whitespace")) { + contentEnd -= contentStart + 1 === contentEnd ? 2 : 4; + } + if (contentEnd > contentStart) { + content2 = { + type: "atxHeadingText", + start: events[contentStart][1].start, + end: events[contentEnd][1].end + }; + text2 = { + type: "chunkText", + start: events[contentStart][1].start, + end: events[contentEnd][1].end, + contentType: "text" + }; + splice(events, contentStart, contentEnd - contentStart + 1, [ + ["enter", content2, context], + ["enter", text2, context], + ["exit", text2, context], + ["exit", content2, context] + ]); + } + return events; +} +function tokenizeHeadingAtx(effects, ok, nok) { + let size2 = 0; + return start; + function start(code2) { + effects.enter("atxHeading"); + return before(code2); + } + function before(code2) { + effects.enter("atxHeadingSequence"); + return sequenceOpen(code2); + } + function sequenceOpen(code2) { + if (code2 === 35 && size2++ < 6) { + effects.consume(code2); + return sequenceOpen; + } + if (code2 === null || markdownLineEndingOrSpace(code2)) { + effects.exit("atxHeadingSequence"); + return atBreak(code2); + } + return nok(code2); + } + function atBreak(code2) { + if (code2 === 35) { + effects.enter("atxHeadingSequence"); + return sequenceFurther(code2); + } + if (code2 === null || markdownLineEnding(code2)) { + effects.exit("atxHeading"); + return ok(code2); + } + if (markdownSpace(code2)) { + return factorySpace(effects, atBreak, "whitespace")(code2); + } + effects.enter("atxHeadingText"); + return data(code2); + } + function sequenceFurther(code2) { + if (code2 === 35) { + effects.consume(code2); + return sequenceFurther; + } + effects.exit("atxHeadingSequence"); + return atBreak(code2); + } + function data(code2) { + if (code2 === null || code2 === 35 || markdownLineEndingOrSpace(code2)) { + effects.exit("atxHeadingText"); + return atBreak(code2); + } + effects.consume(code2); + return data; + } +} +const htmlBlockNames = [ + "address", + "article", + "aside", + "base", + "basefont", + "blockquote", + "body", + "caption", + "center", + "col", + "colgroup", + "dd", + "details", + "dialog", + "dir", + "div", + "dl", + "dt", + "fieldset", + "figcaption", + "figure", + "footer", + "form", + "frame", + "frameset", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "hr", + "html", + "iframe", + "legend", + "li", + "link", + "main", + "menu", + "menuitem", + "nav", + "noframes", + "ol", + "optgroup", + "option", + "p", + "param", + "search", + "section", + "summary", + "table", + "tbody", + "td", + "tfoot", + "th", + "thead", + "title", + "tr", + "track", + "ul" +]; +const htmlRawNames = ["pre", "script", "style", "textarea"]; +const htmlFlow = { + name: "htmlFlow", + tokenize: tokenizeHtmlFlow, + resolveTo: resolveToHtmlFlow, + concrete: true +}; +const blankLineBefore = { + tokenize: tokenizeBlankLineBefore, + partial: true +}; +const nonLazyContinuationStart = { + tokenize: tokenizeNonLazyContinuationStart, + partial: true +}; +function resolveToHtmlFlow(events) { + let index = events.length; + while (index--) { + if (events[index][0] === "enter" && events[index][1].type === "htmlFlow") { + break; + } + } + if (index > 1 && events[index - 2][1].type === "linePrefix") { + events[index][1].start = events[index - 2][1].start; + events[index + 1][1].start = events[index - 2][1].start; + events.splice(index - 2, 2); + } + return events; +} +function tokenizeHtmlFlow(effects, ok, nok) { + const self2 = this; + let marker; + let closingTag; + let buffer; + let index; + let markerB; + return start; + function start(code2) { + return before(code2); + } + function before(code2) { + effects.enter("htmlFlow"); + effects.enter("htmlFlowData"); + effects.consume(code2); + return open; + } + function open(code2) { + if (code2 === 33) { + effects.consume(code2); + return declarationOpen; + } + if (code2 === 47) { + effects.consume(code2); + closingTag = true; + return tagCloseStart; + } + if (code2 === 63) { + effects.consume(code2); + marker = 3; + return self2.interrupt ? ok : continuationDeclarationInside; + } + if (asciiAlpha(code2)) { + effects.consume(code2); + buffer = String.fromCharCode(code2); + return tagName; + } + return nok(code2); + } + function declarationOpen(code2) { + if (code2 === 45) { + effects.consume(code2); + marker = 2; + return commentOpenInside; + } + if (code2 === 91) { + effects.consume(code2); + marker = 5; + index = 0; + return cdataOpenInside; + } + if (asciiAlpha(code2)) { + effects.consume(code2); + marker = 4; + return self2.interrupt ? ok : continuationDeclarationInside; + } + return nok(code2); + } + function commentOpenInside(code2) { + if (code2 === 45) { + effects.consume(code2); + return self2.interrupt ? ok : continuationDeclarationInside; + } + return nok(code2); + } + function cdataOpenInside(code2) { + const value = "CDATA["; + if (code2 === value.charCodeAt(index++)) { + effects.consume(code2); + if (index === value.length) { + return self2.interrupt ? ok : continuation; + } + return cdataOpenInside; + } + return nok(code2); + } + function tagCloseStart(code2) { + if (asciiAlpha(code2)) { + effects.consume(code2); + buffer = String.fromCharCode(code2); + return tagName; + } + return nok(code2); + } + function tagName(code2) { + if (code2 === null || code2 === 47 || code2 === 62 || markdownLineEndingOrSpace(code2)) { + const slash = code2 === 47; + const name = buffer.toLowerCase(); + if (!slash && !closingTag && htmlRawNames.includes(name)) { + marker = 1; + return self2.interrupt ? ok(code2) : continuation(code2); + } + if (htmlBlockNames.includes(buffer.toLowerCase())) { + marker = 6; + if (slash) { + effects.consume(code2); + return basicSelfClosing; + } + return self2.interrupt ? ok(code2) : continuation(code2); + } + marker = 7; + return self2.interrupt && !self2.parser.lazy[self2.now().line] ? nok(code2) : closingTag ? completeClosingTagAfter(code2) : completeAttributeNameBefore(code2); + } + if (code2 === 45 || asciiAlphanumeric(code2)) { + effects.consume(code2); + buffer += String.fromCharCode(code2); + return tagName; + } + return nok(code2); + } + function basicSelfClosing(code2) { + if (code2 === 62) { + effects.consume(code2); + return self2.interrupt ? ok : continuation; + } + return nok(code2); + } + function completeClosingTagAfter(code2) { + if (markdownSpace(code2)) { + effects.consume(code2); + return completeClosingTagAfter; + } + return completeEnd(code2); + } + function completeAttributeNameBefore(code2) { + if (code2 === 47) { + effects.consume(code2); + return completeEnd; + } + if (code2 === 58 || code2 === 95 || asciiAlpha(code2)) { + effects.consume(code2); + return completeAttributeName; + } + if (markdownSpace(code2)) { + effects.consume(code2); + return completeAttributeNameBefore; + } + return completeEnd(code2); + } + function completeAttributeName(code2) { + if (code2 === 45 || code2 === 46 || code2 === 58 || code2 === 95 || asciiAlphanumeric(code2)) { + effects.consume(code2); + return completeAttributeName; + } + return completeAttributeNameAfter(code2); + } + function completeAttributeNameAfter(code2) { + if (code2 === 61) { + effects.consume(code2); + return completeAttributeValueBefore; + } + if (markdownSpace(code2)) { + effects.consume(code2); + return completeAttributeNameAfter; + } + return completeAttributeNameBefore(code2); + } + function completeAttributeValueBefore(code2) { + if (code2 === null || code2 === 60 || code2 === 61 || code2 === 62 || code2 === 96) { + return nok(code2); + } + if (code2 === 34 || code2 === 39) { + effects.consume(code2); + markerB = code2; + return completeAttributeValueQuoted; + } + if (markdownSpace(code2)) { + effects.consume(code2); + return completeAttributeValueBefore; + } + return completeAttributeValueUnquoted(code2); + } + function completeAttributeValueQuoted(code2) { + if (code2 === markerB) { + effects.consume(code2); + markerB = null; + return completeAttributeValueQuotedAfter; + } + if (code2 === null || markdownLineEnding(code2)) { + return nok(code2); + } + effects.consume(code2); + return completeAttributeValueQuoted; + } + function completeAttributeValueUnquoted(code2) { + if (code2 === null || code2 === 34 || code2 === 39 || code2 === 47 || code2 === 60 || code2 === 61 || code2 === 62 || code2 === 96 || markdownLineEndingOrSpace(code2)) { + return completeAttributeNameAfter(code2); + } + effects.consume(code2); + return completeAttributeValueUnquoted; + } + function completeAttributeValueQuotedAfter(code2) { + if (code2 === 47 || code2 === 62 || markdownSpace(code2)) { + return completeAttributeNameBefore(code2); + } + return nok(code2); + } + function completeEnd(code2) { + if (code2 === 62) { + effects.consume(code2); + return completeAfter; + } + return nok(code2); + } + function completeAfter(code2) { + if (code2 === null || markdownLineEnding(code2)) { + return continuation(code2); + } + if (markdownSpace(code2)) { + effects.consume(code2); + return completeAfter; + } + return nok(code2); + } + function continuation(code2) { + if (code2 === 45 && marker === 2) { + effects.consume(code2); + return continuationCommentInside; + } + if (code2 === 60 && marker === 1) { + effects.consume(code2); + return continuationRawTagOpen; + } + if (code2 === 62 && marker === 4) { + effects.consume(code2); + return continuationClose; + } + if (code2 === 63 && marker === 3) { + effects.consume(code2); + return continuationDeclarationInside; + } + if (code2 === 93 && marker === 5) { + effects.consume(code2); + return continuationCdataInside; + } + if (markdownLineEnding(code2) && (marker === 6 || marker === 7)) { + effects.exit("htmlFlowData"); + return effects.check( + blankLineBefore, + continuationAfter, + continuationStart + )(code2); + } + if (code2 === null || markdownLineEnding(code2)) { + effects.exit("htmlFlowData"); + return continuationStart(code2); + } + effects.consume(code2); + return continuation; + } + function continuationStart(code2) { + return effects.check( + nonLazyContinuationStart, + continuationStartNonLazy, + continuationAfter + )(code2); + } + function continuationStartNonLazy(code2) { + effects.enter("lineEnding"); + effects.consume(code2); + effects.exit("lineEnding"); + return continuationBefore; + } + function continuationBefore(code2) { + if (code2 === null || markdownLineEnding(code2)) { + return continuationStart(code2); + } + effects.enter("htmlFlowData"); + return continuation(code2); + } + function continuationCommentInside(code2) { + if (code2 === 45) { + effects.consume(code2); + return continuationDeclarationInside; + } + return continuation(code2); + } + function continuationRawTagOpen(code2) { + if (code2 === 47) { + effects.consume(code2); + buffer = ""; + return continuationRawEndTag; + } + return continuation(code2); + } + function continuationRawEndTag(code2) { + if (code2 === 62) { + const name = buffer.toLowerCase(); + if (htmlRawNames.includes(name)) { + effects.consume(code2); + return continuationClose; + } + return continuation(code2); + } + if (asciiAlpha(code2) && buffer.length < 8) { + effects.consume(code2); + buffer += String.fromCharCode(code2); + return continuationRawEndTag; + } + return continuation(code2); + } + function continuationCdataInside(code2) { + if (code2 === 93) { + effects.consume(code2); + return continuationDeclarationInside; + } + return continuation(code2); + } + function continuationDeclarationInside(code2) { + if (code2 === 62) { + effects.consume(code2); + return continuationClose; + } + if (code2 === 45 && marker === 2) { + effects.consume(code2); + return continuationDeclarationInside; + } + return continuation(code2); + } + function continuationClose(code2) { + if (code2 === null || markdownLineEnding(code2)) { + effects.exit("htmlFlowData"); + return continuationAfter(code2); + } + effects.consume(code2); + return continuationClose; + } + function continuationAfter(code2) { + effects.exit("htmlFlow"); + return ok(code2); + } +} +function tokenizeNonLazyContinuationStart(effects, ok, nok) { + const self2 = this; + return start; + function start(code2) { + if (markdownLineEnding(code2)) { + effects.enter("lineEnding"); + effects.consume(code2); + effects.exit("lineEnding"); + return after; + } + return nok(code2); + } + function after(code2) { + return self2.parser.lazy[self2.now().line] ? nok(code2) : ok(code2); + } +} +function tokenizeBlankLineBefore(effects, ok, nok) { + return start; + function start(code2) { + effects.enter("lineEnding"); + effects.consume(code2); + effects.exit("lineEnding"); + return effects.attempt(blankLine, ok, nok); + } +} +const htmlText = { + name: "htmlText", + tokenize: tokenizeHtmlText +}; +function tokenizeHtmlText(effects, ok, nok) { + const self2 = this; + let marker; + let index; + let returnState; + return start; + function start(code2) { + effects.enter("htmlText"); + effects.enter("htmlTextData"); + effects.consume(code2); + return open; + } + function open(code2) { + if (code2 === 33) { + effects.consume(code2); + return declarationOpen; + } + if (code2 === 47) { + effects.consume(code2); + return tagCloseStart; + } + if (code2 === 63) { + effects.consume(code2); + return instruction; + } + if (asciiAlpha(code2)) { + effects.consume(code2); + return tagOpen; + } + return nok(code2); + } + function declarationOpen(code2) { + if (code2 === 45) { + effects.consume(code2); + return commentOpenInside; + } + if (code2 === 91) { + effects.consume(code2); + index = 0; + return cdataOpenInside; + } + if (asciiAlpha(code2)) { + effects.consume(code2); + return declaration; + } + return nok(code2); + } + function commentOpenInside(code2) { + if (code2 === 45) { + effects.consume(code2); + return commentEnd; + } + return nok(code2); + } + function comment(code2) { + if (code2 === null) { + return nok(code2); + } + if (code2 === 45) { + effects.consume(code2); + return commentClose; + } + if (markdownLineEnding(code2)) { + returnState = comment; + return lineEndingBefore(code2); + } + effects.consume(code2); + return comment; + } + function commentClose(code2) { + if (code2 === 45) { + effects.consume(code2); + return commentEnd; + } + return comment(code2); + } + function commentEnd(code2) { + return code2 === 62 ? end(code2) : code2 === 45 ? commentClose(code2) : comment(code2); + } + function cdataOpenInside(code2) { + const value = "CDATA["; + if (code2 === value.charCodeAt(index++)) { + effects.consume(code2); + return index === value.length ? cdata : cdataOpenInside; + } + return nok(code2); + } + function cdata(code2) { + if (code2 === null) { + return nok(code2); + } + if (code2 === 93) { + effects.consume(code2); + return cdataClose; + } + if (markdownLineEnding(code2)) { + returnState = cdata; + return lineEndingBefore(code2); + } + effects.consume(code2); + return cdata; + } + function cdataClose(code2) { + if (code2 === 93) { + effects.consume(code2); + return cdataEnd; + } + return cdata(code2); + } + function cdataEnd(code2) { + if (code2 === 62) { + return end(code2); + } + if (code2 === 93) { + effects.consume(code2); + return cdataEnd; + } + return cdata(code2); + } + function declaration(code2) { + if (code2 === null || code2 === 62) { + return end(code2); + } + if (markdownLineEnding(code2)) { + returnState = declaration; + return lineEndingBefore(code2); + } + effects.consume(code2); + return declaration; + } + function instruction(code2) { + if (code2 === null) { + return nok(code2); + } + if (code2 === 63) { + effects.consume(code2); + return instructionClose; + } + if (markdownLineEnding(code2)) { + returnState = instruction; + return lineEndingBefore(code2); + } + effects.consume(code2); + return instruction; + } + function instructionClose(code2) { + return code2 === 62 ? end(code2) : instruction(code2); + } + function tagCloseStart(code2) { + if (asciiAlpha(code2)) { + effects.consume(code2); + return tagClose; + } + return nok(code2); + } + function tagClose(code2) { + if (code2 === 45 || asciiAlphanumeric(code2)) { + effects.consume(code2); + return tagClose; + } + return tagCloseBetween(code2); + } + function tagCloseBetween(code2) { + if (markdownLineEnding(code2)) { + returnState = tagCloseBetween; + return lineEndingBefore(code2); + } + if (markdownSpace(code2)) { + effects.consume(code2); + return tagCloseBetween; + } + return end(code2); + } + function tagOpen(code2) { + if (code2 === 45 || asciiAlphanumeric(code2)) { + effects.consume(code2); + return tagOpen; + } + if (code2 === 47 || code2 === 62 || markdownLineEndingOrSpace(code2)) { + return tagOpenBetween(code2); + } + return nok(code2); + } + function tagOpenBetween(code2) { + if (code2 === 47) { + effects.consume(code2); + return end; + } + if (code2 === 58 || code2 === 95 || asciiAlpha(code2)) { + effects.consume(code2); + return tagOpenAttributeName; + } + if (markdownLineEnding(code2)) { + returnState = tagOpenBetween; + return lineEndingBefore(code2); + } + if (markdownSpace(code2)) { + effects.consume(code2); + return tagOpenBetween; + } + return end(code2); + } + function tagOpenAttributeName(code2) { + if (code2 === 45 || code2 === 46 || code2 === 58 || code2 === 95 || asciiAlphanumeric(code2)) { + effects.consume(code2); + return tagOpenAttributeName; + } + return tagOpenAttributeNameAfter(code2); + } + function tagOpenAttributeNameAfter(code2) { + if (code2 === 61) { + effects.consume(code2); + return tagOpenAttributeValueBefore; + } + if (markdownLineEnding(code2)) { + returnState = tagOpenAttributeNameAfter; + return lineEndingBefore(code2); + } + if (markdownSpace(code2)) { + effects.consume(code2); + return tagOpenAttributeNameAfter; + } + return tagOpenBetween(code2); + } + function tagOpenAttributeValueBefore(code2) { + if (code2 === null || code2 === 60 || code2 === 61 || code2 === 62 || code2 === 96) { + return nok(code2); + } + if (code2 === 34 || code2 === 39) { + effects.consume(code2); + marker = code2; + return tagOpenAttributeValueQuoted; + } + if (markdownLineEnding(code2)) { + returnState = tagOpenAttributeValueBefore; + return lineEndingBefore(code2); + } + if (markdownSpace(code2)) { + effects.consume(code2); + return tagOpenAttributeValueBefore; + } + effects.consume(code2); + return tagOpenAttributeValueUnquoted; + } + function tagOpenAttributeValueQuoted(code2) { + if (code2 === marker) { + effects.consume(code2); + marker = void 0; + return tagOpenAttributeValueQuotedAfter; + } + if (code2 === null) { + return nok(code2); + } + if (markdownLineEnding(code2)) { + returnState = tagOpenAttributeValueQuoted; + return lineEndingBefore(code2); + } + effects.consume(code2); + return tagOpenAttributeValueQuoted; + } + function tagOpenAttributeValueUnquoted(code2) { + if (code2 === null || code2 === 34 || code2 === 39 || code2 === 60 || code2 === 61 || code2 === 96) { + return nok(code2); + } + if (code2 === 47 || code2 === 62 || markdownLineEndingOrSpace(code2)) { + return tagOpenBetween(code2); + } + effects.consume(code2); + return tagOpenAttributeValueUnquoted; + } + function tagOpenAttributeValueQuotedAfter(code2) { + if (code2 === 47 || code2 === 62 || markdownLineEndingOrSpace(code2)) { + return tagOpenBetween(code2); + } + return nok(code2); + } + function end(code2) { + if (code2 === 62) { + effects.consume(code2); + effects.exit("htmlTextData"); + effects.exit("htmlText"); + return ok; + } + return nok(code2); + } + function lineEndingBefore(code2) { + effects.exit("htmlTextData"); + effects.enter("lineEnding"); + effects.consume(code2); + effects.exit("lineEnding"); + return lineEndingAfter; + } + function lineEndingAfter(code2) { + return markdownSpace(code2) ? factorySpace( + effects, + lineEndingAfterPrefix, + "linePrefix", + self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + )(code2) : lineEndingAfterPrefix(code2); + } + function lineEndingAfterPrefix(code2) { + effects.enter("htmlTextData"); + return returnState(code2); + } +} +const labelEnd = { + name: "labelEnd", + tokenize: tokenizeLabelEnd, + resolveTo: resolveToLabelEnd, + resolveAll: resolveAllLabelEnd +}; +const resourceConstruct = { + tokenize: tokenizeResource +}; +const referenceFullConstruct = { + tokenize: tokenizeReferenceFull +}; +const referenceCollapsedConstruct = { + tokenize: tokenizeReferenceCollapsed +}; +function resolveAllLabelEnd(events) { + let index = -1; + while (++index < events.length) { + const token = events[index][1]; + if (token.type === "labelImage" || token.type === "labelLink" || token.type === "labelEnd") { + events.splice(index + 1, token.type === "labelImage" ? 4 : 2); + token.type = "data"; + index++; + } + } + return events; +} +function resolveToLabelEnd(events, context) { + let index = events.length; + let offset = 0; + let token; + let open; + let close; + let media; + while (index--) { + token = events[index][1]; + if (open) { + if (token.type === "link" || token.type === "labelLink" && token._inactive) { + break; + } + if (events[index][0] === "enter" && token.type === "labelLink") { + token._inactive = true; + } + } else if (close) { + if (events[index][0] === "enter" && (token.type === "labelImage" || token.type === "labelLink") && !token._balanced) { + open = index; + if (token.type !== "labelLink") { + offset = 2; + break; + } + } + } else if (token.type === "labelEnd") { + close = index; + } + } + const group = { + type: events[open][1].type === "labelLink" ? "link" : "image", + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + }; + const label = { + type: "label", + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[close][1].end) + }; + const text2 = { + type: "labelText", + start: Object.assign({}, events[open + offset + 2][1].end), + end: Object.assign({}, events[close - 2][1].start) + }; + media = [ + ["enter", group, context], + ["enter", label, context] + ]; + media = push(media, events.slice(open + 1, open + offset + 3)); + media = push(media, [["enter", text2, context]]); + media = push( + media, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + offset + 4, close - 3), + context + ) + ); + media = push(media, [ + ["exit", text2, context], + events[close - 2], + events[close - 1], + ["exit", label, context] + ]); + media = push(media, events.slice(close + 1)); + media = push(media, [["exit", group, context]]); + splice(events, open, events.length, media); + return events; +} +function tokenizeLabelEnd(effects, ok, nok) { + const self2 = this; + let index = self2.events.length; + let labelStart; + let defined; + while (index--) { + if ((self2.events[index][1].type === "labelImage" || self2.events[index][1].type === "labelLink") && !self2.events[index][1]._balanced) { + labelStart = self2.events[index][1]; + break; + } + } + return start; + function start(code2) { + if (!labelStart) { + return nok(code2); + } + if (labelStart._inactive) { + return labelEndNok(code2); + } + defined = self2.parser.defined.includes( + normalizeIdentifier( + self2.sliceSerialize({ + start: labelStart.end, + end: self2.now() + }) + ) + ); + effects.enter("labelEnd"); + effects.enter("labelMarker"); + effects.consume(code2); + effects.exit("labelMarker"); + effects.exit("labelEnd"); + return after; + } + function after(code2) { + if (code2 === 40) { + return effects.attempt( + resourceConstruct, + labelEndOk, + defined ? labelEndOk : labelEndNok + )(code2); + } + if (code2 === 91) { + return effects.attempt( + referenceFullConstruct, + labelEndOk, + defined ? referenceNotFull : labelEndNok + )(code2); + } + return defined ? labelEndOk(code2) : labelEndNok(code2); + } + function referenceNotFull(code2) { + return effects.attempt( + referenceCollapsedConstruct, + labelEndOk, + labelEndNok + )(code2); + } + function labelEndOk(code2) { + return ok(code2); + } + function labelEndNok(code2) { + labelStart._balanced = true; + return nok(code2); + } +} +function tokenizeResource(effects, ok, nok) { + return resourceStart; + function resourceStart(code2) { + effects.enter("resource"); + effects.enter("resourceMarker"); + effects.consume(code2); + effects.exit("resourceMarker"); + return resourceBefore; + } + function resourceBefore(code2) { + return markdownLineEndingOrSpace(code2) ? factoryWhitespace(effects, resourceOpen)(code2) : resourceOpen(code2); + } + function resourceOpen(code2) { + if (code2 === 41) { + return resourceEnd(code2); + } + return factoryDestination( + effects, + resourceDestinationAfter, + resourceDestinationMissing, + "resourceDestination", + "resourceDestinationLiteral", + "resourceDestinationLiteralMarker", + "resourceDestinationRaw", + "resourceDestinationString", + 32 + )(code2); + } + function resourceDestinationAfter(code2) { + return markdownLineEndingOrSpace(code2) ? factoryWhitespace(effects, resourceBetween)(code2) : resourceEnd(code2); + } + function resourceDestinationMissing(code2) { + return nok(code2); + } + function resourceBetween(code2) { + if (code2 === 34 || code2 === 39 || code2 === 40) { + return factoryTitle( + effects, + resourceTitleAfter, + nok, + "resourceTitle", + "resourceTitleMarker", + "resourceTitleString" + )(code2); + } + return resourceEnd(code2); + } + function resourceTitleAfter(code2) { + return markdownLineEndingOrSpace(code2) ? factoryWhitespace(effects, resourceEnd)(code2) : resourceEnd(code2); + } + function resourceEnd(code2) { + if (code2 === 41) { + effects.enter("resourceMarker"); + effects.consume(code2); + effects.exit("resourceMarker"); + effects.exit("resource"); + return ok; + } + return nok(code2); + } +} +function tokenizeReferenceFull(effects, ok, nok) { + const self2 = this; + return referenceFull; + function referenceFull(code2) { + return factoryLabel.call( + self2, + effects, + referenceFullAfter, + referenceFullMissing, + "reference", + "referenceMarker", + "referenceString" + )(code2); + } + function referenceFullAfter(code2) { + return self2.parser.defined.includes( + normalizeIdentifier( + self2.sliceSerialize(self2.events[self2.events.length - 1][1]).slice(1, -1) + ) + ) ? ok(code2) : nok(code2); + } + function referenceFullMissing(code2) { + return nok(code2); + } +} +function tokenizeReferenceCollapsed(effects, ok, nok) { + return referenceCollapsedStart; + function referenceCollapsedStart(code2) { + effects.enter("reference"); + effects.enter("referenceMarker"); + effects.consume(code2); + effects.exit("referenceMarker"); + return referenceCollapsedOpen; + } + function referenceCollapsedOpen(code2) { + if (code2 === 93) { + effects.enter("referenceMarker"); + effects.consume(code2); + effects.exit("referenceMarker"); + effects.exit("reference"); + return ok; + } + return nok(code2); + } +} +const labelStartImage = { + name: "labelStartImage", + tokenize: tokenizeLabelStartImage, + resolveAll: labelEnd.resolveAll +}; +function tokenizeLabelStartImage(effects, ok, nok) { + const self2 = this; + return start; + function start(code2) { + effects.enter("labelImage"); + effects.enter("labelImageMarker"); + effects.consume(code2); + effects.exit("labelImageMarker"); + return open; + } + function open(code2) { + if (code2 === 91) { + effects.enter("labelMarker"); + effects.consume(code2); + effects.exit("labelMarker"); + effects.exit("labelImage"); + return after; + } + return nok(code2); + } + function after(code2) { + return code2 === 94 && "_hiddenFootnoteSupport" in self2.parser.constructs ? nok(code2) : ok(code2); + } +} +const labelStartLink = { + name: "labelStartLink", + tokenize: tokenizeLabelStartLink, + resolveAll: labelEnd.resolveAll +}; +function tokenizeLabelStartLink(effects, ok, nok) { + const self2 = this; + return start; + function start(code2) { + effects.enter("labelLink"); + effects.enter("labelMarker"); + effects.consume(code2); + effects.exit("labelMarker"); + effects.exit("labelLink"); + return after; + } + function after(code2) { + return code2 === 94 && "_hiddenFootnoteSupport" in self2.parser.constructs ? nok(code2) : ok(code2); + } +} +const lineEnding = { + name: "lineEnding", + tokenize: tokenizeLineEnding +}; +function tokenizeLineEnding(effects, ok) { + return start; + function start(code2) { + effects.enter("lineEnding"); + effects.consume(code2); + effects.exit("lineEnding"); + return factorySpace(effects, ok, "linePrefix"); + } +} +const thematicBreak = { + name: "thematicBreak", + tokenize: tokenizeThematicBreak +}; +function tokenizeThematicBreak(effects, ok, nok) { + let size2 = 0; + let marker; + return start; + function start(code2) { + effects.enter("thematicBreak"); + return before(code2); + } + function before(code2) { + marker = code2; + return atBreak(code2); + } + function atBreak(code2) { + if (code2 === marker) { + effects.enter("thematicBreakSequence"); + return sequence(code2); + } + if (size2 >= 3 && (code2 === null || markdownLineEnding(code2))) { + effects.exit("thematicBreak"); + return ok(code2); + } + return nok(code2); + } + function sequence(code2) { + if (code2 === marker) { + effects.consume(code2); + size2++; + return sequence; + } + effects.exit("thematicBreakSequence"); + return markdownSpace(code2) ? factorySpace(effects, atBreak, "whitespace")(code2) : atBreak(code2); + } +} +const list = { + name: "list", + tokenize: tokenizeListStart, + continuation: { + tokenize: tokenizeListContinuation + }, + exit: tokenizeListEnd +}; +const listItemPrefixWhitespaceConstruct = { + tokenize: tokenizeListItemPrefixWhitespace, + partial: true +}; +const indentConstruct = { + tokenize: tokenizeIndent$1, + partial: true +}; +function tokenizeListStart(effects, ok, nok) { + const self2 = this; + const tail = self2.events[self2.events.length - 1]; + let initialSize = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0; + let size2 = 0; + return start; + function start(code2) { + const kind = self2.containerState.type || (code2 === 42 || code2 === 43 || code2 === 45 ? "listUnordered" : "listOrdered"); + if (kind === "listUnordered" ? !self2.containerState.marker || code2 === self2.containerState.marker : asciiDigit(code2)) { + if (!self2.containerState.type) { + self2.containerState.type = kind; + effects.enter(kind, { + _container: true + }); + } + if (kind === "listUnordered") { + effects.enter("listItemPrefix"); + return code2 === 42 || code2 === 45 ? effects.check(thematicBreak, nok, atMarker)(code2) : atMarker(code2); + } + if (!self2.interrupt || code2 === 49) { + effects.enter("listItemPrefix"); + effects.enter("listItemValue"); + return inside(code2); + } + } + return nok(code2); + } + function inside(code2) { + if (asciiDigit(code2) && ++size2 < 10) { + effects.consume(code2); + return inside; + } + if ((!self2.interrupt || size2 < 2) && (self2.containerState.marker ? code2 === self2.containerState.marker : code2 === 41 || code2 === 46)) { + effects.exit("listItemValue"); + return atMarker(code2); + } + return nok(code2); + } + function atMarker(code2) { + effects.enter("listItemMarker"); + effects.consume(code2); + effects.exit("listItemMarker"); + self2.containerState.marker = self2.containerState.marker || code2; + return effects.check( + blankLine, + self2.interrupt ? nok : onBlank, + effects.attempt( + listItemPrefixWhitespaceConstruct, + endOfPrefix, + otherPrefix + ) + ); + } + function onBlank(code2) { + self2.containerState.initialBlankLine = true; + initialSize++; + return endOfPrefix(code2); + } + function otherPrefix(code2) { + if (markdownSpace(code2)) { + effects.enter("listItemPrefixWhitespace"); + effects.consume(code2); + effects.exit("listItemPrefixWhitespace"); + return endOfPrefix; + } + return nok(code2); + } + function endOfPrefix(code2) { + self2.containerState.size = initialSize + self2.sliceSerialize(effects.exit("listItemPrefix"), true).length; + return ok(code2); + } +} +function tokenizeListContinuation(effects, ok, nok) { + const self2 = this; + self2.containerState._closeFlow = void 0; + return effects.check(blankLine, onBlank, notBlank); + function onBlank(code2) { + self2.containerState.furtherBlankLines = self2.containerState.furtherBlankLines || self2.containerState.initialBlankLine; + return factorySpace( + effects, + ok, + "listItemIndent", + self2.containerState.size + 1 + )(code2); + } + function notBlank(code2) { + if (self2.containerState.furtherBlankLines || !markdownSpace(code2)) { + self2.containerState.furtherBlankLines = void 0; + self2.containerState.initialBlankLine = void 0; + return notInCurrentItem(code2); + } + self2.containerState.furtherBlankLines = void 0; + self2.containerState.initialBlankLine = void 0; + return effects.attempt(indentConstruct, ok, notInCurrentItem)(code2); + } + function notInCurrentItem(code2) { + self2.containerState._closeFlow = true; + self2.interrupt = void 0; + return factorySpace( + effects, + effects.attempt(list, ok, nok), + "linePrefix", + self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + )(code2); + } +} +function tokenizeIndent$1(effects, ok, nok) { + const self2 = this; + return factorySpace( + effects, + afterPrefix, + "listItemIndent", + self2.containerState.size + 1 + ); + function afterPrefix(code2) { + const tail = self2.events[self2.events.length - 1]; + return tail && tail[1].type === "listItemIndent" && tail[2].sliceSerialize(tail[1], true).length === self2.containerState.size ? ok(code2) : nok(code2); + } +} +function tokenizeListEnd(effects) { + effects.exit(this.containerState.type); +} +function tokenizeListItemPrefixWhitespace(effects, ok, nok) { + const self2 = this; + return factorySpace( + effects, + afterPrefix, + "listItemPrefixWhitespace", + self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + 1 + ); + function afterPrefix(code2) { + const tail = self2.events[self2.events.length - 1]; + return !markdownSpace(code2) && tail && tail[1].type === "listItemPrefixWhitespace" ? ok(code2) : nok(code2); + } +} +const setextUnderline = { + name: "setextUnderline", + tokenize: tokenizeSetextUnderline, + resolveTo: resolveToSetextUnderline +}; +function resolveToSetextUnderline(events, context) { + let index = events.length; + let content2; + let text2; + let definition2; + while (index--) { + if (events[index][0] === "enter") { + if (events[index][1].type === "content") { + content2 = index; + break; + } + if (events[index][1].type === "paragraph") { + text2 = index; + } + } else { + if (events[index][1].type === "content") { + events.splice(index, 1); + } + if (!definition2 && events[index][1].type === "definition") { + definition2 = index; + } + } + } + const heading = { + type: "setextHeading", + start: Object.assign({}, events[text2][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + }; + events[text2][1].type = "setextHeadingText"; + if (definition2) { + events.splice(text2, 0, ["enter", heading, context]); + events.splice(definition2 + 1, 0, ["exit", events[content2][1], context]); + events[content2][1].end = Object.assign({}, events[definition2][1].end); + } else { + events[content2][1] = heading; + } + events.push(["exit", heading, context]); + return events; +} +function tokenizeSetextUnderline(effects, ok, nok) { + const self2 = this; + let marker; + return start; + function start(code2) { + let index = self2.events.length; + let paragraph; + while (index--) { + if (self2.events[index][1].type !== "lineEnding" && self2.events[index][1].type !== "linePrefix" && self2.events[index][1].type !== "content") { + paragraph = self2.events[index][1].type === "paragraph"; + break; + } + } + if (!self2.parser.lazy[self2.now().line] && (self2.interrupt || paragraph)) { + effects.enter("setextHeadingLine"); + marker = code2; + return before(code2); + } + return nok(code2); + } + function before(code2) { + effects.enter("setextHeadingLineSequence"); + return inside(code2); + } + function inside(code2) { + if (code2 === marker) { + effects.consume(code2); + return inside; + } + effects.exit("setextHeadingLineSequence"); + return markdownSpace(code2) ? factorySpace(effects, after, "lineSuffix")(code2) : after(code2); + } + function after(code2) { + if (code2 === null || markdownLineEnding(code2)) { + effects.exit("setextHeadingLine"); + return ok(code2); + } + return nok(code2); + } +} +const flow$1 = { + tokenize: initializeFlow +}; +function initializeFlow(effects) { + const self2 = this; + const initial = effects.attempt( + blankLine, + atBlankEnding, + effects.attempt( + this.parser.constructs.flowInitial, + afterConstruct, + factorySpace( + effects, + effects.attempt( + this.parser.constructs.flow, + afterConstruct, + effects.attempt(content, afterConstruct) + ), + "linePrefix" + ) + ) + ); + return initial; + function atBlankEnding(code2) { + if (code2 === null) { + effects.consume(code2); + return; + } + effects.enter("lineEndingBlank"); + effects.consume(code2); + effects.exit("lineEndingBlank"); + self2.currentConstruct = void 0; + return initial; + } + function afterConstruct(code2) { + if (code2 === null) { + effects.consume(code2); + return; + } + effects.enter("lineEnding"); + effects.consume(code2); + effects.exit("lineEnding"); + self2.currentConstruct = void 0; + return initial; + } +} +const resolver = { + resolveAll: createResolver() +}; +const string$1 = initializeFactory("string"); +const text$3 = initializeFactory("text"); +function initializeFactory(field) { + return { + tokenize: initializeText, + resolveAll: createResolver( + field === "text" ? resolveAllLineSuffixes : void 0 + ) + }; + function initializeText(effects) { + const self2 = this; + const constructs2 = this.parser.constructs[field]; + const text2 = effects.attempt(constructs2, start, notText); + return start; + function start(code2) { + return atBreak(code2) ? text2(code2) : notText(code2); + } + function notText(code2) { + if (code2 === null) { + effects.consume(code2); + return; + } + effects.enter("data"); + effects.consume(code2); + return data; + } + function data(code2) { + if (atBreak(code2)) { + effects.exit("data"); + return text2(code2); + } + effects.consume(code2); + return data; + } + function atBreak(code2) { + if (code2 === null) { + return true; + } + const list2 = constructs2[code2]; + let index = -1; + if (list2) { + while (++index < list2.length) { + const item = list2[index]; + if (!item.previous || item.previous.call(self2, self2.previous)) { + return true; + } + } + } + return false; + } + } +} +function createResolver(extraResolver) { + return resolveAllText; + function resolveAllText(events, context) { + let index = -1; + let enter; + while (++index <= events.length) { + if (enter === void 0) { + if (events[index] && events[index][1].type === "data") { + enter = index; + index++; + } + } else if (!events[index] || events[index][1].type !== "data") { + if (index !== enter + 2) { + events[enter][1].end = events[index - 1][1].end; + events.splice(enter + 2, index - enter - 2); + index = enter + 2; + } + enter = void 0; + } + } + return extraResolver ? extraResolver(events, context) : events; + } +} +function resolveAllLineSuffixes(events, context) { + let eventIndex = 0; + while (++eventIndex <= events.length) { + if ((eventIndex === events.length || events[eventIndex][1].type === "lineEnding") && events[eventIndex - 1][1].type === "data") { + const data = events[eventIndex - 1][1]; + const chunks = context.sliceStream(data); + let index = chunks.length; + let bufferIndex = -1; + let size2 = 0; + let tabs; + while (index--) { + const chunk = chunks[index]; + if (typeof chunk === "string") { + bufferIndex = chunk.length; + while (chunk.charCodeAt(bufferIndex - 1) === 32) { + size2++; + bufferIndex--; + } + if (bufferIndex) + break; + bufferIndex = -1; + } else if (chunk === -2) { + tabs = true; + size2++; + } else if (chunk === -1) + ; + else { + index++; + break; + } + } + if (size2) { + const token = { + type: eventIndex === events.length || tabs || size2 < 2 ? "lineSuffix" : "hardBreakTrailing", + start: { + line: data.end.line, + column: data.end.column - size2, + offset: data.end.offset - size2, + _index: data.start._index + index, + _bufferIndex: index ? bufferIndex : data.start._bufferIndex + bufferIndex + }, + end: Object.assign({}, data.end) + }; + data.end = Object.assign({}, token.start); + if (data.start.offset === data.end.offset) { + Object.assign(data, token); + } else { + events.splice( + eventIndex, + 0, + ["enter", token, context], + ["exit", token, context] + ); + eventIndex += 2; + } + } + eventIndex++; + } + } + return events; +} +function createTokenizer(parser, initialize, from) { + let point = Object.assign( + from ? Object.assign({}, from) : { + line: 1, + column: 1, + offset: 0 + }, + { + _index: 0, + _bufferIndex: -1 + } + ); + const columnStart = {}; + const resolveAllConstructs = []; + let chunks = []; + let stack = []; + const effects = { + consume, + enter, + exit: exit2, + attempt: constructFactory(onsuccessfulconstruct), + check: constructFactory(onsuccessfulcheck), + interrupt: constructFactory(onsuccessfulcheck, { + interrupt: true + }) + }; + const context = { + previous: null, + code: null, + containerState: {}, + events: [], + parser, + sliceStream, + sliceSerialize, + now, + defineSkip, + write + }; + let state = initialize.tokenize.call(context, effects); + if (initialize.resolveAll) { + resolveAllConstructs.push(initialize); + } + return context; + function write(slice) { + chunks = push(chunks, slice); + main(); + if (chunks[chunks.length - 1] !== null) { + return []; + } + addResult(initialize, 0); + context.events = resolveAll(resolveAllConstructs, context.events, context); + return context.events; + } + function sliceSerialize(token, expandTabs) { + return serializeChunks(sliceStream(token), expandTabs); + } + function sliceStream(token) { + return sliceChunks(chunks, token); + } + function now() { + const { line, column, offset, _index, _bufferIndex } = point; + return { + line, + column, + offset, + _index, + _bufferIndex + }; + } + function defineSkip(value) { + columnStart[value.line] = value.column; + accountForPotentialSkip(); + } + function main() { + let chunkIndex; + while (point._index < chunks.length) { + const chunk = chunks[point._index]; + if (typeof chunk === "string") { + chunkIndex = point._index; + if (point._bufferIndex < 0) { + point._bufferIndex = 0; + } + while (point._index === chunkIndex && point._bufferIndex < chunk.length) { + go(chunk.charCodeAt(point._bufferIndex)); + } + } else { + go(chunk); + } + } + } + function go(code2) { + state = state(code2); + } + function consume(code2) { + if (markdownLineEnding(code2)) { + point.line++; + point.column = 1; + point.offset += code2 === -3 ? 2 : 1; + accountForPotentialSkip(); + } else if (code2 !== -1) { + point.column++; + point.offset++; + } + if (point._bufferIndex < 0) { + point._index++; + } else { + point._bufferIndex++; + if (point._bufferIndex === chunks[point._index].length) { + point._bufferIndex = -1; + point._index++; + } + } + context.previous = code2; + } + function enter(type, fields) { + const token = fields || {}; + token.type = type; + token.start = now(); + context.events.push(["enter", token, context]); + stack.push(token); + return token; + } + function exit2(type) { + const token = stack.pop(); + token.end = now(); + context.events.push(["exit", token, context]); + return token; + } + function onsuccessfulconstruct(construct, info) { + addResult(construct, info.from); + } + function onsuccessfulcheck(_, info) { + info.restore(); + } + function constructFactory(onreturn, fields) { + return hook; + function hook(constructs2, returnState, bogusState) { + let listOfConstructs; + let constructIndex; + let currentConstruct; + let info; + return Array.isArray(constructs2) ? handleListOfConstructs(constructs2) : "tokenize" in constructs2 ? handleListOfConstructs([constructs2]) : handleMapOfConstructs(constructs2); + function handleMapOfConstructs(map) { + return start; + function start(code2) { + const def2 = code2 !== null && map[code2]; + const all = code2 !== null && map.null; + const list2 = [ + ...Array.isArray(def2) ? def2 : def2 ? [def2] : [], + ...Array.isArray(all) ? all : all ? [all] : [] + ]; + return handleListOfConstructs(list2)(code2); + } + } + function handleListOfConstructs(list2) { + listOfConstructs = list2; + constructIndex = 0; + if (list2.length === 0) { + return bogusState; + } + return handleConstruct(list2[constructIndex]); + } + function handleConstruct(construct) { + return start; + function start(code2) { + info = store(); + currentConstruct = construct; + if (!construct.partial) { + context.currentConstruct = construct; + } + if (construct.name && context.parser.constructs.disable.null.includes(construct.name)) { + return nok(); + } + return construct.tokenize.call( + fields ? Object.assign(Object.create(context), fields) : context, + effects, + ok, + nok + )(code2); + } + } + function ok(code2) { + onreturn(currentConstruct, info); + return returnState; + } + function nok(code2) { + info.restore(); + if (++constructIndex < listOfConstructs.length) { + return handleConstruct(listOfConstructs[constructIndex]); + } + return bogusState; + } + } + } + function addResult(construct, from2) { + if (construct.resolveAll && !resolveAllConstructs.includes(construct)) { + resolveAllConstructs.push(construct); + } + if (construct.resolve) { + splice( + context.events, + from2, + context.events.length - from2, + construct.resolve(context.events.slice(from2), context) + ); + } + if (construct.resolveTo) { + context.events = construct.resolveTo(context.events, context); + } + } + function store() { + const startPoint = now(); + const startPrevious = context.previous; + const startCurrentConstruct = context.currentConstruct; + const startEventsIndex = context.events.length; + const startStack = Array.from(stack); + return { + restore, + from: startEventsIndex + }; + function restore() { + point = startPoint; + context.previous = startPrevious; + context.currentConstruct = startCurrentConstruct; + context.events.length = startEventsIndex; + stack = startStack; + accountForPotentialSkip(); + } + } + function accountForPotentialSkip() { + if (point.line in columnStart && point.column < 2) { + point.column = columnStart[point.line]; + point.offset += columnStart[point.line] - 1; + } + } +} +function sliceChunks(chunks, token) { + const startIndex = token.start._index; + const startBufferIndex = token.start._bufferIndex; + const endIndex = token.end._index; + const endBufferIndex = token.end._bufferIndex; + let view; + if (startIndex === endIndex) { + view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)]; + } else { + view = chunks.slice(startIndex, endIndex); + if (startBufferIndex > -1) { + const head = view[0]; + if (typeof head === "string") { + view[0] = head.slice(startBufferIndex); + } else { + view.shift(); + } + } + if (endBufferIndex > 0) { + view.push(chunks[endIndex].slice(0, endBufferIndex)); + } + } + return view; +} +function serializeChunks(chunks, expandTabs) { + let index = -1; + const result = []; + let atTab; + while (++index < chunks.length) { + const chunk = chunks[index]; + let value; + if (typeof chunk === "string") { + value = chunk; + } else + switch (chunk) { + case -5: { + value = "\r"; + break; + } + case -4: { + value = "\n"; + break; + } + case -3: { + value = "\r\n"; + break; + } + case -2: { + value = expandTabs ? " " : " "; + break; + } + case -1: { + if (!expandTabs && atTab) + continue; + value = " "; + break; + } + default: { + value = String.fromCharCode(chunk); + } + } + atTab = chunk === -2; + result.push(value); + } + return result.join(""); +} +const document$1 = { + [42]: list, + [43]: list, + [45]: list, + [48]: list, + [49]: list, + [50]: list, + [51]: list, + [52]: list, + [53]: list, + [54]: list, + [55]: list, + [56]: list, + [57]: list, + [62]: blockQuote +}; +const contentInitial = { + [91]: definition +}; +const flowInitial = { + [-2]: codeIndented, + [-1]: codeIndented, + [32]: codeIndented +}; +const flow = { + [35]: headingAtx, + [42]: thematicBreak, + [45]: [setextUnderline, thematicBreak], + [60]: htmlFlow, + [61]: setextUnderline, + [95]: thematicBreak, + [96]: codeFenced, + [126]: codeFenced +}; +const string = { + [38]: characterReference, + [92]: characterEscape +}; +const text$2 = { + [-5]: lineEnding, + [-4]: lineEnding, + [-3]: lineEnding, + [33]: labelStartImage, + [38]: characterReference, + [42]: attention, + [60]: [autolink, htmlText], + [91]: labelStartLink, + [92]: [hardBreakEscape, characterEscape], + [93]: labelEnd, + [95]: attention, + [96]: codeText +}; +const insideSpan = { + null: [attention, resolver] +}; +const attentionMarkers = { + null: [42, 95] +}; +const disable = { + null: [] +}; +var defaultConstructs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + document: document$1, + contentInitial, + flowInitial, + flow, + string, + text: text$2, + insideSpan, + attentionMarkers, + disable +}, Symbol.toStringTag, { value: "Module" })); +function parse(options) { + const settings = options || {}; + const constructs2 = combineExtensions([defaultConstructs, ...settings.extensions || []]); + const parser = { + defined: [], + lazy: {}, + constructs: constructs2, + content: create(content$1), + document: create(document$2), + flow: create(flow$1), + string: create(string$1), + text: create(text$3) + }; + return parser; + function create(initial) { + return creator; + function creator(from) { + return createTokenizer(parser, initial, from); + } + } +} +function postprocess(events) { + while (!subtokenize(events)) { + } + return events; +} +const search = /[\0\t\n\r]/g; +function preprocess() { + let column = 1; + let buffer = ""; + let start = true; + let atCarriageReturn; + return preprocessor; + function preprocessor(value, encoding, end) { + const chunks = []; + let match; + let next; + let startPosition; + let endPosition; + let code2; + value = buffer + value.toString(encoding); + startPosition = 0; + buffer = ""; + if (start) { + if (value.charCodeAt(0) === 65279) { + startPosition++; + } + start = void 0; + } + while (startPosition < value.length) { + search.lastIndex = startPosition; + match = search.exec(value); + endPosition = match && match.index !== void 0 ? match.index : value.length; + code2 = value.charCodeAt(endPosition); + if (!match) { + buffer = value.slice(startPosition); + break; + } + if (code2 === 10 && startPosition === endPosition && atCarriageReturn) { + chunks.push(-3); + atCarriageReturn = void 0; + } else { + if (atCarriageReturn) { + chunks.push(-5); + atCarriageReturn = void 0; + } + if (startPosition < endPosition) { + chunks.push(value.slice(startPosition, endPosition)); + column += endPosition - startPosition; + } + switch (code2) { + case 0: { + chunks.push(65533); + column++; + break; + } + case 9: { + next = Math.ceil(column / 4) * 4; + chunks.push(-2); + while (column++ < next) + chunks.push(-1); + break; + } + case 10: { + chunks.push(-4); + column = 1; + break; + } + default: { + atCarriageReturn = true; + column = 1; + } + } + } + startPosition = endPosition + 1; + } + if (end) { + if (atCarriageReturn) + chunks.push(-5); + if (buffer) + chunks.push(buffer); + chunks.push(null); + } + return chunks; + } +} +function micromark(value, encoding, options) { + if (typeof encoding !== "string") { + options = encoding; + encoding = void 0; + } + return compile(options)( + postprocess( + parse(options).document().write(preprocess()(value, encoding, true)) + ) + ); +} +const wwwPrefix = { + tokenize: tokenizeWwwPrefix, + partial: true +}; +const domain = { + tokenize: tokenizeDomain, + partial: true +}; +const path = { + tokenize: tokenizePath, + partial: true +}; +const trail = { + tokenize: tokenizeTrail, + partial: true +}; +const emailDomainDotTrail = { + tokenize: tokenizeEmailDomainDotTrail, + partial: true +}; +const wwwAutolink = { + tokenize: tokenizeWwwAutolink, + previous: previousWww +}; +const protocolAutolink = { + tokenize: tokenizeProtocolAutolink, + previous: previousProtocol +}; +const emailAutolink = { + tokenize: tokenizeEmailAutolink, + previous: previousEmail +}; +const text$1 = {}; +const gfmAutolinkLiteral = { + text: text$1 +}; +let code = 48; +while (code < 123) { + text$1[code] = emailAutolink; + code++; + if (code === 58) + code = 65; + else if (code === 91) + code = 97; +} +text$1[43] = emailAutolink; +text$1[45] = emailAutolink; +text$1[46] = emailAutolink; +text$1[95] = emailAutolink; +text$1[72] = [emailAutolink, protocolAutolink]; +text$1[104] = [emailAutolink, protocolAutolink]; +text$1[87] = [emailAutolink, wwwAutolink]; +text$1[119] = [emailAutolink, wwwAutolink]; +function tokenizeEmailAutolink(effects, ok, nok) { + const self2 = this; + let dot; + let data; + return start; + function start(code2) { + if (!gfmAtext(code2) || !previousEmail.call(self2, self2.previous) || previousUnbalanced(self2.events)) { + return nok(code2); + } + effects.enter("literalAutolink"); + effects.enter("literalAutolinkEmail"); + return atext(code2); + } + function atext(code2) { + if (gfmAtext(code2)) { + effects.consume(code2); + return atext; + } + if (code2 === 64) { + effects.consume(code2); + return emailDomain; + } + return nok(code2); + } + function emailDomain(code2) { + if (code2 === 46) { + return effects.check( + emailDomainDotTrail, + emailDomainAfter, + emailDomainDot + )(code2); + } + if (code2 === 45 || code2 === 95 || asciiAlphanumeric(code2)) { + data = true; + effects.consume(code2); + return emailDomain; + } + return emailDomainAfter(code2); + } + function emailDomainDot(code2) { + effects.consume(code2); + dot = true; + return emailDomain; + } + function emailDomainAfter(code2) { + if (data && dot && asciiAlpha(self2.previous)) { + effects.exit("literalAutolinkEmail"); + effects.exit("literalAutolink"); + return ok(code2); + } + return nok(code2); + } +} +function tokenizeWwwAutolink(effects, ok, nok) { + const self2 = this; + return wwwStart; + function wwwStart(code2) { + if (code2 !== 87 && code2 !== 119 || !previousWww.call(self2, self2.previous) || previousUnbalanced(self2.events)) { + return nok(code2); + } + effects.enter("literalAutolink"); + effects.enter("literalAutolinkWww"); + return effects.check( + wwwPrefix, + effects.attempt(domain, effects.attempt(path, wwwAfter), nok), + nok + )(code2); + } + function wwwAfter(code2) { + effects.exit("literalAutolinkWww"); + effects.exit("literalAutolink"); + return ok(code2); + } +} +function tokenizeProtocolAutolink(effects, ok, nok) { + const self2 = this; + let buffer = ""; + let seen = false; + return protocolStart; + function protocolStart(code2) { + if ((code2 === 72 || code2 === 104) && previousProtocol.call(self2, self2.previous) && !previousUnbalanced(self2.events)) { + effects.enter("literalAutolink"); + effects.enter("literalAutolinkHttp"); + buffer += String.fromCodePoint(code2); + effects.consume(code2); + return protocolPrefixInside; + } + return nok(code2); + } + function protocolPrefixInside(code2) { + if (asciiAlpha(code2) && buffer.length < 5) { + buffer += String.fromCodePoint(code2); + effects.consume(code2); + return protocolPrefixInside; + } + if (code2 === 58) { + const protocol = buffer.toLowerCase(); + if (protocol === "http" || protocol === "https") { + effects.consume(code2); + return protocolSlashesInside; + } + } + return nok(code2); + } + function protocolSlashesInside(code2) { + if (code2 === 47) { + effects.consume(code2); + if (seen) { + return afterProtocol; + } + seen = true; + return protocolSlashesInside; + } + return nok(code2); + } + function afterProtocol(code2) { + return code2 === null || asciiControl(code2) || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2) || unicodePunctuation(code2) ? nok(code2) : effects.attempt(domain, effects.attempt(path, protocolAfter), nok)(code2); + } + function protocolAfter(code2) { + effects.exit("literalAutolinkHttp"); + effects.exit("literalAutolink"); + return ok(code2); + } +} +function tokenizeWwwPrefix(effects, ok, nok) { + let size2 = 0; + return wwwPrefixInside; + function wwwPrefixInside(code2) { + if ((code2 === 87 || code2 === 119) && size2 < 3) { + size2++; + effects.consume(code2); + return wwwPrefixInside; + } + if (code2 === 46 && size2 === 3) { + effects.consume(code2); + return wwwPrefixAfter; + } + return nok(code2); + } + function wwwPrefixAfter(code2) { + return code2 === null ? nok(code2) : ok(code2); + } +} +function tokenizeDomain(effects, ok, nok) { + let underscoreInLastSegment; + let underscoreInLastLastSegment; + let seen; + return domainInside; + function domainInside(code2) { + if (code2 === 46 || code2 === 95) { + return effects.check(trail, domainAfter, domainAtPunctuation)(code2); + } + if (code2 === null || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2) || code2 !== 45 && unicodePunctuation(code2)) { + return domainAfter(code2); + } + seen = true; + effects.consume(code2); + return domainInside; + } + function domainAtPunctuation(code2) { + if (code2 === 95) { + underscoreInLastSegment = true; + } else { + underscoreInLastLastSegment = underscoreInLastSegment; + underscoreInLastSegment = void 0; + } + effects.consume(code2); + return domainInside; + } + function domainAfter(code2) { + if (underscoreInLastLastSegment || underscoreInLastSegment || !seen) { + return nok(code2); + } + return ok(code2); + } +} +function tokenizePath(effects, ok) { + let sizeOpen = 0; + let sizeClose = 0; + return pathInside; + function pathInside(code2) { + if (code2 === 40) { + sizeOpen++; + effects.consume(code2); + return pathInside; + } + if (code2 === 41 && sizeClose < sizeOpen) { + return pathAtPunctuation(code2); + } + if (code2 === 33 || code2 === 34 || code2 === 38 || code2 === 39 || code2 === 41 || code2 === 42 || code2 === 44 || code2 === 46 || code2 === 58 || code2 === 59 || code2 === 60 || code2 === 63 || code2 === 93 || code2 === 95 || code2 === 126) { + return effects.check(trail, ok, pathAtPunctuation)(code2); + } + if (code2 === null || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) { + return ok(code2); + } + effects.consume(code2); + return pathInside; + } + function pathAtPunctuation(code2) { + if (code2 === 41) { + sizeClose++; + } + effects.consume(code2); + return pathInside; + } +} +function tokenizeTrail(effects, ok, nok) { + return trail2; + function trail2(code2) { + if (code2 === 33 || code2 === 34 || code2 === 39 || code2 === 41 || code2 === 42 || code2 === 44 || code2 === 46 || code2 === 58 || code2 === 59 || code2 === 63 || code2 === 95 || code2 === 126) { + effects.consume(code2); + return trail2; + } + if (code2 === 38) { + effects.consume(code2); + return trailCharRefStart; + } + if (code2 === 93) { + effects.consume(code2); + return trailBracketAfter; + } + if (code2 === 60 || code2 === null || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) { + return ok(code2); + } + return nok(code2); + } + function trailBracketAfter(code2) { + if (code2 === null || code2 === 40 || code2 === 91 || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) { + return ok(code2); + } + return trail2(code2); + } + function trailCharRefStart(code2) { + return asciiAlpha(code2) ? trailCharRefInside(code2) : nok(code2); + } + function trailCharRefInside(code2) { + if (code2 === 59) { + effects.consume(code2); + return trail2; + } + if (asciiAlpha(code2)) { + effects.consume(code2); + return trailCharRefInside; + } + return nok(code2); + } +} +function tokenizeEmailDomainDotTrail(effects, ok, nok) { + return start; + function start(code2) { + effects.consume(code2); + return after; + } + function after(code2) { + return asciiAlphanumeric(code2) ? nok(code2) : ok(code2); + } +} +function previousWww(code2) { + return code2 === null || code2 === 40 || code2 === 42 || code2 === 95 || code2 === 91 || code2 === 93 || code2 === 126 || markdownLineEndingOrSpace(code2); +} +function previousProtocol(code2) { + return !asciiAlpha(code2); +} +function previousEmail(code2) { + return !(code2 === 47 || gfmAtext(code2)); +} +function gfmAtext(code2) { + return code2 === 43 || code2 === 45 || code2 === 46 || code2 === 95 || asciiAlphanumeric(code2); +} +function previousUnbalanced(events) { + let index = events.length; + let result = false; + while (index--) { + const token = events[index][1]; + if ((token.type === "labelLink" || token.type === "labelImage") && !token._balanced) { + result = true; + break; + } + if (token._gfmAutolinkLiteralWalkedInto) { + result = false; + break; + } + } + if (events.length > 0 && !result) { + events[events.length - 1][1]._gfmAutolinkLiteralWalkedInto = true; + } + return result; +} +const gfmAutolinkLiteralHtml = { + exit: { + literalAutolinkEmail, + literalAutolinkHttp, + literalAutolinkWww + } +}; +function literalAutolinkWww(token) { + anchorFromToken.call(this, token, "http://"); +} +function literalAutolinkEmail(token) { + anchorFromToken.call(this, token, "mailto:"); +} +function literalAutolinkHttp(token) { + anchorFromToken.call(this, token); +} +function anchorFromToken(token, protocol) { + const url = this.sliceSerialize(token); + this.tag(''); + this.raw(this.encode(url)); + this.tag(""); +} +const indent = { + tokenize: tokenizeIndent, + partial: true +}; +function gfmFootnote() { + return { + document: { + [91]: { + tokenize: tokenizeDefinitionStart, + continuation: { + tokenize: tokenizeDefinitionContinuation + }, + exit: gfmFootnoteDefinitionEnd + } + }, + text: { + [91]: { + tokenize: tokenizeGfmFootnoteCall + }, + [93]: { + add: "after", + tokenize: tokenizePotentialGfmFootnoteCall, + resolveTo: resolveToPotentialGfmFootnoteCall + } + } + }; +} +function tokenizePotentialGfmFootnoteCall(effects, ok, nok) { + const self2 = this; + let index = self2.events.length; + const defined = self2.parser.gfmFootnotes || (self2.parser.gfmFootnotes = []); + let labelStart; + while (index--) { + const token = self2.events[index][1]; + if (token.type === "labelImage") { + labelStart = token; + break; + } + if (token.type === "gfmFootnoteCall" || token.type === "labelLink" || token.type === "label" || token.type === "image" || token.type === "link") { + break; + } + } + return start; + function start(code2) { + if (!labelStart || !labelStart._balanced) { + return nok(code2); + } + const id = normalizeIdentifier( + self2.sliceSerialize({ + start: labelStart.end, + end: self2.now() + }) + ); + if (id.codePointAt(0) !== 94 || !defined.includes(id.slice(1))) { + return nok(code2); + } + effects.enter("gfmFootnoteCallLabelMarker"); + effects.consume(code2); + effects.exit("gfmFootnoteCallLabelMarker"); + return ok(code2); } -}; -function contains(arr, value) { - for (var i = 0; i < arr.length; i++) { - if (arr[i] === value) { - return true; +} +function resolveToPotentialGfmFootnoteCall(events, context) { + let index = events.length; + while (index--) { + if (events[index][1].type === "labelImage" && events[index][0] === "enter") { + events[index][1]; + break; } } - return false; + events[index + 1][1].type = "data"; + events[index + 3][1].type = "gfmFootnoteCallLabelMarker"; + const call = { + type: "gfmFootnoteCall", + start: Object.assign({}, events[index + 3][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + }; + const marker = { + type: "gfmFootnoteCallMarker", + start: Object.assign({}, events[index + 3][1].end), + end: Object.assign({}, events[index + 3][1].end) + }; + marker.end.column++; + marker.end.offset++; + marker.end._bufferIndex++; + const string2 = { + type: "gfmFootnoteCallString", + start: Object.assign({}, marker.end), + end: Object.assign({}, events[events.length - 1][1].start) + }; + const chunk = { + type: "chunkString", + contentType: "string", + start: Object.assign({}, string2.start), + end: Object.assign({}, string2.end) + }; + const replacement = [ + events[index + 1], + events[index + 2], + ["enter", call, context], + events[index + 3], + events[index + 4], + ["enter", marker, context], + ["exit", marker, context], + ["enter", string2, context], + ["enter", chunk, context], + ["exit", chunk, context], + ["exit", string2, context], + events[events.length - 2], + events[events.length - 1], + ["exit", call, context] + ]; + events.splice(index, events.length - index + 1, ...replacement); + return events; +} +function tokenizeGfmFootnoteCall(effects, ok, nok) { + const self2 = this; + const defined = self2.parser.gfmFootnotes || (self2.parser.gfmFootnotes = []); + let size2 = 0; + let data; + return start; + function start(code2) { + effects.enter("gfmFootnoteCall"); + effects.enter("gfmFootnoteCallLabelMarker"); + effects.consume(code2); + effects.exit("gfmFootnoteCallLabelMarker"); + return callStart; + } + function callStart(code2) { + if (code2 !== 94) + return nok(code2); + effects.enter("gfmFootnoteCallMarker"); + effects.consume(code2); + effects.exit("gfmFootnoteCallMarker"); + effects.enter("gfmFootnoteCallString"); + effects.enter("chunkString").contentType = "string"; + return callData; + } + function callData(code2) { + if (size2 > 999 || code2 === 93 && !data || code2 === null || code2 === 91 || markdownLineEndingOrSpace(code2)) { + return nok(code2); + } + if (code2 === 93) { + effects.exit("chunkString"); + const token = effects.exit("gfmFootnoteCallString"); + if (!defined.includes(normalizeIdentifier(self2.sliceSerialize(token)))) { + return nok(code2); + } + effects.enter("gfmFootnoteCallLabelMarker"); + effects.consume(code2); + effects.exit("gfmFootnoteCallLabelMarker"); + effects.exit("gfmFootnoteCall"); + return ok; + } + if (!markdownLineEndingOrSpace(code2)) { + data = true; + } + size2++; + effects.consume(code2); + return code2 === 92 ? callEscape : callData; + } + function callEscape(code2) { + if (code2 === 91 || code2 === 92 || code2 === 93) { + effects.consume(code2); + size2++; + return callData; + } + return callData(code2); + } +} +function tokenizeDefinitionStart(effects, ok, nok) { + const self2 = this; + const defined = self2.parser.gfmFootnotes || (self2.parser.gfmFootnotes = []); + let identifier; + let size2 = 0; + let data; + return start; + function start(code2) { + effects.enter("gfmFootnoteDefinition")._container = true; + effects.enter("gfmFootnoteDefinitionLabel"); + effects.enter("gfmFootnoteDefinitionLabelMarker"); + effects.consume(code2); + effects.exit("gfmFootnoteDefinitionLabelMarker"); + return labelAtMarker; + } + function labelAtMarker(code2) { + if (code2 === 94) { + effects.enter("gfmFootnoteDefinitionMarker"); + effects.consume(code2); + effects.exit("gfmFootnoteDefinitionMarker"); + effects.enter("gfmFootnoteDefinitionLabelString"); + effects.enter("chunkString").contentType = "string"; + return labelInside; + } + return nok(code2); + } + function labelInside(code2) { + if (size2 > 999 || code2 === 93 && !data || code2 === null || code2 === 91 || markdownLineEndingOrSpace(code2)) { + return nok(code2); + } + if (code2 === 93) { + effects.exit("chunkString"); + const token = effects.exit("gfmFootnoteDefinitionLabelString"); + identifier = normalizeIdentifier(self2.sliceSerialize(token)); + effects.enter("gfmFootnoteDefinitionLabelMarker"); + effects.consume(code2); + effects.exit("gfmFootnoteDefinitionLabelMarker"); + effects.exit("gfmFootnoteDefinitionLabel"); + return labelAfter; + } + if (!markdownLineEndingOrSpace(code2)) { + data = true; + } + size2++; + effects.consume(code2); + return code2 === 92 ? labelEscape : labelInside; + } + function labelEscape(code2) { + if (code2 === 91 || code2 === 92 || code2 === 93) { + effects.consume(code2); + size2++; + return labelInside; + } + return labelInside(code2); + } + function labelAfter(code2) { + if (code2 === 58) { + effects.enter("definitionMarker"); + effects.consume(code2); + effects.exit("definitionMarker"); + if (!defined.includes(identifier)) { + defined.push(identifier); + } + return factorySpace( + effects, + whitespaceAfter, + "gfmFootnoteDefinitionWhitespace" + ); + } + return nok(code2); + } + function whitespaceAfter(code2) { + return ok(code2); + } } -function noop$1(val) { - return val; +function tokenizeDefinitionContinuation(effects, ok, nok) { + return effects.check(blankLine, ok, effects.attempt(indent, ok, nok)); } -function typeToTarget(href, type) { - return type === "url" ? "_blank" : null; -} -var scanner$1 = {}; -var state = {}; -state.__esModule = true; -state.stateify = state.TokenState = state.CharacterState = void 0; -var _class$3 = _class$4; -function createStateClass() { - return function(tClass) { - this.j = []; - this.T = tClass || null; - }; +function gfmFootnoteDefinitionEnd(effects) { + effects.exit("gfmFootnoteDefinition"); } -var BaseState = createStateClass(); -BaseState.prototype = { - defaultTransition: false, - on: function on(symbol, state2) { - if (symbol instanceof Array) { - for (var i = 0; i < symbol.length; i++) { - this.j.push([symbol[i], state2]); +function tokenizeIndent(effects, ok, nok) { + const self2 = this; + return factorySpace( + effects, + afterPrefix, + "gfmFootnoteDefinitionIndent", + 4 + 1 + ); + function afterPrefix(code2) { + const tail = self2.events[self2.events.length - 1]; + return tail && tail[1].type === "gfmFootnoteDefinitionIndent" && tail[2].sliceSerialize(tail[1], true).length === 4 ? ok(code2) : nok(code2); + } +} +const own = {}.hasOwnProperty; +const emptyOptions = {}; +function defaultBackLabel(referenceIndex, rereferenceIndex) { + return "Back to reference " + (referenceIndex + 1) + (rereferenceIndex > 1 ? "-" + rereferenceIndex : ""); +} +function gfmFootnoteHtml(options) { + const config = options || emptyOptions; + const label = config.label || "Footnotes"; + const labelTagName = config.labelTagName || "h2"; + const labelAttributes = config.labelAttributes === null || config.labelAttributes === void 0 ? 'class="sr-only"' : config.labelAttributes; + const backLabel = config.backLabel || defaultBackLabel; + const clobberPrefix = config.clobberPrefix === null || config.clobberPrefix === void 0 ? "user-content-" : config.clobberPrefix; + return { + enter: { + gfmFootnoteDefinition() { + const stack = this.getData("tightStack"); + stack.push(false); + }, + gfmFootnoteDefinitionLabelString() { + this.buffer(); + }, + gfmFootnoteCallString() { + this.buffer(); + } + }, + exit: { + gfmFootnoteDefinition() { + let definitions2 = this.getData("gfmFootnoteDefinitions"); + const footnoteStack = this.getData("gfmFootnoteDefinitionStack"); + const tightStack = this.getData("tightStack"); + const current = footnoteStack.pop(); + const value = this.resume(); + if (!definitions2) { + this.setData("gfmFootnoteDefinitions", definitions2 = {}); + } + if (!own.call(definitions2, current)) + definitions2[current] = value; + tightStack.pop(); + this.setData("slurpOneLineEnding", true); + this.setData("lastWasTag"); + }, + gfmFootnoteDefinitionLabelString(token) { + let footnoteStack = this.getData("gfmFootnoteDefinitionStack"); + if (!footnoteStack) { + this.setData("gfmFootnoteDefinitionStack", footnoteStack = []); + } + footnoteStack.push(normalizeIdentifier(this.sliceSerialize(token))); + this.resume(); + this.buffer(); + }, + gfmFootnoteCallString(token) { + let calls = this.getData("gfmFootnoteCallOrder"); + let counts = this.getData("gfmFootnoteCallCounts"); + const id = normalizeIdentifier(this.sliceSerialize(token)); + let counter; + this.resume(); + if (!calls) + this.setData("gfmFootnoteCallOrder", calls = []); + if (!counts) + this.setData("gfmFootnoteCallCounts", counts = {}); + const index = calls.indexOf(id); + const safeId = sanitizeUri(id.toLowerCase()); + if (index === -1) { + calls.push(id); + counts[id] = 1; + counter = calls.length; + } else { + counts[id]++; + counter = index + 1; + } + const reuseCounter = counts[id]; + this.tag( + ' 1 ? "-" + reuseCounter : "") + '" data-footnote-ref="" aria-describedby="footnote-label">' + String(counter) + "" + ); + }, + null() { + const calls = this.getData("gfmFootnoteCallOrder") || []; + const counts = this.getData("gfmFootnoteCallCounts") || {}; + const definitions2 = this.getData("gfmFootnoteDefinitions") || {}; + let index = -1; + if (calls.length > 0) { + this.lineEndingIfNeeded(); + this.tag( + '
    <' + labelTagName + ' id="footnote-label"' + (labelAttributes ? " " + labelAttributes : "") + ">" + ); + this.raw(this.encode(label)); + this.tag(""); + this.lineEndingIfNeeded(); + this.tag("
      "); + } + while (++index < calls.length) { + const id = calls[index]; + const safeId = sanitizeUri(id.toLowerCase()); + let referenceIndex = 0; + const references = []; + while (++referenceIndex <= counts[id]) { + references.push( + ' 1 ? "-" + referenceIndex : "") + '" data-footnote-backref="" aria-label="' + this.encode( + typeof backLabel === "string" ? backLabel : backLabel(index, referenceIndex) + ) + '" class="data-footnote-backref">\u21A9' + (referenceIndex > 1 ? "" + referenceIndex + "" : "") + "" + ); + } + const reference = references.join(" "); + let injected = false; + this.lineEndingIfNeeded(); + this.tag('
    1. '); + this.lineEndingIfNeeded(); + this.tag( + definitions2[id].replace( + /<\/p>(?:\r?\n|\r)?$/, + ($0) => { + injected = true; + return " " + reference + $0; + } + ) + ); + if (!injected) { + this.lineEndingIfNeeded(); + this.tag(reference); + } + this.lineEndingIfNeeded(); + this.tag("
    2. "); + } + if (calls.length > 0) { + this.lineEndingIfNeeded(); + this.tag("
    "); + this.lineEndingIfNeeded(); + this.tag("
    "); + } } - return this; } - this.j.push([symbol, state2]); - return this; - }, - next: function next(item) { - for (var i = 0; i < this.j.length; i++) { - var jump2 = this.j[i]; - var symbol = jump2[0]; - var state2 = jump2[1]; - if (this.test(item, symbol)) { - return state2; - } + }; +} +const gfmStrikethroughHtml = { + enter: { + strikethrough() { + this.tag(""); } - return this.defaultTransition; - }, - accepts: function accepts() { - return !!this.T; }, - test: function test(item, symbol) { - return item === symbol; - }, - emit: function emit() { - return this.T; + exit: { + strikethrough() { + this.tag(""); + } } }; -var CharacterState = (0, _class$3.inherits)(BaseState, createStateClass(), { - test: function test2(character, charOrRegExp) { - return character === charOrRegExp || charOrRegExp instanceof RegExp && charOrRegExp.test(character); - } -}); -var TokenState = (0, _class$3.inherits)(BaseState, createStateClass(), { - jump: function jump(token) { - var tClass = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null; - var state2 = this.next(new token("")); - if (state2 === this.defaultTransition) { - state2 = new this.constructor(tClass); - this.on(token, state2); - } else if (tClass) { - state2.T = tClass; - } - return state2; - }, - test: function test3(token, tokenClass) { - return token instanceof tokenClass; - } -}); -function stateify(str, start2, endToken, defaultToken) { - var i = 0, len = str.length, state2 = start2, newStates = [], nextState = void 0; - while (i < len && (nextState = state2.next(str[i]))) { - state2 = nextState; - i++; - } - if (i >= len) { - return []; +function gfmStrikethrough(options) { + const options_ = options || {}; + let single = options_.singleTilde; + const tokenizer = { + tokenize: tokenizeStrikethrough, + resolveAll: resolveAllStrikethrough + }; + if (single === null || single === void 0) { + single = true; } - while (i < len - 1) { - nextState = new CharacterState(defaultToken); - newStates.push(nextState); - state2.on(str[i], nextState); - state2 = nextState; - i++; - } - nextState = new CharacterState(endToken); - newStates.push(nextState); - state2.on(str[len - 1], nextState); - return newStates; -} -state.CharacterState = CharacterState; -state.TokenState = TokenState; -state.stateify = stateify; -var text$1 = {}; -var createTokenClass$1 = {}; -createTokenClass$1.__esModule = true; -function createTokenClass() { - return function(value) { - if (value) { - this.v = value; + return { + text: { + [126]: tokenizer + }, + insideSpan: { + null: [tokenizer] + }, + attentionMarkers: { + null: [126] } }; -} -createTokenClass$1.createTokenClass = createTokenClass; -text$1.__esModule = true; -text$1.AMPERSAND = text$1.CLOSEPAREN = text$1.CLOSEANGLEBRACKET = text$1.CLOSEBRACKET = text$1.CLOSEBRACE = text$1.OPENPAREN = text$1.OPENANGLEBRACKET = text$1.OPENBRACKET = text$1.OPENBRACE = text$1.WS = text$1.TLD = text$1.SYM = text$1.UNDERSCORE = text$1.SLASH = text$1.MAILTO = text$1.PROTOCOL = text$1.QUERY = text$1.POUND = text$1.PLUS = text$1.NUM = text$1.NL = text$1.LOCALHOST = text$1.PUNCTUATION = text$1.DOT = text$1.COLON = text$1.AT = text$1.DOMAIN = text$1.Base = void 0; -var _createTokenClass$1 = createTokenClass$1; -var _class$2 = _class$4; -var TextToken = (0, _createTokenClass$1.createTokenClass)(); -TextToken.prototype = { - toString: function toString() { - return this.v + ""; + function resolveAllStrikethrough(events, context) { + let index = -1; + while (++index < events.length) { + if (events[index][0] === "enter" && events[index][1].type === "strikethroughSequenceTemporary" && events[index][1]._close) { + let open = index; + while (open--) { + if (events[open][0] === "exit" && events[open][1].type === "strikethroughSequenceTemporary" && events[open][1]._open && events[index][1].end.offset - events[index][1].start.offset === events[open][1].end.offset - events[open][1].start.offset) { + events[index][1].type = "strikethroughSequence"; + events[open][1].type = "strikethroughSequence"; + const strikethrough = { + type: "strikethrough", + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[index][1].end) + }; + const text2 = { + type: "strikethroughText", + start: Object.assign({}, events[open][1].end), + end: Object.assign({}, events[index][1].start) + }; + const nextEvents = [ + ["enter", strikethrough, context], + ["enter", events[open][1], context], + ["exit", events[open][1], context], + ["enter", text2, context] + ]; + const insideSpan2 = context.parser.constructs.insideSpan.null; + if (insideSpan2) { + splice( + nextEvents, + nextEvents.length, + 0, + resolveAll(insideSpan2, events.slice(open + 1, index), context) + ); + } + splice(nextEvents, nextEvents.length, 0, [ + ["exit", text2, context], + ["enter", events[index][1], context], + ["exit", events[index][1], context], + ["exit", strikethrough, context] + ]); + splice(events, open - 1, index - open + 3, nextEvents); + index = open + nextEvents.length - 2; + break; + } + } + } + } + index = -1; + while (++index < events.length) { + if (events[index][1].type === "strikethroughSequenceTemporary") { + events[index][1].type = "data"; + } + } + return events; } -}; -function inheritsToken(value) { - var props = value ? { v: value } : {}; - return (0, _class$2.inherits)(TextToken, (0, _createTokenClass$1.createTokenClass)(), props); -} -var DOMAIN = inheritsToken(); -var AT = inheritsToken("@"); -var COLON = inheritsToken(":"); -var DOT = inheritsToken("."); -var PUNCTUATION = inheritsToken(); -var LOCALHOST = inheritsToken(); -var NL$1 = inheritsToken("\n"); -var NUM = inheritsToken(); -var PLUS = inheritsToken("+"); -var POUND = inheritsToken("#"); -var PROTOCOL = inheritsToken(); -var MAILTO = inheritsToken("mailto:"); -var QUERY = inheritsToken("?"); -var SLASH = inheritsToken("/"); -var UNDERSCORE = inheritsToken("_"); -var SYM = inheritsToken(); -var TLD = inheritsToken(); -var WS = inheritsToken(); -var OPENBRACE = inheritsToken("{"); -var OPENBRACKET = inheritsToken("["); -var OPENANGLEBRACKET = inheritsToken("<"); -var OPENPAREN = inheritsToken("("); -var CLOSEBRACE = inheritsToken("}"); -var CLOSEBRACKET = inheritsToken("]"); -var CLOSEANGLEBRACKET = inheritsToken(">"); -var CLOSEPAREN = inheritsToken(")"); -var AMPERSAND = inheritsToken("&"); -text$1.Base = TextToken; -text$1.DOMAIN = DOMAIN; -text$1.AT = AT; -text$1.COLON = COLON; -text$1.DOT = DOT; -text$1.PUNCTUATION = PUNCTUATION; -text$1.LOCALHOST = LOCALHOST; -text$1.NL = NL$1; -text$1.NUM = NUM; -text$1.PLUS = PLUS; -text$1.POUND = POUND; -text$1.QUERY = QUERY; -text$1.PROTOCOL = PROTOCOL; -text$1.MAILTO = MAILTO; -text$1.SLASH = SLASH; -text$1.UNDERSCORE = UNDERSCORE; -text$1.SYM = SYM; -text$1.TLD = TLD; -text$1.WS = WS; -text$1.OPENBRACE = OPENBRACE; -text$1.OPENBRACKET = OPENBRACKET; -text$1.OPENANGLEBRACKET = OPENANGLEBRACKET; -text$1.OPENPAREN = OPENPAREN; -text$1.CLOSEBRACE = CLOSEBRACE; -text$1.CLOSEBRACKET = CLOSEBRACKET; -text$1.CLOSEANGLEBRACKET = CLOSEANGLEBRACKET; -text$1.CLOSEPAREN = CLOSEPAREN; -text$1.AMPERSAND = AMPERSAND; -scanner$1.__esModule = true; -scanner$1.start = scanner$1.run = scanner$1.TOKENS = scanner$1.State = void 0; -var _state$1 = state; -var _text$2 = text$1; -var TOKENS = _interopRequireWildcard$2(_text$2); -function _interopRequireWildcard$2(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) - newObj[key] = obj[key]; + function tokenizeStrikethrough(effects, ok, nok) { + const previous2 = this.previous; + const events = this.events; + let size2 = 0; + return start; + function start(code2) { + if (previous2 === 126 && events[events.length - 1][1].type !== "characterEscape") { + return nok(code2); + } + effects.enter("strikethroughSequenceTemporary"); + return more(code2); + } + function more(code2) { + const before = classifyCharacter(previous2); + if (code2 === 126) { + if (size2 > 1) + return nok(code2); + effects.consume(code2); + size2++; + return more; } + if (size2 < 2 && !single) + return nok(code2); + const token = effects.exit("strikethroughSequenceTemporary"); + const after = classifyCharacter(code2); + token._open = !after || after === 2 && Boolean(before); + token._close = !before || before === 2 && Boolean(after); + return ok(code2); } - newObj.default = obj; - return newObj; } } -var tlds = "aaa|aarp|abarth|abb|abbott|abbvie|abc|able|abogado|abudhabi|ac|academy|accenture|accountant|accountants|aco|active|actor|ad|adac|ads|adult|ae|aeg|aero|aetna|af|afamilycompany|afl|africa|ag|agakhan|agency|ai|aig|aigo|airbus|airforce|airtel|akdn|al|alfaromeo|alibaba|alipay|allfinanz|allstate|ally|alsace|alstom|am|americanexpress|americanfamily|amex|amfam|amica|amsterdam|analytics|android|anquan|anz|ao|aol|apartments|app|apple|aq|aquarelle|ar|arab|aramco|archi|army|arpa|art|arte|as|asda|asia|associates|at|athleta|attorney|au|auction|audi|audible|audio|auspost|author|auto|autos|avianca|aw|aws|ax|axa|az|azure|ba|baby|baidu|banamex|bananarepublic|band|bank|bar|barcelona|barclaycard|barclays|barefoot|bargains|baseball|basketball|bauhaus|bayern|bb|bbc|bbt|bbva|bcg|bcn|bd|be|beats|beauty|beer|bentley|berlin|best|bestbuy|bet|bf|bg|bh|bharti|bi|bible|bid|bike|bing|bingo|bio|biz|bj|black|blackfriday|blanco|blockbuster|blog|bloomberg|blue|bm|bms|bmw|bn|bnl|bnpparibas|bo|boats|boehringer|bofa|bom|bond|boo|book|booking|boots|bosch|bostik|boston|bot|boutique|box|br|bradesco|bridgestone|broadway|broker|brother|brussels|bs|bt|budapest|bugatti|build|builders|business|buy|buzz|bv|bw|by|bz|bzh|ca|cab|cafe|cal|call|calvinklein|cam|camera|camp|cancerresearch|canon|capetown|capital|capitalone|car|caravan|cards|care|career|careers|cars|cartier|casa|case|caseih|cash|casino|cat|catering|catholic|cba|cbn|cbre|cbs|cc|cd|ceb|center|ceo|cern|cf|cfa|cfd|cg|ch|chanel|channel|chase|chat|cheap|chintai|chloe|christmas|chrome|chrysler|church|ci|cipriani|circle|cisco|citadel|citi|citic|city|cityeats|ck|cl|claims|cleaning|click|clinic|clinique|clothing|cloud|club|clubmed|cm|cn|co|coach|codes|coffee|college|cologne|com|comcast|commbank|community|company|compare|computer|comsec|condos|construction|consulting|contact|contractors|cooking|cookingchannel|cool|coop|corsica|country|coupon|coupons|courses|cr|credit|creditcard|creditunion|cricket|crown|crs|cruise|cruises|csc|cu|cuisinella|cv|cw|cx|cy|cymru|cyou|cz|dabur|dad|dance|data|date|dating|datsun|day|dclk|dds|de|deal|dealer|deals|degree|delivery|dell|deloitte|delta|democrat|dental|dentist|desi|design|dev|dhl|diamonds|diet|digital|direct|directory|discount|discover|dish|diy|dj|dk|dm|dnp|do|docs|doctor|dodge|dog|doha|domains|dot|download|drive|dtv|dubai|duck|dunlop|duns|dupont|durban|dvag|dvr|dz|earth|eat|ec|eco|edeka|edu|education|ee|eg|email|emerck|energy|engineer|engineering|enterprises|epost|epson|equipment|er|ericsson|erni|es|esq|estate|esurance|et|etisalat|eu|eurovision|eus|events|everbank|exchange|expert|exposed|express|extraspace|fage|fail|fairwinds|faith|family|fan|fans|farm|farmers|fashion|fast|fedex|feedback|ferrari|ferrero|fi|fiat|fidelity|fido|film|final|finance|financial|fire|firestone|firmdale|fish|fishing|fit|fitness|fj|fk|flickr|flights|flir|florist|flowers|fly|fm|fo|foo|food|foodnetwork|football|ford|forex|forsale|forum|foundation|fox|fr|free|fresenius|frl|frogans|frontdoor|frontier|ftr|fujitsu|fujixerox|fun|fund|furniture|futbol|fyi|ga|gal|gallery|gallo|gallup|game|games|gap|garden|gb|gbiz|gd|gdn|ge|gea|gent|genting|george|gf|gg|ggee|gh|gi|gift|gifts|gives|giving|gl|glade|glass|gle|global|globo|gm|gmail|gmbh|gmo|gmx|gn|godaddy|gold|goldpoint|golf|goo|goodhands|goodyear|goog|google|gop|got|gov|gp|gq|gr|grainger|graphics|gratis|green|gripe|grocery|group|gs|gt|gu|guardian|gucci|guge|guide|guitars|guru|gw|gy|hair|hamburg|hangout|haus|hbo|hdfc|hdfcbank|health|healthcare|help|helsinki|here|hermes|hgtv|hiphop|hisamitsu|hitachi|hiv|hk|hkt|hm|hn|hockey|holdings|holiday|homedepot|homegoods|homes|homesense|honda|honeywell|horse|hospital|host|hosting|hot|hoteles|hotels|hotmail|house|how|hr|hsbc|ht|htc|hu|hughes|hyatt|hyundai|ibm|icbc|ice|icu|id|ie|ieee|ifm|ikano|il|im|imamat|imdb|immo|immobilien|in|industries|infiniti|info|ing|ink|institute|insurance|insure|int|intel|international|intuit|investments|io|ipiranga|iq|ir|irish|is|iselect|ismaili|ist|istanbul|it|itau|itv|iveco|iwc|jaguar|java|jcb|jcp|je|jeep|jetzt|jewelry|jio|jlc|jll|jm|jmp|jnj|jo|jobs|joburg|jot|joy|jp|jpmorgan|jprs|juegos|juniper|kaufen|kddi|ke|kerryhotels|kerrylogistics|kerryproperties|kfh|kg|kh|ki|kia|kim|kinder|kindle|kitchen|kiwi|km|kn|koeln|komatsu|kosher|kp|kpmg|kpn|kr|krd|kred|kuokgroup|kw|ky|kyoto|kz|la|lacaixa|ladbrokes|lamborghini|lamer|lancaster|lancia|lancome|land|landrover|lanxess|lasalle|lat|latino|latrobe|law|lawyer|lb|lc|lds|lease|leclerc|lefrak|legal|lego|lexus|lgbt|li|liaison|lidl|life|lifeinsurance|lifestyle|lighting|like|lilly|limited|limo|lincoln|linde|link|lipsy|live|living|lixil|lk|loan|loans|locker|locus|loft|lol|london|lotte|lotto|love|lpl|lplfinancial|lr|ls|lt|ltd|ltda|lu|lundbeck|lupin|luxe|luxury|lv|ly|ma|macys|madrid|maif|maison|makeup|man|management|mango|map|market|marketing|markets|marriott|marshalls|maserati|mattel|mba|mc|mckinsey|md|me|med|media|meet|melbourne|meme|memorial|men|menu|meo|merckmsd|metlife|mg|mh|miami|microsoft|mil|mini|mint|mit|mitsubishi|mk|ml|mlb|mls|mm|mma|mn|mo|mobi|mobile|mobily|moda|moe|moi|mom|monash|money|monster|mopar|mormon|mortgage|moscow|moto|motorcycles|mov|movie|movistar|mp|mq|mr|ms|msd|mt|mtn|mtr|mu|museum|mutual|mv|mw|mx|my|mz|na|nab|nadex|nagoya|name|nationwide|natura|navy|nba|nc|ne|nec|net|netbank|netflix|network|neustar|new|newholland|news|next|nextdirect|nexus|nf|nfl|ng|ngo|nhk|ni|nico|nike|nikon|ninja|nissan|nissay|nl|no|nokia|northwesternmutual|norton|now|nowruz|nowtv|np|nr|nra|nrw|ntt|nu|nyc|nz|obi|observer|off|office|okinawa|olayan|olayangroup|oldnavy|ollo|om|omega|one|ong|onl|online|onyourside|ooo|open|oracle|orange|org|organic|origins|osaka|otsuka|ott|ovh|pa|page|panasonic|panerai|paris|pars|partners|parts|party|passagens|pay|pccw|pe|pet|pf|pfizer|pg|ph|pharmacy|phd|philips|phone|photo|photography|photos|physio|piaget|pics|pictet|pictures|pid|pin|ping|pink|pioneer|pizza|pk|pl|place|play|playstation|plumbing|plus|pm|pn|pnc|pohl|poker|politie|porn|post|pr|pramerica|praxi|press|prime|pro|prod|productions|prof|progressive|promo|properties|property|protection|pru|prudential|ps|pt|pub|pw|pwc|py|qa|qpon|quebec|quest|qvc|racing|radio|raid|re|read|realestate|realtor|realty|recipes|red|redstone|redumbrella|rehab|reise|reisen|reit|reliance|ren|rent|rentals|repair|report|republican|rest|restaurant|review|reviews|rexroth|rich|richardli|ricoh|rightathome|ril|rio|rip|rmit|ro|rocher|rocks|rodeo|rogers|room|rs|rsvp|ru|rugby|ruhr|run|rw|rwe|ryukyu|sa|saarland|safe|safety|sakura|sale|salon|samsclub|samsung|sandvik|sandvikcoromant|sanofi|sap|sapo|sarl|sas|save|saxo|sb|sbi|sbs|sc|sca|scb|schaeffler|schmidt|scholarships|school|schule|schwarz|science|scjohnson|scor|scot|sd|se|search|seat|secure|security|seek|select|sener|services|ses|seven|sew|sex|sexy|sfr|sg|sh|shangrila|sharp|shaw|shell|shia|shiksha|shoes|shop|shopping|shouji|show|showtime|shriram|si|silk|sina|singles|site|sj|sk|ski|skin|sky|skype|sl|sling|sm|smart|smile|sn|sncf|so|soccer|social|softbank|software|sohu|solar|solutions|song|sony|soy|space|spiegel|spot|spreadbetting|sr|srl|srt|st|stada|staples|star|starhub|statebank|statefarm|statoil|stc|stcgroup|stockholm|storage|store|stream|studio|study|style|su|sucks|supplies|supply|support|surf|surgery|suzuki|sv|swatch|swiftcover|swiss|sx|sy|sydney|symantec|systems|sz|tab|taipei|talk|taobao|target|tatamotors|tatar|tattoo|tax|taxi|tc|tci|td|tdk|team|tech|technology|tel|telecity|telefonica|temasek|tennis|teva|tf|tg|th|thd|theater|theatre|tiaa|tickets|tienda|tiffany|tips|tires|tirol|tj|tjmaxx|tjx|tk|tkmaxx|tl|tm|tmall|tn|to|today|tokyo|tools|top|toray|toshiba|total|tours|town|toyota|toys|tr|trade|trading|training|travel|travelchannel|travelers|travelersinsurance|trust|trv|tt|tube|tui|tunes|tushu|tv|tvs|tw|tz|ua|ubank|ubs|uconnect|ug|uk|unicom|university|uno|uol|ups|us|uy|uz|va|vacations|vana|vanguard|vc|ve|vegas|ventures|verisign|versicherung|vet|vg|vi|viajes|video|vig|viking|villas|vin|vip|virgin|visa|vision|vista|vistaprint|viva|vivo|vlaanderen|vn|vodka|volkswagen|volvo|vote|voting|voto|voyage|vu|vuelos|wales|walmart|walter|wang|wanggou|warman|watch|watches|weather|weatherchannel|webcam|weber|website|wed|wedding|weibo|weir|wf|whoswho|wien|wiki|williamhill|win|windows|wine|winners|wme|wolterskluwer|woodside|work|works|world|wow|ws|wtc|wtf|xbox|xerox|xfinity|xihuan|xin|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--30rr7y|xn--3bst00m|xn--3ds443g|xn--3e0b707e|xn--3hcrj9c|xn--3oq18vl8pn36a|xn--3pxu8k|xn--42c2d9a|xn--45br5cyl|xn--45brj9c|xn--45q11c|xn--4gbrim|xn--54b7fta0cc|xn--55qw42g|xn--55qx5d|xn--5su34j936bgsg|xn--5tzm5g|xn--6frz82g|xn--6qq986b3xl|xn--80adxhks|xn--80ao21a|xn--80aqecdr1a|xn--80asehdb|xn--80aswg|xn--8y0a063a|xn--90a3ac|xn--90ae|xn--90ais|xn--9dbq2a|xn--9et52u|xn--9krt00a|xn--b4w605ferd|xn--bck1b9a5dre4c|xn--c1avg|xn--c2br7g|xn--cck2b3b|xn--cg4bki|xn--clchc0ea0b2g2a9gcd|xn--czr694b|xn--czrs0t|xn--czru2d|xn--d1acj3b|xn--d1alf|xn--e1a4c|xn--eckvdtc9d|xn--efvy88h|xn--estv75g|xn--fct429k|xn--fhbei|xn--fiq228c5hs|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--fjq720a|xn--flw351e|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--fzys8d69uvgm|xn--g2xx48c|xn--gckr3f0f|xn--gecrj9c|xn--gk3at1e|xn--h2breg3eve|xn--h2brj9c|xn--h2brj9c8c|xn--hxt814e|xn--i1b6b1a6a2e|xn--imr513n|xn--io0a7i|xn--j1aef|xn--j1amh|xn--j6w193g|xn--jlq61u9w7b|xn--jvr189m|xn--kcrx77d1x4a|xn--kprw13d|xn--kpry57d|xn--kpu716f|xn--kput3i|xn--l1acc|xn--lgbbat1ad8j|xn--mgb9awbf|xn--mgba3a3ejt|xn--mgba3a4f16a|xn--mgba7c0bbn0a|xn--mgbaakc7dvf|xn--mgbaam7a8h|xn--mgbab2bd|xn--mgbai9azgqp6j|xn--mgbayh7gpa|xn--mgbb9fbpob|xn--mgbbh1a|xn--mgbbh1a71e|xn--mgbc0a9azcg|xn--mgbca7dzdo|xn--mgberp4a5d4ar|xn--mgbgu82a|xn--mgbi4ecexp|xn--mgbpl2fh|xn--mgbt3dhd|xn--mgbtx2b|xn--mgbx4cd0ab|xn--mix891f|xn--mk1bu44c|xn--mxtq1m|xn--ngbc5azd|xn--ngbe9e0a|xn--ngbrx|xn--node|xn--nqv7f|xn--nqv7fs00ema|xn--nyqy26a|xn--o3cw4h|xn--ogbpf8fl|xn--p1acf|xn--p1ai|xn--pbt977c|xn--pgbs0dh|xn--pssy2u|xn--q9jyb4c|xn--qcka1pmc|xn--qxam|xn--rhqv96g|xn--rovu88b|xn--rvc1e0am3e|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--tckwe|xn--tiq49xqyj|xn--unup4y|xn--vermgensberater-ctb|xn--vermgensberatung-pwb|xn--vhquv|xn--vuq861b|xn--w4r85el8fhu5dnra|xn--w4rs40l|xn--wgbh1c|xn--wgbl6a|xn--xhq521b|xn--xkc2al3hye2a|xn--xkc2dl3a5ee0h|xn--y9a3aq|xn--yfro4i67o|xn--ygbi2ammx|xn--zfr164b|xperia|xxx|xyz|yachts|yahoo|yamaxun|yandex|ye|yodobashi|yoga|yokohama|you|youtube|yt|yun|za|zappos|zara|zero|zip|zippo|zm|zone|zuerich|zw".split("|"); -var NUMBERS = "0123456789".split(""); -var ALPHANUM = "0123456789abcdefghijklmnopqrstuvwxyz".split(""); -var WHITESPACE = [" ", "\f", "\r", " ", "\v", "\xA0", "\u1680", "\u180E"]; -var domainStates = []; -var makeState$1 = function makeState(tokenClass) { - return new _state$1.CharacterState(tokenClass); +const alignment = { + none: "", + left: ' align="left"', + right: ' align="right"', + center: ' align="center"' }; -var S_START$1 = makeState$1(); -var S_NUM = makeState$1(_text$2.NUM); -var S_DOMAIN$1 = makeState$1(_text$2.DOMAIN); -var S_DOMAIN_HYPHEN = makeState$1(); -var S_WS = makeState$1(_text$2.WS); -S_START$1.on("@", makeState$1(_text$2.AT)).on(".", makeState$1(_text$2.DOT)).on("+", makeState$1(_text$2.PLUS)).on("#", makeState$1(_text$2.POUND)).on("?", makeState$1(_text$2.QUERY)).on("/", makeState$1(_text$2.SLASH)).on("_", makeState$1(_text$2.UNDERSCORE)).on(":", makeState$1(_text$2.COLON)).on("{", makeState$1(_text$2.OPENBRACE)).on("[", makeState$1(_text$2.OPENBRACKET)).on("<", makeState$1(_text$2.OPENANGLEBRACKET)).on("(", makeState$1(_text$2.OPENPAREN)).on("}", makeState$1(_text$2.CLOSEBRACE)).on("]", makeState$1(_text$2.CLOSEBRACKET)).on(">", makeState$1(_text$2.CLOSEANGLEBRACKET)).on(")", makeState$1(_text$2.CLOSEPAREN)).on("&", makeState$1(_text$2.AMPERSAND)).on([",", ";", "!", '"', "'"], makeState$1(_text$2.PUNCTUATION)); -S_START$1.on("\n", makeState$1(_text$2.NL)).on(WHITESPACE, S_WS); -S_WS.on(WHITESPACE, S_WS); -for (var i = 0; i < tlds.length; i++) { - var newStates = (0, _state$1.stateify)(tlds[i], S_START$1, _text$2.TLD, _text$2.DOMAIN); - domainStates.push.apply(domainStates, newStates); -} -var partialProtocolFileStates = (0, _state$1.stateify)("file", S_START$1, _text$2.DOMAIN, _text$2.DOMAIN); -var partialProtocolFtpStates = (0, _state$1.stateify)("ftp", S_START$1, _text$2.DOMAIN, _text$2.DOMAIN); -var partialProtocolHttpStates = (0, _state$1.stateify)("http", S_START$1, _text$2.DOMAIN, _text$2.DOMAIN); -var partialProtocolMailtoStates = (0, _state$1.stateify)("mailto", S_START$1, _text$2.DOMAIN, _text$2.DOMAIN); -domainStates.push.apply(domainStates, partialProtocolFileStates); -domainStates.push.apply(domainStates, partialProtocolFtpStates); -domainStates.push.apply(domainStates, partialProtocolHttpStates); -domainStates.push.apply(domainStates, partialProtocolMailtoStates); -var S_PROTOCOL_FILE = partialProtocolFileStates.pop(); -var S_PROTOCOL_FTP = partialProtocolFtpStates.pop(); -var S_PROTOCOL_HTTP = partialProtocolHttpStates.pop(); -var S_MAILTO$1 = partialProtocolMailtoStates.pop(); -var S_PROTOCOL_SECURE = makeState$1(_text$2.DOMAIN); -var S_FULL_PROTOCOL = makeState$1(_text$2.PROTOCOL); -var S_FULL_MAILTO = makeState$1(_text$2.MAILTO); -S_PROTOCOL_FTP.on("s", S_PROTOCOL_SECURE).on(":", S_FULL_PROTOCOL); -S_PROTOCOL_HTTP.on("s", S_PROTOCOL_SECURE).on(":", S_FULL_PROTOCOL); -domainStates.push(S_PROTOCOL_SECURE); -S_PROTOCOL_FILE.on(":", S_FULL_PROTOCOL); -S_PROTOCOL_SECURE.on(":", S_FULL_PROTOCOL); -S_MAILTO$1.on(":", S_FULL_MAILTO); -var partialLocalhostStates = (0, _state$1.stateify)("localhost", S_START$1, _text$2.LOCALHOST, _text$2.DOMAIN); -domainStates.push.apply(domainStates, partialLocalhostStates); -S_START$1.on(NUMBERS, S_NUM); -S_NUM.on("-", S_DOMAIN_HYPHEN).on(NUMBERS, S_NUM).on(ALPHANUM, S_DOMAIN$1); -S_DOMAIN$1.on("-", S_DOMAIN_HYPHEN).on(ALPHANUM, S_DOMAIN$1); -for (var _i = 0; _i < domainStates.length; _i++) { - domainStates[_i].on("-", S_DOMAIN_HYPHEN).on(ALPHANUM, S_DOMAIN$1); -} -S_DOMAIN_HYPHEN.on("-", S_DOMAIN_HYPHEN).on(NUMBERS, S_DOMAIN$1).on(ALPHANUM, S_DOMAIN$1); -S_START$1.defaultTransition = makeState$1(_text$2.SYM); -var run$2 = function run(str) { - var lowerStr = str.replace(/[A-Z]/g, function(c) { - return c.toLowerCase(); - }); - var len = str.length; - var tokens = []; - var cursor = 0; - while (cursor < len) { - var state2 = S_START$1; - var nextState = null; - var tokenLength = 0; - var latestAccepting = null; - var sinceAccepts = -1; - while (cursor < len && (nextState = state2.next(lowerStr[cursor]))) { - state2 = nextState; - if (state2.accepts()) { - sinceAccepts = 0; - latestAccepting = state2; - } else if (sinceAccepts >= 0) { - sinceAccepts++; - } - tokenLength++; - cursor++; - } - if (sinceAccepts < 0) { - continue; +const gfmTableHtml = { + enter: { + table(token) { + const tableAlign = token._align; + this.lineEndingIfNeeded(); + this.tag(""); + this.setData("tableAlign", tableAlign); + }, + tableBody() { + this.tag(""); + }, + tableData() { + const tableAlign = this.getData("tableAlign"); + const tableColumn = this.getData("tableColumn"); + const align = alignment[tableAlign[tableColumn]]; + if (align === void 0) { + this.buffer(); + } else { + this.lineEndingIfNeeded(); + this.tag(""); + } + }, + tableHead() { + this.lineEndingIfNeeded(); + this.tag(""); + }, + tableHeader() { + const tableAlign = this.getData("tableAlign"); + const tableColumn = this.getData("tableColumn"); + const align = alignment[tableAlign[tableColumn]]; + this.lineEndingIfNeeded(); + this.tag(""); + }, + tableRow() { + this.setData("tableColumn", 0); + this.lineEndingIfNeeded(); + this.tag(""); } - cursor -= sinceAccepts; - tokenLength -= sinceAccepts; - var TOKEN = latestAccepting.emit(); - tokens.push(new TOKEN(str.substr(cursor - tokenLength, tokenLength))); - } - return tokens; -}; -var start = S_START$1; -scanner$1.State = _state$1.CharacterState; -scanner$1.TOKENS = TOKENS; -scanner$1.run = run$2; -scanner$1.start = start; -var parser$1 = {}; -var multi = {}; -multi.__esModule = true; -multi.URL = multi.TEXT = multi.NL = multi.EMAIL = multi.MAILTOEMAIL = multi.Base = void 0; -var _createTokenClass = createTokenClass$1; -var _class$1 = _class$4; -var _text$1 = text$1; -function isDomainToken(token) { - return token instanceof _text$1.DOMAIN || token instanceof _text$1.TLD; -} -var MultiToken = (0, _createTokenClass.createTokenClass)(); -MultiToken.prototype = { - type: "token", - isLink: false, - toString: function toString2() { - var result = []; - for (var i = 0; i < this.v.length; i++) { - result.push(this.v[i].toString()); - } - return result.join(""); }, - toHref: function toHref() { - return this.toString(); - }, - toObject: function toObject() { - var protocol = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "http"; - return { - type: this.type, - value: this.toString(), - href: this.toHref(protocol) - }; + exit: { + codeTextData(token) { + let value = this.sliceSerialize(token); + if (this.getData("tableAlign")) { + value = value.replace(/\\([\\|])/g, replace); + } + this.raw(this.encode(value)); + }, + table() { + this.setData("tableAlign"); + this.setData("slurpAllLineEndings"); + this.lineEndingIfNeeded(); + this.tag("
    "); + }, + tableBody() { + this.lineEndingIfNeeded(); + this.tag(""); + }, + tableData() { + const tableAlign = this.getData("tableAlign"); + const tableColumn = this.getData("tableColumn"); + if (tableColumn in tableAlign) { + this.tag(""); + this.setData("tableColumn", tableColumn + 1); + } else { + this.resume(); + } + }, + tableHead() { + this.lineEndingIfNeeded(); + this.tag(""); + }, + tableHeader() { + const tableColumn = this.getData("tableColumn"); + this.tag(""); + this.setData("tableColumn", tableColumn + 1); + }, + tableRow() { + const tableAlign = this.getData("tableAlign"); + let tableColumn = this.getData("tableColumn"); + while (tableColumn < tableAlign.length) { + this.lineEndingIfNeeded(); + this.tag(""); + tableColumn++; + } + this.setData("tableColumn", tableColumn); + this.lineEndingIfNeeded(); + this.tag(""); + } } }; -var MAILTOEMAIL = (0, _class$1.inherits)(MultiToken, (0, _createTokenClass.createTokenClass)(), { - type: "email", - isLink: true -}); -var EMAIL = (0, _class$1.inherits)(MultiToken, (0, _createTokenClass.createTokenClass)(), { - type: "email", - isLink: true, - toHref: function toHref2() { - return "mailto:" + this.toString(); +function replace($0, $1) { + return $1 === "|" ? $1 : $0; +} +class EditMap { + constructor() { + this.map = []; } -}); -var TEXT = (0, _class$1.inherits)(MultiToken, (0, _createTokenClass.createTokenClass)(), { type: "text" }); -var NL = (0, _class$1.inherits)(MultiToken, (0, _createTokenClass.createTokenClass)(), { type: "nl" }); -var URL$1 = (0, _class$1.inherits)(MultiToken, (0, _createTokenClass.createTokenClass)(), { - type: "url", - isLink: true, - toHref: function toHref3() { - var protocol = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "http"; - var hasProtocol2 = false; - var hasSlashSlash = false; - var tokens = this.v; - var result = []; - var i = 0; - while (tokens[i] instanceof _text$1.PROTOCOL) { - hasProtocol2 = true; - result.push(tokens[i].toString().toLowerCase()); - i++; - } - while (tokens[i] instanceof _text$1.SLASH) { - hasSlashSlash = true; - result.push(tokens[i].toString()); - i++; + add(index, remove2, add2) { + addImpl(this, index, remove2, add2); + } + consume(events) { + this.map.sort((a, b) => a[0] - b[0]); + if (this.map.length === 0) { + return; } - while (isDomainToken(tokens[i])) { - result.push(tokens[i].toString().toLowerCase()); - i++; + let index = this.map.length; + const vecs = []; + while (index > 0) { + index -= 1; + vecs.push(events.slice(this.map[index][0] + this.map[index][1])); + vecs.push(this.map[index][2]); + events.length = this.map[index][0]; } - for (; i < tokens.length; i++) { - result.push(tokens[i].toString()); + vecs.push([...events]); + events.length = 0; + let slice = vecs.pop(); + while (slice) { + events.push(...slice); + slice = vecs.pop(); } - result = result.join(""); - if (!(hasProtocol2 || hasSlashSlash)) { - result = protocol + "://" + result; + this.map.length = 0; + } +} +function addImpl(editMap, at, remove2, add2) { + let index = 0; + if (remove2 === 0 && add2.length === 0) { + return; + } + while (index < editMap.map.length) { + if (editMap.map[index][0] === at) { + editMap.map[index][1] += remove2; + editMap.map[index][2].push(...add2); + return; } - return result; - }, - hasProtocol: function hasProtocol() { - return this.v[0] instanceof _text$1.PROTOCOL; + index += 1; } -}); -multi.Base = MultiToken; -multi.MAILTOEMAIL = MAILTOEMAIL; -multi.EMAIL = EMAIL; -multi.NL = NL; -multi.TEXT = TEXT; -multi.URL = URL$1; -parser$1.__esModule = true; -parser$1.start = parser$1.run = parser$1.TOKENS = parser$1.State = void 0; -var _state = state; -var _multi = multi; -var MULTI_TOKENS = _interopRequireWildcard$1(_multi); -var _text = text$1; -function _interopRequireWildcard$1(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) - newObj[key] = obj[key]; + editMap.map.push([at, remove2, add2]); +} +function gfmTableAlign(events, index) { + let inDelimiterRow = false; + const align = []; + while (index < events.length) { + const event = events[index]; + if (inDelimiterRow) { + if (event[0] === "enter") { + if (event[1].type === "tableContent") { + align.push( + events[index + 1][1].type === "tableDelimiterMarker" ? "left" : "none" + ); + } + } else if (event[1].type === "tableContent") { + if (events[index - 1][1].type === "tableDelimiterMarker") { + const alignIndex = align.length - 1; + align[alignIndex] = align[alignIndex] === "left" ? "center" : "right"; + } + } else if (event[1].type === "tableDelimiterRow") { + break; } + } else if (event[0] === "enter" && event[1].type === "tableDelimiterRow") { + inDelimiterRow = true; } - newObj.default = obj; - return newObj; + index += 1; } + return align; } -var makeState2 = function makeState3(tokenClass) { - return new _state.TokenState(tokenClass); +const gfmTable = { + flow: { + null: { + tokenize: tokenizeTable, + resolveAll: resolveTable + } + } }; -var S_START = makeState2(); -var S_PROTOCOL = makeState2(); -var S_MAILTO = makeState2(); -var S_PROTOCOL_SLASH = makeState2(); -var S_PROTOCOL_SLASH_SLASH = makeState2(); -var S_DOMAIN = makeState2(); -var S_DOMAIN_DOT = makeState2(); -var S_TLD = makeState2(_multi.URL); -var S_TLD_COLON = makeState2(); -var S_TLD_PORT = makeState2(_multi.URL); -var S_URL = makeState2(_multi.URL); -var S_URL_NON_ACCEPTING = makeState2(); -var S_URL_OPENBRACE = makeState2(); -var S_URL_OPENBRACKET = makeState2(); -var S_URL_OPENANGLEBRACKET = makeState2(); -var S_URL_OPENPAREN = makeState2(); -var S_URL_OPENBRACE_Q = makeState2(_multi.URL); -var S_URL_OPENBRACKET_Q = makeState2(_multi.URL); -var S_URL_OPENANGLEBRACKET_Q = makeState2(_multi.URL); -var S_URL_OPENPAREN_Q = makeState2(_multi.URL); -var S_URL_OPENBRACE_SYMS = makeState2(); -var S_URL_OPENBRACKET_SYMS = makeState2(); -var S_URL_OPENANGLEBRACKET_SYMS = makeState2(); -var S_URL_OPENPAREN_SYMS = makeState2(); -var S_EMAIL_DOMAIN = makeState2(); -var S_EMAIL_DOMAIN_DOT = makeState2(); -var S_EMAIL = makeState2(_multi.EMAIL); -var S_EMAIL_COLON = makeState2(); -var S_EMAIL_PORT = makeState2(_multi.EMAIL); -var S_MAILTO_EMAIL = makeState2(_multi.MAILTOEMAIL); -var S_MAILTO_EMAIL_NON_ACCEPTING = makeState2(); -var S_LOCALPART = makeState2(); -var S_LOCALPART_AT = makeState2(); -var S_LOCALPART_DOT = makeState2(); -var S_NL = makeState2(_multi.NL); -S_START.on(_text.NL, S_NL).on(_text.PROTOCOL, S_PROTOCOL).on(_text.MAILTO, S_MAILTO).on(_text.SLASH, S_PROTOCOL_SLASH); -S_PROTOCOL.on(_text.SLASH, S_PROTOCOL_SLASH); -S_PROTOCOL_SLASH.on(_text.SLASH, S_PROTOCOL_SLASH_SLASH); -S_START.on(_text.TLD, S_DOMAIN).on(_text.DOMAIN, S_DOMAIN).on(_text.LOCALHOST, S_TLD).on(_text.NUM, S_DOMAIN); -S_PROTOCOL_SLASH_SLASH.on(_text.TLD, S_URL).on(_text.DOMAIN, S_URL).on(_text.NUM, S_URL).on(_text.LOCALHOST, S_URL); -S_DOMAIN.on(_text.DOT, S_DOMAIN_DOT); -S_EMAIL_DOMAIN.on(_text.DOT, S_EMAIL_DOMAIN_DOT); -S_DOMAIN_DOT.on(_text.TLD, S_TLD).on(_text.DOMAIN, S_DOMAIN).on(_text.NUM, S_DOMAIN).on(_text.LOCALHOST, S_DOMAIN); -S_EMAIL_DOMAIN_DOT.on(_text.TLD, S_EMAIL).on(_text.DOMAIN, S_EMAIL_DOMAIN).on(_text.NUM, S_EMAIL_DOMAIN).on(_text.LOCALHOST, S_EMAIL_DOMAIN); -S_TLD.on(_text.DOT, S_DOMAIN_DOT); -S_EMAIL.on(_text.DOT, S_EMAIL_DOMAIN_DOT); -S_TLD.on(_text.COLON, S_TLD_COLON).on(_text.SLASH, S_URL); -S_TLD_COLON.on(_text.NUM, S_TLD_PORT); -S_TLD_PORT.on(_text.SLASH, S_URL); -S_EMAIL.on(_text.COLON, S_EMAIL_COLON); -S_EMAIL_COLON.on(_text.NUM, S_EMAIL_PORT); -var qsAccepting = [_text.DOMAIN, _text.AT, _text.LOCALHOST, _text.NUM, _text.PLUS, _text.POUND, _text.PROTOCOL, _text.SLASH, _text.TLD, _text.UNDERSCORE, _text.SYM, _text.AMPERSAND]; -var qsNonAccepting = [_text.COLON, _text.DOT, _text.QUERY, _text.PUNCTUATION, _text.CLOSEBRACE, _text.CLOSEBRACKET, _text.CLOSEANGLEBRACKET, _text.CLOSEPAREN, _text.OPENBRACE, _text.OPENBRACKET, _text.OPENANGLEBRACKET, _text.OPENPAREN]; -S_URL.on(_text.OPENBRACE, S_URL_OPENBRACE).on(_text.OPENBRACKET, S_URL_OPENBRACKET).on(_text.OPENANGLEBRACKET, S_URL_OPENANGLEBRACKET).on(_text.OPENPAREN, S_URL_OPENPAREN); -S_URL_NON_ACCEPTING.on(_text.OPENBRACE, S_URL_OPENBRACE).on(_text.OPENBRACKET, S_URL_OPENBRACKET).on(_text.OPENANGLEBRACKET, S_URL_OPENANGLEBRACKET).on(_text.OPENPAREN, S_URL_OPENPAREN); -S_URL_OPENBRACE.on(_text.CLOSEBRACE, S_URL); -S_URL_OPENBRACKET.on(_text.CLOSEBRACKET, S_URL); -S_URL_OPENANGLEBRACKET.on(_text.CLOSEANGLEBRACKET, S_URL); -S_URL_OPENPAREN.on(_text.CLOSEPAREN, S_URL); -S_URL_OPENBRACE_Q.on(_text.CLOSEBRACE, S_URL); -S_URL_OPENBRACKET_Q.on(_text.CLOSEBRACKET, S_URL); -S_URL_OPENANGLEBRACKET_Q.on(_text.CLOSEANGLEBRACKET, S_URL); -S_URL_OPENPAREN_Q.on(_text.CLOSEPAREN, S_URL); -S_URL_OPENBRACE_SYMS.on(_text.CLOSEBRACE, S_URL); -S_URL_OPENBRACKET_SYMS.on(_text.CLOSEBRACKET, S_URL); -S_URL_OPENANGLEBRACKET_SYMS.on(_text.CLOSEANGLEBRACKET, S_URL); -S_URL_OPENPAREN_SYMS.on(_text.CLOSEPAREN, S_URL); -S_URL_OPENBRACE.on(qsAccepting, S_URL_OPENBRACE_Q); -S_URL_OPENBRACKET.on(qsAccepting, S_URL_OPENBRACKET_Q); -S_URL_OPENANGLEBRACKET.on(qsAccepting, S_URL_OPENANGLEBRACKET_Q); -S_URL_OPENPAREN.on(qsAccepting, S_URL_OPENPAREN_Q); -S_URL_OPENBRACE.on(qsNonAccepting, S_URL_OPENBRACE_SYMS); -S_URL_OPENBRACKET.on(qsNonAccepting, S_URL_OPENBRACKET_SYMS); -S_URL_OPENANGLEBRACKET.on(qsNonAccepting, S_URL_OPENANGLEBRACKET_SYMS); -S_URL_OPENPAREN.on(qsNonAccepting, S_URL_OPENPAREN_SYMS); -S_URL_OPENBRACE_Q.on(qsAccepting, S_URL_OPENBRACE_Q); -S_URL_OPENBRACKET_Q.on(qsAccepting, S_URL_OPENBRACKET_Q); -S_URL_OPENANGLEBRACKET_Q.on(qsAccepting, S_URL_OPENANGLEBRACKET_Q); -S_URL_OPENPAREN_Q.on(qsAccepting, S_URL_OPENPAREN_Q); -S_URL_OPENBRACE_Q.on(qsNonAccepting, S_URL_OPENBRACE_Q); -S_URL_OPENBRACKET_Q.on(qsNonAccepting, S_URL_OPENBRACKET_Q); -S_URL_OPENANGLEBRACKET_Q.on(qsNonAccepting, S_URL_OPENANGLEBRACKET_Q); -S_URL_OPENPAREN_Q.on(qsNonAccepting, S_URL_OPENPAREN_Q); -S_URL_OPENBRACE_SYMS.on(qsAccepting, S_URL_OPENBRACE_Q); -S_URL_OPENBRACKET_SYMS.on(qsAccepting, S_URL_OPENBRACKET_Q); -S_URL_OPENANGLEBRACKET_SYMS.on(qsAccepting, S_URL_OPENANGLEBRACKET_Q); -S_URL_OPENPAREN_SYMS.on(qsAccepting, S_URL_OPENPAREN_Q); -S_URL_OPENBRACE_SYMS.on(qsNonAccepting, S_URL_OPENBRACE_SYMS); -S_URL_OPENBRACKET_SYMS.on(qsNonAccepting, S_URL_OPENBRACKET_SYMS); -S_URL_OPENANGLEBRACKET_SYMS.on(qsNonAccepting, S_URL_OPENANGLEBRACKET_SYMS); -S_URL_OPENPAREN_SYMS.on(qsNonAccepting, S_URL_OPENPAREN_SYMS); -S_URL.on(qsAccepting, S_URL); -S_URL_NON_ACCEPTING.on(qsAccepting, S_URL); -S_URL.on(qsNonAccepting, S_URL_NON_ACCEPTING); -S_URL_NON_ACCEPTING.on(qsNonAccepting, S_URL_NON_ACCEPTING); -S_MAILTO.on(_text.TLD, S_MAILTO_EMAIL).on(_text.DOMAIN, S_MAILTO_EMAIL).on(_text.NUM, S_MAILTO_EMAIL).on(_text.LOCALHOST, S_MAILTO_EMAIL); -S_MAILTO_EMAIL.on(qsAccepting, S_MAILTO_EMAIL).on(qsNonAccepting, S_MAILTO_EMAIL_NON_ACCEPTING); -S_MAILTO_EMAIL_NON_ACCEPTING.on(qsAccepting, S_MAILTO_EMAIL).on(qsNonAccepting, S_MAILTO_EMAIL_NON_ACCEPTING); -var localpartAccepting = [_text.DOMAIN, _text.NUM, _text.PLUS, _text.POUND, _text.QUERY, _text.UNDERSCORE, _text.SYM, _text.AMPERSAND, _text.TLD]; -S_DOMAIN.on(localpartAccepting, S_LOCALPART).on(_text.AT, S_LOCALPART_AT); -S_TLD.on(localpartAccepting, S_LOCALPART).on(_text.AT, S_LOCALPART_AT); -S_DOMAIN_DOT.on(localpartAccepting, S_LOCALPART); -S_LOCALPART.on(localpartAccepting, S_LOCALPART).on(_text.AT, S_LOCALPART_AT).on(_text.DOT, S_LOCALPART_DOT); -S_LOCALPART_DOT.on(localpartAccepting, S_LOCALPART); -S_LOCALPART_AT.on(_text.TLD, S_EMAIL_DOMAIN).on(_text.DOMAIN, S_EMAIL_DOMAIN).on(_text.LOCALHOST, S_EMAIL); -var run$1 = function run2(tokens) { - var len = tokens.length; - var cursor = 0; - var multis = []; - var textTokens = []; - while (cursor < len) { - var state2 = S_START; - var secondState = null; - var nextState = null; - var multiLength = 0; - var latestAccepting = null; - var sinceAccepts = -1; - while (cursor < len && !(secondState = state2.next(tokens[cursor]))) { - textTokens.push(tokens[cursor++]); - } - while (cursor < len && (nextState = secondState || state2.next(tokens[cursor]))) { - secondState = null; - state2 = nextState; - if (state2.accepts()) { - sinceAccepts = 0; - latestAccepting = state2; - } else if (sinceAccepts >= 0) { - sinceAccepts++; - } - cursor++; - multiLength++; - } - if (sinceAccepts < 0) { - for (var i = cursor - multiLength; i < cursor; i++) { - textTokens.push(tokens[i]); - } - } else { - if (textTokens.length > 0) { - multis.push(new _multi.TEXT(textTokens)); - textTokens = []; +function tokenizeTable(effects, ok, nok) { + const self2 = this; + let size2 = 0; + let sizeB = 0; + let seen; + return start; + function start(code2) { + let index = self2.events.length - 1; + while (index > -1) { + const type = self2.events[index][1].type; + if (type === "lineEnding" || type === "linePrefix") + index--; + else + break; + } + const tail = index > -1 ? self2.events[index][1].type : null; + const next = tail === "tableHead" || tail === "tableRow" ? bodyRowStart : headRowBefore; + if (next === bodyRowStart && self2.parser.lazy[self2.now().line]) { + return nok(code2); + } + return next(code2); + } + function headRowBefore(code2) { + effects.enter("tableHead"); + effects.enter("tableRow"); + return headRowStart(code2); + } + function headRowStart(code2) { + if (code2 === 124) { + return headRowBreak(code2); + } + seen = true; + sizeB += 1; + return headRowBreak(code2); + } + function headRowBreak(code2) { + if (code2 === null) { + return nok(code2); + } + if (markdownLineEnding(code2)) { + if (sizeB > 1) { + sizeB = 0; + self2.interrupt = true; + effects.exit("tableRow"); + effects.enter("lineEnding"); + effects.consume(code2); + effects.exit("lineEnding"); + return headDelimiterStart; + } + return nok(code2); + } + if (markdownSpace(code2)) { + return factorySpace(effects, headRowBreak, "whitespace")(code2); + } + sizeB += 1; + if (seen) { + seen = false; + size2 += 1; + } + if (code2 === 124) { + effects.enter("tableCellDivider"); + effects.consume(code2); + effects.exit("tableCellDivider"); + seen = true; + return headRowBreak; + } + effects.enter("data"); + return headRowData(code2); + } + function headRowData(code2) { + if (code2 === null || code2 === 124 || markdownLineEndingOrSpace(code2)) { + effects.exit("data"); + return headRowBreak(code2); + } + effects.consume(code2); + return code2 === 92 ? headRowEscape : headRowData; + } + function headRowEscape(code2) { + if (code2 === 92 || code2 === 124) { + effects.consume(code2); + return headRowData; + } + return headRowData(code2); + } + function headDelimiterStart(code2) { + self2.interrupt = false; + if (self2.parser.lazy[self2.now().line]) { + return nok(code2); + } + effects.enter("tableDelimiterRow"); + seen = false; + if (markdownSpace(code2)) { + return factorySpace( + effects, + headDelimiterBefore, + "linePrefix", + self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + )(code2); + } + return headDelimiterBefore(code2); + } + function headDelimiterBefore(code2) { + if (code2 === 45 || code2 === 58) { + return headDelimiterValueBefore(code2); + } + if (code2 === 124) { + seen = true; + effects.enter("tableCellDivider"); + effects.consume(code2); + effects.exit("tableCellDivider"); + return headDelimiterCellBefore; + } + return headDelimiterNok(code2); + } + function headDelimiterCellBefore(code2) { + if (markdownSpace(code2)) { + return factorySpace(effects, headDelimiterValueBefore, "whitespace")(code2); + } + return headDelimiterValueBefore(code2); + } + function headDelimiterValueBefore(code2) { + if (code2 === 58) { + sizeB += 1; + seen = true; + effects.enter("tableDelimiterMarker"); + effects.consume(code2); + effects.exit("tableDelimiterMarker"); + return headDelimiterLeftAlignmentAfter; + } + if (code2 === 45) { + sizeB += 1; + return headDelimiterLeftAlignmentAfter(code2); + } + if (code2 === null || markdownLineEnding(code2)) { + return headDelimiterCellAfter(code2); + } + return headDelimiterNok(code2); + } + function headDelimiterLeftAlignmentAfter(code2) { + if (code2 === 45) { + effects.enter("tableDelimiterFiller"); + return headDelimiterFiller(code2); + } + return headDelimiterNok(code2); + } + function headDelimiterFiller(code2) { + if (code2 === 45) { + effects.consume(code2); + return headDelimiterFiller; + } + if (code2 === 58) { + seen = true; + effects.exit("tableDelimiterFiller"); + effects.enter("tableDelimiterMarker"); + effects.consume(code2); + effects.exit("tableDelimiterMarker"); + return headDelimiterRightAlignmentAfter; + } + effects.exit("tableDelimiterFiller"); + return headDelimiterRightAlignmentAfter(code2); + } + function headDelimiterRightAlignmentAfter(code2) { + if (markdownSpace(code2)) { + return factorySpace(effects, headDelimiterCellAfter, "whitespace")(code2); + } + return headDelimiterCellAfter(code2); + } + function headDelimiterCellAfter(code2) { + if (code2 === 124) { + return headDelimiterBefore(code2); + } + if (code2 === null || markdownLineEnding(code2)) { + if (!seen || size2 !== sizeB) { + return headDelimiterNok(code2); + } + effects.exit("tableDelimiterRow"); + effects.exit("tableHead"); + return ok(code2); + } + return headDelimiterNok(code2); + } + function headDelimiterNok(code2) { + return nok(code2); + } + function bodyRowStart(code2) { + effects.enter("tableRow"); + return bodyRowBreak(code2); + } + function bodyRowBreak(code2) { + if (code2 === 124) { + effects.enter("tableCellDivider"); + effects.consume(code2); + effects.exit("tableCellDivider"); + return bodyRowBreak; + } + if (code2 === null || markdownLineEnding(code2)) { + effects.exit("tableRow"); + return ok(code2); + } + if (markdownSpace(code2)) { + return factorySpace(effects, bodyRowBreak, "whitespace")(code2); + } + effects.enter("data"); + return bodyRowData(code2); + } + function bodyRowData(code2) { + if (code2 === null || code2 === 124 || markdownLineEndingOrSpace(code2)) { + effects.exit("data"); + return bodyRowBreak(code2); + } + effects.consume(code2); + return code2 === 92 ? bodyRowEscape : bodyRowData; + } + function bodyRowEscape(code2) { + if (code2 === 92 || code2 === 124) { + effects.consume(code2); + return bodyRowData; + } + return bodyRowData(code2); + } +} +function resolveTable(events, context) { + let index = -1; + let inFirstCellAwaitingPipe = true; + let rowKind = 0; + let lastCell = [0, 0, 0, 0]; + let cell = [0, 0, 0, 0]; + let afterHeadAwaitingFirstBodyRow = false; + let lastTableEnd = 0; + let currentTable; + let currentBody; + let currentCell; + const map = new EditMap(); + while (++index < events.length) { + const event = events[index]; + const token = event[1]; + if (event[0] === "enter") { + if (token.type === "tableHead") { + afterHeadAwaitingFirstBodyRow = false; + if (lastTableEnd !== 0) { + flushTableEnd(map, context, lastTableEnd, currentTable, currentBody); + currentBody = void 0; + lastTableEnd = 0; + } + currentTable = { + type: "table", + start: Object.assign({}, token.start), + end: Object.assign({}, token.end) + }; + map.add(index, 0, [["enter", currentTable, context]]); + } else if (token.type === "tableRow" || token.type === "tableDelimiterRow") { + inFirstCellAwaitingPipe = true; + currentCell = void 0; + lastCell = [0, 0, 0, 0]; + cell = [0, index + 1, 0, 0]; + if (afterHeadAwaitingFirstBodyRow) { + afterHeadAwaitingFirstBodyRow = false; + currentBody = { + type: "tableBody", + start: Object.assign({}, token.start), + end: Object.assign({}, token.end) + }; + map.add(index, 0, [["enter", currentBody, context]]); + } + rowKind = token.type === "tableDelimiterRow" ? 2 : currentBody ? 3 : 1; + } else if (rowKind && (token.type === "data" || token.type === "tableDelimiterMarker" || token.type === "tableDelimiterFiller")) { + inFirstCellAwaitingPipe = false; + if (cell[2] === 0) { + if (lastCell[1] !== 0) { + cell[0] = cell[1]; + currentCell = flushCell( + map, + context, + lastCell, + rowKind, + void 0, + currentCell + ); + lastCell = [0, 0, 0, 0]; + } + cell[2] = index; + } + } else if (token.type === "tableCellDivider") { + if (inFirstCellAwaitingPipe) { + inFirstCellAwaitingPipe = false; + } else { + if (lastCell[1] !== 0) { + cell[0] = cell[1]; + currentCell = flushCell( + map, + context, + lastCell, + rowKind, + void 0, + currentCell + ); + } + lastCell = cell; + cell = [lastCell[1], index, 0, 0]; + } + } + } else if (token.type === "tableHead") { + afterHeadAwaitingFirstBodyRow = true; + lastTableEnd = index; + } else if (token.type === "tableRow" || token.type === "tableDelimiterRow") { + lastTableEnd = index; + if (lastCell[1] !== 0) { + cell[0] = cell[1]; + currentCell = flushCell( + map, + context, + lastCell, + rowKind, + index, + currentCell + ); + } else if (cell[1] !== 0) { + currentCell = flushCell(map, context, cell, rowKind, index, currentCell); } - cursor -= sinceAccepts; - multiLength -= sinceAccepts; - var MULTI = latestAccepting.emit(); - multis.push(new MULTI(tokens.slice(cursor - multiLength, cursor))); + rowKind = 0; + } else if (rowKind && (token.type === "data" || token.type === "tableDelimiterMarker" || token.type === "tableDelimiterFiller")) { + cell[3] = index; } } - if (textTokens.length > 0) { - multis.push(new _multi.TEXT(textTokens)); + if (lastTableEnd !== 0) { + flushTableEnd(map, context, lastTableEnd, currentTable, currentBody); } - return multis; -}; -parser$1.State = _state.TokenState; -parser$1.TOKENS = MULTI_TOKENS; -parser$1.run = run$1; -parser$1.start = S_START; -linkify.__esModule = true; -linkify.tokenize = linkify.test = linkify.scanner = linkify.parser = linkify.options = linkify.inherits = linkify.find = void 0; -var _class = _class$4; -var _options = options$1; -var options = _interopRequireWildcard(_options); -var _scanner = scanner$1; -var scanner = _interopRequireWildcard(_scanner); -var _parser = parser$1; -var parser = _interopRequireWildcard(_parser); -function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) - newObj[key] = obj[key]; - } + map.consume(context.events); + index = -1; + while (++index < context.events.length) { + const event = context.events[index]; + if (event[0] === "enter" && event[1].type === "table") { + event[1]._align = gfmTableAlign(context.events, index); } - newObj.default = obj; - return newObj; } + return events; } -if (!Array.isArray) { - Array.isArray = function(arg) { - return Object.prototype.toString.call(arg) === "[object Array]"; +function flushCell(map, context, range, rowKind, rowEnd, previousCell) { + const groupName = rowKind === 1 ? "tableHeader" : rowKind === 2 ? "tableDelimiter" : "tableData"; + const valueName = "tableContent"; + if (range[0] !== 0) { + previousCell.end = Object.assign({}, getPoint(context.events, range[0])); + map.add(range[0], 0, [["exit", previousCell, context]]); + } + const now = getPoint(context.events, range[1]); + previousCell = { + type: groupName, + start: Object.assign({}, now), + end: Object.assign({}, now) }; -} -var tokenize = function tokenize2(str) { - return parser.run(scanner.run(str)); + map.add(range[1], 0, [["enter", previousCell, context]]); + if (range[2] !== 0) { + const relatedStart = getPoint(context.events, range[2]); + const relatedEnd = getPoint(context.events, range[3]); + const valueToken = { + type: valueName, + start: Object.assign({}, relatedStart), + end: Object.assign({}, relatedEnd) + }; + map.add(range[2], 0, [["enter", valueToken, context]]); + if (rowKind !== 2) { + const start = context.events[range[2]]; + const end = context.events[range[3]]; + start[1].end = Object.assign({}, end[1].end); + start[1].type = "chunkText"; + start[1].contentType = "text"; + if (range[3] > range[2] + 1) { + const a = range[2] + 1; + const b = range[3] - range[2] - 1; + map.add(a, b, []); + } + } + map.add(range[3] + 1, 0, [["exit", valueToken, context]]); + } + if (rowEnd !== void 0) { + previousCell.end = Object.assign({}, getPoint(context.events, rowEnd)); + map.add(rowEnd, 0, [["exit", previousCell, context]]); + previousCell = void 0; + } + return previousCell; +} +function flushTableEnd(map, context, index, table, tableBody) { + const exits = []; + const related = getPoint(context.events, index); + if (tableBody) { + tableBody.end = Object.assign({}, related); + exits.push(["exit", tableBody, context]); + } + table.end = Object.assign({}, related); + exits.push(["exit", table, context]); + map.add(index + 1, 0, exits); +} +function getPoint(events, index) { + const event = events[index]; + const side = event[0] === "enter" ? "start" : "end"; + return event[1][side]; +} +const reFlow = /<(\/?)(iframe|noembed|noframes|plaintext|script|style|title|textarea|xmp)(?=[\t\n\f\r />])/gi; +const reText = new RegExp("^" + reFlow.source, "i"); +const gfmTagfilterHtml = { + exit: { + htmlFlowData(token) { + exitHtmlData.call(this, token, reFlow); + }, + htmlTextData(token) { + exitHtmlData.call(this, token, reText); + } + } }; -var find = function find2(str) { - var type = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null; - var tokens = tokenize(str); - var filtered = []; - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (token.isLink && (!type || token.type === type)) { - filtered.push(token.toObject()); +function exitHtmlData(token, filter) { + let value = this.sliceSerialize(token); + if (this.options.allowDangerousHtml) { + value = value.replace(filter, "<$1$2"); + } + this.raw(this.encode(value)); +} +const gfmTaskListItemHtml = { + enter: { + taskListCheck() { + this.tag('"); + }, + taskListCheckValueChecked() { + this.tag('checked="" '); } } - return filtered; }; -var test4 = function test5(str) { - var type = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null; - var tokens = tokenize(str); - return tokens.length === 1 && tokens[0].isLink && (!type || tokens[0].type === type); +const tasklistCheck = { + tokenize: tokenizeTasklistCheck }; -linkify.find = find; -linkify.inherits = _class.inherits; -linkify.options = options; -linkify.parser = parser; -linkify.scanner = scanner; -linkify.test = test4; -linkify.tokenize = tokenize; -var linkifyjs = linkify; -var formatString$1 = (text2, doLinkify, textFormatting) => { - const typeMarkdown = { - bold: textFormatting.bold, - italic: textFormatting.italic, - strike: textFormatting.strike, - underline: textFormatting.underline, - multilineCode: textFormatting.multilineCode, - inlineCode: textFormatting.inlineCode +const gfmTaskListItem = { + text: { + [91]: tasklistCheck + } +}; +function tokenizeTasklistCheck(effects, ok, nok) { + const self2 = this; + return open; + function open(code2) { + if (self2.previous !== null || !self2._gfmTasklistFirstContentOfListItem) { + return nok(code2); + } + effects.enter("taskListCheck"); + effects.enter("taskListCheckMarker"); + effects.consume(code2); + effects.exit("taskListCheckMarker"); + return inside; + } + function inside(code2) { + if (markdownLineEndingOrSpace(code2)) { + effects.enter("taskListCheckValueUnchecked"); + effects.consume(code2); + effects.exit("taskListCheckValueUnchecked"); + return close; + } + if (code2 === 88 || code2 === 120) { + effects.enter("taskListCheckValueChecked"); + effects.consume(code2); + effects.exit("taskListCheckValueChecked"); + return close; + } + return nok(code2); + } + function close(code2) { + if (code2 === 93) { + effects.enter("taskListCheckMarker"); + effects.consume(code2); + effects.exit("taskListCheckMarker"); + effects.exit("taskListCheck"); + return after; + } + return nok(code2); + } + function after(code2) { + if (markdownLineEnding(code2)) { + return ok(code2); + } + if (markdownSpace(code2)) { + return effects.check( + { + tokenize: spaceThenNonSpace + }, + ok, + nok + )(code2); + } + return nok(code2); + } +} +function spaceThenNonSpace(effects, ok, nok) { + return factorySpace(effects, after, "whitespace"); + function after(code2) { + return code2 === null ? nok(code2) : ok(code2); + } +} +function gfm(options) { + return combineExtensions([ + gfmAutolinkLiteral, + gfmFootnote(), + gfmStrikethrough(options), + gfmTable, + gfmTaskListItem + ]); +} +function gfmHtml(options) { + return combineHtmlExtensions([ + gfmAutolinkLiteralHtml, + gfmFootnoteHtml(options), + gfmStrikethroughHtml, + gfmTableHtml, + gfmTagfilterHtml, + gfmTaskListItemHtml + ]); +} +const codes = { + carriageReturn: -5, + lineFeed: -4, + carriageReturnLineFeed: -3, + horizontalTab: -2, + virtualSpace: -1, + eof: null, + nul: 0, + soh: 1, + stx: 2, + etx: 3, + eot: 4, + enq: 5, + ack: 6, + bel: 7, + bs: 8, + ht: 9, + lf: 10, + vt: 11, + ff: 12, + cr: 13, + so: 14, + si: 15, + dle: 16, + dc1: 17, + dc2: 18, + dc3: 19, + dc4: 20, + nak: 21, + syn: 22, + etb: 23, + can: 24, + em: 25, + sub: 26, + esc: 27, + fs: 28, + gs: 29, + rs: 30, + us: 31, + space: 32, + exclamationMark: 33, + quotationMark: 34, + numberSign: 35, + dollarSign: 36, + percentSign: 37, + ampersand: 38, + apostrophe: 39, + leftParenthesis: 40, + rightParenthesis: 41, + asterisk: 42, + plusSign: 43, + comma: 44, + dash: 45, + dot: 46, + slash: 47, + digit0: 48, + digit1: 49, + digit2: 50, + digit3: 51, + digit4: 52, + digit5: 53, + digit6: 54, + digit7: 55, + digit8: 56, + digit9: 57, + colon: 58, + semicolon: 59, + lessThan: 60, + equalsTo: 61, + greaterThan: 62, + questionMark: 63, + atSign: 64, + uppercaseA: 65, + uppercaseB: 66, + uppercaseC: 67, + uppercaseD: 68, + uppercaseE: 69, + uppercaseF: 70, + uppercaseG: 71, + uppercaseH: 72, + uppercaseI: 73, + uppercaseJ: 74, + uppercaseK: 75, + uppercaseL: 76, + uppercaseM: 77, + uppercaseN: 78, + uppercaseO: 79, + uppercaseP: 80, + uppercaseQ: 81, + uppercaseR: 82, + uppercaseS: 83, + uppercaseT: 84, + uppercaseU: 85, + uppercaseV: 86, + uppercaseW: 87, + uppercaseX: 88, + uppercaseY: 89, + uppercaseZ: 90, + leftSquareBracket: 91, + backslash: 92, + rightSquareBracket: 93, + caret: 94, + underscore: 95, + graveAccent: 96, + lowercaseA: 97, + lowercaseB: 98, + lowercaseC: 99, + lowercaseD: 100, + lowercaseE: 101, + lowercaseF: 102, + lowercaseG: 103, + lowercaseH: 104, + lowercaseI: 105, + lowercaseJ: 106, + lowercaseK: 107, + lowercaseL: 108, + lowercaseM: 109, + lowercaseN: 110, + lowercaseO: 111, + lowercaseP: 112, + lowercaseQ: 113, + lowercaseR: 114, + lowercaseS: 115, + lowercaseT: 116, + lowercaseU: 117, + lowercaseV: 118, + lowercaseW: 119, + lowercaseX: 120, + lowercaseY: 121, + lowercaseZ: 122, + leftCurlyBrace: 123, + verticalBar: 124, + rightCurlyBrace: 125, + tilde: 126, + del: 127, + degree: 176, + byteOrderMarker: 65279, + replacementCharacter: 65533 +}; +const underlineTokenize = (effects, ok, nok) => { + const inside = (code2) => { + if (code2 === codes.carriageReturn || code2 === codes.lineFeed || code2 === codes.carriageReturnLineFeed || code2 === codes.eof) { + return nok(code2); + } + if (code2 === codes.backslash) { + effects.consume(code2); + return insideEscape; + } + if (code2 === codes.degree) { + effects.exit("underlineContent"); + effects.enter("underlineMarker"); + effects.consume(code2); + effects.exit("underlineMarker"); + effects.exit("underline"); + return ok; + } + effects.consume(code2); + return inside; }; - const pseudoMarkdown = { - [typeMarkdown.bold]: { - end: "\\" + typeMarkdown.bold, - allowed_chars: ".", - type: "bold" - }, - [typeMarkdown.italic]: { - end: typeMarkdown.italic, - allowed_chars: ".", - type: "italic" - }, - [typeMarkdown.strike]: { - end: typeMarkdown.strike, - allowed_chars: ".", - type: "strike" - }, - [typeMarkdown.underline]: { - end: typeMarkdown.underline, - allowed_chars: ".", - type: "underline" - }, - [typeMarkdown.multilineCode]: { - end: typeMarkdown.multilineCode, - allowed_chars: "(.|\n)", - type: "multiline-code" - }, - [typeMarkdown.inlineCode]: { - end: typeMarkdown.inlineCode, - allowed_chars: ".", - type: "inline-code" - }, - "": { - allowed_chars: ".", - end: "", - type: "tag" + const insideEscape = (code2) => { + if (code2 === codes.backslash || code2 === codes.degree) { + effects.consume(code2); + return inside; } + return inside(code2); + }; + const begin = (code2) => code2 === codes.degree ? nok(code2) : inside(code2); + return (code2) => { + effects.enter("underline"); + effects.enter("underlineMarker"); + effects.consume(code2); + effects.exit("underlineMarker"); + effects.enter("underlineContent", { contentType: "string" }); + return begin; }; - const json = compileToJSON(text2, pseudoMarkdown); - const html = compileToHTML(json, pseudoMarkdown); - const result = [].concat.apply([], html); - if (doLinkify) - linkifyResult(result); - return result; }; -function compileToJSON(str, pseudoMarkdown) { - let result = []; - let minIndexOf = -1; - let minIndexOfKey = null; - let links = linkifyjs.find(str); - let minIndexFromLink = false; - if (links.length > 0) { - minIndexOf = str.indexOf(links[0].value); - minIndexFromLink = true; - } - Object.keys(pseudoMarkdown).forEach((startingValue) => { - const io = str.indexOf(startingValue); - if (io >= 0 && (minIndexOf < 0 || io < minIndexOf)) { - minIndexOf = io; - minIndexOfKey = startingValue; - minIndexFromLink = false; +const underlineConstruct = { name: "underline", tokenize: underlineTokenize }; +const underline = { text: { 176: underlineConstruct } }; +const underlineHtml = { + enter: { + underline() { + this.tag(""); + } + }, + exit: { + underline() { + this.tag(""); } - }); - if (minIndexFromLink && minIndexOfKey !== -1) { - let strLeft = str.substr(0, minIndexOf); - let strLink = str.substr(minIndexOf, links[0].value.length); - let strRight = str.substr(minIndexOf + links[0].value.length); - result.push(strLeft); - result.push(strLink); - result = result.concat(compileToJSON(strRight, pseudoMarkdown)); - return result; } - if (minIndexOfKey) { - let strLeft = str.substr(0, minIndexOf); - const char = minIndexOfKey; - let strRight = str.substr(minIndexOf + char.length); - if (str.replace(/\s/g, "").length === char.length * 2) { - return [str]; - } - const match = strRight.match( - new RegExp( - "^(" + (pseudoMarkdown[char].allowed_chars || ".") + "*" + (pseudoMarkdown[char].end ? "?" : "") + ")" + (pseudoMarkdown[char].end ? "(" + pseudoMarkdown[char].end + ")" : ""), - "m" - ) - ); - if (!match || !match[1]) { - strLeft = strLeft + char; - result.push(strLeft); - } else { - if (strLeft) { - result.push(strLeft); - } - const object = { - start: char, - content: compileToJSON(match[1], pseudoMarkdown), - end: match[2], - type: pseudoMarkdown[char].type - }; - result.push(object); - strRight = strRight.substr(match[0].length); +}; +const usertagTokenize = (effects, ok, nok) => { + const inside = (code2) => { + if (code2 === codes.carriageReturn || code2 === codes.lineFeed || code2 === codes.carriageReturnLineFeed || code2 === codes.eof) { + return nok(code2); + } + if (code2 === codes.backslash) { + effects.consume(code2); + return insideEscape; + } + if (code2 === codes.greaterThan) { + effects.exit("usertagContent"); + effects.enter("usertagMarker"); + effects.consume(code2); + effects.exit("usertagMarker"); + effects.exit("usertag"); + return ok; + } + effects.consume(code2); + return inside; + }; + const insideEscape = (code2) => { + if (code2 === codes.backslash || code2 === codes.greaterThan) { + effects.consume(code2); + return inside; } - result = result.concat(compileToJSON(strRight, pseudoMarkdown)); - return result; - } else { - if (str) { - return [str]; - } else { - return []; + return inside(code2); + }; + const begin = (code2) => { + if (code2 === codes.atSign) { + effects.consume(code2); + effects.exit("usertagMarker"); + effects.enter("usertagContent"); + return inside; + } + return nok(code2); + }; + return (code2) => { + effects.enter("usertag"); + effects.enter("usertagMarker"); + effects.consume(code2); + return begin; + }; +}; +const usertagConstruct = { name: "usertag", tokenize: usertagTokenize }; +const usertag = { text: { 60: usertagConstruct } }; +const usertagHtml = (users) => ({ + exit: { + usertagContent(token) { + const userId = this.sliceSerialize(token); + this.tag(``); + const user = users.find((user2) => user2._id === userId); + this.raw(`@${this.encode(user ? user.username : userId)}`); + this.tag(""); } } -} -function compileToHTML(json, pseudoMarkdown) { - const result = []; - json.forEach((item) => { - if (typeof item === "string") { - result.push({ types: [], value: item }); - } else { - if (pseudoMarkdown[item.start]) { - result.push(parseContent(item)); +}); +var markdown = (text2, { textFormatting }) => { + if (textFormatting) { + let gfmDisabled = []; + if (!textFormatting.linkify) { + gfmDisabled = ["literalAutolink", "literalAutolinkEmail"]; + } + const markdown2 = micromark( + text2.replaceAll("", "<@").replaceAll("", ">"), + { + extensions: [ + { + ...gfm(), + disable: { null: gfmDisabled } + }, + underline, + usertag + ], + htmlExtensions: [ + gfmHtml(), + underlineHtml, + usertagHtml(textFormatting.users) + ] } + ); + if (textFormatting.singleLine) { + const element2 = document.createElement("div"); + element2.innerHTML = markdown2; + return [ + { + types: [], + value: element2.innerText + } + ]; } - }); - return result; -} -function parseContent(item) { - const result = []; - iterateContent(item, result, []); - return result; -} -function iterateContent(item, result, types) { - item.content.forEach((it) => { - if (typeof it === "string") { - result.push({ - types: removeDuplicates(types.concat([item.type])), - value: it - }); - } else { - iterateContent( - it, - result, - removeDuplicates([it.type].concat([item.type]).concat(types)) - ); + return [ + { + types: ["markdown"], + value: markdown2 + } + ]; + } + return [ + { + types: [], + value: text2 } - }); -} -function removeDuplicates(items) { - return [...new Set(items)]; -} -function linkifyResult(array) { - const result = []; - array.forEach((arr) => { - const links = linkifyjs.find(arr.value); - if (links.length) { - const spaces = arr.value.replace(links[0].value, ""); - result.push({ types: arr.types, value: spaces }); - arr.types = ["url"].concat(arr.types); - arr.href = links[0].href; - arr.value = links[0].value; - } - result.push(arr); - }); - return result; -} + ]; +}; const IMAGE_TYPES = ["png", "jpg", "jpeg", "webp", "svg", "gif"]; const VIDEO_TYPES = ["mp4", "video/ogg", "webm", "quicktime"]; const AUDIO_TYPES = ["mp3", "audio/ogg", "wav", "mpeg"]; @@ -6480,35 +11913,32 @@ const _sfc_main$n = { }, emits: ["open-user-tag"], computed: { - linkifiedMessage() { + parsedMessage() { if (this.deleted) { return [{ value: this.textMessages.MESSAGE_DELETED }]; } - const message = formatString$1( - this.formatTags(this.content), - this.linkify && !this.linkOptions.disabled, - this.textFormatting - ); + let options; + if (!this.textFormatting.disabled) { + options = { + textFormatting: { + linkify: this.linkify, + linkOptions: this.linkOptions, + singleLine: this.singleLine, + reply: this.reply, + users: this.users, + ...this.textFormatting + } + }; + } else { + options = {}; + } + const message = markdown(this.content, options); message.forEach((m) => { - m.url = this.checkType(m, "url"); - m.bold = this.checkType(m, "bold"); - m.italic = this.checkType(m, "italic"); - m.strike = this.checkType(m, "strike"); - m.underline = this.checkType(m, "underline"); - m.inline = this.checkType(m, "inline-code"); - m.multiline = this.checkType(m, "multiline-code"); + m.markdown = this.checkType(m, "markdown"); m.tag = this.checkType(m, "tag"); m.image = this.checkImageType(m); - m.value = this.replaceEmojiByElement(m.value); }); return message; - }, - formattedContent() { - if (this.deleted) { - return this.textMessages.MESSAGE_DELETED; - } else { - return this.formatTags(this.content); - } } }, methods: { @@ -6536,92 +11966,42 @@ const _sfc_main$n = { image.removeEventListener("load", onLoad); } }, - formatTags(content) { - const firstTag = ""; - const secondTag = ""; - const usertags = [...content.matchAll(new RegExp(firstTag, "gi"))].map( - (a) => a.index - ); - const initialContent = content; - usertags.forEach((index) => { - const userId = initialContent.substring( - index + firstTag.length, - initialContent.indexOf(secondTag, index) - ); - const user = this.users.find((user2) => user2._id === userId); - content = content.replaceAll(userId, `@${(user == null ? void 0 : user.username) || "unknown"}`); - }); - return content; - }, - openTag(message) { - if (!this.singleLine && this.checkType(message, "tag")) { - const user = this.users.find( - (u) => message.value.indexOf(u.username) !== -1 - ); + openTag(event) { + const userId = event.target.getAttribute("data-user-id"); + if (!this.singleLine && userId) { + const user = this.users.find((u) => String(u._id) === userId); this.$emit("open-user-tag", user); } - }, - replaceEmojiByElement(value) { - let emojiSize; - if (this.singleLine) { - emojiSize = 16; - } else { - const onlyEmojis = this.containsOnlyEmojis(); - emojiSize = onlyEmojis ? 28 : 20; - } - return value.replaceAll( - /[\p{Extended_Pictographic}\u{1F3FB}-\u{1F3FF}\u{1F9B0}-\u{1F9B3}]/gu, - (v) => { - return `${v}`; - } - ); - }, - containsOnlyEmojis() { - const onlyEmojis = this.content.replace( - new RegExp("[\0-\u1EEFf]", "g"), - "" - ); - const visibleChars = this.content.replace( - new RegExp("[\n\rs]+|( )+", "g"), - "" - ); - return onlyEmojis.length === visibleChars.length; } } }; -const _hoisted_1$n = { class: "vac-image-link-container" }; -const _hoisted_2$k = { class: "vac-image-link-message" }; -const _hoisted_3$h = ["innerHTML"]; -const _hoisted_4$g = ["innerHTML"]; +const _hoisted_1$n = ["innerHTML"]; +const _hoisted_2$k = { class: "vac-image-link-container" }; +const _hoisted_3$h = { class: "vac-image-link-message" }; function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) { const _component_svg_icon = resolveComponent("svg-icon"); return openBlock(), createElementBlock("div", { class: normalizeClass(["vac-format-message-wrapper", { "vac-text-ellipsis": $props.singleLine }]) }, [ - !$props.textFormatting.disabled ? (openBlock(), createElementBlock("div", { - key: 0, - class: normalizeClass({ "vac-text-ellipsis": $props.singleLine }) - }, [ - (openBlock(true), createElementBlock(Fragment, null, renderList($options.linkifiedMessage, (message, i) => { - return openBlock(), createElementBlock("div", { - key: i, - class: "vac-format-container" + (openBlock(true), createElementBlock(Fragment, null, renderList($options.parsedMessage, (message, i) => { + return openBlock(), createElementBlock(Fragment, { key: i }, [ + message.markdown ? (openBlock(), createElementBlock("div", { + key: 0, + class: "markdown", + onClick: _cache[0] || (_cache[0] = (...args) => $options.openTag && $options.openTag(...args)), + innerHTML: message.value + }, null, 8, _hoisted_1$n)) : (openBlock(), createElementBlock("div", { + key: 1, + class: normalizeClass(["vac-format-container", { "vac-text-ellipsis": $props.singleLine }]) }, [ (openBlock(), createBlock(resolveDynamicComponent(message.url ? "a" : "span"), { class: normalizeClass({ "vac-text-ellipsis": $props.singleLine, - "vac-text-bold": message.bold, - "vac-text-italic": $props.deleted || message.italic, - "vac-text-strike": message.strike, - "vac-text-underline": message.underline, - "vac-text-inline-code": !$props.singleLine && message.inline, - "vac-text-multiline-code": !$props.singleLine && message.multiline, "vac-text-tag": !$props.singleLine && !$props.reply && message.tag }), href: message.href, target: message.href ? $props.linkOptions.target : null, - rel: message.href ? $props.linkOptions.rel : null, - onClick: ($event) => $options.openTag(message) + rel: message.href ? $props.linkOptions.rel : null }, { default: withCtx(() => [ $props.deleted ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ @@ -6638,7 +12018,7 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) { ), createTextVNode(" " + toDisplayString($props.textMessages.MESSAGE_DELETED), 1) ], 64)) : message.url && message.image ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [ - createBaseVNode("div", _hoisted_1$n, [ + createBaseVNode("div", _hoisted_2$k, [ createBaseVNode("div", { class: "vac-image-link", style: normalizeStyle({ @@ -6647,22 +12027,16 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) { }) }, null, 4) ]), - createBaseVNode("div", _hoisted_2$k, [ - createBaseVNode("span", null, toDisplayString(message.value), 1) - ]) - ], 64)) : (openBlock(), createElementBlock("span", { - key: 2, - innerHTML: message.value - }, null, 8, _hoisted_3$h)) + createBaseVNode("div", _hoisted_3$h, toDisplayString(message.value), 1) + ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [ + createTextVNode(toDisplayString(message.value), 1) + ], 64)) ]), _: 2 - }, 1032, ["class", "href", "target", "rel", "onClick"])) - ]); - }), 128)) - ], 2)) : (openBlock(), createElementBlock("div", { - key: 1, - innerHTML: $options.formattedContent - }, null, 8, _hoisted_4$g)) + }, 1032, ["class", "href", "target", "rel"])) + ], 2)) + ], 64); + }), 128)) ], 2); } var FormatMessage = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n]]); @@ -6701,8 +12075,8 @@ const onFauxIframeClick = ({ el, event, handler, middleware }) => { }, 0); }; const onEvent = ({ el, event, handler, middleware }) => { - const path = event.path || event.composedPath && event.composedPath(); - const isClickOutside = path ? path.indexOf(el) < 0 : !el.contains(event.target); + const path2 = event.path || event.composedPath && event.composedPath(); + const isClickOutside = path2 ? path2.indexOf(el) < 0 : !el.contains(event.target); if (!isClickOutside) { return; } @@ -6829,19 +12203,19 @@ const _sfc_main$m = { const isTyping = this.typingUsers; if (isTyping) return isTyping; - const content = this.room.lastMessage.content; + const content2 = this.room.lastMessage.content; if (this.room.users.length <= 2) { - return content; + return content2; } const user = this.room.users.find( (user2) => user2._id === this.room.lastMessage.senderId ); if (this.room.lastMessage.username) { - return `${this.room.lastMessage.username} - ${content}`; + return `${this.room.lastMessage.username} - ${content2}`; } else if (!user || user._id === this.currentUserId) { - return content; + return content2; } - return `${user.username} - ${content}`; + return `${user.username} - ${content2}`; }, userStatus() { if (!this.room.users || this.room.users.length !== 2) @@ -7035,8 +12409,8 @@ var filteredItems = (items, prop, val, startsWith = false) => { return formatString(v[prop]).includes(formatString(val)); }); }; -function formatString(string) { - return string.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, ""); +function formatString(string2) { + return string2.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, ""); } const _sfc_main$l = { name: "RoomsList", @@ -7124,7 +12498,7 @@ const _sfc_main$l = { } const loader = this.$el.querySelector("#infinite-loader-rooms"); if (loader) { - const options2 = { + const options = { root: this.$el.querySelector("#rooms-list"), rootMargin: `${this.scrollDistance}px`, threshold: 0 @@ -7133,7 +12507,7 @@ const _sfc_main$l = { if (entries[0].isIntersecting) { this.loadMoreRooms(); } - }, options2); + }, options); this.observer.observe(loader); } }, @@ -7560,13 +12934,13 @@ function initialMigration(db) { const openReqs = {}; const databaseCache = {}; const onCloseListeners = {}; -function handleOpenOrDeleteReq(resolve3, reject, req) { +function handleOpenOrDeleteReq(resolve2, reject, req) { req.onerror = () => reject(req.error); req.onblocked = () => reject(new Error("IDB blocked")); - req.onsuccess = () => resolve3(req.result); + req.onsuccess = () => resolve2(req.result); } async function createDatabase(dbName) { - const db = await new Promise((resolve3, reject) => { + const db = await new Promise((resolve2, reject) => { const req = indexedDB.open(dbName, DB_VERSION_CURRENT); openReqs[dbName] = req; req.onupgradeneeded = (e) => { @@ -7574,7 +12948,7 @@ async function createDatabase(dbName) { initialMigration(req.result); } }; - handleOpenOrDeleteReq(resolve3, reject, req); + handleOpenOrDeleteReq(resolve2, reject, req); }); db.onclose = () => closeDatabase(dbName); return db; @@ -7586,14 +12960,14 @@ function openDatabase(dbName) { return databaseCache[dbName]; } function dbPromise(db, storeName, readOnlyOrReadWrite, cb) { - return new Promise((resolve3, reject) => { + return new Promise((resolve2, reject) => { const txn = db.transaction(storeName, readOnlyOrReadWrite, { durability: "relaxed" }); const store = typeof storeName === "string" ? txn.objectStore(storeName) : storeName.map((name) => txn.objectStore(name)); let res; cb(store, txn, (result) => { res = result; }); - txn.oncomplete = () => resolve3(res); + txn.oncomplete = () => resolve2(res); txn.onerror = () => reject(txn.error); }); } @@ -7614,10 +12988,10 @@ function closeDatabase(dbName) { delete onCloseListeners[dbName]; } function deleteDatabase(dbName) { - return new Promise((resolve3, reject) => { + return new Promise((resolve2, reject) => { closeDatabase(dbName); const req = indexedDB.deleteDatabase(dbName); - handleOpenOrDeleteReq(resolve3, reject, req); + handleOpenOrDeleteReq(resolve2, reject, req); }); } function addOnCloseListener(dbName, listener) { @@ -7744,10 +13118,10 @@ function findCommonMembers(arrays, uniqByFunc) { return results; } async function isEmpty(db) { - return !await get2(db, STORE_KEYVALUE, KEY_URL); + return !await get(db, STORE_KEYVALUE, KEY_URL); } async function hasData(db, url, eTag) { - const [oldETag, oldUrl] = await Promise.all([KEY_ETAG, KEY_URL].map((key) => get2(db, STORE_KEYVALUE, key))); + const [oldETag, oldUrl] = await Promise.all([KEY_ETAG, KEY_URL].map((key) => get(db, STORE_KEYVALUE, key))); return oldETag === eTag && oldUrl === url; } async function doFullDatabaseScanForSingleResult(db, predicate) { @@ -7859,7 +13233,7 @@ async function getEmojiByUnicode(db, unicode) { getIDB(emojiStore.index(INDEX_SKIN_UNICODE), unicode, (result2) => cb(result2 || null)); })); } -function get2(db, storeName, key) { +function get(db, storeName, key) { return dbPromise(db, storeName, MODE_READONLY, (store, txn, cb) => getIDB(store, key, cb)); } function set(db, storeName, key, value) { @@ -7930,7 +13304,7 @@ function trie(arr, itemToTokens) { valuesAtCoda.push(item); } } - const search = (query, exact) => { + const search2 = (query, exact) => { let currentMap = map; for (let i = 0; i < query.length; i++) { const char = query.charAt(i); @@ -7960,7 +13334,7 @@ function trie(arr, itemToTokens) { } return results; }; - return search; + return search2; } const requiredKeys$1 = [ "name", @@ -7981,7 +13355,7 @@ function customEmojiIndex(customEmojis) { const searchTrie = trie(customEmojis, emojiToTokens); const searchByExactMatch = (_) => searchTrie(_, true); const searchByPrefix = (_) => searchTrie(_, false); - const search = (query) => { + const search2 = (query) => { const tokens = extractTokens(query); const intermediateResults = tokens.map((token, i) => (i < tokens.length - 1 ? searchByExactMatch : searchByPrefix)(token)); return findCommonMembers(intermediateResults, (_) => _.name).sort(sortByName); @@ -7998,7 +13372,7 @@ function customEmojiIndex(customEmojis) { const byName = (name) => nameToEmoji.get(name.toLowerCase()); return { all, - search, + search: search2, byShortcode, byName }; @@ -8188,7 +13562,7 @@ class Database { } async getPreferredSkinTone() { await this.ready(); - return await get2(this._db, STORE_KEYVALUE, KEY_PREFERRED_SKINTONE) || 0; + return await get(this._db, STORE_KEYVALUE, KEY_PREFERRED_SKINTONE) || 0; } async setPreferredSkinTone(skinTone) { assertNumber(skinTone); @@ -8232,14 +13606,14 @@ class Database { } function noop() { } -function run3(fn) { +function run(fn) { return fn(); } function blank_object() { return /* @__PURE__ */ Object.create(null); } function run_all(fns) { - fns.forEach(run3); + fns.forEach(run); } function is_function(thing) { return typeof thing === "function"; @@ -8276,9 +13650,9 @@ function element(name) { function text(data) { return document.createTextNode(data); } -function listen(node, event, handler, options2) { - node.addEventListener(event, handler, options2); - return () => node.removeEventListener(event, handler, options2); +function listen(node, event, handler, options) { + node.addEventListener(event, handler, options); + return () => node.removeEventListener(event, handler, options); } function attr(node, attribute, value) { if (value == null) @@ -8378,9 +13752,9 @@ function destroy_block(block, lookup) { block.d(1); lookup.delete(block.key); } -function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block2, next2, get_context) { +function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list2, lookup, node, destroy, create_each_block2, next, get_context) { let o = old_blocks.length; - let n = list.length; + let n = list2.length; let i = o; const old_indexes = {}; while (i--) @@ -8390,7 +13764,7 @@ function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, looku const deltas = /* @__PURE__ */ new Map(); i = n; while (i--) { - const child_ctx = get_context(ctx, list, i); + const child_ctx = get_context(ctx, list2, i); const key = get_key(child_ctx); let block = lookup.get(key); if (!block) { @@ -8407,9 +13781,9 @@ function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, looku const did_move = /* @__PURE__ */ new Set(); function insert2(block) { transition_in(block, 1); - block.m(node, next2); + block.m(node, next); lookup.set(block.key, block); - next2 = block.first; + next = block.first; n--; } while (o && n) { @@ -8418,7 +13792,7 @@ function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, looku const new_key = new_block.key; const old_key = old_block.key; if (new_block === old_block) { - next2 = new_block.first; + next = new_block.first; o--; n--; } else if (!new_lookup.has(old_key)) { @@ -8450,7 +13824,7 @@ function mount_component(component, target, anchor, customElement) { fragment && fragment.m(target, anchor); if (!customElement) { add_render_callback(() => { - const new_on_destroy = on_mount.map(run3).filter(is_function); + const new_on_destroy = on_mount.map(run).filter(is_function); if (on_destroy) { on_destroy.push(...new_on_destroy); } else { @@ -8478,7 +13852,7 @@ function make_dirty(component, i) { } component.$$.dirty[i / 31 | 0] |= 1 << i % 31; } -function init(component, options2, instance2, create_fragment2, not_equal, props, append_styles, dirty = [-1]) { +function init(component, options, instance2, create_fragment2, not_equal, props, append_styles, dirty = [-1]) { const parent_component = current_component; set_current_component(component); const $$ = component.$$ = { @@ -8497,11 +13871,11 @@ function init(component, options2, instance2, create_fragment2, not_equal, props callbacks: blank_object(), dirty, skip_bound: false, - root: options2.target || parent_component.$$.root + root: options.target || parent_component.$$.root }; append_styles && append_styles($$.root); let ready = false; - $$.ctx = instance2 ? instance2(component, options2.props || {}, (i, ret, ...rest) => { + $$.ctx = instance2 ? instance2(component, options.props || {}, (i, ret, ...rest) => { const value = rest.length ? rest[0] : ret; if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { if (!$$.skip_bound && $$.bound[i]) @@ -8515,11 +13889,11 @@ function init(component, options2, instance2, create_fragment2, not_equal, props ready = true; run_all($$.before_update); $$.fragment = create_fragment2 ? create_fragment2($$.ctx) : false; - if (options2.target) { + if (options.target) { { $$.fragment && $$.fragment.c(); } - mount_component(component, options2.target, void 0, void 0); + mount_component(component, options.target, void 0, void 0); flush(); } set_current_component(parent_component); @@ -8634,7 +14008,7 @@ function determineEmojiSupportLevel() { } return entries[0][1]; } -const emojiSupportLevelPromise = new Promise((resolve3) => rIC(() => resolve3(determineEmojiSupportLevel()))); +const emojiSupportLevelPromise = new Promise((resolve2) => rIC(() => resolve2(determineEmojiSupportLevel()))); const supportedZwjEmojis = /* @__PURE__ */ new Map(); const VARIATION_SELECTOR = "\uFE0F"; const SKINTONE_MODIFIER = "\uD83C"; @@ -8741,32 +14115,32 @@ function uniq(arr) { return uniqBy(arr, (_) => _); } const { Map: Map_1 } = globals; -function get_each_context(ctx, list, i) { +function get_each_context(ctx, list2, i) { const child_ctx = ctx.slice(); - child_ctx[63] = list[i]; + child_ctx[63] = list2[i]; child_ctx[65] = i; return child_ctx; } -function get_each_context_1(ctx, list, i) { +function get_each_context_1(ctx, list2, i) { const child_ctx = ctx.slice(); - child_ctx[66] = list[i]; + child_ctx[66] = list2[i]; child_ctx[65] = i; return child_ctx; } -function get_each_context_2(ctx, list, i) { +function get_each_context_2(ctx, list2, i) { const child_ctx = ctx.slice(); - child_ctx[63] = list[i]; + child_ctx[63] = list2[i]; child_ctx[65] = i; return child_ctx; } -function get_each_context_3(ctx, list, i) { +function get_each_context_3(ctx, list2, i) { const child_ctx = ctx.slice(); - child_ctx[69] = list[i]; + child_ctx[69] = list2[i]; return child_ctx; } -function get_each_context_4(ctx, list, i) { +function get_each_context_4(ctx, list2, i) { const child_ctx = ctx.slice(); - child_ctx[72] = list[i]; + child_ctx[72] = list2[i]; child_ctx[65] = i; return child_ctx; } @@ -9669,9 +15043,9 @@ function instance($$self, $$props, $$invalidate) { if (!searchMode || !currentEmojis.length) { return; } - const goToNextOrPrevious = (previous) => { + const goToNextOrPrevious = (previous2) => { halt(event); - $$invalidate(5, activeSearchItem = incrementOrDecrement(previous, activeSearchItem, currentEmojis)); + $$invalidate(5, activeSearchItem = incrementOrDecrement(previous2, activeSearchItem, currentEmojis)); }; switch (event.key) { case "ArrowDown": @@ -10083,11 +15457,11 @@ function instance($$self, $$props, $$invalidate) { ]; } class Picker extends SvelteComponent { - constructor(options2) { + constructor(options) { super(); init( this, - options2, + options, instance, create_fragment, safe_not_equal, @@ -10294,7 +15668,7 @@ const _sfc_main$j = { padding-right: 2px; padding-left: 2px; }`; - const search = `input.search { + const search2 = `input.search { height: 32px; font-size: 14px; border-radius: 10rem; @@ -10305,7 +15679,7 @@ const _sfc_main$j = { color: var(--chat-color); }`; const style = document.createElement("style"); - style.textContent = picker + nav + searchBox + search; + style.textContent = picker + nav + searchBox + search2; this.$refs.emojiPicker.shadowRoot.appendChild(style); }, openEmoji(ev) { @@ -11464,7 +16838,7 @@ function NewMDCT() { -69618e-9 / 2384e-9 ]; var NS = 12; - var NL2 = 36; + var NL = 36; var win = [ [ 2382191739347913e-28, @@ -12138,7 +17512,7 @@ function NewMDCT() { mdct_short(mdct_enc, mdct_encPos); } else { var work = new_float$e(18); - for (var k = -NL2 / 4; k < 0; k++) { + for (var k = -NL / 4; k < 0; k++) { var a, b; a = win[type][k + 27] * band1[k + 9][order[band]] + win[type][k + 36] * band1[8 - k][order[band]]; b = win[type][k + 9] * band0[k + 9][order[band]] - win[type][k + 18] * band0[8 - k][order[band]]; @@ -14662,11 +20036,11 @@ function PsyModel() { } b_frq[i] = sfreq * j; for (var sfb = 0; sfb < sbmax; sfb++) { - var i1, i2, start2, end; + var i1, i2, start, end; var arg; - start2 = scalepos[sfb]; + start = scalepos[sfb]; end = scalepos[sfb + 1]; - i1 = 0 | Math.floor(0.5 + deltafreq * (start2 - 0.5)); + i1 = 0 | Math.floor(0.5 + deltafreq * (start - 0.5)); if (i1 < 0) i1 = 0; i2 = 0 | Math.floor(0.5 + deltafreq * (end - 0.5)); @@ -19944,30 +25318,30 @@ function QuantizePVT() { var gfc = gfp.internal_flags; var samp_freq = gfp.out_samplerate; for (var sfb = 0; sfb < Encoder.SBMAX_l; sfb++) { - var start2 = gfc.scalefac_band.l[sfb]; + var start = gfc.scalefac_band.l[sfb]; var end = gfc.scalefac_band.l[sfb + 1]; ATH_l[sfb] = Float.MAX_VALUE; - for (var i = start2; i < end; i++) { + for (var i = start; i < end; i++) { var freq = i * samp_freq / (2 * 576); var ATH_f = ATHmdct(gfp, freq); ATH_l[sfb] = Math.min(ATH_l[sfb], ATH_f); } } for (var sfb = 0; sfb < Encoder.PSFB21; sfb++) { - var start2 = gfc.scalefac_band.psfb21[sfb]; + var start = gfc.scalefac_band.psfb21[sfb]; var end = gfc.scalefac_band.psfb21[sfb + 1]; ATH_psfb21[sfb] = Float.MAX_VALUE; - for (var i = start2; i < end; i++) { + for (var i = start; i < end; i++) { var freq = i * samp_freq / (2 * 576); var ATH_f = ATHmdct(gfp, freq); ATH_psfb21[sfb] = Math.min(ATH_psfb21[sfb], ATH_f); } } for (var sfb = 0; sfb < Encoder.SBMAX_s; sfb++) { - var start2 = gfc.scalefac_band.s[sfb]; + var start = gfc.scalefac_band.s[sfb]; var end = gfc.scalefac_band.s[sfb + 1]; ATH_s[sfb] = Float.MAX_VALUE; - for (var i = start2; i < end; i++) { + for (var i = start; i < end; i++) { var freq = i * samp_freq / (2 * 192); var ATH_f = ATHmdct(gfp, freq); ATH_s[sfb] = Math.min(ATH_s[sfb], ATH_f); @@ -19975,10 +25349,10 @@ function QuantizePVT() { ATH_s[sfb] *= gfc.scalefac_band.s[sfb + 1] - gfc.scalefac_band.s[sfb]; } for (var sfb = 0; sfb < Encoder.PSFB12; sfb++) { - var start2 = gfc.scalefac_band.psfb12[sfb]; + var start = gfc.scalefac_band.psfb12[sfb]; var end = gfc.scalefac_band.psfb12[sfb + 1]; ATH_psfb12[sfb] = Float.MAX_VALUE; - for (var i = start2; i < end; i++) { + for (var i = start; i < end; i++) { var freq = i * samp_freq / (2 * 192); var ATH_f = ATHmdct(gfp, freq); ATH_psfb12[sfb] = Math.min(ATH_psfb12[sfb], ATH_f); @@ -20434,9 +25808,9 @@ function QuantizePVT() { sfb2 = 22; } for (sfb = 0; sfb < sfb2; sfb++) { - var start2 = gfc.scalefac_band.l[sfb]; + var start = gfc.scalefac_band.l[sfb]; var end = gfc.scalefac_band.l[sfb + 1]; - var bw = end - start2; + var bw = end - start; for (en0 = 0; j < end; j++) en0 += cod_info.xr[j] * cod_info.xr[j]; en0 /= bw; @@ -20460,11 +25834,11 @@ function QuantizePVT() { if (cod_info.block_type == Encoder.SHORT_TYPE) { sfb2 = sfb; for (sfb = cod_info.sfb_smin; sfb < Encoder.SBMAX_s; sfb++) { - var start2 = gfc.scalefac_band.s[sfb]; + var start = gfc.scalefac_band.s[sfb]; var end = gfc.scalefac_band.s[sfb + 1]; - var bw = end - start2; + var bw = end - start; for (var i = 0; i < 3; i++) { - for (en0 = 0, l = start2; l < end; l++) { + for (en0 = 0, l = start; l < end; l++) { en0 += cod_info.xr[j] * cod_info.xr[j]; j++; } @@ -21793,12 +27167,12 @@ function BitStream$1() { } return bits; } - function Huffmancode(gfc, tableindex, start2, end, gi) { + function Huffmancode(gfc, tableindex, start, end, gi) { var h2 = Tables$1.ht[tableindex]; var bits = 0; if (tableindex == 0) return bits; - for (var i = start2; i < end; i += 2) { + for (var i = start; i < end; i += 2) { var cbits = 0; var xbits = 0; var linbits = h2.xlen; @@ -22929,8 +28303,8 @@ function Lame$1() { } for (var i = 0; i < Encoder.PSFB21 + 1; i++) { var size2 = (gfc.scalefac_band.l[22] - gfc.scalefac_band.l[21]) / Encoder.PSFB21; - var start2 = gfc.scalefac_band.l[21] + i * size2; - gfc.scalefac_band.psfb21[i] = start2; + var start = gfc.scalefac_band.l[21] + i * size2; + gfc.scalefac_band.psfb21[i] = start; } gfc.scalefac_band.psfb21[Encoder.PSFB21] = 576; for (var i = 0; i < Encoder.SBMAX_s + 1; i++) { @@ -22938,8 +28312,8 @@ function Lame$1() { } for (var i = 0; i < Encoder.PSFB12 + 1; i++) { var size2 = (gfc.scalefac_band.s[13] - gfc.scalefac_band.s[12]) / Encoder.PSFB12; - var start2 = gfc.scalefac_band.s[12] + i * size2; - gfc.scalefac_band.psfb12[i] = start2; + var start = gfc.scalefac_band.s[12] + i * size2; + gfc.scalefac_band.psfb12[i] = start; } gfc.scalefac_band.psfb12[Encoder.PSFB12] = 192; if (gfp.version == 1) { @@ -24502,12 +29876,12 @@ function Quantize() { if (cod_info.block_type != Encoder.SHORT_TYPE) { var stop = false; for (var gsfb = Encoder.PSFB21 - 1; gsfb >= 0 && !stop; gsfb--) { - var start2 = gfc.scalefac_band.psfb21[gsfb]; + var start = gfc.scalefac_band.psfb21[gsfb]; var end = gfc.scalefac_band.psfb21[gsfb + 1]; var ath21 = qupvt.athAdjust(ath.adjust, ath.psfb21[gsfb], ath.floor); if (gfc.nsPsy.longfact[21] > 1e-12) ath21 *= gfc.nsPsy.longfact[21]; - for (var j = end - 1; j >= start2; j--) { + for (var j = end - 1; j >= start; j--) { if (Math.abs(xr[j]) < ath21) xr[j] = 0; else { @@ -24520,12 +29894,12 @@ function Quantize() { for (var block = 0; block < 3; block++) { var stop = false; for (var gsfb = Encoder.PSFB12 - 1; gsfb >= 0 && !stop; gsfb--) { - var start2 = gfc.scalefac_band.s[12] * 3 + (gfc.scalefac_band.s[13] - gfc.scalefac_band.s[12]) * block + (gfc.scalefac_band.psfb12[gsfb] - gfc.scalefac_band.psfb12[0]); - var end = start2 + (gfc.scalefac_band.psfb12[gsfb + 1] - gfc.scalefac_band.psfb12[gsfb]); + var start = gfc.scalefac_band.s[12] * 3 + (gfc.scalefac_band.s[13] - gfc.scalefac_band.s[12]) * block + (gfc.scalefac_band.psfb12[gsfb] - gfc.scalefac_band.psfb12[0]); + var end = start + (gfc.scalefac_band.psfb12[gsfb + 1] - gfc.scalefac_band.psfb12[gsfb]); var ath12 = qupvt.athAdjust(ath.adjust, ath.psfb12[gsfb], ath.floor); if (gfc.nsPsy.shortfact[12] > 1e-12) ath12 *= gfc.nsPsy.shortfact[12]; - for (var j = end - 1; j >= start2; j--) { + for (var j = end - 1; j >= start; j--) { if (Math.abs(xr[j]) < ath12) xr[j] = 0; else { @@ -24581,10 +29955,10 @@ function Quantize() { var ix = gfc.scalefac_band.l[cod_info.sfb_lmax]; System$1.arraycopy(cod_info.xr, 0, ixwork, 0, 576); for (var sfb = cod_info.sfb_smin; sfb < Encoder.SBMAX_s; sfb++) { - var start2 = gfc.scalefac_band.s[sfb]; + var start = gfc.scalefac_band.s[sfb]; var end = gfc.scalefac_band.s[sfb + 1]; for (var window2 = 0; window2 < 3; window2++) { - for (var l = start2; l < end; l++) { + for (var l = start; l < end; l++) { cod_info.xr[ix++] = ixwork[3 * l + window2]; } } @@ -24618,9 +29992,9 @@ function Quantize() { var nBits; var CurrentStep = gfc.CurrentStep[ch]; var flagGoneOver = false; - var start2 = gfc.OldValue[ch]; + var start = gfc.OldValue[ch]; var Direction = BinSearchDirection.BINSEARCH_NONE; - cod_info.global_gain = start2; + cod_info.global_gain = start; desired_rate -= cod_info.part2_length; for (; ; ) { var step; @@ -24658,7 +30032,7 @@ function Quantize() { cod_info.global_gain++; nBits = tk.count_bits(gfc, xrpow, cod_info, null); } - gfc.CurrentStep[ch] = start2 - cod_info.global_gain >= 4 ? 4 : 2; + gfc.CurrentStep[ch] = start - cod_info.global_gain >= 4 ? 4 : 2; gfc.OldValue[ch] = cod_info.global_gain; cod_info.part2_3_length = nBits; return nBits; @@ -24681,7 +30055,7 @@ function Quantize() { sfb = 6; do { var allowedNoise, trancateThreshold; - var nsame, start2; + var nsame, start; var width = gi.width[sfb]; j += width; if (distort[sfb] >= 1) @@ -24691,26 +30065,26 @@ function Quantize() { continue; allowedNoise = (1 - distort[sfb]) * l3_xmin[sfb]; trancateThreshold = 0; - start2 = 0; + start = 0; do { var noise; - for (nsame = 1; start2 + nsame < width; nsame++) { + for (nsame = 1; start + nsame < width; nsame++) { if (BitStream.NEQ( - work[start2 + j - width], - work[start2 + j + nsame - width] + work[start + j - width], + work[start + j + nsame - width] )) { break; } } - noise = work[start2 + j - width] * work[start2 + j - width] * nsame; + noise = work[start + j - width] * work[start + j - width] * nsame; if (allowedNoise < noise) { - if (start2 != 0) - trancateThreshold = work[start2 + j - width - 1]; + if (start != 0) + trancateThreshold = work[start + j - width - 1]; break; } allowedNoise -= noise; - start2 += nsame; - } while (start2 < width); + start += nsame; + } while (start < width); if (BitStream.EQ(trancateThreshold, 0)) continue; do { @@ -26270,7 +31644,7 @@ function Mp3Encoder$1(channels, samplerate, kbps) { var id3 = new ID3Tag(); var rv = new Reservoir(); var tak = new Takehiro(); - var parse = new Parse(); + var parse2 = new Parse(); var mpg = new MPGLib(); lame.setModules(ga, bs, p2, qupvt, qu, vbr, ver, id3, mpg); bs.setModules(ga, mpg, ver, vbr); @@ -26281,8 +31655,8 @@ function Mp3Encoder$1(channels, samplerate, kbps) { rv.setModules(bs); tak.setModules(qupvt); vbr.setModules(lame, bs, ver); - gaud.setModules(parse, mpg); - parse.setModules(ver, id3, p2); + gaud.setModules(parse2, mpg); + parse2.setModules(ver, id3, p2); var gfp = lame.lame_init(); gfp.num_channels = channels; gfp.in_samplerate = samplerate; @@ -26371,14 +31745,14 @@ class Mp3Encoder { } } class Recorder { - constructor(options2 = {}) { - this.beforeRecording = options2.beforeRecording; - this.pauseRecording = options2.pauseRecording; - this.afterRecording = options2.afterRecording; - this.micFailed = options2.micFailed; + constructor(options = {}) { + this.beforeRecording = options.beforeRecording; + this.pauseRecording = options.pauseRecording; + this.afterRecording = options.afterRecording; + this.micFailed = options.micFailed; this.encoderOptions = { - bitRate: options2.bitRate, - sampleRate: options2.sampleRate + bitRate: options.bitRate, + sampleRate: options.sampleRate }; this.bufferSize = 4096; this.records = []; @@ -26509,6 +31883,7 @@ const _sfc_main$a = { showEmojis: { type: Boolean, required: true }, showFooter: { type: Boolean, required: true }, acceptedFiles: { type: String, required: true }, + captureFiles: { type: String, required: true }, textareaActionEnabled: { type: Boolean, required: true }, textareaAutoFocus: { type: Boolean, required: true }, userTagsEnabled: { type: Boolean, required: true }, @@ -27024,7 +32399,7 @@ const _hoisted_3$8 = { class: "vac-dot-audio-record-time" }; const _hoisted_4$8 = ["placeholder"]; const _hoisted_5$6 = { class: "vac-icon-textarea" }; const _hoisted_6$3 = { key: 1 }; -const _hoisted_7$3 = ["accept"]; +const _hoisted_7$3 = ["accept", "capture"]; function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) { const _component_room_emojis = resolveComponent("room-emojis"); const _component_room_users_tag = resolveComponent("room-users-tag"); @@ -27202,6 +32577,7 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) { type: "file", multiple: "", accept: $props.acceptedFiles, + capture: $props.captureFiles, style: { "display": "none" }, onChange: _cache[21] || (_cache[21] = ($event) => $options.onFileChange($event.target.files)) }, null, 40, _hoisted_7$3)) : createCommentVNode("", true), @@ -28432,6 +33808,7 @@ const _sfc_main$2 = { showNewMessagesDivider: { type: Boolean, required: true }, showFooter: { type: Boolean, required: true }, acceptedFiles: { type: String, required: true }, + captureFiles: { type: String, required: true }, textFormatting: { type: Object, required: true }, linkOptions: { type: Object, required: true }, loadingRooms: { type: Boolean, required: true }, @@ -28543,7 +33920,7 @@ const _sfc_main$2 = { } const loader = this.$el.querySelector("#infinite-loader-messages"); if (loader) { - const options2 = { + const options = { root: this.$el.querySelector("#messages-list"), rootMargin: `${this.scrollDistance}px`, threshold: 0 @@ -28552,7 +33929,7 @@ const _sfc_main$2 = { if (entries[0].isIntersecting) { this.loadMoreMessages(); } - }, options2); + }, options); this.observer.observe(loader); } }, @@ -28635,7 +34012,11 @@ const _sfc_main$2 = { return; const autoScrollOffset = ref.offsetHeight + 60; setTimeout(() => { - const scrolledUp = this.getBottomScroll(this.$refs.scrollContainer) > autoScrollOffset; + const scrollContainer = this.$refs.scrollContainer; + let scrolledUp = false; + if (scrollContainer) { + scrolledUp = this.getBottomScroll(scrollContainer) > autoScrollOffset; + } if (message.senderId === this.currentUserId) { if (scrolledUp) { if (this.autoScroll.send.newAfterScrollUp) { @@ -28733,9 +34114,11 @@ const _sfc_main$2 = { scrollToBottom() { setTimeout(() => { const element2 = this.$refs.scrollContainer; - element2.classList.add("vac-scroll-smooth"); - element2.scrollTo({ top: element2.scrollHeight, behavior: "smooth" }); - setTimeout(() => element2.classList.remove("vac-scroll-smooth")); + if (element2) { + element2.classList.add("vac-scroll-smooth"); + element2.scrollTo({ top: element2.scrollHeight, behavior: "smooth" }); + setTimeout(() => element2.classList.remove("vac-scroll-smooth")); + } }, 50); }, openFile({ message, file }) { @@ -28961,6 +34344,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { "show-emojis": $props.showEmojis, "show-footer": $props.showFooter, "accepted-files": $props.acceptedFiles, + "capture-files": $props.captureFiles, "textarea-action-enabled": $props.textareaActionEnabled, "textarea-auto-focus": $props.textareaAutoFocus, "user-tags-enabled": $props.userTagsEnabled, @@ -28988,7 +34372,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { ]) }; }) - ]), 1032, ["room", "room-id", "room-message", "text-messages", "show-send-icon", "show-files", "show-audio", "show-emojis", "show-footer", "accepted-files", "textarea-action-enabled", "textarea-auto-focus", "user-tags-enabled", "emojis-suggestion-enabled", "templates-text", "text-formatting", "link-options", "audio-bit-rate", "audio-sample-rate", "init-reply-message", "init-edit-message", "dropped-files", "emoji-data-source"]) + ]), 1032, ["room", "room-id", "room-message", "text-messages", "show-send-icon", "show-files", "show-audio", "show-emojis", "show-footer", "accepted-files", "capture-files", "textarea-action-enabled", "textarea-auto-focus", "user-tags-enabled", "emojis-suggestion-enabled", "templates-text", "text-formatting", "link-options", "audio-bit-rate", "audio-sample-rate", "init-reply-message", "init-edit-message", "dropped-files", "emoji-data-source"]) ], 544)), [ [vShow, $props.isMobile && !$props.showRoomsList || !$props.isMobile || $props.singleRoom] ]); @@ -29364,10 +34748,10 @@ const cssThemeVars = ({ header, footer, sidemenu, - content, + content: content2, dropdown, message, - markdown, + markdown: markdown2, room, emoji, icons @@ -29395,7 +34779,7 @@ const cssThemeVars = ({ "--chat-footer-bg-color-reply": footer.backgroundReply, "--chat-footer-bg-color-tag-active": footer.backgroundTagActive, "--chat-footer-bg-color-tag": footer.backgroundTag, - "--chat-content-bg-color": content.background, + "--chat-content-bg-color": content2.background, "--chat-sidemenu-bg-color": sidemenu.background, "--chat-sidemenu-bg-color-hover": sidemenu.backgroundHover, "--chat-sidemenu-bg-color-active": sidemenu.backgroundActive, @@ -29440,10 +34824,10 @@ const cssThemeVars = ({ "--chat-message-bg-color-audio-progress": message.backgroundAudioProgress, "--chat-message-bg-color-audio-progress-selector": message.backgroundAudioProgressSelector, "--chat-message-color-file-extension": message.colorFileExtension, - "--chat-markdown-bg": markdown.background, - "--chat-markdown-border": markdown.border, - "--chat-markdown-color": markdown.color, - "--chat-markdown-color-multi": markdown.colorMulti, + "--chat-markdown-bg": markdown2.background, + "--chat-markdown-border": markdown2.border, + "--chat-markdown-color": markdown2.color, + "--chat-markdown-color-multi": markdown2.colorMulti, "--chat-room-color-username": room.colorUsername, "--chat-room-color-message": room.colorMessage, "--chat-room-color-timestamp": room.colorTimestamp, @@ -29482,7 +34866,7 @@ const cssThemeVars = ({ "--chat-icon-color-audio-confirm": icons.audioConfirm }; }; -var _style_0 = '.vac-fade-spinner-enter-from{opacity:0}.vac-fade-spinner-enter-active{transition:opacity .8s}.vac-fade-spinner-leave-active{transition:opacity .2s;opacity:0}.vac-fade-image-enter-from{opacity:0}.vac-fade-image-enter-active{transition:opacity 1s}.vac-fade-image-leave-active{transition:opacity .5s;opacity:0}.vac-fade-message-enter-from{opacity:0}.vac-fade-message-enter-active{transition:opacity .5s}.vac-fade-message-leave-active{transition:opacity .2s;opacity:0}.vac-slide-left-enter-active,.vac-slide-right-enter-active{transition:all .3s ease;transition-property:transform,opacity}.vac-slide-left-leave-active,.vac-slide-right-leave-active{transition:all .2s cubic-bezier(1,.5,.8,1)!important;transition-property:transform,opacity}.vac-slide-left-enter-from,.vac-slide-left-leave-to{transform:translate(10px);opacity:0}.vac-slide-right-enter-from,.vac-slide-right-leave-to{transform:translate(-10px);opacity:0}.vac-slide-up-enter-active{transition:all .3s ease}.vac-slide-up-leave-active{transition:all .2s cubic-bezier(1,.5,.8,1)}.vac-slide-up-enter-from,.vac-slide-up-leave-to{transform:translateY(10px);opacity:0}.vac-bounce-enter-active{animation:vac-bounce-in .5s}.vac-bounce-leave-active{animation:vac-bounce-in .3s reverse}@keyframes vac-bounce-in{0%{transform:scale(0)}50%{transform:scale(1.05)}to{transform:scale(1)}}.vac-fade-preview-enter{opacity:0}.vac-fade-preview-enter-active{transition:opacity .1s}.vac-fade-preview-leave-active{transition:opacity .2s;opacity:0}.vac-bounce-preview-enter-active{animation:vac-bounce-image-in .4s}.vac-bounce-preview-leave-active{animation:vac-bounce-image-in .3s reverse}@keyframes vac-bounce-image-in{0%{transform:scale(.6)}to{transform:scale(1)}}.vac-menu-list{border-radius:4px;display:block;cursor:pointer;background:var(--chat-dropdown-bg-color);padding:6px 0}.vac-menu-list :hover{background:var(--chat-dropdown-bg-color-hover);transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-menu-list :not(:hover){transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-menu-item{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%;min-height:30px;padding:5px 16px;position:relative;white-space:nowrap;line-height:30px}.vac-menu-options{position:absolute;right:10px;top:20px;z-index:9999;min-width:150px;display:inline-block;border-radius:4px;font-size:14px;color:var(--chat-color);overflow-y:auto;overflow-x:hidden;contain:content;box-shadow:0 2px 2px -4px #0000001a,0 2px 2px 1px #0000001f,0 1px 8px 1px #0000001f}.vac-app-border{border:var(--chat-border-style)}.vac-app-border-t{border-top:var(--chat-border-style)}.vac-app-border-r{border-right:var(--chat-border-style)}.vac-app-border-b{border-bottom:var(--chat-border-style)}.vac-app-box-shadow{transition:all .5s;box-shadow:0 2px 2px -4px #0000001a,0 2px 2px 1px #0000001f,0 1px 8px 1px #0000001f}.vac-item-clickable{cursor:pointer}.vac-vertical-center{display:flex;align-items:center;height:100%}.vac-vertical-center .vac-vertical-container{width:100%;text-align:center}.vac-svg-button{max-height:30px;display:flex;cursor:pointer;transition:all .2s}.vac-svg-button:hover{transform:scale(1.1);opacity:.7}.vac-avatar{background-size:cover;background-position:center center;background-repeat:no-repeat;background-color:#ddd;height:42px;width:42px;min-height:42px;min-width:42px;margin-right:15px;border-radius:50%}.vac-blur-loading{filter:blur(3px)}.vac-badge-counter{height:13px;width:auto;min-width:13px;border-radius:50%;display:flex;align-items:center;justify-content:center;padding:3px;font-size:11px;font-weight:500}.vac-text-ellipsis{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.vac-text-bold{font-weight:700}.vac-text-italic{font-style:italic}.vac-text-strike{text-decoration:line-through}.vac-text-underline{text-decoration:underline}.vac-text-inline-code{display:inline-block;font-size:12px;color:var(--chat-markdown-color);background:var(--chat-markdown-bg);border:1px solid var(--chat-markdown-border);border-radius:3px;margin:2px 0;padding:2px 3px}.vac-text-multiline-code{display:block;font-size:12px;color:var(--chat-markdown-color-multi);background:var(--chat-markdown-bg);border:1px solid var(--chat-markdown-border);border-radius:3px;margin:4px 0;padding:7px}.vac-text-tag{color:var(--chat-message-color-tag);cursor:pointer}.vac-file-container{display:flex;align-content:center;justify-content:center;flex-wrap:wrap;text-align:center;background:var(--chat-bg-color-input);border:var(--chat-border-style-input);border-radius:4px;padding:10px}.vac-file-container svg{height:28px;width:28px}.vac-file-container .vac-text-extension{font-size:12px;color:var(--chat-message-color-file-extension);margin-top:-2px}.vac-card-window{width:100%;display:block;max-width:100%;background:var(--chat-content-bg-color);color:var(--chat-color);overflow-wrap:break-word;white-space:normal;border:var(--chat-container-border);border-radius:var(--chat-container-border-radius);box-shadow:var(--chat-container-box-shadow);-webkit-tap-highlight-color:transparent}.vac-card-window *{font-family:inherit}.vac-card-window a{color:#0d579c;font-weight:500}.vac-card-window .vac-chat-container{height:100%;display:flex}.vac-card-window .vac-chat-container input{min-width:10px}.vac-card-window .vac-chat-container textarea,.vac-card-window .vac-chat-container input[type=text],.vac-card-window .vac-chat-container input[type=search]{-webkit-appearance:none}.vac-media-preview{position:fixed;top:0;left:0;z-index:99;width:100vw;height:100vh;display:flex;align-items:center;background-color:#000c;outline:none}.vac-media-preview .vac-media-preview-container{height:calc(100% - 140px);width:calc(100% - 80px);padding:70px 40px;margin:0 auto}.vac-media-preview .vac-image-preview{width:100%;height:100%;background-size:contain;background-repeat:no-repeat;background-position:center}.vac-media-preview video{width:100%;height:100%}.vac-media-preview .vac-svg-button{position:absolute;top:30px;right:30px;transform:scale(1.4)}@media only screen and (max-width: 768px){.vac-media-preview .vac-svg-button{top:20px;right:20px;transform:scale(1.2)}.vac-media-preview .vac-media-preview-container{width:calc(100% - 40px);padding:70px 20px}}.vac-col-messages{position:relative;height:100%;flex:1;overflow:hidden;display:flex;flex-flow:column}.vac-col-messages .vac-container-center{height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.vac-col-messages .vac-room-empty{font-size:14px;color:#9ca6af;font-style:italic;line-height:20px;white-space:pre-line}.vac-col-messages .vac-room-empty div{padding:0 10%}.vac-col-messages .vac-container-scroll{background:var(--chat-content-bg-color);flex:1;overflow-y:auto;margin-right:1px;margin-top:65px;-webkit-overflow-scrolling:touch}.vac-col-messages .vac-container-scroll.vac-scroll-smooth{scroll-behavior:smooth}.vac-col-messages .vac-messages-container{padding:0 5px 5px}.vac-col-messages .vac-text-started{font-size:14px;color:var(--chat-message-color-started);font-style:italic;text-align:center;margin-top:25px;margin-bottom:20px}.vac-col-messages .vac-icon-scroll{position:absolute;bottom:80px;right:20px;padding:8px;background:var(--chat-bg-scroll-icon);border-radius:50%;box-shadow:0 1px 1px -1px #0003,0 1px 1px #00000024,0 1px 2px #0000001f;display:flex;cursor:pointer;z-index:10}.vac-col-messages .vac-icon-scroll svg{height:25px;width:25px}.vac-col-messages .vac-messages-count{position:absolute;top:-8px;left:11px;background-color:var(--chat-message-bg-color-scroll-counter);color:var(--chat-message-color-scroll-counter)}.vac-col-messages .vac-messages-hidden{opacity:0}@media only screen and (max-width: 768px){.vac-col-messages .vac-container-scroll{margin-top:50px}.vac-col-messages .vac-text-started{margin-top:20px}.vac-col-messages .vac-icon-scroll{bottom:70px}}.vac-room-header{position:absolute;display:flex;align-items:center;height:64px;width:100%;z-index:10;margin-right:1px;background:var(--chat-header-bg-color);border-top-right-radius:var(--chat-container-border-radius)}.vac-room-header .vac-room-wrapper{display:flex;align-items:center;min-width:0;height:100%;width:100%;padding:0 16px}.vac-room-header .vac-toggle-button{margin-right:15px}.vac-room-header .vac-toggle-button svg{height:26px;width:26px}.vac-room-header .vac-rotate-icon{transform:rotate(180deg)!important}.vac-room-header .vac-rotate-icon-init{transform:rotate(360deg)}.vac-room-header .vac-info-wrapper,.vac-room-header .vac-room-selection{display:flex;align-items:center;min-width:0;width:100%;height:100%}.vac-room-header .vac-room-selection .vac-selection-button{padding:8px 16px;color:var(--chat-color-button);background-color:var(--chat-bg-color-button);border-radius:4px;margin-right:10px;cursor:pointer;transition:all .2s}.vac-room-header .vac-room-selection .vac-selection-button:hover{opacity:.7}.vac-room-header .vac-room-selection .vac-selection-button:active{opacity:.9}.vac-room-header .vac-room-selection .vac-selection-button .vac-selection-button-count{margin-left:6px;opacity:.9}.vac-room-header .vac-room-selection .vac-selection-cancel{display:flex;align-items:center;margin-left:auto;white-space:nowrap;color:var(--chat-color-button-clear);transition:all .2s}.vac-room-header .vac-room-selection .vac-selection-cancel:hover{opacity:.7}.vac-room-header .vac-room-name{font-size:17px;font-weight:500;line-height:22px;color:var(--chat-header-color-name)}.vac-room-header .vac-room-info{font-size:13px;line-height:18px;color:var(--chat-header-color-info)}.vac-room-header .vac-room-options{margin-left:auto}@media only screen and (max-width: 768px){.vac-room-header{height:50px}.vac-room-header .vac-room-wrapper{padding:0 10px}.vac-room-header .vac-room-name{font-size:16px;line-height:22px}.vac-room-header .vac-room-info{font-size:12px;line-height:16px}.vac-room-header .vac-avatar{height:37px;width:37px;min-height:37px;min-width:37px}}.vac-room-footer{width:100%;border-bottom-right-radius:4px;z-index:10}.vac-box-footer{display:flex;position:relative;background:var(--chat-footer-bg-color);padding:10px 8px}.vac-textarea{max-height:300px;overflow-y:auto;height:20px;width:100%;line-height:20px;outline:0;resize:none;border-radius:20px;padding:12px 16px;box-sizing:content-box;font-size:16px;background:var(--chat-bg-color-input);color:var(--chat-color);caret-color:var(--chat-color-caret);border:var(--chat-border-style-input)}.vac-textarea::placeholder{color:var(--chat-color-placeholder);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.vac-textarea-outline{border:1px solid var(--chat-border-color-input-selected);box-shadow:inset 0 0 0 1px var(--chat-border-color-input-selected)}.vac-icon-textarea,.vac-icon-textarea-left{display:flex;align-items:center}.vac-icon-textarea svg,.vac-icon-textarea .vac-wrapper,.vac-icon-textarea-left svg,.vac-icon-textarea-left .vac-wrapper{margin:0 7px}.vac-icon-textarea{margin-left:5px}.vac-icon-textarea-left{display:flex;align-items:center;margin-right:5px}.vac-icon-textarea-left svg,.vac-icon-textarea-left .vac-wrapper{margin:0 7px}.vac-icon-textarea-left .vac-icon-microphone{fill:var(--chat-icon-color-microphone);margin:0 7px}.vac-icon-textarea-left .vac-dot-audio-record{height:15px;width:15px;border-radius:50%;background-color:var(--chat-message-bg-color-audio-record);animation:vac-scaling .8s ease-in-out infinite alternate}@keyframes vac-scaling{0%{transform:scale(1);opacity:.4}to{transform:scale(1.1);opacity:1}}.vac-icon-textarea-left .vac-dot-audio-record-time{font-size:16px;color:var(--chat-color);margin-left:8px;width:45px}.vac-icon-textarea-left .vac-icon-audio-stop,.vac-icon-textarea-left .vac-icon-audio-confirm{min-height:28px;min-width:28px}.vac-icon-textarea-left .vac-icon-audio-stop svg,.vac-icon-textarea-left .vac-icon-audio-confirm svg{min-height:28px;min-width:28px}.vac-icon-textarea-left .vac-icon-audio-stop{margin-right:20px}.vac-icon-textarea-left .vac-icon-audio-stop #vac-icon-close-outline{fill:var(--chat-icon-color-audio-cancel)}.vac-icon-textarea-left .vac-icon-audio-confirm{margin-right:3px;margin-left:12px}.vac-icon-textarea-left .vac-icon-audio-confirm #vac-icon-checkmark{fill:var(--chat-icon-color-audio-confirm)}.vac-send-disabled,.vac-send-disabled svg{cursor:none!important;pointer-events:none!important;transform:none!important}@media only screen and (max-width: 768px){.vac-room-footer{width:100%}.vac-box-footer{padding:7px 2px 7px 7px}.vac-box-footer.vac-box-footer-border{border-top:var(--chat-border-style-input)}.vac-textarea{padding:7px;line-height:18px}.vac-textarea::placeholder{color:transparent}.vac-icon-textarea svg,.vac-icon-textarea .vac-wrapper,.vac-icon-textarea-left svg,.vac-icon-textarea-left .vac-wrapper{margin:0 5px!important}}@media only screen and (max-height: 768px){.vac-textarea{max-height:120px}}.vac-emojis-container{width:calc(100% - 16px);padding:10px 8px;background:var(--chat-footer-bg-color);display:flex;align-items:center;overflow:auto}.vac-emojis-container .vac-emoji-element{padding:0 8px;font-size:30px;border-radius:4px;cursor:pointer;background:var(--chat-footer-bg-color-tag);transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-emojis-container .vac-emoji-element-active{background:var(--chat-footer-bg-color-tag-active)}@media only screen and (max-width: 768px){.vac-emojis-container{width:calc(100% - 10px);padding:7px 5px}.vac-emojis-container .vac-emoji-element{padding:0 7px;font-size:26px}}.vac-reply-container{display:flex;padding:10px 10px 0;background:var(--chat-footer-bg-color);align-items:center;width:calc(100% - 20px)}.vac-reply-container .vac-reply-box{width:100%;overflow:hidden;background:var(--chat-footer-bg-color-reply);border-radius:4px;padding:8px 10px}.vac-reply-container .vac-reply-info{overflow:hidden}.vac-reply-container .vac-reply-username{color:var(--chat-message-color-reply-username);font-size:12px;line-height:15px;margin-bottom:2px}.vac-reply-container .vac-reply-content{font-size:12px;color:var(--chat-message-color-reply-content);white-space:pre-line}.vac-reply-container .vac-icon-reply{margin-left:10px}.vac-reply-container .vac-icon-reply svg{height:20px;width:20px}.vac-reply-container .vac-image-reply{max-height:100px;max-width:200px;margin:4px 10px 0 0;border-radius:4px}.vac-reply-container .vac-audio-reply{margin-right:10px}.vac-reply-container .vac-file-container{max-width:80px}@media only screen and (max-width: 768px){.vac-reply-container{padding:5px 8px;width:calc(100% - 16px)}}.vac-room-files-container{display:flex;align-items:center;padding:10px 6px 0;background:var(--chat-footer-bg-color)}.vac-room-files-container .vac-files-box{display:flex;overflow:auto;width:calc(100% - 30px)}.vac-room-files-container video{height:100px;border:var(--chat-border-style-input);border-radius:4px}.vac-room-files-container .vac-icon-close{margin-left:auto}.vac-room-files-container .vac-icon-close svg{height:20px;width:20px}@media only screen and (max-width: 768px){.vac-files-container{padding:6px 4px 4px 2px}}.vac-room-file-container{display:flex;position:relative;margin:0 4px}.vac-room-file-container .vac-message-image{position:relative;background-color:var(--chat-message-bg-color-image)!important;background-size:cover!important;background-position:center center!important;background-repeat:no-repeat!important;height:100px;width:100px;border:var(--chat-border-style-input);border-radius:4px}.vac-room-file-container .vac-file-container{height:80px;width:80px}.vac-room-file-container .vac-icon-remove{position:absolute;top:6px;left:6px;z-index:10}.vac-room-file-container .vac-icon-remove svg{height:20px;width:20px;border-radius:50%}.vac-room-file-container .vac-icon-remove:before{content:" ";position:absolute;width:100%;height:100%;background:rgba(0,0,0,.5);border-radius:50%;z-index:-1}.vac-tags-container{display:flex;flex-direction:column;align-items:center;width:100%}.vac-tags-container .vac-tags-box{display:flex;width:100%;height:54px;overflow:hidden;cursor:pointer;background:var(--chat-footer-bg-color-tag);transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-tags-container .vac-tags-box-active{background:var(--chat-footer-bg-color-tag-active)}.vac-tags-container .vac-tags-info{display:flex;overflow:hidden;padding:0 20px;align-items:center}.vac-tags-container .vac-tags-avatar{height:34px;width:34px;min-height:34px;min-width:34px}.vac-tags-container .vac-tags-username{font-size:14px}@media only screen and (max-width: 768px){.vac-tags-container .vac-tags-box{height:50px}.vac-tags-container .vac-tags-info{padding:0 12px}}.vac-template-container{display:flex;flex-direction:column;align-items:center;width:100%}.vac-template-container .vac-template-box{display:flex;width:100%;height:54px;overflow:hidden;cursor:pointer;background:var(--chat-footer-bg-color-tag);transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-template-container .vac-template-active{background:var(--chat-footer-bg-color-tag-active)}.vac-template-container .vac-template-info{display:flex;overflow:hidden;padding:0 20px;align-items:center}.vac-template-container .vac-template-tag{font-size:14px;font-weight:700;margin-right:10px}.vac-template-container .vac-template-text{font-size:14px}@media only screen and (max-width: 768px){.vac-template-container .vac-template-box{height:50px}.vac-template-container .vac-template-info{padding:0 12px}}.vac-rooms-container{display:flex;flex-flow:column;flex:0 0 25%;min-width:260px;max-width:500px;position:relative;background:var(--chat-sidemenu-bg-color);height:100%;border-top-left-radius:var(--chat-container-border-radius);border-bottom-left-radius:var(--chat-container-border-radius)}.vac-rooms-container.vac-rooms-container-full{flex:0 0 100%;max-width:100%}.vac-rooms-container .vac-rooms-empty{font-size:14px;color:#9ca6af;font-style:italic;text-align:center;margin:40px 0;line-height:20px;white-space:pre-line}.vac-rooms-container .vac-room-list{flex:1;position:relative;max-width:100%;cursor:pointer;padding:0 10px 5px;overflow-y:auto}.vac-rooms-container .vac-room-item{border-radius:8px;align-items:center;display:flex;flex:1 1 100%;margin-bottom:5px;padding:0 14px;position:relative;min-height:71px;transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-rooms-container .vac-room-item:hover{background:var(--chat-sidemenu-bg-color-hover)}.vac-rooms-container .vac-room-selected{color:var(--chat-sidemenu-color-active)!important;background:var(--chat-sidemenu-bg-color-active)!important}.vac-rooms-container .vac-room-selected:hover{background:var(--chat-sidemenu-bg-color-active)!important}@media only screen and (max-width: 768px){.vac-rooms-container .vac-room-list{padding:0 7px 5px}.vac-rooms-container .vac-room-item{min-height:60px;padding:0 8px}}.vac-room-container{display:flex;flex:1;align-items:center;width:100%}.vac-room-container .vac-name-container{flex:1}.vac-room-container .vac-title-container{display:flex;align-items:center;line-height:25px}.vac-room-container .vac-state-circle{width:9px;height:9px;border-radius:50%;background-color:var(--chat-room-color-offline);margin-right:6px;transition:.3s}.vac-room-container .vac-state-online{background-color:var(--chat-room-color-online)}.vac-room-container .vac-room-name{flex:1;color:var(--chat-room-color-username);font-weight:500}.vac-room-container .vac-text-date{margin-left:5px;font-size:11px;color:var(--chat-room-color-timestamp)}.vac-room-container .vac-text-last{display:flex;align-items:center;font-size:12px;line-height:19px;color:var(--chat-room-color-message)}.vac-room-container .vac-message-new{color:var(--chat-room-color-username);font-weight:500}.vac-room-container .vac-icon-check{display:flex;vertical-align:middle;height:14px;width:14px;margin-top:-2px;margin-right:2px}.vac-room-container .vac-icon-microphone{height:15px;width:15px;vertical-align:middle;margin:-3px 1px 0 -2px;fill:var(--chat-room-color-message)}.vac-room-container .vac-room-options-container{display:flex;margin-left:auto}.vac-room-container .vac-room-badge{background-color:var(--chat-room-bg-color-badge);color:var(--chat-room-color-badge);margin-left:5px}.vac-room-container .vac-list-room-options{height:19px;width:19px;align-items:center;margin-left:5px}.vac-box-empty{margin-top:10px}@media only screen and (max-width: 768px){.vac-box-empty{margin-top:7px}}.vac-box-search{position:sticky;display:flex;align-items:center;height:64px;padding:0 15px}.vac-box-search .vac-icon-search{display:flex;position:absolute;left:30px}.vac-box-search .vac-icon-search svg{width:18px;height:18px}.vac-box-search .vac-input{height:38px;width:100%;background:var(--chat-bg-color-input);color:var(--chat-color);font-size:15px;outline:0;caret-color:var(--chat-color-caret);padding:10px 10px 10px 40px;border:1px solid var(--chat-sidemenu-border-color-search);border-radius:20px}.vac-box-search .vac-input::placeholder{color:var(--chat-color-placeholder)}.vac-box-search .vac-add-icon{margin-left:auto;padding-left:10px}@media only screen and (max-width: 768px){.vac-box-search{height:58px}}.vac-message-wrapper .vac-card-info{border-radius:4px;text-align:center;margin:10px auto;font-size:12px;padding:4px;display:block;overflow-wrap:break-word;position:relative;white-space:normal;box-shadow:0 1px 1px -1px #0000001a,0 1px 1px -1px #0000001c,0 1px 2px -1px #0000001c}.vac-message-wrapper .vac-card-date{max-width:150px;font-weight:500;text-transform:uppercase;color:var(--chat-message-color-date);background-color:var(--chat-message-bg-color-date)}.vac-message-wrapper .vac-card-system{max-width:250px;padding:8px 4px;color:var(--chat-message-color-system);background-color:var(--chat-message-bg-color-system)}.vac-message-wrapper .vac-line-new{color:var(--chat-message-color-new-messages);position:relative;text-align:center;font-size:13px;padding:10px 0}.vac-message-wrapper .vac-line-new:after,.vac-message-wrapper .vac-line-new:before{border-top:1px solid var(--chat-message-color-new-messages);content:"";left:0;position:absolute;top:50%;width:calc(50% - 60px)}.vac-message-wrapper .vac-line-new:before{left:auto;right:0}.vac-message-wrapper .vac-message-box{display:flex;flex:0 0 50%;max-width:50%;justify-content:flex-start;line-height:1.4}.vac-message-wrapper .vac-avatar{height:28px;width:28px;min-height:28px;min-width:28px;margin:0 0 2px;align-self:flex-end}.vac-message-wrapper .vac-avatar-current-offset{margin-right:28px}.vac-message-wrapper .vac-avatar-offset{margin-left:28px}.vac-message-wrapper .vac-failure-container{position:relative;align-self:flex-end;height:20px;width:20px;margin:0 0 2px -4px;border-radius:50%;background-color:#f44336}.vac-message-wrapper .vac-failure-container.vac-failure-container-avatar{margin-right:6px}.vac-message-wrapper .vac-failure-container .vac-failure-text{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;font-size:15px;font-weight:700}.vac-message-wrapper .vac-message-container{position:relative;padding:2px 10px;align-items:end;min-width:100px;box-sizing:content-box}.vac-message-wrapper .vac-message-container-offset{margin-top:10px}.vac-message-wrapper .vac-offset-current{margin-left:50%;justify-content:flex-end}.vac-message-wrapper .vac-message-card{background-color:var(--chat-message-bg-color);color:var(--chat-message-color);border-radius:8px;font-size:14px;padding:6px 9px 3px;white-space:pre-line;max-width:100%;-webkit-transition-property:box-shadow,opacity;transition-property:box-shadow,opacity;transition:box-shadow .28s cubic-bezier(.4,0,.2,1);will-change:box-shadow;box-shadow:0 1px 1px -1px #0000001a,0 1px 1px -1px #0000001c,0 1px 2px -1px #0000001c}.vac-message-wrapper .vac-message-highlight{box-shadow:0 1px 2px -1px #0000001a,0 1px 2px -1px #0000001c,0 1px 5px -1px #0000001c}.vac-message-wrapper .vac-message-current{background-color:var(--chat-message-bg-color-me)!important}.vac-message-wrapper .vac-message-deleted{color:var(--chat-message-color-deleted)!important;font-size:13px!important;font-style:italic!important;background-color:var(--chat-message-bg-color-deleted)!important}.vac-message-wrapper .vac-message-selected{background-color:var(--chat-message-bg-color-selected)!important;transition:background-color .2s}.vac-message-wrapper .vac-message-image{position:relative;background-color:var(--chat-message-bg-color-image)!important;background-size:cover!important;background-position:center center!important;background-repeat:no-repeat!important;height:250px;width:250px;max-width:100%;border-radius:4px;margin:4px auto 5px;transition:.4s filter linear}.vac-message-wrapper .vac-text-username{font-size:13px;color:var(--chat-message-color-username);margin-bottom:2px}.vac-message-wrapper .vac-username-reply{margin-bottom:5px}.vac-message-wrapper .vac-text-timestamp{font-size:10px;color:var(--chat-message-color-timestamp);text-align:right}.vac-message-wrapper .vac-progress-time{float:left;margin:-2px 0 0 40px;color:var(--chat-color);font-size:12px}.vac-message-wrapper .vac-icon-edited{-webkit-box-align:center;align-items:center;display:-webkit-inline-box;display:inline-flex;justify-content:center;letter-spacing:normal;line-height:1;text-indent:0;vertical-align:middle;margin:0 4px 2px}.vac-message-wrapper .vac-icon-edited svg{height:12px;width:12px}.vac-message-wrapper .vac-icon-check{height:14px;width:14px;vertical-align:middle;margin:-3px -3px 0 3px}@media only screen and (max-width: 768px){.vac-message-wrapper .vac-message-container{padding:2px 3px 1px}.vac-message-wrapper .vac-message-container-offset{margin-top:10px}.vac-message-wrapper .vac-message-box{flex:0 0 80%;max-width:80%}.vac-message-wrapper .vac-avatar{height:25px;width:25px;min-height:25px;min-width:25px;margin:0 6px 1px 0}.vac-message-wrapper .vac-avatar.vac-avatar-current{margin:0 0 1px 6px}.vac-message-wrapper .vac-avatar-current-offset{margin-right:31px}.vac-message-wrapper .vac-avatar-offset{margin-left:31px}.vac-message-wrapper .vac-failure-container{margin-left:2px}.vac-message-wrapper .vac-failure-container.vac-failure-container-avatar{margin-right:0}.vac-message-wrapper .vac-offset-current{margin-left:20%}.vac-message-wrapper .vac-progress-time{margin-left:37px}}.vac-audio-player{display:flex;margin:8px 0 5px}.vac-audio-player .vac-svg-button{max-width:18px;margin-left:7px}@media only screen and (max-width: 768px){.vac-audio-player{margin:4px 0 0}.vac-audio-player .vac-svg-button{max-width:16px;margin-left:5px}}.vac-player-bar{display:flex;align-items:center;max-width:calc(100% - 18px);margin-right:7px;margin-left:20px}.vac-player-bar .vac-player-progress{width:190px}.vac-player-bar .vac-player-progress .vac-line-container{position:relative;height:4px;border-radius:5px;background-color:var(--chat-message-bg-color-audio-line)}.vac-player-bar .vac-player-progress .vac-line-container .vac-line-progress{position:absolute;height:inherit;background-color:var(--chat-message-bg-color-audio-progress);border-radius:inherit}.vac-player-bar .vac-player-progress .vac-line-container .vac-line-dot{position:absolute;top:-5px;margin-left:-7px;height:14px;width:14px;border-radius:50%;background-color:var(--chat-message-bg-color-audio-progress-selector);transition:transform .25s}.vac-player-bar .vac-player-progress .vac-line-container .vac-line-dot__active{transform:scale(1.2)}@media only screen and (max-width: 768px){.vac-player-bar{margin-right:5px}.vac-player-bar .vac-player-progress .vac-line-container{height:3px}.vac-player-bar .vac-player-progress .vac-line-container .vac-line-dot{height:12px;width:12px;top:-5px;margin-left:-5px}}.vac-message-actions-wrapper .vac-options-container{position:absolute;top:2px;right:10px;height:40px;width:70px;overflow:hidden;border-top-right-radius:8px}.vac-message-actions-wrapper .vac-blur-container{position:absolute;height:100%;width:100%;left:8px;bottom:10px;background:var(--chat-message-bg-color);filter:blur(3px);border-bottom-left-radius:8px}.vac-message-actions-wrapper .vac-options-me{background:var(--chat-message-bg-color-me)}.vac-message-actions-wrapper .vac-message-options{background:var(--chat-icon-bg-dropdown-message);border-radius:50%;position:absolute;top:7px;right:7px}.vac-message-actions-wrapper .vac-message-options svg{height:17px;width:17px;padding:5px;margin:-5px}.vac-message-actions-wrapper .vac-message-emojis{position:absolute;top:6px;right:30px}.vac-message-actions-wrapper .vac-menu-options{right:15px}.vac-message-actions-wrapper .vac-menu-left{right:-118px}@media only screen and (max-width: 768px){.vac-message-actions-wrapper .vac-options-container{right:3px}.vac-message-actions-wrapper .vac-menu-left{right:-50px}}.vac-message-files-container .vac-file-wrapper{position:relative;width:fit-content}.vac-message-files-container .vac-file-wrapper .vac-file-container{height:60px;width:60px;margin:3px 0 5px;cursor:pointer;transition:all .6s}.vac-message-files-container .vac-file-wrapper .vac-file-container:hover{opacity:.85}.vac-message-files-container .vac-file-wrapper .vac-file-container svg{height:30px;width:30px}.vac-message-files-container .vac-file-wrapper .vac-file-container.vac-file-container-progress{background-color:#0000004d}.vac-message-file-container{position:relative;z-index:0}.vac-message-file-container .vac-message-image-container{cursor:pointer}.vac-message-file-container .vac-image-buttons{position:absolute;width:100%;height:100%;border-radius:4px;background:linear-gradient(to bottom,rgba(0,0,0,0) 55%,rgba(0,0,0,.02) 60%,rgba(0,0,0,.05) 65%,rgba(0,0,0,.1) 70%,rgba(0,0,0,.2) 75%,rgba(0,0,0,.3) 80%,rgba(0,0,0,.5) 85%,rgba(0,0,0,.6) 90%,rgba(0,0,0,.7) 95%,rgba(0,0,0,.8) 100%)}.vac-message-file-container .vac-image-buttons svg{height:26px;width:26px}.vac-message-file-container .vac-image-buttons .vac-button-view,.vac-message-file-container .vac-image-buttons .vac-button-download{position:absolute;bottom:6px;left:7px}.vac-message-file-container .vac-image-buttons :first-child{left:40px}.vac-message-file-container .vac-image-buttons .vac-button-view{max-width:18px;bottom:8px}.vac-message-file-container .vac-video-container{width:350px;max-width:100%;margin:4px auto 5px;cursor:pointer}.vac-message-file-container .vac-video-container video{width:100%;height:100%;border-radius:4px}.vac-button-reaction{display:inline-flex;align-items:center;border:var(--chat-message-border-style-reaction);outline:none;background:var(--chat-message-bg-color-reaction);border-radius:4px;margin:4px 2px 0;transition:.3s;padding:0 5px;font-size:18px;line-height:23px}.vac-button-reaction span{font-size:11px;font-weight:500;min-width:7px;color:var(--chat-message-color-reaction-counter)}.vac-button-reaction:hover{border:var(--chat-message-border-style-reaction-hover);background:var(--chat-message-bg-color-reaction-hover);cursor:pointer}.vac-button-reaction.vac-reaction-me{border:var(--chat-message-border-style-reaction-me);background:var(--chat-message-bg-color-reaction-me)}.vac-button-reaction.vac-reaction-me span{color:var(--chat-message-color-reaction-counter-me)}.vac-button-reaction.vac-reaction-me:hover{border:var(--chat-message-border-style-reaction-hover-me);background:var(--chat-message-bg-color-reaction-hover-me)}.vac-reply-message{background:var(--chat-message-bg-color-reply);border-radius:4px;margin:-1px -5px 8px;padding:8px 10px}.vac-reply-message .vac-reply-username{color:var(--chat-message-color-reply-username);font-size:12px;line-height:15px;margin-bottom:2px}.vac-reply-message .vac-image-reply-container{width:70px}.vac-reply-message .vac-image-reply-container .vac-message-image-reply{height:70px;width:70px;margin:4px auto 3px}.vac-reply-message .vac-video-reply-container{width:200px;max-width:100%}.vac-reply-message .vac-video-reply-container video{width:100%;height:100%;border-radius:4px}.vac-reply-message .vac-reply-content{font-size:12px;color:var(--chat-message-color-reply-content)}.vac-reply-message .vac-file-container{height:60px;width:60px}.vac-emoji-wrapper{position:relative;display:flex}.vac-emoji-wrapper .vac-emoji-reaction svg{height:19px;width:19px}.vac-emoji-wrapper .vac-emoji-picker{position:absolute;z-index:9999;bottom:32px;right:10px;width:300px;padding-top:4px;overflow:scroll;box-sizing:border-box;border-radius:.5rem;background:var(--chat-emoji-bg-color);box-shadow:0 1px 2px -2px #0000001a,0 1px 2px -1px #0000001a,0 1px 2px 1px #0000001a;scrollbar-width:none}.vac-emoji-wrapper .vac-emoji-picker::-webkit-scrollbar{display:none}.vac-emoji-wrapper .vac-emoji-picker.vac-picker-reaction{position:fixed;top:initial;right:initial}.vac-emoji-wrapper .vac-emoji-picker emoji-picker{height:100%;width:100%;--emoji-size: 1.2rem;--background: var(--chat-emoji-bg-color);--emoji-padding: .4rem;--border-color: var(--chat-sidemenu-border-color-search);--button-hover-background: var(--chat-sidemenu-bg-color-hover);--button-active-background: var(--chat-sidemenu-bg-color-hover)}.vac-format-message-wrapper .vac-format-container{display:inline}.vac-format-message-wrapper .vac-icon-deleted{height:14px;width:14px;vertical-align:middle;margin:-2px 2px 0 0;fill:var(--chat-message-color-deleted)}.vac-format-message-wrapper .vac-icon-deleted.vac-icon-deleted-room{margin:-3px 1px 0 0;fill:var(--chat-room-color-message)}.vac-format-message-wrapper .vac-image-link-container{background-color:var(--chat-message-bg-color-media);padding:8px;margin:2px auto;border-radius:4px}.vac-format-message-wrapper .vac-image-link{position:relative;background-color:var(--chat-message-bg-color-image)!important;background-size:contain;background-position:center center!important;background-repeat:no-repeat!important;height:150px;width:150px;max-width:100%;border-radius:4px;margin:0 auto}.vac-format-message-wrapper .vac-image-link-message{max-width:166px;font-size:12px}.vac-loader-wrapper.vac-container-center{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:9}.vac-loader-wrapper.vac-container-top{padding:21px}.vac-loader-wrapper.vac-container-top #vac-circle{height:20px;width:20px}.vac-loader-wrapper #vac-circle{margin:auto;height:28px;width:28px;border:3px rgba(0,0,0,.25) solid;border-top:3px var(--chat-color-spinner) solid;border-right:3px var(--chat-color-spinner) solid;border-bottom:3px var(--chat-color-spinner) solid;border-radius:50%;-webkit-animation:vac-spin 1s infinite linear;animation:vac-spin 1s infinite linear}@media only screen and (max-width: 768px){.vac-loader-wrapper #vac-circle{height:24px;width:24px}.vac-loader-wrapper.vac-container-top{padding:18px}.vac-loader-wrapper.vac-container-top #vac-circle{height:16px;width:16px}}@-webkit-keyframes vac-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes vac-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}#vac-icon-search{fill:var(--chat-icon-color-search)}#vac-icon-add{fill:var(--chat-icon-color-add)}#vac-icon-toggle{fill:var(--chat-icon-color-toggle)}#vac-icon-menu{fill:var(--chat-icon-color-menu)}#vac-icon-close{fill:var(--chat-icon-color-close)}#vac-icon-close-image{fill:var(--chat-icon-color-close-image)}#vac-icon-file{fill:var(--chat-icon-color-file)}#vac-icon-paperclip{fill:var(--chat-icon-color-paperclip)}#vac-icon-close-outline{fill:var(--chat-icon-color-close-outline)}#vac-icon-close-outline-preview{fill:var(--chat-icon-color-close-preview)}#vac-icon-send{fill:var(--chat-icon-color-send)}#vac-icon-send-disabled{fill:var(--chat-icon-color-send-disabled)}#vac-icon-emoji{fill:var(--chat-icon-color-emoji)}#vac-icon-emoji-reaction{fill:var(--chat-icon-color-emoji-reaction)}#vac-icon-document{fill:var(--chat-icon-color-document)}#vac-icon-pencil{fill:var(--chat-icon-color-pencil)}#vac-icon-checkmark,#vac-icon-double-checkmark{fill:var(--chat-icon-color-checkmark)}#vac-icon-checkmark-seen,#vac-icon-double-checkmark-seen{fill:var(--chat-icon-color-checkmark-seen)}#vac-icon-eye{fill:var(--chat-icon-color-eye)}#vac-icon-dropdown-message{fill:var(--chat-icon-color-dropdown-message)}#vac-icon-dropdown-room{fill:var(--chat-icon-color-dropdown-room)}#vac-icon-dropdown-scroll{fill:var(--chat-icon-color-dropdown-scroll)}#vac-icon-audio-play{fill:var(--chat-icon-color-audio-play)}#vac-icon-audio-pause{fill:var(--chat-icon-color-audio-pause)}.vac-progress-wrapper{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:9}.vac-progress-wrapper circle{transition:stroke-dashoffset .35s;transform:rotate(-90deg);transform-origin:50% 50%}.vac-progress-wrapper .vac-progress-content{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:-1;margin-top:-2px;background-color:#000000b3;border-radius:50%}.vac-progress-wrapper .vac-progress-content .vac-progress-text{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-weight:700;color:#fff}.vac-progress-wrapper .vac-progress-content .vac-progress-text .vac-progress-pourcent{font-size:9px;font-weight:400}\n'; +var _style_0 = '.vac-fade-spinner-enter-from{opacity:0}.vac-fade-spinner-enter-active{transition:opacity .8s}.vac-fade-spinner-leave-active{transition:opacity .2s;opacity:0}.vac-fade-image-enter-from{opacity:0}.vac-fade-image-enter-active{transition:opacity 1s}.vac-fade-image-leave-active{transition:opacity .5s;opacity:0}.vac-fade-message-enter-from{opacity:0}.vac-fade-message-enter-active{transition:opacity .5s}.vac-fade-message-leave-active{transition:opacity .2s;opacity:0}.vac-slide-left-enter-active,.vac-slide-right-enter-active{transition:all .3s ease;transition-property:transform,opacity}.vac-slide-left-leave-active,.vac-slide-right-leave-active{transition:all .2s cubic-bezier(1,.5,.8,1)!important;transition-property:transform,opacity}.vac-slide-left-enter-from,.vac-slide-left-leave-to{transform:translate(10px);opacity:0}.vac-slide-right-enter-from,.vac-slide-right-leave-to{transform:translate(-10px);opacity:0}.vac-slide-up-enter-active{transition:all .3s ease}.vac-slide-up-leave-active{transition:all .2s cubic-bezier(1,.5,.8,1)}.vac-slide-up-enter-from,.vac-slide-up-leave-to{transform:translateY(10px);opacity:0}.vac-bounce-enter-active{animation:vac-bounce-in .5s}.vac-bounce-leave-active{animation:vac-bounce-in .3s reverse}@keyframes vac-bounce-in{0%{transform:scale(0)}50%{transform:scale(1.05)}to{transform:scale(1)}}.vac-fade-preview-enter{opacity:0}.vac-fade-preview-enter-active{transition:opacity .1s}.vac-fade-preview-leave-active{transition:opacity .2s;opacity:0}.vac-bounce-preview-enter-active{animation:vac-bounce-image-in .4s}.vac-bounce-preview-leave-active{animation:vac-bounce-image-in .3s reverse}@keyframes vac-bounce-image-in{0%{transform:scale(.6)}to{transform:scale(1)}}.vac-menu-list{border-radius:4px;display:block;cursor:pointer;background:var(--chat-dropdown-bg-color);padding:6px 0}.vac-menu-list :hover{background:var(--chat-dropdown-bg-color-hover);transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-menu-list :not(:hover){transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-menu-item{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%;min-height:30px;padding:5px 16px;position:relative;white-space:nowrap;line-height:30px}.vac-menu-options{position:absolute;right:10px;top:20px;z-index:9999;min-width:150px;display:inline-block;border-radius:4px;font-size:14px;color:var(--chat-color);overflow-y:auto;overflow-x:hidden;contain:content;box-shadow:0 2px 2px -4px #0000001a,0 2px 2px 1px #0000001f,0 1px 8px 1px #0000001f}.vac-app-border{border:var(--chat-border-style)}.vac-app-border-t{border-top:var(--chat-border-style)}.vac-app-border-r{border-right:var(--chat-border-style)}.vac-app-border-b{border-bottom:var(--chat-border-style)}.vac-app-box-shadow{transition:all .5s;box-shadow:0 2px 2px -4px #0000001a,0 2px 2px 1px #0000001f,0 1px 8px 1px #0000001f}.vac-item-clickable{cursor:pointer}.vac-vertical-center{display:flex;align-items:center;height:100%}.vac-vertical-center .vac-vertical-container{width:100%;text-align:center}.vac-svg-button{max-height:30px;display:flex;cursor:pointer;transition:all .2s}.vac-svg-button:hover{transform:scale(1.1);opacity:.7}.vac-avatar{background-size:cover;background-position:center center;background-repeat:no-repeat;background-color:#ddd;height:42px;width:42px;min-height:42px;min-width:42px;margin-right:15px;border-radius:50%}.vac-blur-loading{filter:blur(3px)}.vac-badge-counter{height:13px;width:auto;min-width:13px;border-radius:50%;display:flex;align-items:center;justify-content:center;padding:3px;font-size:11px;font-weight:500}.vac-text-ellipsis{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.vac-text-tag{color:var(--chat-message-color-tag);cursor:pointer}.vac-file-container{display:flex;align-content:center;justify-content:center;flex-wrap:wrap;text-align:center;background:var(--chat-bg-color-input);border:var(--chat-border-style-input);border-radius:4px;padding:10px}.vac-file-container svg{height:28px;width:28px}.vac-file-container .vac-text-extension{font-size:12px;color:var(--chat-message-color-file-extension);margin-top:-2px}.markdown p{margin:0}.markdown ol{display:flex;flex-direction:column;list-style-position:inside}.markdown ul{display:flex;flex-direction:column}.markdown code{display:block;font-size:12px;color:var(--chat-markdown-color-multi);background:var(--chat-markdown-bg);border:1px solid var(--chat-markdown-border);border-radius:3px;margin:4px 0;padding:7px}.markdown p code{display:inline-block;font-size:12px;color:var(--chat-markdown-color);background:var(--chat-markdown-bg);border:1px solid var(--chat-markdown-border);border-radius:3px;margin:2px 0;padding:2px 3px}.vac-card-window{width:100%;display:block;max-width:100%;background:var(--chat-content-bg-color);color:var(--chat-color);overflow-wrap:break-word;white-space:normal;border:var(--chat-container-border);border-radius:var(--chat-container-border-radius);box-shadow:var(--chat-container-box-shadow);-webkit-tap-highlight-color:transparent}.vac-card-window *{font-family:inherit}.vac-card-window a{color:#0d579c;font-weight:500}.vac-card-window .vac-chat-container{height:100%;display:flex}.vac-card-window .vac-chat-container input{min-width:10px}.vac-card-window .vac-chat-container textarea,.vac-card-window .vac-chat-container input[type=text],.vac-card-window .vac-chat-container input[type=search]{-webkit-appearance:none}.vac-media-preview{position:fixed;top:0;left:0;z-index:99;width:100vw;height:100vh;display:flex;align-items:center;background-color:#000c;outline:none}.vac-media-preview .vac-media-preview-container{height:calc(100% - 140px);width:calc(100% - 80px);padding:70px 40px;margin:0 auto}.vac-media-preview .vac-image-preview{width:100%;height:100%;background-size:contain;background-repeat:no-repeat;background-position:center}.vac-media-preview video{width:100%;height:100%}.vac-media-preview .vac-svg-button{position:absolute;top:30px;right:30px;transform:scale(1.4)}@media only screen and (max-width: 768px){.vac-media-preview .vac-svg-button{top:20px;right:20px;transform:scale(1.2)}.vac-media-preview .vac-media-preview-container{width:calc(100% - 40px);padding:70px 20px}}.vac-col-messages{position:relative;height:100%;flex:1;overflow:hidden;display:flex;flex-flow:column}.vac-col-messages .vac-container-center{height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.vac-col-messages .vac-room-empty{font-size:14px;color:#9ca6af;font-style:italic;line-height:20px;white-space:pre-line}.vac-col-messages .vac-room-empty div{padding:0 10%}.vac-col-messages .vac-container-scroll{background:var(--chat-content-bg-color);flex:1;overflow-y:auto;margin-right:1px;margin-top:65px;-webkit-overflow-scrolling:touch}.vac-col-messages .vac-container-scroll.vac-scroll-smooth{scroll-behavior:smooth}.vac-col-messages .vac-messages-container{padding:0 5px 5px}.vac-col-messages .vac-text-started{font-size:14px;color:var(--chat-message-color-started);font-style:italic;text-align:center;margin-top:25px;margin-bottom:20px}.vac-col-messages .vac-icon-scroll{position:absolute;bottom:80px;right:20px;padding:8px;background:var(--chat-bg-scroll-icon);border-radius:50%;box-shadow:0 1px 1px -1px #0003,0 1px 1px #00000024,0 1px 2px #0000001f;display:flex;cursor:pointer;z-index:10}.vac-col-messages .vac-icon-scroll svg{height:25px;width:25px}.vac-col-messages .vac-messages-count{position:absolute;top:-8px;left:11px;background-color:var(--chat-message-bg-color-scroll-counter);color:var(--chat-message-color-scroll-counter)}.vac-col-messages .vac-messages-hidden{opacity:0}@media only screen and (max-width: 768px){.vac-col-messages .vac-container-scroll{margin-top:50px}.vac-col-messages .vac-text-started{margin-top:20px}.vac-col-messages .vac-icon-scroll{bottom:70px}}.vac-room-header{position:absolute;display:flex;align-items:center;height:64px;width:100%;z-index:10;margin-right:1px;background:var(--chat-header-bg-color);border-top-right-radius:var(--chat-container-border-radius)}.vac-room-header .vac-room-wrapper{display:flex;align-items:center;min-width:0;height:100%;width:100%;padding:0 16px}.vac-room-header .vac-toggle-button{margin-right:15px}.vac-room-header .vac-toggle-button svg{height:26px;width:26px}.vac-room-header .vac-rotate-icon{transform:rotate(180deg)!important}.vac-room-header .vac-rotate-icon-init{transform:rotate(360deg)}.vac-room-header .vac-info-wrapper,.vac-room-header .vac-room-selection{display:flex;align-items:center;min-width:0;width:100%;height:100%}.vac-room-header .vac-room-selection .vac-selection-button{padding:8px 16px;color:var(--chat-color-button);background-color:var(--chat-bg-color-button);border-radius:4px;margin-right:10px;cursor:pointer;transition:all .2s}.vac-room-header .vac-room-selection .vac-selection-button:hover{opacity:.7}.vac-room-header .vac-room-selection .vac-selection-button:active{opacity:.9}.vac-room-header .vac-room-selection .vac-selection-button .vac-selection-button-count{margin-left:6px;opacity:.9}.vac-room-header .vac-room-selection .vac-selection-cancel{display:flex;align-items:center;margin-left:auto;white-space:nowrap;color:var(--chat-color-button-clear);transition:all .2s}.vac-room-header .vac-room-selection .vac-selection-cancel:hover{opacity:.7}.vac-room-header .vac-room-name{font-size:17px;font-weight:500;line-height:22px;color:var(--chat-header-color-name)}.vac-room-header .vac-room-info{font-size:13px;line-height:18px;color:var(--chat-header-color-info)}.vac-room-header .vac-room-options{margin-left:auto}@media only screen and (max-width: 768px){.vac-room-header{height:50px}.vac-room-header .vac-room-wrapper{padding:0 10px}.vac-room-header .vac-room-name{font-size:16px;line-height:22px}.vac-room-header .vac-room-info{font-size:12px;line-height:16px}.vac-room-header .vac-avatar{height:37px;width:37px;min-height:37px;min-width:37px}}.vac-room-footer{width:100%;border-bottom-right-radius:4px;z-index:10}.vac-box-footer{display:flex;position:relative;background:var(--chat-footer-bg-color);padding:10px 8px}.vac-textarea{max-height:300px;overflow-y:auto;height:20px;width:100%;line-height:20px;outline:0;resize:none;border-radius:20px;padding:12px 16px;box-sizing:content-box;font-size:16px;background:var(--chat-bg-color-input);color:var(--chat-color);caret-color:var(--chat-color-caret);border:var(--chat-border-style-input)}.vac-textarea::placeholder{color:var(--chat-color-placeholder);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.vac-textarea-outline{border:1px solid var(--chat-border-color-input-selected);box-shadow:inset 0 0 0 1px var(--chat-border-color-input-selected)}.vac-icon-textarea,.vac-icon-textarea-left{display:flex;align-items:center}.vac-icon-textarea svg,.vac-icon-textarea .vac-wrapper,.vac-icon-textarea-left svg,.vac-icon-textarea-left .vac-wrapper{margin:0 7px}.vac-icon-textarea{margin-left:5px}.vac-icon-textarea-left{display:flex;align-items:center;margin-right:5px}.vac-icon-textarea-left svg,.vac-icon-textarea-left .vac-wrapper{margin:0 7px}.vac-icon-textarea-left .vac-icon-microphone{fill:var(--chat-icon-color-microphone);margin:0 7px}.vac-icon-textarea-left .vac-dot-audio-record{height:15px;width:15px;border-radius:50%;background-color:var(--chat-message-bg-color-audio-record);animation:vac-scaling .8s ease-in-out infinite alternate}@keyframes vac-scaling{0%{transform:scale(1);opacity:.4}to{transform:scale(1.1);opacity:1}}.vac-icon-textarea-left .vac-dot-audio-record-time{font-size:16px;color:var(--chat-color);margin-left:8px;width:45px}.vac-icon-textarea-left .vac-icon-audio-stop,.vac-icon-textarea-left .vac-icon-audio-confirm{min-height:28px;min-width:28px}.vac-icon-textarea-left .vac-icon-audio-stop svg,.vac-icon-textarea-left .vac-icon-audio-confirm svg{min-height:28px;min-width:28px}.vac-icon-textarea-left .vac-icon-audio-stop{margin-right:20px}.vac-icon-textarea-left .vac-icon-audio-stop #vac-icon-close-outline{fill:var(--chat-icon-color-audio-cancel)}.vac-icon-textarea-left .vac-icon-audio-confirm{margin-right:3px;margin-left:12px}.vac-icon-textarea-left .vac-icon-audio-confirm #vac-icon-checkmark{fill:var(--chat-icon-color-audio-confirm)}.vac-send-disabled,.vac-send-disabled svg{cursor:none!important;pointer-events:none!important;transform:none!important}@media only screen and (max-width: 768px){.vac-room-footer{width:100%}.vac-box-footer{padding:7px 2px 7px 7px}.vac-box-footer.vac-box-footer-border{border-top:var(--chat-border-style-input)}.vac-textarea{padding:7px;line-height:18px}.vac-textarea::placeholder{color:transparent}.vac-icon-textarea svg,.vac-icon-textarea .vac-wrapper,.vac-icon-textarea-left svg,.vac-icon-textarea-left .vac-wrapper{margin:0 5px!important}}@media only screen and (max-height: 768px){.vac-textarea{max-height:120px}}.vac-emojis-container{width:calc(100% - 16px);padding:10px 8px;background:var(--chat-footer-bg-color);display:flex;align-items:center;overflow:auto}.vac-emojis-container .vac-emoji-element{padding:0 8px;font-size:30px;border-radius:4px;cursor:pointer;background:var(--chat-footer-bg-color-tag);transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-emojis-container .vac-emoji-element-active{background:var(--chat-footer-bg-color-tag-active)}@media only screen and (max-width: 768px){.vac-emojis-container{width:calc(100% - 10px);padding:7px 5px}.vac-emojis-container .vac-emoji-element{padding:0 7px;font-size:26px}}.vac-reply-container{display:flex;padding:10px 10px 0;background:var(--chat-footer-bg-color);align-items:center;width:calc(100% - 20px)}.vac-reply-container .vac-reply-box{width:100%;overflow:hidden;background:var(--chat-footer-bg-color-reply);border-radius:4px;padding:8px 10px}.vac-reply-container .vac-reply-info{overflow:hidden}.vac-reply-container .vac-reply-username{color:var(--chat-message-color-reply-username);font-size:12px;line-height:15px;margin-bottom:2px}.vac-reply-container .vac-reply-content{font-size:12px;color:var(--chat-message-color-reply-content);white-space:pre-line}.vac-reply-container .vac-icon-reply{margin-left:10px}.vac-reply-container .vac-icon-reply svg{height:20px;width:20px}.vac-reply-container .vac-image-reply{max-height:100px;max-width:200px;margin:4px 10px 0 0;border-radius:4px}.vac-reply-container .vac-audio-reply{margin-right:10px}.vac-reply-container .vac-file-container{max-width:80px}@media only screen and (max-width: 768px){.vac-reply-container{padding:5px 8px;width:calc(100% - 16px)}}.vac-room-files-container{display:flex;align-items:center;padding:10px 6px 0;background:var(--chat-footer-bg-color)}.vac-room-files-container .vac-files-box{display:flex;overflow:auto;width:calc(100% - 30px)}.vac-room-files-container video{height:100px;border:var(--chat-border-style-input);border-radius:4px}.vac-room-files-container .vac-icon-close{margin-left:auto}.vac-room-files-container .vac-icon-close svg{height:20px;width:20px}@media only screen and (max-width: 768px){.vac-files-container{padding:6px 4px 4px 2px}}.vac-room-file-container{display:flex;position:relative;margin:0 4px}.vac-room-file-container .vac-message-image{position:relative;background-color:var(--chat-message-bg-color-image)!important;background-size:cover!important;background-position:center center!important;background-repeat:no-repeat!important;height:100px;width:100px;border:var(--chat-border-style-input);border-radius:4px}.vac-room-file-container .vac-file-container{height:80px;width:80px}.vac-room-file-container .vac-icon-remove{position:absolute;top:6px;left:6px;z-index:10}.vac-room-file-container .vac-icon-remove svg{height:20px;width:20px;border-radius:50%}.vac-room-file-container .vac-icon-remove:before{content:" ";position:absolute;width:100%;height:100%;background:rgba(0,0,0,.5);border-radius:50%;z-index:-1}.vac-tags-container{display:flex;flex-direction:column;align-items:center;width:100%}.vac-tags-container .vac-tags-box{display:flex;width:100%;height:54px;overflow:hidden;cursor:pointer;background:var(--chat-footer-bg-color-tag);transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-tags-container .vac-tags-box-active{background:var(--chat-footer-bg-color-tag-active)}.vac-tags-container .vac-tags-info{display:flex;overflow:hidden;padding:0 20px;align-items:center}.vac-tags-container .vac-tags-avatar{height:34px;width:34px;min-height:34px;min-width:34px}.vac-tags-container .vac-tags-username{font-size:14px}@media only screen and (max-width: 768px){.vac-tags-container .vac-tags-box{height:50px}.vac-tags-container .vac-tags-info{padding:0 12px}}.vac-template-container{display:flex;flex-direction:column;align-items:center;width:100%}.vac-template-container .vac-template-box{display:flex;width:100%;height:54px;overflow:hidden;cursor:pointer;background:var(--chat-footer-bg-color-tag);transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-template-container .vac-template-active{background:var(--chat-footer-bg-color-tag-active)}.vac-template-container .vac-template-info{display:flex;overflow:hidden;padding:0 20px;align-items:center}.vac-template-container .vac-template-tag{font-size:14px;font-weight:700;margin-right:10px}.vac-template-container .vac-template-text{font-size:14px}@media only screen and (max-width: 768px){.vac-template-container .vac-template-box{height:50px}.vac-template-container .vac-template-info{padding:0 12px}}.vac-rooms-container{display:flex;flex-flow:column;flex:0 0 25%;min-width:260px;max-width:500px;position:relative;background:var(--chat-sidemenu-bg-color);height:100%;border-top-left-radius:var(--chat-container-border-radius);border-bottom-left-radius:var(--chat-container-border-radius)}.vac-rooms-container.vac-rooms-container-full{flex:0 0 100%;max-width:100%}.vac-rooms-container .vac-rooms-empty{font-size:14px;color:#9ca6af;font-style:italic;text-align:center;margin:40px 0;line-height:20px;white-space:pre-line}.vac-rooms-container .vac-room-list{flex:1;position:relative;max-width:100%;cursor:pointer;padding:0 10px 5px;overflow-y:auto}.vac-rooms-container .vac-room-item{border-radius:8px;align-items:center;display:flex;flex:1 1 100%;margin-bottom:5px;padding:0 14px;position:relative;min-height:71px;transition:background-color .3s cubic-bezier(.25,.8,.5,1)}.vac-rooms-container .vac-room-item:hover{background:var(--chat-sidemenu-bg-color-hover)}.vac-rooms-container .vac-room-selected{color:var(--chat-sidemenu-color-active)!important;background:var(--chat-sidemenu-bg-color-active)!important}.vac-rooms-container .vac-room-selected:hover{background:var(--chat-sidemenu-bg-color-active)!important}@media only screen and (max-width: 768px){.vac-rooms-container .vac-room-list{padding:0 7px 5px}.vac-rooms-container .vac-room-item{min-height:60px;padding:0 8px}}.vac-room-container{display:flex;flex:1;align-items:center;width:100%}.vac-room-container .vac-name-container{flex:1}.vac-room-container .vac-title-container{display:flex;align-items:center;line-height:25px}.vac-room-container .vac-state-circle{width:9px;height:9px;border-radius:50%;background-color:var(--chat-room-color-offline);margin-right:6px;transition:.3s}.vac-room-container .vac-state-online{background-color:var(--chat-room-color-online)}.vac-room-container .vac-room-name{flex:1;color:var(--chat-room-color-username);font-weight:500}.vac-room-container .vac-text-date{margin-left:5px;font-size:11px;color:var(--chat-room-color-timestamp)}.vac-room-container .vac-text-last{display:flex;align-items:center;font-size:12px;line-height:19px;color:var(--chat-room-color-message)}.vac-room-container .vac-message-new{color:var(--chat-room-color-username);font-weight:500}.vac-room-container .vac-icon-check{display:flex;vertical-align:middle;height:14px;width:14px;margin-top:-2px;margin-right:2px}.vac-room-container .vac-icon-microphone{height:15px;width:15px;vertical-align:middle;margin:-3px 1px 0 -2px;fill:var(--chat-room-color-message)}.vac-room-container .vac-room-options-container{display:flex;margin-left:auto}.vac-room-container .vac-room-badge{background-color:var(--chat-room-bg-color-badge);color:var(--chat-room-color-badge);margin-left:5px}.vac-room-container .vac-list-room-options{height:19px;width:19px;align-items:center;margin-left:5px}.vac-box-empty{margin-top:10px}@media only screen and (max-width: 768px){.vac-box-empty{margin-top:7px}}.vac-box-search{position:sticky;display:flex;align-items:center;height:64px;padding:0 15px}.vac-box-search .vac-icon-search{display:flex;position:absolute;left:30px}.vac-box-search .vac-icon-search svg{width:18px;height:18px}.vac-box-search .vac-input{height:38px;width:100%;background:var(--chat-bg-color-input);color:var(--chat-color);font-size:15px;outline:0;caret-color:var(--chat-color-caret);padding:10px 10px 10px 40px;border:1px solid var(--chat-sidemenu-border-color-search);border-radius:20px}.vac-box-search .vac-input::placeholder{color:var(--chat-color-placeholder)}.vac-box-search .vac-add-icon{margin-left:auto;padding-left:10px}@media only screen and (max-width: 768px){.vac-box-search{height:58px}}.vac-message-wrapper .vac-card-info{border-radius:4px;text-align:center;margin:10px auto;font-size:12px;padding:4px;display:block;overflow-wrap:break-word;position:relative;white-space:normal;box-shadow:0 1px 1px -1px #0000001a,0 1px 1px -1px #0000001c,0 1px 2px -1px #0000001c}.vac-message-wrapper .vac-card-date{max-width:150px;font-weight:500;text-transform:uppercase;color:var(--chat-message-color-date);background-color:var(--chat-message-bg-color-date)}.vac-message-wrapper .vac-card-system{max-width:250px;padding:8px 4px;color:var(--chat-message-color-system);background-color:var(--chat-message-bg-color-system)}.vac-message-wrapper .vac-line-new{color:var(--chat-message-color-new-messages);position:relative;text-align:center;font-size:13px;padding:10px 0}.vac-message-wrapper .vac-line-new:after,.vac-message-wrapper .vac-line-new:before{border-top:1px solid var(--chat-message-color-new-messages);content:"";left:0;position:absolute;top:50%;width:calc(50% - 60px)}.vac-message-wrapper .vac-line-new:before{left:auto;right:0}.vac-message-wrapper .vac-message-box{display:flex;flex:0 0 50%;max-width:50%;justify-content:flex-start;line-height:1.4}.vac-message-wrapper .vac-avatar{height:28px;width:28px;min-height:28px;min-width:28px;margin:0 0 2px;align-self:flex-end}.vac-message-wrapper .vac-avatar-current-offset{margin-right:28px}.vac-message-wrapper .vac-avatar-offset{margin-left:28px}.vac-message-wrapper .vac-failure-container{position:relative;align-self:flex-end;height:20px;width:20px;margin:0 0 2px -4px;border-radius:50%;background-color:#f44336}.vac-message-wrapper .vac-failure-container.vac-failure-container-avatar{margin-right:6px}.vac-message-wrapper .vac-failure-container .vac-failure-text{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;font-size:15px;font-weight:700}.vac-message-wrapper .vac-message-container{position:relative;padding:2px 10px;align-items:end;min-width:100px;box-sizing:content-box}.vac-message-wrapper .vac-message-container-offset{margin-top:10px}.vac-message-wrapper .vac-offset-current{margin-left:50%;justify-content:flex-end}.vac-message-wrapper .vac-message-card{background-color:var(--chat-message-bg-color);color:var(--chat-message-color);border-radius:8px;font-size:14px;padding:6px 9px 3px;white-space:pre-line;max-width:100%;-webkit-transition-property:box-shadow,opacity;transition-property:box-shadow,opacity;transition:box-shadow .28s cubic-bezier(.4,0,.2,1);will-change:box-shadow;box-shadow:0 1px 1px -1px #0000001a,0 1px 1px -1px #0000001c,0 1px 2px -1px #0000001c}.vac-message-wrapper .vac-message-highlight{box-shadow:0 1px 2px -1px #0000001a,0 1px 2px -1px #0000001c,0 1px 5px -1px #0000001c}.vac-message-wrapper .vac-message-current{background-color:var(--chat-message-bg-color-me)!important}.vac-message-wrapper .vac-message-deleted{color:var(--chat-message-color-deleted)!important;font-size:13px!important;font-style:italic!important;background-color:var(--chat-message-bg-color-deleted)!important}.vac-message-wrapper .vac-message-selected{background-color:var(--chat-message-bg-color-selected)!important;transition:background-color .2s}.vac-message-wrapper .vac-message-image{position:relative;background-color:var(--chat-message-bg-color-image)!important;background-size:cover!important;background-position:center center!important;background-repeat:no-repeat!important;height:250px;width:250px;max-width:100%;border-radius:4px;margin:4px auto 5px;transition:.4s filter linear}.vac-message-wrapper .vac-text-username{font-size:13px;color:var(--chat-message-color-username);margin-bottom:2px}.vac-message-wrapper .vac-username-reply{margin-bottom:5px}.vac-message-wrapper .vac-text-timestamp{font-size:10px;color:var(--chat-message-color-timestamp);text-align:right}.vac-message-wrapper .vac-progress-time{float:left;margin:-2px 0 0 40px;color:var(--chat-color);font-size:12px}.vac-message-wrapper .vac-icon-edited{-webkit-box-align:center;align-items:center;display:-webkit-inline-box;display:inline-flex;justify-content:center;letter-spacing:normal;line-height:1;text-indent:0;vertical-align:middle;margin:0 4px 2px}.vac-message-wrapper .vac-icon-edited svg{height:12px;width:12px}.vac-message-wrapper .vac-icon-check{height:14px;width:14px;vertical-align:middle;margin:-3px -3px 0 3px}@media only screen and (max-width: 768px){.vac-message-wrapper .vac-message-container{padding:2px 3px 1px}.vac-message-wrapper .vac-message-container-offset{margin-top:10px}.vac-message-wrapper .vac-message-box{flex:0 0 80%;max-width:80%}.vac-message-wrapper .vac-avatar{height:25px;width:25px;min-height:25px;min-width:25px;margin:0 6px 1px 0}.vac-message-wrapper .vac-avatar.vac-avatar-current{margin:0 0 1px 6px}.vac-message-wrapper .vac-avatar-current-offset{margin-right:31px}.vac-message-wrapper .vac-avatar-offset{margin-left:31px}.vac-message-wrapper .vac-failure-container{margin-left:2px}.vac-message-wrapper .vac-failure-container.vac-failure-container-avatar{margin-right:0}.vac-message-wrapper .vac-offset-current{margin-left:20%}.vac-message-wrapper .vac-progress-time{margin-left:37px}}.vac-audio-player{display:flex;margin:8px 0 5px}.vac-audio-player .vac-svg-button{max-width:18px;margin-left:7px}@media only screen and (max-width: 768px){.vac-audio-player{margin:4px 0 0}.vac-audio-player .vac-svg-button{max-width:16px;margin-left:5px}}.vac-player-bar{display:flex;align-items:center;max-width:calc(100% - 18px);margin-right:7px;margin-left:20px}.vac-player-bar .vac-player-progress{width:190px}.vac-player-bar .vac-player-progress .vac-line-container{position:relative;height:4px;border-radius:5px;background-color:var(--chat-message-bg-color-audio-line)}.vac-player-bar .vac-player-progress .vac-line-container .vac-line-progress{position:absolute;height:inherit;background-color:var(--chat-message-bg-color-audio-progress);border-radius:inherit}.vac-player-bar .vac-player-progress .vac-line-container .vac-line-dot{position:absolute;top:-5px;margin-left:-7px;height:14px;width:14px;border-radius:50%;background-color:var(--chat-message-bg-color-audio-progress-selector);transition:transform .25s}.vac-player-bar .vac-player-progress .vac-line-container .vac-line-dot__active{transform:scale(1.2)}@media only screen and (max-width: 768px){.vac-player-bar{margin-right:5px}.vac-player-bar .vac-player-progress .vac-line-container{height:3px}.vac-player-bar .vac-player-progress .vac-line-container .vac-line-dot{height:12px;width:12px;top:-5px;margin-left:-5px}}.vac-message-actions-wrapper .vac-options-container{position:absolute;top:2px;right:10px;height:40px;width:70px;overflow:hidden;border-top-right-radius:8px}.vac-message-actions-wrapper .vac-blur-container{position:absolute;height:100%;width:100%;left:8px;bottom:10px;background:var(--chat-message-bg-color);filter:blur(3px);border-bottom-left-radius:8px}.vac-message-actions-wrapper .vac-options-me{background:var(--chat-message-bg-color-me)}.vac-message-actions-wrapper .vac-message-options{background:var(--chat-icon-bg-dropdown-message);border-radius:50%;position:absolute;top:7px;right:7px}.vac-message-actions-wrapper .vac-message-options svg{height:17px;width:17px;padding:5px;margin:-5px}.vac-message-actions-wrapper .vac-message-emojis{position:absolute;top:6px;right:30px}.vac-message-actions-wrapper .vac-menu-options{right:15px}.vac-message-actions-wrapper .vac-menu-left{right:-118px}@media only screen and (max-width: 768px){.vac-message-actions-wrapper .vac-options-container{right:3px}.vac-message-actions-wrapper .vac-menu-left{right:-50px}}.vac-message-files-container .vac-file-wrapper{position:relative;width:fit-content}.vac-message-files-container .vac-file-wrapper .vac-file-container{height:60px;width:60px;margin:3px 0 5px;cursor:pointer;transition:all .6s}.vac-message-files-container .vac-file-wrapper .vac-file-container:hover{opacity:.85}.vac-message-files-container .vac-file-wrapper .vac-file-container svg{height:30px;width:30px}.vac-message-files-container .vac-file-wrapper .vac-file-container.vac-file-container-progress{background-color:#0000004d}.vac-message-file-container{position:relative;z-index:0}.vac-message-file-container .vac-message-image-container{cursor:pointer}.vac-message-file-container .vac-image-buttons{position:absolute;width:100%;height:100%;border-radius:4px;background:linear-gradient(to bottom,rgba(0,0,0,0) 55%,rgba(0,0,0,.02) 60%,rgba(0,0,0,.05) 65%,rgba(0,0,0,.1) 70%,rgba(0,0,0,.2) 75%,rgba(0,0,0,.3) 80%,rgba(0,0,0,.5) 85%,rgba(0,0,0,.6) 90%,rgba(0,0,0,.7) 95%,rgba(0,0,0,.8) 100%)}.vac-message-file-container .vac-image-buttons svg{height:26px;width:26px}.vac-message-file-container .vac-image-buttons .vac-button-view,.vac-message-file-container .vac-image-buttons .vac-button-download{position:absolute;bottom:6px;left:7px}.vac-message-file-container .vac-image-buttons :first-child{left:40px}.vac-message-file-container .vac-image-buttons .vac-button-view{max-width:18px;bottom:8px}.vac-message-file-container .vac-video-container{width:350px;max-width:100%;margin:4px auto 5px;cursor:pointer}.vac-message-file-container .vac-video-container video{width:100%;height:100%;border-radius:4px}.vac-button-reaction{display:inline-flex;align-items:center;border:var(--chat-message-border-style-reaction);outline:none;background:var(--chat-message-bg-color-reaction);border-radius:4px;margin:4px 2px 0;transition:.3s;padding:0 5px;font-size:18px;line-height:23px}.vac-button-reaction span{font-size:11px;font-weight:500;min-width:7px;color:var(--chat-message-color-reaction-counter)}.vac-button-reaction:hover{border:var(--chat-message-border-style-reaction-hover);background:var(--chat-message-bg-color-reaction-hover);cursor:pointer}.vac-button-reaction.vac-reaction-me{border:var(--chat-message-border-style-reaction-me);background:var(--chat-message-bg-color-reaction-me)}.vac-button-reaction.vac-reaction-me span{color:var(--chat-message-color-reaction-counter-me)}.vac-button-reaction.vac-reaction-me:hover{border:var(--chat-message-border-style-reaction-hover-me);background:var(--chat-message-bg-color-reaction-hover-me)}.vac-reply-message{background:var(--chat-message-bg-color-reply);border-radius:4px;margin:-1px -5px 8px;padding:8px 10px}.vac-reply-message .vac-reply-username{color:var(--chat-message-color-reply-username);font-size:12px;line-height:15px;margin-bottom:2px}.vac-reply-message .vac-image-reply-container{width:70px}.vac-reply-message .vac-image-reply-container .vac-message-image-reply{height:70px;width:70px;margin:4px auto 3px}.vac-reply-message .vac-video-reply-container{width:200px;max-width:100%}.vac-reply-message .vac-video-reply-container video{width:100%;height:100%;border-radius:4px}.vac-reply-message .vac-reply-content{font-size:12px;color:var(--chat-message-color-reply-content)}.vac-reply-message .vac-file-container{height:60px;width:60px}.vac-emoji-wrapper{position:relative;display:flex}.vac-emoji-wrapper .vac-emoji-reaction svg{height:19px;width:19px}.vac-emoji-wrapper .vac-emoji-picker{position:absolute;z-index:9999;bottom:32px;right:10px;width:300px;padding-top:4px;overflow:scroll;box-sizing:border-box;border-radius:.5rem;background:var(--chat-emoji-bg-color);box-shadow:0 1px 2px -2px #0000001a,0 1px 2px -1px #0000001a,0 1px 2px 1px #0000001a;scrollbar-width:none}.vac-emoji-wrapper .vac-emoji-picker::-webkit-scrollbar{display:none}.vac-emoji-wrapper .vac-emoji-picker.vac-picker-reaction{position:fixed;top:initial;right:initial}.vac-emoji-wrapper .vac-emoji-picker emoji-picker{height:100%;width:100%;--emoji-size: 1.2rem;--background: var(--chat-emoji-bg-color);--emoji-padding: .4rem;--border-color: var(--chat-sidemenu-border-color-search);--button-hover-background: var(--chat-sidemenu-bg-color-hover);--button-active-background: var(--chat-sidemenu-bg-color-hover)}.vac-format-message-wrapper .vac-format-container{display:inline}.vac-format-message-wrapper .vac-icon-deleted{height:14px;width:14px;vertical-align:middle;margin:-2px 2px 0 0;fill:var(--chat-message-color-deleted)}.vac-format-message-wrapper .vac-icon-deleted.vac-icon-deleted-room{margin:-3px 1px 0 0;fill:var(--chat-room-color-message)}.vac-format-message-wrapper .vac-image-link-container{background-color:var(--chat-message-bg-color-media);padding:8px;margin:2px auto;border-radius:4px}.vac-format-message-wrapper .vac-image-link{position:relative;background-color:var(--chat-message-bg-color-image)!important;background-size:contain;background-position:center center!important;background-repeat:no-repeat!important;height:150px;width:150px;max-width:100%;border-radius:4px;margin:0 auto}.vac-format-message-wrapper .vac-image-link-message{max-width:166px;font-size:12px}.vac-loader-wrapper.vac-container-center{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:9}.vac-loader-wrapper.vac-container-top{padding:21px}.vac-loader-wrapper.vac-container-top #vac-circle{height:20px;width:20px}.vac-loader-wrapper #vac-circle{margin:auto;height:28px;width:28px;border:3px rgba(0,0,0,.25) solid;border-top:3px var(--chat-color-spinner) solid;border-right:3px var(--chat-color-spinner) solid;border-bottom:3px var(--chat-color-spinner) solid;border-radius:50%;-webkit-animation:vac-spin 1s infinite linear;animation:vac-spin 1s infinite linear}@media only screen and (max-width: 768px){.vac-loader-wrapper #vac-circle{height:24px;width:24px}.vac-loader-wrapper.vac-container-top{padding:18px}.vac-loader-wrapper.vac-container-top #vac-circle{height:16px;width:16px}}@-webkit-keyframes vac-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes vac-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}#vac-icon-search{fill:var(--chat-icon-color-search)}#vac-icon-add{fill:var(--chat-icon-color-add)}#vac-icon-toggle{fill:var(--chat-icon-color-toggle)}#vac-icon-menu{fill:var(--chat-icon-color-menu)}#vac-icon-close{fill:var(--chat-icon-color-close)}#vac-icon-close-image{fill:var(--chat-icon-color-close-image)}#vac-icon-file{fill:var(--chat-icon-color-file)}#vac-icon-paperclip{fill:var(--chat-icon-color-paperclip)}#vac-icon-close-outline{fill:var(--chat-icon-color-close-outline)}#vac-icon-close-outline-preview{fill:var(--chat-icon-color-close-preview)}#vac-icon-send{fill:var(--chat-icon-color-send)}#vac-icon-send-disabled{fill:var(--chat-icon-color-send-disabled)}#vac-icon-emoji{fill:var(--chat-icon-color-emoji)}#vac-icon-emoji-reaction{fill:var(--chat-icon-color-emoji-reaction)}#vac-icon-document{fill:var(--chat-icon-color-document)}#vac-icon-pencil{fill:var(--chat-icon-color-pencil)}#vac-icon-checkmark,#vac-icon-double-checkmark{fill:var(--chat-icon-color-checkmark)}#vac-icon-checkmark-seen,#vac-icon-double-checkmark-seen{fill:var(--chat-icon-color-checkmark-seen)}#vac-icon-eye{fill:var(--chat-icon-color-eye)}#vac-icon-dropdown-message{fill:var(--chat-icon-color-dropdown-message)}#vac-icon-dropdown-room{fill:var(--chat-icon-color-dropdown-room)}#vac-icon-dropdown-scroll{fill:var(--chat-icon-color-dropdown-scroll)}#vac-icon-audio-play{fill:var(--chat-icon-color-audio-play)}#vac-icon-audio-pause{fill:var(--chat-icon-color-audio-pause)}.vac-progress-wrapper{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:9}.vac-progress-wrapper circle{transition:stroke-dashoffset .35s;transform:rotate(-90deg);transform-origin:50% 50%}.vac-progress-wrapper .vac-progress-content{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:-1;margin-top:-2px;background-color:#000000b3;border-radius:50%}.vac-progress-wrapper .vac-progress-content .vac-progress-text{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-weight:700;color:#fff}.vac-progress-wrapper .vac-progress-content .vac-progress-text .vac-progress-pourcent{font-size:9px;font-weight:400}\n'; const _sfc_main = { name: "ChatContainer", components: { @@ -29549,13 +34933,7 @@ const _sfc_main = { textFormatting: { type: [Object, String], default: () => ({ - disabled: false, - italic: "_", - bold: "*", - strike: "~", - underline: "\xB0", - multilineCode: "```", - inlineCode: "`" + disabled: false }) }, linkOptions: { @@ -29570,6 +34948,7 @@ const _sfc_main = { roomMessage: { type: String, default: "" }, scrollDistance: { type: Number, default: 60 }, acceptedFiles: { type: String, default: "*" }, + captureFiles: { type: String, default: "" }, templatesText: { type: [Array, String], default: () => [] }, mediaPreviewEnabled: { type: [Boolean, String], default: true }, usernameOptions: { @@ -29809,10 +35188,10 @@ const _sfc_main = { return val === "true" || val === true; }, castArray(val) { - return !val ? [] : Array.isArray(val) ? val : JSON.parse(val); + return !val ? [] : Array.isArray(val) ? val : typeof val === "object" ? [val] : JSON.parse(val); }, castObject(val) { - return !val ? {} : typeof val === "object" ? val : JSON.parse(val); + return typeof val === "object" ? val : !val ? {} : JSON.parse(val); }, updateResponsive() { this.isMobile = window.innerWidth < Number(this.responsiveBreakpoint); @@ -29841,8 +35220,8 @@ const _sfc_main = { searchRoom(val) { this.$emit("search-room", { value: val, roomId: this.room.roomId }); }, - fetchMessages(options2) { - this.$emit("fetch-messages", { room: this.room, options: options2 }); + fetchMessages(options) { + this.$emit("fetch-messages", { room: this.room, options }); }, sendMessage(message) { this.$emit("send-message", { ...message, roomId: this.room.roomId }); @@ -29992,6 +35371,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { "emojis-suggestion-enabled": $options.emojisSuggestionEnabledCasted, "scroll-distance": $props.scrollDistance, "accepted-files": $props.acceptedFiles, + "capture-files": $props.captureFiles, "templates-text": $options.templatesTextCasted, "username-options": $options.usernameOptionsCasted, "emoji-data-source": $props.emojiDataSource, @@ -30019,7 +35399,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { ]) }; }) - ]), 1032, ["current-user-id", "rooms", "room-id", "load-first-room", "messages", "room-message", "messages-loaded", "menu-actions", "message-actions", "message-selection-actions", "auto-scroll", "show-send-icon", "show-files", "show-audio", "audio-bit-rate", "audio-sample-rate", "show-emojis", "show-reaction-emojis", "show-new-messages-divider", "show-footer", "text-messages", "single-room", "show-rooms-list", "text-formatting", "link-options", "is-mobile", "loading-rooms", "room-info-enabled", "textarea-action-enabled", "textarea-auto-focus", "user-tags-enabled", "emojis-suggestion-enabled", "scroll-distance", "accepted-files", "templates-text", "username-options", "emoji-data-source", "onToggleRoomsList", "onRoomInfo", "onFetchMessages", "onSendMessage", "onEditMessage", "onDeleteMessage", "onOpenFile", "onOpenUserTag", "onOpenFailedMessage", "onMenuActionHandler", "onMessageActionHandler", "onMessageSelectionActionHandler", "onSendMessageReaction", "onTypingMessage", "onTextareaActionHandler"]) + ]), 1032, ["current-user-id", "rooms", "room-id", "load-first-room", "messages", "room-message", "messages-loaded", "menu-actions", "message-actions", "message-selection-actions", "auto-scroll", "show-send-icon", "show-files", "show-audio", "audio-bit-rate", "audio-sample-rate", "show-emojis", "show-reaction-emojis", "show-new-messages-divider", "show-footer", "text-messages", "single-room", "show-rooms-list", "text-formatting", "link-options", "is-mobile", "loading-rooms", "room-info-enabled", "textarea-action-enabled", "textarea-auto-focus", "user-tags-enabled", "emojis-suggestion-enabled", "scroll-distance", "accepted-files", "capture-files", "templates-text", "username-options", "emoji-data-source", "onToggleRoomsList", "onRoomInfo", "onFetchMessages", "onSendMessage", "onEditMessage", "onDeleteMessage", "onOpenFile", "onOpenUserTag", "onOpenFailedMessage", "onMenuActionHandler", "onMessageActionHandler", "onMessageSelectionActionHandler", "onSendMessageReaction", "onTypingMessage", "onTextareaActionHandler"]) ]), createVNode(Transition, { name: "vac-fade-preview", diff --git a/dist/vue-advanced-chat.umd.js b/dist/vue-advanced-chat.umd.js index 50a10ce4..0bf78b05 100644 --- a/dist/vue-advanced-chat.umd.js +++ b/dist/vue-advanced-chat.umd.js @@ -1,19 +1,18 @@ -(function(va,mr){typeof exports=="object"&&typeof module!="undefined"?mr(exports):typeof define=="function"&&define.amd?define(["exports"],mr):(va=typeof globalThis!="undefined"?globalThis:va||self,mr(va["vue-advanced-chat"]={}))})(this,function(va){"use strict";function mr(e,t){const s=Object.create(null),a=e.split(",");for(let n=0;n!!s[n.toLowerCase()]:n=>!!s[n]}const Mu=()=>{},Au=Object.assign,Eu=Object.prototype.hasOwnProperty,hn=(e,t)=>Eu.call(e,t),Ws=Array.isArray,vn=e=>xl(e)==="[object Map]",Tu=e=>typeof e=="function",ku=e=>typeof e=="string",Mi=e=>typeof e=="symbol",_n=e=>e!==null&&typeof e=="object",Ru=Object.prototype.toString,xl=e=>Ru.call(e),Ou=e=>xl(e).slice(8,-1),Ai=e=>ku(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,wl=(e,t)=>!Object.is(e,t),Iu=(e,t,s)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:s})};let ks;class Cu{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&ks&&(this.parent=ks,this.index=(ks.scopes||(ks.scopes=[])).push(this)-1)}run(t){if(this.active){const s=ks;try{return ks=this,t()}finally{ks=s}}}on(){ks=this}off(){ks=this.parent}stop(t){if(this.active){let s,a;for(s=0,a=this.effects.length;s{const t=new Set(e);return t.w=0,t.n=0,t},Sl=e=>(e.w&Qs)>0,Ml=e=>(e.n&Qs)>0,Lu=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let s=0;for(let a=0;a{(l==="length"||l>=a)&&u.push(g)});else switch(s!==void 0&&u.push(o.get(s)),t){case"add":Ws(e)?Ai(s)&&u.push(o.get("length")):(u.push(o.get(_a)),vn(e)&&u.push(o.get(Ri)));break;case"delete":Ws(e)||(u.push(o.get(_a)),vn(e)&&u.push(o.get(Ri)));break;case"set":vn(e)&&u.push(o.get(_a));break}if(u.length===1)u[0]&&Ii(u[0]);else{const g=[];for(const l of u)l&&g.push(...l);Ii(Ei(g))}}function Ii(e,t){const s=Ws(e)?e:[...e];for(const a of s)a.computed&&kl(a);for(const a of s)a.computed||kl(a)}function kl(e,t){(e!==ys||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const ju=mr("__proto__,__v_isRef,__isVue"),Rl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Mi)),Hu=Ci(),Fu=Ci(!1,!0),Pu=Ci(!0),Ol=Uu();function Uu(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...s){const a=mt(this);for(let r=0,o=this.length;r{e[t]=function(...s){za();const a=mt(this)[t].apply(this,s);return Ya(),a}}),e}function Ci(e=!1,t=!1){return function(a,n,r){if(n==="__v_isReactive")return!e;if(n==="__v_isReadonly")return e;if(n==="__v_isShallow")return t;if(n==="__v_raw"&&r===(e?t?sd:Pl:t?Fl:Hl).get(a))return a;const o=Ws(a);if(!e&&o&&hn(Ol,n))return Reflect.get(Ol,n,r);const u=Reflect.get(a,n,r);return(Mi(n)?Rl.has(n):ju(n))||(e||ns(a,"get",n),t)?u:Kt(u)?o&&Ai(n)?u:u.value:_n(u)?e?Ul(u):Ni(u):u}}const Du=Il(),qu=Il(!0);function Il(e=!1){return function(s,a,n,r){let o=s[a];if(vr(o)&&Kt(o)&&!Kt(n))return!1;if(!e&&!vr(n)&&(Hi(n)||(n=mt(n),o=mt(o)),!Ws(s)&&Kt(o)&&!Kt(n)))return o.value=n,!0;const u=Ws(s)&&Ai(a)?Number(a)e,pn=e=>Reflect.getPrototypeOf(e);function gn(e,t,s=!1,a=!1){e=e.__v_raw;const n=mt(e),r=mt(t);s||(t!==r&&ns(n,"get",t),ns(n,"get",r));const{has:o}=pn(n),u=a?Bi:s?Pi:Fi;if(o.call(n,t))return u(e.get(t));if(o.call(n,r))return u(e.get(r));e!==n&&e.get(t)}function bn(e,t=!1){const s=this.__v_raw,a=mt(s),n=mt(e);return t||(e!==n&&ns(a,"has",e),ns(a,"has",n)),e===n?s.has(e):s.has(e)||s.has(n)}function yn(e,t=!1){return e=e.__v_raw,!t&&ns(mt(e),"iterate",_a),Reflect.get(e,"size",e)}function Bl(e){e=mt(e);const t=mt(this);return pn(t).has.call(t,e)||(t.add(e),qs(t,"add",e,e)),this}function Ll(e,t){t=mt(t);const s=mt(this),{has:a,get:n}=pn(s);let r=a.call(s,e);r||(e=mt(e),r=a.call(s,e));const o=n.call(s,e);return s.set(e,t),r?wl(t,o)&&qs(s,"set",e,t):qs(s,"add",e,t),this}function Nl(e){const t=mt(this),{has:s,get:a}=pn(t);let n=s.call(t,e);n||(e=mt(e),n=s.call(t,e)),a&&a.call(t,e);const r=t.delete(e);return n&&qs(t,"delete",e,void 0),r}function jl(){const e=mt(this),t=e.size!==0,s=e.clear();return t&&qs(e,"clear",void 0,void 0),s}function xn(e,t){return function(a,n){const r=this,o=r.__v_raw,u=mt(o),g=t?Bi:e?Pi:Fi;return!e&&ns(u,"iterate",_a),o.forEach((l,p)=>a.call(n,g(l),g(p),r))}}function wn(e,t,s){return function(...a){const n=this.__v_raw,r=mt(n),o=vn(r),u=e==="entries"||e===Symbol.iterator&&o,g=e==="keys"&&o,l=n[e](...a),p=s?Bi:t?Pi:Fi;return!t&&ns(r,"iterate",g?Ri:_a),{next(){const{value:c,done:M}=l.next();return M?{value:c,done:M}:{value:u?[p(c[0]),p(c[1])]:p(c),done:M}},[Symbol.iterator](){return this}}}}function $s(e){return function(...t){return e==="delete"?!1:this}}function Gu(){const e={get(r){return gn(this,r)},get size(){return yn(this)},has:bn,add:Bl,set:Ll,delete:Nl,clear:jl,forEach:xn(!1,!1)},t={get(r){return gn(this,r,!1,!0)},get size(){return yn(this)},has:bn,add:Bl,set:Ll,delete:Nl,clear:jl,forEach:xn(!1,!0)},s={get(r){return gn(this,r,!0)},get size(){return yn(this,!0)},has(r){return bn.call(this,r,!0)},add:$s("add"),set:$s("set"),delete:$s("delete"),clear:$s("clear"),forEach:xn(!0,!1)},a={get(r){return gn(this,r,!0,!0)},get size(){return yn(this,!0)},has(r){return bn.call(this,r,!0)},add:$s("add"),set:$s("set"),delete:$s("delete"),clear:$s("clear"),forEach:xn(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(r=>{e[r]=wn(r,!1,!1),s[r]=wn(r,!0,!1),t[r]=wn(r,!1,!0),a[r]=wn(r,!0,!0)}),[e,s,t,a]}const[Zu,Wu,Qu,Ju]=Gu();function Li(e,t){const s=t?e?Ju:Qu:e?Wu:Zu;return(a,n,r)=>n==="__v_isReactive"?!e:n==="__v_isReadonly"?e:n==="__v_raw"?a:Reflect.get(hn(s,n)&&n in a?s:a,n,r)}const $u={get:Li(!1,!1)},ed={get:Li(!1,!0)},td={get:Li(!0,!1)},Hl=new WeakMap,Fl=new WeakMap,Pl=new WeakMap,sd=new WeakMap;function ad(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function rd(e){return e.__v_skip||!Object.isExtensible(e)?0:ad(Ou(e))}function Ni(e){return vr(e)?e:ji(e,!1,Cl,$u,Hl)}function nd(e){return ji(e,!1,Ku,ed,Fl)}function Ul(e){return ji(e,!0,Xu,td,Pl)}function ji(e,t,s,a,n){if(!_n(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=n.get(e);if(r)return r;const o=rd(e);if(o===0)return e;const u=new Proxy(e,o===2?a:s);return n.set(e,u),u}function Xa(e){return vr(e)?Xa(e.__v_raw):!!(e&&e.__v_isReactive)}function vr(e){return!!(e&&e.__v_isReadonly)}function Hi(e){return!!(e&&e.__v_isShallow)}function Dl(e){return Xa(e)||vr(e)}function mt(e){const t=e&&e.__v_raw;return t?mt(t):e}function ql(e){return Iu(e,"__v_skip",!0),e}const Fi=e=>_n(e)?Ni(e):e,Pi=e=>_n(e)?Ul(e):e;function id(e){Js&&ys&&(e=mt(e),Tl(e.dep||(e.dep=Ei())))}function od(e,t){e=mt(e),e.dep&&Ii(e.dep)}function Kt(e){return!!(e&&e.__v_isRef===!0)}function ld(e){return Kt(e)?e.value:e}const cd={get:(e,t,s)=>ld(Reflect.get(e,t,s)),set:(e,t,s,a)=>{const n=e[t];return Kt(n)&&!Kt(s)?(n.value=s,!0):Reflect.set(e,t,s,a)}};function Vl(e){return Xa(e)?e:new Proxy(e,cd)}class ud{constructor(t,s,a,n){this._setter=s,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new Oi(t,()=>{this._dirty||(this._dirty=!0,od(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=a}get value(){const t=mt(this);return id(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function dd(e,t,s=!1){let a,n;const r=Tu(e);return r?(a=e,n=Mu):(a=e.get,n=e.set),new ud(a,n,r||!n,s)}function fd(e,t){const s=Object.create(null),a=e.split(",");for(let n=0;n!!s[n.toLowerCase()]:n=>!!s[n]}function Et(e){if(lt(e)){const t={};for(let s=0;s{if(s){const a=s.split(hd);a.length>1&&(t[a[0].trim()]=a[1].trim())}}),t}function at(e){let t="";if(Gt(e))t=e;else if(lt(e))for(let s=0;sGt(e)?e:e==null?"":lt(e)||Zt(e)&&(e.toString===Zl||!nt(e.toString))?JSON.stringify(e,zl,2):String(e),zl=(e,t)=>t&&t.__v_isRef?zl(e,t.value):Xl(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[a,n])=>(s[`${a} =>`]=n,s),{})}:Kl(t)?{[`Set(${t.size})`]:[...t.values()]}:Zt(t)&&!lt(t)&&!Wl(t)?String(t):t,xt={},Ka=[],Rs=()=>{},_d=()=>!1,pd=/^on[^a-z]/,Ui=e=>pd.test(e),Yl=e=>e.startsWith("onUpdate:"),is=Object.assign,Di=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},gd=Object.prototype.hasOwnProperty,ht=(e,t)=>gd.call(e,t),lt=Array.isArray,Xl=e=>qi(e)==="[object Map]",Kl=e=>qi(e)==="[object Set]",nt=e=>typeof e=="function",Gt=e=>typeof e=="string",Zt=e=>e!==null&&typeof e=="object",Gl=e=>Zt(e)&&nt(e.then)&&nt(e.catch),Zl=Object.prototype.toString,qi=e=>Zl.call(e),Wl=e=>qi(e)==="[object Object]",Sn=fd(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Mn=e=>{const t=Object.create(null);return s=>t[s]||(t[s]=e(s))},bd=/-(\w)/g,Os=Mn(e=>e.replace(bd,(t,s)=>s?s.toUpperCase():"")),yd=/\B([A-Z])/g,An=Mn(e=>e.replace(yd,"-$1").toLowerCase()),Vi=Mn(e=>e.charAt(0).toUpperCase()+e.slice(1)),zi=Mn(e=>e?`on${Vi(e)}`:""),Ql=(e,t)=>!Object.is(e,t),Yi=(e,t)=>{for(let s=0;s{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:s})},xd=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Jl;const wd=()=>Jl||(Jl=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});function ea(e,t,s,a){let n;try{n=a?e(...a):e()}catch(r){En(r,t,s)}return n}function ms(e,t,s,a){if(nt(e)){const r=ea(e,t,s,a);return r&&Gl(r)&&r.catch(o=>{En(o,t,s)}),r}const n=[];for(let r=0;r>>1;br(os[a])Vs&&os.splice(t,1)}function a0(e,t,s,a){lt(e)?s.push(...e):(!t||!t.includes(e,e.allowRecurse?a+1:a))&&s.push(e),s0()}function Ed(e){a0(e,pr,_r,Ga)}function Td(e){a0(e,ta,gr,Za)}function kn(e,t=null){if(_r.length){for(Zi=t,pr=[...new Set(_r)],_r.length=0,Ga=0;Gabr(s)-br(a)),Za=0;Zae.id==null?1/0:e.id;function n0(e){Ki=!1,Tn=!0,kn(e),os.sort((s,a)=>br(s)-br(a));const t=Rs;try{for(Vs=0;VsA.trim())),c&&(n=s.map(xd))}let u,g=a[u=zi(t)]||a[u=zi(Os(t))];!g&&r&&(g=a[u=zi(An(t))]),g&&ms(g,e,6,n);const l=a[u+"Once"];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[u])return;e.emitted[u]=!0,ms(l,e,6,n)}}function i0(e,t,s=!1){const a=t.emitsCache,n=a.get(e);if(n!==void 0)return n;const r=e.emits;let o={},u=!1;if(!nt(e)){const g=l=>{const p=i0(l,t,!0);p&&(u=!0,is(o,p))};!s&&t.mixins.length&&t.mixins.forEach(g),e.extends&&g(e.extends),e.mixins&&e.mixins.forEach(g)}return!r&&!u?(a.set(e,null),null):(lt(r)?r.forEach(g=>o[g]=null):is(o,r),a.set(e,o),o)}function Rn(e,t){return!e||!Ui(t)?!1:(t=t.slice(2).replace(/Once$/,""),ht(e,t[0].toLowerCase()+t.slice(1))||ht(e,An(t))||ht(e,t))}let Dt=null,o0=null;function On(e){const t=Dt;return Dt=e,o0=e&&e.type.__scopeId||null,t}function Ge(e,t=Dt,s){if(!t||e._n)return e;const a=(...n)=>{a._d&&P0(-1);const r=On(t),o=e(...n);return On(r),a._d&&P0(1),o};return a._n=!0,a._c=!0,a._d=!0,a}function A4(){}function Wi(e){const{type:t,vnode:s,proxy:a,withProxy:n,props:r,propsOptions:[o],slots:u,attrs:g,emit:l,render:p,renderCache:c,data:M,setupState:A,ctx:i,inheritAttrs:H}=e;let B,N;const m=On(e);try{if(s.shapeFlag&4){const C=n||a;B=Is(p.call(C,C,c,r,A,M,i)),N=g}else{const C=t;B=Is(C.length>1?C(r,{attrs:g,slots:u,emit:l}):C(r,null)),N=t.props?g:Rd(g)}}catch(C){Sr.length=0,En(C,e,1),B=Ie(vs)}let R=B;if(N&&H!==!1){const C=Object.keys(N),{shapeFlag:T}=R;C.length&&T&7&&(o&&C.some(Yl)&&(N=Od(N,o)),R=sa(R,N))}return s.dirs&&(R=sa(R),R.dirs=R.dirs?R.dirs.concat(s.dirs):s.dirs),s.transition&&(R.transition=s.transition),B=R,On(m),B}const Rd=e=>{let t;for(const s in e)(s==="class"||s==="style"||Ui(s))&&((t||(t={}))[s]=e[s]);return t},Od=(e,t)=>{const s={};for(const a in e)(!Yl(a)||!(a.slice(9)in t))&&(s[a]=e[a]);return s};function Id(e,t,s){const{props:a,children:n,component:r}=e,{props:o,children:u,patchFlag:g}=t,l=r.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&g>=0){if(g&1024)return!0;if(g&16)return a?l0(a,o,l):!!o;if(g&8){const p=t.dynamicProps;for(let c=0;ce.__isSuspense;function Ld(e,t){t&&t.pendingBranch?lt(e)?t.effects.push(...e):t.effects.push(e):Td(e)}function Nd(e,t){if(Ft){let s=Ft.provides;const a=Ft.parent&&Ft.parent.provides;a===s&&(s=Ft.provides=Object.create(a)),s[e]=t}}function Qi(e,t,s=!1){const a=Ft||Dt;if(a){const n=a.parent==null?a.vnode.appContext&&a.vnode.appContext.provides:a.parent.provides;if(n&&e in n)return n[e];if(arguments.length>1)return s&&nt(t)?t.call(a.proxy):t}}const c0={};function Ji(e,t,s){return u0(e,t,s)}function u0(e,t,{immediate:s,deep:a,flush:n,onTrack:r,onTrigger:o}=xt){const u=Ft;let g,l=!1,p=!1;if(Kt(e)?(g=()=>e.value,l=Hi(e)):Xa(e)?(g=()=>e,a=!0):lt(e)?(p=!0,l=e.some(N=>Xa(N)||Hi(N)),g=()=>e.map(N=>{if(Kt(N))return N.value;if(Xa(N))return pa(N);if(nt(N))return ea(N,u,2)})):nt(e)?t?g=()=>ea(e,u,2):g=()=>{if(!(u&&u.isUnmounted))return c&&c(),ms(e,u,3,[M])}:g=Rs,t&&a){const N=g;g=()=>pa(N())}let c,M=N=>{c=B.onStop=()=>{ea(N,u,4)}};if(Ar)return M=Rs,t?s&&ms(t,u,3,[g(),p?[]:void 0,M]):g(),Rs;let A=p?[]:c0;const i=()=>{if(!!B.active)if(t){const N=B.run();(a||l||(p?N.some((m,R)=>Ql(m,A[R])):Ql(N,A)))&&(c&&c(),ms(t,u,3,[N,A===c0?void 0:A,M]),A=N)}else B.run()};i.allowRecurse=!!t;let H;n==="sync"?H=i:n==="post"?H=()=>Jt(i,u&&u.suspense):H=()=>Ed(i);const B=new Oi(g,H);return t?s?i():A=B.run():n==="post"?Jt(B.run.bind(B),u&&u.suspense):B.run(),()=>{B.stop(),u&&u.scope&&Di(u.scope.effects,B)}}function jd(e,t,s){const a=this.proxy,n=Gt(e)?e.includes(".")?d0(a,e):()=>a[e]:e.bind(a,a);let r;nt(t)?r=t:(r=t.handler,s=t);const o=Ft;Wa(this);const u=u0(n,r.bind(a),s);return o?Wa(o):wa(),u}function d0(e,t){const s=t.split(".");return()=>{let a=e;for(let n=0;n{pa(s,t)});else if(Wl(e))for(const s in e)pa(e[s],t);return e}function f0(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return p0(()=>{e.isMounted=!0}),b0(()=>{e.isUnmounting=!0}),e}const hs=[Function,Array],m0={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:hs,onEnter:hs,onAfterEnter:hs,onEnterCancelled:hs,onBeforeLeave:hs,onLeave:hs,onAfterLeave:hs,onLeaveCancelled:hs,onBeforeAppear:hs,onAppear:hs,onAfterAppear:hs,onAppearCancelled:hs},setup(e,{slots:t}){const s=q0(),a=f0();let n;return()=>{const r=t.default&&eo(t.default(),!0);if(!r||!r.length)return;let o=r[0];if(r.length>1){for(const H of r)if(H.type!==vs){o=H;break}}const u=mt(e),{mode:g}=u;if(a.isLeaving)return $i(o);const l=v0(o);if(!l)return $i(o);const p=yr(l,u,a,s);xr(l,p);const c=s.subTree,M=c&&v0(c);let A=!1;const{getTransitionKey:i}=l.type;if(i){const H=i();n===void 0?n=H:H!==n&&(n=H,A=!0)}if(M&&M.type!==vs&&(!xa(l,M)||A)){const H=yr(M,u,a,s);if(xr(M,H),g==="out-in")return a.isLeaving=!0,H.afterLeave=()=>{a.isLeaving=!1,s.update()},$i(o);g==="in-out"&&l.type!==vs&&(H.delayLeave=(B,N,m)=>{const R=h0(a,M);R[String(M.key)]=M,B._leaveCb=()=>{N(),B._leaveCb=void 0,delete p.delayedLeave},p.delayedLeave=m})}return o}}};function h0(e,t){const{leavingVNodes:s}=e;let a=s.get(t.type);return a||(a=Object.create(null),s.set(t.type,a)),a}function yr(e,t,s,a){const{appear:n,mode:r,persisted:o=!1,onBeforeEnter:u,onEnter:g,onAfterEnter:l,onEnterCancelled:p,onBeforeLeave:c,onLeave:M,onAfterLeave:A,onLeaveCancelled:i,onBeforeAppear:H,onAppear:B,onAfterAppear:N,onAppearCancelled:m}=t,R=String(e.key),C=h0(s,e),T=(E,w)=>{E&&ms(E,a,9,w)},L=(E,w)=>{const h=w[1];T(E,w),lt(E)?E.every(b=>b.length<=1)&&h():E.length<=1&&h()},f={mode:r,persisted:o,beforeEnter(E){let w=u;if(!s.isMounted)if(n)w=H||u;else return;E._leaveCb&&E._leaveCb(!0);const h=C[R];h&&xa(e,h)&&h.el._leaveCb&&h.el._leaveCb(),T(w,[E])},enter(E){let w=g,h=l,b=p;if(!s.isMounted)if(n)w=B||g,h=N||l,b=m||p;else return;let _=!1;const v=E._enterCb=x=>{_||(_=!0,x?T(b,[E]):T(h,[E]),f.delayedLeave&&f.delayedLeave(),E._enterCb=void 0)};w?L(w,[E,v]):v()},leave(E,w){const h=String(e.key);if(E._enterCb&&E._enterCb(!0),s.isUnmounting)return w();T(c,[E]);let b=!1;const _=E._leaveCb=v=>{b||(b=!0,w(),v?T(i,[E]):T(A,[E]),E._leaveCb=void 0,C[h]===e&&delete C[h])};C[h]=e,M?L(M,[E,_]):_()},clone(E){return yr(E,t,s,a)}};return f}function $i(e){if(In(e))return e=sa(e),e.children=null,e}function v0(e){return In(e)?e.children?e.children[0]:void 0:e}function xr(e,t){e.shapeFlag&6&&e.component?xr(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function eo(e,t=!1,s){let a=[],n=0;for(let r=0;r1)for(let r=0;r!!e.type.__asyncLoader,In=e=>e.type.__isKeepAlive;function Fd(e,t){_0(e,"a",t)}function Pd(e,t){_0(e,"da",t)}function _0(e,t,s=Ft){const a=e.__wdc||(e.__wdc=()=>{let n=s;for(;n;){if(n.isDeactivated)return;n=n.parent}return e()});if(Cn(t,a,s),s){let n=s.parent;for(;n&&n.parent;)In(n.parent.vnode)&&Ud(a,t,s,n),n=n.parent}}function Ud(e,t,s,a){const n=Cn(t,e,a,!0);y0(()=>{Di(a[t],n)},s)}function Cn(e,t,s=Ft,a=!1){if(s){const n=s[e]||(s[e]=[]),r=t.__weh||(t.__weh=(...o)=>{if(s.isUnmounted)return;za(),Wa(s);const u=ms(t,s,e,o);return wa(),Ya(),u});return a?n.unshift(r):n.push(r),r}}const zs=e=>(t,s=Ft)=>(!Ar||e==="sp")&&Cn(e,t,s),Dd=zs("bm"),p0=zs("m"),qd=zs("bu"),g0=zs("u"),b0=zs("bum"),y0=zs("um"),Vd=zs("sp"),zd=zs("rtg"),Yd=zs("rtc");function Xd(e,t=Ft){Cn("ec",e,t)}function Ys(e,t){const s=Dt;if(s===null)return e;const a=Pn(s)||s.proxy,n=e.dirs||(e.dirs=[]);for(let r=0;rt(o,u,void 0,r&&r[u]));else{const o=Object.keys(e);n=new Array(o.length);for(let u=0,g=o.length;ujn(t)?!(t.type===vs||t.type===ut&&!S0(t.children)):!0)?e:null}const ao=e=>e?V0(e)?Pn(e)||e.proxy:ao(e.parent):null,Ln=is(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ao(e.parent),$root:e=>ao(e.root),$emit:e=>e.emit,$options:e=>E0(e),$forceUpdate:e=>e.f||(e.f=()=>t0(e.update)),$nextTick:e=>e.n||(e.n=e0.bind(e.proxy)),$watch:e=>jd.bind(e)}),Zd={get({_:e},t){const{ctx:s,setupState:a,data:n,props:r,accessCache:o,type:u,appContext:g}=e;let l;if(t[0]!=="$"){const A=o[t];if(A!==void 0)switch(A){case 1:return a[t];case 2:return n[t];case 4:return s[t];case 3:return r[t]}else{if(a!==xt&&ht(a,t))return o[t]=1,a[t];if(n!==xt&&ht(n,t))return o[t]=2,n[t];if((l=e.propsOptions[0])&&ht(l,t))return o[t]=3,r[t];if(s!==xt&&ht(s,t))return o[t]=4,s[t];ro&&(o[t]=0)}}const p=Ln[t];let c,M;if(p)return t==="$attrs"&&ns(e,"get",t),p(e);if((c=u.__cssModules)&&(c=c[t]))return c;if(s!==xt&&ht(s,t))return o[t]=4,s[t];if(M=g.config.globalProperties,ht(M,t))return M[t]},set({_:e},t,s){const{data:a,setupState:n,ctx:r}=e;return n!==xt&&ht(n,t)?(n[t]=s,!0):a!==xt&&ht(a,t)?(a[t]=s,!0):ht(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:a,appContext:n,propsOptions:r}},o){let u;return!!s[o]||e!==xt&&ht(e,o)||t!==xt&&ht(t,o)||(u=r[0])&&ht(u,o)||ht(a,o)||ht(Ln,o)||ht(n.config.globalProperties,o)},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:ht(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};let ro=!0;function Wd(e){const t=E0(e),s=e.proxy,a=e.ctx;ro=!1,t.beforeCreate&&M0(t.beforeCreate,e,"bc");const{data:n,computed:r,methods:o,watch:u,provide:g,inject:l,created:p,beforeMount:c,mounted:M,beforeUpdate:A,updated:i,activated:H,deactivated:B,beforeDestroy:N,beforeUnmount:m,destroyed:R,unmounted:C,render:T,renderTracked:L,renderTriggered:f,errorCaptured:E,serverPrefetch:w,expose:h,inheritAttrs:b,components:_,directives:v,filters:x}=t;if(l&&Qd(l,a,null,e.appContext.config.unwrapInjectedRef),o)for(const X in o){const P=o[X];nt(P)&&(a[X]=P.bind(s))}if(n){const X=n.call(s,s);Zt(X)&&(e.data=Ni(X))}if(ro=!0,r)for(const X in r){const P=r[X],V=nt(P)?P.bind(s,s):nt(P.get)?P.get.bind(s,s):Rs,d=!nt(P)&&nt(P.set)?P.set.bind(s):Rs,S=Mf({get:V,set:d});Object.defineProperty(a,X,{enumerable:!0,configurable:!0,get:()=>S.value,set:Z=>S.value=Z})}if(u)for(const X in u)A0(u[X],a,s,X);if(g){const X=nt(g)?g.call(s):g;Reflect.ownKeys(X).forEach(P=>{Nd(P,X[P])})}p&&M0(p,e,"c");function j(X,P){lt(P)?P.forEach(V=>X(V.bind(s))):P&&X(P.bind(s))}if(j(Dd,c),j(p0,M),j(qd,A),j(g0,i),j(Fd,H),j(Pd,B),j(Xd,E),j(Yd,L),j(zd,f),j(b0,m),j(y0,C),j(Vd,w),lt(h))if(h.length){const X=e.exposed||(e.exposed={});h.forEach(P=>{Object.defineProperty(X,P,{get:()=>s[P],set:V=>s[P]=V})})}else e.exposed||(e.exposed={});T&&e.render===Rs&&(e.render=T),b!=null&&(e.inheritAttrs=b),_&&(e.components=_),v&&(e.directives=v)}function Qd(e,t,s=Rs,a=!1){lt(e)&&(e=no(e));for(const n in e){const r=e[n];let o;Zt(r)?"default"in r?o=Qi(r.from||n,r.default,!0):o=Qi(r.from||n):o=Qi(r),Kt(o)&&a?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:u=>o.value=u}):t[n]=o}}function M0(e,t,s){ms(lt(e)?e.map(a=>a.bind(t.proxy)):e.bind(t.proxy),t,s)}function A0(e,t,s,a){const n=a.includes(".")?d0(s,a):()=>s[a];if(Gt(e)){const r=t[e];nt(r)&&Ji(n,r)}else if(nt(e))Ji(n,e.bind(s));else if(Zt(e))if(lt(e))e.forEach(r=>A0(r,t,s,a));else{const r=nt(e.handler)?e.handler.bind(s):t[e.handler];nt(r)&&Ji(n,r,e)}}function E0(e){const t=e.type,{mixins:s,extends:a}=t,{mixins:n,optionsCache:r,config:{optionMergeStrategies:o}}=e.appContext,u=r.get(t);let g;return u?g=u:!n.length&&!s&&!a?g=t:(g={},n.length&&n.forEach(l=>Nn(g,l,o,!0)),Nn(g,t,o)),r.set(t,g),g}function Nn(e,t,s,a=!1){const{mixins:n,extends:r}=t;r&&Nn(e,r,s,!0),n&&n.forEach(o=>Nn(e,o,s,!0));for(const o in t)if(!(a&&o==="expose")){const u=Jd[o]||s&&s[o];e[o]=u?u(e[o],t[o]):t[o]}return e}const Jd={data:T0,props:ba,emits:ba,methods:ba,computed:ba,beforeCreate:Wt,created:Wt,beforeMount:Wt,mounted:Wt,beforeUpdate:Wt,updated:Wt,beforeDestroy:Wt,beforeUnmount:Wt,destroyed:Wt,unmounted:Wt,activated:Wt,deactivated:Wt,errorCaptured:Wt,serverPrefetch:Wt,components:ba,directives:ba,watch:ef,provide:T0,inject:$d};function T0(e,t){return t?e?function(){return is(nt(e)?e.call(this,this):e,nt(t)?t.call(this,this):t)}:t:e}function $d(e,t){return ba(no(e),no(t))}function no(e){if(lt(e)){const t={};for(let s=0;s0)&&!(o&16)){if(o&8){const p=e.vnode.dynamicProps;for(let c=0;c{g=!0;const[M,A]=R0(c,t,!0);is(o,M),A&&u.push(...A)};!s&&t.mixins.length&&t.mixins.forEach(p),e.extends&&p(e.extends),e.mixins&&e.mixins.forEach(p)}if(!r&&!g)return a.set(e,Ka),Ka;if(lt(r))for(let p=0;p-1,A[1]=H<0||i-1||ht(A,"default"))&&u.push(c)}}}const l=[o,u];return a.set(e,l),l}function O0(e){return e[0]!=="$"}function I0(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:e===null?"null":""}function C0(e,t){return I0(e)===I0(t)}function B0(e,t){return lt(t)?t.findIndex(s=>C0(s,e)):nt(t)&&C0(t,e)?0:-1}const L0=e=>e[0]==="_"||e==="$stable",oo=e=>lt(e)?e.map(Is):[Is(e)],af=(e,t,s)=>{if(t._n)return t;const a=Ge((...n)=>oo(t(...n)),s);return a._c=!1,a},N0=(e,t,s)=>{const a=e._ctx;for(const n in e){if(L0(n))continue;const r=e[n];if(nt(r))t[n]=af(n,r,a);else if(r!=null){const o=oo(r);t[n]=()=>o}}},j0=(e,t)=>{const s=oo(t);e.slots.default=()=>s},rf=(e,t)=>{if(e.vnode.shapeFlag&32){const s=t._;s?(e.slots=mt(t),Xi(t,"_",s)):N0(t,e.slots={})}else e.slots={},t&&j0(e,t);Xi(e.slots,Hn,1)},nf=(e,t,s)=>{const{vnode:a,slots:n}=e;let r=!0,o=xt;if(a.shapeFlag&32){const u=t._;u?s&&u===1?r=!1:(is(n,t),!s&&u===1&&delete n._):(r=!t.$stable,N0(t,n)),o=t}else t&&(j0(e,t),o={default:1});if(r)for(const u in n)!L0(u)&&!(u in o)&&delete n[u]};function H0(){return{app:null,config:{isNativeTag:_d,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let of=0;function lf(e,t){return function(a,n=null){nt(a)||(a=Object.assign({},a)),n!=null&&!Zt(n)&&(n=null);const r=H0(),o=new Set;let u=!1;const g=r.app={_uid:of++,_component:a,_props:n,_container:null,_context:r,_instance:null,version:Ef,get config(){return r.config},set config(l){},use(l,...p){return o.has(l)||(l&&nt(l.install)?(o.add(l),l.install(g,...p)):nt(l)&&(o.add(l),l(g,...p))),g},mixin(l){return r.mixins.includes(l)||r.mixins.push(l),g},component(l,p){return p?(r.components[l]=p,g):r.components[l]},directive(l,p){return p?(r.directives[l]=p,g):r.directives[l]},mount(l,p,c){if(!u){const M=Ie(a,n);return M.appContext=r,p&&t?t(M,l):e(M,l,c),u=!0,g._container=l,l.__vue_app__=g,Pn(M.component)||M.component.proxy}},unmount(){u&&(e(null,g._container),delete g._container.__vue_app__)},provide(l,p){return r.provides[l]=p,g}};return g}}function lo(e,t,s,a,n=!1){if(lt(e)){e.forEach((M,A)=>lo(M,t&&(lt(t)?t[A]:t),s,a,n));return}if(wr(a)&&!n)return;const r=a.shapeFlag&4?Pn(a.component)||a.component.proxy:a.el,o=n?null:r,{i:u,r:g}=e,l=t&&t.r,p=u.refs===xt?u.refs={}:u.refs,c=u.setupState;if(l!=null&&l!==g&&(Gt(l)?(p[l]=null,ht(c,l)&&(c[l]=null)):Kt(l)&&(l.value=null)),nt(g))ea(g,u,12,[o,p]);else{const M=Gt(g),A=Kt(g);if(M||A){const i=()=>{if(e.f){const H=M?p[g]:g.value;n?lt(H)&&Di(H,r):lt(H)?H.includes(r)||H.push(r):M?(p[g]=[r],ht(c,g)&&(c[g]=p[g])):(g.value=[r],e.k&&(p[e.k]=g.value))}else M?(p[g]=o,ht(c,g)&&(c[g]=o)):A&&(g.value=o,e.k&&(p[e.k]=o))};o?(i.id=-1,Jt(i,s)):i()}}}const Jt=Ld;function cf(e){return uf(e)}function uf(e,t){const s=wd();s.__VUE__=!0;const{insert:a,remove:n,patchProp:r,createElement:o,createText:u,createComment:g,setText:l,setElementText:p,parentNode:c,nextSibling:M,setScopeId:A=Rs,cloneNode:i,insertStaticContent:H}=e,B=(U,z,te,le=null,ue=null,xe=null,Ee=!1,be=null,Se=!!z.dynamicChildren)=>{if(U===z)return;U&&!xa(U,z)&&(le=Ue(U),W(U,ue,xe,!0),U=null),z.patchFlag===-2&&(Se=!1,z.dynamicChildren=null);const{type:me,ref:Fe,shapeFlag:Ne}=z;switch(me){case co:N(U,z,te,le);break;case vs:m(U,z,te,le);break;case uo:U==null&&R(z,te,le,Ee);break;case ut:v(U,z,te,le,ue,xe,Ee,be,Se);break;default:Ne&1?L(U,z,te,le,ue,xe,Ee,be,Se):Ne&6?x(U,z,te,le,ue,xe,Ee,be,Se):(Ne&64||Ne&128)&&me.process(U,z,te,le,ue,xe,Ee,be,Se,fe)}Fe!=null&&ue&&lo(Fe,U&&U.ref,xe,z||U,!z)},N=(U,z,te,le)=>{if(U==null)a(z.el=u(z.children),te,le);else{const ue=z.el=U.el;z.children!==U.children&&l(ue,z.children)}},m=(U,z,te,le)=>{U==null?a(z.el=g(z.children||""),te,le):z.el=U.el},R=(U,z,te,le)=>{[U.el,U.anchor]=H(U.children,z,te,le,U.el,U.anchor)},C=({el:U,anchor:z},te,le)=>{let ue;for(;U&&U!==z;)ue=M(U),a(U,te,le),U=ue;a(z,te,le)},T=({el:U,anchor:z})=>{let te;for(;U&&U!==z;)te=M(U),n(U),U=te;n(z)},L=(U,z,te,le,ue,xe,Ee,be,Se)=>{Ee=Ee||z.type==="svg",U==null?f(z,te,le,ue,xe,Ee,be,Se):h(U,z,ue,xe,Ee,be,Se)},f=(U,z,te,le,ue,xe,Ee,be)=>{let Se,me;const{type:Fe,props:Ne,shapeFlag:Pe,transition:De,patchFlag:Ze,dirs:ce}=U;if(U.el&&i!==void 0&&Ze===-1)Se=U.el=i(U.el);else{if(Se=U.el=o(U.type,xe,Ne&&Ne.is,Ne),Pe&8?p(Se,U.children):Pe&16&&w(U.children,Se,null,le,ue,xe&&Fe!=="foreignObject",Ee,be),ce&&ga(U,null,le,"created"),Ne){for(const $ in Ne)$!=="value"&&!Sn($)&&r(Se,$,null,Ne[$],xe,U.children,le,ue,he);"value"in Ne&&r(Se,"value",null,Ne.value),(me=Ne.onVnodeBeforeMount)&&Cs(me,le,U)}E(Se,U,U.scopeId,Ee,le)}ce&&ga(U,null,le,"beforeMount");const ye=(!ue||ue&&!ue.pendingBranch)&&De&&!De.persisted;ye&&De.beforeEnter(Se),a(Se,z,te),((me=Ne&&Ne.onVnodeMounted)||ye||ce)&&Jt(()=>{me&&Cs(me,le,U),ye&&De.enter(Se),ce&&ga(U,null,le,"mounted")},ue)},E=(U,z,te,le,ue)=>{if(te&&A(U,te),le)for(let xe=0;xe{for(let me=Se;me{const be=z.el=U.el;let{patchFlag:Se,dynamicChildren:me,dirs:Fe}=z;Se|=U.patchFlag&16;const Ne=U.props||xt,Pe=z.props||xt;let De;te&&ya(te,!1),(De=Pe.onVnodeBeforeUpdate)&&Cs(De,te,z,U),Fe&&ga(z,U,te,"beforeUpdate"),te&&ya(te,!0);const Ze=ue&&z.type!=="foreignObject";if(me?b(U.dynamicChildren,me,be,te,le,Ze,xe):Ee||V(U,z,be,null,te,le,Ze,xe,!1),Se>0){if(Se&16)_(be,z,Ne,Pe,te,le,ue);else if(Se&2&&Ne.class!==Pe.class&&r(be,"class",null,Pe.class,ue),Se&4&&r(be,"style",Ne.style,Pe.style,ue),Se&8){const ce=z.dynamicProps;for(let ye=0;ye{De&&Cs(De,te,z,U),Fe&&ga(z,U,te,"updated")},le)},b=(U,z,te,le,ue,xe,Ee)=>{for(let be=0;be{if(te!==le){for(const be in le){if(Sn(be))continue;const Se=le[be],me=te[be];Se!==me&&be!=="value"&&r(U,be,me,Se,Ee,z.children,ue,xe,he)}if(te!==xt)for(const be in te)!Sn(be)&&!(be in le)&&r(U,be,te[be],null,Ee,z.children,ue,xe,he);"value"in le&&r(U,"value",te.value,le.value)}},v=(U,z,te,le,ue,xe,Ee,be,Se)=>{const me=z.el=U?U.el:u(""),Fe=z.anchor=U?U.anchor:u("");let{patchFlag:Ne,dynamicChildren:Pe,slotScopeIds:De}=z;De&&(be=be?be.concat(De):De),U==null?(a(me,te,le),a(Fe,te,le),w(z.children,te,Fe,ue,xe,Ee,be,Se)):Ne>0&&Ne&64&&Pe&&U.dynamicChildren?(b(U.dynamicChildren,Pe,te,ue,xe,Ee,be),(z.key!=null||ue&&z===ue.subTree)&&F0(U,z,!0)):V(U,z,te,Fe,ue,xe,Ee,be,Se)},x=(U,z,te,le,ue,xe,Ee,be,Se)=>{z.slotScopeIds=be,U==null?z.shapeFlag&512?ue.ctx.activate(z,te,le,Ee,Se):y(z,te,le,ue,xe,Ee,Se):j(U,z,Se)},y=(U,z,te,le,ue,xe,Ee)=>{const be=U.component=pf(U,le,ue);if(In(U)&&(be.ctx.renderer=fe),gf(be),be.asyncDep){if(ue&&ue.registerDep(be,X),!U.el){const Se=be.subTree=Ie(vs);m(null,Se,z,te)}return}X(be,U,z,te,ue,xe,Ee)},j=(U,z,te)=>{const le=z.component=U.component;if(Id(U,z,te))if(le.asyncDep&&!le.asyncResolved){P(le,z,te);return}else le.next=z,Ad(le.update),le.update();else z.el=U.el,le.vnode=z},X=(U,z,te,le,ue,xe,Ee)=>{const be=()=>{if(U.isMounted){let{next:Fe,bu:Ne,u:Pe,parent:De,vnode:Ze}=U,ce=Fe,ye;ya(U,!1),Fe?(Fe.el=Ze.el,P(U,Fe,Ee)):Fe=Ze,Ne&&Yi(Ne),(ye=Fe.props&&Fe.props.onVnodeBeforeUpdate)&&Cs(ye,De,Fe,Ze),ya(U,!0);const $=Wi(U),Ce=U.subTree;U.subTree=$,B(Ce,$,c(Ce.el),Ue(Ce),U,ue,xe),Fe.el=$.el,ce===null&&Cd(U,$.el),Pe&&Jt(Pe,ue),(ye=Fe.props&&Fe.props.onVnodeUpdated)&&Jt(()=>Cs(ye,De,Fe,Ze),ue)}else{let Fe;const{el:Ne,props:Pe}=z,{bm:De,m:Ze,parent:ce}=U,ye=wr(z);if(ya(U,!1),De&&Yi(De),!ye&&(Fe=Pe&&Pe.onVnodeBeforeMount)&&Cs(Fe,ce,z),ya(U,!0),Ne&&it){const $=()=>{U.subTree=Wi(U),it(Ne,U.subTree,U,ue,null)};ye?z.type.__asyncLoader().then(()=>!U.isUnmounted&&$()):$()}else{const $=U.subTree=Wi(U);B(null,$,te,le,U,ue,xe),z.el=$.el}if(Ze&&Jt(Ze,ue),!ye&&(Fe=Pe&&Pe.onVnodeMounted)){const $=z;Jt(()=>Cs(Fe,ce,$),ue)}(z.shapeFlag&256||ce&&wr(ce.vnode)&&ce.vnode.shapeFlag&256)&&U.a&&Jt(U.a,ue),U.isMounted=!0,z=te=le=null}},Se=U.effect=new Oi(be,()=>t0(me),U.scope),me=U.update=()=>Se.run();me.id=U.uid,ya(U,!0),me()},P=(U,z,te)=>{z.component=U;const le=U.vnode.props;U.vnode=z,U.next=null,sf(U,z.props,le,te),nf(U,z.children,te),za(),kn(void 0,U.update),Ya()},V=(U,z,te,le,ue,xe,Ee,be,Se=!1)=>{const me=U&&U.children,Fe=U?U.shapeFlag:0,Ne=z.children,{patchFlag:Pe,shapeFlag:De}=z;if(Pe>0){if(Pe&128){S(me,Ne,te,le,ue,xe,Ee,be,Se);return}else if(Pe&256){d(me,Ne,te,le,ue,xe,Ee,be,Se);return}}De&8?(Fe&16&&he(me,ue,xe),Ne!==me&&p(te,Ne)):Fe&16?De&16?S(me,Ne,te,le,ue,xe,Ee,be,Se):he(me,ue,xe,!0):(Fe&8&&p(te,""),De&16&&w(Ne,te,le,ue,xe,Ee,be,Se))},d=(U,z,te,le,ue,xe,Ee,be,Se)=>{U=U||Ka,z=z||Ka;const me=U.length,Fe=z.length,Ne=Math.min(me,Fe);let Pe;for(Pe=0;PeFe?he(U,ue,xe,!0,!1,Ne):w(z,te,le,ue,xe,Ee,be,Se,Ne)},S=(U,z,te,le,ue,xe,Ee,be,Se)=>{let me=0;const Fe=z.length;let Ne=U.length-1,Pe=Fe-1;for(;me<=Ne&&me<=Pe;){const De=U[me],Ze=z[me]=Se?ra(z[me]):Is(z[me]);if(xa(De,Ze))B(De,Ze,te,null,ue,xe,Ee,be,Se);else break;me++}for(;me<=Ne&&me<=Pe;){const De=U[Ne],Ze=z[Pe]=Se?ra(z[Pe]):Is(z[Pe]);if(xa(De,Ze))B(De,Ze,te,null,ue,xe,Ee,be,Se);else break;Ne--,Pe--}if(me>Ne){if(me<=Pe){const De=Pe+1,Ze=DePe)for(;me<=Ne;)W(U[me],ue,xe,!0),me++;else{const De=me,Ze=me,ce=new Map;for(me=Ze;me<=Pe;me++){const Y=z[me]=Se?ra(z[me]):Is(z[me]);Y.key!=null&&ce.set(Y.key,me)}let ye,$=0;const Ce=Pe-Ze+1;let k=!1,I=0;const D=new Array(Ce);for(me=0;me=Ce){W(Y,ue,xe,!0);continue}let F;if(Y.key!=null)F=ce.get(Y.key);else for(ye=Ze;ye<=Pe;ye++)if(D[ye-Ze]===0&&xa(Y,z[ye])){F=ye;break}F===void 0?W(Y,ue,xe,!0):(D[F-Ze]=me+1,F>=I?I=F:k=!0,B(Y,z[F],te,null,ue,xe,Ee,be,Se),$++)}const q=k?df(D):Ka;for(ye=q.length-1,me=Ce-1;me>=0;me--){const Y=Ze+me,F=z[Y],G=Y+1{const{el:xe,type:Ee,transition:be,children:Se,shapeFlag:me}=U;if(me&6){Z(U.component.subTree,z,te,le);return}if(me&128){U.suspense.move(z,te,le);return}if(me&64){Ee.move(U,z,te,fe);return}if(Ee===ut){a(xe,z,te);for(let Ne=0;Nebe.enter(xe),ue);else{const{leave:Ne,delayLeave:Pe,afterLeave:De}=be,Ze=()=>a(xe,z,te),ce=()=>{Ne(xe,()=>{Ze(),De&&De()})};Pe?Pe(xe,Ze,ce):ce()}else a(xe,z,te)},W=(U,z,te,le=!1,ue=!1)=>{const{type:xe,props:Ee,ref:be,children:Se,dynamicChildren:me,shapeFlag:Fe,patchFlag:Ne,dirs:Pe}=U;if(be!=null&&lo(be,null,te,U,!0),Fe&256){z.ctx.deactivate(U);return}const De=Fe&1&&Pe,Ze=!wr(U);let ce;if(Ze&&(ce=Ee&&Ee.onVnodeBeforeUnmount)&&Cs(ce,z,U),Fe&6)Ae(U.component,te,le);else{if(Fe&128){U.suspense.unmount(te,le);return}De&&ga(U,null,z,"beforeUnmount"),Fe&64?U.type.remove(U,z,te,ue,fe,le):me&&(xe!==ut||Ne>0&&Ne&64)?he(me,z,te,!1,!0):(xe===ut&&Ne&384||!ue&&Fe&16)&&he(Se,z,te),le&&de(U)}(Ze&&(ce=Ee&&Ee.onVnodeUnmounted)||De)&&Jt(()=>{ce&&Cs(ce,z,U),De&&ga(U,null,z,"unmounted")},te)},de=U=>{const{type:z,el:te,anchor:le,transition:ue}=U;if(z===ut){Me(te,le);return}if(z===uo){T(U);return}const xe=()=>{n(te),ue&&!ue.persisted&&ue.afterLeave&&ue.afterLeave()};if(U.shapeFlag&1&&ue&&!ue.persisted){const{leave:Ee,delayLeave:be}=ue,Se=()=>Ee(te,xe);be?be(U.el,xe,Se):Se()}else xe()},Me=(U,z)=>{let te;for(;U!==z;)te=M(U),n(U),U=te;n(z)},Ae=(U,z,te)=>{const{bum:le,scope:ue,update:xe,subTree:Ee,um:be}=U;le&&Yi(le),ue.stop(),xe&&(xe.active=!1,W(Ee,U,z,te)),be&&Jt(be,z),Jt(()=>{U.isUnmounted=!0},z),z&&z.pendingBranch&&!z.isUnmounted&&U.asyncDep&&!U.asyncResolved&&U.suspenseId===z.pendingId&&(z.deps--,z.deps===0&&z.resolve())},he=(U,z,te,le=!1,ue=!1,xe=0)=>{for(let Ee=xe;EeU.shapeFlag&6?Ue(U.component.subTree):U.shapeFlag&128?U.suspense.next():M(U.anchor||U.el),Le=(U,z,te)=>{U==null?z._vnode&&W(z._vnode,null,null,!0):B(z._vnode||null,U,z,null,null,null,te),r0(),z._vnode=U},fe={p:B,um:W,m:Z,r:de,mt:y,mc:w,pc:V,pbc:b,n:Ue,o:e};let Ke,it;return t&&([Ke,it]=t(fe)),{render:Le,hydrate:Ke,createApp:lf(Le,Ke)}}function ya({effect:e,update:t},s){e.allowRecurse=t.allowRecurse=s}function F0(e,t,s=!1){const a=e.children,n=t.children;if(lt(a)&<(n))for(let r=0;r>1,e[s[u]]0&&(t[a]=s[r-1]),s[r]=a)}}for(r=s.length,o=s[r-1];r-- >0;)s[r]=o,o=t[o];return s}const ff=e=>e.__isTeleport,ut=Symbol(void 0),co=Symbol(void 0),vs=Symbol(void 0),uo=Symbol(void 0),Sr=[];let xs=null;function Q(e=!1){Sr.push(xs=e?null:[])}function mf(){Sr.pop(),xs=Sr[Sr.length-1]||null}let Mr=1;function P0(e){Mr+=e}function U0(e){return e.dynamicChildren=Mr>0?xs||Ka:null,mf(),Mr>0&&xs&&xs.push(e),e}function ne(e,t,s,a,n,r){return U0(ge(e,t,s,a,n,r,!0))}function vt(e,t,s,a,n){return U0(Ie(e,t,s,a,n,!0))}function jn(e){return e?e.__v_isVNode===!0:!1}function xa(e,t){return e.type===t.type&&e.key===t.key}const Hn="__vInternal",D0=({key:e})=>e!=null?e:null,Fn=({ref:e,ref_key:t,ref_for:s})=>e!=null?Gt(e)||Kt(e)||nt(e)?{i:Dt,r:e,k:t,f:!!s}:e:null;function ge(e,t=null,s=null,a=0,n=null,r=e===ut?0:1,o=!1,u=!1){const g={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&D0(t),ref:t&&Fn(t),scopeId:o0,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:a,dynamicProps:n,dynamicChildren:null,appContext:null};return u?(fo(g,s),r&128&&e.normalize(g)):s&&(g.shapeFlag|=Gt(s)?8:16),Mr>0&&!o&&xs&&(g.patchFlag>0||r&6)&&g.patchFlag!==32&&xs.push(g),g}const Ie=hf;function hf(e,t=null,s=null,a=0,n=null,r=!1){if((!e||e===x0)&&(e=vs),jn(e)){const u=sa(e,t,!0);return s&&fo(u,s),Mr>0&&!r&&xs&&(u.shapeFlag&6?xs[xs.indexOf(e)]=u:xs.push(u)),u.patchFlag|=-2,u}if(Sf(e)&&(e=e.__vccOpts),t){t=_t(t);let{class:u,style:g}=t;u&&!Gt(u)&&(t.class=at(u)),Zt(g)&&(Dl(g)&&!lt(g)&&(g=is({},g)),t.style=Et(g))}const o=Gt(e)?1:Bd(e)?128:ff(e)?64:Zt(e)?4:nt(e)?2:0;return ge(e,t,s,a,n,o,r,!0)}function _t(e){return e?Dl(e)||Hn in e?is({},e):e:null}function sa(e,t,s=!1){const{props:a,ref:n,patchFlag:r,children:o}=e,u=t?mo(a||{},t):a;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&D0(u),ref:t&&t.ref?s&&n?lt(n)?n.concat(Fn(t)):[n,Fn(t)]:Fn(t):n,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ut?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&sa(e.ssContent),ssFallback:e.ssFallback&&sa(e.ssFallback),el:e.el,anchor:e.anchor}}function aa(e=" ",t=0){return Ie(co,null,e,t)}function ke(e="",t=!1){return t?(Q(),vt(vs,null,e)):Ie(vs,null,e)}function Is(e){return e==null||typeof e=="boolean"?Ie(vs):lt(e)?Ie(ut,null,e.slice()):typeof e=="object"?ra(e):Ie(co,null,String(e))}function ra(e){return e.el===null||e.memo?e:sa(e)}function fo(e,t){let s=0;const{shapeFlag:a}=e;if(t==null)t=null;else if(lt(t))s=16;else if(typeof t=="object")if(a&65){const n=t.default;n&&(n._c&&(n._d=!1),fo(e,n()),n._c&&(n._d=!0));return}else{s=32;const n=t._;!n&&!(Hn in t)?t._ctx=Dt:n===3&&Dt&&(Dt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else nt(t)?(t={default:t,_ctx:Dt},s=32):(t=String(t),a&64?(s=16,t=[aa(t)]):s=8);e.children=t,e.shapeFlag|=s}function mo(...e){const t={};for(let s=0;sFt||Dt,Wa=e=>{Ft=e,e.scope.on()},wa=()=>{Ft&&Ft.scope.off(),Ft=null};function V0(e){return e.vnode.shapeFlag&4}let Ar=!1;function gf(e,t=!1){Ar=t;const{props:s,children:a}=e.vnode,n=V0(e);tf(e,s,n,t),rf(e,a);const r=n?bf(e,t):void 0;return Ar=!1,r}function bf(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=ql(new Proxy(e.ctx,Zd));const{setup:a}=s;if(a){const n=e.setupContext=a.length>1?xf(e):null;Wa(e),za();const r=ea(a,e,0,[e.props,n]);if(Ya(),wa(),Gl(r)){if(r.then(wa,wa),t)return r.then(o=>{z0(e,o,t)}).catch(o=>{En(o,e,0)});e.asyncDep=r}else z0(e,r,t)}else X0(e,t)}function z0(e,t,s){nt(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Zt(t)&&(e.setupState=Vl(t)),X0(e,s)}let Y0;function X0(e,t,s){const a=e.type;if(!e.render){if(!t&&Y0&&!a.render){const n=a.template;if(n){const{isCustomElement:r,compilerOptions:o}=e.appContext.config,{delimiters:u,compilerOptions:g}=a,l=is(is({isCustomElement:r,delimiters:u},o),g);a.render=Y0(n,l)}}e.render=a.render||Rs}Wa(e),za(),Wd(e),Ya(),wa()}function yf(e){return new Proxy(e.attrs,{get(t,s){return ns(e,"get","$attrs"),t[s]}})}function xf(e){const t=a=>{e.exposed=a||{}};let s;return{get attrs(){return s||(s=yf(e))},slots:e.slots,emit:e.emit,expose:t}}function Pn(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Vl(ql(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Ln)return Ln[s](e)}}))}function wf(e,t=!0){return nt(e)?e.displayName||e.name:e.name||t&&e.__name}function Sf(e){return nt(e)&&"__vccOpts"in e}const Mf=(e,t)=>dd(e,t,Ar);function Af(e,t,s){const a=arguments.length;return a===2?Zt(t)&&!lt(t)?jn(t)?Ie(e,null,[t]):Ie(e,t):Ie(e,null,t):(a>3?s=Array.prototype.slice.call(arguments,2):a===3&&jn(s)&&(s=[s]),Ie(e,t,s))}const Ef="3.2.37";function Tf(e,t){const s=Object.create(null),a=e.split(",");for(let n=0;n!!s[n.toLowerCase()]:n=>!!s[n]}const kf=Tf("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function K0(e){return!!e||e===""}const Rf=/^on[^a-z]/,Of=e=>Rf.test(e),If=e=>e.startsWith("onUpdate:"),Er=Object.assign,Tr=Array.isArray,Cf=e=>typeof e=="function",ho=e=>typeof e=="string",Bf=e=>e!==null&&typeof e=="object",vo=e=>{const t=Object.create(null);return s=>t[s]||(t[s]=e(s))},Lf=/-(\w)/g,G0=vo(e=>e.replace(Lf,(t,s)=>s?s.toUpperCase():"")),Nf=/\B([A-Z])/g,Qa=vo(e=>e.replace(Nf,"-$1").toLowerCase()),jf=vo(e=>e.charAt(0).toUpperCase()+e.slice(1)),_o=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Hf="http://www.w3.org/2000/svg",Sa=typeof document!="undefined"?document:null,Z0=Sa&&Sa.createElement("template"),Ff={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,a)=>{const n=t?Sa.createElementNS(Hf,e):Sa.createElement(e,s?{is:s}:void 0);return e==="select"&&a&&a.multiple!=null&&n.setAttribute("multiple",a.multiple),n},createText:e=>Sa.createTextNode(e),createComment:e=>Sa.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Sa.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,s,a,n,r){const o=s?s.previousSibling:t.lastChild;if(n&&(n===r||n.nextSibling))for(;t.insertBefore(n.cloneNode(!0),s),!(n===r||!(n=n.nextSibling)););else{Z0.innerHTML=a?`${e}`:e;const u=Z0.content;if(a){const g=u.firstChild;for(;g.firstChild;)u.appendChild(g.firstChild);u.removeChild(g)}t.insertBefore(u,s)}return[o?o.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}};function Pf(e,t,s){const a=e._vtc;a&&(t=(t?[t,...a]:[...a]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}function Uf(e,t,s){const a=e.style,n=ho(s);if(s&&!n){for(const r in s)po(a,r,s[r]);if(t&&!ho(t))for(const r in t)s[r]==null&&po(a,r,"")}else{const r=a.display;n?t!==s&&(a.cssText=s):t&&e.removeAttribute("style"),"_vod"in e&&(a.display=r)}}const W0=/\s*!important$/;function po(e,t,s){if(Tr(s))s.forEach(a=>po(e,t,a));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const a=Df(e,t);W0.test(s)?e.setProperty(Qa(a),s.replace(W0,""),"important"):e[a]=s}}const Q0=["Webkit","Moz","ms"],go={};function Df(e,t){const s=go[t];if(s)return s;let a=Os(t);if(a!=="filter"&&a in e)return go[t]=a;a=jf(a);for(let n=0;n{let e=Date.now,t=!1;if(typeof window!="undefined"){Date.now()>document.createEvent("Event").timeStamp&&(e=performance.now.bind(performance));const s=navigator.userAgent.match(/firefox\/(\d+)/i);t=!!(s&&Number(s[1])<=53)}return[e,t]})();let bo=0;const Yf=Promise.resolve(),Xf=()=>{bo=0},Kf=()=>bo||(Yf.then(Xf),bo=$0());function Gf(e,t,s,a){e.addEventListener(t,s,a)}function Zf(e,t,s,a){e.removeEventListener(t,s,a)}function Wf(e,t,s,a,n=null){const r=e._vei||(e._vei={}),o=r[t];if(a&&o)o.value=a;else{const[u,g]=Qf(t);if(a){const l=r[t]=Jf(a,n);Gf(e,u,l,g)}else o&&(Zf(e,u,o,g),r[t]=void 0)}}const ec=/(?:Once|Passive|Capture)$/;function Qf(e){let t;if(ec.test(e)){t={};let s;for(;s=e.match(ec);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[Qa(e.slice(2)),t]}function Jf(e,t){const s=a=>{const n=a.timeStamp||$0();(zf||n>=s.attached-1)&&ms($f(a,s.value),t,5,[a])};return s.value=e,s.attached=Kf(),s}function $f(e,t){if(Tr(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(a=>n=>!n._stopped&&a&&a(n))}else return t}const tc=/^on[a-z]/,em=(e,t,s,a,n=!1,r,o,u,g)=>{t==="class"?Pf(e,a,n):t==="style"?Uf(e,s,a):Of(t)?If(t)||Wf(e,t,s,a,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):tm(e,t,a,n))?Vf(e,t,a,r,o,u,g):(t==="true-value"?e._trueValue=a:t==="false-value"&&(e._falseValue=a),qf(e,t,a,n))};function tm(e,t,s,a){return a?!!(t==="innerHTML"||t==="textContent"||t in e&&tc.test(t)&&Cf(s)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||tc.test(t)&&ho(s)?!1:t in e}function sm(e,t){const s=Hd(e);class a extends yo{constructor(r){super(s,r,t)}}return a.def=s,a}const am=typeof HTMLElement!="undefined"?HTMLElement:class{};class yo extends am{constructor(t,s={},a){super(),this._def=t,this._props=s,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&a?a(this._createVNode(),this.shadowRoot):this.attachShadow({mode:"open"})}connectedCallback(){this._connected=!0,this._instance||this._resolveDef()}disconnectedCallback(){this._connected=!1,e0(()=>{this._connected||(hc(null,this.shadowRoot),this._instance=null)})}_resolveDef(){if(this._resolved)return;this._resolved=!0;for(let a=0;a{for(const n of a)this._setAttr(n.attributeName)}).observe(this,{attributes:!0});const t=a=>{const{props:n,styles:r}=a,o=!Tr(n),u=n?o?Object.keys(n):n:[];let g;if(o)for(const l in this._props){const p=n[l];(p===Number||p&&p.type===Number)&&(this._props[l]=_o(this._props[l]),(g||(g=Object.create(null)))[l]=!0)}this._numberProps=g;for(const l of Object.keys(this))l[0]!=="_"&&this._setProp(l,this[l],!0,!1);for(const l of u.map(G0))Object.defineProperty(this,l,{get(){return this._getProp(l)},set(p){this._setProp(l,p)}});this._applyStyles(r),this._update()},s=this._def.__asyncLoader;s?s().then(t):t(this._def)}_setAttr(t){let s=this.getAttribute(t);this._numberProps&&this._numberProps[t]&&(s=_o(s)),this._setProp(G0(t),s,!1)}_getProp(t){return this._props[t]}_setProp(t,s,a=!0,n=!0){s!==this._props[t]&&(this._props[t]=s,n&&this._instance&&this._update(),a&&(s===!0?this.setAttribute(Qa(t),""):typeof s=="string"||typeof s=="number"?this.setAttribute(Qa(t),s+""):s||this.removeAttribute(Qa(t))))}_update(){hc(this._createVNode(),this.shadowRoot)}_createVNode(){const t=Ie(this._def,Er({},this._props));return this._instance||(t.ce=s=>{this._instance=s,s.isCE=!0,s.emit=(n,...r)=>{this.dispatchEvent(new CustomEvent(n,{detail:r}))};let a=this;for(;a=a&&(a.parentNode||a.host);)if(a instanceof yo){s.parent=a._instance;break}}),t}_applyStyles(t){t&&t.forEach(s=>{const a=document.createElement("style");a.textContent=s,this.shadowRoot.appendChild(a)})}}const na="transition",kr="animation",Lt=(e,{slots:t})=>Af(m0,rc(e),t);Lt.displayName="Transition";const sc={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},rm=Lt.props=Er({},m0.props,sc),Ma=(e,t=[])=>{Tr(e)?e.forEach(s=>s(...t)):e&&e(...t)},ac=e=>e?Tr(e)?e.some(t=>t.length>1):e.length>1:!1;function rc(e){const t={};for(const _ in e)_ in sc||(t[_]=e[_]);if(e.css===!1)return t;const{name:s="v",type:a,duration:n,enterFromClass:r=`${s}-enter-from`,enterActiveClass:o=`${s}-enter-active`,enterToClass:u=`${s}-enter-to`,appearFromClass:g=r,appearActiveClass:l=o,appearToClass:p=u,leaveFromClass:c=`${s}-leave-from`,leaveActiveClass:M=`${s}-leave-active`,leaveToClass:A=`${s}-leave-to`}=e,i=nm(n),H=i&&i[0],B=i&&i[1],{onBeforeEnter:N,onEnter:m,onEnterCancelled:R,onLeave:C,onLeaveCancelled:T,onBeforeAppear:L=N,onAppear:f=m,onAppearCancelled:E=R}=t,w=(_,v,x)=>{ia(_,v?p:u),ia(_,v?l:o),x&&x()},h=(_,v)=>{_._isLeaving=!1,ia(_,c),ia(_,A),ia(_,M),v&&v()},b=_=>(v,x)=>{const y=_?f:m,j=()=>w(v,_,x);Ma(y,[v,j]),nc(()=>{ia(v,_?g:r),Xs(v,_?p:u),ac(y)||ic(v,a,H,j)})};return Er(t,{onBeforeEnter(_){Ma(N,[_]),Xs(_,r),Xs(_,o)},onBeforeAppear(_){Ma(L,[_]),Xs(_,g),Xs(_,l)},onEnter:b(!1),onAppear:b(!0),onLeave(_,v){_._isLeaving=!0;const x=()=>h(_,v);Xs(_,c),uc(),Xs(_,M),nc(()=>{!_._isLeaving||(ia(_,c),Xs(_,A),ac(C)||ic(_,a,B,x))}),Ma(C,[_,x])},onEnterCancelled(_){w(_,!1),Ma(R,[_])},onAppearCancelled(_){w(_,!0),Ma(E,[_])},onLeaveCancelled(_){h(_),Ma(T,[_])}})}function nm(e){if(e==null)return null;if(Bf(e))return[xo(e.enter),xo(e.leave)];{const t=xo(e);return[t,t]}}function xo(e){return _o(e)}function Xs(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.add(s)),(e._vtc||(e._vtc=new Set)).add(t)}function ia(e,t){t.split(/\s+/).forEach(a=>a&&e.classList.remove(a));const{_vtc:s}=e;s&&(s.delete(t),s.size||(e._vtc=void 0))}function nc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let im=0;function ic(e,t,s,a){const n=e._endId=++im,r=()=>{n===e._endId&&a()};if(s)return setTimeout(r,s);const{type:o,timeout:u,propCount:g}=oc(e,t);if(!o)return a();const l=o+"end";let p=0;const c=()=>{e.removeEventListener(l,M),r()},M=A=>{A.target===e&&++p>=g&&c()};setTimeout(()=>{p(s[i]||"").split(", "),n=a(na+"Delay"),r=a(na+"Duration"),o=lc(n,r),u=a(kr+"Delay"),g=a(kr+"Duration"),l=lc(u,g);let p=null,c=0,M=0;t===na?o>0&&(p=na,c=o,M=r.length):t===kr?l>0&&(p=kr,c=l,M=g.length):(c=Math.max(o,l),p=c>0?o>l?na:kr:null,M=p?p===na?r.length:g.length:0);const A=p===na&&/\b(transform|all)(,|$)/.test(s[na+"Property"]);return{type:p,timeout:c,propCount:M,hasTransform:A}}function lc(e,t){for(;e.lengthcc(s)+cc(e[a])))}function cc(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function uc(){return document.body.offsetHeight}const dc=new WeakMap,fc=new WeakMap,wo={name:"TransitionGroup",props:Er({},rm,{tag:String,moveClass:String}),setup(e,{slots:t}){const s=q0(),a=f0();let n,r;return g0(()=>{if(!n.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!um(n[0].el,s.vnode.el,o))return;n.forEach(om),n.forEach(lm);const u=n.filter(cm);uc(),u.forEach(g=>{const l=g.el,p=l.style;Xs(l,o),p.transform=p.webkitTransform=p.transitionDuration="";const c=l._moveCb=M=>{M&&M.target!==l||(!M||/transform$/.test(M.propertyName))&&(l.removeEventListener("transitionend",c),l._moveCb=null,ia(l,o))};l.addEventListener("transitionend",c)})}),()=>{const o=mt(e),u=rc(o);let g=o.tag||ut;n=r,r=t.default?eo(t.default()):[];for(let l=0;l{o.split(/\s+/).forEach(u=>u&&a.classList.remove(u))}),s.split(/\s+/).forEach(o=>o&&a.classList.add(o)),a.style.display="none";const n=t.nodeType===1?t:t.parentNode;n.appendChild(a);const{hasTransform:r}=oc(a);return n.removeChild(a),r}const dm=["ctrl","shift","alt","meta"],fm={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>dm.some(s=>e[`${s}Key`]&&!t.includes(s))},Bs=(e,t)=>(s,...a)=>{for(let n=0;ns=>{if(!("key"in s))return;const a=Qa(s.key);if(t.some(n=>n===a||mm[n]===a))return e(s)},Un={beforeMount(e,{value:t},{transition:s}){e._vod=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):Rr(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:a}){!t!=!s&&(a?t?(a.beforeEnter(e),Rr(e,!0),a.enter(e)):a.leave(e,()=>{Rr(e,!1)}):Rr(e,t))},beforeUnmount(e,{value:t}){Rr(e,t)}};function Rr(e,t){e.style.display=t?e._vod:"none"}const hm=Er({patchProp:em},Ff);let mc;function vm(){return mc||(mc=cf(hm))}const hc=(...e)=>{vm().render(...e)};var wt=(e,t)=>{const s=e.__vccOpts||e;for(const[a,n]of t)s[a]=n;return s};const _m={name:"AppLoader",props:{show:{type:Boolean,default:!1},infinite:{type:Boolean,default:!1},type:{type:String,required:!0},messageId:{type:String,default:""}}},pm=ge("div",{id:"vac-circle"},null,-1),gm=ge("div",{id:"vac-circle"},null,-1),bm=ge("div",{id:"vac-circle"},null,-1),ym=ge("div",{id:"vac-circle"},null,-1),xm=ge("div",{id:"vac-circle"},null,-1),wm=ge("div",{id:"vac-circle"},null,-1);function Sm(e,t,s,a,n,r){return Q(),vt(Lt,{name:"vac-fade-spinner",appear:""},{default:Ge(()=>[s.show?(Q(),ne("div",{key:0,class:at(["vac-loader-wrapper",{"vac-container-center":!s.infinite,"vac-container-top":s.infinite}])},[s.type==="rooms"?Re(e.$slots,"spinner-icon-rooms",{key:0},()=>[pm]):ke("",!0),s.type==="infinite-rooms"?Re(e.$slots,"spinner-icon-infinite-rooms",{key:1},()=>[gm]):ke("",!0),s.type==="message-file"?Re(e.$slots,"spinner-icon-message-file_"+s.messageId,{key:2},()=>[bm]):ke("",!0),s.type==="room-file"?Re(e.$slots,"spinner-icon-room-file",{key:3},()=>[ym]):ke("",!0),s.type==="messages"?Re(e.$slots,"spinner-icon-messages",{key:4},()=>[xm]):ke("",!0),s.type==="infinite-messages"?Re(e.$slots,"spinner-icon-infinite-messages",{key:5},()=>[wm]):ke("",!0)],2)):ke("",!0)]),_:3})}var Dn=wt(_m,[["render",Sm]]);const Mm={name:"SvgIcon",props:{name:{type:String,default:null},param:{type:String,default:null}},data(){return{svgItem:{search:{path:"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"},add:{path:"M17,13H13V17H11V13H7V11H11V7H13V11H17M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},toggle:{path:"M5,13L9,17L7.6,18.42L1.18,12L7.6,5.58L9,7L5,11H21V13H5M21,6V8H11V6H21M21,16V18H11V16H21Z"},menu:{path:"M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z"},close:{path:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"},file:{path:"M14,17H7V15H14M17,13H7V11H17M17,9H7V7H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z"},paperclip:{path:"M16.5,6V17.5A4,4 0 0,1 12.5,21.5A4,4 0 0,1 8.5,17.5V5A2.5,2.5 0 0,1 11,2.5A2.5,2.5 0 0,1 13.5,5V15.5A1,1 0 0,1 12.5,16.5A1,1 0 0,1 11.5,15.5V6H10V15.5A2.5,2.5 0 0,0 12.5,18A2.5,2.5 0 0,0 15,15.5V5A4,4 0 0,0 11,1A4,4 0 0,0 7,5V17.5A5.5,5.5 0 0,0 12.5,23A5.5,5.5 0 0,0 18,17.5V6H16.5Z"},"close-outline":{path:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"},send:{path:"M2,21L23,12L2,3V10L17,12L2,14V21Z"},emoji:{path:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"},document:{path:"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"},pencil:{path:"M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z"},checkmark:{path:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"},"double-checkmark":{path:"M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"},eye:{path:"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"},dropdown:{path:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"},deleted:{path:"M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12C4,13.85 4.63,15.55 5.68,16.91L16.91,5.68C15.55,4.63 13.85,4 12,4M12,20A8,8 0 0,0 20,12C20,10.15 19.37,8.45 18.32,7.09L7.09,18.32C8.45,19.37 10.15,20 12,20Z"},microphone:{size:"large",path:"M432.8,216.4v39.2c0,45.2-15.3,84.3-45.2,118.4c-29.8,33.2-67.3,52.8-111.6,57.9v40.9h78.4c5.1,0,10.2,1.7,13.6,6c4.3,4.3,6,8.5,6,13.6c0,5.1-1.7,10.2-6,13.6c-4.3,4.3-8.5,6-13.6,6H157.6c-5.1,0-10.2-1.7-13.6-6c-4.3-4.3-6-8.5-6-13.6c0-5.1,1.7-10.2,6-13.6c4.3-4.3,8.5-6,13.6-6H236v-40.9c-44.3-5.1-81.8-23.9-111.6-57.9s-45.2-73.3-45.2-118.4v-39.2c0-5.1,1.7-10.2,6-13.6c4.3-4.3,8.5-6,13.6-6s10.2,1.7,13.6,6c4.3,4.3,6,8.5,6,13.6v39.2c0,37.5,13.6,70.7,40,97.1s59.6,40,97.1,40s70.7-13.6,97.1-40c26.4-26.4,40-59.6,40-97.1v-39.2c0-5.1,1.7-10.2,6-13.6c4.3-4.3,8.5-6,13.6-6c5.1,0,10.2,1.7,13.6,6C430.2,206.2,432.8,211.3,432.8,216.4z M353.5,98v157.6c0,27.3-9.4,50.3-29,69c-19.6,19.6-42.6,29-69,29s-50.3-9.4-69-29c-19.6-19.6-29-42.6-29-69V98c0-27.3,9.4-50.3,29-69c19.6-19.6,42.6-29,69-29s50.3,9.4,69,29C344.2,47.7,353.5,71.6,353.5,98z"},"audio-play":{size:"medium",path:"M43.331,21.237L7.233,0.397c-0.917-0.529-2.044-0.529-2.96,0c-0.916,0.528-1.48,1.505-1.48,2.563v41.684 c0,1.058,0.564,2.035,1.48,2.563c0.458,0.268,0.969,0.397,1.48,0.397c0.511,0,1.022-0.133,1.48-0.397l36.098-20.84 c0.918-0.529,1.479-1.506,1.479-2.564S44.247,21.767,43.331,21.237z"},"audio-pause":{size:"medium",path:"M17.991,40.976c0,3.662-2.969,6.631-6.631,6.631l0,0c-3.662,0-6.631-2.969-6.631-6.631V6.631C4.729,2.969,7.698,0,11.36,0l0,0c3.662,0,6.631,2.969,6.631,6.631V40.976z",path2:"M42.877,40.976c0,3.662-2.969,6.631-6.631,6.631l0,0c-3.662,0-6.631-2.969-6.631-6.631V6.631C29.616,2.969,32.585,0,36.246,0l0,0c3.662,0,6.631,2.969,6.631,6.631V40.976z"}}}},computed:{svgId(){const e=this.param?"-"+this.param:"";return`vac-icon-${this.name}${e}`},size(){const e=this.svgItem[this.name];return e.size==="large"?512:e.size==="medium"?48:24}}},Am=["viewBox"],Em=["id","d"],Tm=["id","d"];function km(e,t,s,a,n,r){return Q(),ne("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:"24",height:"24",viewBox:`0 0 ${r.size} ${r.size}`},[ge("path",{id:r.svgId,d:n.svgItem[s.name].path},null,8,Em),n.svgItem[s.name].path2?(Q(),ne("path",{key:0,id:r.svgId,d:n.svgItem[s.name].path2},null,8,Tm)):ke("",!0)],8,Am)}var Ut=wt(Mm,[["render",km]]);const Rm={name:"RoomsSearch",components:{SvgIcon:Ut},props:{textMessages:{type:Object,required:!0},showSearch:{type:Boolean,required:!0},showAddRoom:{type:Boolean,required:!0},rooms:{type:Array,required:!0},loadingRooms:{type:Boolean,required:!0}},emits:["search-room","add-room"],computed:{showSearchBar(){return this.showSearch||this.showAddRoom}}},Om={key:0,class:"vac-icon-search"},Im=["placeholder"];function Cm(e,t,s,a,n,r){const o=Xe("svg-icon");return Q(),ne("div",{class:at({"vac-box-search":r.showSearchBar,"vac-box-empty":!r.showSearchBar})},[s.showSearch?(Q(),ne(ut,{key:0},[!s.loadingRooms&&s.rooms.length?(Q(),ne("div",Om,[Re(e.$slots,"search-icon",{},()=>[Ie(o,{name:"search"})])])):ke("",!0),!s.loadingRooms&&s.rooms.length?(Q(),ne("input",{key:1,type:"search",placeholder:s.textMessages.SEARCH,autocomplete:"off",class:"vac-input",onInput:t[0]||(t[0]=u=>e.$emit("search-room",u))},null,40,Im)):ke("",!0)],64)):ke("",!0),s.showAddRoom?(Q(),ne("div",{key:1,class:"vac-svg-button vac-add-icon",onClick:t[1]||(t[1]=u=>e.$emit("add-room"))},[Re(e.$slots,"add-icon",{},()=>[Ie(o,{name:"add"})])])):ke("",!0)],2)}var Bm=wt(Rm,[["render",Cm]]),qt={},Ja={};Ja.__esModule=!0,Ja.inherits=Lm;function Lm(e,t){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=Object.create(e.prototype);for(var n in s)a[n]=s[n];return a.constructor=t,t.prototype=a,t}var Or={};Or.__esModule=!0;var Nm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ls={defaultProtocol:"http",events:null,format:_c,formatHref:_c,nl2br:!1,tagName:"a",target:Hm,validate:!0,ignoreTags:[],attributes:null,className:"linkified"};Or.defaults=ls,Or.Options=vc,Or.contains=jm;function vc(e){e=e||{},this.defaultProtocol=e.hasOwnProperty("defaultProtocol")?e.defaultProtocol:ls.defaultProtocol,this.events=e.hasOwnProperty("events")?e.events:ls.events,this.format=e.hasOwnProperty("format")?e.format:ls.format,this.formatHref=e.hasOwnProperty("formatHref")?e.formatHref:ls.formatHref,this.nl2br=e.hasOwnProperty("nl2br")?e.nl2br:ls.nl2br,this.tagName=e.hasOwnProperty("tagName")?e.tagName:ls.tagName,this.target=e.hasOwnProperty("target")?e.target:ls.target,this.validate=e.hasOwnProperty("validate")?e.validate:ls.validate,this.ignoreTags=[],this.attributes=e.attributes||e.linkAttributes||ls.attributes,this.className=e.hasOwnProperty("className")?e.className:e.linkClass||ls.className;for(var t=e.hasOwnProperty("ignoreTags")?e.ignoreTags:ls.ignoreTags,s=0;s1&&arguments[1]!==void 0?arguments[1]:null,a=this.next(new t(""));return a===this.defaultTransition?(a=new this.constructor(s),this.on(t,a)):s&&(a.T=s),a},test:function(t,s){return t instanceof s}});function Pm(e,t,s,a){for(var n=0,r=e.length,o=t,u=[],g=void 0;n=r)return[];for(;n"),mh=St(")"),hh=St("&");qe.Base=Eo,qe.DOMAIN=qm,qe.AT=Vm,qe.COLON=zm,qe.DOT=Ym,qe.PUNCTUATION=Xm,qe.LOCALHOST=Km,qe.NL=Gm,qe.NUM=Zm,qe.PLUS=Wm,qe.POUND=Qm,qe.QUERY=eh,qe.PROTOCOL=Jm,qe.MAILTO=$m,qe.SLASH=th,qe.UNDERSCORE=sh,qe.SYM=ah,qe.TLD=rh,qe.WS=nh,qe.OPENBRACE=ih,qe.OPENBRACKET=oh,qe.OPENANGLEBRACKET=lh,qe.OPENPAREN=ch,qe.CLOSEBRACE=uh,qe.CLOSEBRACKET=dh,qe.CLOSEANGLEBRACKET=fh,qe.CLOSEPAREN=mh,qe.AMPERSAND=hh,Ls.__esModule=!0,Ls.start=Ls.run=Ls.TOKENS=Ls.State=void 0;var oa=Ks,rt=qe,vh=_h(rt);function _h(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t.default=e,t}var bc="aaa|aarp|abarth|abb|abbott|abbvie|abc|able|abogado|abudhabi|ac|academy|accenture|accountant|accountants|aco|active|actor|ad|adac|ads|adult|ae|aeg|aero|aetna|af|afamilycompany|afl|africa|ag|agakhan|agency|ai|aig|aigo|airbus|airforce|airtel|akdn|al|alfaromeo|alibaba|alipay|allfinanz|allstate|ally|alsace|alstom|am|americanexpress|americanfamily|amex|amfam|amica|amsterdam|analytics|android|anquan|anz|ao|aol|apartments|app|apple|aq|aquarelle|ar|arab|aramco|archi|army|arpa|art|arte|as|asda|asia|associates|at|athleta|attorney|au|auction|audi|audible|audio|auspost|author|auto|autos|avianca|aw|aws|ax|axa|az|azure|ba|baby|baidu|banamex|bananarepublic|band|bank|bar|barcelona|barclaycard|barclays|barefoot|bargains|baseball|basketball|bauhaus|bayern|bb|bbc|bbt|bbva|bcg|bcn|bd|be|beats|beauty|beer|bentley|berlin|best|bestbuy|bet|bf|bg|bh|bharti|bi|bible|bid|bike|bing|bingo|bio|biz|bj|black|blackfriday|blanco|blockbuster|blog|bloomberg|blue|bm|bms|bmw|bn|bnl|bnpparibas|bo|boats|boehringer|bofa|bom|bond|boo|book|booking|boots|bosch|bostik|boston|bot|boutique|box|br|bradesco|bridgestone|broadway|broker|brother|brussels|bs|bt|budapest|bugatti|build|builders|business|buy|buzz|bv|bw|by|bz|bzh|ca|cab|cafe|cal|call|calvinklein|cam|camera|camp|cancerresearch|canon|capetown|capital|capitalone|car|caravan|cards|care|career|careers|cars|cartier|casa|case|caseih|cash|casino|cat|catering|catholic|cba|cbn|cbre|cbs|cc|cd|ceb|center|ceo|cern|cf|cfa|cfd|cg|ch|chanel|channel|chase|chat|cheap|chintai|chloe|christmas|chrome|chrysler|church|ci|cipriani|circle|cisco|citadel|citi|citic|city|cityeats|ck|cl|claims|cleaning|click|clinic|clinique|clothing|cloud|club|clubmed|cm|cn|co|coach|codes|coffee|college|cologne|com|comcast|commbank|community|company|compare|computer|comsec|condos|construction|consulting|contact|contractors|cooking|cookingchannel|cool|coop|corsica|country|coupon|coupons|courses|cr|credit|creditcard|creditunion|cricket|crown|crs|cruise|cruises|csc|cu|cuisinella|cv|cw|cx|cy|cymru|cyou|cz|dabur|dad|dance|data|date|dating|datsun|day|dclk|dds|de|deal|dealer|deals|degree|delivery|dell|deloitte|delta|democrat|dental|dentist|desi|design|dev|dhl|diamonds|diet|digital|direct|directory|discount|discover|dish|diy|dj|dk|dm|dnp|do|docs|doctor|dodge|dog|doha|domains|dot|download|drive|dtv|dubai|duck|dunlop|duns|dupont|durban|dvag|dvr|dz|earth|eat|ec|eco|edeka|edu|education|ee|eg|email|emerck|energy|engineer|engineering|enterprises|epost|epson|equipment|er|ericsson|erni|es|esq|estate|esurance|et|etisalat|eu|eurovision|eus|events|everbank|exchange|expert|exposed|express|extraspace|fage|fail|fairwinds|faith|family|fan|fans|farm|farmers|fashion|fast|fedex|feedback|ferrari|ferrero|fi|fiat|fidelity|fido|film|final|finance|financial|fire|firestone|firmdale|fish|fishing|fit|fitness|fj|fk|flickr|flights|flir|florist|flowers|fly|fm|fo|foo|food|foodnetwork|football|ford|forex|forsale|forum|foundation|fox|fr|free|fresenius|frl|frogans|frontdoor|frontier|ftr|fujitsu|fujixerox|fun|fund|furniture|futbol|fyi|ga|gal|gallery|gallo|gallup|game|games|gap|garden|gb|gbiz|gd|gdn|ge|gea|gent|genting|george|gf|gg|ggee|gh|gi|gift|gifts|gives|giving|gl|glade|glass|gle|global|globo|gm|gmail|gmbh|gmo|gmx|gn|godaddy|gold|goldpoint|golf|goo|goodhands|goodyear|goog|google|gop|got|gov|gp|gq|gr|grainger|graphics|gratis|green|gripe|grocery|group|gs|gt|gu|guardian|gucci|guge|guide|guitars|guru|gw|gy|hair|hamburg|hangout|haus|hbo|hdfc|hdfcbank|health|healthcare|help|helsinki|here|hermes|hgtv|hiphop|hisamitsu|hitachi|hiv|hk|hkt|hm|hn|hockey|holdings|holiday|homedepot|homegoods|homes|homesense|honda|honeywell|horse|hospital|host|hosting|hot|hoteles|hotels|hotmail|house|how|hr|hsbc|ht|htc|hu|hughes|hyatt|hyundai|ibm|icbc|ice|icu|id|ie|ieee|ifm|ikano|il|im|imamat|imdb|immo|immobilien|in|industries|infiniti|info|ing|ink|institute|insurance|insure|int|intel|international|intuit|investments|io|ipiranga|iq|ir|irish|is|iselect|ismaili|ist|istanbul|it|itau|itv|iveco|iwc|jaguar|java|jcb|jcp|je|jeep|jetzt|jewelry|jio|jlc|jll|jm|jmp|jnj|jo|jobs|joburg|jot|joy|jp|jpmorgan|jprs|juegos|juniper|kaufen|kddi|ke|kerryhotels|kerrylogistics|kerryproperties|kfh|kg|kh|ki|kia|kim|kinder|kindle|kitchen|kiwi|km|kn|koeln|komatsu|kosher|kp|kpmg|kpn|kr|krd|kred|kuokgroup|kw|ky|kyoto|kz|la|lacaixa|ladbrokes|lamborghini|lamer|lancaster|lancia|lancome|land|landrover|lanxess|lasalle|lat|latino|latrobe|law|lawyer|lb|lc|lds|lease|leclerc|lefrak|legal|lego|lexus|lgbt|li|liaison|lidl|life|lifeinsurance|lifestyle|lighting|like|lilly|limited|limo|lincoln|linde|link|lipsy|live|living|lixil|lk|loan|loans|locker|locus|loft|lol|london|lotte|lotto|love|lpl|lplfinancial|lr|ls|lt|ltd|ltda|lu|lundbeck|lupin|luxe|luxury|lv|ly|ma|macys|madrid|maif|maison|makeup|man|management|mango|map|market|marketing|markets|marriott|marshalls|maserati|mattel|mba|mc|mckinsey|md|me|med|media|meet|melbourne|meme|memorial|men|menu|meo|merckmsd|metlife|mg|mh|miami|microsoft|mil|mini|mint|mit|mitsubishi|mk|ml|mlb|mls|mm|mma|mn|mo|mobi|mobile|mobily|moda|moe|moi|mom|monash|money|monster|mopar|mormon|mortgage|moscow|moto|motorcycles|mov|movie|movistar|mp|mq|mr|ms|msd|mt|mtn|mtr|mu|museum|mutual|mv|mw|mx|my|mz|na|nab|nadex|nagoya|name|nationwide|natura|navy|nba|nc|ne|nec|net|netbank|netflix|network|neustar|new|newholland|news|next|nextdirect|nexus|nf|nfl|ng|ngo|nhk|ni|nico|nike|nikon|ninja|nissan|nissay|nl|no|nokia|northwesternmutual|norton|now|nowruz|nowtv|np|nr|nra|nrw|ntt|nu|nyc|nz|obi|observer|off|office|okinawa|olayan|olayangroup|oldnavy|ollo|om|omega|one|ong|onl|online|onyourside|ooo|open|oracle|orange|org|organic|origins|osaka|otsuka|ott|ovh|pa|page|panasonic|panerai|paris|pars|partners|parts|party|passagens|pay|pccw|pe|pet|pf|pfizer|pg|ph|pharmacy|phd|philips|phone|photo|photography|photos|physio|piaget|pics|pictet|pictures|pid|pin|ping|pink|pioneer|pizza|pk|pl|place|play|playstation|plumbing|plus|pm|pn|pnc|pohl|poker|politie|porn|post|pr|pramerica|praxi|press|prime|pro|prod|productions|prof|progressive|promo|properties|property|protection|pru|prudential|ps|pt|pub|pw|pwc|py|qa|qpon|quebec|quest|qvc|racing|radio|raid|re|read|realestate|realtor|realty|recipes|red|redstone|redumbrella|rehab|reise|reisen|reit|reliance|ren|rent|rentals|repair|report|republican|rest|restaurant|review|reviews|rexroth|rich|richardli|ricoh|rightathome|ril|rio|rip|rmit|ro|rocher|rocks|rodeo|rogers|room|rs|rsvp|ru|rugby|ruhr|run|rw|rwe|ryukyu|sa|saarland|safe|safety|sakura|sale|salon|samsclub|samsung|sandvik|sandvikcoromant|sanofi|sap|sapo|sarl|sas|save|saxo|sb|sbi|sbs|sc|sca|scb|schaeffler|schmidt|scholarships|school|schule|schwarz|science|scjohnson|scor|scot|sd|se|search|seat|secure|security|seek|select|sener|services|ses|seven|sew|sex|sexy|sfr|sg|sh|shangrila|sharp|shaw|shell|shia|shiksha|shoes|shop|shopping|shouji|show|showtime|shriram|si|silk|sina|singles|site|sj|sk|ski|skin|sky|skype|sl|sling|sm|smart|smile|sn|sncf|so|soccer|social|softbank|software|sohu|solar|solutions|song|sony|soy|space|spiegel|spot|spreadbetting|sr|srl|srt|st|stada|staples|star|starhub|statebank|statefarm|statoil|stc|stcgroup|stockholm|storage|store|stream|studio|study|style|su|sucks|supplies|supply|support|surf|surgery|suzuki|sv|swatch|swiftcover|swiss|sx|sy|sydney|symantec|systems|sz|tab|taipei|talk|taobao|target|tatamotors|tatar|tattoo|tax|taxi|tc|tci|td|tdk|team|tech|technology|tel|telecity|telefonica|temasek|tennis|teva|tf|tg|th|thd|theater|theatre|tiaa|tickets|tienda|tiffany|tips|tires|tirol|tj|tjmaxx|tjx|tk|tkmaxx|tl|tm|tmall|tn|to|today|tokyo|tools|top|toray|toshiba|total|tours|town|toyota|toys|tr|trade|trading|training|travel|travelchannel|travelers|travelersinsurance|trust|trv|tt|tube|tui|tunes|tushu|tv|tvs|tw|tz|ua|ubank|ubs|uconnect|ug|uk|unicom|university|uno|uol|ups|us|uy|uz|va|vacations|vana|vanguard|vc|ve|vegas|ventures|verisign|versicherung|vet|vg|vi|viajes|video|vig|viking|villas|vin|vip|virgin|visa|vision|vista|vistaprint|viva|vivo|vlaanderen|vn|vodka|volkswagen|volvo|vote|voting|voto|voyage|vu|vuelos|wales|walmart|walter|wang|wanggou|warman|watch|watches|weather|weatherchannel|webcam|weber|website|wed|wedding|weibo|weir|wf|whoswho|wien|wiki|williamhill|win|windows|wine|winners|wme|wolterskluwer|woodside|work|works|world|wow|ws|wtc|wtf|xbox|xerox|xfinity|xihuan|xin|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--30rr7y|xn--3bst00m|xn--3ds443g|xn--3e0b707e|xn--3hcrj9c|xn--3oq18vl8pn36a|xn--3pxu8k|xn--42c2d9a|xn--45br5cyl|xn--45brj9c|xn--45q11c|xn--4gbrim|xn--54b7fta0cc|xn--55qw42g|xn--55qx5d|xn--5su34j936bgsg|xn--5tzm5g|xn--6frz82g|xn--6qq986b3xl|xn--80adxhks|xn--80ao21a|xn--80aqecdr1a|xn--80asehdb|xn--80aswg|xn--8y0a063a|xn--90a3ac|xn--90ae|xn--90ais|xn--9dbq2a|xn--9et52u|xn--9krt00a|xn--b4w605ferd|xn--bck1b9a5dre4c|xn--c1avg|xn--c2br7g|xn--cck2b3b|xn--cg4bki|xn--clchc0ea0b2g2a9gcd|xn--czr694b|xn--czrs0t|xn--czru2d|xn--d1acj3b|xn--d1alf|xn--e1a4c|xn--eckvdtc9d|xn--efvy88h|xn--estv75g|xn--fct429k|xn--fhbei|xn--fiq228c5hs|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--fjq720a|xn--flw351e|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--fzys8d69uvgm|xn--g2xx48c|xn--gckr3f0f|xn--gecrj9c|xn--gk3at1e|xn--h2breg3eve|xn--h2brj9c|xn--h2brj9c8c|xn--hxt814e|xn--i1b6b1a6a2e|xn--imr513n|xn--io0a7i|xn--j1aef|xn--j1amh|xn--j6w193g|xn--jlq61u9w7b|xn--jvr189m|xn--kcrx77d1x4a|xn--kprw13d|xn--kpry57d|xn--kpu716f|xn--kput3i|xn--l1acc|xn--lgbbat1ad8j|xn--mgb9awbf|xn--mgba3a3ejt|xn--mgba3a4f16a|xn--mgba7c0bbn0a|xn--mgbaakc7dvf|xn--mgbaam7a8h|xn--mgbab2bd|xn--mgbai9azgqp6j|xn--mgbayh7gpa|xn--mgbb9fbpob|xn--mgbbh1a|xn--mgbbh1a71e|xn--mgbc0a9azcg|xn--mgbca7dzdo|xn--mgberp4a5d4ar|xn--mgbgu82a|xn--mgbi4ecexp|xn--mgbpl2fh|xn--mgbt3dhd|xn--mgbtx2b|xn--mgbx4cd0ab|xn--mix891f|xn--mk1bu44c|xn--mxtq1m|xn--ngbc5azd|xn--ngbe9e0a|xn--ngbrx|xn--node|xn--nqv7f|xn--nqv7fs00ema|xn--nyqy26a|xn--o3cw4h|xn--ogbpf8fl|xn--p1acf|xn--p1ai|xn--pbt977c|xn--pgbs0dh|xn--pssy2u|xn--q9jyb4c|xn--qcka1pmc|xn--qxam|xn--rhqv96g|xn--rovu88b|xn--rvc1e0am3e|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--tckwe|xn--tiq49xqyj|xn--unup4y|xn--vermgensberater-ctb|xn--vermgensberatung-pwb|xn--vhquv|xn--vuq861b|xn--w4r85el8fhu5dnra|xn--w4rs40l|xn--wgbh1c|xn--wgbl6a|xn--xhq521b|xn--xkc2al3hye2a|xn--xkc2dl3a5ee0h|xn--y9a3aq|xn--yfro4i67o|xn--ygbi2ammx|xn--zfr164b|xperia|xxx|xyz|yachts|yahoo|yamaxun|yandex|ye|yodobashi|yoga|yokohama|you|youtube|yt|yun|za|zappos|zara|zero|zip|zippo|zm|zone|zuerich|zw".split("|"),To="0123456789".split(""),Vn="0123456789abcdefghijklmnopqrstuvwxyz".split(""),yc=[" ","\f","\r"," ","\v","\xA0","\u1680","\u180E"],Qt=[],bt=function(t){return new oa.CharacterState(t)},_s=bt(),ko=bt(rt.NUM),$a=bt(rt.DOMAIN),Ir=bt(),Ro=bt(rt.WS);_s.on("@",bt(rt.AT)).on(".",bt(rt.DOT)).on("+",bt(rt.PLUS)).on("#",bt(rt.POUND)).on("?",bt(rt.QUERY)).on("/",bt(rt.SLASH)).on("_",bt(rt.UNDERSCORE)).on(":",bt(rt.COLON)).on("{",bt(rt.OPENBRACE)).on("[",bt(rt.OPENBRACKET)).on("<",bt(rt.OPENANGLEBRACKET)).on("(",bt(rt.OPENPAREN)).on("}",bt(rt.CLOSEBRACE)).on("]",bt(rt.CLOSEBRACKET)).on(">",bt(rt.CLOSEANGLEBRACKET)).on(")",bt(rt.CLOSEPAREN)).on("&",bt(rt.AMPERSAND)).on([",",";","!",'"',"'"],bt(rt.PUNCTUATION)),_s.on(` -`,bt(rt.NL)).on(yc,Ro),Ro.on(yc,Ro);for(var Oo=0;Oo=0&&p++,g++,r++;if(!(p<0)){r-=p,g-=p;var c=l.emit();n.push(new c(t.substr(r-g,g)))}}return n},Ah=_s;Ls.State=oa.CharacterState,Ls.TOKENS=vh,Ls.run=Mh,Ls.start=Ah;var Ns={},$t={};$t.__esModule=!0,$t.URL=$t.TEXT=$t.NL=$t.EMAIL=$t.MAILTOEMAIL=$t.Base=void 0;var er=qn,Cr=Ja,Br=qe;function Eh(e){return e instanceof Br.DOMAIN||e instanceof Br.TLD}var Ea=(0,er.createTokenClass)();Ea.prototype={type:"token",isLink:!1,toString:function(){for(var t=[],s=0;s0&&arguments[0]!==void 0?arguments[0]:"http";return{type:this.type,value:this.toString(),href:this.toHref(t)}}};var Th=(0,Cr.inherits)(Ea,(0,er.createTokenClass)(),{type:"email",isLink:!0}),kh=(0,Cr.inherits)(Ea,(0,er.createTokenClass)(),{type:"email",isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),Rh=(0,Cr.inherits)(Ea,(0,er.createTokenClass)(),{type:"text"}),Oh=(0,Cr.inherits)(Ea,(0,er.createTokenClass)(),{type:"nl"}),Ih=(0,Cr.inherits)(Ea,(0,er.createTokenClass)(),{type:"url",isLink:!0,toHref:function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"http",s=!1,a=!1,n=this.v,r=[],o=0;n[o]instanceof Br.PROTOCOL;)s=!0,r.push(n[o].toString().toLowerCase()),o++;for(;n[o]instanceof Br.SLASH;)a=!0,r.push(n[o].toString()),o++;for(;Eh(n[o]);)r.push(n[o].toString().toLowerCase()),o++;for(;o=0&&c++,a++,l++;if(c<0)for(var M=a-l;M0&&(n.push(new es.TEXT(r)),r=[]),a-=c,l-=c;var A=p.emit();n.push(new A(t.slice(a-l,a)))}}return r.length>0&&n.push(new es.TEXT(r)),n};Ns.State=Ac.TokenState,Ns.TOKENS=Ch,Ns.run=jh,Ns.start=Xn,qt.__esModule=!0,qt.tokenize=qt.test=qt.scanner=qt.parser=qt.options=qt.inherits=qt.find=void 0;var Hh=Ja,Fh=Or,Ph=No(Fh),Uh=Ls,Bc=No(Uh),Dh=Ns,Lc=No(Dh);function No(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t.default=e,t}Array.isArray||(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"});var jo=function(t){return Lc.run(Bc.run(t))},qh=function(t){for(var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,a=jo(t),n=[],r=0;r1&&arguments[1]!==void 0?arguments[1]:null,a=jo(t);return a.length===1&&a[0].isLink&&(!s||a[0].type===s)};qt.find=qh,qt.inherits=Hh.inherits,qt.options=Ph,qt.parser=Lc,qt.scanner=Bc,qt.test=Vh,qt.tokenize=jo;var Nc=qt,zh=(e,t,s)=>{const a={bold:s.bold,italic:s.italic,strike:s.strike,underline:s.underline,multilineCode:s.multilineCode,inlineCode:s.inlineCode},n={[a.bold]:{end:"\\"+a.bold,allowed_chars:".",type:"bold"},[a.italic]:{end:a.italic,allowed_chars:".",type:"italic"},[a.strike]:{end:a.strike,allowed_chars:".",type:"strike"},[a.underline]:{end:a.underline,allowed_chars:".",type:"underline"},[a.multilineCode]:{end:a.multilineCode,allowed_chars:`(.| -)`,type:"multiline-code"},[a.inlineCode]:{end:a.inlineCode,allowed_chars:".",type:"inline-code"},"":{allowed_chars:".",end:"",type:"tag"}},r=Wn(e,n),o=Yh(r,n),u=[].concat.apply([],o);return t&&Kh(u),u};function Wn(e,t){let s=[],a=-1,n=null,r=Nc.find(e),o=!1;if(r.length>0&&(a=e.indexOf(r[0].value),o=!0),Object.keys(t).forEach(u=>{const g=e.indexOf(u);g>=0&&(a<0||g{typeof a=="string"?s.push({types:[],value:a}):t[a.start]&&s.push(Xh(a))}),s}function Xh(e){const t=[];return jc(e,t,[]),t}function jc(e,t,s){e.content.forEach(a=>{typeof a=="string"?t.push({types:Hc(s.concat([e.type])),value:a}):jc(a,t,Hc([a.type].concat([e.type]).concat(s)))})}function Hc(e){return[...new Set(e)]}function Kh(e){const t=[];return e.forEach(s=>{const a=Nc.find(s.value);if(a.length){const n=s.value.replace(a[0].value,"");t.push({types:s.types,value:n}),s.types=["url"].concat(s.types),s.href=a[0].href,s.value=a[0].value}t.push(s)}),t}const Ho=["png","jpg","jpeg","webp","svg","gif"],Fc=["mp4","video/ogg","webm","quicktime"],Gh=["mp3","audio/ogg","wav","mpeg"],Zh={name:"FormatMessage",components:{SvgIcon:Ut},props:{messageId:{type:String,default:""},roomId:{type:String,default:""},roomList:{type:Boolean,default:!1},content:{type:[String,Number],required:!0},deleted:{type:Boolean,default:!1},users:{type:Array,default:()=>[]},linkify:{type:Boolean,default:!0},singleLine:{type:Boolean,default:!1},reply:{type:Boolean,default:!1},textFormatting:{type:Object,required:!0},textMessages:{type:Object,default:()=>{}},linkOptions:{type:Object,required:!0}},emits:["open-user-tag"],computed:{linkifiedMessage(){if(this.deleted)return[{value:this.textMessages.MESSAGE_DELETED}];const e=zh(this.formatTags(this.content),this.linkify&&!this.linkOptions.disabled,this.textFormatting);return e.forEach(t=>{t.url=this.checkType(t,"url"),t.bold=this.checkType(t,"bold"),t.italic=this.checkType(t,"italic"),t.strike=this.checkType(t,"strike"),t.underline=this.checkType(t,"underline"),t.inline=this.checkType(t,"inline-code"),t.multiline=this.checkType(t,"multiline-code"),t.tag=this.checkType(t,"tag"),t.image=this.checkImageType(t),t.value=this.replaceEmojiByElement(t.value)}),e},formattedContent(){return this.deleted?this.textMessages.MESSAGE_DELETED:this.formatTags(this.content)}},methods:{checkType(e,t){return e.types&&e.types.indexOf(t)!==-1},checkImageType(e){let t=e.value.lastIndexOf(".");e.value.lastIndexOf("/")>t&&(t=-1);const a=e.value.substring(t+1,e.value.length),n=t>0&&Ho.some(r=>a.toLowerCase().includes(r));return n&&this.setImageSize(e),n},setImageSize(e){const t=new Image;t.src=e.value,t.addEventListener("load",s);function s(a){const n=a.path[0].width/150;e.height=Math.round(a.path[0].height/n)+"px",t.removeEventListener("load",s)}},formatTags(e){const t="",s="",a=[...e.matchAll(new RegExp(t,"gi"))].map(r=>r.index),n=e;return a.forEach(r=>{const o=n.substring(r+t.length,n.indexOf(s,r)),u=this.users.find(g=>g._id===o);e=e.replaceAll(o,`@${(u==null?void 0:u.username)||"unknown"}`)}),e},openTag(e){if(!this.singleLine&&this.checkType(e,"tag")){const t=this.users.find(s=>e.value.indexOf(s.username)!==-1);this.$emit("open-user-tag",t)}},replaceEmojiByElement(e){let t;return this.singleLine?t=16:t=this.containsOnlyEmojis()?28:20,e.replaceAll(/[\p{Extended_Pictographic}\u{1F3FB}-\u{1F3FF}\u{1F9B0}-\u{1F9B3}]/gu,s=>`${s}`)},containsOnlyEmojis(){const e=this.content.replace(new RegExp("[\0-\u1EEFf]","g"),""),t=this.content.replace(new RegExp(`[ -\rs]+|( )+`,"g"),"");return e.length===t.length}}},Wh={class:"vac-image-link-container"},Qh={class:"vac-image-link-message"},Jh=["innerHTML"],$h=["innerHTML"];function e2(e,t,s,a,n,r){const o=Xe("svg-icon");return Q(),ne("div",{class:at(["vac-format-message-wrapper",{"vac-text-ellipsis":s.singleLine}])},[s.textFormatting.disabled?(Q(),ne("div",{key:1,innerHTML:r.formattedContent},null,8,$h)):(Q(),ne("div",{key:0,class:at({"vac-text-ellipsis":s.singleLine})},[(Q(!0),ne(ut,null,tt(r.linkifiedMessage,(u,g)=>(Q(),ne("div",{key:g,class:"vac-format-container"},[(Q(),vt(Gd(u.url?"a":"span"),{class:at({"vac-text-ellipsis":s.singleLine,"vac-text-bold":u.bold,"vac-text-italic":s.deleted||u.italic,"vac-text-strike":u.strike,"vac-text-underline":u.underline,"vac-text-inline-code":!s.singleLine&&u.inline,"vac-text-multiline-code":!s.singleLine&&u.multiline,"vac-text-tag":!s.singleLine&&!s.reply&&u.tag}),href:u.href,target:u.href?s.linkOptions.target:null,rel:u.href?s.linkOptions.rel:null,onClick:l=>r.openTag(u)},{default:Ge(()=>[s.deleted?(Q(),ne(ut,{key:0},[Re(e.$slots,s.roomList?"deleted-icon-room_"+s.roomId:"deleted-icon_"+s.messageId,{},()=>[Ie(o,{name:"deleted",class:at(["vac-icon-deleted",{"vac-icon-deleted-room":s.roomList}])},null,8,["class"])]),aa(" "+Je(s.textMessages.MESSAGE_DELETED),1)],64)):u.url&&u.image?(Q(),ne(ut,{key:1},[ge("div",Wh,[ge("div",{class:"vac-image-link",style:Et({"background-image":`url('${u.value}')`,height:u.height})},null,4)]),ge("div",Qh,[ge("span",null,Je(u.value),1)])],64)):(Q(),ne("span",{key:2,innerHTML:u.value},null,8,Jh))]),_:2},1032,["class","href","target","rel","onClick"]))]))),128))],2))],2)}var Yr=wt(Zh,[["render",e2]]);const Ca="__v-click-outside",Pc=typeof window!="undefined",t2=typeof navigator!="undefined",s2=Pc&&("ontouchstart"in window||t2&&navigator.msMaxTouchPoints>0)?["touchstart"]:["click"],a2=e=>{const t=typeof e=="function";if(!t&&typeof e!="object")throw new Error("v-click-outside: Binding value must be a function or an object");return{handler:t?e:e.handler,middleware:e.middleware||(s=>s),events:e.events||s2,isActive:e.isActive!==!1,detectIframe:e.detectIframe!==!1,capture:Boolean(e.capture)}},Uc=({event:e,handler:t,middleware:s})=>{s(e)&&t(e)},r2=({el:e,event:t,handler:s,middleware:a})=>{setTimeout(()=>{const{activeElement:n}=document;n&&n.tagName==="IFRAME"&&!e.contains(n)&&Uc({event:t,handler:s,middleware:a})},0)},n2=({el:e,event:t,handler:s,middleware:a})=>{const n=t.path||t.composedPath&&t.composedPath();(n?n.indexOf(e)<0:!e.contains(t.target))&&Uc({event:t,handler:s,middleware:a})},Dc=(e,{value:t})=>{const{events:s,handler:a,middleware:n,isActive:r,detectIframe:o,capture:u}=a2(t);if(!!r){if(e[Ca]=s.map(g=>({event:g,srcTarget:document.documentElement,handler:l=>n2({el:e,event:l,handler:a,middleware:n}),capture:u})),o){const g={event:"blur",srcTarget:window,handler:l=>r2({el:e,event:l,handler:a,middleware:n}),capture:u};e[Ca]=[...e[Ca],g]}e[Ca].forEach(({event:g,srcTarget:l,handler:p})=>setTimeout(()=>{!e[Ca]||l.addEventListener(g,p,u)},0))}},qc=e=>{(e[Ca]||[]).forEach(({event:s,srcTarget:a,handler:n,capture:r})=>a.removeEventListener(s,n,r)),delete e[Ca]};var Qn=Pc?{beforeMount:Dc,updated:(e,{value:t,oldValue:s})=>{JSON.stringify(t)!==JSON.stringify(s)&&(qc(e),Dc(e,{value:t}))},unmounted:qc}:{},Vc=(e,t,s)=>{if(e.typingUsers&&e.typingUsers.length){const a=e.users.filter(n=>{if(n._id!==t&&e.typingUsers.indexOf(n._id)!==-1&&!(n.status&&n.status.state==="offline"))return!0});return a.length?e.users.length===2?s.IS_TYPING:a.map(n=>n.username).join(", ")+" "+s.IS_TYPING:void 0}};function Xr(e,t){if(!(!t||!t.type))return e.some(s=>t.type.toLowerCase().includes(s))}function ar(e){return Xr(Ho,e)}function Kr(e){return Xr(Fc,e)}function zc(e){return Xr(Ho,e)||Xr(Fc,e)}function Jn(e){return Xr(Gh,e)}const i2={name:"RoomsContent",components:{SvgIcon:Ut,FormatMessage:Yr},directives:{clickOutside:Qn},props:{currentUserId:{type:[String,Number],required:!0},room:{type:Object,required:!0},textFormatting:{type:Object,required:!0},linkOptions:{type:Object,required:!0},textMessages:{type:Object,required:!0},roomActions:{type:Array,required:!0}},emits:["room-action-handler"],data(){return{roomMenuOpened:null}},computed:{getLastMessage(){const e=this.typingUsers;if(e)return e;const t=this.room.lastMessage.content;if(this.room.users.length<=2)return t;const s=this.room.users.find(a=>a._id===this.room.lastMessage.senderId);return this.room.lastMessage.username?`${this.room.lastMessage.username} - ${t}`:!s||s._id===this.currentUserId?t:`${s.username} - ${t}`},userStatus(){if(!this.room.users||this.room.users.length!==2)return;const e=this.room.users.find(t=>t._id!==this.currentUserId);return e&&e.status?e.status.state:null},typingUsers(){return Vc(this.room,this.currentUserId,this.textMessages)},isMessageCheckmarkVisible(){return!this.typingUsers&&this.room.lastMessage&&!this.room.lastMessage.deleted&&this.room.lastMessage.senderId===this.currentUserId&&(this.room.lastMessage.saved||this.room.lastMessage.distributed||this.room.lastMessage.seen)},formattedDuration(){var t,s;const e=(s=(t=this.room.lastMessage)==null?void 0:t.files)==null?void 0:s[0];if(e){if(!e.duration)return`${e.name}.${e.extension}`;let a=Math.floor(e.duration);return(a-(a%=60))/60+(a>9?":":":0")+a}return""},isAudio(){return this.room.lastMessage.files?Jn(this.room.lastMessage.files[0]):!1}},methods:{roomActionHandler(e){this.closeRoomMenu(),this.$emit("room-action-handler",{action:e,roomId:this.room.roomId})},closeRoomMenu(){this.roomMenuOpened=null}}},o2={class:"vac-room-container"},l2={class:"vac-name-container vac-text-ellipsis"},c2={class:"vac-title-container"},u2={class:"vac-room-name vac-text-ellipsis"},d2={key:1,class:"vac-text-date"},f2={key:0},m2={key:1,class:"vac-text-ellipsis"},h2={key:3,class:"vac-text-ellipsis"},v2={class:"vac-room-options-container"},_2={key:0,class:"vac-badge-counter vac-room-badge"},p2={key:0,class:"vac-menu-options"},g2={class:"vac-menu-list"},b2=["onClick"];function y2(e,t,s,a,n,r){const o=Xe("svg-icon"),u=Xe("format-message"),g=Bn("click-outside");return Q(),ne("div",o2,[Re(e.$slots,"room-list-item_"+s.room.roomId,{},()=>[Re(e.$slots,"room-list-avatar_"+s.room.roomId,{},()=>[s.room.avatar?(Q(),ne("div",{key:0,class:"vac-avatar",style:Et({"background-image":`url('${s.room.avatar}')`})},null,4)):ke("",!0)]),ge("div",l2,[ge("div",c2,[r.userStatus?(Q(),ne("div",{key:0,class:at(["vac-state-circle",{"vac-state-online":r.userStatus==="online"}])},null,2)):ke("",!0),ge("div",u2,Je(s.room.roomName),1),s.room.lastMessage?(Q(),ne("div",d2,Je(s.room.lastMessage.timestamp),1)):ke("",!0)]),ge("div",{class:at(["vac-text-last",{"vac-message-new":s.room.lastMessage&&s.room.lastMessage.new&&!r.typingUsers}])},[r.isMessageCheckmarkVisible?(Q(),ne("span",f2,[Re(e.$slots,"checkmark-icon_"+s.room.roomId,{},()=>[Ie(o,{name:s.room.lastMessage.distributed?"double-checkmark":"checkmark",param:s.room.lastMessage.seen?"seen":"",class:"vac-icon-check"},null,8,["name","param"])])])):ke("",!0),s.room.lastMessage&&!s.room.lastMessage.deleted&&r.isAudio?(Q(),ne("div",m2,[Re(e.$slots,"microphone-icon_"+s.room.roomId,{},()=>[Ie(o,{name:"microphone",class:"vac-icon-microphone"})]),aa(" "+Je(r.formattedDuration),1)])):s.room.lastMessage?(Q(),vt(u,{key:2,"message-id":s.room.lastMessage._id,"room-id":s.room.roomId,"room-list":!0,content:r.getLastMessage,deleted:!!s.room.lastMessage.deleted&&!r.typingUsers,users:s.room.users,"text-messages":s.textMessages,linkify:!1,"text-formatting":s.textFormatting,"link-options":s.linkOptions,"single-line":!0},gt({_:2},[tt(e.$slots,(l,p)=>({name:p,fn:Ge(c=>[Re(e.$slots,p,pt(_t(c)))])}))]),1032,["message-id","room-id","content","deleted","users","text-messages","text-formatting","link-options"])):ke("",!0),!s.room.lastMessage&&r.typingUsers?(Q(),ne("div",h2,Je(r.typingUsers),1)):ke("",!0),ge("div",v2,[s.room.unreadCount?(Q(),ne("div",_2,Je(s.room.unreadCount),1)):ke("",!0),Re(e.$slots,"room-list-options_"+s.room.roomId,{},()=>[s.roomActions.length?(Q(),ne("div",{key:0,class:"vac-svg-button vac-list-room-options",onClick:t[0]||(t[0]=Bs(l=>n.roomMenuOpened=s.room.roomId,["stop"]))},[Re(e.$slots,"room-list-options-icon_"+s.room.roomId,{},()=>[Ie(o,{name:"dropdown",param:"room"})])])):ke("",!0),s.roomActions.length?(Q(),vt(Lt,{key:1,name:"vac-slide-left"},{default:Ge(()=>[n.roomMenuOpened===s.room.roomId?Ys((Q(),ne("div",p2,[ge("div",g2,[(Q(!0),ne(ut,null,tt(s.roomActions,l=>(Q(),ne("div",{key:l.name},[ge("div",{class:"vac-menu-item",onClick:Bs(p=>r.roomActionHandler(l),["stop"])},Je(l.title),9,b2)]))),128))])])),[[g,r.closeRoomMenu]]):ke("",!0)]),_:1})):ke("",!0)])])],2)])])])}var x2=wt(i2,[["render",y2]]),Fo=(e,t,s,a=!1)=>!s||s===""?e:e.filter(n=>a?$n(n[t]).startsWith($n(s)):$n(n[t]).includes($n(s)));function $n(e){return e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"")}const w2={name:"RoomsList",components:{Loader:Dn,RoomsSearch:Bm,RoomContent:x2},props:{currentUserId:{type:[String,Number],required:!0},textMessages:{type:Object,required:!0},showRoomsList:{type:Boolean,required:!0},showSearch:{type:Boolean,required:!0},showAddRoom:{type:Boolean,required:!0},textFormatting:{type:Object,required:!0},linkOptions:{type:Object,required:!0},isMobile:{type:Boolean,required:!0},rooms:{type:Array,required:!0},loadingRooms:{type:Boolean,required:!0},roomsLoaded:{type:Boolean,required:!0},room:{type:Object,required:!0},customSearchRoomEnabled:{type:[Boolean,String],default:!1},roomActions:{type:Array,required:!0},scrollDistance:{type:Number,required:!0}},emits:["add-room","search-room","room-action-handler","loading-more-rooms","fetch-room","fetch-more-rooms"],data(){return{filteredRooms:this.rooms||[],observer:null,showLoader:!0,loadingMoreRooms:!1,selectedRoomId:""}},watch:{rooms:{deep:!0,handler(e,t){this.filteredRooms=e,(e.length!==t.length||this.roomsLoaded)&&(this.loadingMoreRooms=!1)}},loadingRooms(e){e||setTimeout(()=>this.initIntersectionObserver())},loadingMoreRooms(e){this.$emit("loading-more-rooms",e)},roomsLoaded:{immediate:!0,handler(e){e&&(this.loadingMoreRooms=!1,this.loadingRooms||(this.showLoader=!1))}},room:{immediate:!0,handler(e){e&&!this.isMobile&&(this.selectedRoomId=e.roomId)}}},methods:{initIntersectionObserver(){this.observer&&(this.showLoader=!0,this.observer.disconnect());const e=this.$el.querySelector("#infinite-loader-rooms");if(e){const t={root:this.$el.querySelector("#rooms-list"),rootMargin:`${this.scrollDistance}px`,threshold:0};this.observer=new IntersectionObserver(s=>{s[0].isIntersecting&&this.loadMoreRooms()},t),this.observer.observe(e)}},searchRoom(e){this.customSearchRoomEnabled?this.$emit("search-room",e.target.value):this.filteredRooms=Fo(this.rooms,"roomName",e.target.value)},openRoom(e){e.roomId===this.room.roomId&&!this.isMobile||(this.isMobile||(this.selectedRoomId=e.roomId),this.$emit("fetch-room",{room:e}))},loadMoreRooms(){if(!this.loadingMoreRooms){if(this.roomsLoaded){this.loadingMoreRooms=!1,this.showLoader=!1;return}this.$emit("fetch-more-rooms"),this.loadingMoreRooms=!0}}}},S2={key:0,class:"vac-rooms-empty"},M2={key:1,id:"rooms-list",class:"vac-room-list"},A2=["id","onClick"],E2={key:0,id:"infinite-loader-rooms"};function T2(e,t,s,a,n,r){const o=Xe("rooms-search"),u=Xe("loader"),g=Xe("room-content");return Ys((Q(),ne("div",{class:at(["vac-rooms-container",{"vac-rooms-container-full":s.isMobile,"vac-app-border-r":!s.isMobile}])},[Re(e.$slots,"rooms-header"),Re(e.$slots,"rooms-list-search",{},()=>[Ie(o,{rooms:s.rooms,"loading-rooms":s.loadingRooms,"text-messages":s.textMessages,"show-search":s.showSearch,"show-add-room":s.showAddRoom,onSearchRoom:r.searchRoom,onAddRoom:t[0]||(t[0]=l=>e.$emit("add-room"))},gt({_:2},[tt(e.$slots,(l,p)=>({name:p,fn:Ge(c=>[Re(e.$slots,p,pt(_t(c)))])}))]),1032,["rooms","loading-rooms","text-messages","show-search","show-add-room","onSearchRoom"])]),Ie(u,{show:s.loadingRooms,type:"rooms"},gt({_:2},[tt(e.$slots,(l,p)=>({name:p,fn:Ge(c=>[Re(e.$slots,p,pt(_t(c)))])}))]),1032,["show"]),!s.loadingRooms&&!s.rooms.length?(Q(),ne("div",S2,[Re(e.$slots,"rooms-empty",{},()=>[aa(Je(s.textMessages.ROOMS_EMPTY),1)])])):ke("",!0),s.loadingRooms?ke("",!0):(Q(),ne("div",M2,[(Q(!0),ne(ut,null,tt(n.filteredRooms,l=>(Q(),ne("div",{id:l.roomId,key:l.roomId,class:at(["vac-room-item",{"vac-room-selected":n.selectedRoomId===l.roomId}]),onClick:p=>r.openRoom(l)},[Ie(g,{"current-user-id":s.currentUserId,room:l,"text-formatting":s.textFormatting,"link-options":s.linkOptions,"text-messages":s.textMessages,"room-actions":s.roomActions,onRoomActionHandler:t[1]||(t[1]=p=>e.$emit("room-action-handler",p))},gt({_:2},[tt(e.$slots,(p,c)=>({name:c,fn:Ge(M=>[Re(e.$slots,c,pt(_t(M)))])}))]),1032,["current-user-id","room","text-formatting","link-options","text-messages","room-actions"])],10,A2))),128)),Ie(Lt,{name:"vac-fade-message"},{default:Ge(()=>[s.rooms.length&&!s.loadingRooms?(Q(),ne("div",E2,[Ie(u,{show:n.showLoader,infinite:!0,type:"infinite-rooms"},gt({_:2},[tt(e.$slots,(l,p)=>({name:p,fn:Ge(c=>[Re(e.$slots,p,pt(_t(c)))])}))]),1032,["show"])])):ke("",!0)]),_:3})]))],2)),[[Un,s.showRoomsList]])}var k2=wt(w2,[["render",T2]]);const R2={name:"RoomHeader",components:{SvgIcon:Ut},directives:{clickOutside:Qn},props:{currentUserId:{type:[String,Number],required:!0},textMessages:{type:Object,required:!0},singleRoom:{type:Boolean,required:!0},showRoomsList:{type:Boolean,required:!0},isMobile:{type:Boolean,required:!0},roomInfoEnabled:{type:Boolean,required:!0},menuActions:{type:Array,required:!0},room:{type:Object,required:!0},messageSelectionEnabled:{type:Boolean,required:!0},messageSelectionActions:{type:Array,required:!0},selectedMessagesTotal:{type:Number,required:!0}},emits:["toggle-rooms-list","room-info","menu-action-handler","cancel-message-selection","message-selection-action-handler"],data(){return{menuOpened:!1,messageSelectionAnimationEnded:!0}},computed:{typingUsers(){return Vc(this.room,this.currentUserId,this.textMessages)},userStatus(){if(!this.room.users||this.room.users.length!==2)return;const e=this.room.users.find(s=>s._id!==this.currentUserId);if(!(e!=null&&e.status))return;let t="";return e.status.state==="online"?t=this.textMessages.IS_ONLINE:e.status.lastChanged&&(t=this.textMessages.LAST_SEEN+e.status.lastChanged),t}},watch:{messageSelectionEnabled(e){e?this.messageSelectionAnimationEnded=!1:setTimeout(()=>{this.messageSelectionAnimationEnded=!0},300)}},methods:{menuActionHandler(e){this.closeMenu(),this.$emit("menu-action-handler",e)},closeMenu(){this.menuOpened=!1},messageSelectionActionHandler(e){this.$emit("message-selection-action-handler",e)}}},O2={class:"vac-room-header vac-app-border-b"},I2={class:"vac-room-wrapper"},C2={key:0,class:"vac-room-selection"},B2=["id"],L2=["onClick"],N2={class:"vac-selection-button-count"},j2={class:"vac-text-ellipsis"},H2={class:"vac-room-name vac-text-ellipsis"},F2={key:0,class:"vac-room-info vac-text-ellipsis"},P2={key:1,class:"vac-room-info vac-text-ellipsis"},U2={key:0,class:"vac-menu-options"},D2={class:"vac-menu-list"},q2=["onClick"];function V2(e,t,s,a,n,r){const o=Xe("svg-icon"),u=Bn("click-outside");return Q(),ne("div",O2,[Re(e.$slots,"room-header",{},()=>[ge("div",I2,[Ie(Lt,{name:"vac-slide-up"},{default:Ge(()=>[s.messageSelectionEnabled?(Q(),ne("div",C2,[(Q(!0),ne(ut,null,tt(s.messageSelectionActions,g=>(Q(),ne("div",{id:g.name,key:g.name},[ge("div",{class:"vac-selection-button",onClick:l=>r.messageSelectionActionHandler(g)},[aa(Je(g.title)+" ",1),ge("span",N2,Je(s.selectedMessagesTotal),1)],8,L2)],8,B2))),128)),ge("div",{class:"vac-selection-cancel vac-item-clickable",onClick:t[0]||(t[0]=g=>e.$emit("cancel-message-selection"))},Je(s.textMessages.CANCEL_SELECT_MESSAGE),1)])):ke("",!0)]),_:1}),!s.messageSelectionEnabled&&n.messageSelectionAnimationEnded?(Q(),ne(ut,{key:0},[s.singleRoom?ke("",!0):(Q(),ne("div",{key:0,class:at(["vac-svg-button vac-toggle-button",{"vac-rotate-icon-init":!s.isMobile,"vac-rotate-icon":!s.showRoomsList&&!s.isMobile}]),onClick:t[1]||(t[1]=g=>e.$emit("toggle-rooms-list"))},[Re(e.$slots,"toggle-icon",{},()=>[Ie(o,{name:"toggle"})])],2)),ge("div",{class:at(["vac-info-wrapper",{"vac-item-clickable":s.roomInfoEnabled}]),onClick:t[2]||(t[2]=g=>e.$emit("room-info"))},[Re(e.$slots,"room-header-avatar",{},()=>[s.room.avatar?(Q(),ne("div",{key:0,class:"vac-avatar",style:Et({"background-image":`url('${s.room.avatar}')`})},null,4)):ke("",!0)]),Re(e.$slots,"room-header-info",{},()=>[ge("div",j2,[ge("div",H2,Je(s.room.roomName),1),r.typingUsers?(Q(),ne("div",F2,Je(r.typingUsers),1)):(Q(),ne("div",P2,Je(r.userStatus),1))])])],2),s.room.roomId?Re(e.$slots,"room-options",{key:1},()=>[s.menuActions.length?(Q(),ne("div",{key:0,class:"vac-svg-button vac-room-options",onClick:t[3]||(t[3]=g=>n.menuOpened=!n.menuOpened)},[Re(e.$slots,"menu-icon",{},()=>[Ie(o,{name:"menu"})])])):ke("",!0),s.menuActions.length?(Q(),vt(Lt,{key:1,name:"vac-slide-left"},{default:Ge(()=>[n.menuOpened?Ys((Q(),ne("div",U2,[ge("div",D2,[(Q(!0),ne(ut,null,tt(s.menuActions,g=>(Q(),ne("div",{key:g.name},[ge("div",{class:"vac-menu-item",onClick:l=>r.menuActionHandler(g)},Je(g.title),9,q2)]))),128))])])),[[u,r.closeMenu]]):ke("",!0)]),_:1})):ke("",!0)]):ke("",!0)],64)):ke("",!0)])])])}var z2=wt(R2,[["render",V2]]);function ei(e){if(typeof e!="string"||!e)throw new Error("expected a non-empty string, got: "+e)}function Po(e){if(typeof e!="number")throw new Error("expected a number, got: "+e)}const Y2=1,X2=1,Ba="emoji",rr="keyvalue",Uo="favorites",K2="tokens",Yc="tokens",G2="unicode",Xc="count",Z2="group",W2="order",Kc="group-order",Do="eTag",ti="url",Gc="skinTone",nr="readonly",qo="readwrite",Zc="skinUnicodes",Q2="skinUnicodes",J2="https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/en/emojibase/data.json",$2="en";function ev(e,t){const s=new Set,a=[];for(const n of e){const r=t(n);s.has(r)||(s.add(r),a.push(n))}return a}function Wc(e){return ev(e,t=>t.unicode)}function tv(e){function t(s,a,n){const r=a?e.createObjectStore(s,{keyPath:a}):e.createObjectStore(s);if(n)for(const[o,[u,g]]of Object.entries(n))r.createIndex(o,u,{multiEntry:g});return r}t(rr),t(Ba,G2,{[Yc]:[K2,!0],[Kc]:[[Z2,W2]],[Zc]:[Q2,!0]}),t(Uo,void 0,{[Xc]:[""]})}const Vo={},si={},ai={};function Qc(e,t,s){s.onerror=()=>t(s.error),s.onblocked=()=>t(new Error("IDB blocked")),s.onsuccess=()=>e(s.result)}async function sv(e){const t=await new Promise((s,a)=>{const n=indexedDB.open(e,Y2);Vo[e]=n,n.onupgradeneeded=r=>{r.oldVersionzo(e),t}function av(e){return si[e]||(si[e]=sv(e)),si[e]}function Gs(e,t,s,a){return new Promise((n,r)=>{const o=e.transaction(t,s,{durability:"relaxed"}),u=typeof t=="string"?o.objectStore(t):t.map(l=>o.objectStore(l));let g;a(u,o,l=>{g=l}),o.oncomplete=()=>n(g),o.onerror=()=>r(o.error)})}function zo(e){const t=Vo[e],s=t&&t.result;if(s){s.close();const a=ai[e];if(a)for(const n of a)n()}delete Vo[e],delete si[e],delete ai[e]}function rv(e){return new Promise((t,s)=>{zo(e);const a=indexedDB.deleteDatabase(e);Qc(t,s,a)})}function nv(e,t){let s=ai[e];s||(s=ai[e]=[]),s.push(t)}const iv=new Set([":D","XD",":'D","O:)",":X",":P",";P","XP",":L",":Z",":j","8D","XO","8)",":B",":O",":S",":'o","Dx","X(","D:",":C",">0)",":3","!t.match(/\w/)||iv.has(t)?t.toLowerCase():t.replace(/[)(:,]/g,"").replace(/’/g,"'").toLowerCase()).filter(Boolean)}const ov=2;function Jc(e){return e.filter(Boolean).map(t=>t.toLowerCase()).filter(t=>t.length>=ov)}function lv(e){return e.map(({annotation:s,emoticon:a,group:n,order:r,shortcodes:o,skins:u,tags:g,emoji:l,version:p})=>{const c=[...new Set(Jc([...(o||[]).map(ir).flat(),...g.map(ir).flat(),...ir(s),a]))].sort(),M={annotation:s,group:n,order:r,tags:g,tokens:c,unicode:l,version:p};if(a&&(M.emoticon=a),o&&(M.shortcodes=o),u){M.skinTones=[],M.skinUnicodes=[],M.skinVersions=[];for(const{tone:A,emoji:i,version:H}of u)M.skinTones.push(A),M.skinUnicodes.push(i),M.skinVersions.push(H)}return M})}function $c(e,t,s,a){e[t](s).onsuccess=n=>a&&a(n.target.result)}function La(e,t,s){$c(e,"get",t,s)}function e1(e,t,s){$c(e,"getAll",t,s)}function Yo(e){e.commit&&e.commit()}function cv(e,t){let s=e[0];for(let a=1;at(n)&&(s=n)}return s}function t1(e,t){const s=cv(e,n=>n.length),a=[];for(const n of s)e.some(r=>r.findIndex(o=>t(o)===t(n))===-1)||a.push(n);return a}async function uv(e){return!await Xo(e,rr,ti)}async function dv(e,t,s){const[a,n]=await Promise.all([Do,ti].map(r=>Xo(e,rr,r)));return a===s&&n===t}async function fv(e,t){return Gs(e,Ba,nr,(a,n,r)=>{let o;const u=()=>{a.getAll(o&&IDBKeyRange.lowerBound(o,!0),50).onsuccess=g=>{const l=g.target.result;for(const p of l)if(o=p.unicode,t(p))return r(p);if(l.length<50)return r();u()}};u()})}async function s1(e,t,s,a){try{const n=lv(t);await Gs(e,[Ba,rr],qo,([r,o],u)=>{let g,l,p=0;function c(){++p===2&&M()}function M(){if(!(g===a&&l===s)){r.clear();for(const A of n)r.put(A);o.put(a,Do),o.put(s,ti),Yo(u)}}La(o,Do,A=>{g=A,c()}),La(o,ti,A=>{l=A,c()})})}finally{}}async function mv(e,t){return Gs(e,Ba,nr,(s,a,n)=>{const r=IDBKeyRange.bound([t,0],[t+1,0],!1,!0);e1(s.index(Kc),r,n)})}async function a1(e,t){const s=Jc(ir(t));return s.length?Gs(e,Ba,nr,(a,n,r)=>{const o=[],u=()=>{o.length===s.length&&g()},g=()=>{const l=t1(o,p=>p.unicode);r(l.sort((p,c)=>p.order{o.push(M),u()})}}):[]}async function hv(e,t){const s=await a1(e,t);return s.length?s.filter(a=>(a.shortcodes||[]).map(r=>r.toLowerCase()).includes(t.toLowerCase()))[0]||null:await fv(e,n=>(n.shortcodes||[]).includes(t.toLowerCase()))||null}async function vv(e,t){return Gs(e,Ba,nr,(s,a,n)=>La(s,t,r=>{if(r)return n(r);La(s.index(Zc),t,o=>n(o||null))}))}function Xo(e,t,s){return Gs(e,t,nr,(a,n,r)=>La(a,s,r))}function _v(e,t,s,a){return Gs(e,t,qo,(n,r)=>{n.put(a,s),Yo(r)})}function pv(e,t){return Gs(e,Uo,qo,(s,a)=>La(s,t,n=>{s.put((n||0)+1,t),Yo(a)}))}function gv(e,t,s){return s===0?[]:Gs(e,[Uo,Ba],nr,([a,n],r,o)=>{const u=[];a.index(Xc).openCursor(void 0,"prev").onsuccess=g=>{const l=g.target.result;if(!l)return o(u);function p(A){if(u.push(A),u.length===s)return o(u);l.continue()}const c=l.primaryKey,M=t.byName(c);if(M)return p(M);La(n,c,A=>{if(A)return p(A);l.continue()})}})}const ri="";function bv(e,t){const s=new Map;for(const n of e){const r=t(n);for(const o of r){let u=s;for(let l=0;l{let o=s;for(let l=0;lc[0]!(a in e[0])));if(!t||s)throw new Error("Custom emojis are in the wrong format")}function r1(e){xv(e);const t=(M,A)=>M.name.toLowerCase()[...new Set((M.shortcodes||[]).map(A=>ir(A)).flat())]),r=M=>n(M,!0),o=M=>n(M,!1),u=M=>{const A=ir(M),i=A.map((H,B)=>(BH.name).sort(t)},g=new Map,l=new Map;for(const M of e){l.set(M.name.toLowerCase(),M);for(const A of M.shortcodes||[])g.set(A.toLowerCase(),M)}return{all:s,search:u,byShortcode:M=>g.get(M.toLowerCase()),byName:M=>l.get(M.toLowerCase())}}function Gr(e){if(!e)return e;if(delete e.tokens,e.skinTones){const t=e.skinTones.length;e.skins=Array(t);for(let s=0;s!(t in e[0])))throw new Error("Emoji data is in the wrong format")}function i1(e,t){if(Math.floor(e.status/100)!==2)throw new Error("Failed to fetch: "+t+": "+e.status)}async function Mv(e){const t=await fetch(e,{method:"HEAD"});i1(t,e);const s=t.headers.get("etag");return n1(s),s}async function Ko(e){const t=await fetch(e);i1(t,e);const s=t.headers.get("etag");n1(s);const a=await t.json();return Sv(a),[s,a]}function Av(e){for(var t="",s=new Uint8Array(e),a=s.byteLength,n=-1;++n(this._ready||(this._ready=this._init()),this._ready);await t(),this._db||await t()}async getEmojiByGroup(t){return Po(t),await this.ready(),Wc(await mv(this._db,t)).map(Gr)}async getEmojiBySearchQuery(t){ei(t),await this.ready();const s=this._custom.search(t),a=Wc(await a1(this._db,t)).map(Gr);return[...s,...a]}async getEmojiByShortcode(t){ei(t),await this.ready();const s=this._custom.byShortcode(t);return s||Gr(await hv(this._db,t))}async getEmojiByUnicodeOrName(t){ei(t),await this.ready();const s=this._custom.byName(t);return s||Gr(await vv(this._db,t))}async getPreferredSkinTone(){return await this.ready(),await Xo(this._db,rr,Gc)||0}async setPreferredSkinTone(t){return Po(t),await this.ready(),_v(this._db,rr,Gc,t)}async incrementFavoriteEmojiCount(t){return ei(t),await this.ready(),pv(this._db,t)}async getTopFavoriteEmoji(t){return Po(t),await this.ready(),(await gv(this._db,this._custom,t)).map(Gr)}set customEmoji(t){this._custom=r1(t)}get customEmoji(){return this._custom.all}async _shutdown(){await this.ready();try{await this._lazyUpdate}catch{}}_clear(){this._db=this._ready=this._lazyUpdate=void 0}async close(){await this._shutdown(),await zo(this._dbName)}async delete(){await this._shutdown(),await rv(this._dbName)}}function Zr(){}function c1(e){return e()}function u1(){return Object.create(null)}function Wr(e){e.forEach(c1)}function d1(e){return typeof e=="function"}function Rv(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let ni;function ii(e,t){return ni||(ni=document.createElement("a")),ni.href=t,e===ni.href}function Ov(e){return Object.keys(e).length===0}function Iv(e){return e&&d1(e.destroy)?e.destroy:Zr}function Mt(e,t){e.appendChild(t)}function ws(e,t,s){e.insertBefore(t,s||null)}function Ss(e){e.parentNode.removeChild(e)}function yt(e){return document.createElement(e)}function js(e){return document.createTextNode(e)}function Ms(e,t,s,a){return e.addEventListener(t,s,a),()=>e.removeEventListener(t,s,a)}function se(e,t,s){s==null?e.removeAttribute(t):e.getAttribute(t)!==s&&e.setAttribute(t,s)}function Hs(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function f1(e,t){e.value=t==null?"":t}function ca(e,t,s,a){s===null?e.style.removeProperty(t):e.style.setProperty(t,s,a?"important":"")}let Go;function Qr(e){Go=e}const Jr=[],or=[],oi=[],m1=[],h1=Promise.resolve();let Zo=!1;function v1(){Zo||(Zo=!0,h1.then(_1))}function Cv(){return v1(),h1}function Wo(e){oi.push(e)}const Qo=new Set;let li=0;function _1(){const e=Go;do{for(;lim.get(w)?(C.add(E),T(L)):(R.add(w),M--):(g(f,o),M--)}for(;M--;){const L=e[M];N.has(L.key)||g(L,o)}for(;A;)T(B[A-1]);return B}function Hv(e,t,s,a){const{fragment:n,on_mount:r,on_destroy:o,after_update:u}=e.$$;n&&n.m(t,s),a||Wo(()=>{const g=r.map(c1).filter(d1);o?o.push(...g):Wr(g),e.$$.on_mount=[]}),u.forEach(Wo)}function Fv(e,t){const s=e.$$;s.fragment!==null&&(Wr(s.on_destroy),s.fragment&&s.fragment.d(t),s.on_destroy=s.fragment=null,s.ctx=[])}function Pv(e,t){e.$$.dirty[0]===-1&&(Jr.push(e),v1(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const i=A.length?A[0]:M;return l.ctx&&n(l.ctx[c],l.ctx[c]=i)&&(!l.skip_bound&&l.bound[c]&&l.bound[c](i),p&&Pv(e,c)),M}):[],l.update(),p=!0,Wr(l.before_update),l.fragment=a?a(l.ctx):!1,t.target&&(l.fragment&&l.fragment.c(),Hv(e,t.target,void 0,void 0),_1()),Qr(g)}class Dv{$destroy(){Fv(this,1),this.$destroy=Zr}$on(t,s){const a=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return a.push(s),()=>{const n=a.indexOf(s);n!==-1&&a.splice(n,1)}}$set(t){this.$$set&&!Ov(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const p1=[[-1,"\u2728","custom"],[0,"\u{1F600}","smileys-emotion"],[1,"\u{1F44B}","people-body"],[3,"\u{1F431}","animals-nature"],[4,"\u{1F34E}","food-drink"],[5,"\u{1F3E0}\uFE0F","travel-places"],[6,"\u26BD","activities"],[7,"\u{1F4DD}","objects"],[8,"\u26D4\uFE0F","symbols"],[9,"\u{1F3C1}","flags"]].map(([e,t,s])=>({id:e,emoji:t,name:s})),ci=p1.slice(1),qv=p1[0],Vv=2,g1=6,b1=typeof requestIdleCallback=="function"?requestIdleCallback:setTimeout;function y1(e){return e.unicode.includes("\u200D")}const zv={"\u{1FAE0}":14,"\u{1F972}":13.1,"\u{1F97B}":12.1,"\u{1F970}":11,"\u{1F929}":5,"\u{1F471}\u200D\u2640\uFE0F":4,"\u{1F923}":3,"\u{1F441}\uFE0F\u200D\u{1F5E8}\uFE0F":2,"\u{1F600}":1,"\u{1F610}\uFE0F":.7,"\u{1F603}":.6},Yv=1e3,Xv="\u{1F590}\uFE0F",Kv=8,Gv=["\u{1F60A}","\u{1F612}","\u2665\uFE0F","\u{1F44D}\uFE0F","\u{1F60D}","\u{1F602}","\u{1F62D}","\u263A\uFE0F","\u{1F614}","\u{1F629}","\u{1F60F}","\u{1F495}","\u{1F64C}","\u{1F618}"],x1='"Twemoji Mozilla","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji","EmojiOne Color","Android Emoji",sans-serif',Zv=(e,t)=>et?1:0,w1=(e,t)=>{const s=document.createElement("canvas");s.width=s.height=1;const a=s.getContext("2d");return a.textBaseline="top",a.font=`100px ${x1}`,a.fillStyle=t,a.scale(.01,.01),a.fillText(e,0,0),a.getImageData(0,0,1,1).data},Wv=(e,t)=>{const s=[...e].join(","),a=[...t].join(",");return s===a&&!s.startsWith("0,0,0,")};function Qv(e){const t=w1(e,"#000"),s=w1(e,"#fff");return t&&s&&Wv(t,s)}function Jv(){const e=Object.entries(zv);try{for(const[t,s]of e)if(Qv(t))return s}catch{}finally{}return e[0][1]}const Jo=new Promise(e=>b1(()=>e(Jv()))),$o=new Map,$v="\uFE0F",e_="\uD83C",t_="\u200D",s_=127995,a_=57339;function r_(e,t){if(t===0)return e;const s=e.indexOf(t_);return s!==-1?e.substring(0,s)+String.fromCodePoint(s_+t-1)+e.substring(s):(e.endsWith($v)&&(e=e.substring(0,e.length-1)),e+e_+String.fromCodePoint(a_+t-1))}function ua(e){e.preventDefault(),e.stopPropagation()}function el(e,t,s){return t+=e?-1:1,t<0?t=s.length-1:t>=s.length&&(t=0),t}function S1(e,t){const s=new Set,a=[];for(const n of e){const r=t(n);s.has(r)||(s.add(r),a.push(n))}return a}function n_(e,t){const s=a=>{const n={};for(const r of a)typeof r.tone=="number"&&r.version<=t&&(n[r.tone]=r.unicode);return n};return e.map(({unicode:a,skins:n,shortcodes:r,url:o,name:u,category:g})=>({unicode:a,name:u,shortcodes:r,url:o,category:g,id:a||u,skins:n&&s(n),title:(r||[]).join(", ")}))}const ui=requestAnimationFrame;let i_=typeof ResizeObserver=="function";function o_(e,t){let s;return i_?(s=new ResizeObserver(a=>t(a[0].contentRect.width)),s.observe(e)):ui(()=>t(e.getBoundingClientRect().width)),{destroy(){s&&s.disconnect()}}}function M1(e){{const t=document.createRange();return t.selectNode(e.firstChild),t.getBoundingClientRect().width}}let tl;function l_(e,t,s){for(const a of e){const n=s(a),r=M1(n);typeof tl=="undefined"&&(tl=M1(t));const o=r/1.8t)}const{Map:tn}=jv;function A1(e,t,s){const a=e.slice();return a[63]=t[s],a[65]=s,a}function E1(e,t,s){const a=e.slice();return a[66]=t[s],a[65]=s,a}function T1(e,t,s){const a=e.slice();return a[63]=t[s],a[65]=s,a}function k1(e,t,s){const a=e.slice();return a[69]=t[s],a}function R1(e,t,s){const a=e.slice();return a[72]=t[s],a[65]=s,a}function O1(e,t){let s,a=t[72]+"",n,r,o,u,g,l;return{key:e,first:null,c(){s=yt("div"),n=js(a),se(s,"id",r="skintone-"+t[65]),se(s,"class",o="emoji hide-focus "+(t[65]===t[20]?"active":"")),se(s,"aria-selected",u=t[65]===t[20]),se(s,"role","option"),se(s,"title",g=t[0].skinTones[t[65]]),se(s,"tabindex","-1"),se(s,"aria-label",l=t[0].skinTones[t[65]]),this.first=s},m(p,c){ws(p,s,c),Mt(s,n)},p(p,c){t=p,c[0]&512&&a!==(a=t[72]+"")&&Hs(n,a),c[0]&512&&r!==(r="skintone-"+t[65])&&se(s,"id",r),c[0]&1049088&&o!==(o="emoji hide-focus "+(t[65]===t[20]?"active":""))&&se(s,"class",o),c[0]&1049088&&u!==(u=t[65]===t[20])&&se(s,"aria-selected",u),c[0]&513&&g!==(g=t[0].skinTones[t[65]])&&se(s,"title",g),c[0]&513&&l!==(l=t[0].skinTones[t[65]])&&se(s,"aria-label",l)},d(p){p&&Ss(s)}}}function I1(e,t){let s,a,n=t[69].emoji+"",r,o,u,g,l,p,c;function M(){return t[49](t[69])}return{key:e,first:null,c(){s=yt("button"),a=yt("div"),r=js(n),se(a,"class","nav-emoji emoji"),se(s,"role","tab"),se(s,"class","nav-button"),se(s,"aria-controls",o="tab-"+t[69].id),se(s,"aria-label",u=t[0].categories[t[69].name]),se(s,"aria-selected",g=!t[4]&&t[13].id===t[69].id),se(s,"title",l=t[0].categories[t[69].name]),this.first=s},m(A,i){ws(A,s,i),Mt(s,a),Mt(a,r),p||(c=Ms(s,"click",M),p=!0)},p(A,i){t=A,i[0]&4096&&n!==(n=t[69].emoji+"")&&Hs(r,n),i[0]&4096&&o!==(o="tab-"+t[69].id)&&se(s,"aria-controls",o),i[0]&4097&&u!==(u=t[0].categories[t[69].name])&&se(s,"aria-label",u),i[0]&12304&&g!==(g=!t[4]&&t[13].id===t[69].id)&&se(s,"aria-selected",g),i[0]&4097&&l!==(l=t[0].categories[t[69].name])&&se(s,"title",l)},d(A){A&&Ss(s),p=!1,c()}}}function u_(e){let t,s;return{c(){t=yt("img"),se(t,"class","custom-emoji"),ii(t.src,s=e[63].url)||se(t,"src",s),se(t,"alt",""),se(t,"loading","lazy")},m(a,n){ws(a,t,n)},p(a,n){n[0]&32768&&!ii(t.src,s=a[63].url)&&se(t,"src",s)},d(a){a&&Ss(t)}}}function d_(e){let t=e[27](e[63],e[8])+"",s;return{c(){s=js(t)},m(a,n){ws(a,s,n)},p(a,n){n[0]&33024&&t!==(t=a[27](a[63],a[8])+"")&&Hs(s,t)},d(a){a&&Ss(s)}}}function C1(e,t){let s,a,n,r,o,u,g;function l(M,A){return M[63].unicode?d_:u_}let p=l(t),c=p(t);return{key:e,first:null,c(){s=yt("button"),c.c(),se(s,"role",a=t[4]?"option":"menuitem"),se(s,"aria-selected",n=t[4]?t[65]==t[5]:""),se(s,"aria-label",r=t[28](t[63],t[8])),se(s,"title",o=t[63].title),se(s,"class",u="emoji "+(t[4]&&t[65]===t[5]?"active":"")),se(s,"id",g="emo-"+t[63].id),this.first=s},m(M,A){ws(M,s,A),c.m(s,null)},p(M,A){t=M,p===(p=l(t))&&c?c.p(t,A):(c.d(1),c=p(t),c&&(c.c(),c.m(s,null))),A[0]&16&&a!==(a=t[4]?"option":"menuitem")&&se(s,"role",a),A[0]&32816&&n!==(n=t[4]?t[65]==t[5]:"")&&se(s,"aria-selected",n),A[0]&33024&&r!==(r=t[28](t[63],t[8]))&&se(s,"aria-label",r),A[0]&32768&&o!==(o=t[63].title)&&se(s,"title",o),A[0]&32816&&u!==(u="emoji "+(t[4]&&t[65]===t[5]?"active":""))&&se(s,"class",u),A[0]&32768&&g!==(g="emo-"+t[63].id)&&se(s,"id",g)},d(M){M&&Ss(s),c.d()}}}function B1(e,t){let s,a=(t[4]?t[0].searchResultsLabel:t[66].category?t[66].category:t[15].length>1?t[0].categories.custom:t[0].categories[t[13].name])+"",n,r,o,u,g=[],l=new tn,p,c,M,A=t[66].emojis;const i=H=>H[63].id;for(let H=0;H1?t[0].categories.custom:t[0].categories[t[13].name])+"")&&Hs(n,a),B[0]&32768&&r!==(r="menu-label-"+t[65])&&se(s,"id",r),B[0]&32768&&o!==(o="category "+(t[15].length===1&&t[15][0].category===""?"gone":""))&&se(s,"class",o),B[0]&402686256&&(A=t[66].emojis,g=en(g,B,i,1,t,A,l,u,$r,C1,null,T1)),B[0]&16&&p!==(p=t[4]?"listbox":"menu")&&se(u,"role",p),B[0]&32768&&c!==(c="menu-label-"+t[65])&&se(u,"aria-labelledby",c),B[0]&16&&M!==(M=t[4]?"search-results":"")&&se(u,"id",M)},d(H){H&&Ss(s),H&&Ss(u);for(let B=0;Bce[72];for(let ce=0;cece[69].id;for(let ce=0;cece[66].category;for(let ce=0;cece[63].id;for(let ce=0;ce