@ddict/popup 1.0.14 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/popup.css +1 -1
- package/dist/popup.es.js +1214 -1155
- package/dist/popup.umd.js +8 -8
- package/package.json +1 -1
package/dist/popup.es.js
CHANGED
|
@@ -1,151 +1,151 @@
|
|
|
1
|
-
import { openBlock as
|
|
2
|
-
const bn = "data:image/svg+xml,%3csvg%20width='96'%20height='32'%20viewBox='0%200%2096%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M40.151%208.94498H35.7256V23.055H40.151C44.7473%2023.055%2047.826%2020.0825%2047.826%2015.9795C47.8267%2011.8093%2044.7678%208.94498%2040.151%208.94498ZM40.1312%2021.025H37.993V10.9974H40.1312C43.4217%2010.9974%2045.4972%2012.9846%2045.4972%2015.9795C45.4965%2018.9296%2043.4012%2021.025%2040.1312%2021.025Z'%20fill='%233B5695'/%3e%3cpath%20d='M54.5158%208.94498H50.0903V23.055H54.5158C59.1121%2023.055%2062.1908%2020.0825%2062.1908%2015.9795C62.1914%2011.8093%2059.1351%208.94498%2054.5158%208.94498ZM54.496%2021.025H52.3578V10.9974H54.496C57.789%2010.9974%2059.8619%2012.9846%2059.8619%2015.9795C59.8613%2018.9296%2057.766%2021.025%2054.496%2021.025Z'%20fill='%233B5695'/%3e%3cpath%20d='M66.7237%208.94498H64.4575V23.055H66.7237V8.94498Z'%20fill='%233B5695'/%3e%3cpath%20d='M76.4301%2010.7837C78.29%2010.7837%2079.7436%2011.6603%2080.7487%2013.2207L82.4589%2011.9591C81.2401%209.97057%2078.9957%208.70953%2076.409%208.70953C72.3898%208.64555%2068.9048%2011.9591%2068.9906%2016C68.9048%2020.0403%2072.3898%2023.3544%2076.409%2023.2905C79.0385%2023.2905%2081.2618%2022.0294%2082.4589%2020.0409L80.7487%2018.7793C79.7436%2020.3397%2078.29%2021.2163%2076.4301%2021.2163C73.544%2021.2163%2071.3418%2018.993%2071.3418%2016C71.3418%2013.007%2073.5433%2010.7837%2076.4301%2010.7837Z'%20fill='%233B5695'/%3e%3cpath%20d='M83.3135%208.94498V10.9757H88.0595V23.055H90.3256V10.9757H95.0934V8.94498H83.3135Z'%20fill='%233B5695'/%3e%3cpath%20d='M8.66351%204.7121H4.604V15.4427L6.87208%2013.3839V6.79143H8.64559C11.4639%206.79143%2013.2835%208.47857%2013.2835%2011.0877C13.2835%2013.6916%2011.421%2015.4427%208.64559%2015.4427H4.604V17.5016H8.66351C12.7531%2017.5016%2015.6098%2014.8644%2015.6098%2011.0877C15.6104%207.27575%2012.8196%204.7121%208.66351%204.7121Z'%20fill='%233B5695'/%3e%3cpath%20d='M26.2425%209.25528H21.5502L20.7537%2014.293L21.4523%2014.3308L21.4069%2014.7294C21.3916%2014.8656%2021.3289%2015.0448%2021.112%2015.1734C21.1017%2015.9399%2021.0845%2017.0493%2020.9706%2018.1766H26.5937V19.8586H21.4677C22.4133%2022.9424%2024.1254%2024.9648%2026.5611%2025.8669L27.1536%2026.0864L26.6795%2026.5048C26.4875%2026.6737%2026.2182%2027.0141%2026.0896%2027.2489L25.9258%2027.5438L25.6155%2027.4152C23.167%2026.4095%2021.4223%2024.4926%2020.2905%2021.563C19.3602%2024.3365%2017.5797%2026.2553%2014.8592%2027.428L14.5438%2027.5617L14.3775%2027.2642C14.2764%2027.08%2014.0294%2026.7876%2013.8151%2026.5989L13.3564%2026.1951L13.9239%2025.9655C16.4555%2024.9392%2018.064%2023.1414%2018.8228%2020.4837C19.6647%2019.8381%2020.2099%2018.8221%2020.2169%2017.6801V4.53231C20.2169%202.58349%2018.6334%201%2016.6846%201H3.53487C1.58349%201%200%202.58349%200%204.53231V17.6795C0%2019.6283%201.58349%2021.2143%203.53487%2021.2143H8.25528V27.2431C8.25528%2029.3135%209.93986%2031%2012.0096%2031H26.2431C28.3161%2031%2029.9974%2029.3129%2029.9974%2027.2431V13.0096C29.9974%2010.9392%2028.3154%209.25528%2026.2425%209.25528ZM3.53487%2019.4517C2.55662%2019.4517%201.762%2018.6603%201.762%2017.6788V4.53231C1.762%203.55662%202.55598%202.762%203.53487%202.762H16.6839C17.6571%202.762%2018.4517%203.55598%2018.4517%204.53231V17.6795C18.4517%2017.778%2018.444%2017.8733%2018.4267%2017.9667C18.3941%2018.1811%2018.3231%2018.38%2018.215%2018.5592C17.9149%2019.0934%2017.3372%2019.4517%2016.6846%2019.4517H3.53487Z'%20fill='%233B5695'/%3e%3c/svg%3e", Cn = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.5%203.25C5.25736%203.25%204.25%204.25736%204.25%205.5H3.5H2.75C2.75%203.42893%204.42893%201.75%206.5%201.75H17.5C17.9142%201.75%2018.25%202.08579%2018.25%202.5V15.5C18.25%2015.9142%2017.9142%2016.25%2017.5%2016.25H6.5C5.26293%2016.25%204.25%2017.2576%204.25%2018.5C4.25%2018.9142%203.91421%2019.25%203.5%2019.25C3.08579%2019.25%202.75%2018.9142%202.75%2018.5V5.5C2.75%205.49993%202.75%205.5%203.5%205.5C4.25%205.5%204.25%205.49993%204.25%205.5V15.5017C4.87779%2015.0296%205.65755%2014.75%206.5%2014.75H16.75V3.25H6.5Z'%20fill='%233B5695'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M20.5%202.75C20.9142%202.75%2021.25%203.08579%2021.25%203.5V21.5C21.25%2021.9142%2020.9142%2022.25%2020.5%2022.25H6.5C4.42893%2022.25%202.75%2020.5711%202.75%2018.5C2.75%2016.4289%204.42893%2014.75%206.5%2014.75H17.4995C17.4996%2014.75%2017.5%2014.75%2017.5%2015.5C17.5%2016.25%2017.5001%2016.25%2017.5%2016.25H6.5C5.25736%2016.25%204.25%2017.2574%204.25%2018.5C4.25%2019.7426%205.25736%2020.75%206.5%2020.75H19.75V3.5C19.75%203.08579%2020.0858%202.75%2020.5%202.75ZM18.25%2015.5C18.25%2015.9142%2017.9142%2016.25%2017.5%2016.25V15.5L17.4995%2014.75C17.9137%2014.75%2018.25%2015.0858%2018.25%2015.5Z'%20fill='%233B5695'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.25%2018.5C6.25%2018.0858%206.58579%2017.75%207%2017.75H17C17.4142%2017.75%2017.75%2018.0858%2017.75%2018.5C17.75%2018.9142%2017.4142%2019.25%2017%2019.25H7C6.58579%2019.25%206.25%2018.9142%206.25%2018.5Z'%20fill='%233B5695'/%3e%3c/svg%3e", _n = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.467%202.47236C2.75841%202.17799%203.23328%202.17559%203.52764%202.467L8.52765%207.41675C8.82201%207.70816%208.82441%208.18303%208.533%208.4774C8.24159%208.77176%207.76672%208.77416%207.47235%208.48275L2.47236%203.533C2.17799%203.24159%202.17559%202.76672%202.467%202.47236Z'%20fill='%233B5695'/%3e%3cpath%20d='M8.533%2015.4724C8.82441%2015.7667%208.82201%2016.2416%208.52765%2016.533L3.52765%2021.4828C3.23328%2021.7742%202.75841%2021.7718%202.467%2021.4774C2.17559%2021.183%202.17799%2020.7082%202.47236%2020.4167L7.47235%2015.467C7.76672%2015.1756%208.24159%2015.178%208.533%2015.4724Z'%20fill='%233B5695'/%3e%3cpath%20d='M15.52%2015.4697C15.8129%2015.1768%2016.2877%2015.1768%2016.5806%2015.4697L21.5304%2020.4194C21.8233%2020.7123%2021.8233%2021.1872%2021.5304%2021.4801C21.2375%2021.773%2020.7626%2021.773%2020.4697%2021.4801L15.52%2016.5303C15.2271%2016.2374%2015.2271%2015.7626%2015.52%2015.4697Z'%20fill='%233B5695'/%3e%3cpath%20d='M21.4801%202.46967C21.773%202.76256%2021.773%203.23744%2021.4801%203.53033L16.5303%208.48008C16.2374%208.77297%2015.7626%208.77297%2015.4697%208.48008C15.1768%208.18719%2015.1768%207.71231%2015.4697%207.41942L20.4194%202.46967C20.7123%202.17678%2021.1872%202.17678%2021.4801%202.46967Z'%20fill='%233B5695'/%3e%3cpath%20d='M15.75%203C15.75%202.58579%2016.0858%202.25%2016.5%202.25H21C21.4142%202.25%2021.75%202.58579%2021.75%203V7.5C21.75%207.91421%2021.4142%208.25%2021%208.25C20.5858%208.25%2020.25%207.91421%2020.25%207.5V3.75H16.5C16.0858%203.75%2015.75%203.41421%2015.75%203Z'%20fill='%233B5695'/%3e%3cpath%20d='M21%2015.75C21.4142%2015.75%2021.75%2016.0858%2021.75%2016.5V21C21.75%2021.4142%2021.4142%2021.75%2021%2021.75H16.5C16.0858%2021.75%2015.75%2021.4142%2015.75%2021C15.75%2020.5858%2016.0858%2020.25%2016.5%2020.25H20.25V16.5C20.25%2016.0858%2020.5858%2015.75%2021%2015.75Z'%20fill='%233B5695'/%3e%3cpath%20d='M3%2015.75C3.41421%2015.75%203.75%2016.0858%203.75%2016.5V20.25H7.5C7.91421%2020.25%208.25%2020.5858%208.25%2021C8.25%2021.4142%207.91421%2021.75%207.5%2021.75H3C2.58579%2021.75%202.25%2021.4142%202.25%2021V16.5C2.25%2016.0858%202.58579%2015.75%203%2015.75Z'%20fill='%233B5695'/%3e%3cpath%20d='M2.25%203C2.25%202.58579%202.58579%202.25%203%202.25H7.5C7.91421%202.25%208.25%202.58579%208.25%203C8.25%203.41421%207.91421%203.75%207.5%203.75H3.75V7.5C3.75%207.91421%203.41421%208.25%203%208.25C2.58579%208.25%202.25%207.91421%202.25%207.5V3Z'%20fill='%233B5695'/%3e%3c/svg%3e", xn = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.12596%201.63869C9.46935%201.54364%209.83221%201.70329%209.99413%202.02068C10.3672%202.75191%2011.1261%203.25%2012%203.25C12.8739%203.25%2013.6328%202.75191%2014.0059%202.02068C14.1678%201.70329%2014.5307%201.54364%2014.874%201.63869C16.5585%202.10497%2018.0759%202.9704%2019.3184%204.12574C19.5611%204.35137%2019.6269%204.70948%2019.4804%205.00666C19.3331%205.30535%2019.25%205.6419%2019.25%206C19.25%207.24263%2020.2574%208.25%2021.5%208.25L21.5314%208.24977C21.8629%208.24504%2022.1583%208.45859%2022.2576%208.77495C22.5777%209.79397%2022.75%2010.8776%2022.75%2012C22.75%2012.7408%2022.6749%2013.4649%2022.5318%2014.1648C22.4548%2014.5411%2022.1059%2014.7985%2021.7237%2014.7609C21.6504%2014.7537%2021.5758%2014.75%2021.5%2014.75C20.2574%2014.75%2019.25%2015.7574%2019.25%2017C19.25%2017.5531%2019.4486%2018.0579%2019.7793%2018.4498C20.027%2018.7434%2020.0128%2019.1767%2019.7465%2019.4535C18.4777%2020.7719%2016.8745%2021.7678%2015.0721%2022.3044C14.6807%2022.4209%2014.2681%2022.2029%2014.1437%2021.814C13.8535%2020.906%2013.0024%2020.25%2012%2020.25C10.9976%2020.25%2010.1465%2020.906%209.85629%2021.814C9.73195%2022.2029%209.31927%2022.4209%208.92789%2022.3044C7.12545%2021.7678%205.52229%2020.7719%204.25353%2019.4535C3.98716%2019.1767%203.97299%2018.7434%204.22072%2018.4498C4.55139%2018.0579%204.75%2017.5531%204.75%2017C4.75%2015.7574%203.74264%2014.75%202.5%2014.75C2.42423%2014.75%202.34963%2014.7537%202.27634%2014.7609C1.89406%2014.7985%201.54519%2014.5411%201.46821%2014.1648C1.32505%2013.4649%201.25%2012.7408%201.25%2012C1.25%2010.8776%201.42227%209.79398%201.74236%208.77494C1.84173%208.45859%202.13705%208.24504%202.4686%208.24977L2.5%208.25C3.74264%208.25%204.75%207.24263%204.75%206C4.75%205.6419%204.66689%205.30535%204.51962%205.00666C4.3731%204.70948%204.43894%204.35137%204.68159%204.12574C5.92411%202.9704%207.44153%202.10497%209.12596%201.63869ZM6.08277%204.88991C6.19152%205.24123%206.25%205.61424%206.25%206C6.25%207.88945%204.85261%209.45253%203.03493%209.71213C2.84898%2010.4432%202.75%2011.2096%202.75%2012C2.75%2012.4294%202.77921%2012.8516%202.83567%2013.2648C4.74948%2013.4346%206.25%2015.0421%206.25%2017C6.25%2017.6669%206.0754%2018.2941%205.76971%2018.8372C6.62645%2019.6184%207.63002%2020.2404%208.73362%2020.657C9.37706%2019.5189%2010.598%2018.75%2012%2018.75C13.402%2018.75%2014.6229%2019.5189%2015.2664%2020.657C16.37%2020.2404%2017.3735%2019.6184%2018.2303%2018.8372C17.9246%2018.2941%2017.75%2017.6669%2017.75%2017C17.75%2015.0421%2019.2505%2013.4346%2021.1643%2013.2648C21.2208%2012.8516%2021.25%2012.4294%2021.25%2012C21.25%2011.2096%2021.151%2010.4432%2020.9651%209.71213C19.1474%209.45252%2017.75%207.88945%2017.75%206C17.75%205.61424%2017.8085%205.24123%2017.9172%204.88991C17.0618%204.1771%2016.0762%203.61614%2015.0018%203.24775C14.3184%204.15897%2013.2287%204.75%2012%204.75C10.7713%204.75%209.68158%204.15897%208.99819%203.24775C7.92382%203.61614%206.93823%204.1771%206.08277%204.88991Z'%20fill='%233B5695'/%3e%3cpath%20d='M7.75%2012C7.75%209.65278%209.65279%207.75%2012%207.75C14.3472%207.75%2016.25%209.65278%2016.25%2012C16.25%2014.3472%2014.3472%2016.25%2012%2016.25C9.65279%2016.25%207.75%2014.3472%207.75%2012ZM12%209.25C10.4812%209.25%209.25%2010.4812%209.25%2012C9.25%2013.5188%2010.4812%2014.75%2012%2014.75C13.5188%2014.75%2014.75%2013.5188%2014.75%2012C14.75%2010.4812%2013.5188%209.25%2012%209.25Z'%20fill='%233B5695'/%3e%3c/svg%3e", yn = { class: "flex justify-between" }, wn = /* @__PURE__ */ C("div", { class: "flex flex-row" }, [
|
|
1
|
+
import { openBlock as w, createElementBlock as $, createElementVNode as C, computed as S, unref as M, shallowRef as fn, watch as j, triggerRef as rt, onScopeDispose as et, ref as E, onUnmounted as St, inject as Ie, watchEffect as re, onMounted as xe, cloneVNode as Et, h as Ee, Fragment as Z, defineComponent as ae, provide as tt, reactive as Ot, nextTick as Q, toRaw as K, mergeModels as pn, useModel as vn, createBlock as te, withCtx as Pe, createVNode as F, renderList as se, normalizeClass as Ce, toDisplayString as X, effectScope as $t, markRaw as de, hasInjectionContext as hn, getCurrentInstance as Tt, isRef as _e, isReactive as nt, toRef as We, getCurrentScope as It, toRefs as at, createCommentVNode as ee, withModifiers as ut, createTextVNode as mn, withDirectives as Lt, vModelText as Pt, pushScopeId as gn, popScopeId as bn } from "vue";
|
|
2
|
+
const Cn = "data:image/svg+xml,%3csvg%20width='96'%20height='32'%20viewBox='0%200%2096%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M40.151%208.94498H35.7256V23.055H40.151C44.7473%2023.055%2047.826%2020.0825%2047.826%2015.9795C47.8267%2011.8093%2044.7678%208.94498%2040.151%208.94498ZM40.1312%2021.025H37.993V10.9974H40.1312C43.4217%2010.9974%2045.4972%2012.9846%2045.4972%2015.9795C45.4965%2018.9296%2043.4012%2021.025%2040.1312%2021.025Z'%20fill='%233B5695'/%3e%3cpath%20d='M54.5158%208.94498H50.0903V23.055H54.5158C59.1121%2023.055%2062.1908%2020.0825%2062.1908%2015.9795C62.1914%2011.8093%2059.1351%208.94498%2054.5158%208.94498ZM54.496%2021.025H52.3578V10.9974H54.496C57.789%2010.9974%2059.8619%2012.9846%2059.8619%2015.9795C59.8613%2018.9296%2057.766%2021.025%2054.496%2021.025Z'%20fill='%233B5695'/%3e%3cpath%20d='M66.7237%208.94498H64.4575V23.055H66.7237V8.94498Z'%20fill='%233B5695'/%3e%3cpath%20d='M76.4301%2010.7837C78.29%2010.7837%2079.7436%2011.6603%2080.7487%2013.2207L82.4589%2011.9591C81.2401%209.97057%2078.9957%208.70953%2076.409%208.70953C72.3898%208.64555%2068.9048%2011.9591%2068.9906%2016C68.9048%2020.0403%2072.3898%2023.3544%2076.409%2023.2905C79.0385%2023.2905%2081.2618%2022.0294%2082.4589%2020.0409L80.7487%2018.7793C79.7436%2020.3397%2078.29%2021.2163%2076.4301%2021.2163C73.544%2021.2163%2071.3418%2018.993%2071.3418%2016C71.3418%2013.007%2073.5433%2010.7837%2076.4301%2010.7837Z'%20fill='%233B5695'/%3e%3cpath%20d='M83.3135%208.94498V10.9757H88.0595V23.055H90.3256V10.9757H95.0934V8.94498H83.3135Z'%20fill='%233B5695'/%3e%3cpath%20d='M8.66351%204.7121H4.604V15.4427L6.87208%2013.3839V6.79143H8.64559C11.4639%206.79143%2013.2835%208.47857%2013.2835%2011.0877C13.2835%2013.6916%2011.421%2015.4427%208.64559%2015.4427H4.604V17.5016H8.66351C12.7531%2017.5016%2015.6098%2014.8644%2015.6098%2011.0877C15.6104%207.27575%2012.8196%204.7121%208.66351%204.7121Z'%20fill='%233B5695'/%3e%3cpath%20d='M26.2425%209.25528H21.5502L20.7537%2014.293L21.4523%2014.3308L21.4069%2014.7294C21.3916%2014.8656%2021.3289%2015.0448%2021.112%2015.1734C21.1017%2015.9399%2021.0845%2017.0493%2020.9706%2018.1766H26.5937V19.8586H21.4677C22.4133%2022.9424%2024.1254%2024.9648%2026.5611%2025.8669L27.1536%2026.0864L26.6795%2026.5048C26.4875%2026.6737%2026.2182%2027.0141%2026.0896%2027.2489L25.9258%2027.5438L25.6155%2027.4152C23.167%2026.4095%2021.4223%2024.4926%2020.2905%2021.563C19.3602%2024.3365%2017.5797%2026.2553%2014.8592%2027.428L14.5438%2027.5617L14.3775%2027.2642C14.2764%2027.08%2014.0294%2026.7876%2013.8151%2026.5989L13.3564%2026.1951L13.9239%2025.9655C16.4555%2024.9392%2018.064%2023.1414%2018.8228%2020.4837C19.6647%2019.8381%2020.2099%2018.8221%2020.2169%2017.6801V4.53231C20.2169%202.58349%2018.6334%201%2016.6846%201H3.53487C1.58349%201%200%202.58349%200%204.53231V17.6795C0%2019.6283%201.58349%2021.2143%203.53487%2021.2143H8.25528V27.2431C8.25528%2029.3135%209.93986%2031%2012.0096%2031H26.2431C28.3161%2031%2029.9974%2029.3129%2029.9974%2027.2431V13.0096C29.9974%2010.9392%2028.3154%209.25528%2026.2425%209.25528ZM3.53487%2019.4517C2.55662%2019.4517%201.762%2018.6603%201.762%2017.6788V4.53231C1.762%203.55662%202.55598%202.762%203.53487%202.762H16.6839C17.6571%202.762%2018.4517%203.55598%2018.4517%204.53231V17.6795C18.4517%2017.778%2018.444%2017.8733%2018.4267%2017.9667C18.3941%2018.1811%2018.3231%2018.38%2018.215%2018.5592C17.9149%2019.0934%2017.3372%2019.4517%2016.6846%2019.4517H3.53487Z'%20fill='%233B5695'/%3e%3c/svg%3e", _n = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.5%203.25C5.25736%203.25%204.25%204.25736%204.25%205.5H3.5H2.75C2.75%203.42893%204.42893%201.75%206.5%201.75H17.5C17.9142%201.75%2018.25%202.08579%2018.25%202.5V15.5C18.25%2015.9142%2017.9142%2016.25%2017.5%2016.25H6.5C5.26293%2016.25%204.25%2017.2576%204.25%2018.5C4.25%2018.9142%203.91421%2019.25%203.5%2019.25C3.08579%2019.25%202.75%2018.9142%202.75%2018.5V5.5C2.75%205.49993%202.75%205.5%203.5%205.5C4.25%205.5%204.25%205.49993%204.25%205.5V15.5017C4.87779%2015.0296%205.65755%2014.75%206.5%2014.75H16.75V3.25H6.5Z'%20fill='%233B5695'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M20.5%202.75C20.9142%202.75%2021.25%203.08579%2021.25%203.5V21.5C21.25%2021.9142%2020.9142%2022.25%2020.5%2022.25H6.5C4.42893%2022.25%202.75%2020.5711%202.75%2018.5C2.75%2016.4289%204.42893%2014.75%206.5%2014.75H17.4995C17.4996%2014.75%2017.5%2014.75%2017.5%2015.5C17.5%2016.25%2017.5001%2016.25%2017.5%2016.25H6.5C5.25736%2016.25%204.25%2017.2574%204.25%2018.5C4.25%2019.7426%205.25736%2020.75%206.5%2020.75H19.75V3.5C19.75%203.08579%2020.0858%202.75%2020.5%202.75ZM18.25%2015.5C18.25%2015.9142%2017.9142%2016.25%2017.5%2016.25V15.5L17.4995%2014.75C17.9137%2014.75%2018.25%2015.0858%2018.25%2015.5Z'%20fill='%233B5695'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.25%2018.5C6.25%2018.0858%206.58579%2017.75%207%2017.75H17C17.4142%2017.75%2017.75%2018.0858%2017.75%2018.5C17.75%2018.9142%2017.4142%2019.25%2017%2019.25H7C6.58579%2019.25%206.25%2018.9142%206.25%2018.5Z'%20fill='%233B5695'/%3e%3c/svg%3e", xn = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.467%202.47236C2.75841%202.17799%203.23328%202.17559%203.52764%202.467L8.52765%207.41675C8.82201%207.70816%208.82441%208.18303%208.533%208.4774C8.24159%208.77176%207.76672%208.77416%207.47235%208.48275L2.47236%203.533C2.17799%203.24159%202.17559%202.76672%202.467%202.47236Z'%20fill='%233B5695'/%3e%3cpath%20d='M8.533%2015.4724C8.82441%2015.7667%208.82201%2016.2416%208.52765%2016.533L3.52765%2021.4828C3.23328%2021.7742%202.75841%2021.7718%202.467%2021.4774C2.17559%2021.183%202.17799%2020.7082%202.47236%2020.4167L7.47235%2015.467C7.76672%2015.1756%208.24159%2015.178%208.533%2015.4724Z'%20fill='%233B5695'/%3e%3cpath%20d='M15.52%2015.4697C15.8129%2015.1768%2016.2877%2015.1768%2016.5806%2015.4697L21.5304%2020.4194C21.8233%2020.7123%2021.8233%2021.1872%2021.5304%2021.4801C21.2375%2021.773%2020.7626%2021.773%2020.4697%2021.4801L15.52%2016.5303C15.2271%2016.2374%2015.2271%2015.7626%2015.52%2015.4697Z'%20fill='%233B5695'/%3e%3cpath%20d='M21.4801%202.46967C21.773%202.76256%2021.773%203.23744%2021.4801%203.53033L16.5303%208.48008C16.2374%208.77297%2015.7626%208.77297%2015.4697%208.48008C15.1768%208.18719%2015.1768%207.71231%2015.4697%207.41942L20.4194%202.46967C20.7123%202.17678%2021.1872%202.17678%2021.4801%202.46967Z'%20fill='%233B5695'/%3e%3cpath%20d='M15.75%203C15.75%202.58579%2016.0858%202.25%2016.5%202.25H21C21.4142%202.25%2021.75%202.58579%2021.75%203V7.5C21.75%207.91421%2021.4142%208.25%2021%208.25C20.5858%208.25%2020.25%207.91421%2020.25%207.5V3.75H16.5C16.0858%203.75%2015.75%203.41421%2015.75%203Z'%20fill='%233B5695'/%3e%3cpath%20d='M21%2015.75C21.4142%2015.75%2021.75%2016.0858%2021.75%2016.5V21C21.75%2021.4142%2021.4142%2021.75%2021%2021.75H16.5C16.0858%2021.75%2015.75%2021.4142%2015.75%2021C15.75%2020.5858%2016.0858%2020.25%2016.5%2020.25H20.25V16.5C20.25%2016.0858%2020.5858%2015.75%2021%2015.75Z'%20fill='%233B5695'/%3e%3cpath%20d='M3%2015.75C3.41421%2015.75%203.75%2016.0858%203.75%2016.5V20.25H7.5C7.91421%2020.25%208.25%2020.5858%208.25%2021C8.25%2021.4142%207.91421%2021.75%207.5%2021.75H3C2.58579%2021.75%202.25%2021.4142%202.25%2021V16.5C2.25%2016.0858%202.58579%2015.75%203%2015.75Z'%20fill='%233B5695'/%3e%3cpath%20d='M2.25%203C2.25%202.58579%202.58579%202.25%203%202.25H7.5C7.91421%202.25%208.25%202.58579%208.25%203C8.25%203.41421%207.91421%203.75%207.5%203.75H3.75V7.5C3.75%207.91421%203.41421%208.25%203%208.25C2.58579%208.25%202.25%207.91421%202.25%207.5V3Z'%20fill='%233B5695'/%3e%3c/svg%3e", yn = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.12596%201.63869C9.46935%201.54364%209.83221%201.70329%209.99413%202.02068C10.3672%202.75191%2011.1261%203.25%2012%203.25C12.8739%203.25%2013.6328%202.75191%2014.0059%202.02068C14.1678%201.70329%2014.5307%201.54364%2014.874%201.63869C16.5585%202.10497%2018.0759%202.9704%2019.3184%204.12574C19.5611%204.35137%2019.6269%204.70948%2019.4804%205.00666C19.3331%205.30535%2019.25%205.6419%2019.25%206C19.25%207.24263%2020.2574%208.25%2021.5%208.25L21.5314%208.24977C21.8629%208.24504%2022.1583%208.45859%2022.2576%208.77495C22.5777%209.79397%2022.75%2010.8776%2022.75%2012C22.75%2012.7408%2022.6749%2013.4649%2022.5318%2014.1648C22.4548%2014.5411%2022.1059%2014.7985%2021.7237%2014.7609C21.6504%2014.7537%2021.5758%2014.75%2021.5%2014.75C20.2574%2014.75%2019.25%2015.7574%2019.25%2017C19.25%2017.5531%2019.4486%2018.0579%2019.7793%2018.4498C20.027%2018.7434%2020.0128%2019.1767%2019.7465%2019.4535C18.4777%2020.7719%2016.8745%2021.7678%2015.0721%2022.3044C14.6807%2022.4209%2014.2681%2022.2029%2014.1437%2021.814C13.8535%2020.906%2013.0024%2020.25%2012%2020.25C10.9976%2020.25%2010.1465%2020.906%209.85629%2021.814C9.73195%2022.2029%209.31927%2022.4209%208.92789%2022.3044C7.12545%2021.7678%205.52229%2020.7719%204.25353%2019.4535C3.98716%2019.1767%203.97299%2018.7434%204.22072%2018.4498C4.55139%2018.0579%204.75%2017.5531%204.75%2017C4.75%2015.7574%203.74264%2014.75%202.5%2014.75C2.42423%2014.75%202.34963%2014.7537%202.27634%2014.7609C1.89406%2014.7985%201.54519%2014.5411%201.46821%2014.1648C1.32505%2013.4649%201.25%2012.7408%201.25%2012C1.25%2010.8776%201.42227%209.79398%201.74236%208.77494C1.84173%208.45859%202.13705%208.24504%202.4686%208.24977L2.5%208.25C3.74264%208.25%204.75%207.24263%204.75%206C4.75%205.6419%204.66689%205.30535%204.51962%205.00666C4.3731%204.70948%204.43894%204.35137%204.68159%204.12574C5.92411%202.9704%207.44153%202.10497%209.12596%201.63869ZM6.08277%204.88991C6.19152%205.24123%206.25%205.61424%206.25%206C6.25%207.88945%204.85261%209.45253%203.03493%209.71213C2.84898%2010.4432%202.75%2011.2096%202.75%2012C2.75%2012.4294%202.77921%2012.8516%202.83567%2013.2648C4.74948%2013.4346%206.25%2015.0421%206.25%2017C6.25%2017.6669%206.0754%2018.2941%205.76971%2018.8372C6.62645%2019.6184%207.63002%2020.2404%208.73362%2020.657C9.37706%2019.5189%2010.598%2018.75%2012%2018.75C13.402%2018.75%2014.6229%2019.5189%2015.2664%2020.657C16.37%2020.2404%2017.3735%2019.6184%2018.2303%2018.8372C17.9246%2018.2941%2017.75%2017.6669%2017.75%2017C17.75%2015.0421%2019.2505%2013.4346%2021.1643%2013.2648C21.2208%2012.8516%2021.25%2012.4294%2021.25%2012C21.25%2011.2096%2021.151%2010.4432%2020.9651%209.71213C19.1474%209.45252%2017.75%207.88945%2017.75%206C17.75%205.61424%2017.8085%205.24123%2017.9172%204.88991C17.0618%204.1771%2016.0762%203.61614%2015.0018%203.24775C14.3184%204.15897%2013.2287%204.75%2012%204.75C10.7713%204.75%209.68158%204.15897%208.99819%203.24775C7.92382%203.61614%206.93823%204.1771%206.08277%204.88991Z'%20fill='%233B5695'/%3e%3cpath%20d='M7.75%2012C7.75%209.65278%209.65279%207.75%2012%207.75C14.3472%207.75%2016.25%209.65278%2016.25%2012C16.25%2014.3472%2014.3472%2016.25%2012%2016.25C9.65279%2016.25%207.75%2014.3472%207.75%2012ZM12%209.25C10.4812%209.25%209.25%2010.4812%209.25%2012C9.25%2013.5188%2010.4812%2014.75%2012%2014.75C13.5188%2014.75%2014.75%2013.5188%2014.75%2012C14.75%2010.4812%2013.5188%209.25%2012%209.25Z'%20fill='%233B5695'/%3e%3c/svg%3e", wn = { class: "flex justify-between" }, Sn = /* @__PURE__ */ C("div", { class: "flex flex-row" }, [
|
|
3
3
|
/* @__PURE__ */ C("img", {
|
|
4
|
-
src:
|
|
4
|
+
src: Cn,
|
|
5
5
|
alt: "Vue logo",
|
|
6
6
|
class: "w-24"
|
|
7
7
|
})
|
|
8
|
-
], -1), En = { class: "flex" },
|
|
9
|
-
src:
|
|
8
|
+
], -1), En = { class: "flex" }, On = /* @__PURE__ */ C("img", {
|
|
9
|
+
src: _n,
|
|
10
10
|
alt: "Reader",
|
|
11
11
|
class: "w-7"
|
|
12
|
-
}, null, -1),
|
|
13
|
-
|
|
14
|
-
],
|
|
15
|
-
src:
|
|
12
|
+
}, null, -1), $n = [
|
|
13
|
+
On
|
|
14
|
+
], Tn = /* @__PURE__ */ C("img", {
|
|
15
|
+
src: xn,
|
|
16
16
|
alt: "Full screen",
|
|
17
17
|
class: "w-7"
|
|
18
18
|
}, null, -1), In = [
|
|
19
|
-
|
|
20
|
-
],
|
|
21
|
-
src:
|
|
19
|
+
Tn
|
|
20
|
+
], Ln = /* @__PURE__ */ C("img", {
|
|
21
|
+
src: yn,
|
|
22
22
|
alt: "Setting",
|
|
23
23
|
class: "w-7"
|
|
24
|
-
}, null, -1),
|
|
25
|
-
|
|
26
|
-
],
|
|
24
|
+
}, null, -1), Pn = [
|
|
25
|
+
Ln
|
|
26
|
+
], Vn = {
|
|
27
27
|
__name: "Header",
|
|
28
28
|
emits: ["settings", "fullScreen", "reader"],
|
|
29
29
|
setup(e, { emit: o }) {
|
|
30
30
|
const t = o;
|
|
31
|
-
return (n,
|
|
32
|
-
|
|
31
|
+
return (n, l) => (w(), $("div", wn, [
|
|
32
|
+
Sn,
|
|
33
33
|
C("div", En, [
|
|
34
34
|
C("button", {
|
|
35
35
|
class: "btn btn-ghost btn-circle",
|
|
36
|
-
onClick:
|
|
37
|
-
},
|
|
36
|
+
onClick: l[0] || (l[0] = (i) => t("reader"))
|
|
37
|
+
}, $n),
|
|
38
38
|
C("button", {
|
|
39
39
|
class: "btn btn-ghost btn-circle md:hidden",
|
|
40
|
-
onClick:
|
|
40
|
+
onClick: l[1] || (l[1] = (i) => t("fullScreen"))
|
|
41
41
|
}, In),
|
|
42
42
|
C("button", {
|
|
43
43
|
class: "btn btn-ghost btn-circle",
|
|
44
|
-
onClick:
|
|
45
|
-
},
|
|
44
|
+
onClick: l[2] || (l[2] = (i) => t("settings"))
|
|
45
|
+
}, Pn)
|
|
46
46
|
])
|
|
47
47
|
]));
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
function ye(e, o, t) {
|
|
51
|
-
let n = t.initialDeps ?? [],
|
|
51
|
+
let n = t.initialDeps ?? [], l;
|
|
52
52
|
return () => {
|
|
53
|
-
var i, r,
|
|
53
|
+
var i, r, s, a;
|
|
54
54
|
let u;
|
|
55
55
|
t.key && ((i = t.debug) != null && i.call(t)) && (u = Date.now());
|
|
56
|
-
const
|
|
57
|
-
if (!(
|
|
58
|
-
return
|
|
59
|
-
n =
|
|
60
|
-
let
|
|
61
|
-
if (t.key && ((r = t.debug) != null && r.call(t)) && (
|
|
62
|
-
const
|
|
63
|
-
for (
|
|
64
|
-
|
|
65
|
-
return
|
|
56
|
+
const f = e();
|
|
57
|
+
if (!(f.length !== n.length || f.some((x, v) => n[v] !== x)))
|
|
58
|
+
return l;
|
|
59
|
+
n = f;
|
|
60
|
+
let m;
|
|
61
|
+
if (t.key && ((r = t.debug) != null && r.call(t)) && (m = Date.now()), l = o(...f), t.key && ((s = t.debug) != null && s.call(t))) {
|
|
62
|
+
const x = Math.round((Date.now() - u) * 100) / 100, v = Math.round((Date.now() - m) * 100) / 100, h = v / 16, V = (A, T) => {
|
|
63
|
+
for (A = String(A); A.length < T; )
|
|
64
|
+
A = " " + A;
|
|
65
|
+
return A;
|
|
66
66
|
};
|
|
67
67
|
console.info(
|
|
68
|
-
`%c⏱ ${
|
|
68
|
+
`%c⏱ ${V(v, 5)} /${V(x, 5)} ms`,
|
|
69
69
|
`
|
|
70
70
|
font-size: .6rem;
|
|
71
71
|
font-weight: bold;
|
|
72
72
|
color: hsl(${Math.max(
|
|
73
73
|
0,
|
|
74
|
-
Math.min(120 - 120 *
|
|
74
|
+
Math.min(120 - 120 * h, 120)
|
|
75
75
|
)}deg 100% 31%);`,
|
|
76
76
|
t == null ? void 0 : t.key
|
|
77
77
|
);
|
|
78
78
|
}
|
|
79
|
-
return (a = t == null ? void 0 : t.onChange) == null || a.call(t,
|
|
79
|
+
return (a = t == null ? void 0 : t.onChange) == null || a.call(t, l), l;
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Ge(e, o) {
|
|
83
83
|
if (e === void 0)
|
|
84
84
|
throw new Error("Unexpected undefined");
|
|
85
85
|
return e;
|
|
86
86
|
}
|
|
87
|
-
const
|
|
87
|
+
const kn = (e, o) => Math.abs(e - o) < 1, Mn = (e, o, t) => {
|
|
88
88
|
let n;
|
|
89
|
-
return function(...
|
|
90
|
-
e.clearTimeout(n), n = e.setTimeout(() => o.apply(this,
|
|
89
|
+
return function(...l) {
|
|
90
|
+
e.clearTimeout(n), n = e.setTimeout(() => o.apply(this, l), t);
|
|
91
91
|
};
|
|
92
|
-
},
|
|
92
|
+
}, Rn = (e) => e, Nn = (e) => {
|
|
93
93
|
const o = Math.max(e.startIndex - e.overscan, 0), t = Math.min(e.endIndex + e.overscan, e.count - 1), n = [];
|
|
94
|
-
for (let
|
|
95
|
-
n.push(
|
|
94
|
+
for (let l = o; l <= t; l++)
|
|
95
|
+
n.push(l);
|
|
96
96
|
return n;
|
|
97
|
-
},
|
|
97
|
+
}, An = (e, o) => {
|
|
98
98
|
const t = e.scrollElement;
|
|
99
99
|
if (!t)
|
|
100
100
|
return;
|
|
101
101
|
const n = e.targetWindow;
|
|
102
102
|
if (!n)
|
|
103
103
|
return;
|
|
104
|
-
const
|
|
105
|
-
const { width:
|
|
106
|
-
o({ width: Math.round(
|
|
104
|
+
const l = (r) => {
|
|
105
|
+
const { width: s, height: a } = r;
|
|
106
|
+
o({ width: Math.round(s), height: Math.round(a) });
|
|
107
107
|
};
|
|
108
|
-
if (
|
|
108
|
+
if (l(t.getBoundingClientRect()), !n.ResizeObserver)
|
|
109
109
|
return () => {
|
|
110
110
|
};
|
|
111
111
|
const i = new n.ResizeObserver((r) => {
|
|
112
|
-
const
|
|
113
|
-
if (
|
|
114
|
-
const a =
|
|
112
|
+
const s = r[0];
|
|
113
|
+
if (s != null && s.borderBoxSize) {
|
|
114
|
+
const a = s.borderBoxSize[0];
|
|
115
115
|
if (a) {
|
|
116
|
-
|
|
116
|
+
l({ width: a.inlineSize, height: a.blockSize });
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
|
|
120
|
+
l(t.getBoundingClientRect());
|
|
121
121
|
});
|
|
122
122
|
return i.observe(t, { box: "border-box" }), () => {
|
|
123
123
|
i.unobserve(t);
|
|
124
124
|
};
|
|
125
125
|
}, ct = {
|
|
126
126
|
passive: !0
|
|
127
|
-
},
|
|
127
|
+
}, Dn = typeof window > "u" ? !0 : "onscrollend" in window, Fn = (e, o) => {
|
|
128
128
|
const t = e.scrollElement;
|
|
129
129
|
if (!t)
|
|
130
130
|
return;
|
|
131
131
|
const n = e.targetWindow;
|
|
132
132
|
if (!n)
|
|
133
133
|
return;
|
|
134
|
-
let
|
|
135
|
-
const i =
|
|
136
|
-
} :
|
|
134
|
+
let l = 0;
|
|
135
|
+
const i = Dn ? () => {
|
|
136
|
+
} : Mn(
|
|
137
137
|
n,
|
|
138
138
|
() => {
|
|
139
|
-
o(
|
|
139
|
+
o(l, !1);
|
|
140
140
|
},
|
|
141
141
|
e.options.isScrollingResetDelay
|
|
142
142
|
), r = (u) => () => {
|
|
143
|
-
|
|
144
|
-
},
|
|
145
|
-
return a(), t.addEventListener("scroll",
|
|
146
|
-
t.removeEventListener("scroll",
|
|
143
|
+
l = t[e.options.horizontal ? "scrollLeft" : "scrollTop"], i(), o(l, u);
|
|
144
|
+
}, s = r(!0), a = r(!1);
|
|
145
|
+
return a(), t.addEventListener("scroll", s, ct), t.addEventListener("scrollend", a, ct), () => {
|
|
146
|
+
t.removeEventListener("scroll", s), t.removeEventListener("scrollend", a);
|
|
147
147
|
};
|
|
148
|
-
},
|
|
148
|
+
}, jn = (e, o, t) => {
|
|
149
149
|
if (o != null && o.borderBoxSize) {
|
|
150
150
|
const n = o.borderBoxSize[0];
|
|
151
151
|
if (n)
|
|
@@ -156,43 +156,43 @@ const Vn = (e, o) => Math.abs(e - o) < 1, kn = (e, o, t) => {
|
|
|
156
156
|
return Math.round(
|
|
157
157
|
e.getBoundingClientRect()[t.options.horizontal ? "width" : "height"]
|
|
158
158
|
);
|
|
159
|
-
},
|
|
159
|
+
}, Bn = (e, {
|
|
160
160
|
adjustments: o = 0,
|
|
161
161
|
behavior: t
|
|
162
162
|
}, n) => {
|
|
163
|
-
var
|
|
163
|
+
var l, i;
|
|
164
164
|
const r = e + o;
|
|
165
|
-
(i = (
|
|
165
|
+
(i = (l = n.scrollElement) == null ? void 0 : l.scrollTo) == null || i.call(l, {
|
|
166
166
|
[n.options.horizontal ? "left" : "top"]: r,
|
|
167
167
|
behavior: t
|
|
168
168
|
});
|
|
169
169
|
};
|
|
170
|
-
class
|
|
170
|
+
class Hn {
|
|
171
171
|
constructor(o) {
|
|
172
172
|
this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollToIndexTimeoutId = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
|
|
173
173
|
let t = null;
|
|
174
|
-
const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((
|
|
175
|
-
|
|
174
|
+
const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((l) => {
|
|
175
|
+
l.forEach((i) => {
|
|
176
176
|
this._measureElement(i.target, i);
|
|
177
177
|
});
|
|
178
178
|
}));
|
|
179
179
|
return {
|
|
180
180
|
disconnect: () => {
|
|
181
|
-
var
|
|
182
|
-
return (
|
|
181
|
+
var l;
|
|
182
|
+
return (l = n()) == null ? void 0 : l.disconnect();
|
|
183
183
|
},
|
|
184
|
-
observe: (
|
|
184
|
+
observe: (l) => {
|
|
185
185
|
var i;
|
|
186
|
-
return (i = n()) == null ? void 0 : i.observe(
|
|
186
|
+
return (i = n()) == null ? void 0 : i.observe(l, { box: "border-box" });
|
|
187
187
|
},
|
|
188
|
-
unobserve: (
|
|
188
|
+
unobserve: (l) => {
|
|
189
189
|
var i;
|
|
190
|
-
return (i = n()) == null ? void 0 : i.unobserve(
|
|
190
|
+
return (i = n()) == null ? void 0 : i.unobserve(l);
|
|
191
191
|
}
|
|
192
192
|
};
|
|
193
193
|
})(), this.range = null, this.setOptions = (t) => {
|
|
194
|
-
Object.entries(t).forEach(([n,
|
|
195
|
-
typeof
|
|
194
|
+
Object.entries(t).forEach(([n, l]) => {
|
|
195
|
+
typeof l > "u" && delete t[n];
|
|
196
196
|
}), this.options = {
|
|
197
197
|
debug: !1,
|
|
198
198
|
initialOffset: 0,
|
|
@@ -202,11 +202,11 @@ class Bn {
|
|
|
202
202
|
scrollPaddingStart: 0,
|
|
203
203
|
scrollPaddingEnd: 0,
|
|
204
204
|
horizontal: !1,
|
|
205
|
-
getItemKey:
|
|
206
|
-
rangeExtractor:
|
|
205
|
+
getItemKey: Rn,
|
|
206
|
+
rangeExtractor: Nn,
|
|
207
207
|
onChange: () => {
|
|
208
208
|
},
|
|
209
|
-
measureElement:
|
|
209
|
+
measureElement: jn,
|
|
210
210
|
initialRect: { width: 0, height: 0 },
|
|
211
211
|
scrollMargin: 0,
|
|
212
212
|
gap: 0,
|
|
@@ -218,12 +218,12 @@ class Bn {
|
|
|
218
218
|
...t
|
|
219
219
|
};
|
|
220
220
|
}, this.notify = (t, n) => {
|
|
221
|
-
var
|
|
222
|
-
const { startIndex: r, endIndex:
|
|
221
|
+
var l, i;
|
|
222
|
+
const { startIndex: r, endIndex: s } = this.range ?? {
|
|
223
223
|
startIndex: void 0,
|
|
224
224
|
endIndex: void 0
|
|
225
225
|
}, a = this.calculateRange();
|
|
226
|
-
(t || r !== (a == null ? void 0 : a.startIndex) ||
|
|
226
|
+
(t || r !== (a == null ? void 0 : a.startIndex) || s !== (a == null ? void 0 : a.endIndex)) && ((i = (l = this.options).onChange) == null || i.call(l, this, n));
|
|
227
227
|
}, this.cleanup = () => {
|
|
228
228
|
this.unsubs.filter(Boolean).forEach((t) => t()), this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.observer.disconnect(), this.elementsCache.clear();
|
|
229
229
|
}, this._didMount = () => () => {
|
|
@@ -240,30 +240,30 @@ class Bn {
|
|
|
240
240
|
adjustments: void 0,
|
|
241
241
|
behavior: void 0
|
|
242
242
|
}), this.unsubs.push(
|
|
243
|
-
this.options.observeElementRect(this, (
|
|
244
|
-
this.scrollRect =
|
|
243
|
+
this.options.observeElementRect(this, (l) => {
|
|
244
|
+
this.scrollRect = l, this.notify(!1, !1);
|
|
245
245
|
})
|
|
246
246
|
), this.unsubs.push(
|
|
247
|
-
this.options.observeElementOffset(this, (
|
|
248
|
-
this.scrollAdjustments = 0, this.scrollDirection = i ? this.getScrollOffset() <
|
|
247
|
+
this.options.observeElementOffset(this, (l, i) => {
|
|
248
|
+
this.scrollAdjustments = 0, this.scrollDirection = i ? this.getScrollOffset() < l ? "forward" : "backward" : null, this.scrollOffset = l;
|
|
249
249
|
const r = this.isScrolling;
|
|
250
250
|
this.isScrolling = i, this.notify(r !== i, i);
|
|
251
251
|
})
|
|
252
252
|
);
|
|
253
253
|
}
|
|
254
254
|
}, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getFurthestMeasurement = (t, n) => {
|
|
255
|
-
const
|
|
255
|
+
const l = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
256
256
|
for (let r = n - 1; r >= 0; r--) {
|
|
257
|
-
const
|
|
258
|
-
if (
|
|
257
|
+
const s = t[r];
|
|
258
|
+
if (l.has(s.lane))
|
|
259
259
|
continue;
|
|
260
260
|
const a = i.get(
|
|
261
|
-
|
|
261
|
+
s.lane
|
|
262
262
|
);
|
|
263
|
-
if (a == null ||
|
|
263
|
+
if (a == null || s.end > a.end ? i.set(s.lane, s) : s.end < a.end && l.set(s.lane, !0), l.size === this.options.lanes)
|
|
264
264
|
break;
|
|
265
265
|
}
|
|
266
|
-
return i.size === this.options.lanes ? Array.from(i.values()).sort((r,
|
|
266
|
+
return i.size === this.options.lanes ? Array.from(i.values()).sort((r, s) => r.end === s.end ? r.index - s.index : r.end - s.end)[0] : void 0;
|
|
267
267
|
}, this.getMeasurementOptions = ye(
|
|
268
268
|
() => [
|
|
269
269
|
this.options.count,
|
|
@@ -272,10 +272,10 @@ class Bn {
|
|
|
272
272
|
this.options.getItemKey,
|
|
273
273
|
this.options.enabled
|
|
274
274
|
],
|
|
275
|
-
(t, n,
|
|
275
|
+
(t, n, l, i, r) => (this.pendingMeasuredCacheIndexes = [], {
|
|
276
276
|
count: t,
|
|
277
277
|
paddingStart: n,
|
|
278
|
-
scrollMargin:
|
|
278
|
+
scrollMargin: l,
|
|
279
279
|
getItemKey: i,
|
|
280
280
|
enabled: r
|
|
281
281
|
}),
|
|
@@ -284,41 +284,41 @@ class Bn {
|
|
|
284
284
|
}
|
|
285
285
|
), this.getMeasurements = ye(
|
|
286
286
|
() => [this.getMeasurementOptions(), this.itemSizeCache],
|
|
287
|
-
({ count: t, paddingStart: n, scrollMargin:
|
|
287
|
+
({ count: t, paddingStart: n, scrollMargin: l, getItemKey: i, enabled: r }, s) => {
|
|
288
288
|
var a;
|
|
289
289
|
if (!r)
|
|
290
290
|
return this.measurementsCache = [], this.itemSizeCache.clear(), [];
|
|
291
|
-
this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((
|
|
292
|
-
this.itemSizeCache.set(
|
|
291
|
+
this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((p) => {
|
|
292
|
+
this.itemSizeCache.set(p.key, p.size);
|
|
293
293
|
}));
|
|
294
294
|
const u = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
|
|
295
295
|
this.pendingMeasuredCacheIndexes = [];
|
|
296
|
-
const
|
|
297
|
-
for (let
|
|
298
|
-
let
|
|
299
|
-
|
|
300
|
-
const _ = i(
|
|
296
|
+
const f = this.measurementsCache.slice(0, u);
|
|
297
|
+
for (let p = u; p < t; p++) {
|
|
298
|
+
let m = (a = this.measurementsCache[p]) == null ? void 0 : a.measureElement;
|
|
299
|
+
m || (m = (D) => {
|
|
300
|
+
const _ = i(p), L = this.elementsCache.get(_);
|
|
301
301
|
if (!D) {
|
|
302
302
|
L && (this.observer.unobserve(L), this.elementsCache.delete(_));
|
|
303
303
|
return;
|
|
304
304
|
}
|
|
305
305
|
L !== D && (L && this.observer.unobserve(L), this.observer.observe(D), this.elementsCache.set(_, D)), D.isConnected && this.resizeItem(
|
|
306
|
-
|
|
306
|
+
p,
|
|
307
307
|
this.options.measureElement(D, void 0, this)
|
|
308
308
|
);
|
|
309
309
|
});
|
|
310
|
-
const
|
|
311
|
-
p
|
|
312
|
-
index:
|
|
313
|
-
start:
|
|
314
|
-
size:
|
|
315
|
-
end:
|
|
316
|
-
key:
|
|
317
|
-
lane:
|
|
318
|
-
measureElement:
|
|
310
|
+
const x = i(p), v = this.options.lanes === 1 ? f[p - 1] : this.getFurthestMeasurement(f, p), h = v ? v.end + this.options.gap : n + l, V = s.get(x), A = typeof V == "number" ? V : this.options.estimateSize(p), T = h + A, R = v ? v.lane : p % this.options.lanes;
|
|
311
|
+
f[p] = {
|
|
312
|
+
index: p,
|
|
313
|
+
start: h,
|
|
314
|
+
size: A,
|
|
315
|
+
end: T,
|
|
316
|
+
key: x,
|
|
317
|
+
lane: R,
|
|
318
|
+
measureElement: m
|
|
319
319
|
};
|
|
320
320
|
}
|
|
321
|
-
return this.measurementsCache =
|
|
321
|
+
return this.measurementsCache = f, f;
|
|
322
322
|
},
|
|
323
323
|
{
|
|
324
324
|
key: process.env.NODE_ENV !== "production" && "getMeasurements",
|
|
@@ -326,10 +326,10 @@ class Bn {
|
|
|
326
326
|
}
|
|
327
327
|
), this.calculateRange = ye(
|
|
328
328
|
() => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
|
|
329
|
-
(t, n,
|
|
329
|
+
(t, n, l) => this.range = t.length > 0 && n > 0 ? zn({
|
|
330
330
|
measurements: t,
|
|
331
331
|
outerSize: n,
|
|
332
|
-
scrollOffset:
|
|
332
|
+
scrollOffset: l
|
|
333
333
|
}) : null,
|
|
334
334
|
{
|
|
335
335
|
key: process.env.NODE_ENV !== "production" && "calculateRange",
|
|
@@ -342,10 +342,10 @@ class Bn {
|
|
|
342
342
|
this.options.overscan,
|
|
343
343
|
this.options.count
|
|
344
344
|
],
|
|
345
|
-
(t, n,
|
|
345
|
+
(t, n, l, i) => n === null ? [] : t({
|
|
346
346
|
startIndex: n.startIndex,
|
|
347
347
|
endIndex: n.endIndex,
|
|
348
|
-
overscan:
|
|
348
|
+
overscan: l,
|
|
349
349
|
count: i
|
|
350
350
|
}),
|
|
351
351
|
{
|
|
@@ -353,40 +353,40 @@ class Bn {
|
|
|
353
353
|
debug: () => this.options.debug
|
|
354
354
|
}
|
|
355
355
|
), this.indexFromElement = (t) => {
|
|
356
|
-
const n = this.options.indexAttribute,
|
|
357
|
-
return
|
|
356
|
+
const n = this.options.indexAttribute, l = t.getAttribute(n);
|
|
357
|
+
return l ? parseInt(l, 10) : (console.warn(
|
|
358
358
|
`Missing attribute name '${n}={index}' on measured element.`
|
|
359
359
|
), -1);
|
|
360
360
|
}, this._measureElement = (t, n) => {
|
|
361
|
-
const
|
|
361
|
+
const l = this.indexFromElement(t), i = this.getMeasurements()[l];
|
|
362
362
|
if (!i || !t.isConnected) {
|
|
363
|
-
this.elementsCache.forEach((
|
|
364
|
-
|
|
363
|
+
this.elementsCache.forEach((s, a) => {
|
|
364
|
+
s === t && (this.observer.unobserve(t), this.elementsCache.delete(a));
|
|
365
365
|
});
|
|
366
366
|
return;
|
|
367
367
|
}
|
|
368
368
|
const r = this.elementsCache.get(i.key);
|
|
369
|
-
r !== t && (r && this.observer.unobserve(r), this.observer.observe(t), this.elementsCache.set(i.key, t)), this.resizeItem(
|
|
369
|
+
r !== t && (r && this.observer.unobserve(r), this.observer.observe(t), this.elementsCache.set(i.key, t)), this.resizeItem(l, this.options.measureElement(t, n, this));
|
|
370
370
|
}, this.resizeItem = (t, n) => {
|
|
371
|
-
const
|
|
372
|
-
if (!
|
|
371
|
+
const l = this.getMeasurements()[t];
|
|
372
|
+
if (!l)
|
|
373
373
|
return;
|
|
374
|
-
const i = this.itemSizeCache.get(
|
|
375
|
-
r !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(
|
|
374
|
+
const i = this.itemSizeCache.get(l.key) ?? l.size, r = n - i;
|
|
375
|
+
r !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(l, r, this) : l.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", r), this._scrollToOffset(this.getScrollOffset(), {
|
|
376
376
|
adjustments: this.scrollAdjustments += r,
|
|
377
377
|
behavior: void 0
|
|
378
|
-
})), this.pendingMeasuredCacheIndexes.push(
|
|
378
|
+
})), this.pendingMeasuredCacheIndexes.push(l.index), this.itemSizeCache = new Map(this.itemSizeCache.set(l.key, n)), this.notify(!0, !1));
|
|
379
379
|
}, this.measureElement = (t) => {
|
|
380
380
|
t && this._measureElement(t, void 0);
|
|
381
381
|
}, this.getVirtualItems = ye(
|
|
382
382
|
() => [this.getIndexes(), this.getMeasurements()],
|
|
383
383
|
(t, n) => {
|
|
384
|
-
const
|
|
384
|
+
const l = [];
|
|
385
385
|
for (let i = 0, r = t.length; i < r; i++) {
|
|
386
|
-
const
|
|
387
|
-
|
|
386
|
+
const s = t[i], a = n[s];
|
|
387
|
+
l.push(a);
|
|
388
388
|
}
|
|
389
|
-
return
|
|
389
|
+
return l;
|
|
390
390
|
},
|
|
391
391
|
{
|
|
392
392
|
key: process.env.NODE_ENV !== "production" && "getIndexes",
|
|
@@ -395,60 +395,60 @@ class Bn {
|
|
|
395
395
|
), this.getVirtualItemForOffset = (t) => {
|
|
396
396
|
const n = this.getMeasurements();
|
|
397
397
|
if (n.length !== 0)
|
|
398
|
-
return
|
|
398
|
+
return Ge(
|
|
399
399
|
n[Vt(
|
|
400
400
|
0,
|
|
401
401
|
n.length - 1,
|
|
402
|
-
(
|
|
402
|
+
(l) => Ge(n[l]).start,
|
|
403
403
|
t
|
|
404
404
|
)]
|
|
405
405
|
);
|
|
406
406
|
}, this.getOffsetForAlignment = (t, n) => {
|
|
407
|
-
const
|
|
408
|
-
n === "auto" && (t <= i ? n = "start" : t >= i +
|
|
409
|
-
const r = this.options.horizontal ? "scrollWidth" : "scrollHeight", a = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[r] : this.scrollElement[r] : 0) -
|
|
407
|
+
const l = this.getSize(), i = this.getScrollOffset();
|
|
408
|
+
n === "auto" && (t <= i ? n = "start" : t >= i + l ? n = "end" : n = "start"), n === "start" ? t = t : n === "end" ? t = t - l : n === "center" && (t = t - l / 2);
|
|
409
|
+
const r = this.options.horizontal ? "scrollWidth" : "scrollHeight", a = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[r] : this.scrollElement[r] : 0) - l;
|
|
410
410
|
return Math.max(Math.min(a, t), 0);
|
|
411
411
|
}, this.getOffsetForIndex = (t, n = "auto") => {
|
|
412
412
|
t = Math.max(0, Math.min(t, this.options.count - 1));
|
|
413
|
-
const
|
|
414
|
-
if (!
|
|
413
|
+
const l = this.getMeasurements()[t];
|
|
414
|
+
if (!l)
|
|
415
415
|
return;
|
|
416
416
|
const i = this.getSize(), r = this.getScrollOffset();
|
|
417
417
|
if (n === "auto")
|
|
418
|
-
if (
|
|
418
|
+
if (l.end >= r + i - this.options.scrollPaddingEnd)
|
|
419
419
|
n = "end";
|
|
420
|
-
else if (
|
|
420
|
+
else if (l.start <= r + this.options.scrollPaddingStart)
|
|
421
421
|
n = "start";
|
|
422
422
|
else
|
|
423
423
|
return [r, n];
|
|
424
|
-
const
|
|
425
|
-
return [this.getOffsetForAlignment(
|
|
424
|
+
const s = n === "end" ? l.end + this.options.scrollPaddingEnd : l.start - this.options.scrollPaddingStart;
|
|
425
|
+
return [this.getOffsetForAlignment(s, n), n];
|
|
426
426
|
}, this.isDynamicMode = () => this.elementsCache.size > 0, this.cancelScrollToIndex = () => {
|
|
427
427
|
this.scrollToIndexTimeoutId !== null && this.targetWindow && (this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId), this.scrollToIndexTimeoutId = null);
|
|
428
|
-
}, this.scrollToOffset = (t, { align: n = "start", behavior:
|
|
429
|
-
this.cancelScrollToIndex(),
|
|
428
|
+
}, this.scrollToOffset = (t, { align: n = "start", behavior: l } = {}) => {
|
|
429
|
+
this.cancelScrollToIndex(), l === "smooth" && this.isDynamicMode() && console.warn(
|
|
430
430
|
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
431
431
|
), this._scrollToOffset(this.getOffsetForAlignment(t, n), {
|
|
432
432
|
adjustments: void 0,
|
|
433
|
-
behavior:
|
|
433
|
+
behavior: l
|
|
434
434
|
});
|
|
435
|
-
}, this.scrollToIndex = (t, { align: n = "auto", behavior:
|
|
436
|
-
t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(),
|
|
435
|
+
}, this.scrollToIndex = (t, { align: n = "auto", behavior: l } = {}) => {
|
|
436
|
+
t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(), l === "smooth" && this.isDynamicMode() && console.warn(
|
|
437
437
|
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
438
438
|
);
|
|
439
439
|
const i = this.getOffsetForIndex(t, n);
|
|
440
440
|
if (!i) return;
|
|
441
|
-
const [r,
|
|
442
|
-
this._scrollToOffset(r, { adjustments: void 0, behavior:
|
|
441
|
+
const [r, s] = i;
|
|
442
|
+
this._scrollToOffset(r, { adjustments: void 0, behavior: l }), l !== "smooth" && this.isDynamicMode() && this.targetWindow && (this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
|
|
443
443
|
if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
|
|
444
444
|
this.options.getItemKey(t)
|
|
445
445
|
)) {
|
|
446
|
-
const [u] =
|
|
447
|
-
this.getOffsetForIndex(t,
|
|
446
|
+
const [u] = Ge(
|
|
447
|
+
this.getOffsetForIndex(t, s)
|
|
448
448
|
);
|
|
449
|
-
|
|
449
|
+
kn(u, this.getScrollOffset()) || this.scrollToIndex(t, { align: s, behavior: l });
|
|
450
450
|
} else
|
|
451
|
-
this.scrollToIndex(t, { align:
|
|
451
|
+
this.scrollToIndex(t, { align: s, behavior: l });
|
|
452
452
|
}));
|
|
453
453
|
}, this.scrollBy = (t, { behavior: n } = {}) => {
|
|
454
454
|
this.cancelScrollToIndex(), n === "smooth" && this.isDynamicMode() && console.warn(
|
|
@@ -460,15 +460,15 @@ class Bn {
|
|
|
460
460
|
}, this.getTotalSize = () => {
|
|
461
461
|
var t;
|
|
462
462
|
const n = this.getMeasurements();
|
|
463
|
-
let
|
|
464
|
-
return n.length === 0 ?
|
|
463
|
+
let l;
|
|
464
|
+
return n.length === 0 ? l = this.options.paddingStart : l = this.options.lanes === 1 ? ((t = n[n.length - 1]) == null ? void 0 : t.end) ?? 0 : Math.max(
|
|
465
465
|
...n.slice(-this.options.lanes).map((i) => i.end)
|
|
466
|
-
),
|
|
466
|
+
), l - this.options.scrollMargin + this.options.paddingEnd;
|
|
467
467
|
}, this._scrollToOffset = (t, {
|
|
468
468
|
adjustments: n,
|
|
469
|
-
behavior:
|
|
469
|
+
behavior: l
|
|
470
470
|
}) => {
|
|
471
|
-
this.options.scrollToFn(t, { behavior:
|
|
471
|
+
this.options.scrollToFn(t, { behavior: l, adjustments: n }, this);
|
|
472
472
|
}, this.measure = () => {
|
|
473
473
|
var t, n;
|
|
474
474
|
this.itemSizeCache = /* @__PURE__ */ new Map(), (n = (t = this.options).onChange) == null || n.call(t, this, !1);
|
|
@@ -477,77 +477,77 @@ class Bn {
|
|
|
477
477
|
}
|
|
478
478
|
const Vt = (e, o, t, n) => {
|
|
479
479
|
for (; e <= o; ) {
|
|
480
|
-
const
|
|
480
|
+
const l = (e + o) / 2 | 0, i = t(l);
|
|
481
481
|
if (i < n)
|
|
482
|
-
e =
|
|
482
|
+
e = l + 1;
|
|
483
483
|
else if (i > n)
|
|
484
|
-
o =
|
|
484
|
+
o = l - 1;
|
|
485
485
|
else
|
|
486
|
-
return
|
|
486
|
+
return l;
|
|
487
487
|
}
|
|
488
488
|
return e > 0 ? e - 1 : 0;
|
|
489
489
|
};
|
|
490
|
-
function
|
|
490
|
+
function zn({
|
|
491
491
|
measurements: e,
|
|
492
492
|
outerSize: o,
|
|
493
493
|
scrollOffset: t
|
|
494
494
|
}) {
|
|
495
|
-
const n = e.length - 1, i = Vt(0, n, (
|
|
495
|
+
const n = e.length - 1, i = Vt(0, n, (s) => e[s].start, t);
|
|
496
496
|
let r = i;
|
|
497
497
|
for (; r < n && e[r].end < t + o; )
|
|
498
498
|
r++;
|
|
499
499
|
return { startIndex: i, endIndex: r };
|
|
500
500
|
}
|
|
501
|
-
function
|
|
502
|
-
const o = new
|
|
503
|
-
return
|
|
504
|
-
() =>
|
|
505
|
-
(
|
|
506
|
-
|
|
501
|
+
function Un(e) {
|
|
502
|
+
const o = new Hn(M(e)), t = fn(o), n = o._didMount();
|
|
503
|
+
return j(
|
|
504
|
+
() => M(e).getScrollElement(),
|
|
505
|
+
(l) => {
|
|
506
|
+
l && o._willUpdate();
|
|
507
507
|
},
|
|
508
508
|
{
|
|
509
509
|
immediate: !0
|
|
510
510
|
}
|
|
511
|
-
),
|
|
512
|
-
() =>
|
|
513
|
-
(
|
|
511
|
+
), j(
|
|
512
|
+
() => M(e),
|
|
513
|
+
(l) => {
|
|
514
514
|
o.setOptions({
|
|
515
|
-
...
|
|
515
|
+
...l,
|
|
516
516
|
onChange: (i, r) => {
|
|
517
|
-
var
|
|
518
|
-
rt(t), (
|
|
517
|
+
var s;
|
|
518
|
+
rt(t), (s = l.onChange) == null || s.call(l, i, r);
|
|
519
519
|
}
|
|
520
520
|
}), o._willUpdate(), rt(t);
|
|
521
521
|
},
|
|
522
522
|
{
|
|
523
523
|
immediate: !0
|
|
524
524
|
}
|
|
525
|
-
),
|
|
526
|
-
}
|
|
527
|
-
function
|
|
528
|
-
return
|
|
529
|
-
|
|
530
|
-
observeElementRect:
|
|
531
|
-
observeElementOffset:
|
|
532
|
-
scrollToFn:
|
|
533
|
-
...
|
|
525
|
+
), et(n), t;
|
|
526
|
+
}
|
|
527
|
+
function Zn(e) {
|
|
528
|
+
return Un(
|
|
529
|
+
S(() => ({
|
|
530
|
+
observeElementRect: An,
|
|
531
|
+
observeElementOffset: Fn,
|
|
532
|
+
scrollToFn: Bn,
|
|
533
|
+
...M(e)
|
|
534
534
|
}))
|
|
535
535
|
);
|
|
536
536
|
}
|
|
537
|
-
function
|
|
538
|
-
let n =
|
|
539
|
-
return [
|
|
540
|
-
return
|
|
537
|
+
function Wn(e, o, t) {
|
|
538
|
+
let n = E(t == null ? void 0 : t.value), l = S(() => e.value !== void 0);
|
|
539
|
+
return [S(() => l.value ? e.value : n.value), function(i) {
|
|
540
|
+
return l.value || (n.value = i), o == null ? void 0 : o(i);
|
|
541
541
|
}];
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function Gn(e) {
|
|
544
544
|
typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((o) => setTimeout(() => {
|
|
545
545
|
throw o;
|
|
546
546
|
}));
|
|
547
547
|
}
|
|
548
548
|
function Ae() {
|
|
549
|
-
let e = [], o = { addEventListener(t, n,
|
|
550
|
-
return t.addEventListener(n,
|
|
549
|
+
let e = [], o = { addEventListener(t, n, l, i) {
|
|
550
|
+
return t.addEventListener(n, l, i), o.add(() => t.removeEventListener(n, l, i));
|
|
551
551
|
}, requestAnimationFrame(...t) {
|
|
552
552
|
let n = requestAnimationFrame(...t);
|
|
553
553
|
o.add(() => cancelAnimationFrame(n));
|
|
@@ -560,14 +560,14 @@ function Ae() {
|
|
|
560
560
|
o.add(() => clearTimeout(n));
|
|
561
561
|
}, microTask(...t) {
|
|
562
562
|
let n = { current: !0 };
|
|
563
|
-
return
|
|
563
|
+
return Gn(() => {
|
|
564
564
|
n.current && t[0]();
|
|
565
565
|
}), o.add(() => {
|
|
566
566
|
n.current = !1;
|
|
567
567
|
});
|
|
568
|
-
}, style(t, n,
|
|
568
|
+
}, style(t, n, l) {
|
|
569
569
|
let i = t.style.getPropertyValue(n);
|
|
570
|
-
return Object.assign(t.style, { [n]:
|
|
570
|
+
return Object.assign(t.style, { [n]: l }), this.add(() => {
|
|
571
571
|
Object.assign(t.style, { [n]: i });
|
|
572
572
|
});
|
|
573
573
|
}, group(t) {
|
|
@@ -576,26 +576,26 @@ function Ae() {
|
|
|
576
576
|
}, add(t) {
|
|
577
577
|
return e.push(t), () => {
|
|
578
578
|
let n = e.indexOf(t);
|
|
579
|
-
if (n >= 0) for (let
|
|
579
|
+
if (n >= 0) for (let l of e.splice(n, 1)) l();
|
|
580
580
|
};
|
|
581
581
|
}, dispose() {
|
|
582
582
|
for (let t of e.splice(0)) t();
|
|
583
583
|
} };
|
|
584
584
|
return o;
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function qn() {
|
|
587
587
|
let e = Ae();
|
|
588
|
-
return
|
|
588
|
+
return St(() => e.dispose()), e;
|
|
589
589
|
}
|
|
590
|
-
function
|
|
591
|
-
let e =
|
|
590
|
+
function Jn() {
|
|
591
|
+
let e = qn();
|
|
592
592
|
return (o) => {
|
|
593
593
|
e.dispose(), e.nextFrame(o);
|
|
594
594
|
};
|
|
595
595
|
}
|
|
596
|
-
let
|
|
596
|
+
let Kn = Symbol("headlessui.useid"), Yn = 0;
|
|
597
597
|
function Le() {
|
|
598
|
-
return
|
|
598
|
+
return Ie(Kn, () => `${++Yn}`)();
|
|
599
599
|
}
|
|
600
600
|
function P(e) {
|
|
601
601
|
var o;
|
|
@@ -603,16 +603,16 @@ function P(e) {
|
|
|
603
603
|
let t = (o = e.value.$el) != null ? o : e.value;
|
|
604
604
|
return t instanceof Node ? t : null;
|
|
605
605
|
}
|
|
606
|
-
function
|
|
606
|
+
function le(e, o, ...t) {
|
|
607
607
|
if (e in o) {
|
|
608
|
-
let
|
|
609
|
-
return typeof
|
|
608
|
+
let l = o[e];
|
|
609
|
+
return typeof l == "function" ? l(...t) : l;
|
|
610
610
|
}
|
|
611
|
-
let n = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(o).map((
|
|
612
|
-
throw Error.captureStackTrace && Error.captureStackTrace(n,
|
|
611
|
+
let n = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(o).map((l) => `"${l}"`).join(", ")}.`);
|
|
612
|
+
throw Error.captureStackTrace && Error.captureStackTrace(n, le), n;
|
|
613
613
|
}
|
|
614
|
-
var
|
|
615
|
-
let
|
|
614
|
+
var Qn = Object.defineProperty, Xn = (e, o, t) => o in e ? Qn(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, dt = (e, o, t) => (Xn(e, typeof o != "symbol" ? o + "" : o, t), t);
|
|
615
|
+
let eo = class {
|
|
616
616
|
constructor() {
|
|
617
617
|
dt(this, "current", this.detect()), dt(this, "currentId", 0);
|
|
618
618
|
}
|
|
@@ -634,9 +634,9 @@ let Xn = class {
|
|
|
634
634
|
detect() {
|
|
635
635
|
return typeof window > "u" || typeof document > "u" ? "server" : "client";
|
|
636
636
|
}
|
|
637
|
-
},
|
|
638
|
-
function
|
|
639
|
-
if (
|
|
637
|
+
}, ot = new eo();
|
|
638
|
+
function lt(e) {
|
|
639
|
+
if (ot.isServer) return null;
|
|
640
640
|
if (e instanceof Node) return e.ownerDocument;
|
|
641
641
|
if (e != null && e.hasOwnProperty("value")) {
|
|
642
642
|
let o = P(e);
|
|
@@ -645,10 +645,10 @@ function ot(e) {
|
|
|
645
645
|
return document;
|
|
646
646
|
}
|
|
647
647
|
let ft = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
|
|
648
|
-
var
|
|
649
|
-
function
|
|
648
|
+
var to = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(to || {}), no = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(no || {}), oo = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(oo || {}), kt = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(kt || {});
|
|
649
|
+
function lo(e, o = 0) {
|
|
650
650
|
var t;
|
|
651
|
-
return e === ((t =
|
|
651
|
+
return e === ((t = lt(e)) == null ? void 0 : t.body) ? !1 : le(o, { 0() {
|
|
652
652
|
return e.matches(ft);
|
|
653
653
|
}, 1() {
|
|
654
654
|
let n = e;
|
|
@@ -665,66 +665,66 @@ typeof window < "u" && typeof document < "u" && (document.addEventListener("keyd
|
|
|
665
665
|
}, !0), document.addEventListener("click", (e) => {
|
|
666
666
|
e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
667
667
|
}, !0));
|
|
668
|
-
function
|
|
668
|
+
function io(e, o = (t) => t) {
|
|
669
669
|
return e.slice().sort((t, n) => {
|
|
670
|
-
let
|
|
671
|
-
if (
|
|
672
|
-
let r =
|
|
670
|
+
let l = o(t), i = o(n);
|
|
671
|
+
if (l === null || i === null) return 0;
|
|
672
|
+
let r = l.compareDocumentPosition(i);
|
|
673
673
|
return r & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : r & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
674
674
|
});
|
|
675
675
|
}
|
|
676
|
-
function
|
|
676
|
+
function ro() {
|
|
677
677
|
return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function ao() {
|
|
680
680
|
return /Android/gi.test(window.navigator.userAgent);
|
|
681
681
|
}
|
|
682
682
|
function Mt() {
|
|
683
|
-
return
|
|
683
|
+
return ro() || ao();
|
|
684
684
|
}
|
|
685
685
|
function Ve(e, o, t) {
|
|
686
|
-
|
|
686
|
+
ot.isServer || re((n) => {
|
|
687
687
|
document.addEventListener(e, o, t), n(() => document.removeEventListener(e, o, t));
|
|
688
688
|
});
|
|
689
689
|
}
|
|
690
|
-
function
|
|
691
|
-
|
|
690
|
+
function uo(e, o, t) {
|
|
691
|
+
ot.isServer || re((n) => {
|
|
692
692
|
window.addEventListener(e, o, t), n(() => window.removeEventListener(e, o, t));
|
|
693
693
|
});
|
|
694
694
|
}
|
|
695
|
-
function
|
|
695
|
+
function co(e, o, t = S(() => !0)) {
|
|
696
696
|
function n(i, r) {
|
|
697
697
|
if (!t.value || i.defaultPrevented) return;
|
|
698
|
-
let
|
|
699
|
-
if (
|
|
700
|
-
let a = function u(
|
|
701
|
-
return typeof
|
|
698
|
+
let s = r(i);
|
|
699
|
+
if (s === null || !s.getRootNode().contains(s)) return;
|
|
700
|
+
let a = function u(f) {
|
|
701
|
+
return typeof f == "function" ? u(f()) : Array.isArray(f) || f instanceof Set ? f : [f];
|
|
702
702
|
}(e);
|
|
703
703
|
for (let u of a) {
|
|
704
704
|
if (u === null) continue;
|
|
705
|
-
let
|
|
706
|
-
if (
|
|
705
|
+
let f = u instanceof HTMLElement ? u : P(u);
|
|
706
|
+
if (f != null && f.contains(s) || i.composed && i.composedPath().includes(f)) return;
|
|
707
707
|
}
|
|
708
|
-
return !
|
|
708
|
+
return !lo(s, kt.Loose) && s.tabIndex !== -1 && i.preventDefault(), o(i, s);
|
|
709
709
|
}
|
|
710
|
-
let
|
|
710
|
+
let l = E(null);
|
|
711
711
|
Ve("pointerdown", (i) => {
|
|
712
|
-
var r,
|
|
713
|
-
t.value && (
|
|
712
|
+
var r, s;
|
|
713
|
+
t.value && (l.value = ((s = (r = i.composedPath) == null ? void 0 : r.call(i)) == null ? void 0 : s[0]) || i.target);
|
|
714
714
|
}, !0), Ve("mousedown", (i) => {
|
|
715
|
-
var r,
|
|
716
|
-
t.value && (
|
|
715
|
+
var r, s;
|
|
716
|
+
t.value && (l.value = ((s = (r = i.composedPath) == null ? void 0 : r.call(i)) == null ? void 0 : s[0]) || i.target);
|
|
717
717
|
}, !0), Ve("click", (i) => {
|
|
718
|
-
Mt() ||
|
|
719
|
-
}, !0), Ve("touchend", (i) => n(i, () => i.target instanceof HTMLElement ? i.target : null), !0),
|
|
718
|
+
Mt() || l.value && (n(i, () => l.value), l.value = null);
|
|
719
|
+
}, !0), Ve("touchend", (i) => n(i, () => i.target instanceof HTMLElement ? i.target : null), !0), uo("blur", (i) => n(i, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
|
|
720
720
|
}
|
|
721
721
|
function pt(e, o) {
|
|
722
722
|
if (e) return e;
|
|
723
723
|
let t = o ?? "button";
|
|
724
724
|
if (typeof t == "string" && t.toLowerCase() === "button") return "button";
|
|
725
725
|
}
|
|
726
|
-
function
|
|
727
|
-
let t =
|
|
726
|
+
function fo(e, o) {
|
|
727
|
+
let t = E(pt(e.value.type, e.value.as));
|
|
728
728
|
return xe(() => {
|
|
729
729
|
t.value = pt(e.value.type, e.value.as);
|
|
730
730
|
}), re(() => {
|
|
@@ -735,8 +735,8 @@ function co(e, o) {
|
|
|
735
735
|
function vt(e) {
|
|
736
736
|
return [e.screenX, e.screenY];
|
|
737
737
|
}
|
|
738
|
-
function
|
|
739
|
-
let e =
|
|
738
|
+
function po() {
|
|
739
|
+
let e = E([-1, -1]);
|
|
740
740
|
return { wasMoved(o) {
|
|
741
741
|
let t = vt(o);
|
|
742
742
|
return e.value[0] === t[0] && e.value[1] === t[1] ? !1 : (e.value = t, !0);
|
|
@@ -744,53 +744,53 @@ function fo() {
|
|
|
744
744
|
e.value = vt(o);
|
|
745
745
|
} };
|
|
746
746
|
}
|
|
747
|
-
function
|
|
747
|
+
function vo({ container: e, accept: o, walk: t, enabled: n }) {
|
|
748
748
|
re(() => {
|
|
749
|
-
let
|
|
750
|
-
if (!
|
|
751
|
-
let i =
|
|
749
|
+
let l = e.value;
|
|
750
|
+
if (!l || n !== void 0 && !n.value) return;
|
|
751
|
+
let i = lt(e);
|
|
752
752
|
if (!i) return;
|
|
753
|
-
let r = Object.assign((a) => o(a), { acceptNode: o }),
|
|
754
|
-
for (;
|
|
753
|
+
let r = Object.assign((a) => o(a), { acceptNode: o }), s = i.createTreeWalker(l, NodeFilter.SHOW_ELEMENT, r, !1);
|
|
754
|
+
for (; s.nextNode(); ) t(s.currentNode);
|
|
755
755
|
});
|
|
756
756
|
}
|
|
757
|
-
var Oe = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Oe || {}),
|
|
758
|
-
function pe({ visible: e = !0, features: o = 0, ourProps: t, theirProps: n, ...
|
|
757
|
+
var Oe = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Oe || {}), ho = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(ho || {});
|
|
758
|
+
function pe({ visible: e = !0, features: o = 0, ourProps: t, theirProps: n, ...l }) {
|
|
759
759
|
var i;
|
|
760
|
-
let r = Nt(n, t),
|
|
761
|
-
if (e || o & 2 && r.static) return
|
|
760
|
+
let r = Nt(n, t), s = Object.assign(l, { props: r });
|
|
761
|
+
if (e || o & 2 && r.static) return qe(s);
|
|
762
762
|
if (o & 1) {
|
|
763
763
|
let a = (i = r.unmount) == null || i ? 0 : 1;
|
|
764
|
-
return
|
|
764
|
+
return le(a, { 0() {
|
|
765
765
|
return null;
|
|
766
766
|
}, 1() {
|
|
767
|
-
return
|
|
767
|
+
return qe({ ...l, props: { ...r, hidden: !0, style: { display: "none" } } });
|
|
768
768
|
} });
|
|
769
769
|
}
|
|
770
|
-
return
|
|
770
|
+
return qe(s);
|
|
771
771
|
}
|
|
772
|
-
function
|
|
772
|
+
function qe({ props: e, attrs: o, slots: t, slot: n, name: l }) {
|
|
773
773
|
var i, r;
|
|
774
|
-
let { as:
|
|
774
|
+
let { as: s, ...a } = je(e, ["unmount", "static"]), u = (i = t.default) == null ? void 0 : i.call(t, n), f = {};
|
|
775
775
|
if (n) {
|
|
776
|
-
let
|
|
777
|
-
for (let [
|
|
778
|
-
|
|
776
|
+
let p = !1, m = [];
|
|
777
|
+
for (let [x, v] of Object.entries(n)) typeof v == "boolean" && (p = !0), v === !0 && m.push(x);
|
|
778
|
+
p && (f["data-headlessui-state"] = m.join(" "));
|
|
779
779
|
}
|
|
780
|
-
if (
|
|
780
|
+
if (s === "template") {
|
|
781
781
|
if (u = Rt(u ?? []), Object.keys(a).length > 0 || Object.keys(o).length > 0) {
|
|
782
|
-
let [
|
|
783
|
-
if (!
|
|
784
|
-
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((
|
|
782
|
+
let [p, ...m] = u ?? [];
|
|
783
|
+
if (!go(p) || m.length > 0) throw new Error(['Passing props on "template"!', "", `The current component <${l} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(a).concat(Object.keys(o)).map((h) => h.trim()).filter((h, V, A) => A.indexOf(h) === V).sort((h, V) => h.localeCompare(V)).map((h) => ` - ${h}`).join(`
|
|
784
|
+
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((h) => ` - ${h}`).join(`
|
|
785
785
|
`)].join(`
|
|
786
786
|
`));
|
|
787
|
-
let
|
|
788
|
-
for (let
|
|
789
|
-
return
|
|
787
|
+
let x = Nt((r = p.props) != null ? r : {}, a, f), v = Et(p, x, !0);
|
|
788
|
+
for (let h in x) h.startsWith("on") && (v.props || (v.props = {}), v.props[h] = x[h]);
|
|
789
|
+
return v;
|
|
790
790
|
}
|
|
791
791
|
return Array.isArray(u) && u.length === 1 ? u[0] : u;
|
|
792
792
|
}
|
|
793
|
-
return
|
|
793
|
+
return Ee(s, Object.assign({}, a, f), { default: () => u });
|
|
794
794
|
}
|
|
795
795
|
function Rt(e) {
|
|
796
796
|
return e.flatMap((o) => o.type === Z ? Rt(o.children) : [o]);
|
|
@@ -799,18 +799,18 @@ function Nt(...e) {
|
|
|
799
799
|
if (e.length === 0) return {};
|
|
800
800
|
if (e.length === 1) return e[0];
|
|
801
801
|
let o = {}, t = {};
|
|
802
|
-
for (let n of e) for (let
|
|
802
|
+
for (let n of e) for (let l in n) l.startsWith("on") && typeof n[l] == "function" ? (t[l] != null || (t[l] = []), t[l].push(n[l])) : o[l] = n[l];
|
|
803
803
|
if (o.disabled || o["aria-disabled"]) return Object.assign(o, Object.fromEntries(Object.keys(t).map((n) => [n, void 0])));
|
|
804
|
-
for (let n in t) Object.assign(o, { [n](
|
|
804
|
+
for (let n in t) Object.assign(o, { [n](l, ...i) {
|
|
805
805
|
let r = t[n];
|
|
806
|
-
for (let
|
|
807
|
-
if (
|
|
808
|
-
l
|
|
806
|
+
for (let s of r) {
|
|
807
|
+
if (l instanceof Event && l.defaultPrevented) return;
|
|
808
|
+
s(l, ...i);
|
|
809
809
|
}
|
|
810
810
|
} });
|
|
811
811
|
return o;
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function mo(e) {
|
|
814
814
|
let o = Object.assign({}, e);
|
|
815
815
|
for (let t in o) o[t] === void 0 && delete o[t];
|
|
816
816
|
return o;
|
|
@@ -820,58 +820,58 @@ function je(e, o = []) {
|
|
|
820
820
|
for (let n of o) n in t && delete t[n];
|
|
821
821
|
return t;
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function go(e) {
|
|
824
824
|
return e == null ? !1 : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function";
|
|
825
825
|
}
|
|
826
826
|
var At = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(At || {});
|
|
827
|
-
let
|
|
827
|
+
let bo = ae({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: o, attrs: t }) {
|
|
828
828
|
return () => {
|
|
829
829
|
var n;
|
|
830
|
-
let { features:
|
|
830
|
+
let { features: l, ...i } = e, r = { "aria-hidden": (l & 2) === 2 ? !0 : (n = i["aria-hidden"]) != null ? n : void 0, hidden: (l & 4) === 4 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(l & 4) === 4 && (l & 2) !== 2 && { display: "none" } } };
|
|
831
831
|
return pe({ ourProps: r, theirProps: i, slot: {}, attrs: t, slots: o, name: "Hidden" });
|
|
832
832
|
};
|
|
833
833
|
} }), Dt = Symbol("Context");
|
|
834
834
|
var $e = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))($e || {});
|
|
835
|
-
function
|
|
836
|
-
return
|
|
835
|
+
function Co() {
|
|
836
|
+
return Ie(Dt, null);
|
|
837
837
|
}
|
|
838
|
-
function
|
|
839
|
-
|
|
838
|
+
function _o(e) {
|
|
839
|
+
tt(Dt, e);
|
|
840
840
|
}
|
|
841
841
|
var W = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(W || {}), Ft = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(Ft || {});
|
|
842
|
-
function
|
|
842
|
+
function xo(e) {
|
|
843
843
|
function o() {
|
|
844
844
|
document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", o));
|
|
845
845
|
}
|
|
846
846
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", o), o());
|
|
847
847
|
}
|
|
848
848
|
let ce = [];
|
|
849
|
-
|
|
849
|
+
xo(() => {
|
|
850
850
|
function e(o) {
|
|
851
851
|
o.target instanceof HTMLElement && o.target !== document.body && ce[0] !== o.target && (ce.unshift(o.target), ce = ce.filter((t) => t != null && t.isConnected), ce.splice(10));
|
|
852
852
|
}
|
|
853
853
|
window.addEventListener("click", e, { capture: !0 }), window.addEventListener("mousedown", e, { capture: !0 }), window.addEventListener("focus", e, { capture: !0 }), document.body.addEventListener("click", e, { capture: !0 }), document.body.addEventListener("mousedown", e, { capture: !0 }), document.body.addEventListener("focus", e, { capture: !0 });
|
|
854
854
|
});
|
|
855
|
-
function
|
|
855
|
+
function yo(e) {
|
|
856
856
|
throw new Error("Unexpected object: " + e);
|
|
857
857
|
}
|
|
858
|
-
var
|
|
858
|
+
var z = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(z || {});
|
|
859
859
|
function ht(e, o) {
|
|
860
860
|
let t = o.resolveItems();
|
|
861
861
|
if (t.length <= 0) return null;
|
|
862
|
-
let n = o.resolveActiveIndex(),
|
|
862
|
+
let n = o.resolveActiveIndex(), l = n ?? -1;
|
|
863
863
|
switch (e.focus) {
|
|
864
864
|
case 0: {
|
|
865
865
|
for (let i = 0; i < t.length; ++i) if (!o.resolveDisabled(t[i], i, t)) return i;
|
|
866
866
|
return n;
|
|
867
867
|
}
|
|
868
868
|
case 1: {
|
|
869
|
-
|
|
870
|
-
for (let i =
|
|
869
|
+
l === -1 && (l = t.length);
|
|
870
|
+
for (let i = l - 1; i >= 0; --i) if (!o.resolveDisabled(t[i], i, t)) return i;
|
|
871
871
|
return n;
|
|
872
872
|
}
|
|
873
873
|
case 2: {
|
|
874
|
-
for (let i =
|
|
874
|
+
for (let i = l + 1; i < t.length; ++i) if (!o.resolveDisabled(t[i], i, t)) return i;
|
|
875
875
|
return n;
|
|
876
876
|
}
|
|
877
877
|
case 3: {
|
|
@@ -885,369 +885,369 @@ function ht(e, o) {
|
|
|
885
885
|
case 5:
|
|
886
886
|
return null;
|
|
887
887
|
default:
|
|
888
|
-
|
|
888
|
+
yo(e);
|
|
889
889
|
}
|
|
890
890
|
}
|
|
891
891
|
function jt(e = {}, o = null, t = []) {
|
|
892
|
-
for (let [n,
|
|
892
|
+
for (let [n, l] of Object.entries(e)) Ht(t, Bt(o, n), l);
|
|
893
893
|
return t;
|
|
894
894
|
}
|
|
895
895
|
function Bt(e, o) {
|
|
896
896
|
return e ? e + "[" + o + "]" : o;
|
|
897
897
|
}
|
|
898
898
|
function Ht(e, o, t) {
|
|
899
|
-
if (Array.isArray(t)) for (let [n,
|
|
899
|
+
if (Array.isArray(t)) for (let [n, l] of t.entries()) Ht(e, Bt(o, n.toString()), l);
|
|
900
900
|
else t instanceof Date ? e.push([o, t.toISOString()]) : typeof t == "boolean" ? e.push([o, t ? "1" : "0"]) : typeof t == "string" ? e.push([o, t]) : typeof t == "number" ? e.push([o, `${t}`]) : t == null ? e.push([o, ""]) : jt(t, o, e);
|
|
901
901
|
}
|
|
902
|
-
function
|
|
902
|
+
function wo(e, o) {
|
|
903
903
|
return e === o;
|
|
904
904
|
}
|
|
905
|
-
var
|
|
905
|
+
var So = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(So || {}), Eo = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(Eo || {}), Oo = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Focus = 1] = "Focus", e[e.Other = 2] = "Other", e))(Oo || {});
|
|
906
906
|
let zt = Symbol("ComboboxContext");
|
|
907
907
|
function ve(e) {
|
|
908
|
-
let o =
|
|
908
|
+
let o = Ie(zt, null);
|
|
909
909
|
if (o === null) {
|
|
910
910
|
let t = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
|
|
911
911
|
throw Error.captureStackTrace && Error.captureStackTrace(t, ve), t;
|
|
912
912
|
}
|
|
913
913
|
return o;
|
|
914
914
|
}
|
|
915
|
-
let Ut = Symbol("VirtualContext"),
|
|
916
|
-
let t = ve("VirtualProvider"), n =
|
|
917
|
-
let
|
|
918
|
-
if (!
|
|
919
|
-
let a = window.getComputedStyle(
|
|
915
|
+
let Ut = Symbol("VirtualContext"), $o = ae({ name: "VirtualProvider", setup(e, { slots: o }) {
|
|
916
|
+
let t = ve("VirtualProvider"), n = S(() => {
|
|
917
|
+
let s = P(t.optionsRef);
|
|
918
|
+
if (!s) return { start: 0, end: 0 };
|
|
919
|
+
let a = window.getComputedStyle(s);
|
|
920
920
|
return { start: parseFloat(a.paddingBlockStart || a.paddingTop), end: parseFloat(a.paddingBlockEnd || a.paddingBottom) };
|
|
921
|
-
}),
|
|
921
|
+
}), l = Zn(S(() => ({ scrollPaddingStart: n.value.start, scrollPaddingEnd: n.value.end, count: t.virtual.value.options.length, estimateSize() {
|
|
922
922
|
return 40;
|
|
923
923
|
}, getScrollElement() {
|
|
924
924
|
return P(t.optionsRef);
|
|
925
|
-
}, overscan: 12 }))), i =
|
|
926
|
-
var
|
|
927
|
-
return (
|
|
928
|
-
}), r =
|
|
929
|
-
return
|
|
925
|
+
}, overscan: 12 }))), i = S(() => {
|
|
926
|
+
var s;
|
|
927
|
+
return (s = t.virtual.value) == null ? void 0 : s.options;
|
|
928
|
+
}), r = E(0);
|
|
929
|
+
return j([i], () => {
|
|
930
930
|
r.value += 1;
|
|
931
|
-
}),
|
|
932
|
-
if (
|
|
931
|
+
}), tt(Ut, t.virtual.value ? l : null), () => [Ee("div", { style: { position: "relative", width: "100%", height: `${l.value.getTotalSize()}px` }, ref: (s) => {
|
|
932
|
+
if (s) {
|
|
933
933
|
if (typeof process < "u" && process.env.JEST_WORKER_ID !== void 0 || t.activationTrigger.value === 0) return;
|
|
934
|
-
t.activeOptionIndex.value !== null && t.virtual.value.options.length > t.activeOptionIndex.value &&
|
|
934
|
+
t.activeOptionIndex.value !== null && t.virtual.value.options.length > t.activeOptionIndex.value && l.value.scrollToIndex(t.activeOptionIndex.value);
|
|
935
935
|
}
|
|
936
|
-
} },
|
|
937
|
-
} }),
|
|
938
|
-
let
|
|
939
|
-
function
|
|
940
|
-
let d =
|
|
941
|
-
return
|
|
942
|
-
}
|
|
943
|
-
let
|
|
936
|
+
} }, l.value.getVirtualItems().map((s) => Et(o.default({ option: t.virtual.value.options[s.index], open: t.comboboxState.value === 0 })[0], { key: `${r.value}-${s.index}`, "data-index": s.index, "aria-setsize": t.virtual.value.options.length, "aria-posinset": s.index + 1, style: { position: "absolute", top: 0, left: 0, transform: `translateY(${s.start}px)`, overflowAnchor: "none" } })))];
|
|
937
|
+
} }), To = ae({ name: "Combobox", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: !1 }, by: { type: [String, Function], nullable: !0, default: null }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, nullable: { type: Boolean, default: !1 }, multiple: { type: [Boolean], default: !1 }, immediate: { type: [Boolean], default: !1 }, virtual: { type: Object, default: null } }, inheritAttrs: !1, setup(e, { slots: o, attrs: t, emit: n }) {
|
|
938
|
+
let l = E(1), i = E(null), r = E(null), s = E(null), a = E(null), u = E({ static: !1, hold: !1 }), f = E([]), p = E(null), m = E(2), x = E(!1);
|
|
939
|
+
function v(c = (d) => d) {
|
|
940
|
+
let d = p.value !== null ? f.value[p.value] : null, y = c(f.value.slice()), O = y.length > 0 && y[0].dataRef.order.value !== null ? y.sort((N, G) => N.dataRef.order.value - G.dataRef.order.value) : io(y, (N) => P(N.dataRef.domRef)), k = d ? O.indexOf(d) : null;
|
|
941
|
+
return k === -1 && (k = null), { options: O, activeOptionIndex: k };
|
|
942
|
+
}
|
|
943
|
+
let h = S(() => e.multiple ? 1 : 0), V = S(() => e.nullable), [A, T] = Wn(S(() => e.modelValue), (c) => n("update:modelValue", c), S(() => e.defaultValue)), R = S(() => A.value === void 0 ? le(h.value, { 1: [], 0: void 0 }) : A.value), D = null, _ = null;
|
|
944
944
|
function L(c) {
|
|
945
|
-
return
|
|
946
|
-
return
|
|
945
|
+
return le(h.value, { 0() {
|
|
946
|
+
return T == null ? void 0 : T(c);
|
|
947
947
|
}, 1: () => {
|
|
948
|
-
let d = K(g.value.value).slice(),
|
|
949
|
-
return
|
|
948
|
+
let d = K(g.value.value).slice(), y = K(c), O = d.findIndex((k) => g.compare(y, K(k)));
|
|
949
|
+
return O === -1 ? d.push(y) : d.splice(O, 1), T == null ? void 0 : T(d);
|
|
950
950
|
} });
|
|
951
951
|
}
|
|
952
|
-
let b =
|
|
952
|
+
let b = S(() => {
|
|
953
953
|
});
|
|
954
|
-
|
|
955
|
-
if (g.virtual.value && c && d &&
|
|
956
|
-
let
|
|
957
|
-
|
|
954
|
+
j([b], ([c], [d]) => {
|
|
955
|
+
if (g.virtual.value && c && d && p.value !== null) {
|
|
956
|
+
let y = c.indexOf(d[p.value]);
|
|
957
|
+
y !== -1 ? p.value = y : p.value = null;
|
|
958
958
|
}
|
|
959
959
|
});
|
|
960
|
-
let g = { comboboxState:
|
|
960
|
+
let g = { comboboxState: l, value: R, mode: h, compare(c, d) {
|
|
961
961
|
if (typeof e.by == "string") {
|
|
962
|
-
let
|
|
963
|
-
return (c == null ? void 0 : c[
|
|
962
|
+
let y = e.by;
|
|
963
|
+
return (c == null ? void 0 : c[y]) === (d == null ? void 0 : d[y]);
|
|
964
964
|
}
|
|
965
|
-
return e.by === null ?
|
|
965
|
+
return e.by === null ? wo(c, d) : e.by(c, d);
|
|
966
966
|
}, calculateIndex(c) {
|
|
967
|
-
return g.virtual.value ? e.by === null ? g.virtual.value.options.indexOf(c) : g.virtual.value.options.findIndex((d) => g.compare(d, c)) :
|
|
968
|
-
}, defaultValue:
|
|
969
|
-
|
|
970
|
-
}, activeOptionIndex:
|
|
971
|
-
if (
|
|
967
|
+
return g.virtual.value ? e.by === null ? g.virtual.value.options.indexOf(c) : g.virtual.value.options.findIndex((d) => g.compare(d, c)) : f.value.findIndex((d) => g.compare(d.dataRef.value, c));
|
|
968
|
+
}, defaultValue: S(() => e.defaultValue), nullable: V, immediate: S(() => !1), virtual: S(() => null), inputRef: r, labelRef: i, buttonRef: s, optionsRef: a, disabled: S(() => e.disabled), options: f, change(c) {
|
|
969
|
+
T(c);
|
|
970
|
+
}, activeOptionIndex: S(() => {
|
|
971
|
+
if (x.value && p.value === null && (g.virtual.value ? g.virtual.value.options.length > 0 : f.value.length > 0)) {
|
|
972
972
|
if (g.virtual.value) {
|
|
973
|
-
let d = g.virtual.value.options.findIndex((
|
|
974
|
-
var
|
|
975
|
-
return !((
|
|
973
|
+
let d = g.virtual.value.options.findIndex((y) => {
|
|
974
|
+
var O;
|
|
975
|
+
return !((O = g.virtual.value) != null && O.disabled(y));
|
|
976
976
|
});
|
|
977
977
|
if (d !== -1) return d;
|
|
978
978
|
}
|
|
979
|
-
let c =
|
|
979
|
+
let c = f.value.findIndex((d) => !d.dataRef.disabled);
|
|
980
980
|
if (c !== -1) return c;
|
|
981
981
|
}
|
|
982
|
-
return
|
|
983
|
-
}), activationTrigger:
|
|
984
|
-
|
|
982
|
+
return p.value;
|
|
983
|
+
}), activationTrigger: m, optionsPropsRef: u, closeCombobox() {
|
|
984
|
+
x.value = !1, !e.disabled && l.value !== 1 && (l.value = 1, p.value = null);
|
|
985
985
|
}, openCombobox() {
|
|
986
|
-
if (
|
|
986
|
+
if (x.value = !0, !e.disabled && l.value !== 0) {
|
|
987
987
|
if (g.value.value) {
|
|
988
988
|
let c = g.calculateIndex(g.value.value);
|
|
989
|
-
c !== -1 && (
|
|
989
|
+
c !== -1 && (p.value = c);
|
|
990
990
|
}
|
|
991
|
-
|
|
991
|
+
l.value = 0;
|
|
992
992
|
}
|
|
993
993
|
}, setActivationTrigger(c) {
|
|
994
|
-
|
|
995
|
-
}, goToOption(c, d,
|
|
996
|
-
|
|
997
|
-
if (e.disabled || a.value && !u.value.static &&
|
|
994
|
+
m.value = c;
|
|
995
|
+
}, goToOption(c, d, y) {
|
|
996
|
+
x.value = !1, D !== null && cancelAnimationFrame(D), D = requestAnimationFrame(() => {
|
|
997
|
+
if (e.disabled || a.value && !u.value.static && l.value === 1) return;
|
|
998
998
|
if (g.virtual.value) {
|
|
999
|
-
|
|
1000
|
-
var
|
|
1001
|
-
return (G = (
|
|
1002
|
-
var
|
|
1003
|
-
return !((
|
|
999
|
+
p.value = c === z.Specific ? d : ht({ focus: c }, { resolveItems: () => g.virtual.value.options, resolveActiveIndex: () => {
|
|
1000
|
+
var N, G;
|
|
1001
|
+
return (G = (N = g.activeOptionIndex.value) != null ? N : g.virtual.value.options.findIndex((q) => {
|
|
1002
|
+
var B;
|
|
1003
|
+
return !((B = g.virtual.value) != null && B.disabled(q));
|
|
1004
1004
|
})) != null ? G : null;
|
|
1005
|
-
}, resolveDisabled: (
|
|
1005
|
+
}, resolveDisabled: (N) => g.virtual.value.disabled(N), resolveId() {
|
|
1006
1006
|
throw new Error("Function not implemented.");
|
|
1007
|
-
} }),
|
|
1007
|
+
} }), m.value = y ?? 2;
|
|
1008
1008
|
return;
|
|
1009
1009
|
}
|
|
1010
|
-
let
|
|
1011
|
-
if (
|
|
1012
|
-
let
|
|
1013
|
-
|
|
1010
|
+
let O = v();
|
|
1011
|
+
if (O.activeOptionIndex === null) {
|
|
1012
|
+
let N = O.options.findIndex((G) => !G.dataRef.disabled);
|
|
1013
|
+
N !== -1 && (O.activeOptionIndex = N);
|
|
1014
1014
|
}
|
|
1015
|
-
let
|
|
1016
|
-
|
|
1015
|
+
let k = c === z.Specific ? d : ht({ focus: c }, { resolveItems: () => O.options, resolveActiveIndex: () => O.activeOptionIndex, resolveId: (N) => N.id, resolveDisabled: (N) => N.dataRef.disabled });
|
|
1016
|
+
p.value = k, m.value = y ?? 2, f.value = O.options;
|
|
1017
1017
|
});
|
|
1018
1018
|
}, selectOption(c) {
|
|
1019
|
-
let d =
|
|
1019
|
+
let d = f.value.find((O) => O.id === c);
|
|
1020
1020
|
if (!d) return;
|
|
1021
|
-
let { dataRef:
|
|
1022
|
-
L(
|
|
1021
|
+
let { dataRef: y } = d;
|
|
1022
|
+
L(y.value);
|
|
1023
1023
|
}, selectActiveOption() {
|
|
1024
1024
|
if (g.activeOptionIndex.value !== null) {
|
|
1025
1025
|
if (g.virtual.value) L(g.virtual.value.options[g.activeOptionIndex.value]);
|
|
1026
1026
|
else {
|
|
1027
|
-
let { dataRef: c } =
|
|
1027
|
+
let { dataRef: c } = f.value[g.activeOptionIndex.value];
|
|
1028
1028
|
L(c.value);
|
|
1029
1029
|
}
|
|
1030
|
-
g.goToOption(
|
|
1030
|
+
g.goToOption(z.Specific, g.activeOptionIndex.value);
|
|
1031
1031
|
}
|
|
1032
1032
|
}, registerOption(c, d) {
|
|
1033
|
-
let
|
|
1033
|
+
let y = Ot({ id: c, dataRef: d });
|
|
1034
1034
|
if (g.virtual.value) {
|
|
1035
|
-
|
|
1035
|
+
f.value.push(y);
|
|
1036
1036
|
return;
|
|
1037
1037
|
}
|
|
1038
1038
|
_ && cancelAnimationFrame(_);
|
|
1039
|
-
let
|
|
1040
|
-
|
|
1041
|
-
let
|
|
1042
|
-
|
|
1039
|
+
let O = v((k) => (k.push(y), k));
|
|
1040
|
+
p.value === null && g.isSelected(d.value.value) && (O.activeOptionIndex = O.options.indexOf(y)), f.value = O.options, p.value = O.activeOptionIndex, m.value = 2, O.options.some((k) => !P(k.dataRef.domRef)) && (_ = requestAnimationFrame(() => {
|
|
1041
|
+
let k = v();
|
|
1042
|
+
f.value = k.options, p.value = k.activeOptionIndex;
|
|
1043
1043
|
}));
|
|
1044
1044
|
}, unregisterOption(c, d) {
|
|
1045
|
-
if (D !== null && cancelAnimationFrame(D), d && (
|
|
1046
|
-
|
|
1045
|
+
if (D !== null && cancelAnimationFrame(D), d && (x.value = !0), g.virtual.value) {
|
|
1046
|
+
f.value = f.value.filter((O) => O.id !== c);
|
|
1047
1047
|
return;
|
|
1048
1048
|
}
|
|
1049
|
-
let
|
|
1050
|
-
let
|
|
1051
|
-
return
|
|
1049
|
+
let y = v((O) => {
|
|
1050
|
+
let k = O.findIndex((N) => N.id === c);
|
|
1051
|
+
return k !== -1 && O.splice(k, 1), O;
|
|
1052
1052
|
});
|
|
1053
|
-
|
|
1053
|
+
f.value = y.options, p.value = y.activeOptionIndex, m.value = 2;
|
|
1054
1054
|
}, isSelected(c) {
|
|
1055
|
-
return
|
|
1055
|
+
return le(h.value, { 0: () => g.compare(K(g.value.value), K(c)), 1: () => K(g.value.value).some((d) => g.compare(K(d), K(c))) });
|
|
1056
1056
|
}, isActive(c) {
|
|
1057
|
-
return
|
|
1057
|
+
return p.value === g.calculateIndex(c);
|
|
1058
1058
|
} };
|
|
1059
|
-
|
|
1060
|
-
let
|
|
1059
|
+
co([r, s, a], () => g.closeCombobox(), S(() => l.value === 0)), tt(zt, g), _o(S(() => le(l.value, { 0: $e.Open, 1: $e.Closed })));
|
|
1060
|
+
let I = S(() => {
|
|
1061
1061
|
var c;
|
|
1062
1062
|
return (c = P(r)) == null ? void 0 : c.closest("form");
|
|
1063
1063
|
});
|
|
1064
1064
|
return xe(() => {
|
|
1065
|
-
|
|
1066
|
-
if (!
|
|
1065
|
+
j([I], () => {
|
|
1066
|
+
if (!I.value || e.defaultValue === void 0) return;
|
|
1067
1067
|
function c() {
|
|
1068
1068
|
g.change(e.defaultValue);
|
|
1069
1069
|
}
|
|
1070
|
-
return
|
|
1070
|
+
return I.value.addEventListener("reset", c), () => {
|
|
1071
1071
|
var d;
|
|
1072
|
-
(d =
|
|
1072
|
+
(d = I.value) == null || d.removeEventListener("reset", c);
|
|
1073
1073
|
};
|
|
1074
1074
|
}, { immediate: !0 });
|
|
1075
1075
|
}), () => {
|
|
1076
|
-
var c, d,
|
|
1077
|
-
let { name:
|
|
1078
|
-
return
|
|
1076
|
+
var c, d, y;
|
|
1077
|
+
let { name: O, disabled: k, form: N, ...G } = e, q = { open: l.value === 0, disabled: k, activeIndex: g.activeOptionIndex.value, activeOption: g.activeOptionIndex.value === null ? null : g.virtual.value ? g.virtual.value.options[(c = g.activeOptionIndex.value) != null ? c : 0] : (y = (d = g.options.value[g.activeOptionIndex.value]) == null ? void 0 : d.dataRef.value) != null ? y : null, value: R.value };
|
|
1078
|
+
return Ee(Z, [...O != null && R.value != null ? jt({ [O]: R.value }).map(([B, dn]) => Ee(bo, mo({ features: At.Hidden, key: B, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: N, disabled: k, name: B, value: dn }))) : [], pe({ theirProps: { ...t, ...je(G, ["by", "defaultValue", "immediate", "modelValue", "multiple", "nullable", "onUpdate:modelValue", "virtual"]) }, ourProps: {}, slot: q, slots: o, attrs: t, name: "Combobox" })]);
|
|
1079
1079
|
};
|
|
1080
1080
|
} });
|
|
1081
1081
|
ae({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t }) {
|
|
1082
1082
|
var n;
|
|
1083
|
-
let
|
|
1083
|
+
let l = (n = e.id) != null ? n : `headlessui-combobox-label-${Le()}`, i = ve("ComboboxLabel");
|
|
1084
1084
|
function r() {
|
|
1085
|
-
var
|
|
1086
|
-
(
|
|
1085
|
+
var s;
|
|
1086
|
+
(s = P(i.inputRef)) == null || s.focus({ preventScroll: !0 });
|
|
1087
1087
|
}
|
|
1088
1088
|
return () => {
|
|
1089
|
-
let
|
|
1090
|
-
return pe({ ourProps: u, theirProps: a, slot:
|
|
1089
|
+
let s = { open: i.comboboxState.value === 0, disabled: i.disabled.value }, { ...a } = e, u = { id: l, ref: i.labelRef, onClick: r };
|
|
1090
|
+
return pe({ ourProps: u, theirProps: a, slot: s, attrs: o, slots: t, name: "ComboboxLabel" });
|
|
1091
1091
|
};
|
|
1092
1092
|
} });
|
|
1093
1093
|
let Io = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t, expose: n }) {
|
|
1094
|
-
var
|
|
1095
|
-
let i = (
|
|
1094
|
+
var l;
|
|
1095
|
+
let i = (l = e.id) != null ? l : `headlessui-combobox-button-${Le()}`, r = ve("ComboboxButton");
|
|
1096
1096
|
n({ el: r.buttonRef, $el: r.buttonRef });
|
|
1097
|
-
function
|
|
1098
|
-
r.disabled.value || (r.comboboxState.value === 0 ? r.closeCombobox() : (
|
|
1099
|
-
var
|
|
1100
|
-
return (
|
|
1097
|
+
function s(f) {
|
|
1098
|
+
r.disabled.value || (r.comboboxState.value === 0 ? r.closeCombobox() : (f.preventDefault(), r.openCombobox()), Q(() => {
|
|
1099
|
+
var p;
|
|
1100
|
+
return (p = P(r.inputRef)) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1101
1101
|
}));
|
|
1102
1102
|
}
|
|
1103
|
-
function a(
|
|
1104
|
-
switch (
|
|
1103
|
+
function a(f) {
|
|
1104
|
+
switch (f.key) {
|
|
1105
1105
|
case W.ArrowDown:
|
|
1106
|
-
|
|
1107
|
-
var
|
|
1108
|
-
return (
|
|
1106
|
+
f.preventDefault(), f.stopPropagation(), r.comboboxState.value === 1 && r.openCombobox(), Q(() => {
|
|
1107
|
+
var p;
|
|
1108
|
+
return (p = r.inputRef.value) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1109
1109
|
});
|
|
1110
1110
|
return;
|
|
1111
1111
|
case W.ArrowUp:
|
|
1112
|
-
|
|
1113
|
-
r.value.value || r.goToOption(
|
|
1112
|
+
f.preventDefault(), f.stopPropagation(), r.comboboxState.value === 1 && (r.openCombobox(), Q(() => {
|
|
1113
|
+
r.value.value || r.goToOption(z.Last);
|
|
1114
1114
|
})), Q(() => {
|
|
1115
|
-
var
|
|
1116
|
-
return (
|
|
1115
|
+
var p;
|
|
1116
|
+
return (p = r.inputRef.value) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1117
1117
|
});
|
|
1118
1118
|
return;
|
|
1119
1119
|
case W.Escape:
|
|
1120
1120
|
if (r.comboboxState.value !== 0) return;
|
|
1121
|
-
|
|
1122
|
-
var
|
|
1123
|
-
return (
|
|
1121
|
+
f.preventDefault(), r.optionsRef.value && !r.optionsPropsRef.value.static && f.stopPropagation(), r.closeCombobox(), Q(() => {
|
|
1122
|
+
var p;
|
|
1123
|
+
return (p = r.inputRef.value) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1124
1124
|
});
|
|
1125
1125
|
return;
|
|
1126
1126
|
}
|
|
1127
1127
|
}
|
|
1128
|
-
let u =
|
|
1128
|
+
let u = fo(S(() => ({ as: e.as, type: o.type })), r.buttonRef);
|
|
1129
1129
|
return () => {
|
|
1130
|
-
var
|
|
1131
|
-
let
|
|
1132
|
-
return pe({ ourProps:
|
|
1130
|
+
var f, p;
|
|
1131
|
+
let m = { open: r.comboboxState.value === 0, disabled: r.disabled.value, value: r.value.value }, { ...x } = e, v = { ref: r.buttonRef, id: i, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (f = P(r.optionsRef)) == null ? void 0 : f.id, "aria-expanded": r.comboboxState.value === 0, "aria-labelledby": r.labelRef.value ? [(p = P(r.labelRef)) == null ? void 0 : p.id, i].join(" ") : void 0, disabled: r.disabled.value === !0 ? !0 : void 0, onKeydown: a, onClick: s };
|
|
1132
|
+
return pe({ ourProps: v, theirProps: x, slot: m, attrs: o, slots: t, name: "ComboboxButton" });
|
|
1133
1133
|
};
|
|
1134
|
-
} }),
|
|
1134
|
+
} }), Lo = ae({ name: "ComboboxInput", props: { as: { type: [Object, String], default: "input" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, displayValue: { type: Function }, defaultValue: { type: String, default: void 0 }, id: { type: String, default: null } }, emits: { change: (e) => !0 }, setup(e, { emit: o, attrs: t, slots: n, expose: l }) {
|
|
1135
1135
|
var i;
|
|
1136
|
-
let r = (i = e.id) != null ? i : `headlessui-combobox-input-${Le()}`,
|
|
1137
|
-
|
|
1138
|
-
function
|
|
1139
|
-
|
|
1140
|
-
let _ = P(
|
|
1141
|
-
_ && (_.scrollTop = 0),
|
|
1142
|
-
}
|
|
1143
|
-
let
|
|
1136
|
+
let r = (i = e.id) != null ? i : `headlessui-combobox-input-${Le()}`, s = ve("ComboboxInput"), a = S(() => lt(P(s.inputRef))), u = { value: !1 };
|
|
1137
|
+
l({ el: s.inputRef, $el: s.inputRef });
|
|
1138
|
+
function f() {
|
|
1139
|
+
s.change(null);
|
|
1140
|
+
let _ = P(s.optionsRef);
|
|
1141
|
+
_ && (_.scrollTop = 0), s.goToOption(z.Nothing);
|
|
1142
|
+
}
|
|
1143
|
+
let p = S(() => {
|
|
1144
1144
|
var _;
|
|
1145
|
-
let L =
|
|
1146
|
-
return P(
|
|
1145
|
+
let L = s.value.value;
|
|
1146
|
+
return P(s.inputRef) ? typeof e.displayValue < "u" && L !== void 0 ? (_ = e.displayValue(L)) != null ? _ : "" : typeof L == "string" ? L : "" : "";
|
|
1147
1147
|
});
|
|
1148
1148
|
xe(() => {
|
|
1149
|
-
|
|
1149
|
+
j([p, s.comboboxState, a], ([_, L], [b, g]) => {
|
|
1150
1150
|
if (u.value) return;
|
|
1151
|
-
let
|
|
1152
|
-
|
|
1151
|
+
let I = P(s.inputRef);
|
|
1152
|
+
I && ((g === 0 && L === 1 || _ !== b) && (I.value = _), requestAnimationFrame(() => {
|
|
1153
1153
|
var c;
|
|
1154
|
-
if (u.value || !
|
|
1155
|
-
let { selectionStart: d, selectionEnd:
|
|
1156
|
-
Math.abs((
|
|
1154
|
+
if (u.value || !I || ((c = a.value) == null ? void 0 : c.activeElement) !== I) return;
|
|
1155
|
+
let { selectionStart: d, selectionEnd: y } = I;
|
|
1156
|
+
Math.abs((y ?? 0) - (d ?? 0)) === 0 && d === 0 && I.setSelectionRange(I.value.length, I.value.length);
|
|
1157
1157
|
}));
|
|
1158
|
-
}, { immediate: !0 }),
|
|
1158
|
+
}, { immediate: !0 }), j([s.comboboxState], ([_], [L]) => {
|
|
1159
1159
|
if (_ === 0 && L === 1) {
|
|
1160
1160
|
if (u.value) return;
|
|
1161
|
-
let b = P(
|
|
1161
|
+
let b = P(s.inputRef);
|
|
1162
1162
|
if (!b) return;
|
|
1163
|
-
let g = b.value, { selectionStart:
|
|
1164
|
-
b.value = "", b.value = g, d !== null ? b.setSelectionRange(
|
|
1163
|
+
let g = b.value, { selectionStart: I, selectionEnd: c, selectionDirection: d } = b;
|
|
1164
|
+
b.value = "", b.value = g, d !== null ? b.setSelectionRange(I, c, d) : b.setSelectionRange(I, c);
|
|
1165
1165
|
}
|
|
1166
1166
|
});
|
|
1167
1167
|
});
|
|
1168
|
-
let
|
|
1169
|
-
function
|
|
1170
|
-
|
|
1168
|
+
let m = E(!1);
|
|
1169
|
+
function x() {
|
|
1170
|
+
m.value = !0;
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1172
|
+
function v() {
|
|
1173
1173
|
Ae().nextFrame(() => {
|
|
1174
|
-
|
|
1174
|
+
m.value = !1;
|
|
1175
1175
|
});
|
|
1176
1176
|
}
|
|
1177
|
-
let
|
|
1178
|
-
function
|
|
1179
|
-
switch (u.value = !0,
|
|
1177
|
+
let h = Jn();
|
|
1178
|
+
function V(_) {
|
|
1179
|
+
switch (u.value = !0, h(() => {
|
|
1180
1180
|
u.value = !1;
|
|
1181
1181
|
}), _.key) {
|
|
1182
1182
|
case W.Enter:
|
|
1183
|
-
if (u.value = !1,
|
|
1184
|
-
if (_.preventDefault(), _.stopPropagation(),
|
|
1185
|
-
|
|
1183
|
+
if (u.value = !1, s.comboboxState.value !== 0 || m.value) return;
|
|
1184
|
+
if (_.preventDefault(), _.stopPropagation(), s.activeOptionIndex.value === null) {
|
|
1185
|
+
s.closeCombobox();
|
|
1186
1186
|
return;
|
|
1187
1187
|
}
|
|
1188
|
-
|
|
1188
|
+
s.selectActiveOption(), s.mode.value === 0 && s.closeCombobox();
|
|
1189
1189
|
break;
|
|
1190
1190
|
case W.ArrowDown:
|
|
1191
|
-
return u.value = !1, _.preventDefault(), _.stopPropagation(),
|
|
1191
|
+
return u.value = !1, _.preventDefault(), _.stopPropagation(), le(s.comboboxState.value, { 0: () => s.goToOption(z.Next), 1: () => s.openCombobox() });
|
|
1192
1192
|
case W.ArrowUp:
|
|
1193
|
-
return u.value = !1, _.preventDefault(), _.stopPropagation(),
|
|
1194
|
-
|
|
1195
|
-
|
|
1193
|
+
return u.value = !1, _.preventDefault(), _.stopPropagation(), le(s.comboboxState.value, { 0: () => s.goToOption(z.Previous), 1: () => {
|
|
1194
|
+
s.openCombobox(), Q(() => {
|
|
1195
|
+
s.value.value || s.goToOption(z.Last);
|
|
1196
1196
|
});
|
|
1197
1197
|
} });
|
|
1198
1198
|
case W.Home:
|
|
1199
1199
|
if (_.shiftKey) break;
|
|
1200
|
-
return u.value = !1, _.preventDefault(), _.stopPropagation(),
|
|
1200
|
+
return u.value = !1, _.preventDefault(), _.stopPropagation(), s.goToOption(z.First);
|
|
1201
1201
|
case W.PageUp:
|
|
1202
|
-
return u.value = !1, _.preventDefault(), _.stopPropagation(),
|
|
1202
|
+
return u.value = !1, _.preventDefault(), _.stopPropagation(), s.goToOption(z.First);
|
|
1203
1203
|
case W.End:
|
|
1204
1204
|
if (_.shiftKey) break;
|
|
1205
|
-
return u.value = !1, _.preventDefault(), _.stopPropagation(),
|
|
1205
|
+
return u.value = !1, _.preventDefault(), _.stopPropagation(), s.goToOption(z.Last);
|
|
1206
1206
|
case W.PageDown:
|
|
1207
|
-
return u.value = !1, _.preventDefault(), _.stopPropagation(),
|
|
1207
|
+
return u.value = !1, _.preventDefault(), _.stopPropagation(), s.goToOption(z.Last);
|
|
1208
1208
|
case W.Escape:
|
|
1209
|
-
if (u.value = !1,
|
|
1210
|
-
_.preventDefault(),
|
|
1209
|
+
if (u.value = !1, s.comboboxState.value !== 0) return;
|
|
1210
|
+
_.preventDefault(), s.optionsRef.value && !s.optionsPropsRef.value.static && _.stopPropagation(), s.nullable.value && s.mode.value === 0 && s.value.value === null && f(), s.closeCombobox();
|
|
1211
1211
|
break;
|
|
1212
1212
|
case W.Tab:
|
|
1213
|
-
if (u.value = !1,
|
|
1214
|
-
|
|
1213
|
+
if (u.value = !1, s.comboboxState.value !== 0) return;
|
|
1214
|
+
s.mode.value === 0 && s.activationTrigger.value !== 1 && s.selectActiveOption(), s.closeCombobox();
|
|
1215
1215
|
break;
|
|
1216
1216
|
}
|
|
1217
1217
|
}
|
|
1218
|
-
function
|
|
1219
|
-
o("change", _),
|
|
1218
|
+
function A(_) {
|
|
1219
|
+
o("change", _), s.nullable.value && s.mode.value === 0 && _.target.value === "" && f(), s.openCombobox();
|
|
1220
1220
|
}
|
|
1221
|
-
function
|
|
1221
|
+
function T(_) {
|
|
1222
1222
|
var L, b, g;
|
|
1223
|
-
let
|
|
1224
|
-
if (u.value = !1, !((b = P(
|
|
1223
|
+
let I = (L = _.relatedTarget) != null ? L : ce.find((c) => c !== _.currentTarget);
|
|
1224
|
+
if (u.value = !1, !((b = P(s.optionsRef)) != null && b.contains(I)) && !((g = P(s.buttonRef)) != null && g.contains(I)) && s.comboboxState.value === 0) return _.preventDefault(), s.mode.value === 0 && (s.nullable.value && s.value.value === null ? f() : s.activationTrigger.value !== 1 && s.selectActiveOption()), s.closeCombobox();
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1226
|
+
function R(_) {
|
|
1227
1227
|
var L, b, g;
|
|
1228
|
-
let
|
|
1229
|
-
(b = P(
|
|
1230
|
-
|
|
1228
|
+
let I = (L = _.relatedTarget) != null ? L : ce.find((c) => c !== _.currentTarget);
|
|
1229
|
+
(b = P(s.buttonRef)) != null && b.contains(I) || (g = P(s.optionsRef)) != null && g.contains(I) || s.disabled.value || s.immediate.value && s.comboboxState.value !== 0 && (s.openCombobox(), Ae().nextFrame(() => {
|
|
1230
|
+
s.setActivationTrigger(1);
|
|
1231
1231
|
}));
|
|
1232
1232
|
}
|
|
1233
|
-
let D =
|
|
1233
|
+
let D = S(() => {
|
|
1234
1234
|
var _, L, b, g;
|
|
1235
|
-
return (g = (b = (L = e.defaultValue) != null ? L :
|
|
1235
|
+
return (g = (b = (L = e.defaultValue) != null ? L : s.defaultValue.value !== void 0 ? (_ = e.displayValue) == null ? void 0 : _.call(e, s.defaultValue.value) : null) != null ? b : s.defaultValue.value) != null ? g : "";
|
|
1236
1236
|
});
|
|
1237
1237
|
return () => {
|
|
1238
|
-
var _, L, b, g,
|
|
1239
|
-
let
|
|
1240
|
-
return pe({ ourProps: G, theirProps:
|
|
1238
|
+
var _, L, b, g, I, c, d;
|
|
1239
|
+
let y = { open: s.comboboxState.value === 0 }, { displayValue: O, onChange: k, ...N } = e, G = { "aria-controls": (_ = s.optionsRef.value) == null ? void 0 : _.id, "aria-expanded": s.comboboxState.value === 0, "aria-activedescendant": s.activeOptionIndex.value === null ? void 0 : s.virtual.value ? (L = s.options.value.find((q) => !s.virtual.value.disabled(q.dataRef.value) && s.compare(q.dataRef.value, s.virtual.value.options[s.activeOptionIndex.value]))) == null ? void 0 : L.id : (b = s.options.value[s.activeOptionIndex.value]) == null ? void 0 : b.id, "aria-labelledby": (c = (g = P(s.labelRef)) == null ? void 0 : g.id) != null ? c : (I = P(s.buttonRef)) == null ? void 0 : I.id, "aria-autocomplete": "list", id: r, onCompositionstart: x, onCompositionend: v, onKeydown: V, onInput: A, onFocus: R, onBlur: T, role: "combobox", type: (d = t.type) != null ? d : "text", tabIndex: 0, ref: s.inputRef, defaultValue: D.value, disabled: s.disabled.value === !0 ? !0 : void 0 };
|
|
1240
|
+
return pe({ ourProps: G, theirProps: N, slot: y, attrs: t, slots: n, features: Oe.RenderStrategy | Oe.Static, name: "ComboboxInput" });
|
|
1241
1241
|
};
|
|
1242
|
-
} }),
|
|
1243
|
-
let
|
|
1244
|
-
n({ el:
|
|
1245
|
-
|
|
1242
|
+
} }), Po = ae({ name: "ComboboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, hold: { type: [Boolean], default: !1 } }, setup(e, { attrs: o, slots: t, expose: n }) {
|
|
1243
|
+
let l = ve("ComboboxOptions"), i = `headlessui-combobox-options-${Le()}`;
|
|
1244
|
+
n({ el: l.optionsRef, $el: l.optionsRef }), re(() => {
|
|
1245
|
+
l.optionsPropsRef.value.static = e.static;
|
|
1246
1246
|
}), re(() => {
|
|
1247
|
-
|
|
1247
|
+
l.optionsPropsRef.value.hold = e.hold;
|
|
1248
1248
|
});
|
|
1249
|
-
let r =
|
|
1250
|
-
|
|
1249
|
+
let r = Co(), s = S(() => r !== null ? (r.value & $e.Open) === $e.Open : l.comboboxState.value === 0);
|
|
1250
|
+
vo({ container: S(() => P(l.optionsRef)), enabled: S(() => l.comboboxState.value === 0), accept(u) {
|
|
1251
1251
|
return u.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : u.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
1252
1252
|
}, walk(u) {
|
|
1253
1253
|
u.setAttribute("role", "none");
|
|
@@ -1256,59 +1256,59 @@ let Io = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1256
1256
|
u.preventDefault();
|
|
1257
1257
|
}
|
|
1258
1258
|
return () => {
|
|
1259
|
-
var u,
|
|
1260
|
-
let
|
|
1261
|
-
return pe({ ourProps:
|
|
1259
|
+
var u, f, p;
|
|
1260
|
+
let m = { open: l.comboboxState.value === 0 }, x = { "aria-labelledby": (p = (u = P(l.labelRef)) == null ? void 0 : u.id) != null ? p : (f = P(l.buttonRef)) == null ? void 0 : f.id, id: i, ref: l.optionsRef, role: "listbox", "aria-multiselectable": l.mode.value === 1 ? !0 : void 0, onMousedown: a }, v = je(e, ["hold"]);
|
|
1261
|
+
return pe({ ourProps: x, theirProps: v, slot: m, attrs: o, slots: l.virtual.value && l.comboboxState.value === 0 ? { ...t, default: () => [Ee($o, {}, t.default)] } : t, features: Oe.RenderStrategy | Oe.Static, visible: s.value, name: "ComboboxOptions" });
|
|
1262
1262
|
};
|
|
1263
|
-
} }),
|
|
1264
|
-
let
|
|
1263
|
+
} }), Vo = ae({ name: "ComboboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: !1 }, order: { type: [Number], default: null } }, setup(e, { slots: o, attrs: t, expose: n }) {
|
|
1264
|
+
let l = ve("ComboboxOption"), i = `headlessui-combobox-option-${Le()}`, r = E(null), s = S(() => e.disabled);
|
|
1265
1265
|
n({ el: r, $el: r });
|
|
1266
|
-
let a =
|
|
1267
|
-
var
|
|
1268
|
-
return
|
|
1269
|
-
}), u =
|
|
1270
|
-
xe(() =>
|
|
1271
|
-
let
|
|
1272
|
-
|
|
1266
|
+
let a = S(() => {
|
|
1267
|
+
var T;
|
|
1268
|
+
return l.virtual.value ? l.activeOptionIndex.value === l.calculateIndex(e.value) : l.activeOptionIndex.value === null ? !1 : ((T = l.options.value[l.activeOptionIndex.value]) == null ? void 0 : T.id) === i;
|
|
1269
|
+
}), u = S(() => l.isSelected(e.value)), f = Ie(Ut, null), p = S(() => ({ disabled: e.disabled, value: e.value, domRef: r, order: S(() => e.order) }));
|
|
1270
|
+
xe(() => l.registerOption(i, p)), St(() => l.unregisterOption(i, a.value)), re(() => {
|
|
1271
|
+
let T = P(r);
|
|
1272
|
+
T && (f == null || f.value.measureElement(T));
|
|
1273
1273
|
}), re(() => {
|
|
1274
|
-
|
|
1275
|
-
var
|
|
1276
|
-
return (
|
|
1274
|
+
l.comboboxState.value === 0 && a.value && (l.virtual.value || l.activationTrigger.value !== 0 && Q(() => {
|
|
1275
|
+
var T, R;
|
|
1276
|
+
return (R = (T = P(r)) == null ? void 0 : T.scrollIntoView) == null ? void 0 : R.call(T, { block: "nearest" });
|
|
1277
1277
|
}));
|
|
1278
1278
|
});
|
|
1279
|
-
function
|
|
1280
|
-
|
|
1281
|
-
var
|
|
1282
|
-
return (
|
|
1283
|
-
}),
|
|
1284
|
-
}
|
|
1285
|
-
function
|
|
1286
|
-
var
|
|
1287
|
-
if (e.disabled || (
|
|
1288
|
-
let
|
|
1289
|
-
|
|
1290
|
-
}
|
|
1291
|
-
let
|
|
1292
|
-
function
|
|
1293
|
-
|
|
1294
|
-
}
|
|
1295
|
-
function
|
|
1296
|
-
var
|
|
1297
|
-
if (!
|
|
1298
|
-
let D =
|
|
1299
|
-
|
|
1300
|
-
}
|
|
1301
|
-
function
|
|
1302
|
-
var
|
|
1303
|
-
|
|
1279
|
+
function m(T) {
|
|
1280
|
+
T.preventDefault(), T.button === Ft.Left && (s.value || (l.selectOption(i), Mt() || requestAnimationFrame(() => {
|
|
1281
|
+
var R;
|
|
1282
|
+
return (R = P(l.inputRef)) == null ? void 0 : R.focus({ preventScroll: !0 });
|
|
1283
|
+
}), l.mode.value === 0 && l.closeCombobox()));
|
|
1284
|
+
}
|
|
1285
|
+
function x() {
|
|
1286
|
+
var T;
|
|
1287
|
+
if (e.disabled || (T = l.virtual.value) != null && T.disabled(e.value)) return l.goToOption(z.Nothing);
|
|
1288
|
+
let R = l.calculateIndex(e.value);
|
|
1289
|
+
l.goToOption(z.Specific, R);
|
|
1290
|
+
}
|
|
1291
|
+
let v = po();
|
|
1292
|
+
function h(T) {
|
|
1293
|
+
v.update(T);
|
|
1294
|
+
}
|
|
1295
|
+
function V(T) {
|
|
1296
|
+
var R;
|
|
1297
|
+
if (!v.wasMoved(T) || e.disabled || (R = l.virtual.value) != null && R.disabled(e.value) || a.value) return;
|
|
1298
|
+
let D = l.calculateIndex(e.value);
|
|
1299
|
+
l.goToOption(z.Specific, D, 0);
|
|
1300
|
+
}
|
|
1301
|
+
function A(T) {
|
|
1302
|
+
var R;
|
|
1303
|
+
v.wasMoved(T) && (e.disabled || (R = l.virtual.value) != null && R.disabled(e.value) || a.value && (l.optionsPropsRef.value.hold || l.goToOption(z.Nothing)));
|
|
1304
1304
|
}
|
|
1305
1305
|
return () => {
|
|
1306
|
-
let { disabled:
|
|
1307
|
-
return pe({ ourProps: D, theirProps: _, slot:
|
|
1306
|
+
let { disabled: T } = e, R = { active: a.value, selected: u.value, disabled: T }, D = { id: i, ref: r, role: "option", tabIndex: T === !0 ? void 0 : -1, "aria-disabled": T === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onMousedown: m, onFocus: x, onPointerenter: h, onMouseenter: h, onPointermove: V, onMousemove: V, onPointerleave: A, onMouseleave: A }, _ = je(e, ["order", "value"]);
|
|
1307
|
+
return pe({ ourProps: D, theirProps: _, slot: R, attrs: t, slots: o, name: "ComboboxOption" });
|
|
1308
1308
|
};
|
|
1309
1309
|
} });
|
|
1310
|
-
function
|
|
1311
|
-
return
|
|
1310
|
+
function ko(e, o) {
|
|
1311
|
+
return w(), $("svg", {
|
|
1312
1312
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1313
1313
|
viewBox: "0 0 20 20",
|
|
1314
1314
|
fill: "currentColor",
|
|
@@ -1322,8 +1322,8 @@ function Vo(e, o) {
|
|
|
1322
1322
|
})
|
|
1323
1323
|
]);
|
|
1324
1324
|
}
|
|
1325
|
-
function
|
|
1326
|
-
return
|
|
1325
|
+
function Mo(e, o) {
|
|
1326
|
+
return w(), $("svg", {
|
|
1327
1327
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1328
1328
|
viewBox: "0 0 20 20",
|
|
1329
1329
|
fill: "currentColor",
|
|
@@ -1337,8 +1337,8 @@ function ko(e, o) {
|
|
|
1337
1337
|
})
|
|
1338
1338
|
]);
|
|
1339
1339
|
}
|
|
1340
|
-
function
|
|
1341
|
-
return
|
|
1340
|
+
function Ro(e, o) {
|
|
1341
|
+
return w(), $("svg", {
|
|
1342
1342
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1343
1343
|
viewBox: "0 0 20 20",
|
|
1344
1344
|
fill: "currentColor",
|
|
@@ -1354,7 +1354,7 @@ function Mo(e, o) {
|
|
|
1354
1354
|
}
|
|
1355
1355
|
const mt = {
|
|
1356
1356
|
__name: "Select",
|
|
1357
|
-
props: /* @__PURE__ */
|
|
1357
|
+
props: /* @__PURE__ */ pn({
|
|
1358
1358
|
languages: {
|
|
1359
1359
|
type: Object,
|
|
1360
1360
|
required: !0
|
|
@@ -1365,31 +1365,31 @@ const mt = {
|
|
|
1365
1365
|
}),
|
|
1366
1366
|
emits: ["update:modelValue"],
|
|
1367
1367
|
setup(e) {
|
|
1368
|
-
const o = e, t =
|
|
1369
|
-
([,
|
|
1370
|
-
)), r = (
|
|
1371
|
-
|
|
1368
|
+
const o = e, t = vn(e, "modelValue"), n = E(""), l = E(null), i = S(() => Object.entries(o.languages).filter(
|
|
1369
|
+
([, s]) => s.toLowerCase().includes(n.value.toLowerCase())
|
|
1370
|
+
)), r = (s) => {
|
|
1371
|
+
s.target.value = "", n.value = "", l.value && l.value.$el.click();
|
|
1372
1372
|
};
|
|
1373
|
-
return (
|
|
1373
|
+
return (s, a) => (w(), te(M(To), {
|
|
1374
1374
|
modelValue: t.value,
|
|
1375
1375
|
"onUpdate:modelValue": a[3] || (a[3] = (u) => t.value = u),
|
|
1376
1376
|
as: "div",
|
|
1377
1377
|
class: "relative mt-1"
|
|
1378
1378
|
}, {
|
|
1379
1379
|
default: Pe(() => [
|
|
1380
|
-
|
|
1380
|
+
F(M(Lo), {
|
|
1381
1381
|
class: "w-full bg-white border border-gray-300 rounded py-2.5 pl-3 pr-10 text-sm text-gray-800 font-medium focus:outline-none focus:ring-0.5 focus:ring-gray-400 focus:border-gray-400",
|
|
1382
1382
|
onChange: a[0] || (a[0] = (u) => n.value = u.target.value),
|
|
1383
1383
|
displayValue: (u) => e.languages[u],
|
|
1384
1384
|
onFocus: a[1] || (a[1] = (u) => r(u))
|
|
1385
1385
|
}, null, 8, ["displayValue"]),
|
|
1386
|
-
|
|
1386
|
+
F(M(Io), {
|
|
1387
1387
|
ref_key: "btnSelect",
|
|
1388
|
-
ref:
|
|
1388
|
+
ref: l,
|
|
1389
1389
|
class: "absolute inset-y-0 right-0 flex items-center pr-2"
|
|
1390
1390
|
}, {
|
|
1391
1391
|
default: Pe(() => [
|
|
1392
|
-
|
|
1392
|
+
F(M(Mo), {
|
|
1393
1393
|
class: "h-5 w-5 text-gray-400",
|
|
1394
1394
|
"aria-hidden": "true",
|
|
1395
1395
|
onClick: a[2] || (a[2] = (u) => r(u))
|
|
@@ -1397,22 +1397,22 @@ const mt = {
|
|
|
1397
1397
|
]),
|
|
1398
1398
|
_: 1
|
|
1399
1399
|
}, 512),
|
|
1400
|
-
|
|
1400
|
+
F(M(Po), { class: "absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm z-50" }, {
|
|
1401
1401
|
default: Pe(() => [
|
|
1402
|
-
(
|
|
1402
|
+
(w(!0), $(Z, null, se(i.value, ([u, f]) => (w(), te(M(Vo), {
|
|
1403
1403
|
key: u,
|
|
1404
1404
|
value: u
|
|
1405
1405
|
}, {
|
|
1406
|
-
default: Pe(({ active:
|
|
1406
|
+
default: Pe(({ active: p, selected: m }) => [
|
|
1407
1407
|
C("li", {
|
|
1408
1408
|
class: Ce([
|
|
1409
1409
|
"relative cursor-default select-none py-2 pl-3 pr-9",
|
|
1410
|
-
|
|
1410
|
+
p ? "bg-[#3B5695] text-white" : "text-textCustom"
|
|
1411
1411
|
])
|
|
1412
1412
|
}, [
|
|
1413
1413
|
C("span", {
|
|
1414
|
-
class: Ce(["block truncate",
|
|
1415
|
-
},
|
|
1414
|
+
class: Ce(["block truncate", m && "font-semibold"])
|
|
1415
|
+
}, X(f), 3)
|
|
1416
1416
|
], 2)
|
|
1417
1417
|
]),
|
|
1418
1418
|
_: 2
|
|
@@ -1424,19 +1424,19 @@ const mt = {
|
|
|
1424
1424
|
_: 1
|
|
1425
1425
|
}, 8, ["modelValue"]));
|
|
1426
1426
|
}
|
|
1427
|
-
}, Zt = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.68688%202.3131C3.88214%202.50837%203.88214%202.82495%203.68688%203.02021L2.04043%204.66666L3.68688%206.3131C3.88214%206.50837%203.88214%206.82495%203.68688%207.02021C3.49162%207.21547%203.17504%207.21547%202.97977%207.02021L0.979775%205.02021C0.784513%204.82495%200.784513%204.50837%200.979775%204.3131L2.97977%202.3131C3.17504%202.11784%203.49162%202.11784%203.68688%202.3131Z'%20fill='%237E7E7E'/%3e%3cpath%20d='M12.3131%208.97977C12.5084%208.78451%2012.825%208.78451%2013.0202%208.97977L15.0202%2010.9798C15.2155%2011.175%2015.2155%2011.4916%2015.0202%2011.6869L13.0202%2013.6869C12.825%2013.8821%2012.5084%2013.8821%2012.3131%2013.6869C12.1178%2013.4916%2012.1178%2013.175%2012.3131%2012.9798L13.9596%2011.3333L12.3131%209.68688C12.1178%209.49161%2012.1178%209.17503%2012.3131%208.97977Z'%20fill='%237E7E7E'/%3e%3cpath%20d='M0.833328%204.66666C0.833328%204.39051%201.05719%204.16666%201.33333%204.16666H14.6667C14.9428%204.16666%2015.1667%204.39051%2015.1667%204.66666C15.1667%204.9428%2014.9428%205.16666%2014.6667%205.16666H1.33333C1.05719%205.16666%200.833328%204.9428%200.833328%204.66666Z'%20fill='%237E7E7E'/%3e%3cpath%20d='M0.833328%2011.3333C0.833328%2011.0572%201.05719%2010.8333%201.33333%2010.8333H14.6667C14.9428%2010.8333%2015.1667%2011.0572%2015.1667%2011.3333C15.1667%2011.6095%2014.9428%2011.8333%2014.6667%2011.8333H1.33333C1.05719%2011.8333%200.833328%2011.6095%200.833328%2011.3333Z'%20fill='%237E7E7E'/%3e%3c/svg%3e",
|
|
1427
|
+
}, Zt = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.68688%202.3131C3.88214%202.50837%203.88214%202.82495%203.68688%203.02021L2.04043%204.66666L3.68688%206.3131C3.88214%206.50837%203.88214%206.82495%203.68688%207.02021C3.49162%207.21547%203.17504%207.21547%202.97977%207.02021L0.979775%205.02021C0.784513%204.82495%200.784513%204.50837%200.979775%204.3131L2.97977%202.3131C3.17504%202.11784%203.49162%202.11784%203.68688%202.3131Z'%20fill='%237E7E7E'/%3e%3cpath%20d='M12.3131%208.97977C12.5084%208.78451%2012.825%208.78451%2013.0202%208.97977L15.0202%2010.9798C15.2155%2011.175%2015.2155%2011.4916%2015.0202%2011.6869L13.0202%2013.6869C12.825%2013.8821%2012.5084%2013.8821%2012.3131%2013.6869C12.1178%2013.4916%2012.1178%2013.175%2012.3131%2012.9798L13.9596%2011.3333L12.3131%209.68688C12.1178%209.49161%2012.1178%209.17503%2012.3131%208.97977Z'%20fill='%237E7E7E'/%3e%3cpath%20d='M0.833328%204.66666C0.833328%204.39051%201.05719%204.16666%201.33333%204.16666H14.6667C14.9428%204.16666%2015.1667%204.39051%2015.1667%204.66666C15.1667%204.9428%2014.9428%205.16666%2014.6667%205.16666H1.33333C1.05719%205.16666%200.833328%204.9428%200.833328%204.66666Z'%20fill='%237E7E7E'/%3e%3cpath%20d='M0.833328%2011.3333C0.833328%2011.0572%201.05719%2010.8333%201.33333%2010.8333H14.6667C14.9428%2010.8333%2015.1667%2011.0572%2015.1667%2011.3333C15.1667%2011.6095%2014.9428%2011.8333%2014.6667%2011.8333H1.33333C1.05719%2011.8333%200.833328%2011.6095%200.833328%2011.3333Z'%20fill='%237E7E7E'/%3e%3c/svg%3e", No = { key: 0 }, Ao = /* @__PURE__ */ C("img", {
|
|
1428
1428
|
src: Zt,
|
|
1429
1429
|
alt: "swap",
|
|
1430
1430
|
class: "w-4"
|
|
1431
|
-
}, null, -1),
|
|
1432
|
-
|
|
1433
|
-
],
|
|
1431
|
+
}, null, -1), Do = [
|
|
1432
|
+
Ao
|
|
1433
|
+
], Fo = /* @__PURE__ */ C("img", {
|
|
1434
1434
|
src: Zt,
|
|
1435
1435
|
alt: "swap",
|
|
1436
1436
|
class: "w-4"
|
|
1437
|
-
}, null, -1),
|
|
1438
|
-
|
|
1439
|
-
],
|
|
1437
|
+
}, null, -1), jo = [
|
|
1438
|
+
Fo
|
|
1439
|
+
], Bo = {
|
|
1440
1440
|
__name: "SwapBtn",
|
|
1441
1441
|
props: {
|
|
1442
1442
|
isBidirect: {
|
|
@@ -1447,52 +1447,52 @@ const mt = {
|
|
|
1447
1447
|
emits: ["swap"],
|
|
1448
1448
|
setup(e, { emit: o }) {
|
|
1449
1449
|
const t = o;
|
|
1450
|
-
return (n,
|
|
1450
|
+
return (n, l) => e.isBidirect ? (w(), $("button", {
|
|
1451
1451
|
key: 1,
|
|
1452
|
-
onClick:
|
|
1453
|
-
},
|
|
1452
|
+
onClick: l[0] || (l[0] = (i) => t("swap"))
|
|
1453
|
+
}, jo)) : (w(), $("button", No, Do));
|
|
1454
1454
|
}
|
|
1455
1455
|
};
|
|
1456
1456
|
var Wt = !1;
|
|
1457
1457
|
function ke(e, o, t) {
|
|
1458
1458
|
return Array.isArray(e) ? (e.length = Math.max(e.length, o), e.splice(o, 1, t), t) : (e[o] = t, t);
|
|
1459
1459
|
}
|
|
1460
|
-
function
|
|
1460
|
+
function Je(e, o) {
|
|
1461
1461
|
if (Array.isArray(e)) {
|
|
1462
1462
|
e.splice(o, 1);
|
|
1463
1463
|
return;
|
|
1464
1464
|
}
|
|
1465
1465
|
delete e[o];
|
|
1466
1466
|
}
|
|
1467
|
-
function
|
|
1467
|
+
function Ho() {
|
|
1468
1468
|
return Gt().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
1469
1469
|
}
|
|
1470
1470
|
function Gt() {
|
|
1471
1471
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
1472
1472
|
}
|
|
1473
|
-
const
|
|
1474
|
-
let me,
|
|
1475
|
-
function
|
|
1473
|
+
const zo = typeof Proxy == "function", Uo = "devtools-plugin:setup", Zo = "plugin:settings:set";
|
|
1474
|
+
let me, Ke;
|
|
1475
|
+
function Wo() {
|
|
1476
1476
|
var e;
|
|
1477
|
-
return me !== void 0 || (typeof window < "u" && window.performance ? (me = !0,
|
|
1477
|
+
return me !== void 0 || (typeof window < "u" && window.performance ? (me = !0, Ke = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (me = !0, Ke = globalThis.perf_hooks.performance) : me = !1), me;
|
|
1478
1478
|
}
|
|
1479
|
-
function
|
|
1480
|
-
return
|
|
1479
|
+
function Go() {
|
|
1480
|
+
return Wo() ? Ke.now() : Date.now();
|
|
1481
1481
|
}
|
|
1482
|
-
class
|
|
1482
|
+
class qo {
|
|
1483
1483
|
constructor(o, t) {
|
|
1484
1484
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = o, this.hook = t;
|
|
1485
1485
|
const n = {};
|
|
1486
1486
|
if (o.settings)
|
|
1487
1487
|
for (const r in o.settings) {
|
|
1488
|
-
const
|
|
1489
|
-
n[r] =
|
|
1488
|
+
const s = o.settings[r];
|
|
1489
|
+
n[r] = s.defaultValue;
|
|
1490
1490
|
}
|
|
1491
|
-
const
|
|
1491
|
+
const l = `__vue-devtools-plugin-settings__${o.id}`;
|
|
1492
1492
|
let i = Object.assign({}, n);
|
|
1493
1493
|
try {
|
|
1494
|
-
const r = localStorage.getItem(
|
|
1495
|
-
Object.assign(i,
|
|
1494
|
+
const r = localStorage.getItem(l), s = JSON.parse(r);
|
|
1495
|
+
Object.assign(i, s);
|
|
1496
1496
|
} catch {
|
|
1497
1497
|
}
|
|
1498
1498
|
this.fallbacks = {
|
|
@@ -1501,32 +1501,32 @@ class Go {
|
|
|
1501
1501
|
},
|
|
1502
1502
|
setSettings(r) {
|
|
1503
1503
|
try {
|
|
1504
|
-
localStorage.setItem(
|
|
1504
|
+
localStorage.setItem(l, JSON.stringify(r));
|
|
1505
1505
|
} catch {
|
|
1506
1506
|
}
|
|
1507
1507
|
i = r;
|
|
1508
1508
|
},
|
|
1509
1509
|
now() {
|
|
1510
|
-
return
|
|
1510
|
+
return Go();
|
|
1511
1511
|
}
|
|
1512
|
-
}, t && t.on(
|
|
1513
|
-
r === this.plugin.id && this.fallbacks.setSettings(
|
|
1512
|
+
}, t && t.on(Zo, (r, s) => {
|
|
1513
|
+
r === this.plugin.id && this.fallbacks.setSettings(s);
|
|
1514
1514
|
}), this.proxiedOn = new Proxy({}, {
|
|
1515
|
-
get: (r,
|
|
1515
|
+
get: (r, s) => this.target ? this.target.on[s] : (...a) => {
|
|
1516
1516
|
this.onQueue.push({
|
|
1517
|
-
method:
|
|
1517
|
+
method: s,
|
|
1518
1518
|
args: a
|
|
1519
1519
|
});
|
|
1520
1520
|
}
|
|
1521
1521
|
}), this.proxiedTarget = new Proxy({}, {
|
|
1522
|
-
get: (r,
|
|
1523
|
-
method:
|
|
1522
|
+
get: (r, s) => this.target ? this.target[s] : s === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(s) ? (...a) => (this.targetQueue.push({
|
|
1523
|
+
method: s,
|
|
1524
1524
|
args: a,
|
|
1525
1525
|
resolve: () => {
|
|
1526
1526
|
}
|
|
1527
|
-
}), this.fallbacks[
|
|
1527
|
+
}), this.fallbacks[s](...a)) : (...a) => new Promise((u) => {
|
|
1528
1528
|
this.targetQueue.push({
|
|
1529
|
-
method:
|
|
1529
|
+
method: s,
|
|
1530
1530
|
args: a,
|
|
1531
1531
|
resolve: u
|
|
1532
1532
|
});
|
|
@@ -1542,11 +1542,11 @@ class Go {
|
|
|
1542
1542
|
}
|
|
1543
1543
|
}
|
|
1544
1544
|
function qt(e, o) {
|
|
1545
|
-
const t = e, n = Gt(),
|
|
1546
|
-
if (
|
|
1547
|
-
|
|
1545
|
+
const t = e, n = Gt(), l = Ho(), i = zo && t.enableEarlyProxy;
|
|
1546
|
+
if (l && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !i))
|
|
1547
|
+
l.emit(Uo, e, o);
|
|
1548
1548
|
else {
|
|
1549
|
-
const r = i ? new
|
|
1549
|
+
const r = i ? new qo(t, l) : null;
|
|
1550
1550
|
(n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
1551
1551
|
pluginDescriptor: t,
|
|
1552
1552
|
setupFn: o,
|
|
@@ -1560,7 +1560,7 @@ function qt(e, o) {
|
|
|
1560
1560
|
* @license MIT
|
|
1561
1561
|
*/
|
|
1562
1562
|
let we;
|
|
1563
|
-
const
|
|
1563
|
+
const Te = (e) => we = e, Jt = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
1564
1564
|
/* istanbul ignore next */
|
|
1565
1565
|
Symbol()
|
|
1566
1566
|
);
|
|
@@ -1571,8 +1571,8 @@ var ne;
|
|
|
1571
1571
|
(function(e) {
|
|
1572
1572
|
e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
|
|
1573
1573
|
})(ne || (ne = {}));
|
|
1574
|
-
const Be = typeof window < "u",
|
|
1575
|
-
function
|
|
1574
|
+
const Be = typeof window < "u", Se = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && Be, gt = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof global == "object" && global.global === global ? global : typeof globalThis == "object" ? globalThis : { HTMLElement: null };
|
|
1575
|
+
function Jo(e, { autoBom: o = !1 } = {}) {
|
|
1576
1576
|
return o && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
|
|
1577
1577
|
}
|
|
1578
1578
|
function st(e, o, t) {
|
|
@@ -1602,16 +1602,16 @@ function Me(e) {
|
|
|
1602
1602
|
}
|
|
1603
1603
|
const Re = typeof navigator == "object" ? navigator : { userAgent: "" }, Yt = /Macintosh/.test(Re.userAgent) && /AppleWebKit/.test(Re.userAgent) && !/Safari/.test(Re.userAgent), Qt = Be ? (
|
|
1604
1604
|
// Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
|
|
1605
|
-
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !Yt ?
|
|
1605
|
+
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !Yt ? Ko : (
|
|
1606
1606
|
// Use msSaveOrOpenBlob as a second approach
|
|
1607
|
-
"msSaveOrOpenBlob" in Re ?
|
|
1607
|
+
"msSaveOrOpenBlob" in Re ? Yo : (
|
|
1608
1608
|
// Fallback to using FileReader and a popup
|
|
1609
|
-
|
|
1609
|
+
Qo
|
|
1610
1610
|
)
|
|
1611
1611
|
)
|
|
1612
1612
|
) : () => {
|
|
1613
1613
|
};
|
|
1614
|
-
function
|
|
1614
|
+
function Ko(e, o = "download", t) {
|
|
1615
1615
|
const n = document.createElement("a");
|
|
1616
1616
|
n.download = o, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ? Kt(n.href) ? st(e, o, t) : (n.target = "_blank", Me(n)) : Me(n)) : (n.href = URL.createObjectURL(e), setTimeout(function() {
|
|
1617
1617
|
URL.revokeObjectURL(n.href);
|
|
@@ -1619,7 +1619,7 @@ function Jo(e, o = "download", t) {
|
|
|
1619
1619
|
Me(n);
|
|
1620
1620
|
}, 0));
|
|
1621
1621
|
}
|
|
1622
|
-
function
|
|
1622
|
+
function Yo(e, o = "download", t) {
|
|
1623
1623
|
if (typeof e == "string")
|
|
1624
1624
|
if (Kt(e))
|
|
1625
1625
|
st(e, o, t);
|
|
@@ -1630,72 +1630,72 @@ function Ko(e, o = "download", t) {
|
|
|
1630
1630
|
});
|
|
1631
1631
|
}
|
|
1632
1632
|
else
|
|
1633
|
-
navigator.msSaveOrOpenBlob(
|
|
1633
|
+
navigator.msSaveOrOpenBlob(Jo(e, t), o);
|
|
1634
1634
|
}
|
|
1635
|
-
function
|
|
1635
|
+
function Qo(e, o, t, n) {
|
|
1636
1636
|
if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string")
|
|
1637
1637
|
return st(e, o, t);
|
|
1638
|
-
const
|
|
1639
|
-
if ((r ||
|
|
1640
|
-
const
|
|
1641
|
-
|
|
1642
|
-
let a =
|
|
1638
|
+
const l = e.type === "application/octet-stream", i = /constructor/i.test(String(gt.HTMLElement)) || "safari" in gt, r = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
1639
|
+
if ((r || l && i || Yt) && typeof FileReader < "u") {
|
|
1640
|
+
const s = new FileReader();
|
|
1641
|
+
s.onloadend = function() {
|
|
1642
|
+
let a = s.result;
|
|
1643
1643
|
if (typeof a != "string")
|
|
1644
1644
|
throw n = null, new Error("Wrong reader.result type");
|
|
1645
1645
|
a = r ? a : a.replace(/^data:[^;]*;/, "data:attachment/file;"), n ? n.location.href = a : location.assign(a), n = null;
|
|
1646
|
-
},
|
|
1646
|
+
}, s.readAsDataURL(e);
|
|
1647
1647
|
} else {
|
|
1648
|
-
const
|
|
1649
|
-
n ? n.location.assign(
|
|
1650
|
-
URL.revokeObjectURL(
|
|
1648
|
+
const s = URL.createObjectURL(e);
|
|
1649
|
+
n ? n.location.assign(s) : location.href = s, n = null, setTimeout(function() {
|
|
1650
|
+
URL.revokeObjectURL(s);
|
|
1651
1651
|
}, 4e4);
|
|
1652
1652
|
}
|
|
1653
1653
|
}
|
|
1654
|
-
function
|
|
1654
|
+
function H(e, o) {
|
|
1655
1655
|
const t = "🍍 " + e;
|
|
1656
1656
|
typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(t, o) : o === "error" ? console.error(t) : o === "warn" ? console.warn(t) : console.log(t);
|
|
1657
1657
|
}
|
|
1658
|
-
function
|
|
1658
|
+
function it(e) {
|
|
1659
1659
|
return "_a" in e && "install" in e;
|
|
1660
1660
|
}
|
|
1661
1661
|
function Xt() {
|
|
1662
1662
|
if (!("clipboard" in navigator))
|
|
1663
|
-
return
|
|
1663
|
+
return H("Your browser doesn't support the Clipboard API", "error"), !0;
|
|
1664
1664
|
}
|
|
1665
1665
|
function en(e) {
|
|
1666
|
-
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (
|
|
1666
|
+
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (H('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
|
|
1667
1667
|
}
|
|
1668
|
-
async function
|
|
1668
|
+
async function Xo(e) {
|
|
1669
1669
|
if (!Xt())
|
|
1670
1670
|
try {
|
|
1671
|
-
await navigator.clipboard.writeText(JSON.stringify(e.state.value)),
|
|
1671
|
+
await navigator.clipboard.writeText(JSON.stringify(e.state.value)), H("Global state copied to clipboard.");
|
|
1672
1672
|
} catch (o) {
|
|
1673
1673
|
if (en(o))
|
|
1674
1674
|
return;
|
|
1675
|
-
|
|
1675
|
+
H("Failed to serialize the state. Check the console for more details.", "error"), console.error(o);
|
|
1676
1676
|
}
|
|
1677
1677
|
}
|
|
1678
|
-
async function
|
|
1678
|
+
async function el(e) {
|
|
1679
1679
|
if (!Xt())
|
|
1680
1680
|
try {
|
|
1681
|
-
tn(e, JSON.parse(await navigator.clipboard.readText())),
|
|
1681
|
+
tn(e, JSON.parse(await navigator.clipboard.readText())), H("Global state pasted from clipboard.");
|
|
1682
1682
|
} catch (o) {
|
|
1683
1683
|
if (en(o))
|
|
1684
1684
|
return;
|
|
1685
|
-
|
|
1685
|
+
H("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(o);
|
|
1686
1686
|
}
|
|
1687
1687
|
}
|
|
1688
|
-
async function
|
|
1688
|
+
async function tl(e) {
|
|
1689
1689
|
try {
|
|
1690
1690
|
Qt(new Blob([JSON.stringify(e.state.value)], {
|
|
1691
1691
|
type: "text/plain;charset=utf-8"
|
|
1692
1692
|
}), "pinia-state.json");
|
|
1693
1693
|
} catch (o) {
|
|
1694
|
-
|
|
1694
|
+
H("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(o);
|
|
1695
1695
|
}
|
|
1696
1696
|
}
|
|
1697
1697
|
let oe;
|
|
1698
|
-
function
|
|
1698
|
+
function nl() {
|
|
1699
1699
|
oe || (oe = document.createElement("input"), oe.type = "file", oe.accept = ".json");
|
|
1700
1700
|
function e() {
|
|
1701
1701
|
return new Promise((o, t) => {
|
|
@@ -1703,22 +1703,22 @@ function ts() {
|
|
|
1703
1703
|
const n = oe.files;
|
|
1704
1704
|
if (!n)
|
|
1705
1705
|
return o(null);
|
|
1706
|
-
const
|
|
1707
|
-
return o(
|
|
1706
|
+
const l = n.item(0);
|
|
1707
|
+
return o(l ? { text: await l.text(), file: l } : null);
|
|
1708
1708
|
}, oe.oncancel = () => o(null), oe.onerror = t, oe.click();
|
|
1709
1709
|
});
|
|
1710
1710
|
}
|
|
1711
1711
|
return e;
|
|
1712
1712
|
}
|
|
1713
|
-
async function
|
|
1713
|
+
async function ol(e) {
|
|
1714
1714
|
try {
|
|
1715
|
-
const t = await
|
|
1715
|
+
const t = await nl()();
|
|
1716
1716
|
if (!t)
|
|
1717
1717
|
return;
|
|
1718
|
-
const { text: n, file:
|
|
1719
|
-
tn(e, JSON.parse(n)),
|
|
1718
|
+
const { text: n, file: l } = t;
|
|
1719
|
+
tn(e, JSON.parse(n)), H(`Global state imported from "${l.name}".`);
|
|
1720
1720
|
} catch (o) {
|
|
1721
|
-
|
|
1721
|
+
H("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(o);
|
|
1722
1722
|
}
|
|
1723
1723
|
}
|
|
1724
1724
|
function tn(e, o) {
|
|
@@ -1734,18 +1734,18 @@ function Y(e) {
|
|
|
1734
1734
|
}
|
|
1735
1735
|
};
|
|
1736
1736
|
}
|
|
1737
|
-
const nn = "🍍 Pinia (root)",
|
|
1738
|
-
function
|
|
1739
|
-
return
|
|
1740
|
-
id:
|
|
1737
|
+
const nn = "🍍 Pinia (root)", Ye = "_root";
|
|
1738
|
+
function ll(e) {
|
|
1739
|
+
return it(e) ? {
|
|
1740
|
+
id: Ye,
|
|
1741
1741
|
label: nn
|
|
1742
1742
|
} : {
|
|
1743
1743
|
id: e.$id,
|
|
1744
1744
|
label: e.$id
|
|
1745
1745
|
};
|
|
1746
1746
|
}
|
|
1747
|
-
function
|
|
1748
|
-
if (
|
|
1747
|
+
function sl(e) {
|
|
1748
|
+
if (it(e)) {
|
|
1749
1749
|
const t = Array.from(e._s.keys()), n = e._s;
|
|
1750
1750
|
return {
|
|
1751
1751
|
state: t.map((i) => ({
|
|
@@ -1758,7 +1758,7 @@ function ss(e) {
|
|
|
1758
1758
|
return {
|
|
1759
1759
|
editable: !1,
|
|
1760
1760
|
key: i,
|
|
1761
|
-
value: r._getters.reduce((
|
|
1761
|
+
value: r._getters.reduce((s, a) => (s[a] = r[a], s), {})
|
|
1762
1762
|
};
|
|
1763
1763
|
})
|
|
1764
1764
|
};
|
|
@@ -1780,7 +1780,7 @@ function ss(e) {
|
|
|
1780
1780
|
value: e[t]
|
|
1781
1781
|
}))), o;
|
|
1782
1782
|
}
|
|
1783
|
-
function
|
|
1783
|
+
function il(e) {
|
|
1784
1784
|
return e ? Array.isArray(e) ? e.reduce((o, t) => (o.keys.push(t.key), o.operations.push(t.type), o.oldValue[t.key] = t.oldValue, o.newValue[t.key] = t.newValue, o), {
|
|
1785
1785
|
oldValue: {},
|
|
1786
1786
|
keys: [],
|
|
@@ -1793,7 +1793,7 @@ function ls(e) {
|
|
|
1793
1793
|
newValue: e.newValue
|
|
1794
1794
|
} : {};
|
|
1795
1795
|
}
|
|
1796
|
-
function
|
|
1796
|
+
function rl(e) {
|
|
1797
1797
|
switch (e) {
|
|
1798
1798
|
case ne.direct:
|
|
1799
1799
|
return "mutation";
|
|
@@ -1806,8 +1806,8 @@ function is(e) {
|
|
|
1806
1806
|
}
|
|
1807
1807
|
}
|
|
1808
1808
|
let be = !0;
|
|
1809
|
-
const Ne = [], ue = "pinia:mutations", U = "pinia", { assign:
|
|
1810
|
-
function
|
|
1809
|
+
const Ne = [], ue = "pinia:mutations", U = "pinia", { assign: al } = Object, De = (e) => "🍍 " + e;
|
|
1810
|
+
function ul(e, o) {
|
|
1811
1811
|
qt({
|
|
1812
1812
|
id: "dev.esm.pinia",
|
|
1813
1813
|
label: "Pinia 🍍",
|
|
@@ -1817,7 +1817,7 @@ function as(e, o) {
|
|
|
1817
1817
|
componentStateTypes: Ne,
|
|
1818
1818
|
app: e
|
|
1819
1819
|
}, (t) => {
|
|
1820
|
-
typeof t.now != "function" &&
|
|
1820
|
+
typeof t.now != "function" && H("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), t.addTimelineLayer({
|
|
1821
1821
|
id: ue,
|
|
1822
1822
|
label: "Pinia 🍍",
|
|
1823
1823
|
color: 15064968
|
|
@@ -1830,28 +1830,28 @@ function as(e, o) {
|
|
|
1830
1830
|
{
|
|
1831
1831
|
icon: "content_copy",
|
|
1832
1832
|
action: () => {
|
|
1833
|
-
|
|
1833
|
+
Xo(o);
|
|
1834
1834
|
},
|
|
1835
1835
|
tooltip: "Serialize and copy the state"
|
|
1836
1836
|
},
|
|
1837
1837
|
{
|
|
1838
1838
|
icon: "content_paste",
|
|
1839
1839
|
action: async () => {
|
|
1840
|
-
await
|
|
1840
|
+
await el(o), t.sendInspectorTree(U), t.sendInspectorState(U);
|
|
1841
1841
|
},
|
|
1842
1842
|
tooltip: "Replace the state with the content of your clipboard"
|
|
1843
1843
|
},
|
|
1844
1844
|
{
|
|
1845
1845
|
icon: "save",
|
|
1846
1846
|
action: () => {
|
|
1847
|
-
|
|
1847
|
+
tl(o);
|
|
1848
1848
|
},
|
|
1849
1849
|
tooltip: "Save the state as a JSON file"
|
|
1850
1850
|
},
|
|
1851
1851
|
{
|
|
1852
1852
|
icon: "folder_open",
|
|
1853
1853
|
action: async () => {
|
|
1854
|
-
await
|
|
1854
|
+
await ol(o), t.sendInspectorTree(U), t.sendInspectorState(U);
|
|
1855
1855
|
},
|
|
1856
1856
|
tooltip: "Import the state from a JSON file"
|
|
1857
1857
|
}
|
|
@@ -1861,44 +1861,44 @@ function as(e, o) {
|
|
|
1861
1861
|
icon: "restore",
|
|
1862
1862
|
tooltip: 'Reset the state (with "$reset")',
|
|
1863
1863
|
action: (n) => {
|
|
1864
|
-
const
|
|
1865
|
-
|
|
1864
|
+
const l = o._s.get(n);
|
|
1865
|
+
l ? typeof l.$reset != "function" ? H(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`, "warn") : (l.$reset(), H(`Store "${n}" reset.`)) : H(`Cannot reset "${n}" store because it wasn't found.`, "warn");
|
|
1866
1866
|
}
|
|
1867
1867
|
}
|
|
1868
1868
|
]
|
|
1869
|
-
}), t.on.inspectComponent((n,
|
|
1869
|
+
}), t.on.inspectComponent((n, l) => {
|
|
1870
1870
|
const i = n.componentInstance && n.componentInstance.proxy;
|
|
1871
1871
|
if (i && i._pStores) {
|
|
1872
1872
|
const r = n.componentInstance.proxy._pStores;
|
|
1873
|
-
Object.values(r).forEach((
|
|
1873
|
+
Object.values(r).forEach((s) => {
|
|
1874
1874
|
n.instanceData.state.push({
|
|
1875
|
-
type: De(
|
|
1875
|
+
type: De(s.$id),
|
|
1876
1876
|
key: "state",
|
|
1877
1877
|
editable: !0,
|
|
1878
|
-
value:
|
|
1878
|
+
value: s._isOptionsAPI ? {
|
|
1879
1879
|
_custom: {
|
|
1880
|
-
value: K(
|
|
1880
|
+
value: K(s.$state),
|
|
1881
1881
|
actions: [
|
|
1882
1882
|
{
|
|
1883
1883
|
icon: "restore",
|
|
1884
1884
|
tooltip: "Reset the state of this store",
|
|
1885
|
-
action: () =>
|
|
1885
|
+
action: () => s.$reset()
|
|
1886
1886
|
}
|
|
1887
1887
|
]
|
|
1888
1888
|
}
|
|
1889
1889
|
} : (
|
|
1890
1890
|
// NOTE: workaround to unwrap transferred refs
|
|
1891
|
-
Object.keys(
|
|
1891
|
+
Object.keys(s.$state).reduce((a, u) => (a[u] = s.$state[u], a), {})
|
|
1892
1892
|
)
|
|
1893
|
-
}),
|
|
1894
|
-
type: De(
|
|
1893
|
+
}), s._getters && s._getters.length && n.instanceData.state.push({
|
|
1894
|
+
type: De(s.$id),
|
|
1895
1895
|
key: "getters",
|
|
1896
1896
|
editable: !1,
|
|
1897
|
-
value:
|
|
1897
|
+
value: s._getters.reduce((a, u) => {
|
|
1898
1898
|
try {
|
|
1899
|
-
a[u] =
|
|
1900
|
-
} catch (
|
|
1901
|
-
a[u] =
|
|
1899
|
+
a[u] = s[u];
|
|
1900
|
+
} catch (f) {
|
|
1901
|
+
a[u] = f;
|
|
1902
1902
|
}
|
|
1903
1903
|
return a;
|
|
1904
1904
|
}, {})
|
|
@@ -1907,32 +1907,32 @@ function as(e, o) {
|
|
|
1907
1907
|
}
|
|
1908
1908
|
}), t.on.getInspectorTree((n) => {
|
|
1909
1909
|
if (n.app === e && n.inspectorId === U) {
|
|
1910
|
-
let
|
|
1911
|
-
|
|
1910
|
+
let l = [o];
|
|
1911
|
+
l = l.concat(Array.from(o._s.values())), n.rootNodes = (n.filter ? l.filter((i) => "$id" in i ? i.$id.toLowerCase().includes(n.filter.toLowerCase()) : nn.toLowerCase().includes(n.filter.toLowerCase())) : l).map(ll);
|
|
1912
1912
|
}
|
|
1913
1913
|
}), t.on.getInspectorState((n) => {
|
|
1914
1914
|
if (n.app === e && n.inspectorId === U) {
|
|
1915
|
-
const
|
|
1916
|
-
if (!
|
|
1915
|
+
const l = n.nodeId === Ye ? o : o._s.get(n.nodeId);
|
|
1916
|
+
if (!l)
|
|
1917
1917
|
return;
|
|
1918
|
-
|
|
1918
|
+
l && (n.state = sl(l));
|
|
1919
1919
|
}
|
|
1920
|
-
}), t.on.editInspectorState((n,
|
|
1920
|
+
}), t.on.editInspectorState((n, l) => {
|
|
1921
1921
|
if (n.app === e && n.inspectorId === U) {
|
|
1922
|
-
const i = n.nodeId ===
|
|
1922
|
+
const i = n.nodeId === Ye ? o : o._s.get(n.nodeId);
|
|
1923
1923
|
if (!i)
|
|
1924
|
-
return
|
|
1924
|
+
return H(`store "${n.nodeId}" not found`, "error");
|
|
1925
1925
|
const { path: r } = n;
|
|
1926
|
-
|
|
1926
|
+
it(i) ? r.unshift("state") : (r.length !== 1 || !i._customProperties.has(r[0]) || r[0] in i.$state) && r.unshift("$state"), be = !1, n.set(i, r, n.state.value), be = !0;
|
|
1927
1927
|
}
|
|
1928
1928
|
}), t.on.editComponentState((n) => {
|
|
1929
1929
|
if (n.type.startsWith("🍍")) {
|
|
1930
|
-
const
|
|
1930
|
+
const l = n.type.replace(/^🍍\s*/, ""), i = o._s.get(l);
|
|
1931
1931
|
if (!i)
|
|
1932
|
-
return
|
|
1932
|
+
return H(`store "${l}" not found`, "error");
|
|
1933
1933
|
const { path: r } = n;
|
|
1934
1934
|
if (r[0] !== "state")
|
|
1935
|
-
return
|
|
1935
|
+
return H(`Invalid path for store "${l}":
|
|
1936
1936
|
${r}
|
|
1937
1937
|
Only state can be modified.`);
|
|
1938
1938
|
r[0] = "$state", be = !1, n.set(i, r, n.state.value), be = !0;
|
|
@@ -1940,7 +1940,7 @@ Only state can be modified.`);
|
|
|
1940
1940
|
});
|
|
1941
1941
|
});
|
|
1942
1942
|
}
|
|
1943
|
-
function
|
|
1943
|
+
function cl(e, o) {
|
|
1944
1944
|
Ne.includes(De(o.$id)) || Ne.push(De(o.$id)), qt({
|
|
1945
1945
|
id: "dev.esm.pinia",
|
|
1946
1946
|
label: "Pinia 🍍",
|
|
@@ -1963,8 +1963,8 @@ function us(e, o) {
|
|
|
1963
1963
|
}
|
|
1964
1964
|
}, (t) => {
|
|
1965
1965
|
const n = typeof t.now == "function" ? t.now.bind(t) : Date.now;
|
|
1966
|
-
o.$onAction(({ after: r, onError:
|
|
1967
|
-
const
|
|
1966
|
+
o.$onAction(({ after: r, onError: s, name: a, args: u }) => {
|
|
1967
|
+
const f = on++;
|
|
1968
1968
|
t.addTimelineEvent({
|
|
1969
1969
|
layerId: ue,
|
|
1970
1970
|
event: {
|
|
@@ -1976,9 +1976,9 @@ function us(e, o) {
|
|
|
1976
1976
|
action: Y(a),
|
|
1977
1977
|
args: u
|
|
1978
1978
|
},
|
|
1979
|
-
groupId:
|
|
1979
|
+
groupId: f
|
|
1980
1980
|
}
|
|
1981
|
-
}), r((
|
|
1981
|
+
}), r((p) => {
|
|
1982
1982
|
ie = void 0, t.addTimelineEvent({
|
|
1983
1983
|
layerId: ue,
|
|
1984
1984
|
event: {
|
|
@@ -1989,12 +1989,12 @@ function us(e, o) {
|
|
|
1989
1989
|
store: Y(o.$id),
|
|
1990
1990
|
action: Y(a),
|
|
1991
1991
|
args: u,
|
|
1992
|
-
result:
|
|
1992
|
+
result: p
|
|
1993
1993
|
},
|
|
1994
|
-
groupId:
|
|
1994
|
+
groupId: f
|
|
1995
1995
|
}
|
|
1996
1996
|
});
|
|
1997
|
-
}),
|
|
1997
|
+
}), s((p) => {
|
|
1998
1998
|
ie = void 0, t.addTimelineEvent({
|
|
1999
1999
|
layerId: ue,
|
|
2000
2000
|
event: {
|
|
@@ -2006,14 +2006,14 @@ function us(e, o) {
|
|
|
2006
2006
|
store: Y(o.$id),
|
|
2007
2007
|
action: Y(a),
|
|
2008
2008
|
args: u,
|
|
2009
|
-
error:
|
|
2009
|
+
error: p
|
|
2010
2010
|
},
|
|
2011
|
-
groupId:
|
|
2011
|
+
groupId: f
|
|
2012
2012
|
}
|
|
2013
2013
|
});
|
|
2014
2014
|
});
|
|
2015
2015
|
}, !0), o._customProperties.forEach((r) => {
|
|
2016
|
-
|
|
2016
|
+
j(() => M(o[r]), (s, a) => {
|
|
2017
2017
|
t.notifyComponentUpdate(), t.sendInspectorState(U), be && t.addTimelineEvent({
|
|
2018
2018
|
layerId: ue,
|
|
2019
2019
|
event: {
|
|
@@ -2021,23 +2021,23 @@ function us(e, o) {
|
|
|
2021
2021
|
title: "Change",
|
|
2022
2022
|
subtitle: r,
|
|
2023
2023
|
data: {
|
|
2024
|
-
newValue:
|
|
2024
|
+
newValue: s,
|
|
2025
2025
|
oldValue: a
|
|
2026
2026
|
},
|
|
2027
2027
|
groupId: ie
|
|
2028
2028
|
}
|
|
2029
2029
|
});
|
|
2030
2030
|
}, { deep: !0 });
|
|
2031
|
-
}), o.$subscribe(({ events: r, type:
|
|
2031
|
+
}), o.$subscribe(({ events: r, type: s }, a) => {
|
|
2032
2032
|
if (t.notifyComponentUpdate(), t.sendInspectorState(U), !be)
|
|
2033
2033
|
return;
|
|
2034
2034
|
const u = {
|
|
2035
2035
|
time: n(),
|
|
2036
|
-
title:
|
|
2037
|
-
data:
|
|
2036
|
+
title: rl(s),
|
|
2037
|
+
data: al({ store: Y(o.$id) }, il(r)),
|
|
2038
2038
|
groupId: ie
|
|
2039
2039
|
};
|
|
2040
|
-
|
|
2040
|
+
s === ne.patchFunction ? u.subtitle = "⤵️" : s === ne.patchObject ? u.subtitle = "🧩" : r && !Array.isArray(r) && (u.subtitle = r.type), r && (u.data["rawEvent(s)"] = {
|
|
2041
2041
|
_custom: {
|
|
2042
2042
|
display: "DebuggerEvent",
|
|
2043
2043
|
type: "object",
|
|
@@ -2049,9 +2049,9 @@ function us(e, o) {
|
|
|
2049
2049
|
event: u
|
|
2050
2050
|
});
|
|
2051
2051
|
}, { detached: !0, flush: "sync" });
|
|
2052
|
-
const
|
|
2052
|
+
const l = o._hotUpdate;
|
|
2053
2053
|
o._hotUpdate = de((r) => {
|
|
2054
|
-
|
|
2054
|
+
l(r), t.addTimelineEvent({
|
|
2055
2055
|
layerId: ue,
|
|
2056
2056
|
event: {
|
|
2057
2057
|
time: n(),
|
|
@@ -2066,15 +2066,15 @@ function us(e, o) {
|
|
|
2066
2066
|
});
|
|
2067
2067
|
const { $dispose: i } = o;
|
|
2068
2068
|
o.$dispose = () => {
|
|
2069
|
-
i(), t.notifyComponentUpdate(), t.sendInspectorTree(U), t.sendInspectorState(U), t.getSettings().logStoreChanges &&
|
|
2070
|
-
}, t.notifyComponentUpdate(), t.sendInspectorTree(U), t.sendInspectorState(U), t.getSettings().logStoreChanges &&
|
|
2069
|
+
i(), t.notifyComponentUpdate(), t.sendInspectorTree(U), t.sendInspectorState(U), t.getSettings().logStoreChanges && H(`Disposed "${o.$id}" store 🗑`);
|
|
2070
|
+
}, t.notifyComponentUpdate(), t.sendInspectorTree(U), t.sendInspectorState(U), t.getSettings().logStoreChanges && H(`"${o.$id}" store installed 🆕`);
|
|
2071
2071
|
});
|
|
2072
2072
|
}
|
|
2073
2073
|
let on = 0, ie;
|
|
2074
2074
|
function bt(e, o, t) {
|
|
2075
|
-
const n = o.reduce((
|
|
2076
|
-
for (const
|
|
2077
|
-
e[
|
|
2075
|
+
const n = o.reduce((l, i) => (l[i] = K(e)[i], l), {});
|
|
2076
|
+
for (const l in n)
|
|
2077
|
+
e[l] = function() {
|
|
2078
2078
|
const i = on, r = t ? new Proxy(e, {
|
|
2079
2079
|
get(...a) {
|
|
2080
2080
|
return ie = i, Reflect.get(...a);
|
|
@@ -2084,29 +2084,29 @@ function bt(e, o, t) {
|
|
|
2084
2084
|
}
|
|
2085
2085
|
}) : e;
|
|
2086
2086
|
ie = i;
|
|
2087
|
-
const
|
|
2088
|
-
return ie = void 0,
|
|
2087
|
+
const s = n[l].apply(r, arguments);
|
|
2088
|
+
return ie = void 0, s;
|
|
2089
2089
|
};
|
|
2090
2090
|
}
|
|
2091
|
-
function
|
|
2091
|
+
function dl({ app: e, store: o, options: t }) {
|
|
2092
2092
|
if (o.$id.startsWith("__hot:"))
|
|
2093
2093
|
return;
|
|
2094
2094
|
o._isOptionsAPI = !!t.state, bt(o, Object.keys(t.actions), o._isOptionsAPI);
|
|
2095
2095
|
const n = o._hotUpdate;
|
|
2096
|
-
K(o)._hotUpdate = function(
|
|
2097
|
-
n.apply(this, arguments), bt(o, Object.keys(
|
|
2098
|
-
},
|
|
2096
|
+
K(o)._hotUpdate = function(l) {
|
|
2097
|
+
n.apply(this, arguments), bt(o, Object.keys(l._hmrPayload.actions), !!o._isOptionsAPI);
|
|
2098
|
+
}, cl(
|
|
2099
2099
|
e,
|
|
2100
2100
|
// FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
|
|
2101
2101
|
o
|
|
2102
2102
|
);
|
|
2103
2103
|
}
|
|
2104
|
-
function
|
|
2105
|
-
const e = $t(!0), o = e.run(() =>
|
|
2104
|
+
function fl() {
|
|
2105
|
+
const e = $t(!0), o = e.run(() => E({}));
|
|
2106
2106
|
let t = [], n = [];
|
|
2107
|
-
const
|
|
2107
|
+
const l = de({
|
|
2108
2108
|
install(i) {
|
|
2109
|
-
|
|
2109
|
+
Te(l), l._a = i, i.provide(Jt, l), i.config.globalProperties.$pinia = l, Se && ul(i, l), n.forEach((r) => t.push(r)), n = [];
|
|
2110
2110
|
},
|
|
2111
2111
|
use(i) {
|
|
2112
2112
|
return !this._a && !Wt ? n.push(i) : t.push(i), this;
|
|
@@ -2119,75 +2119,75 @@ function ds() {
|
|
|
2119
2119
|
_s: /* @__PURE__ */ new Map(),
|
|
2120
2120
|
state: o
|
|
2121
2121
|
});
|
|
2122
|
-
return
|
|
2122
|
+
return Se && typeof Proxy < "u" && l.use(dl), l;
|
|
2123
2123
|
}
|
|
2124
|
-
function
|
|
2124
|
+
function ln(e, o) {
|
|
2125
2125
|
for (const t in o) {
|
|
2126
2126
|
const n = o[t];
|
|
2127
2127
|
if (!(t in e))
|
|
2128
2128
|
continue;
|
|
2129
|
-
const
|
|
2130
|
-
fe(
|
|
2129
|
+
const l = e[t];
|
|
2130
|
+
fe(l) && fe(n) && !_e(n) && !nt(n) ? e[t] = ln(l, n) : e[t] = n;
|
|
2131
2131
|
}
|
|
2132
2132
|
return e;
|
|
2133
2133
|
}
|
|
2134
|
-
const
|
|
2134
|
+
const sn = () => {
|
|
2135
2135
|
};
|
|
2136
|
-
function Ct(e, o, t, n =
|
|
2136
|
+
function Ct(e, o, t, n = sn) {
|
|
2137
2137
|
e.push(o);
|
|
2138
|
-
const
|
|
2138
|
+
const l = () => {
|
|
2139
2139
|
const i = e.indexOf(o);
|
|
2140
2140
|
i > -1 && (e.splice(i, 1), n());
|
|
2141
2141
|
};
|
|
2142
|
-
return !t &&
|
|
2142
|
+
return !t && It() && et(l), l;
|
|
2143
2143
|
}
|
|
2144
2144
|
function ge(e, ...o) {
|
|
2145
2145
|
e.slice().forEach((t) => {
|
|
2146
2146
|
t(...o);
|
|
2147
2147
|
});
|
|
2148
2148
|
}
|
|
2149
|
-
const
|
|
2150
|
-
function
|
|
2149
|
+
const pl = (e) => e();
|
|
2150
|
+
function Qe(e, o) {
|
|
2151
2151
|
e instanceof Map && o instanceof Map && o.forEach((t, n) => e.set(n, t)), e instanceof Set && o instanceof Set && o.forEach(e.add, e);
|
|
2152
2152
|
for (const t in o) {
|
|
2153
2153
|
if (!o.hasOwnProperty(t))
|
|
2154
2154
|
continue;
|
|
2155
|
-
const n = o[t],
|
|
2156
|
-
fe(
|
|
2155
|
+
const n = o[t], l = e[t];
|
|
2156
|
+
fe(l) && fe(n) && e.hasOwnProperty(t) && !_e(n) && !nt(n) ? e[t] = Qe(l, n) : e[t] = n;
|
|
2157
2157
|
}
|
|
2158
2158
|
return e;
|
|
2159
2159
|
}
|
|
2160
|
-
const
|
|
2160
|
+
const vl = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
2161
2161
|
/* istanbul ignore next */
|
|
2162
2162
|
Symbol()
|
|
2163
2163
|
);
|
|
2164
|
-
function
|
|
2165
|
-
return !fe(e) || !e.hasOwnProperty(
|
|
2164
|
+
function hl(e) {
|
|
2165
|
+
return !fe(e) || !e.hasOwnProperty(vl);
|
|
2166
2166
|
}
|
|
2167
2167
|
const { assign: J } = Object;
|
|
2168
2168
|
function _t(e) {
|
|
2169
2169
|
return !!(_e(e) && e.effect);
|
|
2170
2170
|
}
|
|
2171
2171
|
function xt(e, o, t, n) {
|
|
2172
|
-
const { state:
|
|
2172
|
+
const { state: l, actions: i, getters: r } = o, s = t.state.value[e];
|
|
2173
2173
|
let a;
|
|
2174
2174
|
function u() {
|
|
2175
|
-
!
|
|
2176
|
-
const
|
|
2175
|
+
!s && (process.env.NODE_ENV === "production" || !n) && (t.state.value[e] = l ? l() : {});
|
|
2176
|
+
const f = process.env.NODE_ENV !== "production" && n ? (
|
|
2177
2177
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
2178
|
-
at(
|
|
2178
|
+
at(E(l ? l() : {}).value)
|
|
2179
2179
|
) : at(t.state.value[e]);
|
|
2180
|
-
return J(
|
|
2181
|
-
|
|
2182
|
-
const
|
|
2183
|
-
return r[
|
|
2184
|
-
})),
|
|
2180
|
+
return J(f, i, Object.keys(r || {}).reduce((p, m) => (process.env.NODE_ENV !== "production" && m in f && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${m}" in store "${e}".`), p[m] = de(S(() => {
|
|
2181
|
+
Te(t);
|
|
2182
|
+
const x = t._s.get(e);
|
|
2183
|
+
return r[m].call(x, x);
|
|
2184
|
+
})), p), {}));
|
|
2185
2185
|
}
|
|
2186
|
-
return a =
|
|
2186
|
+
return a = Xe(e, u, o, t, n, !0), a;
|
|
2187
2187
|
}
|
|
2188
|
-
function
|
|
2188
|
+
function Xe(e, o, t = {}, n, l, i) {
|
|
2189
2189
|
let r;
|
|
2190
|
-
const
|
|
2190
|
+
const s = J({ actions: {} }, t);
|
|
2191
2191
|
if (process.env.NODE_ENV !== "production" && !n._e.active)
|
|
2192
2192
|
throw new Error("Pinia destroyed");
|
|
2193
2193
|
const a = {
|
|
@@ -2195,94 +2195,94 @@ function Qe(e, o, t = {}, n, s, i) {
|
|
|
2195
2195
|
// flush: 'post',
|
|
2196
2196
|
};
|
|
2197
2197
|
process.env.NODE_ENV !== "production" && !Wt && (a.onTrigger = (c) => {
|
|
2198
|
-
u ?
|
|
2198
|
+
u ? x = c : u == !1 && !b._hotUpdating && (Array.isArray(x) ? x.push(c) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
2199
2199
|
});
|
|
2200
|
-
let u,
|
|
2201
|
-
const
|
|
2202
|
-
!i && !
|
|
2203
|
-
const
|
|
2204
|
-
let
|
|
2205
|
-
function
|
|
2200
|
+
let u, f, p = [], m = [], x;
|
|
2201
|
+
const v = n.state.value[e];
|
|
2202
|
+
!i && !v && (process.env.NODE_ENV === "production" || !l) && (n.state.value[e] = {});
|
|
2203
|
+
const h = E({});
|
|
2204
|
+
let V;
|
|
2205
|
+
function A(c) {
|
|
2206
2206
|
let d;
|
|
2207
|
-
u =
|
|
2207
|
+
u = f = !1, process.env.NODE_ENV !== "production" && (x = []), typeof c == "function" ? (c(n.state.value[e]), d = {
|
|
2208
2208
|
type: ne.patchFunction,
|
|
2209
2209
|
storeId: e,
|
|
2210
|
-
events:
|
|
2211
|
-
}) : (
|
|
2210
|
+
events: x
|
|
2211
|
+
}) : (Qe(n.state.value[e], c), d = {
|
|
2212
2212
|
type: ne.patchObject,
|
|
2213
2213
|
payload: c,
|
|
2214
2214
|
storeId: e,
|
|
2215
|
-
events:
|
|
2215
|
+
events: x
|
|
2216
2216
|
});
|
|
2217
|
-
const
|
|
2217
|
+
const y = V = Symbol();
|
|
2218
2218
|
Q().then(() => {
|
|
2219
|
-
|
|
2220
|
-
}),
|
|
2219
|
+
V === y && (u = !0);
|
|
2220
|
+
}), f = !0, ge(p, d, n.state.value[e]);
|
|
2221
2221
|
}
|
|
2222
|
-
const
|
|
2223
|
-
const { state: d } = t,
|
|
2224
|
-
this.$patch((
|
|
2225
|
-
J(
|
|
2222
|
+
const T = i ? function() {
|
|
2223
|
+
const { state: d } = t, y = d ? d() : {};
|
|
2224
|
+
this.$patch((O) => {
|
|
2225
|
+
J(O, y);
|
|
2226
2226
|
});
|
|
2227
2227
|
} : (
|
|
2228
2228
|
/* istanbul ignore next */
|
|
2229
2229
|
process.env.NODE_ENV !== "production" ? () => {
|
|
2230
2230
|
throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
|
|
2231
|
-
} :
|
|
2231
|
+
} : sn
|
|
2232
2232
|
);
|
|
2233
|
-
function
|
|
2234
|
-
r.stop(),
|
|
2233
|
+
function R() {
|
|
2234
|
+
r.stop(), p = [], m = [], n._s.delete(e);
|
|
2235
2235
|
}
|
|
2236
2236
|
function D(c, d) {
|
|
2237
2237
|
return function() {
|
|
2238
|
-
|
|
2239
|
-
const
|
|
2240
|
-
function
|
|
2241
|
-
|
|
2238
|
+
Te(n);
|
|
2239
|
+
const y = Array.from(arguments), O = [], k = [];
|
|
2240
|
+
function N(B) {
|
|
2241
|
+
O.push(B);
|
|
2242
2242
|
}
|
|
2243
|
-
function G(
|
|
2244
|
-
|
|
2243
|
+
function G(B) {
|
|
2244
|
+
k.push(B);
|
|
2245
2245
|
}
|
|
2246
|
-
ge(
|
|
2247
|
-
args:
|
|
2246
|
+
ge(m, {
|
|
2247
|
+
args: y,
|
|
2248
2248
|
name: c,
|
|
2249
2249
|
store: b,
|
|
2250
|
-
after:
|
|
2250
|
+
after: N,
|
|
2251
2251
|
onError: G
|
|
2252
2252
|
});
|
|
2253
2253
|
let q;
|
|
2254
2254
|
try {
|
|
2255
|
-
q = d.apply(this && this.$id === e ? this : b,
|
|
2256
|
-
} catch (
|
|
2257
|
-
throw ge(
|
|
2255
|
+
q = d.apply(this && this.$id === e ? this : b, y);
|
|
2256
|
+
} catch (B) {
|
|
2257
|
+
throw ge(k, B), B;
|
|
2258
2258
|
}
|
|
2259
|
-
return q instanceof Promise ? q.then((
|
|
2259
|
+
return q instanceof Promise ? q.then((B) => (ge(O, B), B)).catch((B) => (ge(k, B), Promise.reject(B))) : (ge(O, q), q);
|
|
2260
2260
|
};
|
|
2261
2261
|
}
|
|
2262
2262
|
const _ = /* @__PURE__ */ de({
|
|
2263
2263
|
actions: {},
|
|
2264
2264
|
getters: {},
|
|
2265
2265
|
state: [],
|
|
2266
|
-
hotState:
|
|
2266
|
+
hotState: h
|
|
2267
2267
|
}), L = {
|
|
2268
2268
|
_p: n,
|
|
2269
2269
|
// _s: scope,
|
|
2270
2270
|
$id: e,
|
|
2271
|
-
$onAction: Ct.bind(null,
|
|
2272
|
-
$patch:
|
|
2273
|
-
$reset:
|
|
2271
|
+
$onAction: Ct.bind(null, m),
|
|
2272
|
+
$patch: A,
|
|
2273
|
+
$reset: T,
|
|
2274
2274
|
$subscribe(c, d = {}) {
|
|
2275
|
-
const
|
|
2276
|
-
(d.flush === "sync" ?
|
|
2275
|
+
const y = Ct(p, c, d.detached, () => O()), O = r.run(() => j(() => n.state.value[e], (k) => {
|
|
2276
|
+
(d.flush === "sync" ? f : u) && c({
|
|
2277
2277
|
storeId: e,
|
|
2278
2278
|
type: ne.direct,
|
|
2279
|
-
events:
|
|
2280
|
-
},
|
|
2279
|
+
events: x
|
|
2280
|
+
}, k);
|
|
2281
2281
|
}, J({}, a, d)));
|
|
2282
|
-
return
|
|
2282
|
+
return y;
|
|
2283
2283
|
},
|
|
2284
|
-
$dispose:
|
|
2285
|
-
}, b = Ot(process.env.NODE_ENV !== "production" ||
|
|
2284
|
+
$dispose: R
|
|
2285
|
+
}, b = Ot(process.env.NODE_ENV !== "production" || Se ? J(
|
|
2286
2286
|
{
|
|
2287
2287
|
_hmrPayload: _,
|
|
2288
2288
|
_customProperties: de(/* @__PURE__ */ new Set())
|
|
@@ -2293,58 +2293,58 @@ function Qe(e, o, t = {}, n, s, i) {
|
|
|
2293
2293
|
// setupStore
|
|
2294
2294
|
) : L);
|
|
2295
2295
|
n._s.set(e, b);
|
|
2296
|
-
const
|
|
2297
|
-
for (const c in
|
|
2298
|
-
const d =
|
|
2299
|
-
if (_e(d) && !_t(d) ||
|
|
2300
|
-
process.env.NODE_ENV !== "production" &&
|
|
2296
|
+
const I = (n._a && n._a.runWithContext || pl)(() => n._e.run(() => (r = $t()).run(o)));
|
|
2297
|
+
for (const c in I) {
|
|
2298
|
+
const d = I[c];
|
|
2299
|
+
if (_e(d) && !_t(d) || nt(d))
|
|
2300
|
+
process.env.NODE_ENV !== "production" && l ? ke(h.value, c, We(I, c)) : i || (v && hl(d) && (_e(d) ? d.value = v[c] : Qe(d, v[c])), n.state.value[e][c] = d), process.env.NODE_ENV !== "production" && _.state.push(c);
|
|
2301
2301
|
else if (typeof d == "function") {
|
|
2302
|
-
const
|
|
2303
|
-
|
|
2302
|
+
const y = process.env.NODE_ENV !== "production" && l ? d : D(c, d);
|
|
2303
|
+
I[c] = y, process.env.NODE_ENV !== "production" && (_.actions[c] = d), s.actions[c] = d;
|
|
2304
2304
|
} else process.env.NODE_ENV !== "production" && _t(d) && (_.getters[c] = i ? (
|
|
2305
2305
|
// @ts-expect-error
|
|
2306
2306
|
t.getters[c]
|
|
2307
|
-
) : d, Be && (
|
|
2308
|
-
(
|
|
2307
|
+
) : d, Be && (I._getters || // @ts-expect-error: same
|
|
2308
|
+
(I._getters = de([]))).push(c));
|
|
2309
2309
|
}
|
|
2310
|
-
if (J(b,
|
|
2311
|
-
get: () => process.env.NODE_ENV !== "production" &&
|
|
2310
|
+
if (J(b, I), J(K(b), I), Object.defineProperty(b, "$state", {
|
|
2311
|
+
get: () => process.env.NODE_ENV !== "production" && l ? h.value : n.state.value[e],
|
|
2312
2312
|
set: (c) => {
|
|
2313
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
2313
|
+
if (process.env.NODE_ENV !== "production" && l)
|
|
2314
2314
|
throw new Error("cannot set hotState");
|
|
2315
|
-
|
|
2315
|
+
A((d) => {
|
|
2316
2316
|
J(d, c);
|
|
2317
2317
|
});
|
|
2318
2318
|
}
|
|
2319
2319
|
}), process.env.NODE_ENV !== "production" && (b._hotUpdate = de((c) => {
|
|
2320
2320
|
b._hotUpdating = !0, c._hmrPayload.state.forEach((d) => {
|
|
2321
2321
|
if (d in b.$state) {
|
|
2322
|
-
const
|
|
2323
|
-
typeof
|
|
2322
|
+
const y = c.$state[d], O = b.$state[d];
|
|
2323
|
+
typeof y == "object" && fe(y) && fe(O) ? ln(y, O) : c.$state[d] = O;
|
|
2324
2324
|
}
|
|
2325
|
-
ke(b, d,
|
|
2325
|
+
ke(b, d, We(c.$state, d));
|
|
2326
2326
|
}), Object.keys(b.$state).forEach((d) => {
|
|
2327
|
-
d in c.$state ||
|
|
2328
|
-
}), u = !1,
|
|
2327
|
+
d in c.$state || Je(b, d);
|
|
2328
|
+
}), u = !1, f = !1, n.state.value[e] = We(c._hmrPayload, "hotState"), f = !0, Q().then(() => {
|
|
2329
2329
|
u = !0;
|
|
2330
2330
|
});
|
|
2331
2331
|
for (const d in c._hmrPayload.actions) {
|
|
2332
|
-
const
|
|
2333
|
-
ke(b, d, D(d,
|
|
2332
|
+
const y = c[d];
|
|
2333
|
+
ke(b, d, D(d, y));
|
|
2334
2334
|
}
|
|
2335
2335
|
for (const d in c._hmrPayload.getters) {
|
|
2336
|
-
const
|
|
2336
|
+
const y = c._hmrPayload.getters[d], O = i ? (
|
|
2337
2337
|
// special handling of options api
|
|
2338
|
-
|
|
2339
|
-
) :
|
|
2340
|
-
ke(b, d,
|
|
2338
|
+
S(() => (Te(n), y.call(b, b)))
|
|
2339
|
+
) : y;
|
|
2340
|
+
ke(b, d, O);
|
|
2341
2341
|
}
|
|
2342
2342
|
Object.keys(b._hmrPayload.getters).forEach((d) => {
|
|
2343
|
-
d in c._hmrPayload.getters ||
|
|
2343
|
+
d in c._hmrPayload.getters || Je(b, d);
|
|
2344
2344
|
}), Object.keys(b._hmrPayload.actions).forEach((d) => {
|
|
2345
|
-
d in c._hmrPayload.actions ||
|
|
2345
|
+
d in c._hmrPayload.actions || Je(b, d);
|
|
2346
2346
|
}), b._hmrPayload = c._hmrPayload, b._getters = c._getters, b._hotUpdating = !1;
|
|
2347
|
-
})),
|
|
2347
|
+
})), Se) {
|
|
2348
2348
|
const c = {
|
|
2349
2349
|
writable: !0,
|
|
2350
2350
|
configurable: !0,
|
|
@@ -2356,63 +2356,63 @@ function Qe(e, o, t = {}, n, s, i) {
|
|
|
2356
2356
|
});
|
|
2357
2357
|
}
|
|
2358
2358
|
return n._p.forEach((c) => {
|
|
2359
|
-
if (
|
|
2359
|
+
if (Se) {
|
|
2360
2360
|
const d = r.run(() => c({
|
|
2361
2361
|
store: b,
|
|
2362
2362
|
app: n._a,
|
|
2363
2363
|
pinia: n,
|
|
2364
|
-
options:
|
|
2364
|
+
options: s
|
|
2365
2365
|
}));
|
|
2366
|
-
Object.keys(d || {}).forEach((
|
|
2366
|
+
Object.keys(d || {}).forEach((y) => b._customProperties.add(y)), J(b, d);
|
|
2367
2367
|
} else
|
|
2368
2368
|
J(b, r.run(() => c({
|
|
2369
2369
|
store: b,
|
|
2370
2370
|
app: n._a,
|
|
2371
2371
|
pinia: n,
|
|
2372
|
-
options:
|
|
2372
|
+
options: s
|
|
2373
2373
|
})));
|
|
2374
2374
|
}), process.env.NODE_ENV !== "production" && b.$state && typeof b.$state == "object" && typeof b.$state.constructor == "function" && !b.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
2375
2375
|
state: () => new MyClass()
|
|
2376
|
-
Found in store "${b.$id}".`),
|
|
2376
|
+
Found in store "${b.$id}".`), v && i && t.hydrate && t.hydrate(b.$state, v), u = !0, f = !0, b;
|
|
2377
2377
|
}
|
|
2378
|
-
function
|
|
2379
|
-
let n,
|
|
2378
|
+
function He(e, o, t) {
|
|
2379
|
+
let n, l;
|
|
2380
2380
|
const i = typeof o == "function";
|
|
2381
2381
|
if (typeof e == "string")
|
|
2382
|
-
n = e,
|
|
2383
|
-
else if (
|
|
2382
|
+
n = e, l = i ? t : o;
|
|
2383
|
+
else if (l = e, n = e.id, process.env.NODE_ENV !== "production" && typeof n != "string")
|
|
2384
2384
|
throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
|
|
2385
|
-
function r(
|
|
2386
|
-
const u =
|
|
2387
|
-
if (
|
|
2385
|
+
function r(s, a) {
|
|
2386
|
+
const u = hn();
|
|
2387
|
+
if (s = // in test mode, ignore the argument provided as we can always retrieve a
|
|
2388
2388
|
// pinia instance with getActivePinia()
|
|
2389
|
-
(process.env.NODE_ENV === "test" && we && we._testing ? null :
|
|
2389
|
+
(process.env.NODE_ENV === "test" && we && we._testing ? null : s) || (u ? Ie(Jt, null) : null), s && Te(s), process.env.NODE_ENV !== "production" && !we)
|
|
2390
2390
|
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
2391
2391
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
2392
2392
|
This will fail in production.`);
|
|
2393
|
-
|
|
2394
|
-
const
|
|
2393
|
+
s = we, s._s.has(n) || (i ? Xe(n, o, l, s) : xt(n, l, s), process.env.NODE_ENV !== "production" && (r._pinia = s));
|
|
2394
|
+
const f = s._s.get(n);
|
|
2395
2395
|
if (process.env.NODE_ENV !== "production" && a) {
|
|
2396
|
-
const
|
|
2397
|
-
a._hotUpdate(
|
|
2396
|
+
const p = "__hot:" + n, m = i ? Xe(p, o, l, s, !0) : xt(p, J({}, l), s, !0);
|
|
2397
|
+
a._hotUpdate(m), delete s.state.value[p], s._s.delete(p);
|
|
2398
2398
|
}
|
|
2399
2399
|
if (process.env.NODE_ENV !== "production" && Be) {
|
|
2400
|
-
const
|
|
2401
|
-
if (
|
|
2400
|
+
const p = Tt();
|
|
2401
|
+
if (p && p.proxy && // avoid adding stores that are just built for hot module replacement
|
|
2402
2402
|
!a) {
|
|
2403
|
-
const
|
|
2404
|
-
|
|
2403
|
+
const m = p.proxy, x = "_pStores" in m ? m._pStores : m._pStores = {};
|
|
2404
|
+
x[n] = f;
|
|
2405
2405
|
}
|
|
2406
2406
|
}
|
|
2407
|
-
return
|
|
2407
|
+
return f;
|
|
2408
2408
|
}
|
|
2409
2409
|
return r.$id = n, r;
|
|
2410
2410
|
}
|
|
2411
|
-
const
|
|
2412
|
-
const e =
|
|
2411
|
+
const ze = He("language", () => {
|
|
2412
|
+
const e = E("auto"), o = E("en"), t = E({
|
|
2413
2413
|
src: [],
|
|
2414
2414
|
target: []
|
|
2415
|
-
}), n =
|
|
2415
|
+
}), n = S(() => t.value.src[e.value]), l = S(() => t.value.target[o.value]);
|
|
2416
2416
|
function i(a, u) {
|
|
2417
2417
|
e.value = a == null ? void 0 : a.src, o.value = a == null ? void 0 : a.target, t.value = u;
|
|
2418
2418
|
}
|
|
@@ -2421,127 +2421,170 @@ const He = it("language", () => {
|
|
|
2421
2421
|
const a = e.value;
|
|
2422
2422
|
e.value = o.value, o.value = a;
|
|
2423
2423
|
}
|
|
2424
|
-
function
|
|
2424
|
+
function s(a) {
|
|
2425
2425
|
return t.value.src[a] || t.value.target[a];
|
|
2426
2426
|
}
|
|
2427
|
-
return { languages: t, src: e, target: o, srcLabel: n, targetLabel:
|
|
2428
|
-
}),
|
|
2427
|
+
return { languages: t, src: e, target: o, srcLabel: n, targetLabel: l, init: i, swap: r, getLabel: s };
|
|
2428
|
+
}), ml = {
|
|
2429
2429
|
key: 0,
|
|
2430
2430
|
class: "flex"
|
|
2431
|
-
},
|
|
2431
|
+
}, gl = {
|
|
2432
2432
|
__name: "Selects",
|
|
2433
2433
|
setup(e) {
|
|
2434
|
-
const o =
|
|
2434
|
+
const o = ze();
|
|
2435
2435
|
function t() {
|
|
2436
2436
|
o.swap();
|
|
2437
2437
|
}
|
|
2438
|
-
return (n,
|
|
2439
|
-
|
|
2440
|
-
modelValue:
|
|
2441
|
-
"onUpdate:modelValue":
|
|
2442
|
-
languages:
|
|
2438
|
+
return (n, l) => M(o).languages ? (w(), $("div", ml, [
|
|
2439
|
+
F(mt, {
|
|
2440
|
+
modelValue: M(o).src,
|
|
2441
|
+
"onUpdate:modelValue": l[0] || (l[0] = (i) => M(o).src = i),
|
|
2442
|
+
languages: M(o).languages.src,
|
|
2443
2443
|
class: "grow"
|
|
2444
2444
|
}, null, 8, ["modelValue", "languages"]),
|
|
2445
|
-
|
|
2446
|
-
isBidirect:
|
|
2445
|
+
F(Bo, {
|
|
2446
|
+
isBidirect: M(o).src !== "auto",
|
|
2447
2447
|
class: "grow-0 mx-3",
|
|
2448
2448
|
onSwap: t
|
|
2449
2449
|
}, null, 8, ["isBidirect"]),
|
|
2450
|
-
|
|
2451
|
-
modelValue:
|
|
2452
|
-
"onUpdate:modelValue":
|
|
2453
|
-
languages:
|
|
2450
|
+
F(mt, {
|
|
2451
|
+
modelValue: M(o).target,
|
|
2452
|
+
"onUpdate:modelValue": l[1] || (l[1] = (i) => M(o).target = i),
|
|
2453
|
+
languages: M(o).languages.target,
|
|
2454
2454
|
class: "grow"
|
|
2455
2455
|
}, null, 8, ["modelValue", "languages"])
|
|
2456
|
-
])) :
|
|
2456
|
+
])) : ee("", !0);
|
|
2457
2457
|
}
|
|
2458
|
-
},
|
|
2458
|
+
}, bl = {
|
|
2459
2459
|
INPUT_MAX_LENGTH: 5e3,
|
|
2460
2460
|
INPUT_DEBOUNCE: 500
|
|
2461
|
-
},
|
|
2461
|
+
}, Ue = (e, o) => {
|
|
2462
2462
|
const t = e.__vccOpts || e;
|
|
2463
|
-
for (const [n,
|
|
2464
|
-
t[n] =
|
|
2463
|
+
for (const [n, l] of o)
|
|
2464
|
+
t[n] = l;
|
|
2465
2465
|
return t;
|
|
2466
|
-
},
|
|
2467
|
-
function
|
|
2468
|
-
return
|
|
2466
|
+
}, Cl = {}, _l = { class: "mr-2 loading loading-dots loading-xs" };
|
|
2467
|
+
function xl(e, o) {
|
|
2468
|
+
return w(), $("span", _l);
|
|
2469
2469
|
}
|
|
2470
|
-
const
|
|
2471
|
-
|
|
2470
|
+
const yl = /* @__PURE__ */ Ue(Cl, [["render", xl]]), wl = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.33325%204.66667H3.51125C3.82693%204.6667%204.13239%204.55473%204.37325%204.35067L6.83392%202.26667C6.99592%202.12953%207.19374%202.04156%207.40407%202.01312C7.61441%201.98468%207.82849%202.01696%208.02109%202.10615C8.21369%202.19534%208.37678%202.33772%208.49114%202.51652C8.60551%202.69532%208.66638%202.90309%208.66659%203.11534V12.8847C8.66649%2013.097%208.60565%2013.305%208.49125%2013.4839C8.37685%2013.6628%208.21367%2013.8053%208.02094%2013.8945C7.82822%2013.9837%207.614%2014.0159%207.40356%2013.9874C7.19312%2013.9588%206.99523%2013.8707%206.83325%2013.7333L4.37325%2011.6487C4.13229%2011.4449%203.82685%2011.3331%203.51125%2011.3333H2.33325C2.06804%2011.3333%201.81368%2011.228%201.62615%2011.0404C1.43861%2010.8529%201.33325%2010.5986%201.33325%2010.3333V5.66667C1.33325%205.40145%201.43861%205.1471%201.62615%204.95956C1.81368%204.77203%202.06804%204.66667%202.33325%204.66667ZM11.1779%2011.18C11.5969%2010.763%2011.9294%2010.2674%2012.1562%209.72156C12.3831%209.17572%2012.4999%208.59044%2012.4999%207.99934C12.4999%207.40823%2012.3831%206.82295%2012.1562%206.27711C11.9294%205.73127%2011.5969%205.23564%2011.1779%204.81867C11.1317%204.77098%2011.0765%204.73297%2011.0155%204.70686C10.9544%204.68075%2010.8888%204.66705%2010.8224%204.66657C10.756%204.66609%2010.6902%204.67883%2010.6288%204.70406C10.5674%204.72929%2010.5116%204.76649%2010.4647%204.8135C10.4179%204.86051%2010.3808%204.91639%2010.3558%204.97787C10.3307%205.03935%2010.3181%205.10521%2010.3188%205.17159C10.3195%205.23798%2010.3334%205.30357%2010.3597%205.36453C10.3859%205.42549%2010.4241%205.48061%2010.4719%205.52667C10.7977%205.85079%2011.0562%206.23609%2011.2326%206.66043C11.409%207.08477%2011.4998%207.53979%2011.4998%207.99934C11.4998%208.45888%2011.409%208.9139%2011.2326%209.33824C11.0562%209.76258%2010.7977%2010.1479%2010.4719%2010.472C10.4241%2010.5181%2010.3859%2010.5732%2010.3597%2010.6341C10.3334%2010.6951%2010.3195%2010.7607%2010.3188%2010.8271C10.3181%2010.8935%2010.3307%2010.9593%2010.3558%2011.0208C10.3808%2011.0823%2010.4179%2011.1382%2010.4647%2011.1852C10.5116%2011.2322%2010.5674%2011.2694%2010.6288%2011.2946C10.6902%2011.3198%2010.756%2011.3326%2010.8224%2011.3321C10.8888%2011.3316%2010.9544%2011.3179%2011.0155%2011.2918C11.0765%2011.2657%2011.1317%2011.2277%2011.1779%2011.18ZM12.7113%2013.2127C12.6123%2013.2126%2012.5157%2013.1832%2012.4335%2013.1281C12.3513%2013.0731%2012.2873%2012.9949%2012.2495%2012.9035C12.2118%2012.8121%2012.202%2012.7115%2012.2214%2012.6146C12.2408%2012.5176%2012.2886%2012.4285%2012.3586%2012.3587C12.9317%2011.7866%2013.3865%2011.1071%2013.6967%2010.359C14.0069%209.61101%2014.1666%208.80915%2014.1666%207.99934C14.1666%207.18952%2014.0069%206.38766%2013.6967%205.63963C13.3865%204.8916%2012.9317%204.2121%2012.3586%203.64C12.3122%203.59351%2012.2754%203.53834%2012.2503%203.47764C12.2252%203.41693%2012.2124%203.35188%2012.2124%203.2862C12.2125%203.22052%2012.2255%203.15549%2012.2507%203.09483C12.2759%203.03417%2012.3128%202.97907%2012.3593%202.93267C12.4057%202.88627%2012.4609%202.84948%2012.5216%202.8244C12.5823%202.79932%2012.6474%202.78645%2012.7131%202.78651C12.7787%202.78657%2012.8438%202.79957%2012.9044%202.82476C12.9651%202.84995%2013.0202%202.88685%2013.0666%202.93334C13.7327%203.59825%2014.2612%204.38801%2014.6218%205.25741C14.9824%206.12681%2015.168%207.05879%2015.168%208C15.168%208.94122%2014.9824%209.87319%2014.6218%2010.7426C14.2612%2011.612%2013.7327%2012.4018%2013.0666%2013.0667C13.02%2013.1134%2012.9646%2013.1504%2012.9036%2013.1756C12.8426%2013.2007%2012.7772%2013.2129%2012.7113%2013.2127Z'%20fill='%233B5695'/%3e%3c/svg%3e", Sl = "data:image/svg+xml,%3csvg%20class='swap-on%20fill-current%20h-4%20w-4'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill-rule='evenodd'%20d='M4.5%207.5a3%203%200%200%201%203-3h9a3%203%200%200%201%203%203v9a3%203%200%200%201-3%203h-9a3%203%200%200%201-3-3v-9Z'%20clip-rule='evenodd'%20fill='%238595BE'/%3e%3c/svg%3e", rn = He("tts", () => {
|
|
2471
|
+
const e = E({
|
|
2472
|
+
src: null,
|
|
2473
|
+
target: null
|
|
2474
|
+
});
|
|
2475
|
+
function o(l) {
|
|
2476
|
+
l.src && (e.value.src = l.src), l.target && (e.value.target = l.target);
|
|
2477
|
+
}
|
|
2478
|
+
function t(l) {
|
|
2479
|
+
if (l === "src") return e.value.src;
|
|
2480
|
+
if (l === "target") return e.value.target;
|
|
2481
|
+
}
|
|
2482
|
+
function n() {
|
|
2483
|
+
e.value = {
|
|
2484
|
+
src: null,
|
|
2485
|
+
target: null
|
|
2486
|
+
};
|
|
2487
|
+
}
|
|
2488
|
+
return {
|
|
2489
|
+
tts: e,
|
|
2490
|
+
set: o,
|
|
2491
|
+
get: t,
|
|
2492
|
+
reset: n
|
|
2493
|
+
};
|
|
2494
|
+
}), El = /* @__PURE__ */ C("img", {
|
|
2495
|
+
src: wl,
|
|
2472
2496
|
alt: "Play"
|
|
2473
|
-
}, null, -1),
|
|
2474
|
-
|
|
2475
|
-
],
|
|
2476
|
-
src:
|
|
2497
|
+
}, null, -1), Ol = [
|
|
2498
|
+
El
|
|
2499
|
+
], $l = /* @__PURE__ */ C("img", {
|
|
2500
|
+
src: Sl,
|
|
2477
2501
|
alt: "Stop"
|
|
2478
|
-
}, null, -1),
|
|
2479
|
-
|
|
2480
|
-
],
|
|
2502
|
+
}, null, -1), Tl = [
|
|
2503
|
+
$l
|
|
2504
|
+
], Il = {
|
|
2481
2505
|
__name: "SpeakBtn",
|
|
2482
2506
|
props: {
|
|
2483
|
-
|
|
2507
|
+
type: {
|
|
2484
2508
|
type: String,
|
|
2485
2509
|
default: ""
|
|
2486
2510
|
}
|
|
2487
2511
|
},
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2512
|
+
emits: ["loadTTS"],
|
|
2513
|
+
setup(e, { emit: o }) {
|
|
2514
|
+
const t = rn(), n = e, l = o, i = S(() => t.tts[n.type]), r = E(!1), s = new Audio();
|
|
2515
|
+
j(
|
|
2516
|
+
i,
|
|
2517
|
+
() => {
|
|
2518
|
+
if (!i.value) {
|
|
2519
|
+
r.value = !1;
|
|
2520
|
+
return;
|
|
2521
|
+
}
|
|
2522
|
+
u();
|
|
2523
|
+
},
|
|
2524
|
+
{ immediate: !0 }
|
|
2525
|
+
);
|
|
2526
|
+
function a() {
|
|
2527
|
+
if (i.value) {
|
|
2528
|
+
u();
|
|
2529
|
+
return;
|
|
2530
|
+
}
|
|
2531
|
+
r.value = !0, l("loadTTS");
|
|
2532
|
+
}
|
|
2533
|
+
function u() {
|
|
2534
|
+
i.value && (s.src = i.value, r.value = !0, s.play().catch(() => {
|
|
2535
|
+
r.value = !1;
|
|
2493
2536
|
}));
|
|
2494
2537
|
}
|
|
2495
|
-
function
|
|
2496
|
-
|
|
2538
|
+
function f() {
|
|
2539
|
+
s.pause(), s.currentTime = 0, r.value = !1;
|
|
2497
2540
|
}
|
|
2498
|
-
return
|
|
2499
|
-
|
|
2500
|
-
}, (
|
|
2541
|
+
return s.onended = () => {
|
|
2542
|
+
r.value = !1;
|
|
2543
|
+
}, (p, m) => r.value ? (w(), $("button", {
|
|
2501
2544
|
key: 1,
|
|
2502
2545
|
class: "btn btn-xs btn-ghost btn-circle",
|
|
2503
|
-
onClick: ut(
|
|
2504
|
-
},
|
|
2546
|
+
onClick: ut(f, ["prevent"])
|
|
2547
|
+
}, Tl)) : (w(), $("button", {
|
|
2505
2548
|
key: 0,
|
|
2506
2549
|
class: "btn btn-xs btn-ghost btn-circle",
|
|
2507
|
-
onClick: ut(
|
|
2508
|
-
},
|
|
2550
|
+
onClick: ut(a, ["prevent"])
|
|
2551
|
+
}, Ol));
|
|
2509
2552
|
}
|
|
2510
|
-
},
|
|
2511
|
-
src:
|
|
2553
|
+
}, Ll = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.19102%203.19102C3.44571%202.93633%203.85864%202.93633%204.11333%203.19102L12.809%2011.8867C13.0637%2012.1414%2013.0637%2012.5543%2012.809%2012.809C12.5543%2013.0637%2012.1414%2013.0637%2011.8867%2012.809L3.19102%204.11333C2.93633%203.85864%202.93633%203.44571%203.19102%203.19102Z'%20fill='%231A1F2A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.809%203.19102C13.0637%203.44571%2013.0637%203.85864%2012.809%204.11333L4.11333%2012.809C3.85864%2013.0637%203.44571%2013.0637%203.19102%2012.809C2.93633%2012.5543%202.93633%2012.1414%203.19102%2011.8867L11.8867%203.19102C12.1414%202.93633%2012.5543%202.93633%2012.809%203.19102Z'%20fill='%231A1F2A'/%3e%3c/svg%3e", Pl = {}, Vl = { class: "btn btn-xs btn-circle btn-ghost" }, kl = /* @__PURE__ */ C("img", {
|
|
2554
|
+
src: Ll,
|
|
2512
2555
|
alt: "Clear",
|
|
2513
2556
|
class: "w-4"
|
|
2514
|
-
}, null, -1),
|
|
2515
|
-
|
|
2557
|
+
}, null, -1), Ml = [
|
|
2558
|
+
kl
|
|
2516
2559
|
];
|
|
2517
|
-
function
|
|
2518
|
-
return
|
|
2560
|
+
function Rl(e, o) {
|
|
2561
|
+
return w(), $("button", Vl, Ml);
|
|
2519
2562
|
}
|
|
2520
|
-
const
|
|
2563
|
+
const Nl = /* @__PURE__ */ Ue(Pl, [["render", Rl]]), Al = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.47207%201.31905C7.57125%201.12371%207.77589%201%208.00001%201C8.22413%201%208.42877%201.12367%208.52795%201.31905L10.3721%204.95175L14.4959%205.53427C14.7177%205.5656%2014.9019%205.7166%2014.9712%205.9238C15.0404%206.13101%2014.9827%206.35843%2014.8222%206.51049L11.8382%209.33816L12.5427%2013.3309C12.5806%2013.5456%2012.4897%2013.7626%2012.3084%2013.8906C12.1272%2014.0187%2011.8868%2014.0356%2011.6884%2013.9342L8.00004%2012.0491L4.31158%2013.9343C4.11323%2014.0356%203.87286%2014.0187%203.69157%2013.8907C3.51028%2013.7627%203.4195%2013.5457%203.45736%2013.3309L4.1618%209.33819L1.17781%206.51052C1.01735%206.35846%200.959571%206.13101%201.02884%205.92383C1.09807%205.71663%201.28232%205.56563%201.50409%205.53431L5.62787%204.95178L7.47207%201.31905Z'%20fill='%23FFC857'/%3e%3c/svg%3e", Dl = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.9491%205.89315C14.8278%205.53128%2014.5111%205.27252%2014.1226%205.21783L10.5264%204.7114L8.91813%201.55315C8.74435%201.21195%208.39257%201%207.99998%201C7.60739%201%207.25557%201.21195%207.08183%201.55315L5.47358%204.7114L1.8774%205.21783C1.48888%205.27252%201.17219%205.53128%201.05086%205.89315C0.929554%206.25501%201.02881%206.64477%201.30993%206.91038L3.91217%209.36871L3.29786%2012.8399C3.2315%2013.215%203.38755%2013.5868%203.7052%2013.8105C3.88128%2013.9344%204.08938%2014%204.30704%2014C4.47232%2014%204.63705%2013.9606%204.78341%2013.886L7.99995%2012.2471L11.2165%2013.886C11.3628%2013.9606%2011.5276%2014%2011.6929%2014C11.9106%2014%2012.1187%2013.9345%2012.2948%2013.8105C12.6124%2013.5868%2012.7685%2013.215%2012.7021%2012.84L12.0878%209.36871L14.6901%206.91035C14.9712%206.64477%2015.0704%206.25498%2014.9491%205.89315ZM14.0266%206.25082L11.2455%208.87813C11.1335%208.98392%2011.0824%209.13637%2011.1089%209.28575L11.7654%2012.9956C11.7701%2013.0226%2011.759%2013.0493%2011.7362%2013.0653C11.7202%2013.0766%2011.7038%2013.079%2011.6929%2013.079C11.6809%2013.079%2011.6694%2013.0762%2011.6587%2013.0708L8.22108%2011.3192C8.15189%2011.284%208.07593%2011.2663%207.99998%2011.2663C7.92402%2011.2663%207.84807%2011.284%207.77882%2011.3193L4.34118%2013.0708C4.33052%2013.0763%204.31904%2013.079%204.30701%2013.079C4.29611%2013.079%204.27969%2013.0767%204.26373%2013.0654C4.24092%2013.0494%204.22975%2013.0226%204.2345%2012.9957L4.89104%209.28584C4.91747%209.13646%204.86637%208.98401%204.75439%208.87822L1.97327%206.25091C1.95308%206.23184%201.94595%206.20383%201.95466%206.17786C1.9634%206.15185%201.98612%206.13326%202.01405%206.12933L5.85743%205.58807C6.0122%205.56626%206.14599%205.47208%206.21521%205.33616L7.93404%201.9608C7.94653%201.9363%207.97178%201.92107%207.99998%201.92107C8.02818%201.92107%208.05343%201.9363%208.06591%201.9608L9.78468%205.33607C9.85391%205.47199%209.9877%205.5662%2010.1425%205.58799L13.9859%206.12924C14.0138%206.1332%2014.0365%206.15176%2014.0452%206.17777C14.0539%206.20374%2014.0468%206.23175%2014.0266%206.25082Z'%20fill='%231A1F2A'/%3e%3c/svg%3e", Fl = { class: "btn btn-xs btn-circle btn-ghost" }, jl = {
|
|
2521
2564
|
key: 0,
|
|
2522
|
-
src:
|
|
2565
|
+
src: Al,
|
|
2523
2566
|
alt: "Clear",
|
|
2524
2567
|
class: "w-4"
|
|
2525
|
-
},
|
|
2568
|
+
}, Bl = {
|
|
2526
2569
|
key: 1,
|
|
2527
|
-
src:
|
|
2570
|
+
src: Dl,
|
|
2528
2571
|
alt: "Clear",
|
|
2529
2572
|
class: "w-4"
|
|
2530
|
-
},
|
|
2573
|
+
}, Hl = {
|
|
2531
2574
|
__name: "FavoriteBtn",
|
|
2532
2575
|
props: {
|
|
2533
2576
|
isFilled: Boolean
|
|
2534
2577
|
},
|
|
2535
2578
|
setup(e) {
|
|
2536
2579
|
const o = e;
|
|
2537
|
-
return (t, n) => (
|
|
2538
|
-
o.isFilled ? (
|
|
2580
|
+
return (t, n) => (w(), $("button", Fl, [
|
|
2581
|
+
o.isFilled ? (w(), $("img", jl)) : (w(), $("img", Bl))
|
|
2539
2582
|
]));
|
|
2540
2583
|
}
|
|
2541
|
-
},
|
|
2584
|
+
}, zl = { class: "flex flex-row rounded-t-lg bg-white border border-b-0 px-1 pr-1 pt-1 gap-1 items-center" }, Ul = { class: "text-sm text-gray-600" }, Zl = {
|
|
2542
2585
|
key: 0,
|
|
2543
2586
|
class: "italic"
|
|
2544
|
-
},
|
|
2587
|
+
}, Wl = /* @__PURE__ */ C("div", { class: "flex-grow" }, null, -1), an = {
|
|
2545
2588
|
__name: "TranslationBtnGroup",
|
|
2546
2589
|
props: {
|
|
2547
2590
|
loading: {
|
|
@@ -2556,7 +2599,7 @@ const Rs = /* @__PURE__ */ ze(Ls, [["render", Ms]]), Ns = "data:image/svg+xml,%3
|
|
|
2556
2599
|
type: String,
|
|
2557
2600
|
default: ""
|
|
2558
2601
|
},
|
|
2559
|
-
|
|
2602
|
+
type: {
|
|
2560
2603
|
type: String,
|
|
2561
2604
|
default: ""
|
|
2562
2605
|
},
|
|
@@ -2582,47 +2625,47 @@ const Rs = /* @__PURE__ */ ze(Ls, [["render", Ms]]), Ns = "data:image/svg+xml,%3
|
|
|
2582
2625
|
}
|
|
2583
2626
|
}
|
|
2584
2627
|
},
|
|
2585
|
-
emits: ["clear", "favorite"],
|
|
2628
|
+
emits: ["clear", "favorite", "loadTTS"],
|
|
2586
2629
|
setup(e, { emit: o }) {
|
|
2587
2630
|
const t = e, n = o;
|
|
2588
|
-
return (
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
}, null, 8, ["
|
|
2593
|
-
C("div",
|
|
2594
|
-
|
|
2595
|
-
e.phonetic ? (
|
|
2631
|
+
return (l, i) => (w(), $("div", zl, [
|
|
2632
|
+
F(Il, {
|
|
2633
|
+
type: t.type,
|
|
2634
|
+
onLoadTTS: i[0] || (i[0] = (r) => n("loadTTS"))
|
|
2635
|
+
}, null, 8, ["type"]),
|
|
2636
|
+
C("div", Ul, [
|
|
2637
|
+
mn(X(e.srcLabel) + " ", 1),
|
|
2638
|
+
e.phonetic ? (w(), $("span", Zl, "- [" + X(t.phonetic) + "]", 1)) : ee("", !0)
|
|
2596
2639
|
]),
|
|
2597
|
-
|
|
2598
|
-
t.loading ? (
|
|
2599
|
-
t.src && t.isClearBtn ? (
|
|
2640
|
+
Wl,
|
|
2641
|
+
t.loading ? (w(), te(yl, { key: 0 })) : ee("", !0),
|
|
2642
|
+
t.src && t.isClearBtn ? (w(), te(Nl, {
|
|
2643
|
+
key: 1,
|
|
2644
|
+
onClick: i[1] || (i[1] = (r) => n("clear"))
|
|
2645
|
+
})) : ee("", !0),
|
|
2646
|
+
t.src && t.isFavoriteBtn ? (w(), te(Hl, {
|
|
2600
2647
|
key: 2,
|
|
2601
|
-
onClick: i[0] || (i[0] = (r) => n("clear"))
|
|
2602
|
-
})) : X("", !0),
|
|
2603
|
-
t.src && t.isFavoriteBtn ? (y(), ee(Bs, {
|
|
2604
|
-
key: 3,
|
|
2605
2648
|
isFilled: t.isFavorite,
|
|
2606
|
-
onClick: i[
|
|
2607
|
-
}, null, 8, ["isFilled"])) :
|
|
2649
|
+
onClick: i[2] || (i[2] = (r) => n("favorite"))
|
|
2650
|
+
}, null, 8, ["isFilled"])) : ee("", !0)
|
|
2608
2651
|
]));
|
|
2609
2652
|
}
|
|
2610
|
-
}, he =
|
|
2611
|
-
const e =
|
|
2653
|
+
}, he = He("translation", () => {
|
|
2654
|
+
const e = E(null), o = E(null), t = E(null), n = E({
|
|
2612
2655
|
src: null,
|
|
2613
2656
|
target: null
|
|
2614
|
-
}),
|
|
2657
|
+
}), l = E(null), i = E([]), r = E([]), s = E([]), a = E([]), u = E({
|
|
2615
2658
|
src: null,
|
|
2616
2659
|
target: null
|
|
2617
|
-
}),
|
|
2618
|
-
function
|
|
2619
|
-
e.value =
|
|
2660
|
+
}), f = ze(), p = S(() => f.getLabel(e.value)), m = S(() => f.getLabel(o.value));
|
|
2661
|
+
function x(h) {
|
|
2662
|
+
e.value = h.src, o.value = h.target, t.value = h.text, n.value = h.phonetic, l.value = h.result, i.value = h.dictionary, r.value = h.definitions, s.value = h.synonyms, a.value = h.examples, u.value = h.tts;
|
|
2620
2663
|
}
|
|
2621
|
-
function
|
|
2622
|
-
e.value = null, o.value = null, t.value = {
|
|
2664
|
+
function v() {
|
|
2665
|
+
e.value = null, o.value = null, t.value = null, n.value = {
|
|
2623
2666
|
src: null,
|
|
2624
2667
|
target: null
|
|
2625
|
-
},
|
|
2668
|
+
}, l.value = null, i.value = [], r.value = [], s.value = [], a.value = [], u.value = {
|
|
2626
2669
|
src: null,
|
|
2627
2670
|
target: null
|
|
2628
2671
|
};
|
|
@@ -2631,55 +2674,56 @@ const Rs = /* @__PURE__ */ ze(Ls, [["render", Ms]]), Ns = "data:image/svg+xml,%3
|
|
|
2631
2674
|
src: e,
|
|
2632
2675
|
srcLabel: p,
|
|
2633
2676
|
target: o,
|
|
2634
|
-
targetLabel:
|
|
2635
|
-
phonetic:
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2677
|
+
targetLabel: m,
|
|
2678
|
+
phonetic: n,
|
|
2679
|
+
text: t,
|
|
2680
|
+
result: l,
|
|
2681
|
+
dictionary: i,
|
|
2682
|
+
definitions: r,
|
|
2683
|
+
synonyms: s,
|
|
2684
|
+
examples: a,
|
|
2685
|
+
tts: u,
|
|
2686
|
+
init: x,
|
|
2687
|
+
reset: v
|
|
2644
2688
|
};
|
|
2645
2689
|
});
|
|
2646
|
-
function
|
|
2647
|
-
return
|
|
2690
|
+
function Gl(e) {
|
|
2691
|
+
return It() ? (et(e), !0) : !1;
|
|
2648
2692
|
}
|
|
2649
2693
|
function Fe(e) {
|
|
2650
|
-
return typeof e == "function" ? e() :
|
|
2694
|
+
return typeof e == "function" ? e() : M(e);
|
|
2651
2695
|
}
|
|
2652
|
-
const
|
|
2696
|
+
const ql = typeof window < "u" && typeof document < "u";
|
|
2653
2697
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
2654
2698
|
const yt = () => {
|
|
2655
2699
|
};
|
|
2656
|
-
function
|
|
2700
|
+
function Jl(e, o) {
|
|
2657
2701
|
function t(...n) {
|
|
2658
|
-
return new Promise((
|
|
2659
|
-
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(
|
|
2702
|
+
return new Promise((l, i) => {
|
|
2703
|
+
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(l).catch(i);
|
|
2660
2704
|
});
|
|
2661
2705
|
}
|
|
2662
2706
|
return t;
|
|
2663
2707
|
}
|
|
2664
|
-
function
|
|
2665
|
-
let t, n,
|
|
2666
|
-
const i = (
|
|
2667
|
-
clearTimeout(
|
|
2708
|
+
function Kl(e, o = {}) {
|
|
2709
|
+
let t, n, l = yt;
|
|
2710
|
+
const i = (s) => {
|
|
2711
|
+
clearTimeout(s), l(), l = yt;
|
|
2668
2712
|
};
|
|
2669
|
-
return (
|
|
2713
|
+
return (s) => {
|
|
2670
2714
|
const a = Fe(e), u = Fe(o.maxWait);
|
|
2671
|
-
return t && i(t), a <= 0 || u !== void 0 && u <= 0 ? (n && (i(n), n = null), Promise.resolve(
|
|
2672
|
-
|
|
2673
|
-
t && i(t), n = null,
|
|
2715
|
+
return t && i(t), a <= 0 || u !== void 0 && u <= 0 ? (n && (i(n), n = null), Promise.resolve(s())) : new Promise((f, p) => {
|
|
2716
|
+
l = o.rejectOnCancel ? p : f, u && !n && (n = setTimeout(() => {
|
|
2717
|
+
t && i(t), n = null, f(s());
|
|
2674
2718
|
}, u)), t = setTimeout(() => {
|
|
2675
|
-
n && i(n), n = null,
|
|
2719
|
+
n && i(n), n = null, f(s());
|
|
2676
2720
|
}, a);
|
|
2677
2721
|
});
|
|
2678
2722
|
};
|
|
2679
2723
|
}
|
|
2680
|
-
function
|
|
2681
|
-
return
|
|
2682
|
-
|
|
2724
|
+
function Yl(e, o = 200, t = {}) {
|
|
2725
|
+
return Jl(
|
|
2726
|
+
Kl(o, t),
|
|
2683
2727
|
e
|
|
2684
2728
|
);
|
|
2685
2729
|
}
|
|
@@ -2688,60 +2732,60 @@ function wt(e) {
|
|
|
2688
2732
|
const t = Fe(e);
|
|
2689
2733
|
return (o = t == null ? void 0 : t.$el) != null ? o : t;
|
|
2690
2734
|
}
|
|
2691
|
-
const
|
|
2692
|
-
function
|
|
2693
|
-
const e =
|
|
2735
|
+
const Ql = ql ? window : void 0;
|
|
2736
|
+
function Xl() {
|
|
2737
|
+
const e = E(!1), o = Tt();
|
|
2694
2738
|
return o && xe(() => {
|
|
2695
2739
|
e.value = !0;
|
|
2696
2740
|
}, o), e;
|
|
2697
2741
|
}
|
|
2698
|
-
function
|
|
2699
|
-
const o =
|
|
2700
|
-
return
|
|
2742
|
+
function es(e) {
|
|
2743
|
+
const o = Xl();
|
|
2744
|
+
return S(() => (o.value, !!e()));
|
|
2701
2745
|
}
|
|
2702
|
-
function
|
|
2703
|
-
const { window: n =
|
|
2746
|
+
function ts(e, o, t = {}) {
|
|
2747
|
+
const { window: n = Ql, ...l } = t;
|
|
2704
2748
|
let i;
|
|
2705
|
-
const r =
|
|
2749
|
+
const r = es(() => n && "ResizeObserver" in n), s = () => {
|
|
2706
2750
|
i && (i.disconnect(), i = void 0);
|
|
2707
|
-
}, a =
|
|
2751
|
+
}, a = S(() => Array.isArray(e) ? e.map((p) => wt(p)) : [wt(e)]), u = j(
|
|
2708
2752
|
a,
|
|
2709
|
-
(
|
|
2710
|
-
if (
|
|
2753
|
+
(p) => {
|
|
2754
|
+
if (s(), r.value && n) {
|
|
2711
2755
|
i = new ResizeObserver(o);
|
|
2712
|
-
for (const
|
|
2713
|
-
|
|
2756
|
+
for (const m of p)
|
|
2757
|
+
m && i.observe(m, l);
|
|
2714
2758
|
}
|
|
2715
2759
|
},
|
|
2716
2760
|
{ immediate: !0, flush: "post" }
|
|
2717
|
-
),
|
|
2718
|
-
|
|
2761
|
+
), f = () => {
|
|
2762
|
+
s(), u();
|
|
2719
2763
|
};
|
|
2720
|
-
return
|
|
2764
|
+
return Gl(f), {
|
|
2721
2765
|
isSupported: r,
|
|
2722
|
-
stop:
|
|
2766
|
+
stop: f
|
|
2723
2767
|
};
|
|
2724
2768
|
}
|
|
2725
|
-
function
|
|
2769
|
+
function un(e) {
|
|
2726
2770
|
var o;
|
|
2727
|
-
const t =
|
|
2771
|
+
const t = E(e == null ? void 0 : e.element), n = E(e == null ? void 0 : e.input), l = (o = e == null ? void 0 : e.styleProp) != null ? o : "height", i = E(1);
|
|
2728
2772
|
function r() {
|
|
2729
|
-
var
|
|
2773
|
+
var s;
|
|
2730
2774
|
if (!t.value)
|
|
2731
2775
|
return;
|
|
2732
2776
|
let a = "";
|
|
2733
|
-
t.value.style[
|
|
2777
|
+
t.value.style[l] = "1px", i.value = (s = t.value) == null ? void 0 : s.scrollHeight, e != null && e.styleTarget ? Fe(e.styleTarget).style[l] = `${i.value}px` : a = `${i.value}px`, t.value.style[l] = a;
|
|
2734
2778
|
}
|
|
2735
|
-
return
|
|
2736
|
-
var
|
|
2737
|
-
return (
|
|
2738
|
-
}),
|
|
2779
|
+
return j([n, t], () => Q(r), { immediate: !0 }), j(i, () => {
|
|
2780
|
+
var s;
|
|
2781
|
+
return (s = e == null ? void 0 : e.onResize) == null ? void 0 : s.call(e);
|
|
2782
|
+
}), ts(t, () => r()), e != null && e.watch && j(e.watch, r, { immediate: !0, deep: !0 }), {
|
|
2739
2783
|
textarea: t,
|
|
2740
2784
|
input: n,
|
|
2741
2785
|
triggerResize: r
|
|
2742
2786
|
};
|
|
2743
2787
|
}
|
|
2744
|
-
const
|
|
2788
|
+
const ns = {
|
|
2745
2789
|
__name: "TranslationInput",
|
|
2746
2790
|
props: {
|
|
2747
2791
|
text: {
|
|
@@ -2749,156 +2793,153 @@ const tl = {
|
|
|
2749
2793
|
default: ""
|
|
2750
2794
|
}
|
|
2751
2795
|
},
|
|
2752
|
-
emits: ["change", "clear"],
|
|
2796
|
+
emits: ["change", "clear", "loadTTS"],
|
|
2753
2797
|
setup(e, { emit: o }) {
|
|
2754
|
-
const t = he(), n = e,
|
|
2755
|
-
var
|
|
2756
|
-
return (
|
|
2757
|
-
}), a =
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
function v() {
|
|
2764
|
-
if (!s.value) {
|
|
2765
|
-
h();
|
|
2798
|
+
const t = he(), n = e, l = E(""), i = S(() => t.src), r = S(() => t.srcLabel), s = S(() => {
|
|
2799
|
+
var v;
|
|
2800
|
+
return (v = t.phonetic) == null ? void 0 : v.src;
|
|
2801
|
+
}), { textarea: a } = un({ input: l, styleProp: "minHeight" }), u = o, f = Yl(() => {
|
|
2802
|
+
u("change", l.value);
|
|
2803
|
+
}, bl.INPUT_DEBOUNCE);
|
|
2804
|
+
function p() {
|
|
2805
|
+
if (!l.value) {
|
|
2806
|
+
m();
|
|
2766
2807
|
return;
|
|
2767
2808
|
}
|
|
2768
2809
|
f();
|
|
2769
2810
|
}
|
|
2770
|
-
function
|
|
2771
|
-
|
|
2811
|
+
function m() {
|
|
2812
|
+
u("clear"), l.value = "", a.value.focus();
|
|
2772
2813
|
}
|
|
2773
|
-
async function
|
|
2774
|
-
await Q(),
|
|
2814
|
+
async function x() {
|
|
2815
|
+
await Q(), a.value.select();
|
|
2775
2816
|
}
|
|
2776
|
-
return
|
|
2817
|
+
return j(
|
|
2777
2818
|
() => n.text,
|
|
2778
|
-
(
|
|
2779
|
-
|
|
2819
|
+
(v) => {
|
|
2820
|
+
l.value !== v && x(), l.value = v;
|
|
2780
2821
|
}
|
|
2781
|
-
), (
|
|
2782
|
-
|
|
2822
|
+
), (v, h) => (w(), $(Z, null, [
|
|
2823
|
+
F(an, {
|
|
2783
2824
|
src: i.value,
|
|
2784
2825
|
srcLabel: r.value,
|
|
2785
|
-
|
|
2786
|
-
phonetic:
|
|
2826
|
+
type: "src",
|
|
2827
|
+
phonetic: s.value,
|
|
2787
2828
|
isClearBtn: !0,
|
|
2788
|
-
onClear:
|
|
2789
|
-
|
|
2829
|
+
onClear: m,
|
|
2830
|
+
onLoadTTS: h[0] || (h[0] = (V) => u("loadTTS"))
|
|
2831
|
+
}, null, 8, ["src", "srcLabel", "phonetic"]),
|
|
2790
2832
|
Lt(C("textarea", {
|
|
2791
2833
|
ref_key: "textarea",
|
|
2792
|
-
ref:
|
|
2793
|
-
"onUpdate:modelValue":
|
|
2834
|
+
ref: a,
|
|
2835
|
+
"onUpdate:modelValue": h[1] || (h[1] = (V) => l.value = V),
|
|
2794
2836
|
class: "w-full border rounded-b-md border-t-0 outline-none outline-0 px-3 pl-5 bg-white text-gray-800 font-semibold resize-none pb-3 overflow-x-hidden overflow-y-hidden",
|
|
2795
2837
|
autofocus: "",
|
|
2796
2838
|
rows: "2",
|
|
2797
|
-
onInput:
|
|
2798
|
-
onFocus:
|
|
2839
|
+
onInput: p,
|
|
2840
|
+
onFocus: x
|
|
2799
2841
|
}, null, 544), [
|
|
2800
2842
|
[
|
|
2801
2843
|
Pt,
|
|
2802
|
-
|
|
2844
|
+
l.value,
|
|
2803
2845
|
void 0,
|
|
2804
2846
|
{ trim: !0 }
|
|
2805
2847
|
]
|
|
2806
2848
|
])
|
|
2807
2849
|
], 64));
|
|
2808
2850
|
}
|
|
2809
|
-
},
|
|
2851
|
+
}, os = /* @__PURE__ */ Ue(ns, [["__scopeId", "data-v-90bf3e0d"]]), cn = He("loader", () => ({ loading: E(!1) })), ls = (e) => (gn("data-v-4b9f4a7b"), e = e(), bn(), e), ss = { class: "flex flex-col" }, is = /* @__PURE__ */ ls(() => /* @__PURE__ */ C("div", { class: "w-full flex align-item-center justify-end mt-2" }, null, -1)), rs = {
|
|
2810
2852
|
__name: "TranslationResult",
|
|
2811
2853
|
props: {
|
|
2812
2854
|
isFavoriteFeatureEnabled: Boolean
|
|
2813
2855
|
},
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
srcLabel: i.value,
|
|
2827
|
-
tts: l.value,
|
|
2856
|
+
emits: ["loadTTS"],
|
|
2857
|
+
setup(e, { emit: o }) {
|
|
2858
|
+
const t = he(), n = E(!1), l = S(() => t.result), i = S(() => t.target), r = S(() => t.targetLabel), s = S(() => {
|
|
2859
|
+
var x;
|
|
2860
|
+
return (x = t.phonetic) == null ? void 0 : x.target;
|
|
2861
|
+
}), a = e, u = cn(), { textarea: f, input: p } = un({ input: l, styleProp: "minHeight" }), m = o;
|
|
2862
|
+
return (x, v) => (w(), $(Z, null, [
|
|
2863
|
+
F(an, {
|
|
2864
|
+
loading: M(u).loading,
|
|
2865
|
+
src: i.value,
|
|
2866
|
+
srcLabel: r.value,
|
|
2867
|
+
type: "target",
|
|
2828
2868
|
isFavoriteBtn: a.isFavoriteFeatureEnabled,
|
|
2829
|
-
isFavorite:
|
|
2830
|
-
phonetic:
|
|
2831
|
-
onFavorite:
|
|
2832
|
-
|
|
2833
|
-
|
|
2869
|
+
isFavorite: n.value,
|
|
2870
|
+
phonetic: s.value,
|
|
2871
|
+
onFavorite: v[0] || (v[0] = (h) => n.value = !n.value),
|
|
2872
|
+
onLoadTTS: v[1] || (v[1] = (h) => m("loadTTS"))
|
|
2873
|
+
}, null, 8, ["loading", "src", "srcLabel", "isFavoriteBtn", "isFavorite", "phonetic"]),
|
|
2874
|
+
C("div", ss, [
|
|
2834
2875
|
Lt(C("textarea", {
|
|
2835
2876
|
ref_key: "textarea",
|
|
2836
|
-
ref:
|
|
2837
|
-
"onUpdate:modelValue":
|
|
2877
|
+
ref: f,
|
|
2878
|
+
"onUpdate:modelValue": v[2] || (v[2] = (h) => _e(p) ? p.value = h : null),
|
|
2838
2879
|
class: "w-full border rounded-b-md border-t-0 outline-none outline-0 px-3 pl-5 bg-white text-gray-800 font-semibold resize-none pb-3 overflow-x-hidden overflow-y-hidden",
|
|
2839
2880
|
readonly: "",
|
|
2840
2881
|
rows: "2",
|
|
2841
2882
|
spellcheck: "false"
|
|
2842
2883
|
}, null, 512), [
|
|
2843
|
-
[Pt,
|
|
2884
|
+
[Pt, M(p)]
|
|
2844
2885
|
]),
|
|
2845
|
-
|
|
2886
|
+
is
|
|
2846
2887
|
])
|
|
2847
2888
|
], 64));
|
|
2848
2889
|
}
|
|
2849
|
-
},
|
|
2890
|
+
}, as = /* @__PURE__ */ Ue(rs, [["__scopeId", "data-v-4b9f4a7b"]]), us = { class: "btn btn-sm btn-circle btn-ghost" }, Ze = {
|
|
2850
2891
|
__name: "ToggleBtn",
|
|
2851
2892
|
props: {
|
|
2852
2893
|
isExpanded: Boolean
|
|
2853
2894
|
},
|
|
2854
2895
|
setup(e) {
|
|
2855
2896
|
const o = e;
|
|
2856
|
-
return (t, n) => (
|
|
2857
|
-
o.isExpanded ? (
|
|
2897
|
+
return (t, n) => (w(), $("button", us, [
|
|
2898
|
+
o.isExpanded ? (w(), te(M(Ro), {
|
|
2858
2899
|
key: 0,
|
|
2859
2900
|
class: "w-7 text-gray-400"
|
|
2860
|
-
})) : (
|
|
2901
|
+
})) : (w(), te(M(ko), {
|
|
2861
2902
|
key: 1,
|
|
2862
2903
|
class: "w-7 text-gray-400"
|
|
2863
2904
|
}))
|
|
2864
2905
|
]));
|
|
2865
2906
|
}
|
|
2866
|
-
},
|
|
2907
|
+
}, cs = { class: "card border bg-white rounded-lg" }, ds = { class: "card-body px-4 py-2 gap-0" }, fs = { class: "flex justify-between items-center" }, ps = /* @__PURE__ */ C("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Translations", -1), vs = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, hs = { class: "list-none list-inside" }, ms = ["onClick"], gs = { class: "text-base font-normal text-gray-800 leading-4" }, bs = {
|
|
2867
2908
|
__name: "Dictionary",
|
|
2868
2909
|
emits: ["translate"],
|
|
2869
2910
|
setup(e, { emit: o }) {
|
|
2870
|
-
const t =
|
|
2911
|
+
const t = E(!0), n = he(), l = ze(), i = S(() => n.dictionary), r = o, s = () => {
|
|
2871
2912
|
t.value = !t.value;
|
|
2872
2913
|
}, a = (u) => {
|
|
2873
|
-
r("translate", u, n.target, n.src),
|
|
2914
|
+
r("translate", u, n.target, n.src), l.src = n.target, l.target = n.src, window.scrollTo(0, 0);
|
|
2874
2915
|
};
|
|
2875
|
-
return (u,
|
|
2876
|
-
C("div",
|
|
2877
|
-
C("div",
|
|
2878
|
-
|
|
2879
|
-
|
|
2916
|
+
return (u, f) => (w(), $("div", cs, [
|
|
2917
|
+
C("div", ds, [
|
|
2918
|
+
C("div", fs, [
|
|
2919
|
+
ps,
|
|
2920
|
+
F(Ze, {
|
|
2880
2921
|
isExpanded: t.value,
|
|
2881
|
-
onClick:
|
|
2922
|
+
onClick: s
|
|
2882
2923
|
}, null, 8, ["isExpanded"])
|
|
2883
2924
|
]),
|
|
2884
2925
|
C("div", {
|
|
2885
2926
|
class: Ce(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
2886
2927
|
}, [
|
|
2887
2928
|
C("ul", null, [
|
|
2888
|
-
(
|
|
2889
|
-
key: `${
|
|
2929
|
+
(w(!0), $(Z, null, se(i.value, (p, m) => (w(), $("li", {
|
|
2930
|
+
key: `${p.pos}-${m}`,
|
|
2890
2931
|
class: "mb-2"
|
|
2891
2932
|
}, [
|
|
2892
|
-
C("h5",
|
|
2893
|
-
C("ul",
|
|
2894
|
-
(
|
|
2895
|
-
key: `${
|
|
2933
|
+
C("h5", vs, X(p.pos), 1),
|
|
2934
|
+
C("ul", hs, [
|
|
2935
|
+
(w(!0), $(Z, null, se(p.items, (x, v) => (w(), $("li", {
|
|
2936
|
+
key: `${x.word}-${v}`
|
|
2896
2937
|
}, [
|
|
2897
2938
|
C("span", {
|
|
2898
2939
|
class: "p-3 m-0.5 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
2899
|
-
onClick: (
|
|
2900
|
-
},
|
|
2901
|
-
C("small",
|
|
2940
|
+
onClick: (h) => a(x.word)
|
|
2941
|
+
}, X(x.word), 9, ms),
|
|
2942
|
+
C("small", gs, " - " + X(x.reverse_translation.join(", ")), 1)
|
|
2902
2943
|
]))), 128))
|
|
2903
2944
|
])
|
|
2904
2945
|
]))), 128))
|
|
@@ -2907,41 +2948,41 @@ const tl = {
|
|
|
2907
2948
|
])
|
|
2908
2949
|
]));
|
|
2909
2950
|
}
|
|
2910
|
-
},
|
|
2951
|
+
}, Cs = { class: "card border bg-white rounded-lg" }, _s = { class: "card-body px-4 py-2 gap-0" }, xs = { class: "flex justify-between items-center" }, ys = /* @__PURE__ */ C("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Definitions", -1), ws = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, Ss = { class: "text-base text-textCustom list-decimal list-outside ml-5" }, Es = /* @__PURE__ */ C("br", null, null, -1), Os = {
|
|
2911
2952
|
key: 0,
|
|
2912
2953
|
class: "italic"
|
|
2913
|
-
},
|
|
2954
|
+
}, $s = {
|
|
2914
2955
|
__name: "Definition",
|
|
2915
2956
|
setup(e) {
|
|
2916
|
-
const o =
|
|
2957
|
+
const o = E(!0), t = he(), n = S(() => t.definitions), l = () => {
|
|
2917
2958
|
o.value = !o.value;
|
|
2918
2959
|
};
|
|
2919
|
-
return (i, r) => (
|
|
2920
|
-
C("div",
|
|
2921
|
-
C("div",
|
|
2922
|
-
|
|
2923
|
-
|
|
2960
|
+
return (i, r) => (w(), $("div", Cs, [
|
|
2961
|
+
C("div", _s, [
|
|
2962
|
+
C("div", xs, [
|
|
2963
|
+
ys,
|
|
2964
|
+
F(Ze, {
|
|
2924
2965
|
isExpanded: o.value,
|
|
2925
|
-
onClick:
|
|
2966
|
+
onClick: l
|
|
2926
2967
|
}, null, 8, ["isExpanded"])
|
|
2927
2968
|
]),
|
|
2928
2969
|
C("div", {
|
|
2929
2970
|
class: Ce(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
2930
2971
|
}, [
|
|
2931
2972
|
C("ul", null, [
|
|
2932
|
-
(
|
|
2933
|
-
key: `${
|
|
2973
|
+
(w(!0), $(Z, null, se(n.value, (s, a) => (w(), $("li", {
|
|
2974
|
+
key: `${s.pos}-${a}`,
|
|
2934
2975
|
class: "mb-2"
|
|
2935
2976
|
}, [
|
|
2936
|
-
C("h5",
|
|
2937
|
-
C("ul",
|
|
2938
|
-
(
|
|
2939
|
-
key: `${u.gloss}-${
|
|
2977
|
+
C("h5", ws, X(s.pos), 1),
|
|
2978
|
+
C("ul", Ss, [
|
|
2979
|
+
(w(!0), $(Z, null, se(s.items, (u, f) => (w(), $("li", {
|
|
2980
|
+
key: `${u.gloss}-${f}`,
|
|
2940
2981
|
class: "mb-1"
|
|
2941
2982
|
}, [
|
|
2942
|
-
C("span", null,
|
|
2943
|
-
|
|
2944
|
-
u.example ? (
|
|
2983
|
+
C("span", null, X(u.gloss), 1),
|
|
2984
|
+
Es,
|
|
2985
|
+
u.example ? (w(), $("small", Os, '"' + X(u.example) + '"', 1)) : ee("", !0)
|
|
2945
2986
|
]))), 128))
|
|
2946
2987
|
])
|
|
2947
2988
|
]))), 128))
|
|
@@ -2950,48 +2991,48 @@ const tl = {
|
|
|
2950
2991
|
])
|
|
2951
2992
|
]));
|
|
2952
2993
|
}
|
|
2953
|
-
},
|
|
2994
|
+
}, Ts = { class: "card border bg-white rounded-lg" }, Is = { class: "card-body px-4 py-2 gap-0" }, Ls = { class: "flex justify-between items-center" }, Ps = /* @__PURE__ */ C("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Examples", -1), Vs = { class: "text-textCustom list-decimal list-outside ml-7 mt-2" }, ks = ["innerHTML"], Ms = {
|
|
2954
2995
|
__name: "Example",
|
|
2955
2996
|
setup(e) {
|
|
2956
|
-
const o =
|
|
2997
|
+
const o = E(!0), t = he(), n = S(() => t.examples), l = () => {
|
|
2957
2998
|
o.value = !o.value;
|
|
2958
2999
|
};
|
|
2959
|
-
return (i, r) => (
|
|
2960
|
-
C("div",
|
|
2961
|
-
C("div",
|
|
2962
|
-
|
|
2963
|
-
|
|
3000
|
+
return (i, r) => (w(), $("div", Ts, [
|
|
3001
|
+
C("div", Is, [
|
|
3002
|
+
C("div", Ls, [
|
|
3003
|
+
Ps,
|
|
3004
|
+
F(Ze, {
|
|
2964
3005
|
isExpanded: o.value,
|
|
2965
|
-
onClick:
|
|
3006
|
+
onClick: l
|
|
2966
3007
|
}, null, 8, ["isExpanded"])
|
|
2967
3008
|
]),
|
|
2968
3009
|
C("div", {
|
|
2969
3010
|
class: Ce(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"])
|
|
2970
3011
|
}, [
|
|
2971
|
-
C("ul",
|
|
2972
|
-
(
|
|
2973
|
-
key: `${
|
|
2974
|
-
innerHTML:
|
|
2975
|
-
}, null, 8,
|
|
3012
|
+
C("ul", Vs, [
|
|
3013
|
+
(w(!0), $(Z, null, se(n.value, (s, a) => (w(), $("li", {
|
|
3014
|
+
key: `${s.definition_id}-${a}`,
|
|
3015
|
+
innerHTML: s
|
|
3016
|
+
}, null, 8, ks))), 128))
|
|
2976
3017
|
])
|
|
2977
3018
|
], 2)
|
|
2978
3019
|
])
|
|
2979
3020
|
]));
|
|
2980
3021
|
}
|
|
2981
|
-
},
|
|
3022
|
+
}, Rs = { class: "card border bg-white rounded-lg" }, Ns = { class: "card-body px-4 py-2 gap-0" }, As = { class: "flex justify-between items-center" }, Ds = /* @__PURE__ */ C("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Synonyms", -1), Fs = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, js = { class: "list-none list-inside" }, Bs = { class: "flex flex-wrap" }, Hs = ["onClick"], zs = {
|
|
2982
3023
|
__name: "Synonyms",
|
|
2983
3024
|
emits: ["translate"],
|
|
2984
3025
|
setup(e, { emit: o }) {
|
|
2985
|
-
const t =
|
|
3026
|
+
const t = E(!0), n = he(), l = S(() => n.synonyms), i = o, r = () => {
|
|
2986
3027
|
t.value = !t.value;
|
|
2987
|
-
},
|
|
3028
|
+
}, s = (a) => {
|
|
2988
3029
|
i("translate", a), window.scrollTo(0, 0);
|
|
2989
3030
|
};
|
|
2990
|
-
return (a, u) => (
|
|
2991
|
-
C("div",
|
|
2992
|
-
C("div",
|
|
2993
|
-
|
|
2994
|
-
|
|
3031
|
+
return (a, u) => (w(), $("div", Rs, [
|
|
3032
|
+
C("div", Ns, [
|
|
3033
|
+
C("div", As, [
|
|
3034
|
+
Ds,
|
|
3035
|
+
F(Ze, {
|
|
2995
3036
|
isExpanded: t.value,
|
|
2996
3037
|
onClick: r
|
|
2997
3038
|
}, null, 8, ["isExpanded"])
|
|
@@ -3000,22 +3041,22 @@ const tl = {
|
|
|
3000
3041
|
class: Ce(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3001
3042
|
}, [
|
|
3002
3043
|
C("ul", null, [
|
|
3003
|
-
(
|
|
3004
|
-
key: `${
|
|
3044
|
+
(w(!0), $(Z, null, se(l.value, (f, p) => (w(), $("li", {
|
|
3045
|
+
key: `${f.pos}-${p}`,
|
|
3005
3046
|
class: "mb-2"
|
|
3006
3047
|
}, [
|
|
3007
|
-
C("h5",
|
|
3008
|
-
C("ul",
|
|
3009
|
-
(
|
|
3010
|
-
key: `${
|
|
3048
|
+
C("h5", Fs, X(f.pos), 1),
|
|
3049
|
+
C("ul", js, [
|
|
3050
|
+
(w(!0), $(Z, null, se(f.items, (m, x) => (w(), $("li", {
|
|
3051
|
+
key: `${m.word}-${x}`,
|
|
3011
3052
|
class: "mb-2"
|
|
3012
3053
|
}, [
|
|
3013
|
-
C("div",
|
|
3014
|
-
(
|
|
3015
|
-
key: `${
|
|
3054
|
+
C("div", Bs, [
|
|
3055
|
+
(w(!0), $(Z, null, se(m.synonym, (v, h) => (w(), $("span", {
|
|
3056
|
+
key: `${v}-${h}`,
|
|
3016
3057
|
class: "p-3 m-0.5 ml-0 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
3017
|
-
onClick: (
|
|
3018
|
-
},
|
|
3058
|
+
onClick: (V) => s(v)
|
|
3059
|
+
}, X(v), 9, Hs))), 128))
|
|
3019
3060
|
])
|
|
3020
3061
|
]))), 128))
|
|
3021
3062
|
])
|
|
@@ -3025,13 +3066,13 @@ const tl = {
|
|
|
3025
3066
|
])
|
|
3026
3067
|
]));
|
|
3027
3068
|
}
|
|
3028
|
-
},
|
|
3069
|
+
}, Us = { class: "bg-white min-h-screen flex flex-col" }, Zs = { class: "py-2 px-5 shadow-lg" }, Ws = { class: "px-5 flex-grow" }, Gs = { class: "flex flex-col lg:flex-row lg:gap-2" }, qs = { class: "w-full lg:w-[calc(50%-1rem)] my-2" }, Js = /* @__PURE__ */ C("div", { class: "w-6 h-4 mx-auto hidden lg:block" }, null, -1), Ks = { class: "w-full lg:w-[calc(50%-1rem)] my-2" }, Ys = { class: "grid grid-cols-1 lg:grid-cols-3 gap-4" }, Qs = {
|
|
3029
3070
|
key: 0,
|
|
3030
3071
|
class: "w-full my-4"
|
|
3031
|
-
},
|
|
3072
|
+
}, Xs = {
|
|
3032
3073
|
key: 1,
|
|
3033
3074
|
class: "text-textCustom italic font-medium"
|
|
3034
|
-
},
|
|
3075
|
+
}, n2 = {
|
|
3035
3076
|
__name: "Popup",
|
|
3036
3077
|
props: {
|
|
3037
3078
|
opt: {
|
|
@@ -3046,87 +3087,105 @@ const tl = {
|
|
|
3046
3087
|
type: Object,
|
|
3047
3088
|
default: null
|
|
3048
3089
|
},
|
|
3090
|
+
tts: {
|
|
3091
|
+
type: Object,
|
|
3092
|
+
default: null
|
|
3093
|
+
},
|
|
3049
3094
|
isFavoriteFeatureEnabled: {
|
|
3050
3095
|
type: Boolean,
|
|
3051
3096
|
default: !1
|
|
3052
3097
|
}
|
|
3053
3098
|
},
|
|
3054
|
-
emits: ["opt", "translate", "reader", "settings", "fullscreen"],
|
|
3099
|
+
emits: ["opt", "translate", "reader", "settings", "fullscreen", "loadTTS"],
|
|
3055
3100
|
setup(e, { emit: o }) {
|
|
3056
|
-
const t =
|
|
3057
|
-
|
|
3058
|
-
() =>
|
|
3101
|
+
const t = fl(), n = he(t), l = rn(t), i = ze(t), r = cn(t), s = e, a = o, u = E("");
|
|
3102
|
+
j(
|
|
3103
|
+
() => s.translation,
|
|
3059
3104
|
(v) => {
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3105
|
+
r.loading = !1, u.value = v.text, n.init(v), l.reset();
|
|
3106
|
+
},
|
|
3107
|
+
{ immediate: !0 }
|
|
3108
|
+
), j(
|
|
3109
|
+
() => s.tts,
|
|
3110
|
+
(v) => {
|
|
3111
|
+
if (!v) {
|
|
3112
|
+
l.reset();
|
|
3113
|
+
return;
|
|
3064
3114
|
}
|
|
3115
|
+
l.set(v);
|
|
3065
3116
|
},
|
|
3066
3117
|
{ immediate: !0 }
|
|
3067
|
-
),
|
|
3068
|
-
|
|
3069
|
-
}),
|
|
3070
|
-
|
|
3118
|
+
), j([() => s.opt, () => s.languages], ([v, h]) => {
|
|
3119
|
+
i.init(v, h);
|
|
3120
|
+
}), j([() => i.src, () => i.target], ([v, h]) => {
|
|
3121
|
+
a("opt", { src: v, target: h }), x(u.value);
|
|
3071
3122
|
}), xe(() => {
|
|
3072
|
-
|
|
3123
|
+
i.init(s.opt, s.languages);
|
|
3073
3124
|
});
|
|
3074
|
-
function
|
|
3075
|
-
|
|
3125
|
+
function f() {
|
|
3126
|
+
u.value = "", n.reset();
|
|
3076
3127
|
}
|
|
3077
3128
|
function p(v) {
|
|
3078
|
-
|
|
3129
|
+
x(v);
|
|
3079
3130
|
}
|
|
3080
|
-
function
|
|
3081
|
-
|
|
3131
|
+
function m(v) {
|
|
3132
|
+
const h = v === "src" ? n.text : n.result;
|
|
3133
|
+
a("loadTTS", { type: v, data: h });
|
|
3134
|
+
}
|
|
3135
|
+
function x(v, h = i.src, V = i.target) {
|
|
3136
|
+
v && (u.value = v, r.loading = !0, a("translate", {
|
|
3082
3137
|
src: h,
|
|
3083
|
-
target:
|
|
3138
|
+
target: V,
|
|
3084
3139
|
text: v
|
|
3085
3140
|
}));
|
|
3086
3141
|
}
|
|
3087
|
-
return (v, h) => (
|
|
3088
|
-
C("div",
|
|
3089
|
-
|
|
3090
|
-
onReader: h[0] || (h[0] = (
|
|
3091
|
-
onSettings: h[1] || (h[1] = (
|
|
3092
|
-
onFullScreen: h[2] || (h[2] = (
|
|
3142
|
+
return (v, h) => (w(), $("div", Us, [
|
|
3143
|
+
C("div", Zs, [
|
|
3144
|
+
F(Vn, {
|
|
3145
|
+
onReader: h[0] || (h[0] = (V) => a("reader")),
|
|
3146
|
+
onSettings: h[1] || (h[1] = (V) => a("settings")),
|
|
3147
|
+
onFullScreen: h[2] || (h[2] = (V) => a("fullscreen"))
|
|
3093
3148
|
})
|
|
3094
3149
|
]),
|
|
3095
|
-
C("div",
|
|
3096
|
-
|
|
3097
|
-
C("div",
|
|
3098
|
-
C("div",
|
|
3099
|
-
|
|
3100
|
-
text:
|
|
3150
|
+
C("div", Ws, [
|
|
3151
|
+
F(gl, { class: "my-4" }),
|
|
3152
|
+
C("div", Gs, [
|
|
3153
|
+
C("div", qs, [
|
|
3154
|
+
F(os, {
|
|
3155
|
+
text: u.value,
|
|
3101
3156
|
onChange: p,
|
|
3102
|
-
onClear:
|
|
3157
|
+
onClear: f,
|
|
3158
|
+
onLoadTTS: h[3] || (h[3] = (V) => m("src"))
|
|
3103
3159
|
}, null, 8, ["text"])
|
|
3104
3160
|
]),
|
|
3105
|
-
|
|
3106
|
-
C("div",
|
|
3107
|
-
|
|
3161
|
+
Js,
|
|
3162
|
+
C("div", Ks, [
|
|
3163
|
+
F(as, {
|
|
3164
|
+
isFavoriteFeatureEnabled: e.isFavoriteFeatureEnabled,
|
|
3165
|
+
onLoadTTS: h[4] || (h[4] = (V) => m("target"))
|
|
3166
|
+
}, null, 8, ["isFavoriteFeatureEnabled"])
|
|
3108
3167
|
])
|
|
3109
3168
|
]),
|
|
3110
|
-
|
|
3111
|
-
C("div",
|
|
3112
|
-
|
|
3169
|
+
s.translation ? (w(), $(Z, { key: 0 }, [
|
|
3170
|
+
C("div", Ys, [
|
|
3171
|
+
M(n).dictionary.length ? (w(), te(bs, {
|
|
3113
3172
|
key: 0,
|
|
3114
|
-
onTranslate:
|
|
3115
|
-
})) :
|
|
3116
|
-
|
|
3117
|
-
|
|
3173
|
+
onTranslate: x
|
|
3174
|
+
})) : ee("", !0),
|
|
3175
|
+
M(n).definitions.length ? (w(), te($s, { key: 1 })) : ee("", !0),
|
|
3176
|
+
M(n).synonyms.length ? (w(), te(zs, {
|
|
3118
3177
|
key: 2,
|
|
3119
|
-
onTranslate:
|
|
3120
|
-
})) :
|
|
3178
|
+
onTranslate: x
|
|
3179
|
+
})) : ee("", !0)
|
|
3121
3180
|
]),
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
])) :
|
|
3125
|
-
], 64)) : (
|
|
3181
|
+
M(n).examples.length ? (w(), $("div", Qs, [
|
|
3182
|
+
F(Ms)
|
|
3183
|
+
])) : ee("", !0)
|
|
3184
|
+
], 64)) : (w(), $("span", Xs, "Service unavailable"))
|
|
3126
3185
|
])
|
|
3127
3186
|
]));
|
|
3128
3187
|
}
|
|
3129
3188
|
};
|
|
3130
3189
|
export {
|
|
3131
|
-
|
|
3190
|
+
n2 as default
|
|
3132
3191
|
};
|