@ddict/popup 1.0.20 → 1.0.22
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.es.js +560 -560
- package/dist/popup.umd.js +7 -7
- package/package.json +1 -1
package/dist/popup.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { openBlock as w, createElementBlock as T, createElementVNode as h, computed as S, unref as V, shallowRef as pn, watch as F, triggerRef as ut, onScopeDispose as tt, ref as E, onUnmounted as nt, inject as Ie, watchEffect as ie, onMounted as Ce, cloneVNode as $t, h as Ee, Fragment as Z, defineComponent as ae, provide as ot, reactive as Tt, nextTick as Q, toRaw as K, effectScope as It, markRaw as de, hasInjectionContext as vn, getCurrentInstance as Lt, isRef as xe, isReactive as
|
|
1
|
+
import { openBlock as w, createElementBlock as T, createElementVNode as h, computed as S, unref as V, shallowRef as pn, watch as F, triggerRef as ut, onScopeDispose as tt, ref as E, onUnmounted as nt, inject as Ie, watchEffect as ie, onMounted as Ce, cloneVNode as $t, h as Ee, Fragment as Z, defineComponent as ae, provide as ot, reactive as Tt, nextTick as Q, toRaw as K, effectScope as It, markRaw as de, hasInjectionContext as vn, getCurrentInstance as Lt, isRef as xe, isReactive as lt, toRef as Ge, getCurrentScope as Rt, toRefs as ct, mergeModels as hn, useModel as mn, createBlock as ee, withCtx as Re, createVNode as H, renderList as se, normalizeClass as _e, toDisplayString as te, createCommentVNode as X, withModifiers as dt, createTextVNode as gn, withDirectives as Pt, vModelText as Vt, pushScopeId as bn, popScopeId as xn } from "vue";
|
|
2
2
|
const _n = "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,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%20fill='%233B5695'%20class='bi%20bi-list-stars%20fill-primaryColor'%3e%3cpath%20fill-rule='evenodd'%20d='M5%2011.5a.5.5%200%200%201%20.5-.5h9a.5.5%200%200%201%200%201h-9a.5.5%200%200%201-.5-.5zm0-4a.5.5%200%200%201%20.5-.5h9a.5.5%200%200%201%200%201h-9a.5.5%200%200%201-.5-.5zm0-4a.5.5%200%200%201%20.5-.5h9a.5.5%200%200%201%200%201h-9a.5.5%200%200%201-.5-.5z'/%3e%3cpath%20d='M2.242%202.194a.27.27%200%200%201%20.516%200l.162.53c.035.115.14.194.258.194h.551c.259%200%20.37.333.164.493l-.468.363a.277.277%200%200%200-.094.3l.173.569c.078.256-.213.462-.423.3l-.417-.324a.267.267%200%200%200-.328%200l-.417.323c-.21.163-.5-.043-.423-.299l.173-.57a.277.277%200%200%200-.094-.299l-.468-.363c-.206-.16-.095-.493.164-.493h.55a.271.271%200%200%200%20.259-.194l.162-.53zm0%204a.27.27%200%200%201%20.516%200l.162.53c.035.115.14.194.258.194h.551c.259%200%20.37.333.164.493l-.468.363a.277.277%200%200%200-.094.3l.173.569c.078.255-.213.462-.423.3l-.417-.324a.267.267%200%200%200-.328%200l-.417.323c-.21.163-.5-.043-.423-.299l.173-.57a.277.277%200%200%200-.094-.299l-.468-.363c-.206-.16-.095-.493.164-.493h.55a.271.271%200%200%200%20.259-.194l.162-.53zm0%204a.27.27%200%200%201%20.516%200l.162.53c.035.115.14.194.258.194h.551c.259%200%20.37.333.164.493l-.468.363a.277.277%200%200%200-.094.3l.173.569c.078.255-.213.462-.423.3l-.417-.324a.267.267%200%200%200-.328%200l-.417.323c-.21.163-.5-.043-.423-.299l.173-.57a.277.277%200%200%200-.094-.299l-.468-.363c-.206-.16-.095-.493.164-.493h.55a.271.271%200%200%200%20.259-.194l.162-.53z'/%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%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", wn = "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", Sn = "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", En = { class: "flex justify-between" }, On = /* @__PURE__ */ h("div", { class: "flex flex-row" }, [
|
|
3
3
|
/* @__PURE__ */ h("img", {
|
|
4
4
|
src: _n,
|
|
@@ -6,7 +6,7 @@ const _n = "data:image/svg+xml,%3csvg%20width='96'%20height='32'%20viewBox='0%20
|
|
|
6
6
|
class: "w-24"
|
|
7
7
|
})
|
|
8
8
|
], -1), $n = { class: "flex" }, Tn = {
|
|
9
|
-
class: "tooltip tooltip-bottom
|
|
9
|
+
class: "tooltip tooltip-bottom before:!bg-baseColor before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%]",
|
|
10
10
|
"data-tip": "Saved Words"
|
|
11
11
|
}, In = /* @__PURE__ */ h("img", {
|
|
12
12
|
src: Cn,
|
|
@@ -15,7 +15,7 @@ const _n = "data:image/svg+xml,%3csvg%20width='96'%20height='32'%20viewBox='0%20
|
|
|
15
15
|
}, null, -1), Ln = [
|
|
16
16
|
In
|
|
17
17
|
], Rn = {
|
|
18
|
-
class: "tooltip tooltip-bottom
|
|
18
|
+
class: "tooltip tooltip-bottom before:!bg-baseColor before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%]",
|
|
19
19
|
"data-tip": "Reader"
|
|
20
20
|
}, Pn = /* @__PURE__ */ h("img", {
|
|
21
21
|
src: yn,
|
|
@@ -24,7 +24,7 @@ const _n = "data:image/svg+xml,%3csvg%20width='96'%20height='32'%20viewBox='0%20
|
|
|
24
24
|
}, null, -1), Vn = [
|
|
25
25
|
Pn
|
|
26
26
|
], kn = {
|
|
27
|
-
class: "tooltip tooltip-bottom
|
|
27
|
+
class: "tooltip tooltip-bottom before:!bg-baseColor before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%] md:hidden",
|
|
28
28
|
"data-tip": "Full screen"
|
|
29
29
|
}, Mn = /* @__PURE__ */ h("img", {
|
|
30
30
|
src: wn,
|
|
@@ -33,7 +33,7 @@ const _n = "data:image/svg+xml,%3csvg%20width='96'%20height='32'%20viewBox='0%20
|
|
|
33
33
|
}, null, -1), Nn = [
|
|
34
34
|
Mn
|
|
35
35
|
], Dn = {
|
|
36
|
-
class: "tooltip tooltip-bottom
|
|
36
|
+
class: "tooltip tooltip-bottom before:!bg-baseColor before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%]",
|
|
37
37
|
"data-tip": "Settings"
|
|
38
38
|
}, An = /* @__PURE__ */ h("img", {
|
|
39
39
|
src: Sn,
|
|
@@ -46,31 +46,31 @@ const _n = "data:image/svg+xml,%3csvg%20width='96'%20height='32'%20viewBox='0%20
|
|
|
46
46
|
emits: ["settings", "fullScreen", "reader", "starList"],
|
|
47
47
|
setup(e, { emit: o }) {
|
|
48
48
|
const t = o;
|
|
49
|
-
return (n,
|
|
49
|
+
return (n, l) => (w(), T("div", En, [
|
|
50
50
|
On,
|
|
51
51
|
h("div", $n, [
|
|
52
52
|
h("div", Tn, [
|
|
53
53
|
h("button", {
|
|
54
54
|
class: "btn btn-ghost btn-circle",
|
|
55
|
-
onClick:
|
|
55
|
+
onClick: l[0] || (l[0] = (r) => t("starList"))
|
|
56
56
|
}, Ln)
|
|
57
57
|
]),
|
|
58
58
|
h("div", Rn, [
|
|
59
59
|
h("button", {
|
|
60
60
|
class: "btn btn-ghost btn-circle",
|
|
61
|
-
onClick:
|
|
61
|
+
onClick: l[1] || (l[1] = (r) => t("reader"))
|
|
62
62
|
}, Vn)
|
|
63
63
|
]),
|
|
64
64
|
h("div", kn, [
|
|
65
65
|
h("button", {
|
|
66
66
|
class: "btn btn-ghost btn-circle",
|
|
67
|
-
onClick:
|
|
67
|
+
onClick: l[2] || (l[2] = (r) => t("fullScreen"))
|
|
68
68
|
}, Nn)
|
|
69
69
|
]),
|
|
70
70
|
h("div", Dn, [
|
|
71
71
|
h("button", {
|
|
72
72
|
class: "btn btn-ghost btn-circle",
|
|
73
|
-
onClick:
|
|
73
|
+
onClick: l[3] || (l[3] = (r) => t("settings"))
|
|
74
74
|
}, Fn)
|
|
75
75
|
])
|
|
76
76
|
])
|
|
@@ -78,17 +78,17 @@ const _n = "data:image/svg+xml,%3csvg%20width='96'%20height='32'%20viewBox='0%20
|
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
80
|
function ye(e, o, t) {
|
|
81
|
-
let n = t.initialDeps ?? [],
|
|
81
|
+
let n = t.initialDeps ?? [], l;
|
|
82
82
|
return () => {
|
|
83
|
-
var r, i,
|
|
83
|
+
var r, i, s, a;
|
|
84
84
|
let u;
|
|
85
85
|
t.key && ((r = t.debug) != null && r.call(t)) && (u = Date.now());
|
|
86
86
|
const c = e();
|
|
87
87
|
if (!(c.length !== n.length || c.some((x, _) => n[_] !== x)))
|
|
88
|
-
return
|
|
88
|
+
return l;
|
|
89
89
|
n = c;
|
|
90
90
|
let g;
|
|
91
|
-
if (t.key && ((i = t.debug) != null && i.call(t)) && (g = Date.now()),
|
|
91
|
+
if (t.key && ((i = t.debug) != null && i.call(t)) && (g = Date.now()), l = o(...c), t.key && ((s = t.debug) != null && s.call(t))) {
|
|
92
92
|
const x = Math.round((Date.now() - u) * 100) / 100, _ = Math.round((Date.now() - g) * 100) / 100, v = _ / 16, $ = (N, I) => {
|
|
93
93
|
for (N = String(N); N.length < I; )
|
|
94
94
|
N = " " + N;
|
|
@@ -106,7 +106,7 @@ function ye(e, o, t) {
|
|
|
106
106
|
t == null ? void 0 : t.key
|
|
107
107
|
);
|
|
108
108
|
}
|
|
109
|
-
return (a = t == null ? void 0 : t.onChange) == null || a.call(t,
|
|
109
|
+
return (a = t == null ? void 0 : t.onChange) == null || a.call(t, l), l;
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
112
|
function qe(e, o) {
|
|
@@ -116,13 +116,13 @@ function qe(e, o) {
|
|
|
116
116
|
}
|
|
117
117
|
const Bn = (e, o) => Math.abs(e - o) < 1, Hn = (e, o, t) => {
|
|
118
118
|
let n;
|
|
119
|
-
return function(...
|
|
120
|
-
e.clearTimeout(n), n = e.setTimeout(() => o.apply(this,
|
|
119
|
+
return function(...l) {
|
|
120
|
+
e.clearTimeout(n), n = e.setTimeout(() => o.apply(this, l), t);
|
|
121
121
|
};
|
|
122
122
|
}, zn = (e) => e, Un = (e) => {
|
|
123
123
|
const o = Math.max(e.startIndex - e.overscan, 0), t = Math.min(e.endIndex + e.overscan, e.count - 1), n = [];
|
|
124
|
-
for (let
|
|
125
|
-
n.push(
|
|
124
|
+
for (let l = o; l <= t; l++)
|
|
125
|
+
n.push(l);
|
|
126
126
|
return n;
|
|
127
127
|
}, Zn = (e, o) => {
|
|
128
128
|
const t = e.scrollElement;
|
|
@@ -131,23 +131,23 @@ const Bn = (e, o) => Math.abs(e - o) < 1, Hn = (e, o, t) => {
|
|
|
131
131
|
const n = e.targetWindow;
|
|
132
132
|
if (!n)
|
|
133
133
|
return;
|
|
134
|
-
const
|
|
135
|
-
const { width:
|
|
136
|
-
o({ width: Math.round(
|
|
134
|
+
const l = (i) => {
|
|
135
|
+
const { width: s, height: a } = i;
|
|
136
|
+
o({ width: Math.round(s), height: Math.round(a) });
|
|
137
137
|
};
|
|
138
|
-
if (
|
|
138
|
+
if (l(t.getBoundingClientRect()), !n.ResizeObserver)
|
|
139
139
|
return () => {
|
|
140
140
|
};
|
|
141
141
|
const r = new n.ResizeObserver((i) => {
|
|
142
|
-
const
|
|
143
|
-
if (
|
|
144
|
-
const a =
|
|
142
|
+
const s = i[0];
|
|
143
|
+
if (s != null && s.borderBoxSize) {
|
|
144
|
+
const a = s.borderBoxSize[0];
|
|
145
145
|
if (a) {
|
|
146
|
-
|
|
146
|
+
l({ width: a.inlineSize, height: a.blockSize });
|
|
147
147
|
return;
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
|
|
150
|
+
l(t.getBoundingClientRect());
|
|
151
151
|
});
|
|
152
152
|
return r.observe(t, { box: "border-box" }), () => {
|
|
153
153
|
r.unobserve(t);
|
|
@@ -161,19 +161,19 @@ const Bn = (e, o) => Math.abs(e - o) < 1, Hn = (e, o, t) => {
|
|
|
161
161
|
const n = e.targetWindow;
|
|
162
162
|
if (!n)
|
|
163
163
|
return;
|
|
164
|
-
let
|
|
164
|
+
let l = 0;
|
|
165
165
|
const r = Wn ? () => {
|
|
166
166
|
} : Hn(
|
|
167
167
|
n,
|
|
168
168
|
() => {
|
|
169
|
-
o(
|
|
169
|
+
o(l, !1);
|
|
170
170
|
},
|
|
171
171
|
e.options.isScrollingResetDelay
|
|
172
172
|
), i = (u) => () => {
|
|
173
|
-
|
|
174
|
-
},
|
|
175
|
-
return a(), t.addEventListener("scroll",
|
|
176
|
-
t.removeEventListener("scroll",
|
|
173
|
+
l = t[e.options.horizontal ? "scrollLeft" : "scrollTop"], r(), o(l, u);
|
|
174
|
+
}, s = i(!0), a = i(!1);
|
|
175
|
+
return a(), t.addEventListener("scroll", s, ft), t.addEventListener("scrollend", a, ft), () => {
|
|
176
|
+
t.removeEventListener("scroll", s), t.removeEventListener("scrollend", a);
|
|
177
177
|
};
|
|
178
178
|
}, qn = (e, o, t) => {
|
|
179
179
|
if (o != null && o.borderBoxSize) {
|
|
@@ -190,9 +190,9 @@ const Bn = (e, o) => Math.abs(e - o) < 1, Hn = (e, o, t) => {
|
|
|
190
190
|
adjustments: o = 0,
|
|
191
191
|
behavior: t
|
|
192
192
|
}, n) => {
|
|
193
|
-
var
|
|
193
|
+
var l, r;
|
|
194
194
|
const i = e + o;
|
|
195
|
-
(r = (
|
|
195
|
+
(r = (l = n.scrollElement) == null ? void 0 : l.scrollTo) == null || r.call(l, {
|
|
196
196
|
[n.options.horizontal ? "left" : "top"]: i,
|
|
197
197
|
behavior: t
|
|
198
198
|
});
|
|
@@ -201,28 +201,28 @@ class Kn {
|
|
|
201
201
|
constructor(o) {
|
|
202
202
|
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__ */ (() => {
|
|
203
203
|
let t = null;
|
|
204
|
-
const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((
|
|
205
|
-
|
|
204
|
+
const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((l) => {
|
|
205
|
+
l.forEach((r) => {
|
|
206
206
|
this._measureElement(r.target, r);
|
|
207
207
|
});
|
|
208
208
|
}));
|
|
209
209
|
return {
|
|
210
210
|
disconnect: () => {
|
|
211
|
-
var
|
|
212
|
-
return (
|
|
211
|
+
var l;
|
|
212
|
+
return (l = n()) == null ? void 0 : l.disconnect();
|
|
213
213
|
},
|
|
214
|
-
observe: (
|
|
214
|
+
observe: (l) => {
|
|
215
215
|
var r;
|
|
216
|
-
return (r = n()) == null ? void 0 : r.observe(
|
|
216
|
+
return (r = n()) == null ? void 0 : r.observe(l, { box: "border-box" });
|
|
217
217
|
},
|
|
218
|
-
unobserve: (
|
|
218
|
+
unobserve: (l) => {
|
|
219
219
|
var r;
|
|
220
|
-
return (r = n()) == null ? void 0 : r.unobserve(
|
|
220
|
+
return (r = n()) == null ? void 0 : r.unobserve(l);
|
|
221
221
|
}
|
|
222
222
|
};
|
|
223
223
|
})(), this.range = null, this.setOptions = (t) => {
|
|
224
|
-
Object.entries(t).forEach(([n,
|
|
225
|
-
typeof
|
|
224
|
+
Object.entries(t).forEach(([n, l]) => {
|
|
225
|
+
typeof l > "u" && delete t[n];
|
|
226
226
|
}), this.options = {
|
|
227
227
|
debug: !1,
|
|
228
228
|
initialOffset: 0,
|
|
@@ -248,12 +248,12 @@ class Kn {
|
|
|
248
248
|
...t
|
|
249
249
|
};
|
|
250
250
|
}, this.notify = (t, n) => {
|
|
251
|
-
var
|
|
252
|
-
const { startIndex: i, endIndex:
|
|
251
|
+
var l, r;
|
|
252
|
+
const { startIndex: i, endIndex: s } = this.range ?? {
|
|
253
253
|
startIndex: void 0,
|
|
254
254
|
endIndex: void 0
|
|
255
255
|
}, a = this.calculateRange();
|
|
256
|
-
(t || i !== (a == null ? void 0 : a.startIndex) ||
|
|
256
|
+
(t || i !== (a == null ? void 0 : a.startIndex) || s !== (a == null ? void 0 : a.endIndex)) && ((r = (l = this.options).onChange) == null || r.call(l, this, n));
|
|
257
257
|
}, this.cleanup = () => {
|
|
258
258
|
this.unsubs.filter(Boolean).forEach((t) => t()), this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.observer.disconnect(), this.elementsCache.clear();
|
|
259
259
|
}, this._didMount = () => () => {
|
|
@@ -270,30 +270,30 @@ class Kn {
|
|
|
270
270
|
adjustments: void 0,
|
|
271
271
|
behavior: void 0
|
|
272
272
|
}), this.unsubs.push(
|
|
273
|
-
this.options.observeElementRect(this, (
|
|
274
|
-
this.scrollRect =
|
|
273
|
+
this.options.observeElementRect(this, (l) => {
|
|
274
|
+
this.scrollRect = l, this.notify(!1, !1);
|
|
275
275
|
})
|
|
276
276
|
), this.unsubs.push(
|
|
277
|
-
this.options.observeElementOffset(this, (
|
|
278
|
-
this.scrollAdjustments = 0, this.scrollDirection = r ? this.getScrollOffset() <
|
|
277
|
+
this.options.observeElementOffset(this, (l, r) => {
|
|
278
|
+
this.scrollAdjustments = 0, this.scrollDirection = r ? this.getScrollOffset() < l ? "forward" : "backward" : null, this.scrollOffset = l;
|
|
279
279
|
const i = this.isScrolling;
|
|
280
280
|
this.isScrolling = r, this.notify(i !== r, r);
|
|
281
281
|
})
|
|
282
282
|
);
|
|
283
283
|
}
|
|
284
284
|
}, 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) => {
|
|
285
|
-
const
|
|
285
|
+
const l = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
286
286
|
for (let i = n - 1; i >= 0; i--) {
|
|
287
|
-
const
|
|
288
|
-
if (
|
|
287
|
+
const s = t[i];
|
|
288
|
+
if (l.has(s.lane))
|
|
289
289
|
continue;
|
|
290
290
|
const a = r.get(
|
|
291
|
-
|
|
291
|
+
s.lane
|
|
292
292
|
);
|
|
293
|
-
if (a == null ||
|
|
293
|
+
if (a == null || s.end > a.end ? r.set(s.lane, s) : s.end < a.end && l.set(s.lane, !0), l.size === this.options.lanes)
|
|
294
294
|
break;
|
|
295
295
|
}
|
|
296
|
-
return r.size === this.options.lanes ? Array.from(r.values()).sort((i,
|
|
296
|
+
return r.size === this.options.lanes ? Array.from(r.values()).sort((i, s) => i.end === s.end ? i.index - s.index : i.end - s.end)[0] : void 0;
|
|
297
297
|
}, this.getMeasurementOptions = ye(
|
|
298
298
|
() => [
|
|
299
299
|
this.options.count,
|
|
@@ -302,10 +302,10 @@ class Kn {
|
|
|
302
302
|
this.options.getItemKey,
|
|
303
303
|
this.options.enabled
|
|
304
304
|
],
|
|
305
|
-
(t, n,
|
|
305
|
+
(t, n, l, r, i) => (this.pendingMeasuredCacheIndexes = [], {
|
|
306
306
|
count: t,
|
|
307
307
|
paddingStart: n,
|
|
308
|
-
scrollMargin:
|
|
308
|
+
scrollMargin: l,
|
|
309
309
|
getItemKey: r,
|
|
310
310
|
enabled: i
|
|
311
311
|
}),
|
|
@@ -314,7 +314,7 @@ class Kn {
|
|
|
314
314
|
}
|
|
315
315
|
), this.getMeasurements = ye(
|
|
316
316
|
() => [this.getMeasurementOptions(), this.itemSizeCache],
|
|
317
|
-
({ count: t, paddingStart: n, scrollMargin:
|
|
317
|
+
({ count: t, paddingStart: n, scrollMargin: l, getItemKey: r, enabled: i }, s) => {
|
|
318
318
|
var a;
|
|
319
319
|
if (!i)
|
|
320
320
|
return this.measurementsCache = [], this.itemSizeCache.clear(), [];
|
|
@@ -337,7 +337,7 @@ class Kn {
|
|
|
337
337
|
this.options.measureElement(D, void 0, this)
|
|
338
338
|
);
|
|
339
339
|
});
|
|
340
|
-
const x = r(p), _ = this.options.lanes === 1 ? c[p - 1] : this.getFurthestMeasurement(c, p), v = _ ? _.end + this.options.gap : n +
|
|
340
|
+
const x = r(p), _ = this.options.lanes === 1 ? c[p - 1] : this.getFurthestMeasurement(c, p), v = _ ? _.end + this.options.gap : n + l, $ = s.get(x), N = typeof $ == "number" ? $ : this.options.estimateSize(p), I = v + N, k = _ ? _.lane : p % this.options.lanes;
|
|
341
341
|
c[p] = {
|
|
342
342
|
index: p,
|
|
343
343
|
start: v,
|
|
@@ -356,10 +356,10 @@ class Kn {
|
|
|
356
356
|
}
|
|
357
357
|
), this.calculateRange = ye(
|
|
358
358
|
() => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
|
|
359
|
-
(t, n,
|
|
359
|
+
(t, n, l) => this.range = t.length > 0 && n > 0 ? Yn({
|
|
360
360
|
measurements: t,
|
|
361
361
|
outerSize: n,
|
|
362
|
-
scrollOffset:
|
|
362
|
+
scrollOffset: l
|
|
363
363
|
}) : null,
|
|
364
364
|
{
|
|
365
365
|
key: process.env.NODE_ENV !== "production" && "calculateRange",
|
|
@@ -372,10 +372,10 @@ class Kn {
|
|
|
372
372
|
this.options.overscan,
|
|
373
373
|
this.options.count
|
|
374
374
|
],
|
|
375
|
-
(t, n,
|
|
375
|
+
(t, n, l, r) => n === null ? [] : t({
|
|
376
376
|
startIndex: n.startIndex,
|
|
377
377
|
endIndex: n.endIndex,
|
|
378
|
-
overscan:
|
|
378
|
+
overscan: l,
|
|
379
379
|
count: r
|
|
380
380
|
}),
|
|
381
381
|
{
|
|
@@ -383,40 +383,40 @@ class Kn {
|
|
|
383
383
|
debug: () => this.options.debug
|
|
384
384
|
}
|
|
385
385
|
), this.indexFromElement = (t) => {
|
|
386
|
-
const n = this.options.indexAttribute,
|
|
387
|
-
return
|
|
386
|
+
const n = this.options.indexAttribute, l = t.getAttribute(n);
|
|
387
|
+
return l ? parseInt(l, 10) : (console.warn(
|
|
388
388
|
`Missing attribute name '${n}={index}' on measured element.`
|
|
389
389
|
), -1);
|
|
390
390
|
}, this._measureElement = (t, n) => {
|
|
391
|
-
const
|
|
391
|
+
const l = this.indexFromElement(t), r = this.getMeasurements()[l];
|
|
392
392
|
if (!r || !t.isConnected) {
|
|
393
|
-
this.elementsCache.forEach((
|
|
394
|
-
|
|
393
|
+
this.elementsCache.forEach((s, a) => {
|
|
394
|
+
s === t && (this.observer.unobserve(t), this.elementsCache.delete(a));
|
|
395
395
|
});
|
|
396
396
|
return;
|
|
397
397
|
}
|
|
398
398
|
const i = this.elementsCache.get(r.key);
|
|
399
|
-
i !== t && (i && this.observer.unobserve(i), this.observer.observe(t), this.elementsCache.set(r.key, t)), this.resizeItem(
|
|
399
|
+
i !== t && (i && this.observer.unobserve(i), this.observer.observe(t), this.elementsCache.set(r.key, t)), this.resizeItem(l, this.options.measureElement(t, n, this));
|
|
400
400
|
}, this.resizeItem = (t, n) => {
|
|
401
|
-
const
|
|
402
|
-
if (!
|
|
401
|
+
const l = this.getMeasurements()[t];
|
|
402
|
+
if (!l)
|
|
403
403
|
return;
|
|
404
|
-
const r = this.itemSizeCache.get(
|
|
405
|
-
i !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(
|
|
404
|
+
const r = this.itemSizeCache.get(l.key) ?? l.size, i = n - r;
|
|
405
|
+
i !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(l, i, this) : l.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", i), this._scrollToOffset(this.getScrollOffset(), {
|
|
406
406
|
adjustments: this.scrollAdjustments += i,
|
|
407
407
|
behavior: void 0
|
|
408
|
-
})), this.pendingMeasuredCacheIndexes.push(
|
|
408
|
+
})), this.pendingMeasuredCacheIndexes.push(l.index), this.itemSizeCache = new Map(this.itemSizeCache.set(l.key, n)), this.notify(!0, !1));
|
|
409
409
|
}, this.measureElement = (t) => {
|
|
410
410
|
t && this._measureElement(t, void 0);
|
|
411
411
|
}, this.getVirtualItems = ye(
|
|
412
412
|
() => [this.getIndexes(), this.getMeasurements()],
|
|
413
413
|
(t, n) => {
|
|
414
|
-
const
|
|
414
|
+
const l = [];
|
|
415
415
|
for (let r = 0, i = t.length; r < i; r++) {
|
|
416
|
-
const
|
|
417
|
-
|
|
416
|
+
const s = t[r], a = n[s];
|
|
417
|
+
l.push(a);
|
|
418
418
|
}
|
|
419
|
-
return
|
|
419
|
+
return l;
|
|
420
420
|
},
|
|
421
421
|
{
|
|
422
422
|
key: process.env.NODE_ENV !== "production" && "getIndexes",
|
|
@@ -429,56 +429,56 @@ class Kn {
|
|
|
429
429
|
n[kt(
|
|
430
430
|
0,
|
|
431
431
|
n.length - 1,
|
|
432
|
-
(
|
|
432
|
+
(l) => qe(n[l]).start,
|
|
433
433
|
t
|
|
434
434
|
)]
|
|
435
435
|
);
|
|
436
436
|
}, this.getOffsetForAlignment = (t, n) => {
|
|
437
|
-
const
|
|
438
|
-
n === "auto" && (t <= r ? n = "start" : t >= r +
|
|
439
|
-
const i = this.options.horizontal ? "scrollWidth" : "scrollHeight", a = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[i] : this.scrollElement[i] : 0) -
|
|
437
|
+
const l = this.getSize(), r = this.getScrollOffset();
|
|
438
|
+
n === "auto" && (t <= r ? n = "start" : t >= r + l ? n = "end" : n = "start"), n === "start" ? t = t : n === "end" ? t = t - l : n === "center" && (t = t - l / 2);
|
|
439
|
+
const i = this.options.horizontal ? "scrollWidth" : "scrollHeight", a = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[i] : this.scrollElement[i] : 0) - l;
|
|
440
440
|
return Math.max(Math.min(a, t), 0);
|
|
441
441
|
}, this.getOffsetForIndex = (t, n = "auto") => {
|
|
442
442
|
t = Math.max(0, Math.min(t, this.options.count - 1));
|
|
443
|
-
const
|
|
444
|
-
if (!
|
|
443
|
+
const l = this.getMeasurements()[t];
|
|
444
|
+
if (!l)
|
|
445
445
|
return;
|
|
446
446
|
const r = this.getSize(), i = this.getScrollOffset();
|
|
447
447
|
if (n === "auto")
|
|
448
|
-
if (
|
|
448
|
+
if (l.end >= i + r - this.options.scrollPaddingEnd)
|
|
449
449
|
n = "end";
|
|
450
|
-
else if (
|
|
450
|
+
else if (l.start <= i + this.options.scrollPaddingStart)
|
|
451
451
|
n = "start";
|
|
452
452
|
else
|
|
453
453
|
return [i, n];
|
|
454
|
-
const
|
|
455
|
-
return [this.getOffsetForAlignment(
|
|
454
|
+
const s = n === "end" ? l.end + this.options.scrollPaddingEnd : l.start - this.options.scrollPaddingStart;
|
|
455
|
+
return [this.getOffsetForAlignment(s, n), n];
|
|
456
456
|
}, this.isDynamicMode = () => this.elementsCache.size > 0, this.cancelScrollToIndex = () => {
|
|
457
457
|
this.scrollToIndexTimeoutId !== null && this.targetWindow && (this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId), this.scrollToIndexTimeoutId = null);
|
|
458
|
-
}, this.scrollToOffset = (t, { align: n = "start", behavior:
|
|
459
|
-
this.cancelScrollToIndex(),
|
|
458
|
+
}, this.scrollToOffset = (t, { align: n = "start", behavior: l } = {}) => {
|
|
459
|
+
this.cancelScrollToIndex(), l === "smooth" && this.isDynamicMode() && console.warn(
|
|
460
460
|
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
461
461
|
), this._scrollToOffset(this.getOffsetForAlignment(t, n), {
|
|
462
462
|
adjustments: void 0,
|
|
463
|
-
behavior:
|
|
463
|
+
behavior: l
|
|
464
464
|
});
|
|
465
|
-
}, this.scrollToIndex = (t, { align: n = "auto", behavior:
|
|
466
|
-
t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(),
|
|
465
|
+
}, this.scrollToIndex = (t, { align: n = "auto", behavior: l } = {}) => {
|
|
466
|
+
t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(), l === "smooth" && this.isDynamicMode() && console.warn(
|
|
467
467
|
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
468
468
|
);
|
|
469
469
|
const r = this.getOffsetForIndex(t, n);
|
|
470
470
|
if (!r) return;
|
|
471
|
-
const [i,
|
|
472
|
-
this._scrollToOffset(i, { adjustments: void 0, behavior:
|
|
471
|
+
const [i, s] = r;
|
|
472
|
+
this._scrollToOffset(i, { adjustments: void 0, behavior: l }), l !== "smooth" && this.isDynamicMode() && this.targetWindow && (this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
|
|
473
473
|
if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
|
|
474
474
|
this.options.getItemKey(t)
|
|
475
475
|
)) {
|
|
476
476
|
const [u] = qe(
|
|
477
|
-
this.getOffsetForIndex(t,
|
|
477
|
+
this.getOffsetForIndex(t, s)
|
|
478
478
|
);
|
|
479
|
-
Bn(u, this.getScrollOffset()) || this.scrollToIndex(t, { align:
|
|
479
|
+
Bn(u, this.getScrollOffset()) || this.scrollToIndex(t, { align: s, behavior: l });
|
|
480
480
|
} else
|
|
481
|
-
this.scrollToIndex(t, { align:
|
|
481
|
+
this.scrollToIndex(t, { align: s, behavior: l });
|
|
482
482
|
}));
|
|
483
483
|
}, this.scrollBy = (t, { behavior: n } = {}) => {
|
|
484
484
|
this.cancelScrollToIndex(), n === "smooth" && this.isDynamicMode() && console.warn(
|
|
@@ -490,15 +490,15 @@ class Kn {
|
|
|
490
490
|
}, this.getTotalSize = () => {
|
|
491
491
|
var t;
|
|
492
492
|
const n = this.getMeasurements();
|
|
493
|
-
let
|
|
494
|
-
return n.length === 0 ?
|
|
493
|
+
let l;
|
|
494
|
+
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(
|
|
495
495
|
...n.slice(-this.options.lanes).map((r) => r.end)
|
|
496
|
-
),
|
|
496
|
+
), l - this.options.scrollMargin + this.options.paddingEnd;
|
|
497
497
|
}, this._scrollToOffset = (t, {
|
|
498
498
|
adjustments: n,
|
|
499
|
-
behavior:
|
|
499
|
+
behavior: l
|
|
500
500
|
}) => {
|
|
501
|
-
this.options.scrollToFn(t, { behavior:
|
|
501
|
+
this.options.scrollToFn(t, { behavior: l, adjustments: n }, this);
|
|
502
502
|
}, this.measure = () => {
|
|
503
503
|
var t, n;
|
|
504
504
|
this.itemSizeCache = /* @__PURE__ */ new Map(), (n = (t = this.options).onChange) == null || n.call(t, this, !1);
|
|
@@ -507,13 +507,13 @@ class Kn {
|
|
|
507
507
|
}
|
|
508
508
|
const kt = (e, o, t, n) => {
|
|
509
509
|
for (; e <= o; ) {
|
|
510
|
-
const
|
|
510
|
+
const l = (e + o) / 2 | 0, r = t(l);
|
|
511
511
|
if (r < n)
|
|
512
|
-
e =
|
|
512
|
+
e = l + 1;
|
|
513
513
|
else if (r > n)
|
|
514
|
-
o =
|
|
514
|
+
o = l - 1;
|
|
515
515
|
else
|
|
516
|
-
return
|
|
516
|
+
return l;
|
|
517
517
|
}
|
|
518
518
|
return e > 0 ? e - 1 : 0;
|
|
519
519
|
};
|
|
@@ -522,7 +522,7 @@ function Yn({
|
|
|
522
522
|
outerSize: o,
|
|
523
523
|
scrollOffset: t
|
|
524
524
|
}) {
|
|
525
|
-
const n = e.length - 1, r = kt(0, n, (
|
|
525
|
+
const n = e.length - 1, r = kt(0, n, (s) => e[s].start, t);
|
|
526
526
|
let i = r;
|
|
527
527
|
for (; i < n && e[i].end < t + o; )
|
|
528
528
|
i++;
|
|
@@ -532,20 +532,20 @@ function Qn(e) {
|
|
|
532
532
|
const o = new Kn(V(e)), t = pn(o), n = o._didMount();
|
|
533
533
|
return F(
|
|
534
534
|
() => V(e).getScrollElement(),
|
|
535
|
-
(
|
|
536
|
-
|
|
535
|
+
(l) => {
|
|
536
|
+
l && o._willUpdate();
|
|
537
537
|
},
|
|
538
538
|
{
|
|
539
539
|
immediate: !0
|
|
540
540
|
}
|
|
541
541
|
), F(
|
|
542
542
|
() => V(e),
|
|
543
|
-
(
|
|
543
|
+
(l) => {
|
|
544
544
|
o.setOptions({
|
|
545
|
-
...
|
|
545
|
+
...l,
|
|
546
546
|
onChange: (r, i) => {
|
|
547
|
-
var
|
|
548
|
-
ut(t), (
|
|
547
|
+
var s;
|
|
548
|
+
ut(t), (s = l.onChange) == null || s.call(l, r, i);
|
|
549
549
|
}
|
|
550
550
|
}), o._willUpdate(), ut(t);
|
|
551
551
|
},
|
|
@@ -565,9 +565,9 @@ function Xn(e) {
|
|
|
565
565
|
);
|
|
566
566
|
}
|
|
567
567
|
function eo(e, o, t) {
|
|
568
|
-
let n = E(t == null ? void 0 : t.value),
|
|
569
|
-
return [S(() =>
|
|
570
|
-
return
|
|
568
|
+
let n = E(t == null ? void 0 : t.value), l = S(() => e.value !== void 0);
|
|
569
|
+
return [S(() => l.value ? e.value : n.value), function(r) {
|
|
570
|
+
return l.value || (n.value = r), o == null ? void 0 : o(r);
|
|
571
571
|
}];
|
|
572
572
|
}
|
|
573
573
|
function to(e) {
|
|
@@ -576,8 +576,8 @@ function to(e) {
|
|
|
576
576
|
}));
|
|
577
577
|
}
|
|
578
578
|
function De() {
|
|
579
|
-
let e = [], o = { addEventListener(t, n,
|
|
580
|
-
return t.addEventListener(n,
|
|
579
|
+
let e = [], o = { addEventListener(t, n, l, r) {
|
|
580
|
+
return t.addEventListener(n, l, r), o.add(() => t.removeEventListener(n, l, r));
|
|
581
581
|
}, requestAnimationFrame(...t) {
|
|
582
582
|
let n = requestAnimationFrame(...t);
|
|
583
583
|
o.add(() => cancelAnimationFrame(n));
|
|
@@ -595,9 +595,9 @@ function De() {
|
|
|
595
595
|
}), o.add(() => {
|
|
596
596
|
n.current = !1;
|
|
597
597
|
});
|
|
598
|
-
}, style(t, n,
|
|
598
|
+
}, style(t, n, l) {
|
|
599
599
|
let r = t.style.getPropertyValue(n);
|
|
600
|
-
return Object.assign(t.style, { [n]:
|
|
600
|
+
return Object.assign(t.style, { [n]: l }), this.add(() => {
|
|
601
601
|
Object.assign(t.style, { [n]: r });
|
|
602
602
|
});
|
|
603
603
|
}, group(t) {
|
|
@@ -606,7 +606,7 @@ function De() {
|
|
|
606
606
|
}, add(t) {
|
|
607
607
|
return e.push(t), () => {
|
|
608
608
|
let n = e.indexOf(t);
|
|
609
|
-
if (n >= 0) for (let
|
|
609
|
+
if (n >= 0) for (let l of e.splice(n, 1)) l();
|
|
610
610
|
};
|
|
611
611
|
}, dispose() {
|
|
612
612
|
for (let t of e.splice(0)) t();
|
|
@@ -623,9 +623,9 @@ function oo() {
|
|
|
623
623
|
e.dispose(), e.nextFrame(o);
|
|
624
624
|
};
|
|
625
625
|
}
|
|
626
|
-
let
|
|
626
|
+
let lo = Symbol("headlessui.useid"), so = 0;
|
|
627
627
|
function Le() {
|
|
628
|
-
return Ie(
|
|
628
|
+
return Ie(lo, () => `${++so}`)();
|
|
629
629
|
}
|
|
630
630
|
function P(e) {
|
|
631
631
|
var o;
|
|
@@ -633,13 +633,13 @@ function P(e) {
|
|
|
633
633
|
let t = (o = e.value.$el) != null ? o : e.value;
|
|
634
634
|
return t instanceof Node ? t : null;
|
|
635
635
|
}
|
|
636
|
-
function
|
|
636
|
+
function le(e, o, ...t) {
|
|
637
637
|
if (e in o) {
|
|
638
|
-
let
|
|
639
|
-
return typeof
|
|
638
|
+
let l = o[e];
|
|
639
|
+
return typeof l == "function" ? l(...t) : l;
|
|
640
640
|
}
|
|
641
|
-
let n = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(o).map((
|
|
642
|
-
throw Error.captureStackTrace && Error.captureStackTrace(n,
|
|
641
|
+
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(", ")}.`);
|
|
642
|
+
throw Error.captureStackTrace && Error.captureStackTrace(n, le), n;
|
|
643
643
|
}
|
|
644
644
|
var ro = Object.defineProperty, io = (e, o, t) => o in e ? ro(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, pt = (e, o, t) => (io(e, typeof o != "symbol" ? o + "" : o, t), t);
|
|
645
645
|
let ao = class {
|
|
@@ -664,9 +664,9 @@ let ao = class {
|
|
|
664
664
|
detect() {
|
|
665
665
|
return typeof window > "u" || typeof document > "u" ? "server" : "client";
|
|
666
666
|
}
|
|
667
|
-
},
|
|
667
|
+
}, st = new ao();
|
|
668
668
|
function rt(e) {
|
|
669
|
-
if (
|
|
669
|
+
if (st.isServer) return null;
|
|
670
670
|
if (e instanceof Node) return e.ownerDocument;
|
|
671
671
|
if (e != null && e.hasOwnProperty("value")) {
|
|
672
672
|
let o = P(e);
|
|
@@ -678,7 +678,7 @@ let vt = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "butt
|
|
|
678
678
|
var uo = ((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))(uo || {}), co = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(co || {}), fo = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(fo || {}), Mt = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(Mt || {});
|
|
679
679
|
function po(e, o = 0) {
|
|
680
680
|
var t;
|
|
681
|
-
return e === ((t = rt(e)) == null ? void 0 : t.body) ? !1 :
|
|
681
|
+
return e === ((t = rt(e)) == null ? void 0 : t.body) ? !1 : le(o, { 0() {
|
|
682
682
|
return e.matches(vt);
|
|
683
683
|
}, 1() {
|
|
684
684
|
let n = e;
|
|
@@ -697,9 +697,9 @@ typeof window < "u" && typeof document < "u" && (document.addEventListener("keyd
|
|
|
697
697
|
}, !0));
|
|
698
698
|
function ho(e, o = (t) => t) {
|
|
699
699
|
return e.slice().sort((t, n) => {
|
|
700
|
-
let
|
|
701
|
-
if (
|
|
702
|
-
let i =
|
|
700
|
+
let l = o(t), r = o(n);
|
|
701
|
+
if (l === null || r === null) return 0;
|
|
702
|
+
let i = l.compareDocumentPosition(r);
|
|
703
703
|
return i & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
704
704
|
});
|
|
705
705
|
}
|
|
@@ -713,39 +713,39 @@ function Nt() {
|
|
|
713
713
|
return mo() || go();
|
|
714
714
|
}
|
|
715
715
|
function Pe(e, o, t) {
|
|
716
|
-
|
|
716
|
+
st.isServer || ie((n) => {
|
|
717
717
|
document.addEventListener(e, o, t), n(() => document.removeEventListener(e, o, t));
|
|
718
718
|
});
|
|
719
719
|
}
|
|
720
720
|
function bo(e, o, t) {
|
|
721
|
-
|
|
721
|
+
st.isServer || ie((n) => {
|
|
722
722
|
window.addEventListener(e, o, t), n(() => window.removeEventListener(e, o, t));
|
|
723
723
|
});
|
|
724
724
|
}
|
|
725
725
|
function xo(e, o, t = S(() => !0)) {
|
|
726
726
|
function n(r, i) {
|
|
727
727
|
if (!t.value || r.defaultPrevented) return;
|
|
728
|
-
let
|
|
729
|
-
if (
|
|
728
|
+
let s = i(r);
|
|
729
|
+
if (s === null || !s.getRootNode().contains(s)) return;
|
|
730
730
|
let a = function u(c) {
|
|
731
731
|
return typeof c == "function" ? u(c()) : Array.isArray(c) || c instanceof Set ? c : [c];
|
|
732
732
|
}(e);
|
|
733
733
|
for (let u of a) {
|
|
734
734
|
if (u === null) continue;
|
|
735
735
|
let c = u instanceof HTMLElement ? u : P(u);
|
|
736
|
-
if (c != null && c.contains(
|
|
736
|
+
if (c != null && c.contains(s) || r.composed && r.composedPath().includes(c)) return;
|
|
737
737
|
}
|
|
738
|
-
return !po(
|
|
738
|
+
return !po(s, Mt.Loose) && s.tabIndex !== -1 && r.preventDefault(), o(r, s);
|
|
739
739
|
}
|
|
740
|
-
let
|
|
740
|
+
let l = E(null);
|
|
741
741
|
Pe("pointerdown", (r) => {
|
|
742
|
-
var i,
|
|
743
|
-
t.value && (
|
|
742
|
+
var i, s;
|
|
743
|
+
t.value && (l.value = ((s = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : s[0]) || r.target);
|
|
744
744
|
}, !0), Pe("mousedown", (r) => {
|
|
745
|
-
var i,
|
|
746
|
-
t.value && (
|
|
745
|
+
var i, s;
|
|
746
|
+
t.value && (l.value = ((s = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : s[0]) || r.target);
|
|
747
747
|
}, !0), Pe("click", (r) => {
|
|
748
|
-
Nt() ||
|
|
748
|
+
Nt() || l.value && (n(r, () => l.value), l.value = null);
|
|
749
749
|
}, !0), Pe("touchend", (r) => n(r, () => r.target instanceof HTMLElement ? r.target : null), !0), bo("blur", (r) => n(r, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
|
|
750
750
|
}
|
|
751
751
|
function ht(e, o) {
|
|
@@ -776,41 +776,41 @@ function Co() {
|
|
|
776
776
|
}
|
|
777
777
|
function yo({ container: e, accept: o, walk: t, enabled: n }) {
|
|
778
778
|
ie(() => {
|
|
779
|
-
let
|
|
780
|
-
if (!
|
|
779
|
+
let l = e.value;
|
|
780
|
+
if (!l || n !== void 0 && !n.value) return;
|
|
781
781
|
let r = rt(e);
|
|
782
782
|
if (!r) return;
|
|
783
|
-
let i = Object.assign((a) => o(a), { acceptNode: o }),
|
|
784
|
-
for (;
|
|
783
|
+
let i = Object.assign((a) => o(a), { acceptNode: o }), s = r.createTreeWalker(l, NodeFilter.SHOW_ELEMENT, i, !1);
|
|
784
|
+
for (; s.nextNode(); ) t(s.currentNode);
|
|
785
785
|
});
|
|
786
786
|
}
|
|
787
787
|
var Oe = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Oe || {}), wo = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(wo || {});
|
|
788
|
-
function pe({ visible: e = !0, features: o = 0, ourProps: t, theirProps: n, ...
|
|
788
|
+
function pe({ visible: e = !0, features: o = 0, ourProps: t, theirProps: n, ...l }) {
|
|
789
789
|
var r;
|
|
790
|
-
let i = At(n, t),
|
|
791
|
-
if (e || o & 2 && i.static) return Je(
|
|
790
|
+
let i = At(n, t), s = Object.assign(l, { props: i });
|
|
791
|
+
if (e || o & 2 && i.static) return Je(s);
|
|
792
792
|
if (o & 1) {
|
|
793
793
|
let a = (r = i.unmount) == null || r ? 0 : 1;
|
|
794
|
-
return
|
|
794
|
+
return le(a, { 0() {
|
|
795
795
|
return null;
|
|
796
796
|
}, 1() {
|
|
797
|
-
return Je({ ...
|
|
797
|
+
return Je({ ...l, props: { ...i, hidden: !0, style: { display: "none" } } });
|
|
798
798
|
} });
|
|
799
799
|
}
|
|
800
|
-
return Je(
|
|
800
|
+
return Je(s);
|
|
801
801
|
}
|
|
802
|
-
function Je({ props: e, attrs: o, slots: t, slot: n, name:
|
|
802
|
+
function Je({ props: e, attrs: o, slots: t, slot: n, name: l }) {
|
|
803
803
|
var r, i;
|
|
804
|
-
let { as:
|
|
804
|
+
let { as: s, ...a } = je(e, ["unmount", "static"]), u = (r = t.default) == null ? void 0 : r.call(t, n), c = {};
|
|
805
805
|
if (n) {
|
|
806
806
|
let p = !1, g = [];
|
|
807
807
|
for (let [x, _] of Object.entries(n)) typeof _ == "boolean" && (p = !0), _ === !0 && g.push(x);
|
|
808
808
|
p && (c["data-headlessui-state"] = g.join(" "));
|
|
809
809
|
}
|
|
810
|
-
if (
|
|
810
|
+
if (s === "template") {
|
|
811
811
|
if (u = Dt(u ?? []), Object.keys(a).length > 0 || Object.keys(o).length > 0) {
|
|
812
812
|
let [p, ...g] = u ?? [];
|
|
813
|
-
if (!Eo(p) || g.length > 0) throw new Error(['Passing props on "template"!', "", `The current component <${
|
|
813
|
+
if (!Eo(p) || g.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((v) => v.trim()).filter((v, $, N) => N.indexOf(v) === $).sort((v, $) => v.localeCompare($)).map((v) => ` - ${v}`).join(`
|
|
814
814
|
`), "", "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((v) => ` - ${v}`).join(`
|
|
815
815
|
`)].join(`
|
|
816
816
|
`));
|
|
@@ -820,7 +820,7 @@ function Je({ props: e, attrs: o, slots: t, slot: n, name: s }) {
|
|
|
820
820
|
}
|
|
821
821
|
return Array.isArray(u) && u.length === 1 ? u[0] : u;
|
|
822
822
|
}
|
|
823
|
-
return Ee(
|
|
823
|
+
return Ee(s, Object.assign({}, a, c), { default: () => u });
|
|
824
824
|
}
|
|
825
825
|
function Dt(e) {
|
|
826
826
|
return e.flatMap((o) => o.type === Z ? Dt(o.children) : [o]);
|
|
@@ -829,13 +829,13 @@ function At(...e) {
|
|
|
829
829
|
if (e.length === 0) return {};
|
|
830
830
|
if (e.length === 1) return e[0];
|
|
831
831
|
let o = {}, t = {};
|
|
832
|
-
for (let n of e) for (let
|
|
832
|
+
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];
|
|
833
833
|
if (o.disabled || o["aria-disabled"]) return Object.assign(o, Object.fromEntries(Object.keys(t).map((n) => [n, void 0])));
|
|
834
|
-
for (let n in t) Object.assign(o, { [n](
|
|
834
|
+
for (let n in t) Object.assign(o, { [n](l, ...r) {
|
|
835
835
|
let i = t[n];
|
|
836
|
-
for (let
|
|
837
|
-
if (
|
|
838
|
-
l
|
|
836
|
+
for (let s of i) {
|
|
837
|
+
if (l instanceof Event && l.defaultPrevented) return;
|
|
838
|
+
s(l, ...r);
|
|
839
839
|
}
|
|
840
840
|
} });
|
|
841
841
|
return o;
|
|
@@ -857,7 +857,7 @@ var Ft = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.
|
|
|
857
857
|
let Oo = ae({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: o, attrs: t }) {
|
|
858
858
|
return () => {
|
|
859
859
|
var n;
|
|
860
|
-
let { features:
|
|
860
|
+
let { features: l, ...r } = e, i = { "aria-hidden": (l & 2) === 2 ? !0 : (n = r["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" } } };
|
|
861
861
|
return pe({ ourProps: i, theirProps: r, slot: {}, attrs: t, slots: o, name: "Hidden" });
|
|
862
862
|
};
|
|
863
863
|
} }), jt = Symbol("Context");
|
|
@@ -889,19 +889,19 @@ var z = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.N
|
|
|
889
889
|
function gt(e, o) {
|
|
890
890
|
let t = o.resolveItems();
|
|
891
891
|
if (t.length <= 0) return null;
|
|
892
|
-
let n = o.resolveActiveIndex(),
|
|
892
|
+
let n = o.resolveActiveIndex(), l = n ?? -1;
|
|
893
893
|
switch (e.focus) {
|
|
894
894
|
case 0: {
|
|
895
895
|
for (let r = 0; r < t.length; ++r) if (!o.resolveDisabled(t[r], r, t)) return r;
|
|
896
896
|
return n;
|
|
897
897
|
}
|
|
898
898
|
case 1: {
|
|
899
|
-
|
|
900
|
-
for (let r =
|
|
899
|
+
l === -1 && (l = t.length);
|
|
900
|
+
for (let r = l - 1; r >= 0; --r) if (!o.resolveDisabled(t[r], r, t)) return r;
|
|
901
901
|
return n;
|
|
902
902
|
}
|
|
903
903
|
case 2: {
|
|
904
|
-
for (let r =
|
|
904
|
+
for (let r = l + 1; r < t.length; ++r) if (!o.resolveDisabled(t[r], r, t)) return r;
|
|
905
905
|
return n;
|
|
906
906
|
}
|
|
907
907
|
case 3: {
|
|
@@ -919,14 +919,14 @@ function gt(e, o) {
|
|
|
919
919
|
}
|
|
920
920
|
}
|
|
921
921
|
function Ht(e = {}, o = null, t = []) {
|
|
922
|
-
for (let [n,
|
|
922
|
+
for (let [n, l] of Object.entries(e)) Ut(t, zt(o, n), l);
|
|
923
923
|
return t;
|
|
924
924
|
}
|
|
925
925
|
function zt(e, o) {
|
|
926
926
|
return e ? e + "[" + o + "]" : o;
|
|
927
927
|
}
|
|
928
928
|
function Ut(e, o, t) {
|
|
929
|
-
if (Array.isArray(t)) for (let [n,
|
|
929
|
+
if (Array.isArray(t)) for (let [n, l] of t.entries()) Ut(e, zt(o, n.toString()), l);
|
|
930
930
|
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, ""]) : Ht(t, o, e);
|
|
931
931
|
}
|
|
932
932
|
function Ro(e, o) {
|
|
@@ -944,35 +944,35 @@ function ve(e) {
|
|
|
944
944
|
}
|
|
945
945
|
let Wt = Symbol("VirtualContext"), Mo = ae({ name: "VirtualProvider", setup(e, { slots: o }) {
|
|
946
946
|
let t = ve("VirtualProvider"), n = S(() => {
|
|
947
|
-
let
|
|
948
|
-
if (!
|
|
949
|
-
let a = window.getComputedStyle(
|
|
947
|
+
let s = P(t.optionsRef);
|
|
948
|
+
if (!s) return { start: 0, end: 0 };
|
|
949
|
+
let a = window.getComputedStyle(s);
|
|
950
950
|
return { start: parseFloat(a.paddingBlockStart || a.paddingTop), end: parseFloat(a.paddingBlockEnd || a.paddingBottom) };
|
|
951
|
-
}),
|
|
951
|
+
}), l = Xn(S(() => ({ scrollPaddingStart: n.value.start, scrollPaddingEnd: n.value.end, count: t.virtual.value.options.length, estimateSize() {
|
|
952
952
|
return 40;
|
|
953
953
|
}, getScrollElement() {
|
|
954
954
|
return P(t.optionsRef);
|
|
955
955
|
}, overscan: 12 }))), r = S(() => {
|
|
956
|
-
var
|
|
957
|
-
return (
|
|
956
|
+
var s;
|
|
957
|
+
return (s = t.virtual.value) == null ? void 0 : s.options;
|
|
958
958
|
}), i = E(0);
|
|
959
959
|
return F([r], () => {
|
|
960
960
|
i.value += 1;
|
|
961
|
-
}), ot(Wt, t.virtual.value ?
|
|
962
|
-
if (
|
|
961
|
+
}), ot(Wt, t.virtual.value ? l : null), () => [Ee("div", { style: { position: "relative", width: "100%", height: `${l.value.getTotalSize()}px` }, ref: (s) => {
|
|
962
|
+
if (s) {
|
|
963
963
|
if (typeof process < "u" && process.env.JEST_WORKER_ID !== void 0 || t.activationTrigger.value === 0) return;
|
|
964
|
-
t.activeOptionIndex.value !== null && t.virtual.value.options.length > t.activeOptionIndex.value &&
|
|
964
|
+
t.activeOptionIndex.value !== null && t.virtual.value.options.length > t.activeOptionIndex.value && l.value.scrollToIndex(t.activeOptionIndex.value);
|
|
965
965
|
}
|
|
966
|
-
} },
|
|
966
|
+
} }, l.value.getVirtualItems().map((s) => $t(o.default({ option: t.virtual.value.options[s.index], open: t.comboboxState.value === 0 })[0], { key: `${i.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" } })))];
|
|
967
967
|
} }), No = 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 }) {
|
|
968
|
-
let
|
|
968
|
+
let l = E(1), r = E(null), i = E(null), s = E(null), a = E(null), u = E({ static: !1, hold: !1 }), c = E([]), p = E(null), g = E(2), x = E(!1);
|
|
969
969
|
function _(d = (f) => f) {
|
|
970
970
|
let f = p.value !== null ? c.value[p.value] : null, y = d(c.value.slice()), O = y.length > 0 && y[0].dataRef.order.value !== null ? y.sort((A, G) => A.dataRef.order.value - G.dataRef.order.value) : ho(y, (A) => P(A.dataRef.domRef)), M = f ? O.indexOf(f) : null;
|
|
971
971
|
return M === -1 && (M = null), { options: O, activeOptionIndex: M };
|
|
972
972
|
}
|
|
973
|
-
let v = S(() => e.multiple ? 1 : 0), $ = S(() => e.nullable), [N, I] = eo(S(() => e.modelValue), (d) => n("update:modelValue", d), S(() => e.defaultValue)), k = S(() => N.value === void 0 ?
|
|
973
|
+
let v = S(() => e.multiple ? 1 : 0), $ = S(() => e.nullable), [N, I] = eo(S(() => e.modelValue), (d) => n("update:modelValue", d), S(() => e.defaultValue)), k = S(() => N.value === void 0 ? le(v.value, { 1: [], 0: void 0 }) : N.value), D = null, m = null;
|
|
974
974
|
function R(d) {
|
|
975
|
-
return
|
|
975
|
+
return le(v.value, { 0() {
|
|
976
976
|
return I == null ? void 0 : I(d);
|
|
977
977
|
}, 1: () => {
|
|
978
978
|
let f = K(b.value.value).slice(), y = K(d), O = f.findIndex((M) => b.compare(y, K(M)));
|
|
@@ -987,7 +987,7 @@ let Wt = Symbol("VirtualContext"), Mo = ae({ name: "VirtualProvider", setup(e, {
|
|
|
987
987
|
y !== -1 ? p.value = y : p.value = null;
|
|
988
988
|
}
|
|
989
989
|
});
|
|
990
|
-
let b = { comboboxState:
|
|
990
|
+
let b = { comboboxState: l, value: k, mode: v, compare(d, f) {
|
|
991
991
|
if (typeof e.by == "string") {
|
|
992
992
|
let y = e.by;
|
|
993
993
|
return (d == null ? void 0 : d[y]) === (f == null ? void 0 : f[y]);
|
|
@@ -995,7 +995,7 @@ let Wt = Symbol("VirtualContext"), Mo = ae({ name: "VirtualProvider", setup(e, {
|
|
|
995
995
|
return e.by === null ? Ro(d, f) : e.by(d, f);
|
|
996
996
|
}, calculateIndex(d) {
|
|
997
997
|
return b.virtual.value ? e.by === null ? b.virtual.value.options.indexOf(d) : b.virtual.value.options.findIndex((f) => b.compare(f, d)) : c.value.findIndex((f) => b.compare(f.dataRef.value, d));
|
|
998
|
-
}, defaultValue: S(() => e.defaultValue), nullable: $, immediate: S(() => !1), virtual: S(() => null), inputRef: i, labelRef: r, buttonRef:
|
|
998
|
+
}, defaultValue: S(() => e.defaultValue), nullable: $, immediate: S(() => !1), virtual: S(() => null), inputRef: i, labelRef: r, buttonRef: s, optionsRef: a, disabled: S(() => e.disabled), options: c, change(d) {
|
|
999
999
|
I(d);
|
|
1000
1000
|
}, activeOptionIndex: S(() => {
|
|
1001
1001
|
if (x.value && p.value === null && (b.virtual.value ? b.virtual.value.options.length > 0 : c.value.length > 0)) {
|
|
@@ -1011,20 +1011,20 @@ let Wt = Symbol("VirtualContext"), Mo = ae({ name: "VirtualProvider", setup(e, {
|
|
|
1011
1011
|
}
|
|
1012
1012
|
return p.value;
|
|
1013
1013
|
}), activationTrigger: g, optionsPropsRef: u, closeCombobox() {
|
|
1014
|
-
x.value = !1, !e.disabled &&
|
|
1014
|
+
x.value = !1, !e.disabled && l.value !== 1 && (l.value = 1, p.value = null);
|
|
1015
1015
|
}, openCombobox() {
|
|
1016
|
-
if (x.value = !0, !e.disabled &&
|
|
1016
|
+
if (x.value = !0, !e.disabled && l.value !== 0) {
|
|
1017
1017
|
if (b.value.value) {
|
|
1018
1018
|
let d = b.calculateIndex(b.value.value);
|
|
1019
1019
|
d !== -1 && (p.value = d);
|
|
1020
1020
|
}
|
|
1021
|
-
|
|
1021
|
+
l.value = 0;
|
|
1022
1022
|
}
|
|
1023
1023
|
}, setActivationTrigger(d) {
|
|
1024
1024
|
g.value = d;
|
|
1025
1025
|
}, goToOption(d, f, y) {
|
|
1026
1026
|
x.value = !1, D !== null && cancelAnimationFrame(D), D = requestAnimationFrame(() => {
|
|
1027
|
-
if (e.disabled || a.value && !u.value.static &&
|
|
1027
|
+
if (e.disabled || a.value && !u.value.static && l.value === 1) return;
|
|
1028
1028
|
if (b.virtual.value) {
|
|
1029
1029
|
p.value = d === z.Specific ? f : gt({ focus: d }, { resolveItems: () => b.virtual.value.options, resolveActiveIndex: () => {
|
|
1030
1030
|
var A, G;
|
|
@@ -1082,11 +1082,11 @@ let Wt = Symbol("VirtualContext"), Mo = ae({ name: "VirtualProvider", setup(e, {
|
|
|
1082
1082
|
});
|
|
1083
1083
|
c.value = y.options, p.value = y.activeOptionIndex, g.value = 2;
|
|
1084
1084
|
}, isSelected(d) {
|
|
1085
|
-
return
|
|
1085
|
+
return le(v.value, { 0: () => b.compare(K(b.value.value), K(d)), 1: () => K(b.value.value).some((f) => b.compare(K(f), K(d))) });
|
|
1086
1086
|
}, isActive(d) {
|
|
1087
1087
|
return p.value === b.calculateIndex(d);
|
|
1088
1088
|
} };
|
|
1089
|
-
xo([i,
|
|
1089
|
+
xo([i, s, a], () => b.closeCombobox(), S(() => l.value === 0)), ot(Zt, b), To(S(() => le(l.value, { 0: $e.Open, 1: $e.Closed })));
|
|
1090
1090
|
let L = S(() => {
|
|
1091
1091
|
var d;
|
|
1092
1092
|
return (d = P(i)) == null ? void 0 : d.closest("form");
|
|
@@ -1104,27 +1104,27 @@ let Wt = Symbol("VirtualContext"), Mo = ae({ name: "VirtualProvider", setup(e, {
|
|
|
1104
1104
|
}, { immediate: !0 });
|
|
1105
1105
|
}), () => {
|
|
1106
1106
|
var d, f, y;
|
|
1107
|
-
let { name: O, disabled: M, form: A, ...G } = e, q = { open:
|
|
1107
|
+
let { name: O, disabled: M, form: A, ...G } = e, q = { open: l.value === 0, disabled: M, activeIndex: b.activeOptionIndex.value, activeOption: b.activeOptionIndex.value === null ? null : b.virtual.value ? b.virtual.value.options[(d = b.activeOptionIndex.value) != null ? d : 0] : (y = (f = b.options.value[b.activeOptionIndex.value]) == null ? void 0 : f.dataRef.value) != null ? y : null, value: k.value };
|
|
1108
1108
|
return Ee(Z, [...O != null && k.value != null ? Ht({ [O]: k.value }).map(([j, fn]) => Ee(Oo, So({ features: Ft.Hidden, key: j, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: A, disabled: M, name: j, value: fn }))) : [], pe({ theirProps: { ...t, ...je(G, ["by", "defaultValue", "immediate", "modelValue", "multiple", "nullable", "onUpdate:modelValue", "virtual"]) }, ourProps: {}, slot: q, slots: o, attrs: t, name: "Combobox" })]);
|
|
1109
1109
|
};
|
|
1110
1110
|
} });
|
|
1111
1111
|
ae({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t }) {
|
|
1112
1112
|
var n;
|
|
1113
|
-
let
|
|
1113
|
+
let l = (n = e.id) != null ? n : `headlessui-combobox-label-${Le()}`, r = ve("ComboboxLabel");
|
|
1114
1114
|
function i() {
|
|
1115
|
-
var
|
|
1116
|
-
(
|
|
1115
|
+
var s;
|
|
1116
|
+
(s = P(r.inputRef)) == null || s.focus({ preventScroll: !0 });
|
|
1117
1117
|
}
|
|
1118
1118
|
return () => {
|
|
1119
|
-
let
|
|
1120
|
-
return pe({ ourProps: u, theirProps: a, slot:
|
|
1119
|
+
let s = { open: r.comboboxState.value === 0, disabled: r.disabled.value }, { ...a } = e, u = { id: l, ref: r.labelRef, onClick: i };
|
|
1120
|
+
return pe({ ourProps: u, theirProps: a, slot: s, attrs: o, slots: t, name: "ComboboxLabel" });
|
|
1121
1121
|
};
|
|
1122
1122
|
} });
|
|
1123
1123
|
let Do = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t, expose: n }) {
|
|
1124
|
-
var
|
|
1125
|
-
let r = (
|
|
1124
|
+
var l;
|
|
1125
|
+
let r = (l = e.id) != null ? l : `headlessui-combobox-button-${Le()}`, i = ve("ComboboxButton");
|
|
1126
1126
|
n({ el: i.buttonRef, $el: i.buttonRef });
|
|
1127
|
-
function
|
|
1127
|
+
function s(c) {
|
|
1128
1128
|
i.disabled.value || (i.comboboxState.value === 0 ? i.closeCombobox() : (c.preventDefault(), i.openCombobox()), Q(() => {
|
|
1129
1129
|
var p;
|
|
1130
1130
|
return (p = P(i.inputRef)) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
@@ -1158,37 +1158,37 @@ let Do = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1158
1158
|
let u = _o(S(() => ({ as: e.as, type: o.type })), i.buttonRef);
|
|
1159
1159
|
return () => {
|
|
1160
1160
|
var c, p;
|
|
1161
|
-
let g = { open: i.comboboxState.value === 0, disabled: i.disabled.value, value: i.value.value }, { ...x } = e, _ = { ref: i.buttonRef, id: r, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (c = P(i.optionsRef)) == null ? void 0 : c.id, "aria-expanded": i.comboboxState.value === 0, "aria-labelledby": i.labelRef.value ? [(p = P(i.labelRef)) == null ? void 0 : p.id, r].join(" ") : void 0, disabled: i.disabled.value === !0 ? !0 : void 0, onKeydown: a, onClick:
|
|
1161
|
+
let g = { open: i.comboboxState.value === 0, disabled: i.disabled.value, value: i.value.value }, { ...x } = e, _ = { ref: i.buttonRef, id: r, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (c = P(i.optionsRef)) == null ? void 0 : c.id, "aria-expanded": i.comboboxState.value === 0, "aria-labelledby": i.labelRef.value ? [(p = P(i.labelRef)) == null ? void 0 : p.id, r].join(" ") : void 0, disabled: i.disabled.value === !0 ? !0 : void 0, onKeydown: a, onClick: s };
|
|
1162
1162
|
return pe({ ourProps: _, theirProps: x, slot: g, attrs: o, slots: t, name: "ComboboxButton" });
|
|
1163
1163
|
};
|
|
1164
|
-
} }), Ao = 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:
|
|
1164
|
+
} }), Ao = 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 }) {
|
|
1165
1165
|
var r;
|
|
1166
|
-
let i = (r = e.id) != null ? r : `headlessui-combobox-input-${Le()}`,
|
|
1167
|
-
|
|
1166
|
+
let i = (r = e.id) != null ? r : `headlessui-combobox-input-${Le()}`, s = ve("ComboboxInput"), a = S(() => rt(P(s.inputRef))), u = { value: !1 };
|
|
1167
|
+
l({ el: s.inputRef, $el: s.inputRef });
|
|
1168
1168
|
function c() {
|
|
1169
|
-
|
|
1170
|
-
let m = P(
|
|
1171
|
-
m && (m.scrollTop = 0),
|
|
1169
|
+
s.change(null);
|
|
1170
|
+
let m = P(s.optionsRef);
|
|
1171
|
+
m && (m.scrollTop = 0), s.goToOption(z.Nothing);
|
|
1172
1172
|
}
|
|
1173
1173
|
let p = S(() => {
|
|
1174
1174
|
var m;
|
|
1175
|
-
let R =
|
|
1176
|
-
return P(
|
|
1175
|
+
let R = s.value.value;
|
|
1176
|
+
return P(s.inputRef) ? typeof e.displayValue < "u" && R !== void 0 ? (m = e.displayValue(R)) != null ? m : "" : typeof R == "string" ? R : "" : "";
|
|
1177
1177
|
});
|
|
1178
1178
|
Ce(() => {
|
|
1179
|
-
F([p,
|
|
1179
|
+
F([p, s.comboboxState, a], ([m, R], [C, b]) => {
|
|
1180
1180
|
if (u.value) return;
|
|
1181
|
-
let L = P(
|
|
1181
|
+
let L = P(s.inputRef);
|
|
1182
1182
|
L && ((b === 0 && R === 1 || m !== C) && (L.value = m), requestAnimationFrame(() => {
|
|
1183
1183
|
var d;
|
|
1184
1184
|
if (u.value || !L || ((d = a.value) == null ? void 0 : d.activeElement) !== L) return;
|
|
1185
1185
|
let { selectionStart: f, selectionEnd: y } = L;
|
|
1186
1186
|
Math.abs((y ?? 0) - (f ?? 0)) === 0 && f === 0 && L.setSelectionRange(L.value.length, L.value.length);
|
|
1187
1187
|
}));
|
|
1188
|
-
}, { immediate: !0 }), F([
|
|
1188
|
+
}, { immediate: !0 }), F([s.comboboxState], ([m], [R]) => {
|
|
1189
1189
|
if (m === 0 && R === 1) {
|
|
1190
1190
|
if (u.value) return;
|
|
1191
|
-
let C = P(
|
|
1191
|
+
let C = P(s.inputRef);
|
|
1192
1192
|
if (!C) return;
|
|
1193
1193
|
let b = C.value, { selectionStart: L, selectionEnd: d, selectionDirection: f } = C;
|
|
1194
1194
|
C.value = "", C.value = b, f !== null ? C.setSelectionRange(L, d, f) : C.setSelectionRange(L, d);
|
|
@@ -1210,74 +1210,74 @@ let Do = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1210
1210
|
u.value = !1;
|
|
1211
1211
|
}), m.key) {
|
|
1212
1212
|
case W.Enter:
|
|
1213
|
-
if (u.value = !1,
|
|
1214
|
-
if (m.preventDefault(), m.stopPropagation(),
|
|
1215
|
-
|
|
1213
|
+
if (u.value = !1, s.comboboxState.value !== 0 || g.value) return;
|
|
1214
|
+
if (m.preventDefault(), m.stopPropagation(), s.activeOptionIndex.value === null) {
|
|
1215
|
+
s.closeCombobox();
|
|
1216
1216
|
return;
|
|
1217
1217
|
}
|
|
1218
|
-
|
|
1218
|
+
s.selectActiveOption(), s.mode.value === 0 && s.closeCombobox();
|
|
1219
1219
|
break;
|
|
1220
1220
|
case W.ArrowDown:
|
|
1221
|
-
return u.value = !1, m.preventDefault(), m.stopPropagation(),
|
|
1221
|
+
return u.value = !1, m.preventDefault(), m.stopPropagation(), le(s.comboboxState.value, { 0: () => s.goToOption(z.Next), 1: () => s.openCombobox() });
|
|
1222
1222
|
case W.ArrowUp:
|
|
1223
|
-
return u.value = !1, m.preventDefault(), m.stopPropagation(),
|
|
1224
|
-
|
|
1225
|
-
|
|
1223
|
+
return u.value = !1, m.preventDefault(), m.stopPropagation(), le(s.comboboxState.value, { 0: () => s.goToOption(z.Previous), 1: () => {
|
|
1224
|
+
s.openCombobox(), Q(() => {
|
|
1225
|
+
s.value.value || s.goToOption(z.Last);
|
|
1226
1226
|
});
|
|
1227
1227
|
} });
|
|
1228
1228
|
case W.Home:
|
|
1229
1229
|
if (m.shiftKey) break;
|
|
1230
|
-
return u.value = !1, m.preventDefault(), m.stopPropagation(),
|
|
1230
|
+
return u.value = !1, m.preventDefault(), m.stopPropagation(), s.goToOption(z.First);
|
|
1231
1231
|
case W.PageUp:
|
|
1232
|
-
return u.value = !1, m.preventDefault(), m.stopPropagation(),
|
|
1232
|
+
return u.value = !1, m.preventDefault(), m.stopPropagation(), s.goToOption(z.First);
|
|
1233
1233
|
case W.End:
|
|
1234
1234
|
if (m.shiftKey) break;
|
|
1235
|
-
return u.value = !1, m.preventDefault(), m.stopPropagation(),
|
|
1235
|
+
return u.value = !1, m.preventDefault(), m.stopPropagation(), s.goToOption(z.Last);
|
|
1236
1236
|
case W.PageDown:
|
|
1237
|
-
return u.value = !1, m.preventDefault(), m.stopPropagation(),
|
|
1237
|
+
return u.value = !1, m.preventDefault(), m.stopPropagation(), s.goToOption(z.Last);
|
|
1238
1238
|
case W.Escape:
|
|
1239
|
-
if (u.value = !1,
|
|
1240
|
-
m.preventDefault(),
|
|
1239
|
+
if (u.value = !1, s.comboboxState.value !== 0) return;
|
|
1240
|
+
m.preventDefault(), s.optionsRef.value && !s.optionsPropsRef.value.static && m.stopPropagation(), s.nullable.value && s.mode.value === 0 && s.value.value === null && c(), s.closeCombobox();
|
|
1241
1241
|
break;
|
|
1242
1242
|
case W.Tab:
|
|
1243
|
-
if (u.value = !1,
|
|
1244
|
-
|
|
1243
|
+
if (u.value = !1, s.comboboxState.value !== 0) return;
|
|
1244
|
+
s.mode.value === 0 && s.activationTrigger.value !== 1 && s.selectActiveOption(), s.closeCombobox();
|
|
1245
1245
|
break;
|
|
1246
1246
|
}
|
|
1247
1247
|
}
|
|
1248
1248
|
function N(m) {
|
|
1249
|
-
o("change", m),
|
|
1249
|
+
o("change", m), s.nullable.value && s.mode.value === 0 && m.target.value === "" && c(), s.openCombobox();
|
|
1250
1250
|
}
|
|
1251
1251
|
function I(m) {
|
|
1252
1252
|
var R, C, b;
|
|
1253
1253
|
let L = (R = m.relatedTarget) != null ? R : ce.find((d) => d !== m.currentTarget);
|
|
1254
|
-
if (u.value = !1, !((C = P(
|
|
1254
|
+
if (u.value = !1, !((C = P(s.optionsRef)) != null && C.contains(L)) && !((b = P(s.buttonRef)) != null && b.contains(L)) && s.comboboxState.value === 0) return m.preventDefault(), s.mode.value === 0 && (s.nullable.value && s.value.value === null ? c() : s.activationTrigger.value !== 1 && s.selectActiveOption()), s.closeCombobox();
|
|
1255
1255
|
}
|
|
1256
1256
|
function k(m) {
|
|
1257
1257
|
var R, C, b;
|
|
1258
1258
|
let L = (R = m.relatedTarget) != null ? R : ce.find((d) => d !== m.currentTarget);
|
|
1259
|
-
(C = P(
|
|
1260
|
-
|
|
1259
|
+
(C = P(s.buttonRef)) != null && C.contains(L) || (b = P(s.optionsRef)) != null && b.contains(L) || s.disabled.value || s.immediate.value && s.comboboxState.value !== 0 && (s.openCombobox(), De().nextFrame(() => {
|
|
1260
|
+
s.setActivationTrigger(1);
|
|
1261
1261
|
}));
|
|
1262
1262
|
}
|
|
1263
1263
|
let D = S(() => {
|
|
1264
1264
|
var m, R, C, b;
|
|
1265
|
-
return (b = (C = (R = e.defaultValue) != null ? R :
|
|
1265
|
+
return (b = (C = (R = e.defaultValue) != null ? R : s.defaultValue.value !== void 0 ? (m = e.displayValue) == null ? void 0 : m.call(e, s.defaultValue.value) : null) != null ? C : s.defaultValue.value) != null ? b : "";
|
|
1266
1266
|
});
|
|
1267
1267
|
return () => {
|
|
1268
1268
|
var m, R, C, b, L, d, f;
|
|
1269
|
-
let y = { open:
|
|
1269
|
+
let y = { open: s.comboboxState.value === 0 }, { displayValue: O, onChange: M, ...A } = e, G = { "aria-controls": (m = s.optionsRef.value) == null ? void 0 : m.id, "aria-expanded": s.comboboxState.value === 0, "aria-activedescendant": s.activeOptionIndex.value === null ? void 0 : s.virtual.value ? (R = 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 : R.id : (C = s.options.value[s.activeOptionIndex.value]) == null ? void 0 : C.id, "aria-labelledby": (d = (b = P(s.labelRef)) == null ? void 0 : b.id) != null ? d : (L = P(s.buttonRef)) == null ? void 0 : L.id, "aria-autocomplete": "list", id: i, onCompositionstart: x, onCompositionend: _, onKeydown: $, onInput: N, onFocus: k, onBlur: I, role: "combobox", type: (f = t.type) != null ? f : "text", tabIndex: 0, ref: s.inputRef, defaultValue: D.value, disabled: s.disabled.value === !0 ? !0 : void 0 };
|
|
1270
1270
|
return pe({ ourProps: G, theirProps: A, slot: y, attrs: t, slots: n, features: Oe.RenderStrategy | Oe.Static, name: "ComboboxInput" });
|
|
1271
1271
|
};
|
|
1272
1272
|
} }), Fo = 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 }) {
|
|
1273
|
-
let
|
|
1274
|
-
n({ el:
|
|
1275
|
-
|
|
1273
|
+
let l = ve("ComboboxOptions"), r = `headlessui-combobox-options-${Le()}`;
|
|
1274
|
+
n({ el: l.optionsRef, $el: l.optionsRef }), ie(() => {
|
|
1275
|
+
l.optionsPropsRef.value.static = e.static;
|
|
1276
1276
|
}), ie(() => {
|
|
1277
|
-
|
|
1277
|
+
l.optionsPropsRef.value.hold = e.hold;
|
|
1278
1278
|
});
|
|
1279
|
-
let i = $o(),
|
|
1280
|
-
yo({ container: S(() => P(
|
|
1279
|
+
let i = $o(), s = S(() => i !== null ? (i.value & $e.Open) === $e.Open : l.comboboxState.value === 0);
|
|
1280
|
+
yo({ container: S(() => P(l.optionsRef)), enabled: S(() => l.comboboxState.value === 0), accept(u) {
|
|
1281
1281
|
return u.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : u.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
1282
1282
|
}, walk(u) {
|
|
1283
1283
|
u.setAttribute("role", "none");
|
|
@@ -1287,36 +1287,36 @@ let Do = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1287
1287
|
}
|
|
1288
1288
|
return () => {
|
|
1289
1289
|
var u, c, p;
|
|
1290
|
-
let g = { open:
|
|
1291
|
-
return pe({ ourProps: x, theirProps: _, slot: g, attrs: o, slots:
|
|
1290
|
+
let g = { open: l.comboboxState.value === 0 }, x = { "aria-labelledby": (p = (u = P(l.labelRef)) == null ? void 0 : u.id) != null ? p : (c = P(l.buttonRef)) == null ? void 0 : c.id, id: r, ref: l.optionsRef, role: "listbox", "aria-multiselectable": l.mode.value === 1 ? !0 : void 0, onMousedown: a }, _ = je(e, ["hold"]);
|
|
1291
|
+
return pe({ ourProps: x, theirProps: _, slot: g, attrs: o, slots: l.virtual.value && l.comboboxState.value === 0 ? { ...t, default: () => [Ee(Mo, {}, t.default)] } : t, features: Oe.RenderStrategy | Oe.Static, visible: s.value, name: "ComboboxOptions" });
|
|
1292
1292
|
};
|
|
1293
1293
|
} }), jo = 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 }) {
|
|
1294
|
-
let
|
|
1294
|
+
let l = ve("ComboboxOption"), r = `headlessui-combobox-option-${Le()}`, i = E(null), s = S(() => e.disabled);
|
|
1295
1295
|
n({ el: i, $el: i });
|
|
1296
1296
|
let a = S(() => {
|
|
1297
1297
|
var I;
|
|
1298
|
-
return
|
|
1299
|
-
}), u = S(() =>
|
|
1300
|
-
Ce(() =>
|
|
1298
|
+
return l.virtual.value ? l.activeOptionIndex.value === l.calculateIndex(e.value) : l.activeOptionIndex.value === null ? !1 : ((I = l.options.value[l.activeOptionIndex.value]) == null ? void 0 : I.id) === r;
|
|
1299
|
+
}), u = S(() => l.isSelected(e.value)), c = Ie(Wt, null), p = S(() => ({ disabled: e.disabled, value: e.value, domRef: i, order: S(() => e.order) }));
|
|
1300
|
+
Ce(() => l.registerOption(r, p)), nt(() => l.unregisterOption(r, a.value)), ie(() => {
|
|
1301
1301
|
let I = P(i);
|
|
1302
1302
|
I && (c == null || c.value.measureElement(I));
|
|
1303
1303
|
}), ie(() => {
|
|
1304
|
-
|
|
1304
|
+
l.comboboxState.value === 0 && a.value && (l.virtual.value || l.activationTrigger.value !== 0 && Q(() => {
|
|
1305
1305
|
var I, k;
|
|
1306
1306
|
return (k = (I = P(i)) == null ? void 0 : I.scrollIntoView) == null ? void 0 : k.call(I, { block: "nearest" });
|
|
1307
1307
|
}));
|
|
1308
1308
|
});
|
|
1309
1309
|
function g(I) {
|
|
1310
|
-
I.preventDefault(), I.button === Bt.Left && (
|
|
1310
|
+
I.preventDefault(), I.button === Bt.Left && (s.value || (l.selectOption(r), Nt() || requestAnimationFrame(() => {
|
|
1311
1311
|
var k;
|
|
1312
|
-
return (k = P(
|
|
1313
|
-
}),
|
|
1312
|
+
return (k = P(l.inputRef)) == null ? void 0 : k.focus({ preventScroll: !0 });
|
|
1313
|
+
}), l.mode.value === 0 && l.closeCombobox()));
|
|
1314
1314
|
}
|
|
1315
1315
|
function x() {
|
|
1316
1316
|
var I;
|
|
1317
|
-
if (e.disabled || (I =
|
|
1318
|
-
let k =
|
|
1319
|
-
|
|
1317
|
+
if (e.disabled || (I = l.virtual.value) != null && I.disabled(e.value)) return l.goToOption(z.Nothing);
|
|
1318
|
+
let k = l.calculateIndex(e.value);
|
|
1319
|
+
l.goToOption(z.Specific, k);
|
|
1320
1320
|
}
|
|
1321
1321
|
let _ = Co();
|
|
1322
1322
|
function v(I) {
|
|
@@ -1324,13 +1324,13 @@ let Do = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1324
1324
|
}
|
|
1325
1325
|
function $(I) {
|
|
1326
1326
|
var k;
|
|
1327
|
-
if (!_.wasMoved(I) || e.disabled || (k =
|
|
1328
|
-
let D =
|
|
1329
|
-
|
|
1327
|
+
if (!_.wasMoved(I) || e.disabled || (k = l.virtual.value) != null && k.disabled(e.value) || a.value) return;
|
|
1328
|
+
let D = l.calculateIndex(e.value);
|
|
1329
|
+
l.goToOption(z.Specific, D, 0);
|
|
1330
1330
|
}
|
|
1331
1331
|
function N(I) {
|
|
1332
1332
|
var k;
|
|
1333
|
-
_.wasMoved(I) && (e.disabled || (k =
|
|
1333
|
+
_.wasMoved(I) && (e.disabled || (k = l.virtual.value) != null && k.disabled(e.value) || a.value && (l.optionsPropsRef.value.hold || l.goToOption(z.Nothing)));
|
|
1334
1334
|
}
|
|
1335
1335
|
return () => {
|
|
1336
1336
|
let { disabled: I } = e, k = { active: a.value, selected: u.value, disabled: I }, D = { id: r, ref: i, role: "option", tabIndex: I === !0 ? void 0 : -1, "aria-disabled": I === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onMousedown: g, onFocus: x, onPointerenter: v, onMouseenter: v, onPointermove: $, onMousemove: $, onPointerleave: N, onMouseleave: N }, m = je(e, ["order", "value"]);
|
|
@@ -1414,14 +1414,14 @@ class Ko {
|
|
|
1414
1414
|
const n = {};
|
|
1415
1415
|
if (o.settings)
|
|
1416
1416
|
for (const i in o.settings) {
|
|
1417
|
-
const
|
|
1418
|
-
n[i] =
|
|
1417
|
+
const s = o.settings[i];
|
|
1418
|
+
n[i] = s.defaultValue;
|
|
1419
1419
|
}
|
|
1420
|
-
const
|
|
1420
|
+
const l = `__vue-devtools-plugin-settings__${o.id}`;
|
|
1421
1421
|
let r = Object.assign({}, n);
|
|
1422
1422
|
try {
|
|
1423
|
-
const i = localStorage.getItem(
|
|
1424
|
-
Object.assign(r,
|
|
1423
|
+
const i = localStorage.getItem(l), s = JSON.parse(i);
|
|
1424
|
+
Object.assign(r, s);
|
|
1425
1425
|
} catch {
|
|
1426
1426
|
}
|
|
1427
1427
|
this.fallbacks = {
|
|
@@ -1430,7 +1430,7 @@ class Ko {
|
|
|
1430
1430
|
},
|
|
1431
1431
|
setSettings(i) {
|
|
1432
1432
|
try {
|
|
1433
|
-
localStorage.setItem(
|
|
1433
|
+
localStorage.setItem(l, JSON.stringify(i));
|
|
1434
1434
|
} catch {
|
|
1435
1435
|
}
|
|
1436
1436
|
r = i;
|
|
@@ -1438,24 +1438,24 @@ class Ko {
|
|
|
1438
1438
|
now() {
|
|
1439
1439
|
return Jo();
|
|
1440
1440
|
}
|
|
1441
|
-
}, t && t.on(Go, (i,
|
|
1442
|
-
i === this.plugin.id && this.fallbacks.setSettings(
|
|
1441
|
+
}, t && t.on(Go, (i, s) => {
|
|
1442
|
+
i === this.plugin.id && this.fallbacks.setSettings(s);
|
|
1443
1443
|
}), this.proxiedOn = new Proxy({}, {
|
|
1444
|
-
get: (i,
|
|
1444
|
+
get: (i, s) => this.target ? this.target.on[s] : (...a) => {
|
|
1445
1445
|
this.onQueue.push({
|
|
1446
|
-
method:
|
|
1446
|
+
method: s,
|
|
1447
1447
|
args: a
|
|
1448
1448
|
});
|
|
1449
1449
|
}
|
|
1450
1450
|
}), this.proxiedTarget = new Proxy({}, {
|
|
1451
|
-
get: (i,
|
|
1452
|
-
method:
|
|
1451
|
+
get: (i, s) => this.target ? this.target[s] : s === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(s) ? (...a) => (this.targetQueue.push({
|
|
1452
|
+
method: s,
|
|
1453
1453
|
args: a,
|
|
1454
1454
|
resolve: () => {
|
|
1455
1455
|
}
|
|
1456
|
-
}), this.fallbacks[
|
|
1456
|
+
}), this.fallbacks[s](...a)) : (...a) => new Promise((u) => {
|
|
1457
1457
|
this.targetQueue.push({
|
|
1458
|
-
method:
|
|
1458
|
+
method: s,
|
|
1459
1459
|
args: a,
|
|
1460
1460
|
resolve: u
|
|
1461
1461
|
});
|
|
@@ -1471,11 +1471,11 @@ class Ko {
|
|
|
1471
1471
|
}
|
|
1472
1472
|
}
|
|
1473
1473
|
function Jt(e, o) {
|
|
1474
|
-
const t = e, n = qt(),
|
|
1475
|
-
if (
|
|
1476
|
-
|
|
1474
|
+
const t = e, n = qt(), l = Uo(), r = Zo && t.enableEarlyProxy;
|
|
1475
|
+
if (l && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !r))
|
|
1476
|
+
l.emit(Wo, e, o);
|
|
1477
1477
|
else {
|
|
1478
|
-
const i = r ? new Ko(t,
|
|
1478
|
+
const i = r ? new Ko(t, l) : null;
|
|
1479
1479
|
(n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
1480
1480
|
pluginDescriptor: t,
|
|
1481
1481
|
setupFn: o,
|
|
@@ -1564,19 +1564,19 @@ function Xo(e, o = "download", t) {
|
|
|
1564
1564
|
function e2(e, o, t, n) {
|
|
1565
1565
|
if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string")
|
|
1566
1566
|
return it(e, o, t);
|
|
1567
|
-
const
|
|
1568
|
-
if ((i ||
|
|
1569
|
-
const
|
|
1570
|
-
|
|
1571
|
-
let a =
|
|
1567
|
+
const l = e.type === "application/octet-stream", r = /constructor/i.test(String(bt.HTMLElement)) || "safari" in bt, i = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
1568
|
+
if ((i || l && r || Qt) && typeof FileReader < "u") {
|
|
1569
|
+
const s = new FileReader();
|
|
1570
|
+
s.onloadend = function() {
|
|
1571
|
+
let a = s.result;
|
|
1572
1572
|
if (typeof a != "string")
|
|
1573
1573
|
throw n = null, new Error("Wrong reader.result type");
|
|
1574
1574
|
a = i ? a : a.replace(/^data:[^;]*;/, "data:attachment/file;"), n ? n.location.href = a : location.assign(a), n = null;
|
|
1575
|
-
},
|
|
1575
|
+
}, s.readAsDataURL(e);
|
|
1576
1576
|
} else {
|
|
1577
|
-
const
|
|
1578
|
-
n ? n.location.assign(
|
|
1579
|
-
URL.revokeObjectURL(
|
|
1577
|
+
const s = URL.createObjectURL(e);
|
|
1578
|
+
n ? n.location.assign(s) : location.href = s, n = null, setTimeout(function() {
|
|
1579
|
+
URL.revokeObjectURL(s);
|
|
1580
1580
|
}, 4e4);
|
|
1581
1581
|
}
|
|
1582
1582
|
}
|
|
@@ -1624,7 +1624,7 @@ async function o2(e) {
|
|
|
1624
1624
|
}
|
|
1625
1625
|
}
|
|
1626
1626
|
let oe;
|
|
1627
|
-
function
|
|
1627
|
+
function l2() {
|
|
1628
1628
|
oe || (oe = document.createElement("input"), oe.type = "file", oe.accept = ".json");
|
|
1629
1629
|
function e() {
|
|
1630
1630
|
return new Promise((o, t) => {
|
|
@@ -1632,20 +1632,20 @@ function s2() {
|
|
|
1632
1632
|
const n = oe.files;
|
|
1633
1633
|
if (!n)
|
|
1634
1634
|
return o(null);
|
|
1635
|
-
const
|
|
1636
|
-
return o(
|
|
1635
|
+
const l = n.item(0);
|
|
1636
|
+
return o(l ? { text: await l.text(), file: l } : null);
|
|
1637
1637
|
}, oe.oncancel = () => o(null), oe.onerror = t, oe.click();
|
|
1638
1638
|
});
|
|
1639
1639
|
}
|
|
1640
1640
|
return e;
|
|
1641
1641
|
}
|
|
1642
|
-
async function
|
|
1642
|
+
async function s2(e) {
|
|
1643
1643
|
try {
|
|
1644
|
-
const t = await
|
|
1644
|
+
const t = await l2()();
|
|
1645
1645
|
if (!t)
|
|
1646
1646
|
return;
|
|
1647
|
-
const { text: n, file:
|
|
1648
|
-
nn(e, JSON.parse(n)), B(`Global state imported from "${
|
|
1647
|
+
const { text: n, file: l } = t;
|
|
1648
|
+
nn(e, JSON.parse(n)), B(`Global state imported from "${l.name}".`);
|
|
1649
1649
|
} catch (o) {
|
|
1650
1650
|
B("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(o);
|
|
1651
1651
|
}
|
|
@@ -1687,7 +1687,7 @@ function i2(e) {
|
|
|
1687
1687
|
return {
|
|
1688
1688
|
editable: !1,
|
|
1689
1689
|
key: r,
|
|
1690
|
-
value: i._getters.reduce((
|
|
1690
|
+
value: i._getters.reduce((s, a) => (s[a] = i[a], s), {})
|
|
1691
1691
|
};
|
|
1692
1692
|
})
|
|
1693
1693
|
};
|
|
@@ -1780,7 +1780,7 @@ function d2(e, o) {
|
|
|
1780
1780
|
{
|
|
1781
1781
|
icon: "folder_open",
|
|
1782
1782
|
action: async () => {
|
|
1783
|
-
await
|
|
1783
|
+
await s2(o), t.sendInspectorTree(U), t.sendInspectorState(U);
|
|
1784
1784
|
},
|
|
1785
1785
|
tooltip: "Import the state from a JSON file"
|
|
1786
1786
|
}
|
|
@@ -1790,42 +1790,42 @@ function d2(e, o) {
|
|
|
1790
1790
|
icon: "restore",
|
|
1791
1791
|
tooltip: 'Reset the state (with "$reset")',
|
|
1792
1792
|
action: (n) => {
|
|
1793
|
-
const
|
|
1794
|
-
|
|
1793
|
+
const l = o._s.get(n);
|
|
1794
|
+
l ? typeof l.$reset != "function" ? B(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`, "warn") : (l.$reset(), B(`Store "${n}" reset.`)) : B(`Cannot reset "${n}" store because it wasn't found.`, "warn");
|
|
1795
1795
|
}
|
|
1796
1796
|
}
|
|
1797
1797
|
]
|
|
1798
|
-
}), t.on.inspectComponent((n,
|
|
1798
|
+
}), t.on.inspectComponent((n, l) => {
|
|
1799
1799
|
const r = n.componentInstance && n.componentInstance.proxy;
|
|
1800
1800
|
if (r && r._pStores) {
|
|
1801
1801
|
const i = n.componentInstance.proxy._pStores;
|
|
1802
|
-
Object.values(i).forEach((
|
|
1802
|
+
Object.values(i).forEach((s) => {
|
|
1803
1803
|
n.instanceData.state.push({
|
|
1804
|
-
type: Ae(
|
|
1804
|
+
type: Ae(s.$id),
|
|
1805
1805
|
key: "state",
|
|
1806
1806
|
editable: !0,
|
|
1807
|
-
value:
|
|
1807
|
+
value: s._isOptionsAPI ? {
|
|
1808
1808
|
_custom: {
|
|
1809
|
-
value: K(
|
|
1809
|
+
value: K(s.$state),
|
|
1810
1810
|
actions: [
|
|
1811
1811
|
{
|
|
1812
1812
|
icon: "restore",
|
|
1813
1813
|
tooltip: "Reset the state of this store",
|
|
1814
|
-
action: () =>
|
|
1814
|
+
action: () => s.$reset()
|
|
1815
1815
|
}
|
|
1816
1816
|
]
|
|
1817
1817
|
}
|
|
1818
1818
|
} : (
|
|
1819
1819
|
// NOTE: workaround to unwrap transferred refs
|
|
1820
|
-
Object.keys(
|
|
1820
|
+
Object.keys(s.$state).reduce((a, u) => (a[u] = s.$state[u], a), {})
|
|
1821
1821
|
)
|
|
1822
|
-
}),
|
|
1823
|
-
type: Ae(
|
|
1822
|
+
}), s._getters && s._getters.length && n.instanceData.state.push({
|
|
1823
|
+
type: Ae(s.$id),
|
|
1824
1824
|
key: "getters",
|
|
1825
1825
|
editable: !1,
|
|
1826
|
-
value:
|
|
1826
|
+
value: s._getters.reduce((a, u) => {
|
|
1827
1827
|
try {
|
|
1828
|
-
a[u] =
|
|
1828
|
+
a[u] = s[u];
|
|
1829
1829
|
} catch (c) {
|
|
1830
1830
|
a[u] = c;
|
|
1831
1831
|
}
|
|
@@ -1836,17 +1836,17 @@ function d2(e, o) {
|
|
|
1836
1836
|
}
|
|
1837
1837
|
}), t.on.getInspectorTree((n) => {
|
|
1838
1838
|
if (n.app === e && n.inspectorId === U) {
|
|
1839
|
-
let
|
|
1840
|
-
|
|
1839
|
+
let l = [o];
|
|
1840
|
+
l = l.concat(Array.from(o._s.values())), n.rootNodes = (n.filter ? l.filter((r) => "$id" in r ? r.$id.toLowerCase().includes(n.filter.toLowerCase()) : on.toLowerCase().includes(n.filter.toLowerCase())) : l).map(r2);
|
|
1841
1841
|
}
|
|
1842
1842
|
}), t.on.getInspectorState((n) => {
|
|
1843
1843
|
if (n.app === e && n.inspectorId === U) {
|
|
1844
|
-
const
|
|
1845
|
-
if (!
|
|
1844
|
+
const l = n.nodeId === Qe ? o : o._s.get(n.nodeId);
|
|
1845
|
+
if (!l)
|
|
1846
1846
|
return;
|
|
1847
|
-
|
|
1847
|
+
l && (n.state = i2(l));
|
|
1848
1848
|
}
|
|
1849
|
-
}), t.on.editInspectorState((n,
|
|
1849
|
+
}), t.on.editInspectorState((n, l) => {
|
|
1850
1850
|
if (n.app === e && n.inspectorId === U) {
|
|
1851
1851
|
const r = n.nodeId === Qe ? o : o._s.get(n.nodeId);
|
|
1852
1852
|
if (!r)
|
|
@@ -1856,12 +1856,12 @@ function d2(e, o) {
|
|
|
1856
1856
|
}
|
|
1857
1857
|
}), t.on.editComponentState((n) => {
|
|
1858
1858
|
if (n.type.startsWith("🍍")) {
|
|
1859
|
-
const
|
|
1859
|
+
const l = n.type.replace(/^🍍\s*/, ""), r = o._s.get(l);
|
|
1860
1860
|
if (!r)
|
|
1861
|
-
return B(`store "${
|
|
1861
|
+
return B(`store "${l}" not found`, "error");
|
|
1862
1862
|
const { path: i } = n;
|
|
1863
1863
|
if (i[0] !== "state")
|
|
1864
|
-
return B(`Invalid path for store "${
|
|
1864
|
+
return B(`Invalid path for store "${l}":
|
|
1865
1865
|
${i}
|
|
1866
1866
|
Only state can be modified.`);
|
|
1867
1867
|
i[0] = "$state", be = !1, n.set(r, i, n.state.value), be = !0;
|
|
@@ -1892,8 +1892,8 @@ function f2(e, o) {
|
|
|
1892
1892
|
}
|
|
1893
1893
|
}, (t) => {
|
|
1894
1894
|
const n = typeof t.now == "function" ? t.now.bind(t) : Date.now;
|
|
1895
|
-
o.$onAction(({ after: i, onError:
|
|
1896
|
-
const c =
|
|
1895
|
+
o.$onAction(({ after: i, onError: s, name: a, args: u }) => {
|
|
1896
|
+
const c = ln++;
|
|
1897
1897
|
t.addTimelineEvent({
|
|
1898
1898
|
layerId: ue,
|
|
1899
1899
|
event: {
|
|
@@ -1923,7 +1923,7 @@ function f2(e, o) {
|
|
|
1923
1923
|
groupId: c
|
|
1924
1924
|
}
|
|
1925
1925
|
});
|
|
1926
|
-
}),
|
|
1926
|
+
}), s((p) => {
|
|
1927
1927
|
re = void 0, t.addTimelineEvent({
|
|
1928
1928
|
layerId: ue,
|
|
1929
1929
|
event: {
|
|
@@ -1942,7 +1942,7 @@ function f2(e, o) {
|
|
|
1942
1942
|
});
|
|
1943
1943
|
});
|
|
1944
1944
|
}, !0), o._customProperties.forEach((i) => {
|
|
1945
|
-
F(() => V(o[i]), (
|
|
1945
|
+
F(() => V(o[i]), (s, a) => {
|
|
1946
1946
|
t.notifyComponentUpdate(), t.sendInspectorState(U), be && t.addTimelineEvent({
|
|
1947
1947
|
layerId: ue,
|
|
1948
1948
|
event: {
|
|
@@ -1950,23 +1950,23 @@ function f2(e, o) {
|
|
|
1950
1950
|
title: "Change",
|
|
1951
1951
|
subtitle: i,
|
|
1952
1952
|
data: {
|
|
1953
|
-
newValue:
|
|
1953
|
+
newValue: s,
|
|
1954
1954
|
oldValue: a
|
|
1955
1955
|
},
|
|
1956
1956
|
groupId: re
|
|
1957
1957
|
}
|
|
1958
1958
|
});
|
|
1959
1959
|
}, { deep: !0 });
|
|
1960
|
-
}), o.$subscribe(({ events: i, type:
|
|
1960
|
+
}), o.$subscribe(({ events: i, type: s }, a) => {
|
|
1961
1961
|
if (t.notifyComponentUpdate(), t.sendInspectorState(U), !be)
|
|
1962
1962
|
return;
|
|
1963
1963
|
const u = {
|
|
1964
1964
|
time: n(),
|
|
1965
|
-
title: u2(
|
|
1965
|
+
title: u2(s),
|
|
1966
1966
|
data: c2({ store: Y(o.$id) }, a2(i)),
|
|
1967
1967
|
groupId: re
|
|
1968
1968
|
};
|
|
1969
|
-
|
|
1969
|
+
s === ne.patchFunction ? u.subtitle = "⤵️" : s === ne.patchObject ? u.subtitle = "🧩" : i && !Array.isArray(i) && (u.subtitle = i.type), i && (u.data["rawEvent(s)"] = {
|
|
1970
1970
|
_custom: {
|
|
1971
1971
|
display: "DebuggerEvent",
|
|
1972
1972
|
type: "object",
|
|
@@ -1978,9 +1978,9 @@ function f2(e, o) {
|
|
|
1978
1978
|
event: u
|
|
1979
1979
|
});
|
|
1980
1980
|
}, { detached: !0, flush: "sync" });
|
|
1981
|
-
const
|
|
1981
|
+
const l = o._hotUpdate;
|
|
1982
1982
|
o._hotUpdate = de((i) => {
|
|
1983
|
-
|
|
1983
|
+
l(i), t.addTimelineEvent({
|
|
1984
1984
|
layerId: ue,
|
|
1985
1985
|
event: {
|
|
1986
1986
|
time: n(),
|
|
@@ -1999,12 +1999,12 @@ function f2(e, o) {
|
|
|
1999
1999
|
}, t.notifyComponentUpdate(), t.sendInspectorTree(U), t.sendInspectorState(U), t.getSettings().logStoreChanges && B(`"${o.$id}" store installed 🆕`);
|
|
2000
2000
|
});
|
|
2001
2001
|
}
|
|
2002
|
-
let
|
|
2002
|
+
let ln = 0, re;
|
|
2003
2003
|
function xt(e, o, t) {
|
|
2004
|
-
const n = o.reduce((
|
|
2005
|
-
for (const
|
|
2006
|
-
e[
|
|
2007
|
-
const r =
|
|
2004
|
+
const n = o.reduce((l, r) => (l[r] = K(e)[r], l), {});
|
|
2005
|
+
for (const l in n)
|
|
2006
|
+
e[l] = function() {
|
|
2007
|
+
const r = ln, i = t ? new Proxy(e, {
|
|
2008
2008
|
get(...a) {
|
|
2009
2009
|
return re = r, Reflect.get(...a);
|
|
2010
2010
|
},
|
|
@@ -2013,8 +2013,8 @@ function xt(e, o, t) {
|
|
|
2013
2013
|
}
|
|
2014
2014
|
}) : e;
|
|
2015
2015
|
re = r;
|
|
2016
|
-
const
|
|
2017
|
-
return re = void 0,
|
|
2016
|
+
const s = n[l].apply(i, arguments);
|
|
2017
|
+
return re = void 0, s;
|
|
2018
2018
|
};
|
|
2019
2019
|
}
|
|
2020
2020
|
function p2({ app: e, store: o, options: t }) {
|
|
@@ -2022,8 +2022,8 @@ function p2({ app: e, store: o, options: t }) {
|
|
|
2022
2022
|
return;
|
|
2023
2023
|
o._isOptionsAPI = !!t.state, xt(o, Object.keys(t.actions), o._isOptionsAPI);
|
|
2024
2024
|
const n = o._hotUpdate;
|
|
2025
|
-
K(o)._hotUpdate = function(
|
|
2026
|
-
n.apply(this, arguments), xt(o, Object.keys(
|
|
2025
|
+
K(o)._hotUpdate = function(l) {
|
|
2026
|
+
n.apply(this, arguments), xt(o, Object.keys(l._hmrPayload.actions), !!o._isOptionsAPI);
|
|
2027
2027
|
}, f2(
|
|
2028
2028
|
e,
|
|
2029
2029
|
// FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
|
|
@@ -2033,9 +2033,9 @@ function p2({ app: e, store: o, options: t }) {
|
|
|
2033
2033
|
function v2() {
|
|
2034
2034
|
const e = It(!0), o = e.run(() => E({}));
|
|
2035
2035
|
let t = [], n = [];
|
|
2036
|
-
const
|
|
2036
|
+
const l = de({
|
|
2037
2037
|
install(r) {
|
|
2038
|
-
Te(
|
|
2038
|
+
Te(l), l._a = r, r.provide(Kt, l), r.config.globalProperties.$pinia = l, Se && d2(r, l), n.forEach((i) => t.push(i)), n = [];
|
|
2039
2039
|
},
|
|
2040
2040
|
use(r) {
|
|
2041
2041
|
return !this._a && !Gt ? n.push(r) : t.push(r), this;
|
|
@@ -2048,15 +2048,15 @@ function v2() {
|
|
|
2048
2048
|
_s: /* @__PURE__ */ new Map(),
|
|
2049
2049
|
state: o
|
|
2050
2050
|
});
|
|
2051
|
-
return Se && typeof Proxy < "u" &&
|
|
2051
|
+
return Se && typeof Proxy < "u" && l.use(p2), l;
|
|
2052
2052
|
}
|
|
2053
|
-
function
|
|
2053
|
+
function sn(e, o) {
|
|
2054
2054
|
for (const t in o) {
|
|
2055
2055
|
const n = o[t];
|
|
2056
2056
|
if (!(t in e))
|
|
2057
2057
|
continue;
|
|
2058
|
-
const
|
|
2059
|
-
fe(
|
|
2058
|
+
const l = e[t];
|
|
2059
|
+
fe(l) && fe(n) && !xe(n) && !lt(n) ? e[t] = sn(l, n) : e[t] = n;
|
|
2060
2060
|
}
|
|
2061
2061
|
return e;
|
|
2062
2062
|
}
|
|
@@ -2064,11 +2064,11 @@ const rn = () => {
|
|
|
2064
2064
|
};
|
|
2065
2065
|
function _t(e, o, t, n = rn) {
|
|
2066
2066
|
e.push(o);
|
|
2067
|
-
const
|
|
2067
|
+
const l = () => {
|
|
2068
2068
|
const r = e.indexOf(o);
|
|
2069
2069
|
r > -1 && (e.splice(r, 1), n());
|
|
2070
2070
|
};
|
|
2071
|
-
return !t && Rt() && tt(
|
|
2071
|
+
return !t && Rt() && tt(l), l;
|
|
2072
2072
|
}
|
|
2073
2073
|
function ge(e, ...o) {
|
|
2074
2074
|
e.slice().forEach((t) => {
|
|
@@ -2081,8 +2081,8 @@ function Xe(e, o) {
|
|
|
2081
2081
|
for (const t in o) {
|
|
2082
2082
|
if (!o.hasOwnProperty(t))
|
|
2083
2083
|
continue;
|
|
2084
|
-
const n = o[t],
|
|
2085
|
-
fe(
|
|
2084
|
+
const n = o[t], l = e[t];
|
|
2085
|
+
fe(l) && fe(n) && e.hasOwnProperty(t) && !xe(n) && !lt(n) ? e[t] = Xe(l, n) : e[t] = n;
|
|
2086
2086
|
}
|
|
2087
2087
|
return e;
|
|
2088
2088
|
}
|
|
@@ -2098,13 +2098,13 @@ function Ct(e) {
|
|
|
2098
2098
|
return !!(xe(e) && e.effect);
|
|
2099
2099
|
}
|
|
2100
2100
|
function yt(e, o, t, n) {
|
|
2101
|
-
const { state:
|
|
2101
|
+
const { state: l, actions: r, getters: i } = o, s = t.state.value[e];
|
|
2102
2102
|
let a;
|
|
2103
2103
|
function u() {
|
|
2104
|
-
!
|
|
2104
|
+
!s && (process.env.NODE_ENV === "production" || !n) && (t.state.value[e] = l ? l() : {});
|
|
2105
2105
|
const c = process.env.NODE_ENV !== "production" && n ? (
|
|
2106
2106
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
2107
|
-
ct(E(
|
|
2107
|
+
ct(E(l ? l() : {}).value)
|
|
2108
2108
|
) : ct(t.state.value[e]);
|
|
2109
2109
|
return J(c, r, Object.keys(i || {}).reduce((p, g) => (process.env.NODE_ENV !== "production" && g in c && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${g}" in store "${e}".`), p[g] = de(S(() => {
|
|
2110
2110
|
Te(t);
|
|
@@ -2114,9 +2114,9 @@ function yt(e, o, t, n) {
|
|
|
2114
2114
|
}
|
|
2115
2115
|
return a = et(e, u, o, t, n, !0), a;
|
|
2116
2116
|
}
|
|
2117
|
-
function et(e, o, t = {}, n,
|
|
2117
|
+
function et(e, o, t = {}, n, l, r) {
|
|
2118
2118
|
let i;
|
|
2119
|
-
const
|
|
2119
|
+
const s = J({ actions: {} }, t);
|
|
2120
2120
|
if (process.env.NODE_ENV !== "production" && !n._e.active)
|
|
2121
2121
|
throw new Error("Pinia destroyed");
|
|
2122
2122
|
const a = {
|
|
@@ -2128,7 +2128,7 @@ function et(e, o, t = {}, n, s, r) {
|
|
|
2128
2128
|
});
|
|
2129
2129
|
let u, c, p = [], g = [], x;
|
|
2130
2130
|
const _ = n.state.value[e];
|
|
2131
|
-
!r && !_ && (process.env.NODE_ENV === "production" || !
|
|
2131
|
+
!r && !_ && (process.env.NODE_ENV === "production" || !l) && (n.state.value[e] = {});
|
|
2132
2132
|
const v = E({});
|
|
2133
2133
|
let $;
|
|
2134
2134
|
function N(d) {
|
|
@@ -2225,11 +2225,11 @@ function et(e, o, t = {}, n, s, r) {
|
|
|
2225
2225
|
const L = (n._a && n._a.runWithContext || h2)(() => n._e.run(() => (i = It()).run(o)));
|
|
2226
2226
|
for (const d in L) {
|
|
2227
2227
|
const f = L[d];
|
|
2228
|
-
if (xe(f) && !Ct(f) ||
|
|
2229
|
-
process.env.NODE_ENV !== "production" &&
|
|
2228
|
+
if (xe(f) && !Ct(f) || lt(f))
|
|
2229
|
+
process.env.NODE_ENV !== "production" && l ? Ve(v.value, d, Ge(L, d)) : r || (_ && g2(f) && (xe(f) ? f.value = _[d] : Xe(f, _[d])), n.state.value[e][d] = f), process.env.NODE_ENV !== "production" && m.state.push(d);
|
|
2230
2230
|
else if (typeof f == "function") {
|
|
2231
|
-
const y = process.env.NODE_ENV !== "production" &&
|
|
2232
|
-
L[d] = y, process.env.NODE_ENV !== "production" && (m.actions[d] = f),
|
|
2231
|
+
const y = process.env.NODE_ENV !== "production" && l ? f : D(d, f);
|
|
2232
|
+
L[d] = y, process.env.NODE_ENV !== "production" && (m.actions[d] = f), s.actions[d] = f;
|
|
2233
2233
|
} else process.env.NODE_ENV !== "production" && Ct(f) && (m.getters[d] = r ? (
|
|
2234
2234
|
// @ts-expect-error
|
|
2235
2235
|
t.getters[d]
|
|
@@ -2237,9 +2237,9 @@ function et(e, o, t = {}, n, s, r) {
|
|
|
2237
2237
|
(L._getters = de([]))).push(d));
|
|
2238
2238
|
}
|
|
2239
2239
|
if (J(C, L), J(K(C), L), Object.defineProperty(C, "$state", {
|
|
2240
|
-
get: () => process.env.NODE_ENV !== "production" &&
|
|
2240
|
+
get: () => process.env.NODE_ENV !== "production" && l ? v.value : n.state.value[e],
|
|
2241
2241
|
set: (d) => {
|
|
2242
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
2242
|
+
if (process.env.NODE_ENV !== "production" && l)
|
|
2243
2243
|
throw new Error("cannot set hotState");
|
|
2244
2244
|
N((f) => {
|
|
2245
2245
|
J(f, d);
|
|
@@ -2249,7 +2249,7 @@ function et(e, o, t = {}, n, s, r) {
|
|
|
2249
2249
|
C._hotUpdating = !0, d._hmrPayload.state.forEach((f) => {
|
|
2250
2250
|
if (f in C.$state) {
|
|
2251
2251
|
const y = d.$state[f], O = C.$state[f];
|
|
2252
|
-
typeof y == "object" && fe(y) && fe(O) ?
|
|
2252
|
+
typeof y == "object" && fe(y) && fe(O) ? sn(y, O) : d.$state[f] = O;
|
|
2253
2253
|
}
|
|
2254
2254
|
Ve(C, f, Ge(d.$state, f));
|
|
2255
2255
|
}), Object.keys(C.$state).forEach((f) => {
|
|
@@ -2290,7 +2290,7 @@ function et(e, o, t = {}, n, s, r) {
|
|
|
2290
2290
|
store: C,
|
|
2291
2291
|
app: n._a,
|
|
2292
2292
|
pinia: n,
|
|
2293
|
-
options:
|
|
2293
|
+
options: s
|
|
2294
2294
|
}));
|
|
2295
2295
|
Object.keys(f || {}).forEach((y) => C._customProperties.add(y)), J(C, f);
|
|
2296
2296
|
} else
|
|
@@ -2298,32 +2298,32 @@ function et(e, o, t = {}, n, s, r) {
|
|
|
2298
2298
|
store: C,
|
|
2299
2299
|
app: n._a,
|
|
2300
2300
|
pinia: n,
|
|
2301
|
-
options:
|
|
2301
|
+
options: s
|
|
2302
2302
|
})));
|
|
2303
2303
|
}), process.env.NODE_ENV !== "production" && C.$state && typeof C.$state == "object" && typeof C.$state.constructor == "function" && !C.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
2304
2304
|
state: () => new MyClass()
|
|
2305
2305
|
Found in store "${C.$id}".`), _ && r && t.hydrate && t.hydrate(C.$state, _), u = !0, c = !0, C;
|
|
2306
2306
|
}
|
|
2307
2307
|
function He(e, o, t) {
|
|
2308
|
-
let n,
|
|
2308
|
+
let n, l;
|
|
2309
2309
|
const r = typeof o == "function";
|
|
2310
2310
|
if (typeof e == "string")
|
|
2311
|
-
n = e,
|
|
2312
|
-
else if (
|
|
2311
|
+
n = e, l = r ? t : o;
|
|
2312
|
+
else if (l = e, n = e.id, process.env.NODE_ENV !== "production" && typeof n != "string")
|
|
2313
2313
|
throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
|
|
2314
|
-
function i(
|
|
2314
|
+
function i(s, a) {
|
|
2315
2315
|
const u = vn();
|
|
2316
|
-
if (
|
|
2316
|
+
if (s = // in test mode, ignore the argument provided as we can always retrieve a
|
|
2317
2317
|
// pinia instance with getActivePinia()
|
|
2318
|
-
(process.env.NODE_ENV === "test" && we && we._testing ? null :
|
|
2318
|
+
(process.env.NODE_ENV === "test" && we && we._testing ? null : s) || (u ? Ie(Kt, null) : null), s && Te(s), process.env.NODE_ENV !== "production" && !we)
|
|
2319
2319
|
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
2320
2320
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
2321
2321
|
This will fail in production.`);
|
|
2322
|
-
|
|
2323
|
-
const c =
|
|
2322
|
+
s = we, s._s.has(n) || (r ? et(n, o, l, s) : yt(n, l, s), process.env.NODE_ENV !== "production" && (i._pinia = s));
|
|
2323
|
+
const c = s._s.get(n);
|
|
2324
2324
|
if (process.env.NODE_ENV !== "production" && a) {
|
|
2325
|
-
const p = "__hot:" + n, g = r ? et(p, o,
|
|
2326
|
-
a._hotUpdate(g), delete
|
|
2325
|
+
const p = "__hot:" + n, g = r ? et(p, o, l, s, !0) : yt(p, J({}, l), s, !0);
|
|
2326
|
+
a._hotUpdate(g), delete s.state.value[p], s._s.delete(p);
|
|
2327
2327
|
}
|
|
2328
2328
|
if (process.env.NODE_ENV !== "production" && Be) {
|
|
2329
2329
|
const p = Lt();
|
|
@@ -2350,10 +2350,10 @@ const ze = He("loader", () => ({ loading: E(!1) })), wt = {
|
|
|
2350
2350
|
}),
|
|
2351
2351
|
emits: ["update:modelValue"],
|
|
2352
2352
|
setup(e) {
|
|
2353
|
-
const o = ze(), t = e, n = mn(e, "modelValue"),
|
|
2354
|
-
([, a]) => a.toLowerCase().includes(
|
|
2355
|
-
)),
|
|
2356
|
-
a.target.value = "",
|
|
2353
|
+
const o = ze(), t = e, n = mn(e, "modelValue"), l = E(""), r = E(null), i = S(() => Object.entries(t.languages).filter(
|
|
2354
|
+
([, a]) => a.toLowerCase().includes(l.value.toLowerCase())
|
|
2355
|
+
)), s = (a) => {
|
|
2356
|
+
a.target.value = "", l.value = "", r.value && r.value.$el.click();
|
|
2357
2357
|
};
|
|
2358
2358
|
return (a, u) => (w(), ee(V(No), {
|
|
2359
2359
|
modelValue: n.value,
|
|
@@ -2365,9 +2365,9 @@ const ze = He("loader", () => ({ loading: E(!1) })), wt = {
|
|
|
2365
2365
|
default: Re(() => [
|
|
2366
2366
|
H(V(Ao), {
|
|
2367
2367
|
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",
|
|
2368
|
-
onChange: u[0] || (u[0] = (c) =>
|
|
2368
|
+
onChange: u[0] || (u[0] = (c) => l.value = c.target.value),
|
|
2369
2369
|
displayValue: (c) => e.languages[c],
|
|
2370
|
-
onFocus: u[1] || (u[1] = (c) =>
|
|
2370
|
+
onFocus: u[1] || (u[1] = (c) => s(c))
|
|
2371
2371
|
}, null, 8, ["displayValue"]),
|
|
2372
2372
|
H(V(Do), {
|
|
2373
2373
|
ref_key: "btnSelect",
|
|
@@ -2378,14 +2378,14 @@ const ze = He("loader", () => ({ loading: E(!1) })), wt = {
|
|
|
2378
2378
|
H(V(Ho), {
|
|
2379
2379
|
class: "h-5 w-5 text-gray-400",
|
|
2380
2380
|
"aria-hidden": "true",
|
|
2381
|
-
onClick: u[2] || (u[2] = (c) =>
|
|
2381
|
+
onClick: u[2] || (u[2] = (c) => s(c))
|
|
2382
2382
|
})
|
|
2383
2383
|
]),
|
|
2384
2384
|
_: 1
|
|
2385
2385
|
}, 512),
|
|
2386
2386
|
H(V(Fo), { 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" }, {
|
|
2387
2387
|
default: Re(() => [
|
|
2388
|
-
(w(!0), T(Z, null,
|
|
2388
|
+
(w(!0), T(Z, null, se(i.value, ([c, p]) => (w(), ee(V(jo), {
|
|
2389
2389
|
key: c,
|
|
2390
2390
|
value: c
|
|
2391
2391
|
}, {
|
|
@@ -2433,7 +2433,7 @@ const ze = He("loader", () => ({ loading: E(!1) })), wt = {
|
|
|
2433
2433
|
emits: ["swap"],
|
|
2434
2434
|
setup(e, { emit: o }) {
|
|
2435
2435
|
const t = ze(), n = o;
|
|
2436
|
-
return (
|
|
2436
|
+
return (l, r) => e.isBidirect ? (w(), T("button", {
|
|
2437
2437
|
key: 1,
|
|
2438
2438
|
onClick: r[0] || (r[0] = (i) => n("swap")),
|
|
2439
2439
|
disabled: V(t).loading
|
|
@@ -2446,7 +2446,7 @@ const ze = He("loader", () => ({ loading: E(!1) })), wt = {
|
|
|
2446
2446
|
const e = E("auto"), o = E("en"), t = E({
|
|
2447
2447
|
src: [],
|
|
2448
2448
|
target: []
|
|
2449
|
-
}), n = S(() => t.value.src[e.value]),
|
|
2449
|
+
}), n = S(() => t.value.src[e.value]), l = S(() => t.value.target[o.value]);
|
|
2450
2450
|
function r(a, u) {
|
|
2451
2451
|
e.value = a == null ? void 0 : a.src, o.value = a == null ? void 0 : a.target, t.value = u;
|
|
2452
2452
|
}
|
|
@@ -2455,10 +2455,10 @@ const ze = He("loader", () => ({ loading: E(!1) })), wt = {
|
|
|
2455
2455
|
const a = e.value;
|
|
2456
2456
|
e.value = o.value, o.value = a;
|
|
2457
2457
|
}
|
|
2458
|
-
function
|
|
2458
|
+
function s(a) {
|
|
2459
2459
|
return t.value.src[a] || t.value.target[a];
|
|
2460
2460
|
}
|
|
2461
|
-
return { languages: t, src: e, target: o, srcLabel: n, targetLabel:
|
|
2461
|
+
return { languages: t, src: e, target: o, srcLabel: n, targetLabel: l, init: r, swap: i, getLabel: s };
|
|
2462
2462
|
}), E2 = {
|
|
2463
2463
|
key: 0,
|
|
2464
2464
|
class: "flex"
|
|
@@ -2469,10 +2469,10 @@ const ze = He("loader", () => ({ loading: E(!1) })), wt = {
|
|
|
2469
2469
|
function t() {
|
|
2470
2470
|
o.swap();
|
|
2471
2471
|
}
|
|
2472
|
-
return (n,
|
|
2472
|
+
return (n, l) => V(o).languages ? (w(), T("div", E2, [
|
|
2473
2473
|
H(wt, {
|
|
2474
2474
|
modelValue: V(o).src,
|
|
2475
|
-
"onUpdate:modelValue":
|
|
2475
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => V(o).src = r),
|
|
2476
2476
|
languages: V(o).languages.src,
|
|
2477
2477
|
class: "grow"
|
|
2478
2478
|
}, null, 8, ["modelValue", "languages"]),
|
|
@@ -2483,7 +2483,7 @@ const ze = He("loader", () => ({ loading: E(!1) })), wt = {
|
|
|
2483
2483
|
}, null, 8, ["isBidirect"]),
|
|
2484
2484
|
H(wt, {
|
|
2485
2485
|
modelValue: V(o).target,
|
|
2486
|
-
"onUpdate:modelValue":
|
|
2486
|
+
"onUpdate:modelValue": l[1] || (l[1] = (r) => V(o).target = r),
|
|
2487
2487
|
languages: V(o).languages.target,
|
|
2488
2488
|
class: "grow"
|
|
2489
2489
|
}, null, 8, ["modelValue", "languages"])
|
|
@@ -2494,8 +2494,8 @@ const ze = He("loader", () => ({ loading: E(!1) })), wt = {
|
|
|
2494
2494
|
INPUT_DEBOUNCE: 500
|
|
2495
2495
|
}, Ze = (e, o) => {
|
|
2496
2496
|
const t = e.__vccOpts || e;
|
|
2497
|
-
for (const [n,
|
|
2498
|
-
t[n] =
|
|
2497
|
+
for (const [n, l] of o)
|
|
2498
|
+
t[n] = l;
|
|
2499
2499
|
return t;
|
|
2500
2500
|
}, T2 = {}, I2 = { class: "mr-2 loading loading-dots loading-xs" };
|
|
2501
2501
|
function L2(e, o) {
|
|
@@ -2506,12 +2506,12 @@ const R2 = /* @__PURE__ */ Ze(T2, [["render", L2]]), P2 = "data:image/svg+xml,%3
|
|
|
2506
2506
|
src: null,
|
|
2507
2507
|
target: null
|
|
2508
2508
|
});
|
|
2509
|
-
function o(
|
|
2510
|
-
|
|
2509
|
+
function o(l) {
|
|
2510
|
+
l.src && (e.value.src = l.src), l.target && (e.value.target = l.target);
|
|
2511
2511
|
}
|
|
2512
|
-
function t(
|
|
2513
|
-
if (
|
|
2514
|
-
if (
|
|
2512
|
+
function t(l) {
|
|
2513
|
+
if (l === "src") return e.value.src;
|
|
2514
|
+
if (l === "target") return e.value.target;
|
|
2515
2515
|
}
|
|
2516
2516
|
function n() {
|
|
2517
2517
|
e.value = {
|
|
@@ -2545,7 +2545,7 @@ const R2 = /* @__PURE__ */ Ze(T2, [["render", L2]]), P2 = "data:image/svg+xml,%3
|
|
|
2545
2545
|
},
|
|
2546
2546
|
emits: ["loadTTS"],
|
|
2547
2547
|
setup(e, { emit: o }) {
|
|
2548
|
-
const t = un(), n = e,
|
|
2548
|
+
const t = un(), n = e, l = o, r = S(() => t.tts[n.type]), i = E(!1), s = new Audio();
|
|
2549
2549
|
F(
|
|
2550
2550
|
r,
|
|
2551
2551
|
() => {
|
|
@@ -2557,24 +2557,24 @@ const R2 = /* @__PURE__ */ Ze(T2, [["render", L2]]), P2 = "data:image/svg+xml,%3
|
|
|
2557
2557
|
},
|
|
2558
2558
|
{ immediate: !0 }
|
|
2559
2559
|
), nt(() => {
|
|
2560
|
-
c(),
|
|
2560
|
+
c(), s.src = "";
|
|
2561
2561
|
});
|
|
2562
2562
|
function a() {
|
|
2563
2563
|
if (r.value) {
|
|
2564
2564
|
u();
|
|
2565
2565
|
return;
|
|
2566
2566
|
}
|
|
2567
|
-
i.value = !0,
|
|
2567
|
+
i.value = !0, l("loadTTS");
|
|
2568
2568
|
}
|
|
2569
2569
|
function u() {
|
|
2570
|
-
r.value && (
|
|
2570
|
+
r.value && (s.src = r.value, i.value = !0, s.play().catch(() => {
|
|
2571
2571
|
i.value = !1;
|
|
2572
2572
|
}));
|
|
2573
2573
|
}
|
|
2574
2574
|
function c() {
|
|
2575
|
-
|
|
2575
|
+
s.pause(), s.currentTime = 0, i.value = !1;
|
|
2576
2576
|
}
|
|
2577
|
-
return
|
|
2577
|
+
return s.onended = () => {
|
|
2578
2578
|
i.value = !1;
|
|
2579
2579
|
}, (p, g) => i.value ? (w(), T("button", {
|
|
2580
2580
|
key: 1,
|
|
@@ -2617,10 +2617,10 @@ const Z2 = /* @__PURE__ */ Ze(j2, [["render", U2]]), W2 = "data:image/svg+xml,%3
|
|
|
2617
2617
|
o.isFilled ? (w(), T("img", J2)) : (w(), T("img", K2))
|
|
2618
2618
|
]));
|
|
2619
2619
|
}
|
|
2620
|
-
}, Q2 = { class: "flex flex-row rounded-t-lg bg-white border border-b-0 px-1 pr-1 pt-1 gap-1 items-center" }, X2 = { class: "text-sm text-gray-600" },
|
|
2620
|
+
}, Q2 = { class: "flex flex-row rounded-t-lg bg-white border border-b-0 px-1 pr-1 pt-1 gap-1 items-center" }, X2 = { class: "text-sm text-gray-600" }, el = {
|
|
2621
2621
|
key: 0,
|
|
2622
2622
|
class: "italic"
|
|
2623
|
-
},
|
|
2623
|
+
}, tl = /* @__PURE__ */ h("div", { class: "flex-grow" }, null, -1), cn = {
|
|
2624
2624
|
__name: "TranslationBtnGroup",
|
|
2625
2625
|
props: {
|
|
2626
2626
|
loading: {
|
|
@@ -2664,7 +2664,7 @@ const Z2 = /* @__PURE__ */ Ze(j2, [["render", U2]]), W2 = "data:image/svg+xml,%3
|
|
|
2664
2664
|
emits: ["clear", "favorite", "loadTTS"],
|
|
2665
2665
|
setup(e, { emit: o }) {
|
|
2666
2666
|
const t = e, n = o;
|
|
2667
|
-
return (
|
|
2667
|
+
return (l, r) => (w(), T("div", Q2, [
|
|
2668
2668
|
t.src ? (w(), ee(A2, {
|
|
2669
2669
|
key: 0,
|
|
2670
2670
|
type: t.type,
|
|
@@ -2672,9 +2672,9 @@ const Z2 = /* @__PURE__ */ Ze(j2, [["render", U2]]), W2 = "data:image/svg+xml,%3
|
|
|
2672
2672
|
}, null, 8, ["type"])) : X("", !0),
|
|
2673
2673
|
h("div", X2, [
|
|
2674
2674
|
gn(te(e.srcLabel) + " ", 1),
|
|
2675
|
-
e.phonetic ? (w(), T("span",
|
|
2675
|
+
e.phonetic ? (w(), T("span", el, "- [" + te(t.phonetic) + "]", 1)) : X("", !0)
|
|
2676
2676
|
]),
|
|
2677
|
-
|
|
2677
|
+
tl,
|
|
2678
2678
|
t.loading ? (w(), ee(R2, { key: 1 })) : X("", !0),
|
|
2679
2679
|
t.src && t.isClearBtn ? (w(), ee(Z2, {
|
|
2680
2680
|
key: 2,
|
|
@@ -2691,18 +2691,18 @@ const Z2 = /* @__PURE__ */ Ze(j2, [["render", U2]]), W2 = "data:image/svg+xml,%3
|
|
|
2691
2691
|
const e = E(null), o = E(null), t = E(null), n = E({
|
|
2692
2692
|
src: null,
|
|
2693
2693
|
target: null
|
|
2694
|
-
}),
|
|
2694
|
+
}), l = E(null), r = E([]), i = E([]), s = E([]), a = E([]), u = E({
|
|
2695
2695
|
src: null,
|
|
2696
2696
|
target: null
|
|
2697
2697
|
}), c = Ue(), p = S(() => c.getLabel(e.value)), g = S(() => c.getLabel(o.value));
|
|
2698
2698
|
function x(v) {
|
|
2699
|
-
e.value = v.src, o.value = v.target, t.value = v.text, n.value = v.phonetic,
|
|
2699
|
+
e.value = v.src, o.value = v.target, t.value = v.text, n.value = v.phonetic, l.value = v.result, r.value = v.dictionary, i.value = v.definitions, s.value = v.synonyms, a.value = v.examples, u.value = v.tts;
|
|
2700
2700
|
}
|
|
2701
2701
|
function _() {
|
|
2702
2702
|
e.value = null, o.value = null, t.value = null, n.value = {
|
|
2703
2703
|
src: null,
|
|
2704
2704
|
target: null
|
|
2705
|
-
},
|
|
2705
|
+
}, l.value = null, r.value = [], i.value = [], s.value = [], a.value = [], u.value = {
|
|
2706
2706
|
src: null,
|
|
2707
2707
|
target: null
|
|
2708
2708
|
};
|
|
@@ -2714,53 +2714,53 @@ const Z2 = /* @__PURE__ */ Ze(j2, [["render", U2]]), W2 = "data:image/svg+xml,%3
|
|
|
2714
2714
|
targetLabel: g,
|
|
2715
2715
|
phonetic: n,
|
|
2716
2716
|
text: t,
|
|
2717
|
-
result:
|
|
2717
|
+
result: l,
|
|
2718
2718
|
dictionary: r,
|
|
2719
2719
|
definitions: i,
|
|
2720
|
-
synonyms:
|
|
2720
|
+
synonyms: s,
|
|
2721
2721
|
examples: a,
|
|
2722
2722
|
tts: u,
|
|
2723
2723
|
init: x,
|
|
2724
2724
|
reset: _
|
|
2725
2725
|
};
|
|
2726
2726
|
});
|
|
2727
|
-
function
|
|
2727
|
+
function nl(e) {
|
|
2728
2728
|
return Rt() ? (tt(e), !0) : !1;
|
|
2729
2729
|
}
|
|
2730
2730
|
function Fe(e) {
|
|
2731
2731
|
return typeof e == "function" ? e() : V(e);
|
|
2732
2732
|
}
|
|
2733
|
-
const
|
|
2733
|
+
const ol = typeof window < "u" && typeof document < "u";
|
|
2734
2734
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
2735
2735
|
const St = () => {
|
|
2736
2736
|
};
|
|
2737
|
-
function
|
|
2737
|
+
function ll(e, o) {
|
|
2738
2738
|
function t(...n) {
|
|
2739
|
-
return new Promise((
|
|
2740
|
-
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(
|
|
2739
|
+
return new Promise((l, r) => {
|
|
2740
|
+
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(l).catch(r);
|
|
2741
2741
|
});
|
|
2742
2742
|
}
|
|
2743
2743
|
return t;
|
|
2744
2744
|
}
|
|
2745
|
-
function
|
|
2746
|
-
let t, n,
|
|
2747
|
-
const r = (
|
|
2748
|
-
clearTimeout(
|
|
2745
|
+
function sl(e, o = {}) {
|
|
2746
|
+
let t, n, l = St;
|
|
2747
|
+
const r = (s) => {
|
|
2748
|
+
clearTimeout(s), l(), l = St;
|
|
2749
2749
|
};
|
|
2750
|
-
return (
|
|
2750
|
+
return (s) => {
|
|
2751
2751
|
const a = Fe(e), u = Fe(o.maxWait);
|
|
2752
|
-
return t && r(t), a <= 0 || u !== void 0 && u <= 0 ? (n && (r(n), n = null), Promise.resolve(
|
|
2753
|
-
|
|
2754
|
-
t && r(t), n = null, c(
|
|
2752
|
+
return t && r(t), a <= 0 || u !== void 0 && u <= 0 ? (n && (r(n), n = null), Promise.resolve(s())) : new Promise((c, p) => {
|
|
2753
|
+
l = o.rejectOnCancel ? p : c, u && !n && (n = setTimeout(() => {
|
|
2754
|
+
t && r(t), n = null, c(s());
|
|
2755
2755
|
}, u)), t = setTimeout(() => {
|
|
2756
|
-
n && r(n), n = null, c(
|
|
2756
|
+
n && r(n), n = null, c(s());
|
|
2757
2757
|
}, a);
|
|
2758
2758
|
});
|
|
2759
2759
|
};
|
|
2760
2760
|
}
|
|
2761
|
-
function
|
|
2762
|
-
return
|
|
2763
|
-
|
|
2761
|
+
function rl(e, o = 200, t = {}) {
|
|
2762
|
+
return ll(
|
|
2763
|
+
sl(o, t),
|
|
2764
2764
|
e
|
|
2765
2765
|
);
|
|
2766
2766
|
}
|
|
@@ -2769,60 +2769,60 @@ function Et(e) {
|
|
|
2769
2769
|
const t = Fe(e);
|
|
2770
2770
|
return (o = t == null ? void 0 : t.$el) != null ? o : t;
|
|
2771
2771
|
}
|
|
2772
|
-
const
|
|
2773
|
-
function
|
|
2772
|
+
const il = ol ? window : void 0;
|
|
2773
|
+
function al() {
|
|
2774
2774
|
const e = E(!1), o = Lt();
|
|
2775
2775
|
return o && Ce(() => {
|
|
2776
2776
|
e.value = !0;
|
|
2777
2777
|
}, o), e;
|
|
2778
2778
|
}
|
|
2779
|
-
function
|
|
2780
|
-
const o =
|
|
2779
|
+
function ul(e) {
|
|
2780
|
+
const o = al();
|
|
2781
2781
|
return S(() => (o.value, !!e()));
|
|
2782
2782
|
}
|
|
2783
|
-
function
|
|
2784
|
-
const { window: n =
|
|
2783
|
+
function cl(e, o, t = {}) {
|
|
2784
|
+
const { window: n = il, ...l } = t;
|
|
2785
2785
|
let r;
|
|
2786
|
-
const i =
|
|
2786
|
+
const i = ul(() => n && "ResizeObserver" in n), s = () => {
|
|
2787
2787
|
r && (r.disconnect(), r = void 0);
|
|
2788
2788
|
}, a = S(() => Array.isArray(e) ? e.map((p) => Et(p)) : [Et(e)]), u = F(
|
|
2789
2789
|
a,
|
|
2790
2790
|
(p) => {
|
|
2791
|
-
if (
|
|
2791
|
+
if (s(), i.value && n) {
|
|
2792
2792
|
r = new ResizeObserver(o);
|
|
2793
2793
|
for (const g of p)
|
|
2794
|
-
g && r.observe(g,
|
|
2794
|
+
g && r.observe(g, l);
|
|
2795
2795
|
}
|
|
2796
2796
|
},
|
|
2797
2797
|
{ immediate: !0, flush: "post" }
|
|
2798
2798
|
), c = () => {
|
|
2799
|
-
|
|
2799
|
+
s(), u();
|
|
2800
2800
|
};
|
|
2801
|
-
return
|
|
2801
|
+
return nl(c), {
|
|
2802
2802
|
isSupported: i,
|
|
2803
2803
|
stop: c
|
|
2804
2804
|
};
|
|
2805
2805
|
}
|
|
2806
2806
|
function dn(e) {
|
|
2807
2807
|
var o;
|
|
2808
|
-
const t = E(e == null ? void 0 : e.element), n = E(e == null ? void 0 : e.input),
|
|
2808
|
+
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", r = E(1);
|
|
2809
2809
|
function i() {
|
|
2810
|
-
var
|
|
2810
|
+
var s;
|
|
2811
2811
|
if (!t.value)
|
|
2812
2812
|
return;
|
|
2813
2813
|
let a = "";
|
|
2814
|
-
t.value.style[
|
|
2814
|
+
t.value.style[l] = "1px", r.value = (s = t.value) == null ? void 0 : s.scrollHeight, e != null && e.styleTarget ? Fe(e.styleTarget).style[l] = `${r.value}px` : a = `${r.value}px`, t.value.style[l] = a;
|
|
2815
2815
|
}
|
|
2816
2816
|
return F([n, t], () => Q(i), { immediate: !0 }), F(r, () => {
|
|
2817
|
-
var
|
|
2818
|
-
return (
|
|
2819
|
-
}),
|
|
2817
|
+
var s;
|
|
2818
|
+
return (s = e == null ? void 0 : e.onResize) == null ? void 0 : s.call(e);
|
|
2819
|
+
}), cl(t, () => i()), e != null && e.watch && F(e.watch, i, { immediate: !0, deep: !0 }), {
|
|
2820
2820
|
textarea: t,
|
|
2821
2821
|
input: n,
|
|
2822
2822
|
triggerResize: i
|
|
2823
2823
|
};
|
|
2824
2824
|
}
|
|
2825
|
-
const
|
|
2825
|
+
const dl = {
|
|
2826
2826
|
__name: "TranslationInput",
|
|
2827
2827
|
props: {
|
|
2828
2828
|
text: {
|
|
@@ -2832,21 +2832,21 @@ const ds = {
|
|
|
2832
2832
|
},
|
|
2833
2833
|
emits: ["change", "clear", "loadTTS"],
|
|
2834
2834
|
setup(e, { emit: o }) {
|
|
2835
|
-
const t = he(), n = e,
|
|
2835
|
+
const t = he(), n = e, l = E(""), r = S(() => t.src), i = S(() => t.srcLabel), s = S(() => {
|
|
2836
2836
|
var _;
|
|
2837
2837
|
return (_ = t.phonetic) == null ? void 0 : _.src;
|
|
2838
|
-
}), { textarea: a } = dn({ input:
|
|
2839
|
-
u("change",
|
|
2838
|
+
}), { textarea: a } = dn({ input: l, styleProp: "minHeight" }), u = o, c = rl(() => {
|
|
2839
|
+
u("change", l.value);
|
|
2840
2840
|
}, $2.INPUT_DEBOUNCE);
|
|
2841
2841
|
function p() {
|
|
2842
|
-
if (!
|
|
2842
|
+
if (!l.value) {
|
|
2843
2843
|
g();
|
|
2844
2844
|
return;
|
|
2845
2845
|
}
|
|
2846
2846
|
c();
|
|
2847
2847
|
}
|
|
2848
2848
|
function g() {
|
|
2849
|
-
u("clear"),
|
|
2849
|
+
u("clear"), l.value = "", a.value.focus();
|
|
2850
2850
|
}
|
|
2851
2851
|
async function x() {
|
|
2852
2852
|
await Q(), a.value.select();
|
|
@@ -2854,14 +2854,14 @@ const ds = {
|
|
|
2854
2854
|
return F(
|
|
2855
2855
|
() => n.text,
|
|
2856
2856
|
(_) => {
|
|
2857
|
-
|
|
2857
|
+
l.value !== _ && x(), l.value = _;
|
|
2858
2858
|
}
|
|
2859
2859
|
), (_, v) => (w(), T(Z, null, [
|
|
2860
2860
|
H(cn, {
|
|
2861
2861
|
src: r.value,
|
|
2862
2862
|
srcLabel: i.value,
|
|
2863
2863
|
type: "src",
|
|
2864
|
-
phonetic:
|
|
2864
|
+
phonetic: s.value,
|
|
2865
2865
|
isClearBtn: !0,
|
|
2866
2866
|
onClear: g,
|
|
2867
2867
|
onLoadTTS: v[0] || (v[0] = ($) => u("loadTTS"))
|
|
@@ -2869,7 +2869,7 @@ const ds = {
|
|
|
2869
2869
|
Pt(h("textarea", {
|
|
2870
2870
|
ref_key: "textarea",
|
|
2871
2871
|
ref: a,
|
|
2872
|
-
"onUpdate:modelValue": v[1] || (v[1] = ($) =>
|
|
2872
|
+
"onUpdate:modelValue": v[1] || (v[1] = ($) => l.value = $),
|
|
2873
2873
|
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",
|
|
2874
2874
|
autofocus: "",
|
|
2875
2875
|
rows: "2",
|
|
@@ -2878,14 +2878,14 @@ const ds = {
|
|
|
2878
2878
|
}, null, 544), [
|
|
2879
2879
|
[
|
|
2880
2880
|
Vt,
|
|
2881
|
-
|
|
2881
|
+
l.value,
|
|
2882
2882
|
void 0,
|
|
2883
2883
|
{ trim: !0 }
|
|
2884
2884
|
]
|
|
2885
2885
|
])
|
|
2886
2886
|
], 64));
|
|
2887
2887
|
}
|
|
2888
|
-
},
|
|
2888
|
+
}, fl = /* @__PURE__ */ Ze(dl, [["__scopeId", "data-v-90bf3e0d"]]), pl = (e) => (bn("data-v-f47b8efe"), e = e(), xn(), e), vl = { class: "flex flex-col" }, hl = /* @__PURE__ */ pl(() => /* @__PURE__ */ h("div", { class: "w-full flex align-item-center justify-end mt-2" }, null, -1)), ml = {
|
|
2889
2889
|
__name: "TranslationResult",
|
|
2890
2890
|
props: {
|
|
2891
2891
|
isFavoriteFeatureEnabled: Boolean,
|
|
@@ -2893,23 +2893,23 @@ const ds = {
|
|
|
2893
2893
|
},
|
|
2894
2894
|
emits: ["loadTTS", "favorite"],
|
|
2895
2895
|
setup(e, { emit: o }) {
|
|
2896
|
-
const t = he(), n = S(() => t.result),
|
|
2896
|
+
const t = he(), n = S(() => t.result), l = S(() => t.target), r = S(() => t.targetLabel), i = S(() => {
|
|
2897
2897
|
var g;
|
|
2898
2898
|
return (g = t.phonetic) == null ? void 0 : g.target;
|
|
2899
|
-
}),
|
|
2899
|
+
}), s = e, a = ze(), { textarea: u, input: c } = dn({ input: n, styleProp: "minHeight" }), p = o;
|
|
2900
2900
|
return (g, x) => (w(), T(Z, null, [
|
|
2901
2901
|
H(cn, {
|
|
2902
2902
|
loading: V(a).loading,
|
|
2903
|
-
src:
|
|
2903
|
+
src: l.value,
|
|
2904
2904
|
srcLabel: r.value,
|
|
2905
2905
|
type: "target",
|
|
2906
|
-
isFavoriteBtn:
|
|
2906
|
+
isFavoriteBtn: s.isFavoriteFeatureEnabled,
|
|
2907
2907
|
isFavorite: e.isFavorite,
|
|
2908
2908
|
phonetic: i.value,
|
|
2909
2909
|
onFavorite: x[0] || (x[0] = (_) => p("favorite")),
|
|
2910
2910
|
onLoadTTS: x[1] || (x[1] = (_) => p("loadTTS"))
|
|
2911
2911
|
}, null, 8, ["loading", "src", "srcLabel", "isFavoriteBtn", "isFavorite", "phonetic"]),
|
|
2912
|
-
h("div",
|
|
2912
|
+
h("div", vl, [
|
|
2913
2913
|
Pt(h("textarea", {
|
|
2914
2914
|
ref_key: "textarea",
|
|
2915
2915
|
ref: u,
|
|
@@ -2921,18 +2921,18 @@ const ds = {
|
|
|
2921
2921
|
}, null, 512), [
|
|
2922
2922
|
[Vt, V(c)]
|
|
2923
2923
|
]),
|
|
2924
|
-
|
|
2924
|
+
hl
|
|
2925
2925
|
])
|
|
2926
2926
|
], 64));
|
|
2927
2927
|
}
|
|
2928
|
-
},
|
|
2928
|
+
}, gl = /* @__PURE__ */ Ze(ml, [["__scopeId", "data-v-f47b8efe"]]), bl = { class: "btn btn-sm btn-circle btn-ghost" }, We = {
|
|
2929
2929
|
__name: "ToggleBtn",
|
|
2930
2930
|
props: {
|
|
2931
2931
|
isExpanded: Boolean
|
|
2932
2932
|
},
|
|
2933
2933
|
setup(e) {
|
|
2934
2934
|
const o = e;
|
|
2935
|
-
return (t, n) => (w(), T("button",
|
|
2935
|
+
return (t, n) => (w(), T("button", bl, [
|
|
2936
2936
|
o.isExpanded ? (w(), ee(V(zo), {
|
|
2937
2937
|
key: 0,
|
|
2938
2938
|
class: "w-7 text-gray-400"
|
|
@@ -2942,42 +2942,42 @@ const ds = {
|
|
|
2942
2942
|
}))
|
|
2943
2943
|
]));
|
|
2944
2944
|
}
|
|
2945
|
-
},
|
|
2945
|
+
}, xl = { class: "card border bg-white rounded-lg" }, _l = { class: "card-body px-4 py-2 gap-0" }, Cl = { class: "flex justify-between items-center" }, yl = /* @__PURE__ */ h("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Translations", -1), wl = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, Sl = { class: "list-none list-inside" }, El = ["onClick"], Ol = { class: "text-base font-normal text-gray-800 leading-4" }, $l = {
|
|
2946
2946
|
__name: "Dictionary",
|
|
2947
2947
|
emits: ["translate"],
|
|
2948
2948
|
setup(e, { emit: o }) {
|
|
2949
|
-
const t = E(!0), n = he(),
|
|
2949
|
+
const t = E(!0), n = he(), l = Ue(), r = S(() => n.dictionary), i = o, s = () => {
|
|
2950
2950
|
t.value = !t.value;
|
|
2951
2951
|
}, a = (u) => {
|
|
2952
|
-
i("translate", u, n.target, n.src),
|
|
2952
|
+
i("translate", u, n.target, n.src), l.src = n.target, l.target = n.src, window.scrollTo(0, 0);
|
|
2953
2953
|
};
|
|
2954
|
-
return (u, c) => (w(), T("div",
|
|
2955
|
-
h("div",
|
|
2956
|
-
h("div",
|
|
2957
|
-
|
|
2954
|
+
return (u, c) => (w(), T("div", xl, [
|
|
2955
|
+
h("div", _l, [
|
|
2956
|
+
h("div", Cl, [
|
|
2957
|
+
yl,
|
|
2958
2958
|
H(We, {
|
|
2959
2959
|
isExpanded: t.value,
|
|
2960
|
-
onClick:
|
|
2960
|
+
onClick: s
|
|
2961
2961
|
}, null, 8, ["isExpanded"])
|
|
2962
2962
|
]),
|
|
2963
2963
|
h("div", {
|
|
2964
2964
|
class: _e(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
2965
2965
|
}, [
|
|
2966
2966
|
h("ul", null, [
|
|
2967
|
-
(w(!0), T(Z, null,
|
|
2967
|
+
(w(!0), T(Z, null, se(r.value, (p, g) => (w(), T("li", {
|
|
2968
2968
|
key: `${p.pos}-${g}`,
|
|
2969
2969
|
class: "mb-2"
|
|
2970
2970
|
}, [
|
|
2971
|
-
h("h5",
|
|
2972
|
-
h("ul",
|
|
2973
|
-
(w(!0), T(Z, null,
|
|
2971
|
+
h("h5", wl, te(p.pos), 1),
|
|
2972
|
+
h("ul", Sl, [
|
|
2973
|
+
(w(!0), T(Z, null, se(p.items, (x, _) => (w(), T("li", {
|
|
2974
2974
|
key: `${x.word}-${_}`
|
|
2975
2975
|
}, [
|
|
2976
2976
|
h("span", {
|
|
2977
2977
|
class: "p-3 m-0.5 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
2978
2978
|
onClick: (v) => a(x.word)
|
|
2979
|
-
}, te(x.word), 9,
|
|
2980
|
-
h("small",
|
|
2979
|
+
}, te(x.word), 9, El),
|
|
2980
|
+
h("small", Ol, " - " + te(x.reverse_translation.join(", ")), 1)
|
|
2981
2981
|
]))), 128))
|
|
2982
2982
|
])
|
|
2983
2983
|
]))), 128))
|
|
@@ -2986,41 +2986,41 @@ const ds = {
|
|
|
2986
2986
|
])
|
|
2987
2987
|
]));
|
|
2988
2988
|
}
|
|
2989
|
-
},
|
|
2989
|
+
}, Tl = { class: "card border bg-white rounded-lg" }, Il = { class: "card-body px-4 py-2 gap-0" }, Ll = { class: "flex justify-between items-center" }, Rl = /* @__PURE__ */ h("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Definitions", -1), Pl = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, Vl = { class: "text-base text-textCustom list-decimal list-outside ml-5" }, kl = /* @__PURE__ */ h("br", null, null, -1), Ml = {
|
|
2990
2990
|
key: 0,
|
|
2991
2991
|
class: "italic"
|
|
2992
|
-
},
|
|
2992
|
+
}, Nl = {
|
|
2993
2993
|
__name: "Definition",
|
|
2994
2994
|
setup(e) {
|
|
2995
|
-
const o = E(!0), t = he(), n = S(() => t.definitions),
|
|
2995
|
+
const o = E(!0), t = he(), n = S(() => t.definitions), l = () => {
|
|
2996
2996
|
o.value = !o.value;
|
|
2997
2997
|
};
|
|
2998
|
-
return (r, i) => (w(), T("div",
|
|
2999
|
-
h("div",
|
|
3000
|
-
h("div",
|
|
3001
|
-
|
|
2998
|
+
return (r, i) => (w(), T("div", Tl, [
|
|
2999
|
+
h("div", Il, [
|
|
3000
|
+
h("div", Ll, [
|
|
3001
|
+
Rl,
|
|
3002
3002
|
H(We, {
|
|
3003
3003
|
isExpanded: o.value,
|
|
3004
|
-
onClick:
|
|
3004
|
+
onClick: l
|
|
3005
3005
|
}, null, 8, ["isExpanded"])
|
|
3006
3006
|
]),
|
|
3007
3007
|
h("div", {
|
|
3008
3008
|
class: _e(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3009
3009
|
}, [
|
|
3010
3010
|
h("ul", null, [
|
|
3011
|
-
(w(!0), T(Z, null,
|
|
3012
|
-
key: `${
|
|
3011
|
+
(w(!0), T(Z, null, se(n.value, (s, a) => (w(), T("li", {
|
|
3012
|
+
key: `${s.pos}-${a}`,
|
|
3013
3013
|
class: "mb-2"
|
|
3014
3014
|
}, [
|
|
3015
|
-
h("h5",
|
|
3016
|
-
h("ul",
|
|
3017
|
-
(w(!0), T(Z, null,
|
|
3015
|
+
h("h5", Pl, te(s.pos), 1),
|
|
3016
|
+
h("ul", Vl, [
|
|
3017
|
+
(w(!0), T(Z, null, se(s.items, (u, c) => (w(), T("li", {
|
|
3018
3018
|
key: `${u.gloss}-${c}`,
|
|
3019
3019
|
class: "mb-1"
|
|
3020
3020
|
}, [
|
|
3021
3021
|
h("span", null, te(u.gloss), 1),
|
|
3022
|
-
|
|
3023
|
-
u.example ? (w(), T("small",
|
|
3022
|
+
kl,
|
|
3023
|
+
u.example ? (w(), T("small", Ml, '"' + te(u.example) + '"', 1)) : X("", !0)
|
|
3024
3024
|
]))), 128))
|
|
3025
3025
|
])
|
|
3026
3026
|
]))), 128))
|
|
@@ -3029,47 +3029,47 @@ const ds = {
|
|
|
3029
3029
|
])
|
|
3030
3030
|
]));
|
|
3031
3031
|
}
|
|
3032
|
-
},
|
|
3032
|
+
}, Dl = { class: "card border bg-white rounded-lg" }, Al = { class: "card-body px-4 py-2 gap-0" }, Fl = { class: "flex justify-between items-center" }, jl = /* @__PURE__ */ h("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Examples", -1), Bl = { class: "text-textCustom list-decimal list-outside ml-7 mt-2" }, Hl = ["innerHTML"], zl = {
|
|
3033
3033
|
__name: "Example",
|
|
3034
3034
|
setup(e) {
|
|
3035
|
-
const o = E(!0), t = he(), n = S(() => t.examples),
|
|
3035
|
+
const o = E(!0), t = he(), n = S(() => t.examples), l = () => {
|
|
3036
3036
|
o.value = !o.value;
|
|
3037
3037
|
};
|
|
3038
|
-
return (r, i) => (w(), T("div",
|
|
3039
|
-
h("div",
|
|
3040
|
-
h("div",
|
|
3041
|
-
|
|
3038
|
+
return (r, i) => (w(), T("div", Dl, [
|
|
3039
|
+
h("div", Al, [
|
|
3040
|
+
h("div", Fl, [
|
|
3041
|
+
jl,
|
|
3042
3042
|
H(We, {
|
|
3043
3043
|
isExpanded: o.value,
|
|
3044
|
-
onClick:
|
|
3044
|
+
onClick: l
|
|
3045
3045
|
}, null, 8, ["isExpanded"])
|
|
3046
3046
|
]),
|
|
3047
3047
|
h("div", {
|
|
3048
3048
|
class: _e(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3049
3049
|
}, [
|
|
3050
|
-
h("ul",
|
|
3051
|
-
(w(!0), T(Z, null,
|
|
3052
|
-
key: `${
|
|
3053
|
-
innerHTML:
|
|
3054
|
-
}, null, 8,
|
|
3050
|
+
h("ul", Bl, [
|
|
3051
|
+
(w(!0), T(Z, null, se(n.value, (s, a) => (w(), T("li", {
|
|
3052
|
+
key: `${s.definition_id}-${a}`,
|
|
3053
|
+
innerHTML: s
|
|
3054
|
+
}, null, 8, Hl))), 128))
|
|
3055
3055
|
])
|
|
3056
3056
|
], 2)
|
|
3057
3057
|
])
|
|
3058
3058
|
]));
|
|
3059
3059
|
}
|
|
3060
|
-
},
|
|
3060
|
+
}, Ul = { class: "card border bg-white rounded-lg" }, Zl = { class: "card-body px-4 py-2 gap-0" }, Wl = { class: "flex justify-between items-center" }, Gl = /* @__PURE__ */ h("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Synonyms", -1), ql = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, Jl = { class: "list-none list-inside" }, Kl = { class: "flex flex-wrap" }, Yl = ["onClick"], Ql = {
|
|
3061
3061
|
__name: "Synonyms",
|
|
3062
3062
|
emits: ["translate"],
|
|
3063
3063
|
setup(e, { emit: o }) {
|
|
3064
|
-
const t = E(!0), n = he(),
|
|
3064
|
+
const t = E(!0), n = he(), l = S(() => n.synonyms), r = o, i = () => {
|
|
3065
3065
|
t.value = !t.value;
|
|
3066
|
-
},
|
|
3066
|
+
}, s = (a) => {
|
|
3067
3067
|
r("translate", a), window.scrollTo(0, 0);
|
|
3068
3068
|
};
|
|
3069
|
-
return (a, u) => (w(), T("div",
|
|
3070
|
-
h("div",
|
|
3071
|
-
h("div",
|
|
3072
|
-
|
|
3069
|
+
return (a, u) => (w(), T("div", Ul, [
|
|
3070
|
+
h("div", Zl, [
|
|
3071
|
+
h("div", Wl, [
|
|
3072
|
+
Gl,
|
|
3073
3073
|
H(We, {
|
|
3074
3074
|
isExpanded: t.value,
|
|
3075
3075
|
onClick: i
|
|
@@ -3079,22 +3079,22 @@ const ds = {
|
|
|
3079
3079
|
class: _e(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3080
3080
|
}, [
|
|
3081
3081
|
h("ul", null, [
|
|
3082
|
-
(w(!0), T(Z, null,
|
|
3082
|
+
(w(!0), T(Z, null, se(l.value, (c, p) => (w(), T("li", {
|
|
3083
3083
|
key: `${c.pos}-${p}`,
|
|
3084
3084
|
class: "mb-2"
|
|
3085
3085
|
}, [
|
|
3086
|
-
h("h5",
|
|
3087
|
-
h("ul",
|
|
3088
|
-
(w(!0), T(Z, null,
|
|
3086
|
+
h("h5", ql, te(c.pos), 1),
|
|
3087
|
+
h("ul", Jl, [
|
|
3088
|
+
(w(!0), T(Z, null, se(c.items, (g, x) => (w(), T("li", {
|
|
3089
3089
|
key: `${g.word}-${x}`,
|
|
3090
3090
|
class: "mb-2"
|
|
3091
3091
|
}, [
|
|
3092
|
-
h("div",
|
|
3093
|
-
(w(!0), T(Z, null,
|
|
3092
|
+
h("div", Kl, [
|
|
3093
|
+
(w(!0), T(Z, null, se(g.synonym, (_, v) => (w(), T("span", {
|
|
3094
3094
|
key: `${_}-${v}`,
|
|
3095
3095
|
class: "p-3 m-0.5 ml-0 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
3096
|
-
onClick: ($) =>
|
|
3097
|
-
}, te(_), 9,
|
|
3096
|
+
onClick: ($) => s(_)
|
|
3097
|
+
}, te(_), 9, Yl))), 128))
|
|
3098
3098
|
])
|
|
3099
3099
|
]))), 128))
|
|
3100
3100
|
])
|
|
@@ -3105,22 +3105,22 @@ const ds = {
|
|
|
3105
3105
|
]));
|
|
3106
3106
|
}
|
|
3107
3107
|
};
|
|
3108
|
-
function
|
|
3108
|
+
function Xl() {
|
|
3109
3109
|
document.documentElement.setAttribute("dir", "rtl");
|
|
3110
3110
|
}
|
|
3111
|
-
function
|
|
3111
|
+
function es() {
|
|
3112
3112
|
document.documentElement.removeAttribute("dir");
|
|
3113
3113
|
}
|
|
3114
3114
|
const Ot = {
|
|
3115
|
-
supportRTL:
|
|
3116
|
-
removeRTL:
|
|
3117
|
-
},
|
|
3115
|
+
supportRTL: Xl,
|
|
3116
|
+
removeRTL: es
|
|
3117
|
+
}, ts = ["ar", "fa", "iw", "yi", "ur", "pa"], ns = { class: "bg-white min-h-screen flex flex-col" }, os = { class: "py-2 px-5 shadow-lg" }, ls = { class: "px-5 flex-grow" }, ss = { class: "flex flex-col lg:flex-row lg:gap-2" }, rs = { class: "w-full lg:w-[calc(50%-1rem)] my-2" }, is = /* @__PURE__ */ h("div", { class: "w-6 h-4 mx-auto hidden lg:block" }, null, -1), as = { class: "w-full lg:w-[calc(50%-1rem)] my-2" }, us = { class: "grid grid-cols-1 lg:grid-cols-3 gap-4" }, cs = {
|
|
3118
3118
|
key: 0,
|
|
3119
3119
|
class: "w-full my-4"
|
|
3120
|
-
},
|
|
3120
|
+
}, ds = {
|
|
3121
3121
|
key: 1,
|
|
3122
3122
|
class: "text-textCustom italic font-medium"
|
|
3123
|
-
},
|
|
3123
|
+
}, vs = {
|
|
3124
3124
|
__name: "Popup",
|
|
3125
3125
|
props: {
|
|
3126
3126
|
opt: {
|
|
@@ -3159,32 +3159,32 @@ const Ot = {
|
|
|
3159
3159
|
"favorite"
|
|
3160
3160
|
],
|
|
3161
3161
|
setup(e, { emit: o }) {
|
|
3162
|
-
const t = v2(), n = he(t),
|
|
3163
|
-
const v =
|
|
3164
|
-
|
|
3162
|
+
const t = v2(), n = he(t), l = un(t), r = Ue(t), i = ze(t), s = e, a = o, u = E(""), c = () => {
|
|
3163
|
+
const v = s.opt.target;
|
|
3164
|
+
ts.includes(v) ? Ot.supportRTL() : Ot.removeRTL();
|
|
3165
3165
|
};
|
|
3166
3166
|
F(
|
|
3167
|
-
() =>
|
|
3167
|
+
() => s.translation,
|
|
3168
3168
|
(v) => {
|
|
3169
|
-
v && (i.loading = !1, u.value = v.text, n.init(v),
|
|
3169
|
+
v && (i.loading = !1, u.value = v.text, n.init(v), l.reset());
|
|
3170
3170
|
},
|
|
3171
3171
|
{ immediate: !0 }
|
|
3172
3172
|
), F(
|
|
3173
|
-
() =>
|
|
3173
|
+
() => s.tts,
|
|
3174
3174
|
(v) => {
|
|
3175
3175
|
if (!v) {
|
|
3176
|
-
|
|
3176
|
+
l.reset();
|
|
3177
3177
|
return;
|
|
3178
3178
|
}
|
|
3179
|
-
|
|
3179
|
+
l.set(v);
|
|
3180
3180
|
},
|
|
3181
3181
|
{ immediate: !0 }
|
|
3182
|
-
), F([() =>
|
|
3182
|
+
), F([() => s.opt, () => s.languages], ([v, $]) => {
|
|
3183
3183
|
r.init(v, $), c();
|
|
3184
3184
|
}), F([() => r.src, () => r.target], ([v, $]) => {
|
|
3185
3185
|
a("opt", { src: v, target: $ }), _(u.value);
|
|
3186
3186
|
}), Ce(() => {
|
|
3187
|
-
r.init(
|
|
3187
|
+
r.init(s.opt, s.languages), c();
|
|
3188
3188
|
});
|
|
3189
3189
|
function p() {
|
|
3190
3190
|
u.value = "", n.reset();
|
|
@@ -3205,8 +3205,8 @@ const Ot = {
|
|
|
3205
3205
|
}
|
|
3206
3206
|
return (v, $) => {
|
|
3207
3207
|
var N, I, k, D;
|
|
3208
|
-
return w(), T("div",
|
|
3209
|
-
h("div",
|
|
3208
|
+
return w(), T("div", ns, [
|
|
3209
|
+
h("div", os, [
|
|
3210
3210
|
H(jn, {
|
|
3211
3211
|
onReader: $[0] || ($[0] = (m) => a("reader")),
|
|
3212
3212
|
onSettings: $[1] || ($[1] = (m) => a("settings")),
|
|
@@ -3214,20 +3214,20 @@ const Ot = {
|
|
|
3214
3214
|
onStarList: $[3] || ($[3] = (m) => a("starList"))
|
|
3215
3215
|
})
|
|
3216
3216
|
]),
|
|
3217
|
-
h("div",
|
|
3217
|
+
h("div", ls, [
|
|
3218
3218
|
H(O2, { class: "my-4" }),
|
|
3219
|
-
h("div",
|
|
3220
|
-
h("div",
|
|
3221
|
-
H(
|
|
3219
|
+
h("div", ss, [
|
|
3220
|
+
h("div", rs, [
|
|
3221
|
+
H(fl, {
|
|
3222
3222
|
text: u.value,
|
|
3223
3223
|
onChange: g,
|
|
3224
3224
|
onClear: p,
|
|
3225
3225
|
onLoadTTS: $[4] || ($[4] = (m) => x("src"))
|
|
3226
3226
|
}, null, 8, ["text"])
|
|
3227
3227
|
]),
|
|
3228
|
-
|
|
3229
|
-
h("div",
|
|
3230
|
-
H(
|
|
3228
|
+
is,
|
|
3229
|
+
h("div", as, [
|
|
3230
|
+
H(gl, {
|
|
3231
3231
|
isFavoriteFeatureEnabled: e.isFavoriteFeatureEnabled,
|
|
3232
3232
|
isFavorite: e.isFavorite,
|
|
3233
3233
|
onFavorite: $[5] || ($[5] = (m) => a("favorite")),
|
|
@@ -3235,27 +3235,27 @@ const Ot = {
|
|
|
3235
3235
|
}, null, 8, ["isFavoriteFeatureEnabled", "isFavorite"])
|
|
3236
3236
|
])
|
|
3237
3237
|
]),
|
|
3238
|
-
|
|
3239
|
-
h("div",
|
|
3240
|
-
(N = V(n).dictionary) != null && N.length ? (w(), ee($
|
|
3238
|
+
s.translation ? (w(), T(Z, { key: 0 }, [
|
|
3239
|
+
h("div", us, [
|
|
3240
|
+
(N = V(n).dictionary) != null && N.length ? (w(), ee($l, {
|
|
3241
3241
|
key: 0,
|
|
3242
3242
|
onTranslate: _
|
|
3243
3243
|
})) : X("", !0),
|
|
3244
|
-
(I = V(n).definitions) != null && I.length ? (w(), ee(
|
|
3245
|
-
(k = V(n).synonyms) != null && k.length ? (w(), ee(
|
|
3244
|
+
(I = V(n).definitions) != null && I.length ? (w(), ee(Nl, { key: 1 })) : X("", !0),
|
|
3245
|
+
(k = V(n).synonyms) != null && k.length ? (w(), ee(Ql, {
|
|
3246
3246
|
key: 2,
|
|
3247
3247
|
onTranslate: _
|
|
3248
3248
|
})) : X("", !0)
|
|
3249
3249
|
]),
|
|
3250
|
-
(D = V(n).examples) != null && D.length ? (w(), T("div",
|
|
3251
|
-
H(
|
|
3250
|
+
(D = V(n).examples) != null && D.length ? (w(), T("div", cs, [
|
|
3251
|
+
H(zl)
|
|
3252
3252
|
])) : X("", !0)
|
|
3253
|
-
], 64)) : (w(), T("span",
|
|
3253
|
+
], 64)) : (w(), T("span", ds, "Service unavailable"))
|
|
3254
3254
|
])
|
|
3255
3255
|
]);
|
|
3256
3256
|
};
|
|
3257
3257
|
}
|
|
3258
3258
|
};
|
|
3259
3259
|
export {
|
|
3260
|
-
|
|
3260
|
+
vs as default
|
|
3261
3261
|
};
|