@ddict/popup 1.3.1 → 1.3.2
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 +517 -511
- package/dist/popup.umd.js +7 -7
- package/package.json +1 -1
package/dist/popup.es.js
CHANGED
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
import { openBlock as m, createElementBlock as O, createElementVNode as v, computed as E, unref as L, shallowRef as
|
|
2
|
-
const w2 = "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", _2 = "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", S2 = "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", E2 = "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", O2 = "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", $2 = { class: "flex justify-between" }, I2 = /* @__PURE__ */ v("div", { class: "flex flex-row" }, [
|
|
1
|
+
import { openBlock as m, createElementBlock as O, createElementVNode as v, computed as E, unref as L, shallowRef as m2, watch as N, triggerRef as ct, onScopeDispose as nt, ref as $, onUnmounted as ot, inject as Te, watchEffect as re, onMounted as ve, cloneVNode as Tt, h as Ee, Fragment as G, defineComponent as ue, provide as lt, reactive as Lt, nextTick as oe, toRaw as ee, effectScope as Mt, markRaw as fe, hasInjectionContext as b2, getCurrentInstance as At, isRef as ye, isReactive as st, toRef as qe, getCurrentScope as kt, toRefs as dt, mergeModels as g2, useModel as C2, createBlock as q, withCtx as Ae, createVNode as B, renderList as te, normalizeClass as j, toDisplayString as K, createCommentVNode as H, withModifiers as ft, createTextVNode as x2, withDirectives as Vt, vModelText as Ft, pushScopeId as y2, popScopeId as w2 } from "vue";
|
|
2
|
+
const _2 = "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", S2 = "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", E2 = "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", O2 = "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", $2 = "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", I2 = { class: "flex justify-between" }, T2 = /* @__PURE__ */ v("div", { class: "flex flex-row" }, [
|
|
3
3
|
/* @__PURE__ */ v("img", {
|
|
4
|
-
src:
|
|
4
|
+
src: _2,
|
|
5
5
|
alt: "Vue logo",
|
|
6
6
|
class: "w-24"
|
|
7
7
|
})
|
|
8
|
-
], -1),
|
|
8
|
+
], -1), L2 = { class: "flex" }, M2 = {
|
|
9
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
|
-
},
|
|
12
|
-
src:
|
|
11
|
+
}, A2 = /* @__PURE__ */ v("img", {
|
|
12
|
+
src: S2,
|
|
13
13
|
alt: "Star list",
|
|
14
14
|
class: "w-7"
|
|
15
15
|
}, null, -1), k2 = [
|
|
16
|
-
|
|
17
|
-
],
|
|
16
|
+
A2
|
|
17
|
+
], V2 = {
|
|
18
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
|
-
},
|
|
21
|
-
src:
|
|
20
|
+
}, F2 = /* @__PURE__ */ v("img", {
|
|
21
|
+
src: E2,
|
|
22
22
|
alt: "Reader",
|
|
23
23
|
class: "w-7"
|
|
24
|
-
}, null, -1),
|
|
25
|
-
|
|
26
|
-
],
|
|
24
|
+
}, null, -1), R2 = [
|
|
25
|
+
F2
|
|
26
|
+
], P2 = {
|
|
27
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
|
-
},
|
|
30
|
-
src:
|
|
29
|
+
}, D2 = /* @__PURE__ */ v("img", {
|
|
30
|
+
src: O2,
|
|
31
31
|
alt: "Full screen",
|
|
32
32
|
class: "w-7"
|
|
33
|
-
}, null, -1),
|
|
34
|
-
|
|
35
|
-
],
|
|
33
|
+
}, null, -1), N2 = [
|
|
34
|
+
D2
|
|
35
|
+
], B2 = {
|
|
36
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
|
-
},
|
|
39
|
-
src:
|
|
38
|
+
}, j2 = /* @__PURE__ */ v("img", {
|
|
39
|
+
src: $2,
|
|
40
40
|
alt: "Setting",
|
|
41
41
|
class: "w-7"
|
|
42
|
-
}, null, -1),
|
|
43
|
-
|
|
44
|
-
],
|
|
42
|
+
}, null, -1), H2 = [
|
|
43
|
+
j2
|
|
44
|
+
], z2 = {
|
|
45
45
|
__name: "Header",
|
|
46
46
|
emits: ["settings", "fullScreen", "reader", "starList"],
|
|
47
47
|
setup(e, { emit: o }) {
|
|
48
48
|
const t = o;
|
|
49
|
-
return (n, l) => (m(), O("div",
|
|
50
|
-
|
|
51
|
-
v("div",
|
|
52
|
-
v("div",
|
|
49
|
+
return (n, l) => (m(), O("div", I2, [
|
|
50
|
+
T2,
|
|
51
|
+
v("div", L2, [
|
|
52
|
+
v("div", M2, [
|
|
53
53
|
v("button", {
|
|
54
54
|
class: "btn btn-ghost btn-circle",
|
|
55
55
|
onClick: l[0] || (l[0] = (a) => t("starList"))
|
|
56
56
|
}, k2)
|
|
57
57
|
]),
|
|
58
|
-
v("div",
|
|
58
|
+
v("div", V2, [
|
|
59
59
|
v("button", {
|
|
60
60
|
class: "btn btn-ghost btn-circle",
|
|
61
61
|
onClick: l[1] || (l[1] = (a) => t("reader"))
|
|
62
|
-
},
|
|
62
|
+
}, R2)
|
|
63
63
|
]),
|
|
64
|
-
v("div",
|
|
64
|
+
v("div", P2, [
|
|
65
65
|
v("button", {
|
|
66
66
|
class: "btn btn-ghost btn-circle",
|
|
67
67
|
onClick: l[2] || (l[2] = (a) => t("fullScreen"))
|
|
68
|
-
},
|
|
68
|
+
}, N2)
|
|
69
69
|
]),
|
|
70
|
-
v("div",
|
|
70
|
+
v("div", B2, [
|
|
71
71
|
v("button", {
|
|
72
72
|
class: "btn btn-ghost btn-circle",
|
|
73
73
|
onClick: l[3] || (l[3] = (a) => t("settings"))
|
|
74
|
-
},
|
|
74
|
+
}, H2)
|
|
75
75
|
])
|
|
76
76
|
])
|
|
77
77
|
]));
|
|
78
78
|
}
|
|
79
|
-
},
|
|
80
|
-
isRTL:
|
|
81
|
-
setLocalStorage:
|
|
82
|
-
getLocalStorage:
|
|
79
|
+
}, ke = {
|
|
80
|
+
isRTL: U2,
|
|
81
|
+
setLocalStorage: Z2,
|
|
82
|
+
getLocalStorage: W2
|
|
83
83
|
};
|
|
84
|
-
function
|
|
84
|
+
function U2(e) {
|
|
85
85
|
return ["ar", "fa", "iw", "yi", "ur", "pa"].indexOf(e) > -1;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function Z2(e, o) {
|
|
88
88
|
localStorage.setItem(e, JSON.stringify(o));
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function W2(e) {
|
|
91
91
|
return JSON.parse(localStorage.getItem(e));
|
|
92
92
|
}
|
|
93
93
|
function we(e, o, t) {
|
|
@@ -127,17 +127,17 @@ function Je(e, o) {
|
|
|
127
127
|
throw new Error("Unexpected undefined");
|
|
128
128
|
return e;
|
|
129
129
|
}
|
|
130
|
-
const
|
|
130
|
+
const G2 = (e, o) => Math.abs(e - o) < 1, q2 = (e, o, t) => {
|
|
131
131
|
let n;
|
|
132
132
|
return function(...l) {
|
|
133
133
|
e.clearTimeout(n), n = e.setTimeout(() => o.apply(this, l), t);
|
|
134
134
|
};
|
|
135
|
-
},
|
|
135
|
+
}, J2 = (e) => e, K2 = (e) => {
|
|
136
136
|
const o = Math.max(e.startIndex - e.overscan, 0), t = Math.min(e.endIndex + e.overscan, e.count - 1), n = [];
|
|
137
137
|
for (let l = o; l <= t; l++)
|
|
138
138
|
n.push(l);
|
|
139
139
|
return n;
|
|
140
|
-
},
|
|
140
|
+
}, Y2 = (e, o) => {
|
|
141
141
|
const t = e.scrollElement;
|
|
142
142
|
if (!t)
|
|
143
143
|
return;
|
|
@@ -167,7 +167,7 @@ const W2 = (e, o) => Math.abs(e - o) < 1, G2 = (e, o, t) => {
|
|
|
167
167
|
};
|
|
168
168
|
}, pt = {
|
|
169
169
|
passive: !0
|
|
170
|
-
},
|
|
170
|
+
}, Q2 = typeof window > "u" ? !0 : "onscrollend" in window, X2 = (e, o) => {
|
|
171
171
|
const t = e.scrollElement;
|
|
172
172
|
if (!t)
|
|
173
173
|
return;
|
|
@@ -175,8 +175,8 @@ const W2 = (e, o) => Math.abs(e - o) < 1, G2 = (e, o, t) => {
|
|
|
175
175
|
if (!n)
|
|
176
176
|
return;
|
|
177
177
|
let l = 0;
|
|
178
|
-
const a =
|
|
179
|
-
} :
|
|
178
|
+
const a = Q2 ? () => {
|
|
179
|
+
} : q2(
|
|
180
180
|
n,
|
|
181
181
|
() => {
|
|
182
182
|
o(l, !1);
|
|
@@ -188,7 +188,7 @@ const W2 = (e, o) => Math.abs(e - o) < 1, G2 = (e, o, t) => {
|
|
|
188
188
|
return r(), t.addEventListener("scroll", s, pt), t.addEventListener("scrollend", r, pt), () => {
|
|
189
189
|
t.removeEventListener("scroll", s), t.removeEventListener("scrollend", r);
|
|
190
190
|
};
|
|
191
|
-
},
|
|
191
|
+
}, e0 = (e, o, t) => {
|
|
192
192
|
if (o != null && o.borderBoxSize) {
|
|
193
193
|
const n = o.borderBoxSize[0];
|
|
194
194
|
if (n)
|
|
@@ -199,7 +199,7 @@ const W2 = (e, o) => Math.abs(e - o) < 1, G2 = (e, o, t) => {
|
|
|
199
199
|
return Math.round(
|
|
200
200
|
e.getBoundingClientRect()[t.options.horizontal ? "width" : "height"]
|
|
201
201
|
);
|
|
202
|
-
},
|
|
202
|
+
}, t0 = (e, {
|
|
203
203
|
adjustments: o = 0,
|
|
204
204
|
behavior: t
|
|
205
205
|
}, n) => {
|
|
@@ -210,7 +210,7 @@ const W2 = (e, o) => Math.abs(e - o) < 1, G2 = (e, o, t) => {
|
|
|
210
210
|
behavior: t
|
|
211
211
|
});
|
|
212
212
|
};
|
|
213
|
-
class
|
|
213
|
+
class n0 {
|
|
214
214
|
constructor(o) {
|
|
215
215
|
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__ */ (() => {
|
|
216
216
|
let t = null;
|
|
@@ -245,11 +245,11 @@ class t0 {
|
|
|
245
245
|
scrollPaddingStart: 0,
|
|
246
246
|
scrollPaddingEnd: 0,
|
|
247
247
|
horizontal: !1,
|
|
248
|
-
getItemKey:
|
|
249
|
-
rangeExtractor:
|
|
248
|
+
getItemKey: J2,
|
|
249
|
+
rangeExtractor: K2,
|
|
250
250
|
onChange: () => {
|
|
251
251
|
},
|
|
252
|
-
measureElement:
|
|
252
|
+
measureElement: e0,
|
|
253
253
|
initialRect: { width: 0, height: 0 },
|
|
254
254
|
scrollMargin: 0,
|
|
255
255
|
gap: 0,
|
|
@@ -350,14 +350,14 @@ class t0 {
|
|
|
350
350
|
this.options.measureElement(P, void 0, this)
|
|
351
351
|
);
|
|
352
352
|
});
|
|
353
|
-
const w = a(p), b = this.options.lanes === 1 ? c[p - 1] : this.getFurthestMeasurement(c, p), _ = b ? b.end + this.options.gap : n + l, R = s.get(w), I = typeof R == "number" ? R : this.options.estimateSize(p), x = _ + I,
|
|
353
|
+
const w = a(p), b = this.options.lanes === 1 ? c[p - 1] : this.getFurthestMeasurement(c, p), _ = b ? b.end + this.options.gap : n + l, R = s.get(w), I = typeof R == "number" ? R : this.options.estimateSize(p), x = _ + I, k = b ? b.lane : p % this.options.lanes;
|
|
354
354
|
c[p] = {
|
|
355
355
|
index: p,
|
|
356
356
|
start: _,
|
|
357
357
|
size: I,
|
|
358
358
|
end: x,
|
|
359
359
|
key: w,
|
|
360
|
-
lane:
|
|
360
|
+
lane: k,
|
|
361
361
|
measureElement: g
|
|
362
362
|
};
|
|
363
363
|
}
|
|
@@ -369,7 +369,7 @@ class t0 {
|
|
|
369
369
|
}
|
|
370
370
|
), this.calculateRange = we(
|
|
371
371
|
() => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
|
|
372
|
-
(t, n, l) => this.range = t.length > 0 && n > 0 ?
|
|
372
|
+
(t, n, l) => this.range = t.length > 0 && n > 0 ? o0({
|
|
373
373
|
measurements: t,
|
|
374
374
|
outerSize: n,
|
|
375
375
|
scrollOffset: l
|
|
@@ -439,7 +439,7 @@ class t0 {
|
|
|
439
439
|
const n = this.getMeasurements();
|
|
440
440
|
if (n.length !== 0)
|
|
441
441
|
return Je(
|
|
442
|
-
n[
|
|
442
|
+
n[Rt(
|
|
443
443
|
0,
|
|
444
444
|
n.length - 1,
|
|
445
445
|
(l) => Je(n[l]).start,
|
|
@@ -489,7 +489,7 @@ class t0 {
|
|
|
489
489
|
const [u] = Je(
|
|
490
490
|
this.getOffsetForIndex(t, s)
|
|
491
491
|
);
|
|
492
|
-
|
|
492
|
+
G2(u, this.getScrollOffset()) || this.scrollToIndex(t, { align: s, behavior: l });
|
|
493
493
|
} else
|
|
494
494
|
this.scrollToIndex(t, { align: s, behavior: l });
|
|
495
495
|
}));
|
|
@@ -518,7 +518,7 @@ class t0 {
|
|
|
518
518
|
}, this.setOptions(o);
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
|
-
const
|
|
521
|
+
const Rt = (e, o, t, n) => {
|
|
522
522
|
for (; e <= o; ) {
|
|
523
523
|
const l = (e + o) / 2 | 0, a = t(l);
|
|
524
524
|
if (a < n)
|
|
@@ -530,19 +530,19 @@ const Ft = (e, o, t, n) => {
|
|
|
530
530
|
}
|
|
531
531
|
return e > 0 ? e - 1 : 0;
|
|
532
532
|
};
|
|
533
|
-
function
|
|
533
|
+
function o0({
|
|
534
534
|
measurements: e,
|
|
535
535
|
outerSize: o,
|
|
536
536
|
scrollOffset: t
|
|
537
537
|
}) {
|
|
538
|
-
const n = e.length - 1, a =
|
|
538
|
+
const n = e.length - 1, a = Rt(0, n, (s) => e[s].start, t);
|
|
539
539
|
let i = a;
|
|
540
540
|
for (; i < n && e[i].end < t + o; )
|
|
541
541
|
i++;
|
|
542
542
|
return { startIndex: a, endIndex: i };
|
|
543
543
|
}
|
|
544
|
-
function
|
|
545
|
-
const o = new
|
|
544
|
+
function l0(e) {
|
|
545
|
+
const o = new n0(L(e)), t = m2(o), n = o._didMount();
|
|
546
546
|
return N(
|
|
547
547
|
() => L(e).getScrollElement(),
|
|
548
548
|
(l) => {
|
|
@@ -567,23 +567,23 @@ function o0(e) {
|
|
|
567
567
|
}
|
|
568
568
|
), nt(n), t;
|
|
569
569
|
}
|
|
570
|
-
function
|
|
571
|
-
return
|
|
570
|
+
function s0(e) {
|
|
571
|
+
return l0(
|
|
572
572
|
E(() => ({
|
|
573
|
-
observeElementRect:
|
|
574
|
-
observeElementOffset:
|
|
575
|
-
scrollToFn:
|
|
573
|
+
observeElementRect: Y2,
|
|
574
|
+
observeElementOffset: X2,
|
|
575
|
+
scrollToFn: t0,
|
|
576
576
|
...L(e)
|
|
577
577
|
}))
|
|
578
578
|
);
|
|
579
579
|
}
|
|
580
|
-
function
|
|
580
|
+
function a0(e, o, t) {
|
|
581
581
|
let n = $(t == null ? void 0 : t.value), l = E(() => e.value !== void 0);
|
|
582
582
|
return [E(() => l.value ? e.value : n.value), function(a) {
|
|
583
583
|
return l.value || (n.value = a), o == null ? void 0 : o(a);
|
|
584
584
|
}];
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function i0(e) {
|
|
587
587
|
typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((o) => setTimeout(() => {
|
|
588
588
|
throw o;
|
|
589
589
|
}));
|
|
@@ -603,7 +603,7 @@ function Ne() {
|
|
|
603
603
|
o.add(() => clearTimeout(n));
|
|
604
604
|
}, microTask(...t) {
|
|
605
605
|
let n = { current: !0 };
|
|
606
|
-
return
|
|
606
|
+
return i0(() => {
|
|
607
607
|
n.current && t[0]();
|
|
608
608
|
}), o.add(() => {
|
|
609
609
|
n.current = !1;
|
|
@@ -626,19 +626,19 @@ function Ne() {
|
|
|
626
626
|
} };
|
|
627
627
|
return o;
|
|
628
628
|
}
|
|
629
|
-
function
|
|
629
|
+
function r0() {
|
|
630
630
|
let e = Ne();
|
|
631
631
|
return ot(() => e.dispose()), e;
|
|
632
632
|
}
|
|
633
|
-
function
|
|
634
|
-
let e =
|
|
633
|
+
function u0() {
|
|
634
|
+
let e = r0();
|
|
635
635
|
return (o) => {
|
|
636
636
|
e.dispose(), e.nextFrame(o);
|
|
637
637
|
};
|
|
638
638
|
}
|
|
639
|
-
let
|
|
639
|
+
let c0 = Symbol("headlessui.useid"), d0 = 0;
|
|
640
640
|
function Le() {
|
|
641
|
-
return Te(
|
|
641
|
+
return Te(c0, () => `${++d0}`)();
|
|
642
642
|
}
|
|
643
643
|
function V(e) {
|
|
644
644
|
var o;
|
|
@@ -654,8 +654,8 @@ function ae(e, o, ...t) {
|
|
|
654
654
|
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(", ")}.`);
|
|
655
655
|
throw Error.captureStackTrace && Error.captureStackTrace(n, ae), n;
|
|
656
656
|
}
|
|
657
|
-
var
|
|
658
|
-
let
|
|
657
|
+
var f0 = Object.defineProperty, p0 = (e, o, t) => o in e ? f0(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, vt = (e, o, t) => (p0(e, typeof o != "symbol" ? o + "" : o, t), t);
|
|
658
|
+
let v0 = class {
|
|
659
659
|
constructor() {
|
|
660
660
|
vt(this, "current", this.detect()), vt(this, "currentId", 0);
|
|
661
661
|
}
|
|
@@ -677,7 +677,7 @@ let p0 = class {
|
|
|
677
677
|
detect() {
|
|
678
678
|
return typeof window > "u" || typeof document > "u" ? "server" : "client";
|
|
679
679
|
}
|
|
680
|
-
}, at = new
|
|
680
|
+
}, at = new v0();
|
|
681
681
|
function it(e) {
|
|
682
682
|
if (at.isServer) return null;
|
|
683
683
|
if (e instanceof Node) return e.ownerDocument;
|
|
@@ -688,8 +688,8 @@ function it(e) {
|
|
|
688
688
|
return document;
|
|
689
689
|
}
|
|
690
690
|
let ht = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
|
|
691
|
-
var
|
|
692
|
-
function
|
|
691
|
+
var h0 = ((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))(h0 || {}), m0 = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(m0 || {}), b0 = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(b0 || {}), Pt = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(Pt || {});
|
|
692
|
+
function g0(e, o = 0) {
|
|
693
693
|
var t;
|
|
694
694
|
return e === ((t = it(e)) == null ? void 0 : t.body) ? !1 : ae(o, { 0() {
|
|
695
695
|
return e.matches(ht);
|
|
@@ -702,13 +702,13 @@ function b0(e, o = 0) {
|
|
|
702
702
|
return !1;
|
|
703
703
|
} });
|
|
704
704
|
}
|
|
705
|
-
var
|
|
705
|
+
var C0 = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(C0 || {});
|
|
706
706
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
|
|
707
707
|
e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
708
708
|
}, !0), document.addEventListener("click", (e) => {
|
|
709
709
|
e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
710
710
|
}, !0));
|
|
711
|
-
function
|
|
711
|
+
function x0(e, o = (t) => t) {
|
|
712
712
|
return e.slice().sort((t, n) => {
|
|
713
713
|
let l = o(t), a = o(n);
|
|
714
714
|
if (l === null || a === null) return 0;
|
|
@@ -716,26 +716,26 @@ function C0(e, o = (t) => t) {
|
|
|
716
716
|
return i & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
717
717
|
});
|
|
718
718
|
}
|
|
719
|
-
function
|
|
719
|
+
function y0() {
|
|
720
720
|
return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
|
|
721
721
|
}
|
|
722
|
-
function
|
|
722
|
+
function w0() {
|
|
723
723
|
return /Android/gi.test(window.navigator.userAgent);
|
|
724
724
|
}
|
|
725
|
-
function
|
|
726
|
-
return
|
|
725
|
+
function Dt() {
|
|
726
|
+
return y0() || w0();
|
|
727
727
|
}
|
|
728
728
|
function Ve(e, o, t) {
|
|
729
729
|
at.isServer || re((n) => {
|
|
730
730
|
document.addEventListener(e, o, t), n(() => document.removeEventListener(e, o, t));
|
|
731
731
|
});
|
|
732
732
|
}
|
|
733
|
-
function
|
|
733
|
+
function _0(e, o, t) {
|
|
734
734
|
at.isServer || re((n) => {
|
|
735
735
|
window.addEventListener(e, o, t), n(() => window.removeEventListener(e, o, t));
|
|
736
736
|
});
|
|
737
737
|
}
|
|
738
|
-
function
|
|
738
|
+
function S0(e, o, t = E(() => !0)) {
|
|
739
739
|
function n(a, i) {
|
|
740
740
|
if (!t.value || a.defaultPrevented) return;
|
|
741
741
|
let s = i(a);
|
|
@@ -748,7 +748,7 @@ function _0(e, o, t = E(() => !0)) {
|
|
|
748
748
|
let c = u instanceof HTMLElement ? u : V(u);
|
|
749
749
|
if (c != null && c.contains(s) || a.composed && a.composedPath().includes(c)) return;
|
|
750
750
|
}
|
|
751
|
-
return !
|
|
751
|
+
return !g0(s, Pt.Loose) && s.tabIndex !== -1 && a.preventDefault(), o(a, s);
|
|
752
752
|
}
|
|
753
753
|
let l = $(null);
|
|
754
754
|
Ve("pointerdown", (a) => {
|
|
@@ -758,15 +758,15 @@ function _0(e, o, t = E(() => !0)) {
|
|
|
758
758
|
var i, s;
|
|
759
759
|
t.value && (l.value = ((s = (i = a.composedPath) == null ? void 0 : i.call(a)) == null ? void 0 : s[0]) || a.target);
|
|
760
760
|
}, !0), Ve("click", (a) => {
|
|
761
|
-
|
|
762
|
-
}, !0), Ve("touchend", (a) => n(a, () => a.target instanceof HTMLElement ? a.target : null), !0),
|
|
761
|
+
Dt() || l.value && (n(a, () => l.value), l.value = null);
|
|
762
|
+
}, !0), Ve("touchend", (a) => n(a, () => a.target instanceof HTMLElement ? a.target : null), !0), _0("blur", (a) => n(a, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
|
|
763
763
|
}
|
|
764
764
|
function mt(e, o) {
|
|
765
765
|
if (e) return e;
|
|
766
766
|
let t = o ?? "button";
|
|
767
767
|
if (typeof t == "string" && t.toLowerCase() === "button") return "button";
|
|
768
768
|
}
|
|
769
|
-
function
|
|
769
|
+
function E0(e, o) {
|
|
770
770
|
let t = $(mt(e.value.type, e.value.as));
|
|
771
771
|
return ve(() => {
|
|
772
772
|
t.value = mt(e.value.type, e.value.as);
|
|
@@ -778,7 +778,7 @@ function S0(e, o) {
|
|
|
778
778
|
function bt(e) {
|
|
779
779
|
return [e.screenX, e.screenY];
|
|
780
780
|
}
|
|
781
|
-
function
|
|
781
|
+
function O0() {
|
|
782
782
|
let e = $([-1, -1]);
|
|
783
783
|
return { wasMoved(o) {
|
|
784
784
|
let t = bt(o);
|
|
@@ -787,7 +787,7 @@ function E0() {
|
|
|
787
787
|
e.value = bt(o);
|
|
788
788
|
} };
|
|
789
789
|
}
|
|
790
|
-
function
|
|
790
|
+
function $0({ container: e, accept: o, walk: t, enabled: n }) {
|
|
791
791
|
re(() => {
|
|
792
792
|
let l = e.value;
|
|
793
793
|
if (!l || n !== void 0 && !n.value) return;
|
|
@@ -797,10 +797,10 @@ function O0({ container: e, accept: o, walk: t, enabled: n }) {
|
|
|
797
797
|
for (; s.nextNode(); ) t(s.currentNode);
|
|
798
798
|
});
|
|
799
799
|
}
|
|
800
|
-
var Oe = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Oe || {}),
|
|
800
|
+
var Oe = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Oe || {}), I0 = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(I0 || {});
|
|
801
801
|
function he({ visible: e = !0, features: o = 0, ourProps: t, theirProps: n, ...l }) {
|
|
802
802
|
var a;
|
|
803
|
-
let i =
|
|
803
|
+
let i = Bt(n, t), s = Object.assign(l, { props: i });
|
|
804
804
|
if (e || o & 2 && i.static) return Ke(s);
|
|
805
805
|
if (o & 1) {
|
|
806
806
|
let r = (a = i.unmount) == null || a ? 0 : 1;
|
|
@@ -821,13 +821,13 @@ function Ke({ props: e, attrs: o, slots: t, slot: n, name: l }) {
|
|
|
821
821
|
p && (c["data-headlessui-state"] = g.join(" "));
|
|
822
822
|
}
|
|
823
823
|
if (s === "template") {
|
|
824
|
-
if (u =
|
|
824
|
+
if (u = Nt(u ?? []), Object.keys(r).length > 0 || Object.keys(o).length > 0) {
|
|
825
825
|
let [p, ...g] = u ?? [];
|
|
826
|
-
if (!
|
|
826
|
+
if (!L0(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(r).concat(Object.keys(o)).map((_) => _.trim()).filter((_, R, I) => I.indexOf(_) === R).sort((_, R) => _.localeCompare(R)).map((_) => ` - ${_}`).join(`
|
|
827
827
|
`), "", "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((_) => ` - ${_}`).join(`
|
|
828
828
|
`)].join(`
|
|
829
829
|
`));
|
|
830
|
-
let w =
|
|
830
|
+
let w = Bt((i = p.props) != null ? i : {}, r, c), b = Tt(p, w, !0);
|
|
831
831
|
for (let _ in w) _.startsWith("on") && (b.props || (b.props = {}), b.props[_] = w[_]);
|
|
832
832
|
return b;
|
|
833
833
|
}
|
|
@@ -835,10 +835,10 @@ function Ke({ props: e, attrs: o, slots: t, slot: n, name: l }) {
|
|
|
835
835
|
}
|
|
836
836
|
return Ee(s, Object.assign({}, r, c), { default: () => u });
|
|
837
837
|
}
|
|
838
|
-
function
|
|
839
|
-
return e.flatMap((o) => o.type === G ?
|
|
838
|
+
function Nt(e) {
|
|
839
|
+
return e.flatMap((o) => o.type === G ? Nt(o.children) : [o]);
|
|
840
840
|
}
|
|
841
|
-
function
|
|
841
|
+
function Bt(...e) {
|
|
842
842
|
if (e.length === 0) return {};
|
|
843
843
|
if (e.length === 1) return e[0];
|
|
844
844
|
let o = {}, t = {};
|
|
@@ -853,7 +853,7 @@ function Nt(...e) {
|
|
|
853
853
|
} });
|
|
854
854
|
return o;
|
|
855
855
|
}
|
|
856
|
-
function
|
|
856
|
+
function T0(e) {
|
|
857
857
|
let o = Object.assign({}, e);
|
|
858
858
|
for (let t in o) o[t] === void 0 && delete o[t];
|
|
859
859
|
return o;
|
|
@@ -863,39 +863,39 @@ function He(e, o = []) {
|
|
|
863
863
|
for (let n of o) n in t && delete t[n];
|
|
864
864
|
return t;
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function L0(e) {
|
|
867
867
|
return e == null ? !1 : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function";
|
|
868
868
|
}
|
|
869
|
-
var
|
|
870
|
-
let
|
|
869
|
+
var jt = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(jt || {});
|
|
870
|
+
let M0 = ue({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: o, attrs: t }) {
|
|
871
871
|
return () => {
|
|
872
872
|
var n;
|
|
873
873
|
let { features: l, ...a } = e, i = { "aria-hidden": (l & 2) === 2 ? !0 : (n = a["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" } } };
|
|
874
874
|
return he({ ourProps: i, theirProps: a, slot: {}, attrs: t, slots: o, name: "Hidden" });
|
|
875
875
|
};
|
|
876
|
-
} }),
|
|
876
|
+
} }), Ht = Symbol("Context");
|
|
877
877
|
var $e = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))($e || {});
|
|
878
|
-
function
|
|
879
|
-
return Te(
|
|
878
|
+
function A0() {
|
|
879
|
+
return Te(Ht, null);
|
|
880
880
|
}
|
|
881
881
|
function k0(e) {
|
|
882
|
-
lt(
|
|
882
|
+
lt(Ht, e);
|
|
883
883
|
}
|
|
884
|
-
var J = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(J || {}),
|
|
885
|
-
function
|
|
884
|
+
var J = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(J || {}), zt = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(zt || {});
|
|
885
|
+
function V0(e) {
|
|
886
886
|
function o() {
|
|
887
887
|
document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", o));
|
|
888
888
|
}
|
|
889
889
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", o), o());
|
|
890
890
|
}
|
|
891
891
|
let de = [];
|
|
892
|
-
|
|
892
|
+
V0(() => {
|
|
893
893
|
function e(o) {
|
|
894
894
|
o.target instanceof HTMLElement && o.target !== document.body && de[0] !== o.target && (de.unshift(o.target), de = de.filter((t) => t != null && t.isConnected), de.splice(10));
|
|
895
895
|
}
|
|
896
896
|
window.addEventListener("click", e, { capture: !0 }), window.addEventListener("mousedown", e, { capture: !0 }), window.addEventListener("focus", e, { capture: !0 }), document.body.addEventListener("click", e, { capture: !0 }), document.body.addEventListener("mousedown", e, { capture: !0 }), document.body.addEventListener("focus", e, { capture: !0 });
|
|
897
897
|
});
|
|
898
|
-
function
|
|
898
|
+
function F0(e) {
|
|
899
899
|
throw new Error("Unexpected object: " + e);
|
|
900
900
|
}
|
|
901
901
|
var Z = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(Z || {});
|
|
@@ -928,40 +928,40 @@ function gt(e, o) {
|
|
|
928
928
|
case 5:
|
|
929
929
|
return null;
|
|
930
930
|
default:
|
|
931
|
-
|
|
931
|
+
F0(e);
|
|
932
932
|
}
|
|
933
933
|
}
|
|
934
|
-
function
|
|
935
|
-
for (let [n, l] of Object.entries(e))
|
|
934
|
+
function Ut(e = {}, o = null, t = []) {
|
|
935
|
+
for (let [n, l] of Object.entries(e)) Wt(t, Zt(o, n), l);
|
|
936
936
|
return t;
|
|
937
937
|
}
|
|
938
|
-
function
|
|
938
|
+
function Zt(e, o) {
|
|
939
939
|
return e ? e + "[" + o + "]" : o;
|
|
940
940
|
}
|
|
941
|
-
function
|
|
942
|
-
if (Array.isArray(t)) for (let [n, l] of t.entries())
|
|
943
|
-
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, ""]) :
|
|
941
|
+
function Wt(e, o, t) {
|
|
942
|
+
if (Array.isArray(t)) for (let [n, l] of t.entries()) Wt(e, Zt(o, n.toString()), l);
|
|
943
|
+
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, ""]) : Ut(t, o, e);
|
|
944
944
|
}
|
|
945
|
-
function
|
|
945
|
+
function R0(e, o) {
|
|
946
946
|
return e === o;
|
|
947
947
|
}
|
|
948
|
-
var
|
|
949
|
-
let
|
|
948
|
+
var P0 = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(P0 || {}), D0 = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(D0 || {}), N0 = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Focus = 1] = "Focus", e[e.Other = 2] = "Other", e))(N0 || {});
|
|
949
|
+
let Gt = Symbol("ComboboxContext");
|
|
950
950
|
function me(e) {
|
|
951
|
-
let o = Te(
|
|
951
|
+
let o = Te(Gt, null);
|
|
952
952
|
if (o === null) {
|
|
953
953
|
let t = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
|
|
954
954
|
throw Error.captureStackTrace && Error.captureStackTrace(t, me), t;
|
|
955
955
|
}
|
|
956
956
|
return o;
|
|
957
957
|
}
|
|
958
|
-
let
|
|
958
|
+
let qt = Symbol("VirtualContext"), B0 = ue({ name: "VirtualProvider", setup(e, { slots: o }) {
|
|
959
959
|
let t = me("VirtualProvider"), n = E(() => {
|
|
960
960
|
let s = V(t.optionsRef);
|
|
961
961
|
if (!s) return { start: 0, end: 0 };
|
|
962
962
|
let r = window.getComputedStyle(s);
|
|
963
963
|
return { start: parseFloat(r.paddingBlockStart || r.paddingTop), end: parseFloat(r.paddingBlockEnd || r.paddingBottom) };
|
|
964
|
-
}), l =
|
|
964
|
+
}), l = s0(E(() => ({ scrollPaddingStart: n.value.start, scrollPaddingEnd: n.value.end, count: t.virtual.value.options.length, estimateSize() {
|
|
965
965
|
return 40;
|
|
966
966
|
}, getScrollElement() {
|
|
967
967
|
return V(t.optionsRef);
|
|
@@ -971,19 +971,19 @@ let Gt = Symbol("VirtualContext"), N0 = ue({ name: "VirtualProvider", setup(e, {
|
|
|
971
971
|
}), i = $(0);
|
|
972
972
|
return N([a], () => {
|
|
973
973
|
i.value += 1;
|
|
974
|
-
}), lt(
|
|
974
|
+
}), lt(qt, t.virtual.value ? l : null), () => [Ee("div", { style: { position: "relative", width: "100%", height: `${l.value.getTotalSize()}px` }, ref: (s) => {
|
|
975
975
|
if (s) {
|
|
976
976
|
if (typeof process < "u" && process.env.JEST_WORKER_ID !== void 0 || t.activationTrigger.value === 0) return;
|
|
977
977
|
t.activeOptionIndex.value !== null && t.virtual.value.options.length > t.activeOptionIndex.value && l.value.scrollToIndex(t.activeOptionIndex.value);
|
|
978
978
|
}
|
|
979
|
-
} }, l.value.getVirtualItems().map((s) =>
|
|
980
|
-
} }),
|
|
979
|
+
} }, l.value.getVirtualItems().map((s) => Tt(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" } })))];
|
|
980
|
+
} }), j0 = ue({ 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 }) {
|
|
981
981
|
let l = $(1), a = $(null), i = $(null), s = $(null), r = $(null), u = $({ static: !1, hold: !1 }), c = $([]), p = $(null), g = $(2), w = $(!1);
|
|
982
982
|
function b(d = (f) => f) {
|
|
983
|
-
let f = p.value !== null ? c.value[p.value] : null, S = d(c.value.slice()), T = S.length > 0 && S[0].dataRef.order.value !== null ? S.sort((D, Y) => D.dataRef.order.value - Y.dataRef.order.value) :
|
|
983
|
+
let f = p.value !== null ? c.value[p.value] : null, S = d(c.value.slice()), T = S.length > 0 && S[0].dataRef.order.value !== null ? S.sort((D, Y) => D.dataRef.order.value - Y.dataRef.order.value) : x0(S, (D) => V(D.dataRef.domRef)), F = f ? T.indexOf(f) : null;
|
|
984
984
|
return F === -1 && (F = null), { options: T, activeOptionIndex: F };
|
|
985
985
|
}
|
|
986
|
-
let _ = E(() => e.multiple ? 1 : 0), R = E(() => e.nullable), [I, x] =
|
|
986
|
+
let _ = E(() => e.multiple ? 1 : 0), R = E(() => e.nullable), [I, x] = a0(E(() => e.modelValue), (d) => n("update:modelValue", d), E(() => e.defaultValue)), k = E(() => I.value === void 0 ? ae(_.value, { 1: [], 0: void 0 }) : I.value), P = null, y = null;
|
|
987
987
|
function M(d) {
|
|
988
988
|
return ae(_.value, { 0() {
|
|
989
989
|
return x == null ? void 0 : x(d);
|
|
@@ -1000,12 +1000,12 @@ let Gt = Symbol("VirtualContext"), N0 = ue({ name: "VirtualProvider", setup(e, {
|
|
|
1000
1000
|
S !== -1 ? p.value = S : p.value = null;
|
|
1001
1001
|
}
|
|
1002
1002
|
});
|
|
1003
|
-
let h = { comboboxState: l, value:
|
|
1003
|
+
let h = { comboboxState: l, value: k, mode: _, compare(d, f) {
|
|
1004
1004
|
if (typeof e.by == "string") {
|
|
1005
1005
|
let S = e.by;
|
|
1006
1006
|
return (d == null ? void 0 : d[S]) === (f == null ? void 0 : f[S]);
|
|
1007
1007
|
}
|
|
1008
|
-
return e.by === null ?
|
|
1008
|
+
return e.by === null ? R0(d, f) : e.by(d, f);
|
|
1009
1009
|
}, calculateIndex(d) {
|
|
1010
1010
|
return h.virtual.value ? e.by === null ? h.virtual.value.options.indexOf(d) : h.virtual.value.options.findIndex((f) => h.compare(f, d)) : c.value.findIndex((f) => h.compare(f.dataRef.value, d));
|
|
1011
1011
|
}, defaultValue: E(() => e.defaultValue), nullable: R, immediate: E(() => !1), virtual: E(() => null), inputRef: i, labelRef: a, buttonRef: s, optionsRef: r, disabled: E(() => e.disabled), options: c, change(d) {
|
|
@@ -1073,7 +1073,7 @@ let Gt = Symbol("VirtualContext"), N0 = ue({ name: "VirtualProvider", setup(e, {
|
|
|
1073
1073
|
h.goToOption(Z.Specific, h.activeOptionIndex.value);
|
|
1074
1074
|
}
|
|
1075
1075
|
}, registerOption(d, f) {
|
|
1076
|
-
let S =
|
|
1076
|
+
let S = Lt({ id: d, dataRef: f });
|
|
1077
1077
|
if (h.virtual.value) {
|
|
1078
1078
|
c.value.push(S);
|
|
1079
1079
|
return;
|
|
@@ -1099,26 +1099,26 @@ let Gt = Symbol("VirtualContext"), N0 = ue({ name: "VirtualProvider", setup(e, {
|
|
|
1099
1099
|
}, isActive(d) {
|
|
1100
1100
|
return p.value === h.calculateIndex(d);
|
|
1101
1101
|
} };
|
|
1102
|
-
|
|
1103
|
-
let
|
|
1102
|
+
S0([i, s, r], () => h.closeCombobox(), E(() => l.value === 0)), lt(Gt, h), k0(E(() => ae(l.value, { 0: $e.Open, 1: $e.Closed })));
|
|
1103
|
+
let A = E(() => {
|
|
1104
1104
|
var d;
|
|
1105
1105
|
return (d = V(i)) == null ? void 0 : d.closest("form");
|
|
1106
1106
|
});
|
|
1107
1107
|
return ve(() => {
|
|
1108
|
-
N([
|
|
1109
|
-
if (!
|
|
1108
|
+
N([A], () => {
|
|
1109
|
+
if (!A.value || e.defaultValue === void 0) return;
|
|
1110
1110
|
function d() {
|
|
1111
1111
|
h.change(e.defaultValue);
|
|
1112
1112
|
}
|
|
1113
|
-
return
|
|
1113
|
+
return A.value.addEventListener("reset", d), () => {
|
|
1114
1114
|
var f;
|
|
1115
|
-
(f =
|
|
1115
|
+
(f = A.value) == null || f.removeEventListener("reset", d);
|
|
1116
1116
|
};
|
|
1117
1117
|
}, { immediate: !0 });
|
|
1118
1118
|
}), () => {
|
|
1119
1119
|
var d, f, S;
|
|
1120
|
-
let { name: T, disabled: F, form: D, ...Y } = e, Q = { open: l.value === 0, disabled: F, activeIndex: h.activeOptionIndex.value, activeOption: h.activeOptionIndex.value === null ? null : h.virtual.value ? h.virtual.value.options[(d = h.activeOptionIndex.value) != null ? d : 0] : (S = (f = h.options.value[h.activeOptionIndex.value]) == null ? void 0 : f.dataRef.value) != null ? S : null, value:
|
|
1121
|
-
return Ee(G, [...T != null &&
|
|
1120
|
+
let { name: T, disabled: F, form: D, ...Y } = e, Q = { open: l.value === 0, disabled: F, activeIndex: h.activeOptionIndex.value, activeOption: h.activeOptionIndex.value === null ? null : h.virtual.value ? h.virtual.value.options[(d = h.activeOptionIndex.value) != null ? d : 0] : (S = (f = h.options.value[h.activeOptionIndex.value]) == null ? void 0 : f.dataRef.value) != null ? S : null, value: k.value };
|
|
1121
|
+
return Ee(G, [...T != null && k.value != null ? Ut({ [T]: k.value }).map(([z, h2]) => Ee(M0, T0({ features: jt.Hidden, key: z, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: D, disabled: F, name: z, value: h2 }))) : [], he({ theirProps: { ...t, ...He(Y, ["by", "defaultValue", "immediate", "modelValue", "multiple", "nullable", "onUpdate:modelValue", "virtual"]) }, ourProps: {}, slot: Q, slots: o, attrs: t, name: "Combobox" })]);
|
|
1122
1122
|
};
|
|
1123
1123
|
} });
|
|
1124
1124
|
ue({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t }) {
|
|
@@ -1133,7 +1133,7 @@ ue({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "lab
|
|
|
1133
1133
|
return he({ ourProps: u, theirProps: r, slot: s, attrs: o, slots: t, name: "ComboboxLabel" });
|
|
1134
1134
|
};
|
|
1135
1135
|
} });
|
|
1136
|
-
let
|
|
1136
|
+
let H0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t, expose: n }) {
|
|
1137
1137
|
var l;
|
|
1138
1138
|
let a = (l = e.id) != null ? l : `headlessui-combobox-button-${Le()}`, i = me("ComboboxButton");
|
|
1139
1139
|
n({ el: i.buttonRef, $el: i.buttonRef });
|
|
@@ -1168,13 +1168,13 @@ let j0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1168
1168
|
return;
|
|
1169
1169
|
}
|
|
1170
1170
|
}
|
|
1171
|
-
let u =
|
|
1171
|
+
let u = E0(E(() => ({ as: e.as, type: o.type })), i.buttonRef);
|
|
1172
1172
|
return () => {
|
|
1173
1173
|
var c, p;
|
|
1174
1174
|
let g = { open: i.comboboxState.value === 0, disabled: i.disabled.value, value: i.value.value }, { ...w } = e, b = { ref: i.buttonRef, id: a, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (c = V(i.optionsRef)) == null ? void 0 : c.id, "aria-expanded": i.comboboxState.value === 0, "aria-labelledby": i.labelRef.value ? [(p = V(i.labelRef)) == null ? void 0 : p.id, a].join(" ") : void 0, disabled: i.disabled.value === !0 ? !0 : void 0, onKeydown: r, onClick: s };
|
|
1175
1175
|
return he({ ourProps: b, theirProps: w, slot: g, attrs: o, slots: t, name: "ComboboxButton" });
|
|
1176
1176
|
};
|
|
1177
|
-
} }),
|
|
1177
|
+
} }), z0 = ue({ 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 }) {
|
|
1178
1178
|
var a;
|
|
1179
1179
|
let i = (a = e.id) != null ? a : `headlessui-combobox-input-${Le()}`, s = me("ComboboxInput"), r = E(() => it(V(s.inputRef))), u = { value: !1 };
|
|
1180
1180
|
l({ el: s.inputRef, $el: s.inputRef });
|
|
@@ -1191,20 +1191,20 @@ let j0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1191
1191
|
ve(() => {
|
|
1192
1192
|
N([p, s.comboboxState, r], ([y, M], [C, h]) => {
|
|
1193
1193
|
if (u.value) return;
|
|
1194
|
-
let
|
|
1195
|
-
|
|
1194
|
+
let A = V(s.inputRef);
|
|
1195
|
+
A && ((h === 0 && M === 1 || y !== C) && (A.value = y), requestAnimationFrame(() => {
|
|
1196
1196
|
var d;
|
|
1197
|
-
if (u.value || !
|
|
1198
|
-
let { selectionStart: f, selectionEnd: S } =
|
|
1199
|
-
Math.abs((S ?? 0) - (f ?? 0)) === 0 && f === 0 &&
|
|
1197
|
+
if (u.value || !A || ((d = r.value) == null ? void 0 : d.activeElement) !== A) return;
|
|
1198
|
+
let { selectionStart: f, selectionEnd: S } = A;
|
|
1199
|
+
Math.abs((S ?? 0) - (f ?? 0)) === 0 && f === 0 && A.setSelectionRange(A.value.length, A.value.length);
|
|
1200
1200
|
}));
|
|
1201
1201
|
}, { immediate: !0 }), N([s.comboboxState], ([y], [M]) => {
|
|
1202
1202
|
if (y === 0 && M === 1) {
|
|
1203
1203
|
if (u.value) return;
|
|
1204
1204
|
let C = V(s.inputRef);
|
|
1205
1205
|
if (!C) return;
|
|
1206
|
-
let h = C.value, { selectionStart:
|
|
1207
|
-
C.value = "", C.value = h, f !== null ? C.setSelectionRange(
|
|
1206
|
+
let h = C.value, { selectionStart: A, selectionEnd: d, selectionDirection: f } = C;
|
|
1207
|
+
C.value = "", C.value = h, f !== null ? C.setSelectionRange(A, d, f) : C.setSelectionRange(A, d);
|
|
1208
1208
|
}
|
|
1209
1209
|
});
|
|
1210
1210
|
});
|
|
@@ -1217,7 +1217,7 @@ let j0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1217
1217
|
g.value = !1;
|
|
1218
1218
|
});
|
|
1219
1219
|
}
|
|
1220
|
-
let _ =
|
|
1220
|
+
let _ = u0();
|
|
1221
1221
|
function R(y) {
|
|
1222
1222
|
switch (u.value = !0, _(() => {
|
|
1223
1223
|
u.value = !1;
|
|
@@ -1263,13 +1263,13 @@ let j0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1263
1263
|
}
|
|
1264
1264
|
function x(y) {
|
|
1265
1265
|
var M, C, h;
|
|
1266
|
-
let
|
|
1267
|
-
if (u.value = !1, !((C = V(s.optionsRef)) != null && C.contains(
|
|
1266
|
+
let A = (M = y.relatedTarget) != null ? M : de.find((d) => d !== y.currentTarget);
|
|
1267
|
+
if (u.value = !1, !((C = V(s.optionsRef)) != null && C.contains(A)) && !((h = V(s.buttonRef)) != null && h.contains(A)) && s.comboboxState.value === 0) return y.preventDefault(), s.mode.value === 0 && (s.nullable.value && s.value.value === null ? c() : s.activationTrigger.value !== 1 && s.selectActiveOption()), s.closeCombobox();
|
|
1268
1268
|
}
|
|
1269
|
-
function
|
|
1269
|
+
function k(y) {
|
|
1270
1270
|
var M, C, h;
|
|
1271
|
-
let
|
|
1272
|
-
(C = V(s.buttonRef)) != null && C.contains(
|
|
1271
|
+
let A = (M = y.relatedTarget) != null ? M : de.find((d) => d !== y.currentTarget);
|
|
1272
|
+
(C = V(s.buttonRef)) != null && C.contains(A) || (h = V(s.optionsRef)) != null && h.contains(A) || s.disabled.value || s.immediate.value && s.comboboxState.value !== 0 && (s.openCombobox(), Ne().nextFrame(() => {
|
|
1273
1273
|
s.setActivationTrigger(1);
|
|
1274
1274
|
}));
|
|
1275
1275
|
}
|
|
@@ -1278,19 +1278,19 @@ let j0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1278
1278
|
return (h = (C = (M = e.defaultValue) != null ? M : s.defaultValue.value !== void 0 ? (y = e.displayValue) == null ? void 0 : y.call(e, s.defaultValue.value) : null) != null ? C : s.defaultValue.value) != null ? h : "";
|
|
1279
1279
|
});
|
|
1280
1280
|
return () => {
|
|
1281
|
-
var y, M, C, h,
|
|
1282
|
-
let S = { open: s.comboboxState.value === 0 }, { displayValue: T, onChange: F, ...D } = e, Y = { "aria-controls": (y = s.optionsRef.value) == null ? void 0 : y.id, "aria-expanded": s.comboboxState.value === 0, "aria-activedescendant": s.activeOptionIndex.value === null ? void 0 : s.virtual.value ? (M = 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 : M.id : (C = s.options.value[s.activeOptionIndex.value]) == null ? void 0 : C.id, "aria-labelledby": (d = (h = V(s.labelRef)) == null ? void 0 : h.id) != null ? d : (
|
|
1281
|
+
var y, M, C, h, A, d, f;
|
|
1282
|
+
let S = { open: s.comboboxState.value === 0 }, { displayValue: T, onChange: F, ...D } = e, Y = { "aria-controls": (y = s.optionsRef.value) == null ? void 0 : y.id, "aria-expanded": s.comboboxState.value === 0, "aria-activedescendant": s.activeOptionIndex.value === null ? void 0 : s.virtual.value ? (M = 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 : M.id : (C = s.options.value[s.activeOptionIndex.value]) == null ? void 0 : C.id, "aria-labelledby": (d = (h = V(s.labelRef)) == null ? void 0 : h.id) != null ? d : (A = V(s.buttonRef)) == null ? void 0 : A.id, "aria-autocomplete": "list", id: i, onCompositionstart: w, onCompositionend: b, onKeydown: R, onInput: I, onFocus: k, onBlur: x, role: "combobox", type: (f = t.type) != null ? f : "text", tabIndex: 0, ref: s.inputRef, defaultValue: P.value, disabled: s.disabled.value === !0 ? !0 : void 0 };
|
|
1283
1283
|
return he({ ourProps: Y, theirProps: D, slot: S, attrs: t, slots: n, features: Oe.RenderStrategy | Oe.Static, name: "ComboboxInput" });
|
|
1284
1284
|
};
|
|
1285
|
-
} }),
|
|
1285
|
+
} }), U0 = ue({ 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 }) {
|
|
1286
1286
|
let l = me("ComboboxOptions"), a = `headlessui-combobox-options-${Le()}`;
|
|
1287
1287
|
n({ el: l.optionsRef, $el: l.optionsRef }), re(() => {
|
|
1288
1288
|
l.optionsPropsRef.value.static = e.static;
|
|
1289
1289
|
}), re(() => {
|
|
1290
1290
|
l.optionsPropsRef.value.hold = e.hold;
|
|
1291
1291
|
});
|
|
1292
|
-
let i =
|
|
1293
|
-
|
|
1292
|
+
let i = A0(), s = E(() => i !== null ? (i.value & $e.Open) === $e.Open : l.comboboxState.value === 0);
|
|
1293
|
+
$0({ container: E(() => V(l.optionsRef)), enabled: E(() => l.comboboxState.value === 0), accept(u) {
|
|
1294
1294
|
return u.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : u.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
1295
1295
|
}, walk(u) {
|
|
1296
1296
|
u.setAttribute("role", "none");
|
|
@@ -1301,56 +1301,56 @@ let j0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1301
1301
|
return () => {
|
|
1302
1302
|
var u, c, p;
|
|
1303
1303
|
let g = { open: l.comboboxState.value === 0 }, w = { "aria-labelledby": (p = (u = V(l.labelRef)) == null ? void 0 : u.id) != null ? p : (c = V(l.buttonRef)) == null ? void 0 : c.id, id: a, ref: l.optionsRef, role: "listbox", "aria-multiselectable": l.mode.value === 1 ? !0 : void 0, onMousedown: r }, b = He(e, ["hold"]);
|
|
1304
|
-
return he({ ourProps: w, theirProps: b, slot: g, attrs: o, slots: l.virtual.value && l.comboboxState.value === 0 ? { ...t, default: () => [Ee(
|
|
1304
|
+
return he({ ourProps: w, theirProps: b, slot: g, attrs: o, slots: l.virtual.value && l.comboboxState.value === 0 ? { ...t, default: () => [Ee(B0, {}, t.default)] } : t, features: Oe.RenderStrategy | Oe.Static, visible: s.value, name: "ComboboxOptions" });
|
|
1305
1305
|
};
|
|
1306
|
-
} }),
|
|
1306
|
+
} }), Z0 = ue({ 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 }) {
|
|
1307
1307
|
let l = me("ComboboxOption"), a = `headlessui-combobox-option-${Le()}`, i = $(null), s = E(() => e.disabled);
|
|
1308
1308
|
n({ el: i, $el: i });
|
|
1309
1309
|
let r = E(() => {
|
|
1310
1310
|
var x;
|
|
1311
1311
|
return l.virtual.value ? l.activeOptionIndex.value === l.calculateIndex(e.value) : l.activeOptionIndex.value === null ? !1 : ((x = l.options.value[l.activeOptionIndex.value]) == null ? void 0 : x.id) === a;
|
|
1312
|
-
}), u = E(() => l.isSelected(e.value)), c = Te(
|
|
1312
|
+
}), u = E(() => l.isSelected(e.value)), c = Te(qt, null), p = E(() => ({ disabled: e.disabled, value: e.value, domRef: i, order: E(() => e.order) }));
|
|
1313
1313
|
ve(() => l.registerOption(a, p)), ot(() => l.unregisterOption(a, r.value)), re(() => {
|
|
1314
1314
|
let x = V(i);
|
|
1315
1315
|
x && (c == null || c.value.measureElement(x));
|
|
1316
1316
|
}), re(() => {
|
|
1317
1317
|
l.comboboxState.value === 0 && r.value && (l.virtual.value || l.activationTrigger.value !== 0 && oe(() => {
|
|
1318
|
-
var x,
|
|
1319
|
-
return (
|
|
1318
|
+
var x, k;
|
|
1319
|
+
return (k = (x = V(i)) == null ? void 0 : x.scrollIntoView) == null ? void 0 : k.call(x, { block: "nearest" });
|
|
1320
1320
|
}));
|
|
1321
1321
|
});
|
|
1322
1322
|
function g(x) {
|
|
1323
|
-
x.preventDefault(), x.button ===
|
|
1324
|
-
var
|
|
1325
|
-
return (
|
|
1323
|
+
x.preventDefault(), x.button === zt.Left && (s.value || (l.selectOption(a), Dt() || requestAnimationFrame(() => {
|
|
1324
|
+
var k;
|
|
1325
|
+
return (k = V(l.inputRef)) == null ? void 0 : k.focus({ preventScroll: !0 });
|
|
1326
1326
|
}), l.mode.value === 0 && l.closeCombobox()));
|
|
1327
1327
|
}
|
|
1328
1328
|
function w() {
|
|
1329
1329
|
var x;
|
|
1330
1330
|
if (e.disabled || (x = l.virtual.value) != null && x.disabled(e.value)) return l.goToOption(Z.Nothing);
|
|
1331
|
-
let
|
|
1332
|
-
l.goToOption(Z.Specific,
|
|
1331
|
+
let k = l.calculateIndex(e.value);
|
|
1332
|
+
l.goToOption(Z.Specific, k);
|
|
1333
1333
|
}
|
|
1334
|
-
let b =
|
|
1334
|
+
let b = O0();
|
|
1335
1335
|
function _(x) {
|
|
1336
1336
|
b.update(x);
|
|
1337
1337
|
}
|
|
1338
1338
|
function R(x) {
|
|
1339
|
-
var
|
|
1340
|
-
if (!b.wasMoved(x) || e.disabled || (
|
|
1339
|
+
var k;
|
|
1340
|
+
if (!b.wasMoved(x) || e.disabled || (k = l.virtual.value) != null && k.disabled(e.value) || r.value) return;
|
|
1341
1341
|
let P = l.calculateIndex(e.value);
|
|
1342
1342
|
l.goToOption(Z.Specific, P, 0);
|
|
1343
1343
|
}
|
|
1344
1344
|
function I(x) {
|
|
1345
|
-
var
|
|
1346
|
-
b.wasMoved(x) && (e.disabled || (
|
|
1345
|
+
var k;
|
|
1346
|
+
b.wasMoved(x) && (e.disabled || (k = l.virtual.value) != null && k.disabled(e.value) || r.value && (l.optionsPropsRef.value.hold || l.goToOption(Z.Nothing)));
|
|
1347
1347
|
}
|
|
1348
1348
|
return () => {
|
|
1349
|
-
let { disabled: x } = e,
|
|
1350
|
-
return he({ ourProps: P, theirProps: y, slot:
|
|
1349
|
+
let { disabled: x } = e, k = { active: r.value, selected: u.value, disabled: x }, P = { id: a, ref: i, role: "option", tabIndex: x === !0 ? void 0 : -1, "aria-disabled": x === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onMousedown: g, onFocus: w, onPointerenter: _, onMouseenter: _, onPointermove: R, onMousemove: R, onPointerleave: I, onMouseleave: I }, y = He(e, ["order", "value"]);
|
|
1350
|
+
return he({ ourProps: P, theirProps: y, slot: k, attrs: t, slots: o, name: "ComboboxOption" });
|
|
1351
1351
|
};
|
|
1352
1352
|
} });
|
|
1353
|
-
function
|
|
1353
|
+
function W0(e, o) {
|
|
1354
1354
|
return m(), O("svg", {
|
|
1355
1355
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1356
1356
|
viewBox: "0 0 20 20",
|
|
@@ -1365,7 +1365,7 @@ function Z0(e, o) {
|
|
|
1365
1365
|
})
|
|
1366
1366
|
]);
|
|
1367
1367
|
}
|
|
1368
|
-
function
|
|
1368
|
+
function G0(e, o) {
|
|
1369
1369
|
return m(), O("svg", {
|
|
1370
1370
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1371
1371
|
viewBox: "0 0 20 20",
|
|
@@ -1380,7 +1380,7 @@ function W0(e, o) {
|
|
|
1380
1380
|
})
|
|
1381
1381
|
]);
|
|
1382
1382
|
}
|
|
1383
|
-
function
|
|
1383
|
+
function q0(e, o) {
|
|
1384
1384
|
return m(), O("svg", {
|
|
1385
1385
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1386
1386
|
viewBox: "0 0 20 20",
|
|
@@ -1395,7 +1395,7 @@ function G0(e, o) {
|
|
|
1395
1395
|
})
|
|
1396
1396
|
]);
|
|
1397
1397
|
}
|
|
1398
|
-
var
|
|
1398
|
+
var Jt = !1;
|
|
1399
1399
|
function Fe(e, o, t) {
|
|
1400
1400
|
return Array.isArray(e) ? (e.length = Math.max(e.length, o), e.splice(o, 1, t), t) : (e[o] = t, t);
|
|
1401
1401
|
}
|
|
@@ -1406,22 +1406,22 @@ function Ye(e, o) {
|
|
|
1406
1406
|
}
|
|
1407
1407
|
delete e[o];
|
|
1408
1408
|
}
|
|
1409
|
-
function
|
|
1410
|
-
return
|
|
1409
|
+
function J0() {
|
|
1410
|
+
return Kt().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
1411
1411
|
}
|
|
1412
|
-
function
|
|
1412
|
+
function Kt() {
|
|
1413
1413
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
1414
1414
|
}
|
|
1415
|
-
const
|
|
1415
|
+
const K0 = typeof Proxy == "function", Y0 = "devtools-plugin:setup", Q0 = "plugin:settings:set";
|
|
1416
1416
|
let ge, Qe;
|
|
1417
|
-
function
|
|
1417
|
+
function X0() {
|
|
1418
1418
|
var e;
|
|
1419
1419
|
return ge !== void 0 || (typeof window < "u" && window.performance ? (ge = !0, Qe = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (ge = !0, Qe = globalThis.perf_hooks.performance) : ge = !1), ge;
|
|
1420
1420
|
}
|
|
1421
|
-
function
|
|
1422
|
-
return
|
|
1421
|
+
function en() {
|
|
1422
|
+
return X0() ? Qe.now() : Date.now();
|
|
1423
1423
|
}
|
|
1424
|
-
class
|
|
1424
|
+
class tn {
|
|
1425
1425
|
constructor(o, t) {
|
|
1426
1426
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = o, this.hook = t;
|
|
1427
1427
|
const n = {};
|
|
@@ -1449,9 +1449,9 @@ class en {
|
|
|
1449
1449
|
a = i;
|
|
1450
1450
|
},
|
|
1451
1451
|
now() {
|
|
1452
|
-
return
|
|
1452
|
+
return en();
|
|
1453
1453
|
}
|
|
1454
|
-
}, t && t.on(
|
|
1454
|
+
}, t && t.on(Q0, (i, s) => {
|
|
1455
1455
|
i === this.plugin.id && this.fallbacks.setSettings(s);
|
|
1456
1456
|
}), this.proxiedOn = new Proxy({}, {
|
|
1457
1457
|
get: (i, s) => this.target ? this.target.on[s] : (...r) => {
|
|
@@ -1483,12 +1483,12 @@ class en {
|
|
|
1483
1483
|
t.resolve(await this.target[t.method](...t.args));
|
|
1484
1484
|
}
|
|
1485
1485
|
}
|
|
1486
|
-
function
|
|
1487
|
-
const t = e, n =
|
|
1486
|
+
function Yt(e, o) {
|
|
1487
|
+
const t = e, n = Kt(), l = J0(), a = K0 && t.enableEarlyProxy;
|
|
1488
1488
|
if (l && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !a))
|
|
1489
|
-
l.emit(
|
|
1489
|
+
l.emit(Y0, e, o);
|
|
1490
1490
|
else {
|
|
1491
|
-
const i = a ? new
|
|
1491
|
+
const i = a ? new tn(t, l) : null;
|
|
1492
1492
|
(n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
1493
1493
|
pluginDescriptor: t,
|
|
1494
1494
|
setupFn: o,
|
|
@@ -1502,7 +1502,7 @@ function Kt(e, o) {
|
|
|
1502
1502
|
* @license MIT
|
|
1503
1503
|
*/
|
|
1504
1504
|
let _e;
|
|
1505
|
-
const Ie = (e) => _e = e,
|
|
1505
|
+
const Ie = (e) => _e = e, Qt = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
1506
1506
|
/* istanbul ignore next */
|
|
1507
1507
|
Symbol()
|
|
1508
1508
|
);
|
|
@@ -1514,18 +1514,18 @@ var le;
|
|
|
1514
1514
|
e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
|
|
1515
1515
|
})(le || (le = {}));
|
|
1516
1516
|
const ze = typeof window < "u", Se = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && ze, Ct = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof global == "object" && global.global === global ? global : typeof globalThis == "object" ? globalThis : { HTMLElement: null };
|
|
1517
|
-
function
|
|
1517
|
+
function nn(e, { autoBom: o = !1 } = {}) {
|
|
1518
1518
|
return o && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
|
|
1519
1519
|
}
|
|
1520
1520
|
function rt(e, o, t) {
|
|
1521
1521
|
const n = new XMLHttpRequest();
|
|
1522
1522
|
n.open("GET", e), n.responseType = "blob", n.onload = function() {
|
|
1523
|
-
|
|
1523
|
+
t2(n.response, o, t);
|
|
1524
1524
|
}, n.onerror = function() {
|
|
1525
1525
|
console.error("could not download file");
|
|
1526
1526
|
}, n.send();
|
|
1527
1527
|
}
|
|
1528
|
-
function
|
|
1528
|
+
function Xt(e) {
|
|
1529
1529
|
const o = new XMLHttpRequest();
|
|
1530
1530
|
o.open("HEAD", e, !1);
|
|
1531
1531
|
try {
|
|
@@ -1542,28 +1542,28 @@ function Re(e) {
|
|
|
1542
1542
|
t.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(t);
|
|
1543
1543
|
}
|
|
1544
1544
|
}
|
|
1545
|
-
const Pe = typeof navigator == "object" ? navigator : { userAgent: "" },
|
|
1545
|
+
const Pe = typeof navigator == "object" ? navigator : { userAgent: "" }, e2 = /Macintosh/.test(Pe.userAgent) && /AppleWebKit/.test(Pe.userAgent) && !/Safari/.test(Pe.userAgent), t2 = ze ? (
|
|
1546
1546
|
// Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
|
|
1547
|
-
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !
|
|
1547
|
+
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !e2 ? on : (
|
|
1548
1548
|
// Use msSaveOrOpenBlob as a second approach
|
|
1549
|
-
"msSaveOrOpenBlob" in Pe ?
|
|
1549
|
+
"msSaveOrOpenBlob" in Pe ? ln : (
|
|
1550
1550
|
// Fallback to using FileReader and a popup
|
|
1551
|
-
|
|
1551
|
+
sn
|
|
1552
1552
|
)
|
|
1553
1553
|
)
|
|
1554
1554
|
) : () => {
|
|
1555
1555
|
};
|
|
1556
|
-
function
|
|
1556
|
+
function on(e, o = "download", t) {
|
|
1557
1557
|
const n = document.createElement("a");
|
|
1558
|
-
n.download = o, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ?
|
|
1558
|
+
n.download = o, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ? Xt(n.href) ? rt(e, o, t) : (n.target = "_blank", Re(n)) : Re(n)) : (n.href = URL.createObjectURL(e), setTimeout(function() {
|
|
1559
1559
|
URL.revokeObjectURL(n.href);
|
|
1560
1560
|
}, 4e4), setTimeout(function() {
|
|
1561
1561
|
Re(n);
|
|
1562
1562
|
}, 0));
|
|
1563
1563
|
}
|
|
1564
|
-
function
|
|
1564
|
+
function ln(e, o = "download", t) {
|
|
1565
1565
|
if (typeof e == "string")
|
|
1566
|
-
if (
|
|
1566
|
+
if (Xt(e))
|
|
1567
1567
|
rt(e, o, t);
|
|
1568
1568
|
else {
|
|
1569
1569
|
const n = document.createElement("a");
|
|
@@ -1572,13 +1572,13 @@ function on(e, o = "download", t) {
|
|
|
1572
1572
|
});
|
|
1573
1573
|
}
|
|
1574
1574
|
else
|
|
1575
|
-
navigator.msSaveOrOpenBlob(
|
|
1575
|
+
navigator.msSaveOrOpenBlob(nn(e, t), o);
|
|
1576
1576
|
}
|
|
1577
|
-
function
|
|
1577
|
+
function sn(e, o, t, n) {
|
|
1578
1578
|
if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string")
|
|
1579
1579
|
return rt(e, o, t);
|
|
1580
1580
|
const l = e.type === "application/octet-stream", a = /constructor/i.test(String(Ct.HTMLElement)) || "safari" in Ct, i = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
1581
|
-
if ((i || l && a ||
|
|
1581
|
+
if ((i || l && a || e2) && typeof FileReader < "u") {
|
|
1582
1582
|
const s = new FileReader();
|
|
1583
1583
|
s.onloadend = function() {
|
|
1584
1584
|
let r = s.result;
|
|
@@ -1600,36 +1600,36 @@ function U(e, o) {
|
|
|
1600
1600
|
function ut(e) {
|
|
1601
1601
|
return "_a" in e && "install" in e;
|
|
1602
1602
|
}
|
|
1603
|
-
function
|
|
1603
|
+
function n2() {
|
|
1604
1604
|
if (!("clipboard" in navigator))
|
|
1605
1605
|
return U("Your browser doesn't support the Clipboard API", "error"), !0;
|
|
1606
1606
|
}
|
|
1607
|
-
function
|
|
1607
|
+
function o2(e) {
|
|
1608
1608
|
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (U('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
|
|
1609
1609
|
}
|
|
1610
|
-
async function
|
|
1611
|
-
if (!
|
|
1610
|
+
async function an(e) {
|
|
1611
|
+
if (!n2())
|
|
1612
1612
|
try {
|
|
1613
1613
|
await navigator.clipboard.writeText(JSON.stringify(e.state.value)), U("Global state copied to clipboard.");
|
|
1614
1614
|
} catch (o) {
|
|
1615
|
-
if (
|
|
1615
|
+
if (o2(o))
|
|
1616
1616
|
return;
|
|
1617
1617
|
U("Failed to serialize the state. Check the console for more details.", "error"), console.error(o);
|
|
1618
1618
|
}
|
|
1619
1619
|
}
|
|
1620
|
-
async function
|
|
1621
|
-
if (!
|
|
1620
|
+
async function rn(e) {
|
|
1621
|
+
if (!n2())
|
|
1622
1622
|
try {
|
|
1623
|
-
|
|
1623
|
+
l2(e, JSON.parse(await navigator.clipboard.readText())), U("Global state pasted from clipboard.");
|
|
1624
1624
|
} catch (o) {
|
|
1625
|
-
if (
|
|
1625
|
+
if (o2(o))
|
|
1626
1626
|
return;
|
|
1627
1627
|
U("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(o);
|
|
1628
1628
|
}
|
|
1629
1629
|
}
|
|
1630
|
-
async function
|
|
1630
|
+
async function un(e) {
|
|
1631
1631
|
try {
|
|
1632
|
-
|
|
1632
|
+
t2(new Blob([JSON.stringify(e.state.value)], {
|
|
1633
1633
|
type: "text/plain;charset=utf-8"
|
|
1634
1634
|
}), "pinia-state.json");
|
|
1635
1635
|
} catch (o) {
|
|
@@ -1637,7 +1637,7 @@ async function rn(e) {
|
|
|
1637
1637
|
}
|
|
1638
1638
|
}
|
|
1639
1639
|
let se;
|
|
1640
|
-
function
|
|
1640
|
+
function cn() {
|
|
1641
1641
|
se || (se = document.createElement("input"), se.type = "file", se.accept = ".json");
|
|
1642
1642
|
function e() {
|
|
1643
1643
|
return new Promise((o, t) => {
|
|
@@ -1652,18 +1652,18 @@ function un() {
|
|
|
1652
1652
|
}
|
|
1653
1653
|
return e;
|
|
1654
1654
|
}
|
|
1655
|
-
async function
|
|
1655
|
+
async function dn(e) {
|
|
1656
1656
|
try {
|
|
1657
|
-
const t = await
|
|
1657
|
+
const t = await cn()();
|
|
1658
1658
|
if (!t)
|
|
1659
1659
|
return;
|
|
1660
1660
|
const { text: n, file: l } = t;
|
|
1661
|
-
|
|
1661
|
+
l2(e, JSON.parse(n)), U(`Global state imported from "${l.name}".`);
|
|
1662
1662
|
} catch (o) {
|
|
1663
1663
|
U("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(o);
|
|
1664
1664
|
}
|
|
1665
1665
|
}
|
|
1666
|
-
function
|
|
1666
|
+
function l2(e, o) {
|
|
1667
1667
|
for (const t in o) {
|
|
1668
1668
|
const n = e.state.value[t];
|
|
1669
1669
|
n ? Object.assign(n, o[t]) : e.state.value[t] = o[t];
|
|
@@ -1676,17 +1676,17 @@ function ne(e) {
|
|
|
1676
1676
|
}
|
|
1677
1677
|
};
|
|
1678
1678
|
}
|
|
1679
|
-
const
|
|
1680
|
-
function
|
|
1679
|
+
const s2 = "🍍 Pinia (root)", Xe = "_root";
|
|
1680
|
+
function fn(e) {
|
|
1681
1681
|
return ut(e) ? {
|
|
1682
1682
|
id: Xe,
|
|
1683
|
-
label:
|
|
1683
|
+
label: s2
|
|
1684
1684
|
} : {
|
|
1685
1685
|
id: e.$id,
|
|
1686
1686
|
label: e.$id
|
|
1687
1687
|
};
|
|
1688
1688
|
}
|
|
1689
|
-
function
|
|
1689
|
+
function pn(e) {
|
|
1690
1690
|
if (ut(e)) {
|
|
1691
1691
|
const t = Array.from(e._s.keys()), n = e._s;
|
|
1692
1692
|
return {
|
|
@@ -1722,7 +1722,7 @@ function fn(e) {
|
|
|
1722
1722
|
value: e[t]
|
|
1723
1723
|
}))), o;
|
|
1724
1724
|
}
|
|
1725
|
-
function
|
|
1725
|
+
function vn(e) {
|
|
1726
1726
|
return e ? Array.isArray(e) ? e.reduce((o, t) => (o.keys.push(t.key), o.operations.push(t.type), o.oldValue[t.key] = t.oldValue, o.newValue[t.key] = t.newValue, o), {
|
|
1727
1727
|
oldValue: {},
|
|
1728
1728
|
keys: [],
|
|
@@ -1735,7 +1735,7 @@ function pn(e) {
|
|
|
1735
1735
|
newValue: e.newValue
|
|
1736
1736
|
} : {};
|
|
1737
1737
|
}
|
|
1738
|
-
function
|
|
1738
|
+
function hn(e) {
|
|
1739
1739
|
switch (e) {
|
|
1740
1740
|
case le.direct:
|
|
1741
1741
|
return "mutation";
|
|
@@ -1748,9 +1748,9 @@ function vn(e) {
|
|
|
1748
1748
|
}
|
|
1749
1749
|
}
|
|
1750
1750
|
let xe = !0;
|
|
1751
|
-
const De = [], ce = "pinia:mutations", W = "pinia", { assign:
|
|
1752
|
-
function
|
|
1753
|
-
|
|
1751
|
+
const De = [], ce = "pinia:mutations", W = "pinia", { assign: mn } = Object, Be = (e) => "🍍 " + e;
|
|
1752
|
+
function bn(e, o) {
|
|
1753
|
+
Yt({
|
|
1754
1754
|
id: "dev.esm.pinia",
|
|
1755
1755
|
label: "Pinia 🍍",
|
|
1756
1756
|
logo: "https://pinia.vuejs.org/logo.svg",
|
|
@@ -1772,28 +1772,28 @@ function mn(e, o) {
|
|
|
1772
1772
|
{
|
|
1773
1773
|
icon: "content_copy",
|
|
1774
1774
|
action: () => {
|
|
1775
|
-
|
|
1775
|
+
an(o);
|
|
1776
1776
|
},
|
|
1777
1777
|
tooltip: "Serialize and copy the state"
|
|
1778
1778
|
},
|
|
1779
1779
|
{
|
|
1780
1780
|
icon: "content_paste",
|
|
1781
1781
|
action: async () => {
|
|
1782
|
-
await
|
|
1782
|
+
await rn(o), t.sendInspectorTree(W), t.sendInspectorState(W);
|
|
1783
1783
|
},
|
|
1784
1784
|
tooltip: "Replace the state with the content of your clipboard"
|
|
1785
1785
|
},
|
|
1786
1786
|
{
|
|
1787
1787
|
icon: "save",
|
|
1788
1788
|
action: () => {
|
|
1789
|
-
|
|
1789
|
+
un(o);
|
|
1790
1790
|
},
|
|
1791
1791
|
tooltip: "Save the state as a JSON file"
|
|
1792
1792
|
},
|
|
1793
1793
|
{
|
|
1794
1794
|
icon: "folder_open",
|
|
1795
1795
|
action: async () => {
|
|
1796
|
-
await
|
|
1796
|
+
await dn(o), t.sendInspectorTree(W), t.sendInspectorState(W);
|
|
1797
1797
|
},
|
|
1798
1798
|
tooltip: "Import the state from a JSON file"
|
|
1799
1799
|
}
|
|
@@ -1850,14 +1850,14 @@ function mn(e, o) {
|
|
|
1850
1850
|
}), t.on.getInspectorTree((n) => {
|
|
1851
1851
|
if (n.app === e && n.inspectorId === W) {
|
|
1852
1852
|
let l = [o];
|
|
1853
|
-
l = l.concat(Array.from(o._s.values())), n.rootNodes = (n.filter ? l.filter((a) => "$id" in a ? a.$id.toLowerCase().includes(n.filter.toLowerCase()) :
|
|
1853
|
+
l = l.concat(Array.from(o._s.values())), n.rootNodes = (n.filter ? l.filter((a) => "$id" in a ? a.$id.toLowerCase().includes(n.filter.toLowerCase()) : s2.toLowerCase().includes(n.filter.toLowerCase())) : l).map(fn);
|
|
1854
1854
|
}
|
|
1855
1855
|
}), t.on.getInspectorState((n) => {
|
|
1856
1856
|
if (n.app === e && n.inspectorId === W) {
|
|
1857
1857
|
const l = n.nodeId === Xe ? o : o._s.get(n.nodeId);
|
|
1858
1858
|
if (!l)
|
|
1859
1859
|
return;
|
|
1860
|
-
l && (n.state =
|
|
1860
|
+
l && (n.state = pn(l));
|
|
1861
1861
|
}
|
|
1862
1862
|
}), t.on.editInspectorState((n, l) => {
|
|
1863
1863
|
if (n.app === e && n.inspectorId === W) {
|
|
@@ -1882,8 +1882,8 @@ Only state can be modified.`);
|
|
|
1882
1882
|
});
|
|
1883
1883
|
});
|
|
1884
1884
|
}
|
|
1885
|
-
function
|
|
1886
|
-
De.includes(Be(o.$id)) || De.push(Be(o.$id)),
|
|
1885
|
+
function gn(e, o) {
|
|
1886
|
+
De.includes(Be(o.$id)) || De.push(Be(o.$id)), Yt({
|
|
1887
1887
|
id: "dev.esm.pinia",
|
|
1888
1888
|
label: "Pinia 🍍",
|
|
1889
1889
|
logo: "https://pinia.vuejs.org/logo.svg",
|
|
@@ -1906,7 +1906,7 @@ function bn(e, o) {
|
|
|
1906
1906
|
}, (t) => {
|
|
1907
1907
|
const n = typeof t.now == "function" ? t.now.bind(t) : Date.now;
|
|
1908
1908
|
o.$onAction(({ after: i, onError: s, name: r, args: u }) => {
|
|
1909
|
-
const c =
|
|
1909
|
+
const c = a2++;
|
|
1910
1910
|
t.addTimelineEvent({
|
|
1911
1911
|
layerId: ce,
|
|
1912
1912
|
event: {
|
|
@@ -1975,8 +1975,8 @@ function bn(e, o) {
|
|
|
1975
1975
|
return;
|
|
1976
1976
|
const u = {
|
|
1977
1977
|
time: n(),
|
|
1978
|
-
title:
|
|
1979
|
-
data:
|
|
1978
|
+
title: hn(s),
|
|
1979
|
+
data: mn({ store: ne(o.$id) }, vn(i)),
|
|
1980
1980
|
groupId: ie
|
|
1981
1981
|
};
|
|
1982
1982
|
s === le.patchFunction ? u.subtitle = "⤵️" : s === le.patchObject ? u.subtitle = "🧩" : i && !Array.isArray(i) && (u.subtitle = i.type), i && (u.data["rawEvent(s)"] = {
|
|
@@ -2012,12 +2012,12 @@ function bn(e, o) {
|
|
|
2012
2012
|
}, t.notifyComponentUpdate(), t.sendInspectorTree(W), t.sendInspectorState(W), t.getSettings().logStoreChanges && U(`"${o.$id}" store installed 🆕`);
|
|
2013
2013
|
});
|
|
2014
2014
|
}
|
|
2015
|
-
let
|
|
2015
|
+
let a2 = 0, ie;
|
|
2016
2016
|
function xt(e, o, t) {
|
|
2017
2017
|
const n = o.reduce((l, a) => (l[a] = ee(e)[a], l), {});
|
|
2018
2018
|
for (const l in n)
|
|
2019
2019
|
e[l] = function() {
|
|
2020
|
-
const a =
|
|
2020
|
+
const a = a2, i = t ? new Proxy(e, {
|
|
2021
2021
|
get(...r) {
|
|
2022
2022
|
return ie = a, Reflect.get(...r);
|
|
2023
2023
|
},
|
|
@@ -2030,28 +2030,28 @@ function xt(e, o, t) {
|
|
|
2030
2030
|
return ie = void 0, s;
|
|
2031
2031
|
};
|
|
2032
2032
|
}
|
|
2033
|
-
function
|
|
2033
|
+
function Cn({ app: e, store: o, options: t }) {
|
|
2034
2034
|
if (o.$id.startsWith("__hot:"))
|
|
2035
2035
|
return;
|
|
2036
2036
|
o._isOptionsAPI = !!t.state, xt(o, Object.keys(t.actions), o._isOptionsAPI);
|
|
2037
2037
|
const n = o._hotUpdate;
|
|
2038
2038
|
ee(o)._hotUpdate = function(l) {
|
|
2039
2039
|
n.apply(this, arguments), xt(o, Object.keys(l._hmrPayload.actions), !!o._isOptionsAPI);
|
|
2040
|
-
},
|
|
2040
|
+
}, gn(
|
|
2041
2041
|
e,
|
|
2042
2042
|
// FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
|
|
2043
2043
|
o
|
|
2044
2044
|
);
|
|
2045
2045
|
}
|
|
2046
|
-
function
|
|
2047
|
-
const e =
|
|
2046
|
+
function xn() {
|
|
2047
|
+
const e = Mt(!0), o = e.run(() => $({}));
|
|
2048
2048
|
let t = [], n = [];
|
|
2049
2049
|
const l = fe({
|
|
2050
2050
|
install(a) {
|
|
2051
|
-
Ie(l), l._a = a, a.provide(
|
|
2051
|
+
Ie(l), l._a = a, a.provide(Qt, l), a.config.globalProperties.$pinia = l, Se && bn(a, l), n.forEach((i) => t.push(i)), n = [];
|
|
2052
2052
|
},
|
|
2053
2053
|
use(a) {
|
|
2054
|
-
return !this._a && !
|
|
2054
|
+
return !this._a && !Jt ? n.push(a) : t.push(a), this;
|
|
2055
2055
|
},
|
|
2056
2056
|
_p: t,
|
|
2057
2057
|
// it's actually undefined here
|
|
@@ -2061,21 +2061,21 @@ function Cn() {
|
|
|
2061
2061
|
_s: /* @__PURE__ */ new Map(),
|
|
2062
2062
|
state: o
|
|
2063
2063
|
});
|
|
2064
|
-
return Se && typeof Proxy < "u" && l.use(
|
|
2064
|
+
return Se && typeof Proxy < "u" && l.use(Cn), l;
|
|
2065
2065
|
}
|
|
2066
|
-
function
|
|
2066
|
+
function i2(e, o) {
|
|
2067
2067
|
for (const t in o) {
|
|
2068
2068
|
const n = o[t];
|
|
2069
2069
|
if (!(t in e))
|
|
2070
2070
|
continue;
|
|
2071
2071
|
const l = e[t];
|
|
2072
|
-
pe(l) && pe(n) && !ye(n) && !st(n) ? e[t] =
|
|
2072
|
+
pe(l) && pe(n) && !ye(n) && !st(n) ? e[t] = i2(l, n) : e[t] = n;
|
|
2073
2073
|
}
|
|
2074
2074
|
return e;
|
|
2075
2075
|
}
|
|
2076
|
-
const
|
|
2076
|
+
const r2 = () => {
|
|
2077
2077
|
};
|
|
2078
|
-
function yt(e, o, t, n =
|
|
2078
|
+
function yt(e, o, t, n = r2) {
|
|
2079
2079
|
e.push(o);
|
|
2080
2080
|
const l = () => {
|
|
2081
2081
|
const a = e.indexOf(o);
|
|
@@ -2088,7 +2088,7 @@ function Ce(e, ...o) {
|
|
|
2088
2088
|
t(...o);
|
|
2089
2089
|
});
|
|
2090
2090
|
}
|
|
2091
|
-
const
|
|
2091
|
+
const yn = (e) => e();
|
|
2092
2092
|
function et(e, o) {
|
|
2093
2093
|
e instanceof Map && o instanceof Map && o.forEach((t, n) => e.set(n, t)), e instanceof Set && o instanceof Set && o.forEach(e.add, e);
|
|
2094
2094
|
for (const t in o) {
|
|
@@ -2099,12 +2099,12 @@ function et(e, o) {
|
|
|
2099
2099
|
}
|
|
2100
2100
|
return e;
|
|
2101
2101
|
}
|
|
2102
|
-
const
|
|
2102
|
+
const wn = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
2103
2103
|
/* istanbul ignore next */
|
|
2104
2104
|
Symbol()
|
|
2105
2105
|
);
|
|
2106
|
-
function
|
|
2107
|
-
return !pe(e) || !e.hasOwnProperty(
|
|
2106
|
+
function _n(e) {
|
|
2107
|
+
return !pe(e) || !e.hasOwnProperty(wn);
|
|
2108
2108
|
}
|
|
2109
2109
|
const { assign: X } = Object;
|
|
2110
2110
|
function wt(e) {
|
|
@@ -2136,7 +2136,7 @@ function tt(e, o, t = {}, n, l, a) {
|
|
|
2136
2136
|
deep: !0
|
|
2137
2137
|
// flush: 'post',
|
|
2138
2138
|
};
|
|
2139
|
-
process.env.NODE_ENV !== "production" && !
|
|
2139
|
+
process.env.NODE_ENV !== "production" && !Jt && (r.onTrigger = (d) => {
|
|
2140
2140
|
u ? w = d : u == !1 && !C._hotUpdating && (Array.isArray(w) ? w.push(d) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
2141
2141
|
});
|
|
2142
2142
|
let u, c, p = [], g = [], w;
|
|
@@ -2170,9 +2170,9 @@ function tt(e, o, t = {}, n, l, a) {
|
|
|
2170
2170
|
/* istanbul ignore next */
|
|
2171
2171
|
process.env.NODE_ENV !== "production" ? () => {
|
|
2172
2172
|
throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
|
|
2173
|
-
} :
|
|
2173
|
+
} : r2
|
|
2174
2174
|
);
|
|
2175
|
-
function
|
|
2175
|
+
function k() {
|
|
2176
2176
|
i.stop(), p = [], g = [], n._s.delete(e);
|
|
2177
2177
|
}
|
|
2178
2178
|
function P(d, f) {
|
|
@@ -2223,8 +2223,8 @@ function tt(e, o, t = {}, n, l, a) {
|
|
|
2223
2223
|
}, X({}, r, f)));
|
|
2224
2224
|
return S;
|
|
2225
2225
|
},
|
|
2226
|
-
$dispose:
|
|
2227
|
-
}, C =
|
|
2226
|
+
$dispose: k
|
|
2227
|
+
}, C = Lt(process.env.NODE_ENV !== "production" || Se ? X(
|
|
2228
2228
|
{
|
|
2229
2229
|
_hmrPayload: y,
|
|
2230
2230
|
_customProperties: fe(/* @__PURE__ */ new Set())
|
|
@@ -2235,21 +2235,21 @@ function tt(e, o, t = {}, n, l, a) {
|
|
|
2235
2235
|
// setupStore
|
|
2236
2236
|
) : M);
|
|
2237
2237
|
n._s.set(e, C);
|
|
2238
|
-
const
|
|
2239
|
-
for (const d in
|
|
2240
|
-
const f =
|
|
2238
|
+
const A = (n._a && n._a.runWithContext || yn)(() => n._e.run(() => (i = Mt()).run(o)));
|
|
2239
|
+
for (const d in A) {
|
|
2240
|
+
const f = A[d];
|
|
2241
2241
|
if (ye(f) && !wt(f) || st(f))
|
|
2242
|
-
process.env.NODE_ENV !== "production" && l ? Fe(_.value, d, qe(
|
|
2242
|
+
process.env.NODE_ENV !== "production" && l ? Fe(_.value, d, qe(A, d)) : a || (b && _n(f) && (ye(f) ? f.value = b[d] : et(f, b[d])), n.state.value[e][d] = f), process.env.NODE_ENV !== "production" && y.state.push(d);
|
|
2243
2243
|
else if (typeof f == "function") {
|
|
2244
2244
|
const S = process.env.NODE_ENV !== "production" && l ? f : P(d, f);
|
|
2245
|
-
|
|
2245
|
+
A[d] = S, process.env.NODE_ENV !== "production" && (y.actions[d] = f), s.actions[d] = f;
|
|
2246
2246
|
} else process.env.NODE_ENV !== "production" && wt(f) && (y.getters[d] = a ? (
|
|
2247
2247
|
// @ts-expect-error
|
|
2248
2248
|
t.getters[d]
|
|
2249
|
-
) : f, ze && (
|
|
2250
|
-
(
|
|
2249
|
+
) : f, ze && (A._getters || // @ts-expect-error: same
|
|
2250
|
+
(A._getters = fe([]))).push(d));
|
|
2251
2251
|
}
|
|
2252
|
-
if (X(C,
|
|
2252
|
+
if (X(C, A), X(ee(C), A), Object.defineProperty(C, "$state", {
|
|
2253
2253
|
get: () => process.env.NODE_ENV !== "production" && l ? _.value : n.state.value[e],
|
|
2254
2254
|
set: (d) => {
|
|
2255
2255
|
if (process.env.NODE_ENV !== "production" && l)
|
|
@@ -2262,7 +2262,7 @@ function tt(e, o, t = {}, n, l, a) {
|
|
|
2262
2262
|
C._hotUpdating = !0, d._hmrPayload.state.forEach((f) => {
|
|
2263
2263
|
if (f in C.$state) {
|
|
2264
2264
|
const S = d.$state[f], T = C.$state[f];
|
|
2265
|
-
typeof S == "object" && pe(S) && pe(T) ?
|
|
2265
|
+
typeof S == "object" && pe(S) && pe(T) ? i2(S, T) : d.$state[f] = T;
|
|
2266
2266
|
}
|
|
2267
2267
|
Fe(C, f, qe(d.$state, f));
|
|
2268
2268
|
}), Object.keys(C.$state).forEach((f) => {
|
|
@@ -2325,10 +2325,10 @@ function Ue(e, o, t) {
|
|
|
2325
2325
|
else if (l = e, n = e.id, process.env.NODE_ENV !== "production" && typeof n != "string")
|
|
2326
2326
|
throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
|
|
2327
2327
|
function i(s, r) {
|
|
2328
|
-
const u =
|
|
2328
|
+
const u = b2();
|
|
2329
2329
|
if (s = // in test mode, ignore the argument provided as we can always retrieve a
|
|
2330
2330
|
// pinia instance with getActivePinia()
|
|
2331
|
-
(process.env.NODE_ENV === "test" && _e && _e._testing ? null : s) || (u ? Te(
|
|
2331
|
+
(process.env.NODE_ENV === "test" && _e && _e._testing ? null : s) || (u ? Te(Qt, null) : null), s && Ie(s), process.env.NODE_ENV !== "production" && !_e)
|
|
2332
2332
|
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
2333
2333
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
2334
2334
|
This will fail in production.`);
|
|
@@ -2339,7 +2339,7 @@ This will fail in production.`);
|
|
|
2339
2339
|
r._hotUpdate(g), delete s.state.value[p], s._s.delete(p);
|
|
2340
2340
|
}
|
|
2341
2341
|
if (process.env.NODE_ENV !== "production" && ze) {
|
|
2342
|
-
const p =
|
|
2342
|
+
const p = At();
|
|
2343
2343
|
if (p && p.proxy && // avoid adding stores that are just built for hot module replacement
|
|
2344
2344
|
!r) {
|
|
2345
2345
|
const g = p.proxy, w = "_pStores" in g ? g._pStores : g._pStores = {};
|
|
@@ -2360,7 +2360,7 @@ const Me = Ue("loader", () => {
|
|
|
2360
2360
|
}, isLoading: (n) => e.value[n] };
|
|
2361
2361
|
}), St = {
|
|
2362
2362
|
__name: "Select",
|
|
2363
|
-
props: /* @__PURE__ */
|
|
2363
|
+
props: /* @__PURE__ */ g2({
|
|
2364
2364
|
languages: {
|
|
2365
2365
|
type: Object,
|
|
2366
2366
|
required: !0
|
|
@@ -2371,32 +2371,32 @@ const Me = Ue("loader", () => {
|
|
|
2371
2371
|
}),
|
|
2372
2372
|
emits: ["update:modelValue"],
|
|
2373
2373
|
setup(e) {
|
|
2374
|
-
const o = Me(), t = e, n =
|
|
2374
|
+
const o = Me(), t = e, n = C2(e, "modelValue"), l = $(""), a = $(null), i = E(() => Object.entries(t.languages).filter(
|
|
2375
2375
|
([, r]) => r.toLowerCase().includes(l.value.toLowerCase())
|
|
2376
2376
|
)), s = (r) => {
|
|
2377
2377
|
r.target.value = "", l.value = "", a.value && a.value.$el.click();
|
|
2378
2378
|
};
|
|
2379
|
-
return (r, u) => (m(), q(L(
|
|
2379
|
+
return (r, u) => (m(), q(L(j0), {
|
|
2380
2380
|
modelValue: n.value,
|
|
2381
2381
|
"onUpdate:modelValue": u[3] || (u[3] = (c) => n.value = c),
|
|
2382
2382
|
disabled: L(o).loading,
|
|
2383
2383
|
as: "div",
|
|
2384
2384
|
class: "relative mt-1"
|
|
2385
2385
|
}, {
|
|
2386
|
-
default:
|
|
2387
|
-
B(L(
|
|
2386
|
+
default: Ae(() => [
|
|
2387
|
+
B(L(z0), {
|
|
2388
2388
|
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",
|
|
2389
2389
|
onChange: u[0] || (u[0] = (c) => l.value = c.target.value),
|
|
2390
2390
|
displayValue: (c) => e.languages[c],
|
|
2391
2391
|
onFocus: u[1] || (u[1] = (c) => s(c))
|
|
2392
2392
|
}, null, 8, ["displayValue"]),
|
|
2393
|
-
B(L(
|
|
2393
|
+
B(L(H0), {
|
|
2394
2394
|
ref_key: "btnSelect",
|
|
2395
2395
|
ref: a,
|
|
2396
2396
|
class: "absolute inset-y-0 right-0 flex items-center pr-2"
|
|
2397
2397
|
}, {
|
|
2398
|
-
default:
|
|
2399
|
-
B(L(
|
|
2398
|
+
default: Ae(() => [
|
|
2399
|
+
B(L(G0), {
|
|
2400
2400
|
class: "h-5 w-5 text-gray-400",
|
|
2401
2401
|
"aria-hidden": "true",
|
|
2402
2402
|
onClick: u[2] || (u[2] = (c) => s(c))
|
|
@@ -2404,13 +2404,13 @@ const Me = Ue("loader", () => {
|
|
|
2404
2404
|
]),
|
|
2405
2405
|
_: 1
|
|
2406
2406
|
}, 512),
|
|
2407
|
-
B(L(
|
|
2408
|
-
default:
|
|
2409
|
-
(m(!0), O(G, null, te(i.value, ([c, p]) => (m(), q(L(
|
|
2407
|
+
B(L(U0), { 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" }, {
|
|
2408
|
+
default: Ae(() => [
|
|
2409
|
+
(m(!0), O(G, null, te(i.value, ([c, p]) => (m(), q(L(Z0), {
|
|
2410
2410
|
key: c,
|
|
2411
2411
|
value: c
|
|
2412
2412
|
}, {
|
|
2413
|
-
default:
|
|
2413
|
+
default: Ae(({ active: g, selected: w }) => [
|
|
2414
2414
|
v("li", {
|
|
2415
2415
|
class: j([
|
|
2416
2416
|
"relative cursor-default select-none py-2 pl-3 pr-9",
|
|
@@ -2431,19 +2431,19 @@ const Me = Ue("loader", () => {
|
|
|
2431
2431
|
_: 1
|
|
2432
2432
|
}, 8, ["modelValue", "disabled"]));
|
|
2433
2433
|
}
|
|
2434
|
-
},
|
|
2435
|
-
src:
|
|
2434
|
+
}, u2 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.68688%202.3131C3.88214%202.50837%203.88214%202.82495%203.68688%203.02021L2.04043%204.66666L3.68688%206.3131C3.88214%206.50837%203.88214%206.82495%203.68688%207.02021C3.49162%207.21547%203.17504%207.21547%202.97977%207.02021L0.979775%205.02021C0.784513%204.82495%200.784513%204.50837%200.979775%204.3131L2.97977%202.3131C3.17504%202.11784%203.49162%202.11784%203.68688%202.3131Z'%20fill='%237E7E7E'/%3e%3cpath%20d='M12.3131%208.97977C12.5084%208.78451%2012.825%208.78451%2013.0202%208.97977L15.0202%2010.9798C15.2155%2011.175%2015.2155%2011.4916%2015.0202%2011.6869L13.0202%2013.6869C12.825%2013.8821%2012.5084%2013.8821%2012.3131%2013.6869C12.1178%2013.4916%2012.1178%2013.175%2012.3131%2012.9798L13.9596%2011.3333L12.3131%209.68688C12.1178%209.49161%2012.1178%209.17503%2012.3131%208.97977Z'%20fill='%237E7E7E'/%3e%3cpath%20d='M0.833328%204.66666C0.833328%204.39051%201.05719%204.16666%201.33333%204.16666H14.6667C14.9428%204.16666%2015.1667%204.39051%2015.1667%204.66666C15.1667%204.9428%2014.9428%205.16666%2014.6667%205.16666H1.33333C1.05719%205.16666%200.833328%204.9428%200.833328%204.66666Z'%20fill='%237E7E7E'/%3e%3cpath%20d='M0.833328%2011.3333C0.833328%2011.0572%201.05719%2010.8333%201.33333%2010.8333H14.6667C14.9428%2010.8333%2015.1667%2011.0572%2015.1667%2011.3333C15.1667%2011.6095%2014.9428%2011.8333%2014.6667%2011.8333H1.33333C1.05719%2011.8333%200.833328%2011.6095%200.833328%2011.3333Z'%20fill='%237E7E7E'/%3e%3c/svg%3e", Sn = ["disabled"], En = /* @__PURE__ */ v("img", {
|
|
2435
|
+
src: u2,
|
|
2436
2436
|
alt: "swap",
|
|
2437
2437
|
class: "w-4"
|
|
2438
|
-
}, null, -1),
|
|
2439
|
-
|
|
2440
|
-
],
|
|
2441
|
-
src:
|
|
2438
|
+
}, null, -1), On = [
|
|
2439
|
+
En
|
|
2440
|
+
], $n = ["disabled"], In = /* @__PURE__ */ v("img", {
|
|
2441
|
+
src: u2,
|
|
2442
2442
|
alt: "swap",
|
|
2443
2443
|
class: "w-4"
|
|
2444
|
-
}, null, -1),
|
|
2445
|
-
|
|
2446
|
-
],
|
|
2444
|
+
}, null, -1), Tn = [
|
|
2445
|
+
In
|
|
2446
|
+
], Ln = {
|
|
2447
2447
|
__name: "SwapBtn",
|
|
2448
2448
|
props: {
|
|
2449
2449
|
isBidirect: {
|
|
@@ -2458,13 +2458,13 @@ const Me = Ue("loader", () => {
|
|
|
2458
2458
|
key: 1,
|
|
2459
2459
|
onClick: i[0] || (i[0] = (s) => l("swap")),
|
|
2460
2460
|
disabled: n.value
|
|
2461
|
-
},
|
|
2461
|
+
}, Tn, 8, $n)) : (m(), O("button", {
|
|
2462
2462
|
key: 0,
|
|
2463
2463
|
disabled: n.value
|
|
2464
|
-
},
|
|
2464
|
+
}, On, 8, Sn));
|
|
2465
2465
|
}
|
|
2466
2466
|
}, Ze = Ue("language", () => {
|
|
2467
|
-
const e = $("auto"), o = $("
|
|
2467
|
+
const e = $("auto"), o = $("vi"), t = $({
|
|
2468
2468
|
src: [],
|
|
2469
2469
|
target: []
|
|
2470
2470
|
}), n = E(() => t.value.src[e.value]), l = E(() => t.value.target[o.value]);
|
|
@@ -2480,16 +2480,16 @@ const Me = Ue("loader", () => {
|
|
|
2480
2480
|
return t.value.src[r] || t.value.target[r];
|
|
2481
2481
|
}
|
|
2482
2482
|
return { languages: t, src: e, target: o, srcLabel: n, targetLabel: l, init: a, swap: i, getLabel: s };
|
|
2483
|
-
}),
|
|
2483
|
+
}), Mn = {
|
|
2484
2484
|
key: 0,
|
|
2485
2485
|
class: "flex flex-col"
|
|
2486
|
-
},
|
|
2486
|
+
}, An = { class: "flex" }, kn = { class: "grow flex flex-col" }, Vn = { class: "grow flex flex-col" }, Fn = { class: "flex" }, Rn = { class: "grow flex flex-col" }, Pn = {
|
|
2487
2487
|
key: 0,
|
|
2488
2488
|
class: "flex mt-1 space-x-1"
|
|
2489
|
-
},
|
|
2489
|
+
}, Dn = ["onClick"], Nn = { class: "grow flex flex-col" }, Bn = {
|
|
2490
2490
|
key: 0,
|
|
2491
|
-
class: "flex mt-1 space-x-1"
|
|
2492
|
-
},
|
|
2491
|
+
class: "flex mt-1 space-x-1 justify-end"
|
|
2492
|
+
}, jn = ["onClick"], Et = 3, Hn = {
|
|
2493
2493
|
__name: "Selects",
|
|
2494
2494
|
setup(e) {
|
|
2495
2495
|
const o = Ze(), t = $([]), n = $([]);
|
|
@@ -2497,58 +2497,64 @@ const Me = Ue("loader", () => {
|
|
|
2497
2497
|
o.swap();
|
|
2498
2498
|
}
|
|
2499
2499
|
return ve(() => {
|
|
2500
|
-
t.value =
|
|
2500
|
+
t.value = ke.getLocalStorage("recentSrc") || [], n.value = ke.getLocalStorage("recentTarget") || [];
|
|
2501
2501
|
}), N(
|
|
2502
2502
|
() => o.src,
|
|
2503
2503
|
(a) => {
|
|
2504
|
-
t.value.includes(a) || (t.value.unshift(a), t.value = t.value.slice(0,
|
|
2504
|
+
t.value.includes(a) || (t.value.unshift(a), t.value = t.value.slice(0, Et), ke.setLocalStorage("recentSrc", t.value));
|
|
2505
2505
|
}
|
|
2506
2506
|
), N(
|
|
2507
2507
|
() => o.target,
|
|
2508
2508
|
(a) => {
|
|
2509
|
-
n.value.includes(a) || (n.value.unshift(a), n.value = n.value.slice(0,
|
|
2509
|
+
n.value.includes(a) || (n.value.unshift(a), n.value = n.value.slice(0, Et), ke.setLocalStorage("recentTarget", n.value));
|
|
2510
2510
|
}
|
|
2511
|
-
), (a, i) => L(o).languages ? (m(), O("div",
|
|
2512
|
-
v("div",
|
|
2511
|
+
), (a, i) => L(o).languages ? (m(), O("div", Mn, [
|
|
2512
|
+
v("div", An, [
|
|
2513
2513
|
v("div", kn, [
|
|
2514
2514
|
B(St, {
|
|
2515
2515
|
modelValue: L(o).src,
|
|
2516
2516
|
"onUpdate:modelValue": i[0] || (i[0] = (s) => L(o).src = s),
|
|
2517
2517
|
languages: L(o).languages.src,
|
|
2518
2518
|
class: "grow"
|
|
2519
|
-
}, null, 8, ["modelValue", "languages"])
|
|
2520
|
-
t.value.length > 0 ? (m(), O("div", An, [
|
|
2521
|
-
(m(!0), O(G, null, te(t.value, (s) => (m(), O("button", {
|
|
2522
|
-
key: s,
|
|
2523
|
-
class: "px-2 py-0.5 bg-baseColor border border-primaryColor text-primaryColor text-xs rounded-full hover:bg-primaryColor hover:text-baseColor transition-colors duration-200",
|
|
2524
|
-
onClick: (r) => L(o).src = s
|
|
2525
|
-
}, K(L(o).languages.src[s]), 9, Vn))), 128))
|
|
2526
|
-
])) : H("", !0)
|
|
2519
|
+
}, null, 8, ["modelValue", "languages"])
|
|
2527
2520
|
]),
|
|
2528
|
-
B(
|
|
2521
|
+
B(Ln, {
|
|
2529
2522
|
isBidirect: L(o).src !== "auto",
|
|
2530
2523
|
class: "grow-0 mx-3 mt-4 self-start",
|
|
2531
2524
|
onSwap: l
|
|
2532
2525
|
}, null, 8, ["isBidirect"]),
|
|
2533
|
-
v("div",
|
|
2526
|
+
v("div", Vn, [
|
|
2534
2527
|
B(St, {
|
|
2535
2528
|
modelValue: L(o).target,
|
|
2536
2529
|
"onUpdate:modelValue": i[1] || (i[1] = (s) => L(o).target = s),
|
|
2537
2530
|
languages: L(o).languages.target,
|
|
2538
2531
|
class: "grow"
|
|
2539
|
-
}, null, 8, ["modelValue", "languages"])
|
|
2540
|
-
|
|
2532
|
+
}, null, 8, ["modelValue", "languages"])
|
|
2533
|
+
])
|
|
2534
|
+
]),
|
|
2535
|
+
v("div", Fn, [
|
|
2536
|
+
v("div", Rn, [
|
|
2537
|
+
t.value.length > 0 ? (m(), O("div", Pn, [
|
|
2538
|
+
(m(!0), O(G, null, te(t.value, (s) => (m(), O("button", {
|
|
2539
|
+
key: s,
|
|
2540
|
+
class: "px-2 py-0.5 bg-baseColor border border-primaryColor text-primaryColor text-xs rounded-full hover:bg-primaryColor hover:text-baseColor transition-colors duration-200",
|
|
2541
|
+
onClick: (r) => L(o).src = s
|
|
2542
|
+
}, K(L(o).languages.src[s]), 9, Dn))), 128))
|
|
2543
|
+
])) : H("", !0)
|
|
2544
|
+
]),
|
|
2545
|
+
v("div", Nn, [
|
|
2546
|
+
n.value.length > 0 ? (m(), O("div", Bn, [
|
|
2541
2547
|
(m(!0), O(G, null, te(n.value, (s) => (m(), O("button", {
|
|
2542
2548
|
key: s,
|
|
2543
2549
|
class: "px-2 py-0.5 bg-baseColor border border-primaryColor text-primaryColor text-xs rounded-full hover:bg-primaryColor hover:text-baseColor transition-colors duration-200",
|
|
2544
2550
|
onClick: (r) => L(o).target = s
|
|
2545
|
-
}, K(L(o).languages.target[s]), 9,
|
|
2551
|
+
}, K(L(o).languages.target[s]), 9, jn))), 128))
|
|
2546
2552
|
])) : H("", !0)
|
|
2547
2553
|
])
|
|
2548
2554
|
])
|
|
2549
2555
|
])) : H("", !0);
|
|
2550
2556
|
}
|
|
2551
|
-
},
|
|
2557
|
+
}, zn = {
|
|
2552
2558
|
INPUT_MAX_LENGTH: 5e3,
|
|
2553
2559
|
INPUT_DEBOUNCE: 500
|
|
2554
2560
|
}, We = (e, o) => {
|
|
@@ -2556,11 +2562,11 @@ const Me = Ue("loader", () => {
|
|
|
2556
2562
|
for (const [n, l] of o)
|
|
2557
2563
|
t[n] = l;
|
|
2558
2564
|
return t;
|
|
2559
|
-
},
|
|
2560
|
-
function
|
|
2561
|
-
return m(), O("span",
|
|
2565
|
+
}, Un = {}, Zn = { class: "mr-2 loading loading-dots loading-xs" };
|
|
2566
|
+
function Wn(e, o) {
|
|
2567
|
+
return m(), O("span", Zn);
|
|
2562
2568
|
}
|
|
2563
|
-
const
|
|
2569
|
+
const c2 = /* @__PURE__ */ We(Un, [["render", Wn]]), d2 = Ue("tts", () => {
|
|
2564
2570
|
const e = $({
|
|
2565
2571
|
src: null,
|
|
2566
2572
|
target: null
|
|
@@ -2584,7 +2590,7 @@ const u2 = /* @__PURE__ */ We(Bn, [["render", Hn]]), c2 = Ue("tts", () => {
|
|
|
2584
2590
|
get: t,
|
|
2585
2591
|
reset: n
|
|
2586
2592
|
};
|
|
2587
|
-
}),
|
|
2593
|
+
}), Gn = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.33325%204.66667H3.51125C3.82693%204.6667%204.13239%204.55473%204.37325%204.35067L6.83392%202.26667C6.99592%202.12953%207.19374%202.04156%207.40407%202.01312C7.61441%201.98468%207.82849%202.01696%208.02109%202.10615C8.21369%202.19534%208.37678%202.33772%208.49114%202.51652C8.60551%202.69532%208.66638%202.90309%208.66659%203.11534V12.8847C8.66649%2013.097%208.60565%2013.305%208.49125%2013.4839C8.37685%2013.6628%208.21367%2013.8053%208.02094%2013.8945C7.82822%2013.9837%207.614%2014.0159%207.40356%2013.9874C7.19312%2013.9588%206.99523%2013.8707%206.83325%2013.7333L4.37325%2011.6487C4.13229%2011.4449%203.82685%2011.3331%203.51125%2011.3333H2.33325C2.06804%2011.3333%201.81368%2011.228%201.62615%2011.0404C1.43861%2010.8529%201.33325%2010.5986%201.33325%2010.3333V5.66667C1.33325%205.40145%201.43861%205.1471%201.62615%204.95956C1.81368%204.77203%202.06804%204.66667%202.33325%204.66667ZM11.1779%2011.18C11.5969%2010.763%2011.9294%2010.2674%2012.1562%209.72156C12.3831%209.17572%2012.4999%208.59044%2012.4999%207.99934C12.4999%207.40823%2012.3831%206.82295%2012.1562%206.27711C11.9294%205.73127%2011.5969%205.23564%2011.1779%204.81867C11.1317%204.77098%2011.0765%204.73297%2011.0155%204.70686C10.9544%204.68075%2010.8888%204.66705%2010.8224%204.66657C10.756%204.66609%2010.6902%204.67883%2010.6288%204.70406C10.5674%204.72929%2010.5116%204.76649%2010.4647%204.8135C10.4179%204.86051%2010.3808%204.91639%2010.3558%204.97787C10.3307%205.03935%2010.3181%205.10521%2010.3188%205.17159C10.3195%205.23798%2010.3334%205.30357%2010.3597%205.36453C10.3859%205.42549%2010.4241%205.48061%2010.4719%205.52667C10.7977%205.85079%2011.0562%206.23609%2011.2326%206.66043C11.409%207.08477%2011.4998%207.53979%2011.4998%207.99934C11.4998%208.45888%2011.409%208.9139%2011.2326%209.33824C11.0562%209.76258%2010.7977%2010.1479%2010.4719%2010.472C10.4241%2010.5181%2010.3859%2010.5732%2010.3597%2010.6341C10.3334%2010.6951%2010.3195%2010.7607%2010.3188%2010.8271C10.3181%2010.8935%2010.3307%2010.9593%2010.3558%2011.0208C10.3808%2011.0823%2010.4179%2011.1382%2010.4647%2011.1852C10.5116%2011.2322%2010.5674%2011.2694%2010.6288%2011.2946C10.6902%2011.3198%2010.756%2011.3326%2010.8224%2011.3321C10.8888%2011.3316%2010.9544%2011.3179%2011.0155%2011.2918C11.0765%2011.2657%2011.1317%2011.2277%2011.1779%2011.18ZM12.7113%2013.2127C12.6123%2013.2126%2012.5157%2013.1832%2012.4335%2013.1281C12.3513%2013.0731%2012.2873%2012.9949%2012.2495%2012.9035C12.2118%2012.8121%2012.202%2012.7115%2012.2214%2012.6146C12.2408%2012.5176%2012.2886%2012.4285%2012.3586%2012.3587C12.9317%2011.7866%2013.3865%2011.1071%2013.6967%2010.359C14.0069%209.61101%2014.1666%208.80915%2014.1666%207.99934C14.1666%207.18952%2014.0069%206.38766%2013.6967%205.63963C13.3865%204.8916%2012.9317%204.2121%2012.3586%203.64C12.3122%203.59351%2012.2754%203.53834%2012.2503%203.47764C12.2252%203.41693%2012.2124%203.35188%2012.2124%203.2862C12.2125%203.22052%2012.2255%203.15549%2012.2507%203.09483C12.2759%203.03417%2012.3128%202.97907%2012.3593%202.93267C12.4057%202.88627%2012.4609%202.84948%2012.5216%202.8244C12.5823%202.79932%2012.6474%202.78645%2012.7131%202.78651C12.7787%202.78657%2012.8438%202.79957%2012.9044%202.82476C12.9651%202.84995%2013.0202%202.88685%2013.0666%202.93334C13.7327%203.59825%2014.2612%204.38801%2014.6218%205.25741C14.9824%206.12681%2015.168%207.05879%2015.168%208C15.168%208.94122%2014.9824%209.87319%2014.6218%2010.7426C14.2612%2011.612%2013.7327%2012.4018%2013.0666%2013.0667C13.02%2013.1134%2012.9646%2013.1504%2012.9036%2013.1756C12.8426%2013.2007%2012.7772%2013.2129%2012.7113%2013.2127Z'%20fill='%233B5695'/%3e%3c/svg%3e", qn = "data:image/svg+xml,%3csvg%20class='swap-on%20fill-current%20h-4%20w-4'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill-rule='evenodd'%20d='M4.5%207.5a3%203%200%200%201%203-3h9a3%203%200%200%201%203%203v9a3%203%200%200%201-3%203h-9a3%203%200%200%201-3-3v-9Z'%20clip-rule='evenodd'%20fill='%238595BE'/%3e%3c/svg%3e", Jn = ["disabled"], Kn = ["src"], Yn = ["src"], Qn = {
|
|
2588
2594
|
__name: "SpeakBtn",
|
|
2589
2595
|
props: {
|
|
2590
2596
|
type: {
|
|
@@ -2595,7 +2601,7 @@ const u2 = /* @__PURE__ */ We(Bn, [["render", Hn]]), c2 = Ue("tts", () => {
|
|
|
2595
2601
|
},
|
|
2596
2602
|
emits: ["loadTTS"],
|
|
2597
2603
|
setup(e, { emit: o }) {
|
|
2598
|
-
const t =
|
|
2604
|
+
const t = d2(), n = e, l = o, a = E(() => t.tts[n.type]), i = $(!1), s = new Audio();
|
|
2599
2605
|
N(
|
|
2600
2606
|
a,
|
|
2601
2607
|
() => {
|
|
@@ -2632,10 +2638,10 @@ const u2 = /* @__PURE__ */ We(Bn, [["render", Hn]]), c2 = Ue("tts", () => {
|
|
|
2632
2638
|
onClick: ft(c, ["prevent"])
|
|
2633
2639
|
}, [
|
|
2634
2640
|
v("img", {
|
|
2635
|
-
src: L(
|
|
2641
|
+
src: L(qn),
|
|
2636
2642
|
alt: "Stop",
|
|
2637
2643
|
class: "w-4 transition-all duration-200"
|
|
2638
|
-
}, null, 8,
|
|
2644
|
+
}, null, 8, Yn)
|
|
2639
2645
|
])) : (m(), O("button", {
|
|
2640
2646
|
key: 0,
|
|
2641
2647
|
class: j(["btn btn-xs btn-circle", [
|
|
@@ -2646,22 +2652,22 @@ const u2 = /* @__PURE__ */ We(Bn, [["render", Hn]]), c2 = Ue("tts", () => {
|
|
|
2646
2652
|
onClick: ft(r, ["prevent"])
|
|
2647
2653
|
}, [
|
|
2648
2654
|
v("img", {
|
|
2649
|
-
src: L(
|
|
2655
|
+
src: L(Gn),
|
|
2650
2656
|
alt: "Play",
|
|
2651
2657
|
class: j(["w-4 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2652
|
-
}, null, 10,
|
|
2653
|
-
], 10,
|
|
2658
|
+
}, null, 10, Kn)
|
|
2659
|
+
], 10, Jn));
|
|
2654
2660
|
}
|
|
2655
|
-
},
|
|
2661
|
+
}, Xn = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.19102%203.19102C3.44571%202.93633%203.85864%202.93633%204.11333%203.19102L12.809%2011.8867C13.0637%2012.1414%2013.0637%2012.5543%2012.809%2012.809C12.5543%2013.0637%2012.1414%2013.0637%2011.8867%2012.809L3.19102%204.11333C2.93633%203.85864%202.93633%203.44571%203.19102%203.19102Z'%20fill='%231A1F2A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.809%203.19102C13.0637%203.44571%2013.0637%203.85864%2012.809%204.11333L4.11333%2012.809C3.85864%2013.0637%203.44571%2013.0637%203.19102%2012.809C2.93633%2012.5543%202.93633%2012.1414%203.19102%2011.8867L11.8867%203.19102C12.1414%202.93633%2012.5543%202.93633%2012.809%203.19102Z'%20fill='%231A1F2A'/%3e%3c/svg%3e", eo = {
|
|
2656
2662
|
class: "tooltip tooltip-bottom tooltip-small 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%] before:!text-xs before:!py-1 before:!px-2",
|
|
2657
2663
|
"data-tip": "Clear"
|
|
2658
|
-
},
|
|
2664
|
+
}, to = ["disabled"], no = ["src"], oo = {
|
|
2659
2665
|
__name: "ClearBtn",
|
|
2660
2666
|
props: {
|
|
2661
2667
|
disabled: Boolean
|
|
2662
2668
|
},
|
|
2663
2669
|
setup(e) {
|
|
2664
|
-
return (o, t) => (m(), O("div",
|
|
2670
|
+
return (o, t) => (m(), O("div", eo, [
|
|
2665
2671
|
v("button", {
|
|
2666
2672
|
class: j(["btn btn-xs btn-circle", [
|
|
2667
2673
|
{ "btn-ghost": !e.disabled },
|
|
@@ -2670,24 +2676,24 @@ const u2 = /* @__PURE__ */ We(Bn, [["render", Hn]]), c2 = Ue("tts", () => {
|
|
|
2670
2676
|
disabled: e.disabled
|
|
2671
2677
|
}, [
|
|
2672
2678
|
v("img", {
|
|
2673
|
-
src: L(
|
|
2679
|
+
src: L(Xn),
|
|
2674
2680
|
alt: "Clear",
|
|
2675
2681
|
class: j(["w-4 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2676
|
-
}, null, 10,
|
|
2677
|
-
], 10,
|
|
2682
|
+
}, null, 10, no)
|
|
2683
|
+
], 10, to)
|
|
2678
2684
|
]));
|
|
2679
2685
|
}
|
|
2680
|
-
},
|
|
2686
|
+
}, lo = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.47207%201.31905C7.57125%201.12371%207.77589%201%208.00001%201C8.22413%201%208.42877%201.12367%208.52795%201.31905L10.3721%204.95175L14.4959%205.53427C14.7177%205.5656%2014.9019%205.7166%2014.9712%205.9238C15.0404%206.13101%2014.9827%206.35843%2014.8222%206.51049L11.8382%209.33816L12.5427%2013.3309C12.5806%2013.5456%2012.4897%2013.7626%2012.3084%2013.8906C12.1272%2014.0187%2011.8868%2014.0356%2011.6884%2013.9342L8.00004%2012.0491L4.31158%2013.9343C4.11323%2014.0356%203.87286%2014.0187%203.69157%2013.8907C3.51028%2013.7627%203.4195%2013.5457%203.45736%2013.3309L4.1618%209.33819L1.17781%206.51052C1.01735%206.35846%200.959571%206.13101%201.02884%205.92383C1.09807%205.71663%201.28232%205.56563%201.50409%205.53431L5.62787%204.95178L7.47207%201.31905Z'%20fill='%23FFC857'/%3e%3c/svg%3e", so = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.9491%205.89315C14.8278%205.53128%2014.5111%205.27252%2014.1226%205.21783L10.5264%204.7114L8.91813%201.55315C8.74435%201.21195%208.39257%201%207.99998%201C7.60739%201%207.25557%201.21195%207.08183%201.55315L5.47358%204.7114L1.8774%205.21783C1.48888%205.27252%201.17219%205.53128%201.05086%205.89315C0.929554%206.25501%201.02881%206.64477%201.30993%206.91038L3.91217%209.36871L3.29786%2012.8399C3.2315%2013.215%203.38755%2013.5868%203.7052%2013.8105C3.88128%2013.9344%204.08938%2014%204.30704%2014C4.47232%2014%204.63705%2013.9606%204.78341%2013.886L7.99995%2012.2471L11.2165%2013.886C11.3628%2013.9606%2011.5276%2014%2011.6929%2014C11.9106%2014%2012.1187%2013.9345%2012.2948%2013.8105C12.6124%2013.5868%2012.7685%2013.215%2012.7021%2012.84L12.0878%209.36871L14.6901%206.91035C14.9712%206.64477%2015.0704%206.25498%2014.9491%205.89315ZM14.0266%206.25082L11.2455%208.87813C11.1335%208.98392%2011.0824%209.13637%2011.1089%209.28575L11.7654%2012.9956C11.7701%2013.0226%2011.759%2013.0493%2011.7362%2013.0653C11.7202%2013.0766%2011.7038%2013.079%2011.6929%2013.079C11.6809%2013.079%2011.6694%2013.0762%2011.6587%2013.0708L8.22108%2011.3192C8.15189%2011.284%208.07593%2011.2663%207.99998%2011.2663C7.92402%2011.2663%207.84807%2011.284%207.77882%2011.3193L4.34118%2013.0708C4.33052%2013.0763%204.31904%2013.079%204.30701%2013.079C4.29611%2013.079%204.27969%2013.0767%204.26373%2013.0654C4.24092%2013.0494%204.22975%2013.0226%204.2345%2012.9957L4.89104%209.28584C4.91747%209.13646%204.86637%208.98401%204.75439%208.87822L1.97327%206.25091C1.95308%206.23184%201.94595%206.20383%201.95466%206.17786C1.9634%206.15185%201.98612%206.13326%202.01405%206.12933L5.85743%205.58807C6.0122%205.56626%206.14599%205.47208%206.21521%205.33616L7.93404%201.9608C7.94653%201.9363%207.97178%201.92107%207.99998%201.92107C8.02818%201.92107%208.05343%201.9363%208.06591%201.9608L9.78468%205.33607C9.85391%205.47199%209.9877%205.5662%2010.1425%205.58799L13.9859%206.12924C14.0138%206.1332%2014.0365%206.15176%2014.0452%206.17777C14.0539%206.20374%2014.0468%206.23175%2014.0266%206.25082Z'%20fill='%231A1F2A'/%3e%3c/svg%3e", ao = {
|
|
2681
2687
|
class: "tooltip tooltip-bottom tooltip-small 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%] before:!text-xs before:!py-1 before:!px-2",
|
|
2682
2688
|
"data-tip": "Favorite"
|
|
2683
|
-
},
|
|
2689
|
+
}, io = ["disabled"], ro = ["src"], uo = {
|
|
2684
2690
|
__name: "FavoriteBtn",
|
|
2685
2691
|
props: {
|
|
2686
2692
|
disabled: Boolean,
|
|
2687
2693
|
isFilled: Boolean
|
|
2688
2694
|
},
|
|
2689
2695
|
setup(e) {
|
|
2690
|
-
return (o, t) => (m(), O("div",
|
|
2696
|
+
return (o, t) => (m(), O("div", ao, [
|
|
2691
2697
|
v("button", {
|
|
2692
2698
|
class: j(["btn btn-xs btn-circle", [
|
|
2693
2699
|
{ "btn-ghost": !e.disabled },
|
|
@@ -2696,24 +2702,24 @@ const u2 = /* @__PURE__ */ We(Bn, [["render", Hn]]), c2 = Ue("tts", () => {
|
|
|
2696
2702
|
disabled: e.disabled
|
|
2697
2703
|
}, [
|
|
2698
2704
|
v("img", {
|
|
2699
|
-
src: e.isFilled ? L(
|
|
2705
|
+
src: e.isFilled ? L(lo) : L(so),
|
|
2700
2706
|
alt: "Favorite",
|
|
2701
2707
|
class: j(["w-4 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2702
|
-
}, null, 10,
|
|
2703
|
-
], 10,
|
|
2708
|
+
}, null, 10, ro)
|
|
2709
|
+
], 10, io)
|
|
2704
2710
|
]));
|
|
2705
2711
|
}
|
|
2706
|
-
},
|
|
2712
|
+
}, co = "data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.8544%203.20309C5.39975%202.89815%204.26277%201.76117%203.95787%200.30649C3.92042%200.12792%203.76292%200%203.58041%200C3.3979%200%203.2404%200.12792%203.20297%200.30652C2.89805%201.76117%201.76107%202.89812%200.306418%203.20302C0.127818%203.24045%20-0.00012207%203.39798%20-0.00012207%203.58046C-0.00012207%203.76295%200.127798%203.92047%200.306418%203.9579C1.76105%204.26285%202.89798%205.3998%203.2029%206.85448C3.24033%207.03307%203.39783%207.16102%203.58034%207.16102C3.76282%207.16102%203.92035%207.0331%203.95778%206.85448C4.26272%205.39983%205.39973%204.26287%206.85438%203.95799C7.03297%203.92056%207.16092%203.76306%207.16092%203.58056C7.1609%203.39805%207.03297%203.24052%206.8544%203.20309ZM3.58036%205.60938C3.14292%204.73132%202.42956%204.01792%201.55151%203.58049C2.42958%203.14305%203.14297%202.42968%203.58041%201.55161C4.01785%202.4297%204.73122%203.14307%205.60926%203.58053C4.73119%204.01797%204.0178%204.73132%203.58036%205.60938Z'%20fill='%23FFC857'/%3e%3cpath%20d='M6.21683%209.574C5.53147%209.4303%204.99578%208.8947%204.85209%208.2093C4.81466%208.0307%204.65716%207.90271%204.47465%207.90271C4.29217%207.90271%204.13464%208.0306%204.09721%208.2092C3.95352%208.8946%203.4178%209.4303%202.73244%209.574C2.55385%209.6114%202.4259%209.7689%202.4259%209.9514C2.4259%2010.1339%202.55383%2010.2914%202.73244%2010.3288C3.41778%2010.4725%203.95349%2011.0082%204.09716%2011.6936C4.13459%2011.8722%204.2921%2012.0002%204.4746%2012.0002C4.65709%2012.0002%204.81461%2011.8723%204.85204%2011.6936C4.99574%2011.0082%205.53145%2010.4725%206.21683%2010.3289C6.39543%2010.2914%206.52337%2010.1339%206.52337%209.9514C6.52337%209.7689%206.39545%209.6114%206.21683%209.574ZM4.47463%2010.6408C4.29163%2010.3688%204.05725%2010.1345%203.78526%209.9515C4.0573%209.7684%204.29163%209.5341%204.47463%209.2621C4.65765%209.5341%204.892%209.7685%205.164%209.9515C4.892%2010.1345%204.65763%2010.3688%204.47463%2010.6408Z'%20fill='%23FFC857'/%3e%3cpath%20d='M11.4271%206.00324C10.5007%205.80904%209.7766%205.08496%209.5825%204.15859C9.545%203.98%209.3875%203.85205%209.205%203.85205C9.0225%203.85205%208.865%203.97995%208.8276%204.15857C8.6334%205.08496%207.90932%205.80902%206.98293%206.0032C6.80434%206.04063%206.67639%206.19815%206.67639%206.38064C6.67639%206.56312%206.80431%206.72062%206.98293%206.75807C7.9093%206.95228%208.6334%207.67633%208.8275%208.6027C8.865%208.7813%209.0225%208.9093%209.205%208.9093C9.3875%208.9093%209.545%208.7814%209.5824%208.6027C9.7766%207.67633%2010.5007%206.95228%2011.4271%206.75812C11.6057%206.72067%2011.7336%206.56317%2011.7336%206.38068C11.7336%206.1982%2011.6057%206.04067%2011.4271%206.00324ZM9.205%207.47681C8.9365%207.02634%208.5593%206.64914%208.1089%206.38066C8.5593%206.11218%208.9365%205.73502%209.205%205.28453C9.4735%205.73502%209.8507%206.11221%2010.3012%206.38068C9.8507%206.64916%209.4735%207.02636%209.205%207.47681Z'%20fill='%23FFC857'/%3e%3ccircle%20cx='3.5'%20cy='3.5'%20r='1.5'%20fill='%23FFC857'/%3e%3cellipse%20cx='4.5'%20cy='10'%20rx='0.5'%20ry='1'%20fill='%23FFC857'/%3e%3cpath%20d='M3.5%201L4.79904%202.5H2.20096L3.5%201Z'%20fill='%23FFC857'/%3e%3cpath%20d='M6%203.5L4.5%204.79904L4.5%202.20096L6%203.5Z'%20fill='%23FFC857'/%3e%3cpath%20d='M10.3697%206.67832L8.22108%207.01422L9.5776%204.65296L10.3697%206.67832Z'%20fill='%23FFC857'/%3e%3cpath%20d='M8.27756%205.34149L10.768%206.00067L9.11199%207.77878L8.27756%205.34149Z'%20fill='%23FFC857'/%3e%3cpath%20d='M1%203.5L2.5%202.20096L2.5%204.79904L1%203.5Z'%20fill='%23FFC857'/%3e%3cpath%20d='M3.5%206L2.20096%204.5L4.79904%204.5L3.5%206Z'%20fill='%23FFC857'/%3e%3ccircle%20cx='9'%20cy='6'%20r='1'%20fill='%23FFC857'/%3e%3cpath%20d='M5.49718%209.92495L4.03391%2010.4693L3.96891%209.60573L5.49718%209.92495Z'%20fill='%23FFC857'/%3e%3cpath%20d='M3.54089%209.71696L5.10212%209.72621L4.857%2010.5568L3.54089%209.71696Z'%20fill='%23FFC857'/%3e%3cpath%20d='M3.50071%209.96247L5.0159%209.58606L4.9834%2010.4515L3.50071%209.96247Z'%20fill='%23FFC857'/%3e%3c/svg%3e", fo = "data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.8544%203.20309C5.39975%202.89815%204.26277%201.76117%203.95787%200.30649C3.92042%200.12792%203.76292%200%203.58041%200C3.3979%200%203.2404%200.12792%203.20297%200.30652C2.89805%201.76117%201.76107%202.89812%200.306418%203.20302C0.127818%203.24045%20-0.00012207%203.39798%20-0.00012207%203.58046C-0.00012207%203.76295%200.127798%203.92047%200.306418%203.9579C1.76105%204.26285%202.89798%205.3998%203.2029%206.85448C3.24033%207.03307%203.39783%207.16102%203.58034%207.16102C3.76282%207.16102%203.92035%207.0331%203.95778%206.85448C4.26272%205.39983%205.39973%204.26287%206.85438%203.95799C7.03297%203.92056%207.16092%203.76306%207.16092%203.58056C7.1609%203.39805%207.03297%203.24052%206.8544%203.20309ZM3.58036%205.60938C3.14292%204.73132%202.42956%204.01792%201.55151%203.58049C2.42958%203.14305%203.14297%202.42968%203.58041%201.55161C4.01785%202.4297%204.73122%203.14307%205.60926%203.58053C4.73119%204.01797%204.0178%204.73132%203.58036%205.60938Z'%20fill='%23FFC857'/%3e%3cpath%20d='M6.21683%209.574C5.53147%209.4303%204.99578%208.8947%204.85209%208.2093C4.81466%208.0307%204.65716%207.90271%204.47465%207.90271C4.29217%207.90271%204.13464%208.0306%204.09721%208.2092C3.95352%208.8946%203.4178%209.4303%202.73244%209.574C2.55385%209.6114%202.4259%209.7689%202.4259%209.9514C2.4259%2010.1339%202.55383%2010.2914%202.73244%2010.3288C3.41778%2010.4725%203.95349%2011.0082%204.09716%2011.6936C4.13459%2011.8722%204.2921%2012.0002%204.4746%2012.0002C4.65709%2012.0002%204.81461%2011.8723%204.85204%2011.6936C4.99574%2011.0082%205.53145%2010.4725%206.21683%2010.3289C6.39543%2010.2914%206.52337%2010.1339%206.52337%209.9514C6.52337%209.7689%206.39545%209.6114%206.21683%209.574ZM4.47463%2010.6408C4.29163%2010.3688%204.05725%2010.1345%203.78526%209.9515C4.0573%209.7684%204.29163%209.5341%204.47463%209.2621C4.65765%209.5341%204.892%209.7685%205.164%209.9515C4.892%2010.1345%204.65763%2010.3688%204.47463%2010.6408Z'%20fill='%23FFC857'/%3e%3cpath%20d='M11.4271%206.00324C10.5007%205.80904%209.7766%205.08496%209.5825%204.15859C9.545%203.98%209.3875%203.85205%209.205%203.85205C9.0225%203.85205%208.865%203.97995%208.8276%204.15857C8.6334%205.08496%207.90932%205.80902%206.98293%206.0032C6.80434%206.04063%206.67639%206.19815%206.67639%206.38064C6.67639%206.56312%206.80431%206.72062%206.98293%206.75807C7.9093%206.95228%208.6334%207.67633%208.8275%208.6027C8.865%208.7813%209.0225%208.9093%209.205%208.9093C9.3875%208.9093%209.545%208.7814%209.5824%208.6027C9.7766%207.67633%2010.5007%206.95228%2011.4271%206.75812C11.6057%206.72067%2011.7336%206.56317%2011.7336%206.38068C11.7336%206.1982%2011.6057%206.04067%2011.4271%206.00324ZM9.205%207.47681C8.9365%207.02634%208.5593%206.64914%208.1089%206.38066C8.5593%206.11218%208.9365%205.73502%209.205%205.28453C9.4735%205.73502%209.8507%206.11221%2010.3012%206.38068C9.8507%206.64916%209.4735%207.02636%209.205%207.47681Z'%20fill='%23FFC857'/%3e%3c/svg%3e", po = {
|
|
2707
2713
|
class: "tooltip tooltip-bottom tooltip-small 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%] before:!text-xs before:!py-1 before:!px-2",
|
|
2708
2714
|
"data-tip": "AI Translate"
|
|
2709
|
-
},
|
|
2715
|
+
}, vo = ["disabled"], ho = ["src"], f2 = {
|
|
2710
2716
|
__name: "AIBtn",
|
|
2711
2717
|
props: {
|
|
2712
2718
|
disabled: Boolean,
|
|
2713
2719
|
isFilled: Boolean
|
|
2714
2720
|
},
|
|
2715
2721
|
setup(e) {
|
|
2716
|
-
return (o, t) => (m(), O("div",
|
|
2722
|
+
return (o, t) => (m(), O("div", po, [
|
|
2717
2723
|
v("button", {
|
|
2718
2724
|
class: j(["btn btn-xs btn-circle", [
|
|
2719
2725
|
{ "btn-ghost": !e.disabled },
|
|
@@ -2722,14 +2728,14 @@ const u2 = /* @__PURE__ */ We(Bn, [["render", Hn]]), c2 = Ue("tts", () => {
|
|
|
2722
2728
|
disabled: e.disabled
|
|
2723
2729
|
}, [
|
|
2724
2730
|
v("img", {
|
|
2725
|
-
src: e.isFilled ? L(
|
|
2731
|
+
src: e.isFilled ? L(co) : L(fo),
|
|
2726
2732
|
alt: "AI",
|
|
2727
2733
|
class: j(["w-4 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2728
|
-
}, null, 10,
|
|
2729
|
-
], 10,
|
|
2734
|
+
}, null, 10, ho)
|
|
2735
|
+
], 10, vo)
|
|
2730
2736
|
]));
|
|
2731
2737
|
}
|
|
2732
|
-
},
|
|
2738
|
+
}, mo = "data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%200%2014%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.9023%203.26667L10.8093%200.1C10.7767%200.0666667%2010.7116%200%2010.5814%200H3.74419C3.12558%200%202.60465%200.533333%202.60465%201.16667V2.66667H1.13953C0.52093%202.66667%200%203.2%200%203.83333V14.8667C0%2015.4667%200.52093%2016%201.13953%2016H10.2558C10.8744%2016%2011.3953%2015.4667%2011.3953%2014.8333V13.3333H12.8605C13.4791%2013.3333%2014%2012.8%2014%2012.1667V3.5C14%203.4%2013.9674%203.3%2013.9023%203.26667ZM12.893%203.16667H11.3954C11.1349%203.16667%2010.907%202.93333%2010.907%202.66667V1.13333L12.893%203.16667ZM10.2558%2015.3333H1.13953C0.87907%2015.3333%200.651163%2015.1%200.651163%2014.8333V3.83333C0.651163%203.53333%200.87907%203.33333%201.13953%203.33333H7.68372V5.33333C7.68372%205.96667%208.20465%206.5%208.82326%206.5H10.7767V14.8667C10.7442%2015.1%2010.5488%2015.3333%2010.2558%2015.3333ZM9.31163%204.8L10.2884%205.8H8.7907C8.53023%205.8%208.30233%205.56667%208.30233%205.3V3.76667L9.31163%204.8ZM12.8605%2012.6667H11.3953V6.13333C11.3953%206.06667%2011.3628%205.96667%2011.2977%205.9L8.20465%202.73333C8.17209%202.7%208.07442%202.66667%208.0093%202.66667H3.25581V1.16667C3.25581%200.9%203.45116%200.666666%203.74419%200.666666H10.2558V2.66667C10.2558%203.3%2010.7767%203.83333%2011.3954%203.83333H13.3488V12.2C13.3488%2012.4667%2013.1209%2012.6667%2012.8605%2012.6667Z'%20fill='%231A1F2A'/%3e%3c/svg%3e", bo = ["data-tip"], go = ["disabled"], Co = ["src"], xo = {
|
|
2733
2739
|
__name: "CopyBtn",
|
|
2734
2740
|
props: {
|
|
2735
2741
|
disabled: Boolean
|
|
@@ -2753,17 +2759,17 @@ const u2 = /* @__PURE__ */ We(Bn, [["render", Hn]]), c2 = Ue("tts", () => {
|
|
|
2753
2759
|
onClick: t
|
|
2754
2760
|
}, [
|
|
2755
2761
|
v("img", {
|
|
2756
|
-
src: L(
|
|
2762
|
+
src: L(mo),
|
|
2757
2763
|
alt: "Copy",
|
|
2758
2764
|
class: j(["w-3 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2759
|
-
}, null, 10,
|
|
2760
|
-
], 10,
|
|
2761
|
-
], 8,
|
|
2765
|
+
}, null, 10, Co)
|
|
2766
|
+
], 10, go)
|
|
2767
|
+
], 8, bo));
|
|
2762
2768
|
}
|
|
2763
|
-
},
|
|
2769
|
+
}, yo = { class: "flex flex-row px-2 pr-10 pt-1 items-center bg-transparent relative" }, wo = { class: "ml-1 text-sm text-gray-600" }, _o = {
|
|
2764
2770
|
key: 0,
|
|
2765
2771
|
class: "italic"
|
|
2766
|
-
},
|
|
2772
|
+
}, So = { class: "absolute right-1 top-1 flex flex-col items-center gap-0" }, Eo = {
|
|
2767
2773
|
__name: "TranslationBtnGroup",
|
|
2768
2774
|
props: {
|
|
2769
2775
|
loading: {
|
|
@@ -2823,39 +2829,39 @@ const u2 = /* @__PURE__ */ We(Bn, [["render", Hn]]), c2 = Ue("tts", () => {
|
|
|
2823
2829
|
emits: ["clear", "favorite", "loadTTS", "aiTranslate", "copy"],
|
|
2824
2830
|
setup(e, { emit: o }) {
|
|
2825
2831
|
const t = e, n = o;
|
|
2826
|
-
return (l, a) => (m(), O("div",
|
|
2827
|
-
t.src ? (m(), q(
|
|
2832
|
+
return (l, a) => (m(), O("div", yo, [
|
|
2833
|
+
t.src ? (m(), q(Qn, {
|
|
2828
2834
|
key: 0,
|
|
2829
2835
|
type: t.type,
|
|
2830
2836
|
onLoadTTS: a[0] || (a[0] = (i) => n("loadTTS"))
|
|
2831
2837
|
}, null, 8, ["type"])) : H("", !0),
|
|
2832
|
-
v("div",
|
|
2833
|
-
|
|
2834
|
-
e.phonetic ? (m(), O("span",
|
|
2838
|
+
v("div", wo, [
|
|
2839
|
+
x2(K(e.srcLabel) + " ", 1),
|
|
2840
|
+
e.phonetic ? (m(), O("span", _o, "- [" + K(t.phonetic) + "]", 1)) : H("", !0)
|
|
2835
2841
|
]),
|
|
2836
|
-
t.loading ? (m(), q(
|
|
2842
|
+
t.loading ? (m(), q(c2, {
|
|
2837
2843
|
key: 1,
|
|
2838
2844
|
class: "absolute right-6 top-2"
|
|
2839
2845
|
})) : H("", !0),
|
|
2840
|
-
v("div",
|
|
2841
|
-
e.hasClearBtn && e.src ? (m(), q(
|
|
2846
|
+
v("div", So, [
|
|
2847
|
+
e.hasClearBtn && e.src ? (m(), q(oo, {
|
|
2842
2848
|
key: 0,
|
|
2843
2849
|
onClick: a[1] || (a[1] = (i) => n("clear")),
|
|
2844
2850
|
disabled: e.loading
|
|
2845
2851
|
}, null, 8, ["disabled"])) : H("", !0),
|
|
2846
|
-
e.src && !e.hasDictionary && e.hasAIBtn ? (m(), q(
|
|
2852
|
+
e.src && !e.hasDictionary && e.hasAIBtn ? (m(), q(f2, {
|
|
2847
2853
|
key: 1,
|
|
2848
2854
|
isFilled: e.isAITranslate,
|
|
2849
2855
|
onClick: a[2] || (a[2] = (i) => n("aiTranslate")),
|
|
2850
2856
|
disabled: e.loading
|
|
2851
2857
|
}, null, 8, ["isFilled", "disabled"])) : H("", !0),
|
|
2852
|
-
e.src && e.hasFavoriteBtn ? (m(), q(
|
|
2858
|
+
e.src && e.hasFavoriteBtn ? (m(), q(uo, {
|
|
2853
2859
|
key: 2,
|
|
2854
2860
|
isFilled: e.isFavorite,
|
|
2855
2861
|
onClick: a[3] || (a[3] = (i) => n("favorite")),
|
|
2856
2862
|
disabled: e.loading
|
|
2857
2863
|
}, null, 8, ["isFilled", "disabled"])) : H("", !0),
|
|
2858
|
-
e.src && e.hasCopyBtn ? (m(), q(
|
|
2864
|
+
e.src && e.hasCopyBtn ? (m(), q(xo, {
|
|
2859
2865
|
key: 3,
|
|
2860
2866
|
onClick: a[4] || (a[4] = (i) => n("copy")),
|
|
2861
2867
|
disabled: e.loading
|
|
@@ -2863,7 +2869,7 @@ const u2 = /* @__PURE__ */ We(Bn, [["render", Hn]]), c2 = Ue("tts", () => {
|
|
|
2863
2869
|
])
|
|
2864
2870
|
]));
|
|
2865
2871
|
}
|
|
2866
|
-
},
|
|
2872
|
+
}, p2 = /* @__PURE__ */ We(Eo, [["__scopeId", "data-v-c9ef8858"]]), be = Ue("translation", () => {
|
|
2867
2873
|
const e = $(null), o = $(null), t = $(null), n = $({
|
|
2868
2874
|
src: null,
|
|
2869
2875
|
target: null
|
|
@@ -2900,17 +2906,17 @@ const u2 = /* @__PURE__ */ We(Bn, [["render", Hn]]), c2 = Ue("tts", () => {
|
|
|
2900
2906
|
reset: b
|
|
2901
2907
|
};
|
|
2902
2908
|
});
|
|
2903
|
-
function
|
|
2909
|
+
function Oo(e) {
|
|
2904
2910
|
return kt() ? (nt(e), !0) : !1;
|
|
2905
2911
|
}
|
|
2906
2912
|
function je(e) {
|
|
2907
2913
|
return typeof e == "function" ? e() : L(e);
|
|
2908
2914
|
}
|
|
2909
|
-
const
|
|
2915
|
+
const $o = typeof window < "u" && typeof document < "u";
|
|
2910
2916
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
2911
|
-
const
|
|
2917
|
+
const Ot = () => {
|
|
2912
2918
|
};
|
|
2913
|
-
function
|
|
2919
|
+
function Io(e, o) {
|
|
2914
2920
|
function t(...n) {
|
|
2915
2921
|
return new Promise((l, a) => {
|
|
2916
2922
|
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(l).catch(a);
|
|
@@ -2918,10 +2924,10 @@ function So(e, o) {
|
|
|
2918
2924
|
}
|
|
2919
2925
|
return t;
|
|
2920
2926
|
}
|
|
2921
|
-
function
|
|
2922
|
-
let t, n, l =
|
|
2927
|
+
function To(e, o = {}) {
|
|
2928
|
+
let t, n, l = Ot;
|
|
2923
2929
|
const a = (s) => {
|
|
2924
|
-
clearTimeout(s), l(), l =
|
|
2930
|
+
clearTimeout(s), l(), l = Ot;
|
|
2925
2931
|
};
|
|
2926
2932
|
return (s) => {
|
|
2927
2933
|
const r = je(e), u = je(o.maxWait);
|
|
@@ -2934,34 +2940,34 @@ function Eo(e, o = {}) {
|
|
|
2934
2940
|
});
|
|
2935
2941
|
};
|
|
2936
2942
|
}
|
|
2937
|
-
function
|
|
2938
|
-
return
|
|
2939
|
-
|
|
2943
|
+
function Lo(e, o = 200, t = {}) {
|
|
2944
|
+
return Io(
|
|
2945
|
+
To(o, t),
|
|
2940
2946
|
e
|
|
2941
2947
|
);
|
|
2942
2948
|
}
|
|
2943
|
-
function
|
|
2949
|
+
function $t(e) {
|
|
2944
2950
|
var o;
|
|
2945
2951
|
const t = je(e);
|
|
2946
2952
|
return (o = t == null ? void 0 : t.$el) != null ? o : t;
|
|
2947
2953
|
}
|
|
2948
|
-
const
|
|
2949
|
-
function
|
|
2950
|
-
const e = $(!1), o =
|
|
2954
|
+
const Mo = $o ? window : void 0;
|
|
2955
|
+
function Ao() {
|
|
2956
|
+
const e = $(!1), o = At();
|
|
2951
2957
|
return o && ve(() => {
|
|
2952
2958
|
e.value = !0;
|
|
2953
2959
|
}, o), e;
|
|
2954
2960
|
}
|
|
2955
|
-
function
|
|
2956
|
-
const o =
|
|
2961
|
+
function ko(e) {
|
|
2962
|
+
const o = Ao();
|
|
2957
2963
|
return E(() => (o.value, !!e()));
|
|
2958
2964
|
}
|
|
2959
|
-
function
|
|
2960
|
-
const { window: n =
|
|
2965
|
+
function Vo(e, o, t = {}) {
|
|
2966
|
+
const { window: n = Mo, ...l } = t;
|
|
2961
2967
|
let a;
|
|
2962
|
-
const i =
|
|
2968
|
+
const i = ko(() => n && "ResizeObserver" in n), s = () => {
|
|
2963
2969
|
a && (a.disconnect(), a = void 0);
|
|
2964
|
-
}, r = E(() => Array.isArray(e) ? e.map((p) =>
|
|
2970
|
+
}, r = E(() => Array.isArray(e) ? e.map((p) => $t(p)) : [$t(e)]), u = N(
|
|
2965
2971
|
r,
|
|
2966
2972
|
(p) => {
|
|
2967
2973
|
if (s(), i.value && n) {
|
|
@@ -2974,12 +2980,12 @@ function Lo(e, o, t = {}) {
|
|
|
2974
2980
|
), c = () => {
|
|
2975
2981
|
s(), u();
|
|
2976
2982
|
};
|
|
2977
|
-
return
|
|
2983
|
+
return Oo(c), {
|
|
2978
2984
|
isSupported: i,
|
|
2979
2985
|
stop: c
|
|
2980
2986
|
};
|
|
2981
2987
|
}
|
|
2982
|
-
function
|
|
2988
|
+
function v2(e) {
|
|
2983
2989
|
var o;
|
|
2984
2990
|
const t = $(e == null ? void 0 : e.element), n = $(e == null ? void 0 : e.input), l = (o = e == null ? void 0 : e.styleProp) != null ? o : "height", a = $(1);
|
|
2985
2991
|
function i() {
|
|
@@ -2992,13 +2998,13 @@ function p2(e) {
|
|
|
2992
2998
|
return N([n, t], () => oe(i), { immediate: !0 }), N(a, () => {
|
|
2993
2999
|
var s;
|
|
2994
3000
|
return (s = e == null ? void 0 : e.onResize) == null ? void 0 : s.call(e);
|
|
2995
|
-
}),
|
|
3001
|
+
}), Vo(t, () => i()), e != null && e.watch && N(e.watch, i, { immediate: !0, deep: !0 }), {
|
|
2996
3002
|
textarea: t,
|
|
2997
3003
|
input: n,
|
|
2998
3004
|
triggerResize: i
|
|
2999
3005
|
};
|
|
3000
3006
|
}
|
|
3001
|
-
const
|
|
3007
|
+
const Fo = { class: "bg-white relative z-10 border rounded-md" }, Ro = {
|
|
3002
3008
|
__name: "TranslationInput",
|
|
3003
3009
|
props: {
|
|
3004
3010
|
text: {
|
|
@@ -3011,9 +3017,9 @@ const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
|
3011
3017
|
const t = be(), n = e, l = $(""), a = E(() => t.src), i = E(() => t.srcLabel), s = E(() => {
|
|
3012
3018
|
var b;
|
|
3013
3019
|
return (b = t.phonetic) == null ? void 0 : b.src;
|
|
3014
|
-
}), { textarea: r } =
|
|
3020
|
+
}), { textarea: r } = v2({ input: l, styleProp: "minHeight" }), u = o, c = Lo(() => {
|
|
3015
3021
|
u("change", l.value);
|
|
3016
|
-
},
|
|
3022
|
+
}, zn.INPUT_DEBOUNCE);
|
|
3017
3023
|
function p() {
|
|
3018
3024
|
if (!l.value) {
|
|
3019
3025
|
g();
|
|
@@ -3032,8 +3038,8 @@ const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
|
3032
3038
|
(b) => {
|
|
3033
3039
|
l.value !== b && w(), l.value = b;
|
|
3034
3040
|
}
|
|
3035
|
-
), (b, _) => (m(), O("div",
|
|
3036
|
-
B(
|
|
3041
|
+
), (b, _) => (m(), O("div", Fo, [
|
|
3042
|
+
B(p2, {
|
|
3037
3043
|
src: a.value,
|
|
3038
3044
|
srcLabel: i.value,
|
|
3039
3045
|
type: "src",
|
|
@@ -3043,7 +3049,7 @@ const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
|
3043
3049
|
onLoadTTS: _[0] || (_[0] = (R) => u("loadTTS")),
|
|
3044
3050
|
class: "mb-2"
|
|
3045
3051
|
}, null, 8, ["src", "srcLabel", "phonetic"]),
|
|
3046
|
-
|
|
3052
|
+
Vt(v("textarea", {
|
|
3047
3053
|
ref_key: "textarea",
|
|
3048
3054
|
ref: r,
|
|
3049
3055
|
"onUpdate:modelValue": _[1] || (_[1] = (R) => l.value = R),
|
|
@@ -3054,7 +3060,7 @@ const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
|
3054
3060
|
onFocus: w
|
|
3055
3061
|
}, null, 544), [
|
|
3056
3062
|
[
|
|
3057
|
-
|
|
3063
|
+
Ft,
|
|
3058
3064
|
l.value,
|
|
3059
3065
|
void 0,
|
|
3060
3066
|
{ trim: !0 }
|
|
@@ -3062,10 +3068,10 @@ const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
|
3062
3068
|
])
|
|
3063
3069
|
]));
|
|
3064
3070
|
}
|
|
3065
|
-
},
|
|
3071
|
+
}, Po = /* @__PURE__ */ We(Ro, [["__scopeId", "data-v-3d7638d0"]]), Do = (e) => (y2("data-v-7c33874e"), e = e(), w2(), e), No = { class: "bg-white relative z-10 rounded-md h-full" }, Bo = { class: "bg-transparent" }, jo = {
|
|
3066
3072
|
key: 0,
|
|
3067
3073
|
class: "w-full flex items-center justify-end absolute -bottom-8 left-2 right-0 px-2 z-20"
|
|
3068
|
-
},
|
|
3074
|
+
}, Ho = /* @__PURE__ */ Do(() => /* @__PURE__ */ v("span", { class: "text-sm text-gray-600" }, " Powered by Ddict AI ", -1)), zo = {
|
|
3069
3075
|
__name: "TranslationResult",
|
|
3070
3076
|
props: {
|
|
3071
3077
|
isFavoriteFeatureEnabled: Boolean,
|
|
@@ -3081,7 +3087,7 @@ const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
|
3081
3087
|
}), s = E(() => {
|
|
3082
3088
|
var w;
|
|
3083
3089
|
return !!((w = t.dictionary) != null && w.length);
|
|
3084
|
-
}), r = Me(), u = E(() => r.isLoading("translation")), { textarea: c, input: p } =
|
|
3090
|
+
}), r = Me(), u = E(() => r.isLoading("translation")), { textarea: c, input: p } = v2({ input: n, styleProp: "minHeight" }), g = o;
|
|
3085
3091
|
return (w, b) => (m(), O("div", {
|
|
3086
3092
|
class: j([
|
|
3087
3093
|
"relative p-0.5 transition-all duration-300 ease-in-out bg-[length:300%_300%] bg-[position:0%_50%] border rounded-lg",
|
|
@@ -3090,8 +3096,8 @@ const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
|
3090
3096
|
}
|
|
3091
3097
|
])
|
|
3092
3098
|
}, [
|
|
3093
|
-
v("div",
|
|
3094
|
-
B(
|
|
3099
|
+
v("div", No, [
|
|
3100
|
+
B(p2, {
|
|
3095
3101
|
loading: u.value,
|
|
3096
3102
|
src: l.value,
|
|
3097
3103
|
srcLabel: a.value,
|
|
@@ -3109,8 +3115,8 @@ const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
|
3109
3115
|
onCopy: b[3] || (b[3] = (_) => g("copy")),
|
|
3110
3116
|
class: "mb-2"
|
|
3111
3117
|
}, null, 8, ["loading", "src", "srcLabel", "hasFavoriteBtn", "hasAIBtn", "isFavorite", "isAITranslate", "hasDictionary", "phonetic"]),
|
|
3112
|
-
v("div",
|
|
3113
|
-
|
|
3118
|
+
v("div", Bo, [
|
|
3119
|
+
Vt(v("textarea", {
|
|
3114
3120
|
ref_key: "textarea",
|
|
3115
3121
|
ref: c,
|
|
3116
3122
|
"onUpdate:modelValue": b[4] || (b[4] = (_) => ye(p) ? p.value = _ : null),
|
|
@@ -3119,37 +3125,37 @@ const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
|
3119
3125
|
rows: "2",
|
|
3120
3126
|
spellcheck: "false"
|
|
3121
3127
|
}, null, 512), [
|
|
3122
|
-
[
|
|
3128
|
+
[Ft, L(p)]
|
|
3123
3129
|
])
|
|
3124
3130
|
])
|
|
3125
3131
|
]),
|
|
3126
|
-
e.isAITranslate ? (m(), O("div",
|
|
3127
|
-
|
|
3128
|
-
B(
|
|
3132
|
+
e.isAITranslate ? (m(), O("div", jo, [
|
|
3133
|
+
Ho,
|
|
3134
|
+
B(f2, {
|
|
3129
3135
|
disabled: "",
|
|
3130
3136
|
isFilled: ""
|
|
3131
3137
|
})
|
|
3132
3138
|
])) : H("", !0)
|
|
3133
3139
|
], 2));
|
|
3134
3140
|
}
|
|
3135
|
-
},
|
|
3141
|
+
}, Uo = /* @__PURE__ */ We(zo, [["__scopeId", "data-v-7c33874e"]]), Zo = { class: "btn btn-sm btn-circle btn-ghost" }, Ge = {
|
|
3136
3142
|
__name: "ToggleBtn",
|
|
3137
3143
|
props: {
|
|
3138
3144
|
isExpanded: Boolean
|
|
3139
3145
|
},
|
|
3140
3146
|
setup(e) {
|
|
3141
3147
|
const o = e;
|
|
3142
|
-
return (t, n) => (m(), O("button",
|
|
3143
|
-
o.isExpanded ? (m(), q(L(
|
|
3148
|
+
return (t, n) => (m(), O("button", Zo, [
|
|
3149
|
+
o.isExpanded ? (m(), q(L(q0), {
|
|
3144
3150
|
key: 0,
|
|
3145
3151
|
class: "w-7 text-gray-400"
|
|
3146
|
-
})) : (m(), q(L(
|
|
3152
|
+
})) : (m(), q(L(W0), {
|
|
3147
3153
|
key: 1,
|
|
3148
3154
|
class: "w-7 text-gray-400"
|
|
3149
3155
|
}))
|
|
3150
3156
|
]));
|
|
3151
3157
|
}
|
|
3152
|
-
},
|
|
3158
|
+
}, Wo = { class: "card border bg-white rounded-lg" }, Go = { class: "card-body px-4 py-2 gap-0" }, qo = { class: "flex justify-between items-center" }, Jo = /* @__PURE__ */ v("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Translations", -1), Ko = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, Yo = { class: "list-none list-inside" }, Qo = ["onClick"], Xo = { class: "text-base font-normal text-gray-800 leading-4" }, el = {
|
|
3153
3159
|
__name: "Dictionary",
|
|
3154
3160
|
emits: ["translate"],
|
|
3155
3161
|
setup(e, { emit: o }) {
|
|
@@ -3158,10 +3164,10 @@ const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
|
3158
3164
|
}, r = (u) => {
|
|
3159
3165
|
i("translate", u, n.target, n.src), l.src = n.target, l.target = n.src, window.scrollTo(0, 0);
|
|
3160
3166
|
};
|
|
3161
|
-
return (u, c) => (m(), O("div",
|
|
3162
|
-
v("div",
|
|
3163
|
-
v("div",
|
|
3164
|
-
|
|
3167
|
+
return (u, c) => (m(), O("div", Wo, [
|
|
3168
|
+
v("div", Go, [
|
|
3169
|
+
v("div", qo, [
|
|
3170
|
+
Jo,
|
|
3165
3171
|
B(Ge, {
|
|
3166
3172
|
isExpanded: t.value,
|
|
3167
3173
|
onClick: s
|
|
@@ -3175,16 +3181,16 @@ const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
|
3175
3181
|
key: `${p.pos}-${g}`,
|
|
3176
3182
|
class: "mb-2"
|
|
3177
3183
|
}, [
|
|
3178
|
-
v("h5",
|
|
3179
|
-
v("ul",
|
|
3184
|
+
v("h5", Ko, K(p.pos), 1),
|
|
3185
|
+
v("ul", Yo, [
|
|
3180
3186
|
(m(!0), O(G, null, te(p.items, (w, b) => (m(), O("li", {
|
|
3181
3187
|
key: `${w.word}-${b}`
|
|
3182
3188
|
}, [
|
|
3183
3189
|
v("span", {
|
|
3184
3190
|
class: "p-3 m-0.5 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
3185
3191
|
onClick: (_) => r(w.word)
|
|
3186
|
-
}, K(w.word), 9,
|
|
3187
|
-
v("small",
|
|
3192
|
+
}, K(w.word), 9, Qo),
|
|
3193
|
+
v("small", Xo, " - " + K(w.reverse_translation.join(", ")), 1)
|
|
3188
3194
|
]))), 128))
|
|
3189
3195
|
])
|
|
3190
3196
|
]))), 128))
|
|
@@ -3193,19 +3199,19 @@ const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
|
3193
3199
|
])
|
|
3194
3200
|
]));
|
|
3195
3201
|
}
|
|
3196
|
-
},
|
|
3202
|
+
}, tl = { class: "card border bg-white rounded-lg" }, nl = { class: "card-body px-4 py-2 gap-0" }, ol = { class: "flex justify-between items-center" }, ll = /* @__PURE__ */ v("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Definitions", -1), sl = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, al = { class: "text-base text-textCustom list-decimal list-outside ml-5" }, il = /* @__PURE__ */ v("br", null, null, -1), rl = {
|
|
3197
3203
|
key: 0,
|
|
3198
3204
|
class: "italic"
|
|
3199
|
-
},
|
|
3205
|
+
}, ul = {
|
|
3200
3206
|
__name: "Definition",
|
|
3201
3207
|
setup(e) {
|
|
3202
3208
|
const o = $(!0), t = be(), n = E(() => t.definitions), l = () => {
|
|
3203
3209
|
o.value = !o.value;
|
|
3204
3210
|
};
|
|
3205
|
-
return (a, i) => (m(), O("div",
|
|
3206
|
-
v("div",
|
|
3207
|
-
v("div",
|
|
3208
|
-
|
|
3211
|
+
return (a, i) => (m(), O("div", tl, [
|
|
3212
|
+
v("div", nl, [
|
|
3213
|
+
v("div", ol, [
|
|
3214
|
+
ll,
|
|
3209
3215
|
B(Ge, {
|
|
3210
3216
|
isExpanded: o.value,
|
|
3211
3217
|
onClick: l
|
|
@@ -3219,15 +3225,15 @@ const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
|
3219
3225
|
key: `${s.pos}-${r}`,
|
|
3220
3226
|
class: "mb-2"
|
|
3221
3227
|
}, [
|
|
3222
|
-
v("h5",
|
|
3223
|
-
v("ul",
|
|
3228
|
+
v("h5", sl, K(s.pos), 1),
|
|
3229
|
+
v("ul", al, [
|
|
3224
3230
|
(m(!0), O(G, null, te(s.items, (u, c) => (m(), O("li", {
|
|
3225
3231
|
key: `${u.gloss}-${c}`,
|
|
3226
3232
|
class: "mb-1"
|
|
3227
3233
|
}, [
|
|
3228
3234
|
v("span", null, K(u.gloss), 1),
|
|
3229
|
-
|
|
3230
|
-
u.example ? (m(), O("small",
|
|
3235
|
+
il,
|
|
3236
|
+
u.example ? (m(), O("small", rl, '"' + K(u.example) + '"', 1)) : H("", !0)
|
|
3231
3237
|
]))), 128))
|
|
3232
3238
|
])
|
|
3233
3239
|
]))), 128))
|
|
@@ -3236,16 +3242,16 @@ const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
|
3236
3242
|
])
|
|
3237
3243
|
]));
|
|
3238
3244
|
}
|
|
3239
|
-
},
|
|
3245
|
+
}, cl = { class: "card border bg-white rounded-lg" }, dl = { class: "card-body px-4 py-2 gap-0" }, fl = { class: "flex justify-between items-center" }, pl = /* @__PURE__ */ v("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Examples", -1), vl = { class: "text-textCustom list-decimal list-outside ml-7 my-2" }, hl = ["innerHTML"], ml = {
|
|
3240
3246
|
__name: "Example",
|
|
3241
3247
|
setup(e) {
|
|
3242
3248
|
const o = $(!0), t = be(), n = E(() => t.examples), l = () => {
|
|
3243
3249
|
o.value = !o.value;
|
|
3244
3250
|
};
|
|
3245
|
-
return (a, i) => (m(), O("div",
|
|
3246
|
-
v("div",
|
|
3247
|
-
v("div",
|
|
3248
|
-
|
|
3251
|
+
return (a, i) => (m(), O("div", cl, [
|
|
3252
|
+
v("div", dl, [
|
|
3253
|
+
v("div", fl, [
|
|
3254
|
+
pl,
|
|
3249
3255
|
B(Ge, {
|
|
3250
3256
|
isExpanded: o.value,
|
|
3251
3257
|
onClick: l
|
|
@@ -3254,17 +3260,17 @@ const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
|
3254
3260
|
v("div", {
|
|
3255
3261
|
class: j(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3256
3262
|
}, [
|
|
3257
|
-
v("ul",
|
|
3263
|
+
v("ul", vl, [
|
|
3258
3264
|
(m(!0), O(G, null, te(n.value, (s, r) => (m(), O("li", {
|
|
3259
3265
|
key: `${s.definition_id}-${r}`,
|
|
3260
3266
|
innerHTML: s
|
|
3261
|
-
}, null, 8,
|
|
3267
|
+
}, null, 8, hl))), 128))
|
|
3262
3268
|
])
|
|
3263
3269
|
], 2)
|
|
3264
3270
|
])
|
|
3265
3271
|
]));
|
|
3266
3272
|
}
|
|
3267
|
-
},
|
|
3273
|
+
}, bl = { class: "card border bg-white rounded-lg" }, gl = { class: "card-body px-4 py-2 gap-0" }, Cl = { class: "flex justify-between items-center" }, xl = /* @__PURE__ */ v("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Synonyms", -1), yl = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, wl = { class: "list-none list-inside" }, _l = { class: "flex flex-wrap" }, Sl = ["onClick"], El = {
|
|
3268
3274
|
__name: "Synonyms",
|
|
3269
3275
|
emits: ["translate"],
|
|
3270
3276
|
setup(e, { emit: o }) {
|
|
@@ -3273,10 +3279,10 @@ const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
|
3273
3279
|
}, s = (r) => {
|
|
3274
3280
|
a("translate", r), window.scrollTo(0, 0);
|
|
3275
3281
|
};
|
|
3276
|
-
return (r, u) => (m(), O("div",
|
|
3277
|
-
v("div",
|
|
3278
|
-
v("div",
|
|
3279
|
-
|
|
3282
|
+
return (r, u) => (m(), O("div", bl, [
|
|
3283
|
+
v("div", gl, [
|
|
3284
|
+
v("div", Cl, [
|
|
3285
|
+
xl,
|
|
3280
3286
|
B(Ge, {
|
|
3281
3287
|
isExpanded: t.value,
|
|
3282
3288
|
onClick: i
|
|
@@ -3290,18 +3296,18 @@ const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
|
3290
3296
|
key: `${c.pos}-${p}`,
|
|
3291
3297
|
class: "mb-2"
|
|
3292
3298
|
}, [
|
|
3293
|
-
v("h5",
|
|
3294
|
-
v("ul",
|
|
3299
|
+
v("h5", yl, K(c.pos), 1),
|
|
3300
|
+
v("ul", wl, [
|
|
3295
3301
|
(m(!0), O(G, null, te(c.items, (g, w) => (m(), O("li", {
|
|
3296
3302
|
key: `${g.word}-${w}`,
|
|
3297
3303
|
class: "mb-2"
|
|
3298
3304
|
}, [
|
|
3299
|
-
v("div",
|
|
3305
|
+
v("div", _l, [
|
|
3300
3306
|
(m(!0), O(G, null, te(g.synonym, (b, _) => (m(), O("span", {
|
|
3301
3307
|
key: `${b}-${_}`,
|
|
3302
3308
|
class: "p-3 m-0.5 ml-0 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
3303
3309
|
onClick: (R) => s(b)
|
|
3304
|
-
}, K(b), 9,
|
|
3310
|
+
}, K(b), 9, Sl))), 128))
|
|
3305
3311
|
])
|
|
3306
3312
|
]))), 128))
|
|
3307
3313
|
])
|
|
@@ -3311,7 +3317,7 @@ const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
|
3311
3317
|
])
|
|
3312
3318
|
]));
|
|
3313
3319
|
}
|
|
3314
|
-
},
|
|
3320
|
+
}, Ol = "data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%3e%3cpath%20fill='%23FFC857'%20d='M12%207a5%205%200%200%200-2%209.584V19h4v-2.416A5.001%205.001%200%200%200%2012%207z'/%3e%3cpath%20stroke='%23FFC857'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='M21%2012h1m-3.5-6.5%201-1M12%203V2M5.5%205.5l-1-1M3%2012H2m8%2010h4m3-10a5%205%200%201%200-7%204.584V19h4v-2.416A5.001%205.001%200%200%200%2017%2012z'/%3e%3c/svg%3e", $l = "data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%3e%3cpath%20stroke='%23FFC857'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='M21%2012h1m-3.5-6.5%201-1M12%203V2M5.5%205.5l-1-1M3%2012H2m8%2010h4m3-10a5%205%200%201%200-7%204.584V19h4v-2.416A5.001%205.001%200%200%200%2017%2012z'/%3e%3c/svg%3e", Il = ["disabled"], Tl = ["src"], Ll = {
|
|
3315
3321
|
__name: "ChevronAIBtn",
|
|
3316
3322
|
props: {
|
|
3317
3323
|
disabled: Boolean,
|
|
@@ -3326,19 +3332,19 @@ const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
|
3326
3332
|
disabled: e.disabled
|
|
3327
3333
|
}, [
|
|
3328
3334
|
v("img", {
|
|
3329
|
-
src: e.isExpanded ? L(
|
|
3335
|
+
src: e.isExpanded ? L(Ol) : L($l),
|
|
3330
3336
|
alt: "AI",
|
|
3331
3337
|
class: j(["w-6 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
3332
|
-
}, null, 10,
|
|
3333
|
-
], 10,
|
|
3338
|
+
}, null, 10, Tl)
|
|
3339
|
+
], 10, Il));
|
|
3334
3340
|
}
|
|
3335
|
-
},
|
|
3341
|
+
}, Ml = { class: "card-body bg-white px-4 py-2 gap-0 relative z-10 rounded-md" }, Al = { class: "flex justify-between items-center" }, kl = /* @__PURE__ */ v("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "AI Summary", -1), Vl = { class: "flex items-center" }, Fl = {
|
|
3336
3342
|
class: "tooltip tooltip-bottom tooltip-small 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%] before:!text-xs before:!py-1 before:!px-2",
|
|
3337
3343
|
"data-tip": "AI Summarize"
|
|
3338
|
-
},
|
|
3344
|
+
}, Rl = {
|
|
3339
3345
|
key: 0,
|
|
3340
3346
|
class: "text-textCustom list-none list-outside my-2"
|
|
3341
|
-
},
|
|
3347
|
+
}, Pl = ["innerHTML"], Dl = {
|
|
3342
3348
|
__name: "AIExplanation",
|
|
3343
3349
|
props: {
|
|
3344
3350
|
isAIExplain: {
|
|
@@ -3366,13 +3372,13 @@ const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
|
3366
3372
|
}
|
|
3367
3373
|
]])
|
|
3368
3374
|
}, [
|
|
3369
|
-
v("div",
|
|
3370
|
-
v("div",
|
|
3371
|
-
|
|
3372
|
-
v("div",
|
|
3373
|
-
n.value ? (m(), q(
|
|
3374
|
-
v("div",
|
|
3375
|
-
B(
|
|
3375
|
+
v("div", Ml, [
|
|
3376
|
+
v("div", Al, [
|
|
3377
|
+
kl,
|
|
3378
|
+
v("div", Vl, [
|
|
3379
|
+
n.value ? (m(), q(c2, { key: 0 })) : H("", !0),
|
|
3380
|
+
v("div", Fl, [
|
|
3381
|
+
B(Ll, {
|
|
3376
3382
|
isExpanded: e.isAIExplain,
|
|
3377
3383
|
disabled: n.value,
|
|
3378
3384
|
onClick: a
|
|
@@ -3383,12 +3389,12 @@ const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
|
3383
3389
|
v("div", {
|
|
3384
3390
|
class: j(["overflow-hidden transition-all duration-300 ease-in-out", e.isAIExplain ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3385
3391
|
}, [
|
|
3386
|
-
(r = e.explanation) != null && r.result ? (m(), O("ul",
|
|
3392
|
+
(r = e.explanation) != null && r.result ? (m(), O("ul", Rl, [
|
|
3387
3393
|
(m(!0), O(G, null, te(((u = e.explanation) == null ? void 0 : u.result.split(`
|
|
3388
3394
|
`)) || [], (c, p) => (m(), O("li", {
|
|
3389
3395
|
key: `${c}-${p}`,
|
|
3390
3396
|
innerHTML: c
|
|
3391
|
-
}, null, 8,
|
|
3397
|
+
}, null, 8, Pl))), 128))
|
|
3392
3398
|
])) : H("", !0)
|
|
3393
3399
|
], 2)
|
|
3394
3400
|
])
|
|
@@ -3396,25 +3402,25 @@ const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
|
3396
3402
|
};
|
|
3397
3403
|
}
|
|
3398
3404
|
};
|
|
3399
|
-
function
|
|
3405
|
+
function Nl() {
|
|
3400
3406
|
document.documentElement.setAttribute("dir", "rtl");
|
|
3401
3407
|
}
|
|
3402
|
-
function
|
|
3408
|
+
function Bl() {
|
|
3403
3409
|
document.documentElement.removeAttribute("dir");
|
|
3404
3410
|
}
|
|
3405
|
-
const
|
|
3406
|
-
supportRTL:
|
|
3407
|
-
removeRTL:
|
|
3408
|
-
},
|
|
3411
|
+
const It = {
|
|
3412
|
+
supportRTL: Nl,
|
|
3413
|
+
removeRTL: Bl
|
|
3414
|
+
}, jl = ["ar", "fa", "iw", "yi", "ur", "pa"], Hl = { class: "bg-white min-h-screen flex flex-col" }, zl = { class: "py-2 px-5 shadow-lg" }, Ul = { class: "px-5 flex-grow" }, Zl = { class: "flex flex-col lg:flex-row lg:gap-2 mb-6" }, Wl = { class: "w-full lg:w-[calc(50%-1rem)] my-2 flex" }, Gl = /* @__PURE__ */ v("div", { class: "w-6 h-4 mx-auto hidden lg:block" }, null, -1), ql = { class: "w-full lg:w-[calc(50%-1rem)] my-2 flex" }, Jl = {
|
|
3409
3415
|
key: 0,
|
|
3410
3416
|
class: "w-full my-4"
|
|
3411
|
-
},
|
|
3417
|
+
}, Kl = { class: "grid grid-cols-1 lg:grid-cols-3 gap-4" }, Yl = {
|
|
3412
3418
|
key: 1,
|
|
3413
3419
|
class: "w-full my-4"
|
|
3414
|
-
},
|
|
3420
|
+
}, Ql = {
|
|
3415
3421
|
key: 1,
|
|
3416
3422
|
class: "text-textCustom italic font-medium"
|
|
3417
|
-
},
|
|
3423
|
+
}, ts = {
|
|
3418
3424
|
__name: "Popup",
|
|
3419
3425
|
props: {
|
|
3420
3426
|
opt: {
|
|
@@ -3476,9 +3482,9 @@ const $t = {
|
|
|
3476
3482
|
"copy"
|
|
3477
3483
|
],
|
|
3478
3484
|
setup(e, { emit: o }) {
|
|
3479
|
-
const t =
|
|
3485
|
+
const t = xn(), n = be(t), l = d2(t), a = Ze(t), i = Me(t), s = e, r = o, u = $(""), c = () => {
|
|
3480
3486
|
const I = s.opt.target;
|
|
3481
|
-
|
|
3487
|
+
jl.includes(I) ? It.supportRTL() : It.removeRTL();
|
|
3482
3488
|
};
|
|
3483
3489
|
N(
|
|
3484
3490
|
() => s.translation,
|
|
@@ -3519,10 +3525,10 @@ const $t = {
|
|
|
3519
3525
|
const x = I === "src" ? n.text : n.result;
|
|
3520
3526
|
r("loadTTS", { type: I, data: x });
|
|
3521
3527
|
}
|
|
3522
|
-
function b(I, x = a.src,
|
|
3528
|
+
function b(I, x = a.src, k = a.target) {
|
|
3523
3529
|
I && (u.value = I, i.setLoading("translation", !0), r("translate", {
|
|
3524
3530
|
src: x,
|
|
3525
|
-
target:
|
|
3531
|
+
target: k,
|
|
3526
3532
|
text: I
|
|
3527
3533
|
}));
|
|
3528
3534
|
}
|
|
@@ -3533,21 +3539,21 @@ const $t = {
|
|
|
3533
3539
|
s.isAIExplain || i.setLoading("aiExplanation", !0), r("aiExplain");
|
|
3534
3540
|
}
|
|
3535
3541
|
return (I, x) => {
|
|
3536
|
-
var
|
|
3537
|
-
return m(), O("div",
|
|
3538
|
-
v("div",
|
|
3539
|
-
B(
|
|
3542
|
+
var k, P, y, M, C;
|
|
3543
|
+
return m(), O("div", Hl, [
|
|
3544
|
+
v("div", zl, [
|
|
3545
|
+
B(z2, {
|
|
3540
3546
|
onReader: x[0] || (x[0] = (h) => r("reader")),
|
|
3541
3547
|
onSettings: x[1] || (x[1] = (h) => r("settings")),
|
|
3542
3548
|
onFullScreen: x[2] || (x[2] = (h) => r("fullscreen")),
|
|
3543
3549
|
onStarList: x[3] || (x[3] = (h) => r("starList"))
|
|
3544
3550
|
})
|
|
3545
3551
|
]),
|
|
3546
|
-
v("div",
|
|
3547
|
-
B(
|
|
3548
|
-
v("div",
|
|
3549
|
-
v("div",
|
|
3550
|
-
B(
|
|
3552
|
+
v("div", Ul, [
|
|
3553
|
+
B(Hn, { class: "mt-3 mb-0" }),
|
|
3554
|
+
v("div", Zl, [
|
|
3555
|
+
v("div", Wl, [
|
|
3556
|
+
B(Po, {
|
|
3551
3557
|
text: u.value,
|
|
3552
3558
|
onChange: g,
|
|
3553
3559
|
onClear: p,
|
|
@@ -3555,9 +3561,9 @@ const $t = {
|
|
|
3555
3561
|
class: "flex-grow flex flex-col"
|
|
3556
3562
|
}, null, 8, ["text"])
|
|
3557
3563
|
]),
|
|
3558
|
-
|
|
3559
|
-
v("div",
|
|
3560
|
-
B(
|
|
3564
|
+
Gl,
|
|
3565
|
+
v("div", ql, [
|
|
3566
|
+
B(Uo, {
|
|
3561
3567
|
isFavoriteFeatureEnabled: e.isFavoriteFeatureEnabled,
|
|
3562
3568
|
isAITranslateFeatureEnabled: e.isAITranslateFeatureEnabled,
|
|
3563
3569
|
isAITranslate: e.isAITranslate,
|
|
@@ -3571,33 +3577,33 @@ const $t = {
|
|
|
3571
3577
|
])
|
|
3572
3578
|
]),
|
|
3573
3579
|
s.translation ? (m(), O(G, { key: 0 }, [
|
|
3574
|
-
((
|
|
3575
|
-
B(
|
|
3580
|
+
((k = L(n).result) == null ? void 0 : k.length) > e.aiExplainMinLength ? (m(), O("div", Jl, [
|
|
3581
|
+
B(Dl, {
|
|
3576
3582
|
isAIExplain: e.isAIExplain,
|
|
3577
3583
|
explanation: e.explanation,
|
|
3578
3584
|
onAiExplain: R
|
|
3579
3585
|
}, null, 8, ["isAIExplain", "explanation"])
|
|
3580
3586
|
])) : H("", !0),
|
|
3581
|
-
v("div",
|
|
3582
|
-
(P = L(n).dictionary) != null && P.length ? (m(), q(
|
|
3587
|
+
v("div", Kl, [
|
|
3588
|
+
(P = L(n).dictionary) != null && P.length ? (m(), q(el, {
|
|
3583
3589
|
key: 0,
|
|
3584
3590
|
onTranslate: b
|
|
3585
3591
|
})) : H("", !0),
|
|
3586
|
-
(y = L(n).definitions) != null && y.length ? (m(), q(
|
|
3587
|
-
(M = L(n).synonyms) != null && M.length ? (m(), q(
|
|
3592
|
+
(y = L(n).definitions) != null && y.length ? (m(), q(ul, { key: 1 })) : H("", !0),
|
|
3593
|
+
(M = L(n).synonyms) != null && M.length ? (m(), q(El, {
|
|
3588
3594
|
key: 2,
|
|
3589
3595
|
onTranslate: b
|
|
3590
3596
|
})) : H("", !0)
|
|
3591
3597
|
]),
|
|
3592
|
-
(C = L(n).examples) != null && C.length ? (m(), O("div",
|
|
3593
|
-
B(
|
|
3598
|
+
(C = L(n).examples) != null && C.length ? (m(), O("div", Yl, [
|
|
3599
|
+
B(ml)
|
|
3594
3600
|
])) : H("", !0)
|
|
3595
|
-
], 64)) : (m(), O("span",
|
|
3601
|
+
], 64)) : (m(), O("span", Ql, "Service unavailable"))
|
|
3596
3602
|
])
|
|
3597
3603
|
]);
|
|
3598
3604
|
};
|
|
3599
3605
|
}
|
|
3600
3606
|
};
|
|
3601
3607
|
export {
|
|
3602
|
-
|
|
3608
|
+
ts as default
|
|
3603
3609
|
};
|